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>
This commit is contained in:
@@ -140,7 +140,7 @@ func TestSkillUpgradeAddsSelfContainedNotificationReference(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for _, want := range []string{"on=failure", "on=success,failure", "destination=system", "cancellation", "output.markdown"} {
|
||||
for _, want := range []string{"on=failure", "on=success,failure", "cancellation", "link=", "type=ntfy"} {
|
||||
if !strings.Contains(string(data), want) {
|
||||
t.Fatal("missing local recipe", want)
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ regenerate, or a file you rewrote.
|
||||
| `show_run` | `run_id`, `title?`, `replace?` | A live card for a run: pipeline, title, status, current stage, duration; it updates as the run progresses and opens the run when tapped. |
|
||||
| `schedule_followup` | `message`, and `at?` or `after_minutes?`, or `run_id?` with `on?` | Queue a prompt to yourself in this chat: 1 minute to 7 days ahead (`at` is RFC 3339), or when run `run_id` reaches `on`: `finished` (default; it ended) or `attention` (it waits on a human decision, or ended), delivered after 7 days at the latest with the run's state appended. A run that already meets `on` is refused (act on it now). It is a scheduled message from "Agent follow-up" the operator can remove; it does not hold the operator's own messages back, and is delivered when the chat is free. At most 3 pending per chat. The result names the follow-up id and lists the pending ones. Do not wait for it in the current turn. |
|
||||
| `cancel_followup` | `id` | Remove one of this chat's undelivered follow-ups by the id `schedule_followup` returned; the result lists those still pending. |
|
||||
| `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. |
|
||||
| `notify` | `title`, `message`, `priority?` | A notification on every Pipelines app the operator is signed in to (web tabs, desktop, Android, iOS); 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
|
||||
|
||||
@@ -233,7 +233,8 @@ library (`pipelines skills list`), one per line: `name` loads the latest version
|
||||
at run start, `name@N` pins version N. An empty or missing block loads none.
|
||||
Drafts and publications are rejected for an unknown skill, a missing version,
|
||||
`@0`/non-numeric versions, a skill listed twice (pinned or not) and a `skills`
|
||||
block on a human or ntfy stage.
|
||||
block on a human stage. `type=ntfy` stages were removed and are rejected; use
|
||||
a stage `notify` hook instead.
|
||||
|
||||
```skills
|
||||
review-checklist
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# Notification authoring
|
||||
|
||||
Use the server's existing system phone connection. Never read, copy or request
|
||||
tokens/passwords, edit server settings, or call curl to publish while 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.
|
||||
|
||||
@@ -11,8 +12,8 @@ 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. Delivery failures are audited
|
||||
separately and do not turn a successful stage into failure.
|
||||
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:
|
||||
|
||||
@@ -45,35 +46,25 @@ can send repeated events. Inspect routing; explain these limits rather than prom
|
||||
exactly one final notification for every possible termination. Do not reroute
|
||||
failures through a successful publisher and accidentally turn failure into success.
|
||||
|
||||
## Attachments only when requested
|
||||
## Opening an artifact or a link
|
||||
|
||||
Omit `artifacts` for an event-only alert. `artifacts=markdown` attaches a nonempty
|
||||
string in `output.markdown`; a field named `report` is not automatically attached.
|
||||
Only add/rename output fields and corresponding prompts if a report attachment is
|
||||
requested, preserving downstream handoffs. If no attachment is produced (including
|
||||
on execution error), an event-only notification is still attempted.
|
||||
|
||||
`artifacts=files` attaches the workspace-relative paths in `output.artifacts`;
|
||||
`artifacts=markdown,files` selects both. Each file gets its own notification, so
|
||||
attachments may mean more than one message. Files must be regular, nonsymlinked,
|
||||
at most 1 MiB, with at most 10 listed. Absolute/traversal/hidden paths, `secrets/`,
|
||||
database/key paths and `node_modules/` are rejected. This is not content scanning.
|
||||
Do not promise phone reception from structural validation.
|
||||
`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. This is separate from ntfy's `artifacts=` keys.
|
||||
produce no attached artifact.
|
||||
|
||||
`link=<pattern>` makes a tap on the phone notification (ntfy and app) 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 (ntfy uses the link only when `PIPELINES_WEB_PUBLIC_URL` gives it a
|
||||
browser run view), 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
|
||||
`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:
|
||||
|
||||
```notify
|
||||
@@ -81,40 +72,16 @@ on=success
|
||||
link=standup-link.txt
|
||||
```
|
||||
|
||||
## Optional explicit delivery stage
|
||||
## No delivery stage
|
||||
|
||||
Use native delivery only when the user needs delivery as an explicit routed stage
|
||||
(e.g. delivery failure must fail the run), not for an ordinary completion alert.
|
||||
The preceding stage must output nonempty UTF-8 strings `title`, `summary`, and
|
||||
`markdown`. Title/summary are single-line, at most 256/2048 bytes; Markdown is at
|
||||
most 1 MiB. The native stage does not accept model prompts or tools and does not
|
||||
need an output block:
|
||||
|
||||
````markdown
|
||||
# stage publish
|
||||
|
||||
```configs
|
||||
type=ntfy
|
||||
destination=system
|
||||
```
|
||||
|
||||
```edges
|
||||
success -> #success
|
||||
error -> #failure
|
||||
```
|
||||
````
|
||||
|
||||
`destination=system` uses the server's existing system connection. Native delivery
|
||||
adds retained delivery metadata on success and follows its error edge on failure.
|
||||
Neither hooks nor native delivery automatically retry ambiguous publishes; a new
|
||||
run or repeated visit can send again. An upstream execution error does not reliably
|
||||
produce the required three strings, so adding this stage alone cannot cover it.
|
||||
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 publishes one run-level attention
|
||||
notification to the same already-configured `system` destination when a run needs a
|
||||
person: when it enters `waiting` (a human stage asked for a decision), or when it
|
||||
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
|
||||
@@ -124,19 +91,13 @@ 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. When the operator configures
|
||||
`PIPELINES_WEB_PUBLIC_URL` on the server, run notifications and stage hooks carry
|
||||
the authenticated web link `<origin>/runs/<id>`. Native installs default this to
|
||||
their advertised web address; custom/VPN domains require the operator's actual
|
||||
phone-reachable URL. Never use the API listener or ntfy URL, nor put credentials
|
||||
in the click link. Existing Android-only installations without that setting keep
|
||||
`pipelines://run/<id>`. Invalid origins omit the link and log a warning. Existing
|
||||
delivered alerts are not rewritten. Do not change service settings or send a test
|
||||
notification merely to author a workflow. A run that stays waiting is not
|
||||
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 delivery failure is logged, never fails the run, and is not retried.
|
||||
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
|
||||
|
||||
@@ -4,7 +4,7 @@ Pipelines turns a reusable process into sequential stages with explicit handoffs
|
||||
outcome routing and retained evidence. A Go CLI/TUI and the Pipelines app connect
|
||||
to an execution server; the server owns execution and SQLite history, the stage's
|
||||
harness (OpenCode, Claude Code or Pi) owns model/tool sessions, operator chats
|
||||
run on OpenCode, Claude Code or Codex, and optional ntfy delivers notifications. It is technology-neutral, not a
|
||||
run on OpenCode, Claude Code or Codex, and the server delivers notifications to the Pipelines apps. It is technology-neutral, not a
|
||||
parallel/distributed task engine or a guarantee that model reports are correct.
|
||||
|
||||
## Lifecycle and location
|
||||
@@ -54,8 +54,7 @@ inputs/outputs, status/errors, audit transcripts, session ownership/references,
|
||||
reported per-stage model usage (tokens/cost), retry links, schedules/state,
|
||||
notification receipts and file changes. Not everything
|
||||
is in that database: drafts/settings are client files; complete OpenCode sessions
|
||||
and credentials use OpenCode storage; repository artifacts are files; ntfy has its
|
||||
own storage. A pipeline ZIP is not a full backup of these components.
|
||||
and credentials use OpenCode storage; repository artifacts are files. A pipeline ZIP is not a full backup of these components.
|
||||
Never merge or sync live SQLite files using generic file synchronization. Do not
|
||||
delete databases, sessions, volumes or credentials to repair a workflow.
|
||||
|
||||
@@ -162,7 +161,7 @@ source-built test binaries, draft/publication/transfer and restart persistence w
|
||||
inference, notifications or deployment. It is not a live-provider or phone test.
|
||||
That is a developer test fixture, not the native installer. End-user installation
|
||||
runs natively through `./install` by default (`scripts/setup-native.py`, with
|
||||
`--native` equivalent); the Docker server + ntfy installation is explicit with
|
||||
`--native` equivalent); the Docker server installation is explicit with
|
||||
`./install --docker`.
|
||||
|
||||
## Retained stage file changes
|
||||
|
||||
@@ -19,8 +19,8 @@ overwritten. A ZIP includes versioned manifest/checksums, names and pinned Markd
|
||||
definitions. Exported version numbers are provenance, not portable database IDs.
|
||||
|
||||
**Definition transfer is not full backup or database synchronization.** No older
|
||||
versions, run history/diffs, drafts, repository files, provider credentials or ntfy
|
||||
storage/settings are included. Archives are private files, not encrypted; prompts
|
||||
versions, run history/diffs, drafts, repository files, provider credentials or
|
||||
notification settings are included. Archives are private files, not encrypted; prompts
|
||||
can contain secrets. Limits are 1,000 definitions, 1 MiB each, 32 MiB total source.
|
||||
|
||||
## Import and existing-name conflicts
|
||||
|
||||
Reference in New Issue
Block a user