import type { NativeProjectPaths } from './native-types.js'; /** * A manual-evidence receipt whose bindings diverge from the current revision * and can be safely re-issued in place. {@link refreshNativeVerificationReceipts} * re-issues these automatically under `--apply`. */ export interface NativeReceiptRefreshManualItem { oldRef: string; acceptanceIds: string[]; } /** * An automated-check receipt that is stale. Automated receipts cannot be * silently re-issued because they attest to a real command execution; the Agent * must re-run the recorded command to produce fresh evidence. This entry * carries the original command so the Agent can re-run it directly. */ export interface NativeReceiptRefreshRerunItem { oldRef: string; acceptanceIds: string[]; command: string; timeoutMs: number; } /** A manual receipt whose contract/scope/artifact binding changed and needs a new observation. */ export interface NativeReceiptRefreshManualRequiredItem { oldRef: string; acceptanceIds: string[]; mismatches: string[]; } /** * A required-check (static-inspection) receipt that is stale. These are * produced by `comet native check` and re-issued automatically by `next * --result pass`, so a refresh reports them as a hint rather than re-issuing. */ export interface NativeReceiptRefreshCheckItem { oldRef: string; } export interface NativeReceiptRefreshResult { /** Manual receipts re-issued under `--apply` (old ref -> new ref, per acceptance). */ refreshed: { acceptanceId: string; oldRef: string; newRef: string; }[]; /** Automated receipts that must be re-run; empty unless stale automated receipts exist. */ requiresRerun: NativeReceiptRefreshRerunItem[]; /** Manual receipts that cannot be re-issued because their non-revision bindings changed. */ requiresManual: NativeReceiptRefreshManualRequiredItem[]; /** Required-check receipts that must be re-produced via `comet native check`. */ requiresCheck: NativeReceiptRefreshCheckItem[]; /** True when `--apply` was used and verification.md was rewritten. */ applied: boolean; /** Relative ref of the verification report updated under `--apply`. */ verificationReport: string | null; } export declare function isManualReceiptRefreshSafe(comparison: { ok: boolean; mismatches: readonly string[]; }): boolean; /** * Inspect — and optionally repair — stale verification receipts bound to an * older revision than the current state. * * The revision-bound receipt model intentionally invalidates any receipt whose * `sourceRevision` differs from the current state revision (a tamper-resistance * guarantee). But ordinary state writes (checkpoints, spec refresh, advancing * phases) bump the revision, which can leave previously-issued receipts stale. * This function lets an Agent recover on its own: under `--apply` it re-issues * manual-evidence receipts whose only mismatch is the source revision at the * current revision and rewrites the acceptance-evidence block in * `verification.md`, while reporting receipts that require fresh evidence. * An implementation scope that changed after Build is a different recovery * class and fails before receipt inspection with the exact command for * returning to Build and re-freezing the scope. * * Returns a structured report so the Agent can drive recovery programmatically * rather than parsing prose. */ export declare function refreshNativeVerificationReceipts(options: { paths: NativeProjectPaths; name: string; apply: boolean; }): Promise; /** * Replace the marker-delimited acceptance-evidence machine block in a * verification report while leaving all surrounding markdown (required H1 * sections, prose) untouched. */ export declare function replaceAcceptanceEvidenceBlock(markdown: string, newBlock: string): string; //# sourceMappingURL=native-receipt-refresh.d.ts.map