/** Layout of the on-disk store, all under `/.nightwatch/`. */ export interface StorePaths { readonly root: string; readonly ledgerDir: string; readonly headsDir: string; readonly locksDir: string; readonly spillDir: string; /** Created on demand by `nightwatch keygen`, not by ensureStore. */ readonly keysDir: string; readonly metaFile: string; readonly checkpointsFile: string; readonly errorLog: string; } export declare const STORE_DIRNAME = ".nightwatch"; export declare function storePathsAt(projectRoot: string): StorePaths; export declare function ensureStore(paths: StorePaths): void; /** Walk upward from `start` until a directory containing `.nightwatch/` is found. */ export declare function findProjectRoot(start: string): string; export declare function ledgerFile(paths: StorePaths, session: string): string; export declare function headFile(paths: StorePaths, session: string): string; /** Session ids come from external payloads — never let them traverse paths. */ export declare function sanitizeSession(session: string): string;