feat: Standardize agent bead naming to prefix-rig-role-name (gt-zvte2)
Implements canonical naming convention for agent bead IDs: - Town-level: gt-mayor, gt-deacon (unchanged) - Rig-level: gt-<rig>-witness, gt-<rig>-refinery (was gt-witness-<rig>) - Named: gt-<rig>-crew-<name>, gt-<rig>-polecat-<name> (was gt-crew-<rig>-<name>) Changes: - Added AgentBeadID helper functions to internal/beads/beads.go - Updated all ID generation call sites to use helpers - Fixed session parsing in theme.go, statusline.go, agents.go - Updated doctor check and fix to use canonical format - Updated tests for new format 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/steveyegge/gastown/internal/beads"
|
||||
"github.com/steveyegge/gastown/internal/constants"
|
||||
"github.com/steveyegge/gastown/internal/keepalive"
|
||||
"github.com/steveyegge/gastown/internal/polecat"
|
||||
@@ -327,7 +328,7 @@ func (d *Daemon) ensureWitnessesRunning() {
|
||||
|
||||
// ensureWitnessRunning ensures the witness for a specific rig is running.
|
||||
func (d *Daemon) ensureWitnessRunning(rigName string) {
|
||||
agentID := "gt-witness-" + rigName
|
||||
agentID := beads.WitnessBeadID(rigName)
|
||||
sessionName := "gt-" + rigName + "-witness"
|
||||
|
||||
// Check agent bead state (ZFC: trust what agent reports)
|
||||
@@ -374,7 +375,7 @@ func (d *Daemon) pokeWitnesses() {
|
||||
|
||||
// pokeWitness sends a heartbeat to a specific rig's witness.
|
||||
func (d *Daemon) pokeWitness(rigName string) {
|
||||
agentID := "gt-witness-" + rigName
|
||||
agentID := beads.WitnessBeadID(rigName)
|
||||
sessionName := "gt-" + rigName + "-witness"
|
||||
|
||||
// Check agent bead state (ZFC: trust what agent reports)
|
||||
|
||||
Reference in New Issue
Block a user