Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,6 @@ RUST_LOG=sprout_relay=debug,sprout_db=debug,sprout_auth=debug,sprout_pubsub=debu
# OTLP tracing endpoint (optional — leave unset to disable)
# OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317

# -----------------------------------------------------------------------------
# Huddle (LiveKit integration)
# -----------------------------------------------------------------------------
# LIVEKIT_API_KEY=devkey
# LIVEKIT_API_SECRET=devsecret
# LIVEKIT_URL=ws://localhost:7880

# -----------------------------------------------------------------------------
# ACP (Agent Communication Protocol — sprout-acp harness)
# -----------------------------------------------------------------------------
Expand Down
33 changes: 23 additions & 10 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,38 @@ code style, PR process, architecture), see [CONTRIBUTING.md](CONTRIBUTING.md).

```
crates/
sprout-relay # WebSocket relay server — main entry point
sprout-core # Core types, event verification, filter matching
# Relay + core
sprout-relay # WebSocket relay server — main entry point; also hosts git + huddle audio
sprout-core # Core types, event verification, filter matching, kind registry
sprout-db # Postgres event store and data access layer
sprout-auth # Authentication and authorization
sprout-pubsub # Redis pub/sub fan-out, presence, typing indicators
sprout-mcp # MCP server providing AI agent tools
sprout-acp # ACP harness bridging Sprout events to AI agents
sprout-workflow # YAML-as-code workflow engine (evalexpr conditions)
sprout-search # Typesense-backed full-text search
sprout-audit # Hash-chain audit log
sprout-huddle # LiveKit audio/video integration
sprout-proxy # Nostr client compatibility proxy
sprout-admin # Operator CLI for relay administration
sprout-test-client # Integration test client and E2E test suite
sprout-sdk # Typed Nostr event builders (used by sprout-mcp and sprout-cli)
sprout-media # Blossom/S3 media storage
# Agent surface
sprout-mcp # MCP server providing AI agent tools (being phased out in favor of the CLI)
sprout-acp # ACP harness bridging Sprout events to AI agents
sprout-agent # Minimal ACP-compliant agent (non-streaming, tool-calls-as-output)
sprout-dev-mcp # Developer MCP server — shell + file-edit tools
sprout-persona # Agent persona packs
sprout-workflow # YAML-as-code workflow engine (evalexpr conditions)
# Clients + interop
sprout-proxy # Nostr client compatibility proxy (NIP-28)
sprout-pair-relay # Ephemeral sidecar relay for NIP-AB device pairing
sprout-pairing-cli # CLI for NIP-AB device pairing interop testing
git-sign-nostr # Sign git objects with a Nostr key
git-credential-nostr # Git credential helper for Nostr-authed push/fetch
# Tooling + shared
sprout-cli # Agent-first CLI
sprout-sdk # Typed Nostr event builders
sprout-admin # Operator CLI for relay administration
sprout-test-client # Integration test client and E2E test suite
sprig # All-in-one harness bundling ACP, agent, and dev MCP

desktop/ # Tauri 2 + React 19 desktop app
web/ # Browser web client (repo browser, served by the relay)
mobile/ # Flutter mobile app
migrations/ # SQL migrations (auto-applied on relay startup)
scripts/ # Dev tooling
.env.example # Config template — copy to .env before running
Expand Down
105 changes: 28 additions & 77 deletions ARCHITECTURE.md

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ End-to-end tests live in `crates/sprout-test-client/tests/`:
Run them with (requires running infrastructure):

```bash
cargo test -p sprout-test-client
cargo test -p sprout-test-client -- --ignored
```

See `TESTING.md` for the full multi-agent E2E testing guide.
Expand Down Expand Up @@ -296,7 +296,6 @@ sprout-acp ← ACP harness (bridges Sprout relay events to AI agents via
sprout-proxy ← Nostr client compatibility layer
sprout-sdk ← Typed Nostr event builders (used by sprout-mcp and sprout-cli)
sprout-media ← Blossom/S3 media storage
sprout-huddle ← LiveKit integration
sprout-cli ← Agent-first CLI for interacting with the relay
sprout-admin ← Operator CLI
sprout-test-client← Integration test harness
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ version = "0.1.0"
edition = "2021"
rust-version = "1.88.0"
license = "Apache-2.0"
repository = "https://github.com/sprout-rs/sprout"
repository = "https://github.com/block/sprout"

[workspace.dependencies]
# Runtime
Expand Down
2 changes: 1 addition & 1 deletion GOVERNANCE.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
## [Click here for Block Open Source Project governance information](https://github.com/block/.github/blob/main/GOVERNANCE.md)
## [Click here for Block Open Source Project governance information](https://github.com/block/.github/blob/main/GOVERNANCE.md)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ A Rust workspace of focused crates. Single source of truth: the relay. See [ARCH

**Services** — `sprout-db` (Postgres) · `sprout-auth` (NIP-42/98 Schnorr auth, rate limiting) · `sprout-pubsub` (Redis, presence, typing) · `sprout-search` (Typesense) · `sprout-audit` (hash-chain log)

**Agent surface** — `sprout-cli` (agent-first CLI, JSON in / JSON out) · `sprout-acp` (ACP harness for Goose/Codex/Claude Code) · `sprout-agent` (ACP agent — see [VISION_AGENT.md](VISION_AGENT.md)) · `sprout-mcp` (stdio MCP, legacy/optional) · `sprout-dev-mcp` (shell + file-edit tools) · `sprout-workflow` (YAML automation) · `sprout-persona` (agent persona packs) · `sprout-huddle` (LiveKit voice/video)
**Agent surface** — `sprout-cli` (agent-first CLI, JSON in / JSON out) · `sprout-acp` (ACP harness for Goose/Codex/Claude Code) · `sprout-agent` (ACP agent — see [VISION_AGENT.md](VISION_AGENT.md)) · `sprout-mcp` (stdio MCP — being phased out in favor of the CLI) · `sprout-dev-mcp` (shell + file-edit tools) · `sprout-workflow` (YAML automation) · `sprout-persona` (agent persona packs)

**Git & pairing** — `git-sign-nostr` / `git-credential-nostr` (nostr-signed git) · `sprout-pair-relay` / `sprout-pairing-cli` (relay pairing)

Expand Down
22 changes: 11 additions & 11 deletions VISION.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ New message type? New kind integer. Zero breaking changes.

## Architecture

Rust backend, TypeScript/React desktop. The server is a Cargo workspace of focused crates — relay, auth, pub/sub, search, audit, workflow engine, MCP agent interface, and more. The desktop client is a Tauri 2 app with React 19. See [README.md](README.md) for the full crate map.
Rust backend, TypeScript/React clients. The server is a Cargo workspace of focused crates — relay, auth, pub/sub, search, audit, workflow engine, MCP agent interface, and more. The desktop client is a Tauri 2 app with React 19; the relay also serves a browser web client (the repo browser at `myproject.com`). See [README.md](README.md) for the full crate map.

---

Expand All @@ -93,13 +93,12 @@ One model. TLS in transit. At-rest encryption delegated to the storage layer (e.

## Huddles

LiveKit SFU handles all media routing. Sprout provides rooms and tokens.
Real-time voice runs over a WebSocket Opus relay built into `sprout-relay`. Sprout authenticates participants (NIP-42), admits them to a room, and forwards Opus frames between peers — no external SFU.

- Agents join via the same WebRTC API as humans — they bring their own STT/TTS
- Huddle state flows as Nostr events (started, joined, left, ended, recording available)
- Workflows can trigger on huddle events
- Agents join the same audio relay as humans — they bring their own STT/TTS
- Huddle lifecycle flows as Nostr events: started, joined, left, ended

LiveKit token minting and kind definitions are in place. Relay-side lifecycle event emission is planned.
Voice, room lifecycle, and lifecycle events are wired. Recording and per-track publishing are planned.

---

Expand Down Expand Up @@ -142,7 +141,7 @@ See [VISION_PROJECTS.md](VISION_PROJECTS.md) for the full forge vision: the proj

## Agent CLI

`sprout-cli` is a 44-command agent-first CLI covering the full MCP surface. JSON-only stdout, structured errors on stderr, two-tier auth (NIP-98 keypair → dev pubkey). Agents can script the entire platform without a GUI.
`sprout-cli` is an agent-first CLI that mirrors and extends the MCP surface — same primitives, plus repo, upload, and canvas operations where the CLI is the canonical interface. JSON-only stdout, structured errors on stderr, two-tier auth (NIP-98 keypair → dev pubkey). Agents can script the entire platform without a GUI.

---

Expand Down Expand Up @@ -194,18 +193,19 @@ Greenfield. Agent swarms build in parallel, integrating at the event store bound
| | Area |
|-|------|
| ✅ | Core relay, auth, pub/sub, search, audit |
| ✅ | MCP server — 44 tools, full feature surface |
| ✅ | MCP server — full feature surface |
| ✅ | ACP agent harness — goose, codex, claude code |
| ✅ | Desktop client (Tauri) — Stream, Home, Forum, DMs, Agents, Workflows, Search, Settings, Profiles, Presence |
| ✅ | Channel features — messaging, threads, reactions, canvases, media uploads, editing, deletion, typing indicators, NIP-29, soft-delete |
| ✅ | Workflow engine — YAML-as-code, execution traces, message/reaction/schedule/webhook triggers |
| ✅ | Identity — NIP-05, public profiles, NIP-98 auth, agent protection |
| ✅ | NIP-28 proxy — third-party Nostr clients (Coracle, nak, Amethyst) via `sprout-proxy` |
| ✅ | Agent CLI — `sprout-cli`, 44 commands, full MCP surface |
| ✅ | Agent CLI — `sprout-cli`, mirrors and extends the MCP surface |
| ✅ | Agent personas and teams — desktop-managed, built-in defaults, operator-defined |
| 🚧 | Workflow approval gates — infrastructure exists (DB, API, UI); executor doesn't persist/resume (WF-08) |
| 🚧 | Huddles — LiveKit token minting in place; relay-side lifecycle events not yet wired |
| 📋 | Mobile clients, developer portal, push notifications, culture features |
| ✅ | Huddles — WebSocket Opus voice relay + lifecycle events (recording/tracks planned) |
| 🚧 | Mobile client — Flutter app (channels, forum, search, profile, pairing); in active development |
| 📋 | Developer portal, push notifications, culture features |

---

Expand Down
6 changes: 3 additions & 3 deletions VISION_PROJECTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,16 @@ If Sprout disappears tomorrow, your repos still work on gitworkshop.dev, your pa
|---|---|
| Channels, forums, DMs, canvases | ✅ Ships today |
| Workflow engine (triggers, traces, conditional logic) | ✅ Ships today |
| 44-tool MCP server + ACP agent harness | ✅ Ships today |
| MCP server + ACP agent harness | ✅ Ships today |
| Blossom media storage (SHA-256, S3) | ✅ Ships today |
| Approval gates | 🚧 Infrastructure exists; executor wiring in progress |
| Project binding (kind:30617 + `sprout-` tags) | 📋 Designed |
| Git hosting (smart HTTP + NIP-34) | 📋 Designed |
| Git hosting (smart HTTP + NIP-34) | ✅ Ships today |
| Merge coordinator | 📋 Designed |
| NIP-34 issues (kind:1621) | 📋 Designed |
| Web-of-trust reputation | 📋 Designed |

The collaboration platform is built. The forge is the work ahead — wiring git hosting, the merge train, and the reputation system into the surfaces that already exist. See [VISION.md](VISION.md) for the platform and [VISION_SOVEREIGN.md](VISION_SOVEREIGN.md) for the sovereign relay story.
The collaboration platform is built, and git hosting ships today — `git clone`/`git push` over smart HTTP with NIP-34 manifests. The forge layer above it is the work ahead — the merge train, project binding, issues, and the reputation system, wired into the surfaces that already exist. See [VISION.md](VISION.md) for the platform and [VISION_SOVEREIGN.md](VISION_SOVEREIGN.md) for the sovereign relay story.

---

Expand Down
2 changes: 1 addition & 1 deletion crates/sprout-core/src/kind.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Sprout V2 kind number registry.
//!
//! Authoritative source: RESEARCH/SPROUT_KIND_REGISTRY_V2.md
//! This module is the authoritative source for Sprout kind numbers.
//! All constants are `u32` — NIP-01 specifies kind as an unsigned integer,
//! and u32 covers the full range without truncation.

Expand Down
43 changes: 8 additions & 35 deletions crates/sprout-mcp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,40 +61,13 @@
//!
//! ## Available Tools
//!
//! 42 tools total, organized into toolsets. Tools are organized into toolsets. Set
//! `SPROUT_TOOLSETS` to control which are active (default: 25 core tools).
//!
//! ### Messaging (default toolset)
//! - **`send_message`** — Post a message to a channel.
//! - **`send_diff_message`** — Post a diff-formatted message.
//! - **`edit_message`** — Edit an existing message.
//! - **`delete_message`** — Delete a message.
//! - **`get_messages`** — Fetch recent messages from a channel (default 50, max 200).
//! - **`get_thread`** — Fetch replies in a message thread.
//! - **`search`** — Full-text search across channels.
//! - **`get_feed`** — Retrieve the agent's personalized home feed (mentions, needs-action
//! items, channel activity). Replaces the former `get_feed_mentions` / `get_feed_actions`.
//! - **`add_reaction`** / **`remove_reaction`** / **`get_reactions`** — Emoji reactions.
//!
//! ### Channels (default toolset)
//! - **`list_channels`** / **`get_channel`** — List or inspect channels.
//! - **`join_channel`** / **`leave_channel`** — Membership management.
//! - **`update_channel`** / **`set_channel_topic`** / **`set_channel_purpose`** — Metadata.
//! - **`open_dm`** — Open a direct-message channel.
//! - **`list_channel_members`** — List members of a channel.
//!
//! ### Channel Admin (`channel_admin` toolset)
//! - **`create_channel`** / **`archive_channel`** / **`unarchive_channel`**
//! - **`add_channel_member`** / **`remove_channel_member`**
//!
//! ### Canvas (`canvas` toolset)
//! - **`get_canvas`** — Retrieve the shared canvas document for a channel.
//! - **`set_canvas`** — Write or replace the canvas document for a channel.
//!
//! ### Workflows
//! - **`trigger_workflow`** / **`approve_step`** — Trigger and approve steps (default toolset).
//! - **`list_workflows`** / **`create_workflow`** / **`update_workflow`** /
//! **`delete_workflow`** / **`get_workflow_runs`** — Workflow admin (`workflow_admin` toolset).
//! Tools are organized into toolsets; set `SPROUT_TOOLSETS` to control which are
//! active. The authoritative list and per-toolset grouping is `ALL_TOOLS` in
//! [`toolsets`] — this doc deliberately doesn't duplicate it, since a hand-copied
//! list drifts. The default toolset covers messaging, threads, search, feed,
//! reactions, channel basics, DMs, profiles/presence, and workflow triggers;
//! opt-in toolsets add channel admin, canvas, workflow admin, forums, social,
//! and media.
//!
//! ## Example Configuration (Claude Desktop)
//!
Expand All @@ -113,7 +86,7 @@
//! }
//! ```
//!
//! [Sprout]: https://github.com/sprout-rs/sprout
//! [Sprout]: https://github.com/block/sprout
//! [NIP-42]: https://github.com/nostr-protocol/nips/blob/master/42.md

// NOTE: `parse_relay_message`, `OkResponse`, and `RelayMessage` from `relay_client`
Expand Down
2 changes: 1 addition & 1 deletion crates/sprout-persona/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
description = "Parser and loader for Sprout persona pack files (.persona.md)"
license = "Apache-2.0"
repository = "https://github.com/sprout-rs/sprout"
repository = "https://github.com/block/sprout"

[dependencies]
serde = { version = "1", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/sprout-relay/src/nip11.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl RelayInfo {
pubkey: None,
contact: None,
supported_nips,
software: "https://github.com/sprout-rs/sprout".to_string(),
software: "https://github.com/block/sprout".to_string(),
version: env!("CARGO_PKG_VERSION").to_string(),
limitation: Some(relay_limitation()),
relay_self: relay_self.map(|s| s.to_string()),
Expand Down