0xkobold 0.1.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 +48 -32
- package/README.md +426 -157
- package/dist/package.json +5 -2
- package/dist/src/agent/bootstrap-loader.js +138 -0
- package/dist/src/agent/bootstrap-loader.js.map +1 -0
- package/dist/src/agent/context-pruning.js +279 -0
- package/dist/src/agent/context-pruning.js.map +1 -0
- package/dist/src/agent/dynamic-personality.js +211 -0
- package/dist/src/agent/dynamic-personality.js.map +1 -0
- package/dist/src/agent/embedded-runner.js +79 -0
- package/dist/src/agent/embedded-runner.js.map +1 -0
- package/dist/src/agent/index.js +16 -0
- package/dist/src/agent/index.js.map +1 -0
- package/dist/src/agent/system-prompt.js +84 -0
- package/dist/src/agent/system-prompt.js.map +1 -0
- package/dist/src/agent/task-router.js +194 -0
- package/dist/src/agent/task-router.js.map +1 -0
- package/dist/src/agent/tools/index.js +2 -0
- package/dist/src/agent/tools/index.js.map +1 -0
- package/dist/src/agent/tools/spawn-agent.js +200 -0
- package/dist/src/agent/tools/spawn-agent.js.map +1 -0
- package/dist/src/agent/types/definitions.js +317 -0
- package/dist/src/agent/types/definitions.js.map +1 -0
- package/dist/src/agent/types/index.js +2 -0
- package/dist/src/agent/types/index.js.map +1 -0
- package/dist/src/agent/user-profile.js +300 -0
- package/dist/src/agent/user-profile.js.map +1 -0
- package/dist/src/agents/task-router.js +194 -0
- package/dist/src/agents/task-router.js.map +1 -0
- package/dist/src/agents/tools/index.js +2 -0
- package/dist/src/agents/tools/index.js.map +1 -0
- package/dist/src/agents/tools/spawn-agent.js +200 -0
- package/dist/src/agents/tools/spawn-agent.js.map +1 -0
- package/dist/src/agents/types/definitions.js +317 -0
- package/dist/src/agents/types/definitions.js.map +1 -0
- package/dist/src/agents/types/index.js +2 -0
- package/dist/src/agents/types/index.js.map +1 -0
- 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/embedded.js +36 -0
- package/dist/src/cli/commands/embedded.js.map +1 -0
- package/dist/src/cli/commands/gateway.js +127 -166
- package/dist/src/cli/commands/gateway.js.map +1 -1
- 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-fixed.js +1 -0
- package/dist/src/cli/program-fixed.js.map +1 -0
- package/dist/src/cli/program.js +30 -29
- 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/extensions/core/agent-lifecycle-extension.js +323 -0
- package/dist/src/extensions/core/agent-lifecycle-extension.js.map +1 -0
- package/dist/src/extensions/core/agent-orchestrator-extension.js +642 -0
- package/dist/src/extensions/core/agent-orchestrator-extension.js.map +1 -0
- package/dist/src/extensions/core/agent-workspace-extension.js +174 -0
- package/dist/src/extensions/core/agent-workspace-extension.js.map +1 -0
- package/dist/src/extensions/core/autonomous-executor-extension.js +145 -0
- package/dist/src/extensions/core/autonomous-executor-extension.js.map +1 -0
- package/dist/src/extensions/core/autonomous-subagent-extension.js +333 -0
- package/dist/src/extensions/core/autonomous-subagent-extension.js.map +1 -0
- package/dist/src/extensions/core/deprecated/agent-lifecycle-extension.js +323 -0
- package/dist/src/extensions/core/deprecated/agent-lifecycle-extension.js.map +1 -0
- package/dist/src/extensions/core/deprecated/autonomous-subagent-extension.js +333 -0
- package/dist/src/extensions/core/deprecated/autonomous-subagent-extension.js.map +1 -0
- package/dist/src/extensions/core/deprecated/subagent-extension.js +647 -0
- package/dist/src/extensions/core/deprecated/subagent-extension.js.map +1 -0
- package/dist/src/extensions/core/mode-manager-extension.js +11 -0
- package/dist/src/extensions/core/mode-manager-extension.js.map +1 -1
- package/dist/src/extensions/core/persona-loader-extension.js +61 -129
- package/dist/src/extensions/core/persona-loader-extension.js.map +1 -1
- package/dist/src/extensions/core/websearch-enhanced-extension.js +705 -0
- package/dist/src/extensions/core/websearch-enhanced-extension.js.map +1 -0
- package/dist/src/extensions/core/websearch-v2-extension.js +303 -0
- package/dist/src/extensions/core/websearch-v2-extension.js.map +1 -0
- package/dist/src/gateway/client.js +318 -0
- package/dist/src/gateway/client.js.map +1 -0
- package/dist/src/gateway/discord-bot.js +185 -0
- package/dist/src/gateway/discord-bot.js.map +1 -0
- package/dist/src/gateway/index.js +10 -350
- package/dist/src/gateway/index.js.map +1 -1
- package/dist/src/gateway/server.js +325 -0
- package/dist/src/gateway/server.js.map +1 -0
- package/dist/src/gateway/websocket-server.js +142 -0
- package/dist/src/gateway/websocket-server.js.map +1 -0
- package/dist/src/heartbeat/checkin.js +185 -0
- package/dist/src/heartbeat/checkin.js.map +1 -0
- package/dist/src/heartbeat/index.js +5 -0
- package/dist/src/heartbeat/index.js.map +1 -0
- package/dist/src/heartbeat/notifications.js +216 -0
- package/dist/src/heartbeat/notifications.js.map +1 -0
- package/dist/src/heartbeat/scheduler.js +284 -0
- package/dist/src/heartbeat/scheduler.js.map +1 -0
- package/dist/src/index.js +21 -3
- package/dist/src/index.js.map +1 -1
- 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/mode/auto-detector.js +211 -0
- package/dist/src/mode/auto-detector.js.map +1 -0
- package/dist/src/mode/index.js +3 -0
- package/dist/src/mode/index.js.map +1 -0
- package/dist/src/mode/natural-switcher.js +123 -0
- package/dist/src/mode/natural-switcher.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/api-worker.js +88 -0
- package/dist/src/skills/builtin/api-worker.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/builtin/nextjs-worker.js +55 -0
- package/dist/src/skills/builtin/nextjs-worker.js.map +1 -0
- package/dist/src/skills/builtin/real-workers.js +166 -0
- package/dist/src/skills/builtin/real-workers.js.map +1 -0
- package/dist/src/skills/builtin/sql-worker.js +61 -0
- package/dist/src/skills/builtin/sql-worker.js.map +1 -0
- package/dist/src/skills/builtin/test-worker.js +79 -0
- package/dist/src/skills/builtin/test-worker.js.map +1 -0
- package/dist/src/skills/builtin/web-research.js +77 -0
- package/dist/src/skills/builtin/web-research.js.map +1 -0
- package/dist/src/skills/framework.js +250 -0
- package/dist/src/skills/framework.js.map +1 -0
- package/dist/src/skills/index.js +12 -10
- package/dist/src/skills/index.js.map +1 -1
- package/dist/src/streaming/block-streamer.js +172 -0
- package/dist/src/streaming/block-streamer.js.map +1 -0
- package/dist/src/streaming/index.js +2 -0
- package/dist/src/streaming/index.js.map +1 -0
- package/dist/src/workspace/index.js +2 -0
- package/dist/src/workspace/index.js.map +1 -0
- package/dist/src/workspace/manager.js +181 -0
- package/dist/src/workspace/manager.js.map +1 -0
- package/package.json +5 -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..
|
|
@@ -34,244 +34,513 @@
|
|
|
34
34
|
........ ......... .........
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
> *"Your digital familiar - a personal AI assistant that learns, evolves, and helps you
|
|
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
|
+
---
|
|
90
|
+
|
|
91
|
+
## Multi-Channel Support 📱
|
|
92
|
+
|
|
93
|
+
Use your AI across multiple messaging platforms:
|
|
80
94
|
|
|
81
95
|
```bash
|
|
82
|
-
#
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
96
|
+
# WhatsApp
|
|
97
|
+
0xkobold whatsapp start # Scan QR code
|
|
98
|
+
0xkobold whatsapp send 123456 "Hello"
|
|
99
|
+
|
|
100
|
+
# Telegram
|
|
101
|
+
TELEGRAM_BOT_TOKEN=xxx 0xkobold telegram start
|
|
86
102
|
|
|
87
|
-
#
|
|
88
|
-
|
|
103
|
+
# Slack
|
|
104
|
+
0xkobold slack send "Hello team!"
|
|
89
105
|
|
|
90
|
-
#
|
|
91
|
-
|
|
106
|
+
# Discord
|
|
107
|
+
0xkobold gateway start --discord
|
|
92
108
|
```
|
|
93
109
|
|
|
94
|
-
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Remote/VPS Deployment 🌐
|
|
95
113
|
|
|
114
|
+
Run AI on VPS, use lightweight TUI locally:
|
|
115
|
+
|
|
116
|
+
### VPS Side
|
|
117
|
+
```bash
|
|
118
|
+
# On your VPS
|
|
119
|
+
0xkobold gateway start --host 0.0.0.0
|
|
120
|
+
|
|
121
|
+
# Or with Tailscale (no port forwarding!)
|
|
122
|
+
0xkobold tailscale start
|
|
96
123
|
```
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
|
|
124
|
+
|
|
125
|
+
### Laptop Side
|
|
126
|
+
```bash
|
|
127
|
+
# Direct connection
|
|
128
|
+
0xkobold tui --remote wss://vps.example.com:7777
|
|
129
|
+
|
|
130
|
+
# Via Tailscale (secure, private)
|
|
131
|
+
0xkobold tui --remote $(0xkobold tailscale url)
|
|
112
132
|
```
|
|
113
133
|
|
|
114
|
-
|
|
134
|
+
---
|
|
115
135
|
|
|
116
|
-
|
|
136
|
+
## Security Features 🛡️
|
|
117
137
|
|
|
138
|
+
### Docker Sandboxing
|
|
118
139
|
```typescript
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
parameters: {
|
|
133
|
-
type: 'object',
|
|
134
|
-
properties: {
|
|
135
|
-
name: { type: 'string', description: 'Name to greet' },
|
|
136
|
-
},
|
|
137
|
-
required: ['name'],
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
-
async execute(args) {
|
|
143
|
-
return { message: `Hello, ${args.name}!` };
|
|
144
|
-
},
|
|
145
|
-
};
|
|
140
|
+
import { getDockerRunner } from "0xkobold/sandbox";
|
|
141
|
+
|
|
142
|
+
const runner = getDockerRunner({
|
|
143
|
+
image: "node:20-slim",
|
|
144
|
+
memoryLimit: "512m",
|
|
145
|
+
network: "none", // Isolated
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
await runner.run({
|
|
149
|
+
command: "node",
|
|
150
|
+
args: ["-e", "console.log('Safe execution')"],
|
|
151
|
+
});
|
|
152
|
+
```
|
|
146
153
|
|
|
147
|
-
|
|
154
|
+
### Device Authentication
|
|
155
|
+
```bash
|
|
156
|
+
0xkobold device init "My Laptop"
|
|
157
|
+
0xkobold device token generate
|
|
158
|
+
0xkobold device list
|
|
148
159
|
```
|
|
149
160
|
|
|
150
|
-
|
|
161
|
+
---
|
|
151
162
|
|
|
152
|
-
##
|
|
163
|
+
## Media Support 🖼️
|
|
153
164
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
- `high` - Explicit approval for dangerous operations (shell, delete)
|
|
165
|
+
### Vision (Image Analysis)
|
|
166
|
+
```typescript
|
|
167
|
+
import { VisionAnalyzer } from "0xkobold/media";
|
|
158
168
|
|
|
159
|
-
|
|
169
|
+
const vision = new VisionAnalyzer({
|
|
170
|
+
provider: "claude",
|
|
171
|
+
apiKey: process.env.ANTHROPIC_API_KEY,
|
|
172
|
+
});
|
|
160
173
|
|
|
161
|
-
|
|
174
|
+
const result = await vision.analyzeImage("./image.png");
|
|
175
|
+
console.log(result.description);
|
|
176
|
+
console.log(result.objects);
|
|
177
|
+
```
|
|
162
178
|
|
|
179
|
+
### Audio Transcription
|
|
163
180
|
```typescript
|
|
164
|
-
|
|
181
|
+
import { AudioTranscriber } from "0xkobold/media";
|
|
182
|
+
|
|
183
|
+
const audio = new AudioTranscriber({
|
|
184
|
+
provider: "openai",
|
|
185
|
+
apiKey: process.env.OPENAI_API_KEY,
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
const result = await audio.transcribeFile("./voice.mp3");
|
|
189
|
+
console.log(result.text);
|
|
190
|
+
console.log(result.segments); // Timestamps
|
|
165
191
|
```
|
|
166
192
|
|
|
167
|
-
|
|
193
|
+
### PDF Processing
|
|
194
|
+
```typescript
|
|
195
|
+
import { extractPDF } from "0xkobold/documents";
|
|
168
196
|
|
|
169
|
-
|
|
197
|
+
const result = await extractPDF("./document.pdf");
|
|
198
|
+
console.log(result.text);
|
|
199
|
+
console.log(result.metadata.title);
|
|
200
|
+
console.log(result.pages);
|
|
201
|
+
```
|
|
170
202
|
|
|
171
|
-
|
|
203
|
+
---
|
|
172
204
|
|
|
173
|
-
|
|
205
|
+
## Duplicate Detection 🔍
|
|
174
206
|
|
|
175
|
-
|
|
207
|
+
Check before adding to avoid duplication:
|
|
176
208
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
# Select "Ollama Cloud"
|
|
181
|
-
# Paste your API key
|
|
182
|
-
```
|
|
209
|
+
```bash
|
|
210
|
+
# Check before implementing
|
|
211
|
+
0xkobold check "WhatsApp integration"
|
|
183
212
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
/ollama-mode cloud # Use cloud exclusively
|
|
187
|
-
/ollama-mode local # Use local Ollama
|
|
188
|
-
/ollama-mode auto # Auto-detect (default)
|
|
189
|
-
```
|
|
213
|
+
# Check specific function
|
|
214
|
+
0xkobold check -f calculateSum
|
|
190
215
|
|
|
191
|
-
|
|
216
|
+
# Check class
|
|
217
|
+
0xkobold check -c UserManager
|
|
218
|
+
```
|
|
192
219
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
220
|
+
**Output:**
|
|
221
|
+
```
|
|
222
|
+
⚡ SIMILAR IMPLEMENTATIONS FOUND
|
|
223
|
+
Best match: 90% at src/channels/whatsapp/integration.ts
|
|
197
224
|
|
|
198
|
-
|
|
225
|
+
Suggestion: Review existing code before creating new implementation.
|
|
226
|
+
```
|
|
199
227
|
|
|
200
|
-
|
|
201
|
-
- `/ollama-status` - Check cloud connection
|
|
202
|
-
- `/ollama-local` - Switch to local mode
|
|
203
|
-
- `/ollama-cloud` - Switch to cloud mode
|
|
228
|
+
---
|
|
204
229
|
|
|
205
|
-
|
|
230
|
+
## Migration from OpenClaw 🔄
|
|
206
231
|
|
|
207
|
-
|
|
232
|
+
Migrating from OpenClaw (koclaw)? We got you:
|
|
208
233
|
|
|
209
234
|
```bash
|
|
210
|
-
#
|
|
211
|
-
|
|
235
|
+
# Preview migration
|
|
236
|
+
0xkobold migrate --dry-run
|
|
212
237
|
|
|
213
|
-
#
|
|
214
|
-
0xkobold
|
|
215
|
-
|
|
216
|
-
0xkobold tui
|
|
238
|
+
# Execute migration (with automatic backup)
|
|
239
|
+
0xkobold migrate --live
|
|
240
|
+
```
|
|
217
241
|
|
|
218
|
-
|
|
219
|
-
|
|
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
|
|
220
253
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
0xkobold stop # Stop daemon
|
|
225
|
-
0xkobold status # Check status
|
|
226
|
-
0xkobold logs # View logs
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Project Structure
|
|
227
257
|
|
|
228
|
-
# Using npx (no install)
|
|
229
|
-
npx 0xkobold
|
|
230
|
-
npx 0xkobold tui --local
|
|
231
258
|
```
|
|
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
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
---
|
|
232
285
|
|
|
233
286
|
## Configuration
|
|
234
287
|
|
|
235
|
-
|
|
288
|
+
Global config: `~/.0xkobold/config.json`
|
|
289
|
+
|
|
290
|
+
### Option 1: Ollama (Local - Default)
|
|
236
291
|
|
|
237
292
|
```json
|
|
238
293
|
{
|
|
239
|
-
"
|
|
240
|
-
|
|
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
|
|
241
301
|
},
|
|
242
|
-
"
|
|
243
|
-
"
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
302
|
+
"gateway": {
|
|
303
|
+
"port": 7777,
|
|
304
|
+
"host": "localhost"
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
```
|
|
308
|
+
|
|
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
|
|
316
|
+
|
|
317
|
+
# Start Ollama
|
|
318
|
+
ollama serve
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
### Option 2: Claude (Cloud)
|
|
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
|
+
}
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
**Setup:**
|
|
337
|
+
```bash
|
|
338
|
+
# Get API key from https://console.anthropic.com
|
|
339
|
+
export ANTHROPIC_API_KEY=sk-ant-xxx
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### Option 3: OpenAI (Cloud)
|
|
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
|
+
}
|
|
355
|
+
```
|
|
356
|
+
|
|
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
|
|
247
372
|
},
|
|
248
373
|
"gateway": {
|
|
249
374
|
"enabled": true,
|
|
250
|
-
"port":
|
|
375
|
+
"port": 7777,
|
|
376
|
+
"host": "localhost",
|
|
377
|
+
"remote": {
|
|
378
|
+
"enabled": false
|
|
379
|
+
}
|
|
251
380
|
},
|
|
252
|
-
"
|
|
253
|
-
"enabled": false,
|
|
254
|
-
"
|
|
381
|
+
"channels": {
|
|
382
|
+
"discord": { "enabled": false },
|
|
383
|
+
"whatsapp": { "enabled": true },
|
|
384
|
+
"telegram": { "enabled": false },
|
|
385
|
+
"slack": { "enabled": false }
|
|
255
386
|
}
|
|
256
387
|
}
|
|
257
388
|
```
|
|
258
389
|
|
|
259
|
-
|
|
390
|
+
---
|
|
391
|
+
|
|
392
|
+
## CLI Commands
|
|
393
|
+
|
|
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
|
+
```
|
|
401
|
+
|
|
402
|
+
### Channels
|
|
403
|
+
```bash
|
|
404
|
+
0xkobold whatsapp start|stop|status|send
|
|
405
|
+
0xkobold telegram start|stop|status
|
|
406
|
+
0xkobold slack webhook <message>
|
|
407
|
+
```
|
|
408
|
+
|
|
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
|
+
```
|
|
415
|
+
|
|
416
|
+
### Security
|
|
260
417
|
```bash
|
|
261
|
-
0xkobold
|
|
418
|
+
0xkobold device init <name>
|
|
419
|
+
0xkobold device token generate
|
|
420
|
+
0xkobold device list
|
|
262
421
|
```
|
|
263
422
|
|
|
264
|
-
|
|
423
|
+
### Development
|
|
424
|
+
```bash
|
|
425
|
+
0xkobold check <description|function|class>
|
|
426
|
+
0xkobold migrate --dry-run|live
|
|
427
|
+
0xkobold status
|
|
428
|
+
0xkobold logs
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
---
|
|
432
|
+
|
|
433
|
+
## Compared to OpenClaw
|
|
434
|
+
|
|
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 |
|
|
445
|
+
|
|
446
|
+
**Our Philosophy:** OpenClaw power, 10x simpler.
|
|
447
|
+
|
|
448
|
+
---
|
|
449
|
+
|
|
450
|
+
## API Usage
|
|
451
|
+
|
|
452
|
+
### Gateway Client (Remote)
|
|
453
|
+
```typescript
|
|
454
|
+
import { GatewayClient } from "0xkobold/gateway";
|
|
455
|
+
|
|
456
|
+
const client = new GatewayClient({
|
|
457
|
+
url: "wss://your-vps.com:7777",
|
|
458
|
+
token: "xxx",
|
|
459
|
+
autoReconnect: true,
|
|
460
|
+
});
|
|
461
|
+
|
|
462
|
+
await client.connect();
|
|
463
|
+
client.chat("Hello from my laptop");
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
### Sandbox
|
|
467
|
+
```typescript
|
|
468
|
+
import { getDockerRunner } from "0xkobold/sandbox";
|
|
469
|
+
|
|
470
|
+
const runner = getDockerRunner({
|
|
471
|
+
memoryLimit: "256m",
|
|
472
|
+
cpuLimit: "0.5",
|
|
473
|
+
network: "none",
|
|
474
|
+
});
|
|
475
|
+
|
|
476
|
+
const result = await runner.run({
|
|
477
|
+
command: "node",
|
|
478
|
+
args: ["script.js"],
|
|
479
|
+
});
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
### Duplicate Detection
|
|
483
|
+
```typescript
|
|
484
|
+
import { getDuplicateDetector } from "0xkobold/skills";
|
|
485
|
+
|
|
486
|
+
const detector = getDuplicateDetector();
|
|
487
|
+
const result = await detector.check("New feature");
|
|
488
|
+
|
|
489
|
+
if (result.exists) {
|
|
490
|
+
console.log("Already exists!", result.matches[0].file);
|
|
491
|
+
}
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
---
|
|
265
495
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
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
|
+
---
|
|
274
537
|
|
|
275
538
|
## License
|
|
276
539
|
|
|
277
|
-
MIT
|
|
540
|
+
MIT © 2025
|
|
541
|
+
|
|
542
|
+
---
|
|
543
|
+
|
|
544
|
+
**Built while you sleep by your Digital Familiar** 🐉
|
|
545
|
+
|
|
546
|
+
*Join the future of personal AI at [0xkobold](https://github.com/moikapy/0xkobold)*
|