@masons/agent-network 0.4.3 → 0.4.4

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":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAwCH,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,OAAO;IACf,YAAY,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;CACzE;AAoCD,uDAAuD;AACvD,wBAAgB,qBAAqB,IAAI,IAAI,CAI5C;AAsFD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAsyBhD"}
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAwCH,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,OAAO;IACf,YAAY,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;CACzE;AAyCD,uDAAuD;AACvD,wBAAgB,qBAAqB,IAAI,IAAI,CAI5C;AAsFD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAsyBhD"}
package/dist/tools.js CHANGED
@@ -29,8 +29,13 @@ import { fetchLatestVersion, getPluginVersion, getUpdateInfo, } from "./update-c
29
29
  const PROFILE_FIELDS = new Set(["name", "scope", "about", "audience"]);
30
30
  /** CLI command to update the plugin via OpenClaw. */
31
31
  const UPGRADE_CMD = "openclaw plugins update agent-network";
32
- /** Fallback: remove + fresh install. `{version}` is replaced at runtime. */
33
- const FALLBACK_UPGRADE_CMD = "rm -rf {home}/extensions/agent-network && openclaw plugins install @masons/agent-network@{version}";
32
+ /** Fallback: manual update via npm pack + in-place extract. Bypasses OpenClaw's
33
+ * broken version detection while preserving credentials and node_modules.
34
+ * Placeholders `{version}` and `{home}` are replaced at runtime. */
35
+ const FALLBACK_UPGRADE_CMD = "npm pack @masons/agent-network@{version} --pack-destination /tmp && " +
36
+ "tar xzf /tmp/masons-agent-network-{version}.tgz --strip-components=1 -C {home}/extensions/agent-network/ && " +
37
+ "cd {home}/extensions/agent-network && npm install --omit=dev && " +
38
+ "rm -f /tmp/masons-agent-network-{version}.tgz";
34
39
  /** CLI command to restart the gateway. */
35
40
  const GATEWAY_RESTART_CMD = "openclaw gateway restart";
36
41
  /** Simple semver regex — validates x.y.z before inserting into shell commands. */
@@ -673,9 +678,9 @@ export function registerTools(api) {
673
678
  // Fallback path — previous normal-path attempt for this version didn't work.
674
679
  upgradeAttemptedVersion = null; // Reset so next call starts fresh
675
680
  const home = getOpenClawHome();
676
- const fallbackCmd = FALLBACK_UPGRADE_CMD.replace("{home}", home).replace("{version}", latestVersion);
681
+ const fallbackCmd = FALLBACK_UPGRADE_CMD.replaceAll("{home}", home).replaceAll("{version}", latestVersion);
677
682
  return textResult([
678
- `Update to v${latestVersion} — using alternative method (previous attempt may have failed).`,
683
+ `Update to v${latestVersion} — manual update (the automatic update command may not have detected the new version).`,
679
684
  "",
680
685
  "Run this command using the exec tool:",
681
686
  fallbackCmd,
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.4.3";
2
+ export declare const PLUGIN_VERSION = "0.4.4";
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.4.3";
2
+ export const PLUGIN_VERSION = "0.4.4";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masons/agent-network",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
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)",