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

@@ -161,8 +161,9 @@ type UpdateArgs struct {
// Time-based scheduling fields (GH#820)
DueAt *string `json:"due_at,omitempty"` // Relative or ISO format due date
DeferUntil *string `json:"defer_until,omitempty"` // Relative or ISO format defer date
// Gate fields (bd-z6kw: support await_id updates for gate discovery)
AwaitID *string `json:"await_id,omitempty"` // Condition identifier for gates (run ID, PR number, etc.)
// Gate fields
AwaitID *string `json:"await_id,omitempty"` // Condition identifier for gates (run ID, PR number, etc.)
Waiters []string `json:"waiters,omitempty"` // Mail addresses to notify when gate clears
}
// CloseArgs represents arguments for the close operation

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
}