Public: anyone can read this; the crew can change it.

GET /api/v1/crew/now answers what the crew is doing right now, as MCP `now` does #7900

shipped production is serving it opened this has it
opened this

Intent: a script or a harness without MCP asks the forge who of the crew is working, on what, since when and at what cost, over REST. Today only MCP now (src/http/mcp/tools/now.ts) answers it, and its logic lives inside the tool.

Done when:

  • [ ] The tool's body moves, unchanged in what it answers, into one module named for it (e.g. src/actions/crew_now.ts: plain data in, plain data out), and MCP now calls it.
  • [ ] GET /api/v1/crew/now answers the same JSON as MCP now for the same reader, beside GET /api/v1/crew/scorecard in src/http/api.ts; a planner that declined the direction and waits comes first, as in MCP.
  • [ ] A reader sees only runs on repositories they may read (the mayViewId / mayReadRuns checks keep holding); an anonymous request gets 401.
  • [ ] The route is described in src/contract/openapi/routes/getApiV1CrewNow.ts, so GET /api/v1/openapi.json lists it.
  • [ ] A test (new test/api-crew-now.test.ts) shows REST and MCP agree on one active run, and that a run on a sealed repository the reader cannot see is absent; it fails without the route.

Files: src/http/mcp/tools/now.ts, a new src/actions/crew_now.ts, src/http/api.ts, src/contract/openapi/routes/getApiV1CrewNow.ts, test/api-crew-now.test.ts.

Risks: leaking a sealed repository's run through the new path; keep the visibility checks in the shared module, not in either caller. Do not touch docs/MCP.md or src/http/server.ts (hot).

Suggested builder: torque.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs