/** * aggregation — pure functions for combining a panel of judge scores. * * Each judge in a panel grader returns a normalized [0,1] score for the * trajectory. Aggregation strategies reduce the panel to a single score: * * - majority: binary majority vote against the threshold; ties → mean * - unanimous: mean of normalized scores; pass/fail (every judge must pass) is * decided separately via `isUnanimousPass` * - mean: arithmetic mean of normalized scores * - median: middle value (mean of two middles when even count) * - min: most-pessimistic judge wins * * All functions ignore judges whose `score` is null/undefined (e.g. failed * judges); callers handle the empty-input edge case explicitly. */ export type AggregationStrategy = "majority" | "unanimous" | "mean" | "median" | "min"; export declare const AGGREGATION_STRATEGIES: readonly AggregationStrategy[]; /** Default pass threshold for the `majority` and `unanimous` strategies. */ export declare const DEFAULT_THRESHOLD = 0.5; export interface JudgeScore { /** Identifier — typically the model name. */ judge: string; /** Normalized [0,1] score; null/undefined indicates a failed judge. */ score: number | null | undefined; } export interface AggregateOptions { /** Threshold used by `majority` and `unanimous` strategies. Default: `DEFAULT_THRESHOLD` (0.5). */ threshold?: number; } /** * Aggregate per-judge scores into a single normalized score. * * Throws when no judges produced a usable score — the caller is expected to * surface a clear error so panel runs don't silently report 0. */ export declare function aggregate(strategy: AggregationStrategy, scores: JudgeScore[], options?: AggregateOptions): number; /** * Unanimous pass verdict. Returns `true` only when at least one judge produced * a valid score and every surviving judge passes (score >= threshold); a single * dissenting judge fails the panel. Judges without a valid score are ignored. */ export declare function isUnanimousPass(scores: JudgeScore[], threshold?: number): boolean; /** * Spread (max − min) of valid judge scores. Returns 0 when fewer than two * judges have valid scores. */ export declare function disagreementSpread(scores: JudgeScore[]): number; //# sourceMappingURL=aggregation.d.ts.map