fix(hook): suppress peer list when daemon is unreachable

Fold daemonError into SessionAnnounceOptions so the helper owns the
mutually-exclusive choice between peer list and daemon-down hint. Before
this fix, a session-announce against an unreachable daemon emitted both
"No other mailboxes seen within the last 60 minutes (0 total registered)."
(misleading — the daemon was never asked) AND the daemon-unreachable hint.
Now only the hint appears when the daemon is down.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Mika Kuns
2026-05-20 16:41:24 +02:00
parent efdc752890
commit 307e15b05b
3 changed files with 22 additions and 3 deletions

View File

@@ -260,8 +260,8 @@ program
windowMinutes: opts.peerWindowMinutes,
maxPeers: opts.maxPeers,
watcherCommand: `claude-mailbox watch --block --name ${name}`,
daemonError: daemonError ?? undefined,
});
if (daemonError) lines.push("", daemonError);
lines.push("");
process.stdout.write(lines.join("\n"));
});