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.
- package/dist/advisor/advisor.d.ts +0 -0
- package/dist/advisor/advisor.js +0 -0
- package/dist/agents/base.d.ts +0 -0
- package/dist/agents/base.js +1 -1
- package/dist/agents/orchestrator.d.ts +0 -0
- package/dist/agents/orchestrator.js +0 -0
- package/dist/agents/team.d.ts +0 -0
- package/dist/agents/team.js +0 -0
- package/dist/api/models.d.ts +0 -0
- package/dist/api/models.js +0 -0
- package/dist/api/ollama.d.ts +0 -0
- package/dist/api/ollama.js +0 -0
- package/dist/api/openrouter.d.ts +0 -0
- package/dist/api/openrouter.js +0 -0
- package/dist/commands/commands.d.ts +0 -0
- package/dist/commands/commands.js +0 -0
- package/dist/config/config.d.ts +0 -0
- package/dist/config/config.js +9 -9
- package/dist/context/compaction.d.ts +0 -0
- package/dist/context/compaction.js +0 -0
- package/dist/context/custom-agents.d.ts +0 -0
- package/dist/context/custom-agents.js +0 -0
- package/dist/context/custom-tools.d.ts +0 -0
- package/dist/context/custom-tools.js +0 -0
- package/dist/context/git-checkpoint.d.ts +0 -0
- package/dist/context/git-checkpoint.js +0 -0
- package/dist/context/neuro-md.d.ts +0 -0
- package/dist/context/neuro-md.js +0 -0
- package/dist/context/neuroignore.d.ts +0 -0
- package/dist/context/neuroignore.js +0 -0
- package/dist/context/repo-map.d.ts +0 -0
- package/dist/context/repo-map.js +0 -0
- package/dist/context/skill-standard.d.ts +0 -0
- package/dist/context/skill-standard.js +0 -0
- package/dist/context/skill-system.d.ts +0 -0
- package/dist/context/skill-system.js +0 -0
- package/dist/context/tree-sitter.d.ts +0 -0
- package/dist/context/tree-sitter.js +0 -0
- package/dist/core/acp.d.ts +0 -0
- package/dist/core/acp.js +0 -0
- package/dist/core/api-server.d.ts +0 -0
- package/dist/core/api-server.js +0 -0
- package/dist/core/approval.d.ts +4 -0
- package/dist/core/approval.js +74 -46
- package/dist/core/auto-compact.d.ts +0 -0
- package/dist/core/auto-compact.js +0 -0
- package/dist/core/auto-mode.d.ts +0 -0
- package/dist/core/auto-mode.js +0 -0
- package/dist/core/background-session.d.ts +0 -0
- package/dist/core/background-session.js +0 -0
- package/dist/core/cicd.d.ts +0 -0
- package/dist/core/cicd.js +0 -0
- package/dist/core/cloud-sync.d.ts +0 -0
- package/dist/core/cloud-sync.js +0 -0
- package/dist/core/code-review.d.ts +0 -0
- package/dist/core/code-review.js +0 -0
- package/dist/core/completion.d.ts +0 -0
- package/dist/core/completion.js +0 -0
- package/dist/core/context.d.ts +0 -0
- package/dist/core/context.js +0 -0
- package/dist/core/diff-preview.d.ts +0 -0
- package/dist/core/diff-preview.js +8 -16
- package/dist/core/doom-loop.d.ts +0 -0
- package/dist/core/doom-loop.js +0 -0
- package/dist/core/engine.d.ts +4 -0
- package/dist/core/engine.js +45 -13
- package/dist/core/extended-thinking.d.ts +0 -0
- package/dist/core/extended-thinking.js +0 -0
- package/dist/core/fallback.d.ts +0 -0
- package/dist/core/fallback.js +0 -0
- package/dist/core/git-worktree.d.ts +0 -0
- package/dist/core/git-worktree.js +0 -0
- package/dist/core/headless.d.ts +0 -0
- package/dist/core/headless.js +0 -0
- package/dist/core/i18n.d.ts +0 -0
- package/dist/core/i18n.js +0 -0
- package/dist/core/linting.d.ts +0 -0
- package/dist/core/linting.js +0 -0
- package/dist/core/model-router.d.ts +0 -0
- package/dist/core/model-router.js +3 -3
- package/dist/core/multi-model.d.ts +0 -0
- package/dist/core/multi-model.js +0 -0
- package/dist/core/multi-session.d.ts +0 -0
- package/dist/core/multi-session.js +0 -0
- package/dist/core/multimodal.d.ts +0 -0
- package/dist/core/multimodal.js +0 -0
- package/dist/core/observability.d.ts +0 -0
- package/dist/core/observability.js +0 -0
- package/dist/core/os-sandbox.d.ts +0 -0
- package/dist/core/os-sandbox.js +0 -0
- package/dist/core/outcome-grading.d.ts +0 -0
- package/dist/core/outcome-grading.js +0 -0
- package/dist/core/output-styles.d.ts +0 -0
- package/dist/core/output-styles.js +0 -0
- package/dist/core/parallel-agents.d.ts +0 -0
- package/dist/core/parallel-agents.js +0 -0
- package/dist/core/plugin-bundle.d.ts +0 -0
- package/dist/core/plugin-bundle.js +0 -0
- package/dist/core/plugin-sdk.d.ts +0 -0
- package/dist/core/plugin-sdk.js +0 -0
- package/dist/core/prompt-cache.d.ts +0 -0
- package/dist/core/prompt-cache.js +0 -0
- package/dist/core/sandbox.d.ts +0 -0
- package/dist/core/sandbox.js +0 -0
- package/dist/core/scheduled-tasks.d.ts +0 -0
- package/dist/core/scheduled-tasks.js +0 -0
- package/dist/core/security-scanner.d.ts +0 -0
- package/dist/core/security-scanner.js +0 -0
- package/dist/core/session.d.ts +0 -0
- package/dist/core/session.js +0 -0
- package/dist/core/shell-completion.d.ts +0 -0
- package/dist/core/shell-completion.js +0 -0
- package/dist/core/smart-monitor.d.ts +0 -0
- package/dist/core/smart-monitor.js +0 -0
- package/dist/core/spec-driven.d.ts +0 -0
- package/dist/core/spec-driven.js +0 -0
- package/dist/core/spending-warnings.d.ts +0 -0
- package/dist/core/spending-warnings.js +0 -0
- package/dist/core/sub-agent.d.ts +0 -0
- package/dist/core/sub-agent.js +0 -0
- package/dist/core/telemetry.d.ts +0 -0
- package/dist/core/telemetry.js +0 -0
- package/dist/core/terminal-ux.d.ts +0 -0
- package/dist/core/terminal-ux.js +0 -0
- package/dist/core/testing.d.ts +0 -0
- package/dist/core/testing.js +0 -0
- package/dist/core/types.d.ts +1 -1
- package/dist/core/types.js +0 -0
- package/dist/core/undo-redo.d.ts +0 -0
- package/dist/core/undo-redo.js +0 -0
- package/dist/core/updater.d.ts +0 -0
- package/dist/core/updater.js +0 -0
- package/dist/core/vim-mode.d.ts +0 -0
- package/dist/core/vim-mode.js +0 -0
- package/dist/core/voice.d.ts +0 -0
- package/dist/core/voice.js +0 -0
- package/dist/core/web-dashboard.d.ts +0 -0
- package/dist/core/web-dashboard.js +0 -0
- package/dist/hooks/hooks.d.ts +0 -0
- package/dist/hooks/hooks.js +0 -0
- package/dist/hooks/llm-evaluator.d.ts +0 -0
- package/dist/hooks/llm-evaluator.js +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +11 -9
- package/dist/lsp/lsp-manager.d.ts +0 -0
- package/dist/lsp/lsp-manager.js +0 -0
- package/dist/mcp/client.d.ts +0 -0
- package/dist/mcp/client.js +0 -0
- package/dist/mcp/mcp-apps.d.ts +0 -0
- package/dist/mcp/mcp-apps.js +0 -0
- package/dist/tools/bash.d.ts +0 -0
- package/dist/tools/bash.js +0 -0
- package/dist/tools/browser.d.ts +0 -0
- package/dist/tools/browser.js +0 -0
- package/dist/tools/extended.d.ts +0 -0
- package/dist/tools/extended.js +0 -0
- package/dist/tools/file.d.ts +0 -0
- package/dist/tools/file.js +0 -0
- package/dist/tools/github.d.ts +0 -0
- package/dist/tools/github.js +0 -0
- package/dist/tools/index.d.ts +0 -0
- package/dist/tools/index.js +0 -0
- package/dist/tools/memory.d.ts +0 -0
- package/dist/tools/memory.js +0 -0
- package/dist/tools/registry.d.ts +0 -0
- package/dist/tools/registry.js +0 -0
- package/dist/tools/web.d.ts +0 -0
- package/dist/tools/web.js +0 -0
- package/dist/ui/renderer.d.ts +10 -63
- package/dist/ui/renderer.js +170 -155
- package/dist/ui/theme.d.ts +5 -0
- package/dist/ui/theme.js +99 -45
- package/dist/utils/crosspath.d.ts +0 -0
- package/dist/utils/crosspath.js +0 -0
- package/package.json +1 -1
|
File without changes
|
package/dist/advisor/advisor.js
CHANGED
|
File without changes
|
package/dist/agents/base.d.ts
CHANGED
|
File without changes
|
package/dist/agents/base.js
CHANGED
|
@@ -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 =
|
|
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
|
package/dist/agents/team.d.ts
CHANGED
|
File without changes
|
package/dist/agents/team.js
CHANGED
|
File without changes
|
package/dist/api/models.d.ts
CHANGED
|
File without changes
|
package/dist/api/models.js
CHANGED
|
File without changes
|
package/dist/api/ollama.d.ts
CHANGED
|
File without changes
|
package/dist/api/ollama.js
CHANGED
|
File without changes
|
package/dist/api/openrouter.d.ts
CHANGED
|
File without changes
|
package/dist/api/openrouter.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/config/config.d.ts
CHANGED
|
File without changes
|
package/dist/config/config.js
CHANGED
|
@@ -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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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: '
|
|
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
|
package/dist/context/neuro-md.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/context/repo-map.js
CHANGED
|
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.d.ts
CHANGED
|
File without changes
|
package/dist/core/acp.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/core/api-server.js
CHANGED
|
File without changes
|
package/dist/core/approval.d.ts
CHANGED
|
@@ -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;
|
package/dist/core/approval.js
CHANGED
|
@@ -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
|
|
174
|
+
const riskLabels = { low: 'low', medium: 'med', high: 'high' };
|
|
175
|
+
// Claude Code style: compact, minimal approval prompt
|
|
175
176
|
console.log();
|
|
176
|
-
console.log(` ${
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
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
|
-
|
|
182
|
-
|
|
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
|
-
|
|
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
|
|
273
|
+
console.log(` ${chalk.dim('┌─')} ${chalk.bold(`Batch (${batch.length} ops)`)}`);
|
|
281
274
|
for (const [toolName, items] of groups) {
|
|
282
|
-
console.log(` ${chalk.
|
|
283
|
-
for (const item of items.slice(0,
|
|
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(`
|
|
278
|
+
console.log(` ${chalk.dim('│')} ${chalk.gray(String(preview).slice(0, 60))}`);
|
|
286
279
|
}
|
|
287
|
-
if (items.length >
|
|
288
|
-
console.log(`
|
|
280
|
+
if (items.length > 2)
|
|
281
|
+
console.log(` ${chalk.dim('│')} ${chalk.gray(`+${items.length - 2} more`)}`);
|
|
289
282
|
}
|
|
290
|
-
console.log();
|
|
291
|
-
|
|
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
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
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
|
-
//
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
}
|
|
366
|
-
|
|
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
|
package/dist/core/auto-mode.d.ts
CHANGED
|
File without changes
|
package/dist/core/auto-mode.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/core/cicd.d.ts
CHANGED
|
File without changes
|
package/dist/core/cicd.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/core/cloud-sync.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/core/code-review.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/core/completion.js
CHANGED
|
File without changes
|
package/dist/core/context.d.ts
CHANGED
|
File without changes
|
package/dist/core/context.js
CHANGED
|
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.
|
|
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.
|
|
89
|
+
console.log(` ${chalk.dim(' ')} ${chalk.dim(line.content)}`);
|
|
92
90
|
}
|
|
93
91
|
else {
|
|
94
92
|
inChange = false;
|
|
95
|
-
console.log(` ${chalk.
|
|
93
|
+
console.log(` ${chalk.dim(' ...')}`);
|
|
96
94
|
}
|
|
97
95
|
}
|
|
98
96
|
else if (contextCount <= 1) {
|
|
99
|
-
|
|
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.
|
|
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
|
|
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.
|
|
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
|
package/dist/core/doom-loop.d.ts
CHANGED
|
File without changes
|
package/dist/core/doom-loop.js
CHANGED
|
File without changes
|
package/dist/core/engine.d.ts
CHANGED
|
@@ -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
|
*/
|
package/dist/core/engine.js
CHANGED
|
@@ -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:
|
|
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
|
|
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
|
-
|
|
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
|
|
766
|
-
this.
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
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
|
package/dist/core/fallback.d.ts
CHANGED
|
File without changes
|
package/dist/core/fallback.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/core/headless.d.ts
CHANGED
|
File without changes
|
package/dist/core/headless.js
CHANGED
|
File without changes
|
package/dist/core/i18n.d.ts
CHANGED
|
File without changes
|
package/dist/core/i18n.js
CHANGED
|
File without changes
|
package/dist/core/linting.d.ts
CHANGED
|
File without changes
|
package/dist/core/linting.js
CHANGED
|
File without changes
|
|
File without changes
|