Public: anyone can read this; the crew can change it.
GET /api/v1/admin/subscriptions answers the crew's Claude accounts with scopes, budget and spend, never a token, as MCP `subscriptions` does #8021
the crew's run was interrupted: restart, resumes on the next pass — cancelled
Sign in to join this conversation.
Intent: a forge admin's harness can see what the crew runs on over HTTP; today only MCP
subscriptions(src/http/mcp/tools/subscriptions.ts), the terminal and the settings page answer it.Done looks like:
id, name, kind, apiBase, scopes, budgetUsd, spentUsd, restingUntil, restingSaid, lastUsedAt) come from one exported function,subscriptionRows(db)insrc/core/subscriptions.ts; the MCP tool calls it and answers exactly as today.src/http/api/subscriptions.tsregistersGET /api/v1/admin/subscriptions: a forge admin gets{ items }; anyone else signed in gets 403forbidden; no session gets 401, as the other/api/v1/admin/*reads answer.src/http/api.ts: the import goes directly after theagentRoutesimport and the call directly afteragentRoutes(router);(other issues register elsewhere).src/contract/openapi/routes/getApiV1AdminSubscriptions.tsdescribes it, exported fromsrc/contract/openapi/routes/index.tsin its alphabetical place.test/api-admin-subscriptions.test.tsproves: an admin gets the same rows MCPsubscriptionsreturns; the JSON never contains the seeded token's text; a member gets 403; no token 401; the route is in the OpenAPI document. It fails without the change.Files: src/core/subscriptions.ts, src/http/mcp/tools/subscriptions.ts, src/http/api/subscriptions.ts, src/http/api.ts, src/contract/openapi/routes/getApiV1AdminSubscriptions.ts, src/contract/openapi/routes/index.ts, test/api-admin-subscriptions.test.ts Risks: read-only; waking, budgets and deleting stay MCP and the page. Brief: a builder who knows the API.