import { type OutcomeEvidence, type OutcomeEvidenceDraft } from "./OutcomeEvidence.js"; /** The highest revision Core accepts for one subject. */ export declare const OUTCOME_EVIDENCE_MAX_REVISION = 10000; export declare const OUTCOME_STATE_VERSION: "agent-safe.card-outcomes-state/1"; /** A stated draft and the digest of exactly that content. */ export interface OutcomeEvidenceEntry { readonly draft: OutcomeEvidenceDraft; readonly sha256: string; } export interface OutcomeEvidenceRecordResult { /** New subjects (revision 1) and changed ones (the next revision). */ readonly recorded: number; /** Subjects whose evidence was already recorded as it is. */ readonly unchanged: number; /** Changed subjects already at the highest revision: nothing more can be stated for them. */ readonly exhausted: number; } /** A refusal by the store: the code, never a path or a value. */ export declare class OutcomeEvidenceStoreError extends Error { readonly code: string; constructor(code: string); } /** * What the publisher owes Core, per subject: the evidence at its current revision, the digest of * that content, and the revision Core last accepted. A changed draft takes the next revision, an * unchanged one is left alone, and only the revision Core accepted is ever marked sent, so the * same evidence is never sent twice and a subject's revision rises exactly when it changes. * * With a file, the whole state is written to a temporary file and renamed over the old one after * every change, so a crash leaves the previous state or the next, never half of one. A state * file that cannot be read as one is refused rather than replaced: starting again from nothing * would restate every subject at revision 1, which Core already holds with other content. */ export declare class OutcomeEvidenceStore { private readonly file; private subjects; /** `file` is where the state persists; null keeps it in memory, for tests. */ constructor(file?: string | null); record(entries: readonly OutcomeEvidenceEntry[]): Promise; /** Evidence whose current revision Core has not accepted, oldest action first. */ owed(limit: number): Promise; /** Core accepted these revisions; a subject that moved on since then stays owed. */ sent(items: readonly Pick[]): Promise; /** * Core holds this subject's revision with other content: the same evidence goes again under * the next revision. False when the subject is unknown or has no revision left. */ supersede(subjectDigest: string): Promise; /** * Forgets subjects Core holds at their current revision that occurred before `before`: nothing * reads their facts any more, so nothing can change them. Owed subjects are kept until sent. */ prune(before: Date): Promise; private load; private save; } //# sourceMappingURL=OutcomeEvidenceStore.d.ts.map