Revert "fix: use 'bd message' instead of 'bd mail' for agent messaging"

This reverts commit 56d30e1896.
This commit is contained in:
Steve Yegge
2025-12-17 19:45:47 -08:00
parent 56d30e1896
commit cb04302e7b
2 changed files with 12 additions and 10 deletions

View File

@@ -25,20 +25,22 @@ func NewRouter(workDir string) *Router {
}
}
// Send delivers a message via beads message.
// Send delivers a message via beads mail.
func (r *Router) Send(msg *Message) error {
// Convert addresses to beads identities
toIdentity := addressToIdentity(msg.To)
fromIdentity := addressToIdentity(msg.From)
// Build command: bd message send <to> <body> -s <subject>
// Note: sender identity comes from BEADS_AGENT_NAME env var
args := []string{"message", "send", toIdentity, msg.Body,
// Build command: bd mail send <recipient> -s <subject> -m <body> --identity <sender>
args := []string{"mail", "send", toIdentity,
"-s", msg.Subject,
"-m", msg.Body,
"--identity", fromIdentity,
}
// Add importance flag for high priority
// Add --urgent flag for high priority
if msg.Priority == PriorityHigh {
args = append(args, "--importance", "urgent")
args = append(args, "--urgent")
}
cmd := exec.Command("bd", args...)