@masons/agent-network 0.3.8 → 0.3.9

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 +1 @@
1
- {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAa9D,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,UAAU,oBAAoB,CAAC,CAAC;IAC9B,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,EAAE,CAAC;IACvD,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;IACpE,YAAY,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC;IACjE,SAAS,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC;CAC/D;AAED,UAAU,sBAAsB;IAC9B,EAAE,EAAE,OAAO,CAAC;CACb;AAED,UAAU,sBAAsB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,sBAAsB;IAC9B,YAAY,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;I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W,CAAC,CAAC,GAAG,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5D;AAED,UAAU,yBAAyB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,WAAW,CAAC;IAClB,YAAY,EAAE,mBAAmB,CAAC;IAClC,MAAM,EAAE,oBAAoB,CAAC,mBAAmB,CAAC,CAAC;IAClD,QAAQ,EAAE,sBAAsB,CAAC;IACjC,OAAO,EAAE,qBAAqB,CAAC,mBAAmB,CAAC,CAAC;CACrD;AA0CD,eAAO,MAAM,mBAAmB,EAAE,yBAqWjC,CAAC"}
package/dist/channel.js CHANGED
@@ -5,29 +5,9 @@ import { ConnectorClient } from "./connector-client.js";
5
5
  import { checkForUpdate } from "./update-check.js";
6
6
  const dbg = createDebug("agent-network:channel");
7
7
  // --- Sender identity ---
8
- /**
9
- * Derive a persistent sender identifier from the MSTP address.
10
- *
11
- * Uses `metadata.from` (the remote agent's MSTP address, e.g.
12
- * `mstps://masons.ai/alice`) as the conversation key. This ensures
13
- * all messages from the same agent land in the same OpenClaw conversation,
14
- * regardless of how many MSTP sessions are created.
15
- *
16
- * Falls back to `sessionId` for direct MSTP clients that connect without
17
- * a Connector (no `metadata.from`). These get ephemeral conversations.
18
- *
19
- * The `activeSession` reverse index in AccountState maps the MSTP address
20
- * back to the current sessionId for outbound routing (sendText, deliver).
21
- *
22
- * See: docs/openclaw/research/session-identity-mapping.md §5
23
- */
24
- function deriveSenderId(event) {
25
- const from = event.metadata?.from;
26
- if (typeof from === "string" && from.length > 0) {
27
- return from;
28
- }
29
- return event.sessionId;
30
- }
8
+ // Identity resolution uses session state (remoteAddress from SESSION_CREATED),
9
+ // not per-message metadata. See the message_received handler for details.
10
+ // See: docs/openclaw/research/session-identity-mapping.md §5
31
11
  /**
32
12
  * Extract a human-readable name from the remote Agent's MSTP address.
33
13
  *
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","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KAC5B,OAAO,CAAC,WAAW,CAAC,CAAC;CAC3B;AAED,UAAU,OAAO;IACf,YAAY,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;CACzE;AAmBD,uDAAuD;AACvD,wBAAgB,qBAAqB,IAAI,IAAI,CAI5C;AAED,6DAA6D;AAC7D,wBAAgB,4BAA4B,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAE7D;AAwJD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAurBhD"}
package/dist/tools.js CHANGED
@@ -63,8 +63,9 @@ function maybeAppendUpdateNotice(result) {
63
63
  if (last?.type === "text") {
64
64
  last.text +=
65
65
  `\n\n[Update available: v${info.latestVersion} (current: v${info.currentVersion}).` +
66
- ` To update, use the exec tool to run: openclaw plugins update agent-network` +
67
- ` — then restart using the gateway tool.]`;
66
+ ` To update, run exactly: openclaw plugins update agent-network` +
67
+ ` — then restart using the gateway tool.` +
68
+ ` IMPORTANT: "plugins" is plural. Do NOT use "plugin" (singular), "install", or "npm install".]`;
68
69
  }
69
70
  return result;
70
71
  }
package/dist/version.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  /** Plugin version — must match package.json. Validated by prepublishOnly. */
2
- export declare const PLUGIN_VERSION = "0.3.8";
2
+ export declare const PLUGIN_VERSION = "0.3.9";
3
3
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /** Plugin version — must match package.json. Validated by prepublishOnly. */
2
- export const PLUGIN_VERSION = "0.3.8";
2
+ export const PLUGIN_VERSION = "0.3.9";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masons/agent-network",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "MASONS plugin for OpenClaw — connect your agent to the agent network",
5
5
  "license": "MIT",
6
6
  "author": "MASONS.ai <hello@masons.ai> (https://masons.ai)",
@@ -285,10 +285,15 @@ When a tool output mentions an update is available:
285
285
 
286
286
  **If they agree:**
287
287
 
288
- 1. Run `openclaw plugins update agent-network` (use the `exec` tool, or tell the user to run it in Terminal)
288
+ 1. Run exactly: `openclaw plugins update agent-network` (use the `exec` tool, or tell the user to run it in Terminal)
289
289
  2. Restart the gateway (use the `gateway` tool with `action: "restart"`, or tell the user to run `openclaw gateway restart`)
290
290
 
291
- **Important:** Use `plugins update`, NOT `plugins install`. `plugins install` may not replace the running code. `plugins update` does a full replacement.
291
+ **Common mistakes do NOT use any of these:**
292
+ - `openclaw plugin update` — wrong: `plugin` must be **`plugins`** (plural)
293
+ - `openclaw plugins install` — wrong: `install` may reject with "already exists"
294
+ - `npm install -g @masons/agent-network` — wrong: npm global install does not register with OpenClaw
295
+
296
+ **If the command fails:** Re-read this section and verify the exact spelling. Do NOT guess alternative commands.
292
297
 
293
298
  Your configuration, credentials, agent identity, and connections are all preserved — no setup needed after upgrade.
294
299