/** * The parsimony Decision Receipt [#408, EPIC #407] — the typed evidence a restraint * decision emits. Per the ratified design it is NOT a sixth Frozen-Five contract: it * is the PAYLOAD of a new `parsimony.receipt` event appended to kernloop's existing * hash-chained, HMAC-keyed audit log (`appendEvent`/`verifyChain`). The chain * envelope supplies `prevHash`/`hash`/`seq`; this schema is only the domain payload, * so those chain fields are deliberately absent here. * * A receipt records: which ladder rung resolved the decision (the restraint), the * Control Floor checks that applied and their status (the non-waivable guards), any * deferred shortcut as a first-class finding with its control risk, and the blind * verification verdict. The agent's prose rationale is NOT stored — only its * `rationaleDigest` (a content hash) — so the blind verifier judges the diff against * the floor without being biased by the agent's self-justification. * * @module parsimony/receipt */ import { z } from 'zod'; /** * The catalog a Control Floor entry is typed by. The floor is deliberately * MULTI-CATALOG: not every guard is an 800-53 control (accessibility is 508/WCAG; * the intent guard is policy with no catalog), so the schema must not assume NIST. */ export declare const FloorCatalogSchema: z.ZodEnum<{ "nist-800-53r5": "nist-800-53r5"; "section-508": "section-508"; wcag: "wcag"; intent: "intent"; }>; export type FloorCatalog = z.infer; /** A floor check's status: it held (`pass`), did not apply to this diff (`na`), or * applied and was NOT satisfied — which forces a {@link DeferredSchema} block. */ export declare const FloorStatusSchema: z.ZodEnum<{ pass: "pass"; na: "na"; deferred: "deferred"; }>; export type FloorStatus = z.infer; /** * One Control Floor check result on this decision. `controlIds` is empty for a * non-control catalog (e.g. an `intent` guard or a 508 entry that maps to no 800-53 * control), which the OSCAL projection must tolerate (not every entry is a NIST * control). `evidenceRef` points at the proof the check passed (a test/log ref). */ export declare const FloorCheckSchema: z.ZodObject<{ name: z.ZodString; catalog: z.ZodEnum<{ "nist-800-53r5": "nist-800-53r5"; "section-508": "section-508"; wcag: "wcag"; intent: "intent"; }>; controlIds: z.ZodArray; status: z.ZodEnum<{ pass: "pass"; na: "na"; deferred: "deferred"; }>; evidenceRef: z.ZodOptional; }, z.core.$strict>; export type FloorCheck = z.infer; /** * The six restraint outcomes, one per ladder rung (#409). The ladder stops at the * first rung that holds; the resolving rung's outcome is recorded so the receipt * names WHY the minimum was chosen — `skip` (rung 0, need failed) through * `minimal_impl` (rung 5, nothing cheaper held). */ export declare const ParsimonyOutcomeSchema: z.ZodEnum<{ skip: "skip"; reuse_stdlib: "reuse_stdlib"; reuse_native: "reuse_native"; reuse_dep: "reuse_dep"; one_line: "one_line"; minimal_impl: "minimal_impl"; }>; export type ParsimonyOutcome = z.infer; /** * A deferred shortcut — a floor entry that applied and was not satisfied. It is a * FIRST-CLASS finding, never a buried comment: it carries the control(s) at risk so * `kl debt` (#6) and the OSCAL projection (#8) can surface it. Linked to the inline * marker by `debtId`. */ export declare const DeferredSchema: z.ZodObject<{ debtId: z.ZodString; reason: z.ZodString; controlRisk: z.ZodArray; owner: z.ZodString; }, z.core.$strict>; export type Deferred = z.infer; /** The blind-verification verdict (#7). `pending` until the verifier runs; * `refuted` FAILS the loop iteration (the gate ponytail lacks). The verifier sees * the diff + floor checklist only, never the rationale — hence the digest above. */ export declare const VerificationSchema: z.ZodObject<{ method: z.ZodLiteral<"blind_independent">; verifier: z.ZodString; checkedFloor: z.ZodBoolean; status: z.ZodEnum<{ pending: "pending"; confirmed: "confirmed"; refuted: "refuted"; }>; }, z.core.$strict>; export type Verification = z.infer; /** * The parsimony Decision Receipt schema. Beyond the field shape it enforces the * DEFERRED INVARIANT: a `deferred`-status floor check exists **iff** the receipt * carries a `deferred` block. This stops a receipt from claiming a deferred control * without recording the debt (an unmitigated shortcut hidden from `kl debt`/OSCAL), * or recording a debt block with no floor check that actually deferred — either way * the record would lie about what happened. The chain fields stay envelope-owned. */ export declare const ParsimonyReceiptSchema: z.ZodObject<{ receiptId: z.ZodString; ts: z.ZodString; loopIter: z.ZodNumber; overlay: z.ZodString; decisionType: z.ZodLiteral<"parsimony">; subject: z.ZodString; rung: z.ZodNumber; outcome: z.ZodEnum<{ skip: "skip"; reuse_stdlib: "reuse_stdlib"; reuse_native: "reuse_native"; reuse_dep: "reuse_dep"; one_line: "one_line"; minimal_impl: "minimal_impl"; }>; rationaleDigest: z.ZodString; floorChecks: z.ZodArray; controlIds: z.ZodArray; status: z.ZodEnum<{ pass: "pass"; na: "na"; deferred: "deferred"; }>; evidenceRef: z.ZodOptional; }, z.core.$strict>>; deferred: z.ZodNullable; owner: z.ZodString; }, z.core.$strict>>; verification: z.ZodObject<{ method: z.ZodLiteral<"blind_independent">; verifier: z.ZodString; checkedFloor: z.ZodBoolean; status: z.ZodEnum<{ pending: "pending"; confirmed: "confirmed"; refuted: "refuted"; }>; }, z.core.$strict>; }, z.core.$strict>; export type ParsimonyReceipt = z.infer; /** * The canonical payload field names, read straight from the schema shape (#441) — * the single source for "what fields a receipt carries", so a drift check (e.g. the * contract-doc completeness test) sees every field INCLUDING any future optional one * a hand-built fixture might omit. Derived from {@link ParsimonyReceiptShape}, not a * hand-maintained list, so it cannot fall behind the schema. */ export declare const PARSIMONY_RECEIPT_FIELDS: ReadonlyArray; /** The audit-event `type` a parsimony receipt rides on the hash-chained log. */ export declare const PARSIMONY_RECEIPT_EVENT = "parsimony.receipt"; /** * Parse + validate an unknown value as a {@link ParsimonyReceipt}, THROWING on a * malformed receipt (never coercing a partial one through). Use at the boundary * where a receipt is read back from the audit log before it is trusted. */ export declare function parseParsimonyReceipt(value: unknown): ParsimonyReceipt; /** * True when an applicable floor check was not satisfied — i.e. the receipt MUST * carry a {@link Deferred} block. A `deferred`-status check with no `deferred` body * (or vice versa) is an inconsistent receipt the caller should reject. */ export declare function hasDeferredFloor(receipt: ParsimonyReceipt): boolean; //# sourceMappingURL=receipt.d.ts.map