import { diffProjections } from "audit-tools/shared"; export { diffProjections }; import { type ContractPipelineArtifactName } from "./artifactStore.js"; /** The verdict-bearing review artifacts whose re-run is expensive (diff-eligible). */ export declare const REVIEW_ARTIFACTS: ReadonlySet; export declare function isReviewArtifact(name: ContractPipelineArtifactName): boolean; declare const SNAPSHOT_SCHEMA_VERSION: "remediate-code-contract-pipeline/review-snapshot/v1alpha1"; export interface ReviewSnapshot { schema_version: typeof SNAPSHOT_SCHEMA_VERSION; artifact_name: ContractPipelineArtifactName; /** ISO-8601 capture time (caller-supplied for deterministic tests). */ reviewed_at: string; /** The verdict payload this review emitted — what a re-review re-affirms. */ prior_payload: unknown; /** Semantic projection of each upstream dependency at review time. */ reviewed_inputs: Partial>; } export declare function reviewSnapshotPath(artifactsDir: string, name: ContractPipelineArtifactName): string; export declare function reviewSnapshotExists(artifactsDir: string, name: ContractPipelineArtifactName): boolean; /** * Read a review snapshot, or null when none is usable. * * A snapshot is REGENERABLE state — one written under another schema version is * discarded rather than reinterpreted, which costs one full re-review (the * behaviour when no snapshot exists) instead of diffing a prior verdict against * inputs projected under different semantics. */ export declare function readReviewSnapshot(artifactsDir: string, name: ContractPipelineArtifactName): Promise; /** * Capture a review snapshot for a freshly-produced review artifact: the semantic * projection of each current upstream dependency plus the review's own payload. * No-op for non-review artifacts. The dependency envelopes are read from disk, so * this must run after the upstreams are enveloped (always true post-ingest). */ export declare function captureReviewSnapshot(artifactsDir: string, name: ContractPipelineArtifactName, payload: unknown, reviewedAt: string): Promise; export interface ReReviewDelta { /** Per-dependency diff lines, keyed by dependency name; empty for unchanged. */ changedInputs: { dep: ContractPipelineArtifactName; lines: string[]; }[]; /** True when no upstream projection actually changed (re-affirm verbatim). */ allUnchanged: boolean; } /** * Compute the re-review delta for a review phase against its snapshot: which * upstream dependencies changed (by semantic projection) since the prior verdict, * and the field-level diff for each. Dependencies present now but absent in the * snapshot (or vice-versa) are reported as wholesale add/remove diffs. */ export declare function computeReReviewDelta(artifactsDir: string, name: ContractPipelineArtifactName, snapshot: ReviewSnapshot): Promise; /** * Render the diff-based re-review section appended to a review phase's re-emit * prompt. Carries the prior verdict and the precise changed-since-last-review * delta, and instructs the worker to re-affirm the prior verdict when the delta * does not affect it, or revise only the affected items otherwise. Delegates the * prompt body to the shared `renderDiffReReviewSection` (single-sourced shape). */ export declare function renderReReviewSection(_name: ContractPipelineArtifactName, snapshot: ReviewSnapshot, delta: ReReviewDelta): string; //# sourceMappingURL=reviewSnapshot.d.ts.map