@stevederico/dotbot 0.17.0 → 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 +6 -0
- package/README.md +2 -2
- package/bin/dotbot.js +17 -5
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
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>
|
|
@@ -147,7 +147,7 @@ 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
153
|
dotbot "message" Send a message (default)
|
package/bin/dotbot.js
CHANGED
|
@@ -50,7 +50,7 @@ async function loadModules() {
|
|
|
50
50
|
agentLoop = mod.agentLoop;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
const VERSION = '0.
|
|
53
|
+
const VERSION = '0.18';
|
|
54
54
|
const DEFAULT_PORT = 3000;
|
|
55
55
|
const DEFAULT_DB = './dotbot.db';
|
|
56
56
|
|
|
@@ -71,6 +71,7 @@ Options:
|
|
|
71
71
|
--model, -m Model name (default: grok-4-1-fast-reasoning)
|
|
72
72
|
--db SQLite database path (default: ${DEFAULT_DB})
|
|
73
73
|
--port Server port for 'serve' command (default: ${DEFAULT_PORT})
|
|
74
|
+
--verbose Show initialization logs
|
|
74
75
|
--help, -h Show this help
|
|
75
76
|
--version, -v Show version
|
|
76
77
|
|
|
@@ -98,6 +99,7 @@ function parseCliArgs() {
|
|
|
98
99
|
options: {
|
|
99
100
|
help: { type: 'boolean', short: 'h', default: false },
|
|
100
101
|
version: { type: 'boolean', short: 'v', default: false },
|
|
102
|
+
verbose: { type: 'boolean', default: false },
|
|
101
103
|
provider: { type: 'string', short: 'p', default: 'xai' },
|
|
102
104
|
model: { type: 'string', short: 'm', default: 'grok-4-1-fast-reasoning' },
|
|
103
105
|
db: { type: 'string', default: DEFAULT_DB },
|
|
@@ -149,11 +151,18 @@ async function getProviderConfig(providerId) {
|
|
|
149
151
|
* Initialize stores.
|
|
150
152
|
*
|
|
151
153
|
* @param {string} dbPath - Path to SQLite database
|
|
154
|
+
* @param {boolean} verbose - Show initialization logs
|
|
152
155
|
* @returns {Promise<Object>} Initialized stores
|
|
153
156
|
*/
|
|
154
|
-
async function initStores(dbPath) {
|
|
157
|
+
async function initStores(dbPath, verbose = false) {
|
|
155
158
|
await loadModules();
|
|
156
159
|
|
|
160
|
+
// Suppress init logs unless verbose
|
|
161
|
+
const originalLog = console.log;
|
|
162
|
+
if (!verbose) {
|
|
163
|
+
console.log = () => {};
|
|
164
|
+
}
|
|
165
|
+
|
|
157
166
|
const sessionStore = new stores.SQLiteSessionStore();
|
|
158
167
|
await sessionStore.init(dbPath, {
|
|
159
168
|
prefsFetcher: async () => ({ agentName: 'Dotbot', agentPersonality: '' }),
|
|
@@ -174,6 +183,9 @@ async function initStores(dbPath) {
|
|
|
174
183
|
const eventStore = new stores.SQLiteEventStore();
|
|
175
184
|
await eventStore.init(dbPath);
|
|
176
185
|
|
|
186
|
+
// Restore console.log
|
|
187
|
+
console.log = originalLog;
|
|
188
|
+
|
|
177
189
|
return { sessionStore, cronStore, taskStore, triggerStore, memoryStore, eventStore };
|
|
178
190
|
}
|
|
179
191
|
|
|
@@ -184,7 +196,7 @@ async function initStores(dbPath) {
|
|
|
184
196
|
* @param {Object} options - CLI options
|
|
185
197
|
*/
|
|
186
198
|
async function runChat(message, options) {
|
|
187
|
-
const storesObj = await initStores(options.db);
|
|
199
|
+
const storesObj = await initStores(options.db, options.verbose);
|
|
188
200
|
const provider = await getProviderConfig(options.provider);
|
|
189
201
|
|
|
190
202
|
const session = await storesObj.sessionStore.createSession('cli-user', options.model, options.provider);
|
|
@@ -238,7 +250,7 @@ async function runChat(message, options) {
|
|
|
238
250
|
* @param {Object} options - CLI options
|
|
239
251
|
*/
|
|
240
252
|
async function runRepl(options) {
|
|
241
|
-
const storesObj = await initStores(options.db);
|
|
253
|
+
const storesObj = await initStores(options.db, options.verbose);
|
|
242
254
|
const provider = await getProviderConfig(options.provider);
|
|
243
255
|
|
|
244
256
|
const session = await storesObj.sessionStore.createSession('cli-user', options.model, options.provider);
|
|
@@ -338,7 +350,7 @@ async function runRepl(options) {
|
|
|
338
350
|
*/
|
|
339
351
|
async function runServer(options) {
|
|
340
352
|
const port = parseInt(options.port, 10);
|
|
341
|
-
const storesObj = await initStores(options.db);
|
|
353
|
+
const storesObj = await initStores(options.db, options.verbose);
|
|
342
354
|
|
|
343
355
|
const server = createServer(async (req, res) => {
|
|
344
356
|
// CORS headers
|
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
|
}
|