// A transparent run's addresses (plans/umtool-redesign.md, R3), one builder per // URL shape (lib/hrefs.ts's rule). Pure: a client component links with them, // and so may the Iterations tab and the Running list (their owners wire them): // // runHref(article, n) /research/runs/
/ // runHref(article, n, { run: 2 }) the iteration's second run (a trace or a // turns file can hold several) import { withQuery } from "../hrefs"; const enc = encodeURIComponent; /** Every sweep run, newest first. */ export const runsHref = () => "/research/runs"; /** One iteration's run page (its last run unless `run` names another). */ export function runHref(article: string, n: number, q: { run?: number } = {}): string { return withQuery(`/research/runs/${enc(article)}/${n}`, { run: q.run }); } /** GET: the run's view (lib/research/runs-types.ts RunView). */ export function runApi(article: string, n: number, q: { run?: number } = {}): string { return withQuery(`/api/research/runs/${enc(article)}/${n}`, { run: q.run }); } /** POST: open (or update) the run's findings as a research board. */ export const runBoardApi = (article: string, n: number) => `/api/research/runs/${enc(article)}/${n}/board`; /** The board a run's findings open as: case `
-run` (its piece `c:
-run`), cut to a piece segment. */ export function runBoardId(article: string, n: number): string { const tail = `-run${n}`; return `${article.slice(0, 64 - tail.length).replace(/-+$/, "")}${tail}`; } /** Which tasks have a run page: the sweeps (an agent's or the pipeline's). */ export const hasRunPage = (kind: string) => kind === "sweep";