traderclaw-cli 1.0.92 → 1.0.93-beta.0

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.
@@ -1019,9 +1019,9 @@ function configureGatewayScheduling(modeConfig, configPath = CONFIG_FILE) {
1019
1019
  prompt: heartbeatPrompt,
1020
1020
  };
1021
1021
 
1022
- const v1Agents = [{ id: "main", default: true, heartbeat: { ...defaultHeartbeat } }];
1022
+ const v1Agents = [{ id: "main", default: true, identity: { name: "AgentZERO" }, heartbeat: { ...defaultHeartbeat } }];
1023
1023
  const v2Agents = [
1024
- { id: "cto", default: true, heartbeat: { ...defaultHeartbeat } },
1024
+ { id: "cto", default: true, identity: { name: "AgentZERO" }, heartbeat: { ...defaultHeartbeat } },
1025
1025
  { id: "execution-specialist", heartbeat: { ...defaultHeartbeat } },
1026
1026
  { id: "alpha-signal-analyst", heartbeat: { ...defaultHeartbeat } },
1027
1027
  { id: "onchain-analyst" },
@@ -1048,6 +1048,9 @@ function configureGatewayScheduling(modeConfig, configPath = CONFIG_FILE) {
1048
1048
  if (agent.default) {
1049
1049
  existing.default = true;
1050
1050
  }
1051
+ if (agent.identity && (!existing.identity || typeof existing.identity !== "object")) {
1052
+ existing.identity = agent.identity;
1053
+ }
1051
1054
  } else {
1052
1055
  config.agents.list.push(agent);
1053
1056
  }
@@ -1111,12 +1114,60 @@ function configureGatewayScheduling(modeConfig, configPath = CONFIG_FILE) {
1111
1114
  if (config.channels.defaults.heartbeat.showOk === undefined) {
1112
1115
  config.channels.defaults.heartbeat.showOk = true;
1113
1116
  }
1117
+ if (config.channels.defaults.heartbeat.showAlerts === undefined) {
1118
+ config.channels.defaults.heartbeat.showAlerts = true;
1119
+ }
1120
+
1121
+ if (!config.channels.telegram || typeof config.channels.telegram !== "object") {
1122
+ config.channels.telegram = {};
1123
+ }
1124
+ if (config.channels.telegram.streaming === undefined) {
1125
+ config.channels.telegram.streaming = "partial";
1126
+ }
1127
+
1128
+ if (!config.commands || typeof config.commands !== "object") config.commands = {};
1129
+ if (config.commands.native === undefined) config.commands.native = "auto";
1130
+ if (config.commands.restart === undefined) config.commands.restart = true;
1131
+ if (!config.commands.ownerDisplay) config.commands.ownerDisplay = "raw";
1114
1132
 
1115
1133
  if (!config.agents.defaults || typeof config.agents.defaults !== "object") {
1116
1134
  config.agents.defaults = {};
1117
1135
  }
1118
1136
  config.agents.defaults.heartbeat = { ...defaultHeartbeat };
1119
1137
 
1138
+ if (!config.agents.defaults.memorySearch || typeof config.agents.defaults.memorySearch !== "object") {
1139
+ config.agents.defaults.memorySearch = {
1140
+ provider: "openai",
1141
+ model: "text-embedding-3-small",
1142
+ query: {
1143
+ hybrid: true,
1144
+ mmr: { enabled: true, lambda: 0.5 },
1145
+ temporalDecay: { enabled: true, halfLifeDays: 14 },
1146
+ },
1147
+ };
1148
+ }
1149
+
1150
+ if (!config.agents.defaults.contextPruning || typeof config.agents.defaults.contextPruning !== "object") {
1151
+ config.agents.defaults.contextPruning = { cacheTtl: "1h" };
1152
+ }
1153
+
1154
+ if (!config.env || typeof config.env !== "object") config.env = {};
1155
+ if (process.env.OPENAI_API_KEY && !config.env.OPENAI_API_KEY) {
1156
+ // Literal env reference (not the value). The gateway expands ${OPENAI_API_KEY}
1157
+ // at runtime from its process environment. Keeps the secret out of the
1158
+ // config file on disk.
1159
+ config.env.OPENAI_API_KEY = "${OPENAI_API_KEY}";
1160
+ } else if (!process.env.OPENAI_API_KEY && !config.env.OPENAI_API_KEY && typeof console !== "undefined") {
1161
+ console.warn(
1162
+ "[traderclaw] OPENAI_API_KEY not detected in the installer shell. " +
1163
+ "Memory embeddings require it for vector search (text-embedding-3-small, ~$0.02/M tokens).\n" +
1164
+ "Set it and re-run the installer, or add the env ref manually:\n" +
1165
+ " 1) export OPENAI_API_KEY=sk-...\n" +
1166
+ " 2) edit ~/.openclaw/openclaw.json and set env.OPENAI_API_KEY to \"${OPENAI_API_KEY}\"\n" +
1167
+ " 3) openclaw gateway restart"
1168
+ );
1169
+ }
1170
+
1120
1171
  ensureAgentsDefaultsSchemaCompat(config);
1121
1172
  mkdirSync(CONFIG_DIR, { recursive: true });
1122
1173
  writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n", "utf-8");
@@ -1124,21 +1175,6 @@ function configureGatewayScheduling(modeConfig, configPath = CONFIG_FILE) {
1124
1175
  const cronStorePath = resolveCronJobsStorePath(config);
1125
1176
  const cronMerge = mergeTraderCronJobsIntoStore(cronStorePath, targetJobs);
1126
1177
 
1127
- let qmdAvailable = false;
1128
- let qmdVersion = null;
1129
- try { qmdAvailable = commandExists("qmd"); } catch {}
1130
- if (qmdAvailable) {
1131
- qmdVersion = getCommandOutput("qmd --version");
1132
- } else {
1133
- if (typeof console !== "undefined") {
1134
- console.warn(
1135
- "[traderclaw] QMD binary not found. Memory engine will fall back to SQLite (no vector search, no temporal decay, no MMR).\n" +
1136
- "Install QMD: npm install -g @tobilu/qmd\n" +
1137
- "Then restart the gateway: openclaw gateway restart"
1138
- );
1139
- }
1140
- }
1141
-
1142
1178
  return {
1143
1179
  configPath,
1144
1180
  agentsConfigured: targetAgents.length,
@@ -1150,8 +1186,6 @@ function configureGatewayScheduling(modeConfig, configPath = CONFIG_FILE) {
1150
1186
  cronJobsStoreError: cronMerge.error,
1151
1187
  removedLegacyCronJobs,
1152
1188
  hooksConfigured: config.hooks.mappings.length,
1153
- qmdAvailable,
1154
- qmdVersion,
1155
1189
  isV2,
1156
1190
  };
1157
1191
  }
@@ -1843,9 +1877,9 @@ function verifyInstallation(modeConfig, apiKey) {
1843
1877
  note: heartbeatInWorkspace ? workspaceRoot : `expected ${join(workspaceRoot, "HEARTBEAT.md")}`,
1844
1878
  },
1845
1879
  {
1846
- label: "QMD memory engine (vector search)",
1847
- ok: commandExists("qmd"),
1848
- note: "not installed memory uses keyword search only. Install: npm install -g @tobilu/qmd",
1880
+ label: "Memory engine (builtin, vector + FTS)",
1881
+ ok: true,
1882
+ note: "run `openclaw memory status --deep` to verify index",
1849
1883
  },
1850
1884
  ];
1851
1885
  }
@@ -2339,32 +2373,6 @@ export class InstallerStepEngine {
2339
2373
  await this.runStep("openclaw_global_deps", "Ensuring OpenClaw global package dependencies", async () =>
2340
2374
  ensureOpenClawGlobalPackageDependencies(),
2341
2375
  );
2342
- await this.runStep("install_qmd", "Installing QMD memory engine (vector search)", async () => {
2343
- if (commandExists("qmd")) {
2344
- const ver = getCommandOutput("qmd --version");
2345
- this.emitLog("install_qmd", "info", `QMD already installed: ${ver}`);
2346
- return { alreadyInstalled: true, version: ver };
2347
- }
2348
- this.emitLog("install_qmd", "info", "Installing @tobilu/qmd globally for vector search memory...");
2349
- try {
2350
- await runCommandWithEvents("npm", ["install", "-g", "--ignore-scripts", "--registry", "https://registry.npmjs.org/", "@tobilu/qmd"], {
2351
- onEvent: (evt) => this.emitLog("install_qmd", evt.type === "stderr" ? "warn" : "info", evt.text, evt.urls || []),
2352
- });
2353
- } catch (err) {
2354
- this.emitLog(
2355
- "install_qmd",
2356
- "warn",
2357
- `QMD install failed (non-fatal): ${err?.message || err}. Memory will use keyword search only. You can install manually later: npm install -g @tobilu/qmd`,
2358
- );
2359
- return { installed: false, error: err?.message || String(err) };
2360
- }
2361
- const available = commandExists("qmd");
2362
- const ver = available ? getCommandOutput("qmd --version") : null;
2363
- if (!available) {
2364
- this.emitLog("install_qmd", "warn", "QMD installed but not on PATH. Memory will use keyword search only.");
2365
- }
2366
- return { installed: available, version: ver };
2367
- });
2368
2376
  await this.runStep(
2369
2377
  "activate_openclaw_plugin",
2370
2378
  "Installing and enabling TraderClaw inside OpenClaw",
@@ -2472,17 +2480,6 @@ export class InstallerStepEngine {
2472
2480
  this.emitLog("gateway_scheduling", "warn", "Removed legacy 'cron.jobs' from openclaw.json to keep config validation compatible.");
2473
2481
  }
2474
2482
  this.emitLog("gateway_scheduling", "info", `Webhook hooks: ${result.hooksConfigured}`);
2475
- if (!result.qmdAvailable) {
2476
- this.emitLog(
2477
- "gateway_scheduling",
2478
- "warn",
2479
- "QMD binary not found — memory will use SQLite keyword search only (no vector search, no temporal decay, no MMR). " +
2480
- "Vector search makes the agent's memory significantly more effective. " +
2481
- "Install: npm install -g @tobilu/qmd — then restart the gateway: openclaw gateway restart",
2482
- );
2483
- } else {
2484
- this.emitLog("gateway_scheduling", "info", `QMD memory engine: ${result.qmdVersion || "installed"}`);
2485
- }
2486
2483
  const restart = await restartGateway();
2487
2484
  return { ...result, restart };
2488
2485
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "traderclaw-cli",
3
- "version": "1.0.92",
3
+ "version": "1.0.93-beta.0",
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.92"
20
+ "solana-traderclaw": "^1.0.93-beta.0"
21
21
  },
22
22
  "keywords": [
23
23
  "traderclaw",