@@ -12,6 +12,7 @@ import (
1212 "github.com/spf13/cobra"
1313 "github.com/steveyegge/gastown/internal/beads"
1414 "github.com/steveyegge/gastown/internal/config"
15+ "github.com/steveyegge/gastown/internal/constants"
1516 "github.com/steveyegge/gastown/internal/events"
1617 "github.com/steveyegge/gastown/internal/nudge"
1718 "github.com/steveyegge/gastown/internal/session"
@@ -292,9 +293,9 @@ func runNudge(cmd *cobra.Command, args []string) (retErr error) {
292293 // Expand role shortcuts to session names
293294 // These shortcuts let users type "mayor" instead of "gt-mayor"
294295 switch target {
295- case "mayor" :
296+ case constants . RoleMayor :
296297 target = session .MayorSessionName ()
297- case "witness" , "refinery" :
298+ case constants . RoleWitness , constants . RoleRefinery :
298299 // These need the current rig
299300 roleInfo , err := GetRole ()
300301 if err != nil {
@@ -304,15 +305,15 @@ func runNudge(cmd *cobra.Command, args []string) (retErr error) {
304305 return fmt .Errorf ("cannot determine rig for %s shortcut (not in a rig context)" , target )
305306 }
306307 rigPrefix := session .PrefixFor (roleInfo .Rig )
307- if target == "witness" {
308+ if target == constants . RoleWitness {
308309 target = session .WitnessSessionName (rigPrefix )
309310 } else {
310311 target = session .RefinerySessionName (rigPrefix )
311312 }
312313 }
313314
314315 // Special case: "deacon" target maps to the Deacon session
315- if target == "deacon" {
316+ if target == constants . RoleDeacon {
316317 deaconSession := session .DeaconSessionName ()
317318 // Check if Deacon session exists
318319 exists , err := t .HasSession (deaconSession )
@@ -552,9 +553,9 @@ func resolveNudgePattern(pattern string, agents []*AgentSession) []string {
552553
553554 // Handle special cases
554555 switch pattern {
555- case "mayor" :
556+ case constants . RoleMayor :
556557 return []string {session .MayorSessionName ()}
557- case "deacon" :
558+ case constants . RoleDeacon :
558559 return []string {session .DeaconSessionName ()}
559560 }
560561
@@ -685,9 +686,9 @@ func sessionNameToAddress(sessionName string) string {
685686func addressToAgentBeadID (address string ) string {
686687 // Handle special cases
687688 switch address {
688- case "mayor" :
689+ case constants . RoleMayor :
689690 return session .MayorSessionName ()
690- case "deacon" :
691+ case constants . RoleDeacon :
691692 return session .DeaconSessionName ()
692693 }
693694
@@ -705,9 +706,9 @@ func addressToAgentBeadID(address string) string {
705706 role := parts [1 ]
706707
707708 switch role {
708- case "witness" :
709+ case constants . RoleWitness :
709710 return session .WitnessSessionName (session .PrefixFor (rig ))
710- case "refinery" :
711+ case constants . RoleRefinery :
711712 return session .RefinerySessionName (session .PrefixFor (rig ))
712713 default :
713714 // Assume polecat
0 commit comments