/** * Acquire the decision-store consolidation lock (thin binding of {@link acquireLockAt}). * Returns an idempotent release function. */ export declare function acquireDecisionsLock(rootPath: string): Promise<() => Promise>; /** * Acquire the analysis-artifact lock for a given analysis output directory (thin * binding of {@link acquireLockAt}). Serializes the artifact-write critical * sections of a full `analyze` and a running watcher's persist so their JSON * artifact sets never interleave. The lock file lives inside the analysis * directory, so two writers of the SAME directory contend and writers of * different directories do not. */ export declare function acquireAnalysisLock(analysisDir: string): Promise<() => Promise>; /** Run `fn` while holding the analysis-artifact lock for `analysisDir`; always releases. */ export declare function withAnalysisLock(analysisDir: string, fn: () => Promise): Promise; /** * Non-blocking check: is a consolidation run currently in flight? * * True iff the lock file exists and is not stale (a stale lock is a crashed * holder, treated as not-in-flight so a fresh run can proceed). Never acquires, * steals, or waits on the lock — a pure read used to coalesce redundant * `record_decision` spawns against the run already underway. */ export declare function isDecisionsLockHeld(rootPath: string): Promise; /** Run `fn` while holding the consolidation lock; always releases. */ export declare function withDecisionsLock(rootPath: string, fn: () => Promise): Promise; //# sourceMappingURL=lock.d.ts.map