Revert "fix: use 'bd message' instead of 'bd mail' for agent messaging"
This reverts commit 56d30e1896.
This commit is contained in:
@@ -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...)
|
||||
|
||||
Reference in New Issue
Block a user