diff --git a/.env.example b/.env.example
index 94ab12c6..35d686b8 100644
--- a/.env.example
+++ b/.env.example
@@ -1,8 +1,4 @@
# Prefer scripts/configure-compose.py to detect the host timezone automatically.
TZ=Europe/London
-# Replace this with your machine's LAN/VPN address, not localhost on the phone.
-NTFY_BASE_URL=http://192.168.1.20:8090
-# Explicitly expose ntfy on your trusted LAN/VPN; use HTTPS on public networks.
-NTFY_BIND_ADDRESS=0.0.0.0
# Avoid collision while an existing host pipeline server still owns port 8080.
PIPELINES_PORT=8081
diff --git a/app/android/app/src/main/AndroidManifest.xml b/app/android/app/src/main/AndroidManifest.xml
index 844805a2..940f4e46 100644
--- a/app/android/app/src/main/AndroidManifest.xml
+++ b/app/android/app/src/main/AndroidManifest.xml
@@ -63,7 +63,7 @@
-
,
val createdAt: String,
diff --git a/app/android/app/src/main/kotlin/net/awan/pipelines_app/notify/NotificationService.kt b/app/android/app/src/main/kotlin/net/awan/pipelines_app/notify/NotificationService.kt
index a029db52..edfcd5b7 100644
--- a/app/android/app/src/main/kotlin/net/awan/pipelines_app/notify/NotificationService.kt
+++ b/app/android/app/src/main/kotlin/net/awan/pipelines_app/notify/NotificationService.kt
@@ -20,7 +20,7 @@ import java.util.concurrent.TimeUnit
/**
* Keeps one authenticated websocket to the configured Pipelines server while
- * the app is in the background, like ntfy's instant delivery: no Flutter
+ * the app is in the background, for instant delivery: no Flutter
* engine runs here. It subscribes with the replay cursor, posts each pushed
* notification, mirrors cross-device clears and sends the user's own clears.
*
diff --git a/app/lib/features/attention/notify/agent_notice.dart b/app/lib/features/attention/notify/agent_notice.dart
index 2428ac6d..aabf0521 100644
--- a/app/lib/features/attention/notify/agent_notice.dart
+++ b/app/lib/features/attention/notify/agent_notice.dart
@@ -1,6 +1,6 @@
/// An agent's own notification: the `chat_notify` app notification the server
/// records when a chat's model calls the `notify` tool, as the notification
-/// stream carries it (see docs/ntfy.md).
+/// stream carries it (see docs/notifications.md).
library;
/// The stream kind of an agent's notify call.
@@ -30,7 +30,7 @@ class AgentNotice {
final String title;
final String message;
- /// The ntfy-style priority: 2 low, 3 default, 4 high.
+ /// The priority, 1-5: 2 low, 3 default, 4 high.
final int priority;
final DateTime? createdAt;
diff --git a/app/lib/features/chat/ui/transcript/shown/chat_shown_notify_row.dart b/app/lib/features/chat/ui/transcript/shown/chat_shown_notify_row.dart
index 693da48d..8271fa94 100644
--- a/app/lib/features/chat/ui/transcript/shown/chat_shown_notify_row.dart
+++ b/app/lib/features/chat/ui/transcript/shown/chat_shown_notify_row.dart
@@ -4,8 +4,9 @@ import '../../../../../core/api_gateway.dart';
import 'chat_shown_surface.dart';
/// What a `notify` entry says: where the notification went (the server's
-/// `channels`: the operator's signed-in Pipelines `apps` and/or their `phone`),
-/// or why it was not sent.
+/// `channels`: the operator's signed-in Pipelines `apps`; `phone` appears only
+/// in entries recorded before the server stopped publishing to a phone push
+/// service), or why it was not sent.
String chatShownNotifyText(JsonMap item) {
final title = chatShownTitle(item, 'notification');
if (item['delivered'] == true) return '${_notifiedWhere(item)}: $title';
diff --git a/app/lib/features/notification_service/notification_service_bridge.dart b/app/lib/features/notification_service/notification_service_bridge.dart
index fa0f284d..23717f3d 100644
--- a/app/lib/features/notification_service/notification_service_bridge.dart
+++ b/app/lib/features/notification_service/notification_service_bridge.dart
@@ -12,8 +12,8 @@ export 'notification_service_status.dart';
/// The app's handle on Android background delivery: a native foreground
/// service (android/…/notify/NotificationService.kt) that keeps its own
-/// socket to the server and shows the server's notifications, so the ntfy app
-/// is not needed. Other platforms have no service ([supported] is false).
+/// socket to the server and shows the server's notifications while the app
+/// is closed. Other platforms have no service ([supported] is false).
abstract interface class NotificationServiceBridge {
bool get supported;
diff --git a/app/lib/features/settings/ntfy_settings_controller.dart b/app/lib/features/settings/notification_settings_controller.dart
similarity index 73%
rename from app/lib/features/settings/ntfy_settings_controller.dart
rename to app/lib/features/settings/notification_settings_controller.dart
index 9251669a..f12f56c4 100644
--- a/app/lib/features/settings/ntfy_settings_controller.dart
+++ b/app/lib/features/settings/notification_settings_controller.dart
@@ -2,9 +2,9 @@ import 'package:flutter/foundation.dart';
import '../../core/api_gateway.dart';
-/// One server-side ntfy notification choice, in the server's wire key.
-class NtfySetting {
- const NtfySetting(this.key, this.label, {this.subtitle});
+/// One server-side notification choice, in the server's wire key.
+class NotificationSetting {
+ const NotificationSetting(this.key, this.label, {this.subtitle});
final String key;
final String label;
@@ -13,36 +13,30 @@ class NtfySetting {
final String? subtitle;
}
-/// The server's global notification choices, in display order.
+/// The server's global notification choices, in display order. They are
+/// stored on the server, so they apply to every signed-in device.
///
/// `run_finished` (server default off) makes every run end notify; without it
/// only runs started with "Notify me" announce their success or failure.
-const ntfySettings = [
- NtfySetting(
+const notificationSettings = [
+ NotificationSetting(
'run_finished',
'Notify when any run ends',
subtitle: 'Otherwise only runs started with Notify me',
),
- NtfySetting('chat_needs_you', 'Chat needs your answer or approval'),
- NtfySetting('chat_reply_finished', 'Chat reply finished'),
+ NotificationSetting('chat_needs_you', 'Chat needs your answer or approval'),
+ NotificationSetting('chat_reply_finished', 'Chat reply finished'),
];
-/// The server's switch for also publishing to ntfy. Optional: older servers
-/// do not send it, and Settings hides the switch then.
-const ntfyEnabledSetting = NtfySetting(
- 'ntfy_enabled',
- 'Also send to ntfy',
- subtitle: 'For devices that still use the ntfy app',
-);
-
-/// Loads and changes the server's ntfy notification settings through the
-/// shared gateway (`notification_settings` / `set_notification_settings`).
+/// Loads and changes the server's notification settings through the shared
+/// gateway (`notification_settings` / `set_notification_settings`).
///
/// A toggle shows the new value at once and is reverted, with the server's
/// refusal as [error], when the write fails. Every reply carries all keys, so
-/// the stored result always replaces the local copy.
-class NtfySettingsController extends ChangeNotifier {
- NtfySettingsController(this.gateway);
+/// the stored result always replaces the local copy. Keys the app does not
+/// show (such as a retired one an older server still sends) are ignored.
+class NotificationSettingsController extends ChangeNotifier {
+ NotificationSettingsController(this.gateway);
final ApiGateway gateway;
@@ -119,15 +113,13 @@ class NtfySettingsController extends ChangeNotifier {
throw const FormatException('the reply carried no notification settings');
}
final result = {};
- for (final setting in ntfySettings) {
+ for (final setting in notificationSettings) {
final value = raw[setting.key];
if (value is! bool) {
throw FormatException('the reply is missing ${setting.key}');
}
result[setting.key] = value;
}
- final ntfy = raw[ntfyEnabledSetting.key];
- if (ntfy is bool) result[ntfyEnabledSetting.key] = ntfy;
return result;
}
diff --git a/app/lib/features/settings/settings_device_delivery_section.dart b/app/lib/features/settings/settings_device_delivery_section.dart
index 494b4ecb..5a1bfb27 100644
--- a/app/lib/features/settings/settings_device_delivery_section.dart
+++ b/app/lib/features/settings/settings_device_delivery_section.dart
@@ -12,8 +12,8 @@ const deviceDeliveryTitle = 'Notifications in Pipelines';
const deviceDeliverySwitchLabel = 'Receive notifications in Pipelines';
const deviceDeliveryNote =
'Pipelines keeps its own connection to the server and shows its '
- 'notifications, so the ntfy app is no longer needed. Android shows a '
- 'quiet "Pipelines is connected" notification while it runs.';
+ 'notifications even while the app is closed. Android shows a quiet '
+ '"Pipelines is connected" notification while it runs.';
const deviceDeliveryBatteryLabel = 'Allow background delivery';
const deviceDeliveryNotificationsLabel = 'Allow notifications';
const deviceDeliveryWarningTitle = 'Delivery can pause while idle';
diff --git a/app/lib/features/settings/settings_ntfy_section.dart b/app/lib/features/settings/settings_notification_settings_section.dart
similarity index 64%
rename from app/lib/features/settings/settings_ntfy_section.dart
rename to app/lib/features/settings/settings_notification_settings_section.dart
index b91ae158..3554e24c 100644
--- a/app/lib/features/settings/settings_ntfy_section.dart
+++ b/app/lib/features/settings/settings_notification_settings_section.dart
@@ -3,35 +3,33 @@ import 'dart:async';
import 'package:flutter/material.dart';
import '../../core/api_gateway.dart';
-import 'ntfy_settings_controller.dart';
+import 'notification_settings_controller.dart';
import 'settings_group.dart';
import 'settings_theme.dart';
-/// The section title for the server's ntfy notification choices.
-const ntfySectionTitle = 'Phone notifications';
+/// The section title for the server's notification choices.
+const notificationEventsTitle = 'Notification events';
-/// One line explaining where these notifications go.
-const ntfySectionSubtitle =
- 'Sent through ntfy to the devices subscribed to this server.';
-
-/// The subtitle once the server delivers to the app itself (it reports
-/// `ntfy_enabled`).
-const ntfySectionAppSubtitle =
- 'What the server notifies about: shown by the Pipelines app and, when '
- 'enabled, also sent through ntfy.';
+/// One line explaining that these choices are shared.
+const notificationEventsSubtitle =
+ 'What the server notifies about. Stored on the server, so these apply to '
+ 'every device signed in to it.';
/// Shown instead of loading while the shared connection is down.
-const ntfyOfflineText = 'Connect to a server to change these.';
+const notificationEventsOfflineText = 'Connect to a server to change these.';
-ValueKey ntfySettingKey(String key) => ValueKey('ntfy-$key');
-const ntfyErrorKey = ValueKey('ntfy-settings-error');
+ValueKey notificationSettingKey(String key) =>
+ ValueKey('notification-setting-$key');
+const notificationSettingsErrorKey = ValueKey(
+ 'notification-settings-error',
+);
/// The server-side notification checkboxes in Settings: run finished, chat
/// needs you and chat reply finished. Values load from the server whenever
/// [connected] becomes true and every toggle is written at once; a refusal is
/// shown inline and the checkbox reverts.
-class SettingsNtfySection extends StatefulWidget {
- const SettingsNtfySection({
+class SettingsNotificationSettingsSection extends StatefulWidget {
+ const SettingsNotificationSettingsSection({
super.key,
required this.gateway,
required this.connected,
@@ -41,13 +39,14 @@ class SettingsNtfySection extends StatefulWidget {
final bool connected;
@override
- State createState() => _SettingsNtfySectionState();
+ State createState() =>
+ _SettingsNotificationSettingsSectionState();
}
-class _SettingsNtfySectionState extends State {
- late NtfySettingsController _controller = NtfySettingsController(
- widget.gateway,
- );
+class _SettingsNotificationSettingsSectionState
+ extends State {
+ late NotificationSettingsController _controller =
+ NotificationSettingsController(widget.gateway);
@override
void initState() {
@@ -56,11 +55,11 @@ class _SettingsNtfySectionState extends State {
}
@override
- void didUpdateWidget(SettingsNtfySection oldWidget) {
+ void didUpdateWidget(SettingsNotificationSettingsSection oldWidget) {
super.didUpdateWidget(oldWidget);
if (oldWidget.gateway != widget.gateway) {
_controller.dispose();
- _controller = NtfySettingsController(widget.gateway);
+ _controller = NotificationSettingsController(widget.gateway);
}
if (widget.connected &&
(!oldWidget.connected || oldWidget.gateway != widget.gateway)) {
@@ -84,16 +83,12 @@ class _SettingsNtfySectionState extends State {
final values = _controller.values;
final enabled = widget.connected && _controller.enabled;
final status = !widget.connected
- ? ntfyOfflineText
+ ? notificationEventsOfflineText
: _controller.loading && values == null
? 'Loading…'
: '';
- final hasNtfySwitch = values?.containsKey(ntfyEnabledSetting.key) ?? false;
final tiles = [
- for (final setting in [
- ...ntfySettings,
- if (hasNtfySwitch) ntfyEnabledSetting,
- ])
+ for (final setting in notificationSettings)
_tile(
setting,
values?[setting.key] ?? false,
@@ -106,18 +101,18 @@ class _SettingsNtfySectionState extends State {
!_controller.loading &&
(values == null || _controller.loadFailed);
return SettingsGroup(
- title: ntfySectionTitle,
+ title: notificationEventsTitle,
footer: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
- Text(hasNtfySwitch ? ntfySectionAppSubtitle : ntfySectionSubtitle),
+ const Text(notificationEventsSubtitle),
if (status.isNotEmpty) Text(status),
if (_controller.error.isNotEmpty)
Semantics(
liveRegion: true,
child: Text(
_controller.error,
- key: ntfyErrorKey,
+ key: notificationSettingsErrorKey,
style: TextStyle(color: settingsErrorColor(context)),
),
),
@@ -135,9 +130,13 @@ class _SettingsNtfySectionState extends State {
);
}
- Widget _tile(NtfySetting setting, bool value, ValueChanged? onChanged) {
+ Widget _tile(
+ NotificationSetting setting,
+ bool value,
+ ValueChanged? onChanged,
+ ) {
return CheckboxListTile(
- key: ntfySettingKey(setting.key),
+ key: notificationSettingKey(setting.key),
title: Text(setting.label),
subtitle: setting.subtitle == null ? null : Text(setting.subtitle!),
value: value,
diff --git a/app/lib/features/settings/settings_page_sections.dart b/app/lib/features/settings/settings_page_sections.dart
index 55e36fe9..dc733bc2 100644
--- a/app/lib/features/settings/settings_page_sections.dart
+++ b/app/lib/features/settings/settings_page_sections.dart
@@ -151,11 +151,13 @@ extension _SettingsPageSections on _SettingsScreenState {
),
),
SettingsSection(
- id: 'phone-notifications',
- title: ntfySectionTitle,
- keywords: 'ntfy push phone run finished chat needs you',
+ id: 'notification-events',
+ title: notificationEventsTitle,
+ keywords:
+ 'notifications push phone events all devices run finished '
+ 'chat needs you reply finished',
lazy: true,
- builder: (_) => SettingsNtfySection(
+ builder: (_) => SettingsNotificationSettingsSection(
gateway: widget.client,
connected:
widget.client.state.kind == transport.ConnectionKind.connected,
diff --git a/app/lib/features/settings/settings_phone_order.dart b/app/lib/features/settings/settings_phone_order.dart
index 79d459a2..cf9f1be2 100644
--- a/app/lib/features/settings/settings_phone_order.dart
+++ b/app/lib/features/settings/settings_phone_order.dart
@@ -12,7 +12,7 @@ const settingsPhoneFirstIds = [
'sign-in',
'notifications',
'device-delivery',
- 'phone-notifications',
+ 'notification-events',
];
/// [sections] reordered for a phone: [settingsPhoneFirstIds] first.
diff --git a/app/lib/features/settings/settings_screen.dart b/app/lib/features/settings/settings_screen.dart
index 838beb5f..8126d70a 100644
--- a/app/lib/features/settings/settings_screen.dart
+++ b/app/lib/features/settings/settings_screen.dart
@@ -25,7 +25,7 @@ import 'health/settings_health_section.dart';
import 'settings_search_page.dart';
import 'settings_section.dart';
import 'settings_notifications_section.dart';
-import 'settings_ntfy_section.dart';
+import 'settings_notification_settings_section.dart';
import 'settings_device_delivery_section.dart';
import '../notification_service/notification_service_bridge.dart';
import '../notification_service/notification_service_controller.dart';
diff --git a/app/notes/notification-thread-grouping.md b/app/notes/notification-thread-grouping.md
index 353570bc..07aff054 100644
--- a/app/notes/notification-thread-grouping.md
+++ b/app/notes/notification-thread-grouping.md
@@ -5,7 +5,7 @@
- `android/.../notify/NotificationThreads.kt` (new): `ThreadEntry`, `ThreadHistory`
(bounded per-thread entries, bounded thread count, persisted through the
ledger's `LedgerStore` under `threads.history`), and naming helpers. Threads are
- keyed by the server `group` (`chat:` or `run:`, per `docs/ntfy.md`).
+ keyed by the server `group` (`chat:` or `run:`, per `docs/notifications.md`).
- `NotificationPresenter.kt`: a grouped notification posts one conversation
notification per thread with a stable id (`thread:`), the latest 5 lines
(sender = chat title, run title for runs), the unread count (`setNumber`), and a
diff --git a/app/notes/ntfy-removal.md b/app/notes/ntfy-removal.md
new file mode 100644
index 00000000..d78226d5
--- /dev/null
+++ b/app/notes/ntfy-removal.md
@@ -0,0 +1,32 @@
+# ntfy removal (app side)
+
+Operator decision: ntfy is removed from Pipelines. Every client gets
+notifications from the server's own app notification stream: browser
+Notification on web, the "Receive notifications in Pipelines" background
+service or the in-app bridge on Android, the in-app bridge on iOS/macOS.
+
+## Change
+
+- Settings "Phone notifications" (ntfy) section replaced by **Notification
+ events** (`lib/features/settings/settings_notification_settings_section.dart`,
+ controller `notification_settings_controller.dart`; section id
+ `notification-events`, still in the phone-first order). It shows the three
+ server-stored switches `run_finished`, `chat_needs_you`,
+ `chat_reply_finished` with the subtitle "What the server notifies about.
+ Stored on the server, so these apply to every device signed in to it."
+- The `ntfy_enabled` switch is gone; a reply that still carries it is ignored
+ (only the three known keys are decoded) and writes send only the toggled key.
+- Search keywords no longer mention ntfy.
+- "Notifications in Pipelines" note no longer mentions the ntfy app.
+- Comments in `agent_notice.dart` (docs/notifications.md, priority 1-5),
+ `notification_service_bridge.dart`, `AndroidManifest.xml`,
+ `NotificationService.kt`, `NotificationProtocol.kt` drop ntfy.
+- `chat_shown_notify_row.dart` still renders a `phone` channel for transcript
+ entries recorded before the change; new entries only carry `apps`.
+
+## Checks
+
+- `tool/analyze.sh`: clean.
+- memwatch `test/features/settings`: 216 passed; `test/features/attention`:
+ 159 passed; `test/features/notification_service`: 11 passed.
+- No browser capture taken for the renamed section.
diff --git a/app/notes/synced-attention.md b/app/notes/synced-attention.md
index 81d655d2..5a180520 100644
--- a/app/notes/synced-attention.md
+++ b/app/notes/synced-attention.md
@@ -11,7 +11,7 @@ not only on the web and then I have to clear again on mobile."
device has open, records a per-session `chat_seen` watermark in epoch ms.
ntfy notifications already shown on a phone cannot be retracted (see
-`docs/ntfy.md`, "Clearing notifications across devices").
+`docs/notifications.md`, "Clearing notifications across devices").
## Protocol (server, `internal/protocol/attention_acks.go`)
diff --git a/app/test/features/settings/settings_device_delivery_section_test.dart b/app/test/features/settings/settings_device_delivery_section_test.dart
index 42fba51f..5998ead5 100644
--- a/app/test/features/settings/settings_device_delivery_section_test.dart
+++ b/app/test/features/settings/settings_device_delivery_section_test.dart
@@ -27,7 +27,7 @@ bool _switchValue(WidgetTester tester) {
}
void main() {
- testWidgets('shows the switch, status and ntfy note', (tester) async {
+ testWidgets('shows the switch, status and delivery note', (tester) async {
final service = FakeNotificationService();
await tester.pumpWidget(_host(service));
await tester.pumpAndSettle();
diff --git a/app/test/features/settings/settings_ntfy_section_test.dart b/app/test/features/settings/settings_notification_settings_section_test.dart
similarity index 59%
rename from app/test/features/settings/settings_ntfy_section_test.dart
rename to app/test/features/settings/settings_notification_settings_section_test.dart
index 0b06850a..c45a7279 100644
--- a/app/test/features/settings/settings_ntfy_section_test.dart
+++ b/app/test/features/settings/settings_notification_settings_section_test.dart
@@ -4,7 +4,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:pipelines_app/core/api_gateway.dart';
import 'package:pipelines_app/core/transport/connection_state.dart';
-import 'package:pipelines_app/features/settings/settings_ntfy_section.dart';
+import 'package:pipelines_app/features/settings/settings_notification_settings_section.dart';
/// A scripted gateway: records every request and answers from [respond].
class _Gateway implements ApiGateway {
@@ -32,24 +32,31 @@ JsonMap _reply(bool run, bool needs, bool reply) => {
},
};
-Widget _host(ApiGateway gateway) {
+Widget _host(ApiGateway gateway, {bool connected = true}) {
final body = SingleChildScrollView(
- child: SettingsNtfySection(gateway: gateway, connected: true),
+ child: SettingsNotificationSettingsSection(
+ gateway: gateway,
+ connected: connected,
+ ),
);
return MaterialApp(home: Scaffold(body: body));
}
-bool _checked(WidgetTester tester, String key) {
- final tile = find.byKey(ntfySettingKey(key));
- return tester.widget(tile).value!;
-}
+Finder _tile(String key) => find.byKey(notificationSettingKey(key));
+
+bool _checked(WidgetTester tester, String key) =>
+ tester.widget(_tile(key)).value!;
void main() {
- testWidgets('loads the stored values', (tester) async {
+ testWidgets('shows the three shared switches with stored values', (
+ tester,
+ ) async {
final gateway = _Gateway((_, _) => _reply(true, false, true));
await tester.pumpWidget(_host(gateway));
await tester.pumpAndSettle();
expect(gateway.calls.single.$1, 'notification_settings');
+ expect(find.text(notificationEventsTitle), findsOneWidget);
+ expect(find.text(notificationEventsSubtitle), findsOneWidget);
expect(find.text('Notify when any run ends'), findsOneWidget);
expect(
find.text('Otherwise only runs started with Notify me'),
@@ -57,14 +64,13 @@ void main() {
);
expect(find.text('Chat needs your answer or approval'), findsOneWidget);
expect(find.text('Chat reply finished'), findsOneWidget);
- expect(find.text(ntfySectionSubtitle), findsOneWidget);
+ expect(find.byType(CheckboxListTile), findsNWidgets(3));
expect(_checked(tester, 'run_finished'), isTrue);
expect(_checked(tester, 'chat_needs_you'), isFalse);
expect(_checked(tester, 'chat_reply_finished'), isTrue);
});
testWidgets('shows the server default: only marked runs', (tester) async {
- // The server's defaults: run ends notify only for "Notify me" runs.
final gateway = _Gateway((_, _) => _reply(false, true, false));
await tester.pumpWidget(_host(gateway));
await tester.pumpAndSettle();
@@ -73,24 +79,53 @@ void main() {
expect(_checked(tester, 'chat_reply_finished'), isFalse);
});
- testWidgets('toggling writes only that setting', (tester) async {
- final gateway = _Gateway((type, fields) {
- if (type == 'set_notification_settings') {
- return _reply(true, true, true);
- }
- return _reply(true, true, false);
+ for (final key in ['run_finished', 'chat_needs_you', 'chat_reply_finished']) {
+ testWidgets('toggling $key writes only that setting', (tester) async {
+ final gateway = _Gateway((type, fields) {
+ if (type == 'set_notification_settings') {
+ return _reply(true, true, true);
+ }
+ return _reply(false, false, false);
+ });
+ await tester.pumpWidget(_host(gateway));
+ await tester.pumpAndSettle();
+ await tester.tap(_tile(key));
+ await tester.pumpAndSettle();
+ expect(gateway.calls, hasLength(2));
+ expect(gateway.calls.last.$1, 'set_notification_settings');
+ expect(gateway.calls.last.$2, {
+ 'notification_settings': {key: true},
+ });
+ expect(_checked(tester, key), isTrue);
+ expect(find.byKey(notificationSettingsErrorKey), findsNothing);
});
+ }
+
+ testWidgets('a legacy ntfy_enabled key in the reply is ignored', (
+ tester,
+ ) async {
+ JsonMap legacy() => {
+ 'type': 'notification_settings',
+ 'notification_settings': {
+ ...(_reply(true, true, false)['notification_settings'] as Map),
+ 'ntfy_enabled': true,
+ },
+ };
+ final gateway = _Gateway((_, _) => legacy());
await tester.pumpWidget(_host(gateway));
await tester.pumpAndSettle();
- await tester.tap(find.byKey(ntfySettingKey('chat_reply_finished')));
+ expect(find.byType(CheckboxListTile), findsNWidgets(3));
+ expect(_tile('ntfy_enabled'), findsNothing);
+ expect(find.textContaining('ntfy'), findsNothing);
+ expect(find.byKey(notificationSettingsErrorKey), findsNothing);
+
+ // A write after such a reply still sends only the toggled key.
+ await tester.tap(_tile('chat_reply_finished'));
await tester.pumpAndSettle();
- expect(gateway.calls, hasLength(2));
- expect(gateway.calls.last.$1, 'set_notification_settings');
expect(gateway.calls.last.$2, {
'notification_settings': {'chat_reply_finished': true},
});
- expect(_checked(tester, 'chat_reply_finished'), isTrue);
- expect(find.byKey(ntfyErrorKey), findsNothing);
+ expect(find.byType(CheckboxListTile), findsNWidgets(3));
});
testWidgets('failure reverts and shows the refusal', (tester) async {
@@ -101,53 +136,50 @@ void main() {
});
await tester.pumpWidget(_host(gateway));
await tester.pumpAndSettle();
- await tester.tap(find.byKey(ntfySettingKey('run_finished')));
+ await tester.tap(_tile('run_finished'));
await tester.pump();
// The change shows at once and the group is disabled while it saves.
expect(_checked(tester, 'run_finished'), isFalse);
- await tester.tap(find.byKey(ntfySettingKey('chat_needs_you')));
+ await tester.tap(_tile('chat_needs_you'));
await tester.pump();
expect(gateway.calls, hasLength(2));
pending.completeError(const ProtocolError('settings are read-only'));
await tester.pumpAndSettle();
expect(_checked(tester, 'run_finished'), isTrue);
expect(_checked(tester, 'chat_needs_you'), isTrue);
- expect(
- find.text('Could not save: settings are read-only'),
- findsOneWidget,
- );
+ expect(find.text('Could not save: settings are read-only'), findsOneWidget);
});
- testWidgets('disabled while loading and offline', (tester) async {
+ testWidgets('disabled while loading', (tester) async {
final pending = Completer();
final gateway = _Gateway((_, _) => pending.future);
await tester.pumpWidget(_host(gateway));
await tester.pump();
expect(find.text('Loading…'), findsOneWidget);
- await tester.tap(find.byKey(ntfySettingKey('run_finished')));
+ await tester.tap(_tile('run_finished'));
await tester.pump();
expect(gateway.calls, hasLength(1));
expect(
- tester
- .widget(find.byKey(ntfySettingKey('run_finished')))
- .onChanged,
+ tester.widget(_tile('run_finished')).onChanged,
isNull,
);
pending.complete(_reply(true, true, false));
await tester.pumpAndSettle();
expect(find.text('Loading…'), findsNothing);
+ });
- final offline = _Gateway((_, _) => _reply(true, true, false));
- await tester.pumpWidget(
- MaterialApp(
- home: Scaffold(
- body: SettingsNtfySection(gateway: offline, connected: false),
- ),
- ),
- );
+ testWidgets('offline: no request, the offline text, switches disabled', (
+ tester,
+ ) async {
+ final gateway = _Gateway((_, _) => _reply(true, true, false));
+ await tester.pumpWidget(_host(gateway, connected: false));
await tester.pumpAndSettle();
- expect(offline.calls, isEmpty);
- expect(find.text(ntfyOfflineText), findsOneWidget);
+ expect(gateway.calls, isEmpty);
+ expect(find.text(notificationEventsOfflineText), findsOneWidget);
+ expect(
+ tester.widget(_tile('chat_needs_you')).onChanged,
+ isNull,
+ );
});
testWidgets('a load failure is shown with a retry', (tester) async {
@@ -165,47 +197,7 @@ void main() {
fail = false;
await tester.tap(find.text('Retry'));
await tester.pumpAndSettle();
- expect(find.byKey(ntfyErrorKey), findsNothing);
- expect(
- tester
- .widget(find.byKey(ntfySettingKey('run_finished')))
- .value,
- isFalse,
- );
- });
-
- group('ntfy_enabled', () {
- JsonMap withNtfy(bool ntfy) => {
- 'type': 'notification_settings',
- 'notification_settings': {
- ...(_reply(true, true, false)['notification_settings'] as Map),
- 'ntfy_enabled': ntfy,
- },
- };
-
- testWidgets('hidden when the server does not send it', (tester) async {
- final gateway = _Gateway((_, _) => _reply(true, true, false));
- await tester.pumpWidget(_host(gateway));
- await tester.pumpAndSettle();
- expect(find.byKey(ntfySettingKey('ntfy_enabled')), findsNothing);
- expect(find.text(ntfySectionSubtitle), findsOneWidget);
- });
-
- testWidgets('shows and writes it', (tester) async {
- final gateway = _Gateway(
- (type, _) => withNtfy(type == 'set_notification_settings'),
- );
- await tester.pumpWidget(_host(gateway));
- await tester.pumpAndSettle();
- expect(find.text('Also send to ntfy'), findsOneWidget);
- expect(find.text(ntfySectionAppSubtitle), findsOneWidget);
- expect(_checked(tester, 'ntfy_enabled'), isFalse);
- await tester.tap(find.byKey(ntfySettingKey('ntfy_enabled')));
- await tester.pumpAndSettle();
- expect(gateway.calls.last.$2, {
- 'notification_settings': {'ntfy_enabled': true},
- });
- expect(_checked(tester, 'ntfy_enabled'), isTrue);
- });
+ expect(find.byKey(notificationSettingsErrorKey), findsNothing);
+ expect(_checked(tester, 'run_finished'), isFalse);
});
}
diff --git a/app/test/features/settings/settings_screen_test.dart b/app/test/features/settings/settings_screen_test.dart
index c649123f..f1e592b8 100644
--- a/app/test/features/settings/settings_screen_test.dart
+++ b/app/test/features/settings/settings_screen_test.dart
@@ -164,8 +164,8 @@ void main() {
'ping',
'notification_settings',
]);
- await openSettingsSection(tester, 'Phone notifications');
- _answerNtfySettings(factory.last);
+ await openSettingsSection(tester, 'Notification events');
+ _answerNotificationSettings(factory.last);
await tester.pump();
await tester.pump();
expect(factory.last.decodedOutgoing, hasLength(2));
@@ -203,8 +203,8 @@ void main() {
expect(find.text(serverDetailsPending), findsNothing);
expect(find.text('Server build unavailable'), findsOneWidget);
expect(find.text('Server time unavailable'), findsOneWidget);
- await openSettingsSection(tester, 'Phone notifications');
- _answerNtfySettings(factory.last);
+ await openSettingsSection(tester, 'Notification events');
+ _answerNotificationSettings(factory.last);
await tester.pump();
});
@@ -521,8 +521,8 @@ Future _pump(
await openSettingsSection(tester, 'Connection');
}
-/// Answers the Settings screen's queued ntfy-settings load on [channel].
-void _answerNtfySettings(FakeChannel channel) {
+/// Answers the Settings screen's queued notification-settings load on [channel].
+void _answerNotificationSettings(FakeChannel channel) {
final request = channel.decodedOutgoing.last;
expect(request['type'], 'notification_settings');
channel.reply({
diff --git a/app/test/features/settings/settings_search_page_test.dart b/app/test/features/settings/settings_search_page_test.dart
index cd9defa3..f5f83b61 100644
--- a/app/test/features/settings/settings_search_page_test.dart
+++ b/app/test/features/settings/settings_search_page_test.dart
@@ -48,7 +48,7 @@ void main() {
..._filler(6),
SettingsSection(
id: 'server',
- title: 'Phone notifications',
+ title: 'Notification events',
lazy: true,
builder: (_) => ServerSettingsView(
load: load,
@@ -60,11 +60,11 @@ void main() {
// The local sections are built and the server section is only a skeleton:
// no request runs until the list reaches it.
expect(find.text('filler body'), findsWidgets);
- expect(find.text('Phone notifications'), findsOneWidget);
+ expect(find.text('Notification events'), findsOneWidget);
expect(fetches, 0);
expect(tester.takeException(), isNull);
- await tester.ensureVisible(find.text('Phone notifications'));
+ await tester.ensureVisible(find.text('Notification events'));
await tester.pump();
await tester.pump();
expect(fetches, 1);
@@ -131,8 +131,8 @@ void main() {
..._filler(6),
SettingsSection(
id: 'server',
- title: 'Phone notifications',
- keywords: 'ntfy push',
+ title: 'Notification events',
+ keywords: 'push devices',
lazy: true,
builder: (_) => ServerSettingsView(
load: load,
@@ -144,7 +144,7 @@ void main() {
await tester.enterText(
find.byKey(const ValueKey('settings.search')),
- 'ntfy',
+ 'devices',
);
await tester.pump();
await tester.pump();
diff --git a/compose.yaml b/compose.yaml
index 2f457cfe..afbbfef1 100644
--- a/compose.yaml
+++ b/compose.yaml
@@ -5,23 +5,14 @@ services:
init: true
restart: unless-stopped
stop_grace_period: 60s
- depends_on:
- ntfy:
- condition: service_healthy
environment:
TZ: ${TZ:?Set TZ to your host timezone; scripts/configure-compose.py detects it}
- PIPELINES_NTFY_URL: http://ntfy/pipelines
- PIPELINES_NTFY_PUBLIC_URL: ${NTFY_BASE_URL:?Set the address your Android phone can reach}
PIPELINES_WEB_PUBLIC_URL: ${PIPELINES_WEB_PUBLIC_URL:-}
- PIPELINES_NTFY_TOKEN_FILE: /run/secrets/ntfy_token
PIPELINES_DEFAULT_MODEL: ${PIPELINES_DEFAULT_MODEL:-}
PIPELINES_HOST_IP: ${PIPELINES_HOST_IP:-}
PIPELINES_PUBLIC_PORT: ${PIPELINES_PORT:-8080}
- PIPELINES_NTFY_READER: phone-reader
PIPELINES_UID: ${PIPELINES_UID:-10001}
PIPELINES_GID: ${PIPELINES_GID:-10001}
- secrets:
- - ntfy_token
ports:
- "${PIPELINES_BIND_ADDRESS:-0.0.0.0}:${PIPELINES_PORT:-8080}:8080"
volumes:
@@ -52,37 +43,7 @@ services:
timeout: 5s
retries: 12
start_period: 10s
- ntfy:
- image: binwiederhier/ntfy:latest
- command: serve
- restart: unless-stopped
- environment:
- TZ: ${TZ:?Set TZ to your host timezone}
- NTFY_BASE_URL: ${NTFY_BASE_URL:?Set the address your Android phone can reach}
- NTFY_LISTEN_HTTP: :80
- NTFY_CACHE_FILE: /var/lib/ntfy/cache.db
- NTFY_CACHE_DURATION: 168h
- NTFY_AUTH_FILE: /var/lib/ntfy/auth.db
- NTFY_AUTH_DEFAULT_ACCESS: deny-all
- NTFY_ENABLE_LOGIN: "true"
- NTFY_ATTACHMENT_CACHE_DIR: /var/lib/ntfy/attachments
- NTFY_ATTACHMENT_EXPIRY_DURATION: 168h
- NTFY_ATTACHMENT_TOTAL_SIZE_LIMIT: 1G
- NTFY_ATTACHMENT_FILE_SIZE_LIMIT: 1M
- ports:
- - "${NTFY_BIND_ADDRESS:-0.0.0.0}:8090:80"
- volumes:
- - ntfy-data:/var/lib/ntfy
- healthcheck:
- test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1/v1/health"]
- interval: 5s
- timeout: 3s
- retries: 12
-secrets:
- ntfy_token:
- file: ./secrets/ntfy-token.txt
volumes:
pipelines-data:
opencode-home:
pipelines-workspace:
- ntfy-data:
diff --git a/docs/cli.md b/docs/cli.md
index 37812fd9..6ea943e8 100644
--- a/docs/cli.md
+++ b/docs/cli.md
@@ -78,20 +78,15 @@ the sum of the per-run totals `inspect` shows. Only usage rows whose recorded
step still exists are counted, so rows orphaned by an old history wipe are ignored
(not deleted). `pipelines stats --json` exposes these aggregates.
-Use `:status` on any TUI page to open server and ntfy information. Scroll with
+Use `:status` on any TUI page to open server information. Scroll with
arrows or `j/k`, PgUp/PgDn; `r` refreshes and Esc closes without changing the page.
`pipelines status [--json]` returns the same server data, including hostname,
-start/uptime, the connected server endpoint/port, active interface IPs, ntfy
-publishing health, public phone URL/topic/port and candidate URLs. It does not
-start services or send a notification. The ntfy health probe has a two-second
-deadline; it checks the publishing server, not phone reachability.
+start/uptime, the connected server endpoint/port, active interface IPs and
+candidate URLs. It does not start services or send a notification.
IPs belong to the **server computer or container**, not necessarily the client.
Candidate IP/port combinations are not reachability checks: loopback bindings,
-firewalls, container port mapping and TLS can prevent access. ntfy candidates
-are only derived when a configured endpoint identifies this computer; remote
-ntfy hosts are not misrepresented as local. Publishing URLs and credentials are
-never returned. Missing public phone configuration is labeled explicitly.
+firewalls, container port mapping and TLS can prevent access.
`pipelines service status` remains the separate OS autostart status command.
## Search
@@ -334,7 +329,7 @@ Submitting activates included schedules, so review them before publishing.
| Resume a run parked for a usage limit | `resume ID --yes --json` |
| Default whole-run budget | `run-budget [USD\|off] --json` |
| Connection and phone settings | `connection --json`, `ping --json` |
-| Server/ntfy status popup | `status --json` |
+| Server status popup | `status --json` |
| Usage statistics/charts | `stats --json` |
| Run-history retention | `retention report --keep N --json`, `retention apply --keep N --yes` |
| Retire an unused pipeline | `archive NAME --yes`, `unarchive NAME`, `list --archived` |
@@ -359,13 +354,12 @@ optional `kind` and `limit`) and returns a `search_results` response whose ranke
and matched field. `list_runs` also returns all-history `usage`
aggregates. `attention_acks` reads and `ack_attention` adds to the operator's
shared in-app acknowledgements (dismissed Needs-you entries and chat read
-watermarks; see [ntfy.md](ntfy.md#clearing-notifications-across-devices)); other
+watermarks; see [notifications.md](notifications.md#clearing-notifications-across-devices)); other
connections receive an `attention_acks_changed` push. `subscribe_notifications`
-(optional `after` cursor) streams the same notifications the server publishes to
-ntfy as `notification` pushes, `clear_notifications` (`ids`) clears them on every
-device, and `notifications_cleared` reports clears; `ntfy_enabled` in the
-notification settings turns the ntfy publish off without stopping the stream (see
-[ntfy.md](ntfy.md#app-notification-stream-no-ntfy-app-needed)).
+(optional `after` cursor) streams the operator's notifications as `notification`
+pushes, `clear_notifications` (`ids`) clears them on every device, and
+`notifications_cleared` reports clears (see
+[notifications.md](notifications.md#app-notification-stream-protocol)).
Every run summary (`list_runs` rows, `get_run`, subscribe snapshots and terminal
`run_event` frames) carries `size_bytes`: bytes on disk for the run (artifact tree
@@ -1176,8 +1170,6 @@ or that has no tools block never replays admitted tool work or invalid results.
Budget failures always stop. Cleanup must be confirmed before another attempt.
Existing explicit `retries=0` settings remain unchanged. The old 30-minute run deadline no longer truncates
stage timeouts; the 30-step and five-visits-per-stage limits still apply.
-Native ntfy stages also accept `timeout` (default `1h`), but never automatically
-retry potentially delivered notifications and do not accept model budgets.
Pinned definitions contain the configured limits. Run transcripts retain limits,
attempt counts and reported budget usage, also shown in the TUI's Evidence pane.
diff --git a/docs/docker.md b/docs/docker.md
index 3951fa25..b9452513 100644
--- a/docs/docker.md
+++ b/docs/docker.md
@@ -1,84 +1,72 @@
-# Pipeline server + ntfy in one Compose project (Android)
+# Pipeline server in a Compose project
-## Complete installer (recommended for both services in Docker)
+## Complete installer (recommended for Docker)
Run `./install --docker` from an interactive terminal (Docker is the explicit
`--docker`/`docker` mode; `./install.sh` remains a compatibility alias, and a bare
`./install` now performs the native host installation). It handles Compose
-configuration, ntfy users/permissions/token, image build, container skill install,
-first-time container harness provider login (OpenCode by default; `./install
---docker --harness pi` configures Pi and skips OpenCode login), startup, and an
-authenticated test notification. Choose your own provider in the configured
+configuration, image build, container skill install, first-time container
+harness provider login (OpenCode by default; `./install --docker --harness pi`
+configures Pi and skips OpenCode login), startup and a status check. Choose your
+own provider in the configured
harness; signup/login credentials stay in the Docker volume, not your host
account. Re-run to update while
-preserving `.env`, tokens, histories and volumes. Use `--relogin` to connect another
-provider. No fixed OpenCode Go login is required. Health/publishing checks do not
-prove model inference or phone reception.
-The phone-facing ntfy URL uses the detected LAN IP; both services bind `0.0.0.0` by default.
-There are no networking questions. Advanced URL/bind/timezone flags remain optional.
+preserving `.env`, histories and volumes. Use `--relogin` to connect another
+provider. No fixed OpenCode Go login is required. Health checks do not prove
+model inference. The server binds `0.0.0.0` by default. There are no networking
+questions; `--timezone` and `--port` remain optional.
-The steps below are for manual setup or a developer/legacy local Pipelines server
-with Docker ntfy; they are **not** the supported installation and are not needed when
-you use `./install`.
+Notifications reach the Pipelines apps through the server itself (browser
+notifications in the web app, the **Receive notifications in Pipelines**
+background service or the open app on Android, the app on iOS and macOS); see
+[Notifications](notifications.md). There is no ntfy service any more.
-## Manual developer/legacy: local pipeline server, Docker ntfy
+Re-running `./install --docker` over an installation from before this change
+retires its ntfy: it removes the Compose project's `ntfy` container and
+`_ntfy-data` volume (ntfy's caches and accounts, which nothing reads any
+more), `secrets/ntfy-token.txt` and the `NTFY_BASE_URL`/`NTFY_BIND_ADDRESS` lines
+in `.env`, and recreates the server with `--remove-orphans`. Running it again
+finds nothing left to remove. `./uninstall` removes any leftover ntfy container
+and volume too.
+
+The steps below are for manual setup or a developer/legacy local Pipelines
+server; they are **not** the supported installation and are not needed when you
+use `./install`.
+
+## Manual developer/legacy: local pipeline server
To reuse your host OpenCode login without container authentication (manual,
-developer/legacy use—not a supported installation):
+developer/legacy use, not a supported installation):
```sh
-docker compose up -d ntfy
-# Bootstrap ntfy users/token as described below, then:
sh scripts/run-local-server.sh
go run ./cmd/pipelines-tui -url ws://127.0.0.1:8080/connect
```
-Do not run `docker compose up -d` for this mode: that starts the pipeline container
-too. The local launcher uses the existing host database and OpenCode account,
-publishes via localhost:8090, and advertises `.env`'s `NTFY_BASE_URL` to the TUI.
-The top bar shows **ntfy**, the external server URL, and topic beside the pipeline
-server address on every page.
-No credentials are included in the public setup data. Stop any existing local
-pipeline server before launching another against the same database/port.
+The local launcher uses the existing host database and OpenCode account. Stop
+any existing local pipeline server before launching another against the same
+database/port.
-`compose.yaml` runs two services: `pipelines` (Go server + OpenCode V2) and `ntfy`.
-The pipeline server publishes internally to `http://ntfy/pipelines`; Android connects
-to your host's LAN/VPN URL. No host OpenCode service or credential database is
-mounted. Separate volumes persist pipeline history, workspace files, OpenCode
-credentials/sessions, and ntfy data. Do not use `docker compose down -v` unless
-you intend to delete those volumes.
-
-**Verification:** `docker compose build pipelines` completed, and
-`docker compose up -d ntfy` started ntfy. A local authenticated Markdown upload
-was accepted with a phone-facing attachment URL. The local server's WebSocket
-advertised the public URL/topic and accepted the notification test pipeline.
-Go race tests and vet passed. Pipeline-container startup/model authentication
-and Android delivery are still **not tested**. Existing host history is preserved;
-the local server was restarted with notification configuration. The image now
-also includes python3 so the installer regression suite can run inside the
-container; a real 40x16/80x24/120x36 terminal UI review remains an independent
-step.
+`compose.yaml` runs one service, `pipelines` (Go server + OpenCode V2). No host
+OpenCode service or credential database is mounted. Separate volumes persist
+pipeline history, workspace files and OpenCode credentials/sessions. Do not use
+`docker compose down -v` unless you intend to delete those volumes.
## 1. Local settings
-Start Docker Desktop/Colima/your Docker daemon first. Choose the host address your
-phone can reach. Example (replace the LAN IP):
+Start Docker Desktop/Colima/your Docker daemon first.
```sh
-python3 scripts/configure-compose.py \
- --ntfy-url http://192.168.1.20:8090 \
- --bind-address 0.0.0.0
+python3 scripts/configure-compose.py
docker compose config --quiet
```
The helper detects the **host's timezone** and writes it to `.env`, so the Linux
-containers do not silently schedule in UTC. It refuses to overwrite `.env` or an
-existing token. If detection is unavailable, use `--timezone Europe/London` (or
-your actual IANA timezone). Rerun/edit settings if you move/change timezones.
+containers do not silently schedule in UTC. It refuses to overwrite `.env`. If
+detection is unavailable, use `--timezone Europe/London` (or your actual IANA
+timezone). Rerun/edit settings if you move/change timezones.
-The helper creates an empty, protected token file for bootstrap; no notifications
-are sent until it is filled. `.env`, `secrets/`, and `data/` are git-ignored and
-excluded from image builds. The container publishes port **8080**; the default
+`.env`, `secrets/`, and `data/` are git-ignored and excluded from image builds. The container publishes port **8080**; the default
host mapping is **8081**, bound to host `0.0.0.0`, avoiding the existing native
server on 8080. Query the actual mapped port with
`docker compose port pipelines 8080`. The unauthenticated pipeline WebSocket API
@@ -86,32 +74,11 @@ shares that port, so expose it only on a trusted LAN/VPN and never to the public
internet.
Use HTTP only on a trusted LAN or encrypted VPN. For public access, use HTTPS
-with a reverse proxy/VPN; configure the external URL in `NTFY_BASE_URL`. The
-container's attachment URLs use that external URL, not the internal service name.
-Both host port mappings default to `0.0.0.0`; firewall them appropriately. The
-Pipelines API has no authentication and must not be exposed to untrusted networks.
+with a reverse proxy/VPN. The host port mapping defaults to `0.0.0.0`; firewall
+it appropriately. The Pipelines API has no authentication and must not be
+exposed to untrusted networks.
-## 2. Bootstrap ntfy users and token
-
-```sh
-docker compose up -d ntfy
-docker compose exec ntfy ntfy user add pipeline-publisher
-docker compose exec ntfy ntfy access pipeline-publisher pipelines write-only
-docker compose exec ntfy ntfy user add phone-reader
-docker compose exec ntfy ntfy access phone-reader pipelines read-only
-docker compose exec -T ntfy ntfy token add pipeline-publisher | python3 scripts/save-ntfy-token.py
-```
-
-User creation prompts for passwords. Keep `secrets/` mode **0700** on the host.
-The helper extracts only the raw token (the ntfy CLI includes prose in its response)
-and makes the final file readable inside the non-root pipeline container: local Compose
-file secrets are bind mounts and do not reliably remap uid/mode. Its private parent
-directory protects the source file from other host users. Do not commit tokens
-or paste them into a chat. Recreating/replacing the secret file requires restarting
-the pipeline container. The application accepts `_TOKEN_FILE` or `_TOKEN`, not
-both, and never puts the token in model prompts, outputs, or diagnostics.
-
-## 3. Authenticate the harness, then start the server
+## 2. Authenticate the harness, then start the server
```sh
python3 scripts/build_metadata.py # resolve releases and stamp revision/dirty identity
@@ -151,18 +118,11 @@ bundled example pipelines, seeded once; an existing database is never changed.
Open `:templates` and use **Submit template** to name/review/publish another copy,
or **Customize** to edit it first. All bundled examples are manual-only.
-## 4. Android
+## 3. Notifications
-Install ntfy, add the custom server `http://192.168.1.20:8090` (or your HTTPS/VPN
-URL), sign in as `phone-reader`, and subscribe to **pipelines**. This is the single
-system-wide notification topic, shared by every pipeline. Grant notifications
-and background operation as required by your Android app/device. Outside your
-LAN, enable the VPN or use your HTTPS address. `localhost` on Android is the
-phone, not your server. No iOS/APNS upstream is needed for this Android setup.
-
-Use the app to confirm a test notification and download an attachment before
-relying on unattended schedules. This phone/background-delivery check has **not
-been performed**. Attachments/messages expire after seven days in this config.
+Notifications come through the Pipelines apps, connected to this server; see
+[Notifications](notifications.md). If you subscribed to the old `pipelines`
+topic in the ntfy app, remove that subscription.
## Existing data and rebuilds
@@ -179,8 +139,7 @@ resolves the current releases, use `python3 scripts/build_metadata.py`. A plain
The workspace volume does not automatically replace its existing source tree
on image rebuild; back it up and update it explicitly if you need new source for
Go verification. Do not delete it casually: it may contain user-created artifacts.
-`compose.yaml` still uses ntfy's `latest` tag; pin a tested version/digest before
-production. OpenCode and Pi are not fixed version pins: `./install` resolves the
+OpenCode and Pi are not fixed version pins: `./install` resolves the
current supported OpenCode V2 release from the single documented complete
`GET /repos/{owner}/{repo}/git/matching-refs/tags/v2` response — a complete bounded
array with no page/per_page query and no `Link` pagination (never the moving
diff --git a/docs/first-version-testing.md b/docs/first-version-testing.md
index f70a878f..784c775f 100644
--- a/docs/first-version-testing.md
+++ b/docs/first-version-testing.md
@@ -11,7 +11,7 @@ service or a guarantee that a model's answer is correct.
Docker is optional with `./install --docker`.
3. Open the web address reported by setup. For terminal use, put the installation's
`bin` directory on PATH and run `pipelines` from your project directory.
-4. Setup also starts the authenticated web proxy, server, and ntfy and enables
+4. Setup also starts the authenticated web proxy and server and enables
login startup. See [installation](install.md) for the private web credential
location. The installed CLI's `pipelines service enable` / `service status`
manage that same service; do not start another server manually.
@@ -59,9 +59,7 @@ a new execution can repeat side effects. Never delete data/volumes to fix a run.
Browser alerts require the page to be open; closed-app web push is not supported.
The Android app delivers notifications in the background over its own
-connection. ntfy is an optional fallback channel that works without the
-Pipelines Android app. Installation verifies publishing, not reception. Check
-device reception before relying on it. See [Notifications](notifications.md).
+connection. Check device reception before relying on it. See [Notifications](notifications.md).
## Known limits
diff --git a/docs/install.md b/docs/install.md
index b266753f..477f9123 100644
--- a/docs/install.md
+++ b/docs/install.md
@@ -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 ` |
@@ -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
`/pipelines-install.json`, saves `ws://127.0.0.1:/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= http://127.0.0.1:`.
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 `/logs/install.log`. No credentials are written there.
+2. It stops the old ntfy process from `/ntfy.pid`, but only while that
+ PID's command line is still `/bin/ntfy serve …`; any other PID is
+ left alone and the stale PID file is removed.
+3. It deletes `/bin/ntfy`, `/ntfy.pid`, `/logs/ntfy.log`,
+ `/secrets/publisher-token` and the whole `/data/ntfy/`
+ directory.
+
+`/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 `/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 `_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://:`) |
| `--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 |
| --- | --- |
| `/pipelines-install.json` | manifest (ports, paths, install args, environment) |
-| `/bin/` | `pipelines`, `pipelines-server`, `pipelines-claude-host`, `pipelines-codex-host`, `ntfy` |
+| `/bin/` | `pipelines`, `pipelines-server`, `pipelines-claude-host`, `pipelines-codex-host` |
| `/data/pipelines.db` | SQLite database (definitions, runs, chats, settings) |
| `/data/artifacts/` | run artifacts and session exports |
-| `/data/ntfy/` | ntfy config, cache and accounts |
-| `/secrets/publisher-token` | ntfy publishing token |
-| `/logs/` | `server.log`, `web.log`, `ntfy.log`, `supervisor.log` |
+| `/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
diff --git a/docs/notifications.md b/docs/notifications.md
index 9a69719b..3c55cfef 100644
--- a/docs/notifications.md
+++ b/docs/notifications.md
@@ -1,29 +1,37 @@
# Notifications
-The server records every notification once and delivers it two ways:
+The server records every notification once, in its `app_notifications` table,
+and streams it over the app's own connection (`/connect`) to every signed-in
+Pipelines client, which posts it as a system notification:
-1. **In the Pipelines app** (Android, and the web page while it is open), over
- the app's own connection. No ntfy app is needed.
-2. **ntfy** (optional fallback), for devices that still use the ntfy app.
+- **Web** (each tab and installed web app window): a browser `Notification`,
+ while the page is open and the browser allows it. Closed-browser web push is
+ not implemented.
+- **Android**: the **Receive notifications in Pipelines** background service
+ (keeps its own connection, also with the app closed), or the in-app bridge
+ while the app runs.
+- **iOS and macOS**: the in-app bridge while the app runs.
-The same settings decide what is sent on both paths.
+No other app, server or account is involved. (Earlier versions also published
+to a self-hosted ntfy server; that was removed. See
+[Upgrading from ntfy](#upgrading-from-ntfy).)
## What notifies
| Event | When |
| --- | --- |
| Run needs your decision | a run reaches a human decision stage (runs not set to Silent) |
-| Run failed / succeeded | runs started with **Notify me** (`--notify on`), or every run when **Notify when any run ends** is on |
-| Stage hook | a stage's own `notify` block fires ([ntfy reference](ntfy.md)) |
+| Run failed / succeeded | runs started with **Notify me** (`--notify on`), or every run when **Notify when any run ends** is on; unexpected failures always |
+| Stage hook | a stage's own `notify` block fires ([below](#stage-notify-hooks)) |
| Chat needs you | a chat asks a question or requests approval |
| Chat replied | an assistant turn ends (off by default) |
| Agent notification | a chat's agent calls its `notify` tool (always on; a turn that notified sends no separate "Chat replied") |
+| Schedule delayed / skipped | a scheduled run could not start on time (low priority) |
-Each event notifies once, on every device signed in (each web tab or installed
-web app window, the Android app, the macOS app) and on ntfy. Opening the chat
-or run, tapping the notification, or dismissing it in the app or the Android
-notification shade clears it on every device, including the ntfy app for chat
-notifications (see [Clearing notifications across devices](ntfy.md#clearing-notifications-across-devices)).
+Each event notifies once, on every signed-in device. Opening the chat or run,
+tapping the notification, or dismissing it in the app or the Android
+notification shade clears it on every device (see
+[Clearing notifications across devices](#clearing-notifications-across-devices)).
Chat events do not need the chat to be open. When the last app or browser
leaves a chat whose turn is still running, or which has an unanswered question
@@ -61,48 +69,170 @@ In the app, **Settings**:
- **Allow background delivery**: asks Android to exempt Pipelines from battery
optimisation so delivery stays instant while the phone is idle. Grant it.
-**Phone notifications** (stored on the server, shared by every device):
+**Notification events** (stored on the server, shared by every device):
-| Setting | Default |
-| --- | --- |
-| Notify when any run ends (otherwise only runs started with **Notify me**) | off |
-| Chat needs your answer or approval | on |
-| Chat reply finished | off |
-| Also send to ntfy (for devices that still use the ntfy app) | on |
+| Setting | Key | Default | Effect |
+| --- | --- | --- | --- |
+| Notify when any run ends | `run_finished` | off | every **auto**-mode run that fails or succeeds notifies; otherwise only runs started with **Notify me** announce their end |
+| Chat needs your answer or approval | `chat_needs_you` | on | chat questions/forms and approval requests notify |
+| Chat reply finished | `chat_reply_finished` | off | each finished assistant turn notifies |
-Turning **Also send to ntfy** off stops publishing to ntfy; the app still
-receives everything.
+They are stored in the server database (`server_settings`, keys `notify.*`) and
+survive restarts. Per-stage `notify` hooks are not affected by them. Over the
+websocket protocol, `{"type":"notification_settings"}` reads them and
+`{"type":"set_notification_settings","notification_settings":{"chat_reply_finished":true}}`
+changes any subset; both reply with type `notification_settings` carrying every
+key. Unknown keys and non-boolean values are refused with an `error` reply and
+nothing is written. The removed `ntfy_enabled` key is accepted and ignored, so an
+older app's switch does not fail; a stored `notify.ntfy_enabled` row is never
+read.
+
+`run_finished` changed meaning once: it meant "auto runs announce success" and
+defaulted on. It is stored under `notify.any_run_ended`, so a value saved under
+the old meaning (`notify.run_finished`) is ignored.
Per run, choose **Notify me**, the default (auto), or **Silent** when starting
it. From the CLI: `pipelines run … --notify on|auto|off`.
-## The web app
+## Run notifications
-The web page shows notifications only while it is open and the browser allows
-them. Closed-browser web push is not implemented.
+Independently of any `notify` block, the server records one run-level
+notification when a run needs a person or ends and was marked to notify:
-## ntfy (optional)
+| Run notify mode | Enters `waiting` | Fails / succeeds |
+| --- | --- | --- |
+| **on** ("Notify me", `--notify on`) | `Run needs your decision` | `Run failed` / `Run succeeded` |
+| **auto** (default) | `Run needs your decision` | unexpected failure or interruption; success only when **Notify when any run ends** is on |
+| **off** ("Silent") | silent | silent |
-`./install` builds and runs ntfy on port 8090 with a private `pipelines` topic.
-The installer prints the subscription details at the end, and
-`pipelines doctor` repeats them (`Phone server … · topic: pipelines ·
-username: phone-reader`).
+A deliberate route to `#failure` with its reason is an expected failure: it does
+not notify in auto mode. Queued, running and canceled runs are silent. The
+setting is read in the same transaction that records the run's final state.
-To subscribe from the ntfy app:
+Run events go through a durable outbox (`run_notifications`): the event is
+queued with the run's state change and recorded on the app stream at once; a
+crash before it is recorded is recovered after a restart. A run that stays
+`waiting` is not announced again on a read or restart, and a stage `notify` hook
+that already covered the same event (`on=waiting`, or a failure hook)
+suppresses the run-level one, so one event means one notification. A
+notification problem is logged and never changes the run.
-1. Add a server: the ntfy address (default `http://:8090`, or the
- `--ntfy-url` you installed with). Off your home network, use a VPN such as
- Tailscale.
-2. Sign in as `phone-reader`. A freshly created account uses the web sign-in
- password; an account kept from an earlier install keeps its old password.
-3. Subscribe to the topic `pipelines`.
+A tap opens `pipelines://run/` in the app (the web app opens the same run).
-A tap opens `pipelines://run/` or `pipelines://chat/` in the Android
-app; the **Open in browser** action opens the same page on
-`PIPELINES_WEB_PUBLIC_URL`.
+## Stage notify hooks
-Notifications already shown by the ntfy app cannot be retracted by the server;
-swipe them away there.
+Every stage can have an optional `notify` block:
-See [ntfy reference](ntfy.md) for stage `notify` hooks, explicit ntfy stages,
-the app notification protocol and network troubleshooting.
+````markdown
+# stage compose
+
+```notify
+on=success,failure
+open=*.md
+link=standup-link.txt
+```
+````
+
+- `on` is `success`, `failure`, `waiting`, or a comma list. A failure is an
+ execution error, the `error` outcome, or a route to `#failure`; any other
+ completed stage is a success. It reports the stage's result, not the run's.
+- For a sequential workflow whose error routes go to `#failure`, add
+ `on=failure` to intermediate stages and `on=success,failure` to the final
+ stage: one notification on every normal terminal path, without progress
+ alerts.
+- `open=` attaches one file from the run's shared `public/` directory
+ to the notification (with a short text preview) and makes a tap open it. The
+ pattern is a relative glob without absolute paths, `..` or hidden segments;
+ the most recently modified match wins. Without `open=`, exactly one regular
+ file in `public/` is attached automatically; zero or several attach nothing.
+- `link=` makes a tap open a URL the stage produced (for example a
+ published doc): the matched `public/` 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. A missing file or invalid URL keeps the
+ usual tap target and is noted on the stage's notification receipt.
+- `artifacts=` and `destination=` lines from older definitions still parse but
+ do nothing: they configured ntfy attachments and connections.
+
+Hooks run after the stage completes and before the run's final status is saved.
+They are not a finalizer for cancellation, crashes or runtime limits, and loops
+can notify more than once. The receipt (recorded or not) appears in the stage's
+**Metadata**; it never changes routing.
+
+The former `type=ntfy` delivery stage was removed. A definition that still uses
+it is refused by validation with: "ntfy stages were removed; notifications go
+to the Pipelines apps — use the stage notify hook".
+
+## Clearing notifications across devices
+
+The app's attention state is shared through the server: dismissing an entry or
+using **Clear all** in the Needs-you sheet, and opening a chat (which clears its
+**New** badge), clears it on every connected browser and phone at once, and on a
+disconnected device when it next connects. The protocol is
+`{"type":"attention_acks"}` (read the whole set) and
+`{"type":"ack_attention","attention_acks":{"dismissed":["42:Failed"],"chat_seen":{"ses_x":1730000000000}}}`
+(add to it). Both reply `attention_acks`, and every other connection receives an
+`attention_acks_changed` frame. Acknowledgements for deleted runs or sessions,
+or older than 30 days, are pruned.
+
+Every client removes its system notification when the clear reaches it:
+
+- **Web**: the page closes the browser `Notification` with that tag and tells
+ the origin's other tabs to close theirs over a `BroadcastChannel`. A click
+ sends `clear_notifications`. A browser *close* event is not reported back
+ (browsers raise it for timeouts and same-tag replacements too).
+- **Android with Receive notifications in Pipelines**: the background service
+ cancels it; a tap or a swipe sends `clear_notifications`.
+- **Android without the service, iOS and macOS** (the in-app bridge while the
+ app runs): it is removed by its tag; a tap clears it. A swipe is not reported.
+
+## App notification stream (protocol)
+
+```text
+→ {"type":"subscribe_notifications","id":"1","after":"run:7:3:waiting"}
+← {"type":"notifications_subscribed","id":"1","notifications":[N...],"ids":["",...]}
+← {"type":"notification","notification":N} (push)
+← {"type":"notifications_cleared","ids":["run:7:3:waiting"]} (push)
+→ {"type":"clear_notifications","id":"2","ids":["run:7:3:waiting"]}
+← {"type":"notifications_cleared","id":"2","ids":[]}
+
+N = {"id":"run:7:3:waiting","kind":"run_waiting","title":"Run needs your decision",
+ "message":"Run #7 · release · waiting for a human decision at stage approve",
+ "click":"pipelines://run/7","priority":3,"tags":[],
+ "created_at":"2026-11-01T10:00:00Z","group":"run:7"}
+```
+
+- `id` is stable: `run:::` (event `waiting`, `failed`,
+ `succeeded`, or `success` for a mid-run stage hook),
+ `chat::