imsd-messages/README.md

48 lines
1.4 KiB
Markdown
Raw Normal View History

# imsd-messages
The SMS app for [imsd](https://forgejo.catcrafts.net/Catcrafts/imsd) on Linux
phones. imsd 2.0.0 carries texts over IMS and keeps them until a messaging
app takes them; this is that app. It speaks imsd's
Bus: the GDBus client, imsd's dictionaries, the notifier and the owned name The GLib side of the app. Variant reads imsd's Received dictionary by key and type as its SmsVariant writes it (`to`, the number the text arrived for, a tel: URI read like the status's `ppi`; `operator`, the SIM it arrived under), the GetStatus one with the subscriber's own number and the SIM's operator in it (`ppi`, a tel: URI as the frozen interface gives it; `operator`), and maps a GError to the core's error kinds off GDBus's own mapping. Client is the Sync logic's transport: asynchronous calls with their continuations as user data — every reply guarded where it is delivered (OnCallDone), as are the signal handlers and the name watch's callbacks: a throw is a fault the events hear, not the end of the process — the calls behind imsd's polkit gate allow interaction: Subscribe, List and Delete wait two minutes; Send has no bound of the client's, since imsd sends the text once its prompt lets the call through, however late, and a Send given up on would be failed by Sync and be sent all the same; GetStatus ten seconds — (one call: the Messaging status carries the own number, imsd reading both from one snapshot; AGENTS.md §1 names both interfaces), the Messaging and RegistrationChanged signals, and a watch on net.catcrafts.IMS1 whose appeared callback is where Sync subscribes. Notifier shows one desktop notification per conversation and replaces it as more texts arrive: one Notify at a time per conversation, since the id to replace comes with the answer; its default action asks the app for that conversation; the body is escaped when the server renders markup (GetCapabilities, asked once; Plasma and GNOME do), so a text's '<' or '&' shows as typed. Instance owns net.catcrafts.ImsdMessages and serves org.freedesktop.Application there, the Desktop Entry Specification's interface of a running application: Activate, Open and ActivateAction, each with its platform data — sent empty and not read: nothing in the app can use an activation token yet — and one action, quit, any other refused (the object registered before the name is asked for, so a launch that forwards the moment the name is granted finds it; Own tells a name another instance holds from a request that failed or was refused, and keeps the error's words); it forwards a call to the owner. project.cpp computes the gio flags once for the bus library, the executable and the Decode test. Tested: tests/Decode (every key of imsd's Received dictionary, one with ten of them, GetStatus, the own number, the SIM's operator, the error kinds, the markup escape, the parameters of the instance's three calls).
2026-10-17 23:45:29 +02:00
`net.catcrafts.IMS1.Messaging` D-Bus interface: no ModemManager, no
modem.
ci: build the aarch64 flatpak and publish it The flatpak is built after the tests for pull requests, when started by hand and for a pushed tag X.Y.Z. Only the tag's run publishes: the flatpak to the Catcrafts flatpak repository as its stable branch, the app's ref file beside the repository with the repository's key in it — the checkout's file, read as the build user like every file of the checkout, made before anything is published, so a file that cannot carry the key publishes nothing, and moved into place after it — and release X.Y.Z on the forge with the metainfo's notes, the bundle and that ref file. A push to main without a tag runs nothing. That is the release model of Crafter.Build 6: every push to main is a release, made by the tag the owner signs and pushes with it. packaging/release-version.sh makes that workflow's checks — the tag is the version of the app and of the metainfo's newest release, annotated and signed by the owner as Forgejo verifies it, on main, and newer than every release published — and in every run checks the app's version against the metainfo's, as the version's comment in Model.cppm now says. Release runs share a concurrency group, so one queues behind another. Two jobs, by trust: check builds a pull request or a run by hand with neither the published repository nor its key, publish builds a pushed tag, and only its volumes feed what is signed. Both run on the organisation's privileged flatpak runner: check cold, with no host volume; publish with the four volumes it mounts — the crafter-build installation the organisation's publish jobs share, this app's own cache, the repository and the key — which the runner's config must allow. It publishes into the repository Crafter.Build's and Crafter.Review's workflows publish to, under the lock each of them holds while it commits and updates the summary, signed with the same key, which stays on the runner host, and keeps its bundle as an artifact. The pacman and flatpak downloads get five tries, 30 s apart: Flathub's CDN and Arch's Fastly mirror answer 502 now and then, flatpak reports a summary it could not fetch as a missing runtime, and a mirror answering 502 can fail a pacman transaction even with another mirror behind it. The README says how to install it and how to stop it starting at login; AGENTS.md describes CI, a release, what guards the volumes and which of them the runner must allow, and names what a released copy leaves on a phone that later releases keep good: the stored rows and their enumerators, the conversation key, the app id and the login entry's command, the instance's interface.
2026-10-20 23:50:39 +02:00
Install the flatpak (aarch64) from the Catcrafts remote; its runtime comes
from Flathub:
```sh
ci: build the aarch64 flatpak and publish it The flatpak is built after the tests for pull requests, when started by hand and for a pushed tag X.Y.Z. Only the tag's run publishes: the flatpak to the Catcrafts flatpak repository as its stable branch, the app's ref file beside the repository with the repository's key in it — the checkout's file, read as the build user like every file of the checkout, made before anything is published, so a file that cannot carry the key publishes nothing, and moved into place after it — and release X.Y.Z on the forge with the metainfo's notes, the bundle and that ref file. A push to main without a tag runs nothing. That is the release model of Crafter.Build 6: every push to main is a release, made by the tag the owner signs and pushes with it. packaging/release-version.sh makes that workflow's checks — the tag is the version of the app and of the metainfo's newest release, annotated and signed by the owner as Forgejo verifies it, on main, and newer than every release published — and in every run checks the app's version against the metainfo's, as the version's comment in Model.cppm now says. Release runs share a concurrency group, so one queues behind another. Two jobs, by trust: check builds a pull request or a run by hand with neither the published repository nor its key, publish builds a pushed tag, and only its volumes feed what is signed. Both run on the organisation's privileged flatpak runner: check cold, with no host volume; publish with the four volumes it mounts — the crafter-build installation the organisation's publish jobs share, this app's own cache, the repository and the key — which the runner's config must allow. It publishes into the repository Crafter.Build's and Crafter.Review's workflows publish to, under the lock each of them holds while it commits and updates the summary, signed with the same key, which stays on the runner host, and keeps its bundle as an artifact. The pacman and flatpak downloads get five tries, 30 s apart: Flathub's CDN and Arch's Fastly mirror answer 502 now and then, flatpak reports a summary it could not fetch as a missing runtime, and a mirror answering 502 can fail a pacman transaction even with another mirror behind it. The README says how to install it and how to stop it starting at login; AGENTS.md describes CI, a release, what guards the volumes and which of them the runner must allow, and names what a released copy leaves on a phone that later releases keep good: the stored rows and their enumerators, the conversation key, the app id and the login entry's command, the instance's interface.
2026-10-20 23:50:39 +02:00
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak remote-add --if-not-exists catcrafts https://flatpak.catcrafts.net/catcrafts.flatpakrepo
ci: build the aarch64 flatpak and publish it The flatpak is built after the tests for pull requests, when started by hand and for a pushed tag X.Y.Z. Only the tag's run publishes: the flatpak to the Catcrafts flatpak repository as its stable branch, the app's ref file beside the repository with the repository's key in it — the checkout's file, read as the build user like every file of the checkout, made before anything is published, so a file that cannot carry the key publishes nothing, and moved into place after it — and release X.Y.Z on the forge with the metainfo's notes, the bundle and that ref file. A push to main without a tag runs nothing. That is the release model of Crafter.Build 6: every push to main is a release, made by the tag the owner signs and pushes with it. packaging/release-version.sh makes that workflow's checks — the tag is the version of the app and of the metainfo's newest release, annotated and signed by the owner as Forgejo verifies it, on main, and newer than every release published — and in every run checks the app's version against the metainfo's, as the version's comment in Model.cppm now says. Release runs share a concurrency group, so one queues behind another. Two jobs, by trust: check builds a pull request or a run by hand with neither the published repository nor its key, publish builds a pushed tag, and only its volumes feed what is signed. Both run on the organisation's privileged flatpak runner: check cold, with no host volume; publish with the four volumes it mounts — the crafter-build installation the organisation's publish jobs share, this app's own cache, the repository and the key — which the runner's config must allow. It publishes into the repository Crafter.Build's and Crafter.Review's workflows publish to, under the lock each of them holds while it commits and updates the summary, signed with the same key, which stays on the runner host, and keeps its bundle as an artifact. The pacman and flatpak downloads get five tries, 30 s apart: Flathub's CDN and Arch's Fastly mirror answer 502 now and then, flatpak reports a summary it could not fetch as a missing runtime, and a mirror answering 502 can fail a pacman transaction even with another mirror behind it. The README says how to install it and how to stop it starting at login; AGENTS.md describes CI, a release, what guards the volumes and which of them the runner must allow, and names what a released copy leaves on a phone that later releases keep good: the stored rows and their enumerators, the conversation key, the app id and the login entry's command, the instance's interface.
2026-10-20 23:50:39 +02:00
flatpak install catcrafts net.catcrafts.ImsdMessages
```
It asks the desktop to start it at login without a window. To stop that:
```sh
flatpak permission-set background background net.catcrafts.ImsdMessages no
rm -f ~/.config/autostart/net.catcrafts.ImsdMessages.desktop
```
## Building
This project uses [Crafter.Build](https://forgejo.catcrafts.net/Catcrafts/Crafter.Build):
```sh
crafter-build # the executable
crafter-build test # the unit tests
crafter-build lint # the house-style rules
```
ci: build the aarch64 flatpak and publish it The flatpak is built after the tests for pull requests, when started by hand and for a pushed tag X.Y.Z. Only the tag's run publishes: the flatpak to the Catcrafts flatpak repository as its stable branch, the app's ref file beside the repository with the repository's key in it — the checkout's file, read as the build user like every file of the checkout, made before anything is published, so a file that cannot carry the key publishes nothing, and moved into place after it — and release X.Y.Z on the forge with the metainfo's notes, the bundle and that ref file. A push to main without a tag runs nothing. That is the release model of Crafter.Build 6: every push to main is a release, made by the tag the owner signs and pushes with it. packaging/release-version.sh makes that workflow's checks — the tag is the version of the app and of the metainfo's newest release, annotated and signed by the owner as Forgejo verifies it, on main, and newer than every release published — and in every run checks the app's version against the metainfo's, as the version's comment in Model.cppm now says. Release runs share a concurrency group, so one queues behind another. Two jobs, by trust: check builds a pull request or a run by hand with neither the published repository nor its key, publish builds a pushed tag, and only its volumes feed what is signed. Both run on the organisation's privileged flatpak runner: check cold, with no host volume; publish with the four volumes it mounts — the crafter-build installation the organisation's publish jobs share, this app's own cache, the repository and the key — which the runner's config must allow. It publishes into the repository Crafter.Build's and Crafter.Review's workflows publish to, under the lock each of them holds while it commits and updates the summary, signed with the same key, which stays on the runner host, and keeps its bundle as an artifact. The pacman and flatpak downloads get five tries, 30 s apart: Flathub's CDN and Arch's Fastly mirror answer 502 now and then, flatpak reports a summary it could not fetch as a missing runtime, and a mirror answering 502 can fail a pacman transaction even with another mirror behind it. The README says how to install it and how to stop it starting at login; AGENTS.md describes CI, a release, what guards the volumes and which of them the runner must allow, and names what a released copy leaves on a phone that later releases keep good: the stored rows and their enumerators, the conversation key, the app id and the login entry's command, the instance's interface.
2026-10-20 23:50:39 +02:00
The flatpak's build is in [AGENTS.md](AGENTS.md).
## License
GPL-3.0-only - see [LICENSE](LICENSE). The bundled font (Noto Sans) is under
the SIL Open Font License 1.1, see [assets/OFL.txt](assets/OFL.txt).
## Funding
https://catcrafts.net/shop/donation - see [FUNDING](FUNDING.yml)
## Copyright
Copyright (C) 2026 Catcrafts® [catcrafts.net](https://catcrafts.net/)