diff --git a/internal/workbench/http.ts b/internal/workbench/http.ts index c2d00240..cf27bb38 100644 --- a/internal/workbench/http.ts +++ b/internal/workbench/http.ts @@ -20,6 +20,7 @@ export function createWorkbenchHttpApp(options: { dispatch: (command: WorkbenchC if (url.pathname === "/v1/caserun/cases") return json(200, { ok: true, status: "unavailable", cases: [], count: 0, mode: options.mode ?? "native-test" }); if (url.pathname === "/v1/hwpod/specs") return json(200, { ok: true, status: "unavailable", specs: [], mode: options.mode ?? "native-test" }); if (url.pathname === "/v1/hwpod-node-ops") return json(200, { ok: true, status: "unavailable", events: [], groups: [], mode: options.mode ?? "native-test" }); + if (url.pathname === "/v1/web-performance" && request.method === "POST") return json(202, { ok: true, status: "accepted", persisted: false, mode: options.mode ?? "native-test" }); if (url.pathname === "/v1/workbench/events" && request.method === "GET") return nativeEventStream(options, url); if (url.pathname === "/v1/workbench/sessions" && request.method === "GET") return nativeSessionList(options, url); const sessionMatch = /^\/v1\/workbench\/sessions\/([^/]+)(?:\/(messages))?$/u.exec(url.pathname); diff --git a/internal/workbench/workbench.test.ts b/internal/workbench/workbench.test.ts index 8a358931..4b0405f4 100644 --- a/internal/workbench/workbench.test.ts +++ b/internal/workbench/workbench.test.ts @@ -88,6 +88,9 @@ describe("Workbench native HTTP adapter", () => { expect(response.status).toBe(200); expect(await response.json()).toMatchObject({ ok: true, status: "unavailable", mode: "native-test" }); } + const performance = await app.fetch(new Request("http://native.test/v1/web-performance", { method: "POST", body: "{}" })); + expect(performance.status).toBe(202); + expect(await performance.json()).toMatchObject({ ok: true, status: "accepted", persisted: false, mode: "native-test" }); }); test("L0 CLI observes AgentRun-derived events only through the Kafka SSE route", async () => {