import type { Grade, GraderInput, GraderOptions, Input } from "./types.js"; /** * Base class for graders. Authors implement the single-shot `_run`; the base * handles k-sample repetition + aggregation, gating policy, and input scoping. */ export declare abstract class BaseGrader { protected readonly options: GraderOptions; constructor(options?: GraderOptions); /** 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: Input): void; /** Single-shot grade. Declarative: no sampling, no aggregation. */ protected abstract _run(input: GraderInput): Promise; mustPass(): boolean; weight(): number; /** Whether this grader runs on `input`. Default (no inputScope) → every input. */ gradesInput(input: Input): boolean; /** Orchestration: run `_run` k times, aggregate by score kind. */ run(input: GraderInput): Promise; passes(grade: Grade): boolean; }