traderclaw-cli 1.0.69 → 1.0.71
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.
|
@@ -442,12 +442,29 @@ function runCommandWithEvents(cmd, args = [], opts = {}) {
|
|
|
442
442
|
});
|
|
443
443
|
}
|
|
444
444
|
|
|
445
|
+
/**
|
|
446
|
+
* Install or upgrade the global OpenClaw CLI. We always run npm even when `openclaw` is already
|
|
447
|
+
* on PATH: bundled plugin manifests track a minimum OpenClaw version (e.g. >=2026.4.8). A stale
|
|
448
|
+
* global from an older install causes `openclaw plugins install` to fail config validation with
|
|
449
|
+
* "plugin requires OpenClaw >=… but this host is …".
|
|
450
|
+
*/
|
|
445
451
|
async function installOpenClawPlatform() {
|
|
446
|
-
|
|
447
|
-
|
|
452
|
+
const hadOpenclaw = commandExists("openclaw");
|
|
453
|
+
const previousVersion = hadOpenclaw ? getCommandOutput("openclaw --version") : null;
|
|
454
|
+
await runCommandWithEvents("npm", ["install", "-g", "--registry", "https://registry.npmjs.org/", "openclaw@latest"]);
|
|
455
|
+
const available = commandExists("openclaw");
|
|
456
|
+
const version = available ? getCommandOutput("openclaw --version") : null;
|
|
457
|
+
if (!available) {
|
|
458
|
+
throw new Error("npm install -g openclaw@latest finished but `openclaw` is not available on PATH");
|
|
448
459
|
}
|
|
449
|
-
|
|
450
|
-
|
|
460
|
+
return {
|
|
461
|
+
alreadyInstalled: hadOpenclaw,
|
|
462
|
+
installed: true,
|
|
463
|
+
upgraded: hadOpenclaw,
|
|
464
|
+
previousVersion,
|
|
465
|
+
version,
|
|
466
|
+
available: true,
|
|
467
|
+
};
|
|
451
468
|
}
|
|
452
469
|
|
|
453
470
|
function isNpmGlobalBinConflict(err, cliName) {
|
|
@@ -993,6 +1010,21 @@ function configureGatewayScheduling(modeConfig, configPath = CONFIG_FILE) {
|
|
|
993
1010
|
const cronStorePath = resolveCronJobsStorePath(config);
|
|
994
1011
|
const cronMerge = mergeTraderCronJobsIntoStore(cronStorePath, targetJobs);
|
|
995
1012
|
|
|
1013
|
+
let qmdAvailable = false;
|
|
1014
|
+
let qmdVersion = null;
|
|
1015
|
+
try { qmdAvailable = commandExists("qmd"); } catch {}
|
|
1016
|
+
if (qmdAvailable) {
|
|
1017
|
+
qmdVersion = getCommandOutput("qmd --version");
|
|
1018
|
+
} else {
|
|
1019
|
+
if (typeof console !== "undefined") {
|
|
1020
|
+
console.warn(
|
|
1021
|
+
"[traderclaw] QMD binary not found. Memory engine will fall back to SQLite (no vector search, no temporal decay, no MMR).\n" +
|
|
1022
|
+
"Install QMD: bun install -g @tobilu/qmd\n" +
|
|
1023
|
+
"Then restart the gateway: openclaw gateway restart"
|
|
1024
|
+
);
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
|
|
996
1028
|
return {
|
|
997
1029
|
configPath,
|
|
998
1030
|
agentsConfigured: targetAgents.length,
|
|
@@ -1004,6 +1036,8 @@ function configureGatewayScheduling(modeConfig, configPath = CONFIG_FILE) {
|
|
|
1004
1036
|
cronJobsStoreError: cronMerge.error,
|
|
1005
1037
|
removedLegacyCronJobs,
|
|
1006
1038
|
hooksConfigured: config.hooks.mappings.length,
|
|
1039
|
+
qmdAvailable,
|
|
1040
|
+
qmdVersion,
|
|
1007
1041
|
isV2,
|
|
1008
1042
|
};
|
|
1009
1043
|
}
|
|
@@ -1171,13 +1205,23 @@ function seedXConfig(modeConfig, configPath = CONFIG_FILE, wizardOpts = {}) {
|
|
|
1171
1205
|
entry.config.x.profiles = {};
|
|
1172
1206
|
}
|
|
1173
1207
|
|
|
1174
|
-
const agentIds =
|
|
1175
|
-
|
|
1176
|
-
|
|
1208
|
+
const agentIds =
|
|
1209
|
+
modeConfig.pluginId === "solana-trader-v2"
|
|
1210
|
+
? ["cto", "intern"]
|
|
1211
|
+
: modeConfig.pluginId === "solana-trader"
|
|
1212
|
+
? ["main", "solana-trader"]
|
|
1213
|
+
: ["main"];
|
|
1177
1214
|
let profilesFound = 0;
|
|
1178
1215
|
|
|
1179
1216
|
for (const agentId of agentIds) {
|
|
1180
|
-
|
|
1217
|
+
let { at, ats } = getAccessPairForAgent(wizardOpts, agentId);
|
|
1218
|
+
if (
|
|
1219
|
+
modeConfig.pluginId === "solana-trader"
|
|
1220
|
+
&& agentId === "solana-trader"
|
|
1221
|
+
&& (!at || !ats)
|
|
1222
|
+
) {
|
|
1223
|
+
({ at, ats } = getAccessPairForAgent(wizardOpts, "main"));
|
|
1224
|
+
}
|
|
1181
1225
|
if (at && ats) {
|
|
1182
1226
|
entry.config.x.profiles[agentId] = { accessToken: at, accessTokenSecret: ats };
|
|
1183
1227
|
profilesFound++;
|
|
@@ -1934,7 +1978,7 @@ export class InstallerStepEngine {
|
|
|
1934
1978
|
}
|
|
1935
1979
|
|
|
1936
1980
|
if (!this.options.skipInstallOpenClaw) {
|
|
1937
|
-
await this.runStep("install_openclaw", "Installing OpenClaw platform", async () => installOpenClawPlatform());
|
|
1981
|
+
await this.runStep("install_openclaw", "Installing or upgrading OpenClaw platform", async () => installOpenClawPlatform());
|
|
1938
1982
|
}
|
|
1939
1983
|
await this.runStep("configure_llm", "Configuring required OpenClaw LLM provider", async () => this.configureLlmStep());
|
|
1940
1984
|
if (!this.options.skipInstallPlugin) {
|
package/bin/openclaw-trader.mjs
CHANGED
|
@@ -858,7 +858,9 @@ async function cmdSetup(args) {
|
|
|
858
858
|
|
|
859
859
|
const existingForRecovery = readConfig();
|
|
860
860
|
const prevPlugin = getPluginConfig(existingForRecovery);
|
|
861
|
+
const prevSafe = prevPlugin && typeof prevPlugin === "object" ? { ...prevPlugin } : {};
|
|
861
862
|
const pluginConfig = {
|
|
863
|
+
...prevSafe,
|
|
862
864
|
orchestratorUrl,
|
|
863
865
|
walletId: null,
|
|
864
866
|
apiKey,
|
|
@@ -1805,7 +1807,7 @@ async function cmdPrecheck(args) {
|
|
|
1805
1807
|
} else if (opts.mode === "allow-install") {
|
|
1806
1808
|
log.info("Installing openclaw (allow-install mode)");
|
|
1807
1809
|
try {
|
|
1808
|
-
execSync("npm install -g openclaw", { stdio: "ignore" });
|
|
1810
|
+
execSync("npm install -g --registry https://registry.npmjs.org/ openclaw@latest", { stdio: "ignore" });
|
|
1809
1811
|
if (commandExists("openclaw")) log.pass("openclaw installed successfully");
|
|
1810
1812
|
else log.fail("openclaw install completed but command is still missing");
|
|
1811
1813
|
} catch {
|
|
@@ -2118,7 +2120,7 @@ function wizardHtml(defaults) {
|
|
|
2118
2120
|
<input id="xAccessTokenMainSecret" type="password" autocomplete="off" />
|
|
2119
2121
|
</div>
|
|
2120
2122
|
</div>
|
|
2121
|
-
<p class="muted">If you use X: create an app at <a href="https://developer.x.com" target="_blank" rel="noopener noreferrer">developer.x.com</a> with OAuth 1.0a Read and Write, and fill all four fields above (or leave all blank). Values are written to <code>openclaw.json</code>
|
|
2123
|
+
<p class="muted">If you use X: create an app at <a href="https://developer.x.com" target="_blank" rel="noopener noreferrer">developer.x.com</a> with OAuth 1.0a Read and Write, and fill all four fields above (or leave all blank). Values are written to <code>openclaw.json</code> at <code>plugins.entries.solana-trader.config.x</code> (consumer key/secret plus <code>profiles.main</code> and <code>profiles.solana-trader</code>, same tokens unless you set <code>X_ACCESS_TOKEN_SOLANA_TRADER</code> / <code>_SECRET</code>).</p>
|
|
2122
2124
|
</div>
|
|
2123
2125
|
<div class="card" id="startCard">
|
|
2124
2126
|
<div class="grid">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "traderclaw-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.71",
|
|
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.71"
|
|
21
21
|
},
|
|
22
22
|
"keywords": [
|
|
23
23
|
"traderclaw",
|