fix: Make ParseAgentBeadID accept any valid prefix (gt-w0fqg)
Agent bead ID validation was hardcoded to only accept "gt-" prefix, which caused errors when spawning beads polecats (which use "bd-" prefix): Error: invalid agent ID: agent ID must start with 'gt-' (got "bd-beads-polecat-pearl") Changed ParseAgentBeadID to accept any 2-3 character prefix (gt-, bd-, hq-) instead of hardcoding "gt-". Updated tests to cover other prefixes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Steve Yegge
parent
e539ea3cc8
commit
12543d1450
@@ -842,9 +842,9 @@ func detectActor() string {
|
||||
}
|
||||
|
||||
// agentIDToBeadID converts an agent ID to its corresponding agent bead ID.
|
||||
// Uses canonical naming: gt-rig-role-name
|
||||
// Agent beads always use "gt-" prefix (required by beads validation).
|
||||
// Only issue beads use rig-specific prefixes.
|
||||
// Uses canonical naming: prefix-rig-role-name
|
||||
// This function uses "gt-" prefix by default. For non-gastown rigs, use the
|
||||
// appropriate *WithPrefix functions that accept the rig's configured prefix.
|
||||
func agentIDToBeadID(agentID string) string {
|
||||
// Handle simple cases (town-level agents)
|
||||
if agentID == "mayor" {
|
||||
|
||||
Reference in New Issue
Block a user