import type { DecisionLifecyclePolicy, DecisionLifecycleReference } from '../lifecycle.js'; import type { ResultCacheActor, ResultCacheEntry, ResultCacheScope, ResultCacheStore } from './types.js'; export declare class ResultCacheAccessDeniedError extends Error { constructor(); } export declare class MemoryResultCacheStore implements ResultCacheStore { private readonly entries; read(actor: ResultCacheActor, key: `sha256:${string}`): Promise; putIfAbsent(actor: ResultCacheActor, entry: ResultCacheEntry): Promise; invalidate(actor: ResultCacheActor, key: `sha256:${string}`, expectedEntryId?: string): Promise; delete(actor: ResultCacheActor, key: `sha256:${string}`): Promise; export(actor: ResultCacheActor, key: `sha256:${string}`): Promise; } /** * Binds a file store to the shared D10 `cache` lifecycle surface. The D10 rule caps * retention and classification and decides export. `sourceErased` is the host's * independent D10 authority for source receipts: entries whose source was erased are * never served, refilled, or retained, even if a backup restored them. */ export interface ResultCacheLifecycleBinding { policy: DecisionLifecyclePolicy; sourceErased?: (scope: ResultCacheScope, sourceReceiptId: string) => Promise; now?: () => number; } /** Single-file-per-key store. Atomic hard-link publication prevents overwrite/poisoning. */ export declare class FileResultCacheStore implements ResultCacheStore { private readonly directory; private readonly options; private readonly rule; constructor(directory: string, options?: { legalHold?: boolean; lifecycle?: ResultCacheLifecycleBinding; }); /** Opaque D10 references (entry IDs) for cache entries derived from one source receipt. */ lifecycleReferences(actor: ResultCacheActor, sourceReceiptId: string): Promise; /** D10 `erase` for the `cache` surface: tombstone and unlink the entry with this opaque ID. */ eraseLifecycleReference(actor: ResultCacheActor, reference: DecisionLifecycleReference): Promise; /** Cascade a deleted source receipt to every cache entry in the authenticated scope that reused it. */ eraseBySourceReceipt(actor: ResultCacheActor, sourceReceiptId: string): Promise; withKeyLock(actor: ResultCacheActor, key: `sha256:${string}`, work: () => Promise): Promise; /** Bounded retention sweep for the authenticated scope; never touches other projects. */ purgeExpired(actor: ResultCacheActor, nowEpochMs?: number): Promise; read(actor: ResultCacheActor, key: `sha256:${string}`): Promise; putIfAbsent(actor: ResultCacheActor, entry: ResultCacheEntry): Promise; invalidate(actor: ResultCacheActor, key: `sha256:${string}`, expectedEntryId?: string): Promise; delete(actor: ResultCacheActor, key: `sha256:${string}`): Promise; export(actor: ResultCacheActor, key: `sha256:${string}`): Promise; private load; private now; private withinRetention; private sourceErased; /** Integrity-checked live entries of the authenticated scope only. */ private scopedEntries; private deleted; private remove; private path; } //# sourceMappingURL=store.d.ts.map