// A TRIAGE RUN, as umtool's pages read it (plans/umtool-redesign.md, R6): the // editor's triage.json (common lib/report/draft/triage/types.ts) plus the tick // that ran it, what it escalated to, the operator's marks and the schedule's // precision. Types only: safe for a client component. import type { FlagMark, Precision, TickTriage, TriageFile, TriageThreshold } from "yt-dlp-transcript-common/lib/report/draft/triage/types"; export type { FlagMark, Precision, TickTriage, TriageFile, TriageThreshold }; export type TriageTier2 = { article: string; n: number; /** The iteration's status (queued, running, done, failed, cancelled), or null when it does not read. */ status: string | null; usd: number; /** Kept findings (quoted citations of its report), when it has one. */ findings: number | null; /** The run page (`/research/runs/
/`) and the article. */ runHref: string; articleHref: string; }; export type TriageRunView = { schedule: { id: string; shape: string; topic: string; href: string; threshold: TriageThreshold }; k: number; /** Every run of this schedule, newest first (the run picker). */ runs: number[]; file: TriageFile; /** The tick that ran it (its line), when one did. */ tick: { at: string; status: string; reason: string | null; usd: number; triage: TickTriage | null } | null; /** What it escalated to (the tier 2 sweep), when it did. */ tier2: TriageTier2 | null; /** The operator's marks on this run's flags, by flag id. */ marks: Record; /** The schedule's precision over every marked flag, and the threshold it suggests. */ precision: Precision; suggestion: { threshold: TriageThreshold; why: string; changed: boolean }; /** The board made of the flags, when there is one; its id either way. */ board: { id: string; href: string; exists: boolean; quotes: number }; }; /** One run on the schedule's page. */ export type TriageRunRow = { k: number; at: string; status: string; candidates: number; flagged: number; dismissed: number; escalated: boolean; why: string; /** R6.1: tier 0 was partial — what it did not reach ("not reached: …"). */ partial: string | null; usd: { tier1: number; tier2: number }; href: string; }; export type ScheduleTriage = { runs: TriageRunRow[]; precision: Precision; suggestion: { threshold: TriageThreshold; why: string; changed: boolean }; threshold: TriageThreshold; };