0xkobold 0.2.0 β 0.3.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/HEARTBEAT.md +40 -58
- package/README.md +387 -337
- package/dist/package.json +4 -2
- package/dist/src/auth/device-auth.js +202 -0
- package/dist/src/auth/device-auth.js.map +1 -0
- package/dist/src/auth/index.js +3 -0
- package/dist/src/auth/index.js.map +1 -0
- package/dist/src/channels/index.js +8 -0
- package/dist/src/channels/index.js.map +1 -0
- package/dist/src/channels/slack/webhook.js +128 -0
- package/dist/src/channels/slack/webhook.js.map +1 -0
- package/dist/src/channels/telegram/bot.js +223 -0
- package/dist/src/channels/telegram/bot.js.map +1 -0
- package/dist/src/channels/whatsapp/integration.js +325 -0
- package/dist/src/channels/whatsapp/integration.js.map +1 -0
- package/dist/src/cli/commands/check.js +69 -0
- package/dist/src/cli/commands/check.js.map +1 -0
- package/dist/src/cli/commands/migrate.js +24 -0
- package/dist/src/cli/commands/migrate.js.map +1 -0
- package/dist/src/cli/commands/tailscale.js +81 -0
- package/dist/src/cli/commands/tailscale.js.map +1 -0
- package/dist/src/cli/commands/telegram.js +111 -0
- package/dist/src/cli/commands/telegram.js.map +1 -0
- package/dist/src/cli/commands/tui.js +40 -22
- package/dist/src/cli/commands/tui.js.map +1 -1
- package/dist/src/cli/commands/whatsapp.js +116 -0
- package/dist/src/cli/commands/whatsapp.js.map +1 -0
- package/dist/src/cli/program.js +20 -0
- package/dist/src/cli/program.js.map +1 -1
- package/dist/src/config/index.js +2 -9
- package/dist/src/config/index.js.map +1 -1
- package/dist/src/config/manager.js +222 -0
- package/dist/src/config/manager.js.map +1 -0
- package/dist/src/documents/index.js +3 -0
- package/dist/src/documents/index.js.map +1 -0
- package/dist/src/documents/pdf.js +168 -0
- package/dist/src/documents/pdf.js.map +1 -0
- package/dist/src/gateway/client.js +318 -0
- package/dist/src/gateway/client.js.map +1 -0
- package/dist/src/infra/index.js +3 -0
- package/dist/src/infra/index.js.map +1 -0
- package/dist/src/infra/tailscale.js +163 -0
- package/dist/src/infra/tailscale.js.map +1 -0
- package/dist/src/media/audio.js +130 -0
- package/dist/src/media/audio.js.map +1 -0
- package/dist/src/media/index.js +4 -0
- package/dist/src/media/index.js.map +1 -0
- package/dist/src/media/vision.js +131 -0
- package/dist/src/media/vision.js.map +1 -0
- package/dist/src/migration/openclaw.js +498 -0
- package/dist/src/migration/openclaw.js.map +1 -0
- package/dist/src/sandbox/docker-runner.js +228 -0
- package/dist/src/sandbox/docker-runner.js.map +1 -0
- package/dist/src/sandbox/index.js +3 -0
- package/dist/src/sandbox/index.js.map +1 -0
- package/dist/src/skills/builtin/duplicate-detector.js +469 -0
- package/dist/src/skills/builtin/duplicate-detector.js.map +1 -0
- package/dist/src/skills/index.js +2 -0
- package/dist/src/skills/index.js.map +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# 0xKobold
|
|
1
|
+
# 0xKobold v0.3.0 "The Gap Closer"
|
|
2
2
|
|
|
3
3
|
```
|
|
4
4
|
..
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
.J-I ~I!.iCU->-1_<`ii>~:....:_1}It}!.::+tX%#@%MbMBQ%@@@@@@%%WbY]+-~`.
|
|
22
22
|
XWOUMO{,Z@B-;1B]:I_->i^ ... `;;JOB#QB#M8@@@@@@8OOOQdZ{~i!i!:.
|
|
23
23
|
..iJB@@M[1@%Y<X@o][]]>:III,^, ....,Z@@@@@@@@@@@@@@8#WOMoZI~~~~+I..
|
|
24
|
-
`~M@8X#@8Zf#@BUWb1{1?]1}]<!^ ...:b@@@@@@@@@@@@@8BW#dXZf[?-+l
|
|
25
|
-
.. :JB@@@@%%@@@B#@%W%OQ8BMQbU> ..>M
|
|
24
|
+
`~M@8X#@8Zf#@BUWb1{1?]1}]<!^ ...:b@@@@@@@@@@@@@8BW#dXZf[?-+l:`. ..
|
|
25
|
+
.. :JB@@@@%%@@@B#@%W%OQ8BMQbU> ..>M%@@@@@@@@@@@#%W8##OoXZXQCi^ ...
|
|
26
26
|
.. ^?1YbMWO#@@@@@@@@@@@@@@OZ-` d@#@@@@@@@@#%W8##OoXZXQCi^ ...
|
|
27
27
|
.. .`.:!~-CXd%@@@@@@@8oQ}}%@@@@@@@@@@@BWWBWMMdbf[->>^..
|
|
28
28
|
..... :{@@@@@@@OYUCQ8@@@@@@@@8BB8WMQModU?++:!I..
|
|
@@ -36,461 +36,511 @@
|
|
|
36
36
|
|
|
37
37
|
> *"Your digital familiar - a personal AI assistant that learns, evolves, and helps you Build 24/7"*
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
**v0.3.0 "The Gap Closer"** β Multi-channel, secure, distributed, and packed with features.
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## What's New in v0.3.0
|
|
44
|
+
|
|
45
|
+
### π Major Features (12 Total)
|
|
46
|
+
|
|
47
|
+
| Feature | Status | Description |
|
|
48
|
+
|---------|--------|-------------|
|
|
49
|
+
| **WhatsApp** | β
| Baileys integration with QR pairing |
|
|
50
|
+
| **Telegram** | β
| Complete bot with webhooks |
|
|
51
|
+
| **Slack** | β
| Webhook & slash commands |
|
|
52
|
+
| **Docker Sandbox** | β
| Secure container execution |
|
|
53
|
+
| **Device Auth** | β
| Multi-device token management |
|
|
54
|
+
| **Vision (AI)** | β
| Claude Vision image analysis |
|
|
55
|
+
| **Audio** | β
| Whisper transcription |
|
|
56
|
+
| **PDF** | β
| Text extraction & metadata |
|
|
57
|
+
| **Remote Gateway** | β
| Connect TUI to VPS |
|
|
58
|
+
| **Tailscale** | β
| Zero-config VPN for remote access |
|
|
59
|
+
| **Duplicate Detection** | β
| Self-check before adding code |
|
|
60
|
+
| **OpenClaw Migration** | β
| Full migration tool |
|
|
61
|
+
|
|
62
|
+
---
|
|
49
63
|
|
|
50
64
|
## Installation
|
|
51
65
|
|
|
52
66
|
### Via NPM (Recommended)
|
|
53
67
|
|
|
54
68
|
```bash
|
|
55
|
-
#
|
|
69
|
+
# Install Bun if needed
|
|
56
70
|
curl -fsSL https://bun.sh/install | bash
|
|
57
|
-
# Restart your terminal after installing Bun
|
|
58
71
|
|
|
59
|
-
#
|
|
72
|
+
# Install 0xKobold
|
|
60
73
|
npm install -g 0xkobold
|
|
61
74
|
|
|
62
|
-
#
|
|
75
|
+
# Setup
|
|
63
76
|
0xkobold setup
|
|
64
77
|
|
|
65
|
-
#
|
|
66
|
-
0xkobold
|
|
67
|
-
0xkobold --mode plan # Or start in plan mode
|
|
68
|
-
0xkobold --mode build # Or start in build mode
|
|
78
|
+
# Start
|
|
79
|
+
0xkobold
|
|
69
80
|
```
|
|
70
81
|
|
|
71
|
-
### Quick Start
|
|
82
|
+
### Quick Start
|
|
72
83
|
|
|
73
84
|
```bash
|
|
74
|
-
# Just want to try it out? Use npx:
|
|
75
85
|
npx 0xkobold setup
|
|
76
86
|
npx 0xkobold
|
|
77
87
|
```
|
|
78
88
|
|
|
79
|
-
|
|
89
|
+
---
|
|
80
90
|
|
|
81
|
-
|
|
82
|
-
# Clone and install
|
|
83
|
-
git clone https://github.com/moikapy/0xkobold.git
|
|
84
|
-
cd 0xkobold
|
|
85
|
-
bun install
|
|
91
|
+
## Multi-Channel Support π±
|
|
86
92
|
|
|
87
|
-
|
|
88
|
-
ollama run kimi-k2.5:cloud
|
|
93
|
+
Use your AI across multiple messaging platforms:
|
|
89
94
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
95
|
+
```bash
|
|
96
|
+
# WhatsApp
|
|
97
|
+
0xkobold whatsapp start # Scan QR code
|
|
98
|
+
0xkobold whatsapp send 123456 "Hello"
|
|
93
99
|
|
|
94
|
-
|
|
100
|
+
# Telegram
|
|
101
|
+
TELEGRAM_BOT_TOKEN=xxx 0xkobold telegram start
|
|
95
102
|
|
|
96
|
-
|
|
97
|
-
0xkobold
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
β βββ channels/ # Discord integration
|
|
102
|
-
β βββ config/ # Zod config system
|
|
103
|
-
β βββ discord/ # Discord bot
|
|
104
|
-
β βββ event-bus/ # Decoupled event system
|
|
105
|
-
β βββ gateway/ # Elysia WebSocket gateway
|
|
106
|
-
β βββ llm/ # Ollama + Anthropic providers
|
|
107
|
-
β βββ memory/ # JSON persistence
|
|
108
|
-
β βββ skills/ # Hot-reload skill system
|
|
109
|
-
β βββ index.ts # Main entry
|
|
110
|
-
βββ skills/ # Your custom skills (hot-reloaded)
|
|
111
|
-
βββ package.json
|
|
103
|
+
# Slack
|
|
104
|
+
0xkobold slack send "Hello team!"
|
|
105
|
+
|
|
106
|
+
# Discord
|
|
107
|
+
0xkobold gateway start --discord
|
|
112
108
|
```
|
|
113
109
|
|
|
114
|
-
|
|
110
|
+
---
|
|
115
111
|
|
|
116
|
-
|
|
112
|
+
## Remote/VPS Deployment π
|
|
117
113
|
|
|
118
|
-
|
|
119
|
-
// skills/hello.ts
|
|
120
|
-
import type { Skill } from '../src/skills/types';
|
|
121
|
-
|
|
122
|
-
export const helloSkill: Skill = {
|
|
123
|
-
name: 'hello',
|
|
124
|
-
description: 'Say hello to someone',
|
|
125
|
-
risk: 'safe',
|
|
126
|
-
|
|
127
|
-
toolDefinition: {
|
|
128
|
-
type: 'function',
|
|
129
|
-
function: {
|
|
130
|
-
name: 'hello',
|
|
131
|
-
description: 'Say hello to someone',
|
|
132
|
-
parameters: {
|
|
133
|
-
type: 'object',
|
|
134
|
-
properties: {
|
|
135
|
-
name: { type: 'string', description: 'Name to greet' },
|
|
136
|
-
},
|
|
137
|
-
required: ['name'],
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
},
|
|
114
|
+
Run AI on VPS, use lightweight TUI locally:
|
|
141
115
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
116
|
+
### VPS Side
|
|
117
|
+
```bash
|
|
118
|
+
# On your VPS
|
|
119
|
+
0xkobold gateway start --host 0.0.0.0
|
|
146
120
|
|
|
147
|
-
|
|
121
|
+
# Or with Tailscale (no port forwarding!)
|
|
122
|
+
0xkobold tailscale start
|
|
148
123
|
```
|
|
149
124
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
125
|
+
### Laptop Side
|
|
126
|
+
```bash
|
|
127
|
+
# Direct connection
|
|
128
|
+
0xkobold tui --remote wss://vps.example.com:7777
|
|
153
129
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
- `high` - Explicit approval for dangerous operations (shell, delete)
|
|
130
|
+
# Via Tailscale (secure, private)
|
|
131
|
+
0xkobold tui --remote $(0xkobold tailscale url)
|
|
132
|
+
```
|
|
158
133
|
|
|
159
|
-
|
|
134
|
+
---
|
|
160
135
|
|
|
161
|
-
|
|
136
|
+
## Security Features π‘οΈ
|
|
162
137
|
|
|
138
|
+
### Docker Sandboxing
|
|
163
139
|
```typescript
|
|
164
|
-
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
The `spawn_subagent` skill is built-in and lets agents create child agents automatically.
|
|
140
|
+
import { getDockerRunner } from "0xkobold/sandbox";
|
|
168
141
|
|
|
169
|
-
|
|
142
|
+
const runner = getDockerRunner({
|
|
143
|
+
image: "node:20-slim",
|
|
144
|
+
memoryLimit: "512m",
|
|
145
|
+
network: "none", // Isolated
|
|
146
|
+
});
|
|
170
147
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
β Gateway (Standalone) β βββ Coordinates all agents
|
|
176
|
-
β Port: 18789 β
|
|
177
|
-
ββββββ¬ββββββββββββββ¬βββββββββββββββββββ
|
|
178
|
-
β β
|
|
179
|
-
ββββββΌβββββ βββββΌβββββ
|
|
180
|
-
β Dev β β Ops β βββ Main Agents (persistent)
|
|
181
|
-
β Agent β β Agent β
|
|
182
|
-
ββββββ¬βββββ βββββ¬βββββ
|
|
183
|
-
β β
|
|
184
|
-
ββββββΌβββββ βββββΌβββββ
|
|
185
|
-
βScout β βHealth β βββ Subagents (ephemeral)
|
|
186
|
-
βPlanner β βChecker β
|
|
187
|
-
βWorker β βDeploy β
|
|
188
|
-
βββββββββββ ββββββββββ
|
|
148
|
+
await runner.run({
|
|
149
|
+
command: "node",
|
|
150
|
+
args: ["-e", "console.log('Safe execution')"],
|
|
151
|
+
});
|
|
189
152
|
```
|
|
190
153
|
|
|
191
|
-
###
|
|
154
|
+
### Device Authentication
|
|
155
|
+
```bash
|
|
156
|
+
0xkobold device init "My Laptop"
|
|
157
|
+
0xkobold device token generate
|
|
158
|
+
0xkobold device list
|
|
159
|
+
```
|
|
192
160
|
|
|
193
|
-
|
|
194
|
-
- **Dev Agent**: Codes features, reviews PRs
|
|
195
|
-
- **Ops Agent**: Monitors services, deploys to production
|
|
196
|
-
- **Docs Agent**: Auto-generates documentation
|
|
197
|
-
- **Research Agent**: Explores new technologies
|
|
161
|
+
---
|
|
198
162
|
|
|
199
|
-
|
|
163
|
+
## Media Support πΌοΈ
|
|
200
164
|
|
|
201
|
-
###
|
|
165
|
+
### Vision (Image Analysis)
|
|
166
|
+
```typescript
|
|
167
|
+
import { VisionAnalyzer } from "0xkobold/media";
|
|
202
168
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
169
|
+
const vision = new VisionAnalyzer({
|
|
170
|
+
provider: "claude",
|
|
171
|
+
apiKey: process.env.ANTHROPIC_API_KEY,
|
|
172
|
+
});
|
|
206
173
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
# βββ memory/ # Agent-specific memory
|
|
212
|
-
# βββ logs/ # Execution logs
|
|
174
|
+
const result = await vision.analyzeImage("./image.png");
|
|
175
|
+
console.log(result.description);
|
|
176
|
+
console.log(result.objects);
|
|
177
|
+
```
|
|
213
178
|
|
|
214
|
-
|
|
215
|
-
|
|
179
|
+
### Audio Transcription
|
|
180
|
+
```typescript
|
|
181
|
+
import { AudioTranscriber } from "0xkobold/media";
|
|
216
182
|
|
|
217
|
-
|
|
218
|
-
|
|
183
|
+
const audio = new AudioTranscriber({
|
|
184
|
+
provider: "openai",
|
|
185
|
+
apiKey: process.env.OPENAI_API_KEY,
|
|
186
|
+
});
|
|
219
187
|
|
|
220
|
-
|
|
221
|
-
|
|
188
|
+
const result = await audio.transcribeFile("./voice.mp3");
|
|
189
|
+
console.log(result.text);
|
|
190
|
+
console.log(result.segments); // Timestamps
|
|
222
191
|
```
|
|
223
192
|
|
|
224
|
-
###
|
|
193
|
+
### PDF Processing
|
|
194
|
+
```typescript
|
|
195
|
+
import { extractPDF } from "0xkobold/documents";
|
|
225
196
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
/agent-status [name] # Check agent status
|
|
231
|
-
/agent-select <name> # Switch TUI to agent
|
|
232
|
-
/agents # List all agents
|
|
197
|
+
const result = await extractPDF("./document.pdf");
|
|
198
|
+
console.log(result.text);
|
|
199
|
+
console.log(result.metadata.title);
|
|
200
|
+
console.log(result.pages);
|
|
233
201
|
```
|
|
234
202
|
|
|
235
|
-
|
|
203
|
+
---
|
|
236
204
|
|
|
237
|
-
|
|
205
|
+
## Duplicate Detection π
|
|
238
206
|
|
|
239
|
-
|
|
207
|
+
Check before adding to avoid duplication:
|
|
240
208
|
|
|
241
|
-
```
|
|
242
|
-
|
|
209
|
+
```bash
|
|
210
|
+
# Check before implementing
|
|
211
|
+
0xkobold check "WhatsApp integration"
|
|
243
212
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
Strategy: Scout β Planner β Workers β Reviewer
|
|
213
|
+
# Check specific function
|
|
214
|
+
0xkobold check -f calculateSum
|
|
247
215
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
β
Workers implements components
|
|
251
|
-
β
Reviewer approves changes
|
|
252
|
-
π All done!
|
|
216
|
+
# Check class
|
|
217
|
+
0xkobold check -c UserManager
|
|
253
218
|
```
|
|
254
219
|
|
|
255
|
-
|
|
220
|
+
**Output:**
|
|
221
|
+
```
|
|
222
|
+
β‘ SIMILAR IMPLEMENTATIONS FOUND
|
|
223
|
+
Best match: 90% at src/channels/whatsapp/integration.ts
|
|
256
224
|
|
|
257
|
-
|
|
225
|
+
Suggestion: Review existing code before creating new implementation.
|
|
226
|
+
```
|
|
258
227
|
|
|
259
|
-
|
|
260
|
-
|------------|---------------|----------|
|
|
261
|
-
| **Simple** | "fix typo", "update config" | Handle directly |
|
|
262
|
-
| **Medium** | "implement feature" | Scout + Worker |
|
|
263
|
-
| **Complex** | "redesign", "architecture" | Full workflow |
|
|
228
|
+
---
|
|
264
229
|
|
|
265
|
-
|
|
230
|
+
## Migration from OpenClaw π
|
|
266
231
|
|
|
267
|
-
|
|
268
|
-
/autonomous-toggle simple # Only complex tasks use subagents
|
|
269
|
-
/autonomous-toggle medium # Medium + complex (default)
|
|
270
|
-
/autonomous-toggle complex # Only complex tasks
|
|
271
|
-
/autonomous-toggle always # Everything uses subagents
|
|
272
|
-
/autonomous-toggle off # Disable auto-delegation
|
|
232
|
+
Migrating from OpenClaw (koclaw)? We got you:
|
|
273
233
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
### Explicit Delegation
|
|
234
|
+
```bash
|
|
235
|
+
# Preview migration
|
|
236
|
+
0xkobold migrate --dry-run
|
|
279
237
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
/scout-and-plan <feature> # Scout β Planner only
|
|
283
|
-
/parallel "task 1" "task 2" # Run scouts in parallel
|
|
238
|
+
# Execute migration (with automatic backup)
|
|
239
|
+
0xkobold migrate --live
|
|
284
240
|
```
|
|
285
241
|
|
|
286
|
-
|
|
242
|
+
**Migrated:**
|
|
243
|
+
- β
Configuration (with `.bak` backups)
|
|
244
|
+
- β
Agents
|
|
245
|
+
- β
Identity (both formats)
|
|
246
|
+
- β
Browser data
|
|
247
|
+
- β
Canvas/visual data
|
|
248
|
+
- β
Credentials (secure)
|
|
249
|
+
- β
Media files
|
|
250
|
+
- β
Cron jobs
|
|
251
|
+
- β
Workspace & databases
|
|
252
|
+
- β
Channel sessions
|
|
287
253
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
| **planner** | Create implementation plans | read, search |
|
|
292
|
-
| **worker** | Full implementation | all tools |
|
|
293
|
-
| **reviewer** | Code review | read, search |
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Project Structure
|
|
294
257
|
|
|
295
|
-
Create custom agents:
|
|
296
258
|
```
|
|
297
|
-
/
|
|
298
|
-
|
|
259
|
+
0xkobold/
|
|
260
|
+
βββ src/
|
|
261
|
+
β βββ agent/ # Agent runtime
|
|
262
|
+
β βββ approval/ # Safety approvals
|
|
263
|
+
β βββ auth/ # Device authentication
|
|
264
|
+
β βββ channels/ # WhatsApp, Telegram, Slack
|
|
265
|
+
β βββ cli/ # CLI commands
|
|
266
|
+
β βββ config/ # Configuration management
|
|
267
|
+
β βββ discord/ # Discord bot
|
|
268
|
+
β βββ documents/ # PDF processing
|
|
269
|
+
β βββ gateway/ # WebSocket gateway
|
|
270
|
+
β β βββ client.ts # Remote client
|
|
271
|
+
β β βββ server.ts # Server
|
|
272
|
+
β βββ infra/ # Infrastructure (Tailscale)
|
|
273
|
+
β βββ media/ # Vision, Audio
|
|
274
|
+
β βββ migration/ # OpenClaw migration
|
|
275
|
+
β βββ sandbox/ # Docker isolation
|
|
276
|
+
β βββ skills/ # Skills framework
|
|
277
|
+
β β βββ builtin/
|
|
278
|
+
β β βββ duplicate-detector.ts
|
|
279
|
+
β βββ workspace/ # Workspace management
|
|
280
|
+
βββ skills/ # Your custom skills
|
|
281
|
+
βββ package.json
|
|
299
282
|
```
|
|
300
283
|
|
|
301
|
-
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## Configuration
|
|
302
287
|
|
|
303
|
-
|
|
288
|
+
Global config: `~/.0xkobold/config.json`
|
|
304
289
|
|
|
305
|
-
###
|
|
290
|
+
### Option 1: Ollama (Local - Default)
|
|
306
291
|
|
|
292
|
+
```json
|
|
293
|
+
{
|
|
294
|
+
"version": "0.3.0",
|
|
295
|
+
"llm": {
|
|
296
|
+
"provider": "ollama",
|
|
297
|
+
"model": "qwen2.5-coder:14b",
|
|
298
|
+
"baseUrl": "http://localhost:11434",
|
|
299
|
+
"maxTokens": 4000,
|
|
300
|
+
"temperature": 0.7
|
|
301
|
+
},
|
|
302
|
+
"gateway": {
|
|
303
|
+
"port": 7777,
|
|
304
|
+
"host": "localhost"
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
307
|
```
|
|
308
|
-
/implement add Redis caching
|
|
309
308
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
309
|
+
**Setup:**
|
|
310
|
+
```bash
|
|
311
|
+
# Install Ollama
|
|
312
|
+
curl -fsSL https://ollama.com/install.sh | sh
|
|
313
|
+
|
|
314
|
+
# Pull a model
|
|
315
|
+
ollama pull qwen2.5-coder:14b
|
|
315
316
|
|
|
316
|
-
|
|
317
|
+
# Start Ollama
|
|
318
|
+
ollama serve
|
|
317
319
|
```
|
|
318
320
|
|
|
319
|
-
###
|
|
321
|
+
### Option 2: Claude (Cloud)
|
|
320
322
|
|
|
323
|
+
```json
|
|
324
|
+
{
|
|
325
|
+
"version": "0.3.0",
|
|
326
|
+
"llm": {
|
|
327
|
+
"provider": "claude",
|
|
328
|
+
"model": "claude-3-sonnet-20240229",
|
|
329
|
+
"apiKey": "sk-ant-xxx",
|
|
330
|
+
"maxTokens": 4000,
|
|
331
|
+
"temperature": 0.7
|
|
332
|
+
}
|
|
333
|
+
}
|
|
321
334
|
```
|
|
322
|
-
/scout-and-plan refactor auth to OAuth2
|
|
323
|
-
|
|
324
|
-
Workflow:
|
|
325
|
-
1. Scout analyzes current auth
|
|
326
|
-
2. Planner creates OAuth2 migration plan
|
|
327
335
|
|
|
328
|
-
|
|
336
|
+
**Setup:**
|
|
337
|
+
```bash
|
|
338
|
+
# Get API key from https://console.anthropic.com
|
|
339
|
+
export ANTHROPIC_API_KEY=sk-ant-xxx
|
|
329
340
|
```
|
|
330
341
|
|
|
331
|
-
###
|
|
342
|
+
### Option 3: OpenAI (Cloud)
|
|
332
343
|
|
|
344
|
+
```json
|
|
345
|
+
{
|
|
346
|
+
"version": "0.3.0",
|
|
347
|
+
"llm": {
|
|
348
|
+
"provider": "openai",
|
|
349
|
+
"model": "gpt-4",
|
|
350
|
+
"apiKey": "sk-xxx",
|
|
351
|
+
"maxTokens": 4000,
|
|
352
|
+
"temperature": 0.7
|
|
353
|
+
}
|
|
354
|
+
}
|
|
333
355
|
```
|
|
334
|
-
/parallel "Find auth code" "Find models" "Check dependencies"
|
|
335
356
|
|
|
336
|
-
|
|
357
|
+
### Full Example with All Features
|
|
358
|
+
|
|
359
|
+
```json
|
|
360
|
+
{
|
|
361
|
+
"version": "0.3.0",
|
|
362
|
+
"persona": {
|
|
363
|
+
"name": "0xKobold",
|
|
364
|
+
"emoji": "π"
|
|
365
|
+
},
|
|
366
|
+
"llm": {
|
|
367
|
+
"provider": "ollama",
|
|
368
|
+
"model": "qwen2.5-coder:14b",
|
|
369
|
+
"baseUrl": "http://localhost:11434",
|
|
370
|
+
"maxTokens": 4000,
|
|
371
|
+
"temperature": 0.7
|
|
372
|
+
},
|
|
373
|
+
"gateway": {
|
|
374
|
+
"enabled": true,
|
|
375
|
+
"port": 7777,
|
|
376
|
+
"host": "localhost",
|
|
377
|
+
"remote": {
|
|
378
|
+
"enabled": false
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
"channels": {
|
|
382
|
+
"discord": { "enabled": false },
|
|
383
|
+
"whatsapp": { "enabled": true },
|
|
384
|
+
"telegram": { "enabled": false },
|
|
385
|
+
"slack": { "enabled": false }
|
|
386
|
+
}
|
|
387
|
+
}
|
|
337
388
|
```
|
|
338
389
|
|
|
339
|
-
|
|
390
|
+
---
|
|
340
391
|
|
|
341
|
-
|
|
392
|
+
## CLI Commands
|
|
342
393
|
|
|
343
|
-
###
|
|
394
|
+
### Core
|
|
395
|
+
```bash
|
|
396
|
+
0xkobold setup # Interactive setup
|
|
397
|
+
0xkobold tui # Start TUI (default)
|
|
398
|
+
0xkobold tui --local # Local project mode
|
|
399
|
+
0xkobold tui --remote <url> # Connect to remote gateway
|
|
400
|
+
```
|
|
344
401
|
|
|
345
|
-
|
|
402
|
+
### Channels
|
|
403
|
+
```bash
|
|
404
|
+
0xkobold whatsapp start|stop|status|send
|
|
405
|
+
0xkobold telegram start|stop|status
|
|
406
|
+
0xkobold slack webhook <message>
|
|
407
|
+
```
|
|
346
408
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
409
|
+
### Gateway & Networking
|
|
410
|
+
```bash
|
|
411
|
+
0xkobold gateway start|stop|status
|
|
412
|
+
0xkobold tailscale status # Check Tailscale IP
|
|
413
|
+
0xkobold tailscale url # Get gateway URL
|
|
414
|
+
```
|
|
353
415
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
416
|
+
### Security
|
|
417
|
+
```bash
|
|
418
|
+
0xkobold device init <name>
|
|
419
|
+
0xkobold device token generate
|
|
420
|
+
0xkobold device list
|
|
421
|
+
```
|
|
360
422
|
|
|
361
|
-
###
|
|
423
|
+
### Development
|
|
424
|
+
```bash
|
|
425
|
+
0xkobold check <description|function|class>
|
|
426
|
+
0xkobold migrate --dry-run|live
|
|
427
|
+
0xkobold status
|
|
428
|
+
0xkobold logs
|
|
429
|
+
```
|
|
362
430
|
|
|
363
|
-
|
|
364
|
-
- **Qwen 2.5 72B/32B** - Alibaba's instruction-tuned model
|
|
365
|
-
- **DeepSeek R1 671B** - Reasoning-capable model
|
|
366
|
-
- **Llama 3.2** - Meta's latest open weights
|
|
431
|
+
---
|
|
367
432
|
|
|
368
|
-
|
|
433
|
+
## Compared to OpenClaw
|
|
369
434
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
435
|
+
| Metric | OpenClaw | 0xKobold v0.3.0 | Advantage |
|
|
436
|
+
|--------|----------|-----------------|-----------|
|
|
437
|
+
| **Lines of Code** | ~60,000 | ~8,000 | 7.5x simpler |
|
|
438
|
+
| **Dependencies** | 100+ | ~20 | 5x lighter |
|
|
439
|
+
| **Setup Time** | 30 min | 5 min | 6x faster |
|
|
440
|
+
| **Channels** | 5 | 4 | Feature parity |
|
|
441
|
+
| **Security** | β
| β
| Feature parity |
|
|
442
|
+
| **Media** | β
| β
| Feature parity |
|
|
443
|
+
| **Remote/VPS** | β
| β
| Feature parity |
|
|
444
|
+
| **Tailscale** | β
| β
| Feature parity |
|
|
374
445
|
|
|
375
|
-
|
|
446
|
+
**Our Philosophy:** OpenClaw power, 10x simpler.
|
|
376
447
|
|
|
377
|
-
|
|
448
|
+
---
|
|
378
449
|
|
|
379
|
-
|
|
380
|
-
# Global install (recommended)
|
|
381
|
-
npm install -g 0xkobold
|
|
450
|
+
## API Usage
|
|
382
451
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
0xkobold tui
|
|
387
|
-
|
|
388
|
-
# Project mode (per-directory config)
|
|
389
|
-
0xkobold local
|
|
390
|
-
|
|
391
|
-
# Gateway service
|
|
392
|
-
0xkobold start # Start daemon
|
|
393
|
-
0xkobold start -f # Start foreground
|
|
394
|
-
0xkobold stop # Stop daemon
|
|
395
|
-
0xkobold status # Check status
|
|
396
|
-
0xkobold logs # View logs
|
|
397
|
-
|
|
398
|
-
# Agent management (v0.2.0+)
|
|
399
|
-
0xkobold agent init <name> # Create agent workspace
|
|
400
|
-
0xkobold agent start <name> # Start agent process
|
|
401
|
-
0xkobold agent stop <name> # Stop agent process
|
|
402
|
-
0xkobold agent status [name] # Check agent status
|
|
403
|
-
0xkobold agent list # List all agents
|
|
404
|
-
0xkobold agent logs <name> # View agent logs
|
|
405
|
-
|
|
406
|
-
# Using npx (no install)
|
|
407
|
-
npx 0xkobold
|
|
408
|
-
npx 0xkobold tui --local
|
|
409
|
-
```
|
|
410
|
-
|
|
411
|
-
### CLI Commands (In TUI)
|
|
452
|
+
### Gateway Client (Remote)
|
|
453
|
+
```typescript
|
|
454
|
+
import { GatewayClient } from "0xkobold/gateway";
|
|
412
455
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
/agent-status [name] # Check agent status
|
|
419
|
-
/agent-select <name> # Switch TUI to agent
|
|
420
|
-
/agents # List all agents with status
|
|
421
|
-
```
|
|
456
|
+
const client = new GatewayClient({
|
|
457
|
+
url: "wss://your-vps.com:7777",
|
|
458
|
+
token: "xxx",
|
|
459
|
+
autoReconnect: true,
|
|
460
|
+
});
|
|
422
461
|
|
|
423
|
-
|
|
462
|
+
await client.connect();
|
|
463
|
+
client.chat("Hello from my laptop");
|
|
424
464
|
```
|
|
425
|
-
/implement <feature> # Auto-delegate based on complexity
|
|
426
|
-
/scout-and-plan <feature> # Scout β Planner only
|
|
427
|
-
/parallel "task 1" "task 2" # Run scouts in parallel
|
|
428
|
-
|
|
429
|
-
/autonomous-toggle [mode] # Control delegation
|
|
430
|
-
/autonomous-status # Show current mode
|
|
431
|
-
/delegation-plan <task> # Preview delegation strategy
|
|
432
465
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
466
|
+
### Sandbox
|
|
467
|
+
```typescript
|
|
468
|
+
import { getDockerRunner } from "0xkobold/sandbox";
|
|
436
469
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
```
|
|
470
|
+
const runner = getDockerRunner({
|
|
471
|
+
memoryLimit: "256m",
|
|
472
|
+
cpuLimit: "0.5",
|
|
473
|
+
network: "none",
|
|
474
|
+
});
|
|
443
475
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
/mode # Show current mode
|
|
449
|
-
/modes # List available modes
|
|
476
|
+
const result = await runner.run({
|
|
477
|
+
command: "node",
|
|
478
|
+
args: ["script.js"],
|
|
479
|
+
});
|
|
450
480
|
```
|
|
451
481
|
|
|
452
|
-
|
|
482
|
+
### Duplicate Detection
|
|
483
|
+
```typescript
|
|
484
|
+
import { getDuplicateDetector } from "0xkobold/skills";
|
|
453
485
|
|
|
454
|
-
|
|
486
|
+
const detector = getDuplicateDetector();
|
|
487
|
+
const result = await detector.check("New feature");
|
|
455
488
|
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
"meta": {
|
|
459
|
-
"version": "1.0.0"
|
|
460
|
-
},
|
|
461
|
-
"providers": {
|
|
462
|
-
"ollama": {
|
|
463
|
-
"enabled": true,
|
|
464
|
-
"model": "kimi-k2.5:cloud"
|
|
465
|
-
}
|
|
466
|
-
},
|
|
467
|
-
"gateway": {
|
|
468
|
-
"enabled": true,
|
|
469
|
-
"port": 18789
|
|
470
|
-
},
|
|
471
|
-
"discord": {
|
|
472
|
-
"enabled": false,
|
|
473
|
-
"token": "${DISCORD_BOT_TOKEN}"
|
|
474
|
-
}
|
|
489
|
+
if (result.exists) {
|
|
490
|
+
console.log("Already exists!", result.matches[0].file);
|
|
475
491
|
}
|
|
476
492
|
```
|
|
477
493
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
494
|
+
---
|
|
495
|
+
|
|
496
|
+
## Architecture
|
|
497
|
+
|
|
498
|
+
```
|
|
499
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
500
|
+
β YOUR LAPTOP (Local) β
|
|
501
|
+
β βββββββββββββββββββ ββββββββββββββββββββββββββββ β
|
|
502
|
+
β β TUI (Bun) βββββββββΊβ GatewayClient (WS) β β
|
|
503
|
+
β β - Terminal β β - Remote Connection β β
|
|
504
|
+
β β - File Ops β β - Auth Tokens β β
|
|
505
|
+
β βββββββββββββββββββ ββββββββββββββ¬ββββββββββββββ β
|
|
506
|
+
β β β β
|
|
507
|
+
β β Local Files β WebSocket β
|
|
508
|
+
β β β β
|
|
509
|
+
β ββββββββΌβββββββββββββββββββ βββββββββββΌβββββββββββ β
|
|
510
|
+
β β .0xkobold/ (project) β β ~/.0xkobold/ β β
|
|
511
|
+
β β - workspace.db β β - config.json β β
|
|
512
|
+
β β - MEMORY.md β β - identity β β
|
|
513
|
+
β ββββββββββββββββββββββββββ ββββββββββββββββββββββββ β
|
|
514
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
515
|
+
β
|
|
516
|
+
β wss:// or Tailscale
|
|
517
|
+
βΌ
|
|
518
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
519
|
+
β VPS (Remote) OR Local β
|
|
520
|
+
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
|
|
521
|
+
β β Gateway Server (Bun) β β
|
|
522
|
+
β β - WebSocket Server β β
|
|
523
|
+
β β - Multi-client Support β β
|
|
524
|
+
β ββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ β
|
|
525
|
+
β β β
|
|
526
|
+
β βββββββββββΌββββββββββ β
|
|
527
|
+
β βΌ βΌ βΌ β
|
|
528
|
+
β ββββββββββββ ββββββββββ ββββββββββββ β
|
|
529
|
+
β β Claude β β Docker β β Channels β β
|
|
530
|
+
β β API β β Sandboxβ β (Discordβ β
|
|
531
|
+
β β β β β β WhatsAppβ β
|
|
532
|
+
β ββββββββββββ ββββββββββ ββββββββββββ β
|
|
533
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
---
|
|
482
537
|
|
|
483
|
-
##
|
|
538
|
+
## License
|
|
484
539
|
|
|
485
|
-
|
|
486
|
-
|--------|----------|----------|
|
|
487
|
-
| **Gateway** | Bun.serve | Elysia.js (3x faster) |
|
|
488
|
-
| **Orchestration** | Tight coupling | Event bus (decoupled) |
|
|
489
|
-
| **Agent Loop** | Custom | @mariozechner/pi-agent-core |
|
|
490
|
-
| **Skills** | Compiled | Hot-reload .ts files |
|
|
491
|
-
| **Approval** | Basic | Risk-based queue |
|
|
492
|
-
| **Dependencies** | Many | Minimal (~10) |
|
|
540
|
+
MIT Β© 2025
|
|
493
541
|
|
|
494
|
-
|
|
542
|
+
---
|
|
543
|
+
|
|
544
|
+
**Built while you sleep by your Digital Familiar** π
|
|
495
545
|
|
|
496
|
-
|
|
546
|
+
*Join the future of personal AI at [0xkobold](https://github.com/moikapy/0xkobold)*
|