solana-traderclaw 1.0.21 → 1.0.23

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/README.md CHANGED
@@ -554,6 +554,9 @@ I'll monitor this position and review after exit.
554
554
  - Run `traderclaw setup` to create or select a wallet
555
555
  - Verify the wallet ID: `traderclaw config show`
556
556
 
557
+ **Wizard (`traderclaw install --wizard`) fails on `install_plugin_package` with `ENOENT` / `/root/solana-traderclaw/package.json` / `file:solana-traderclaw`:**
558
+ - npm is picking up a **local folder** named `solana-traderclaw` in your shell cwd (often `/root`) instead of the registry. Remove or rename an empty/broken `~/solana-traderclaw` directory, then run `npm install -g solana-traderclaw@latest` and start the wizard again. Current installers use `solana-traderclaw@latest` for the registry fallback to avoid this ambiguity.
559
+
557
560
  **Heartbeat not sending messages to Telegram:**
558
561
  - **Fresh `traderclaw setup`:** the installer runs `configureGatewayScheduling`, which sets a custom `heartbeat.prompt` on the `main` agent (no `HEARTBEAT_OK` escape). You only need the manual `openclaw config set` command below if you are on an older install or overwrote `agents.list`.
559
562
  - **`HEARTBEAT.md` must live in the agent workspace root** (default `~/.openclaw/workspace/HEARTBEAT.md`, next to `AGENTS.md`). A copy under `workspace/.openclaw/` or only inside the plugin package is **not** loaded as the heartbeat checklist. Copy from `skills/solana-trader/HEARTBEAT.md` in the installed package if needed. See [OpenClaw agent workspace](https://docs.openclaw.ai/concepts/agent-workspace).
@@ -1,7 +1,7 @@
1
1
  import { execSync, spawn } from "child_process";
2
2
  import { randomBytes } from "crypto";
3
3
  import { existsSync, mkdirSync, readFileSync, renameSync, statSync, writeFileSync } from "fs";
4
- import { homedir } from "os";
4
+ import { homedir, tmpdir } from "os";
5
5
  import { dirname, join } from "path";
6
6
  import { fileURLToPath } from "url";
7
7
  import { choosePreferredProviderModel } from "./llm-model-preference.mjs";
@@ -19,7 +19,8 @@ function resolvePluginInstallSpec(modeConfig) {
19
19
  if (existsSync(manifest) && existsSync(pkgJson)) {
20
20
  return PLUGIN_PACKAGE_ROOT;
21
21
  }
22
- return modeConfig.pluginPackage;
22
+ // Use an explicit registry range so npm does not treat a same-named folder in cwd (e.g. /root/solana-traderclaw) as the install source.
23
+ return `${modeConfig.pluginPackage}@latest`;
23
24
  }
24
25
 
25
26
  /** Older `plugins.entries` keys / npm-era ids to merge orchestrator URL for. */
@@ -232,15 +233,28 @@ function isNpmGlobalBinConflict(err, cliName) {
232
233
 
233
234
  async function installPlugin(modeConfig, onEvent) {
234
235
  const spec = resolvePluginInstallSpec(modeConfig);
235
- if (spec !== modeConfig.pluginPackage && typeof onEvent === "function") {
236
+ const isLocalPluginRoot =
237
+ typeof spec === "string" &&
238
+ existsSync(join(spec, "openclaw.plugin.json")) &&
239
+ existsSync(join(spec, "package.json"));
240
+ if (isLocalPluginRoot && typeof onEvent === "function") {
236
241
  onEvent({
237
242
  type: "stdout",
238
243
  text: `Installing TraderClaw CLI from local package path (not on npm registry): ${spec}\n`,
239
244
  urls: [],
240
245
  });
241
246
  }
247
+ // npm resolves bare package names against process cwd; a folder named solana-traderclaw under /root becomes file:solana-traderclaw and breaks global install.
248
+ const npmCwd = tmpdir();
249
+ if (typeof onEvent === "function") {
250
+ onEvent({
251
+ type: "stdout",
252
+ text: `Running npm global install with cwd=${npmCwd} (avoids shadowing by ./solana-traderclaw in the wizard shell).\n`,
253
+ urls: [],
254
+ });
255
+ }
242
256
  try {
243
- await runCommandWithEvents("npm", ["install", "-g", spec], { onEvent });
257
+ await runCommandWithEvents("npm", ["install", "-g", spec], { onEvent, cwd: npmCwd });
244
258
  return { installed: true, available: commandExists(modeConfig.cliName), forced: false };
245
259
  } catch (err) {
246
260
  if (!isNpmGlobalBinConflict(err, modeConfig.cliName)) throw err;
@@ -251,7 +265,7 @@ async function installPlugin(modeConfig, onEvent) {
251
265
  urls: [],
252
266
  });
253
267
  }
254
- await runCommandWithEvents("npm", ["install", "-g", "--force", spec], { onEvent });
268
+ await runCommandWithEvents("npm", ["install", "-g", "--force", spec], { onEvent, cwd: npmCwd });
255
269
  return { installed: true, available: commandExists(modeConfig.cliName), forced: true };
256
270
  }
257
271
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solana-traderclaw",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "TraderClaw V1 — autonomous Solana memecoin trading for OpenClaw (team edition: X/Twitter journal and engagement tools)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",