neuro-cli 4.1.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/LICENSE +21 -0
- package/README.md +510 -0
- package/dist/advisor/advisor.d.ts +50 -0
- package/dist/advisor/advisor.js +178 -0
- package/dist/agents/base.d.ts +62 -0
- package/dist/agents/base.js +215 -0
- package/dist/agents/orchestrator.d.ts +46 -0
- package/dist/agents/orchestrator.js +192 -0
- package/dist/agents/team.d.ts +51 -0
- package/dist/agents/team.js +210 -0
- package/dist/api/models.d.ts +23 -0
- package/dist/api/models.js +514 -0
- package/dist/api/ollama.d.ts +153 -0
- package/dist/api/ollama.js +751 -0
- package/dist/api/openrouter.d.ts +55 -0
- package/dist/api/openrouter.js +223 -0
- package/dist/commands/commands.d.ts +43 -0
- package/dist/commands/commands.js +308 -0
- package/dist/config/config.d.ts +8 -0
- package/dist/config/config.js +311 -0
- package/dist/context/compaction.d.ts +54 -0
- package/dist/context/compaction.js +251 -0
- package/dist/context/custom-agents.d.ts +107 -0
- package/dist/context/custom-agents.js +397 -0
- package/dist/context/custom-tools.d.ts +120 -0
- package/dist/context/custom-tools.js +564 -0
- package/dist/context/git-checkpoint.d.ts +52 -0
- package/dist/context/git-checkpoint.js +240 -0
- package/dist/context/neuro-md.d.ts +48 -0
- package/dist/context/neuro-md.js +202 -0
- package/dist/context/neuroignore.d.ts +102 -0
- package/dist/context/neuroignore.js +441 -0
- package/dist/context/repo-map.d.ts +38 -0
- package/dist/context/repo-map.js +220 -0
- package/dist/context/skill-standard.d.ts +262 -0
- package/dist/context/skill-standard.js +1156 -0
- package/dist/context/skill-system.d.ts +75 -0
- package/dist/context/skill-system.js +578 -0
- package/dist/context/tree-sitter.d.ts +99 -0
- package/dist/context/tree-sitter.js +1956 -0
- package/dist/core/acp.d.ts +325 -0
- package/dist/core/acp.js +1498 -0
- package/dist/core/api-server.d.ts +143 -0
- package/dist/core/api-server.js +550 -0
- package/dist/core/approval.d.ts +81 -0
- package/dist/core/approval.js +432 -0
- package/dist/core/auto-compact.d.ts +127 -0
- package/dist/core/auto-compact.js +436 -0
- package/dist/core/auto-mode.d.ts +232 -0
- package/dist/core/auto-mode.js +831 -0
- package/dist/core/background-session.d.ts +166 -0
- package/dist/core/background-session.js +696 -0
- package/dist/core/cicd.d.ts +257 -0
- package/dist/core/cicd.js +1443 -0
- package/dist/core/cloud-sync.d.ts +156 -0
- package/dist/core/cloud-sync.js +582 -0
- package/dist/core/code-review.d.ts +132 -0
- package/dist/core/code-review.js +1191 -0
- package/dist/core/completion.d.ts +49 -0
- package/dist/core/completion.js +384 -0
- package/dist/core/context.d.ts +38 -0
- package/dist/core/context.js +144 -0
- package/dist/core/diff-preview.d.ts +35 -0
- package/dist/core/diff-preview.js +173 -0
- package/dist/core/doom-loop.d.ts +51 -0
- package/dist/core/doom-loop.js +179 -0
- package/dist/core/engine.d.ts +183 -0
- package/dist/core/engine.js +942 -0
- package/dist/core/extended-thinking.d.ts +103 -0
- package/dist/core/extended-thinking.js +269 -0
- package/dist/core/fallback.d.ts +54 -0
- package/dist/core/fallback.js +104 -0
- package/dist/core/git-worktree.d.ts +139 -0
- package/dist/core/git-worktree.js +614 -0
- package/dist/core/headless.d.ts +30 -0
- package/dist/core/headless.js +101 -0
- package/dist/core/i18n.d.ts +83 -0
- package/dist/core/i18n.js +739 -0
- package/dist/core/linting.d.ts +129 -0
- package/dist/core/linting.js +699 -0
- package/dist/core/model-router.d.ts +109 -0
- package/dist/core/model-router.js +581 -0
- package/dist/core/multi-model.d.ts +243 -0
- package/dist/core/multi-model.js +1099 -0
- package/dist/core/multi-session.d.ts +144 -0
- package/dist/core/multi-session.js +442 -0
- package/dist/core/multimodal.d.ts +125 -0
- package/dist/core/multimodal.js +286 -0
- package/dist/core/observability.d.ts +93 -0
- package/dist/core/observability.js +737 -0
- package/dist/core/os-sandbox.d.ts +122 -0
- package/dist/core/os-sandbox.js +1193 -0
- package/dist/core/outcome-grading.d.ts +228 -0
- package/dist/core/outcome-grading.js +1123 -0
- package/dist/core/output-styles.d.ts +57 -0
- package/dist/core/output-styles.js +382 -0
- package/dist/core/parallel-agents.d.ts +183 -0
- package/dist/core/parallel-agents.js +563 -0
- package/dist/core/plugin-bundle.d.ts +236 -0
- package/dist/core/plugin-bundle.js +887 -0
- package/dist/core/plugin-sdk.d.ts +139 -0
- package/dist/core/plugin-sdk.js +273 -0
- package/dist/core/prompt-cache.d.ts +163 -0
- package/dist/core/prompt-cache.js +599 -0
- package/dist/core/sandbox.d.ts +127 -0
- package/dist/core/sandbox.js +369 -0
- package/dist/core/scheduled-tasks.d.ts +151 -0
- package/dist/core/scheduled-tasks.js +502 -0
- package/dist/core/security-scanner.d.ts +160 -0
- package/dist/core/security-scanner.js +1494 -0
- package/dist/core/session.d.ts +83 -0
- package/dist/core/session.js +269 -0
- package/dist/core/shell-completion.d.ts +51 -0
- package/dist/core/shell-completion.js +674 -0
- package/dist/core/smart-monitor.d.ts +146 -0
- package/dist/core/smart-monitor.js +1199 -0
- package/dist/core/spec-driven.d.ts +233 -0
- package/dist/core/spec-driven.js +1485 -0
- package/dist/core/spending-warnings.d.ts +123 -0
- package/dist/core/spending-warnings.js +456 -0
- package/dist/core/sub-agent.d.ts +298 -0
- package/dist/core/sub-agent.js +1023 -0
- package/dist/core/telemetry.d.ts +157 -0
- package/dist/core/telemetry.js +412 -0
- package/dist/core/terminal-ux.d.ts +134 -0
- package/dist/core/terminal-ux.js +649 -0
- package/dist/core/testing.d.ts +146 -0
- package/dist/core/testing.js +1200 -0
- package/dist/core/types.d.ts +439 -0
- package/dist/core/types.js +6 -0
- package/dist/core/undo-redo.d.ts +112 -0
- package/dist/core/undo-redo.js +290 -0
- package/dist/core/updater.d.ts +159 -0
- package/dist/core/updater.js +608 -0
- package/dist/core/vim-mode.d.ts +151 -0
- package/dist/core/vim-mode.js +771 -0
- package/dist/core/voice.d.ts +137 -0
- package/dist/core/voice.js +538 -0
- package/dist/core/web-dashboard.d.ts +109 -0
- package/dist/core/web-dashboard.js +484 -0
- package/dist/hooks/hooks.d.ts +74 -0
- package/dist/hooks/hooks.js +160 -0
- package/dist/hooks/llm-evaluator.d.ts +165 -0
- package/dist/hooks/llm-evaluator.js +560 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1186 -0
- package/dist/lsp/lsp-manager.d.ts +63 -0
- package/dist/lsp/lsp-manager.js +351 -0
- package/dist/mcp/client.d.ts +133 -0
- package/dist/mcp/client.js +684 -0
- package/dist/mcp/mcp-apps.d.ts +70 -0
- package/dist/mcp/mcp-apps.js +1007 -0
- package/dist/tools/bash.d.ts +5 -0
- package/dist/tools/bash.js +195 -0
- package/dist/tools/browser.d.ts +92 -0
- package/dist/tools/browser.js +1570 -0
- package/dist/tools/extended.d.ts +6 -0
- package/dist/tools/extended.js +191 -0
- package/dist/tools/file.d.ts +10 -0
- package/dist/tools/file.js +382 -0
- package/dist/tools/github.d.ts +389 -0
- package/dist/tools/github.js +759 -0
- package/dist/tools/index.d.ts +9 -0
- package/dist/tools/index.js +40 -0
- package/dist/tools/memory.d.ts +6 -0
- package/dist/tools/memory.js +197 -0
- package/dist/tools/registry.d.ts +29 -0
- package/dist/tools/registry.js +64 -0
- package/dist/tools/web.d.ts +6 -0
- package/dist/tools/web.js +150 -0
- package/dist/ui/renderer.d.ts +97 -0
- package/dist/ui/renderer.js +279 -0
- package/dist/ui/theme.d.ts +27 -0
- package/dist/ui/theme.js +106 -0
- package/package.json +83 -0
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
2
|
+
import { ToolDefinition } from '../core/types.js';
|
|
3
|
+
import { OpenRouterClient } from '../api/openrouter.js';
|
|
4
|
+
import { ToolRegistry, ToolExecutor, ToolContext } from '../tools/registry.js';
|
|
5
|
+
/**
|
|
6
|
+
* Configuration for spawning a sub-agent.
|
|
7
|
+
* The parent defines exactly what the child can do via tool allowlists,
|
|
8
|
+
* file scopes, and resource limits.
|
|
9
|
+
*/
|
|
10
|
+
export interface SubAgentConfig {
|
|
11
|
+
/** Human-readable name for the sub-agent (used in logging and results) */
|
|
12
|
+
name: string;
|
|
13
|
+
/** Custom system prompt that overrides the default for this sub-agent */
|
|
14
|
+
systemPrompt: string;
|
|
15
|
+
/** Tool name allowlist — only these tools will be available to the sub-agent */
|
|
16
|
+
allowedTools: string[];
|
|
17
|
+
/** Optional tool denylist — these tools are excluded even if in allowedTools */
|
|
18
|
+
deniedTools?: string[];
|
|
19
|
+
/** File system scope restriction */
|
|
20
|
+
fileScope?: {
|
|
21
|
+
/** Paths the sub-agent is allowed to read/write (absolute or relative to workingDir) */
|
|
22
|
+
allowedPaths: string[];
|
|
23
|
+
/** Paths explicitly denied regardless of allowedPaths */
|
|
24
|
+
deniedPaths: string[];
|
|
25
|
+
};
|
|
26
|
+
/** Resource limits enforced during execution */
|
|
27
|
+
resourceLimits: {
|
|
28
|
+
/** Maximum total tokens (input + output) the sub-agent may consume */
|
|
29
|
+
maxTokens: number;
|
|
30
|
+
/** Maximum number of agent loop iterations (turns) */
|
|
31
|
+
maxTurns: number;
|
|
32
|
+
/** Wall-clock timeout in milliseconds; sub-agent is cancelled if exceeded */
|
|
33
|
+
timeoutMs: number;
|
|
34
|
+
};
|
|
35
|
+
/** Override the model used by this sub-agent (defaults to parent's model) */
|
|
36
|
+
model?: string;
|
|
37
|
+
/** Maximum nesting depth for sub-agent spawning (0 = cannot spawn children, 3 = default max) */
|
|
38
|
+
maxDepth: number;
|
|
39
|
+
/** Execution mode: 'sequential' waits for result, 'async' returns a task ID immediately */
|
|
40
|
+
mode: 'sequential' | 'async';
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Structured result returned when a sub-agent completes.
|
|
44
|
+
* Provides a complete accounting of what the sub-agent did.
|
|
45
|
+
*/
|
|
46
|
+
export interface SubAgentResult {
|
|
47
|
+
/** Whether the sub-agent completed its task successfully */
|
|
48
|
+
success: boolean;
|
|
49
|
+
/** The final text output from the sub-agent */
|
|
50
|
+
output: string;
|
|
51
|
+
/** List of file paths that were modified (created, edited, or deleted) */
|
|
52
|
+
filesModified: string[];
|
|
53
|
+
/** Total tokens consumed (input + output) */
|
|
54
|
+
tokensUsed: number;
|
|
55
|
+
/** Number of agent loop iterations completed */
|
|
56
|
+
turnsCompleted: number;
|
|
57
|
+
/** Error message if the sub-agent failed */
|
|
58
|
+
error?: string;
|
|
59
|
+
/** Wall-clock duration in milliseconds */
|
|
60
|
+
duration: number;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Current status of an async sub-agent task.
|
|
64
|
+
*/
|
|
65
|
+
export type SubAgentStatus = 'pending' | 'running' | 'completed' | 'failed' | 'cancelled' | 'timed_out';
|
|
66
|
+
/**
|
|
67
|
+
* Information about a sub-agent, returned by list().
|
|
68
|
+
*/
|
|
69
|
+
export interface SubAgentInfo {
|
|
70
|
+
/** Unique task identifier */
|
|
71
|
+
taskId: string;
|
|
72
|
+
/** Human-readable name */
|
|
73
|
+
name: string;
|
|
74
|
+
/** Current status */
|
|
75
|
+
status: SubAgentStatus;
|
|
76
|
+
/** Nesting depth (0 = direct child of parent) */
|
|
77
|
+
depth: number;
|
|
78
|
+
/** Number of turns completed so far */
|
|
79
|
+
turnsCompleted: number;
|
|
80
|
+
/** Tokens consumed so far */
|
|
81
|
+
tokensUsed: number;
|
|
82
|
+
/** Elapsed time in ms since spawn */
|
|
83
|
+
elapsedMs: number;
|
|
84
|
+
/** Parent task ID (if this is a nested sub-agent) */
|
|
85
|
+
parentTaskId?: string;
|
|
86
|
+
/** Timestamp when the sub-agent was spawned */
|
|
87
|
+
startedAt: number;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Manages the lifecycle of sub-agents spawned by a parent agent.
|
|
91
|
+
*
|
|
92
|
+
* A parent agent creates a SubAgentManager with its own OpenRouterClient
|
|
93
|
+
* and ToolRegistry. When it wants to delegate work, it calls spawn()
|
|
94
|
+
* or spawnAsync() with a configuration that defines the child's
|
|
95
|
+
* permissions, tools, and resource limits.
|
|
96
|
+
*
|
|
97
|
+
* The SubAgentManager:
|
|
98
|
+
* - Creates a temporary BaseAgent with a scoped tool registry
|
|
99
|
+
* - Enforces resource limits (tokens, turns, timeout)
|
|
100
|
+
* - Tracks file modifications via before/after snapshots
|
|
101
|
+
* - Supports hierarchical delegation (sub-agents can spawn their own children)
|
|
102
|
+
* - Emits events for status changes
|
|
103
|
+
*
|
|
104
|
+
* Usage:
|
|
105
|
+
* ```typescript
|
|
106
|
+
* const manager = new SubAgentManager(client, registry, '/project', 'session-1');
|
|
107
|
+
*
|
|
108
|
+
* // Sequential: block until done
|
|
109
|
+
* const result = await manager.spawn({
|
|
110
|
+
* name: 'code-searcher',
|
|
111
|
+
* systemPrompt: 'You are a code search specialist.',
|
|
112
|
+
* allowedTools: ['search_files', 'read_file'],
|
|
113
|
+
* resourceLimits: { maxTokens: 50_000, maxTurns: 10, timeoutMs: 60_000 },
|
|
114
|
+
* maxDepth: 2,
|
|
115
|
+
* mode: 'sequential',
|
|
116
|
+
* }, 'Find all uses of the deprecated API');
|
|
117
|
+
*
|
|
118
|
+
* // Async: fire and forget, get a task ID
|
|
119
|
+
* const taskId = await manager.spawnAsync({ ... }, 'Refactor the utils');
|
|
120
|
+
* // Later...
|
|
121
|
+
* const status = manager.getStatus(taskId);
|
|
122
|
+
* const result = await manager.waitFor(taskId);
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
export declare class SubAgentManager extends EventEmitter {
|
|
126
|
+
private client;
|
|
127
|
+
private parentRegistry;
|
|
128
|
+
private workingDirectory;
|
|
129
|
+
private sessionId;
|
|
130
|
+
private defaultModel;
|
|
131
|
+
private currentDepth;
|
|
132
|
+
private maxGlobalDepth;
|
|
133
|
+
/** Active and completed sub-agent records */
|
|
134
|
+
private records;
|
|
135
|
+
/** Monotonic counter for generating unique task IDs */
|
|
136
|
+
private taskCounter;
|
|
137
|
+
/**
|
|
138
|
+
* @param client The OpenRouterClient shared with the parent agent
|
|
139
|
+
* @param registry The parent's ToolRegistry (tools will be filtered for children)
|
|
140
|
+
* @param workingDir The working directory for sub-agents
|
|
141
|
+
* @param sessionId The session ID to inherit
|
|
142
|
+
* @param defaultModel The default model to use (inherited from parent)
|
|
143
|
+
* @param currentDepth Current nesting depth (0 for top-level manager)
|
|
144
|
+
* @param maxGlobalDepth Maximum allowed nesting depth across the hierarchy
|
|
145
|
+
*/
|
|
146
|
+
constructor(client: OpenRouterClient, registry: ToolRegistry, workingDir: string, sessionId: string, defaultModel?: string, currentDepth?: number, maxGlobalDepth?: number);
|
|
147
|
+
/**
|
|
148
|
+
* Spawn a sub-agent in sequential mode and wait for its result.
|
|
149
|
+
* The parent agent blocks until the child completes (or fails/times out).
|
|
150
|
+
*
|
|
151
|
+
* @param config Configuration for the sub-agent
|
|
152
|
+
* @param prompt The task prompt to send to the sub-agent
|
|
153
|
+
* @returns Structured result from the sub-agent
|
|
154
|
+
* @throws Error if the sub-agent fails or is cancelled
|
|
155
|
+
*/
|
|
156
|
+
spawn(config: SubAgentConfig, prompt: string): Promise<SubAgentResult>;
|
|
157
|
+
/**
|
|
158
|
+
* Spawn a sub-agent in async (fire-and-forget) mode.
|
|
159
|
+
* Returns a task ID immediately; the sub-agent runs in the background.
|
|
160
|
+
* Use getStatus() to check progress and waitFor() to collect results.
|
|
161
|
+
*
|
|
162
|
+
* @param config Configuration for the sub-agent
|
|
163
|
+
* @param prompt The task prompt to send to the sub-agent
|
|
164
|
+
* @returns Unique task ID for tracking this sub-agent
|
|
165
|
+
*/
|
|
166
|
+
spawnAsync(config: SubAgentConfig, prompt: string): Promise<string>;
|
|
167
|
+
/**
|
|
168
|
+
* Get the current status of an async sub-agent task.
|
|
169
|
+
*
|
|
170
|
+
* @param taskId The task ID returned by spawnAsync()
|
|
171
|
+
* @returns Current status, or undefined if the task doesn't exist
|
|
172
|
+
*/
|
|
173
|
+
getStatus(taskId: string): SubAgentStatus | undefined;
|
|
174
|
+
/**
|
|
175
|
+
* Get detailed info about a sub-agent.
|
|
176
|
+
*
|
|
177
|
+
* @param taskId The task ID
|
|
178
|
+
* @returns Sub-agent info, or undefined if not found
|
|
179
|
+
*/
|
|
180
|
+
getInfo(taskId: string): SubAgentInfo | undefined;
|
|
181
|
+
/**
|
|
182
|
+
* Cancel a running sub-agent.
|
|
183
|
+
* The sub-agent's abort controller is triggered, causing it to
|
|
184
|
+
* stop at the next iteration boundary.
|
|
185
|
+
*
|
|
186
|
+
* @param taskId The task ID to cancel
|
|
187
|
+
* @returns True if the agent was successfully cancelled
|
|
188
|
+
*/
|
|
189
|
+
cancel(taskId: string): boolean;
|
|
190
|
+
/**
|
|
191
|
+
* List all active sub-agents (pending, running, or timed_out).
|
|
192
|
+
*
|
|
193
|
+
* @returns Array of sub-agent info objects
|
|
194
|
+
*/
|
|
195
|
+
list(): SubAgentInfo[];
|
|
196
|
+
/**
|
|
197
|
+
* Wait for a specific async sub-agent to complete and return its result.
|
|
198
|
+
*
|
|
199
|
+
* @param taskId The task ID to wait for
|
|
200
|
+
* @returns The sub-agent's result
|
|
201
|
+
* @throws Error if the task doesn't exist or was cancelled
|
|
202
|
+
*/
|
|
203
|
+
waitFor(taskId: string): Promise<SubAgentResult>;
|
|
204
|
+
/**
|
|
205
|
+
* Wait for all currently running async sub-agents to complete.
|
|
206
|
+
* Returns results for all tasks that were active at the time of the call.
|
|
207
|
+
*
|
|
208
|
+
* @returns Array of results from all awaited sub-agents
|
|
209
|
+
*/
|
|
210
|
+
waitForAll(): Promise<SubAgentResult[]>;
|
|
211
|
+
/**
|
|
212
|
+
* Get the result of a completed sub-agent.
|
|
213
|
+
*
|
|
214
|
+
* @param taskId The task ID
|
|
215
|
+
* @returns The result, or undefined if not completed
|
|
216
|
+
*/
|
|
217
|
+
getResult(taskId: string): SubAgentResult | undefined;
|
|
218
|
+
/**
|
|
219
|
+
* Get the current nesting depth of this manager.
|
|
220
|
+
* Useful for checking whether further sub-agent spawning is allowed.
|
|
221
|
+
*/
|
|
222
|
+
get depth(): number;
|
|
223
|
+
/**
|
|
224
|
+
* Check whether this manager can spawn additional sub-agents
|
|
225
|
+
* (i.e., we haven't hit the max depth).
|
|
226
|
+
*/
|
|
227
|
+
get canSpawn(): boolean;
|
|
228
|
+
/**
|
|
229
|
+
* Generate a unique task ID.
|
|
230
|
+
*/
|
|
231
|
+
private generateTaskId;
|
|
232
|
+
/**
|
|
233
|
+
* Apply default values to a SubAgentConfig.
|
|
234
|
+
*/
|
|
235
|
+
private applyDefaults;
|
|
236
|
+
/**
|
|
237
|
+
* Validate a SubAgentConfig, throwing if it's invalid.
|
|
238
|
+
*/
|
|
239
|
+
private validateConfig;
|
|
240
|
+
/**
|
|
241
|
+
* Create a SubAgentRecord for tracking the sub-agent lifecycle.
|
|
242
|
+
*/
|
|
243
|
+
private createRecord;
|
|
244
|
+
/**
|
|
245
|
+
* Execute a sub-agent: create a scoped BaseAgent, run it with
|
|
246
|
+
* resource limit enforcement, and collect results.
|
|
247
|
+
*/
|
|
248
|
+
private executeSubAgent;
|
|
249
|
+
/**
|
|
250
|
+
* Build the system prompt for a sub-agent, combining the user-provided
|
|
251
|
+
* system prompt with context about the sub-agent's restrictions.
|
|
252
|
+
*/
|
|
253
|
+
private buildSubAgentSystemPrompt;
|
|
254
|
+
/**
|
|
255
|
+
* Clean up completed/failed/cancelled sub-agent records.
|
|
256
|
+
* Returns the number of records cleaned up.
|
|
257
|
+
*/
|
|
258
|
+
cleanup(): number;
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* A ToolExecutor that can be registered in the parent agent's tool
|
|
262
|
+
* registry to give the agent the ability to spawn sub-agents via
|
|
263
|
+
* the LLM tool-calling interface.
|
|
264
|
+
*
|
|
265
|
+
* This tool appears as "spawn_sub_agent" in the agent's tool list
|
|
266
|
+
* and accepts the sub-agent configuration + prompt as arguments.
|
|
267
|
+
*
|
|
268
|
+
* Usage:
|
|
269
|
+
* ```typescript
|
|
270
|
+
* const manager = new SubAgentManager(client, registry, cwd, sessionId);
|
|
271
|
+
* const subAgentTool = new SubAgentTool(manager);
|
|
272
|
+
* registry.register(subAgentTool);
|
|
273
|
+
* ```
|
|
274
|
+
*/
|
|
275
|
+
export declare class SubAgentTool implements ToolExecutor {
|
|
276
|
+
name: string;
|
|
277
|
+
description: string;
|
|
278
|
+
risk: 'low' | 'medium' | 'high';
|
|
279
|
+
definition: ToolDefinition;
|
|
280
|
+
private manager;
|
|
281
|
+
constructor(manager: SubAgentManager);
|
|
282
|
+
execute(args: Record<string, unknown>, _context: ToolContext): Promise<string>;
|
|
283
|
+
getApprovalRequest?(args: Record<string, unknown>): import('../core/types.js').ApprovalRequest;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Convenience factory for creating a SubAgentManager from the
|
|
287
|
+
* standard NeuroEngine components.
|
|
288
|
+
*
|
|
289
|
+
* @param client The OpenRouter client from the engine
|
|
290
|
+
* @param registry The tool registry from the engine
|
|
291
|
+
* @param workingDir The current working directory
|
|
292
|
+
* @param sessionId The current session ID
|
|
293
|
+
* @param defaultModel The model to use for sub-agents
|
|
294
|
+
* @param parentDepth The current nesting depth (0 for top-level)
|
|
295
|
+
* @returns A configured SubAgentManager
|
|
296
|
+
*/
|
|
297
|
+
export declare function createSubAgentManager(client: OpenRouterClient, registry: ToolRegistry, workingDir: string, sessionId: string, defaultModel?: string, parentDepth?: number): SubAgentManager;
|
|
298
|
+
//# sourceMappingURL=sub-agent.d.ts.map
|