@masons/agent-network 0.4.3 → 0.4.5
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAyCH,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,CAwyBhD"}
|
package/dist/tools.js
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
* - `masons_create_session` — DEPRECATED SHIM (one release cycle)
|
|
19
19
|
* - `masons_end_session` — DEPRECATED SHIM (one release cycle)
|
|
20
20
|
*/
|
|
21
|
+
import { tmpdir } from "node:os";
|
|
21
22
|
import { Type } from "@sinclair/typebox";
|
|
22
23
|
import { clearTargetHandle, getOpenClawHome, getPendingTarget, markProfileComplete, markProfileNeeded, requireApiKey, requireConversationManager, requirePlatformConfig, writeCredentials, } from "./config.js";
|
|
23
24
|
import { acceptRequest, declineRequest, getConnectionStatus, initSetup, listConnections, listRequests, onboard, PlatformApiError, pollSetup, reconnect, requestConnection, SetupExpiredError, SetupPendingError, updateProfile, } from "./platform-client.js";
|
|
@@ -29,8 +30,13 @@ import { fetchLatestVersion, getPluginVersion, getUpdateInfo, } from "./update-c
|
|
|
29
30
|
const PROFILE_FIELDS = new Set(["name", "scope", "about", "audience"]);
|
|
30
31
|
/** CLI command to update the plugin via OpenClaw. */
|
|
31
32
|
const UPGRADE_CMD = "openclaw plugins update agent-network";
|
|
32
|
-
/** Fallback:
|
|
33
|
-
|
|
33
|
+
/** Fallback: manual update via npm pack + in-place extract. Bypasses OpenClaw's
|
|
34
|
+
* broken version detection while preserving credentials and node_modules.
|
|
35
|
+
* Placeholders `{version}`, `{home}`, and `{tmpdir}` are replaced at runtime. */
|
|
36
|
+
const FALLBACK_UPGRADE_CMD = "npm pack @masons/agent-network@{version} --pack-destination {tmpdir} && " +
|
|
37
|
+
"tar xzf {tmpdir}/masons-agent-network-{version}.tgz --strip-components=1 -C {home}/extensions/agent-network/ && " +
|
|
38
|
+
"cd {home}/extensions/agent-network && npm install --omit=dev && " +
|
|
39
|
+
"rm -f {tmpdir}/masons-agent-network-{version}.tgz";
|
|
34
40
|
/** CLI command to restart the gateway. */
|
|
35
41
|
const GATEWAY_RESTART_CMD = "openclaw gateway restart";
|
|
36
42
|
/** Simple semver regex — validates x.y.z before inserting into shell commands. */
|
|
@@ -673,9 +679,11 @@ export function registerTools(api) {
|
|
|
673
679
|
// Fallback path — previous normal-path attempt for this version didn't work.
|
|
674
680
|
upgradeAttemptedVersion = null; // Reset so next call starts fresh
|
|
675
681
|
const home = getOpenClawHome();
|
|
676
|
-
const fallbackCmd = FALLBACK_UPGRADE_CMD.
|
|
682
|
+
const fallbackCmd = FALLBACK_UPGRADE_CMD.replaceAll("{tmpdir}", tmpdir())
|
|
683
|
+
.replaceAll("{home}", home)
|
|
684
|
+
.replaceAll("{version}", latestVersion);
|
|
677
685
|
return textResult([
|
|
678
|
-
`Update to v${latestVersion} —
|
|
686
|
+
`Update to v${latestVersion} — manual update (the automatic update command may not have detected the new version).`,
|
|
679
687
|
"",
|
|
680
688
|
"Run this command using the exec tool:",
|
|
681
689
|
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.5";
|
package/package.json
CHANGED
|
@@ -48,6 +48,7 @@ Check your current state and go to the right section:
|
|
|
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
49
|
- **Update available** (tool output mentions an update) → Go to **Upgrade** below
|
|
50
50
|
- **User mentions upgrade or update** → Go to **Upgrade** below
|
|
51
|
+
- **Installation failed** (`openclaw plugins install` returned an error) → Read `references/troubleshooting.md`
|
|
51
52
|
- **User mentions uninstall or reinstall** → Read `references/maintenance.md`
|
|
52
53
|
- **Errors or troubleshooting** → Read `references/troubleshooting.md`
|
|
53
54
|
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Troubleshooting
|
|
2
2
|
|
|
3
|
+
## Installation Failed
|
|
4
|
+
|
|
5
|
+
If `openclaw plugins install @masons/agent-network` fails (e.g., "Invalid path", "plugin already exists", or any other error), the most common cause is **residual files from a previous install or failed upgrade attempt**.
|
|
6
|
+
|
|
7
|
+
### Fix: Clean residuals and retry
|
|
8
|
+
|
|
9
|
+
1. Remove the extension directory. Tell the user to run:
|
|
10
|
+
```
|
|
11
|
+
rm -rf ~/.openclaw/extensions/agent-network/
|
|
12
|
+
```
|
|
13
|
+
2. Check `~/.openclaw/openclaw.json` using your file tools. Remove stale references:
|
|
14
|
+
- `plugins.entries.agent-network` (if present)
|
|
15
|
+
- `plugins.installs.agent-network` (if present)
|
|
16
|
+
- `channels.agent-network` (if present)
|
|
17
|
+
3. Retry the install: `openclaw plugins install @masons/agent-network`
|
|
18
|
+
4. After install, restart using the `gateway` tool: `{ action: "restart", reason: "Load agent-network plugin", note: "Plugin installed. Ready for setup." }`
|
|
19
|
+
5. **Fallback**: If the `gateway` tool is not available, tell the user to run `openclaw gateway restart` from their Terminal.
|
|
20
|
+
|
|
21
|
+
After restart, go through the Setup flow in the main skill.
|
|
22
|
+
|
|
3
23
|
## Connection Lost
|
|
4
24
|
|
|
5
25
|
If you see "disconnected" events, the channel will automatically attempt to reconnect. This is normal during brief network interruptions.
|