/**
 * pipeline/borderline-consensus-runner.ts
 *
 * GRAD-04 borderline-only intra-grader consensus runner. Thin sibling
 * of runGraderConsistency — re-grades ONLY judgments where
 * `isBorderline(score, thresholds)` returns true. Non-borderline
 * judgments pass through unchanged.
 *
 * Per D0005 (grader-model separation), replicates the SAME pinned
 * grader N times (default 3, configurable via
 * RepoConfig.execution.borderlineReplications); NOT the inter-grader
 * ensemble path. Doc 03 §"Multi-grader consensus" + the GRAD-04 "Doc 03
 * source bug" callout pinned this to intra-grader replication only.
 *
 * The re-grade hook is supplied by the caller as a `regrade` callback.
 * The composition root wires it to `gradeOnce` from grader-api.js with
 * the response/rubric text drawn from the original Promptfoo result.
 * The runner itself imports `gradeOnce` only as the default regrader
 * fallback so unit tests can spy/inject without re-wiring.
 *
 * @see docs/decisions/D0005-grader-model-separation.md
 * @see ./borderline-detector.ts — pure predicate
 * @see ./grader-consistency.ts — JudgmentConsistency shape we emit
 */
import type { GraderJudgment, Logger } from "../_vendor/ailf-core/index.d.ts";
import { gradeOnce } from "./grader-api.js";
import { type JudgmentConsistency } from "./grader-consistency.js";
/**
 * Re-export `gradeOnce` so callers that need to wire the default regrader
 * (composition-root, integration tests) can import the grader entry point
 * from this module rather than rediscovering grader-api.js. The runner
 * itself does not invoke `gradeOnce` — the caller-supplied `regrade`
 * callback owns the live grader call (Pitfall 6 — runner stays pure wrt
 * provider config).
 */
export { gradeOnce };
export interface BorderlineConsensusOptions {
    judgments: GraderJudgment[];
    logger?: Logger;
    /** Callback that re-grades a single judgment once. Returns a fresh score. */
    regrade: (judgment: GraderJudgment) => Promise<number>;
    /** Default 3 — see RepoConfig.execution.borderlineReplications. */
    replications: number;
    /** Severity boundaries from config/thresholds.ts (default [30, 50, 60]). */
    thresholds: readonly number[];
}
export interface BorderlineConsensusResult {
    consistencyByJudgment: Map<string, JudgmentConsistency>;
    judgments: GraderJudgment[];
}
/**
 * Run intra-grader consensus on the borderline subset of `judgments`.
 *
 * - Borderline (per `isBorderline(score, thresholds)`): re-grade
 *   `replications` times via `regrade`; emit a `JudgmentConsistency`
 *   keyed by `${taskId}::${dimension}::${modelId}`; merge the consensus
 *   median back into the canonical judgment's `score`.
 * - Non-borderline: pass through unchanged. Output array length == input.
 *
 * The function is order-preserving — the returned `judgments` array
 * keeps the same element order as the input.
 */
export declare function runBorderlineConsensus(options: BorderlineConsensusOptions): Promise<BorderlineConsensusResult>;
