You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(gastown): add staged convoys for plan-review-iterate workflow (#1077)
* feat(gastown): add staged convoys for plan-review-iterate workflow
Adds staged mode to convoys so users can plan work before executing.
gt_sling_batch gains a staged param that creates convoy + beads without
hooking agents. New gt_convoy_start tool transitions staged convoys to
open, triggering agent dispatch. Dashboard shows staged convoys with
draft visual state and a Start button. Mayor prompt updated with staged
convoy instructions.
Closes#1006
* fix(gastown): resolve TS2589 deep type instantiation in handleMayorConvoyStart
* fix(gastown): handle null agents in staged convoys and exclude staged convoys from deacon patrol
SlingBatchResult.agent is null for staged convoys since agents aren't
assigned until gt_convoy_start. The gt_sling_batch tool now handles this
gracefully instead of crashing on b.agent.name.
feedStrandedConvoys now joins convoy_metadata and filters on staged=0 so
the deacon patrol doesn't auto-assign agents to staged convoy beads.
* feat(gastown): add convoy drawer UI with staged indicator and start button
- Add staged field to ConvoyOutput tRPC schema
- Add startConvoy tRPC mutation
- Add convoy ResourceRef type to DrawerStack
- Create ConvoyPanel drawer with DAG wave layout, metadata, and start button
- Update ConvoyTimeline with staged badge, clickable title to open drawer,
and inline start button for staged convoys
- Wire startConvoy mutation in TownOverviewPageClient and RigDetailPageClient
- Fix convoy_id -> id field in dashboard.ui.ts (PR review comment)
- Regenerate gastown tRPC type declarations
* feat(gastown): add staged_convoys_default town setting
Adds a town-level config toggle that forces all convoys to be created
in staged mode by default. When enabled, the mayor must explicitly
start each convoy before agents are dispatched.
- Add staged_convoys_default to TownConfigSchema (default: false)
- slingConvoy resolves staged as input.staged ?? config.staged_convoys_default
- Add Switch toggle in town settings UI under new Convoys section
- Add field to admin router TownConfigRecord
* fix(gastown): address PR review feedback on staged convoys
- Fix duplicate mayorToken DOM id in dashboard convoy panel (use convoyMayorToken)
- Remove 'staged' from Convoy status enum in container plugin types
(staging is tracked by the boolean field, not status)
- Re-read bead after hookBead in startConvoy so assignee is up to date
- Change convoy.created to convoy.started event in startConvoy
* fix(gastown): address PR review feedback round 3
- Use result.convoy.staged instead of args.staged in gt_sling_batch
so tool output reflects actual server state (respects town config default)
- Add getConvoy tRPC query so ConvoyPanel uses a by-id query instead of
filtering listConvoys (drawer no longer breaks when convoy lands)
- Emit convoy.created event in slingConvoy so batch-created convoys
appear in the activity feed/analytics
- Fix prettier formatting on generated .d.ts files
* fix(gastown): move staged flag clear to after agent-hooking loop
startConvoy now clears the staged flag only after all agents are
successfully hooked. If getOrCreateAgent or hookBead throws partway
through, the convoy remains staged so the caller can safely retry.
* fix(gastown): make startConvoy retry-safe by skipping already-hooked beads
If startConvoy throws after hooking some beads, the convoy stays staged
for retry. On retry, skip beads that already have an assignee to avoid
duplicate hooks and orphaned agents.
0 commit comments