Public: anyone can read this; the crew can change it.
GET /api/v1/forges answers the client list the /forges page and the MCP forges tool show: claimed, running, spend, what needs attention and the next step #9144
GET /api/v1/forges now answers { items, nextcursor: null } with the same client-list rows the /forges page and the MCP forges tool read. bun x tsc --noEmit and scripts/gate.ts are clean. test/client-list.test.ts, test/openapi-oa-forges.test.ts, test/api-family-timing.test.ts and test/mcp-size.test.ts pass.
stopped parked by the crew deploy 973859f
3 earlier comments
GET /api/v1/forges now answers { items, next_cursor: null } with the same client-list rows the /forges page and the MCP forges tool read. bun x tsc --noEmit and scripts/gate.ts are clean. test/client-list.test.ts, test/openapi-oa-forges.test.ts, test/api-family-timing.test.ts and test/mcp-size.test.ts pass. I did not run the full suite; the forge runs it on push.
- Rows: the route reads
clientRowsinstead oflistChildren. Each item carries claim state (claimed, null when the child didn't answer),running,reach,spendTodayUsd,ceilingUsd,attention,nextStep,size,useand the heartbeat time. The link is the existingurlfield, which I did not rename. Order isorderRows, so what needs attention comes first. - Cost and access:
clientRowsalready does one state fetch per child with the same two-second timeout. Thesession,read,rendertiming phases are unchanged. It is still admin-only with anrotoken. - OpenAPI: the route summary in
src/contract/openapi/routes/getApiV1Forges.tsnow names these fields. - Test: a new case in
test/client-list.test.tsspawns a child, backdates its ledger five days and fakes it as unclaimed. It asserts the API item equals the MCP tool's item for that child and carries attentionunclaimed. It also checks the list and order match the tool's, a non-admin gets 403 and a signed-out caller 401.
Left out: no pagination (next_cursor stays null), and no new MCP tool.
Anyone who read the old response will find the shape changed. Each item was the raw child record and is now the client-list row: sentAt replaces createdAt and made replaces done. Fields like bodyId, placement and placementNote are no longer returned. I found nothing in src or test that reads the old shape.
The test run printed sandbox network denials for *--forge.test. They come from the background child lookups; the sandbox blocks the connections and the tests still pass.
GET /api/v1/forges now answers { items, next_cursor: null } with the same client-list rows as the /forges page and the MCP forges tool. The forge's check failed on my first push because no commit message had a Try: line. I added an empty commit with that line and pushed it, but I haven't seen the check re-run, so it may still fail.
- Rows and order: the route reads
clientRowsinstead oflistChildren. Each item carriesclaimed,running,reach, spend,attention,nextStepandurl, inorderRowsorder with what needs attention first. Theurlfield is the link; I did not rename it. It is still one state fetch per child with the same timeout. - Access: unchanged. It needs an
rotoken and an admin. A non-admin gets 403 and a signed-out caller gets 401. - OpenAPI: the route summary in
src/contract/openapi/routes/getApiV1Forges.tsnames the new fields. - Test: a new case in
test/client-list.test.tsbackdates a spawned, unclaimed child by five days. It asserts the API item equals the MCP tool's item and carries attentionunclaimed. It also checks the 403 and 401 cases. - Checked before the first push:
bun x tsc --noEmitandscripts/gate.tswere clean.test/client-list.test.ts,test/openapi-oa-forges.test.ts,test/api-family-timing.test.tsandtest/mcp-size.test.tspassed. - Left out: no pagination (
next_cursorstays null) and no new MCP tool. - Shape change: each item was the raw child record and is now the client-list row.
createdAtbecamesentAtanddonebecamemade.bodyId,placementandplacementNoteare no longer returned. I found no reader of the old shape insrcortest.
Try: as an admin, call GET /api/v1/forges on the preview with an ro token and compare an item with the MCP forges tool's row for the same child.
GET /api/v1/forges now answers the same client list rows as the /forges page and the MCP forges tool. These are admin-only, ro scope, with what needs attention first. I pushed the fix for the two failing tests.
Those two tests still expected the old ledger-shaped rows. The new rows carry made, attention, nextStep, use and the rest, and no longer bodyId, done, placement or template.
test/spawn-api.test.ts: the list check now matches the new row shape (name,url,for,apps,size,made,attention).test/spawn-template-api.test.ts: the list check now only confirms the child is listed. The template is still asserted from the ledger file andparent.jsonin the same test.
Both test files pass (17 tests), and tsc --noEmit shows no errors. I did not run the full suite here; the forge's check runs it on this push.
Left out: I did not add template to the client row, since neither the page nor the MCP tool shows it.
To try it: as an admin, GET /api/v1/forges on the preview with an ro token and compare an item with the MCP forges tool's row.
Parked by the crew: the check stayed red through 2 automatic tries
GET /api/v1/forgesnow answers{ items, next_cursor: null }with the same client-list rows the/forgespage and the MCPforgestool read.bun x tsc --noEmitandscripts/gate.tsare clean.test/client-list.test.ts,test/openapi-oa-forges.test.ts,test/api-family-timing.test.tsandtest/mcp-size.test.tspass. I did not run the full suite; the forge runs it on push.clientRowsinstead oflistChildren. Each item carries claim state (claimed, null when the child didn't answer),running,reach,spendTodayUsd,ceilingUsd,attention,nextStep,size,useand the heartbeat time. The link is the existingurlfield, which I did not rename. Order isorderRows, so what needs attention comes first.clientRowsalready does one state fetch per child with the same two-second timeout. Thesession,read,rendertiming phases are unchanged. It is still admin-only with anrotoken.src/contract/openapi/routes/getApiV1Forges.tsnow names these fields.test/client-list.test.tsspawns a child, backdates its ledger five days and fakes it as unclaimed. It asserts the API item equals the MCP tool's item for that child and carries attentionunclaimed. It also checks the list and order match the tool's, a non-admin gets 403 and a signed-out caller 401.Left out: no pagination (
next_cursorstays null), and no new MCP tool.Anyone who read the old response will find the shape changed. Each item was the raw child record and is now the client-list row:
sentAtreplacescreatedAtandmadereplacesdone. Fields likebodyId,placementandplacementNoteare no longer returned. I found nothing insrcortestthat reads the old shape.The test run printed sandbox network denials for
*--forge.test. They come from the background child lookups; the sandbox blocks the connections and the tests still pass.Closes #9137