@sym-bot/mesh-channel 0.1.19 → 0.1.20

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.
@@ -1,33 +1,33 @@
1
- {
2
- "name": "sym-mesh-channel",
3
- "version": "0.1.19",
4
- "description": "Real-time Claude-to-Claude mesh. Peer-to-peer cognitive signals over Bonjour LAN or WebSocket relay.",
5
- "author": {
6
- "name": "Hongwei Xu",
7
- "email": "hongwei@sym.bot",
8
- "url": "https://sym.bot"
9
- },
10
- "homepage": "https://sym.bot/spec/mmp",
11
- "repository": "https://github.com/sym-bot/sym-mesh-channel",
12
- "license": "Apache-2.0",
13
- "keywords": ["mesh", "p2p", "mcp", "channel", "agents", "multi-agent", "bonjour", "cognitive", "svaf", "mmp"],
14
- "channels": [
15
- {
16
- "server": "claude-sym-mesh",
17
- "userConfig": {
18
- "relay_url": {
19
- "description": "SYM relay WebSocket URL for cross-network mesh (leave empty for LAN-only via Bonjour)",
20
- "sensitive": false
21
- },
22
- "relay_token": {
23
- "description": "Relay authentication token (leave empty for LAN-only)",
24
- "sensitive": true
25
- },
26
- "allowed_peers": {
27
- "description": "Comma-separated peer node names to accept (leave empty to accept all authenticated peers)",
28
- "sensitive": false
29
- }
30
- }
31
- }
32
- ]
33
- }
1
+ {
2
+ "name": "sym-mesh-channel",
3
+ "version": "0.1.20",
4
+ "description": "Real-time Claude-to-Claude mesh. Peer-to-peer cognitive signals over Bonjour LAN or WebSocket relay.",
5
+ "author": {
6
+ "name": "Hongwei Xu",
7
+ "email": "hongwei@sym.bot",
8
+ "url": "https://sym.bot"
9
+ },
10
+ "homepage": "https://sym.bot/spec/mmp",
11
+ "repository": "https://github.com/sym-bot/sym-mesh-channel",
12
+ "license": "Apache-2.0",
13
+ "keywords": ["mesh", "p2p", "mcp", "channel", "agents", "multi-agent", "bonjour", "cognitive", "svaf", "mmp"],
14
+ "channels": [
15
+ {
16
+ "server": "claude-sym-mesh",
17
+ "userConfig": {
18
+ "relay_url": {
19
+ "description": "SYM relay WebSocket URL for cross-network mesh (leave empty for LAN-only via Bonjour)",
20
+ "sensitive": false
21
+ },
22
+ "relay_token": {
23
+ "description": "Relay authentication token (leave empty for LAN-only)",
24
+ "sensitive": true
25
+ },
26
+ "allowed_peers": {
27
+ "description": "Comma-separated peer node names to accept (leave empty to accept all authenticated peers)",
28
+ "sensitive": false
29
+ }
30
+ }
31
+ }
32
+ ]
33
+ }
package/.mcp.json CHANGED
@@ -1,14 +1,14 @@
1
- {
2
- "mcpServers": {
3
- "claude-sym-mesh": {
4
- "command": "node",
5
- "args": ["./server.js"],
6
- "cwd": "${CLAUDE_PLUGIN_ROOT}",
7
- "env": {
8
- "SYM_RELAY_URL": "${user_config.relay_url}",
9
- "SYM_RELAY_TOKEN": "${user_config.relay_token}",
10
- "SYM_ALLOWED_PEERS": "${user_config.allowed_peers}"
11
- }
12
- }
13
- }
14
- }
1
+ {
2
+ "mcpServers": {
3
+ "claude-sym-mesh": {
4
+ "command": "node",
5
+ "args": ["./server.js"],
6
+ "cwd": "${CLAUDE_PLUGIN_ROOT}",
7
+ "env": {
8
+ "SYM_RELAY_URL": "${user_config.relay_url}",
9
+ "SYM_RELAY_TOKEN": "${user_config.relay_token}",
10
+ "SYM_ALLOWED_PEERS": "${user_config.allowed_peers}"
11
+ }
12
+ }
13
+ }
14
+ }
package/CHANGELOG.md CHANGED
@@ -1,170 +1,207 @@
1
- # Changelog
2
-
3
- ## 0.1.19
4
-
5
- ### Added
6
-
7
- - **Claude Code plugin manifest** for Anthropic Channels allowlist
8
- submission. `.claude-plugin/plugin.json` + `.mcp.json` following the
9
- official single-repo pattern (Telegram/Discord). Submitted to
10
- Anthropic Plugin Directory 10 Apr 2026.
11
- - **`SYM_ALLOWED_PEERS`** optional peer allowlist (defense-in-depth).
12
- Comma-separated node names; only listed peers can push to Claude's
13
- context. Empty = accept all authenticated peers. SVAF still gates on
14
- content relevance regardless.
15
- - **`SECURITY.md`** 3-layer defense model documentation (transport
16
- auth + SVAF content gate + peer allowlist) for Anthropic review.
17
- - **17 plugin tests** covering manifest validation, security checks
18
- (no permission relay, no code execution, self-echo filtering, peer
19
- allowlist), and lifecycle (shutdown handlers, identity collision).
20
-
21
- ## 0.1.18
22
-
23
- ### Changed
24
-
25
- - **Auto-configure on install.** `npm install -g` now runs `postinstall`
26
- that writes the MCP server config to global `mcpServers` in
27
- `~/.claude.json` automatically. No separate `sym-mesh-channel init`
28
- step needed two commands to mesh: install + launch.
29
- - **Global MCP config** — server entry is now written to top-level
30
- `mcpServers` (available in all Claude Code sessions), not
31
- project-scoped.
32
- - **Windows postinstall fixes** `require.resolve` for server.js path
33
- (handles npm staging directory on Windows), EBUSY handling when
34
- Claude Code has `~/.claude.json` locked, graceful skip if Claude
35
- Code not yet installed.
36
- - **README repositioned** lead with capability ("first non-Anthropic
37
- Claude Code Channels implementation"), not use case. Simplified
38
- Quick Start to two commands.
39
- - **0 vulnerabilities** — fresh dependency rebuild resolves all 6
40
- moderate hono/node-server advisories.
41
- - Windows mDNS: built-in on Windows 10+, no Bonjour install needed.
42
-
43
- ## 0.1.7
44
-
45
- ### Added
46
-
47
- - **`npx @sym-bot/mesh-channel init`** interactive installer that
48
- writes `~/.claude.json` for the current project, picks a sensible
49
- default `SYM_NODE_NAME` (`claude-mac` / `claude-win` / `claude-linux`),
50
- resolves the absolute path to `server.js`, and prints the launch
51
- command including the `--dangerously-load-development-channels` flag.
52
- Backs up the existing config to `~/.claude.json.bak-<timestamp>`,
53
- validates JSON round-trip, atomic write via tmp+rename. Refuses to
54
- overwrite an existing entry without `--force`.
55
- - **README rewritten for LAN-first install.** Quick start is two
56
- minutes: install, init, launch. No relay required. Bonjour/mDNS
57
- is the default discovery path. Cross-network setup (relay) is now
58
- the optional advanced section.
59
-
60
- ### Changed
61
-
62
- - `package.json` `bin` now exposes both `sym-mesh-channel` (server
63
- entrypoint) and `sym-mesh-channel-init` (installer). The package
64
- description leads with "LAN-first via Bonjour, no relay required."
65
-
66
- ### Why
67
-
68
- The 0.1.5/0.1.6 install path required users to manually edit
69
- `~/.claude.json`, know about the Channels dev flag, set up a relay,
70
- and obtain a relay token. That gated the demo behind real friction.
71
- LAN-only mode has worked since day one in the underlying SymNode
72
- (`sym/lib/node.js:509-511` only connects to the relay if `SYM_RELAY_URL`
73
- is set; Bonjour discovery starts unconditionally), but no documentation
74
- or installer surfaced it. This release closes that gap: two users on
75
- the same wifi can join the same mesh in two minutes with three commands.
76
-
77
- ## 0.1.6
78
-
79
- ### Fixed
80
-
81
- - `sym_send` no longer double-delivers. Previously called both
82
- `node.send()` (broadcast as `event_type=message`) AND `node.remember()`
83
- (persist as CMB which gets gossiped as `event_type=cmb`), causing
84
- the same payload to arrive twice on receivers and double the
85
- context-window cost. Now broadcasts the message frame only. Hosts
86
- that want CMB persistence should call `sym_observe` separately
87
- with proper CAT7 fields.
88
- - `sym_send` now reports the actual delivered count, not
89
- `peers().length`. Requires `@sym-bot/sym >= 0.3.70` where `send()`
90
- returns the count of peer transports that successfully accepted
91
- the broadcast. The two can disagree when peers are tracked but
92
- have broken transports the delivered count is the truth about
93
- what was actually sent.
94
-
95
- ### Changed
96
-
97
- - Bumped `@sym-bot/sym` dep `^0.3.69` → `^0.3.70`. 0.3.70 ships the
98
- identity lockfile that prevents two SymNode processes from
99
- claiming the same nodeId on a host (the cliHostMode-vs-MCP
100
- collision that broke real-time push on Windows during the
101
- 2026-04-09 round-trip test).
102
-
103
- ## 0.1.5
104
-
105
- ### Changed
106
-
107
- - Bumped `@sym-bot/sym` dep `^0.3.68` `^0.3.69` (0.3.68 deprecated;
108
- same code in 0.3.69 with a cleaner published tarball).
109
- - Added `files` whitelist to `package.json` and `.npmignore` for
110
- `*.bak`, `*.swp`, `.DS_Store` so future publishes can't accidentally
111
- ship local backup files. First NPM publish of this package.
112
-
113
- ## 0.1.4
114
-
115
- ### Changed
116
-
117
- - Bumped `@sym-bot/sym` dep `^0.3.43` → `^0.3.68` to pick up
118
- duplicate-identity refusal (close code 4004) and the new
119
- `identity-collision` event.
120
-
121
- ### Added
122
-
123
- - Wired `node.on('identity-collision', ...)` to `process.exit(2)` so
124
- the MCP dies cleanly when the relay reports a duplicate-identity
125
- race. Together with v0.1.3's clean shutdown, this fully resolves
126
- the host-side half of the duplicate-identity bug.
127
-
128
- ## 0.1.3
129
-
130
- ### Added
131
-
132
- - Clean shutdown handlers (SIGTERM/SIGINT/SIGHUP) that call
133
- `node.stop()` before exiting, so the SymNode disconnects from the
134
- relay before the process dies. Without this, restarts left zombie
135
- registrations on the relay until the next heartbeat tick (up to
136
- 30s), creating a duplicate-identity race window for the next MCP
137
- spawn. Idempotent re-entry guard.
138
-
139
- ## 0.1.2
140
-
141
- ### Fixed
142
-
143
- - Suppressed `peer-joined` / `peer-left` events from being pushed to
144
- Claude's context as `<channel>` notifications. Presence is high-
145
- frequency and low-signal a relay reconnect could fire one event
146
- per peer per cycle, flooding the context window. CMBs and direct
147
- messages still flow through.
148
-
149
- ## 0.1.1
150
-
151
- ### Changed
152
-
153
- - Replaced hardcoded `claude-code` / `claude-code-mac` literals with
154
- a single `NODE_NAME` constant sourced from `process.env.SYM_NODE_NAME`
155
- (default `claude-code-mac`). Enables platform-scoped naming per
156
- MMP §3.1.2 without source edits. Fixed stale display strings in
157
- the MCP instructions, `sym_send` perspective, `sym_status` header,
158
- and the self-echo dedup filter.
159
-
160
- ## 0.1.0
161
-
162
- ### Added
163
-
164
- - Initial release. MCP server that runs a `SymNode` peer node inside
165
- a Claude Code session — own identity, own relay connection, own
166
- SVAF evaluation. Tools: `sym_send`, `sym_observe`, `sym_recall`,
167
- `sym_peers`, `sym_status`. Mesh events arrive as `<channel>`
168
- notifications when launched with
169
- `claude --dangerously-load-development-channels server:claude-sym-mesh`
170
- (allowlisted server name required by Claude Code Channels).
1
+ # Changelog
2
+
3
+ ## 0.1.20
4
+
5
+ ### Added
6
+
7
+ - **`sym-mesh-channel init --project`** new flag to install the MCP
8
+ server at project scope (`<cwd>/.mcp.json` + merged
9
+ `<cwd>/.claude/settings.local.json`) instead of global
10
+ `~/.claude.json`. Enables multi-identity-per-machine workflows where
11
+ several Claude Code sessions run in parallel from distinct project
12
+ directories and each appears as its own peer on the mesh. Project
13
+ `.mcp.json` entries override the global `mcpServers` entry when
14
+ Claude Code launches from that directory, so `SYM_NODE_NAME` can
15
+ differ per project without siblings stepping on each other.
16
+ - Project mode supports the same `--force` semantics as global install:
17
+ backs up existing `.mcp.json` and `settings.local.json` next to
18
+ themselves (`*.bak-<timestamp>`), merges `settings.local.json` so
19
+ unrelated keys (permissions, custom settings) are preserved, atomic
20
+ writes via tmp+rename, refuses to overwrite an existing
21
+ `claude-sym-mesh` entry without `--force`.
22
+ - `--postinstall` always runs global install regardless of `--project`
23
+ (npm postinstall runs from npm's staging dir, not the user's
24
+ project). Keeps `npm install -g` auto-configure behavior unchanged.
25
+ - **5 new tests** covering project-mode install: writes `.mcp.json`
26
+ and `settings.local.json`, merge preserves existing keys, refusal
27
+ path exits 2, `--force` overwrite creates backup, postinstall
28
+ fallback ignores `--project`. Test suite now 22 tests total.
29
+
30
+ ### Why
31
+
32
+ Default mode (single mesh identity per machine, global install) is
33
+ correct for most users and unchanged. `--project` exists for the
34
+ small but real set of users who run multiple Claude Code sessions
35
+ in parallel from distinct project directories and want each session
36
+ to show up as its own peer on the mesh. Previously this workflow
37
+ required hand-editing `.mcp.json` and `.claude/settings.local.json`
38
+ per project; now it's one command per project.
39
+
40
+ ## 0.1.19
41
+
42
+ ### Added
43
+
44
+ - **Claude Code plugin manifest** for Anthropic Channels allowlist
45
+ submission. `.claude-plugin/plugin.json` + `.mcp.json` following the
46
+ official single-repo pattern (Telegram/Discord). Submitted to
47
+ Anthropic Plugin Directory 10 Apr 2026.
48
+ - **`SYM_ALLOWED_PEERS`** optional peer allowlist (defense-in-depth).
49
+ Comma-separated node names; only listed peers can push to Claude's
50
+ context. Empty = accept all authenticated peers. SVAF still gates on
51
+ content relevance regardless.
52
+ - **`SECURITY.md`** 3-layer defense model documentation (transport
53
+ auth + SVAF content gate + peer allowlist) for Anthropic review.
54
+ - **17 plugin tests** covering manifest validation, security checks
55
+ (no permission relay, no code execution, self-echo filtering, peer
56
+ allowlist), and lifecycle (shutdown handlers, identity collision).
57
+
58
+ ## 0.1.18
59
+
60
+ ### Changed
61
+
62
+ - **Auto-configure on install.** `npm install -g` now runs `postinstall`
63
+ that writes the MCP server config to global `mcpServers` in
64
+ `~/.claude.json` automatically. No separate `sym-mesh-channel init`
65
+ step needed — two commands to mesh: install + launch.
66
+ - **Global MCP config** — server entry is now written to top-level
67
+ `mcpServers` (available in all Claude Code sessions), not
68
+ project-scoped.
69
+ - **Windows postinstall fixes** `require.resolve` for server.js path
70
+ (handles npm staging directory on Windows), EBUSY handling when
71
+ Claude Code has `~/.claude.json` locked, graceful skip if Claude
72
+ Code not yet installed.
73
+ - **README repositioned** lead with capability ("first non-Anthropic
74
+ Claude Code Channels implementation"), not use case. Simplified
75
+ Quick Start to two commands.
76
+ - **0 vulnerabilities** — fresh dependency rebuild resolves all 6
77
+ moderate hono/node-server advisories.
78
+ - Windows mDNS: built-in on Windows 10+, no Bonjour install needed.
79
+
80
+ ## 0.1.7
81
+
82
+ ### Added
83
+
84
+ - **`npx @sym-bot/mesh-channel init`** interactive installer that
85
+ writes `~/.claude.json` for the current project, picks a sensible
86
+ default `SYM_NODE_NAME` (`claude-mac` / `claude-win` / `claude-linux`),
87
+ resolves the absolute path to `server.js`, and prints the launch
88
+ command including the `--dangerously-load-development-channels` flag.
89
+ Backs up the existing config to `~/.claude.json.bak-<timestamp>`,
90
+ validates JSON round-trip, atomic write via tmp+rename. Refuses to
91
+ overwrite an existing entry without `--force`.
92
+ - **README rewritten for LAN-first install.** Quick start is two
93
+ minutes: install, init, launch. No relay required. Bonjour/mDNS
94
+ is the default discovery path. Cross-network setup (relay) is now
95
+ the optional advanced section.
96
+
97
+ ### Changed
98
+
99
+ - `package.json` `bin` now exposes both `sym-mesh-channel` (server
100
+ entrypoint) and `sym-mesh-channel-init` (installer). The package
101
+ description leads with "LAN-first via Bonjour, no relay required."
102
+
103
+ ### Why
104
+
105
+ The 0.1.5/0.1.6 install path required users to manually edit
106
+ `~/.claude.json`, know about the Channels dev flag, set up a relay,
107
+ and obtain a relay token. That gated the demo behind real friction.
108
+ LAN-only mode has worked since day one in the underlying SymNode
109
+ (`sym/lib/node.js:509-511` only connects to the relay if `SYM_RELAY_URL`
110
+ is set; Bonjour discovery starts unconditionally), but no documentation
111
+ or installer surfaced it. This release closes that gap: two users on
112
+ the same wifi can join the same mesh in two minutes with three commands.
113
+
114
+ ## 0.1.6
115
+
116
+ ### Fixed
117
+
118
+ - `sym_send` no longer double-delivers. Previously called both
119
+ `node.send()` (broadcast as `event_type=message`) AND `node.remember()`
120
+ (persist as CMB which gets gossiped as `event_type=cmb`), causing
121
+ the same payload to arrive twice on receivers and double the
122
+ context-window cost. Now broadcasts the message frame only. Hosts
123
+ that want CMB persistence should call `sym_observe` separately
124
+ with proper CAT7 fields.
125
+ - `sym_send` now reports the actual delivered count, not
126
+ `peers().length`. Requires `@sym-bot/sym >= 0.3.70` where `send()`
127
+ returns the count of peer transports that successfully accepted
128
+ the broadcast. The two can disagree when peers are tracked but
129
+ have broken transports — the delivered count is the truth about
130
+ what was actually sent.
131
+
132
+ ### Changed
133
+
134
+ - Bumped `@sym-bot/sym` dep `^0.3.69` `^0.3.70`. 0.3.70 ships the
135
+ identity lockfile that prevents two SymNode processes from
136
+ claiming the same nodeId on a host (the cliHostMode-vs-MCP
137
+ collision that broke real-time push on Windows during the
138
+ 2026-04-09 round-trip test).
139
+
140
+ ## 0.1.5
141
+
142
+ ### Changed
143
+
144
+ - Bumped `@sym-bot/sym` dep `^0.3.68` `^0.3.69` (0.3.68 deprecated;
145
+ same code in 0.3.69 with a cleaner published tarball).
146
+ - Added `files` whitelist to `package.json` and `.npmignore` for
147
+ `*.bak`, `*.swp`, `.DS_Store` so future publishes can't accidentally
148
+ ship local backup files. First NPM publish of this package.
149
+
150
+ ## 0.1.4
151
+
152
+ ### Changed
153
+
154
+ - Bumped `@sym-bot/sym` dep `^0.3.43` `^0.3.68` to pick up
155
+ duplicate-identity refusal (close code 4004) and the new
156
+ `identity-collision` event.
157
+
158
+ ### Added
159
+
160
+ - Wired `node.on('identity-collision', ...)` to `process.exit(2)` so
161
+ the MCP dies cleanly when the relay reports a duplicate-identity
162
+ race. Together with v0.1.3's clean shutdown, this fully resolves
163
+ the host-side half of the duplicate-identity bug.
164
+
165
+ ## 0.1.3
166
+
167
+ ### Added
168
+
169
+ - Clean shutdown handlers (SIGTERM/SIGINT/SIGHUP) that call
170
+ `node.stop()` before exiting, so the SymNode disconnects from the
171
+ relay before the process dies. Without this, restarts left zombie
172
+ registrations on the relay until the next heartbeat tick (up to
173
+ 30s), creating a duplicate-identity race window for the next MCP
174
+ spawn. Idempotent re-entry guard.
175
+
176
+ ## 0.1.2
177
+
178
+ ### Fixed
179
+
180
+ - Suppressed `peer-joined` / `peer-left` events from being pushed to
181
+ Claude's context as `<channel>` notifications. Presence is high-
182
+ frequency and low-signal — a relay reconnect could fire one event
183
+ per peer per cycle, flooding the context window. CMBs and direct
184
+ messages still flow through.
185
+
186
+ ## 0.1.1
187
+
188
+ ### Changed
189
+
190
+ - Replaced hardcoded `claude-code` / `claude-code-mac` literals with
191
+ a single `NODE_NAME` constant sourced from `process.env.SYM_NODE_NAME`
192
+ (default `claude-code-mac`). Enables platform-scoped naming per
193
+ MMP §3.1.2 without source edits. Fixed stale display strings in
194
+ the MCP instructions, `sym_send` perspective, `sym_status` header,
195
+ and the self-echo dedup filter.
196
+
197
+ ## 0.1.0
198
+
199
+ ### Added
200
+
201
+ - Initial release. MCP server that runs a `SymNode` peer node inside
202
+ a Claude Code session — own identity, own relay connection, own
203
+ SVAF evaluation. Tools: `sym_send`, `sym_observe`, `sym_recall`,
204
+ `sym_peers`, `sym_status`. Mesh events arrive as `<channel>`
205
+ notifications when launched with
206
+ `claude --dangerously-load-development-channels server:claude-sym-mesh`
207
+ (allowlisted server name required by Claude Code Channels).