/**
 * Memory schema helpers — database open/directory helpers and repo/project ID
 * resolution. Used by MemoryEngine at construction time.
 */
import Database from 'better-sqlite3';
/** Derive a stable repoId from workspace path (sync). Git-remote-based ID warmed async via warmRepoId(). */
export declare function resolveCurrentRepoId(): string;
/** Async warm: attempt to upgrade cwd-based repoId to git-remote hash if available. No-op if ID already stabilised. */
export declare function warmRepoId(): Promise<void>;
export declare function resolveCurrentProjectId(): string;
export declare function resolvePreferredStateRoot(): string;
export declare function isWritableStorageError(error: unknown): boolean;
export declare function ensureWritableDirectory(target: string): void;
export declare function resolveFallbackStateRoot(preferredStateRoot: string): string;
export declare function openMemoryDatabase(requestedDbPath: string): {
    db: Database.Database;
    dbPath: string;
    stateRoot: string;
    fallbackApplied: boolean;
    fallbackReason?: string;
};
