traderclaw-cli 1.0.132 → 1.0.133
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 +38 -11
- package/package.json +2 -2
|
@@ -1143,6 +1143,7 @@ function mergePluginsAllowlist(modeConfig, configPath = CONFIG_FILE) {
|
|
|
1143
1143
|
allowSet.add(modeConfig.pluginId);
|
|
1144
1144
|
config.plugins.allow = [...allowSet];
|
|
1145
1145
|
ensureAgentsDefaultsSchemaCompat(config);
|
|
1146
|
+
ensurePrimaryModelInAgentsDefaultsAllowlist(config);
|
|
1146
1147
|
mkdirSync(CONFIG_DIR, { recursive: true });
|
|
1147
1148
|
writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n", "utf-8");
|
|
1148
1149
|
}
|
|
@@ -1150,8 +1151,11 @@ function mergePluginsAllowlist(modeConfig, configPath = CONFIG_FILE) {
|
|
|
1150
1151
|
/**
|
|
1151
1152
|
* Managed cron jobs with prescriptive tool chains (VPS report 2026-03-24).
|
|
1152
1153
|
* Schedules are staggered (minutes :00 / :15 / :30 / :45) where possible to avoid pile-ups.
|
|
1154
|
+
*
|
|
1155
|
+
* No per-job payload.model — OpenClaw uses the user's default (`agents.defaults.model.primary`).
|
|
1156
|
+
*
|
|
1153
1157
|
* @param {string} agentId
|
|
1154
|
-
* @returns {Array<{ id: string, schedule: string, agentId: string, message: string, enabled
|
|
1158
|
+
* @returns {Array<{ id: string, schedule: string, agentId: string, message: string, enabled?: boolean }>}
|
|
1155
1159
|
*/
|
|
1156
1160
|
function traderCronPrescriptiveJobs(agentId) {
|
|
1157
1161
|
return [
|
|
@@ -1161,7 +1165,6 @@ function traderCronPrescriptiveJobs(agentId) {
|
|
|
1161
1165
|
agentId,
|
|
1162
1166
|
message:
|
|
1163
1167
|
"CRON_JOB: alpha_scan\n\nScan new launches, filter, score, log alpha. Tools: solana_scan_launches → filter (vol>30K, mcap>10K, liq>5K) → solana_token_snapshot for survivors → quality filter (top10 <50%, deployer <3 abandoned, has social) → score 0-100 → solana_alpha_log for 65+. Summarize results.",
|
|
1164
|
-
model: "anthropic/claude-sonnet-4-20250514",
|
|
1165
1168
|
thinking: false,
|
|
1166
1169
|
lightContext: true,
|
|
1167
1170
|
delivery: { mode: "announce", channel: "last", bestEffort: true },
|
|
@@ -1173,7 +1176,6 @@ function traderCronPrescriptiveJobs(agentId) {
|
|
|
1173
1176
|
agentId,
|
|
1174
1177
|
message:
|
|
1175
1178
|
"CRON_JOB: portfolio_health\n\nCombined dead-money + whale + risk audit. solana_capital_status + solana_positions → solana_token_snapshot per position → dead money exit (loss>40% or 90min+down+low vol) → whale flags (>5% supply moves) → risk checks (concentration/drawdown/exposure) → sell if CRITICAL → solana_memory_write tag 'portfolio_health'.",
|
|
1176
|
-
model: "anthropic/claude-sonnet-4-20250514",
|
|
1177
1179
|
thinking: false,
|
|
1178
1180
|
lightContext: true,
|
|
1179
1181
|
delivery: { mode: "announce", channel: "last", bestEffort: true },
|
|
@@ -1185,7 +1187,6 @@ function traderCronPrescriptiveJobs(agentId) {
|
|
|
1185
1187
|
agentId,
|
|
1186
1188
|
message:
|
|
1187
1189
|
"CRON_JOB: trust_refresh\n\nCombined source + deployer trust. solana_source_trust_refresh + solana_deployer_trust_refresh → solana_alpha_sources + solana_trades for win rates → solana_source_trust_get + solana_deployer_trust_get, flag <30 → solana_memory_write tag 'trust_refresh'.",
|
|
1188
|
-
model: "anthropic/claude-haiku-4-5",
|
|
1189
1190
|
thinking: false,
|
|
1190
1191
|
lightContext: true,
|
|
1191
1192
|
delivery: { mode: "none" },
|
|
@@ -1197,7 +1198,6 @@ function traderCronPrescriptiveJobs(agentId) {
|
|
|
1197
1198
|
agentId,
|
|
1198
1199
|
message:
|
|
1199
1200
|
"CRON_JOB: meta_rotation_analysis\n\nx_search_tweets trending topics → solana_scan_launches → categorize by narrative cluster → per-cluster metrics → compare vs solana_memory_search tag 'meta_rotation' → declare hot/fading clusters → solana_memory_write tag 'meta_rotation'.",
|
|
1200
|
-
model: "anthropic/claude-sonnet-4-20250514",
|
|
1201
1201
|
thinking: false,
|
|
1202
1202
|
lightContext: true,
|
|
1203
1203
|
delivery: { mode: "announce", channel: "last", bestEffort: true },
|
|
@@ -1209,7 +1209,6 @@ function traderCronPrescriptiveJobs(agentId) {
|
|
|
1209
1209
|
agentId,
|
|
1210
1210
|
message:
|
|
1211
1211
|
"CRON_JOB: strategy_evolution\n\nDaily strategy review. solana_journal_summary — if <10 closed trades since last evolution, log 'insufficient data' and stop. Otherwise: solana_trades to bucket by confidence tier → solana_strategy_state for current weights → analyze tier performance → solana_strategy_update with conservative adjustments (max 10% per weight per cycle) → solana_memory_write tag 'strategy_evolution'.",
|
|
1212
|
-
model: "anthropic/claude-sonnet-4-20250514",
|
|
1213
1212
|
thinking: true,
|
|
1214
1213
|
lightContext: false,
|
|
1215
1214
|
delivery: { mode: "announce", channel: "last", bestEffort: true },
|
|
@@ -1221,7 +1220,6 @@ function traderCronPrescriptiveJobs(agentId) {
|
|
|
1221
1220
|
agentId,
|
|
1222
1221
|
message:
|
|
1223
1222
|
"CRON_JOB: subscription_cleanup\n\nsolana_positions for open CAs → solana_bitquery_subscriptions for active subs (if AUTH_SCOPE_MISSING, log and stop) → match subs to positions → solana_bitquery_unsubscribe orphaned subs → solana_memory_write tag 'subscription_cleanup'. Summarize before/after counts.",
|
|
1224
|
-
model: "anthropic/claude-haiku-4-5",
|
|
1225
1223
|
thinking: false,
|
|
1226
1224
|
lightContext: true,
|
|
1227
1225
|
delivery: { mode: "announce", channel: "last", bestEffort: true },
|
|
@@ -1233,7 +1231,6 @@ function traderCronPrescriptiveJobs(agentId) {
|
|
|
1233
1231
|
agentId,
|
|
1234
1232
|
message:
|
|
1235
1233
|
"CRON_JOB: daily_performance_report\n\nCompile 24h report. solana_journal_summary + solana_capital_status + solana_positions + solana_trades + solana_strategy_state → sections: Portfolio Summary, Trading Activity (count/win rate/PnL), Best/Worst Trades, Strategy State, Risk Metrics, Recommendations → solana_memory_write tag 'daily_report'. Deliver full report.",
|
|
1236
|
-
model: "anthropic/claude-sonnet-4-20250514",
|
|
1237
1234
|
thinking: false,
|
|
1238
1235
|
lightContext: false,
|
|
1239
1236
|
delivery: { mode: "announce", channel: "telegram" },
|
|
@@ -1245,7 +1242,6 @@ function traderCronPrescriptiveJobs(agentId) {
|
|
|
1245
1242
|
agentId,
|
|
1246
1243
|
message:
|
|
1247
1244
|
"CRON_JOB: intelligence_lab_eval\n\nsolana_candidate_get — if <20 labeled candidates, log 'insufficient data' and exit. Otherwise: solana_evaluation_report → solana_model_registry for challengers → solana_replay_eval if challenger exists → solana_model_promote if challenger beats champion by >5% F1 → solana_memory_write tag 'intelligence_lab'.",
|
|
1248
|
-
model: "anthropic/claude-sonnet-4-20250514",
|
|
1249
1245
|
thinking: true,
|
|
1250
1246
|
lightContext: false,
|
|
1251
1247
|
delivery: { mode: "none" },
|
|
@@ -1257,7 +1253,6 @@ function traderCronPrescriptiveJobs(agentId) {
|
|
|
1257
1253
|
agentId,
|
|
1258
1254
|
message:
|
|
1259
1255
|
"CRON_JOB: memory_trim\n\nsolana_memory_trim dryRun:true first → review → solana_memory_trim retentionDays:2 → solana_memory_write tag 'memory_trim' with summary.",
|
|
1260
|
-
model: "anthropic/claude-haiku-4-5",
|
|
1261
1256
|
thinking: false,
|
|
1262
1257
|
lightContext: true,
|
|
1263
1258
|
delivery: { mode: "none" },
|
|
@@ -1269,7 +1264,6 @@ function traderCronPrescriptiveJobs(agentId) {
|
|
|
1269
1264
|
agentId,
|
|
1270
1265
|
message:
|
|
1271
1266
|
"Balance watchdog. 1) solana_capital_status 2) solana_positions 3) solana_context_snapshot_read 4) Compare real vs believed. If mismatch: solana_context_snapshot_write with corrected state, summarize changes. If match: reply WATCHDOG_OK.",
|
|
1272
|
-
model: "anthropic/claude-haiku-4-5",
|
|
1273
1267
|
thinking: false,
|
|
1274
1268
|
lightContext: true,
|
|
1275
1269
|
delivery: { mode: "announce", channel: "telegram" },
|
|
@@ -1429,6 +1423,8 @@ function configureGatewayScheduling(modeConfig, configPath = CONFIG_FILE) {
|
|
|
1429
1423
|
config.agents.defaults.heartbeat = { ...defaultHeartbeat };
|
|
1430
1424
|
|
|
1431
1425
|
ensureAgentsDefaultsSchemaCompat(config);
|
|
1426
|
+
ensurePrimaryModelInAgentsDefaultsAllowlist(config);
|
|
1427
|
+
|
|
1432
1428
|
mkdirSync(CONFIG_DIR, { recursive: true });
|
|
1433
1429
|
writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n", "utf-8");
|
|
1434
1430
|
|
|
@@ -1924,6 +1920,33 @@ function ensureAgentsDefaultsSchemaCompat(config) {
|
|
|
1924
1920
|
}
|
|
1925
1921
|
}
|
|
1926
1922
|
|
|
1923
|
+
/**
|
|
1924
|
+
* When `agents.defaults.models` exists, OpenClaw uses it as an allowlist — the user's configured primary model must appear there (same ref cron and chat use).
|
|
1925
|
+
* Does nothing when `agents.defaults.models` is absent so we do not introduce a restrictive allowlist.
|
|
1926
|
+
*/
|
|
1927
|
+
function ensurePrimaryModelInAgentsDefaultsAllowlist(config) {
|
|
1928
|
+
if (!config || typeof config !== "object") return;
|
|
1929
|
+
if (!config.agents || typeof config.agents !== "object") return;
|
|
1930
|
+
if (!config.agents.defaults || typeof config.agents.defaults !== "object") return;
|
|
1931
|
+
const rawBucket = config.agents.defaults.models;
|
|
1932
|
+
if (rawBucket === undefined) return;
|
|
1933
|
+
if (typeof rawBucket !== "object" || rawBucket === null || Array.isArray(rawBucket)) return;
|
|
1934
|
+
|
|
1935
|
+
const primary =
|
|
1936
|
+
typeof config.agents.defaults.model?.primary === "string" ? config.agents.defaults.model.primary.trim() : "";
|
|
1937
|
+
if (!primary.includes("/")) return;
|
|
1938
|
+
const pk = primary.toLowerCase();
|
|
1939
|
+
|
|
1940
|
+
const next = {};
|
|
1941
|
+
for (const [key, meta] of Object.entries(rawBucket)) {
|
|
1942
|
+
if (typeof key !== "string" || !key.includes("/")) continue;
|
|
1943
|
+
const k = key.toLowerCase();
|
|
1944
|
+
next[k] = typeof meta === "object" && meta !== null && !Array.isArray(meta) ? meta : {};
|
|
1945
|
+
}
|
|
1946
|
+
if (!next[pk]) next[pk] = {};
|
|
1947
|
+
config.agents.defaults.models = next;
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1927
1950
|
/** Re-read config from disk and re-apply defaults shape before gateway/plugin commands that validate the file. */
|
|
1928
1951
|
/**
|
|
1929
1952
|
* Proactively writes the minimum gateway fields required for OpenClaw to start.
|
|
@@ -2048,6 +2071,8 @@ function configureOpenClawLlmProvider({ provider, model, credential }, configPat
|
|
|
2048
2071
|
}
|
|
2049
2072
|
config.agents.defaults.model.primary = model;
|
|
2050
2073
|
|
|
2074
|
+
ensurePrimaryModelInAgentsDefaultsAllowlist(config);
|
|
2075
|
+
|
|
2051
2076
|
mkdirSync(CONFIG_DIR, { recursive: true });
|
|
2052
2077
|
writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n", "utf-8");
|
|
2053
2078
|
return { configPath, provider, model };
|
|
@@ -2080,6 +2105,8 @@ function configureOpenClawLlmModelPrimaryOnly({ provider, model }, configPath =
|
|
|
2080
2105
|
}
|
|
2081
2106
|
config.agents.defaults.model.primary = model;
|
|
2082
2107
|
|
|
2108
|
+
ensurePrimaryModelInAgentsDefaultsAllowlist(config);
|
|
2109
|
+
|
|
2083
2110
|
mkdirSync(CONFIG_DIR, { recursive: true });
|
|
2084
2111
|
writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n", "utf-8");
|
|
2085
2112
|
return { configPath, provider, model };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "traderclaw-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.133",
|
|
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.133"
|
|
21
21
|
},
|
|
22
22
|
"keywords": [
|
|
23
23
|
"traderclaw",
|