import type { WizardPlan } from "./wizard/answers.js"; export declare const FIRST_RUN_MEMORY_INITIALIZING_MARKER = ".first-run-memory-initializing"; export interface FirstRunManagedMemoryHooks { /** Test seam for an external creator winning the absent-root race. */ readonly beforeRootClaim?: (root: string) => void | Promise; /** Test seam after this helper has exclusively claimed the final root. */ readonly afterRootClaim?: (root: string) => void | Promise; /** Test seam immediately before the identity-fenced rebuild. */ readonly beforeRebuild?: (stagingRoot: string) => void | Promise; /** Test seam after the complete generation exists but before atomic publication. */ readonly beforePromotion?: (stagingRoot: string, finalRoot: string) => void | Promise; /** Test seam after manifest authority exists but before source-link cleanup/directory fsync. */ readonly afterManifestLinked?: (finalRoot: string) => void | Promise; } export interface InitializeFirstRunManagedMemoryOptions { readonly agentRoot: string; /** A plan returned by the init wizard composer, not an arbitrary loaded config. */ readonly plan: WizardPlan; /** Effective init environment; identity-changing memory overrides fail closed. */ readonly env?: Readonly>; readonly abortSignal?: AbortSignal; readonly hooks?: FirstRunManagedMemoryHooks; } export interface InitializeFirstRunManagedMemoryResult { readonly initialized: boolean; readonly root?: string; } /** Read-only refusal gate used before init writes any scaffold file. */ export declare function preflightFirstRunManagedMemory(options: InitializeFirstRunManagedMemoryOptions): Promise; /** * Create the initial managed Journal/BuJo generation for a newly generated * init plan. This deliberately refuses every pre-existing memory root, claims * the final root exclusively with a fail-closed marker, builds in a private * same-parent directory, and publishes the manifest last with an atomic * no-replace hard link. The native memory implementation is dynamically loaded * only after confinement and the final root claim have been proven. */ export declare function initializeFirstRunManagedMemory(options: InitializeFirstRunManagedMemoryOptions): Promise; //# sourceMappingURL=first-run-managed-memory.d.ts.map