solana-traderclaw 1.0.128 → 1.0.129
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 +18 -4
- package/dist/index.js +2 -1
- package/package.json +1 -1
- package/skills/solana-trader/SKILL.md +1 -0
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ Plugin (this package)
|
|
|
24
24
|
│ (market data) (on-chain execution)
|
|
25
25
|
│
|
|
26
26
|
├── Local persistence (state, decisions, bulletin, patterns)
|
|
27
|
-
│ └──
|
|
27
|
+
│ └── ~/.traderclaw-v1-data/ (or explicit plugins.entries.solana-trader.config.dataDir)
|
|
28
28
|
│
|
|
29
29
|
└── OpenClaw native memory (auto-loaded every session)
|
|
30
30
|
├── MEMORY.md (durable facts — always in context)
|
|
@@ -191,7 +191,7 @@ If you prefer to configure manually instead of using the CLI, add to `~/.opencla
|
|
|
191
191
|
walletId: 1,
|
|
192
192
|
apiKey: "sk_live_your_key_here",
|
|
193
193
|
apiTimeout: 30000, // optional, default 30s
|
|
194
|
-
dataDir: "/path/to/data" // optional, default:
|
|
194
|
+
dataDir: "/path/to/data" // optional, default: ~/.traderclaw-v1-data; VPS: set explicit absolute path
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
}
|
|
@@ -243,8 +243,10 @@ Entitlement fallback chain: live API fetch → cached file → durable state →
|
|
|
243
243
|
|
|
244
244
|
### Local Data Directory
|
|
245
245
|
|
|
246
|
+
Default location is **`~/.traderclaw-v1-data`** when `dataDir` is not set in `openclaw.json` (older releases used `<cwd>/.traderclaw-v1-data`). For production/VPS hosts, set **`plugins.entries.solana-trader.config.dataDir`** to an absolute path so the CLI and OpenClaw gateway always share the same session sidecar.
|
|
247
|
+
|
|
246
248
|
```
|
|
247
|
-
|
|
249
|
+
~/.traderclaw-v1-data/ (or your explicit dataDir)
|
|
248
250
|
├── state/ # Durable agent state, snapshot, entitlement cache, patterns
|
|
249
251
|
├── logs/
|
|
250
252
|
│ ├── <agentId>/ # Per-agent decision logs (JSONL)
|
|
@@ -580,8 +582,20 @@ I'll monitor this position and review after exit.
|
|
|
580
582
|
- Check if kill switch is enabled
|
|
581
583
|
- Verify your wallet has sufficient SOL balance
|
|
582
584
|
|
|
585
|
+
**Session / wallet-proof loop (CLI login succeeds but OpenClaw gateway tools keep failing):**
|
|
586
|
+
|
|
587
|
+
This usually means a stale `session-tokens.json` sidecar is overriding the refresh token in `openclaw.json`, and/or the CLI and gateway resolved a different `dataDir` when one process used a different working directory.
|
|
588
|
+
|
|
589
|
+
1. Stop the gateway (`systemctl --user stop openclaw-gateway.service` or equivalent).
|
|
590
|
+
2. Back up then remove `session-tokens.json` under your session data directory (see `dataDir` in `openclaw.json`; default is `~/.traderclaw-v1-data` for new installs — older installs may still use a legacy `<cwd>/.traderclaw-v1-data` folder).
|
|
591
|
+
3. In `~/.openclaw/openclaw.json`, set **`plugins.entries.solana-trader.config.dataDir`** to a **single absolute path** (for example `/root/.traderclaw-v1-data` when running as `root`) so the CLI and gateway always agree.
|
|
592
|
+
4. Run `traderclaw login` (use `--wallet-private-key` or env if the server requires wallet proof).
|
|
593
|
+
5. Start the gateway again, then run `traderclaw test-session` and a quick tool smoke test.
|
|
594
|
+
|
|
595
|
+
New `traderclaw setup` runs persist explicit `dataDir`, and `traderclaw login` writes the session sidecar so it matches `openclaw.json` after login.
|
|
596
|
+
|
|
583
597
|
**Memory/state not persisting:**
|
|
584
598
|
- Check that the `dataDir` config points to a writable location
|
|
585
|
-
- Default is `<cwd>/.traderclaw-v1-data` — verify permissions
|
|
599
|
+
- Default is `~/.traderclaw-v1-data` (older releases used `<cwd>/.traderclaw-v1-data`) — verify permissions
|
|
586
600
|
- Check `MEMORY.md` exists at project root after first `solana_state_save` call
|
|
587
601
|
- Check `memory/` directory for daily log files
|
package/dist/index.js
CHANGED
|
@@ -47,6 +47,7 @@ import { Type } from "@sinclair/typebox";
|
|
|
47
47
|
import kayba, { SpanType } from "@kayba_ai/tracing";
|
|
48
48
|
import * as fs from "fs";
|
|
49
49
|
import * as path from "path";
|
|
50
|
+
import { homedir } from "os";
|
|
50
51
|
|
|
51
52
|
// lib/x-client.mjs
|
|
52
53
|
import { createHmac, randomBytes } from "crypto";
|
|
@@ -941,7 +942,7 @@ var solanaTraderPlugin = {
|
|
|
941
942
|
api.logger.warn(`[solana-trader] Kayba tracing init failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
942
943
|
}
|
|
943
944
|
}
|
|
944
|
-
const dataDir = config.dataDir || path.join(
|
|
945
|
+
const dataDir = config.dataDir || path.join(homedir(), ".traderclaw-v1-data");
|
|
945
946
|
const sessionTokensPath = path.join(dataDir, "session-tokens.json");
|
|
946
947
|
const readSessionSidecar = () => {
|
|
947
948
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solana-traderclaw",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.129",
|
|
4
4
|
"description": "TraderClaw V1-Upgraded — Solana trading for OpenClaw with intelligence lab, tool envelopes, prompt scrubbing, read-only X social intel, and split skill docs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -36,6 +36,7 @@ https://docs.traderclaw.ai/docs/installation#troubleshooting-session-expired-aut
|
|
|
36
36
|
- **`traderclaw login`** refreshes the session when possible and runs the challenge flow when needed; the gateway process itself cannot prompt for a signing key.
|
|
37
37
|
- **OpenClaw gateway ≠ your SSH shell.** The human must re-auth on the gateway host and restart the gateway so new tokens are loaded.
|
|
38
38
|
- **Plugin id vs npm name:** `solana-traderclaw` is the npm package name, while `solana-trader` is the OpenClaw plugin id used in `plugins.entries` and `plugins.allow`.
|
|
39
|
+
- **Stale sidecar vs login:** Session tokens also live in `session-tokens.json` under `dataDir` (defaults to `~/.traderclaw-v1-data`). If `traderclaw login` fixed the CLI but the gateway still errors, set **`plugins.entries.solana-trader.config.dataDir`** to one absolute path on the host, remove the stale `session-tokens.json`, then `traderclaw login` and **`openclaw gateway restart`**. Current CLI+plugin releases sync the sidecar on login; see repo README troubleshooting.
|
|
39
40
|
|
|
40
41
|
---
|
|
41
42
|
|