@kernel.chat/kbot 3.16.0 → 3.17.1
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/README.md +20 -25
- package/dist/cli.js +63 -11
- package/dist/cli.js.map +1 -1
- package/dist/consultation.test.d.ts +2 -0
- package/dist/consultation.test.d.ts.map +1 -0
- package/dist/consultation.test.js +86 -0
- package/dist/consultation.test.js.map +1 -0
- package/dist/email-agent.d.ts +1 -0
- package/dist/email-agent.d.ts.map +1 -1
- package/dist/email-agent.js +5 -4
- package/dist/email-agent.js.map +1 -1
- package/dist/init.d.ts +23 -0
- package/dist/init.d.ts.map +1 -0
- package/dist/init.js +355 -0
- package/dist/init.js.map +1 -0
- package/dist/init.test.d.ts +2 -0
- package/dist/init.test.d.ts.map +1 -0
- package/dist/init.test.js +89 -0
- package/dist/init.test.js.map +1 -0
- package/dist/memory-synthesis.test.d.ts +2 -0
- package/dist/memory-synthesis.test.d.ts.map +1 -0
- package/dist/memory-synthesis.test.js +83 -0
- package/dist/memory-synthesis.test.js.map +1 -0
- package/dist/share.js +1 -1
- package/dist/share.js.map +1 -1
- package/dist/tools/audit.d.ts.map +1 -1
- package/dist/tools/audit.js +18 -1
- package/dist/tools/audit.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,26 +19,22 @@
|
|
|
19
19
|
npm install -g @kernel.chat/kbot
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
**
|
|
22
|
+
**Multi-channel AI agent. 290+ tools. 25 agents. 20 providers. Forges new tools at runtime. $0 local AI. MIT licensed.**
|
|
23
23
|
|
|
24
24
|
---
|
|
25
25
|
|
|
26
|
-
## What's New in v3.
|
|
26
|
+
## What's New in v3.17
|
|
27
27
|
|
|
28
28
|
| Feature | What it means |
|
|
29
29
|
|---------|---------------|
|
|
30
|
-
|
|
|
31
|
-
| **
|
|
32
|
-
| **
|
|
33
|
-
| **
|
|
34
|
-
| **
|
|
35
|
-
| **
|
|
36
|
-
| **
|
|
37
|
-
| **
|
|
38
|
-
| **Prompt Evolution** | GEPA-style self-optimizing prompts — evolve from execution traces, auto-rollback bad mutations. |
|
|
39
|
-
| **Collective Learning** | Opt-in anonymized signals. More users → smarter routing for everyone. |
|
|
40
|
-
| **A2A Protocol** | Agent-to-Agent discovery and task delegation. |
|
|
41
|
-
| **11 Cognitive Modules** | Based on peer-reviewed papers. Not metaphors — TypeScript implementations. |
|
|
30
|
+
| **`kbot init`** | 60-second project onboarding — detects stack, forges project-specific tools, writes config. First impression is now magic. |
|
|
31
|
+
| **Email Agent** | `kbot email-agent start --open` — autonomous email companion via local Ollama. $0 cost. Anyone emails, gets a response. |
|
|
32
|
+
| **iMessage Agent** | `kbot imessage-agent start` — free SMS/iMessage agent on macOS via Messages.app. Unlimited, $0. |
|
|
33
|
+
| **Audit Badges** | `kbot audit owner/repo --share` — generates shields.io badge + shareable Gist. Badge links back to kbot. |
|
|
34
|
+
| **Consultation Engine** | Domain guardrails (legal/medical/financial/tax), client intake, Stripe integration, thread management. |
|
|
35
|
+
| **Gamedev Agent** | `kbot --agent gamedev` — game feel, combat design, Phaser 3, procedural generation specialist. |
|
|
36
|
+
| **Playtester Agent** | `kbot --agent playtester` — brutally honest game tester. Benchmarks against Hades/Dead Cells. |
|
|
37
|
+
| **Open Email** | No whitelist. All inbound emails to support@kernel.chat get a free AI companion response. |
|
|
42
38
|
|
|
43
39
|
---
|
|
44
40
|
|
|
@@ -53,7 +49,7 @@ Other AI agents are static — fixed tools, single providers, no memory, no lear
|
|
|
53
49
|
- **20 providers, zero lock-in** — Claude, GPT, Gemini, Grok, DeepSeek, Groq, Mistral, and 13 more. Switch anytime.
|
|
54
50
|
- **Runs fully offline** — Embedded llama.cpp runs GGUF models directly. No Ollama needed. $0, fully private.
|
|
55
51
|
- **Learns your patterns** — Bayesian skill ratings + pattern extraction. Gets faster and smarter over time.
|
|
56
|
-
- **
|
|
52
|
+
- **25 specialist agents** — Say "fix the auth bug" and it routes to `coder`. Say "research JWT tokens" and it routes to `researcher`. Auto-routed with probabilistic confidence.
|
|
57
53
|
- **Crash-proof** — Checkpoints after every tool call. Resume interrupted sessions automatically.
|
|
58
54
|
- **Use as a library** — Clean SDK with typed exports. Build your own tools on top of kbot.
|
|
59
55
|
- **Works in your IDE** — Built-in MCP server for VS Code, Cursor, Zed, Neovim. ACP for JetBrains.
|
|
@@ -136,7 +132,7 @@ for await (const event of agent.stream("explain this code")) {
|
|
|
136
132
|
const files = await tools.execute('glob', { pattern: 'src/**/*.ts' })
|
|
137
133
|
console.log(files.result)
|
|
138
134
|
|
|
139
|
-
// List all 290 tools
|
|
135
|
+
// List all 290+ tools
|
|
140
136
|
console.log(tools.list().map(t => t.name))
|
|
141
137
|
```
|
|
142
138
|
|
|
@@ -158,7 +154,7 @@ Auto-routed by Bayesian skill ratings, or pick one with `kbot --agent <name>`:
|
|
|
158
154
|
| **Extended** | aesthete, guardian, curator, strategist |
|
|
159
155
|
| **Domain** | infrastructure, quant, investigator, oracle, chronist, sage, communicator, adapter |
|
|
160
156
|
| **System** | immune, forge |
|
|
161
|
-
| **Presets** |
|
|
157
|
+
| **Presets** | hacker, operator, dreamer, creative, developer, gamedev, playtester |
|
|
162
158
|
|
|
163
159
|
```bash
|
|
164
160
|
kbot --agent researcher "what papers cite Friston's Free Energy Principle?"
|
|
@@ -166,7 +162,7 @@ kbot --agent guardian "review src/auth.ts for security issues"
|
|
|
166
162
|
kbot --agent coder "refactor this into smaller functions"
|
|
167
163
|
```
|
|
168
164
|
|
|
169
|
-
## 290 Tools
|
|
165
|
+
## 290+ Tools
|
|
170
166
|
|
|
171
167
|
| Category | Examples |
|
|
172
168
|
|----------|---------|
|
|
@@ -308,23 +304,22 @@ Works with Claude Code, Cursor, VS Code, Windsurf, Zed, Neovim. Exposes file ops
|
|
|
308
304
|
|---------|-------------|
|
|
309
305
|
| `kbot` | Interactive REPL |
|
|
310
306
|
| `kbot "prompt"` | One-shot execution |
|
|
307
|
+
| `kbot init` | **60-second project onboarding** — detects stack, forges tools, writes config |
|
|
311
308
|
| `kbot auth` | Configure API key |
|
|
312
309
|
| `kbot local` | Use local AI (Ollama, embedded, LM Studio, Jan) |
|
|
310
|
+
| `kbot email-agent start --open` | **Email companion** — responds to all inbound via local AI ($0) |
|
|
311
|
+
| `kbot imessage-agent start` | **iMessage agent** — free SMS/iMessage on macOS |
|
|
312
|
+
| `kbot audit <repo>` | Security + quality audit with shareable badge |
|
|
313
|
+
| `kbot consultation` | Consultation engine — guardrails, intake, client management |
|
|
313
314
|
| `kbot vitals` | Autopoietic health check — memory, tools, token budgets |
|
|
315
|
+
| `kbot synthesis` | What kbot knows — memory, patterns, insights |
|
|
314
316
|
| `kbot serve` | Start HTTP REST + SSE streaming server |
|
|
315
|
-
| `kbot audit <repo>` | Security + quality audit of any GitHub repo |
|
|
316
317
|
| `kbot contribute <repo>` | Find good-first-issues and quick wins |
|
|
317
|
-
| `kbot pair` | File watcher with auto-analysis |
|
|
318
|
-
| `kbot team` | Multi-agent TCP collaboration |
|
|
319
|
-
| `kbot record` | Terminal session recording (SVG, GIF, asciicast) |
|
|
320
318
|
| `kbot voice` | Text-to-speech output mode |
|
|
321
319
|
| `kbot watch` | Real-time file analysis on change |
|
|
322
320
|
| `kbot bootstrap` | Outer-loop project optimizer (visibility scoring) |
|
|
323
321
|
| `kbot plugins` | Search, install, update community plugins |
|
|
324
322
|
| `kbot models` | List, pull, remove, catalog local models |
|
|
325
|
-
| `kbot changelog` | Generate changelog from git history |
|
|
326
|
-
| `kbot completions` | Shell completions (bash, zsh, fish) |
|
|
327
|
-
| `kbot cloud` | Sync learning data to kernel.chat |
|
|
328
323
|
| `kbot forge search <q>` | Search the Forge Registry for community tools |
|
|
329
324
|
| `kbot ide mcp` | Start MCP server for IDEs |
|
|
330
325
|
| `kbot doctor` | 10-point health check |
|
package/dist/cli.js
CHANGED
|
@@ -360,6 +360,40 @@ async function main() {
|
|
|
360
360
|
printInfo('Download: kbot models pull <name>');
|
|
361
361
|
printInfo('Or use any HuggingFace GGUF: kbot models pull hf:user/repo:file.gguf');
|
|
362
362
|
});
|
|
363
|
+
program
|
|
364
|
+
.command('init')
|
|
365
|
+
.description('Set up kbot for this project — detects stack, creates tools, writes config (60 seconds)')
|
|
366
|
+
.option('--force', 'Overwrite existing .kbot.json')
|
|
367
|
+
.action(async (opts) => {
|
|
368
|
+
const { existsSync } = await import('node:fs');
|
|
369
|
+
const { join } = await import('node:path');
|
|
370
|
+
const { initProject, formatInitReport } = await import('./init.js');
|
|
371
|
+
const chalk = (await import('chalk')).default;
|
|
372
|
+
const AMETHYST = chalk.hex('#6B5B95');
|
|
373
|
+
const root = process.cwd();
|
|
374
|
+
// Check for existing config
|
|
375
|
+
if (!opts.force && existsSync(join(root, '.kbot.json'))) {
|
|
376
|
+
printWarn('This project already has a .kbot.json. Use --force to overwrite.');
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
process.stderr.write('\n');
|
|
380
|
+
process.stderr.write(` ${AMETHYST('◉')} ${chalk.bold('kbot init')} — scanning project...\n\n`);
|
|
381
|
+
const config = await initProject(root);
|
|
382
|
+
process.stderr.write(formatInitReport(config) + '\n');
|
|
383
|
+
process.stderr.write('\n');
|
|
384
|
+
process.stderr.write(` ${chalk.green('✓')} Config written to ${chalk.dim('.kbot.json')}\n`);
|
|
385
|
+
if (config.forgedTools.length > 0) {
|
|
386
|
+
process.stderr.write(` ${chalk.green('✓')} ${config.forgedTools.length} tools forged: ${chalk.dim(config.forgedTools.join(', '))}\n`);
|
|
387
|
+
}
|
|
388
|
+
process.stderr.write('\n');
|
|
389
|
+
process.stderr.write(` ${chalk.bold('Try now:')}\n`);
|
|
390
|
+
process.stderr.write(` ${chalk.cyan('kbot')} "explain this project"\n`);
|
|
391
|
+
process.stderr.write(` ${chalk.cyan('kbot')} "find the top bug"\n`);
|
|
392
|
+
if (config.commands.test) {
|
|
393
|
+
process.stderr.write(` ${chalk.cyan('kbot')} "run the tests and fix any failures"\n`);
|
|
394
|
+
}
|
|
395
|
+
process.stderr.write('\n');
|
|
396
|
+
});
|
|
363
397
|
program
|
|
364
398
|
.command('doctor')
|
|
365
399
|
.description('Diagnose your kbot setup — check everything is working')
|
|
@@ -1402,7 +1436,8 @@ async function main() {
|
|
|
1402
1436
|
.description('Start the email agent — polls for new emails and responds via Ollama')
|
|
1403
1437
|
.option('--model <model>', 'Ollama model to use', 'qwen2.5-coder:32b')
|
|
1404
1438
|
.option('--interval <ms>', 'Poll interval in milliseconds', '15000')
|
|
1405
|
-
.option('--users <emails>', 'Comma-separated
|
|
1439
|
+
.option('--users <emails>', 'Comma-separated email addresses to monitor (omit for open mode — all inbound)')
|
|
1440
|
+
.option('--open', 'Open mode — respond to ALL inbound emails (no whitelist)')
|
|
1406
1441
|
.action(async (opts) => {
|
|
1407
1442
|
const { startEmailAgent } = await import('./email-agent.js');
|
|
1408
1443
|
const { existsSync, readFileSync } = await import('node:fs');
|
|
@@ -1428,15 +1463,16 @@ async function main() {
|
|
|
1428
1463
|
return;
|
|
1429
1464
|
}
|
|
1430
1465
|
const agentUsers = opts.users?.split(',').map(e => e.trim()) || [];
|
|
1431
|
-
if (agentUsers.length === 0) {
|
|
1432
|
-
printError('No users specified. Use --users email1,email2
|
|
1466
|
+
if (agentUsers.length === 0 && !opts.open) {
|
|
1467
|
+
printError('No users specified. Use --users email1,email2 or --open for all inbound.');
|
|
1433
1468
|
return;
|
|
1434
1469
|
}
|
|
1435
1470
|
const chalk = (await import('chalk')).default;
|
|
1471
|
+
const mode = agentUsers.length === 0 ? 'OPEN (all inbound)' : `${agentUsers.length} users`;
|
|
1436
1472
|
console.log();
|
|
1437
1473
|
console.log(chalk.hex('#6B5B95')(' ◉ Kernel Email Agent'));
|
|
1438
1474
|
console.log(chalk.dim(` Model: ${opts.model || 'qwen2.5-coder:32b'}`));
|
|
1439
|
-
console.log(chalk.dim(`
|
|
1475
|
+
console.log(chalk.dim(` Mode: ${mode}`));
|
|
1440
1476
|
console.log(chalk.dim(` Poll interval: ${Number(opts.interval || 15000) / 1000}s`));
|
|
1441
1477
|
console.log();
|
|
1442
1478
|
await startEmailAgent({
|
|
@@ -1469,7 +1505,7 @@ async function main() {
|
|
|
1469
1505
|
}
|
|
1470
1506
|
}
|
|
1471
1507
|
else {
|
|
1472
|
-
printInfo('Email agent is not running. Start with: kbot email-agent start --
|
|
1508
|
+
printInfo('Email agent is not running. Start with: kbot email-agent start --open');
|
|
1473
1509
|
}
|
|
1474
1510
|
});
|
|
1475
1511
|
// ── iMessage Agent ──
|
|
@@ -1627,24 +1663,40 @@ async function main() {
|
|
|
1627
1663
|
});
|
|
1628
1664
|
program
|
|
1629
1665
|
.command('audit <repo>')
|
|
1630
|
-
.description('Full audit of any GitHub repository — security, quality, docs, DevOps')
|
|
1631
|
-
.option('--share', '
|
|
1666
|
+
.description('Full audit of any GitHub repository — security, quality, docs, DevOps. Generates shareable report with badge.')
|
|
1667
|
+
.option('--share', 'Auto-share the report as a public GitHub Gist')
|
|
1668
|
+
.option('--json', 'Output raw JSON')
|
|
1669
|
+
.option('--badge', 'Print only the badge markdown (for adding to READMEs)')
|
|
1632
1670
|
.action(async (repo, auditOpts) => {
|
|
1633
1671
|
const { auditRepo, formatAuditReport } = await import('./tools/audit.js');
|
|
1634
1672
|
printInfo(`Auditing ${repo}...`);
|
|
1635
1673
|
try {
|
|
1636
1674
|
const result = await auditRepo(repo);
|
|
1675
|
+
if (auditOpts.json) {
|
|
1676
|
+
console.log(JSON.stringify(result, null, 2));
|
|
1677
|
+
return;
|
|
1678
|
+
}
|
|
1679
|
+
if (auditOpts.badge) {
|
|
1680
|
+
const pct = Math.round((result.score / result.maxScore) * 100);
|
|
1681
|
+
const badgeColor = pct >= 80 ? 'brightgreen' : pct >= 60 ? 'yellow' : 'red';
|
|
1682
|
+
console.log(`[-${badgeColor})](https://www.npmjs.com/package/@kernel.chat/kbot)`);
|
|
1683
|
+
return;
|
|
1684
|
+
}
|
|
1637
1685
|
const report = formatAuditReport(result);
|
|
1638
1686
|
console.log(report);
|
|
1687
|
+
// Auto-share as gist
|
|
1639
1688
|
if (auditOpts.share) {
|
|
1640
|
-
const { shareConversation } = await import('./share.js');
|
|
1641
|
-
// Save as a pseudo-conversation for sharing
|
|
1642
1689
|
printInfo('Sharing audit report...');
|
|
1643
1690
|
try {
|
|
1644
1691
|
const { createGist } = await import('./share.js');
|
|
1645
|
-
const url = createGist(report, `kbot-audit-${repo.replace('/', '-')}.md`, `kbot Audit: ${repo}`, true);
|
|
1646
|
-
if (url?.startsWith('http'))
|
|
1692
|
+
const url = createGist(report, `kbot-audit-${repo.replace('/', '-')}.md`, `kbot Audit: ${repo} — Grade ${result.grade}`, true);
|
|
1693
|
+
if (url?.startsWith('http')) {
|
|
1647
1694
|
printSuccess(`Shared! ${url}`);
|
|
1695
|
+
printInfo(`Badge for ${repo}'s README:`);
|
|
1696
|
+
const pct = Math.round((result.score / result.maxScore) * 100);
|
|
1697
|
+
const badgeColor = pct >= 80 ? 'brightgreen' : pct >= 60 ? 'yellow' : 'red';
|
|
1698
|
+
printInfo(` [-${badgeColor})](${url})`);
|
|
1699
|
+
}
|
|
1648
1700
|
}
|
|
1649
1701
|
catch {
|
|
1650
1702
|
printInfo('Could not create Gist. Install GitHub CLI: brew install gh');
|