/**
 * Dual-agent convergence bench.
 *
 * Pattern lifted from dual-worker review loops: two agents take turns until
 * they converge on a consensus artifact. One proposes, the other critiques;
 * the proposer revises; repeat until a score threshold is hit or max rounds.
 *
 * Generalized so any two "agents" (gateways, local functions, anything with
 * `propose` + `critique`) compose in. Returns convergence rounds per
 * scenario + whether convergence happened.
 */
export interface DualAgentScenario {
    id: string;
    initialPrompt: string;
    /** Optional context the agents can read (e.g. source documents). */
    context?: Record<string, unknown>;
}
export interface DualAgentRound {
    roundIndex: number;
    proposal: string;
    critique: string;
    convergenceScore: number;
}
export interface DualAgentScenarioResult {
    scenarioId: string;
    converged: boolean;
    roundsToConverge: number | null;
    finalProposal: string;
    history: DualAgentRound[];
    finalScore: number;
}
export interface DualAgentBenchConfig {
    scenarios: DualAgentScenario[];
    maxRounds?: number;
    /** Convergence threshold in 0..1 (default 0.85). */
    convergenceThreshold?: number;
    /**
     * Propose an answer given the scenario + the critic's prior critique (if any).
     * Returns the proposal string.
     */
    propose: (args: {
        scenario: DualAgentScenario;
        roundIndex: number;
        priorProposal?: string;
        priorCritique?: string;
    }) => Promise<string>;
    /**
     * Critique the proposer's current output. Returns a structured critique
     * (free text) plus a convergence score: how close the proposal is to
     * acceptable. 1.0 = accept, 0.0 = totally off.
     */
    critique: (args: {
        scenario: DualAgentScenario;
        roundIndex: number;
        proposal: string;
    }) => Promise<{
        critique: string;
        convergenceScore: number;
    }>;
    /** Optional per-round hook for progress + tracing. */
    onRoundComplete?: (info: {
        scenarioId: string;
        round: DualAgentRound;
    }) => void;
}
export interface DualAgentReport {
    scenarios: DualAgentScenarioResult[];
    aggregate: {
        convergenceRate: number;
        avgRoundsToConverge: number | null;
        avgFinalScore: number;
    };
    config: {
        maxRounds: number;
        convergenceThreshold: number;
    };
}
export declare class DualAgentBench {
    run(config: DualAgentBenchConfig): Promise<DualAgentReport>;
}
//# sourceMappingURL=dual-agent-bench.d.ts.map