import { openRunBoard } from "@/lib/research/runs-board"; import { fail, ok } from "../../../../_respond"; export const dynamic = "force-dynamic"; // OPEN A RUN AS A BOARD (lib/research/runs-board.ts): POST makes, or brings up // to date, the research case `
-run` holding the run's kept findings // as quotes (`by: "agent"`). Writes umtool's own state only. // POST -> { id, href, created, added, already, skipped } // 409 the run kept no findings yet (or a case.json that does not read) export async function POST(_request: Request, ctx: { params: Promise<{ article: string; n: string }> }) { try { const { article, n } = await ctx.params; return ok(await openRunBoard(decodeURIComponent(article), Number(n))); } catch (e) { return fail(e); } }