traderclaw-cli 1.0.96 → 1.0.98
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.
|
@@ -1234,9 +1234,31 @@ async function restartGateway() {
|
|
|
1234
1234
|
if (!commandExists("openclaw")) return { ran: false };
|
|
1235
1235
|
try {
|
|
1236
1236
|
await runCommandWithEvents("openclaw", ["gateway", "restart"]);
|
|
1237
|
-
return { ran: true, success: true };
|
|
1238
1237
|
} catch {
|
|
1239
|
-
return { ran: true, success: false };
|
|
1238
|
+
return { ran: true, success: false, healthy: false };
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
// Brief wait then verify the gateway is actually healthy after the restart.
|
|
1242
|
+
await new Promise((r) => setTimeout(r, 2500));
|
|
1243
|
+
try {
|
|
1244
|
+
const raw = getCommandOutput("openclaw gateway status --json || true");
|
|
1245
|
+
let statusJson = null;
|
|
1246
|
+
if (raw) {
|
|
1247
|
+
try { statusJson = JSON.parse(raw); } catch { /* non-JSON output */ }
|
|
1248
|
+
}
|
|
1249
|
+
const serviceStatus = statusJson?.service?.runtime?.status;
|
|
1250
|
+
const rpcOk = statusJson?.rpc?.ok === true;
|
|
1251
|
+
const healthy = serviceStatus === "running" && rpcOk;
|
|
1252
|
+
if (!healthy) {
|
|
1253
|
+
console.warn(
|
|
1254
|
+
"[restartGateway] Gateway restarted but health check failed " +
|
|
1255
|
+
`(status=${serviceStatus ?? "unknown"}, rpc.ok=${rpcOk}). ` +
|
|
1256
|
+
"Check: journalctl --user -u openclaw-gateway",
|
|
1257
|
+
);
|
|
1258
|
+
}
|
|
1259
|
+
return { ran: true, success: true, healthy };
|
|
1260
|
+
} catch {
|
|
1261
|
+
return { ran: true, success: true, healthy: false };
|
|
1240
1262
|
}
|
|
1241
1263
|
}
|
|
1242
1264
|
|
package/bin/openclaw-trader.mjs
CHANGED
|
@@ -3760,6 +3760,9 @@ async function cmdInstall(args) {
|
|
|
3760
3760
|
print(` Then run: ${restartCommand}`);
|
|
3761
3761
|
}
|
|
3762
3762
|
printInfo("Wizard finish requested from browser. Closing server and returning shell prompt.");
|
|
3763
|
+
printInfo(
|
|
3764
|
+
"If you used SSH -L for ports 17890/1455: close browser tabs to the wizard, or open a new SSH session without those forwards. Otherwise the SSH client may print many \"channel … Connection refused\" lines after the servers stop — that is normal and stops once nothing tries those local ports or you reconnect.",
|
|
3765
|
+
);
|
|
3763
3766
|
server.close(() => process.exit(0));
|
|
3764
3767
|
}, 650);
|
|
3765
3768
|
return;
|
|
@@ -3906,6 +3909,9 @@ async function cmdInstall(args) {
|
|
|
3906
3909
|
printInfo("Press Ctrl+C to stop the wizard server.");
|
|
3907
3910
|
printInfo(`If you are on a remote VPS, forward both ports from your local machine:`);
|
|
3908
3911
|
printInfo(` ssh -L ${defaults.port}:127.0.0.1:${defaults.port} -L 1455:127.0.0.1:1455 <user>@<your-vps>`);
|
|
3912
|
+
printInfo(
|
|
3913
|
+
"When the wizard exits, reconnect without -L (or close tabs using those localhost ports) to avoid noisy SSH \"channel … Connection refused\" messages.",
|
|
3914
|
+
);
|
|
3909
3915
|
}
|
|
3910
3916
|
|
|
3911
3917
|
async function cmdTestSession(args) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "traderclaw-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.98",
|
|
4
4
|
"description": "Global TraderClaw CLI (install --wizard, setup, precheck). Installs solana-traderclaw as a dependency for OpenClaw plugin files.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"node": ">=22"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"solana-traderclaw": "^1.0.
|
|
20
|
+
"solana-traderclaw": "^1.0.98"
|
|
21
21
|
},
|
|
22
22
|
"keywords": [
|
|
23
23
|
"traderclaw",
|