/**
 * Candidate Judge
 *
 * Tie-breaks exploration candidates whose objective (gate) scores are equal.
 * Objective verification always outranks judgment — the judge is consulted
 * only among candidates tied at the top of the ladder ranking.
 */
import type { LoopExecutor } from './convergence-loop.js';
export interface JudgeCandidate {
    /** Stable candidate id, e.g. 'c1' */
    id: string;
    /** Strategy seed that produced this candidate */
    strategy: string;
    /** Model output (the judge prompt truncates it before embedding) */
    output: string;
    /** Gate feedback for this candidate */
    ladderFeedback: string;
    /** Objective gate score */
    score: number;
}
export interface JudgeVerdict {
    winnerId: string;
    rationale: string;
}
export type Judge = (task: string, candidates: JudgeCandidate[]) => Promise<JudgeVerdict>;
/** Extract the first JSON object from model output (tolerates prose/fences). */
export declare function extractJson(text: string): Record<string, unknown> | null;
/**
 * Model-backed judge. Falls back to the first candidate (caller's ranking
 * order) when the verdict is unparseable or names an unknown candidate.
 */
export declare function createModelJudge(executor: LoopExecutor): Judge;
//# sourceMappingURL=judge.d.ts.map