Files
pipelines/internal/author/skill/references/notifications.md
T
alan fc7dbb0ac0 Remove ntfy: notifications go only through the app notification stream
Server: drop ntfy publishing (stage hooks, run outbox, chat attention, chat
tool notify, auto-switch and schedule notices), the chat push outbox (its
table is dropped at startup), ntfy status/endpoints and PIPELINES_NTFY_*.
The app_notifications stream, subscribe/clear and kinds are unchanged.
Notification settings keep run_finished/chat_needs_you/chat_reply_finished;
ntfy_enabled is accepted and ignored and its stored row is never read.

Stage type=ntfy is rejected: "ntfy stages were removed; notifications go to
the Pipelines apps — use the stage notify hook". The notify hook remains.

Installer: no ntfy build, accounts, config or supervisor child; manifest
gets top-level "mode" (legacy ntfy.mode still read). Reinstall retires an
old ntfy (safe PID-file stop, deletes binary, config, data dir, token, log,
with a note in logs/install.log); uninstall cleans leftovers.

App: ntfy settings section replaced by "Notification events"; texts updated.
Docs: docs/ntfy.md folded into docs/notifications.md; install, docker, cli,
author skill references updated; security review M1 marked resolved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 23:24:24 +00:00

5.3 KiB

Notification authoring

Notifications go to the operator's signed-in Pipelines apps (web, Android, iOS, macOS) through the server's own notification stream; there is nothing to configure. Never edit server settings or call curl to publish while authoring. Validation is not delivery. Do not send a test notification or run the workflow without explicit approval.

Default: hooks, not extra stages

A fenced notify block belongs inside an existing stage. on accepts success, failure, or success,failure — not error. A failure means an execution error, the error outcome, or a route to #failure; other completed outcomes are success. Hooks send stage events, not a separate run-finished event. They leave the graph, handoffs, tools, model and run verdict unchanged. A notification problem is audited separately and does not turn a successful stage into failure.

For the common sequential workflow whose failure/blocked edges terminate:

  • Add failure-only hooks to intermediate stages.
  • Add success and failure hooks to the final stage(s).
  • Do not add intermediate success hooks: that would send extra progress alerts.

For research → report, with blocked/error edges to #failure, add this to research (leave its success edge to report unchanged):

on=failure

And this to report:

on=success,failure

This produces one event on normal terminal paths: research failure, report failure, or report success. No new output fields, prompts, native stages or model calls are needed. Preserve the definition's existing model IDs and version guards.

Limits: hooks run after stage completion and before final run status is saved. They are not a guaranteed finalizer for cancellation, process crashes, persistence failures or runtime step/visit limits. If an intermediate error is routed to recovery instead of #failure, its failure hook fires before that recovery completes. Loops can send repeated events. Inspect routing; explain these limits rather than promise exactly one final notification for every possible termination. Do not reroute failures through a successful publisher and accidentally turn failure into success.

artifacts= (and destination=) lines in older definitions still parse but do nothing: they configured ntfy attachments, and ntfy was removed. Do not add them.

open=<pattern> attaches one artifact from the run's shared public/ directory to the app notification and makes its tap open that artifact. The pattern is a relative glob with no absolute path, .., or hidden path segment; if several files match, the most recently modified file wins. Without open=, exactly one regular file in public/ is attached automatically. Zero or multiple files produce no attached artifact.

link=<pattern> makes a tap on the notification open a URL the stage produced, such as a published doc. The pattern follows the open= rules; the matched file's first non-empty line must be an absolute http(s) URL without credentials or fragment. The run stays reachable from the notification's run action, and open= still attaches its artifact; the link file itself is never attached. A missing file or invalid URL keeps the usual tap target and is noted on the notification receipt:

on=success
link=standup-link.txt

No delivery stage

The former type=ntfy delivery stage was removed. Validation rejects it with "ntfy stages were removed; notifications go to the Pipelines apps — use the stage notify hook". Use a notify hook on the stage whose result matters.

Automatic run-attention notifications

Independently of any notify block, the server records one run-level attention notification when a run needs a person: when it enters waiting (a human stage asked for a decision), or when it has an unexpected failure or interruption. A deliberate route to #failure with its reason is recorded as an expected failure: it remains in Runs but does not notify or appear in Needs you. Explicit run_finished/on completion notifications still include expected failures. An auto-mode run always notifies unexpected failure/interruption; a successful auto-mode run notifies only when the operator enables run_finished. Runs marked on notify at completion, while off disables these notifications. Queued and running runs send nothing. You do not author these; they are the operator default, so a run you never wired still reaches the operator.

The payload names the run and its pipeline; a tap opens the run in the app. Do not change service settings or send a test notification merely to author a workflow. A run that stays waiting is not republished on a read or restart, and a stage notify policy that already covers the same event (on=waiting, or a failure hook) suppresses the run-level default, so one genuine event means one notification. A notification problem is logged and never fails the run.

The app shows the same information in one attention surface ordered by importance: a run waiting for a decision, then a failed run, then a run that finished since the operator last looked. It is derived from the run events the server already pushes (no extra request), an entry clears when the run is resolved or the operator opens it, and it can be deliberately dismissed. It is not a new place to start a run.