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:
+69
-28
@@ -17,11 +17,10 @@ them, and it stops naming whatever is missing.
|
||||
|
||||
| Tool | Why |
|
||||
| --- | --- |
|
||||
| Go (version in `go.mod`, currently 1.27) | builds `pipelines-server`, `pipelines` and ntfy |
|
||||
| Go (version in `go.mod`, currently 1.27) | builds `pipelines-server` and `pipelines` |
|
||||
| Node.js 18+ | runs the authenticated web proxy (`web/serve.mjs`) |
|
||||
| Python 3.9+ | installer and the lifecycle manager (`manage.py`) |
|
||||
| git, curl | source checkout, updates, release lookup |
|
||||
| C compiler (`cc`, `clang` or `gcc`) | ntfy's SQLite driver is cgo (Xcode Command Line Tools on macOS) |
|
||||
| **Docker, running** | builds the Flutter web app and the APK |
|
||||
| OpenCode on `PATH` | required; default stage and chat harness (`curl -fsSL https://opencode.ai/install \| bash`) |
|
||||
| Pi, Claude Code, Codex | optional; set up after install with `pipelines harness setup <name>` |
|
||||
@@ -52,18 +51,69 @@ Linux needs `systemctl --user`. Other platforms are refused.
|
||||
6. Writes host harness profiles to `~/.config/pipelines/harnesses.json`. If no
|
||||
usable OpenCode default model is found, it opens the model picker in the
|
||||
terminal (or fails without a terminal; pass `--model`).
|
||||
7. Builds ntfy from its pinned Go module, writes its config and creates the
|
||||
`pipeline-publisher` and `phone-reader` accounts.
|
||||
8. Migrates data from an earlier Docker installation, if its volumes exist.
|
||||
7. Migrates data from an earlier Docker installation, if its volumes exist.
|
||||
8. Retires the ntfy server an older installation ran, if any (see
|
||||
[Reinstalling over an ntfy installation](#reinstalling-over-an-ntfy-installation)).
|
||||
9. Registers the login service, writes the manifest
|
||||
`<prefix>/pipelines-install.json`, saves `ws://127.0.0.1:<port>/connect` as
|
||||
the CLI default in `~/.config/pipelines/client.json`, and starts everything.
|
||||
the CLI default in `~/.config/pipelines/client.json`, and starts everything
|
||||
that is not already running. A running service keeps the previous build
|
||||
until `pipelines restart`.
|
||||
10. Retires the legacy standalone web agent `net.awan.pipelines.web` on macOS
|
||||
(stopped, plist renamed to `.disabled`), so only one web app is served.
|
||||
11. If `PIPELINES_WEB_PUBLIC_URL` is an `https://…ts.net` address, runs
|
||||
`tailscale serve --bg --https=<port> http://127.0.0.1:<web-port>`.
|
||||
12. Prints the browser URLs and the next step, setting up harnesses.
|
||||
|
||||
## Notifications
|
||||
|
||||
Pipelines sends notifications through its own server to the Pipelines apps;
|
||||
there is nothing to install or subscribe to:
|
||||
|
||||
- **Web app**: browser notifications, once allowed in the browser.
|
||||
- **Android**: the **Receive notifications in Pipelines** background service,
|
||||
or in the app while it is open.
|
||||
- **iOS and macOS**: in the app.
|
||||
|
||||
See [Notifications](notifications.md).
|
||||
|
||||
### Reinstalling over an ntfy installation
|
||||
|
||||
Installations from before this change ran an ntfy server beside Pipelines.
|
||||
`./install` retires it, once, after the new build is in place and before the
|
||||
new manifest is written (`Setup.retire_ntfy` in `scripts/setup-native.py`,
|
||||
using `retire_ntfy` in `scripts/manage.py`):
|
||||
|
||||
1. It records the paths it removes and the old ntfy version, from the old
|
||||
manifest, in `<prefix>/logs/install.log`. No credentials are written there.
|
||||
2. It stops the old ntfy process from `<prefix>/ntfy.pid`, but only while that
|
||||
PID's command line is still `<prefix>/bin/ntfy serve …`; any other PID is
|
||||
left alone and the stale PID file is removed.
|
||||
3. It deletes `<prefix>/bin/ntfy`, `<prefix>/ntfy.pid`, `<prefix>/logs/ntfy.log`,
|
||||
`<prefix>/secrets/publisher-token` and the whole `<prefix>/data/ntfy/`
|
||||
directory.
|
||||
|
||||
`<prefix>/data/ntfy/` is deleted rather than kept: it held only ntfy's
|
||||
configuration, its message and attachment caches, and its account database
|
||||
(`phone-reader`, `pipeline-publisher`), which nothing reads any more. Pipelines
|
||||
history lives in `<prefix>/data/pipelines.db` and is untouched.
|
||||
|
||||
The new manifest has a top-level `"mode": "native"` and no `ntfy`, `ntfy_port`,
|
||||
`topic`, `username` or `public_url` entries. Until that reinstall, a manifest
|
||||
with the older `ntfy.mode: "native"` marker is still treated as native.
|
||||
|
||||
`./install` does not restart a service that is already running, so the old
|
||||
server keeps running (without ntfy) until `pipelines restart`. The restart stops
|
||||
the old supervisor; the new one starts only the server and web proxy, and stops
|
||||
an ntfy that is somehow still running from the PID file under the same check.
|
||||
Running `./install` again finds nothing left to retire. On a phone, remove the
|
||||
old Pipelines subscription from the ntfy app.
|
||||
|
||||
Docker installations (`./install --docker`) retire ntfy the same way: the
|
||||
installer removes the old `ntfy` container and its `<project>_ntfy-data` volume,
|
||||
`secrets/ntfy-token.txt` and the `NTFY_*` lines in `.env`, and recreates the
|
||||
server with `--remove-orphans`.
|
||||
|
||||
## Set up harnesses
|
||||
|
||||
One command per harness, the same on native and Docker installations:
|
||||
@@ -90,7 +140,6 @@ one; it does not touch that binary.
|
||||
| --- | --- | --- |
|
||||
| Web proxy (sign-in, web app, `/updates/`) | port 8082, loopback + tailnet only | `--web-port`, `--web-host`, `--web-lan` |
|
||||
| Server API (no auth) | `127.0.0.1:8080` | `--port`, `--bind-address` |
|
||||
| ntfy | `:8090` | `--ntfy-port`, `--ntfy-url` |
|
||||
|
||||
Expose only the web proxy. It listens on loopback and this machine's Tailscale
|
||||
addresses unless you opt into the LAN; see
|
||||
@@ -131,8 +180,6 @@ From `arguments()` in `scripts/setup-native.py`:
|
||||
| `--web-host tailnet\|IP` | web proxy access: `tailnet` (default for new installs: loopback and Tailscale addresses only) or a literal IPv4 bind such as `0.0.0.0`; existing installs keep theirs and get a warning |
|
||||
| `--web-lan` | also accept plain-HTTP LAN connections; sign-in over them stays refused |
|
||||
| `--web-lan-plain-login` | allow sign-in over plain-HTTP LAN (unencrypted password and cookie; trusted networks only) |
|
||||
| `--ntfy-port N` | ntfy port (default 8090) |
|
||||
| `--ntfy-url URL` | ntfy address given to phones (default `http://<LAN IP>:<ntfy-port>`) |
|
||||
| `--timezone TZ` | override the detected timezone (fallback UTC) |
|
||||
| `--model PROVIDER/MODEL` | default model for new starters and missing OpenCode profile fields |
|
||||
| `--allow-authoring` | allow creating and publishing pipelines (fresh installs default to this) |
|
||||
@@ -166,7 +213,7 @@ This reset has no confirmation prompt. Do not use it merely to update the app.
|
||||
```sh
|
||||
./install --web # rebuild and install only the web app (Docker), then reload the page
|
||||
./install --apk # build the Android APK (Docker, slower) and offer it to phones
|
||||
./install --docker # server and ntfy in Docker Compose instead of native
|
||||
./install --docker # server in Docker Compose instead of native
|
||||
```
|
||||
|
||||
`./install --apk` builds a release APK for this installation's web address,
|
||||
@@ -252,11 +299,11 @@ another installation.
|
||||
|
||||
| Command | Effect |
|
||||
| --- | --- |
|
||||
| `pipelines start` | start server, web proxy and ntfy; print the startup report |
|
||||
| `pipelines stop` | stop all three; harness sessions keep running and the next start reattaches them (see below) |
|
||||
| `pipelines start` | start server and web proxy; print the startup report |
|
||||
| `pipelines stop` | stop both; harness sessions keep running and the next start reattaches them (see below) |
|
||||
| `pipelines restart` | stop then start, keeping data; chat turns and stage sessions continue |
|
||||
| `pipelines doctor` | startup report, health of server and ntfy, OpenCode API check (no inference) |
|
||||
| `pipelines status` | server, host and ntfy publishing health, from the running server |
|
||||
| `pipelines doctor` | startup report, server health, OpenCode API check (no inference) |
|
||||
| `pipelines status` | server and host health, from the running server |
|
||||
| `pipelines logs` | follow `logs/server.log` |
|
||||
| `pipelines update` | pull and reinstall the same way, then restart (see below) |
|
||||
| `pipelines uninstall [--purge] [--yes]` | remove the service and binaries; `--purge` also deletes data |
|
||||
@@ -310,7 +357,7 @@ endpoint and the Codex App Server are separate processes anyway.
|
||||
|
||||
The login service is `~/Library/LaunchAgents/net.a-wan.pipelines.plist` on
|
||||
macOS and `~/.config/systemd/user/net.a-wan.pipelines.service` on Linux. It
|
||||
runs `manage.py supervise`, which owns all three processes. This is login
|
||||
runs `manage.py supervise`, which owns the server and web proxy processes. This is login
|
||||
autostart, not boot-without-login.
|
||||
|
||||
## Where things live
|
||||
@@ -318,12 +365,10 @@ autostart, not boot-without-login.
|
||||
| Path | Contents |
|
||||
| --- | --- |
|
||||
| `<prefix>/pipelines-install.json` | manifest (ports, paths, install args, environment) |
|
||||
| `<prefix>/bin/` | `pipelines`, `pipelines-server`, `pipelines-claude-host`, `pipelines-codex-host`, `ntfy` |
|
||||
| `<prefix>/bin/` | `pipelines`, `pipelines-server`, `pipelines-claude-host`, `pipelines-codex-host` |
|
||||
| `<prefix>/data/pipelines.db` | SQLite database (definitions, runs, chats, settings) |
|
||||
| `<prefix>/data/artifacts/` | run artifacts and session exports |
|
||||
| `<prefix>/data/ntfy/` | ntfy config, cache and accounts |
|
||||
| `<prefix>/secrets/publisher-token` | ntfy publishing token |
|
||||
| `<prefix>/logs/` | `server.log`, `web.log`, `ntfy.log`, `supervisor.log` |
|
||||
| `<prefix>/logs/` | `server.log`, `web.log`, `supervisor.log`, `install.log` |
|
||||
| `~/.config/pipelines/web-auth.json` | web password and cookie secret (`PIPELINES_WEB_AUTH_FILE`) |
|
||||
| `~/.config/pipelines/harnesses.json` | harness profiles (`PIPELINES_HARNESS_CONFIG`) |
|
||||
| `~/.config/pipelines/client.json` | default server URL for the CLI/TUI |
|
||||
@@ -342,9 +387,6 @@ twice). Without a terminal, set `PIPELINES_WEB_PASSWORD`. It is stored in
|
||||
and reused unchanged on every reinstall. An invalid or non-private file stops
|
||||
the installer rather than being reset.
|
||||
|
||||
The same password is given to the ntfy `phone-reader` account when that account
|
||||
is first created; existing ntfy accounts keep their passwords.
|
||||
|
||||
After updating the installation, change the web sign-in password from the
|
||||
checkout with:
|
||||
|
||||
@@ -356,8 +398,7 @@ It prompts twice without echoing the password, requires at least eight
|
||||
characters, and writes the private password file atomically. The updated web
|
||||
proxy picks it up on the next request; no service restart is needed, and existing
|
||||
sessions and running tasks remain connected. SSH is supported with an interactive
|
||||
TTY. This changes the web/app sign-in password; the ntfy notification account's
|
||||
password is unchanged. `--prefix PATH` selects another installation, and
|
||||
TTY. This changes the web/app sign-in password. `--prefix PATH` selects another installation, and
|
||||
`PIPELINES_WEB_AUTH_FILE` selects an explicitly configured password file.
|
||||
|
||||
## Upgrading
|
||||
@@ -369,8 +410,8 @@ pipelines update
|
||||
`update` refuses while runs are executing (finish or cancel them first). It
|
||||
then runs `git pull --ff-only` in the checkout it was installed from (skipped
|
||||
when the branch has no upstream), re-runs `./install` with the recorded
|
||||
arguments, restarts, and prints the startup report. Data, passwords, ntfy
|
||||
accounts and the signing key are kept. If the installer fails, the previous
|
||||
arguments, restarts, and prints the startup report. Data, passwords and the signing key
|
||||
are kept. If the installer fails, the previous
|
||||
version keeps running.
|
||||
|
||||
Running `./install` again from the checkout does the same without the pull.
|
||||
@@ -403,8 +444,8 @@ per-user data directory (`XDG_DATA_HOME`, or Application Support on macOS).
|
||||
## Troubleshooting
|
||||
|
||||
- **"Docker is not running"**: start Docker Desktop (or the daemon) and rerun.
|
||||
- **Ports busy**: a Docker installation or an old server may hold 8080, 8082 or
|
||||
8090. Stop it, or choose other ports with the flags above.
|
||||
- **Ports busy**: a Docker installation or an old server may hold 8080 or 8082.
|
||||
Stop it, or choose other ports with the flags above.
|
||||
- **"No usable configured harness model"**: rerun `./install` in a terminal to
|
||||
pick models, or pass `--model PROVIDER/MODEL`.
|
||||
- **CLI talks to the wrong server**: `PIPELINES_URL` overrides the saved
|
||||
|
||||
Reference in New Issue
Block a user