@sym-bot/mesh-channel 0.1.7 → 0.1.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/README.md CHANGED
@@ -1,15 +1,31 @@
1
1
  # sym-mesh-channel
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/@sym-bot/mesh-channel)](https://www.npmjs.com/package/@sym-bot/mesh-channel)
4
+ [![MMP Spec](https://img.shields.io/badge/protocol-MMP_v0.2.2-purple)](https://sym.bot/spec/mmp)
5
+ [![arXiv](https://img.shields.io/badge/arXiv-2604.03955-b31b1b.svg)](https://arxiv.org/abs/2604.03955)
6
+ [![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)
7
+ [![Node](https://img.shields.io/badge/node-%3E%3D18-green)](https://nodejs.org)
8
+
3
9
  > MCP server that turns any Claude Code session into a peer node on the [SYM mesh](https://sym.bot). LAN-first via Bonjour mDNS — no relay required for users on the same wifi.
4
10
 
5
- Two Claude Code instances on the same network discover each other automatically and exchange structured cognitive state in real-time. Each side is a full peer with its own cryptographic identity, its own SVAF receiver-side gating, and its own memory — not a thin client.
11
+ Two Claude Code instances on the same network discover each other automatically and exchange structured cognitive state **in real-time**. Each side is a full peer with its own cryptographic identity, its own SVAF receiver-side gating, and its own memory — not a thin client.
6
12
 
7
- This is the reference implementation of MMP (the Mesh Memory Protocol) for Claude Code hosts. See:
13
+ **Verified cross-platform:** Mac ↔ Windows on the same wifi, pure Bonjour, no relay, no token. Bidirectional real-time push confirmed 2026-04-09 with `@sym-bot/sym 0.3.74`.
8
14
 
9
15
  - **SVAF paper**: [arxiv.org/abs/2604.03955](https://arxiv.org/abs/2604.03955)
10
16
  - **MMP spec**: [sym.bot/spec/mmp](https://sym.bot/spec/mmp)
11
17
  - **Source**: [github.com/sym-bot/sym-mesh-channel](https://github.com/sym-bot/sym-mesh-channel)
12
18
 
19
+ ## How real-time push works (Claude Code Channels + MMP)
20
+
21
+ This MCP server composes two things:
22
+
23
+ **[Claude Code Channels](https://code.claude.com/docs/en/mcp)** (Anthropic, shipped 2026-03-20) — an MCP capability that lets servers push events directly into Claude's conversation context mid-turn via `notifications/claude/channel`. Anthropic built it for the Telegram/Discord/iMessage integrations. We use it for agent-to-agent cognitive coupling.
24
+
25
+ **[MMP — the Mesh Memory Protocol](https://sym.bot/spec/mmp)** — defines what gets pushed: typed seven-field cognitive bundles (CAT7: focus, issue, intent, motivation, commitment, perspective, mood), how receivers gate incoming signals ([SVAF](https://arxiv.org/abs/2604.03955)), and how peers maintain identity without a central orchestrator. MMP is the protocol; this MCP server is the reference implementation for Claude Code hosts.
26
+
27
+ **The composition:** when a peer on the mesh broadcasts a CMB (Cognitive Memory Block), the SymNode inside this MCP evaluates it via SVAF. If accepted, the MCP fires a `notifications/claude/channel` notification to Claude Code, which surfaces it as a `<channel>` block in the conversation. Claude sees it, can react, and can broadcast back via `sym_send` or `sym_observe`. No polling. No tool calls. The mesh thinks together.
28
+
13
29
  ## Quick start (LAN, two minutes)
14
30
 
15
31
  You and one other person on the same wifi each run:
@@ -26,11 +42,22 @@ SYM_NODE_NAME=claude-mac npx @sym-bot/mesh-channel init
26
42
  claude --dangerously-load-development-channels server:claude-sym-mesh
27
43
  ```
28
44
 
29
- Inside Claude Code, ask it:
45
+ Inside Claude Code, verify the mesh:
46
+
47
+ ```
48
+ sym_status → Node: claude-mac (...), Relay: disconnected, Peers: 1
49
+ sym_peers → 1 peer(s): claude-win via bonjour
50
+ ```
51
+
52
+ Then send a message:
30
53
 
31
- > verify the mesh: run sym_status and sym_peers, then sym_send "hello"
54
+ ```
55
+ sym_send "hello from Mac"
56
+ ```
57
+
58
+ The other peer sees it arrive **in their Claude Code context as a real-time `<channel>` notification** — no polling, no `sym_recall`, no tool call. It just appears. They reply with `sym_send "hello from Windows"` and you see it land in your context the same way.
32
59
 
33
- Within a few seconds the other peer should see your message arrive in their Claude Code context as a real-time `<channel>` notification — no polling, no `sym_recall`. That's it: cross-machine Claude-to-Claude collective intelligence over a typed cognitive protocol.
60
+ That's it: cross-machine Claude-to-Claude collective intelligence over a typed cognitive protocol, on the same wifi, in two minutes.
34
61
 
35
62
  ## Requirements
36
63
 
@@ -110,6 +137,8 @@ Some corporate networks block mDNS multicast — try a hotspot or home wifi to v
110
137
 
111
138
  **`sym_status` says "Peers: 0" but `sym_peers` lists peers.** Snapshot timing — both views read the same `_peers` map at slightly different moments. The peer set is dynamic. If counts disagree consistently, file an issue.
112
139
 
140
+ **`sym_status` says "Relay: connected" even though you didn't configure a relay.** Your shell profile (`~/.zshrc`, `~/.bashrc`, etc.) exports `SYM_RELAY_URL`. Claude Code's MCP env block is **additive** — omitting a key doesn't remove it from the child process. Fix: set `SYM_RELAY_URL` and `SYM_RELAY_TOKEN` to `""` (empty string) in the MCP env block to override the shell. The installer (`npx @sym-bot/mesh-channel init`) does this automatically as of v0.1.8.
141
+
113
142
  **Multiple Claude Code sessions on the same machine want to share an identity.** Don't. Each session should have a distinct `SYM_NODE_NAME`. As of `@sym-bot/sym 0.3.70`, the SymNode acquires an exclusive lockfile on its identity (`~/.sym/nodes/<name>/lock.pid`) and refuses to start a second process with the same name. If you see `EIDENTITYLOCK`, find and kill the other process or pick a different name.
114
143
 
115
144
  ## License
package/bin/install.js CHANGED
@@ -113,11 +113,16 @@ const entry = {
113
113
  args: [serverJsPath],
114
114
  env: {
115
115
  SYM_NODE_NAME: nodeName,
116
- // Relay env vars are intentionally NOT set by default. Without
117
- // them, the SymNode runs in LAN-only mode and discovers other
118
- // peers via Bonjour mDNS. To enable cross-network connectivity,
119
- // add SYM_RELAY_URL and SYM_RELAY_TOKEN to this env block manually
120
- // (see README for details on running your own relay).
116
+ // Explicitly blank the relay vars so the MCP doesn't inherit them
117
+ // from the parent shell (e.g. ~/.zshrc exports). Claude Code's env
118
+ // block is ADDITIVE omitting a key doesn't remove it from the
119
+ // child process. Setting to '' makes process.env.SYM_RELAY_URL
120
+ // falsy in JS, so the SymNode skips the relay and runs LAN-only.
121
+ //
122
+ // To enable cross-network connectivity later, replace these empty
123
+ // values with your relay URL and token (see README).
124
+ SYM_RELAY_URL: '',
125
+ SYM_RELAY_TOKEN: '',
121
126
  },
122
127
  };
123
128
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sym-bot/mesh-channel",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "MCP server — Claude Code as a peer node on the SYM mesh. LAN-first via Bonjour, no relay required.",
5
5
  "main": "server.js",
6
6
  "bin": {
@@ -15,8 +15,8 @@
15
15
  "LICENSE"
16
16
  ],
17
17
  "dependencies": {
18
- "@sym-bot/sym": "^0.3.70",
19
- "@modelcontextprotocol/sdk": "^1.12.1"
18
+ "@modelcontextprotocol/sdk": "^1.12.1",
19
+ "@sym-bot/sym": "^0.3.74"
20
20
  },
21
21
  "engines": {
22
22
  "node": ">=18"