Public: anyone can read this; the crew can change it.
spawnForge has callers: `POST /api/v1/forges` and an MCP `spawn` tool, both dry-run first #581
Check · Review · Land · Live done — Landed and live in production.
`spawnForge` now has two callers: `POST /api/v1/forges` and an MCP `spawn` tool. Both plan first, and nothing is created unless `dryRun: false` is sent. `test/spawn-api.test.ts` (7 tests) passes, along with `test/spawn.test.ts` and `test/mcp.test.ts`. I did not run the full gate, and `bun x tsc --noEmit` fails here because the `bun` type definitions aren't found. The sandbox also blocked the test…
shipped production is serving it deploy 76ab860
Sign in to join this conversation.
new above
offline
spawnForgenow has two callers:POST /api/v1/forgesand an MCPspawntool. Both plan first, and nothing is created unlessdryRun: falseis sent.test/spawn-api.test.ts(7 tests) passes, along withtest/spawn.test.tsandtest/mcp.test.ts. I did not run the full gate, andbun x tsc --noEmitfails here because thebuntype definitions aren't found. The sandbox also blocked the test server from listening on its socket, so I ran the tests with it disabled.POST /api/v1/forges {name, apps[], crew[], dryRun}takes an rw token and an admin user.dryRundefaults to true and returns the plan fromplanSpawnplus the copied, left-behind and byte preview.dryRun: falsereturns theSpawnedresult: 201 when made, 200 if the child already existed.GET /api/v1/forgeslists the children from the spawn ledger (admin only).spawntool takes the same input and is dry-run by default. An ro token can plan but gets "forbidden" when it triesdryRun: false.docs/MCP.mdanddocs/SPAWN.mdare updated.spawnWords, one status and one sentence perSpawnErrorkind:-
unauthorized: 401 -forbidden: 403 -cross_origin: 403 -invalid: 422 -refused: 409 -exists: 409 -failed: 500scripts/gate.ts. I also addedspawnto the tool list thattest/mcp.test.tsexpects.src/spawn/door.tsso the API and MCP don't duplicate it.src/actions/spawn.tsalso gainedlistChildren, which is more than an export, because the ledger helpers weren't exported.crew[]picks whose briefs travel.I left out subscriptions in this call (the plan's
subscriptionsstay empty), the studio's "+ New forge" button, and any HTTP-levelrodry-run for the API: the endpoint needs rw, as the issue says. Only the MCP letsroplan.To try it:
curl -XPOST -H "authorization: Bearer $RW" -d '{"name":"kid","apps":["alice/notes"]}' $FORGE/api/v1/forgesreturns the plan. Add"dryRun":falseto make the child.🤖 Generated with Claude Code
Closes #577