feat(hook): add TaskCompleted drain + multi-event install-hook

Wire a fifth pull hook so peer messages also surface between todo
items, not only at user prompts and subagent stops. While here,
extend the manual `install-hook` CLI so it patches the full plugin
hook set (SessionStart/UserPromptSubmit/SubagentStop/TaskCompleted/
SessionEnd) instead of only UserPromptSubmit, mirroring what the
plugin's hooks.json registers. Mailbox name is auto-derived from
stdin, so --name is no longer required.

Also corrects stale docs that claimed SessionStart auto-bootstraps
the watcher — push delivery has been opt-in since the
mailbox-collaborate skill landed.
This commit is contained in:
Mika Kuns
2026-05-27 11:23:19 +02:00
parent 840a3e32c8
commit 3ebf54e75d
7 changed files with 187 additions and 72 deletions

View File

@@ -191,7 +191,7 @@ claude-mailbox watch --block --name <mailbox> [--timeout 25]
claude-mailbox list
claude-mailbox status
claude-mailbox session-announce # hook helper, reads stdin JSON
claude-mailbox install-hook --name <mailbox> [--user|--project]
claude-mailbox install-hook [--user|--project] [--url <url>]
claude-mailbox uninstall-hook [--user|--project]
```