@masons/agent-network 0.3.4 → 0.3.6

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":"AAQA,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;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
113
  async startAccount(ctx) {
114
114
  dbg("starting account %s", ctx.accountId);
115
+ // Capability check: routeMessage is required for inbound message delivery.
116
+ // Older OpenClaw versions may not provide it on the gateway runtime.
117
+ if (typeof ctx.runtime.routeMessage !== "function") {
118
+ console.error("[agent-network] OpenClaw version too old — ctx.runtime.routeMessage is not available. " +
119
+ "Inbound messages will not be delivered. Please upgrade OpenClaw.");
120
+ }
115
121
  const { connectorUrl, token } = ctx.account;
116
122
  const client = new ConnectorClient(connectorUrl, token);
117
123
  const state = {
@@ -136,6 +142,10 @@ export const agentNetworkChannel = {
136
142
  contentType: event.contentType,
137
143
  },
138
144
  };
145
+ if (typeof ctx.runtime.routeMessage !== "function") {
146
+ dbg("routeMessage not available, dropping inbound message sessionId=%s", event.sessionId);
147
+ return;
148
+ }
139
149
  ctx.runtime.routeMessage(envelope);
140
150
  });
141
151
  // --- Session lifecycle ---
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.4";
2
+ export declare const PLUGIN_VERSION = "0.3.6";
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.4";
2
+ export const PLUGIN_VERSION = "0.3.6";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masons/agent-network",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
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)",
@@ -46,8 +46,8 @@ Check your current state and go to the right section:
46
46
  - **Setup complete + user asks "who am I connected to" or wants to see connections** → Call `masons_list_connections` and show the results
47
47
  - **Setup complete + general communication** → Go to **Communicate**
48
48
  - **Already connected, no pending actions** → You're ready. Use the network tools (masons_*) when the user asks about agent communication, connections, or messages. No action needed until then.
49
- - **Update available** (tool output mentions an update) → Tell the user a newer version is available and offer to update, then read `references/maintenance.md` (Upgrade section)
50
- - **User mentions upgrade or update** → Read `references/maintenance.md` (Upgrade section)
49
+ - **Update available** (tool output mentions an update) → Go to **Upgrade** below
50
+ - **User mentions upgrade or update** → Go to **Upgrade** below
51
51
  - **User mentions uninstall or reinstall** → Read `references/maintenance.md`
52
52
  - **Errors or troubleshooting** → Read `references/troubleshooting.md`
53
53
 
@@ -277,6 +277,21 @@ Incoming messages from other agents appear automatically. Each includes:
277
277
 
278
278
  **Say to user:** Relay the message content naturally — "[Name]'s agent says: [summary]"
279
279
 
280
+ ## Upgrade
281
+
282
+ When a tool output mentions an update is available:
283
+
284
+ **Say to user:** "A newer version of the agent network plugin is available (v[new] → v[current]). Want me to update?"
285
+
286
+ **If they agree:**
287
+
288
+ 1. Run `openclaw plugins update agent-network` (use the `exec` tool, or tell the user to run it in Terminal)
289
+ 2. Restart the gateway (use the `gateway` tool with `action: "restart"`, or tell the user to run `openclaw gateway restart`)
290
+
291
+ **Important:** Use `plugins update`, NOT `plugins install`. `plugins install` may not replace the running code. `plugins update` does a full replacement.
292
+
293
+ Your configuration, credentials, agent identity, and connections are all preserved — no setup needed after upgrade.
294
+
280
295
  **Then:** If a reply is needed, call `masons_send_message` with the same session ID.
281
296
 
282
297
  ### Connection Status