import type { StateScope } from './state-locator.js';
export declare const MANIFEST_VERSION: 1;
/**
 * Architecture generation marker for the installed runtime. Bump this when
 * the install layout changes (new dashboard, new MCP registrations, new
 * hook surfaces, new state directories) so the install-wizard can detect
 * older shapes and run migrations rather than silently leaving stale
 * registrations alongside the new ones.
 *
 * Manifests written before this field was introduced have `undefined` here
 * and are treated as the inferred legacy generation `v6` (matching the
 * setup-marker-v6.json filename Nexus has used since the v6 release).
 */
export declare const INSTALL_ARCH_GENERATION: "v7";
export type InstallArchGeneration = typeof INSTALL_ARCH_GENERATION | string;
export interface ManifestPathEntry {
    path: string;
    kind: 'file' | 'dir';
    scope: StateScope;
    addedAt: number;
}
export interface ManifestRegistrationEntry {
    kind: 'ide-setting';
    target: 'claude-workspace' | 'claude-home' | 'vscode-workspace' | 'cursor-workspace' | 'codex' | 'other';
    filePath: string;
    /** Dotted path to the key this registration owns (e.g. `['mcpServers', 'nexus-prime']`). */
    jsonPath: string[];
    /** Optional marker used to filter entries inside arrays (e.g. command substring). */
    entryMarker?: string;
    addedAt: number;
}
export interface InstallManifest {
    version: typeof MANIFEST_VERSION;
    createdAt: number;
    updatedAt: number;
    paths: ManifestPathEntry[];
    registrations: ManifestRegistrationEntry[];
    setupMarkers: string[];
    /** Architecture generation marker. May be absent in manifests written
     *  before INSTALL_ARCH_GENERATION was introduced. */
    architectureGeneration?: InstallArchGeneration;
}
export declare function loadManifest(filePath?: string): InstallManifest;
/** Stamp the manifest with the current architecture generation. Idempotent. */
export declare function recordArchitectureGeneration(manifest: InstallManifest, generation?: InstallArchGeneration): InstallManifest;
/**
 * Inspect the manifest's recorded generation against the current build.
 * `previousGeneration` is undefined for fresh installs, 'v6' for legacy
 * manifests written before the field existed. `requiresMigration` is true
 * when the manifest is older than INSTALL_ARCH_GENERATION.
 */
export declare function detectArchitectureUpgrade(manifest: InstallManifest): {
    previousGeneration: string | undefined;
    currentGeneration: typeof INSTALL_ARCH_GENERATION;
    requiresMigration: boolean;
};
export declare function saveManifest(manifest: InstallManifest, filePath?: string): void;
export declare function recordPath(manifest: InstallManifest, entry: Omit<ManifestPathEntry, 'addedAt'>): InstallManifest;
export declare function recordRegistration(manifest: InstallManifest, entry: Omit<ManifestRegistrationEntry, 'addedAt' | 'kind'> & {
    kind?: ManifestRegistrationEntry['kind'];
}): InstallManifest;
export declare function recordSetupMarker(manifest: InstallManifest, markerPath: string): InstallManifest;
export declare function clearManifest(filePath?: string): void;
/** Append-or-update helper used by install-wizard. Returns the written manifest. */
export declare function appendToManifest(mutator: (current: InstallManifest) => InstallManifest, filePath?: string): InstallManifest;
