/** * Dashboard API for v3 workflow runs. * * Host-neutral v3 run API: a single * `handle...(req, res, url, deps, authed): Promise` router that returns * `true` once it has handled a route. Read data comes from the v3 run dir via * `ops-projection.ts` (journal + dag → RunView); the sole mutation below is * proxied to the run's owner daemon. * * GET /api/v3/runs → { runs: RunSummary[] } * GET /api/v3/runs/:id → RunView | 404 * GET /api/v3/runs/:id/nodes/:nodeId/pty-log → raw PTY bytes (AUTH ONLY) * POST /api/v3/runs/:id/cancel → owner-daemon proxy (AUTH ONLY) * * Security: every route in this module is authenticated. Even though RunView * omits write tokens and raw fs paths, its goals, node ids, and run ids may * contain project or personal information. The per-node pty-log is more * sensitive still because terminal output can contain credentials. Keep the * handler-level guard as defense in depth in addition to dashboard/auth.ts. */ import type { IncomingMessage, ServerResponse } from 'node:http'; export type V3RunsApiDeps = { /** Root of the v3 run dirs (`~/.botmux/v3-runs` in production). */ runsDir: string; /** Route a mutation to the daemon that owns the immutable run binding. */ proxyToDaemon: (larkAppId: string, daemonPath: string, init: RequestInit) => Promise; }; export declare function handleV3RunsApi(req: IncomingMessage, res: ServerResponse, url: URL, deps: V3RunsApiDeps, authed?: boolean): Promise; //# sourceMappingURL=v3-runs-api.d.ts.map