Parent: #204 | Phase 2: Multi-Agent Orchestration
No major architectural changes — convoys work the same in the container model. Cross-DO communication is unchanged.
Goal
Convoys track batched work across rigs with landing notifications.
Flow
- Mayor (or dashboard) creates convoy via Town DO:
createConvoy(title, beadSpecs[])
- Town DO distributes beads to Rig DOs, recording
convoy_id on each
- When a bead closes, Rig DO notifies Town DO:
onBeadClosed(convoyId, beadId)
- Town DO increments
closed_beads, checks if closed_beads == total_beads
- If landed → update status, fire webhook/notification
Town DO Methods
createConvoy(title, beadSpecs[]) — create convoy, distribute beads
onBeadClosed(convoyId, beadId) — track progress, detect landing
getConvoy(convoyId) — get convoy with progress
listConvoys(filter) — list convoys by status
Rig DO Changes
- On bead close, notify Town DO if bead has a
convoy_id
- Convoy ID stored on beads
Dependencies
- PR 1 (Rig DO)
- PR 9 (Town DO)
Acceptance Criteria
Parent: #204 | Phase 2: Multi-Agent Orchestration
Goal
Convoys track batched work across rigs with landing notifications.
Flow
createConvoy(title, beadSpecs[])convoy_idon eachonBeadClosed(convoyId, beadId)closed_beads, checks ifclosed_beads == total_beadsTown DO Methods
createConvoy(title, beadSpecs[])— create convoy, distribute beadsonBeadClosed(convoyId, beadId)— track progress, detect landinggetConvoy(convoyId)— get convoy with progresslistConvoys(filter)— list convoys by statusRig DO Changes
convoy_idDependencies
Acceptance Criteria