import type { RunScore } from './score-store.js';
import type { ScorerKind } from './types.js';
/**
 * The pure aggregation core over persisted scores, mirroring the governance read-model: an adapter's
 * only job is fetching rows, and every surface that reports a mean score runs the SAME arithmetic
 * here, so a dashboard and a CI gate can never disagree about whether quality moved.
 */
/** Rollup for one scorer over a set of scores. */
export interface ScorerSummaryRow {
    scorer: string;
    kind: ScorerKind;
    /** How many runs this scorer actually scored. A mean over 3 samples is not a metric — read this first. */
    samples: number;
    meanScore: number;
    minScore: number;
    maxScore: number;
}
/** Rollup for one agent under one scorer. */
export interface AgentScoreRow {
    /** `'(default)'` when the scored run named no agent, mirroring the governance breakdown. */
    agentName: string;
    scorer: string;
    samples: number;
    meanScore: number;
}
/** One point on the daily quality trend, per scorer. */
export interface ScoreTrendPoint {
    day: string;
    scorer: string;
    samples: number;
    meanScore: number;
}
/** Rollup per scorer, worst mean first — the ordering that puts the problem at the top. */
export declare function summarizeByScorer(rows: RunScore[]): ScorerSummaryRow[];
/** Rollup per (agent, scorer) pair, worst mean first — which persona drags which signal down. */
export declare function summarizeByAgent(rows: RunScore[]): AgentScoreRow[];
/** Daily mean per scorer, ascending by day then scorer — the "is it getting better" series. */
export declare function bucketScoreTrend(rows: RunScore[]): ScoreTrendPoint[];
/**
 * The lowest-scoring runs, worst first, capped at `limit` — the triage queue. Every scorer carries a
 * `reason`, so this is the one view that answers "show me what went wrong" without a second read.
 */
export declare function worstScoredRuns(rows: RunScore[], limit: number): RunScore[];
//# sourceMappingURL=summarize.d.ts.map