Some checks failed
CI / check (push) Failing after 17m48s
- Remove 'index 0000000..1111111' lines that made patches appear as new files - Fix hunk line counts in several patches - Add missing leading spaces to blank context lines - Temporarily disable statusline optimization patch (needs regenerating) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
36 lines
1.0 KiB
Diff
36 lines
1.0 KiB
Diff
diff --git a/internal/mail/router.go b/internal/mail/router.go
|
|
--- a/internal/mail/router.go
|
|
+++ b/internal/mail/router.go
|
|
@@ -330,8 +330,29 @@ func agentBeadToAddress(bead *agentBead) string {
|
|
}
|
|
|
|
// Handle gt- prefixed IDs (legacy format)
|
|
- if !strings.HasPrefix(id, "gt-") {
|
|
- return "" // Not a valid agent bead ID
|
|
+ // Handle rig-specific prefixes: <prefix>-<rig>-<role>-<name>
|
|
+ // Examples: j-java-crew-americano -> java/crew/americano
|
|
+ idParts := strings.Split(id, "-")
|
|
+ if len(idParts) >= 3 {
|
|
+ for i, part := range idParts {
|
|
+ if part == "crew" || part == "polecat" || part == "polecats" {
|
|
+ if i >= 1 && i < len(idParts)-1 {
|
|
+ rig := idParts[i-1]
|
|
+ name := strings.Join(idParts[i+1:], "-")
|
|
+ return rig + "/" + part + "/" + name
|
|
+ }
|
|
+ }
|
|
+ if part == "witness" || part == "refinery" {
|
|
+ if i >= 1 {
|
|
+ return idParts[i-1] + "/" + part
|
|
+ }
|
|
+ }
|
|
+ }
|
|
+ }
|
|
+
|
|
+ // Handle gt- prefixed IDs (legacy format)
|
|
+ if !strings.HasPrefix(id, "gt-") {
|
|
+ return "" // Not a valid agent bead ID
|
|
}
|
|
|
|
// Strip prefix
|