@sym-bot/mesh-channel 0.2.0 → 0.3.0

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,7 +1,7 @@
1
1
  {
2
2
  "name": "sym-mesh-channel",
3
3
  "owner": {
4
- "name": "SYM.BOT Ltd",
4
+ "name": "SYM.BOT",
5
5
  "email": "info@sym.bot"
6
6
  },
7
7
  "metadata": {
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Added
6
+
7
+ - **Startup remix-memory primer — automates agent memory recall on
8
+ session/agent restart (MMP §4.2 O2, rejoin-without-replay).** As the
9
+ final step of plugin initialisation (after `node.start()` and before
10
+ the MCP transport connects), the plugin calls
11
+ `node.buildStartupPrimer()` and appends the returned text to the MCP
12
+ server's `instructions` field. A fresh Claude Code session wakes
13
+ with the agent's own remix memory — own observations plus peer
14
+ observations admitted by SVAF — already loaded into context. No
15
+ first-turn `sym_recall` required; agent acts from prior state
16
+ immediately.
17
+
18
+ Default caps: last 24 hours OR 20 most recent CMBs, whichever is
19
+ tighter. The primer lists each entry as `[timestamp] source · key —
20
+ focus` and surfaces a dropped-count line when caps elide older
21
+ entries. Empty store is a silent no-op.
22
+
23
+ ### Changed
24
+
25
+ - **`@sym-bot/sym` dep bumped to `^0.5.0`** to pick up the
26
+ `buildStartupPrimer` helper and to keep every plugin on the
27
+ sym.day platform pinned to the same substrate SDK version
28
+ (no drift across mesh-channel / melotune-plugin / future
29
+ specialised plugins).
30
+
3
31
  ## 0.2.0
4
32
 
5
33
  ### Breaking
package/LICENSE CHANGED
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2026 SYM.BOT Ltd
189
+ Copyright 2026 SYM.BOT
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -291,4 +291,4 @@ See [SECURITY.md](SECURITY.md) for the full security model.
291
291
 
292
292
  ## License
293
293
 
294
- Apache 2.0 — SYM.BOT Ltd
294
+ Apache 2.0 — SYM.BOT
package/bin/install.js CHANGED
@@ -24,7 +24,7 @@
24
24
  * - Refuses to overwrite an existing claude-sym-mesh entry without
25
25
  * --force.
26
26
  *
27
- * Copyright (c) 2026 SYM.BOT Ltd. Apache 2.0 License.
27
+ * Copyright (c) 2026 SYM.BOT. Apache 2.0 License.
28
28
  */
29
29
 
30
30
  const fs = require('fs');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sym-bot/mesh-channel",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
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,7 @@
22
22
  ],
23
23
  "dependencies": {
24
24
  "@modelcontextprotocol/sdk": "^1.12.1",
25
- "@sym-bot/sym": "^0.3.81"
25
+ "@sym-bot/sym": "^0.5.0"
26
26
  },
27
27
  "engines": {
28
28
  "node": ">=18"
package/server.js CHANGED
@@ -19,7 +19,7 @@ if (process.argv[2] === 'init') {
19
19
  * its own relay connection, and its own SVAF evaluation with engineering-domain
20
20
  * field weights. Per MMP Section 3: every participant is a peer.
21
21
  *
22
- * Copyright (c) 2026 SYM.BOT Ltd. Apache 2.0 License.
22
+ * Copyright (c) 2026 SYM.BOT. Apache 2.0 License.
23
23
  */
24
24
 
25
25
  const { Server } = require('@modelcontextprotocol/sdk/server/index.js');
@@ -253,6 +253,35 @@ function registerNodeHandlers(n) {
253
253
 
254
254
  // ── MCP Server ───────────────────────────────────────────────
255
255
 
256
+ // Base instructions shown to the agent at every MCP initialize.
257
+ const BASE_INSTRUCTIONS =
258
+ `You are a peer node on the SYM mesh (identity: ${NODE_NAME}). ` +
259
+ 'Mesh events arrive as <channel> notifications in real-time. ' +
260
+ 'When you see a CMB from another node, respond via sym_send targeted at that node by name if the reply is for that specific peer (MMP §4.4.4 targeted CMB). ' +
261
+ 'Share observations about your own state with the whole mesh via sym_observe (MMP §9.2 receiver-autonomous SVAF evaluation). ' +
262
+ 'Both sym_send and sym_observe emit CAT7 CMBs; receivers run SVAF and, if admitted, remix-store with lineage pointing back to your CMB. ' +
263
+ 'Search mesh memory via sym_recall. ' +
264
+ 'Messages arrive as compact headers with [mNNN] IDs — use sym_fetch to read the full content when the header is relevant to your current task.';
265
+
266
+ // Final startup step (MMP §4.2 O2 — rejoin-without-replay). The SymNode
267
+ // constructor builds the memory-store index from disk, so the primer is
268
+ // available synchronously without needing node.start(). Appending it to
269
+ // the MCP instructions payload means a fresh Claude Code session wakes
270
+ // with prior remix memory — own observations plus peer observations
271
+ // admitted by SVAF — already loaded into context, zero first-turn
272
+ // sym_recall overhead.
273
+ //
274
+ // MCP SDK reads `instructions` at Server construction time (storing it in
275
+ // a private field) and emits it only on initialize-response; mutations on
276
+ // the public property after construction are ignored. Compute once, pass in.
277
+ let primerText = '';
278
+ try {
279
+ const primer = node.buildStartupPrimer();
280
+ if (primer && primer.count > 0) primerText = `\n\n${primer.text}`;
281
+ } catch (err) {
282
+ process.stderr.write(`sym-mesh-channel startup primer skipped: ${err?.message || err}\n`);
283
+ }
284
+
256
285
  const mcp = new Server(
257
286
  { name: 'sym-mesh', version: '0.1.0' },
258
287
  {
@@ -260,14 +289,7 @@ const mcp = new Server(
260
289
  tools: {},
261
290
  experimental: { 'claude/channel': {} },
262
291
  },
263
- instructions:
264
- `You are a peer node on the SYM mesh (identity: ${NODE_NAME}). ` +
265
- 'Mesh events arrive as <channel> notifications in real-time. ' +
266
- 'When you see a CMB from another node, respond via sym_send targeted at that node by name if the reply is for that specific peer (MMP §4.4.4 targeted CMB). ' +
267
- 'Share observations about your own state with the whole mesh via sym_observe (MMP §9.2 receiver-autonomous SVAF evaluation). ' +
268
- 'Both sym_send and sym_observe emit CAT7 CMBs; receivers run SVAF and, if admitted, remix-store with lineage pointing back to your CMB. ' +
269
- 'Search mesh memory via sym_recall. ' +
270
- 'Messages arrive as compact headers with [mNNN] IDs — use sym_fetch to read the full content when the header is relevant to your current task.',
292
+ instructions: BASE_INSTRUCTIONS + primerText,
271
293
  },
272
294
  );
273
295
 
@@ -840,7 +862,9 @@ process.on('SIGINT', () => shutdown('SIGINT'));
840
862
  process.on('SIGHUP', () => shutdown('SIGHUP'));
841
863
 
842
864
  async function main() {
843
- // Start SymNode — connects to relay as a peer
865
+ // Start SymNode — connects to relay as a peer. The startup primer is
866
+ // computed at module-load time (see BASE_INSTRUCTIONS above) and is
867
+ // already embedded in the MCP server's initialize-response payload.
844
868
  await node.start();
845
869
 
846
870
  // Start MCP server — communicates with Claude Code via stdio