@sym-bot/mesh-channel 0.1.19 → 0.1.21

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