@masons/agent-network 0.5.26 → 0.5.28

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/dist/handoff.js CHANGED
@@ -147,7 +147,6 @@ function parseHandleFromInput(input) {
147
147
  }
148
148
  function sleep(ms) {
149
149
  return new Promise((resolve) => {
150
- const timeout = setTimeout(resolve, ms);
151
- timeout.unref?.();
150
+ setTimeout(resolve, ms);
152
151
  });
153
152
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAqEA,UAAU,WAAW;IACnB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChD;AAED,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,CACP,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,WAAW,CAAC,CAAC;CAC3B;AAED,UAAU,WAAW;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,KAAK,WAAW,GAAG,CAAC,GAAG,EAAE,WAAW,KAAK,cAAc,GAAG,IAAI,GAAG,SAAS,CAAC;AAE3E,UAAU,OAAO;IACf,YAAY,CACV,IAAI,EAAE,cAAc,GAAG,WAAW,EAClC,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAC3C,IAAI,CAAC;CACT;AAmCD,wBAAgB,qBAAqB,IAAI,IAAI,CAI5C;AAqRD,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CA80BhD"}
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAqEA,UAAU,WAAW;IACnB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChD;AAED,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,CACP,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,WAAW,CAAC,CAAC;CAC3B;AAED,UAAU,WAAW;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,KAAK,WAAW,GAAG,CAAC,GAAG,EAAE,WAAW,KAAK,cAAc,GAAG,IAAI,GAAG,SAAS,CAAC;AAE3E,UAAU,OAAO;IACf,YAAY,CACV,IAAI,EAAE,cAAc,GAAG,WAAW,EAClC,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAC3C,IAAI,CAAC;CACT;AAoDD,wBAAgB,qBAAqB,IAAI,IAAI,CAG5C;AAqRD,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAuzBhD"}
package/dist/tools.js CHANGED
@@ -9,16 +9,13 @@ import { sentMessageBuffer } from "./sent-message-buffer.js";
9
9
  import { getCurrentTurnChannelId, getCurrentTurnIsOwnerNonConsuming, getCurrentTurnOwnerSignal, } from "./turn-context.js";
10
10
  import { getLatestPublishedVersion, getPluginVersion, getUpdateInfo, } from "./update-check.js";
11
11
  const PROFILE_FIELDS = new Set(["name", "scope", "about", "audience"]);
12
- const UPGRADE_CMD = "openclaw plugins update agent-network";
13
12
  const GATEWAY_RESTART_CMD = "openclaw gateway restart";
14
- function reinstallCmd(version) {
13
+ function upgradeCmd(version) {
15
14
  return `openclaw plugins install @masons/agent-network@${version} --force`;
16
15
  }
17
16
  const SEMVER_RE = /^\d+\.\d+\.\d+$/;
18
- let upgradeAttemptedVersion = null;
19
17
  export function _resetToolsForTesting() {
20
18
  updateNoticeShown = false;
21
- upgradeAttemptedVersion = null;
22
19
  _resetChannelSetupForTesting();
23
20
  }
24
21
  function textResult(text) {
@@ -598,7 +595,7 @@ export function registerTools(api) {
598
595
  });
599
596
  api.registerTool({
600
597
  name: "masons_upgrade",
601
- description: "Check for and install plugin updates via `openclaw plugins update`. Do not use ClawHub (it distributes skills, not plugins).",
598
+ description: "Check for and install plugin updates. Emits an `openclaw plugins install ...@<version> --force` command pinned to the live npm `latest` value — the command carries full advance-to-latest semantics on its own, independent of OpenClaw's plugin-manager version-resolution path. Do not use ClawHub (it distributes skills, not plugins).",
602
599
  parameters: Type.Object({}),
603
600
  execute: async () => {
604
601
  const pendingNotes = ownerNotesQueue.size();
@@ -612,37 +609,21 @@ export function registerTools(api) {
612
609
  return textResult("Could not check for updates (network issue). Try again later.");
613
610
  }
614
611
  if (latestVersion === currentVersion) {
615
- upgradeAttemptedVersion = null;
616
612
  return textResult(`You're on the latest version (v${currentVersion}). No update needed.`);
617
613
  }
618
614
  if (!SEMVER_RE.test(latestVersion)) {
619
615
  return textResult(`Registry returned an unexpected version format: "${latestVersion}". Try again later.`);
620
616
  }
621
- const useFallback = upgradeAttemptedVersion === latestVersion;
622
- if (useFallback) {
623
- upgradeAttemptedVersion = null;
624
- const fallbackCmd = reinstallCmd(latestVersion);
625
- return textResult([
626
- `Update to v${latestVersion} — reinstall through OpenClaw (the normal update command may not have detected the new version).`,
627
- "",
628
- "Run this command using the exec tool:",
629
- fallbackCmd,
630
- "",
631
- `Then restart the gateway using the gateway tool.`,
632
- `If you cannot run commands, tell the user to run in Terminal:`,
633
- `${fallbackCmd} && ${GATEWAY_RESTART_CMD}`,
634
- ].join("\n"));
635
- }
636
- upgradeAttemptedVersion = latestVersion;
617
+ const cmd = upgradeCmd(latestVersion);
637
618
  return textResult([
638
619
  `Update available: v${currentVersion} → v${latestVersion}`,
639
620
  "",
640
621
  "Run this command using the exec tool:",
641
- UPGRADE_CMD,
622
+ cmd,
642
623
  "",
643
624
  "Then restart the gateway using the gateway tool.",
644
625
  "If you cannot run commands, tell the user to run in Terminal:",
645
- `${UPGRADE_CMD} && ${GATEWAY_RESTART_CMD}`,
626
+ `${cmd} && ${GATEWAY_RESTART_CMD}`,
646
627
  ].join("\n"));
647
628
  },
648
629
  });
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const PLUGIN_VERSION = "0.5.26";
1
+ export declare const PLUGIN_VERSION = "0.5.28";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const PLUGIN_VERSION = "0.5.26";
1
+ export const PLUGIN_VERSION = "0.5.28";
package/package.json CHANGED
@@ -1,16 +1,18 @@
1
1
  {
2
2
  "name": "@masons/agent-network",
3
- "version": "0.5.26",
4
- "description": "MASONS plugin for OpenClaw connect your agent to the agent network",
3
+ "version": "0.5.28",
4
+ "description": "MASONS Agent Networkconnects agent runtimes to the Agent Network over MSTP. Ships an OpenClaw channel plugin (root export) and subpath exports consumed by the Claude Code plugin today (planned: Codex and future hosts).",
5
5
  "license": "MIT",
6
6
  "author": "MASONS.ai <hello@masons.ai> (https://masons.ai)",
7
7
  "homepage": "https://masons.ai",
8
8
  "keywords": [
9
9
  "mstp",
10
- "openclaw",
10
+ "agent-network",
11
11
  "agent",
12
12
  "agent-to-agent",
13
- "masons"
13
+ "masons",
14
+ "openclaw",
15
+ "claude-code"
14
16
  ],
15
17
  "engines": {
16
18
  "node": ">=20.10"