traderclaw-cli 1.0.112 → 1.0.113
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 +14 -4
- package/package.json +2 -2
package/bin/openclaw-trader.mjs
CHANGED
|
@@ -67,6 +67,7 @@ const VERSION = CLI_VERSION || PLUGIN_VERSION;
|
|
|
67
67
|
const PLUGIN_ID = "solana-trader";
|
|
68
68
|
const LEGACY_PLUGIN_IDS = ["traderclaw-v1", "solana-traderclaw-v1", "solana-traderclaw"];
|
|
69
69
|
const KAYBA_TRACING_PLUGIN_ID = "kayba-tracing";
|
|
70
|
+
const OPENAI_PLUGIN_ALLOW_ID = "openai";
|
|
70
71
|
const KAYBA_TRACING_NPM_PACKAGE = "@kayba_ai/openclaw-tracing";
|
|
71
72
|
const KAYBA_TRACING_FOLDER_DEFAULT = "traderclaw-agent";
|
|
72
73
|
const CONFIG_DIR = join(homedir(), ".openclaw");
|
|
@@ -463,6 +464,16 @@ function getPluginConfig(config) {
|
|
|
463
464
|
return plugin.config || null;
|
|
464
465
|
}
|
|
465
466
|
|
|
467
|
+
function ensurePluginAllowId(config, pluginId) {
|
|
468
|
+
if (typeof pluginId !== "string" || !pluginId.trim()) return;
|
|
469
|
+
normalizePluginConfigShape(config);
|
|
470
|
+
if (!config.plugins) config.plugins = {};
|
|
471
|
+
if (!Array.isArray(config.plugins.allow)) config.plugins.allow = [];
|
|
472
|
+
if (!config.plugins.allow.includes(pluginId)) {
|
|
473
|
+
config.plugins.allow.push(pluginId);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
466
477
|
function setPluginConfig(config, pluginConfig) {
|
|
467
478
|
normalizePluginConfigShape(config);
|
|
468
479
|
if (!config.plugins) config.plugins = {};
|
|
@@ -471,16 +482,15 @@ function setPluginConfig(config, pluginConfig) {
|
|
|
471
482
|
enabled: true,
|
|
472
483
|
config: pluginConfig,
|
|
473
484
|
};
|
|
485
|
+
ensurePluginAllowId(config, OPENAI_PLUGIN_ALLOW_ID);
|
|
474
486
|
}
|
|
475
487
|
|
|
476
488
|
function setKaybaTracingPluginConfig(config, kaybaApiKey, folder) {
|
|
477
489
|
normalizePluginConfigShape(config);
|
|
478
490
|
if (!config.plugins) config.plugins = {};
|
|
479
491
|
if (!config.plugins.entries) config.plugins.entries = {};
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
config.plugins.allow.push(KAYBA_TRACING_PLUGIN_ID);
|
|
483
|
-
}
|
|
492
|
+
ensurePluginAllowId(config, KAYBA_TRACING_PLUGIN_ID);
|
|
493
|
+
ensurePluginAllowId(config, OPENAI_PLUGIN_ALLOW_ID);
|
|
484
494
|
const prev = config.plugins.entries[KAYBA_TRACING_PLUGIN_ID];
|
|
485
495
|
const prevConfig = prev && typeof prev.config === "object" && prev.config !== null ? prev.config : {};
|
|
486
496
|
config.plugins.entries[KAYBA_TRACING_PLUGIN_ID] = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "traderclaw-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.113",
|
|
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.113"
|
|
21
21
|
},
|
|
22
22
|
"keywords": [
|
|
23
23
|
"traderclaw",
|