@sym-bot/mesh-channel 0.1.12 → 0.1.14

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/bin/install.js CHANGED
@@ -42,9 +42,10 @@ if (cmd !== 'init') {
42
42
 
43
43
  // ── Detect platform & defaults ────────────────────────────────────
44
44
 
45
- const platform = process.platform;
46
- const platformSuffix = platform === 'darwin' ? 'mac' : platform === 'win32' ? 'win' : 'linux';
47
- const defaultNodeName = `claude-${platformSuffix}`;
45
+ // Default: hostname-based identity, unique per machine. Prevents
46
+ // the ghost-peer bug where two machines with the same default name
47
+ // create phantom peers that absorb messages.
48
+ const defaultNodeName = `claude-${os.hostname().toLowerCase().replace(/[^a-z0-9-]/g, '-')}`;
48
49
 
49
50
  // SYM_NODE_NAME from env wins over default
50
51
  const nodeName = process.env.SYM_NODE_NAME || defaultNodeName;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sym-bot/mesh-channel",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
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,7 +15,7 @@
15
15
  ],
16
16
  "dependencies": {
17
17
  "@modelcontextprotocol/sdk": "^1.12.1",
18
- "@sym-bot/sym": "^0.3.76"
18
+ "@sym-bot/sym": "^0.3.77"
19
19
  },
20
20
  "engines": {
21
21
  "node": ">=18"
package/server.js CHANGED
@@ -44,7 +44,11 @@ const FIELD_WEIGHTS = {
44
44
 
45
45
  // ── SymNode — full peer on the mesh ──────────────────────────
46
46
 
47
- const NODE_NAME = process.env.SYM_NODE_NAME || 'claude-code-mac';
47
+ // Default: hostname-based identity, unique per machine. The old default
48
+ // ('claude-code-mac') caused ghost-peer bugs when another machine ran
49
+ // without SYM_NODE_NAME set — both machines claimed the same name with
50
+ // different nodeIds, creating phantom peers that absorbed messages.
51
+ const NODE_NAME = process.env.SYM_NODE_NAME || `claude-${require('os').hostname().toLowerCase().replace(/[^a-z0-9-]/g, '-')}`;
48
52
 
49
53
  const node = new SymNode({
50
54
  name: NODE_NAME,