/** * evaluation pipeline 的运行状态生命周期。 * * 把 `EvaluationRunState` + 4 个 helper(initialize / finalizeSuccessfulRun / * persistSuccessfulJob / persistFailedJob)从 evaluation-pipeline.ts 拆出来, * 让 orchestrator 主体回归「编排」单职责。这些 helper 之间是线性时序耦合 * (init → preflight → executeTasks → finalize → persist),向上只被 * `executeEvaluationPipeline` 调用,向下只依赖 `eval-core/evaluation-job` 与 * `server/job-store` 的纯 job-store 抽象,与 task execution / report assembly * 解耦。 * * 不再单独 export 给测试 —— job 生命周期通过 orchestrator 间接验证,无独立单测。 */ import type { Artifact, EvaluationJob, EvaluationRequest, EvaluationRun, JobStore } from '../../types/index.js'; export interface EvaluationRunState { request: EvaluationRequest; runId: string; jobId: string; createdAt: string; startedAt: string; initialRun: EvaluationRun; runningJob: EvaluationJob; resolvedJobStore: JobStore | null; } export declare function initializeEvaluationRunState({ samplesPath, skillDir, artifacts, model, judgeModel, noJudge, executorName, judgeExecutorName, concurrency, timeoutMs, noCache, project, owner, tags, runId, jobStore, persistJob, repeat, holdoutRatio, batch, judgeRepeat, judgeModels, bootstrap, bootstrapSamples, lengthDebias, budget, strictBaseline, effort, retry, noDiagnostic, }: { samplesPath: string; skillDir: string; artifacts: Artifact[]; model: string; judgeModel: string; noJudge: boolean; executorName: string; judgeExecutorName: string; concurrency: number; timeoutMs?: number; noCache: boolean; project?: string; owner?: string; tags?: string[]; runId: string; jobStore?: JobStore | null; persistJob?: boolean; repeat?: number; holdoutRatio?: number; batch?: boolean; judgeRepeat?: number; judgeModels?: import('../../types/index.js').JudgeConfig[]; bootstrap?: boolean; bootstrapSamples?: number; lengthDebias?: boolean; budget?: import('../../types/index.js').EvalBudget; strictBaseline?: boolean; effort?: 'low' | 'medium' | 'high' | 'xhigh' | 'max'; retry?: number; noDiagnostic?: boolean; }): Promise; export declare function finalizeSuccessfulRun(state: EvaluationRunState): { run: EvaluationRun; job: EvaluationJob; }; export declare function persistSuccessfulJob(state: EvaluationRunState, job: EvaluationJob): Promise; export declare function persistFailedJob(state: EvaluationRunState, err: unknown): Promise;