refactor: update managers to use RoleEnvVars

Consolidates all role startup code to use the shared RoleEnvVars()
function, ensuring consistent env vars across tmux SetEnvironment
and Claude startup command exports.

Updated:
- Mayor manager
- Deacon startup (daemon.go)
- Witness manager
- Refinery manager
- Polecat startup (daemon.go)
- BuildPolecatStartupCommand, BuildCrewStartupCommand helpers

This ensures all agents receive the same identity env vars regardless
of startup path.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
julianknutsen
2026-01-07 13:08:59 -08:00
committed by Steve Yegge
parent 2343e6b0ef
commit 7150ce2624
5 changed files with 40 additions and 59 deletions
+5 -2
View File
@@ -94,8 +94,11 @@ func (m *Manager) Start(agentOverride string) error {
}
// Set environment variables (non-fatal: session works without these)
_ = t.SetEnvironment(sessionID, "GT_ROLE", "mayor")
_ = t.SetEnvironment(sessionID, "BD_ACTOR", "mayor")
// Use shared RoleEnvVars for consistency across all role startup paths
envVars := config.RoleEnvVars("mayor", "", "")
for k, v := range envVars {
_ = t.SetEnvironment(sessionID, k, v)
}
// Apply Mayor theming (non-fatal: theming failure doesn't affect operation)
theme := tmux.MayorTheme()