@masons/agent-network 0.4.8 → 0.4.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.
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +10 -20
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +11 -10
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;AA0CH,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;AA0CH,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;AA0CD,uDAAuD;AACvD,wBAAgB,qBAAqB,IAAI,IAAI,CAI5C;AAsFD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAy0BhD"}
|
package/dist/tools.js
CHANGED
|
@@ -31,8 +31,9 @@ import { fetchLatestVersion, getPluginVersion, getUpdateInfo, } from "./update-c
|
|
|
31
31
|
const PROFILE_FIELDS = new Set(["name", "scope", "about", "audience"]);
|
|
32
32
|
/** CLI command to update the plugin via OpenClaw. */
|
|
33
33
|
const UPGRADE_CMD = "openclaw plugins update agent-network";
|
|
34
|
-
/** Fallback: manual update via npm pack + in-place extract.
|
|
35
|
-
*
|
|
34
|
+
/** Fallback: manual update via npm pack + in-place extract. Used when
|
|
35
|
+
* `openclaw plugins update` fails (integrity conflict, npm cache issue, etc.)
|
|
36
|
+
* while preserving credentials and node_modules.
|
|
36
37
|
* Placeholders `{version}`, `{home}`, and `{tmpdir}` are replaced at runtime. */
|
|
37
38
|
const FALLBACK_UPGRADE_CMD = "npm pack @masons/agent-network@{version} --pack-destination {tmpdir} && " +
|
|
38
39
|
"tar xzf {tmpdir}/masons-agent-network-{version}.tgz --strip-components=1 -C {home}/extensions/agent-network/ && " +
|
|
@@ -660,7 +661,7 @@ export function registerTools(api) {
|
|
|
660
661
|
// --- masons_upgrade -------------------------------------------------------
|
|
661
662
|
api.registerTool({
|
|
662
663
|
name: "masons_upgrade",
|
|
663
|
-
description: "Check for and install plugin updates
|
|
664
|
+
description: "Check for and install plugin updates via `openclaw plugins update`. Do not use ClawHub (it distributes skills, not plugins).",
|
|
664
665
|
parameters: Type.Object({}),
|
|
665
666
|
// NOT wrapped with withUpdateNotice — this tool IS the upgrade path.
|
|
666
667
|
// Wrapping would create a circular reference in the update notice text.
|
|
@@ -675,23 +676,12 @@ export function registerTools(api) {
|
|
|
675
676
|
}
|
|
676
677
|
const currentVersion = getPluginVersion();
|
|
677
678
|
// 1. Determine latest version.
|
|
678
|
-
//
|
|
679
|
-
//
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
}
|
|
685
|
-
else {
|
|
686
|
-
const info = getUpdateInfo();
|
|
687
|
-
if (info) {
|
|
688
|
-
latestVersion = info.latestVersion;
|
|
689
|
-
}
|
|
690
|
-
else {
|
|
691
|
-
// No cached info (startup check didn't run or failed) — fetch directly.
|
|
692
|
-
latestVersion = await fetchLatestVersion();
|
|
693
|
-
}
|
|
694
|
-
}
|
|
679
|
+
// Always fetch directly from npm — this is an explicit upgrade
|
|
680
|
+
// command, not a passive check. The 24h startup cache
|
|
681
|
+
// (checkForUpdate / getUpdateInfo) is for the withUpdateNotice
|
|
682
|
+
// passive hint only. An explicit "upgrade" must see the real
|
|
683
|
+
// latest version, even if it was published minutes ago.
|
|
684
|
+
const latestVersion = await fetchLatestVersion();
|
|
695
685
|
// 2. Network error — can't determine latest version.
|
|
696
686
|
if (!latestVersion) {
|
|
697
687
|
return textResult("Could not check for updates (network issue). Try again later.");
|
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.9";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masons/agent-network",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.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)",
|
|
@@ -19,6 +19,15 @@
|
|
|
19
19
|
"publishConfig": {
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsc",
|
|
24
|
+
"dev": "tsc --watch",
|
|
25
|
+
"test": "tsc -p test/tsconfig.json && node --test --loader ts-node/esm test/**/*.test.ts",
|
|
26
|
+
"lint": "biome check",
|
|
27
|
+
"format": "biome format --write",
|
|
28
|
+
"prepublishOnly": "bash scripts/check-version.sh && npm run build && npm run test",
|
|
29
|
+
"release": "pnpm publish --access public"
|
|
30
|
+
},
|
|
22
31
|
"files": [
|
|
23
32
|
"dist/",
|
|
24
33
|
"openclaw.plugin.json",
|
|
@@ -68,13 +77,5 @@
|
|
|
68
77
|
"@types/ws": "^8",
|
|
69
78
|
"ts-node": "^10",
|
|
70
79
|
"typescript": "^5"
|
|
71
|
-
},
|
|
72
|
-
"scripts": {
|
|
73
|
-
"build": "tsc",
|
|
74
|
-
"dev": "tsc --watch",
|
|
75
|
-
"test": "tsc -p test/tsconfig.json && node --test --loader ts-node/esm test/**/*.test.ts",
|
|
76
|
-
"lint": "biome check",
|
|
77
|
-
"format": "biome format --write",
|
|
78
|
-
"release": "pnpm publish --access public"
|
|
79
80
|
}
|
|
80
|
-
}
|
|
81
|
+
}
|