export type ImplementationMode = "local" | "nim" | "unavailable"; export type Implementation = { mode: ImplementationMode; model: string; runtime?: string; precision?: string; latencyMs?: number; vramGb?: number; throughput?: string; notes?: string; }; export type FailureModeId = 1 | 2 | 3 | 4 | 5; export const FAILURE_MODES: Record = { 1: { name: "The Uncanny Valley", description: "Stiff upper facial regions, unnatural lack of global head movement, severe temporal jitter across frames.", }, 2: { name: "The End-of-Speech Pop", description: "The generated mouth region visibly clashes in color/saturation with the original static image on reverting to silence.", }, 3: { name: "Cascaded Latency", description: "ASR → LLM → TTS → THG run fully serially, each adding sequential latency that caps responsiveness.", }, 4: { name: "VRAM Death", description: "Requires 32GB+ with no quantization path — measured, not theoretical.", }, 5: { name: "The VASA-1 Problem", description: "A brilliant claim with no repo and no reproduction. If there's no code, it doesn't count.", }, }; export type FailureVerdict = "pass" | "fail" | "at-risk" | "n/a"; export type FailureAudit = { mode: FailureModeId; verdict: FailureVerdict; note: string; }; export type Tier = "A" | "B" | "C"; export type Confidence = "confirmed" | "inferred"; export type PipelineNode = { id: string; label: string; category: | "vision" | "asr" | "llm" | "tts" | "avatar" | "video" | "keyframer" | "orchestration"; summary: string; handoffOut?: string; expertNote: string; implementations: Implementation[]; children?: PipelineNode[]; tier?: Tier; failureModeAudit?: FailureAudit[]; confidence?: Confidence; // True for stages whose own output quality directly determines how human // this looks/sounds (Avatar, TTS, Video) — as opposed to stages that affect // correctness or latency but aren't themselves a realism bottleneck. realismCritical?: boolean; }; export type EdgeKind = "data" | "hosts" | "loop"; export type PipelineEdge = { source: string; target: string; label?: string; kind: EdgeKind; }; export type Pipeline = { id: string; name: string; description: string; sourceInput?: string; nodes: PipelineNode[]; edges: PipelineEdge[]; pipelineAudit?: FailureAudit[]; };