codekin 0.4.1 → 0.5.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.
Files changed (84) hide show
  1. package/README.md +12 -15
  2. package/bin/codekin.mjs +52 -32
  3. package/dist/assets/index-B8opKRtJ.js +186 -0
  4. package/dist/assets/index-wajPH8o6.css +1 -0
  5. package/dist/index.html +2 -2
  6. package/package.json +2 -7
  7. package/server/dist/approval-manager.d.ts +9 -2
  8. package/server/dist/approval-manager.js +47 -78
  9. package/server/dist/approval-manager.js.map +1 -1
  10. package/server/dist/claude-process.d.ts +20 -4
  11. package/server/dist/claude-process.js +79 -50
  12. package/server/dist/claude-process.js.map +1 -1
  13. package/server/dist/commit-event-handler.js.map +1 -1
  14. package/server/dist/config.d.ts +4 -0
  15. package/server/dist/config.js +17 -0
  16. package/server/dist/config.js.map +1 -1
  17. package/server/dist/diff-manager.d.ts +41 -0
  18. package/server/dist/diff-manager.js +303 -0
  19. package/server/dist/diff-manager.js.map +1 -0
  20. package/server/dist/error-page.d.ts +5 -0
  21. package/server/dist/error-page.js +144 -0
  22. package/server/dist/error-page.js.map +1 -0
  23. package/server/dist/native-permissions.d.ts +44 -0
  24. package/server/dist/native-permissions.js +163 -0
  25. package/server/dist/native-permissions.js.map +1 -0
  26. package/server/dist/orchestrator-children.d.ts +74 -0
  27. package/server/dist/orchestrator-children.js +287 -0
  28. package/server/dist/orchestrator-children.js.map +1 -0
  29. package/server/dist/orchestrator-learning.d.ts +134 -0
  30. package/server/dist/orchestrator-learning.js +567 -0
  31. package/server/dist/orchestrator-learning.js.map +1 -0
  32. package/server/dist/orchestrator-manager.d.ts +25 -0
  33. package/server/dist/orchestrator-manager.js +353 -0
  34. package/server/dist/orchestrator-manager.js.map +1 -0
  35. package/server/dist/orchestrator-memory.d.ts +77 -0
  36. package/server/dist/orchestrator-memory.js +288 -0
  37. package/server/dist/orchestrator-memory.js.map +1 -0
  38. package/server/dist/orchestrator-monitor.d.ts +59 -0
  39. package/server/dist/orchestrator-monitor.js +238 -0
  40. package/server/dist/orchestrator-monitor.js.map +1 -0
  41. package/server/dist/orchestrator-reports.d.ts +45 -0
  42. package/server/dist/orchestrator-reports.js +124 -0
  43. package/server/dist/orchestrator-reports.js.map +1 -0
  44. package/server/dist/orchestrator-routes.d.ts +17 -0
  45. package/server/dist/orchestrator-routes.js +526 -0
  46. package/server/dist/orchestrator-routes.js.map +1 -0
  47. package/server/dist/plan-manager.d.ts +74 -0
  48. package/server/dist/plan-manager.js +121 -0
  49. package/server/dist/plan-manager.js.map +1 -0
  50. package/server/dist/session-archive.js +9 -2
  51. package/server/dist/session-archive.js.map +1 -1
  52. package/server/dist/session-manager.d.ts +117 -42
  53. package/server/dist/session-manager.js +728 -433
  54. package/server/dist/session-manager.js.map +1 -1
  55. package/server/dist/session-naming.d.ts +6 -10
  56. package/server/dist/session-naming.js +60 -62
  57. package/server/dist/session-naming.js.map +1 -1
  58. package/server/dist/session-persistence.d.ts +6 -1
  59. package/server/dist/session-persistence.js +8 -1
  60. package/server/dist/session-persistence.js.map +1 -1
  61. package/server/dist/session-restart-scheduler.d.ts +30 -0
  62. package/server/dist/session-restart-scheduler.js +41 -0
  63. package/server/dist/session-restart-scheduler.js.map +1 -0
  64. package/server/dist/session-routes.js +122 -61
  65. package/server/dist/session-routes.js.map +1 -1
  66. package/server/dist/stepflow-types.d.ts +1 -1
  67. package/server/dist/tsconfig.tsbuildinfo +1 -1
  68. package/server/dist/types.d.ts +40 -5
  69. package/server/dist/types.js +8 -1
  70. package/server/dist/types.js.map +1 -1
  71. package/server/dist/upload-routes.js +7 -1
  72. package/server/dist/upload-routes.js.map +1 -1
  73. package/server/dist/version-check.d.ts +17 -0
  74. package/server/dist/version-check.js +89 -0
  75. package/server/dist/version-check.js.map +1 -0
  76. package/server/dist/workflow-engine.d.ts +74 -1
  77. package/server/dist/workflow-engine.js +20 -1
  78. package/server/dist/workflow-engine.js.map +1 -1
  79. package/server/dist/ws-message-handler.js +115 -9
  80. package/server/dist/ws-message-handler.js.map +1 -1
  81. package/server/dist/ws-server.js +90 -15
  82. package/server/dist/ws-server.js.map +1 -1
  83. package/dist/assets/index-BAdQqYEY.js +0 -182
  84. package/dist/assets/index-CeZYNLWt.css +0 -1
package/README.md CHANGED
@@ -25,9 +25,8 @@ This will:
25
25
  1. Install Node.js 20+ if needed (via nvm)
26
26
  2. Install the `codekin` npm package globally
27
27
  3. Generate an auth token
28
- 4. Prompt for optional LLM API keys (Groq, OpenAI, Gemini, Anthropic) for session auto-naming
29
- 5. Install and start a persistent background service
30
- 6. Print your access URL
28
+ 4. Install and start a persistent background service
29
+ 5. Print your access URL
31
30
 
32
31
  Open the printed URL in your browser, enter your Codekin Web token when prompted, and you're ready to go.
33
32
 
@@ -41,38 +40,40 @@ codekin service install # (Re-)install the background service
41
40
  codekin service uninstall # Remove the background service
42
41
  codekin start # Run in foreground (for debugging)
43
42
  codekin setup --regenerate # Generate a new auth token
43
+ codekin upgrade # Upgrade to latest version
44
44
  codekin uninstall # Remove Codekin entirely
45
45
  ```
46
46
 
47
47
  ## Features
48
48
 
49
49
  - **Multi-session terminal** — Open and switch between multiple Claude Code sessions, one per repo
50
+ - **Agent Joe** — AI orchestrator agent that spawns and manages up to 5 concurrent child sessions, with a dedicated chat UI, welcome screen, and color-coded sidebar status indicators
51
+ - **Git worktrees** — Isolate sessions in dedicated worktree directories, with mid-session creation, auto-enable setting, and session context preservation
50
52
  - **Session archive** — Full retrieval and re-activation of archived sessions
51
53
  - **Repo browser** — Auto-discovers local repos and GitHub org repos
52
54
  - **Screenshot upload** — Drag-and-drop or paste images; the file path is sent to Claude so it can read them natively
53
55
  - **Skill browser** — Browse and invoke `/skills` defined in each repo's `.claude/skills/`, with inline slash-command autocomplete
54
56
  - **Diff viewer** — Side panel showing staged/unstaged file changes with per-file discard support
55
57
  - **Command palette** — `Ctrl+K` to quickly search repos, skills, and actions
56
- - **Approval management** — Persistent approval storage with detailed per-permission revoking
58
+ - **Approval management** — Persistent approval storage with per-permission revoking, permission mode selector, and per-session tool pre-approvals
57
59
  - **Mobile-friendly** — Responsive layout that works on phones and tablets
58
60
  - **Markdown browser** — Browse and view `.md` files directly in the UI
59
61
  - **AI Workflows** — Scheduled code and repository audits and maintenance, with support for custom workflows defined as Markdown files
60
62
  - **GitHub webhooks** — Automated bugfixing on CI failures via webhook integration
61
- - **LLM-powered chores** — Optional API keys (Groq, OpenAI, Gemini, Anthropic) for background tasks like session auto-naming
63
+ - **Upgrade notifications** — In-app banner when a newer version is available
62
64
 
63
65
  ## Upgrade
64
66
 
65
- Re-run the install script — it's idempotent and will upgrade to the latest version:
66
-
67
67
  ```bash
68
- curl -fsSL codekin.ai/install.sh | bash
68
+ codekin upgrade
69
69
  ```
70
70
 
71
- Or upgrade manually:
71
+ This checks npm for the latest version, installs it, and restarts the background service if running.
72
+
73
+ Alternatively, re-run the install script:
72
74
 
73
75
  ```bash
74
- npm install -g codekin
75
- codekin service install
76
+ curl -fsSL codekin.ai/install.sh | bash
76
77
  ```
77
78
 
78
79
  ## Uninstall
@@ -91,10 +92,6 @@ All configuration lives in `~/.config/codekin/env`. Edit this file to override d
91
92
  |---|---|---|
92
93
  | `PORT` | `32352` | Server port |
93
94
  | `REPOS_ROOT` | `~/repos` | Root directory scanned for local repositories |
94
- | `GROQ_API_KEY` | — | Optional. Enables session auto-naming via Llama 4 Scout (free tier at [groq.com](https://groq.com)) |
95
- | `OPENAI_API_KEY` | — | Optional. Fallback for session auto-naming via GPT-4o Mini ([platform.openai.com](https://platform.openai.com)) |
96
- | `GEMINI_API_KEY` | — | Optional. Fallback for session auto-naming via Gemini 2.5 Flash ([aistudio.google.com](https://aistudio.google.com)) |
97
- | `ANTHROPIC_API_KEY` | — | Optional. Fallback for session auto-naming via Claude Haiku ([console.anthropic.com](https://console.anthropic.com)) |
98
95
 
99
96
  ## Manual / Advanced Setup
100
97
 
package/bin/codekin.mjs CHANGED
@@ -8,8 +8,9 @@
8
8
  * codekin service install Install + start background service
9
9
  * codekin service uninstall Remove background service
10
10
  * codekin service status Show service status
11
- * codekin config Update API keys and settings
11
+ * codekin config Update settings
12
12
  * codekin token Print access URL with auth token
13
+ * codekin upgrade Upgrade to latest version
13
14
  * codekin uninstall Remove Codekin entirely
14
15
  */
15
16
 
@@ -136,27 +137,7 @@ async function cmdSetup({ regenerate = false } = {}) {
136
137
  console.log('Auth token: generated')
137
138
  }
138
139
 
139
- // API keys for session auto-naming
140
- console.log('\nSession auto-naming uses an LLM to generate descriptive session names.')
141
- console.log('Configure at least one API key below (all optional, press Enter to skip).\n')
142
-
143
- const apiKeys = [
144
- { env: 'GROQ_API_KEY', label: 'Groq', hint: 'free tier available — groq.com' },
145
- { env: 'OPENAI_API_KEY', label: 'OpenAI', hint: 'platform.openai.com' },
146
- { env: 'GEMINI_API_KEY', label: 'Gemini', hint: 'aistudio.google.com' },
147
- { env: 'ANTHROPIC_API_KEY', label: 'Anthropic', hint: 'console.anthropic.com' },
148
- ]
149
-
150
- for (const { env, label, hint } of apiKeys) {
151
- const current = existing[env]
152
- const mask = current ? ` (current: ${current.slice(0, 6)}...${current.slice(-4)})` : ''
153
- const answer = await prompt(` ${label} API key${mask} [${hint}]: `)
154
- if (answer) {
155
- existing[env] = answer
156
- }
157
- }
158
-
159
-
140
+ console.log('\nSession auto-naming uses the Claude CLI — no extra API keys needed.')
160
141
 
161
142
  // Write env file
162
143
  const frontendDist = findFrontendDist()
@@ -167,15 +148,7 @@ async function cmdSetup({ regenerate = false } = {}) {
167
148
  if (frontendDist) envVars.FRONTEND_DIST = frontendDist
168
149
  writeEnvFile(envVars)
169
150
 
170
- // Show which naming provider will be used
171
- const namingProvider = apiKeys.find(k => envVars[k.env])
172
- if (namingProvider) {
173
- console.log(`\nSession naming provider: ${namingProvider.label}`)
174
- } else {
175
- console.log('\nNo API keys configured — session auto-naming will be disabled.')
176
- }
177
-
178
- console.log(`Config saved to ${CONFIG_DIR}`)
151
+ console.log(`\nConfig saved to ${CONFIG_DIR}`)
179
152
 
180
153
  printAccessUrl()
181
154
  }
@@ -419,6 +392,50 @@ async function cmdUninstall() {
419
392
  console.log('\nCodekin has been completely removed.')
420
393
  }
421
394
 
395
+ async function cmdUpgrade() {
396
+ // Read current version
397
+ const pkg = JSON.parse(readFileSync(join(PACKAGE_ROOT, 'package.json'), 'utf-8'))
398
+ const current = pkg.version
399
+
400
+ // Check latest version on npm
401
+ console.log('Checking for updates...')
402
+ let latest
403
+ try {
404
+ latest = execSync('npm view codekin version', { encoding: 'utf-8' }).trim()
405
+ } catch {
406
+ console.error('Failed to check npm registry. Check your network connection.')
407
+ process.exit(1)
408
+ }
409
+
410
+ if (latest === current) {
411
+ console.log(`Already on the latest version (v${current}).`)
412
+ return
413
+ }
414
+
415
+ console.log(`Current: v${current}`)
416
+ console.log(`Latest: v${latest}\n`)
417
+ console.log('Upgrading...')
418
+
419
+ const result = spawnSync('npm', ['install', '-g', 'codekin'], { stdio: 'inherit' })
420
+ if (result.status !== 0) {
421
+ console.error('\nUpgrade failed. Try running with sudo or check npm permissions.')
422
+ process.exit(1)
423
+ }
424
+
425
+ // Restart service if running
426
+ try {
427
+ const status = execSync('codekin service status', { encoding: 'utf-8' })
428
+ if (status.includes('running')) {
429
+ console.log('\nRestarting background service...')
430
+ spawnSync('codekin', ['service', 'install'], { stdio: 'inherit' })
431
+ }
432
+ } catch {
433
+ // Service not installed — skip
434
+ }
435
+
436
+ console.log(`\nUpgraded to v${latest}.`)
437
+ }
438
+
422
439
  // ---------------------------------------------------------------------------
423
440
  // Entry point
424
441
  // ---------------------------------------------------------------------------
@@ -434,6 +451,8 @@ if (cmd === 'start') {
434
451
  await cmdSetup()
435
452
  } else if (cmd === 'token') {
436
453
  cmdToken()
454
+ } else if (cmd === 'upgrade') {
455
+ await cmdUpgrade()
437
456
  } else if (cmd === 'uninstall') {
438
457
  await cmdUninstall()
439
458
  } else if (cmd === 'service') {
@@ -450,11 +469,12 @@ Usage:
450
469
  codekin start Run server in foreground
451
470
  codekin setup First-time setup wizard
452
471
  codekin setup --regenerate Regenerate auth token
453
- codekin config Update API keys and settings
472
+ codekin config Update settings
454
473
  codekin service install Install + start background service
455
474
  codekin service uninstall Remove background service
456
475
  codekin service status Show service status
457
476
  codekin token Print access URL with auth token
477
+ codekin upgrade Upgrade to latest version
458
478
  codekin uninstall Remove Codekin entirely
459
479
  `)
460
480
  }