mirror of
https://github.com/block/buzz.git
synced 2026-11-25 02:31:36 +00:00
Adds a 'serverless' workspace mode that points the desktop app at any generic public Nostr relay (e.g. wss://relay.damus.io) with zero Sprout server infrastructure — no Postgres, no HTTP /query|/events bridge, no NIP-98 auth. Reuses Sprout's native event kinds (39000 channel metadata, 39002 membership, kind 9 messages, h-tag scoping); 'serverless' is purely a transport + auth concern, so the server-mode path is untouched. Transport: reads/writes go over plain WebSocket (REQ/EOSE, EVENT/OK) instead of the HTTP bridge; NIP-42 AUTH is answered only if the relay challenges. Desktop backend: - AppState.serverless flag + is_serverless(); apply_workspace gains a flag - ws_relay.rs: query_relay_ws / submit_event_ws / publish_signed_event_ws - relay.rs: query_relay/submit_event + agent profile sync branch to WS - events.rs: build_channel_metadata_serverless (39000) + members (39002) - create_channel/open_dm publish those events directly (DM ids = UUIDv5 over sorted participants so both sides converge without a server) - managed agents inherit SPROUT_SERVERLESS into the ACP subprocess env Agents (full support, not a follow-up): - sprout-acp: RestClient + HarnessRelay gain serverless mode; query/submit use plain WS, NIP-42 handshake skipped on (re)connect; SPROUT_SERVERLESS env/arg - sprout-cli: SproutClient serverless WS query/submit; --serverless flag, to_ws_url helper, NetworkMsg error variant - npub respond-to permissions are in-process and work unchanged Frontend: - Workspace.mode + workspaceMode()/isServerlessWorkspace() helpers - relayClient.setServerless() skips the AUTH-wait on connect; late challenges still answered so writes succeed on relays that require auth - ServerlessContext/useIsServerless() hides search, pulse, projects, workflows - Serverless toggle in the Add Workspace dialog and Welcome screen Docs: docs/SPROUT_LITE_MODE.md updated with the implementation + testing steps.
79 lines
2.3 KiB
TOML
79 lines
2.3 KiB
TOML
[workspace]
|
|
|
|
[package]
|
|
name = "sprout-desktop"
|
|
version = "0.3.5"
|
|
description = "Sprout desktop app"
|
|
authors = ["you"]
|
|
edition = "2021"
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
[lib]
|
|
# The `_lib` suffix may seem redundant but it is necessary
|
|
# to make the lib name unique and wouldn't conflict with the bin name.
|
|
# This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519
|
|
name = "sprout_lib"
|
|
crate-type = ["staticlib", "cdylib", "rlib"]
|
|
|
|
[build-dependencies]
|
|
tauri-build = { version = "2", features = [] }
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
libc = "0.2"
|
|
ctrlc = { version = "3", features = ["termination"] }
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
windows-sys = { version = "0.61", features = ["Win32_Storage_FileSystem"] }
|
|
|
|
[dependencies]
|
|
atomic-write-file = "0.3"
|
|
dirs = "6"
|
|
tauri = { version = "2", features = [] }
|
|
tauri-plugin-deep-link = "2"
|
|
tauri-plugin-opener = "2"
|
|
tauri-plugin-single-instance = { version = "2", features = ["deep-link"] }
|
|
tauri-plugin-window-state = "2"
|
|
tauri-plugin-websocket = "2"
|
|
tauri-plugin-dialog = "2"
|
|
tauri-plugin-updater = "2"
|
|
tauri-plugin-process = "2"
|
|
infer = "0.19"
|
|
hex = "0.4"
|
|
tokio = { version = "1", features = ["fs", "sync", "rt", "macros", "time"] }
|
|
tokio-tungstenite = { version = "0.29", features = ["rustls-tls-webpki-roots"] }
|
|
tokio-util = { version = "0.7", features = ["rt"] }
|
|
futures-util = "0.3"
|
|
opus = "0.3"
|
|
neteq = { version = "0.8", default-features = false }
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
nostr = { version = "0.44", features = ["nip44"] }
|
|
zeroize = "1"
|
|
reqwest = { version = "0.13", features = ["json", "query", "stream"] }
|
|
url = "2"
|
|
sprout-core = { path = "../../crates/sprout-core" }
|
|
sprout-persona = { path = "../../crates/sprout-persona" }
|
|
sprout-sdk = { path = "../../crates/sprout-sdk" }
|
|
base64 = "0.22"
|
|
sha2 = "0.11"
|
|
tar = "0.4"
|
|
bzip2 = "0.6"
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
tauri-plugin-global-shortcut = "2"
|
|
tauri-plugin-notification = "2.3.3"
|
|
uuid = { version = "1", features = ["v4", "v5"] }
|
|
png = "0.18"
|
|
zip = "8"
|
|
sherpa-onnx = "1.12"
|
|
regex = "1"
|
|
axum = "0.8"
|
|
rodio = "0.22"
|
|
earshot = "1.0"
|
|
rubato = "3.0"
|
|
audioadapter-buffers = "3.0"
|
|
tempfile = "3"
|
|
strip-ansi-escapes = "0.2"
|
|
|
|
[dev-dependencies]
|