import { z } from 'zod'; /** One graded expectation inside a per-eval grader fragment. */ export declare const EvalFragmentExpectationSchema: z.ZodObject<{ text: z.ZodString; passed: z.ZodBoolean; evidence: z.ZodOptional; }, "strict", z.ZodTypeAny, { passed: boolean; text: string; evidence?: string | undefined; }, { passed: boolean; text: string; evidence?: string | undefined; }>; export type EvalFragmentExpectation = z.infer; /** * Strict shape of a single grader subagent's output (issue #145 Task 4). One * GRADER spawn grades ONE eval's expectations from that eval's captured * transcript and writes exactly one fragment matching this schema; vat reads * every eval's fragment back and merges them into the run's aggregate grading * result (skill-creator's flat `grading.json` shape — see grading-adapter.ts). * * `.strict()`: this is vat's OWN output artifact contract, not external data * we're auditing (see CLAUDE.md Postel's Law) — an unrecognized field is a * grader bug we want surfaced immediately, not silently dropped. * * `arm` distinguishes a WITH/WITHOUT baseline run's fragment; absent means the * default 'with' (skill present) arm. * * `tool` (issue #145 Phase T) carries this eval's tool-expectation verdict — * a SEPARATE channel from `expectations[]` and from `friction` (see * tool-eval-schema.ts). It is {@link ToolVerdictBodySchema}, i.e. a * {@link import('./tool-eval-schema.js').ToolVerdict} WITHOUT `evalId`: the * fragment already carries `evalId` at its top level, so the merge step * (`mergeFragmentsToToolEval` in fragment-merge.ts) re-attaches it from the * fragment when assembling vat's `tool-eval.json`. */ export declare const EvalFragmentSchema: z.ZodObject<{ runNonce: z.ZodString; evalId: z.ZodString; arm: z.ZodOptional>; expectations: z.ZodArray; }, "strict", z.ZodTypeAny, { passed: boolean; text: string; evidence?: string | undefined; }, { passed: boolean; text: string; evidence?: string | undefined; }>, "many">; friction: z.ZodOptional; category: z.ZodEnum<["path-assumption", "undeclared-dependency", "ambient-propping", "doc-engine-drift", "missing-bundled-file", "tool-expectation"]>; message: z.ZodString; subjectFile: z.ZodOptional; evidence: z.ZodOptional; }, "strict", z.ZodTypeAny, { message: string; severity: "high" | "medium" | "low"; category: "path-assumption" | "undeclared-dependency" | "ambient-propping" | "doc-engine-drift" | "missing-bundled-file" | "tool-expectation"; evidence?: string | undefined; subjectFile?: string | undefined; }, { message: string; severity: "high" | "medium" | "low"; category: "path-assumption" | "undeclared-dependency" | "ambient-propping" | "doc-engine-drift" | "missing-bundled-file" | "tool-expectation"; evidence?: string | undefined; subjectFile?: string | undefined; }>, "many">>; tool: z.ZodOptional; }, "strict", z.ZodTypeAny, { name: string; ran: boolean; evidence?: string | undefined; }, { name: string; ran: boolean; evidence?: string | undefined; }>, "many">>; mustNotRun: z.ZodOptional; }, "strict", z.ZodTypeAny, { name: string; ran: boolean; evidence?: string | undefined; }, { name: string; ran: boolean; evidence?: string | undefined; }>, "many">>; mustSucceed: z.ZodOptional; }, "strict", z.ZodTypeAny, { name: string; succeeded: boolean; evidence?: string | undefined; }, { name: string; succeeded: boolean; evidence?: string | undefined; }>, "many">>; sequence: z.ZodOptional; satisfied: z.ZodBoolean; evidence: z.ZodOptional; }, "strict", z.ZodTypeAny, { steps: string[]; satisfied: boolean; evidence?: string | undefined; }, { steps: string[]; satisfied: boolean; evidence?: string | undefined; }>, "many">>; passed: z.ZodBoolean; }, "strict", z.ZodTypeAny, { passed: boolean; mustRun?: { name: string; ran: boolean; evidence?: string | undefined; }[] | undefined; mustNotRun?: { name: string; ran: boolean; evidence?: string | undefined; }[] | undefined; mustSucceed?: { name: string; succeeded: boolean; evidence?: string | undefined; }[] | undefined; sequence?: { steps: string[]; satisfied: boolean; evidence?: string | undefined; }[] | undefined; }, { passed: boolean; mustRun?: { name: string; ran: boolean; evidence?: string | undefined; }[] | undefined; mustNotRun?: { name: string; ran: boolean; evidence?: string | undefined; }[] | undefined; mustSucceed?: { name: string; succeeded: boolean; evidence?: string | undefined; }[] | undefined; sequence?: { steps: string[]; satisfied: boolean; evidence?: string | undefined; }[] | undefined; }>>; }, "strict", z.ZodTypeAny, { expectations: { passed: boolean; text: string; evidence?: string | undefined; }[]; evalId: string; runNonce: string; arm?: "with" | "without" | undefined; friction?: { message: string; severity: "high" | "medium" | "low"; category: "path-assumption" | "undeclared-dependency" | "ambient-propping" | "doc-engine-drift" | "missing-bundled-file" | "tool-expectation"; evidence?: string | undefined; subjectFile?: string | undefined; }[] | undefined; tool?: { passed: boolean; mustRun?: { name: string; ran: boolean; evidence?: string | undefined; }[] | undefined; mustNotRun?: { name: string; ran: boolean; evidence?: string | undefined; }[] | undefined; mustSucceed?: { name: string; succeeded: boolean; evidence?: string | undefined; }[] | undefined; sequence?: { steps: string[]; satisfied: boolean; evidence?: string | undefined; }[] | undefined; } | undefined; }, { expectations: { passed: boolean; text: string; evidence?: string | undefined; }[]; evalId: string; runNonce: string; arm?: "with" | "without" | undefined; friction?: { message: string; severity: "high" | "medium" | "low"; category: "path-assumption" | "undeclared-dependency" | "ambient-propping" | "doc-engine-drift" | "missing-bundled-file" | "tool-expectation"; evidence?: string | undefined; subjectFile?: string | undefined; }[] | undefined; tool?: { passed: boolean; mustRun?: { name: string; ran: boolean; evidence?: string | undefined; }[] | undefined; mustNotRun?: { name: string; ran: boolean; evidence?: string | undefined; }[] | undefined; mustSucceed?: { name: string; succeeded: boolean; evidence?: string | undefined; }[] | undefined; sequence?: { steps: string[]; satisfied: boolean; evidence?: string | undefined; }[] | undefined; } | undefined; }>; export type EvalFragment = z.infer; /** * Thrown when a single grader subagent's fragment output does not match * {@link EvalFragmentSchema}. Deliberately distinct from `GradingSkewError` * (grading-adapter.ts): that error's message is specific to the AGGREGATE * `grading.json` shape (skill-creator's flat report) and is wrong when the * thing that failed to parse is one grader's per-eval fragment — a fragment * shape bug is a GRADER bug, not an aggregate-assembly bug, and the message * should point at the offending eval, not at "Re-sync the vendored * skill-creator". */ export declare class EvalFragmentError extends Error { constructor(message: string); } /** * Parse + validate one grader's fragment output. Throws {@link EvalFragmentError} * — never {@link GradingSkewError} — because this is a per-eval fragment, not * the assembled aggregate `grading.json`. * * The verdict channels are strict. The auxiliary `friction` field is sanitized * leniently first (see {@link sanitizeFrictionField}); when items are dropped, * `onWarn` (if given) is called so the operator sees that friction was partial — * grading itself is never affected. */ export declare function parseEvalFragment(raw: unknown, onWarn?: (message: string) => void): EvalFragment; //# sourceMappingURL=eval-fragment.d.ts.map