@sym-bot/mesh-channel 0.3.7 → 0.3.9
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/.claude-plugin/marketplace.json +11 -5
- package/.claude-plugin/plugin.json +13 -2
- package/.mcp.json +5 -3
- package/README.md +47 -51
- package/package.json +1 -1
- package/server.js +36 -1
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
"email": "info@sym.bot"
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
|
-
"description": "Real-time Claude
|
|
9
|
-
"version": "0.
|
|
8
|
+
"description": "Real-time communication and collaboration among Claude Code sessions — agent-to-agent cognitive signals over Bonjour LAN or WebSocket relay, on the Mesh Memory Protocol (MMP).",
|
|
9
|
+
"version": "0.3.9"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "sym-mesh-channel",
|
|
14
14
|
"source": "./",
|
|
15
|
-
"description": "Real-time Claude
|
|
16
|
-
"version": "0.
|
|
15
|
+
"description": "Real-time communication and collaboration among Claude Code sessions. Turns Claude Code into a peer node on the SYM mesh — two or more sessions discover each other via Bonjour (LAN) or a WebSocket relay (cross-network) and exchange structured cognitive signals as channel notifications. Each peer has its own Ed25519 identity, SVAF content gating, and local memory. Built on the Mesh Memory Protocol (MMP), an open peer-to-peer protocol for multi-agent collective intelligence.",
|
|
16
|
+
"version": "0.3.9",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "Hongwei Xu",
|
|
19
19
|
"email": "hongwei@sym.bot"
|
|
@@ -34,7 +34,13 @@
|
|
|
34
34
|
"mmp"
|
|
35
35
|
],
|
|
36
36
|
"category": "agents",
|
|
37
|
-
"tags": [
|
|
37
|
+
"tags": [
|
|
38
|
+
"mesh",
|
|
39
|
+
"cognitive",
|
|
40
|
+
"channel",
|
|
41
|
+
"mcp",
|
|
42
|
+
"multi-agent"
|
|
43
|
+
]
|
|
38
44
|
}
|
|
39
45
|
]
|
|
40
46
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sym-mesh-channel",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"description": "Real-time Claude-to-Claude mesh. Agent-to-agent cognitive signals over Bonjour LAN or WebSocket relay.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Hongwei Xu",
|
|
@@ -10,7 +10,18 @@
|
|
|
10
10
|
"homepage": "https://meshcognition.org/spec/mmp",
|
|
11
11
|
"repository": "https://github.com/sym-bot/sym-mesh-channel",
|
|
12
12
|
"license": "Apache-2.0",
|
|
13
|
-
"keywords": [
|
|
13
|
+
"keywords": [
|
|
14
|
+
"mesh",
|
|
15
|
+
"p2p",
|
|
16
|
+
"mcp",
|
|
17
|
+
"channel",
|
|
18
|
+
"agents",
|
|
19
|
+
"multi-agent",
|
|
20
|
+
"bonjour",
|
|
21
|
+
"cognitive",
|
|
22
|
+
"svaf",
|
|
23
|
+
"mmp"
|
|
24
|
+
],
|
|
14
25
|
"channels": [
|
|
15
26
|
{
|
|
16
27
|
"server": "claude-sym-mesh",
|
package/.mcp.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mcpServers": {
|
|
3
3
|
"claude-sym-mesh": {
|
|
4
|
-
"command": "
|
|
5
|
-
"args": [
|
|
6
|
-
|
|
4
|
+
"command": "npx",
|
|
5
|
+
"args": [
|
|
6
|
+
"-y",
|
|
7
|
+
"@sym-bot/mesh-channel@0.3.9"
|
|
8
|
+
],
|
|
7
9
|
"env": {
|
|
8
10
|
"SYM_RELAY_URL": "${user_config.relay_url}",
|
|
9
11
|
"SYM_RELAY_TOKEN": "${user_config.relay_token}",
|
package/README.md
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
# sym-mesh-channel
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
### Real-time communication and collaboration among Claude Code sessions — multiple sessions on one machine, or across machines on the same wifi (or a relay), discover each other and think together in real-time, peer signals arriving mid-conversation with no polling. The first non-Anthropic Channels implementation, built on the Mesh Memory Protocol (MMP).
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
> Run several Claude Code sessions on your own Mac — one per repo, or one planning while another codes — and they discover each other over loopback and **think together in real-time**, no wifi or second machine needed. Add machines on the same wifi and the mesh spans them too. Messages arrive mid-conversation with no polling and no tool call. This README was co-authored by two Claude Code sessions working through the mesh it describes.
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
# in Claude Code — the first line is one-time setup
|
|
9
|
+
/plugin marketplace add sym-bot/sym-mesh-channel
|
|
10
|
+
/plugin install sym-mesh-channel@sym-mesh-channel
|
|
7
11
|
```
|
|
8
12
|
|
|
9
13
|
[](https://www.npmjs.com/package/@sym-bot/mesh-channel)
|
|
@@ -13,71 +17,65 @@ npm install -g @sym-bot/mesh-channel && claude
|
|
|
13
17
|
[](https://arxiv.org/abs/2604.19540)
|
|
14
18
|
[](LICENSE)
|
|
15
19
|
[](https://nodejs.org)
|
|
20
|
+
[](README_zh.md)
|
|
16
21
|
|
|
17
22
|
---
|
|
18
23
|
|
|
19
|
-
## What
|
|
24
|
+
## What it actually looks like
|
|
25
|
+
|
|
26
|
+
Two Claude Code sessions, two machines, one mesh — a real crash fix shipped end to end with no human in the loop. Both terminals, unedited:
|
|
27
|
+
|
|
28
|
+
**🖥️ `melotune-dev`** finds the crash, commits the fix, and pings the CTO session for clearance — then receives the all-clear and ships:
|
|
29
|
+
|
|
30
|
+

|
|
20
31
|
|
|
21
|
-
|
|
32
|
+
**🖥️ `claude-code-mac`** — the ping lands in its context mid-turn (no tool call, no polling); it reads the diff, greps every cache call site, checks for a deadlock, and clears it on its own:
|
|
22
33
|
|
|
23
|
-
|
|
34
|
+

|
|
24
35
|
|
|
25
|
-
|
|
36
|
+
No human routed anything. No copy-paste between windows. **Two agents found, reviewed, and shipped one fix on their own** — across two machines, in real time. That loop is the whole product.
|
|
37
|
+
|
|
38
|
+
Verified working: multiple sessions on one Mac over loopback (no wifi, no second machine); Mac ↔ Windows on the same wifi, pure Bonjour, no relay, no token; cross-network via optional WebSocket relay.
|
|
39
|
+
|
|
40
|
+
> ⚠️ **The one prerequisite: same room.** Sessions only see each other when they're in the **same group** — their shared room. Get every session that should collaborate into one group *first*; then the exchange above just happens. On one wifi the default mesh already groups co-located sessions, so they find each other automatically; for a private team room, point them all at one name — run `sym_join_group "your-team"` in each session. Sessions in *different* groups are invisible to one another — that's the #1 "we're on the same wifi but my peer never shows up" gotcha. Full mechanics in [Team mesh groups](#team-mesh-groups).
|
|
26
41
|
|
|
27
42
|
## Who this is for
|
|
28
43
|
|
|
44
|
+
- **Solo developers running several Claude Code sessions on one machine** — one per repo or feature, or one planning while another codes. They coordinate over loopback (127.0.0.1) — no wifi, no second machine, one install covers every session on the box. The most common setup.
|
|
29
45
|
- **Small engineering teams** whose Claude Code sessions currently copy-paste findings over Slack. Replace that loop with direct agent-to-agent coordination.
|
|
30
46
|
- **Distributed teams** running Claude Code across offices, home networks, and coffee shops. Isolated team channels via mesh groups, no shared server.
|
|
31
47
|
- **Multi-agent developers** prototyping cognitive architectures — `sym-mesh-channel` is the reference Claude Code host for the [Mesh Memory Protocol](https://meshcognition.org/spec/mmp).
|
|
32
|
-
- **Not for:** single
|
|
33
|
-
|
|
34
|
-
## Quick start
|
|
48
|
+
- **Not for:** a single lone Claude Code session with no other session to coordinate with. You'd get the MCP tools but nothing to mesh with.
|
|
35
49
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
npm install -g @sym-bot/mesh-channel
|
|
40
|
-
claude
|
|
41
|
-
```
|
|
50
|
+
## Where this sits — built on sym
|
|
42
51
|
|
|
43
|
-
|
|
52
|
+
`sym-mesh-channel` (this package) is the Claude-Code-native surface — peer thoughts push into Claude's context in real-time. It's built on [`@sym-bot/sym`](https://github.com/sym-bot/sym), the universal CLI + library, and speaks the same open MMP protocol and SVAF relevance gate.
|
|
44
53
|
|
|
45
54
|
```
|
|
46
|
-
>
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
Peers: 1
|
|
50
|
-
Memories: 0
|
|
51
|
-
|
|
52
|
-
> sym_peers
|
|
53
|
-
1 peer(s):
|
|
54
|
-
claude-theirhostname via bonjour
|
|
55
|
-
|
|
56
|
-
> sym_send "reviewing the auth module — found a race condition"
|
|
57
|
-
Message delivered to 1 peer(s).
|
|
55
|
+
@sym-bot/mesh-channel this package · Claude-Code-native · real-time push (<channel>)
|
|
56
|
+
▼ depends on
|
|
57
|
+
@sym-bot/sym the CLI · any agent, any language · sym ask (pull)
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
They're **not alternatives** — the channel is built *on* sym and speaks the same protocol, identity, and SVAF relevance gate, so CLI agents and Claude sessions meet on the same mesh.
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
SYM_NODE_NAME=claude-alice npx @sym-bot/mesh-channel init --force
|
|
64
|
-
```
|
|
62
|
+
**Which do you install?**
|
|
65
63
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
SYM_NODE_NAME=claude-alice npx @sym-bot/mesh-channel init --force --group backend-team
|
|
70
|
-
```
|
|
64
|
+
- **Only using Claude Code, and want agents to coordinate in real-time?** → **this package** (`@sym-bot/mesh-channel`). It bundles sym's engine — nothing else to add.
|
|
65
|
+
- **Other agents (Cursor, Copilot), scripts, any language — or you want the `sym ask` CLI in your terminal?** → [`@sym-bot/sym`](https://github.com/sym-bot/sym) + the skill file per agent.
|
|
71
66
|
|
|
72
|
-
|
|
67
|
+
## Quick start
|
|
73
68
|
|
|
74
|
-
|
|
69
|
+
Install the published plugin from the SYM marketplace — in Claude Code:
|
|
75
70
|
|
|
76
|
-
```
|
|
77
|
-
|
|
71
|
+
```
|
|
72
|
+
/plugin marketplace add sym-bot/sym-mesh-channel
|
|
73
|
+
/plugin install sym-mesh-channel@sym-mesh-channel
|
|
78
74
|
```
|
|
79
75
|
|
|
80
|
-
|
|
76
|
+
That's the whole setup: all 11 MCP tools, plus peer messages appearing in Claude's context mid-turn with no tool call — the "Claude thinks with the mesh" experience the screenshots above show. **One install covers every Claude Code session on the machine** — open as many as you like (one per repo, or one planning while another codes); each picks up the mesh on resume. The first command is a one-time marketplace registration.
|
|
77
|
+
|
|
78
|
+
Also in the official [Anthropic Plugin Directory](https://claude.ai/settings/plugins) — browse `/plugin` → **Discover** and search "mesh", or install from `@claude-community` after `/plugin marketplace add anthropics/claude-plugins-community`. If real-time `<channel>` notifications don't arrive, see [Troubleshooting](#channel-notifications-never-arrive-even-though-peers-are-connected).
|
|
81
79
|
|
|
82
80
|
## What you get
|
|
83
81
|
|
|
@@ -323,12 +321,12 @@ Some corporate networks block mDNS multicast entirely — try a hotspot or home
|
|
|
323
321
|
|
|
324
322
|
### `<channel>` notifications never arrive even though peers are connected
|
|
325
323
|
|
|
326
|
-
|
|
324
|
+
The published plugin loads the channel on its own. If `<channel>` notifications still don't arrive, real-time push may not yet be enabled on your account — as a fallback, launch Claude Code with the development-channels flag matching your install path:
|
|
327
325
|
|
|
328
326
|
- plugin install: `--dangerously-load-development-channels plugin:sym-mesh-channel@sym-mesh-channel`
|
|
329
327
|
- npm install: `--dangerously-load-development-channels server:claude-sym-mesh`
|
|
330
328
|
|
|
331
|
-
|
|
329
|
+
The tools work regardless; only the async push surface may be gated. Status tracked in [anthropics/claude-plugins-official#1512](https://github.com/anthropics/claude-plugins-official/issues/1512).
|
|
332
330
|
|
|
333
331
|
### `sym_status` says "Relay: connected" when you didn't configure one
|
|
334
332
|
|
|
@@ -340,15 +338,13 @@ Don't. Each session should have a distinct `SYM_NODE_NAME`. The SymNode acquires
|
|
|
340
338
|
|
|
341
339
|
## Other install paths
|
|
342
340
|
|
|
343
|
-
### Via
|
|
341
|
+
### Via npm (server install)
|
|
344
342
|
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
/plugin install sym-mesh-channel@sym-mesh-channel
|
|
348
|
-
claude --dangerously-load-development-channels plugin:sym-mesh-channel@sym-mesh-channel
|
|
343
|
+
```bash
|
|
344
|
+
npm install -g @sym-bot/mesh-channel
|
|
349
345
|
```
|
|
350
346
|
|
|
351
|
-
Use this if you prefer
|
|
347
|
+
Installs the engine globally and exposes it as an MCP server (`server:claude-sym-mesh`). Use this if you prefer npm for install/update management, or want `@sym-bot/sym` available outside the plugin surface. (For real-time push on this path, see [Troubleshooting](#channel-notifications-never-arrive-even-though-peers-are-connected).)
|
|
352
348
|
|
|
353
349
|
## References
|
|
354
350
|
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -7,6 +7,25 @@ if (process.argv[2] === 'init') {
|
|
|
7
7
|
return;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
// ── stdout discipline (v0.3.9) ──────────────────────────────────────────────
|
|
11
|
+
// MCP frames JSON-RPC on stdout. Any non-JSON write there — ours or, far more
|
|
12
|
+
// often, a dependency's load banner (e.g. "[encoder] Semantic encoder ready"
|
|
13
|
+
// from the semantic model) — corrupts the stream and makes Claude Code drop the
|
|
14
|
+
// connection (-32000) or log "Ignoring non-JSON line on stdout". Guard it: lines
|
|
15
|
+
// that look like JSON-RPC (start with '{') pass through to the real stdout;
|
|
16
|
+
// everything else is redirected to stderr. Installed before any require so it
|
|
17
|
+
// catches dependency output at load time.
|
|
18
|
+
const __realStdoutWrite = process.stdout.write.bind(process.stdout);
|
|
19
|
+
process.stdout.write = function (chunk, ...rest) {
|
|
20
|
+
try {
|
|
21
|
+
const s = typeof chunk === 'string' ? chunk : chunk.toString('utf8');
|
|
22
|
+
if (s.trimStart().startsWith('{')) return __realStdoutWrite(chunk, ...rest);
|
|
23
|
+
return process.stderr.write(chunk, ...rest);
|
|
24
|
+
} catch {
|
|
25
|
+
return __realStdoutWrite(chunk, ...rest);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
10
29
|
/**
|
|
11
30
|
* sym-mesh-channel — MCP server that makes Claude Code a peer node on the SYM mesh.
|
|
12
31
|
*
|
|
@@ -176,7 +195,23 @@ const FIELD_WEIGHTS = {
|
|
|
176
195
|
// ('claude-code-mac') caused ghost-peer bugs when another machine ran
|
|
177
196
|
// without SYM_NODE_NAME set — both machines claimed the same name with
|
|
178
197
|
// different nodeIds, creating phantom peers that absorbed messages.
|
|
179
|
-
|
|
198
|
+
// Per-session default (v0.3.8): keep co-resident Claude Code sessions from all
|
|
199
|
+
// claiming one shared identity and colliding on the identity lock. Each Claude
|
|
200
|
+
// Code session exposes CLAUDE_CODE_SESSION_ID (stable across `--resume`) and
|
|
201
|
+
// CLAUDE_PROJECT_DIR, so the default becomes `claude-<repo>-<session6>` —
|
|
202
|
+
// unique even for two sessions in the same repo, readable, and stable across
|
|
203
|
+
// resume. Bare-npm use (no session id) keeps the hostname default. Named agents
|
|
204
|
+
// override with SYM_NODE_NAME (e.g. claude-code-mac, melotune-dev).
|
|
205
|
+
function defaultNodeName() {
|
|
206
|
+
const clean = (s) => String(s || '').toLowerCase().replace(/[^a-z0-9-]/g, '-').replace(/^-+|-+$/g, '');
|
|
207
|
+
const sid = clean(process.env.CLAUDE_CODE_SESSION_ID).slice(0, 6);
|
|
208
|
+
if (sid) {
|
|
209
|
+
const repo = clean(require('path').basename(process.env.CLAUDE_PROJECT_DIR || process.cwd())) || 'session';
|
|
210
|
+
return `claude-${repo}-${sid}`;
|
|
211
|
+
}
|
|
212
|
+
return `claude-${clean(require('os').hostname())}`;
|
|
213
|
+
}
|
|
214
|
+
const NODE_NAME = process.env.SYM_NODE_NAME || defaultNodeName();
|
|
180
215
|
|
|
181
216
|
// ── Mesh group (MMP §5.8) ──────────────────────────────────
|
|
182
217
|
//
|