Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ coverage/
playwright-report/
test-results/
target/
packages/zed/target/
.multi-agent/
*.env
*.env.local
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

- Session access control: host approval, required display names, repo/email/domain gates (`session.policy` / `auth.pending` / `host.approve|deny`)
- Configurable git remote prefixes and host rewrites; layered `chorus.json` org settings
- Hybrid OpenCode security e2e, VS Code adapter e2e, and Cloud Agent install script
- Hybrid OpenCode security e2e, VS Code/Zed adapter e2e, and Cloud Agent install script
- VS Code extension (`packages/vscode`) — share/join/chat; Session sidebar; approve/deny
- Zed joiner extension (`packages/zed`) + `chorus-zed-helper` (MCP/CLI)
- Extract `@chorus/client` (`JoinClient` + `RelayServer`) for reuse by OpenCode, VS Code, and future adapters
- Real-time shared transcript for all agents: fan out collaborator prompts to every joiner, abort joiner local LLM, mirror `[Host]`/`[name]`/`[AI]` (prefer web UI for live view)
- Joiner mirrors host prompts and AI replies into its OpenCode session transcript (`[Host]:` / `[AI]:`), including history replay on join (replaces toast-only viewing)
Expand Down
16 changes: 16 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[workspace]
resolver = "2"
members = ["crates/chorus-relay"]
members = ["crates/chorus-relay", "crates/chorus-zed-helper"]
exclude = ["packages/zed"]
# packages/zed is a standalone Zed extension (wasm32-wasip2) built by Zed / cargo --target.

[workspace.package]
edition = "2021"
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Collaborative OpenCode session sharing. Pair-program a live AI session from anot

## How it works

Chorus is an [OpenCode](https://github.com/sst/opencode) plugin (plus a VS Code adapter) and a **Rust WebSocket relay** (`chorus-relay`).
Chorus is an [OpenCode](https://github.com/sst/opencode) plugin (plus VS Code / other adapters) and a **Rust WebSocket relay** (`chorus-relay`).

```
Host runs opencode → plugin loads
Expand Down Expand Up @@ -52,22 +52,27 @@ One monorepo, two ecosystems, one wire contract:
| `packages/plugin` | npm `@chorus/plugin` | OpenCode plugin — tools, hooks, spawns/manages relay |
| `packages/client` | npm `@chorus/client` | Shared `JoinClient` + `RelayServer` for host adapters |
| `packages/vscode` | VS Code extension `chorus` | Share/join Chorus sessions from VS Code |
| `packages/zed` | Zed extension `chorus` | Joiner adapter (WASM + MCP → `chorus-zed-helper`) |
| `packages/shared` | npm `@chorus/shared` | TypeScript types + codecs for joiner and host-control protocols |
| `crates/chorus-relay` | `chorus-relay` binary | Rust WebSocket relay (`/ws` joiners, `/host` control plane) |
| `crates/chorus-zed-helper` | `chorus-zed-helper` binary | Native Chorus join client (CLI + MCP) for Zed |
| `protocol/` | fixtures (not published) | Canonical JSON examples both TS and Rust must deserialize |

Root `package.json` scripts are the only task entry (`build`, `test`, `typecheck`). Bun workspaces own `packages/*`; Cargo owns `crates/*`.
Root `package.json` scripts are the only task entry (`build`, `test`, `typecheck`). Bun workspaces own `packages/*`; Cargo owns `crates/*` (Zed’s `packages/zed` is built separately for `wasm32-wasip2`).

## Development

```sh
bun install
bun run build # release relay + TS packages
bun run test # relay tests + TS/Bun tests (includes protocol fixtures)
bun run build # release relay + helper + TS packages
bun run test # relay/helper tests + TS/Bun tests (includes protocol fixtures)
bun run typecheck
cargo test -p chorus-relay
cargo test -p chorus-zed-helper
```

Zed joiner (optional): see [packages/zed/README.md](packages/zed/README.md) for Install Dev Extension + `chorus-zed-helper` setup.

### Multi-agent local testing

Run several isolated OpenCode servers on one machine (each with Chorus loaded) and drive share/join over the HTTP API:
Expand Down
29 changes: 29 additions & 0 deletions crates/chorus-zed-helper/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[package]
name = "chorus-zed-helper"
version = "0.1.0"
edition.workspace = true
license.workspace = true
authors.workspace = true
description = "Native Chorus join/host helper for the Zed extension (CLI + MCP)"
publish = false

[[bin]]
name = "chorus-zed-helper"
path = "src/main.rs"

[dependencies]
chorus-relay = { path = "../chorus-relay" }
clap = { version = "4", features = ["derive", "env"] }
futures-util = "0.3"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tokio = { version = "1", features = ["full"] }
tokio-tungstenite = "0.26"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
url = "2"

[dev-dependencies]
chorus-relay = { path = "../chorus-relay" }
tokio-tungstenite = "0.26"
futures-util = "0.3"
Loading