codeep 2.13.2 → 2.15.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.
Files changed (62) hide show
  1. package/README.md +35 -24
  2. package/dist/acp/commands.js +22 -1
  3. package/dist/acp/server.js +278 -251
  4. package/dist/config/index.d.ts +10 -0
  5. package/dist/config/index.js +2 -2
  6. package/dist/config/providers.js +35 -22
  7. package/dist/renderer/App.d.ts +0 -30
  8. package/dist/renderer/App.js +149 -659
  9. package/dist/renderer/agentExecution.d.ts +2 -1
  10. package/dist/renderer/agentExecution.js +10 -6
  11. package/dist/renderer/commands/helpers.d.ts +63 -0
  12. package/dist/renderer/commands/helpers.js +108 -0
  13. package/dist/renderer/commands/registry.js +5 -0
  14. package/dist/renderer/commands.d.ts +4 -0
  15. package/dist/renderer/commands.js +183 -64
  16. package/dist/renderer/components/ActionFormatting.d.ts +17 -0
  17. package/dist/renderer/components/ActionFormatting.js +67 -0
  18. package/dist/renderer/components/Autocomplete.d.ts +33 -0
  19. package/dist/renderer/components/Autocomplete.js +40 -0
  20. package/dist/renderer/components/Intro.d.ts +9 -0
  21. package/dist/renderer/components/Intro.js +5 -15
  22. package/dist/renderer/components/MessageFormatter.d.ts +96 -0
  23. package/dist/renderer/components/MessageFormatter.js +375 -0
  24. package/dist/renderer/components/Permission.d.ts +4 -0
  25. package/dist/renderer/components/Permission.js +1 -1
  26. package/dist/renderer/components/Status.d.ts +4 -0
  27. package/dist/renderer/components/Status.js +2 -3
  28. package/dist/renderer/components/WelcomeFormatter.d.ts +19 -0
  29. package/dist/renderer/components/WelcomeFormatter.js +79 -0
  30. package/dist/renderer/components/uiConstants.d.ts +8 -0
  31. package/dist/renderer/components/uiConstants.js +24 -0
  32. package/dist/renderer/inputParsing.d.ts +22 -0
  33. package/dist/renderer/inputParsing.js +28 -0
  34. package/dist/renderer/layout.d.ts +215 -0
  35. package/dist/renderer/layout.js +326 -0
  36. package/dist/renderer/main.d.ts +2 -1
  37. package/dist/renderer/main.js +45 -10
  38. package/dist/renderer/ollamaHint.d.ts +12 -0
  39. package/dist/renderer/ollamaHint.js +29 -0
  40. package/dist/utils/agentChat.js +28 -2
  41. package/dist/utils/codeepCloud.d.ts +54 -0
  42. package/dist/utils/codeepCloud.js +95 -0
  43. package/dist/utils/export.d.ts +12 -0
  44. package/dist/utils/export.js +3 -3
  45. package/dist/utils/hooks.d.ts +26 -0
  46. package/dist/utils/hooks.js +69 -1
  47. package/dist/utils/keychain.js +45 -29
  48. package/dist/utils/logger.d.ts +12 -0
  49. package/dist/utils/logger.js +1 -1
  50. package/dist/utils/mcpConfig.d.ts +26 -0
  51. package/dist/utils/mcpConfig.js +109 -4
  52. package/dist/utils/skillBundles.d.ts +14 -0
  53. package/dist/utils/skillBundles.js +3 -3
  54. package/dist/utils/skillBundlesCloud.d.ts +7 -0
  55. package/dist/utils/skillBundlesCloud.js +1 -1
  56. package/dist/utils/tokenTracker.d.ts +30 -3
  57. package/dist/utils/tokenTracker.js +71 -13
  58. package/dist/utils/toolParsing.d.ts +11 -0
  59. package/dist/utils/toolParsing.js +6 -0
  60. package/dist/version.d.ts +1 -1
  61. package/dist/version.js +1 -1
  62. package/package.json +2 -2
@@ -9,7 +9,7 @@ import { createSecureStorage } from '../utils/keychain.js';
9
9
  /**
10
10
  * Get sessions directory - local .codeep/sessions/ if in project, otherwise global
11
11
  */
12
- function getSessionsDir(projectPath) {
12
+ export function getSessionsDir(projectPath) {
13
13
  if (projectPath && isProjectDirectory(projectPath)) {
14
14
  const localDir = join(projectPath, '.codeep', 'sessions');
15
15
  if (!existsSync(localDir)) {
@@ -36,7 +36,7 @@ function getLocalConfigPath(projectPath) {
36
36
  * Looks for common project indicators: package.json, pyproject.toml, Cargo.toml, go.mod, composer.json, etc.
37
37
  * Also checks if user has manually initialized this folder as a project (.codeep/project.json)
38
38
  */
39
- function isProjectDirectory(path) {
39
+ export function isProjectDirectory(path) {
40
40
  // Check if user has manually initialized this as a project
41
41
  const manualProjectMarker = join(path, '.codeep', 'project.json');
42
42
  if (existsSync(manualProjectMarker)) {
@@ -276,8 +276,9 @@ export const PROVIDERS = {
276
276
  openai: { baseUrl: 'https://api.x.ai/v1', authHeader: 'Bearer', supportsNativeTools: true },
277
277
  },
278
278
  models: [
279
+ { id: 'grok-4.5', name: 'Grok 4.5', description: 'Flagship reasoning model — highest quality, 500K context' },
279
280
  { id: 'grok-build-0.1', name: 'Grok Build 0.1', description: 'Agentic coding model — fast, 256K context' },
280
- { id: 'grok-4.3', name: 'Grok 4.3', description: 'Flagship — highest quality, 1M context' },
281
+ { id: 'grok-4.3', name: 'Grok 4.3', description: 'Previous flagship, 1M context' },
281
282
  { id: 'grok-code-fast-1', name: 'Grok Code Fast 1', description: 'Low-cost speed-first coder (alias of Build 0.1)' },
282
283
  { id: 'grok-4-fast-reasoning', name: 'Grok 4 Fast (reasoning)', description: 'Cheap reasoning model, very large context' },
283
284
  ],
@@ -302,7 +303,7 @@ export const PROVIDERS = {
302
303
  models: [
303
304
  { id: 'qwen3-coder-plus', name: 'Qwen3-Coder Plus', description: 'Flagship coding model — best quality' },
304
305
  { id: 'qwen3-coder-next', name: 'Qwen3-Coder Next', description: 'Balanced quality/speed/cost' },
305
- { id: 'qwen3-max', name: 'Qwen3-Max', description: 'Flagship general model (code + reasoning)' },
306
+ { id: 'qwen3.7-max', name: 'Qwen3.7-Max', description: 'Flagship general model (code + reasoning)' },
306
307
  ],
307
308
  defaultModel: 'qwen3-coder-plus',
308
309
  defaultProtocol: 'openai',
@@ -323,7 +324,7 @@ export const PROVIDERS = {
323
324
  { id: 'qwen3-coder-plus', name: 'Qwen3-Coder Plus', description: 'Flagship coding model (256K, up to 1M)' },
324
325
  { id: 'qwen3-coder-next', name: 'Qwen3-Coder Next', description: 'Balanced quality/speed/cost' },
325
326
  { id: 'qwen3-coder-flash', name: 'Qwen3-Coder Flash', description: 'Fast/cheap coder' },
326
- { id: 'qwen3-max', name: 'Qwen3-Max', description: 'Flagship general model' },
327
+ { id: 'qwen3.7-max', name: 'Qwen3.7-Max', description: 'Flagship general model' },
327
328
  ],
328
329
  defaultModel: 'qwen3-coder-plus',
329
330
  defaultProtocol: 'openai',
@@ -343,7 +344,7 @@ export const PROVIDERS = {
343
344
  models: [
344
345
  { id: 'qwen3-coder-plus', name: 'Qwen3-Coder Plus', description: 'Flagship coding model — best quality' },
345
346
  { id: 'qwen3-coder-next', name: 'Qwen3-Coder Next', description: 'Balanced quality/speed/cost' },
346
- { id: 'qwen3-max', name: 'Qwen3-Max', description: 'Flagship general model' },
347
+ { id: 'qwen3.7-max', name: 'Qwen3.7-Max', description: 'Flagship general model' },
347
348
  ],
348
349
  defaultModel: 'qwen3-coder-plus',
349
350
  defaultProtocol: 'openai',
@@ -364,7 +365,7 @@ export const PROVIDERS = {
364
365
  { id: 'qwen3-coder-plus', name: 'Qwen3-Coder Plus', description: 'Flagship coding model' },
365
366
  { id: 'qwen3-coder-next', name: 'Qwen3-Coder Next', description: 'Balanced quality/speed/cost' },
366
367
  { id: 'qwen3-coder-flash', name: 'Qwen3-Coder Flash', description: 'Fast/cheap coder' },
367
- { id: 'qwen3-max', name: 'Qwen3-Max', description: 'Flagship general model' },
368
+ { id: 'qwen3.7-max', name: 'Qwen3.7-Max', description: 'Flagship general model' },
368
369
  ],
369
370
  defaultModel: 'qwen3-coder-plus',
370
371
  defaultProtocol: 'openai',
@@ -404,11 +405,14 @@ export const PROVIDERS = {
404
405
  },
405
406
  },
406
407
  models: [
407
- { id: 'gpt-5.5', name: 'GPT-5.5', description: 'Latest GPT model — best for coding' },
408
- { id: 'gpt-5.4', name: 'GPT-5.4', description: 'Previous generation GPT' },
408
+ { id: 'gpt-5.6-sol', name: 'GPT-5.6 Sol', description: 'Most capable GPT — best for coding & agentic work' },
409
+ { id: 'gpt-5.6-terra', name: 'GPT-5.6 Terra', description: 'Balanced — GPT-5.5 quality at about half the price' },
410
+ { id: 'gpt-5.6-luna', name: 'GPT-5.6 Luna', description: 'Fast and cheap — high-volume workloads' },
411
+ { id: 'gpt-5.5', name: 'GPT-5.5', description: 'Previous flagship GPT' },
412
+ { id: 'gpt-5.4', name: 'GPT-5.4', description: 'Older generation GPT' },
409
413
  { id: 'gpt-5.4-mini', name: 'GPT-5.4 Mini', description: 'Faster and cheaper GPT-5.4' },
410
414
  ],
411
- defaultModel: 'gpt-5.5',
415
+ defaultModel: 'gpt-5.6-sol',
412
416
  defaultProtocol: 'openai',
413
417
  useMaxCompletionTokens: true,
414
418
  requiresDefaultTemperature: true,
@@ -428,8 +432,9 @@ export const PROVIDERS = {
428
432
  },
429
433
  },
430
434
  models: [
435
+ { id: 'claude-fable-5', name: 'Claude Fable 5', description: 'Most capable — hardest reasoning & long-horizon agentic work' },
431
436
  { id: 'claude-opus-4-8', name: 'Claude Opus 4.8', description: 'Most capable Opus model' },
432
- { id: 'claude-sonnet-4-6', name: 'Claude Sonnet', description: 'Best balance of speed and intelligence' },
437
+ { id: 'claude-sonnet-5', name: 'Claude Sonnet 5', description: 'Best balance of speed and intelligence' },
433
438
  { id: 'claude-haiku-4-5-20251001', name: 'Claude Haiku', description: 'Fastest and most affordable' },
434
439
  ],
435
440
  defaultModel: 'claude-opus-4-8',
@@ -451,6 +456,7 @@ export const PROVIDERS = {
451
456
  models: [
452
457
  { id: 'gemini-3.1-pro-preview', name: 'Gemini 3.1 Pro', description: 'Most capable Gemini model' },
453
458
  { id: 'gemini-3.5-flash', name: 'Gemini 3.5 Flash', description: 'Pro-level intelligence at Flash speed' },
459
+ { id: 'gemini-3.1-flash-lite', name: 'Gemini 3.1 Flash-Lite', description: 'Low-latency, low-cost workhorse (1M context)' },
454
460
  ],
455
461
  defaultModel: 'gemini-3.1-pro-preview',
456
462
  defaultProtocol: 'openai',
@@ -475,9 +481,10 @@ export const PROVIDERS = {
475
481
  // get a working dropdown.
476
482
  models: [
477
483
  { id: 'openrouter/auto', name: 'Auto-route', description: 'OpenRouter picks the best model for the task' },
478
- { id: 'anthropic/claude-opus-4', name: 'Claude Opus 4', description: 'Anthropic — most capable' },
479
- { id: 'anthropic/claude-sonnet-4', name: 'Claude Sonnet 4', description: 'Anthropic — balanced' },
480
- { id: 'openai/gpt-5.5', name: 'GPT-5.5', description: 'OpenAI — flagship' },
484
+ { id: 'anthropic/claude-fable-5', name: 'Claude Fable 5', description: 'Anthropic — most capable' },
485
+ { id: 'anthropic/claude-opus-4', name: 'Claude Opus 4', description: 'Anthropic — Opus tier' },
486
+ { id: 'anthropic/claude-sonnet-5', name: 'Claude Sonnet 5', description: 'Anthropic — balanced' },
487
+ { id: 'openai/gpt-5.6-sol', name: 'GPT-5.6 Sol', description: 'OpenAI — flagship' },
481
488
  { id: 'openai/gpt-5.4-mini', name: 'GPT-5.4 Mini', description: 'OpenAI — fast/cheap' },
482
489
  { id: 'google/gemini-3.1-pro', name: 'Gemini 3.1 Pro', description: 'Google — multimodal' },
483
490
  { id: 'meta-llama/llama-3.1-405b-instruct', name: 'Llama 3.1 405B', description: 'Meta — open weights, largest' },
@@ -485,7 +492,7 @@ export const PROVIDERS = {
485
492
  { id: 'deepseek/deepseek-v4', name: 'DeepSeek V4', description: 'DeepSeek via OpenRouter' },
486
493
  { id: 'mistralai/mistral-large', name: 'Mistral Large', description: 'Mistral — flagship' },
487
494
  { id: 'qwen/qwen-2.5-coder-32b-instruct', name: 'Qwen 2.5 Coder 32B', description: 'Alibaba — coding-tuned' },
488
- { id: 'x-ai/grok-2', name: 'Grok 2', description: 'xAI via OpenRouter' },
495
+ { id: 'x-ai/grok-4.5', name: 'Grok 4.5', description: 'xAI — flagship reasoning' },
489
496
  ],
490
497
  defaultModel: 'anthropic/claude-opus-4',
491
498
  defaultProtocol: 'openai',
@@ -651,14 +658,15 @@ export function providerNoStreamWithTools(providerId) {
651
658
  }
652
659
  /**
653
660
  * Models that reject sampling parameters (temperature/top_p/top_k) with a 400.
654
- * Anthropic removed them on Fable 5 and Opus 4.7+; older Claude models still
655
- * accept them, so this must be a MODEL-level check, not a provider-level one
656
- * (requiresDefaultTemperature can't express it). Omitting the field is always
657
- * safe — the API treats omission as default. Kimi K2.x code/thinking models
658
- * fix temperature internally and 400 on any custom value, so they're here too.
661
+ * Anthropic removed them on Fable 5 and Opus 4.7+, and Sonnet 5 rejects any
662
+ * non-default value; older Claude models still accept them, so this must be a
663
+ * MODEL-level check, not a provider-level one (requiresDefaultTemperature
664
+ * can't express it). Omitting the field is always safe — the API treats
665
+ * omission as default. Kimi K2.x code/thinking models fix temperature
666
+ * internally and 400 on any custom value, so they're here too.
659
667
  */
660
668
  const SAMPLING_PARAMS_REJECTED = [
661
- 'claude-fable-5', 'claude-opus-4-8', 'claude-opus-4-7',
669
+ 'claude-fable-5', 'claude-opus-4-8', 'claude-opus-4-7', 'claude-sonnet-5',
662
670
  'kimi-k2.7-code', 'kimi-for-coding',
663
671
  ];
664
672
  export function modelRejectsSamplingParams(model) {
@@ -701,10 +709,10 @@ export function modelSupportsReasoningEffort(providerId, model) {
701
709
  const id = canonicalModelId(model);
702
710
  switch (providerId) {
703
711
  case 'anthropic':
704
- // Effort is GA on Opus 4.5+, Sonnet 4.6, Fable 5 — NOT Haiku or Sonnet 4.5.
712
+ // Effort is GA on Opus 4.5+, Sonnet 4.6/5, Fable 5 — NOT Haiku or Sonnet 4.5.
705
713
  if (idMatches(id, 'claude-haiku-4-5') || idMatches(id, 'claude-sonnet-4-5'))
706
714
  return false;
707
- return /^claude-(opus-4-([5-9]|\d\d)|sonnet-4-6|fable-5)/.test(id);
715
+ return /^claude-(opus-4-([5-9]|\d\d)|sonnet-(4-6|5)|fable-5)/.test(id);
708
716
  case 'openai':
709
717
  // GPT-5.x are reasoning models — reasoning_effort across the family (incl. mini).
710
718
  return id.startsWith('gpt-5');
@@ -722,7 +730,12 @@ export function modelSupportsReasoningEffort(providerId, model) {
722
730
  return idMatches(id, 'glm-5-2');
723
731
  case 'grok':
724
732
  // Grok reasoning models accept reasoning_effort (none/low/medium/high).
725
- // Explicit *-non-reasoning variants don't think → excluded.
733
+ // The coders (grok-code-fast, grok-build — the default) are NON-reasoning
734
+ // and 400 on reasoning_effort; a 400 here silently drops the whole turn
735
+ // into the weaker text-tool fallback (agentChat.ts), so exclude them
736
+ // alongside the explicit *-non-reasoning variants.
737
+ if (id.startsWith('grok-build') || id.startsWith('grok-code'))
738
+ return false;
726
739
  return id.startsWith('grok') && !id.includes('non-reasoning');
727
740
  // Kimi (thinking on/off, not graded) and Qwen coders (non-thinking) have
728
741
  // no graded knob → fall through to default false.
@@ -413,15 +413,6 @@ export declare class App {
413
413
  /**
414
414
  * Get color for action type
415
415
  */
416
- private getActionColor;
417
- /**
418
- * Format action target for display
419
- */
420
- private formatActionTarget;
421
- /**
422
- * Get action label for display
423
- */
424
- private getActionLabel;
425
416
  /**
426
417
  * Render status bar
427
418
  */
@@ -430,23 +421,6 @@ export declare class App {
430
421
  * Get visible messages (including streaming)
431
422
  */
432
423
  private getVisibleMessages;
433
- /**
434
- * Format message into lines with syntax highlighting for code blocks
435
- */
436
- private formatWelcomeMessage;
437
- private formatMessage;
438
- /**
439
- * Apply inline markdown formatting (bold, italic, inline code) to a line
440
- */
441
- private applyInlineMarkdown;
442
- /**
443
- * Format plain text lines with markdown support
444
- */
445
- private formatTextLines;
446
- /**
447
- * Format code block with syntax highlighting (no border)
448
- */
449
- private formatCodeBlock;
450
424
  /**
451
425
  * Render inline search screen
452
426
  */
@@ -471,8 +445,4 @@ export declare class App {
471
445
  * Get decrypted logo for intro animation
472
446
  */
473
447
  private getDecryptedLogo;
474
- /**
475
- * Word wrap
476
- */
477
- private wordWrap;
478
448
  }