Commit Graph
487 Commits
Author SHA1 Message Date
Michael Neale 037b973793 fix(serverless): resolve replaceable events to latest copy; publish agent profile
Membership/metadata reads used limit:1 + first(), picking an arbitrary
kind:39002/39000 copy when relays disagreed. A stale copy on one relay
(e.g. a dropped write) could be read and then clobber members on the next
read-modify-write. Add latest_event/latest_by_d_tag (max created_at, id
tie-break) and apply at all four read sites; drop the limit truncation in
get_channels.

Agents only published presence (kind:20001), never a kind:0 profile, so
clients showed a raw hex pubkey. Add publish_profile (name/display_name/
about/picture) at startup, sourced from the persona display_name with a
title-cased fallback from the agent command (goose -> Goose).

Tests: membership latest-wins resolution + profile metadata/name fallback.
2026-06-06 13:39:38 +10:00
Michael Neale 2873d2f161 fix(serverless): drop nostr.band relay, bound read tail-latency
- Replace relay.nostr.band (indexer relay that never completes a plain
  client WS handshake — observed 0/10 connects, only ever cost connect
  timeouts) with relay.primal.net (fast, free, anon read/write).
- query_relay_ws no longer uses join_all (which waited for the slowest
  relay). It now returns on the first relay's response plus an 800ms
  grace window for stragglers, so a slow-but-alive relay can't drag every
  read out to the full 6s per-relay QUERY_TIMEOUT. Dead relays were
  already skipped via the pool's failure cooldown; this fixes the
  slow-but-connected case.
2026-06-05 14:21:56 +10:00
Michael Neale 21532f6a14 Merge remote-tracking branch 'origin/main' into micn/serverless-mode
* origin/main:
  chore(release): release version 0.3.11 (#865)
  fix(mobile+desktop): cross-device read state sync + diagnostic logging (#843)
  feat(mobile): star channels (Slack-style favorites) (#863)
  feat: desktop-screenshot skill to stop agents uploading relay media to PRs (#862)
  feat(desktop): star channels (Slack-style favorites) (#860)
  fix(desktop): handle symlinked persona pack directories (#859)
  feat: channel muting for desktop and mobile (#838)
  feat(acp): default SPROUT_ACP_MEMORY to on (#854)
  fix(desktop): eliminate image-hover layout jump in messages (#813)
  chore(release): release version 0.3.10 (#849)
  fix(desktop): harden relay mesh connect p-tag (#834)
  fix(desktop): scroll activity panel to bottom on open (#848)
  Polish desktop profile menu interactions (#836)
  fix(desktop): outline thread hover targets (#845)
  fix(desktop): keep message actions hover-only (#844)
  fix(desktop): let inbox composer fill available width (#841)

# Conflicts:
#	desktop/src/app/AppShell.tsx
#	desktop/src/features/workspaces/useWorkspaceInit.ts
2026-06-05 12:52:08 +10:00
WesandGitHub baf1f7705f chore(release): release version 0.3.11 (#865) 2026-06-04 17:34:15 -07:00
Will PflegerandGitHub 269b35e8de fix(mobile+desktop): cross-device read state sync + diagnostic logging (#843) 2026-06-04 18:55:40 -04:00
Will PflegerandGitHub 36d7dbd7ca feat: desktop-screenshot skill to stop agents uploading relay media to PRs (#862) 2026-06-04 18:35:10 -04:00
c10b4f8f5c feat(desktop): star channels (Slack-style favorites) (#860)
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
2026-06-04 15:32:28 -07:00
Will PflegerandGitHub f748f71268 fix(desktop): handle symlinked persona pack directories (#859) 2026-06-04 17:52:36 -04:00
Will PflegerandGitHub 1fe7bf2872 feat: channel muting for desktop and mobile (#838) 2026-06-04 15:53:53 -04:00
759e5cd923 fix(desktop): eliminate image-hover layout jump in messages (#813)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 09:55:02 -07:00
WesandGitHub 249bec86cf chore(release): release version 0.3.10 (#849) 2026-06-04 09:04:52 -07:00
tlongwell-blockandGitHub 34ac3ba1d1 fix(desktop): harden relay mesh connect p-tag (#834) 2026-06-04 11:50:49 -04:00
b3aefae152 fix(desktop): scroll activity panel to bottom on open (#848)
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
2026-06-04 08:49:15 -07:00
a13691b620 Polish desktop profile menu interactions (#836)
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
2026-06-04 08:48:57 -07:00
0d9b8148f8 fix(desktop): outline thread hover targets (#845)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 08:39:56 -07:00
b3be9ecba7 fix(desktop): keep message actions hover-only (#844)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 08:07:36 -07:00
db46c42546 fix(desktop): let inbox composer fill available width (#841)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 08:00:03 -07:00
Michael Neale ea77a0bcfe fix(merge): reconcile build_message custom_emoji_tags arg + dedup tauri allow attr
Post-merge fixes for desktop-tauri compile (clippy compiles tests):
- build_message gained custom_emoji_tags param from main; pass &[] in the
  three serverless test/helper call sites (channels_tests, encrypted)
- remove duplicate #[allow(too_many_arguments)] left by the merge
2026-06-04 15:18:46 +10:00
Michael Neale 4c49c8f521 Merge remote-tracking branch 'origin/main' into micn/serverless-mode
* origin/main: (36 commits)
  fix: use immutable commit-SHA URLs in screenshot PR comments (#842)
  feat(mobile+desktop): two-tier Slack-style app icon badge (#802)
  chore: simplify file-size check to a flat 1000-line limit (#839)
  fix(desktop): robust emoji picker — unify picker + fix custom emoji in editing, status, reactions (#837)
  feat(desktop): reusable screenshot workflow for agents (#826)
  desktop(mesh-llm): let a serving node route a different model (#833)
  chore(release): release version 0.3.9 (#832)
  fix: native arbitrary-file download + image context-menu flash (#830)
  fix(desktop): custom emoji reaction rendering + picker autofocus (#831)
  Mesh-LLM v1: relay-gated direct-iroh inference between users (WAN) (#822)
  chore(release): release version 0.3.8 (#829)
  chore(release): release version 0.3.7 (#825)
  feat: code block rendering, syntax highlighting, and compose fixes (#803)
  feat: custom emoji — user-owned NIP-30 sets with a client-side union (#816)
  Install sprout-cli skill at repo root + fix desktop clippy (#818)
  fix(desktop): use public re-export path for ensure_client_node_for_model (#824)
  refactor(desktop): feature-gate mesh-llm-sdk behind optional Cargo feature (#823)
  fix(desktop): align workflow read/save commands to the frontend contract (#820)
  fix(desktop): disable mesh-llm auto-build to prevent git config corruption (#819)
  fix(desktop): clear clippy lints in agents/mesh_llm commands (#817)
  ...

# Conflicts:
#	Cargo.lock
#	desktop/scripts/check-file-sizes.mjs
#	desktop/src-tauri/Cargo.toml
#	desktop/src/app/AppShell.tsx
#	desktop/src/app/AppTopChrome.tsx
#	desktop/src/features/messages/hooks.ts
#	desktop/src/features/workspaces/useWorkspaceInit.ts
#	desktop/src/shared/api/tauri.ts
2026-06-04 15:08:56 +10:00
Will PflegerandGitHub 3b78dc5690 feat(mobile+desktop): two-tier Slack-style app icon badge (#802) 2026-06-03 18:16:49 -07:00
Michael Neale a9b627c4b6 fix(serverless): log encrypted-recipient resolution on send (diagnostic) 2026-06-04 09:53:26 +10:00
0c225f4d7d chore: simplify file-size check to a flat 1000-line limit (#839)
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
2026-06-03 16:40:33 -07:00
Michael Neale 6c7dc2753e fix(serverless): encrypted send picks newest 39002 across relays, fails loudly if members unresolved
The desktop encrypted_recipients() lookup used .first() on a multi-relay
merge of the addressable kind:39002 membership event and silently fell
back to encrypting to only self when the lookup came back empty. With the
membership event present on only some relays (split-brain / propagation
lag), a private-channel message could be gift-wrapped to just the sender —
so the agent (and other members) never received it, with no visible error.

Now: pick the NEWEST 39002 by created_at, and if an encrypted channel
resolves to no other members, return an error so the send fails loudly and
can be retried, instead of silently dropping every other recipient.
2026-06-04 09:05:11 +10:00
d8b602a359 fix(desktop): robust emoji picker — unify picker + fix custom emoji in editing, status, reactions (#837)
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
2026-06-03 15:13:25 -07:00
Will PflegerandGitHub 06bc67fd34 feat(desktop): reusable screenshot workflow for agents (#826)
Signed-off-by: Will Pfleger <wpfleger@block.xyz>
2026-06-03 19:33:56 +00:00
9f0c22a43a desktop(mesh-llm): let a serving node route a different model (#833)
Signed-off-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: npub1mprnacetjua2xx3p5eddmhxyk6wv929ymm5py8kd2xfxurxahspqqlgyta <d8473ee32b973aa31a21a65adddcc4b69cc2a8a4dee8121ecd51926e0cddbc02@sprout-oss.stage.blox.sqprod.co>
Co-authored-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@sprout-oss.stage.blox.sqprod.co>
Co-authored-by: npub1mprnacetjua2xx3p5eddmhxyk6wv929ymm5py8kd2xfxurxahspqqlgyta <d8473ee32b973aa31a21a65adddcc4b69cc2a8a4dee8121ecd51926e0cddbc02@sprout-oss.stage.blox.sqprod.co>
2026-06-03 14:30:46 -04:00
WesandGitHub b4f8f40333 chore(release): release version 0.3.9 (#832) 2026-06-03 10:45:22 -07:00
82ae85f79a fix: native arbitrary-file download + image context-menu flash (#830)
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
2026-06-03 09:59:57 -07:00
7797ae77f6 fix(desktop): custom emoji reaction rendering + picker autofocus (#831)
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
2026-06-03 08:53:43 -07:00
33cfc85293 Mesh-LLM v1: relay-gated direct-iroh inference between users (WAN) (#822)
Signed-off-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@sprout-oss.stage.blox.sqprod.co>
Co-authored-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@sprout-oss.stage.blox.sqprod.co>
Co-authored-by: npub1t2tgm7d8f995uqvmnm8h88sg3wnpp9a5xysjf6dg3tjmgt3ltulqdp8ehr <5a968df9a7494b4e019b9ecf739e088ba61097b4312124e9a88ae5b42e3f5f3e@sprout-oss.stage.blox.sqprod.co>
Co-authored-by: Max <d8473ee32b973aa31a21a65adddcc4b69cc2a8a4dee8121ecd51926e0cddbc02@sprout-oss.stage.blox.sqprod.co>
2026-06-03 10:49:09 -04:00
Michael Neale 9745e9940d docs(serverless): explain why desktop ws_pool is hand-rolled vs agent's nostr-relay-pool 2026-06-03 15:02:38 +10:00
Michael Neale 604f5f3b2e fix(serverless): encrypt threaded replies in private channels (close plaintext leak)
Replies in encrypted serverless channels (DM/private) were falling through
to the plaintext path — a privacy leak: the reply content went to public
relays as a cleartext kind-9. The encrypt branch was gated on
parent_event_id.is_none(), so only top-level messages were gift-wrapped.

Fix: encrypt replies too. The NIP-10 thread tags now live INSIDE the rumor
(the encrypted inner event), so threading is preserved without leaking the
reply. The thread root is resolved locally from decrypted messages (the
parent rumor isn't queryable in plaintext on the relay) and passed via a new
root_event_id command arg.

Proven by encrypted_threaded_reply_is_wrapped_and_preserves_thread: asserts
the wire event is kind-1059 (not plaintext kind-9), content never leaks, and
the decrypted rumor carries the NIP-10 root + reply e-tags.
2026-06-03 15:00:06 +10:00
WesandGitHub 7c896d339d chore(release): release version 0.3.8 (#829) 2026-06-02 16:57:08 -07:00
dc6821667d chore(release): release version 0.3.7 (#825)
Signed-off-by: Mesh-LLM CI <ci@mesh-llm.local>
Co-authored-by: Mesh-LLM CI <ci@mesh-llm.local>
2026-06-02 14:56:23 -07:00
Will PflegerandGitHub 56c504a4c7 feat: code block rendering, syntax highlighting, and compose fixes (#803) 2026-06-02 14:43:08 -07:00
2349421304 feat: custom emoji — user-owned NIP-30 sets with a client-side union (#816)
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Signed-off-by: tlongwell-block <109685178+tlongwell-block@users.noreply.github.com>
Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
Co-authored-by: Pinky <44b8e82baa6e0e254e0208d68f335c283c94e7b78dd1fa10d5a49d3f13dd0435@sprout-oss.stage.blox.sqprod.co>
Co-authored-by: tlongwell-block <109685178+tlongwell-block@users.noreply.github.com>
2026-06-02 14:19:07 -07:00
Will PflegerandGitHub 7a12e50518 Install sprout-cli skill at repo root + fix desktop clippy (#818) 2026-06-02 17:11:30 -04:00
Will PflegerandGitHub 2ea3fd88d2 fix(desktop): use public re-export path for ensure_client_node_for_model (#824) 2026-06-02 16:59:05 -04:00
Michael Neale e56c5f31c4 feat(serverless): typing indicators + cold-start history retry
- Route agent typing indicators (kind 20002) through the serverless pool
  subscription so the 'agent is typing…' signal shows in serverless mode
  (previously dropped — CHANNEL_EVENT_KINDS excluded 20002). useChannelTyping
  now listens on serverless-event:<channel> when serverless; appendMessage
  skips ephemeral typing events so they never enter the timeline.
- Retry serverless history fetch with short backoff on cold start: public
  relays return 0/partial while pooled connections warm up, causing the
  'blank for a minute after launch' feeling. Retry until events arrive.
2026-06-03 06:48:40 +10:00
Michael Neale 12241a5fda fix(serverless): launch agents with current workspace relays + real dev sidecars
Agent restore at startup raced ahead of the frontend applying the active
workspace, so serverless agents launched with the stale relay list frozen
into their record at creation time (including paid relays that 403) and one
even ran in server mode. When the only healthy relay rate-limited a reply,
there was no failover and the reply silently vanished.

- AppState.workspace_applied: agent restore now waits (bounded 15s) for the
  frontend to call apply_workspace before launching, so agents inherit the
  CURRENT workspace relays + serverless mode instead of record defaults.
- apply_workspace sets the flag once config is live.
- justfile _ensure-sidecar-stubs builds REAL sprout-acp + sprout sidecars
  (serverless agents need them) instead of 0-byte stubs that silently fail
  to launch/reply under just dev.
2026-06-03 06:40:57 +10:00
Will PflegerandGitHub fb514c8918 refactor(desktop): feature-gate mesh-llm-sdk behind optional Cargo feature (#823) 2026-06-02 20:25:01 +00:00
b72eee365f fix(desktop): align workflow read/save commands to the frontend contract (#820)
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
2026-06-02 12:52:56 -07:00
Will PflegerandGitHub 5b572d6f5e fix(desktop): disable mesh-llm auto-build to prevent git config corruption (#819) 2026-06-02 18:49:41 +00:00
192388a3cb fix(desktop): clear clippy lints in agents/mesh_llm commands (#817)
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
2026-06-02 11:01:01 -07:00
41a3fc1589 fix(desktop): let channel members add members and bots without admin (#815)
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
2026-06-02 09:55:09 -07:00
a25ca5d1bf Desktop #806 follow-ups: panel/inbox fixes + top-bar backdrop (#814)
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
2026-06-02 08:45:04 -07:00
5bed17a117 Fix desktop right-side panel chrome overlap (#806)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-02 07:37:36 -07:00
tlongwell-blockandGitHub ede8ddb425 Sprout × mesh-llm: in-process mesh node (serve/consume) + relay admission (#798) 2026-06-02 10:28:20 -04:00
Michael Neale 104588ff20 fix(serverless): make agent replies resilient to dead/rate-limited relays
- Agent reply retries the full relay fan-out with backoff when every relay
  rate-limited (transient), instead of silently dropping the reply. Hard
  rejections are not retried.
- Prune relays that fail the WebSocket handshake (403/paid/unreachable) from
  the agent's working set so discovery and publish only use healthy relays.
- Launch managed agents with the CURRENT workspace relay list (serverless)
  rather than the list frozen into the agent record at creation time, so
  stale/paid relays drop out without recreating the agent.
- Auto-fill the recommended public relays when the serverless toggle is
  enabled in the Add Workspace dialog (no more tapping each chip).
2026-06-02 19:12:28 +10:00
Michael Neale 1293881b72 fix(serverless): multi-relay fan-out for agent CLI + harness, prove agent replies e2e
The serverless agent never actually posted a reply: three real bugs,
each found by an end-to-end test against live public relays (no LLM).

1. CLI replies hit a single relay. `sprout messages send` used only the
   first relay, so when that relay rate-limited the agent ("noting too
   much") the reply was dropped. SproutClient now fans out reads/writes
   across the full relay list — publish succeeds if ANY relay accepts,
   queries merge+dedup. lib.rs passes the whole ws list, not just the first.

2. Agent harness died on a single relay 503. RestClient (channel discovery,
   sibling checks) queried only the primary relay; a damus 503 crashed
   discovery with "channel discovery error". RestClient now holds the full
   relay list and fans out the same way — one relay down no longer kills the
   agent. HarnessRelay carries relay_urls; rest_client() passes them through.

3. CLI panicked on wss:// (no rustls CryptoProvider). The serverless WS
   transport (tokio-tungstenite) builds TLS directly and, unlike reqwest,
   does not auto-install a provider. Install aws_lc_rs at CLI startup.

This is the standard Nostr client model (damus RelayPool, nostr-tools
SimplePool): relays don't gossip, so a client publishes-to-many,
reads-from-many, and dedups. Server mode is unchanged (single URL, HTTP bridge).

New e2e test (crates/sprout-acp/tests/e2e_agent_responds.rs + stub_agent.sh):
creates a channel + adds the agent, spawns the real sprout-acp harness with a
no-LLM ACP stub, posts an @mention, and asserts the agent's reply lands on the
relay. Passes in ~6s even while damus is 503-ing the whole time.

Also: fix pre-existing channels-subcommand stability test drift (PR #712 added
`channels search`); remove paid/auth relays already done; drop dead helpers.
2026-06-02 18:02:12 +10:00