/** * Atomic persistence for the `/benchmark/` store (cases, snapshots, * run records) plus the structural guards that validate what is read back. * Split out of `benchmark.ts` (2026-09-29): that module keeps the pure domain * contracts, lifecycle and snapshot validation; this one owns the filesystem. * @module dsh-continual-harness */ import type { BenchmarkCase, HarnessSnapshot } from './benchmark.ts'; /** * Load the fixed benchmark cases from `/benchmark/cases.json`. A missing * store reads as an empty list; malformed JSON, an unknown schema version, an * invalid case shape, or a frozen case whose material no longer matches its * recorded hash all fail loudly (never silent acceptance, never a repair write). */ export declare function loadBenchmark(home: string): BenchmarkCase[]; /** * Atomically persist the fixed benchmark cases to `/benchmark/cases.json` * (sibling `.tmp` + rename), recording the material hash of every frozen case * so a later load can detect tampering. Drafts are never hashed. */ export declare function saveBenchmarkCases(home: string, cases: BenchmarkCase[]): void; /** * Append one benchmark run record as a JSON line to `/benchmark/runs.jsonl`. * Only the benchmark run log is touched — the audit gate's `reviews.jsonl` is * never rewritten. The record is `{ runId, cells, decision, createdAt }` as * assembled by the `run` action in `src/tool.ts`. The append is not atomic * (a torn trailing line is possible on crash); readers tolerate it. */ export declare function appendBenchmarkRun(home: string, record: Record): void; /** * Persist a reference snapshot read-only to `/benchmark/snapshots/.json` * via an atomic tmp + rename write. The snapshot id must be a safe file name; * the snapshot object itself is written as-is (its `stateHash` is validated * on load, not re-stamped here). */ export declare function captureReferenceSnapshot(home: string, snapshot: HarnessSnapshot): void; /** * Load a previously captured snapshot. A missing snapshot returns `undefined`; * malformed JSON or a stored `state` whose canonical projection hash no longer * matches the recorded `stateHash` fails loudly. */ export declare function loadReferenceSnapshot(home: string, snapshotId: string): HarnessSnapshot | undefined; //# sourceMappingURL=benchmark-store.d.ts.map