neuro-cli 4.1.3 → 4.3.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 (175) hide show
  1. package/dist/advisor/advisor.d.ts +0 -0
  2. package/dist/advisor/advisor.js +0 -0
  3. package/dist/agents/base.d.ts +0 -0
  4. package/dist/agents/base.js +1 -1
  5. package/dist/agents/orchestrator.d.ts +0 -0
  6. package/dist/agents/orchestrator.js +0 -0
  7. package/dist/agents/team.d.ts +0 -0
  8. package/dist/agents/team.js +0 -0
  9. package/dist/api/models.d.ts +0 -0
  10. package/dist/api/models.js +0 -0
  11. package/dist/api/ollama.d.ts +0 -0
  12. package/dist/api/ollama.js +0 -0
  13. package/dist/api/openrouter.d.ts +0 -0
  14. package/dist/api/openrouter.js +0 -0
  15. package/dist/commands/commands.d.ts +0 -0
  16. package/dist/commands/commands.js +0 -0
  17. package/dist/config/config.d.ts +0 -0
  18. package/dist/config/config.js +9 -9
  19. package/dist/context/compaction.d.ts +0 -0
  20. package/dist/context/compaction.js +0 -0
  21. package/dist/context/custom-agents.d.ts +0 -0
  22. package/dist/context/custom-agents.js +0 -0
  23. package/dist/context/custom-tools.d.ts +0 -0
  24. package/dist/context/custom-tools.js +0 -0
  25. package/dist/context/git-checkpoint.d.ts +0 -0
  26. package/dist/context/git-checkpoint.js +0 -0
  27. package/dist/context/neuro-md.d.ts +0 -0
  28. package/dist/context/neuro-md.js +0 -0
  29. package/dist/context/neuroignore.d.ts +0 -0
  30. package/dist/context/neuroignore.js +0 -0
  31. package/dist/context/repo-map.d.ts +0 -0
  32. package/dist/context/repo-map.js +0 -0
  33. package/dist/context/skill-standard.d.ts +0 -0
  34. package/dist/context/skill-standard.js +0 -0
  35. package/dist/context/skill-system.d.ts +0 -0
  36. package/dist/context/skill-system.js +0 -0
  37. package/dist/context/tree-sitter.d.ts +0 -0
  38. package/dist/context/tree-sitter.js +0 -0
  39. package/dist/core/acp.d.ts +0 -0
  40. package/dist/core/acp.js +0 -0
  41. package/dist/core/api-server.d.ts +0 -0
  42. package/dist/core/api-server.js +0 -0
  43. package/dist/core/approval.d.ts +4 -0
  44. package/dist/core/approval.js +74 -46
  45. package/dist/core/auto-compact.d.ts +0 -0
  46. package/dist/core/auto-compact.js +0 -0
  47. package/dist/core/auto-mode.d.ts +0 -0
  48. package/dist/core/auto-mode.js +0 -0
  49. package/dist/core/background-session.d.ts +0 -0
  50. package/dist/core/background-session.js +0 -0
  51. package/dist/core/cicd.d.ts +0 -0
  52. package/dist/core/cicd.js +0 -0
  53. package/dist/core/cloud-sync.d.ts +0 -0
  54. package/dist/core/cloud-sync.js +0 -0
  55. package/dist/core/code-review.d.ts +0 -0
  56. package/dist/core/code-review.js +0 -0
  57. package/dist/core/completion.d.ts +0 -0
  58. package/dist/core/completion.js +0 -0
  59. package/dist/core/context.d.ts +0 -0
  60. package/dist/core/context.js +0 -0
  61. package/dist/core/diff-preview.d.ts +0 -0
  62. package/dist/core/diff-preview.js +8 -16
  63. package/dist/core/doom-loop.d.ts +0 -0
  64. package/dist/core/doom-loop.js +0 -0
  65. package/dist/core/engine.d.ts +4 -0
  66. package/dist/core/engine.js +45 -13
  67. package/dist/core/extended-thinking.d.ts +0 -0
  68. package/dist/core/extended-thinking.js +0 -0
  69. package/dist/core/fallback.d.ts +0 -0
  70. package/dist/core/fallback.js +0 -0
  71. package/dist/core/git-worktree.d.ts +0 -0
  72. package/dist/core/git-worktree.js +0 -0
  73. package/dist/core/headless.d.ts +0 -0
  74. package/dist/core/headless.js +0 -0
  75. package/dist/core/i18n.d.ts +0 -0
  76. package/dist/core/i18n.js +0 -0
  77. package/dist/core/linting.d.ts +0 -0
  78. package/dist/core/linting.js +0 -0
  79. package/dist/core/model-router.d.ts +0 -0
  80. package/dist/core/model-router.js +3 -3
  81. package/dist/core/multi-model.d.ts +0 -0
  82. package/dist/core/multi-model.js +0 -0
  83. package/dist/core/multi-session.d.ts +0 -0
  84. package/dist/core/multi-session.js +0 -0
  85. package/dist/core/multimodal.d.ts +0 -0
  86. package/dist/core/multimodal.js +0 -0
  87. package/dist/core/observability.d.ts +0 -0
  88. package/dist/core/observability.js +0 -0
  89. package/dist/core/os-sandbox.d.ts +0 -0
  90. package/dist/core/os-sandbox.js +0 -0
  91. package/dist/core/outcome-grading.d.ts +0 -0
  92. package/dist/core/outcome-grading.js +0 -0
  93. package/dist/core/output-styles.d.ts +0 -0
  94. package/dist/core/output-styles.js +0 -0
  95. package/dist/core/parallel-agents.d.ts +0 -0
  96. package/dist/core/parallel-agents.js +0 -0
  97. package/dist/core/plugin-bundle.d.ts +0 -0
  98. package/dist/core/plugin-bundle.js +0 -0
  99. package/dist/core/plugin-sdk.d.ts +0 -0
  100. package/dist/core/plugin-sdk.js +0 -0
  101. package/dist/core/prompt-cache.d.ts +0 -0
  102. package/dist/core/prompt-cache.js +0 -0
  103. package/dist/core/sandbox.d.ts +0 -0
  104. package/dist/core/sandbox.js +0 -0
  105. package/dist/core/scheduled-tasks.d.ts +0 -0
  106. package/dist/core/scheduled-tasks.js +0 -0
  107. package/dist/core/security-scanner.d.ts +0 -0
  108. package/dist/core/security-scanner.js +0 -0
  109. package/dist/core/session.d.ts +0 -0
  110. package/dist/core/session.js +0 -0
  111. package/dist/core/shell-completion.d.ts +0 -0
  112. package/dist/core/shell-completion.js +0 -0
  113. package/dist/core/smart-monitor.d.ts +0 -0
  114. package/dist/core/smart-monitor.js +0 -0
  115. package/dist/core/spec-driven.d.ts +0 -0
  116. package/dist/core/spec-driven.js +0 -0
  117. package/dist/core/spending-warnings.d.ts +0 -0
  118. package/dist/core/spending-warnings.js +0 -0
  119. package/dist/core/sub-agent.d.ts +0 -0
  120. package/dist/core/sub-agent.js +0 -0
  121. package/dist/core/telemetry.d.ts +0 -0
  122. package/dist/core/telemetry.js +0 -0
  123. package/dist/core/terminal-ux.d.ts +0 -0
  124. package/dist/core/terminal-ux.js +0 -0
  125. package/dist/core/testing.d.ts +0 -0
  126. package/dist/core/testing.js +0 -0
  127. package/dist/core/types.d.ts +1 -1
  128. package/dist/core/types.js +0 -0
  129. package/dist/core/undo-redo.d.ts +0 -0
  130. package/dist/core/undo-redo.js +0 -0
  131. package/dist/core/updater.d.ts +0 -0
  132. package/dist/core/updater.js +0 -0
  133. package/dist/core/vim-mode.d.ts +0 -0
  134. package/dist/core/vim-mode.js +0 -0
  135. package/dist/core/voice.d.ts +0 -0
  136. package/dist/core/voice.js +0 -0
  137. package/dist/core/web-dashboard.d.ts +0 -0
  138. package/dist/core/web-dashboard.js +0 -0
  139. package/dist/hooks/hooks.d.ts +0 -0
  140. package/dist/hooks/hooks.js +0 -0
  141. package/dist/hooks/llm-evaluator.d.ts +0 -0
  142. package/dist/hooks/llm-evaluator.js +0 -0
  143. package/dist/index.d.ts +0 -0
  144. package/dist/index.js +11 -9
  145. package/dist/lsp/lsp-manager.d.ts +0 -0
  146. package/dist/lsp/lsp-manager.js +0 -0
  147. package/dist/mcp/client.d.ts +0 -0
  148. package/dist/mcp/client.js +0 -0
  149. package/dist/mcp/mcp-apps.d.ts +0 -0
  150. package/dist/mcp/mcp-apps.js +0 -0
  151. package/dist/tools/bash.d.ts +0 -0
  152. package/dist/tools/bash.js +0 -0
  153. package/dist/tools/browser.d.ts +0 -0
  154. package/dist/tools/browser.js +0 -0
  155. package/dist/tools/extended.d.ts +0 -0
  156. package/dist/tools/extended.js +0 -0
  157. package/dist/tools/file.d.ts +0 -0
  158. package/dist/tools/file.js +0 -0
  159. package/dist/tools/github.d.ts +0 -0
  160. package/dist/tools/github.js +0 -0
  161. package/dist/tools/index.d.ts +0 -0
  162. package/dist/tools/index.js +0 -0
  163. package/dist/tools/memory.d.ts +0 -0
  164. package/dist/tools/memory.js +0 -0
  165. package/dist/tools/registry.d.ts +0 -0
  166. package/dist/tools/registry.js +0 -0
  167. package/dist/tools/web.d.ts +0 -0
  168. package/dist/tools/web.js +0 -0
  169. package/dist/ui/renderer.d.ts +10 -63
  170. package/dist/ui/renderer.js +170 -155
  171. package/dist/ui/theme.d.ts +5 -0
  172. package/dist/ui/theme.js +99 -45
  173. package/dist/utils/crosspath.d.ts +0 -0
  174. package/dist/utils/crosspath.js +0 -0
  175. package/package.json +1 -1
File without changes
File without changes
File without changes
@@ -192,7 +192,7 @@ export class BaseAgent {
192
192
  }
193
193
  if (iteration > maxIter && execution.status === 'running') {
194
194
  execution.status = 'completed';
195
- execution.result = 'Max iterations reached';
195
+ execution.result = `Max iterations reached (${maxIter}). The task may not be fully completed. Consider using a higher effort level or switching to /orchestrate mode for complex tasks.`;
196
196
  }
197
197
  execution.endTime = Date.now();
198
198
  execution.iterations = iteration;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -19,7 +19,7 @@ export const DEFAULT_CONFIG = {
19
19
  temperature: 0.7,
20
20
  maxTokens: 4096,
21
21
  tools: ['read_file', 'search_files', 'list_directory'],
22
- maxIterations: 3,
22
+ maxIterations: 10,
23
23
  },
24
24
  coder: {
25
25
  name: 'Coder',
@@ -29,7 +29,7 @@ export const DEFAULT_CONFIG = {
29
29
  temperature: 0.4,
30
30
  maxTokens: 16384,
31
31
  tools: ['read_file', 'write_file', 'edit_file', 'search_files', 'list_directory', 'run_command', 'apply_diff'],
32
- maxIterations: 15,
32
+ maxIterations: 50,
33
33
  },
34
34
  reviewer: {
35
35
  name: 'Reviewer',
@@ -39,7 +39,7 @@ export const DEFAULT_CONFIG = {
39
39
  temperature: 0.3,
40
40
  maxTokens: 8192,
41
41
  tools: ['read_file', 'search_files', 'list_directory'],
42
- maxIterations: 5,
42
+ maxIterations: 15,
43
43
  },
44
44
  researcher: {
45
45
  name: 'Researcher',
@@ -49,7 +49,7 @@ export const DEFAULT_CONFIG = {
49
49
  temperature: 0.5,
50
50
  maxTokens: 8192,
51
51
  tools: ['read_file', 'search_files', 'list_directory', 'web_search', 'web_fetch'],
52
- maxIterations: 8,
52
+ maxIterations: 20,
53
53
  },
54
54
  tester: {
55
55
  name: 'Tester',
@@ -59,7 +59,7 @@ export const DEFAULT_CONFIG = {
59
59
  temperature: 0.3,
60
60
  maxTokens: 8192,
61
61
  tools: ['read_file', 'write_file', 'search_files', 'run_command', 'list_directory'],
62
- maxIterations: 10,
62
+ maxIterations: 25,
63
63
  },
64
64
  debugger: {
65
65
  name: 'Debugger',
@@ -69,7 +69,7 @@ export const DEFAULT_CONFIG = {
69
69
  temperature: 0.2,
70
70
  maxTokens: 8192,
71
71
  tools: ['read_file', 'edit_file', 'search_files', 'run_command', 'list_directory', 'apply_diff'],
72
- maxIterations: 12,
72
+ maxIterations: 20,
73
73
  },
74
74
  architect: {
75
75
  name: 'Architect',
@@ -79,7 +79,7 @@ export const DEFAULT_CONFIG = {
79
79
  temperature: 0.7,
80
80
  maxTokens: 8192,
81
81
  tools: ['read_file', 'search_files', 'list_directory'],
82
- maxIterations: 5,
82
+ maxIterations: 15,
83
83
  },
84
84
  devops: {
85
85
  name: 'DevOps',
@@ -89,7 +89,7 @@ export const DEFAULT_CONFIG = {
89
89
  temperature: 0.3,
90
90
  maxTokens: 8192,
91
91
  tools: ['read_file', 'write_file', 'edit_file', 'run_command', 'search_files', 'list_directory'],
92
- maxIterations: 10,
92
+ maxIterations: 25,
93
93
  },
94
94
  },
95
95
  tools: {
@@ -106,7 +106,7 @@ export const DEFAULT_CONFIG = {
106
106
  maxHistory: 100,
107
107
  },
108
108
  ui: {
109
- theme: 'dracula',
109
+ theme: 'claude',
110
110
  showTokenCount: true,
111
111
  showCost: true,
112
112
  streaming: true,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/core/acp.js CHANGED
File without changes
File without changes
File without changes
@@ -64,6 +64,10 @@ export declare class ApprovalSystem {
64
64
  requestBatchApproval(toolName: string, args: Record<string, unknown>, risk: 'low' | 'medium' | 'high', description?: string): Promise<ApprovalResult>;
65
65
  private processBatch;
66
66
  private isBlacklisted;
67
+ /**
68
+ * Format tool arguments as a compact one-liner for Claude Code-style display
69
+ */
70
+ private formatCompactArgs;
67
71
  private isWhitelisted;
68
72
  private getPattern;
69
73
  private getAlwaysKey;
@@ -171,27 +171,20 @@ export class ApprovalSystem {
171
171
  // --- Interactive Prompt ---
172
172
  async promptUser(toolName, args, risk, description) {
173
173
  const riskColors = { low: chalk.green, medium: chalk.yellow, high: chalk.red };
174
- const riskIcons = { low: '🟢', medium: '🟡', high: '🔴' };
174
+ const riskLabels = { low: 'low', medium: 'med', high: 'high' };
175
+ // Claude Code style: compact, minimal approval prompt
175
176
  console.log();
176
- console.log(` ${riskIcons[risk]} ${riskColors[risk].bold(`Approval needed [${risk} risk]`)}`);
177
- console.log(` ${chalk.cyan('Tool:')} ${chalk.white.bold(toolName)}`);
178
- if (description) {
179
- console.log(` ${chalk.cyan('Description:')} ${chalk.gray(description)}`);
177
+ console.log(` ${chalk.dim('┌─')} ${chalk.bold(toolName)} ${riskColors[risk](`[${riskLabels[risk]}]`)}`);
178
+ // Show key argument on one line
179
+ const keyArg = this.formatCompactArgs(toolName, args);
180
+ if (keyArg) {
181
+ console.log(` ${chalk.dim('│')} ${chalk.gray(keyArg)}`);
180
182
  }
181
- const argEntries = Object.entries(args);
182
- if (argEntries.length > 0) {
183
- console.log(` ${chalk.cyan('Arguments:')}`);
184
- for (const [key, value] of argEntries.slice(0, 5)) {
185
- const val = typeof value === 'string' && value.length > 80 ? value.slice(0, 80) + '...' : String(value);
186
- console.log(` ${chalk.gray(key)}: ${chalk.white(val)}`);
187
- }
188
- if (argEntries.length > 5) {
189
- console.log(` ${chalk.gray(`...and ${argEntries.length - 5} more`)}`);
190
- }
183
+ if (description) {
184
+ console.log(` ${chalk.dim('│')} ${chalk.gray(description.slice(0, 100))}`);
191
185
  }
192
- console.log();
193
- console.log(` ${chalk.gray('y')} = Yes ${chalk.gray('n')} = No ${chalk.gray('a')} = Yes always (session) ${chalk.gray('A')} = Yes always (persist) ${chalk.gray('e')} = Edit args ${chalk.gray('d')} = Show diff`);
194
- const answer = await this.readline(`${riskIcons[risk]} Allow ${toolName}? [y/n/a/A/e/d]: `);
186
+ console.log(` ${chalk.dim('└─')} ${chalk.gray('y')}yes ${chalk.gray('n')}no ${chalk.gray('a')}session ${chalk.gray('A')}always ${chalk.gray('e')}edit ${chalk.gray('d')}diff`);
187
+ const answer = await this.readline(` ${riskColors[risk]('?')} Allow? `);
195
188
  const startTime = Date.now();
196
189
  switch (answer.toLowerCase().trim()) {
197
190
  case 'y':
@@ -277,19 +270,18 @@ export class ApprovalSystem {
277
270
  groups.get(item.toolName).push(item);
278
271
  }
279
272
  console.log();
280
- console.log(chalk.bold.cyan(` ━━━ Batch Approval (${batch.length} operations) ━━━`));
273
+ console.log(` ${chalk.dim('┌─')} ${chalk.bold(`Batch (${batch.length} ops)`)}`);
281
274
  for (const [toolName, items] of groups) {
282
- console.log(` ${chalk.cyan(toolName)}: ${chalk.white(`${items.length} operations`)}`);
283
- for (const item of items.slice(0, 3)) {
275
+ console.log(` ${chalk.dim('│')} ${chalk.bold(toolName)} ${chalk.gray(`${items.length} ops`)}`);
276
+ for (const item of items.slice(0, 2)) {
284
277
  const preview = item.args.path || item.args.command || item.description || '';
285
- console.log(` - ${chalk.gray(String(preview).slice(0, 60))}`);
278
+ console.log(` ${chalk.dim('│')} ${chalk.gray(String(preview).slice(0, 60))}`);
286
279
  }
287
- if (items.length > 3)
288
- console.log(` ${chalk.gray(`...and ${items.length - 3} more`)}`);
280
+ if (items.length > 2)
281
+ console.log(` ${chalk.dim('│')} ${chalk.gray(`+${items.length - 2} more`)}`);
289
282
  }
290
- console.log();
291
- console.log(` ${chalk.gray('y')} = Approve all ${chalk.gray('n')} = Deny all ${chalk.gray('r')} = Review each`);
292
- const answer = await this.readline(' Batch approve? [y/n/r]: ');
283
+ console.log(` ${chalk.dim('└─')} ${chalk.gray('y')}all ${chalk.gray('n')}none ${chalk.gray('r')}review`);
284
+ const answer = await this.readline(` ${chalk.yellow('?')} Batch? `);
293
285
  switch (answer.toLowerCase().trim()) {
294
286
  case 'y':
295
287
  case 'yes':
@@ -314,6 +306,33 @@ export class ApprovalSystem {
314
306
  }
315
307
  // --- Helpers ---
316
308
  isBlacklisted(toolName) { return this.blacklist.has(toolName); }
309
+ /**
310
+ * Format tool arguments as a compact one-liner for Claude Code-style display
311
+ */
312
+ formatCompactArgs(toolName, args) {
313
+ switch (toolName) {
314
+ case 'read_file':
315
+ case 'edit_file':
316
+ case 'write_file':
317
+ case 'delete_file':
318
+ case 'apply_diff':
319
+ return String(args.path || '');
320
+ case 'run_command':
321
+ return String(args.command || '').slice(0, 80);
322
+ case 'search_files':
323
+ return `"${args.query || ''}" in ${args.path || '.'}`;
324
+ case 'list_directory':
325
+ return String(args.path || args.directory || '.');
326
+ case 'web_search':
327
+ return `"${args.query || ''}"`;
328
+ case 'web_fetch':
329
+ return String(args.url || '').slice(0, 60);
330
+ default: {
331
+ const entries = Object.entries(args).slice(0, 2);
332
+ return entries.map(([k, v]) => `${k}=${typeof v === 'string' ? v.slice(0, 40) : JSON.stringify(v)}`).join(' ');
333
+ }
334
+ }
335
+ }
317
336
  isWhitelisted(toolName) {
318
337
  if (this.whitelist.has(toolName))
319
338
  return true;
@@ -344,27 +363,36 @@ export class ApprovalSystem {
344
363
  readline(prompt) {
345
364
  // Pause the main readline to prevent it from also reading stdin input
346
365
  // This is the root cause of double character input (YY instead of Y)
347
- const mainInputStream = this.mainRl?.input;
348
- const wasMainPaused = mainInputStream?.isPaused?.();
349
- if (this.mainRl && mainInputStream && mainInputStream.isPaused()) {
350
- // Already paused, skip
351
- }
352
- else if (this.mainRl) {
353
- this.mainRl.pause();
366
+ if (this.mainRl) {
367
+ const mainInputStream = this.mainRl?.input;
368
+ if (mainInputStream && !mainInputStream.isPaused()) {
369
+ this.mainRl.pause();
370
+ }
354
371
  }
355
372
  return new Promise((resolve) => {
356
- // Reuse the main readline if available, otherwise create a temporary one
357
- const rl = this.mainRl || this.rl || createInterface({ input: process.stdin, output: process.stdout });
358
- if (!this.rl && !this.mainRl)
359
- this.rl = rl;
360
- rl.question(prompt, (answer) => {
361
- // Resume the main readline after getting the answer
362
- if (this.mainRl) {
363
- this.mainRl.resume();
364
- this.mainRl.prompt();
365
- }
366
- resolve(answer);
367
- });
373
+ // Use the main readline's question method directly - it handles pause/resume internally
374
+ if (this.mainRl) {
375
+ this.mainRl.question(prompt, (answer) => {
376
+ // Resume the main readline after getting the answer
377
+ if (this.mainRl) {
378
+ this.mainRl.resume();
379
+ this.mainRl.prompt();
380
+ }
381
+ resolve(answer);
382
+ });
383
+ }
384
+ else if (this.rl) {
385
+ this.rl.question(prompt, (answer) => {
386
+ resolve(answer);
387
+ });
388
+ }
389
+ else {
390
+ const tempRl = createInterface({ input: process.stdin, output: process.stdout });
391
+ this.rl = tempRl;
392
+ tempRl.question(prompt, (answer) => {
393
+ resolve(answer);
394
+ });
395
+ }
368
396
  });
369
397
  }
370
398
  close() {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/core/cicd.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -65,10 +65,9 @@ export class DiffPreview {
65
65
  */
66
66
  static renderDiff(diff, contextLines = 3) {
67
67
  const { filePath, added, removed, lines } = diff;
68
+ // Claude Code style: clean diff header with +/-
68
69
  console.log();
69
- console.log(` ${chalk.bold.cyan('━━━ Diff Preview ━━━')}`);
70
- console.log(` ${chalk.white(filePath)} ${chalk.green(`+${added}`)} ${chalk.red(`-${removed}`)}`);
71
- console.log(` ${chalk.gray('─'.repeat(50))}`);
70
+ console.log(` ${chalk.dim('───')} ${chalk.bold(filePath)} ${chalk.green(`+${added}`)} ${chalk.red(`-${removed}`)}`);
72
71
  let inChange = false;
73
72
  let contextCount = 0;
74
73
  for (const line of lines) {
@@ -86,43 +85,36 @@ export class DiffPreview {
86
85
  case 'context':
87
86
  contextCount++;
88
87
  if (inChange) {
89
- // Show a few context lines after a change
90
88
  if (contextCount <= contextLines) {
91
- console.log(` ${chalk.gray(' ')} ${chalk.gray(line.content)}`);
89
+ console.log(` ${chalk.dim(' ')} ${chalk.dim(line.content)}`);
92
90
  }
93
91
  else {
94
92
  inChange = false;
95
- console.log(` ${chalk.gray(' ...')}`);
93
+ console.log(` ${chalk.dim(' ...')}`);
96
94
  }
97
95
  }
98
96
  else if (contextCount <= 1) {
99
- // Show one context line before a change
100
- console.log(` ${chalk.gray(' ')} ${chalk.gray(line.content)}`);
97
+ console.log(` ${chalk.dim(' ')} ${chalk.dim(line.content)}`);
101
98
  }
102
99
  break;
103
100
  }
104
101
  }
105
- console.log(` ${chalk.gray('─'.repeat(50))}`);
106
- console.log(` ${chalk.green(`+${added} additions`)} ${chalk.red(`-${removed} deletions`)}`);
107
- console.log();
102
+ console.log(` ${chalk.dim(`${chalk.green(`+${added}`)} ${chalk.red(`-${removed}`)}`)}`);
108
103
  }
109
104
  /**
110
105
  * Render a compact summary of multiple diffs
111
106
  */
112
107
  static renderSummary(diffs) {
113
108
  console.log();
114
- console.log(` ${chalk.bold.cyan('━━━ Changes Summary ━━━')}`);
115
109
  for (const diff of diffs) {
116
110
  const statusLabel = diff.added > 0 && diff.removed === 0 ? chalk.green('created') :
117
111
  diff.added === 0 && diff.removed > 0 ? chalk.red('deleted') :
118
112
  chalk.yellow('modified');
119
- console.log(` ${statusLabel} ${diff.filePath.padEnd(40)} ${chalk.green(`+${diff.added}`)} ${chalk.red(`-${diff.removed}`)}`);
113
+ console.log(` ${statusLabel} ${diff.filePath} ${chalk.green(`+${diff.added}`)} ${chalk.red(`-${diff.removed}`)}`);
120
114
  }
121
115
  const totalAdded = diffs.reduce((s, d) => s + d.added, 0);
122
116
  const totalRemoved = diffs.reduce((s, d) => s + d.removed, 0);
123
- console.log(` ${chalk.gray('─'.repeat(50))}`);
124
- console.log(` ${chalk.bold('Total:')} ${chalk.green(`+${totalAdded}`)} ${chalk.red(`-${totalRemoved}`)}`);
125
- console.log();
117
+ console.log(` ${chalk.dim(`${chalk.green(`+${totalAdded}`)} ${chalk.red(`-${totalRemoved}`)}`)}`);
126
118
  }
127
119
  /**
128
120
  * Ask user to confirm diff changes
File without changes
File without changes
@@ -157,6 +157,10 @@ export declare class NeuroEngine {
157
157
  * Now delegates to ModelRouter for more sophisticated analysis
158
158
  */
159
159
  private assessComplexity;
160
+ /**
161
+ * Select the best agent for a given task category
162
+ */
163
+ private selectAgentForCategory;
160
164
  /**
161
165
  * Switch the active model
162
166
  */
@@ -537,7 +537,7 @@ Always consider the strengths of each agent when delegating:
537
537
  temperature: 0.7,
538
538
  maxTokens: 4096,
539
539
  tools: [],
540
- maxIterations: 5,
540
+ maxIterations: 20,
541
541
  };
542
542
  this.orchestrator = new Orchestrator(orchestratorConfig, this.client, this.registry, process.cwd(), this.sessionManager.getCurrent()?.id || 'default');
543
543
  // Register all agents with orchestrator
@@ -622,7 +622,7 @@ Always consider the strengths of each agent when delegating:
622
622
  const cwd = process.cwd();
623
623
  // Built-in agents
624
624
  for (const [key, agentConfig] of Object.entries(this.config.agents)) {
625
- const overrideConfig = { ...agentConfig, model: this.config.defaultModel };
625
+ const overrideConfig = { ...agentConfig };
626
626
  const agent = new BaseAgent(overrideConfig, this.client, this.registry, cwd, sessionId);
627
627
  this.agents.set(agentConfig.name, agent);
628
628
  }
@@ -750,9 +750,13 @@ Always consider the strengths of each agent when delegating:
750
750
  }
751
751
  else {
752
752
  const complexity = routeDecision?.complexity || this.assessComplexity(message);
753
+ const category = routeDecision?.category || this.modelRouter.getCategory(message);
753
754
  if (complexity === 'simple') {
754
- const agent = this.agents.get('Coder');
755
+ // Route to the best agent based on task category
756
+ const targetAgentName = this.selectAgentForCategory(category);
757
+ const agent = this.agents.get(targetAgentName);
755
758
  if (agent) {
759
+ this.ui.info(`Using ${targetAgentName} agent (${category} task)`);
756
760
  this.ui.startStreaming();
757
761
  try {
758
762
  result = await agent.run(message, callbacks);
@@ -762,16 +766,28 @@ Always consider the strengths of each agent when delegating:
762
766
  }
763
767
  }
764
768
  else {
765
- // Fallback to orchestration instead of crashing
766
- this.ui.warning('Coder agent not initialized, using orchestration mode');
767
- const orchestrateResult = await this.orchestrator.orchestrate(message, callbacks);
768
- result = {
769
- content: orchestrateResult.content,
770
- toolCallsMade: 0,
771
- iterations: orchestrateResult.execution.iterations,
772
- usage: orchestrateResult.totalUsage,
773
- execution: orchestrateResult.execution,
774
- };
769
+ // Fallback to Coder
770
+ const coderAgent = this.agents.get('Coder');
771
+ if (coderAgent) {
772
+ this.ui.startStreaming();
773
+ try {
774
+ result = await coderAgent.run(message, callbacks);
775
+ }
776
+ finally {
777
+ this.ui.endStreaming();
778
+ }
779
+ }
780
+ else {
781
+ this.ui.warning('No agents initialized, using orchestration mode');
782
+ const orchestrateResult = await this.orchestrator.orchestrate(message, callbacks);
783
+ result = {
784
+ content: orchestrateResult.content,
785
+ toolCallsMade: 0,
786
+ iterations: orchestrateResult.execution.iterations,
787
+ usage: orchestrateResult.totalUsage,
788
+ execution: orchestrateResult.execution,
789
+ };
790
+ }
775
791
  }
776
792
  }
777
793
  else {
@@ -905,6 +921,22 @@ Always consider the strengths of each agent when delegating:
905
921
  const decision = this.modelRouter.route(message);
906
922
  return decision.complexity;
907
923
  }
924
+ /**
925
+ * Select the best agent for a given task category
926
+ */
927
+ selectAgentForCategory(category) {
928
+ const categoryAgentMap = {
929
+ code: 'Coder',
930
+ reasoning: 'Architect',
931
+ creative: 'Coder',
932
+ analysis: 'Researcher',
933
+ conversation: 'Coder',
934
+ debugging: 'Debugger',
935
+ review: 'Reviewer',
936
+ refactoring: 'Coder',
937
+ };
938
+ return categoryAgentMap[category] || 'Coder';
939
+ }
908
940
  /**
909
941
  * Switch the active model
910
942
  */
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/core/i18n.js CHANGED
File without changes
File without changes
File without changes
File without changes