import type { DecisionLifecycleHold } from '../lifecycle.js'; import type { CompileCacheEntry, CompileCacheIdentity, CompileCacheLifecycleJournal, CompileCacheLifecycleOptions, CompileCacheReadContext, CompileCacheResult } from './types.js'; export interface FileCompileCacheOptions extends CompileCacheLifecycleOptions { lockPollMs?: number; lockTimeoutMs?: number; /** Optional independent tombstone journal consulted before any restore. */ lifecycleJournal?: CompileCacheLifecycleJournal; } /** * Durable, atomic filesystem cache. Files are named only by one-way key digests. * Out-of-scope or unauthorized lifecycle calls return the same result as an * absent key, decided before the filesystem is touched. */ export declare class FileCompileCache { private readonly directory; private readonly fills; private readonly lockPollMs; private readonly lockTimeoutMs; private readonly policy; private readonly rule; private readonly journal; constructor(directory: string, options: FileCompileCacheOptions); getOrCompile(identity: CompileCacheIdentity, context: CompileCacheReadContext, ttlMs: number, compile: () => Promise, options?: { bypass?: boolean; }): Promise>; read(identity: CompileCacheIdentity, context: CompileCacheReadContext): Promise | null>; private readExisting; /** Erase the body and leave a persistent tombstone; the key never fills or restores again. */ tombstone(identity: CompileCacheIdentity, context: CompileCacheReadContext): Promise; /** D10 deletion: the same body-free tombstone; false when absent, held or already erased. */ delete(identity: CompileCacheIdentity, context: CompileCacheReadContext): Promise; /** Place (or with `null`, release) a D10 hold scoped to the `cache` surface. */ setLegalHold(identity: CompileCacheIdentity, context: CompileCacheReadContext, hold: DecisionLifecycleHold | null): Promise; private retire; /** Authorized live or expired entry; null when absent, out of scope or already tombstoned. */ private readLifecycleEntry; private readRecord; /** Export is explicit, scope-authorized, and allowed only when the lifecycle rule persists backups. */ backup(identity: CompileCacheIdentity, context: CompileCacheReadContext): Promise | null>; restore(entry: CompileCacheEntry, context: CompileCacheReadContext): Promise; private buildWithFileLock; private acquireFillLock; private lockOwnerAlive; private lockRecordRecentlyCreated; private releaseFillLock; private positiveInteger; private path; private lockPath; private publish; } //# sourceMappingURL=file-store.d.ts.map