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:
Steve Yegge
2025-12-21 14:27:58 -08:00
parent 00612f6949
commit a3da3302a3
4 changed files with 28 additions and 51 deletions

View File

@@ -20,7 +20,7 @@ var (
// Mailbox manages messages for an identity via beads.
type Mailbox struct {
identity string // beads identity (e.g., "gastown-Toast")
identity string // beads identity (e.g., "gastown/polecats/Toast")
workDir string // directory to run bd commands in
beadsDir string // explicit .beads directory path (set via BEADS_DIR)
path string // for legacy JSONL mode (crew workers)