The cache only works when the job container shares the host network (a
bridge job cannot reach the runner's cache server through a host
firewall); record that, force_pull and node_download so the runner can be
rebuilt without rediscovering them.
The ubuntu-latest runner image ships GTK 4.22, which cannot satisfy the
crate's v4_24/v1_10 features (they want GTK >= 4.23 / libadwaita >= 1.10,
newer than the latest stable GNOME release), so the first CI run failed
compiling gdk4-sys. The GNOME OS SDK is no better.
Build a regent-ci image (build-aux/ci/) from Arch with the GTK/libadwaita
headers, a rustup-pinned toolchain and the static cargo-deny binary baked
in, register a repo-level runner with the matching label, and drop the
apt/rustup/install-action steps.
Bump url to 2.5.9 (RUSTSEC-2026-0592), which the cargo-deny step would
otherwise fail on.
Both the GUI (in startup) and headless take an unconditional flock on regent.lock (0600); a refused instance short-circuits activate/open so it cannot pair.
The single HTTPS fetch now sets no_proxy, rejects URL userinfo on every hop, and allow-lists IPv6 to 2000::/3 minus the special ranges; IPv4 rejects all of 0.0.0.0/8.
gate() no longer writes apps.json; authorize_inner re-checks the app's identity (and its stored permission) after the last await and only then stores 'always', so a revoke or rebind during a prompt denies.
decode() reads the container header and refuses anything over 1024x1024 before gdk::Texture::from_bytes allocates it; preview_icon no longer caches a pre-consent texture.
The dialog now shows the client-requested created_at and warns (adw::Banner) when content, tags, tag values or an encrypt message exceed what it can show, and offers the full encrypt message. incoming() rejects a malformed kind/content/tags instead of coercing them.
kind:24133 is ephemeral, so every relay delivery of a captured request reached the responder again. A ReplayGuard in the responder loop now drops an event whose created_at is outside a 120 s window (or predates this run) and any event id already seen.
Corrects the signing scheme. The release itself — the annotated tag and a
detached signature over the tarball — is GPG-signed; the release commit is
SSH-signed. Because the GPG key lives on a laptop and the build runs on the
build host, the single script becomes three stages split across two machines:
prepare <ver> build host: bump, build, meson dist, SSH-signed commit
sign <ver> laptop: GPG-sign the tarball and the tag
publish <ver> laptop: Gitea release, AUR, Nostr
The GPG key never touches the build host, and only dist/ travels: the laptop
pulls it over SSH. The two signing formats are set per git command
(-c gpg.format=ssh|openpgp), so neither depends on a machine's global config.
- release.sh: prepare/sign/publish subcommands; SSH commit, GPG tag + detached
tarball signature; REGENT_SSH_SIGNING_KEY / REGENT_GPG_KEY; a release.env
handoff that pins the tagged commit; optional dist/ pull.
- AUR regent: the .asc in source and validpgpkeys pinned to _fingerprint.
- .ngit/release.yaml: the .asc and an exported public key, replacing the SSH
.sig and allowed_signers.
- README, doc/dev/releasing.md, AGENTS.md updated for the split.
The release process is a maintainer's job, not part of local development, so it
gets its own document. development.md now just points at it (and the README's
documentation list gains an entry).
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.
The repo is announced on Nostr now (NIP-34, through `ngit`), so the notes say
which side is which: `origin` is Gitea and every branch tracks it, Gitea is
advertised in the announcement as both the homepage and a clone URL, and pushing
a branch to Nostr is the separate `git push nostr` that also copies the git data
to the GRASP hosts. Also records the two repo relays (repo events go nowhere
else), and the `ngit init` trap that renames the Gitea remote to `gitea-kosmos`
and points `origin` at Nostr. The header no longer calls the repo private — it
isn't.
The code stays Unlicense (public domain); this is additive. A copyright
license grants no rights to a name or logo — the Unlicense is silent on
trademarks, so those were never given away, and a name is not copyrightable
at all. The one gap was the artwork: the icon SVGs sat inside a public-domain
repo with no notice of their own, so anyone could read the dedication as
covering them.
TRADEMARK.md (based on the Model Trademark Guidelines) claims the word
"Regent", the app and symbolic icons and the application id; it permits
nominative use and unmodified redistribution, and requires a fork to pick its
own name and icon. No registration is claimed — "™", not "®". The icons stay
under the Unlicense; the policy only governs using them as a mark.
README, the About dialog and the AGENTS.md hard rule now state the split.
An identity with a valid NIP-05 address never showed it, however often the
profile was re-fetched. `put_metadata` only stored a *strictly* newer kind-0, so
`nip05` — a field added to `Profile` after the cached entries were written — was
refused along with the very event that carries it. The same comparison meant
`fetched_at` never advanced for an unchanged profile, so `needs_refresh` stayed
true and every start re-fetched it again.
The writer now answers two questions separately. Do we *have* this version? A
newer or equal `created_at` says yes: the clock moves and the answer counts.
Whose *content* does the entry hold? A newer version replaces it; an equal one is
the same version re-fetched, which is what backfills a field added later. Two
versions in the same second are settled by the lower event id — NIP-01's rule for
replaceable events — in the merge map and in the cache (`kind0_id`), so a relay
serving only one of them cannot make what we hold flip; an entry written before
that id was kept adopts the next equal-`created_at` answer. An older version is
still refused, which is the point of the watermark. `put_relay_list` stays strict
deliberately: its attempt clock moves on every call, so nothing can be stranded
there — and if a kind-10002-derived field is ever added, it has to become `>=` at
the same time.
The NIP-05 parser takes the email-ish local part now (`. _ % + -`, any case), as
clients in the wild use; it only reaches a percent-encoded query parameter. The
domain half stays strict, because that is what becomes the outbound request.
On top of that, the identities list can re-fetch one profile on demand: "Re-fetch
profile" (`AppState::refetch_profile`) loosens the 7-day discovery TTL, the 1-day
directory-fallback backoff and the 1-day NIP-05 backoff for that key, and a
per-key claim (`profile_fetch_in_flight`, claimed by automatic refreshes too, held
with a self-healing bound and released by comparing the stamp this call wrote)
keeps repeated clicks from opening parallel rounds. It cannot make anything worse:
the cached name, picture, relay list and watermarks are untouched, a profile is
stored only when it is newer than `kind0_at`, and an address can only be
*un*-verified by a definitive non-match.
The fetch reports what it found — `FetchOutcome::{Updated,UpToDate,NotFound}`,
decided by comparing what the app shows before and after — and the menu answers
with it ("Profile updated" / "Profile is up to date" / "No profile found"),
dismissing the "checking" toast rather than outranking it: libadwaita shows one
toast at a time, and a high-priority one only pushes the previous toast back into
the queue, where it would return stale.
The wrapper fell back to one hard-coded build host when the variable was
unset, so it silently only worked on that one machine. It now exits with a
clear message pointing at the variable, and the dev doc marks it required
(REGENT_REPO_PATH keeps its `~/src/regent` default).
The "Testing on another machine" section hard-coded the build host (`nuc-zt`)
and repo path (`~/src/regent`), so it read as notes for one particular setup.
It is now "Deploying to another machine": the two scripts are described
generically, the copy-paste uses `BUILD_HOST` / `PATH/TO/regent` placeholders,
and the `REGENT_BUILD_HOST` and `REGENT_REPO_PATH` overrides are documented
(with the old values noted as their defaults). `--emit` joins the on-host
list, and the narrative is build-host/test-machine rather than naming specific
machines.
The README mixed a short introduction with the build steps, the nightly
build, headless mode, CLI pairing and the two-machine deploy workflow, all
in one file. It now opens with the app icon and a prose description, then
Status, Installation (build from source for now, AUR planned), Repositories
& Contributions (Gitea and ngit), Documentation, License and Contact — the
shape Marco's README uses.
The build, test, validation and dev-deploy material moves to
doc/dev/development.md, and headless mode plus `regent --pair` to
doc/advanced.md, both linked from the README.
The description is also more accurate: Regent runs on GNOME and other Linux
desktops (not GNOME only), requests covered by an "Allow always" permission
are answered without a prompt (so not *every* request is shown), and several
keys can be held and used in parallel.
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.
An identity showed initials and often no name, while a client application's
icon was fetched, cached and rendered. Two reasons: profiles were fetched only
from Regent's configured relays — a members-only NIP-46 relay with no profiles
— and `Filter::limit(0)` caps the *stored* events a relay answers with to zero,
so that fetch received nothing at all even where profiles existed.
Discovery now goes through a measured directory set (directory.yabu.me,
purplepag.es, profiles.nostr1.com; `PROFILE_RELAYS`, overridable with
`REGENT_PROFILE_RELAYS`, else `REGENT_RELAYS` so an overridden run stays
offline). One REQ per author per relay: purplepag.es silently under-returns a
multi-author filter (8 of 20 keys batched, 15 of 20 per author), and its union
with the others is the same 15/20, so more relays buy availability, not
coverage. Three EOSE-capped waves on one ephemeral client — the identity's
kind-10002 and profile from the directory, then kind-0 from its own
write/unmarked relays, then the directory again if those served nothing — feed
one newest-wins map per kind. A relay is connected only when a wave will use it,
so a warm outbox opens no socket to the directory at all.
`profiles.json` keeps the outbox and its clocks: `write_relays` with the
kind-10002's `created_at` as a watermark, a 7-day TTL on discovery *attempts*
(so an identity that publishes no 10002 is re-discovered weekly, not on every
start), and a 1-day backoff on the directory fallback (a missing profile never
advances `fetched_at`, so `needs_refresh` stays true). A far-future `created_at`
is refused, so a relay cannot pin a watermark out of reach.
The picture is cached and rendered like a client icon: same hardened
`IconStore`, same 0600 files, decoded on the main loop. Identity avatars are
*not* behind `load-app-icons` — that switch is about a not-yet-trusted client's
URL — so the icon gc's live set grows to clients plus vault identities,
`forget_textures` clears the one-shot hydration claims it used to leave behind,
and removing a key forgets its avatar immediately. The switcher, the identities
list, the Connect dialog and the approval dialog's "Signing as" field draw it;
the Apps page's row stays text-only (that avatar was dropped deliberately in
d4bb9d5).
The gossip path in nostr-sdk was considered and rejected: its store is
in-process, it builds one filter per relay with the whole author set, and it
needs the same directory set anyway. Gitea issue #1.
list_for now orders an identity's apps by approved_at descending, so the
Apps page shows the app just paired at the top instead of wherever it
landed in apps.json. Whole-second timestamps tie, so the stable sort is
reversed to keep the later pairing first among equals; entries written
before approved_at existed carry 0 and sink to the bottom.
apps.json still stores insertion order — this is a view rule, and every
consumer of list_for (the Apps page, Forget all, the Connect dialog's
count, the identities window's revocation list) wants the same order.
The per-app detail row in the Apps page no longer carries an identity avatar.
The approval dialog and the Connect dialog keep theirs; the expanded details
row is back to plain text.
A client that sends no metadata — the bunker direction often sends none —
leaves only an npub, and there was no way to name it.
Add `App.label`, the user's own name, kept separate from the client's `name`:
`approve` rebuilds the entry on every pairing, so a label stored in `name`
would be lost the next time a metadata-less client reconnects. `display_name()`
prefers the label, and `AppRegistry::client()` returns it, so the approval
dialog and the activity log show what the user calls the app; a declared name
that differs stays visible as a "Declared name" row.
The "wants to connect" dialog asks for a name, right under "Application", when
the client declared none. The answer to a prompt becomes
`Answer { decision, name }` so the name reaches the responder's `approve`
(headless `--pair` passes none). `approve` preserves an existing label when the
dialog collected none.
The Apps page gets a per-app `view-more` menu — Rename… and Revoke — replacing
the visible Revoke suffix, and a rename dialog.
The approval dialog showed a client avatar on the "Application" field but no
identity avatar on "Signing as", and the Connect dialog's and the Apps page's
"Signing as" rows had none either.
Add `plain::avatar`/`plain::set_avatar` — initials of the name, or libadwaita's
glyph when there is none, with a cached image when there is one — and use it for
the client fields and the identity fields alike, so the identity's
avatar/placeholder is drawn exactly like a client application's. The Connect
dialog keeps its avatar widget and repoints it on refresh, since the row is
built once.
Identities have no cached image yet (fetching kind-0 pictures is a later
change), so they show initials for now; the texture lookup is already in place.
GNOME Shell's focus-stealing prevention shows a "<app> is ready" notification
instead of raising an already-mapped window that has no valid activation token;
only a window mapped for the first time is focused in the default `smart`
mode. That is why it only happened after adding the first identity: on first
run the identities window *is* the app and is already mapped, and once a key is
added the next "Manage identities" re-presents it.
Make the identities window transient for the main window while that is
visible, so it is focused together with its parent. With no visible main window
(first run, last key removed) it stays a standalone window, as before.
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.