/** * Open Eval Format — a portable JSON file that describes an eval * suite (inputs, expected outputs, pass/fail rules) plus an * execution result. Compatible with standard CI reporters so one * dataset can be shared across frameworks. * * Version: 2026-04. */ declare const EVAL_FORMAT_VERSION = "2026-04"; interface EvalCaseExpectation { /** Literal substring match. */ contains?: string; /** Regular-expression source (body + flags separate, no surrounding slashes). */ regex?: { body: string; flags?: string; }; /** Equality check after trim + lowercase normalization. */ equalsNormalized?: string; /** Min similarity (0..1) after embedding; depends on runner impl. */ semanticSimilarity?: number; } interface EvalCase { id: string; input: string; expected?: EvalCaseExpectation | string; metadata?: Record; } interface EvalSuiteDoc { evalFormatVersion: typeof EVAL_FORMAT_VERSION; name: string; description?: string; tags?: string[]; cases: EvalCase[]; } interface EvalRunResult { evalFormatVersion: typeof EVAL_FORMAT_VERSION; suite: string; startedAt: string; completedAt: string; agent: { name?: string; version?: string; }; totals: { cases: number; passed: number; failed: number; accuracy: number; }; cases: Array<{ id: string; input: string; output: string; passed: boolean; latencyMs: number; error?: string; }>; } declare function validateEvalSuite(raw: unknown): EvalSuiteDoc; declare function validateEvalRunResult(raw: unknown): EvalRunResult; /** * Evaluate whether an output satisfies a case's expectation. * Exported so custom runners can share the interpretation. */ declare function matchesExpectation(output: string, expected: EvalCase['expected']): boolean; export { EVAL_FORMAT_VERSION, type EvalCase, type EvalCaseExpectation, type EvalRunResult, type EvalSuiteDoc, matchesExpectation, validateEvalRunResult, validateEvalSuite };