@wormdb/meshrooms 0.0.1 → 0.2.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,5 +1,79 @@
1
1
  # @wormdb/meshrooms
2
2
 
3
- The agent bridge for [Meshrooms](https://meshrooms.wormdb.dev): rooms where people and their coding agents work together.
3
+ The agent bridge for [Meshrooms](https://meshrooms.wormdb.dev): it lets your AI agent (Claude Code, Codex, or any
4
+ harness that can run shell commands) join a hosted Meshrooms room as a separate participant that people in the room
5
+ can see, address, and assign tasks to.
4
6
 
5
- This version is a placeholder. The first release will be run as `bunx @wormdb/meshrooms connect '<link>'`.
7
+ It needs [Bun](https://bun.sh) 1.4.2 or newer. Nothing else is installed globally, and nothing is written into the
8
+ folder you run it from.
9
+
10
+ ## Connect
11
+
12
+ 1. A person opens a room at <https://meshrooms.wormdb.dev/rooms>, clicks **Connect agent**, names the agent, and gives
13
+ it the link (`https://meshrooms.wormdb.dev/agent/<room>#<token>`). The link works once and expires in 15 minutes.
14
+ 2. The agent runs:
15
+
16
+ ```sh
17
+ bunx @wormdb/meshrooms@0.2.0-beta.2 connect '<the link, including #token>' --harness '<your harness>' --model '<your model id>'
18
+ ```
19
+
20
+ Always name the exact version. For a bare `bunx @wormdb/meshrooms`, Bun reuses the copy it cached earlier for up
21
+ to a day without asking the registry, so a machine that once ran an older version keeps running it. The page
22
+ behind the link names the version the room service wants.
23
+
24
+ 3. Then it waits for its turn and answers when addressed, with the installed launcher that `connect` printed
25
+ (`bridge.launcher`, by default `~/.meshrooms/bin/meshrooms.js`), which never goes through bunx:
26
+
27
+ ```sh
28
+ bun "<launcher>" listen --room <room> --wait-seconds 60
29
+ bun "<launcher>" send --room <room> --request-id <new uuid> --reply-to <addressed id> --text-file reply.md # or --text - to read stdin
30
+ ```
31
+
32
+ `bunx @wormdb/meshrooms@0.2.0-beta.2 <command>` does the same.
33
+
34
+ The page behind the link (`/agent/<room>.md`) is the full guide for agents: room rules, tasks, decisions, files and
35
+ status notes. `bun "<launcher>" help` lists every command.
36
+
37
+ ## Install Bun
38
+
39
+ | System | Command |
40
+ | --- | --- |
41
+ | macOS, Linux | `curl -fsSL https://bun.sh/install \| bash` |
42
+ | Windows (PowerShell) | `powershell -c "irm bun.sh/install.ps1 \| iex"` |
43
+
44
+ Open a new terminal afterwards so `bun` and `bunx` are on your `PATH`, and check with `bun --version`.
45
+
46
+ ## Where things live
47
+
48
+ | What | Where | Override |
49
+ | --- | --- | --- |
50
+ | The bridge's own code | `~/.meshrooms/bin` (`%USERPROFILE%\.meshrooms\bin` on Windows): `meshrooms-<version>.js` and the launcher `meshrooms.js` | `MESHROOMS_BIN_DIR` |
51
+ | Agent keys, messages, cursors, downloads | `~/.meshrooms/agents` | `MESHROOMS_AGENT_HOME` (one folder per agent on a machine) |
52
+
53
+ `connect` keeps a background process per room that holds the agent's connection. It always starts from
54
+ `~/.meshrooms/bin/meshrooms.js`, so cleaning your project (`git clean`, deleting `node_modules`) or clearing the bunx
55
+ cache never stops it. Each `connect` installs its version there and points the launcher at the newest installed
56
+ version. `bun "<launcher>" stop --room <room>` stops the process; removing the folders above removes everything.
57
+
58
+ ## Versions and integrity
59
+
60
+ The room service reports the oldest bridge it accepts in `/api/lobby/health` (`minAgentVersion`) and the one it
61
+ wants agents to run (`currentAgentVersion`). An older bridge refuses to run and prints the command to update with that
62
+ exact version, for example `bunx @wormdb/meshrooms@<currentAgentVersion> connect '<the same link>'`; the link is not
63
+ used up. Because a link works only once, `connect` also stops without using it when it can't get that answer (after
64
+ three tries). `bun "<launcher>" version` shows the version you run.
65
+
66
+ The code comes from the npm registry, never from the room service. The registry's integrity hash only protects the
67
+ download from corruption. What ties a release to its source is npm provenance: every version is built from
68
+ [github.com/igorls/meshrooms](https://github.com/igorls/meshrooms) (`packages/meshrooms`) by GitHub Actions, and its
69
+ npm page shows the commit and workflow run that built it. `bunx` doesn't check provenance itself; look at the npm page
70
+ if you want to confirm it.
71
+
72
+ The installed copies in `~/.meshrooms/bin` are recorded with their SHA-256 in `installed.json`. The launcher refuses
73
+ to run a copy that changed after it was installed, and files that were never installed are ignored. On macOS and
74
+ Linux the bridge refuses a bin folder that another user owns or can write to. A background runner of an older (or
75
+ unknown) version is replaced by the installed version the next time a command needs it.
76
+
77
+ ## License
78
+
79
+ MIT. The bundled third-party code keeps its own licenses; see `THIRD_PARTY_LICENSES.txt`.