@stevederico/dotbot 0.16.1 → 0.18.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/CHANGELOG.md +14 -0
- package/README.md +10 -10
- package/bin/dotbot.js +50 -17
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
0.18
|
|
2
|
+
|
|
3
|
+
Add --verbose flag
|
|
4
|
+
Hide init logs by default
|
|
5
|
+
Add publishConfig for npm
|
|
6
|
+
|
|
7
|
+
0.17
|
|
8
|
+
|
|
9
|
+
Default model grok-4-1-fast-reasoning
|
|
10
|
+
Show thinking stream
|
|
11
|
+
Remove chat keyword requirement
|
|
12
|
+
Suppress SQLite warning
|
|
13
|
+
Fix store init signatures
|
|
14
|
+
|
|
1
15
|
0.16.1
|
|
2
16
|
|
|
3
17
|
Fix store init signatures
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<img src="https://img.shields.io/github/stars/stevederico/dotbot?style=social" alt="GitHub stars">
|
|
13
13
|
</a>
|
|
14
14
|
<a href="https://github.com/stevederico/dotbot">
|
|
15
|
-
<img src="https://img.shields.io/badge/version-0.
|
|
15
|
+
<img src="https://img.shields.io/badge/version-0.18-green" alt="version">
|
|
16
16
|
</a>
|
|
17
17
|
<img src="https://img.shields.io/badge/LOC-11k-orange" alt="Lines of Code">
|
|
18
18
|
</p>
|
|
@@ -40,7 +40,7 @@ A **streaming AI agent** with tool execution, autonomous tasks, and scheduled jo
|
|
|
40
40
|
|
|
41
41
|
**As a CLI:**
|
|
42
42
|
```bash
|
|
43
|
-
dotbot
|
|
43
|
+
dotbot "What's the weather in San Francisco?"
|
|
44
44
|
dotbot repl
|
|
45
45
|
dotbot serve --port 3000
|
|
46
46
|
```
|
|
@@ -64,7 +64,7 @@ npm install -g @stevederico/dotbot
|
|
|
64
64
|
export XAI_API_KEY=xai-...
|
|
65
65
|
|
|
66
66
|
# Chat
|
|
67
|
-
dotbot
|
|
67
|
+
dotbot "Summarize the top 3 AI news stories today"
|
|
68
68
|
|
|
69
69
|
# Interactive REPL
|
|
70
70
|
dotbot repl
|
|
@@ -99,7 +99,7 @@ for await (const event of agent.chat({
|
|
|
99
99
|
sessionId: session.id,
|
|
100
100
|
message: 'Search for the latest AI news',
|
|
101
101
|
provider: 'xai',
|
|
102
|
-
model: 'grok-
|
|
102
|
+
model: 'grok-4-1-fast-reasoning',
|
|
103
103
|
})) {
|
|
104
104
|
if (event.type === 'text_delta') process.stdout.write(event.text);
|
|
105
105
|
}
|
|
@@ -126,7 +126,7 @@ for await (const event of agent.chat({
|
|
|
126
126
|
- **Weather** — Open-Meteo API (no key required)
|
|
127
127
|
|
|
128
128
|
### 🔌 **Multi-Provider Support**
|
|
129
|
-
- **xAI Grok** — grok-
|
|
129
|
+
- **xAI Grok** — grok-4-1-fast-reasoning, with real-time web search and image generation
|
|
130
130
|
- **Anthropic Claude** — claude-sonnet-4-5, claude-opus-4, etc.
|
|
131
131
|
- **OpenAI** — gpt-4o, gpt-4-turbo, etc.
|
|
132
132
|
- **Cerebras** — ultra-fast inference
|
|
@@ -147,16 +147,16 @@ for await (const event of agent.chat({
|
|
|
147
147
|
## CLI Reference
|
|
148
148
|
|
|
149
149
|
```
|
|
150
|
-
dotbot v0.
|
|
150
|
+
dotbot v0.18 — AI agent CLI
|
|
151
151
|
|
|
152
152
|
Usage:
|
|
153
|
-
dotbot
|
|
153
|
+
dotbot "message" Send a message (default)
|
|
154
154
|
dotbot repl Interactive chat session
|
|
155
155
|
dotbot serve [--port N] Start HTTP server (default: 3000)
|
|
156
156
|
|
|
157
157
|
Options:
|
|
158
158
|
--provider, -p AI provider: xai, anthropic, openai, ollama (default: xai)
|
|
159
|
-
--model, -m Model name (default: grok-
|
|
159
|
+
--model, -m Model name (default: grok-4-1-fast-reasoning)
|
|
160
160
|
--db SQLite database path (default: ./dotbot.db)
|
|
161
161
|
--port Server port for 'serve' command
|
|
162
162
|
--help, -h Show help
|
|
@@ -202,7 +202,7 @@ for await (const event of agent.chat({
|
|
|
202
202
|
sessionId: 'sess_123',
|
|
203
203
|
message: 'Hello',
|
|
204
204
|
provider: 'xai',
|
|
205
|
-
model: 'grok-
|
|
205
|
+
model: 'grok-4-1-fast-reasoning',
|
|
206
206
|
signal: abortController.signal, // optional
|
|
207
207
|
context: { userID: 'user123' }, // passed to tools
|
|
208
208
|
})) {
|
|
@@ -260,7 +260,7 @@ await agent.chat({
|
|
|
260
260
|
message: `Create a task to audit our API endpoints.
|
|
261
261
|
Break it into 5 steps, use auto mode.`,
|
|
262
262
|
provider: 'xai',
|
|
263
|
-
model: 'grok-
|
|
263
|
+
model: 'grok-4-1-fast-reasoning',
|
|
264
264
|
context: { userID: 'user-123' },
|
|
265
265
|
});
|
|
266
266
|
// Step 1 runs → schedules Step 2 → ... → task complete
|
package/bin/dotbot.js
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
// Suppress SQLite experimental warning (stable but still flagged in Node 24)
|
|
4
|
+
const originalEmit = process.emit;
|
|
5
|
+
process.emit = function (event, error) {
|
|
6
|
+
if (event === 'warning' && error?.name === 'ExperimentalWarning' && error?.message?.includes('SQLite')) {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
return originalEmit.apply(process, arguments);
|
|
10
|
+
};
|
|
11
|
+
|
|
3
12
|
/**
|
|
4
13
|
* dotbot CLI
|
|
5
14
|
*
|
|
@@ -41,7 +50,7 @@ async function loadModules() {
|
|
|
41
50
|
agentLoop = mod.agentLoop;
|
|
42
51
|
}
|
|
43
52
|
|
|
44
|
-
const VERSION = '0.
|
|
53
|
+
const VERSION = '0.18';
|
|
45
54
|
const DEFAULT_PORT = 3000;
|
|
46
55
|
const DEFAULT_DB = './dotbot.db';
|
|
47
56
|
|
|
@@ -53,15 +62,16 @@ function printHelp() {
|
|
|
53
62
|
dotbot v${VERSION} — AI agent CLI
|
|
54
63
|
|
|
55
64
|
Usage:
|
|
56
|
-
dotbot
|
|
65
|
+
dotbot "message" Send a message (default command)
|
|
57
66
|
dotbot repl Interactive chat session
|
|
58
67
|
dotbot serve [--port N] Start HTTP server (default: ${DEFAULT_PORT})
|
|
59
68
|
|
|
60
69
|
Options:
|
|
61
70
|
--provider, -p AI provider: xai, anthropic, openai, ollama (default: xai)
|
|
62
|
-
--model, -m Model name (default: grok-
|
|
71
|
+
--model, -m Model name (default: grok-4-1-fast-reasoning)
|
|
63
72
|
--db SQLite database path (default: ${DEFAULT_DB})
|
|
64
73
|
--port Server port for 'serve' command (default: ${DEFAULT_PORT})
|
|
74
|
+
--verbose Show initialization logs
|
|
65
75
|
--help, -h Show this help
|
|
66
76
|
--version, -v Show version
|
|
67
77
|
|
|
@@ -72,8 +82,9 @@ Environment Variables:
|
|
|
72
82
|
OLLAMA_BASE_URL Base URL for Ollama (default: http://localhost:11434)
|
|
73
83
|
|
|
74
84
|
Examples:
|
|
75
|
-
dotbot
|
|
76
|
-
dotbot
|
|
85
|
+
dotbot "What's the weather in SF?"
|
|
86
|
+
dotbot "Summarize the news" -p anthropic -m claude-sonnet-4-5
|
|
87
|
+
dotbot repl
|
|
77
88
|
dotbot serve --port 8080
|
|
78
89
|
`);
|
|
79
90
|
}
|
|
@@ -88,8 +99,9 @@ function parseCliArgs() {
|
|
|
88
99
|
options: {
|
|
89
100
|
help: { type: 'boolean', short: 'h', default: false },
|
|
90
101
|
version: { type: 'boolean', short: 'v', default: false },
|
|
102
|
+
verbose: { type: 'boolean', default: false },
|
|
91
103
|
provider: { type: 'string', short: 'p', default: 'xai' },
|
|
92
|
-
model: { type: 'string', short: 'm', default: 'grok-
|
|
104
|
+
model: { type: 'string', short: 'm', default: 'grok-4-1-fast-reasoning' },
|
|
93
105
|
db: { type: 'string', default: DEFAULT_DB },
|
|
94
106
|
port: { type: 'string', default: String(DEFAULT_PORT) },
|
|
95
107
|
},
|
|
@@ -139,11 +151,18 @@ async function getProviderConfig(providerId) {
|
|
|
139
151
|
* Initialize stores.
|
|
140
152
|
*
|
|
141
153
|
* @param {string} dbPath - Path to SQLite database
|
|
154
|
+
* @param {boolean} verbose - Show initialization logs
|
|
142
155
|
* @returns {Promise<Object>} Initialized stores
|
|
143
156
|
*/
|
|
144
|
-
async function initStores(dbPath) {
|
|
157
|
+
async function initStores(dbPath, verbose = false) {
|
|
145
158
|
await loadModules();
|
|
146
159
|
|
|
160
|
+
// Suppress init logs unless verbose
|
|
161
|
+
const originalLog = console.log;
|
|
162
|
+
if (!verbose) {
|
|
163
|
+
console.log = () => {};
|
|
164
|
+
}
|
|
165
|
+
|
|
147
166
|
const sessionStore = new stores.SQLiteSessionStore();
|
|
148
167
|
await sessionStore.init(dbPath, {
|
|
149
168
|
prefsFetcher: async () => ({ agentName: 'Dotbot', agentPersonality: '' }),
|
|
@@ -164,6 +183,9 @@ async function initStores(dbPath) {
|
|
|
164
183
|
const eventStore = new stores.SQLiteEventStore();
|
|
165
184
|
await eventStore.init(dbPath);
|
|
166
185
|
|
|
186
|
+
// Restore console.log
|
|
187
|
+
console.log = originalLog;
|
|
188
|
+
|
|
167
189
|
return { sessionStore, cronStore, taskStore, triggerStore, memoryStore, eventStore };
|
|
168
190
|
}
|
|
169
191
|
|
|
@@ -174,7 +196,7 @@ async function initStores(dbPath) {
|
|
|
174
196
|
* @param {Object} options - CLI options
|
|
175
197
|
*/
|
|
176
198
|
async function runChat(message, options) {
|
|
177
|
-
const storesObj = await initStores(options.db);
|
|
199
|
+
const storesObj = await initStores(options.db, options.verbose);
|
|
178
200
|
const provider = await getProviderConfig(options.provider);
|
|
179
201
|
|
|
180
202
|
const session = await storesObj.sessionStore.createSession('cli-user', options.model, options.provider);
|
|
@@ -198,6 +220,11 @@ async function runChat(message, options) {
|
|
|
198
220
|
context,
|
|
199
221
|
})) {
|
|
200
222
|
switch (event.type) {
|
|
223
|
+
case 'thinking':
|
|
224
|
+
if (event.text) {
|
|
225
|
+
process.stdout.write(`\x1b[2m${event.text}\x1b[0m`);
|
|
226
|
+
}
|
|
227
|
+
break;
|
|
201
228
|
case 'text_delta':
|
|
202
229
|
process.stdout.write(event.text);
|
|
203
230
|
break;
|
|
@@ -223,7 +250,7 @@ async function runChat(message, options) {
|
|
|
223
250
|
* @param {Object} options - CLI options
|
|
224
251
|
*/
|
|
225
252
|
async function runRepl(options) {
|
|
226
|
-
const storesObj = await initStores(options.db);
|
|
253
|
+
const storesObj = await initStores(options.db, options.verbose);
|
|
227
254
|
const provider = await getProviderConfig(options.provider);
|
|
228
255
|
|
|
229
256
|
const session = await storesObj.sessionStore.createSession('cli-user', options.model, options.provider);
|
|
@@ -280,6 +307,11 @@ async function runRepl(options) {
|
|
|
280
307
|
context,
|
|
281
308
|
})) {
|
|
282
309
|
switch (event.type) {
|
|
310
|
+
case 'thinking':
|
|
311
|
+
if (event.text) {
|
|
312
|
+
process.stdout.write(`\x1b[2m${event.text}\x1b[0m`);
|
|
313
|
+
}
|
|
314
|
+
break;
|
|
283
315
|
case 'text_delta':
|
|
284
316
|
process.stdout.write(event.text);
|
|
285
317
|
assistantContent += event.text;
|
|
@@ -318,7 +350,7 @@ async function runRepl(options) {
|
|
|
318
350
|
*/
|
|
319
351
|
async function runServer(options) {
|
|
320
352
|
const port = parseInt(options.port, 10);
|
|
321
|
-
const storesObj = await initStores(options.db);
|
|
353
|
+
const storesObj = await initStores(options.db, options.verbose);
|
|
322
354
|
|
|
323
355
|
const server = createServer(async (req, res) => {
|
|
324
356
|
// CORS headers
|
|
@@ -432,12 +464,12 @@ async function main() {
|
|
|
432
464
|
|
|
433
465
|
switch (command) {
|
|
434
466
|
case 'chat':
|
|
435
|
-
const
|
|
436
|
-
if (!
|
|
437
|
-
console.error('Usage: dotbot
|
|
467
|
+
const chatMessage = args.positionals.slice(1).join(' ');
|
|
468
|
+
if (!chatMessage) {
|
|
469
|
+
console.error('Usage: dotbot "your message"');
|
|
438
470
|
process.exit(1);
|
|
439
471
|
}
|
|
440
|
-
await runChat(
|
|
472
|
+
await runChat(chatMessage, args);
|
|
441
473
|
break;
|
|
442
474
|
|
|
443
475
|
case 'repl':
|
|
@@ -449,9 +481,10 @@ async function main() {
|
|
|
449
481
|
break;
|
|
450
482
|
|
|
451
483
|
default:
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
484
|
+
// Default to chat if not a recognized command
|
|
485
|
+
const message = args.positionals.join(' ');
|
|
486
|
+
await runChat(message, args);
|
|
487
|
+
break;
|
|
455
488
|
}
|
|
456
489
|
}
|
|
457
490
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stevederico/dotbot",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "AI agent CLI and library for Node.js — streaming, multi-provider, tool execution, autonomous tasks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -38,5 +38,8 @@
|
|
|
38
38
|
"repository": {
|
|
39
39
|
"type": "git",
|
|
40
40
|
"url": "https://github.com/stevederico/dotbot.git"
|
|
41
|
+
},
|
|
42
|
+
"publishConfig": {
|
|
43
|
+
"access": "public"
|
|
41
44
|
}
|
|
42
45
|
}
|