traderclaw-cli 1.0.111 → 1.0.112
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/bin/openclaw-trader.mjs +27 -0
- package/package.json +2 -2
package/bin/openclaw-trader.mjs
CHANGED
|
@@ -1585,6 +1585,25 @@ async function cmdGateway(args) {
|
|
|
1585
1585
|
process.exit(1);
|
|
1586
1586
|
}
|
|
1587
1587
|
|
|
1588
|
+
async function cmdMaintenance(subArgs) {
|
|
1589
|
+
const sub = subArgs[0];
|
|
1590
|
+
if (sub !== "session-cleanup") {
|
|
1591
|
+
printError("Usage: traderclaw maintenance session-cleanup");
|
|
1592
|
+
print("");
|
|
1593
|
+
printInfo("Archives bloated *.checkpoint.*.jsonl (and heartbeat session logs) under the OpenClaw agent sessions dir,");
|
|
1594
|
+
printInfo("then runs systemctl --user stop / daemon-reload / start on the gateway unit (same as TraderClaw persistence).");
|
|
1595
|
+
printInfo(`Env and cron examples: see ${join(PLUGIN_ROOT, "scripts", "openclaw-session-cleanup.sh")}`);
|
|
1596
|
+
process.exit(sub ? 1 : 0);
|
|
1597
|
+
}
|
|
1598
|
+
const scriptPath = join(PLUGIN_ROOT, "scripts", "openclaw-session-cleanup.sh");
|
|
1599
|
+
if (!existsSync(scriptPath)) {
|
|
1600
|
+
printError(`Session cleanup script not found: ${scriptPath}`);
|
|
1601
|
+
process.exit(1);
|
|
1602
|
+
}
|
|
1603
|
+
const r = spawnSync("bash", [scriptPath, ...subArgs.slice(1)], { stdio: "inherit", env: process.env });
|
|
1604
|
+
process.exit(r.status === null ? 1 : r.status);
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1588
1607
|
async function cmdLogin(args) {
|
|
1589
1608
|
const config = readConfig();
|
|
1590
1609
|
const pluginConfig = getPluginConfig(config);
|
|
@@ -4492,6 +4511,7 @@ Commands:
|
|
|
4492
4511
|
install Launch installer flows (--wizard for localhost GUI)
|
|
4493
4512
|
repair-openclaw Re-run npm install in the global openclaw package (fixes missing grammy / @buape/carbon; uses --ignore-scripts so @discordjs/opus does not require build tools)
|
|
4494
4513
|
gateway Gateway helpers (see subcommands below)
|
|
4514
|
+
maintenance Session disk hygiene (checkpoint archive + gateway restart)
|
|
4495
4515
|
login Re-authenticate (uses refresh token when valid; full challenge only if needed)
|
|
4496
4516
|
logout Revoke current session and clear tokens
|
|
4497
4517
|
status Check connection health and wallet status
|
|
@@ -4546,6 +4566,9 @@ Gateway subcommands (Linux):
|
|
|
4546
4566
|
gateway start Start gateway after manual edits
|
|
4547
4567
|
gateway ensure-persistent Set up systemd linger + enable unit
|
|
4548
4568
|
|
|
4569
|
+
Maintenance:
|
|
4570
|
+
maintenance session-cleanup Archive large session checkpoints + restart gateway (see script header for OPENCLAW_STATE_DIR, STRIP_ALL_CHECKPOINTS, DRY_RUN, ARCHIVE_RETENTION_DAYS)
|
|
4571
|
+
|
|
4549
4572
|
Install wizard (traderclaw install --wizard):
|
|
4550
4573
|
--port Local port for the wizard (default 17890)
|
|
4551
4574
|
--llm-provider e.g. openai, openai-codex, anthropic
|
|
@@ -4583,6 +4606,7 @@ Examples:
|
|
|
4583
4606
|
traderclaw config set-llm cli-cloud MY_API_KEY
|
|
4584
4607
|
traderclaw gateway stop # pause gateway to edit openclaw.json manually
|
|
4585
4608
|
traderclaw gateway start # resume after manual edit
|
|
4609
|
+
STRIP_ALL_CHECKPOINTS=1 OPENCLAW_STATE_DIR=/root/.openclaw traderclaw maintenance session-cleanup
|
|
4586
4610
|
traderclaw test-session
|
|
4587
4611
|
traderclaw test-session --wallet-private-key <base58_key>
|
|
4588
4612
|
traderclaw update
|
|
@@ -4844,6 +4868,9 @@ async function main() {
|
|
|
4844
4868
|
case "gateway":
|
|
4845
4869
|
await cmdGateway(args.slice(1));
|
|
4846
4870
|
break;
|
|
4871
|
+
case "maintenance":
|
|
4872
|
+
await cmdMaintenance(args.slice(1));
|
|
4873
|
+
break;
|
|
4847
4874
|
case "login":
|
|
4848
4875
|
await cmdLogin(args.slice(1));
|
|
4849
4876
|
break;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "traderclaw-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.112",
|
|
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.112"
|
|
21
21
|
},
|
|
22
22
|
"keywords": [
|
|
23
23
|
"traderclaw",
|