import { z } from "zod"; export declare const RemediationOutcomeStatusSchema: z.ZodEnum<["resolved", "verified_no_change", "inappropriate", "ignored", "blocked", "verified_already_fixed", "refuted"]>; export type RemediationOutcomeStatus = z.infer; export declare const EVIDENCE_MECHANISM_KINDS: readonly ["red_green_test", "build_lint_gate", "read_at_head_verification", "read_at_head_refutation"]; export declare const EvidenceMechanismKindSchema: z.ZodEnum<["red_green_test", "build_lint_gate", "read_at_head_verification", "read_at_head_refutation"]>; export type EvidenceMechanismKind = z.infer; /** * The per-finding verification-evidence TRIPLE (INV-ISC-EVIDENCE-EMITTED): * `file` (a repo-relative path), `line` (a line or line range), and * `mechanism` (the structural enum above). This is the FLOOR of the widened * outcome record — a minimum the record must carry for a terminal disposition, * not a closed shape that excludes further fields later. */ export declare const EvidenceSchema: z.ZodObject<{ file: z.ZodString; line: z.ZodString; mechanism: z.ZodEnum<["red_green_test", "build_lint_gate", "read_at_head_verification", "read_at_head_refutation"]>; /** Optional human-readable elaboration; never load-bearing for the mechanism-contradiction check. */ mechanism_detail: z.ZodOptional; }, "strict", z.ZodTypeAny, { file: string; line: string; mechanism: "red_green_test" | "build_lint_gate" | "read_at_head_verification" | "read_at_head_refutation"; mechanism_detail?: string | undefined; }, { file: string; line: string; mechanism: "red_green_test" | "build_lint_gate" | "read_at_head_verification" | "read_at_head_refutation"; mechanism_detail?: string | undefined; }>; export type Evidence = z.infer; /** * Whether `evidence` carries a complete triple (all three of file/line/ * mechanism present and non-empty). The writer (`buildRemediationOutcomesReport` * in `src/remediate/phases/close.ts`) REFUSES to emit a terminal disposition * for a finding whose evidence fails this check. */ export declare function isCompleteEvidence(evidence: Partial | undefined): evidence is Evidence; /** Names of the evidence-triple parts missing or empty on `evidence` (diagnostic only). */ export declare function missingEvidenceParts(evidence: Partial | undefined): Array<"file" | "line" | "mechanism">; /** * RED condition (4)'s mechanism-contradiction leg (CDC-25 / the W4 witness): a * `refuted` outcome whose mechanism is a read-at-HEAD VERIFICATION (confirms * already-fixed, not refuted), or a `verified_already_fixed` outcome whose * mechanism is a read-at-HEAD REFUTATION, is a WRONG VALUE — not a matter of * interpretation. Every other outcome/mechanism pairing is unconstrained by * this check (a red-green test or a build/lint gate is neutral evidence for * either of the two members). */ export declare function mechanismContradictsOutcome(outcome: RemediationOutcomeStatus, mechanism: EvidenceMechanismKind): boolean; /** * How a gate EVALUATION ended. * * `executed` — the command list ran; `passed` is a real verdict. * `scoped_out` — the suite does not apply to this target; zero commands ran. * `disabled` — a gate was DUE but did not run. */ export declare const FinalGateOutcomeKindSchema: z.ZodEnum<["executed", "scoped_out", "disabled"]>; export type FinalGateOutcomeKind = z.infer; /** * What the outcomes contract says about the run's tool-owned gate. * * `outcome` widens the three gate kinds with `absent` — which is NOT a fourth * gate kind but the report's own statement that no gate record existed for this * run. It is stated rather than inferred: the alternative is silence, and * silence about a gate reads as "fine". * * `passed` is `boolean | null`. Only an `executed` gate carries a verdict; the * other three carry `null`, so no consumer of this contract can read a gate * that did not run as a green floor. */ export declare const FinalGateReportSchema: z.ZodObject<{ outcome: z.ZodUnion<[z.ZodEnum<["executed", "scoped_out", "disabled"]>, z.ZodLiteral<"absent">]>; passed: z.ZodNullable; commands_run: z.ZodNumber; /** Which gate produced it — a phase boundary, or the all-terminal funnel. */ scope: z.ZodOptional; /** Why a gate that did not run did not run, or why the record is absent. */ reason: z.ZodOptional; recorded_at: z.ZodOptional; }, "strict", z.ZodTypeAny, { outcome: "executed" | "scoped_out" | "disabled" | "absent"; passed: boolean | null; commands_run: number; reason?: string | undefined; scope?: string | undefined; recorded_at?: string | undefined; }, { outcome: "executed" | "scoped_out" | "disabled" | "absent"; passed: boolean | null; commands_run: number; reason?: string | undefined; scope?: string | undefined; recorded_at?: string | undefined; }>; export type FinalGateReport = z.infer; /** * The report's statement when no gate record exists. A run that never reached a * gate, and a run whose gate record could not be read, both land here — never on * a green-shaped default. */ export declare const ABSENT_FINAL_GATE_REPORT: FinalGateReport; /** * Item C — result of the close-gate mechanical re-verify of an analyzer-born * finding. `verified_mechanically`: the finding's content-anchored lead * identity no longer fires on a re-run of the same pinned analyzer. * `lead_persists`: it still fires (objective evidence routed to triage). * `skipped`: the analyzer could not re-run (admission/resolve/spawn/parse) — * recorded with the reason, never silently treated as verified. */ export declare const MechanicalVerificationSchema: z.ZodObject<{ status: z.ZodEnum<["verified_mechanically", "lead_persists", "skipped"]>; analyzer_id: z.ZodString; reason: z.ZodOptional; }, "strict", z.ZodTypeAny, { status: "verified_mechanically" | "lead_persists" | "skipped"; analyzer_id: string; reason?: string | undefined; }, { status: "verified_mechanically" | "lead_persists" | "skipped"; analyzer_id: string; reason?: string | undefined; }>; export type MechanicalVerification = z.infer; export declare const RemediationOutcomeSchema: z.ZodObject<{ finding_id: z.ZodString; /** Audit lens the finding came from (free string in the wire contract). */ lens: z.ZodString; /** Distinct file extensions of the finding's affected files (e.g. [".ts"]). */ file_exts: z.ZodArray; outcome: z.ZodEnum<["resolved", "verified_no_change", "inappropriate", "ignored", "blocked", "verified_already_fixed", "refuted"]>; /** How many times the item was sent back for rework before this outcome. */ rework_count: z.ZodNumber; /** The run's closing-action status (e.g. "success", "failed"). */ closing_status: z.ZodString; /** Human-readable explanation for non-success closing statuses. */ closing_status_reason: z.ZodOptional; /** * For non-resolved outcomes: the failure or rationale text (e.g. why a * finding was deemed inappropriate, ignored, or blocked). Absent for * `resolved` and `verified_no_change` outcomes. */ reason: z.ZodOptional; /** ISO-8601 timestamp when work on this item first left pending. */ started_at: z.ZodOptional; /** ISO-8601 timestamp when the item reached its terminal status. */ completed_at: z.ZodOptional; /** Milliseconds between completed_at and started_at when both are present. */ duration_ms: z.ZodOptional; /** Item C — mechanical re-verify verdict for analyzer-born findings. */ mechanical_verification: z.ZodOptional; analyzer_id: z.ZodString; reason: z.ZodOptional; }, "strict", z.ZodTypeAny, { status: "verified_mechanically" | "lead_persists" | "skipped"; analyzer_id: string; reason?: string | undefined; }, { status: "verified_mechanically" | "lead_persists" | "skipped"; analyzer_id: string; reason?: string | undefined; }>>; /** * The per-finding verification-evidence triple (INV-ISC-EVIDENCE-EMITTED). * Optional at the schema level — a non-terminal (force-closed/blocked) * outcome may carry none — but the writer refuses to emit `outcome` as * `verified_already_fixed` or `refuted` without a complete one. FLOOR, not * a closed shape: pinning these three fields does not exclude later ones. */ evidence: z.ZodOptional; /** Optional human-readable elaboration; never load-bearing for the mechanism-contradiction check. */ mechanism_detail: z.ZodOptional; }, "strict", z.ZodTypeAny, { file: string; line: string; mechanism: "red_green_test" | "build_lint_gate" | "read_at_head_verification" | "read_at_head_refutation"; mechanism_detail?: string | undefined; }, { file: string; line: string; mechanism: "red_green_test" | "build_lint_gate" | "read_at_head_verification" | "read_at_head_refutation"; mechanism_detail?: string | undefined; }>>; /** * The attributing-module stamp (CDC-26): which module recorded this * finding's evidence at its own phase. Carried byte-exact from * `RemediationItemState.recorded_by_module` through to this record (the * ATTRIBUTION ROUND-TRIP) so the 26 INV-COVERAGE joins' condition (3) can * still tell which module closed which id. */ recorded_by_module: z.ZodOptional; }, "strict", z.ZodTypeAny, { outcome: "blocked" | "refuted" | "resolved" | "verified_no_change" | "inappropriate" | "ignored" | "verified_already_fixed"; lens: string; finding_id: string; file_exts: string[]; rework_count: number; closing_status: string; reason?: string | undefined; evidence?: { file: string; line: string; mechanism: "red_green_test" | "build_lint_gate" | "read_at_head_verification" | "read_at_head_refutation"; mechanism_detail?: string | undefined; } | undefined; closing_status_reason?: string | undefined; started_at?: string | undefined; completed_at?: string | undefined; duration_ms?: number | undefined; mechanical_verification?: { status: "verified_mechanically" | "lead_persists" | "skipped"; analyzer_id: string; reason?: string | undefined; } | undefined; recorded_by_module?: string | undefined; }, { outcome: "blocked" | "refuted" | "resolved" | "verified_no_change" | "inappropriate" | "ignored" | "verified_already_fixed"; lens: string; finding_id: string; file_exts: string[]; rework_count: number; closing_status: string; reason?: string | undefined; evidence?: { file: string; line: string; mechanism: "red_green_test" | "build_lint_gate" | "read_at_head_verification" | "read_at_head_refutation"; mechanism_detail?: string | undefined; } | undefined; closing_status_reason?: string | undefined; started_at?: string | undefined; completed_at?: string | undefined; duration_ms?: number | undefined; mechanical_verification?: { status: "verified_mechanically" | "lead_persists" | "skipped"; analyzer_id: string; reason?: string | undefined; } | undefined; recorded_by_module?: string | undefined; }>; export type RemediationOutcome = z.infer; export declare const RemediationOutcomesReportSchema: z.ZodObject<{ contract_version: z.ZodString; total: z.ZodNumber; by_outcome: z.ZodObject<{ resolved: z.ZodNumber; verified_no_change: z.ZodNumber; inappropriate: z.ZodNumber; ignored: z.ZodNumber; blocked: z.ZodNumber; verified_already_fixed: z.ZodNumber; refuted: z.ZodNumber; }, "strict", z.ZodTypeAny, { blocked: number; refuted: number; resolved: number; verified_no_change: number; inappropriate: number; ignored: number; verified_already_fixed: number; }, { blocked: number; refuted: number; resolved: number; verified_no_change: number; inappropriate: number; ignored: number; verified_already_fixed: number; }>; by_lens: z.ZodRecord; verified_no_change: z.ZodOptional; inappropriate: z.ZodOptional; ignored: z.ZodOptional; blocked: z.ZodOptional; verified_already_fixed: z.ZodOptional; refuted: z.ZodOptional; }, "strict", z.ZodTypeAny, { blocked?: number | undefined; refuted?: number | undefined; resolved?: number | undefined; verified_no_change?: number | undefined; inappropriate?: number | undefined; ignored?: number | undefined; verified_already_fixed?: number | undefined; }, { blocked?: number | undefined; refuted?: number | undefined; resolved?: number | undefined; verified_no_change?: number | undefined; inappropriate?: number | undefined; ignored?: number | undefined; verified_already_fixed?: number | undefined; }>>; /** Earliest item started_at across all outcomes. */ started_at: z.ZodOptional; /** Latest item completed_at across all outcomes. */ completed_at: z.ZodOptional; /** Milliseconds between aggregate completed_at and started_at. */ duration_ms: z.ZodOptional; /** * The run's tool-owned gate outcome. REQUIRED, and never omitted on a run * that had no gate: the absent case is written as `{ outcome: "absent" }`, so * a reader can distinguish "the floor ran green" from "nothing ran" from "we * do not know" — which the outcomes contract previously could not express at * all, making a scoped-out or suppressed run's report byte-identical to an * executed-green one. */ final_gate: z.ZodObject<{ outcome: z.ZodUnion<[z.ZodEnum<["executed", "scoped_out", "disabled"]>, z.ZodLiteral<"absent">]>; passed: z.ZodNullable; commands_run: z.ZodNumber; /** Which gate produced it — a phase boundary, or the all-terminal funnel. */ scope: z.ZodOptional; /** Why a gate that did not run did not run, or why the record is absent. */ reason: z.ZodOptional; recorded_at: z.ZodOptional; }, "strict", z.ZodTypeAny, { outcome: "executed" | "scoped_out" | "disabled" | "absent"; passed: boolean | null; commands_run: number; reason?: string | undefined; scope?: string | undefined; recorded_at?: string | undefined; }, { outcome: "executed" | "scoped_out" | "disabled" | "absent"; passed: boolean | null; commands_run: number; reason?: string | undefined; scope?: string | undefined; recorded_at?: string | undefined; }>; outcomes: z.ZodArray; outcome: z.ZodEnum<["resolved", "verified_no_change", "inappropriate", "ignored", "blocked", "verified_already_fixed", "refuted"]>; /** How many times the item was sent back for rework before this outcome. */ rework_count: z.ZodNumber; /** The run's closing-action status (e.g. "success", "failed"). */ closing_status: z.ZodString; /** Human-readable explanation for non-success closing statuses. */ closing_status_reason: z.ZodOptional; /** * For non-resolved outcomes: the failure or rationale text (e.g. why a * finding was deemed inappropriate, ignored, or blocked). Absent for * `resolved` and `verified_no_change` outcomes. */ reason: z.ZodOptional; /** ISO-8601 timestamp when work on this item first left pending. */ started_at: z.ZodOptional; /** ISO-8601 timestamp when the item reached its terminal status. */ completed_at: z.ZodOptional; /** Milliseconds between completed_at and started_at when both are present. */ duration_ms: z.ZodOptional; /** Item C — mechanical re-verify verdict for analyzer-born findings. */ mechanical_verification: z.ZodOptional; analyzer_id: z.ZodString; reason: z.ZodOptional; }, "strict", z.ZodTypeAny, { status: "verified_mechanically" | "lead_persists" | "skipped"; analyzer_id: string; reason?: string | undefined; }, { status: "verified_mechanically" | "lead_persists" | "skipped"; analyzer_id: string; reason?: string | undefined; }>>; /** * The per-finding verification-evidence triple (INV-ISC-EVIDENCE-EMITTED). * Optional at the schema level — a non-terminal (force-closed/blocked) * outcome may carry none — but the writer refuses to emit `outcome` as * `verified_already_fixed` or `refuted` without a complete one. FLOOR, not * a closed shape: pinning these three fields does not exclude later ones. */ evidence: z.ZodOptional; /** Optional human-readable elaboration; never load-bearing for the mechanism-contradiction check. */ mechanism_detail: z.ZodOptional; }, "strict", z.ZodTypeAny, { file: string; line: string; mechanism: "red_green_test" | "build_lint_gate" | "read_at_head_verification" | "read_at_head_refutation"; mechanism_detail?: string | undefined; }, { file: string; line: string; mechanism: "red_green_test" | "build_lint_gate" | "read_at_head_verification" | "read_at_head_refutation"; mechanism_detail?: string | undefined; }>>; /** * The attributing-module stamp (CDC-26): which module recorded this * finding's evidence at its own phase. Carried byte-exact from * `RemediationItemState.recorded_by_module` through to this record (the * ATTRIBUTION ROUND-TRIP) so the 26 INV-COVERAGE joins' condition (3) can * still tell which module closed which id. */ recorded_by_module: z.ZodOptional; }, "strict", z.ZodTypeAny, { outcome: "blocked" | "refuted" | "resolved" | "verified_no_change" | "inappropriate" | "ignored" | "verified_already_fixed"; lens: string; finding_id: string; file_exts: string[]; rework_count: number; closing_status: string; reason?: string | undefined; evidence?: { file: string; line: string; mechanism: "red_green_test" | "build_lint_gate" | "read_at_head_verification" | "read_at_head_refutation"; mechanism_detail?: string | undefined; } | undefined; closing_status_reason?: string | undefined; started_at?: string | undefined; completed_at?: string | undefined; duration_ms?: number | undefined; mechanical_verification?: { status: "verified_mechanically" | "lead_persists" | "skipped"; analyzer_id: string; reason?: string | undefined; } | undefined; recorded_by_module?: string | undefined; }, { outcome: "blocked" | "refuted" | "resolved" | "verified_no_change" | "inappropriate" | "ignored" | "verified_already_fixed"; lens: string; finding_id: string; file_exts: string[]; rework_count: number; closing_status: string; reason?: string | undefined; evidence?: { file: string; line: string; mechanism: "red_green_test" | "build_lint_gate" | "read_at_head_verification" | "read_at_head_refutation"; mechanism_detail?: string | undefined; } | undefined; closing_status_reason?: string | undefined; started_at?: string | undefined; completed_at?: string | undefined; duration_ms?: number | undefined; mechanical_verification?: { status: "verified_mechanically" | "lead_persists" | "skipped"; analyzer_id: string; reason?: string | undefined; } | undefined; recorded_by_module?: string | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { contract_version: string; total: number; by_outcome: { blocked: number; refuted: number; resolved: number; verified_no_change: number; inappropriate: number; ignored: number; verified_already_fixed: number; }; by_lens: Record; final_gate: { outcome: "executed" | "scoped_out" | "disabled" | "absent"; passed: boolean | null; commands_run: number; reason?: string | undefined; scope?: string | undefined; recorded_at?: string | undefined; }; outcomes: { outcome: "blocked" | "refuted" | "resolved" | "verified_no_change" | "inappropriate" | "ignored" | "verified_already_fixed"; lens: string; finding_id: string; file_exts: string[]; rework_count: number; closing_status: string; reason?: string | undefined; evidence?: { file: string; line: string; mechanism: "red_green_test" | "build_lint_gate" | "read_at_head_verification" | "read_at_head_refutation"; mechanism_detail?: string | undefined; } | undefined; closing_status_reason?: string | undefined; started_at?: string | undefined; completed_at?: string | undefined; duration_ms?: number | undefined; mechanical_verification?: { status: "verified_mechanically" | "lead_persists" | "skipped"; analyzer_id: string; reason?: string | undefined; } | undefined; recorded_by_module?: string | undefined; }[]; started_at?: string | undefined; completed_at?: string | undefined; duration_ms?: number | undefined; }, { contract_version: string; total: number; by_outcome: { blocked: number; refuted: number; resolved: number; verified_no_change: number; inappropriate: number; ignored: number; verified_already_fixed: number; }; by_lens: Record; final_gate: { outcome: "executed" | "scoped_out" | "disabled" | "absent"; passed: boolean | null; commands_run: number; reason?: string | undefined; scope?: string | undefined; recorded_at?: string | undefined; }; outcomes: { outcome: "blocked" | "refuted" | "resolved" | "verified_no_change" | "inappropriate" | "ignored" | "verified_already_fixed"; lens: string; finding_id: string; file_exts: string[]; rework_count: number; closing_status: string; reason?: string | undefined; evidence?: { file: string; line: string; mechanism: "red_green_test" | "build_lint_gate" | "read_at_head_verification" | "read_at_head_refutation"; mechanism_detail?: string | undefined; } | undefined; closing_status_reason?: string | undefined; started_at?: string | undefined; completed_at?: string | undefined; duration_ms?: number | undefined; mechanical_verification?: { status: "verified_mechanically" | "lead_persists" | "skipped"; analyzer_id: string; reason?: string | undefined; } | undefined; recorded_by_module?: string | undefined; }[]; started_at?: string | undefined; completed_at?: string | undefined; duration_ms?: number | undefined; }>; export type RemediationOutcomesReport = z.infer; //# sourceMappingURL=remediationOutcome.d.ts.map