import type { z } from "zod"; /** * Repair the two malformations real judge output produces, string-aware so a * brace or comma inside an evidence quote is never touched: * * - a comma followed only by whitespace and then `}` or `]` is dropped; * - a closer that does not match the innermost open bracket first emits the * closers that are missing (`{"a": ["x"}` → `{"a": ["x"]}`); * - anything still open at EOF is closed, innermost first, including an * unterminated string. * * Returns the repaired text, or null when the input has no `{` to work with. */ export declare function repairJson(raw: string): string | null; export interface ParsedJudgeArtifact { artifact: T; /** True when the raw output needed repair — the caller warns, never hides it. */ repaired: boolean; } /** * Parse the judge artifact out of an agent's final text. Prefers the fenced * block; repairs it if it will not parse; throws if the result still does not * satisfy the schema. */ export declare function parseJudgeArtifact(text: string, schema: Schema): ParsedJudgeArtifact>;