// Client-safe types and constants for the per-video transcription outcome // sidecar. Mirrors downloadOutcome.ts: server-only I/O lives in // transcribeOutcome-server.ts. Written when a video is freshly transcribed so // the stats build can record *when* the transcript was acquired (the download // sidecar already records when the audio was acquired). File mtimes are an // unreliable acquisition signal because the shard model rsyncs identical copies // between machines, so the timestamp is persisted explicitly here. export type TranscribeOutcomeRecord = { videoId: string; // ISO 8601, set the moment transcript.json is finalized. transcribedAt: string; // Which worker produced it (id + engine app), for later attribution. Optional // so older/hand-written records still validate; appId is absent for remote // workers (they delegate to another app instance). // `kind` mirrors WorkerKind. "llm" can never actually appear (an llm worker // never matches a transcription lease) but the type tracks the worker model. worker?: { id: string; appId?: string; kind: "local" | "remote" | "llm" }; // Wall-clock transcription time in milliseconds. durationMs?: number; }; export const TRANSCRIBE_OUTCOME_FILENAME = "transcribe-outcome.json";