import type { Scorecard } from "./scorecard.js"; import type { Point } from "./types.js"; export type GradeRow = { grader: string; kind: "scalar"; value: number; feedback?: string; points?: Point[]; } | { grader: string; kind: "binary"; pass: boolean; feedback?: string; points?: Point[]; }; export type InputBreakdown = { inputId: string; /** The test's own description, when it recorded one. Display only. */ description?: string; output: unknown; objective: number; gatesPassed: boolean; grades: GradeRow[]; /** Set when the input scored 0 without being graded (errored run, or no output). */ ungradedReason?: string; }; /** A serializable, human-renderable view of a Scorecard: per input, the output * plus each grader's score and feedback. Used by the champion artifact and report. */ export declare function breakdown(scorecard: Scorecard): InputBreakdown[]; /** One grader's aggregate result across every input it graded. */ export type GraderSummary = { grader: string; kind: "binary"; passed: number; total: number; } | { grader: string; kind: "scalar"; mean: number; }; /** * Aggregate grades into one summary per grader: a pass count for binary graders, * a mean for scalar ones. A grader with any scalar row is summarized as scalar. * Pure data — rendering is separate, so a JSON or HTML view reuses this untouched. */ export declare function summarizeGraders(perInput: InputBreakdown[]): GraderSummary[]; /** Inputs that scored 0 without being graded, paired with the reason. */ export declare function ungradedInputs(perInput: InputBreakdown[]): { inputId: string; reason: string; }[]; /** * Render a grading result for a terminal. One line per grader, since that is * what tells you which aspect regressed; a per-input listing does not. * * Takes the parts rather than an EvalRunGrading to avoid a circular import — * runTypes.ts imports InputBreakdown from this file. */ export declare function formatGrading(objective: number, perInput: InputBreakdown[]): string[]; /** Sub-cent but nonzero shows as "<$0.01" so a printed cost never reads $0.00. */ export declare function formatUsd(usd: number): string; /** Perfect scores are green, zeroes red, and intermediate scores plain. */ export declare function formatScore(score: number): string;