import { BaseGrader } from "./baseGrader.js"; import type { Grade, GraderInput } from "./types.js"; import { type TestReport } from "../../cli/testReport.js"; /** Dollars a harness case may spend on `llm()` unless the test says otherwise. */ export declare const DEFAULT_HARNESS_MAX_COST = 5; export type AgencyTestGraderOptions = { /** The framework's copy of the harness pair, installed in the scratch dir * as `.agency` and `.test.json`. */ agencyFile: string; testJsonFile: string; name: string; maxCost?: number; /** Make the harness a gate: the test scores 0 unless every case passes. */ mustPass?: boolean; }; /** The CLI spawn, replaceable in unit tests. */ export type RunHarness = (args: { scratchDir: string; jsonFilename: string; maxCost: number; }) => { stdout: string; }; export declare class AgencyTestGrader extends BaseGrader { protected readonly defaultName: string; private readonly opts; private readonly runHarness; constructor(opts: AgencyTestGraderOptions, runHarness?: RunHarness); protected _run({ run }: GraderInput): Promise; } /** Score one file's report: the passing fraction, 0 when the file did not * run, 1 when it ran with nothing to fail. */ export declare function gradeReport(report: TestReport, jsonFilename: string): Grade;