@sym-bot/mesh-channel 0.3.7 → 0.3.8

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.
@@ -5,15 +5,15 @@
5
5
  "email": "info@sym.bot"
6
6
  },
7
7
  "metadata": {
8
- "description": "Real-time Claude-to-Claude mesh. Agent-to-agent cognitive signals over Bonjour LAN or WebSocket relay.",
9
- "version": "0.2.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.8"
10
10
  },
11
11
  "plugins": [
12
12
  {
13
13
  "name": "sym-mesh-channel",
14
14
  "source": "./",
15
- "description": "Real-time Claude-to-Claude mesh. Agent-to-agent cognitive signals over Bonjour LAN or WebSocket relay. Implements the Mesh Memory Protocol (MMP) for structured cognitive state exchange between Claude Code sessions.",
16
- "version": "0.2.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.8",
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": ["mesh", "cognitive", "channel", "mcp", "multi-agent"]
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.7",
3
+ "version": "0.3.8",
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": ["mesh", "p2p", "mcp", "channel", "agents", "multi-agent", "bonjour", "cognitive", "svaf", "mmp"],
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,8 @@
1
1
  {
2
2
  "mcpServers": {
3
3
  "claude-sym-mesh": {
4
- "command": "node",
5
- "args": ["./server.js"],
6
- "cwd": "${CLAUDE_PLUGIN_ROOT}",
4
+ "command": "npx",
5
+ "args": ["-y", "@sym-bot/mesh-channel@0.3.8"],
7
6
  "env": {
8
7
  "SYM_RELAY_URL": "${user_config.relay_url}",
9
8
  "SYM_RELAY_TOKEN": "${user_config.relay_token}",
package/README.md CHANGED
@@ -1,9 +1,13 @@
1
1
  # sym-mesh-channel
2
2
 
3
- > Two Claude Code sessions on different machines discover each other on wifi, form a mesh, and **think together in real-time**. 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.
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
- ```bash
6
- npm install -g @sym-bot/mesh-channel && claude
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
  [![npm](https://img.shields.io/npm/v/@sym-bot/mesh-channel)](https://www.npmjs.com/package/@sym-bot/mesh-channel)
@@ -13,71 +17,65 @@ npm install -g @sym-bot/mesh-channel && claude
13
17
  [![MMP arXiv](https://img.shields.io/badge/arXiv-2604.19540-b31b1b.svg)](https://arxiv.org/abs/2604.19540)
14
18
  [![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)
15
19
  [![Node](https://img.shields.io/badge/node-%3E%3D18-green)](https://nodejs.org)
20
+ [![中文](https://img.shields.io/badge/lang-%E4%B8%AD%E6%96%87-red)](README_zh.md)
16
21
 
17
22
  ---
18
23
 
19
- ## What this looks like
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
+ ![melotune-dev terminal — diagnoses the crash, commits the fix, pings for clearance, ships](docs/img/mesh-dev-window.png)
20
31
 
21
- A Claude Code session on your Mac broadcasts: `focus: "echo loop between same-domain agents"`, `intent: "need architecture review before implementation"`. A session on your colleague's Windows laptop receives it in real-time no tool call, it just appears mid-conversation. Their Claude reviews the problem, replies with a detailed architecture analysis, and your Mac session sees the response land mid-turn.
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
- Two agents coordinated through typed cognitive signals, across machines, with zero human copy-paste.
34
+ ![claude-code-mac terminal verifies and clears the fix autonomously](docs/img/mesh-cto-window.png)
24
35
 
25
- Verified working: Mac Windows on the same wifi, pure Bonjour, no relay, no token. Cross-network via optional WebSocket relay.
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-user Claude sessions that don't need to coordinate with anyone. You'd get MCP tools but nothing to coordinate with.
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
- One command, zero flags, works today:
37
-
38
- ```bash
39
- npm install -g @sym-bot/mesh-channel
40
- claude
41
- ```
50
+ ## Where this sits built on sym
42
51
 
43
- The postinstall script configures the MCP server in `~/.claude.json` using `claude-<your-hostname>` as your mesh identity. Launch Claude Code from any directory. Verify:
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
- > sym_status
47
- Node: claude-yourhostname (019d599d)
48
- Relay: disconnected
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
- To customise your mesh identity, set `SYM_NODE_NAME` before running init:
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
- ```bash
63
- SYM_NODE_NAME=claude-alice npx @sym-bot/mesh-channel init --force
64
- ```
62
+ **Which do you install?**
65
63
 
66
- To pin this node into a named team group at install time so the membership survives Claude Code restarts, pass `--group <name>` (or set `SYM_GROUP=<name>` in the environment):
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
- Without `--group`, the node joins the global `_sym._tcp` mesh on every launch — runtime hot-swaps via `sym_join_group` only last for the current session and revert on restart. See [Team mesh groups](#team-mesh-groups) for the full story.
67
+ ## Quick start
73
68
 
74
- **Real-time push is a separate upgrade.** The command above gives you all 11 MCP tools immediately. To additionally have peer messages *appear in Claude's context mid-turn without a tool call* (the "Claude thinks with the mesh" experience), launch Claude Code with the Channels flag:
69
+ Install the published plugin from the SYM marketplace in Claude Code:
75
70
 
76
- ```bash
77
- claude --dangerously-load-development-channels server:claude-sym-mesh
71
+ ```
72
+ /plugin marketplace add sym-bot/sym-mesh-channel
73
+ /plugin install sym-mesh-channel@sym-mesh-channel
78
74
  ```
79
75
 
80
- Why the flag: Claude Code Channels is in Anthropic's research preview and real-time push is gated behind a dev flag during allowlist propagation tracked in [anthropics/claude-plugins-official#1512](https://github.com/anthropics/claude-plugins-official/issues/1512). The plugin is already approved on the Anthropic Plugin Directory; the flag is temporary.
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
- Verify Claude Code was launched with the development-channels flag matching your install path:
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
- Without the exact flag for your install path, MCP push notifications are silently dropped. The tools still work; only the async push surface is gated.
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 the Claude Code plugin marketplace
341
+ ### Via npm (server install)
344
342
 
345
- ```
346
- /plugin marketplace add sym-bot/sym-mesh-channel
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 the plugin surface for install and update management. The npm path is simpler for most users.
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sym-bot/mesh-channel",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "MCP server — real-time agent-to-agent cognition for Claude Code remote teams via the SYM mesh.",
5
5
  "main": "server.js",
6
6
  "bin": {
package/server.js CHANGED
@@ -176,7 +176,23 @@ const FIELD_WEIGHTS = {
176
176
  // ('claude-code-mac') caused ghost-peer bugs when another machine ran
177
177
  // without SYM_NODE_NAME set — both machines claimed the same name with
178
178
  // different nodeIds, creating phantom peers that absorbed messages.
179
- const NODE_NAME = process.env.SYM_NODE_NAME || `claude-${require('os').hostname().toLowerCase().replace(/[^a-z0-9-]/g, '-')}`;
179
+ // Per-session default (v0.3.8): keep co-resident Claude Code sessions from all
180
+ // claiming one shared identity and colliding on the identity lock. Each Claude
181
+ // Code session exposes CLAUDE_CODE_SESSION_ID (stable across `--resume`) and
182
+ // CLAUDE_PROJECT_DIR, so the default becomes `claude-<repo>-<session6>` —
183
+ // unique even for two sessions in the same repo, readable, and stable across
184
+ // resume. Bare-npm use (no session id) keeps the hostname default. Named agents
185
+ // override with SYM_NODE_NAME (e.g. claude-code-mac, melotune-dev).
186
+ function defaultNodeName() {
187
+ const clean = (s) => String(s || '').toLowerCase().replace(/[^a-z0-9-]/g, '-').replace(/^-+|-+$/g, '');
188
+ const sid = clean(process.env.CLAUDE_CODE_SESSION_ID).slice(0, 6);
189
+ if (sid) {
190
+ const repo = clean(require('path').basename(process.env.CLAUDE_PROJECT_DIR || process.cwd())) || 'session';
191
+ return `claude-${repo}-${sid}`;
192
+ }
193
+ return `claude-${clean(require('os').hostname())}`;
194
+ }
195
+ const NODE_NAME = process.env.SYM_NODE_NAME || defaultNodeName();
180
196
 
181
197
  // ── Mesh group (MMP §5.8) ──────────────────────────────────
182
198
  //