import type { WorkflowMetricComparison, WorkflowMetrics } from './workflow-regression.js'; export type EvalExecutionStatus = 'queued' | 'preparing' | 'generating' | 'running' | 'judging' | 'finalizing' | 'stopping' | 'completed' | 'stopped' | 'interrupted' | 'unknown'; export type EvalConclusion = 'passed' | 'failed' | 'incomplete'; export interface EvalRunConfig { dataset?: string; datasetRoot?: string; datasetTreatment?: 'native' | 'goal'; count?: number; acceptDatasetLicense?: boolean; target: string; targetType: 'skill' | 'application'; agent?: string; model?: string; judgeAgent?: string; judgeModel?: string; judgeEnabled?: boolean; baseUrl?: string; judgeBaseUrl?: string; suite?: 'local' | 'langsmith' | 'langfuse'; task?: string; workflowRegressionCase?: string; quick?: boolean; profile?: string; goal?: string; /** 内置数据集的 0 表示不限制整个 Native 流程的执行时长。 */ timeoutSeconds?: number; maxTurns?: number; previousExperimentId?: string; retrySourceRunId?: string; } export interface EvalManagedRun { schema: 'comet.eval.managed-run.v1'; id: string; origin: 'dashboard' | 'cli'; createdAt: string; /** worker 接管时持久化,排队时间不消耗执行预算。 */ startedAt?: string; updatedAt: string; status: EvalExecutionStatus; config: EvalRunConfig; targetId: string; contentHash: string; previewHash: string; requestId?: string; baselineRunId?: string | null; launchPhase?: 'pending' | 'dispatched'; owner?: { pid: number; identity?: string; }; child?: { pid: number; identity?: string; instanceId?: string; ownerPid?: number; }; error?: string; exitCode?: number | null; } export interface EvalCaseResult { id: string; task: string; prompt: string | null; finalResponse: string | null; treatment: string; repetition: number; passed: boolean | null; quality: 'included' | 'flagged' | 'excluded' | 'unknown'; qualityReason: string | null; checksPassed: string[]; checksFailed: string[]; scores: Record; scoreSources: Record; failureAttribution: Array<{ bucket: string; check: string; reason?: string; }>; durationSeconds: number | null; tokens: number | null; costUsd: number | null; model: string | null; agent: string | null; caseHash: string | null; validatorHash: string | null; datasetComparisonIdentity?: string | null; workflowMetrics?: WorkflowMetrics; artifacts: Array<{ id: string; label: string; }>; } export interface EvalRunDetail { archiveId?: string; archiveAssessment?: { taskCompleted: boolean; originalTestsPassed: number; regressionTestsPassed: number; }; id: string; origin: 'dashboard' | 'cli' | 'history'; createdAt: string | null; completedAt: string | null; executionStatus: EvalExecutionStatus; conclusion: EvalConclusion; subsetConclusion?: EvalConclusion | null; completeness?: 'complete' | 'incomplete'; integrity?: 'valid' | 'invalid' | 'unverified'; quality?: 'included' | 'flagged' | 'excluded'; domainConclusion?: EvalConclusion | null; evidenceRevision?: string; target: { id: string; name: string; type: 'skill' | 'application' | 'unknown'; version: string | null; path: string | null; contentHash: string | null; }; config: Partial; passed: number; total: number; expectedTotal: number | null; cases: EvalCaseResult[]; caseContentOmitted?: boolean; progress?: { phase: 'preparing' | 'generating' | 'running' | 'judging' | 'finalizing'; updatedAt: string | null; lastEventAt: string | null; currentCase: { task: string; treatment: string | null; repetition: number; } | null; activities: Array<{ id: string; at: string; kind: 'phase' | 'model' | 'tool'; message: string; }>; } | null; metrics: { durationSeconds: number | null; tokens: number | null; knownCostUsd: number | null; costStatus: 'case-costs-only' | 'partial' | 'unavailable'; generationCostUsd: number | null; }; coverage: { executedSteps: string[]; coveredSteps: string[]; uncoveredSteps: string[]; coveredChoices: string[]; uncoveredChoices: string[]; recoveredActions: string[]; actualModels: string[]; } | null; limitations: string[]; failures: string[]; artifacts: Array<{ id: string; label: string; format: 'markdown' | 'html' | 'json' | 'text'; }>; baselineScope: string | null; storedBaselineScope?: string | null; baselineRunId: string | null; boundBaselineRunId: string | null; isBaseline: boolean; baselineEligible: boolean; baselineDisabledReason: string | null; availableActions: { stop: boolean; rerun: boolean; setBaseline: boolean; compare: boolean; }; stale: boolean | null; diagnostics: string[]; } export type EvalRunSummary = Pick & { model: string | null; agent: string | null; retrySourceRunId?: string; }; export interface EvalRunComparison { metric?: 'dataset-score'; comparable: boolean; reasons: string[]; baseline: EvalRunDetail; candidate: EvalRunDetail; improved: number; regressed: number; unchanged: number; configurationChanges: Array<{ field: string; baseline: unknown; candidate: unknown; }>; cases: Array<{ task: string; treatment?: string; workflowRegressionCase?: string; metrics?: WorkflowMetricComparison; repetition: number; baseline: boolean | null; candidate: boolean | null; baselineScore?: number | null; candidateScore?: number | null; change: 'improved' | 'regressed' | 'unchanged' | 'unmatched'; }>; } //# sourceMappingURL=eval-run-types.d.ts.map