/** * visual-judge — AI 验证视觉判定兜底(v8.3.350+) * * 三级执行通道的末级兜底:宿主 AI 无多模态能力时,只操作页面截图、不判定, * 在 results.json 中写 judged:false + screenshots。本模块用视觉模型(qwen-vl 默认) * 对「截图 + 预期结果原文」做业务断言,回写判定结果。 * * 判定原则:业务断言为主——截图是否符合 plan.json 中该场景的预期结果。 */ import type { VisualModelConfig } from '../ui-verify/visual-model-client'; import type { AiVerifyPlan, AiVerifyResult, AiVerifyResults } from './types'; /** 待判定场景(judged:false 且有截图) */ export interface PendingJudgement { result: AiVerifyResult; screenshotPaths: string[]; } /** 找出 results 中待视觉判定的场景(judged 不为 true 且有截图) */ export declare function findPendingJudgements(results: AiVerifyResults): PendingJudgement[]; /** * 用视觉模型判定单个待判定场景。 * @param result 待判定结果(会被改写) * @param screenshotPaths 截图相对路径(相对 outDir) * @param outDir 剧本输出目录 * @param plan 剧本(取场景标题与预期结果) * @param config 视觉模型配置 */ export declare function judgeScenario(result: AiVerifyResult, screenshotPaths: string[], outDir: string, plan: AiVerifyPlan, config: VisualModelConfig): Promise; /** * 兜底判定入口:对 results 中所有待判定场景逐个判定并回写。 * 返回判定数量;无待判定场景返回 0。 */ export declare function runAiJudge(resultsPath: string, plan: AiVerifyPlan, config?: VisualModelConfig): Promise; //# sourceMappingURL=visual-judge.d.ts.map