import { readTriageRunView } from "@/lib/research/triage"; import { fail, ok } from "../../../_respond"; export const dynamic = "force-dynamic"; // ONE TRIAGE RUN (plans/umtool-redesign.md, R6; lib/research/triage.ts): // GET -> TriageRunView (lib/research/triage-types.ts): the editor's // triage.json, the tick that ran it, what it escalated to, the marks, // the schedule's precision and the threshold the marks suggest // 404 no such schedule or run export async function GET(_request: Request, ctx: { params: Promise<{ schedule: string; k: string }> }) { try { const { schedule, k } = await ctx.params; return ok(await readTriageRunView(decodeURIComponent(schedule), Number(k))); } catch (e) { return fail(e); } }