@darksol/terminal 0.10.0 → 0.12.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.
package/README.md CHANGED
@@ -15,7 +15,7 @@ A unified CLI for market intel, trading, AI-powered analysis, on-chain oracle, c
15
15
  [![License: GPL-3.0](https://img.shields.io/badge/License-GPL--3.0-gold.svg)](https://www.gnu.org/licenses/gpl-3.0)
16
16
  [![Node](https://img.shields.io/badge/node-%3E%3D18.0.0-green.svg)](https://nodejs.org/)
17
17
 
18
- - Current release: **0.9.2**
18
+ - Current release: **0.12.0**
19
19
  - Changelog: `CHANGELOG.md`
20
20
 
21
21
  ## Install
@@ -81,6 +81,27 @@ darksol serve
81
81
 
82
82
  # Start agent signer for OpenClaw
83
83
  darksol agent start main
84
+
85
+ # Telegram bot — AI chat through Telegram
86
+ darksol telegram setup
87
+ darksol telegram start
88
+ darksol telegram status
89
+ darksol telegram send 123456789 "Hello from DARKSOL"
90
+
91
+ # Background daemon — manage persistent services
92
+ darksol daemon start
93
+ darksol daemon status
94
+ darksol daemon stop
95
+
96
+ # Browser automation (requires: npm i playwright-core)
97
+ darksol browser launch --headed
98
+ darksol browser navigate https://app.uniswap.org
99
+ darksol browser screenshot swap-page.png
100
+ darksol browser click "#swap-button"
101
+ darksol browser type "#amount-input" "1.0"
102
+ darksol browser eval "document.title"
103
+ darksol browser close
104
+ darksol browser install
84
105
  ```
85
106
 
86
107
  ## `darksol serve` (Web Terminal UX)
@@ -129,6 +150,9 @@ ai <prompt> # chat with trading assistant
129
150
  | `dca` | Dollar-cost averaging engine | Gas only |
130
151
  | `soul` | Agent identity & personality configuration | Free |
131
152
  | `memory` | Persistent cross-session memory store | Free |
153
+ | `whale` | Whale Radar — track wallets, copy-trade, live feed | Free |
154
+ | `dash` | Live TUI dashboard — portfolio, prices, gas, whale feed | Free |
155
+ | `auto` | Autonomous Trader — goal-based automated execution | Provider dependent |
132
156
  | `agent task` | Autonomous ReAct agent loop with tool use | Provider dependent |
133
157
  | `ai` | LLM-powered trading assistant & intent execution | Provider dependent |
134
158
  | `agent` | Secure agent signer (PK-isolated proxy) | Free |
@@ -147,11 +171,192 @@ ai <prompt> # chat with trading assistant
147
171
  | `cards` | Crypto → prepaid Visa/MC cards | Service fees |
148
172
  | `builders` | ERC-8021 builder directory + leaderboard | Free |
149
173
  | `facilitator` | x402 payment verification & settlement | Free |
174
+ | `telegram` | Telegram bot — AI chat via Telegram Bot API | Provider dependent |
175
+ | `daemon` | Background service daemon (manages TG, browser, etc.) | Free |
176
+ | `browser` | Playwright-powered browser automation | Free |
150
177
  | `serve` | Local interactive web terminal (xterm.js) | Free |
151
178
  | `config` | Terminal configuration | Free |
152
179
 
153
180
  ---
154
181
 
182
+ ## 🐋 Whale Radar
183
+
184
+ Track any wallet across 5 chains. Get alerts on swaps, transfers, new tokens. Enable copy-trading to mirror a whale's moves automatically.
185
+
186
+ ```bash
187
+ # Track a wallet
188
+ darksol whale track 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --label "vitalik" --chain ethereum
189
+
190
+ # List all tracked wallets
191
+ darksol whale list
192
+
193
+ # View recent activity
194
+ darksol whale activity 0xd8dA... --limit 20
195
+
196
+ # Enable copy-trading (mirrors swaps with your own limits)
197
+ darksol whale mirror 0xd8dA... --max 50 --slippage 2 --dry-run
198
+
199
+ # Open the live feed (blessed TUI)
200
+ darksol whale feed
201
+
202
+ # Stop tracking
203
+ darksol whale stop 0xd8dA...
204
+ ```
205
+
206
+ - **5-chain support:** Base, Ethereum, Arbitrum, Polygon, Optimism
207
+ - **Swap decoding:** Uniswap V2 + V3 router signatures automatically parsed
208
+ - **Copy-trading:** Mirror whale swaps with budget caps, slippage limits, dry-run mode
209
+ - **Live feed:** Real-time blessed terminal UI with whale events streaming
210
+ - **Daemon integration:** Runs as a background service, feeds alerts to Telegram bot
211
+ - **Event system:** Subscribe to `whale:swap`, `whale:transfer`, `whale:newtoken`, `whale:mirror-executed`
212
+
213
+ ---
214
+
215
+ ## 📊 Live Dashboard
216
+
217
+ Full-screen terminal dashboard. Portfolio, prices, gas, transactions, whale alerts — all updating in real-time.
218
+
219
+ ```bash
220
+ # Launch the dashboard
221
+ darksol dash
222
+
223
+ # Custom refresh interval
224
+ darksol dash --refresh 15
225
+
226
+ # Compact mode (portfolio + prices only)
227
+ darksol dash --compact
228
+ ```
229
+
230
+ - **Portfolio summary** — total value, token balances, chain breakdown
231
+ - **Price ticker** — sparkline micro-charts for tracked tokens
232
+ - **Gas gauge** — current gas prices across all 5 chains
233
+ - **Recent transactions** — last 10 txs from wallet history
234
+ - **Whale feed** — live alerts when whale monitor is running
235
+ - **Keyboard shortcuts:** `q` quit, `r` refresh, `tab` cycle focus, `w` toggle whales, `1-5` switch chains
236
+ - **DARKSOL gold/dark theme** throughout
237
+
238
+ ---
239
+
240
+ ## 🤖 Autonomous Trader
241
+
242
+ Set a goal in plain English. The AI builds a strategy, monitors the market, and executes trades within your budget and risk limits. Full audit trail on every decision.
243
+
244
+ ```bash
245
+ # Start an autonomous strategy
246
+ darksol auto start "accumulate ETH under 2400" --budget 500 --max-per-trade 50 --risk moderate
247
+
248
+ # DCA into memecoins
249
+ darksol auto start "DCA into BASE memecoins with >1M liquidity" --budget 200 --interval 15 --dry-run
250
+
251
+ # Check status
252
+ darksol auto status
253
+ darksol auto status auto_1741...
254
+
255
+ # View audit trail
256
+ darksol auto log auto_1741... --limit 20
257
+
258
+ # Stop a strategy
259
+ darksol auto stop auto_1741...
260
+
261
+ # List all strategies
262
+ darksol auto list
263
+ ```
264
+
265
+ - **Natural language goals** — parsed by LLM intent system into executable strategies
266
+ - **Three risk levels:** conservative (5% stop-loss), moderate (10%), aggressive (20%)
267
+ - **Kill switches:** budget exhaustion, max loss, error threshold — auto-stops immediately
268
+ - **Dry-run mode** — test strategies without executing real trades
269
+ - **Full audit log** — every decision, trade, and skip logged to `~/.darksol/autonomous/<id>/audit.json`
270
+ - **Event system:** `auto:started`, `auto:trade`, `auto:skipped`, `auto:stopped`, `auto:budget-hit`, `auto:error`
271
+
272
+ ---
273
+
274
+ ## 📱 Telegram Bot
275
+
276
+ Turn your terminal into a Telegram AI agent. Same brain (LLM + soul + memory), different mouth.
277
+
278
+ ```bash
279
+ # Guided setup — walks you through BotFather
280
+ darksol telegram setup
281
+
282
+ # Start the bot (foreground, or managed by daemon)
283
+ darksol telegram start
284
+
285
+ # Check bot status
286
+ darksol telegram status
287
+
288
+ # Send a direct message
289
+ darksol telegram send <chat_id> "Hello from DARKSOL"
290
+ ```
291
+
292
+ **Setup walkthrough:**
293
+ 1. Open Telegram → search `@BotFather` → send `/newbot`
294
+ 2. Follow BotFather's prompts to name your bot
295
+ 3. Copy the bot token
296
+ 4. Run `darksol telegram setup` → paste token → auto-validates via `getMe`
297
+ 5. Token encrypted and stored in your key vault
298
+ 6. `darksol telegram start` → bot goes live
299
+
300
+ **Features:**
301
+ - Per-chat session memory (remembers conversation context)
302
+ - Soul system prompt (your agent's personality carries over)
303
+ - Built-in commands: `/start`, `/help`, `/status`
304
+ - Typing indicators while LLM processes
305
+ - Rate limiting (1 req/sec per chat)
306
+ - 429 auto-retry for Telegram API limits
307
+ - Daemon-aware: runs foreground solo, or as a managed service
308
+
309
+ ---
310
+
311
+ ## 🖥️ Background Daemon
312
+
313
+ One process to rule them all. Manages persistent services (Telegram bot, browser, future channels).
314
+
315
+ ```bash
316
+ darksol daemon start # Detached background process
317
+ darksol daemon status # PID, uptime, active services
318
+ darksol daemon stop # Graceful shutdown
319
+ darksol daemon restart # Stop + start
320
+ darksol daemon start --port 9999 # Custom health port
321
+ ```
322
+
323
+ **Health endpoint:** `http://localhost:18792/health` — returns uptime, version, active services list.
324
+
325
+ **Service registry:** Services (Telegram, browser, etc.) register with the daemon for managed lifecycle. Start once, everything runs.
326
+
327
+ ---
328
+
329
+ ## 🌐 Browser Automation
330
+
331
+ Playwright-powered browser control — automate dApps, scrape data, take screenshots.
332
+
333
+ ```bash
334
+ # Install browser binary (one-time)
335
+ darksol browser install
336
+
337
+ # Launch and control
338
+ darksol browser launch --headed --type chromium
339
+ darksol browser navigate https://app.uniswap.org
340
+ darksol browser screenshot swap-page.png
341
+ darksol browser click "#connect-wallet"
342
+ darksol browser type "#search" "AERO"
343
+ darksol browser eval "document.title"
344
+ darksol browser status
345
+ darksol browser close
346
+ ```
347
+
348
+ **Requires:** `npm install playwright-core` (optional dependency — only needed if you use browser features).
349
+
350
+ **Features:**
351
+ - Chromium, Firefox, or WebKit
352
+ - Headless (default) or headed mode
353
+ - Named profiles with persistent cookies/sessions (`~/.darksol/browser/profiles/`)
354
+ - IPC via named pipes — CLI commands talk to a running browser instance
355
+ - Web shell integration (`browser` command in `darksol serve`)
356
+ - Daemon-managed when running
357
+
358
+ ---
359
+
155
360
  ## 🔐 Secure Agent Signer
156
361
 
157
362
  **The killer feature.** A PK-isolated signing proxy for AI agents (OpenClaw, etc.).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@darksol/terminal",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "description": "DARKSOL Terminal — unified CLI for all DARKSOL services. Market intel, trading, oracle, casino, and more.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -46,6 +46,9 @@
46
46
  "update-notifier": "^7.3.1",
47
47
  "ws": "^8.19.0"
48
48
  },
49
+ "optionalDependencies": {
50
+ "playwright-core": "^1.52.0"
51
+ },
49
52
  "engines": {
50
53
  "node": ">=18.0.0"
51
54
  }