/** * 3-layer fallback parser for judge LLM responses. * * Layer 1: Strict JSON.parse of full response * Layer 2: Extract JSON object via regex (handles markdown code blocks, trailing text) * Layer 3: Extract score/reasoning via text patterns (last resort) * * CRITICAL: Never default to pass on parse failure. Parse failure = error grade. */ /** Parsed judge response with reasoning and score. */ export interface ParsedJudgeResponse { readonly reasoning: string; readonly score: 1 | 2 | 3 | 4; readonly rawText: string; } export interface JudgeParseError { readonly success: false; readonly rawText: string; readonly error: string; } export type JudgeParseResult = { readonly success: true; readonly parsed: ParsedJudgeResponse; } | JudgeParseError; /** * Maps a 4-point judge score to a GradeResult-compatible score. * Score 1 → 0.25, Score 2 → 0.50, Score 3 → 0.75, Score 4 → 1.00 */ export declare function judgeScoreToGradeScore(score: 1 | 2 | 3 | 4): number; /** * Default pass threshold for LLM judge graders. * Score >= 3 (0.75) = pass. */ export declare const DEFAULT_JUDGE_PASS_THRESHOLD = 0.75; export declare function parseJudgeResponse(text: string): JudgeParseResult; //# sourceMappingURL=judge-parser.d.ts.map