Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

## 0.5.58 (2026-11-03)

- **`agentmbx send --to a --to b` delivers to everyone (T769).** A repeated `--to` kept only the last value: the send exited 0, printed one delivery and silently dropped the other recipients. axiom-lead lost five owner-priority tasks this way on 2026-11-02. Every `--to` now counts, alone or mixed with comma lists.

## 0.5.57 (2026-11-02)

- **Unanswered mail reaches someone even without a project lead (T768, owner decision 2026-11-02).** The 2-hour alert from 0.5.56 went only to a project lead, and most projects have none, so it told nobody. Now, when an agent has no other lead (its project has none, or it is the lead), each sender gets one alert naming only its own unanswered messages. A backlog longer than 20 messages is reported across sweeps, and each message is named exactly once (0.5.56 named only the first 10 of each alert).
Expand Down
6 changes: 5 additions & 1 deletion dist/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ async function run(argv) {
return launchClaude(rest); // every argument belongs to Claude Code: parse nothing here
const { values: o, positionals: pos } = parseArgs({ args: rest, allowPositionals: true, strict: cmd !== "hook" && cmd !== "mcp", options: {
help: { type: "boolean", short: "h" }, force: { type: "boolean" },
as: { type: "string" }, to: { type: "string" }, subject: { type: "string" }, m: { type: "string", short: "m" },
as: { type: "string" }, to: { type: "string", multiple: true }, subject: { type: "string" }, m: { type: "string", short: "m" },
"body-file": { type: "string" }, "idempotency-key": { type: "string" }, kind: { type: "string" }, origin: { type: "string" }, schema: { type: "string" }, "reply-to": { type: "string" }, "needs-reply": { type: "boolean" }, urgent: { type: "boolean" }, "on-behalf-of": { type: "string" }, "new-mailbox": { type: "boolean" },
ref: { type: "string", multiple: true }, all: { type: "boolean" }, json: { type: "boolean" }, note: { type: "string" },
context: { type: "string" }, payload: { type: "string" }, source: { type: "string", multiple: true },
Expand All @@ -404,6 +404,10 @@ async function run(argv) {
} });
if (o.help)
return console.log(commandHelp(cmd));
// T769: a repeated --to used to keep only the last value (exit 0, other recipients silently dropped). Every --to
// counts: they join into the documented comma list that the rest of the CLI reads.
if (Array.isArray(o.to))
o.to = o.to.join(",");
const str = (k) => (typeof o[k] === "string" ? o[k] : undefined);
if (cmd === "mcp")
return runMcp();
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "agentmbx",
"version": "0.5.57",
"version": "0.5.58",
"description": "AgentMBX: signed messages between AI coding agents (Claude, Codex, Kimi, OpenCode, Hermes, Antigravity) on one machine and across a LAN, with wake-up adapters and an owner-authority master agent.",
"type": "module",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion plugins/claude/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "agentmbx",
"version": "0.5.57",
"version": "0.5.58",
"description": "Renders this Claude Code session's AgentMBX status. It does not compute status itself.",
"author": {
"name": "AgentMBX"
Expand Down
5 changes: 4 additions & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ async function run(argv: string[]) {
if (cmd === "claude") return launchClaude(rest); // every argument belongs to Claude Code: parse nothing here
const { values: o, positionals: pos } = parseArgs({ args: rest, allowPositionals: true, strict: cmd !== "hook" && cmd !== "mcp", options: {
help: { type: "boolean", short: "h" }, force: { type: "boolean" },
as: { type: "string" }, to: { type: "string" }, subject: { type: "string" }, m: { type: "string", short: "m" },
as: { type: "string" }, to: { type: "string", multiple: true }, subject: { type: "string" }, m: { type: "string", short: "m" },
"body-file": { type: "string" }, "idempotency-key": { type: "string" }, kind: { type: "string" }, origin: { type: "string" }, schema: { type: "string" }, "reply-to": { type: "string" }, "needs-reply": { type: "boolean" }, urgent: { type: "boolean" }, "on-behalf-of": { type: "string" }, "new-mailbox": { type: "boolean" },
ref: { type: "string", multiple: true }, all: { type: "boolean" }, json: { type: "boolean" }, note: { type: "string" },
context: { type: "string" }, payload: { type: "string" }, source: { type: "string", multiple: true },
Expand All @@ -364,6 +364,9 @@ async function run(argv: string[]) {
deadline: { type: "string" }, "require-idle-wake": { type: "boolean" }, "exclude": { type: "string" }, plan: { type: "boolean" },
"base-url": { type: "string" }, "no-browser": { type: "boolean" } } });
if (o.help) return console.log(commandHelp(cmd));
// T769: a repeated --to used to keep only the last value (exit 0, other recipients silently dropped). Every --to
// counts: they join into the documented comma list that the rest of the CLI reads.
if (Array.isArray(o.to)) (o as Record<string, unknown>).to = (o.to as string[]).join(",");
const str = (k: string) => (typeof (o as Record<string, unknown>)[k] === "string" ? (o as Record<string, unknown>)[k] as string : undefined);

if (cmd === "mcp") return runMcp();
Expand Down
22 changes: 22 additions & 0 deletions test/cli-repeated-to.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// T769: `agentmbx send --to a --to b` kept only the last --to (exit 0, one delivery, the others silently dropped).
import { test } from "node:test";
import assert from "node:assert/strict";
import { spawnSync } from "node:child_process";
import { mkdtempSync, rmSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { MbxNode } from "../src/node.ts";

test("T769: every repeated --to is a recipient, alone or mixed with comma lists", (t) => {
const home = mkdtempSync(join(tmpdir(), "mbx-t769-")), n = new MbxNode(home, { host: "alpha" });
t.after(() => { n.close(); rmSync(home, { recursive: true, force: true, maxRetries: 10, retryDelay: 100 }); });
for (const a of ["sender", "fixer", "accountant", "optimizer", "secretary"]) n.registerAgent(a);
const bin = join(import.meta.dirname, "../bin/agentmbx.js");
const env = { ...process.env, AGENTMBX_DEV: "1", MBX_HOME: home, MBX_NO_DESKTOP: "1" } as Record<string, string>;
const r = spawnSync(process.execPath, [bin, "send", "--as", "sender", "--to", "fixer", "--to", "accountant,optimizer", "--to", "secretary",
"--kind", "task", "--subject", "x", "-m", "y"], { env, encoding: "utf8" });
assert.equal(r.status, 0, r.stderr);
const id = (n.store.db.prepare("SELECT id FROM messages WHERE from_addr LIKE 'sender@%'").get() as { id: string }).id;
const got = (n.store.db.prepare("SELECT agent FROM deliveries WHERE msg_id=? ORDER BY agent").all(id) as { agent: string }[]).map((d) => d.agent);
assert.deepEqual(got, ["accountant", "fixer", "optimizer", "secretary"]);
});
Loading