Platform APIs
Taunus programs share functionality in two ways:
- Rust libraries (
libs/), linked into the program: settings, paths, the device profile, Wi-Fi and Bluetooth, the language model, ringtones, the camera. - Services: long-running daemons that own something (alarms, accounts, the microphone, keys) and talk
JSON lines over Unix sockets in
$XDG_RUNTIME_DIR. Any program of the session user can use them.
| Service | Socket | Owns |
|---|---|---|
taunus-shell | taunus-shell.sock (text) | windows, navigation, the lock screen, the passcode screen |
taunus-clockd | taunus-clockd.sock | alarms, the timer, the stopwatch; rings |
taunus-accountsd | taunus-accountsd.sock | online accounts and their secrets, calendar sync, the online assistant |
taunus-voice | taunus-voice.sock | the wake word and speech recognition |
taunus-castd | – | the device as a speaker (Bluetooth, AirPlay) |
taunus-keyd, taunus-authd | /run/… (root) | per-app encryption keys; the passcode |
When something may be useful to more than one program, it becomes a service or a library rather than code inside
one app (the alarm rings from taunus-clockd, not from the Clock app).
Protocol conventions
- One JSON object per line, UTF-8,
\n-terminated. - On connecting, a client gets the full state; after every change, again. Clients don't poll.
- A request may carry
"rid"; the reply echoes it ({"reply": rid, …}). - Errors are
{"error": "message"}.
//2bi: each service has a typed client crate (taunus-clockd::Client, taunus-accounts::Client) with the request
and state types, so apps don't write JSON by hand, and the protocol carries a version ({"hello": 1} on connect)
so old clients keep working.
//2bi: apps reach services and the shell through one public, permission-checked API (D-Bus org.taunus.* on the
session bus) instead of private sockets; see The shell.