/** * dsh-eval — agent evaluation over headless dsh profiles. * * The eval bundle mounts this command-line plugin over dsh-base. It parses * `dsh --profile eval run ` / `report `, spawns one * headless dsh subprocess per case x trial, harvests each persisted session * log as a trace, folds automatic metrics, scripted grading (task success, * tool-selection accuracy), and cross-run comparison, and writes a JSON run * report. LLM-judge metrics (final-answer score, hallucination) and paired * same-seed trials are deferred to later milestones. * * @module dsh-eval */ import type { Context } from '@deepseek-ai/cordis'; import { type EvalStartupValues } from './command.ts'; import { type JudgeChat } from './judge.ts'; /** Stable Cordis plugin name. */ export declare const name = "eval"; /** The launcher-provided command line is the only required service. */ export declare const inject: string[]; /** Process-facing output streams; tests substitute captures. */ export interface EvalIo { stdout: { write(chunk: string): unknown; }; stderr: { write(chunk: string): unknown; }; } /** The process streams the eval app writes to; tests substitute captures. */ export declare const internals: EvalIo; /** * Resolve the production judge chat seam from the mounted llm service, or * undefined when the composition carries no llm service. * @param ctx - the plugin context. * @returns a chat seam over the llm stream, or undefined without llm. */ export declare function resolveJudgeChat(ctx: Context): JudgeChat | undefined; /** * Execute one eval invocation to completion. * @param values - the resolved command-line invocation. * @param io - output streams for the report and diagnostics. * @param services - injected runtime seams, e.g. the LLM-judge chat. * @returns the process exit code; nonzero for any failure or a run with no * completed trials. */ export declare function executeEval(values: EvalStartupValues, io: EvalIo, services?: { judgeChat?: JudgeChat | undefined; }): Promise; /** * Mount the eval command-line app: parse the invocation, run it asynchronously, * and request launcher exit with the result code. * @param ctx - plugin context carrying the command line and launcher exit. */ export declare function apply(ctx: Context): void;