kernelbot 1.0.13 → 1.0.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kernelbot",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "KernelBot — AI engineering agent with full OS control",
5
5
  "type": "module",
6
6
  "author": "Abdullah Al-Taheri <abdullah@altaheri.me>",
package/src/coder.js CHANGED
@@ -5,6 +5,7 @@ export class ClaudeCodeSpawner {
5
5
  constructor(config) {
6
6
  this.maxTurns = config.claude_code?.max_turns || 50;
7
7
  this.timeout = (config.claude_code?.timeout_seconds || 600) * 1000;
8
+ this.model = config.claude_code?.model || null;
8
9
  }
9
10
 
10
11
  async run({ workingDirectory, prompt, maxTurns, onOutput }) {
@@ -15,6 +16,9 @@ export class ClaudeCodeSpawner {
15
16
 
16
17
  return new Promise((resolve, reject) => {
17
18
  const args = ['-p', prompt, '--max-turns', String(turns), '--output-format', 'text'];
19
+ if (this.model) {
20
+ args.push('--model', this.model);
21
+ }
18
22
 
19
23
  const child = spawn('claude', args, {
20
24
  cwd: workingDirectory,
@@ -10,12 +10,15 @@ You have full access to the operating system through your tools:
10
10
  ${toolList}
11
11
 
12
12
  ## Coding Tasks (writing code, fixing bugs, reviewing code, scaffolding projects)
13
+ IMPORTANT: You MUST NOT write code yourself using read_file/write_file. ALWAYS delegate coding to Claude Code.
13
14
  1. Use git tools to clone the repo and create a branch
14
- 2. Use spawn_claude_code to do the actual coding work inside the repo
15
+ 2. Use spawn_claude_code to do the actual coding work inside the repo — give it a clear, detailed prompt describing exactly what to build or fix
15
16
  3. After Claude Code finishes, use git tools to commit and push
16
17
  4. Use GitHub tools to create the PR
17
18
  5. Report back with the PR link
18
19
 
20
+ You are the orchestrator. Claude Code is the coder. Never use read_file + write_file to modify source code — that's Claude Code's job. You handle git, GitHub, and infrastructure. Claude Code handles all code changes.
21
+
19
22
  ## Non-Coding Tasks (monitoring, deploying, restarting services, checking status)
20
23
  - Use OS, Docker, process, network, and monitoring tools directly
21
24
  - No need to spawn Claude Code for these
@@ -21,6 +21,7 @@ const DEFAULTS = {
21
21
  allowed_users: [],
22
22
  },
23
23
  claude_code: {
24
+ model: 'claude-opus-4-6',
24
25
  max_turns: 50,
25
26
  timeout_seconds: 600,
26
27
  workspace_dir: null, // defaults to ~/.kernelbot/workspaces
@@ -1,7 +1,21 @@
1
+ import { readFileSync } from 'fs';
2
+ import { join, dirname } from 'path';
3
+ import { fileURLToPath } from 'url';
1
4
  import chalk from 'chalk';
2
5
  import ora from 'ora';
3
6
  import boxen from 'boxen';
4
7
 
8
+ const __dirname = dirname(fileURLToPath(import.meta.url));
9
+
10
+ function getVersion() {
11
+ try {
12
+ const pkg = JSON.parse(readFileSync(join(__dirname, '../../package.json'), 'utf-8'));
13
+ return pkg.version;
14
+ } catch {
15
+ return 'unknown';
16
+ }
17
+ }
18
+
5
19
  const LOGO = `
6
20
  ██╗ ██╗███████╗██████╗ ███╗ ██╗███████╗██╗ ██████╗ ██████╗ ████████╗
7
21
  ██║ ██╔╝██╔════╝██╔══██╗████╗ ██║██╔════╝██║ ██╔══██╗██╔═══██╗╚══██╔══╝
@@ -13,7 +27,7 @@ const LOGO = `
13
27
 
14
28
  export function showLogo() {
15
29
  console.log(chalk.cyan(LOGO));
16
- console.log(chalk.dim(' AI Engineering Agent\n'));
30
+ console.log(chalk.dim(` AI Engineering Agent — v${getVersion()}\n`));
17
31
  console.log(
18
32
  boxen(
19
33
  chalk.yellow.bold('WARNING') +