@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.
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +9 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/tools.d.ts.map
CHANGED
|
@@ -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;
|
|
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:
|
|
33
|
-
|
|
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.
|
|
681
|
+
const fallbackCmd = FALLBACK_UPGRADE_CMD.replaceAll("{home}", home).replaceAll("{version}", latestVersion);
|
|
677
682
|
return textResult([
|
|
678
|
-
`Update to v${latestVersion} —
|
|
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
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.
|
|
2
|
+
export const PLUGIN_VERSION = "0.4.4";
|
package/package.json
CHANGED