import type { HumanFeedback } from "../../runDirectory/humanFeedback.js"; import type { BaseGrader } from "./baseGrader.js"; import type { LoadedRun, Grade, Test } from "./types.js"; export type GraderGrade = { grader: BaseGrader; grade: Grade; }; export type InputGrades = { test: Test; /** Null when the input was never graded — the run errored, or produced no output. */ run: LoadedRun | null; grades: GraderGrade[]; gatesPassed: boolean; /** Why this input scored 0 without being graded. Set iff `run` is null. */ ungradedReason?: string; /** Notes and unchecked checklist questions people left on the trace, when * the run directory carried any. Reflection feeds these to the model. */ humanFeedback?: HumanFeedback; }; /** * Weighted mean of every grade for one input: a scalar grade contributes its * value, a binary grade contributes 1.0 (pass) or 0.0 (fail). `mustPass` is an * orthogonal gate (a failed gate zeroes the whole input via the Scorecard); it * does not change whether a grade contributes here. An input with no grades * scores 0. */ export declare function inputObjective(grades: GraderGrade[]): number; /** Per-candidate grading result: per-input grades plus derived gate/objective readouts. */ export declare class Scorecard { readonly perInput: InputGrades[]; constructor(perInput: InputGrades[]); gatesPassed(): boolean; /** Per-input objective; a gate-failed input scores 0. */ inputScores(): number[]; objective(): number; /** The canonical gate-aware comparison score: the raw objective when every * `mustPass` gate is satisfied, otherwise 0. This is what every optimizer * uses to compare candidates, and what `OptimizeResult.trainObjective` and * `baselineObjective` report. Prefer this over inlining * `s.gatesPassed() ? s.objective() : 0`. */ gatedObjective(): number; }