import { type DecisionLifecycleReference, type DecisionLifecycleTombstone } from '../lifecycle.js'; import { type BatchStoreLifecycleBinding, type BatchStoreRestoreReport } from './protection.js'; import type { FileBatchResultStore } from './result-store.js'; import type { DecisionBatchReceipt, BatchReceiptAcquireResult, BatchReceiptStore } from './types.js'; export declare class BatchReceiptConflictError extends Error { } export declare class MemoryBatchReceiptStore implements BatchReceiptStore { private readonly records; acquire(initial: DecisionBatchReceipt): Promise; read(batchId: string, tenantId: string, projectId: string): Promise; compareAndSwap(previous: DecisionBatchReceipt, next: DecisionBatchReceipt): Promise; } export interface FileBatchReceiptStoreOptions extends BatchStoreLifecycleBinding { /** HMAC-SHA256 key of at least 32 bytes. Every revision is verified against it on every read. */ integrityKey: Uint8Array; /** Cascade target: erasing a batch receipt erases its result snapshots. Required for erase and sweep. */ results?: FileBatchResultStore; /** Independent D10 tombstone authority, consulted on read, acquisition and restore. Errors fail closed. */ isTombstoned?: (reference: DecisionLifecycleReference) => Promise; } /** * Every revision is immutable and sealed with a keyed MAC; hard-link publication supplies * filesystem CAS. File names are keyed, so a directory listing does not reveal scope. */ export declare class FileBatchReceiptStore implements BatchReceiptStore { private readonly directory; private readonly options; private readonly key; private readonly rule; private readonly clock; constructor(directory: string, options: FileBatchReceiptStoreOptions); /** Opaque D10 reference for host link registration. It never contains scope identifiers. */ lifecycleReference(batchId: string, tenantId: string, projectId: string): DecisionLifecycleReference; acquire(initial: DecisionBatchReceipt): Promise; /** Erased, expired and missing receipts all return null. */ read(batchId: string, tenantId: string, projectId: string): Promise; compareAndSwap(previous: DecisionBatchReceipt, next: DecisionBatchReceipt): Promise; /** * D10 content eraser for the `receipt` surface. Call it through `eraseDecisionSubject`, which * enforces legal holds and records the journal tombstone first. Publishes a body-free local * tombstone, cascades to the bound result store, then removes every revision body. */ erase(opaqueId: string): Promise; /** Erase receipts whose retention elapsed, skipping any the host reports as held. Returns the count erased. */ sweepExpired(isHeld: (reference: DecisionLifecycleReference) => Promise): Promise; /** * Restore sealed revisions from a backup copy of this store. A batch is refused when it is * tombstoned locally or by the host, is past retention, or fails verification. */ restoreFrom(backupDirectory: string, tombstones?: ReadonlyArray): Promise; /** * Explicit, authorized upgrade of unkeyed revisions written before integrity protection. * Every legacy chain is validated before authorization; nothing is written unless it is granted. */ migrateLegacy(authorize: (summary: { receipts: number; revisions: number; }) => Promise): Promise<{ migrated: number; }>; private prefix; private tombstonePath; private tombstoned; private assertNoLegacy; private chain; private revision; private removeRevisions; private ensurePrivateDirectory; private publish; } //# sourceMappingURL=store.d.ts.map