1164 Commits
Author SHA1 Message Date
raucao f5ea0f137c Stop ignoring skills, add Nostr skills
CI / Test (push) Successful in 50s
2026-11-24 15:10:30 +04:00
raucao 0792b3f45a Fix workspaces/worktrees not deleting cleanly
CI / Test (push) Successful in 52s
2026-11-24 15:08:01 +04:00
raucao 97126c0684 Merge pull request 'Resolve relative icon URLs when attaching web app icons' (#273) from fix/app-catalog-relative-icon-url into master
CI / Test (push) Successful in 1m0s
Reviewed-on: #273
2026-11-23 19:10:21 +00:00
raucao 07b7dc9cec Resolve relative icon URLs when attaching web app icons
CI / Test (pull_request) Successful in 1m1s
Release Drafter / Update release notes draft (pull_request) Successful in 3s
AppCatalogManager::UpdateMetadata built remote icon download URLs with
naive string concatenation, so a relative src such as
"./apple-touch-icon.png" produced a URL with a dot segment
(https://host/./apple-touch-icon.png). Servers that do not normalise dot
segments (e.g. 5apps/openresty) answer those with 404, so the icon was
never attached.

Resolve icon URLs against the web app URL with URI.join (RFC 3986), which
collapses dot segments and handles bare and absolute URLs correctly.

Bump manifique to ~> 1.1.1, which fixes the same class of bug for relative
web app manifest URLs ("./manifest.webmanifest"), and add service specs
covering manifest metadata loading and icon URL resolution.
2026-11-23 23:07:48 +04:00
raucao 71bc52e97e Merge pull request 'Nostr profile editor improvements' (#272) from feature/nostr-profile-fields into master
CI / Test (push) Successful in 1m6s
Reviewed-on: #272
2026-11-19 20:16:17 +00:00
raucao be133af6fa Upload avatar and header images from the Nostr profile editor
CI / Test (pull_request) Successful in 49s
Release Drafter / Update release notes draft (pull_request) Successful in 37s
The editor gains edit affordances over the avatar and header image and an upload panel that stores the image (previewing the server-cropped result) and records it as pending. Saving the profile signs a Blossom upload token, flushes the pending images, merges the returned URLs into the kind-0 content, and keeps pending state until the publish succeeds so a retry re-flushes.
2026-11-19 21:58:12 +04:00
raucao ab3c2bffd6 Process and relay Nostr profile images server-side
Add a server-side API for avatar and header images: uploads are cropped with Vips (400x400 and 1500x500, GIFs passed through, EXIF stripped, transparency flattened to white) and stored as one pending attachment per field. Saving the profile flushes them to the configured Blossom server, authorized by a user-signed kind-24242 token whose x tags cover the stored hashes.
2026-11-19 21:58:08 +04:00
raucao 4c8525b45f Extract the CSRF token helper for the JS controllers
Four controllers each read the csrf-token meta tag themselves. Move the lookup into lib/csrf.js and import it, ahead of the profile image upload controller that also needs it.
2026-11-19 21:58:03 +04:00
raucao 0901e76dee Report and log why a Nostr event is rejected
CI / Test (pull_request) Successful in 48s
The publish endpoint collapsed every validation failure into a generic "Invalid event", making a real-world rejection impossible to diagnose. Return and log the specific reason instead: public key mismatch, non-integer created_at/kind, disallowed kind, invalid id/signature, stale created_at, content/tags too large, or a malformed request.
2026-11-19 19:27:23 +04:00
raucao 22b1e59f8d Show the Nostr profile editor error inline with the save button
CI / Test (pull_request) Successful in 50s
The save-time error (e.g. a rejected signature) sat on its own line above the button. Move it into the footer row: at the start of the line and vertically centered on desktop, and on the line above the full-width button on mobile.
2026-11-19 18:50:50 +04:00
raucao e2ff905bdb Reuse the account avatar as the Nostr profile picture fallback
When the published profile has no usable `picture` (missing, blank, or not an http(s) URL), the editor previews the account avatar and writes its public URL into the profile on save. An existing valid picture is left untouched.

The component exposes the account avatar URL to the Stimulus controller, which applies it in `content()` only when `picture` is absent or not a URL, so the preview and the published content agree.
2026-11-19 18:50:50 +04:00
raucao 4d2e0aa2b6 Add about and website fields to the Nostr profile editor
CI / Test (pull_request) Successful in 46s
The profile editor only covered display name, NIP-05 and Lightning address. Add the bio (`about`) and `website` fields, read from the existing profile and written back on save (with `website` validated as an http(s) URL).

Lay the form out in a responsive two-column grid (single column on mobile) and align the submit button with the other account settings forms. Also fix the avatar size utility (`size:28` -> `size-28`), which left the avatar unsized on small screens and let it overlap the display-name label.

Avatar and banner image editing is still to come.
2026-11-19 17:49:21 +04:00
raucao b6320b80f6 Merge pull request 'Avoid duplicate site entries in Nostr list editors' (#271) from bugfix/nostr_relay_list_editing into master
CI / Test (push) Successful in 46s
Reviewed-on: #271
2026-11-19 11:51:25 +00:00
raucao 2a19aecf3e Avoid duplicate site entries in Nostr list editors
CI / Test (pull_request) Successful in 45s
Release Drafter / Update release notes draft (pull_request) Successful in 2s
The relay and media server editors compared the configured site URL
against existing event entries with raw string equality, so a trailing
slash or different case made the site entry look missing and it was
prepended again as a duplicate "added" row. Compare with
NostrManagerService.normalize_url instead, matching the status
components and the JS list editor.
2026-11-19 15:48:03 +04:00
raucao 12c99c9d5a Merge pull request 'Handle all kind 0 display-name variants in the Nostr profile editor' (#270) from feature/nostr-profile-display-name-variants into master
CI / Test (push) Successful in 47s
Reviewed-on: #270
2026-11-19 11:18:32 +00:00
raucao c1826a46f4 Handle all kind 0 display-name variants in the Nostr profile editor
CI / Test (pull_request) Successful in 51s
Release Drafter / Update release notes draft (pull_request) Successful in 6s
The editor read only `display_name`/`displayName` and wrote just `display_name` (deleting `displayName`), so profiles using `name` or the deprecated aliases were shown and updated incorrectly.

Read the first present of `display_name`, `displayName`, `name` and `username` (NIP-01/NIP-24 priority) with a fallback to the account display name, and write the edited value to every variant. The key list lives in `NostrManagerService::DISPLAY_NAME_KEYS` and is passed to the Stimulus controller so Ruby and JS stay in sync.
2026-11-19 15:14:29 +04:00
raucao b35aa3050f Merge pull request 'Nostr onboarding: publish profile, relay list and media server list' (#269) from feature/nostr-onboarding-ruby into master
CI / Test (push) Successful in 46s
Reviewed-on: #269
2026-11-19 07:15:08 +00:00
raucao 355d0a2fb0 Add a "Just a moment..." title to the metadata loading state
CI / Test (pull_request) Successful in 47s
Release Drafter / Update release notes draft (pull_request) Successful in 3s
The title sits above the rotating status messages and disappears with
the loading state; the status messages no longer carry their own
ellipses.
2026-11-19 10:58:35 +04:00
raucao 7f0d10aa9c Show the relay list before the profile in Nostr settings
CI / Test (pull_request) Successful in 48s
The profile and the media server list are published to the user's write
relays, so they should be set up after the relay list. This also makes
the page order match the discovery order (relays -> profile -> media
servers) shown while loading.
2026-11-19 10:39:56 +04:00
raucao ae13890cea Even out the spacing between the Nostr settings sections
CI / Test (pull_request) Successful in 44s
Drop the bottom margin on the Relays section so the gap before Media
servers matches the gap before Relays.
2026-11-18 23:51:50 +04:00
raucao cd325f39ea Address review nits on the discovery timeout fix
CI / Test (pull_request) Successful in 45s
- Track EOSE with a done flag so a healthy relay with no matching
  events returns immediately instead of waiting out the timeout
- Restore the ensure around the client thread cleanup
- Raise the metadata fetch client timeout to 60s to cover the
  worst-case sequential discovery on the server
2026-11-18 23:41:45 +04:00
raucao f15d04d1a9 Fix discovery timeouts leaking Timeout::ExitException
FetchEvent wrapped its wait in Timeout.timeout and FetchLatestEvent
wrapped the relay loop in another one. The nesting leaked
Timeout::ExitException, which is neither a Timeout::Error nor a
StandardError, so it escaped the rescue and surfaced as a 500 on the
metadata endpoint.

- FetchEvent waits on the condition variable with a 5s timeout instead
  of Timeout.timeout, and wakes immediately when the relay errors
- FetchLatestEvent uses a monotonic deadline instead of Timeout.timeout,
  and skips a relay that raises, so one bad relay cannot abort discovery
- PublishEvent uses thread.join(TIMEOUT) instead of Timeout.timeout
2026-11-18 23:39:38 +04:00
raucao 0dda543b03 Document Nostr user onboarding and its known limitations
CI / Test (pull_request) Successful in 46s
2026-11-18 22:19:46 +04:00
raucao 2af8efde18 Unify the URL list editors and harden the metadata fetch 2026-11-18 22:19:46 +04:00
raucao 5edbd3aed1 Add the Blossom media server list (kind 10063) 2026-11-18 22:19:46 +04:00
raucao 23898ae0a0 Publish the profile (kind 0) from settings 2026-11-18 22:19:46 +04:00
raucao 92a36cf3f7 Publish the relay list (NIP-65) from settings 2026-11-18 22:19:46 +04:00
raucao 29ed14a556 Add server-side publishing for user-signed Nostr events 2026-11-18 22:19:45 +04:00
raucao 24dde0fae0 Verify Nostr event IDs before trusting signed events 2026-11-18 22:19:45 +04:00
raucao 2b30c6b750 Add Nostr onboarding: discovery services, settings UI and metadata chain 2026-11-18 22:19:35 +04:00
raucao b2e33edc7b Merge pull request 'Recompute Nostr event id before trusting signed events' (#268) from bugfix/nostr-event-id-verification into master
CI / Test (push) Successful in 43s
Reviewed-on: #268
2026-11-18 16:37:27 +00:00
raucao 1eccfde70f Recompute Nostr event id before trusting signed events
CI / Test (pull_request) Successful in 44s
Release Drafter / Update release notes draft (pull_request) Successful in 2s
The nostr gem's Event#verify_signature only validates the signature over
the event's claimed id and never recomputes the id from the serialized
body. A genuine (id, sig, pubkey) triple lifted from any public event
could therefore be replayed with injected tags, kind or content and still
pass verification. For Nostr login this allows signing in as the key
owner.

Add NostrManager::VerifySignedEvent, which recomputes the id with
Digest::SHA256.hexdigest(JSON.dump(event.serialize)) and rejects any
mismatch, and use it in the pubkey verification and Nostr login flows.
VerifyAuth now also asserts kind 22242.
2026-11-18 19:51:37 +04:00
raucao 059fdf33cb 0.13.0
CI / Test (push) Successful in 43s
v0.13.0
2026-11-18 14:03:02 +04:00
raucao f62a4598dd Merge pull request 'Add strfry policies for the public submission relay and approved sync' (#267) from feature/submission_relay into master
CI / Test (push) Successful in 2m8s
Reviewed-on: #267
2026-11-18 10:00:16 +00:00
raucao 023f5b39bf Fix strfry README and drop deployment specifics
CI / Test (pull_request) Successful in 43s
Release Drafter / Update release notes draft (pull_request) Successful in 3s
The new README described the directory as mostly Node ESM and called the
pre-existing Deno policies "legacy", even though ldap-policy.ts is a shared
module reused by the new member bridge and strfry-policy.ts is the members
relay's current write policy. It also baked in internal deployment details
(Chef, strfry-1, /etc/*.conf paths, the staging relay's ZeroTier IP).

Document every file with its correct runtime (Deno vs Node 24 LTS), drop the
"legacy" label, and genericize the deployment examples. Cross-link the README
from docs/dev/nostr.md, and replace the remaining internal host/IP references
in sync-policy.mjs and its test with neutral placeholders.
2026-11-18 13:51:48 +04:00
raucao 30ca91797e Make sync-policy source-verification only
CI / Test (pull_request) Successful in 42s
Drop the kind allowlist and event well-formedness checks from the
approved-content sync policy; content gating lives in the other
policies. The policy now only verifies type, sourceType, and
sourceInfo against STAGING_RELAY_URL.
2026-11-18 09:52:24 +04:00
raucao d2f410ad42 Add LDAP-only strfry policy for the member bridge
CI / Test (pull_request) Successful in 47s
The member bridge on the production relay is a strfry router stream group (dir = "down") that subscribes to the local submission relay and writes member-authored events into the production database. This policy is its pluginDown: it reuses ldap-policy.ts and accepts an event only when its author is an LDAP member (or a whitelisted pubkey).

Unlike strfry-policy.ts it does no hellthread/anti-duplication work and opens no Deno KV store, so it runs alongside the relay's own policy process without shared state.

Refs raucao/marco#97, kosmos/chef#705.
2026-11-18 00:31:39 +04:00
raucao 242577a6f6 Add strfry policies for the public submission relay and approved sync
CI / Test (pull_request) Successful in 49s
Adds the Node write policies used by the new public submission relay and by
the approved-content sync on the members relay, for raucao/marco#97.

submission-policy.mjs keeps the submission relay open to all authors while
applying the usual gates: a kind allowlist, content and tag bounds, per-IP and
per-author token buckets, a short-window content dedupe, and a hellthread
limit. It does not do membership checks or media analysis.

sync-policy.mjs is fail-closed: it accepts only events that arrived through
strfry sync from the exact staging relay URL, with an allowed kind. Everything
else, including a wrong source type or an unset STAGING_RELAY_URL, is rejected
and logged with observed-vs-expected source information.

Includes node:test coverage for both policies and a README documenting the
environment variables and how strfry invokes them. The existing Deno policies
are untouched.

Note: chef fetches these files from the live branch, so master must be merged
into live before the submission relay or approved sync is converged.
2026-11-17 14:12:19 +04:00
raucao f8d6fcb3d2 Merge pull request 'Fix ldap-init race on first-run setup' (#266) from raucao/ldap-init-race into master
CI / Test (push) Successful in 2m4s
Reviewed-on: #266
Reviewed-by: Greg <greg@kosmos.org>
2026-11-09 16:19:27 +00:00
raucao 382900521b Fix ldap-init race on first-run setup
CI / Test (pull_request) Successful in 45s
Release Drafter / Update release notes draft (pull_request) Failing after 3s
The 389ds image healthcheck (dscontainer -H) only validates the LDAPI
socket. On an empty volume, instance setup runs a temporary slapd that
exposes LDAPI but not TCP 3389, so Docker marked the ldap service
healthy too early. That let ldap-init start before the real slapd was
listening, failing with "Can't contact LDAP server - 107 - Socket not
connected".

Override the healthcheck to probe the real TCP listener and bind as
cn=Directory Manager with the configured password, and add a bounded
wait loop to ldap-init so it retries until the server is reachable.
2026-11-09 20:12:18 +04:00
raucao 2fff2d7e09 Merge pull request 'Fix GFM markdown rendering in production' (#265) from bugfix/kramdown into master
CI / Test (push) Successful in 45s
Reviewed-on: #265
2026-11-04 13:37:53 +00:00
raucao b62d5a6035 Fix GFM markdown rendering in production
CI / Test (pull_request) Successful in 48s
Release Drafter / Update release notes draft (pull_request) Successful in 5s
kramdown-parser-gfm was only pulled in transitively by solargraph, which
lives in the development group. Production installs therefore lacked the
GFM parser, so rendering any rich-text content page raised
"Kramdown::Error: kramdown has no parser to handle the specified input
format: GFM".

Declare kramdown-parser-gfm as a direct dependency and add a regression
spec for ApplicationHelper#markdown_to_html.

Fixes #264
2026-11-04 17:36:19 +04:00
raucao 455bf93c81 Link dashboard Storage card to connected apps when present
CI / Test (push) Successful in 44s
Users with stored remoteStorage authorizations now jump straight to the connected apps dashboard from the services dashboard, instead of the storage info page.
2026-11-04 16:08:22 +04:00
raucao 939f447eae Merge pull request 'Upgrade Liquor Cabinet and enable hashed access tokens' (#263) from dev/upgrade_liquor-cabinet into master
CI / Test (push) Successful in 44s
Reviewed-on: #263
2026-11-04 11:40:13 +00:00
raucao 7b1f33abd0 Upgrade Liquor Cabinet and enable hashed access tokens
CI / Test (pull_request) Successful in 45s
Release Drafter / Update release notes draft (pull_request) Successful in 3s
Liquor Cabinet 2.0.0-rc.2 can look up remoteStorage authorizations by the SHA256 digest of the presented bearer token, which matches how Akkounts now stores them. Set RS_HASHED_ACCESS_TOKENS=true in the dev Compose setup so the two sides agree; Liquor Cabinet still falls back to the plaintext key for authorizations created before hashing.
2026-11-04 15:35:45 +04:00
raucao 7c9a6a0ee0 0.12.0
CI / Test (push) Successful in 42s
v0.12.0
2026-11-04 14:34:07 +04:00
raucao 71b44a0453 Merge pull request 'Hash remoteStorage access tokens at rest' (#262) from feature/hashed_rs_access_tokens into master
CI / Test (push) Successful in 46s
Reviewed-on: #262
2026-11-04 09:49:56 +00:00
raucao 4bca003983 Hash remoteStorage access tokens at rest
CI / Test (pull_request) Successful in 45s
Release Drafter / Update release notes draft (pull_request) Successful in 4s
Store only SHA256(token) in a new token_digest column and use the digest for the Redis authorization keys instead of the plaintext token. The plaintext is now held in memory only for issuance.

This is the expand step: the plaintext token column stays in place so the old code can keep running during the deploy. A follow-up migration will drop it once rs:rekey_tokens has re-keyed Redis and confirmed no plaintext keys remain.

Refs #259
2026-11-04 09:33:57 +04:00
raucao c7eb543ae6 Merge pull request 'Add PKCE support to remoteStorage OAuth' (#256) from feature/rs_auth_pkce into master
CI / Test (push) Successful in 44s
Reviewed-on: #256
2026-11-03 16:42:40 +00:00
raucao 19b4dcfb46 Merge pull request 'Store per-device user agent for remoteStorage authorizations' (#257) from feature/rs_device_tokens into feature/rs_auth_pkce
CI / Test (pull_request) Successful in 44s
Release Drafter / Update release notes draft (pull_request) Successful in 2s
Reviewed-on: #257
2026-11-03 16:39:10 +00:00