Move the notify_user tool, its prompt, and its framework message out of core tools and prompts, and add the plugin metadata, DOX, and WebUI badge into a dedicated _notify_user plugin so agent notifications ship as a standard plugin. The tool accepts normal and high priority names mapped to the shared notification priority enum, enforces a fixed 30 second toast time instead of an agent-supplied timeout, and logs its message as its own notify_user type with an icon://notifications Notifying user headline rendered through an NTF badge handler. The tool prompt gates notifications to a false or stale user picture: a dropped, replaced, or contradicted strategy, plan, or assumption the user has seen; starts, resumes, continuing, attempts, task end, and goal completion are excluded, and delegated work reports to its parent instead of notifying. The example shows a full request envelope with the title above the message. Validation: pytest tests/test_notify_user_tool.py tests/test_tool_action_contracts.py tests/test_prompt_catalogs.py
1.4 KiB
notify_user
send a notification for chats that run on their own for a longer time
notifications are non-blocking: they inform an absent user, never ask for a decision, never wait
send only when the user's picture of the work became false or stale: a strategy, plan, or assumption the user has seen was dropped, replaced, or contradicted
never send about starting, resuming, continuing, or attempting work
task end and goal completion go to the final response, never here
before sending, name what changed in the user's picture of the work and what comes next; if either is missing, do not send
if your last notification already covered this change, do not send again
if another agent delegated this work, do not send; report back to it instead
write the message so it makes sense without the chat open
notifications supplement, never replace, the final response
args: message required, short self-contained message in plain language
type: info, progress, success, warning, error; defaults to info
priority: normal or high; omit for high
title: optional short label
detail: optional longer supporting text
example:
{
"thoughts": ["Staging is unreachable, so the plan changed."],
"headline": "Notifying strategy change",
"tool_name": "notify_user",
"tool_args": {
"title": "Strategy changed",
"message": "Staging unreachable; using recorded fixtures instead."
}
}