Notifications: agent notify reaches every device and clears everywhere

- Server: chat ntfy messages carry a sequence id derived from their app id;
  clearing a chat app notification also clears it in ntfy (PUT
  /<topic>/<seq>/clear, verified on ntfy v2.38.1).
- Server: a turn that sent an agent notify does not also send chat_reply.
- notify tool and MCP instructions: Pipelines already notifies at reply end
  and for questions/approvals; notify is for mid-turn or background news.
- Shown notify items carry channels (apps/phone); the transcript row says
  where it went.
- App: NotificationBridge.close(tag); web closes tracked Notifications and
  tells other tabs over a BroadcastChannel; native bridge cancels by tag and
  now supports macOS. AgentNotices closes on notifications_cleared and on
  resubscribe cleared ids, and a tap sends clear_notifications.
- Docs: skill, chat reference, ntfy/notifications docs, app note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-02 19:43:55 +00:00
parent c441400f36
commit b91ef04ab0
32 changed files with 743 additions and 73 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ operator's home (absolute, `~/...`, or relative to the chat's directory).
| `show_image` | `url_or_path`, `title?`, `alt?` | A home `image/*` file or an `https://` URL (no credentials, at most 2048 chars). |
| `show_html` | `html`, `title?`, `height_hint?` (120-600) | Self-contained HTML/SVG: diagrams, charts, tables. Sandboxed: no JavaScript, no network; inline CSS/SVG, `<details>`, `:hover`. Refused above 512 KiB. |
| `show_diff` | `path?`, `base?`, `committed_only?`, `title?` | A Git diff card when the operator asks to see the changes, or before submitting a pull request. No `base`: uncommitted work (staged, unstaged, untracked) against HEAD. `base` (e.g. `main`): everything since the merge base, which is what a PR contains, plus uncommitted work unless `committed_only`. Pipelines runs Git; do not paste the diff. |
| `notify` | `title`, `message`, `priority?` | A phone push that opens this chat. Only when the operator must look now (long task done, blocked on them). 5 per minute per chat; undelivered sends report why. |
| `notify` | `title`, `message`, `priority?` | A notification on every Pipelines app the operator is signed in to (web tabs, desktop, Android) and their phone (ntfy); a tap opens this chat. Opening the chat, or tapping or dismissing it on any device, clears it on all of them. Pipelines already notifies when the reply ends and for questions and approvals, so use it only for news mid-turn or after background work the turn does not wait for; a turn that notified sends no separate "replied" notification. 5 per minute per chat; the result says where it went, and undelivered sends report why. |
`show_diff` lists at most 300 files; a file patch over 256 KiB or a total over
1 MiB is shown partially and says so; binaries have no patch; renames show as