import { type ConsensusRevision2Metadata } from "./statistics.js"; export type SkillBenchRunMode = "pilot" | "validated"; export type ReportDecisionState = "pass" | "fail" | "inconclusive"; type CellStatus = "complete" | "quality-failure" | "process-failure" | "infrastructure-failure" | "availability-failure" | "quota-failure" | "scorer-failure" | "incomplete" | "parity-invalid"; export interface ProofMatrixView { expected: string[]; found: string[]; done: string[]; missed: string[]; falsePositive: string[]; incorrect: string[]; proof: string[]; } export type ReportConfidenceVerdict = "winner" | "tie" | "inconclusive"; export interface ReportConfidenceInput { verdict: ReportConfidenceVerdict; noWinnerReason: string | null; interval: { lower: number; mean: number; upper: number; } | null; metadata: ConsensusRevision2Metadata; } export interface ReportCellInput { id: string; taskId: string; arm: string; modelId: string; status: CellStatus; hardGatesPassed: boolean; qualityPassed: boolean; qualityScore: number; costUsd: number | null; latencyMs: number | null; samples: number; scenariosCovered: number; scenariosRequired: number; proofMatrix: ProofMatrixView; evidencePaths: string[]; tokens: Record & { completeness: string; provenance: string; }; } export interface SkillBenchReportInput { schemaVersion: 1; runId: string; mode: SkillBenchRunMode; status: string; spec: { id: string; fingerprint: string; evaluationFingerprint: string; seed: string; rerunCommand: string; }; skill: { id: string; fingerprint: string; }; model: { id: string; fingerprint: string; }; environment: { provider: string; fingerprint: string; }; pricing: { source: string; url?: string | null; retrievedAt?: string | null; currency?: string | null; completeness: string; }; budget: Record; warnings: string[]; confidence?: ReportConfidenceInput; cells: ReportCellInput[]; } export interface ReportRankingCell { cellId: string; taskId: string; arm: string; modelId: string; qualityScore: number; costUsd: number | null; latencyMs: number | null; } export interface SkillBenchReportView { schemaVersion: 1; runId: string; mode: SkillBenchRunMode; decision: { mode: SkillBenchRunMode; state: ReportDecisionState; validated: boolean; cheapestPassing: ReportRankingCell | null; highestQuality: ReportRankingCell | null; matchedSkillUplift: number | null; coverage: { samples: number; scenarioCoverage: string; }; decisiveMisses: string[]; decisiveFalsePositives: string[]; noWinnerReason: string | null; recommendedRoute: null | { skillId: string; modelId: string; objective: string; }; taskChoices: Array<{ taskId: string; state: ReportDecisionState; cheapestPassing: ReportRankingCell | null; highestQuality: ReportRankingCell | null; }>; confidence: { verdict: ReportConfidenceVerdict; noWinnerReason: string | null; familywiseAlpha: number; maxLooks: number; currentLook: number; comparisonFamilyId: string; comparisonCount: number; alphaPerComparisonLook: number; lowerQuantile: number; upperQuantile: number; frozenPairIds: string[]; resamples: number; seed: string; sampleCount: number; coverage: number; interval: { lower: number; mean: number; upper: number; } | null; }; }; budget: Record; tokenCostCompleteness: Array<{ cellId: string; completeness: string; provenance: string; categories: string[]; }>; proofMatrices: Array<{ cellId: string; matrix: ProofMatrixView; evidencePaths: string[]; }>; provenance: { manifestFingerprint: string; evaluationFingerprint: string; skillFingerprint: string; modelFingerprint: string; environmentFingerprint: string; seed: string; rerunId: string; rerunCommand: string; pricingSnapshot: SkillBenchReportInput["pricing"]; warnings: string[]; }; recommendation: null | { evidencePath: string; }; actions: { canApply: boolean; }; rows: Array; } export declare function normalizeSkillBenchReport(input: SkillBenchReportInput): SkillBenchReportView; export declare function renderSkillBenchReportJson(view: SkillBenchReportView): SkillBenchReportView; export type RunOutcomeKind = "pilot" | "budget-stop" | "incomplete" | "salvaged" | "validated-pass" | "validated-fail" | "inconclusive"; export interface RunOutcomeView { kind: RunOutcomeKind; title: string; summary: string; nextActions: string[]; technicalReason: string | null; } /** Plain-language run outcome for incomplete/budget-stop/pilot/pass paths. */ export declare function describeRunOutcome(view: SkillBenchReportView): RunOutcomeView; export declare function renderSkillBenchReportHtml(view: SkillBenchReportView, options?: { browserOpen?: { attempted: boolean; ok: boolean; error?: string; }; }): string; export {};