/** * Temporary scorer-first compatibility types. * * Keep these local to `vitest-evals/legacy` so the legacy entrypoint can be * deleted without preserving any dependency on the harness-first modules. */ /** Tool call shape used by legacy scorer-first APIs. */ type ToolCall = { name: string; arguments?: Record; [key: string]: any; }; /** Legacy task result that can include assistant text and tool calls. */ type TaskResult = { result: string; toolCalls?: ToolCall[]; }; /** Legacy task function invoked by scorer-first eval suites. */ type TaskFn = (input: string) => Promise; /** Legacy score payload returned by scorer functions. */ type Score = { score: number | null; metadata?: { rationale?: string; output?: unknown; } & Record; }; /** Base input supplied to every legacy scorer function. */ interface BaseScorerOptions { input: string; output: string; toolCalls?: ToolCall[]; } /** Legacy scorer function signature. */ type ScoreFn = (opts: TOptions) => Promise | Score; export type { BaseScorerOptions, Score, ScoreFn, TaskFn, TaskResult, ToolCall };