@darksol/terminal 0.7.0 → 0.7.2
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/LICENSE +17 -0
- package/README.md +4 -4
- package/package.json +2 -2
- package/skill/SKILL.md +6 -2
- package/src/config/keys.js +9 -1
- package/src/llm/engine.js +13 -0
- package/src/web/commands.js +3 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
GNU GENERAL PUBLIC LICENSE
|
|
2
|
+
Version 3, 29 June 2007
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2026 DARKSOL <chris00claw@gmail.com>
|
|
5
|
+
|
|
6
|
+
This program is free software: you can redistribute it and/or modify
|
|
7
|
+
it under the terms of the GNU General Public License as published by
|
|
8
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
(at your option) any later version.
|
|
10
|
+
|
|
11
|
+
This program is distributed in the hope that it will be useful,
|
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
GNU General Public License for more details.
|
|
15
|
+
|
|
16
|
+
You should have received a copy of the GNU General Public License
|
|
17
|
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
package/README.md
CHANGED
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
A unified CLI for market intel, trading, AI-powered analysis, on-chain oracle, casino, prepaid cards, builder indexing, secure agent signing, and more. Encrypted wallet management. Agent-native. OpenClaw-controllable.
|
|
13
13
|
|
|
14
14
|
[](https://www.npmjs.com/package/@darksol/terminal)
|
|
15
|
-
[](https://www.gnu.org/licenses/gpl-3.0)
|
|
16
16
|
[](https://nodejs.org/)
|
|
17
17
|
|
|
18
|
-
- Current release: **0.7.
|
|
18
|
+
- Current release: **0.7.2**
|
|
19
19
|
- Changelog: `CHANGELOG.md`
|
|
20
20
|
|
|
21
21
|
## Install
|
|
@@ -206,7 +206,7 @@ darksol ai analyze AERO
|
|
|
206
206
|
darksol ai chat --provider ollama --model llama3
|
|
207
207
|
```
|
|
208
208
|
|
|
209
|
-
**Supported providers:** OpenAI, Anthropic, OpenRouter, Ollama (local = free)
|
|
209
|
+
**Supported providers:** OpenAI, Anthropic, OpenRouter, Bankr LLM Gateway, Ollama (local = free)
|
|
210
210
|
|
|
211
211
|
The AI gets live market context (prices from DexScreener), knows your config (chain, slippage, wallet), and returns structured intents with confidence scores and risk warnings.
|
|
212
212
|
|
|
@@ -232,7 +232,7 @@ darksol keys remove openai
|
|
|
232
232
|
**Supported services:**
|
|
233
233
|
| Category | Services |
|
|
234
234
|
|----------|----------|
|
|
235
|
-
| LLM | OpenAI, Anthropic, OpenRouter, Ollama |
|
|
235
|
+
| LLM | OpenAI, Anthropic, OpenRouter, Bankr LLM Gateway, Ollama |
|
|
236
236
|
| Data | CoinGecko Pro, DexScreener, DefiLlama |
|
|
237
237
|
| RPC | Alchemy, Infura, QuickNode |
|
|
238
238
|
| Trading | 1inch, ParaSwap |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@darksol/terminal",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
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": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"defi"
|
|
25
25
|
],
|
|
26
26
|
"author": "DARKSOL <chris00claw@gmail.com>",
|
|
27
|
-
"license": "
|
|
27
|
+
"license": "GPL-3.0-or-later",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"agentmail": "^0.4.2",
|
|
30
30
|
"blessed": "^0.1.81",
|
package/skill/SKILL.md
CHANGED
|
@@ -7,7 +7,7 @@ description: "DARKSOL Terminal — unified CLI + x402 platform for trading, wall
|
|
|
7
7
|
|
|
8
8
|
**All DARKSOL services. One terminal. Zero trust required. 🌑**
|
|
9
9
|
|
|
10
|
-
`@darksol/terminal` v0.7.
|
|
10
|
+
`@darksol/terminal` v0.7.1 | npm: `npm install -g @darksol/terminal`
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
@@ -90,12 +90,16 @@ darksol dca cancel <id> # Cancel
|
|
|
90
90
|
### 🤖 AI Trading Assistant
|
|
91
91
|
```bash
|
|
92
92
|
darksol ai chat # Interactive AI chat (supports swap/send/price/casino/cards)
|
|
93
|
+
darksol ai chat --provider bankr # Use Bankr LLM Gateway (crypto credits)
|
|
94
|
+
darksol ai chat --provider bankr --model claude-opus-4.6 # Specific Bankr model
|
|
93
95
|
darksol ai ask "buy 0.5 ETH of AERO" # Parse natural language → trade intent
|
|
94
96
|
darksol ai ask "flip a coin" -x # Auto-execute if confidence ≥ 60%
|
|
95
97
|
darksol ai strategy VIRTUAL -b 500 # DCA strategy recommendation
|
|
96
98
|
darksol ai analyze AERO # Token analysis
|
|
97
99
|
```
|
|
98
100
|
|
|
101
|
+
**AI Providers:** OpenAI, Anthropic, OpenRouter, Bankr LLM Gateway (`bk_...`), Ollama (local/free)
|
|
102
|
+
**Bankr Models:** claude-opus-4.6, claude-sonnet-4.6, gemini-3-pro, gpt-5.2, kimi-k2.5, qwen3-coder
|
|
99
103
|
**AI Intent Actions:** swap, send, snipe, dca, price, balance, info, analyze, gas, cards, casino, unknown
|
|
100
104
|
|
|
101
105
|
The AI understands natural language and maps it to executable commands:
|
|
@@ -243,7 +247,7 @@ darksol config rpc base https://... # Custom RPC
|
|
|
243
247
|
```bash
|
|
244
248
|
darksol keys list # All services + status
|
|
245
249
|
darksol keys add openai # Add key (encrypted AES-256-GCM)
|
|
246
|
-
darksol keys add anthropic # Supported: openai, anthropic, openrouter, ollama,
|
|
250
|
+
darksol keys add anthropic # Supported: openai, anthropic, openrouter, bankr, ollama,
|
|
247
251
|
darksol keys add email # coingecko, dexscreener, alchemy, infura, email
|
|
248
252
|
darksol keys remove <service> # Remove key
|
|
249
253
|
```
|
package/src/config/keys.js
CHANGED
|
@@ -92,6 +92,14 @@ export const SERVICES = {
|
|
|
92
92
|
docsUrl: 'https://ollama.ai',
|
|
93
93
|
validate: (key) => key.startsWith('http'),
|
|
94
94
|
},
|
|
95
|
+
bankr: {
|
|
96
|
+
name: 'Bankr LLM Gateway',
|
|
97
|
+
category: 'llm',
|
|
98
|
+
description: 'Multi-model gateway — Claude, Gemini, GPT via crypto credits',
|
|
99
|
+
envVar: 'BANKR_LLM_KEY',
|
|
100
|
+
docsUrl: 'https://docs.bankr.bot/llm-gateway/overview',
|
|
101
|
+
validate: (key) => key.startsWith('bk_'),
|
|
102
|
+
},
|
|
95
103
|
|
|
96
104
|
// Data Providers
|
|
97
105
|
coingecko: {
|
|
@@ -404,7 +412,7 @@ export function hasKey(service) {
|
|
|
404
412
|
*/
|
|
405
413
|
export function hasAnyLLM() {
|
|
406
414
|
// Cloud providers — need real validated API keys
|
|
407
|
-
if (['openai', 'anthropic', 'openrouter'].some(s => hasKey(s))) return true;
|
|
415
|
+
if (['openai', 'anthropic', 'openrouter', 'bankr'].some(s => hasKey(s))) return true;
|
|
408
416
|
// Ollama — check if explicitly configured via hasKey (validates URL format)
|
|
409
417
|
if (hasKey('ollama')) return true;
|
|
410
418
|
return false;
|
package/src/llm/engine.js
CHANGED
|
@@ -51,6 +51,13 @@ const PROVIDERS = {
|
|
|
51
51
|
parseResponse: (data) => data.choices?.[0]?.message?.content || data.message?.content,
|
|
52
52
|
parseUsage: () => ({ input: 0, output: 0 }),
|
|
53
53
|
},
|
|
54
|
+
bankr: {
|
|
55
|
+
url: 'https://llm.bankr.bot/v1/chat/completions',
|
|
56
|
+
defaultModel: 'claude-sonnet-4.6',
|
|
57
|
+
authHeader: (key) => ({ 'X-API-Key': key }),
|
|
58
|
+
parseResponse: (data) => data.choices?.[0]?.message?.content,
|
|
59
|
+
parseUsage: (data) => data.usage,
|
|
60
|
+
},
|
|
54
61
|
};
|
|
55
62
|
|
|
56
63
|
// ──────────────────────────────────────────────────
|
|
@@ -85,6 +92,12 @@ export class LLMEngine {
|
|
|
85
92
|
}
|
|
86
93
|
}
|
|
87
94
|
|
|
95
|
+
if (!this.apiKey && this.provider !== 'ollama') {
|
|
96
|
+
// Try auto-stored keys as last resort
|
|
97
|
+
const { getKeyAuto } = await import('../config/keys.js');
|
|
98
|
+
this.apiKey = getKeyAuto(this.provider);
|
|
99
|
+
}
|
|
100
|
+
|
|
88
101
|
if (!this.apiKey && this.provider !== 'ollama') {
|
|
89
102
|
throw new Error(`No API key for ${this.provider}. Run: darksol keys add ${this.provider}`);
|
|
90
103
|
}
|
package/src/web/commands.js
CHANGED
|
@@ -642,7 +642,7 @@ export function getAIStatus() {
|
|
|
642
642
|
const dim = '\x1b[38;2;102;102;102m';
|
|
643
643
|
const reset = '\x1b[0m';
|
|
644
644
|
|
|
645
|
-
const providers = ['openai', 'anthropic', 'openrouter', 'ollama'];
|
|
645
|
+
const providers = ['openai', 'anthropic', 'openrouter', 'ollama', 'bankr'];
|
|
646
646
|
const connected = providers.filter(p => hasKey(p));
|
|
647
647
|
|
|
648
648
|
if (connected.length > 0) {
|
|
@@ -657,6 +657,7 @@ export function getAIStatus() {
|
|
|
657
657
|
` ${green}keys add openai sk-...${reset} ${dim}OpenAI (GPT-4o)${reset}`,
|
|
658
658
|
` ${green}keys add anthropic sk-ant-...${reset} ${dim}Anthropic (Claude)${reset}`,
|
|
659
659
|
` ${green}keys add openrouter sk-or-...${reset} ${dim}OpenRouter (any model)${reset}`,
|
|
660
|
+
` ${green}keys add bankr bk_...${reset} ${dim}Bankr LLM Gateway (crypto credits)${reset}`,
|
|
660
661
|
` ${green}keys add ollama http://...${reset} ${dim}Ollama (free, local)${reset}`,
|
|
661
662
|
'',
|
|
662
663
|
].join('\r\n');
|
|
@@ -1759,7 +1760,7 @@ async function cmdKeys(args, ws) {
|
|
|
1759
1760
|
ws.sendLine(`${ANSI.dim} ${'─'.repeat(50)}${ANSI.reset}`);
|
|
1760
1761
|
ws.sendLine('');
|
|
1761
1762
|
|
|
1762
|
-
const llmProviders = ['openai', 'anthropic', 'openrouter', 'ollama'];
|
|
1763
|
+
const llmProviders = ['openai', 'anthropic', 'openrouter', 'ollama', 'bankr'];
|
|
1763
1764
|
ws.sendLine(` ${ANSI.gold}LLM Providers:${ANSI.reset}`);
|
|
1764
1765
|
for (const p of llmProviders) {
|
|
1765
1766
|
const svc = SERVICES[p];
|