Add server notification settings with app checkboxes

Persist three global ntfy switches in server_settings: run_finished
(default on: auto-mode runs notify on success, read inside the
transition transaction; on/off modes unchanged), chat_needs_you
(default on: gates chat question/approval alerts) and
chat_reply_finished (default off: one alert per finished assistant
turn). Expose notification_settings / set_notification_settings over
the websocket protocol, add a Phone notifications section with
Material and Cupertino checkboxes in Settings, document the settings,
and keep the cli, tui, stage and pipeline test packages from
inheriting a real ntfy configuration.
This commit is contained in:
2026-10-30 21:36:27 +00:00
parent 39d9150c3a
commit 498c6f17a6
26 changed files with 1381 additions and 28 deletions
+8
View File
@@ -108,6 +108,11 @@ func HandlerWithOptions(ctx context.Context, options Options, stores ...*pipelin
}
hub.baseCtx = ctx
hub.registry = registry
var settingsStore notificationSettingsStore
if len(stores) > 0 {
settingsStore = stores[0]
}
hub.settings = settingsStore
mux.HandleFunc("GET /artifacts/{run}/{step}/{name...}", func(w http.ResponseWriter, r *http.Request) {
if runs == nil {
http.NotFound(w, r)
@@ -188,6 +193,9 @@ func HandlerWithOptions(ctx context.Context, options Options, stores ...*pipelin
if handleChat(connCtx, request, options.Chat, hub, registry, clientID, write) {
continue
}
if handleNotificationSettings(ctx, request, settingsStore, write) {
continue
}
if handleRunEvents(request, events, runs, clientID, write) {
continue
}