@sym-bot/mesh-channel 0.3.6 → 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.5",
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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.7
4
+
5
+ ### Changed
6
+
7
+ - **Bumped `@sym-bot/sym` dependency `^0.5.8` → `^0.7.4`** to track the current sym stack. The range had drifted: sym moved through 0.6.x/0.7.x (mesh groups, Windows portability) while this wrapper still declared `^0.5.8`, so an installed sym ≥0.6 showed as `invalid` and a reinstall could nest a stale 0.5.x that shadows the global. Pinning `^0.7.4` makes the dependency honest and, in particular, **requires the loopback-capable sym (≥0.7.4)** — co-resident nodes mesh over `127.0.0.1` with no network interface (Wi-Fi off). No code change in this package; dependency-range correctness only.
8
+
9
+ ## 0.3.6
10
+
11
+ ### Added
12
+
13
+ - **Group discovery beacon.** This MCP node now advertises its mesh group on a shared `_symgroups._tcp` service (group name in TXT) via the pure-JS `bonjour-service` — published on start, re-published on `sym_join_group` hot-swap, torn down on shutdown. Makes the Claude/MCP node discoverable by the `sym` CLI's `sym groups` command **cross-platform, including Windows** (where Apple's `dns-sd` is absent), so CLI-daemon and Claude/MCP nodes list together. Discovery-only — comms stay isolated on the group's own `_<group>._tcp`. `bonjour-service` pinned as a direct dependency. Validated on Windows 11.
14
+ - **Operational note:** a session started before 0.3.6 must restart to begin beaconing.
15
+
3
16
  ## 0.3.5
4
17
 
5
18
  ### Added
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)
31
+
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:
20
33
 
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.
34
+ ![claude-code-mac terminalverifies and clears the fix autonomously](docs/img/mesh-cto-window.png)
22
35
 
23
- Two agents coordinated through typed cognitive signals, across machines, with zero human copy-paste.
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.
24
37
 
25
- Verified working: Mac ↔ Windows on the same wifi, pure Bonjour, no relay, no token. Cross-network via optional WebSocket relay.
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
35
-
36
- One command, zero flags, works today:
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.
37
49
 
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
- ```
65
-
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):
62
+ **Which do you install?**
67
63
 
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
78
71
  ```
72
+ /plugin marketplace add sym-bot/sym-mesh-channel
73
+ /plugin install sym-mesh-channel@sym-mesh-channel
74
+ ```
75
+
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.
79
77
 
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.
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
 
@@ -103,6 +101,8 @@ With the Channels flag enabled, real-time push is bidirectional: peer events arr
103
101
 
104
102
  By default every `sym-mesh-channel` node joins the global `_sym._tcp` mesh — every peer on the network sees every other peer. For a company with multiple teams, that's too noisy. Mesh groups (MMP §5.8) isolate each team at the mDNS layer so `backend-team` and `frontend-team` can't see each other's signals at all.
105
103
 
104
+ > **Discoverable by the `sym` CLI (since 0.3.6).** This node advertises its group on a shared `_symgroups._tcp` discovery beacon, so the [`sym` CLI](https://www.npmjs.com/package/@sym-bot/sym)'s `sym groups` lists this Claude/MCP node alongside CLI-daemon nodes — cross-platform, including Windows (where Apple's `dns-sd` is absent). Discovery-only; comms stay isolated on the group's own service type. *(A restart is needed for sessions started before 0.3.6 to begin beaconing.)*
105
+
106
106
  ### Same office (LAN)
107
107
 
108
108
  **Team lead creates the group from any Claude Code session:**
@@ -321,12 +321,12 @@ Some corporate networks block mDNS multicast entirely — try a hotspot or home
321
321
 
322
322
  ### `<channel>` notifications never arrive even though peers are connected
323
323
 
324
- 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:
325
325
 
326
326
  - plugin install: `--dangerously-load-development-channels plugin:sym-mesh-channel@sym-mesh-channel`
327
327
  - npm install: `--dangerously-load-development-channels server:claude-sym-mesh`
328
328
 
329
- 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).
330
330
 
331
331
  ### `sym_status` says "Relay: connected" when you didn't configure one
332
332
 
@@ -338,15 +338,13 @@ Don't. Each session should have a distinct `SYM_NODE_NAME`. The SymNode acquires
338
338
 
339
339
  ## Other install paths
340
340
 
341
- ### Via the Claude Code plugin marketplace
341
+ ### Via npm (server install)
342
342
 
343
- ```
344
- /plugin marketplace add sym-bot/sym-mesh-channel
345
- /plugin install sym-mesh-channel@sym-mesh-channel
346
- claude --dangerously-load-development-channels plugin:sym-mesh-channel@sym-mesh-channel
343
+ ```bash
344
+ npm install -g @sym-bot/mesh-channel
347
345
  ```
348
346
 
349
- 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).)
350
348
 
351
349
  ## References
352
350
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sym-bot/mesh-channel",
3
- "version": "0.3.6",
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": {
@@ -22,7 +22,7 @@
22
22
  ],
23
23
  "dependencies": {
24
24
  "@modelcontextprotocol/sdk": "^1.12.1",
25
- "@sym-bot/sym": "^0.5.8",
25
+ "@sym-bot/sym": "^0.7.4",
26
26
  "bonjour-service": "^1.3.0"
27
27
  },
28
28
  "engines": {
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
  //