solana-traderclaw 1.0.133 → 1.0.134
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/config/gateway-v1-upgraded.json5 +12 -10
- package/config/gateway-v1.json5 +7 -7
- package/package.json +1 -1
- package/skills/solana-trader/HEARTBEAT.md +1 -1
- package/skills/solana-trader/refs/alpha-signals.md +2 -0
- package/skills/solana-trader/refs/cron-jobs.md +21 -3
- package/skills/solana-trader/workspace/TOOLS.md +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// OpenClaw Gateway Configuration — TraderClaw V1-Upgraded (Single Agent)
|
|
2
|
-
// Single "main" agent with 5-minute heartbeat +
|
|
3
|
-
//
|
|
2
|
+
// Single "main" agent with 5-minute heartbeat + 11 preset TraderClaw cron jobs.
|
|
3
|
+
// alpha-stream-resubscribe (every 20m WS keepalive); portfolio-health (dead-money+whale+risk-audit);
|
|
4
4
|
// trust-refresh (source-reputation+deployer-trust). Shortened prompts.
|
|
5
5
|
{
|
|
6
6
|
agents: {
|
|
@@ -22,23 +22,25 @@
|
|
|
22
22
|
keepLines: 2000
|
|
23
23
|
},
|
|
24
24
|
jobs: [
|
|
25
|
-
// ──
|
|
25
|
+
// ── Alpha stream keepalive ────────────────────────────────────────
|
|
26
26
|
{
|
|
27
|
-
id: "
|
|
28
|
-
schedule: "
|
|
27
|
+
id: "alpha-stream-resubscribe",
|
|
28
|
+
schedule: "*/20 * * * *",
|
|
29
29
|
agentId: "main",
|
|
30
30
|
sessionTarget: "isolated",
|
|
31
31
|
delivery: { mode: "none" },
|
|
32
|
-
message: "CRON_JOB:
|
|
32
|
+
message: "CRON_JOB: alpha_stream_resubscribe\n\nKeep alpha WebSocket subscription healthy. solana_runtime_status — if subscribed is false: solana_alpha_subscribe. If subscribed but ingestionStale: solana_alpha_subscribe force:true (zombie heal). Else: reply ALPHA_KEEPALIVE_OK.",
|
|
33
33
|
enabled: true
|
|
34
34
|
},
|
|
35
|
+
|
|
36
|
+
// ── Strategy & Learning ───────────────────────────────────────
|
|
35
37
|
{
|
|
36
|
-
id: "
|
|
37
|
-
schedule: "0 */
|
|
38
|
+
id: "strategy-evolution",
|
|
39
|
+
schedule: "0 */4 * * *",
|
|
38
40
|
agentId: "main",
|
|
39
41
|
sessionTarget: "isolated",
|
|
40
|
-
delivery: { mode: "
|
|
41
|
-
message: "CRON_JOB:
|
|
42
|
+
delivery: { mode: "none" },
|
|
43
|
+
message: "CRON_JOB: strategy_evolution\n\nStep 1: Call solana_journal_summary to get aggregate performance stats (win rate, avg PnL, trade count). If fewer than 10 closed trades since the last strategy evolution, skip weight updates but still run pattern detection.\n\nStep 2: Call solana_memory_search for 'strategy_evolution' — find last 3 evolution cycle results. Call solana_memory_search for 'strategy_drift_warning' — find drift warnings since last evolution. Call solana_memory_search for 'pre_trade_rationale' — recent decision patterns.\n\nStep 3: Run Recurring Pattern Detection — search for learning_entry tags, group by area, check linked chains (3+ = confirmed pattern), investigate drift warnings.\n\nStep 4: Call solana_strategy_state to read current feature weights.\n\nStep 5: Call solana_trades to get recent closed trades. Apply ADL checks (direction consistency, weight velocity, reversion check).\n\nStep 6: Compute proposed weight changes. Score each with VFM (Frequency + Failure Reduction + Self-Cost). Only apply changes scoring >= 3/5.\n\nStep 7: Verify guardrails: maxDeltaOk, sumWeightsOk, minTradesOk, floorCapOk. If all pass, call solana_strategy_update with incremented version.\n\nStep 8: Run Named Pattern Recognition — search for winning trade clusters, catalog new patterns, evolve existing ones.\n\nStep 9: Evaluate discovery filter performance. Log all results via solana_memory_write with tags: strategy_evolution, vfm_scorecard, pattern_detection, named_pattern.\n\nFORMATTING RULES:\n- Every token reference MUST use SYMBOL (full_CA) format.\n- Do not execute trades. Do not ask questions.",
|
|
42
44
|
enabled: true
|
|
43
45
|
},
|
|
44
46
|
|
package/config/gateway-v1.json5
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// OpenClaw Gateway Configuration — TraderClaw V1 (Single Agent)
|
|
2
|
-
// Single "main" agent with 5-minute heartbeat +
|
|
3
|
-
//
|
|
2
|
+
// Single "main" agent with 5-minute heartbeat + 11 preset TraderClaw cron jobs.
|
|
3
|
+
// alpha-stream-resubscribe (every 20m WS keepalive); portfolio-health (dead-money+whale+risk-audit);
|
|
4
4
|
// trust-refresh (source-reputation+deployer-trust). Shortened prompts.
|
|
5
5
|
{
|
|
6
6
|
agents: {
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
keepLines: 2000
|
|
23
23
|
},
|
|
24
24
|
jobs: [
|
|
25
|
-
// ── Alpha
|
|
25
|
+
// ── Alpha stream keepalive ────────────────────────────────────────
|
|
26
26
|
{
|
|
27
|
-
id: "alpha-
|
|
28
|
-
schedule: "
|
|
27
|
+
id: "alpha-stream-resubscribe",
|
|
28
|
+
schedule: "*/20 * * * *",
|
|
29
29
|
agentId: "main",
|
|
30
30
|
sessionTarget: "isolated",
|
|
31
|
-
delivery: { mode: "
|
|
32
|
-
message: "CRON_JOB:
|
|
31
|
+
delivery: { mode: "none" },
|
|
32
|
+
message: "CRON_JOB: alpha_stream_resubscribe\n\nKeep alpha WebSocket subscription healthy. solana_runtime_status — if subscribed is false: solana_alpha_subscribe. If subscribed but ingestionStale: solana_alpha_subscribe force:true (zombie heal). Else: reply ALPHA_KEEPALIVE_OK.",
|
|
33
33
|
enabled: true
|
|
34
34
|
},
|
|
35
35
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solana-traderclaw",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.134",
|
|
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",
|
|
@@ -316,7 +316,7 @@ Do NOT skip these. They feed the bootstrap digest that loads into your next sess
|
|
|
316
316
|
HEARTBEAT REPORT — [timestamp UTC]
|
|
317
317
|
|
|
318
318
|
Capital: X.XXX SOL | Positions: N open | Holdings verified: [yes/no via solana_wallet_token_balance]
|
|
319
|
-
|
|
319
|
+
Alpha: N signals (top score: XX)
|
|
320
320
|
|
|
321
321
|
DEEP ANALYSIS:
|
|
322
322
|
Bitquery: [N templates run on N tokens | "none — no FRESH tokens"]
|
|
@@ -22,6 +22,8 @@ Subsequent heartbeats:
|
|
|
22
22
|
→ Returns only new signals since last check
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
Installer / Gateway preset **`alpha_stream_resubscribe`** (every 20 minutes) calls `solana_runtime_status` and re-invokes `solana_alpha_subscribe` when the subscription dropped or ingestion is stale. See refs/cron-jobs.md.
|
|
26
|
+
|
|
25
27
|
If buffered signals stay empty for multiple cycles:
|
|
26
28
|
```
|
|
27
29
|
solana_gateway_forward_probe({ agentId: "main", source: "heartbeat_recovery" })
|
|
@@ -19,6 +19,24 @@ At start of every cron job, check whether sufficient new data exists since last
|
|
|
19
19
|
|
|
20
20
|
---
|
|
21
21
|
|
|
22
|
+
## Job: `alpha_stream_resubscribe`
|
|
23
|
+
|
|
24
|
+
**Schedule:** Every 20 minutes (`*/20 * * * *`) — 72 runs/day
|
|
25
|
+
|
|
26
|
+
**Purpose:** Recover from dropped or zombie alpha WebSocket subscriptions (signals stop buffering). Complements plugin watchdog; explicit cron ensures reconnect even across process edge cases.
|
|
27
|
+
|
|
28
|
+
**Tools:** `solana_runtime_status`, `solana_alpha_subscribe`
|
|
29
|
+
|
|
30
|
+
**Workflow:** Call `solana_runtime_status`. If `alphaStream.subscribed` is false, call `solana_alpha_subscribe`. If subscribed but `alphaStream.ingestionStale`, call `solana_alpha_subscribe` with `force: true`. Otherwise reply `ALPHA_KEEPALIVE_OK`.
|
|
31
|
+
|
|
32
|
+
**Configuration:**
|
|
33
|
+
- Model: Haiku (branch on flags, single tool calls)
|
|
34
|
+
- Thinking: off
|
|
35
|
+
- lightContext: on
|
|
36
|
+
- Delivery: none
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
22
40
|
## Job: `alpha_scan`
|
|
23
41
|
|
|
24
42
|
**Schedule:** Every 3 hours (`0 */3 * * *`) — 8 runs/day
|
|
@@ -222,8 +240,8 @@ At start of every cron job, check whether sufficient new data exists since last
|
|
|
222
240
|
## Schedule Summary
|
|
223
241
|
|
|
224
242
|
| # | Job ID | Cron Expression | Runs/Day | Model | Thinking | lightContext | Delivery |
|
|
225
|
-
|
|
226
|
-
| 1 | `alpha-
|
|
243
|
+
|---|--------|-----------------|----------|-------|----------|-------------|----------|
|
|
244
|
+
| 1 | `alpha-stream-resubscribe` | `*/20 * * * *` | 72 | Haiku | off | on | none |
|
|
227
245
|
| 2 | `portfolio-health` | `0 */4 * * *` | 6 | Sonnet | off | on | announce/last |
|
|
228
246
|
| 3 | `trust-refresh` | `0 */8 * * *` | 3 | Haiku | off | on | none |
|
|
229
247
|
| 4 | `meta-rotation` | `30 */8 * * *` | 3 | Sonnet | off | on | announce/last |
|
|
@@ -233,4 +251,4 @@ At start of every cron job, check whether sufficient new data exists since last
|
|
|
233
251
|
| 8 | `intelligence-lab-eval` | `0 16 * * *` | 1 | Sonnet | **on** | **off** | none |
|
|
234
252
|
| 9 | `memory-trim` | `0 3 * * *` | 1 | Haiku | off | on | none |
|
|
235
253
|
| 10 | `balance-watchdog` | `0 */2 * * *` | 12 | Haiku | off | on | announce/telegram |
|
|
236
|
-
| | **Total** | | **
|
|
254
|
+
| | **Total** | | **103** | | | | |
|
|
@@ -101,7 +101,7 @@ Every tool has a mandatory trigger — when the trigger condition is met, you MU
|
|
|
101
101
|
### Alpha Signals (5)
|
|
102
102
|
| Tool | Purpose | When to Call |
|
|
103
103
|
|---|---|---|
|
|
104
|
-
| `solana_alpha_subscribe` | Subscribe to alpha stream (`force: true` forces reconnect) | Startup sequence; when stream disconnects or ingestion stalls |
|
|
104
|
+
| `solana_alpha_subscribe` | Subscribe to alpha stream (`force: true` forces reconnect) | Startup sequence; `alpha_stream_resubscribe` cron (every 20m); when stream disconnects or ingestion stalls |
|
|
105
105
|
| `solana_alpha_signals` | Poll buffered signals | Step 1.5 every heartbeat |
|
|
106
106
|
| `solana_alpha_history` | Historical signal data | Step 1.5 to check prior calls on a token; Step 7 to check source accuracy after exit |
|
|
107
107
|
| `solana_alpha_sources` | Per-source performance stats | Step 1.5 to check source win rates; `source_reputation_recalc` cron |
|
|
@@ -191,7 +191,7 @@ Every tool has a mandatory trigger — when the trigger condition is met, you MU
|
|
|
191
191
|
### Runtime (3)
|
|
192
192
|
| Tool | Purpose | When to Call |
|
|
193
193
|
|---|---|---|
|
|
194
|
-
| `solana_runtime_status` | Plugin runtime health |
|
|
194
|
+
| `solana_runtime_status` | Plugin runtime health (startup gate cache, alpha stream subscription + ingestionStale) | `alpha_stream_resubscribe` cron; diagnostics when tools behave unexpectedly |
|
|
195
195
|
| `solana_agent_sessions` | List agent sessions | Diagnostics; when checking session state |
|
|
196
196
|
| `solana_classify_deployer_risk` | Deployer risk (alias) | Same as `solana_compute_deployer_risk` — use either |
|
|
197
197
|
|