/** * Diagnostic — 功能性测试视角的"哪错了 + 怎么改"诊断。 * * 与 Judge 评价(打分)彻底独立: * - Judge 答"打几分",看 rubric + output 主观打 1-5。 * - Diagnostic 答"哪错了 + skill 怎么改",看 rubric + skill 原文 + 实际 trace + 失败断言。 * - --no-judge 不跑 judge,但 diagnostic 仍会跑(假设 sample 有 fail); * --no-diagnostic 反之。 * * 触发条件:sample 至少有 1 条 failed assertion(全过的 sample 不需要诊断,省成本)。 * * 运行目标跟随首位 judge;没有 judge 配置时跟随被测 executor/model。 * provider-specific 的廉价默认值只在 CLI runtime resolution 中决定。 */ import type { ExecutorFn, ToolCallInfo, TurnInfo, JudgeConfig, Sample } from '../types/index.js'; import type { AssertionDetail, DiagnosticResult, WorkflowCheck, FailureMode } from '../types/judge.js'; export interface DiagnosticTarget { executor: string; model: string; } export declare function resolveDiagnosticTarget(judgeModels: JudgeConfig[], mainExecutor: string, mainModel: string): DiagnosticTarget; export declare function getDiagnosticPromptHash(): string; interface RunDiagnosticOptions { sample: Sample; skillContent: string | null; skillName: string; toolCalls: ToolCallInfo[] | undefined; turns: TurnInfo[] | undefined; fullOutput: string | undefined; assertionDetails: AssertionDetail[]; executor: ExecutorFn; model: string; timeoutMs?: number; } export declare function buildDiagnosticPrompt(opts: RunDiagnosticOptions): string; export declare function salvagePartialJson(blob: string): { summary?: string; expected?: string; actual?: string; rootCause?: DiagnosticResult['rootCause']; workflowChecks?: WorkflowCheck[]; failureModes?: FailureMode[]; suggestion?: DiagnosticResult['suggestion']; }; export declare function runDiagnostic(opts: RunDiagnosticOptions): Promise; export {};