build-aux/release.sh cuts a release from main: it bumps the version in
meson.build/Cargo.toml/Cargo.lock, generates the AppStream release entry from
CHANGELOG.md, builds and signs the distribution tarball, tags it, and publishes
to Gitea (gt release create), the AUR, and Nostr (ngit release publish). Every
outward-facing step is skippable (--no-push/--no-release/--no-aur/--no-nostr),
so a build can be prepared and reviewed before it goes anywhere.
Signing is SSH-only (git's gpg.format=ssh): an annotated tag plus an
ssh-keygen -Y sign detached signature over the tarball. That lets the key stay
on a laptop — run the script under ssh -A and the forwarded agent signs, so the
key material never lands on the build host.
Also:
- CHANGELOG.md: the single source of release notes (Keep a Changelog).
- build-aux/gen-metainfo-releases.py: generates the metainfo <releases> block
from it, translating the version dialect (1.0.0-beta.1 -> 1.0.0~beta.1, with
type=development) and exposing --notes for the release notes text.
- build-aux/aur/{regent,regent-git}: the AUR recipes (release tarball and VCS).
- build-aux/regent-dev: the working-tree package, renamed from regent-git to
make room for the AUR regent-git; deploy-dev.sh --pkg builds this one.
- .ngit/release.yaml: the NIP-82 release manifest (Blossom mirror at
blossom.kosmos.org), replacing the hand-rolled NIP-94/30063/32267 plan.
- Docs: README (install + verify), doc/dev/development.md (Releasing),
AGENTS.md (Releases).
This adds tooling only: it cuts no tag and publishes nothing.
Every key in the app is now the same kind of thing: `plain::key` /
`.key-value` renders it in the monospace font at the size the label already
has, as a fixed `head…tail` cut, so a column of them lines up. Deliberately
not libadwaita's `.monospace`, which also switches to the code size and, on an
`AdwActionRow`, takes the field name with it. The identities list shows the
name over the key alone (it used to be "Profile · npub" on one line, where a
long profile name ate the key's tail), and the switcher keeps its own shorter
npub cut and renders it at `.caption`: a key is never body-sized there, and the
row's bold *name* stays the loudest thing in it.
The switcher's second line prefers a NIP-05 address — but only one the domain
has confirmed for exactly this key, because a kind-0's `nip05` is
self-declared and that line is where an identity is identified.
`store::nip05` parses the address strictly (it becomes an HTTPS request, so a
sloppy parse would be an SSRF), asks
`https://<domain>/.well-known/nostr.json?name=<local>` through the icons'
hardened fetch — now split into `fetch_https(url, Content)`, the app's single
HTTP path — and shows the address only while `nip05_ok == nip05`. A
re-declared or forged address is unverified again immediately, a slow answer
for a changed one is dropped, and a failed check costs a day.
Names are no longer invented: no "Identity 3" and no "Imported 1". The create
dialog starts empty, import carries a Name field that is prefilled from a
cached profile as soon as the pasted string decodes to a key, and an empty
field stores no label at all. A discovered profile name trumps the label for
display (`identity_label`), which is what happens for a key imported before
its profile was known — the label itself is never overwritten.
The plain `AdwDialog`s with the accept button in the header bar are not
wanted; restore the `AdwAlertDialog` versions of "Create an identity key" and
"Import an identity key".
The clipping they were meant to fix was the window height, not the dialog
style: the identities window is a fixed size and GTK never resizes a mapped
window, so its default has to fit the first-run empty state and the dialogs.
Keep the taller window (420x560); the width goes back to the original 420.
Reverts most of the previous commit.
The identities window is a fixed size and GTK never resizes a mapped window,
so its default has to fit the first-run empty state. At 420x480 it did not:
the `AdwStatusPage` overflowed (its buttons were cut off), and so did the
"Create an identity key" / "Import an identity key" dialogs, which are
presented as overlays inside the same window.
- Size the window 480x560. 480 wide also drops the empty state's description
from four lines to three.
- Rebuild create/import as plain `AdwDialog`s in the "Connect an app" shape: a
header bar with Cancel and the accept button over a scrolling body. An
`AdwAlertDialog`'s message area only *propagates* its natural height
(`adw-alert-dialog.c`), so a form taller than the window grows past it and is
clipped instead of scrolling. The new dialog's body scrolls and its buttons
stay pinned.
- Keep the dialog open when creating/importing fails, so a passphrase mismatch
can be corrected (the old alert closed before reporting the error).
Rename/export/remove stay `AdwAlertDialog`s: they are single-field or one-line
and fit.
With both builds installed, both desktop files claimed
`x-scheme-handler/nostrconnect`, and the nightly deploy left the default
unset — so which app opened a link was decided by GIO's handler order, and
the nightly (whose vault has its own, often empty, identity) could end up
receiving links it could not pair.
The nightly desktop file no longer declares the scheme: system
integrations belong to the installed release. The nightly still accepts a
`nostrconnect://` argument (`HANDLES_OPEN`) and pairs through "Connect an
app…", it is just never the default handler.
GIO keeps honouring a `mimeapps.list` default even after the desktop file
stops claiming the scheme (verified), so `regent-deploy` also hands a stale
nightly association back by dropping the entry, leaving the stable build as
the only remaining handler.
Fix the second half too: a link-opened pairing presents no "Connect an app"
dialog, so `ConnectDialog::report_error` was parenting its alert to that
never-presented dialog (`self.window()` is `None`), and any failure — a bad
URI, or a build with no identity key — was silent. It now falls back to
`Windows::visible_parent()`, like every other pointer route.
A `-Dprofile=development` build is a separate application identity: the app
id carries a `.Devel` suffix, and the desktop file, AppStream id, icon,
GSettings schema id/path, GResource bundle name, D-Bus name and data
directories all follow, with a `regent-devel` binary so it installs beside
the stable one instead of replacing it. The Rust side switches `APP_ID` on
a cargo `devel` feature (a feature, not an env var, so the shared cargo
target dir cannot return a binary built for the other profile); the
metadata files become `.in` templates configured from `app_id`.
The nightly uses the banded nightly app icon and libadwaita's striped
`devel` header bar. The dev deploy selects it with
`REGENT_PROFILE=development`; the release `--pkg` build stays stable, and a
nightly install leaves the `nostrconnect://` scheme handler to the stable
build.
Two Meson details this depends on: the GResource prefix is fixed by
`resources.gresource.xml` (not the resource id) and is shared by both
profiles, and `gnome.compile_schemas()` scans the source directory, so the
generated schema is compiled by a `glib-compile-schemas` target instead.
Closing the main window now asks whether to keep Regent running in the
background or to quit, and remembers the choice (reversible in
Preferences). A backgrounded Regent still answers requests: the approval
drain presents the hidden window for a prompt and hides it again once the
whole request is answered, so the application that asked regains focus.
The two-window invariant becomes "the main window is presentable exactly
when the responder can serve prompts". With no key, or a stopped signer,
closing still quits.
A StatusNotifierItem (ksni) adds Show/Hide Regent, Preferences and Quit;
it is menu-only on activate, because GNOME's AppIndicator extension waits
out the double-click interval whenever an Activate method exists. A new
"Background" preference group carries the close action, the icon toggle
and start-at-login, which registers with org.freedesktop.portal.Background
(so GNOME lists the app under Background Apps) and starts it with
--background.
Also: dialogs parent to the visible window rather than the primary one, a
signer start-failure dialog is suppressed while the window is hidden, and
the Requests group moves to the bottom of Preferences.
Applications declare a name, URL and image in their pairing metadata; Regent
already stored the image but never rendered it. It now fetches, caches and
shows it as a 32px avatar on the Apps page and beside "Application" in the
approval dialog, with a "Load app icons" preference to turn fetching off.
The URL is attacker-controlled, so the new src/store/icons.rs is mostly a
security boundary: https only (plus inline data: URLs that never leave the
process), every resolved address must be public (loopback, private, link-local,
CGNAT, reserved, multicast and IPv6 ULA/mapped-v4 are refused, fail-closed on a
mixed answer), the validated addresses are pinned with a client per fetch
(resolve_to_addrs is baked in at build time, so a shared client could not carry
the pin), redirects are re-validated and re-pinned hop by hop, the body is
capped at 1 MiB, and only PNG/JPEG/GIF/WebP pass — by magic bytes, so an SVG is
rejected before it can reach the decoder. A `.url` sidecar records the URL last
attempted, so a failed icon is never retried on every change ping; the cache
lives in the XDG cache dir, keyed by the client key and mode 0600.
No fetch happens before consent: the approval dialog shows initials for a first
pairing and the cached icon only for an app the user already approved. The name
stays the identifier; the icon is decoration, never the sole identifier.
Adds reqwest (rustls-tls, no default features), base64, and tokio's net feature.
Register the scheme (x-scheme-handler/nostrconnect) in the desktop file, with
`Exec=regent %u`, so a clicked link is offered to Regent; `regent-deploy` sets
it as the default with `xdg-mime`, asking first if another app already handles
it.
The GUI claims G_APPLICATION_HANDLES_OPEN and pairs straight from a link's URI
over the main window, reusing the "Connect an app" flow (begin_pairing now takes
the widget to parent the approval dialog to). One trap: `run_with_args` passes
the slice as argv verbatim, so a lone URI became argv[0] — the program name —
and GApplication saw no file; it now prepends "regent".
The acceptance test checks that GIO resolves the scheme to Regent. The click
itself is desktop behaviour and is left to a real session.
640 was taller than the list ever needs, leaving a lot of dead space, and the
size is fixed besides — GTK never resizes a mapped window, so the window takes
whatever it had when it was first shown. 480 fits the empty state and a handful
of keys better; the page's own scroller handles a longer list.
The approval dialog set AdwDialog:content-width, which an AdwAlertDialog
ignores — it uses internal breakpoints, and a breakpoint-using AdwDialog has
no minimum size, so the dialog rendered 300px wide however large the request.
Pin it with a width-request instead (plain::alert_width), which the dialog
honours exactly.
With that working, drop the shared dialog width from 560 to 480 and shrink
the main window to 560x740 so both dialogs sit comfortably inside it.
The violet seal with the ivory serif R replaces the crown placeholders, and
the symbolic is the scalloped seal with the R cut out (fill #2E3436, so GTK
recolours it).
The seal is a round emblem, so it is sized to the Adwaita app-icon
template's circle keyline (Ø119 on the 128 canvas) rather than the square
one it was drawn at; it renders to ~119px centred on (64,64), matching the
padding of a normal round GNOME icon.
Two bugs made the signer hang against anything but a local relay:
- a plain Filter is routed by nostr-sdk's gossip model by author, and a #p-only
filter resolves to no relay, so the REQ was never sent. Subscriptions now use
explicit (relay, filters) targets.
- subscribing while a relay is still Pending registered the subscription without
transmitting it. We now wait for a connection and set verify_subscriptions so
the REQ is re-sent when a relay reconnects.
The default relay is now wss://nostr.kosmos.org: many public relays reject or
rate-limit kind:24133, which looked like a timeout. Verified with the nak
loopback against the real relay (2s).
The responder subscribes to kind:24133 events p-tagged to the device key,
decrypts (NIP-44, falling back to NIP-04), parses the request envelope by hand,
and answers NIP-44 encrypted, signed with the device key while events are signed
with the identity key.
The window is now a view switcher with a keys page and a signer page showing the
bunker:// connection string and its QR code. Every request is still answered
without asking; the UI banner says so until M4.
Adds build-aux/acceptance.sh, which covers the keyring round-trip, a nak
loopback against the responder, and the app starting the signer end to end.
KeyStore keeps one Secret Service item per key: the identity key (the nsec,
used only for signing) and a generated device key used for NIP-46 transport,
so the transport key can be rotated without touching the identity.
Includes NIP-49 export/import, zeroizing of in-memory copies, the tokio/main-loop
bridge that the relay work will reuse, and an ignored test that round-trips
everything against a real Secret Service.
Window, GSettings-backed config, Blueprint UI in a GResource, and the
packaging metadata (desktop entry, AppStream metainfo, schema, icons).
Built with gtk4-rs and libadwaita against the host toolchain; Meson drives
cargo and installs the GResource under $datadir/org.kosmos.raucao.Regent.