import type { Grade, GraderInput, GraderOptions, Test } from "./types.js"; export declare abstract class BaseGrader { protected readonly options: GraderOptions; constructor(options?: GraderOptions); /** Who this grader is, by revision, for the score rows it writes: a module * grader is `@` (set by loadGradingModule), so * editing the module in place is a new annotator; the bundled goal judge is * `goal-judge@` (a test pins the version to the prompt's hash); * a custom judge file is `@`; anything else constructed in * process is `inline:`. */ annotator(): { kind: "grader" | "judge"; id: string; }; /** @internal Set by loadGradingModule on every grader a module exports. */ revision?: string; /** Files this grader reads from disk at grade time, as the paths were * declared (relative ones are cwd-relative). A run directory snapshots * them next to the grading bundle so a copied run still grades; * `rebindExternalFile` is called with the declared path and the copy's * absolute path. Default: none. */ externalFiles(): string[]; rebindExternalFile(_from: string, _to: string): void; /** Subclasses set a default; `options.name` overrides it. */ protected abstract readonly defaultName: string; name(): string; /** One-line human description for the startup echo. Default: the grader name. */ describe(): string; /** Pre-flight check against an input before the run. Default: nothing to check. * Match-based graders override this to fail fast on an unresolved matchOn. */ validateInput(_input: Test): void; /** Single-shot grade. Declarative: no sampling, no aggregation. */ protected abstract _run(input: GraderInput): Promise; mustPass(): boolean; weight(): number; /** Orchestration: run `_run` k times, aggregate by score kind. */ run(input: GraderInput): Promise; /** A gate that returns a score needs a bar to clear. Without one, a * scalar 0 would pass. `passes()` refuses once the grade is in hand; * a grader that knows its score kind up front overrides `validateInput` * to refuse before any work is done. */ protected missingThreshold(): boolean; passes(grade: Grade): boolean; }