import { type Checkpoint } from "../checkpointStore.js"; import type { Refusal } from "./edits.js"; /** One invariant a patched checkpoint must keep. `check` returns a * message per place the invariant is broken. The checkpoint is handed * in parsed, so no rule parses it again. */ export type ValidationRule = { name: string; check: (checkpoint: Checkpoint) => string[]; }; export declare const VALIDATION_RULES: ValidationRule[]; /** The invariants `result` breaks that `source` kept, each named after * its rule. The source decides what counts: a checkpoint the debugger * stops on may already break a rule (a tripped guard, a tool stop's * unanswered calls), and an edit that touches neither must go through. * The shape is not a rule here: `result` is parsed before it is * validated, and a copy that does not parse never reaches this. */ export declare function validate(source: Checkpoint, result: Checkpoint): Refusal[];