fix(mail): use slash-based identity format for addresses
Changes mail identity format from hyphenated (gastown-Toast) to slash-based (gastown/polecats/Toast) to: - Match directory structure (REST-like) - Distinguish from hyphenated bead IDs (gt-xyz) and molecule names Updated: - addressToIdentity(): preserve slashes instead of replacing with dashes - identityToAddress(): simplified, identity == address now - detectSender(): include /polecats/ in polecat addresses - Tests updated for new format Closes gt-cxtu: shared beads architecture verified working. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -554,14 +554,14 @@ func detectSender() string {
|
||||
return "mayor/"
|
||||
}
|
||||
|
||||
// If in a rig's polecats directory, extract address
|
||||
// If in a rig's polecats directory, extract address (format: rig/polecats/name)
|
||||
if strings.Contains(cwd, "/polecats/") {
|
||||
parts := strings.Split(cwd, "/polecats/")
|
||||
if len(parts) >= 2 {
|
||||
rigPath := parts[0]
|
||||
polecatPath := strings.Split(parts[1], "/")[0]
|
||||
rigName := filepath.Base(rigPath)
|
||||
return fmt.Sprintf("%s/%s", rigName, polecatPath)
|
||||
return fmt.Sprintf("%s/polecats/%s", rigName, polecatPath)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user