traderclaw-cli 1.0.103 → 1.0.105
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/installer-step-engine.mjs +39 -20
- package/bin/openclaw-trader.mjs +14 -1
- package/package.json +2 -2
|
@@ -1533,6 +1533,7 @@ function fallbackModelForProvider(provider) {
|
|
|
1533
1533
|
if (provider === "moonshot") return "moonshot/kimi-k2";
|
|
1534
1534
|
if (provider === "cerebras") return "cerebras/llama-4-scout-17b-16e-instruct";
|
|
1535
1535
|
if (provider === "qwen") return "qwen/qwen3-235b-a22b";
|
|
1536
|
+
if (provider === "cli-cloud") return "cli-cloud/gemma-e4b";
|
|
1536
1537
|
return `${provider}/default`;
|
|
1537
1538
|
}
|
|
1538
1539
|
|
|
@@ -1552,6 +1553,7 @@ function providerEnvKey(provider) {
|
|
|
1552
1553
|
if (provider === "moonshot") return "MOONSHOT_API_KEY";
|
|
1553
1554
|
if (provider === "cerebras") return "CEREBRAS_API_KEY";
|
|
1554
1555
|
if (provider === "qwen") return "DASHSCOPE_API_KEY";
|
|
1556
|
+
if (provider === "cli-cloud") return "CLI_CLOUD_API_KEY";
|
|
1555
1557
|
return "";
|
|
1556
1558
|
}
|
|
1557
1559
|
|
|
@@ -1702,8 +1704,9 @@ function configureOpenClawLlmProvider({ provider, model, credential }, configPat
|
|
|
1702
1704
|
if (!config.env || typeof config.env !== "object") config.env = {};
|
|
1703
1705
|
config.env[envKey] = credential;
|
|
1704
1706
|
|
|
1705
|
-
// Clean stale/broken provider objects from previous buggy writes.
|
|
1706
|
-
|
|
1707
|
+
// Clean stale/broken provider objects from previous buggy writes (skip custom providers that need their entry).
|
|
1708
|
+
const CUSTOM_PROVIDERS_WITH_BASEURL = ["cli-cloud"];
|
|
1709
|
+
if (!CUSTOM_PROVIDERS_WITH_BASEURL.includes(provider) && config.models && config.models.providers && config.models.providers[provider]) {
|
|
1707
1710
|
delete config.models.providers[provider];
|
|
1708
1711
|
if (Object.keys(config.models.providers).length === 0) {
|
|
1709
1712
|
delete config.models.providers;
|
|
@@ -1713,6 +1716,13 @@ function configureOpenClawLlmProvider({ provider, model, credential }, configPat
|
|
|
1713
1716
|
}
|
|
1714
1717
|
}
|
|
1715
1718
|
|
|
1719
|
+
// Write baseUrl for custom OpenAI-compatible providers.
|
|
1720
|
+
if (provider === "cli-cloud") {
|
|
1721
|
+
if (!config.models) config.models = {};
|
|
1722
|
+
if (!config.models.providers) config.models.providers = {};
|
|
1723
|
+
config.models.providers["cli-cloud"] = { baseUrl: "https://app.cli.cloud/llm/v1", models: [] };
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1716
1726
|
if (!config.agents) config.agents = {};
|
|
1717
1727
|
if (!config.agents.defaults) config.agents.defaults = {};
|
|
1718
1728
|
ensureAgentsDefaultsSchemaCompat(config);
|
|
@@ -2224,6 +2234,7 @@ export class InstallerStepEngine {
|
|
|
2224
2234
|
}
|
|
2225
2235
|
|
|
2226
2236
|
async configureLlmStep() {
|
|
2237
|
+
const CUSTOM_PROVIDERS_NO_PROBE = ["cli-cloud"];
|
|
2227
2238
|
const provider = String(this.options.llmProvider || "").trim();
|
|
2228
2239
|
const requestedModel = String(this.options.llmModel || "").trim();
|
|
2229
2240
|
const credential = String(this.options.llmCredential || "").trim();
|
|
@@ -2293,15 +2304,19 @@ export class InstallerStepEngine {
|
|
|
2293
2304
|
onEvent: (evt) => this.emitLog("configure_llm", evt.type === "stderr" ? "warn" : "info", evt.text, evt.urls || []),
|
|
2294
2305
|
});
|
|
2295
2306
|
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2307
|
+
if (CUSTOM_PROVIDERS_NO_PROBE.includes(provider)) {
|
|
2308
|
+
this.emitLog("configure_llm", "info", `Skipping openclaw provider probe for custom provider '${provider}'.`);
|
|
2309
|
+
} else {
|
|
2310
|
+
try {
|
|
2311
|
+
await runCommandWithEvents("openclaw", ["models", "status", "--check", "--probe-provider", provider], {
|
|
2312
|
+
onEvent: (evt) => this.emitLog("configure_llm", evt.type === "stderr" ? "warn" : "info", evt.text, evt.urls || []),
|
|
2313
|
+
});
|
|
2314
|
+
} catch (err) {
|
|
2315
|
+
const details = `${err?.stderr || ""}\n${err?.stdout || ""}\n${err?.message || ""}`.trim();
|
|
2316
|
+
throw new Error(
|
|
2317
|
+
`LLM provider validation failed for '${provider}'. Check OAuth login and model, then retry.\n${details}`,
|
|
2318
|
+
);
|
|
2319
|
+
}
|
|
2305
2320
|
}
|
|
2306
2321
|
|
|
2307
2322
|
return { configured: true, provider, model, configPath: saved.configPath, authMode: "oauth" };
|
|
@@ -2326,15 +2341,19 @@ export class InstallerStepEngine {
|
|
|
2326
2341
|
onEvent: (evt) => this.emitLog("configure_llm", evt.type === "stderr" ? "warn" : "info", evt.text, evt.urls || []),
|
|
2327
2342
|
});
|
|
2328
2343
|
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2344
|
+
if (CUSTOM_PROVIDERS_NO_PROBE.includes(provider)) {
|
|
2345
|
+
this.emitLog("configure_llm", "info", `Skipping openclaw provider probe for custom provider '${provider}'.`);
|
|
2346
|
+
} else {
|
|
2347
|
+
try {
|
|
2348
|
+
await runCommandWithEvents("openclaw", ["models", "status", "--check", "--probe-provider", provider], {
|
|
2349
|
+
onEvent: (evt) => this.emitLog("configure_llm", evt.type === "stderr" ? "warn" : "info", evt.text, evt.urls || []),
|
|
2350
|
+
});
|
|
2351
|
+
} catch (err) {
|
|
2352
|
+
const details = `${err?.stderr || ""}\n${err?.stdout || ""}\n${err?.message || ""}`.trim();
|
|
2353
|
+
throw new Error(
|
|
2354
|
+
`LLM provider validation failed for '${provider}'. Check credential/model and retry.\n${details}`,
|
|
2355
|
+
);
|
|
2356
|
+
}
|
|
2338
2357
|
}
|
|
2339
2358
|
|
|
2340
2359
|
return { configured: true, provider, model, configPath: saved.configPath, authMode: "api_key" };
|
package/bin/openclaw-trader.mjs
CHANGED
|
@@ -38,6 +38,7 @@ const WIZARD_PROVIDER_PRIORITY = [
|
|
|
38
38
|
"qwen",
|
|
39
39
|
"cerebras",
|
|
40
40
|
"minimax",
|
|
41
|
+
"cli-cloud",
|
|
41
42
|
];
|
|
42
43
|
let wizardLlmCatalogPromise = null;
|
|
43
44
|
|
|
@@ -2233,6 +2234,10 @@ async function loadWizardLlmCatalogAsync() {
|
|
|
2233
2234
|
id: "moonshot",
|
|
2234
2235
|
models: [{ id: "moonshot/kimi-k2", name: "Kimi K2" }],
|
|
2235
2236
|
},
|
|
2237
|
+
{
|
|
2238
|
+
id: "cli-cloud",
|
|
2239
|
+
models: [{ id: "cli-cloud/gemma-e4b", name: "Gemma E4B" }],
|
|
2240
|
+
},
|
|
2236
2241
|
],
|
|
2237
2242
|
generatedAt: new Date().toISOString(),
|
|
2238
2243
|
};
|
|
@@ -2343,6 +2348,7 @@ function wizardHtml(defaults) {
|
|
|
2343
2348
|
<label>LLM API key or token (required)</label>
|
|
2344
2349
|
<input id="llmCredential" type="password" placeholder="Paste the credential for the selected provider/model" />
|
|
2345
2350
|
<p class="muted">Written to OpenClaw <code>config.env</code> for the selected provider. If you do not choose a model manually, the installer picks a safe default.</p>
|
|
2351
|
+
<p class="muted hidden" id="llmCliCloudHint">Routes to <code>https://app.cli.cloud/llm/v1</code> — paste your CLI Cloud API key above.</p>
|
|
2346
2352
|
</div>
|
|
2347
2353
|
<div style="margin-top:12px;" id="llmOauthBlock" class="hidden">
|
|
2348
2354
|
<p class="muted" style="margin-bottom:12px;">
|
|
@@ -2520,6 +2526,7 @@ function wizardHtml(defaults) {
|
|
|
2520
2526
|
const llmAuthModeOauth = document.getElementById("llmAuthModeOauth");
|
|
2521
2527
|
const llmProviderWrap = document.getElementById("llmProviderWrap");
|
|
2522
2528
|
const llmOauthProviderNote = document.getElementById("llmOauthProviderNote");
|
|
2529
|
+
const llmCliCloudHint = document.getElementById("llmCliCloudHint");
|
|
2523
2530
|
const llmApiKeyBlock = document.getElementById("llmApiKeyBlock");
|
|
2524
2531
|
const llmOauthBlock = document.getElementById("llmOauthBlock");
|
|
2525
2532
|
const telegramTokenEl = document.getElementById("telegramToken");
|
|
@@ -3295,7 +3302,13 @@ function wizardHtml(defaults) {
|
|
|
3295
3302
|
await copyWithFeedback(copyRestartBtn, restartCommandEl.textContent || "");
|
|
3296
3303
|
});
|
|
3297
3304
|
finishWizardBtn.addEventListener("click", finishWizardServer);
|
|
3298
|
-
llmProviderEl.addEventListener("change", () =>
|
|
3305
|
+
llmProviderEl.addEventListener("change", () => {
|
|
3306
|
+
refreshModelOptions("");
|
|
3307
|
+
if (llmCliCloudHint) {
|
|
3308
|
+
if (llmProviderEl.value === "cli-cloud") llmCliCloudHint.classList.remove("hidden");
|
|
3309
|
+
else llmCliCloudHint.classList.add("hidden");
|
|
3310
|
+
}
|
|
3311
|
+
});
|
|
3299
3312
|
llmModelManualEl.addEventListener("change", () => {
|
|
3300
3313
|
llmModelEl.disabled = !llmModelManualEl.checked;
|
|
3301
3314
|
updateStartButtonState();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "traderclaw-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.105",
|
|
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.105"
|
|
21
21
|
},
|
|
22
22
|
"keywords": [
|
|
23
23
|
"traderclaw",
|