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:
2026-12-03 23:24:24 +00:00
parent 806b5eca46
commit fc7dbb0ac0
138 changed files with 1958 additions and 4651 deletions
+2 -36
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
"""Bounded resolution of current harness and ntfy releases for installation.
"""Bounded resolution of current harness releases for installation.
Network I/O is isolated behind an injectable ``fetch`` callable so unit tests
never touch the network. The resolver:
@@ -17,9 +17,6 @@ never touch the network. The resolver:
closed when it is missing or invalid, never falling back to an older version;
* resolves the exact Pi package version and validates its Node engine
constraint fail-closed;
* resolves the exact ntfy release tag that the native installer builds its
server from, because upstream publishes only a client-only binary for macOS
and the server is therefore compiled from the pinned Go module on every host;
* validates untrusted metadata, versions, digests and fixture values;
* refuses any host outside the explicit allowlist (the container registry, the
GitHub API and the npm registry) and refuses any redirect that leaves it.
@@ -43,18 +40,11 @@ NPM = "https://registry.npmjs.org"
OPENCODE_REPOSITORY = "anomalyco/opencode"
OPENCODE_IMAGE = "ghcr.io/anomalyco/opencode"
PI_PACKAGE = "@earendil-works/pi-coding-agent"
NTFY_REPOSITORY = "binwiederhier/ntfy"
# The ntfy Go module the native installer builds a server from. Upstream only
# publishes a client-only binary for macOS, so both platforms compile the server
# from this module at the resolved tag (Go verifies the module via its checksum
# database).
NTFY_MODULE = "heckel.io/ntfy/v2"
MAX_REFS = 1000 # Explicit ceiling on the documented complete matching-refs array.
MAX_BODY = 1 << 20 # Generous ceiling for tag lists and manifest metadata.
SUPPORTED_MAJOR = 2
HTTP_TIMEOUT = 5.0
# Registry, GitHub API and npm metadata hosts only. The native installer builds
# ntfy from its Go module, so no release-asset download hosts are needed.
# Registry, GitHub API and npm metadata hosts only; no release-asset downloads.
ALLOWED_HOSTS = frozenset({"ghcr.io", "api.github.com", "registry.npmjs.org"})
GITHUB_HEADERS = {"Accept": "application/vnd.github+json", "User-Agent": "pipelines-setup"}
MANIFEST_ACCEPT = ", ".join([
@@ -272,30 +262,6 @@ def resolve_pi(fetch=_default_fetch, node_version=None):
return {"package": PI_PACKAGE, "version": version, "engine": engine}
def _github_ntfy_tags(fetch):
"""One bounded request for the complete ntfy vX.Y.Z matching-refs array."""
return _github_matching_refs(fetch, NTFY_REPOSITORY, "v")
def resolve_ntfy(fetch=_default_fetch):
"""Resolve the exact ntfy release the native installer builds from source.
The selected version comes from the complete official matching-refs tag list
(never the moving ``latest`` release and never an older fallback); a missing
or malformed tag list fails closed. The native installer then compiles the
server from the pinned ``heckel.io/ntfy/v2`` module, so no release assets or
their checksums are downloaded here.
"""
candidates = _github_ntfy_tags(fetch)
if not candidates:
raise ReleaseError("no stable ntfy release found in the official tag metadata")
tag = max(candidates, key=lambda name: candidates[name])
version = registry_tag(tag)
if parse_version(version) is None:
raise ReleaseError(f"resolved ntfy tag is not an exact version: {tag!r}")
return {"repository": NTFY_REPOSITORY, "module": NTFY_MODULE, "version": version, "tag": tag}
def resolve(fetch=_default_fetch, node_version=None):
return {"opencode": resolve_opencode(fetch), "pi": resolve_pi(fetch, node_version)}