import { type PageReviewDecisionSlot, type PageReviewNativeEvidence } from "./page-review-contracts.js"; import { type QaContext, type QaSignature } from "./qa-plan.js"; import type { PersistedCritique } from "./qa-reuse.js"; declare const SNAPSHOT_DIR: string; export interface QaSnapshotStoreOptions { /** Override the store root (tests, host-managed cache locations). */ root?: string; } export interface StoredQaSnapshot { signature: QaSignature; /** Directory holding this snapshot's files. */ path: string; domHtmlPath?: string; screenshotPath?: string; /** Critique results persisted with the snapshot (full-coverage runs only) — * what the band-diff reuse layer replays for provably-unchanged regions. */ critique?: PersistedCritique; tileEvidence?: PageReviewNativeEvidence; } /** Filesystem-safe key for a target URL/file + render context. The digest * disambiguates targets whose sanitized slugs collide. */ export declare function qaSnapshotKey(target: string): string; export declare function loadReviewDecisions(target: string, context: QaContext, opts?: QaSnapshotStoreOptions): PageReviewDecisionSlot | null; /** Decisions contain text and digests only; replacing a baseline cannot touch this slot. */ export declare function saveReviewDecisions(target: string, context: QaContext, slot: PageReviewDecisionSlot, opts?: QaSnapshotStoreOptions): void; /** * Persist a QA snapshot atomically. The whole context directory is staged as * `.tmp-` and renamed into place, replacing any prior snapshot for * the same target + context — a reader never observes a partial write. */ export declare function saveQaSnapshot(target: string, context: QaContext, content: { signature: QaSignature; domHtml?: string; screenshotPng?: Buffer; critique?: PersistedCritique; tileEvidence?: PageReviewNativeEvidence; }, opts?: QaSnapshotStoreOptions): StoredQaSnapshot; /** Load the persisted snapshot for a target + context, or null. A corrupt * signature file returns null (and the caller re-acquires a baseline) rather * than throwing — a bad cache entry must never block QA. */ export declare function loadQaSnapshot(target: string, context: QaContext, opts?: QaSnapshotStoreOptions): StoredQaSnapshot | null; /** List targets with at least one persisted snapshot (store maintenance). */ export declare function listQaSnapshotTargets(opts?: QaSnapshotStoreOptions): string[]; export interface ResolvedQaBaseline { /** `qa-snapshot:` | `production-render:` | * `revision-render: