feat(gate): add add-waiter and show commands for phase handoff

- Add `bd gate add-waiter <gate-id> <waiter>` command to register
  agents as waiters on a gate bead using the native Waiters field
- Add `bd gate show <gate-id>` command to display gate details
  including waiters (used by gt gate wake)
- Add Waiters field to UpdateArgs in RPC protocol
- Update server to handle waiters field in updates

This is part of the polecat phase handoff feature (bd-quw1).
The corresponding gastown changes (gt done --phase-complete) are
tracked separately.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
jasper
2026-01-02 16:36:36 -08:00
committed by Steve Yegge
parent a89f47cdf2
commit d7246a1f2d
4 changed files with 227 additions and 18 deletions

View File

@@ -135,10 +135,13 @@ func updatesFromArgs(a UpdateArgs) map[string]interface{} {
if a.EventPayload != nil {
u["event_payload"] = *a.EventPayload
}
// Gate fields (bd-z6kw: support await_id updates for gate discovery)
// Gate fields
if a.AwaitID != nil {
u["await_id"] = *a.AwaitID
}
if len(a.Waiters) > 0 {
u["waiters"] = a.Waiters
}
return u
}