Expand description
Linux notification backend — SPEC_OS_NOTIFICATIONS_SYSTEM_2026_09_24.md §6.3.
freedesktop Desktop Notifications (org.freedesktop.Notifications) spoken
directly over async zbus on the launcher’s Tokio runtime — no libnotify,
no GTK, no blocking D-Bus calls. One task owns the session-bus connection:
Notifywithreplaces_id= the server id last used for this tag, so a same-group update replaces in place (spec §5.3);CloseNotificationfor retract / clear-all;ActionInvoked("default")→ click,NotificationClosed(reason 2)→ user dismissal (1 = expired, 3 = closed by us — neither is feedback).
Clicks only reach a process still on the bus — fine, the launcher lives for the whole session (and clears its notifications on exit).
Content safety (§9.1): if the server advertises body-markup, the body is
escaped so agent-influenced text can’t inject markup. The summary is never
markup per the spec.
Structs§
Enums§
- Cmd 🔒
Constants§
Functions§
- closed_
is_ user_ dismissal - Map a
NotificationClosedreason to user feedback: only 2 (“dismissed by the user”) counts. - delivery
(urgency, expire_timeout, resident)for a notification.- escape_
markup - Escape for servers that parse the body as (a subset of) markup.
- run 🔒
- texts
(summary, body)exactly as sent — pure, so the escaping rule is testable. (The freedesktop “summary” is our title.) The agent’s session summary has no slot of its own on Linux, so it is the body’s last line (rich-content spec §1.3), escaped like the rest of the body.