feat: Update agent bead lookups to use correct tier (gt-eqptl)

Implement two-level beads architecture for agent lookups:

- Town-level agents (Mayor, Deacon) now use hq- prefix and are
  looked up in town beads (~/.beads/)
- Rig-level agents continue using rig prefix (e.g., gt-) and are
  looked up in rig beads

Changes:
- Add MayorBeadIDTown(), DeaconBeadIDTown(), DogBeadIDTown() helpers
- Add GetTownBeadsPath() for town beads path resolution
- Update gt status to pre-fetch town-level agent beads
- Update agentIDToBeadID() to use town-level IDs
- Update agent_beads_check.go to check/fix in correct tier
- Update agentAddressToIDs() in deacon.go

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
imperator
2026-01-03 20:57:19 -08:00
committed by Steve Yegge
parent b8250e139f
commit 1532a08aeb
5 changed files with 118 additions and 88 deletions

View File

@@ -11,6 +11,7 @@ import (
"time"
"github.com/spf13/cobra"
"github.com/steveyegge/gastown/internal/beads"
"github.com/steveyegge/gastown/internal/config"
"github.com/steveyegge/gastown/internal/constants"
"github.com/steveyegge/gastown/internal/deacon"
@@ -1118,14 +1119,13 @@ func notifyMayorOfWitnessFailure(townRoot string, zombies []zombieInfo) {
// agentAddressToIDs converts an agent address to bead ID and session name.
// Supports formats: "gastown/polecats/max", "gastown/witness", "deacon", "mayor"
// Note: Town-level agents (Mayor, Deacon) use hq- prefix bead IDs stored in town beads.
func agentAddressToIDs(address string) (beadID, sessionName string, err error) {
switch address {
case "deacon":
sessName := session.DeaconSessionName()
return sessName, sessName, nil
return beads.DeaconBeadIDTown(), session.DeaconSessionName(), nil
case "mayor":
sessName := session.MayorSessionName()
return sessName, sessName, nil
return beads.MayorBeadIDTown(), session.MayorSessionName(), nil
}
parts := strings.Split(address, "/")