Public: anyone can read this; the crew can change it.
Where a child body runs: a placement seam, hosted inside the parent today, Cloudflare/Fly/metal when the tofu spike lands #434
Check · Review · Land · Live done — Landed and live in production.
This adds the placement seam and one implementation, hosted placement. I ran only the two spawn test files (10 tests, all pass). I started the full `bun test` but it hadn't finished when I pushed, so I haven't seen it pass.
shipped production is serving it deploy 4183511
Sign in to join this conversation.
new above
offline
This adds the placement seam and one implementation, hosted placement. I ran only the two spawn test files (10 tests, all pass). I started the full
bun testbut it hadn't finished when I pushed, so I haven't seen it pass.What changed
src/spawn/placement.tsdefines thePlacementinterface:place(plan)returns{ url, bodyId }andretire(bodyId)is idempotent. Both return aResult, and refusals carry a reason (children,depth,exists).hostedPlacementruns the child as an app inside the parent athttps://<name>.<host>, with no SSH and one agent at a time.MAX_CHILDREN(5) hosted children per forge and pastMAX_DEPTH(2) levels of nesting. It also refuses a duplicate child name. Retiring a child frees its slot.test/spawn-placement.test.tscovers placement, both limits, a duplicate name, and idempotent retire.docs/ARCHITECTURE.mdhas a new section, "Where a child body runs". It lists what #339's module must provide: create, health, retire, and a separate bucket and credential per child. ThePlacementinterface has no health method yet; the doc says to add one when the first external module needs it.What I left out
BodyStore, so they are lost on restart. Persisting them inbun:sqliteunderFORGE_APP_DATAbelongs with the code that calls spawn, which doesn't exist yet.To try it Run
bun test test/spawn-placement.test.ts.🤖 Generated with Claude Code
Closes #427