Notify: an agent's notify reaches every connected app

The notify tool now records a chat_notify app notification with its own
id per call (no dedupe of repeated words) and the tool's priority, so
every subscribed client gets it and a reconnecting client replays it.
ntfy delivery is unchanged; the tool result names where it went.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-02 15:44:39 +00:00
parent 3e817a189b
commit c8541f29b7
11 changed files with 195 additions and 47 deletions
+3 -3
View File
@@ -26,7 +26,7 @@ func IsTool(name string) bool {
const Instructions = "These tools act on Pipelines, the app the operator reads this chat in, not on your workspace. " +
"Use show_file / show_image instead of telling the operator a path to open, show_html for diagrams, charts or small visual views, " +
"show_diff when the operator asks to see changes or a diff (for example before submitting a pull request), " +
"and notify only when the operator should look at their phone now. " +
"and notify only when the operator should look at Pipelines now (it reaches their open Pipelines apps and their phone). " +
"Your thinking is not shown to the operator: before asking them a question (for example with AskUserQuestion), " +
"write what you found and why you are asking as a normal message, because the question form shows only the question and its options."
@@ -108,8 +108,8 @@ func definitions() []toolDefinition {
},
{
Name: ToolNotify,
Title: "Notify the operator's phone",
Description: "Send a push notification to the operator's phone that opens this chat when tapped. " +
Title: "Notify the operator",
Description: "Send a notification to the operator's open Pipelines apps (web, desktop) and their phone; it opens this chat when tapped. " +
"Use it sparingly, for things they should know now (a long task finished, you are blocked on them). " +
"Limited to 5 per minute per chat. Returns whether delivery was accepted.",
InputSchema: objectSchema([]string{"title", "message"}, map[string]any{