@sym-bot/mesh-channel 0.3.5 → 0.3.7
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/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +13 -0
- package/README.md +2 -0
- package/package.json +3 -2
- package/server.js +28 -0
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
|
@@ -103,6 +103,8 @@ With the Channels flag enabled, real-time push is bidirectional: peer events arr
|
|
|
103
103
|
|
|
104
104
|
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
105
|
|
|
106
|
+
> **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.)*
|
|
107
|
+
|
|
106
108
|
### Same office (LAN)
|
|
107
109
|
|
|
108
110
|
**Team lead creates the group from any Claude Code session:**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sym-bot/mesh-channel",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
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,8 @@
|
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
25
|
-
"@sym-bot/sym": "^0.
|
|
25
|
+
"@sym-bot/sym": "^0.7.4",
|
|
26
|
+
"bonjour-service": "^1.3.0"
|
|
26
27
|
},
|
|
27
28
|
"engines": {
|
|
28
29
|
"node": ">=18"
|
package/server.js
CHANGED
|
@@ -763,6 +763,8 @@ mcp.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
763
763
|
RELAY_URL = relayUrl;
|
|
764
764
|
RELAY_TOKEN = relayToken;
|
|
765
765
|
|
|
766
|
+
publishGroupBeacon(); // re-advertise the new group on _symgroups._tcp
|
|
767
|
+
|
|
766
768
|
return {
|
|
767
769
|
content: [{
|
|
768
770
|
type: 'text',
|
|
@@ -887,6 +889,7 @@ let shuttingDown = false;
|
|
|
887
889
|
async function shutdown(signal) {
|
|
888
890
|
if (shuttingDown) return;
|
|
889
891
|
shuttingDown = true;
|
|
892
|
+
stopGroupBeacon();
|
|
890
893
|
try {
|
|
891
894
|
await node.stop();
|
|
892
895
|
} catch {
|
|
@@ -899,12 +902,37 @@ process.on('SIGTERM', () => shutdown('SIGTERM'));
|
|
|
899
902
|
process.on('SIGINT', () => shutdown('SIGINT'));
|
|
900
903
|
process.on('SIGHUP', () => shutdown('SIGHUP'));
|
|
901
904
|
|
|
905
|
+
// ── Group discovery beacon (MMP §5.8) ──────────────────────────
|
|
906
|
+
// Mirror the sym CLI daemon: advertise this node's group on the shared
|
|
907
|
+
// `_symgroups._tcp` service (group name in TXT) via the pure-JS bonjour-service,
|
|
908
|
+
// so `sym groups` lists this Claude/MCP node cross-platform alongside
|
|
909
|
+
// CLI-daemon nodes. Discovery-only — comms stay on the group's own
|
|
910
|
+
// `_<group>._tcp`. Re-published on group hot-swap; torn down on shutdown.
|
|
911
|
+
let groupBeacon = null;
|
|
912
|
+
function publishGroupBeacon() {
|
|
913
|
+
try {
|
|
914
|
+
const { Bonjour } = require('bonjour-service');
|
|
915
|
+
if (groupBeacon) { try { groupBeacon.unpublishAll(); groupBeacon.destroy(); } catch {} groupBeacon = null; }
|
|
916
|
+
groupBeacon = new Bonjour();
|
|
917
|
+
groupBeacon.publish({ name: NODE_NAME, type: 'symgroups', port: (node && node._port) || 7777, txt: { group: GROUP, node: NODE_NAME } });
|
|
918
|
+
} catch (e) {
|
|
919
|
+
process.stderr.write(`group beacon unavailable: ${e?.message || e}\n`);
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
function stopGroupBeacon() {
|
|
923
|
+
if (!groupBeacon) return;
|
|
924
|
+
try { groupBeacon.unpublishAll(() => { try { groupBeacon.destroy(); } catch {} }); } catch {}
|
|
925
|
+
groupBeacon = null;
|
|
926
|
+
}
|
|
927
|
+
|
|
902
928
|
async function main() {
|
|
903
929
|
// Start SymNode — connects to relay as a peer. The startup primer is
|
|
904
930
|
// computed at module-load time (see BASE_INSTRUCTIONS above) and is
|
|
905
931
|
// already embedded in the MCP server's initialize-response payload.
|
|
906
932
|
await node.start();
|
|
907
933
|
|
|
934
|
+
publishGroupBeacon();
|
|
935
|
+
|
|
908
936
|
// Start MCP server — communicates with Claude Code via stdio
|
|
909
937
|
const transport = new StdioServerTransport();
|
|
910
938
|
await mcp.connect(transport);
|