gemini-helper-friend 2.0.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 +25 -0
- package/README.md +216 -0
- package/dist/config/index.d.ts +6 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +6 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/loader.d.ts +22 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +193 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/templates/completion-inspector.mdx +648 -0
- package/dist/config/templates/helper-friend.mdx +763 -0
- package/dist/config/templates/manual-tester.mdx +950 -0
- package/dist/config/types.d.ts +90 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +6 -0
- package/dist/config/types.js.map +1 -0
- package/dist/config/yaml/subagents.yaml +449 -0
- package/dist/config/yaml/tools.yaml +0 -0
- package/dist/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +2 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +253 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/agentic-task.tool.d.ts +2 -0
- package/dist/tools/agentic-task.tool.d.ts.map +1 -0
- package/dist/tools/agentic-task.tool.js +2 -0
- package/dist/tools/agentic-task.tool.js.map +1 -0
- package/dist/tools/extension-manager.tool.d.ts +2 -0
- package/dist/tools/extension-manager.tool.d.ts.map +1 -0
- package/dist/tools/extension-manager.tool.js +2 -0
- package/dist/tools/extension-manager.tool.js.map +1 -0
- package/dist/tools/gemini-task.tool.d.ts +2 -0
- package/dist/tools/gemini-task.tool.d.ts.map +1 -0
- package/dist/tools/gemini-task.tool.js +2 -0
- package/dist/tools/gemini-task.tool.js.map +1 -0
- package/dist/tools/index.d.ts +5 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +5 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/session-manager.tool.d.ts +2 -0
- package/dist/tools/session-manager.tool.d.ts.map +1 -0
- package/dist/tools/session-manager.tool.js +2 -0
- package/dist/tools/session-manager.tool.js.map +1 -0
- package/dist/tools/structured-query.tool.d.ts +2 -0
- package/dist/tools/structured-query.tool.d.ts.map +1 -0
- package/dist/tools/structured-query.tool.js +2 -0
- package/dist/tools/structured-query.tool.js.map +1 -0
- package/dist/tools/subagent.tool.d.ts +75 -0
- package/dist/tools/subagent.tool.d.ts.map +1 -0
- package/dist/tools/subagent.tool.js +604 -0
- package/dist/tools/subagent.tool.js.map +1 -0
- package/dist/utils/geminiExecutor.d.ts +2 -0
- package/dist/utils/geminiExecutor.d.ts.map +1 -0
- package/dist/utils/geminiExecutor.js +2 -0
- package/dist/utils/geminiExecutor.js.map +1 -0
- package/package.json +62 -0
- package/src/config/templates/completion-inspector.mdx +648 -0
- package/src/config/templates/helper-friend.mdx +763 -0
- package/src/config/templates/manual-tester.mdx +950 -0
- package/src/config/yaml/subagents.yaml +449 -0
|
@@ -0,0 +1,604 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gemini Subagent Tool - Single consolidated tool with task type enum
|
|
3
|
+
* Loads task-specific instructions from YAML and merges with user prompt
|
|
4
|
+
*/
|
|
5
|
+
import { readFileSync } from 'fs';
|
|
6
|
+
import { fileURLToPath } from 'url';
|
|
7
|
+
import { dirname, join } from 'path';
|
|
8
|
+
import { parse as parseYaml } from 'yaml';
|
|
9
|
+
import { spawn } from 'child_process';
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = dirname(__filename);
|
|
12
|
+
// In-memory task store (Map keyed by 5-digit task ID)
|
|
13
|
+
const taskStore = new Map();
|
|
14
|
+
// Task expiry: 1 hour (in milliseconds)
|
|
15
|
+
const TASK_EXPIRY_MS = 60 * 60 * 1000;
|
|
16
|
+
// ID counter (generates 5-digit IDs: 10000-99999)
|
|
17
|
+
let taskIdCounter = 10000;
|
|
18
|
+
/**
|
|
19
|
+
* Generate unique 5-digit task ID
|
|
20
|
+
*/
|
|
21
|
+
function generateTaskId() {
|
|
22
|
+
const id = taskIdCounter;
|
|
23
|
+
taskIdCounter++;
|
|
24
|
+
// Wrap around if we exceed 99999
|
|
25
|
+
if (taskIdCounter > 99999) {
|
|
26
|
+
taskIdCounter = 10000;
|
|
27
|
+
}
|
|
28
|
+
return id;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Create a new task in pending state
|
|
32
|
+
*/
|
|
33
|
+
export function createTask(taskType) {
|
|
34
|
+
const id = generateTaskId();
|
|
35
|
+
const now = new Date().toISOString();
|
|
36
|
+
const task = {
|
|
37
|
+
id,
|
|
38
|
+
status: 'pending',
|
|
39
|
+
task_type: taskType,
|
|
40
|
+
progress: 0,
|
|
41
|
+
started_at: now,
|
|
42
|
+
updated_at: now,
|
|
43
|
+
};
|
|
44
|
+
taskStore.set(id, task);
|
|
45
|
+
// Schedule cleanup after expiry
|
|
46
|
+
setTimeout(() => {
|
|
47
|
+
taskStore.delete(id);
|
|
48
|
+
}, TASK_EXPIRY_MS);
|
|
49
|
+
return task;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Update task status
|
|
53
|
+
*/
|
|
54
|
+
export function updateTask(id, updates) {
|
|
55
|
+
const task = taskStore.get(id);
|
|
56
|
+
if (!task)
|
|
57
|
+
return null;
|
|
58
|
+
Object.assign(task, updates, { updated_at: new Date().toISOString() });
|
|
59
|
+
return task;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Get task by ID
|
|
63
|
+
*/
|
|
64
|
+
export function getTask(id) {
|
|
65
|
+
return taskStore.get(id) || null;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Get task status response for check_subagent_task tool
|
|
69
|
+
*/
|
|
70
|
+
export function getTaskStatusResponse(taskId) {
|
|
71
|
+
const task = taskStore.get(taskId);
|
|
72
|
+
if (!task) {
|
|
73
|
+
return {
|
|
74
|
+
task_id: taskId,
|
|
75
|
+
status: 'not_found',
|
|
76
|
+
error: `Task ${taskId} not found. It may have expired (1 hour TTL) or never existed.`,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
const response = {
|
|
80
|
+
task_id: task.id,
|
|
81
|
+
status: task.status,
|
|
82
|
+
task_type: task.task_type,
|
|
83
|
+
started_at: task.started_at,
|
|
84
|
+
};
|
|
85
|
+
if (task.status === 'running') {
|
|
86
|
+
response.progress = task.progress;
|
|
87
|
+
}
|
|
88
|
+
if (task.status === 'completed') {
|
|
89
|
+
response.result = task.result;
|
|
90
|
+
response.completed_at = task.completed_at;
|
|
91
|
+
const startTime = new Date(task.started_at).getTime();
|
|
92
|
+
const endTime = new Date(task.completed_at).getTime();
|
|
93
|
+
response.duration_seconds = Math.round((endTime - startTime) / 1000);
|
|
94
|
+
}
|
|
95
|
+
if (task.status === 'failed') {
|
|
96
|
+
response.error = task.error;
|
|
97
|
+
}
|
|
98
|
+
return response;
|
|
99
|
+
}
|
|
100
|
+
let cachedConfig = null;
|
|
101
|
+
function loadSubagentConfig() {
|
|
102
|
+
if (cachedConfig)
|
|
103
|
+
return cachedConfig;
|
|
104
|
+
const yamlPath = join(__dirname, '../config/yaml/subagents.yaml');
|
|
105
|
+
const yamlContent = readFileSync(yamlPath, 'utf8');
|
|
106
|
+
cachedConfig = parseYaml(yamlContent);
|
|
107
|
+
return cachedConfig;
|
|
108
|
+
}
|
|
109
|
+
function formatLLMFriendlyError(error) {
|
|
110
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
111
|
+
// Check for Gemini API "entity not found" errors (invalid model names)
|
|
112
|
+
if (errorMessage.includes('Requested entity was not found') ||
|
|
113
|
+
errorMessage.includes('API Error: Requested entity was not found')) {
|
|
114
|
+
return {
|
|
115
|
+
code: 'INVALID_MODEL',
|
|
116
|
+
message: 'Model not found. The specified model name is not recognized by Gemini API.',
|
|
117
|
+
suggestion: 'Leave model empty for auto-selection, or check available models with: gemini --help',
|
|
118
|
+
retryable: true,
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
if (errorMessage.includes('RESOURCE_EXHAUSTED') || errorMessage.includes('quota')) {
|
|
122
|
+
return {
|
|
123
|
+
code: 'QUOTA_EXCEEDED',
|
|
124
|
+
message: `API quota exceeded: ${errorMessage}`,
|
|
125
|
+
suggestion: 'Wait for quota reset or try a simpler task.',
|
|
126
|
+
retryable: true,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
if (errorMessage.includes('ENOENT') || errorMessage.includes('not found')) {
|
|
130
|
+
return {
|
|
131
|
+
code: 'CLI_NOT_FOUND',
|
|
132
|
+
message: `Gemini CLI not found: ${errorMessage}`,
|
|
133
|
+
suggestion: 'Install Gemini CLI: https://github.com/google-gemini/gemini-cli',
|
|
134
|
+
retryable: false,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
if (errorMessage.includes('timeout') || errorMessage.includes('ETIMEDOUT')) {
|
|
138
|
+
return {
|
|
139
|
+
code: 'TIMEOUT',
|
|
140
|
+
message: `Request timed out: ${errorMessage}`,
|
|
141
|
+
suggestion: 'Try a simpler task or reduce file context.',
|
|
142
|
+
retryable: true,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
// Generic Gemini API errors
|
|
146
|
+
if (errorMessage.includes('Error when talking to Gemini API') ||
|
|
147
|
+
errorMessage.includes('API Error')) {
|
|
148
|
+
return {
|
|
149
|
+
code: 'GEMINI_API_ERROR',
|
|
150
|
+
message: `Gemini API error: ${errorMessage}`,
|
|
151
|
+
suggestion: 'Check Gemini CLI logs or try again. Leave model empty for auto-selection.',
|
|
152
|
+
retryable: true,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
return {
|
|
156
|
+
code: 'EXECUTION_ERROR',
|
|
157
|
+
message: errorMessage,
|
|
158
|
+
suggestion: 'Review the error and adjust your task.',
|
|
159
|
+
retryable: false,
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
function formatErrorForLLM(error) {
|
|
163
|
+
return `## ❌ Gemini Execution Error
|
|
164
|
+
|
|
165
|
+
**Error Code:** \`${error.code}\`
|
|
166
|
+
|
|
167
|
+
**Message:** ${error.message}
|
|
168
|
+
|
|
169
|
+
**💡 Suggestion:** ${error.suggestion}
|
|
170
|
+
|
|
171
|
+
**Retryable:** ${error.retryable ? 'Yes' : 'No'}`;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Format process spawn errors (CLI not found, permission denied, etc.)
|
|
175
|
+
*/
|
|
176
|
+
function formatProcessError(error, command, execTimeMs) {
|
|
177
|
+
const errorCode = error.code;
|
|
178
|
+
if (errorCode === 'ENOENT') {
|
|
179
|
+
return `## ❌ CLI Not Found
|
|
180
|
+
|
|
181
|
+
**Error:** The \`${command}\` command was not found.
|
|
182
|
+
|
|
183
|
+
**Execution Time:** ${execTimeMs}ms
|
|
184
|
+
|
|
185
|
+
**💡 How to Fix:**
|
|
186
|
+
1. Install Gemini CLI: \`npm install -g @anthropic-ai/claude-cli\` or visit https://github.com/google-gemini/gemini-cli
|
|
187
|
+
2. Verify installation: \`${command} --version\`
|
|
188
|
+
3. Ensure it's in your PATH
|
|
189
|
+
|
|
190
|
+
**Retryable:** No (requires installation)`;
|
|
191
|
+
}
|
|
192
|
+
if (errorCode === 'EACCES') {
|
|
193
|
+
return `## ❌ Permission Denied
|
|
194
|
+
|
|
195
|
+
**Error:** Permission denied executing \`${command}\`.
|
|
196
|
+
|
|
197
|
+
**Execution Time:** ${execTimeMs}ms
|
|
198
|
+
|
|
199
|
+
**💡 How to Fix:**
|
|
200
|
+
1. Check file permissions: \`ls -la $(which ${command})\`
|
|
201
|
+
2. Try: \`chmod +x $(which ${command})\`
|
|
202
|
+
|
|
203
|
+
**Retryable:** No (requires permission fix)`;
|
|
204
|
+
}
|
|
205
|
+
return `## ❌ Process Spawn Error
|
|
206
|
+
|
|
207
|
+
**Error:** ${error.message}
|
|
208
|
+
**Code:** ${errorCode || 'UNKNOWN'}
|
|
209
|
+
|
|
210
|
+
**Execution Time:** ${execTimeMs}ms
|
|
211
|
+
|
|
212
|
+
**💡 Suggestion:** Check that Gemini CLI is properly installed and accessible.
|
|
213
|
+
|
|
214
|
+
**Retryable:** No`;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Format signal termination errors (SIGTERM, SIGKILL, etc.)
|
|
218
|
+
*/
|
|
219
|
+
function formatSignalError(signal, model, execTimeMs) {
|
|
220
|
+
const signalInfo = {
|
|
221
|
+
'SIGTERM': 'Process was terminated (possibly timeout or manual kill)',
|
|
222
|
+
'SIGKILL': 'Process was forcefully killed (possibly OOM or system limit)',
|
|
223
|
+
'SIGINT': 'Process was interrupted (Ctrl+C or similar)',
|
|
224
|
+
'SIGPIPE': 'Broken pipe - output stream closed unexpectedly',
|
|
225
|
+
};
|
|
226
|
+
return `## ❌ Process Terminated by Signal
|
|
227
|
+
|
|
228
|
+
**Signal:** \`${signal}\`
|
|
229
|
+
**Model:** \`${model}\`
|
|
230
|
+
**Execution Time:** ${execTimeMs}ms
|
|
231
|
+
|
|
232
|
+
**What Happened:** ${signalInfo[signal] || 'Process received termination signal'}
|
|
233
|
+
|
|
234
|
+
**💡 How to Fix:**
|
|
235
|
+
- If timeout: Try a simpler prompt or reduce context
|
|
236
|
+
- If OOM: Reduce prompt size or try a smaller model
|
|
237
|
+
- If manual: Check for background process management issues
|
|
238
|
+
|
|
239
|
+
**Retryable:** Yes (try with simpler task)`;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Format API errors from Gemini JSON response
|
|
243
|
+
*/
|
|
244
|
+
function formatApiError(error, model, execTimeMs) {
|
|
245
|
+
const errorType = error.type || 'API_ERROR';
|
|
246
|
+
const errorMessage = error.message || 'Unknown API error';
|
|
247
|
+
const errorCode = error.code;
|
|
248
|
+
let suggestion = 'Try again or use a different model.';
|
|
249
|
+
let retryable = true;
|
|
250
|
+
if (errorMessage.includes('quota') || errorMessage.includes('RESOURCE_EXHAUSTED')) {
|
|
251
|
+
suggestion = 'API quota exceeded. Wait for reset or try a smaller task.';
|
|
252
|
+
}
|
|
253
|
+
else if (errorMessage.includes('not found') || errorMessage.includes('invalid')) {
|
|
254
|
+
suggestion = 'Model may not exist. Try: gemini-2.5-flash or gemini-2.5-pro';
|
|
255
|
+
retryable = true;
|
|
256
|
+
}
|
|
257
|
+
else if (errorMessage.includes('auth') || errorMessage.includes('permission')) {
|
|
258
|
+
suggestion = 'Check your API key and permissions. Run: gemini auth';
|
|
259
|
+
retryable = false;
|
|
260
|
+
}
|
|
261
|
+
return `## ❌ Gemini API Error
|
|
262
|
+
|
|
263
|
+
**Error Type:** \`${errorType}\`
|
|
264
|
+
**Error Code:** ${errorCode || 'N/A'}
|
|
265
|
+
**Model:** \`${model}\`
|
|
266
|
+
**Execution Time:** ${execTimeMs}ms
|
|
267
|
+
|
|
268
|
+
**Message:** ${errorMessage}
|
|
269
|
+
|
|
270
|
+
**💡 Suggestion:** ${suggestion}
|
|
271
|
+
|
|
272
|
+
**Retryable:** ${retryable ? 'Yes' : 'No'}`;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Format non-zero exit code errors with detailed diagnostics
|
|
276
|
+
*/
|
|
277
|
+
function formatExitCodeError(code, stdout, stderr, model, execTimeMs) {
|
|
278
|
+
const exitCode = code ?? -1;
|
|
279
|
+
// Common exit codes and their meanings
|
|
280
|
+
const exitCodeInfo = {
|
|
281
|
+
1: { meaning: 'General error', suggestion: 'Check stderr output for details' },
|
|
282
|
+
2: { meaning: 'Misuse of shell command', suggestion: 'Verify command arguments' },
|
|
283
|
+
126: { meaning: 'Command not executable', suggestion: 'Check file permissions' },
|
|
284
|
+
127: { meaning: 'Command not found', suggestion: 'Install Gemini CLI' },
|
|
285
|
+
128: { meaning: 'Invalid exit argument', suggestion: 'Internal CLI error' },
|
|
286
|
+
130: { meaning: 'Terminated by Ctrl+C', suggestion: 'Process was interrupted' },
|
|
287
|
+
137: { meaning: 'Killed (OOM or SIGKILL)', suggestion: 'Reduce prompt size' },
|
|
288
|
+
143: { meaning: 'Terminated (SIGTERM)', suggestion: 'Process was terminated' },
|
|
289
|
+
};
|
|
290
|
+
const info = exitCodeInfo[exitCode] || { meaning: 'Unknown error', suggestion: 'Check output' };
|
|
291
|
+
// Extract meaningful error from output
|
|
292
|
+
let errorDetail = '';
|
|
293
|
+
if (stderr) {
|
|
294
|
+
// Try to extract the most relevant error line
|
|
295
|
+
const lines = stderr.split('\n').filter(l => l.trim());
|
|
296
|
+
const errorLine = lines.find(l => l.includes('Error') || l.includes('error') || l.includes('failed') || l.includes('FAILED')) || lines[lines.length - 1];
|
|
297
|
+
errorDetail = errorLine?.slice(0, 500) || stderr.slice(0, 500);
|
|
298
|
+
}
|
|
299
|
+
else if (stdout) {
|
|
300
|
+
// Sometimes errors go to stdout
|
|
301
|
+
try {
|
|
302
|
+
const json = JSON.parse(stdout);
|
|
303
|
+
if (json.error) {
|
|
304
|
+
errorDetail = json.error.message || JSON.stringify(json.error);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
catch {
|
|
308
|
+
errorDetail = stdout.slice(0, 500);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
return `## ❌ Gemini CLI Exit Error
|
|
312
|
+
|
|
313
|
+
**Exit Code:** \`${exitCode}\` (${info.meaning})
|
|
314
|
+
**Model:** \`${model}\`
|
|
315
|
+
**Execution Time:** ${execTimeMs}ms
|
|
316
|
+
|
|
317
|
+
**Error Output:**
|
|
318
|
+
\`\`\`
|
|
319
|
+
${errorDetail || 'No error output captured'}
|
|
320
|
+
\`\`\`
|
|
321
|
+
|
|
322
|
+
**💡 Suggestion:** ${info.suggestion}
|
|
323
|
+
|
|
324
|
+
**Debug Info:**
|
|
325
|
+
- stderr length: ${stderr.length} chars
|
|
326
|
+
- stdout length: ${stdout.length} chars
|
|
327
|
+
|
|
328
|
+
**Retryable:** ${exitCode === 1 || exitCode === 137 ? 'Yes (try simpler task)' : 'Maybe'}`;
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Load MDX template from file
|
|
332
|
+
*/
|
|
333
|
+
function loadMdxTemplate(templateFile) {
|
|
334
|
+
const templatePath = join(__dirname, '../config/templates', templateFile);
|
|
335
|
+
return readFileSync(templatePath, 'utf8');
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Build final prompt by merging MDX template with user prompt
|
|
339
|
+
*/
|
|
340
|
+
function buildFinalPrompt(taskType, userPrompt, includeInstructions) {
|
|
341
|
+
const config = loadSubagentConfig();
|
|
342
|
+
const taskConfig = config.task_types[taskType];
|
|
343
|
+
if (!taskConfig) {
|
|
344
|
+
throw new Error(`Unknown task type: ${taskType}. Must be: completion-inspector, helper-friend, or manual-tester`);
|
|
345
|
+
}
|
|
346
|
+
if (!includeInstructions) {
|
|
347
|
+
return userPrompt;
|
|
348
|
+
}
|
|
349
|
+
// Load MDX template and replace {{user_prompt}} placeholder
|
|
350
|
+
const template = loadMdxTemplate(taskConfig.template_file);
|
|
351
|
+
return template.replace('{{user_prompt}}', userPrompt);
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Get all completed/failed tasks as MCP resources
|
|
355
|
+
*/
|
|
356
|
+
export function getCompletedTasksAsResources() {
|
|
357
|
+
const resources = [];
|
|
358
|
+
for (const [id, task] of taskStore.entries()) {
|
|
359
|
+
if (task.status === 'completed' || task.status === 'failed') {
|
|
360
|
+
const statusEmoji = task.status === 'completed' ? '✅' : '❌';
|
|
361
|
+
resources.push({
|
|
362
|
+
uri: `task://${id}`,
|
|
363
|
+
name: `${statusEmoji} Task ${id} - ${task.task_type}`,
|
|
364
|
+
description: task.status === 'completed'
|
|
365
|
+
? `🎉 Task ${id} is READY! Result available for ${task.task_type} task.`
|
|
366
|
+
: `⚠️ Task ${id} FAILED: ${task.error?.slice(0, 100)}`,
|
|
367
|
+
mimeType: 'text/markdown',
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
return resources;
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Get task result content by resource URI
|
|
375
|
+
*/
|
|
376
|
+
export function getTaskResourceContent(uri) {
|
|
377
|
+
// Parse task ID from URI (format: task://12345)
|
|
378
|
+
const match = uri.match(/^task:\/\/(\d+)$/);
|
|
379
|
+
if (!match)
|
|
380
|
+
return null;
|
|
381
|
+
const taskId = parseInt(match[1], 10);
|
|
382
|
+
const task = taskStore.get(taskId);
|
|
383
|
+
if (!task)
|
|
384
|
+
return null;
|
|
385
|
+
if (task.status === 'completed') {
|
|
386
|
+
return `# ✅ Task ${taskId} - Completed
|
|
387
|
+
|
|
388
|
+
**Task Type:** ${task.task_type}
|
|
389
|
+
**Started:** ${task.started_at}
|
|
390
|
+
**Completed:** ${task.completed_at}
|
|
391
|
+
|
|
392
|
+
---
|
|
393
|
+
|
|
394
|
+
## Result
|
|
395
|
+
|
|
396
|
+
${task.result}`;
|
|
397
|
+
}
|
|
398
|
+
if (task.status === 'failed') {
|
|
399
|
+
return `# ❌ Task ${taskId} - Failed
|
|
400
|
+
|
|
401
|
+
**Task Type:** ${task.task_type}
|
|
402
|
+
**Started:** ${task.started_at}
|
|
403
|
+
|
|
404
|
+
---
|
|
405
|
+
|
|
406
|
+
## Error
|
|
407
|
+
|
|
408
|
+
${task.error}`;
|
|
409
|
+
}
|
|
410
|
+
return null;
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Execute subagent in async mode - returns task ID immediately, runs in background
|
|
414
|
+
*/
|
|
415
|
+
export function executeSubagentAsync(args, onTaskProgress, onTaskComplete) {
|
|
416
|
+
const task = createTask(args.task_type);
|
|
417
|
+
// Update to running state
|
|
418
|
+
updateTask(task.id, { status: 'running', progress: 0 });
|
|
419
|
+
// Execute in background (fire and forget)
|
|
420
|
+
executeSubagent(args, (output) => {
|
|
421
|
+
// Update progress (estimate based on output chunks)
|
|
422
|
+
const currentTask = getTask(task.id);
|
|
423
|
+
if (currentTask && currentTask.status === 'running') {
|
|
424
|
+
const newProgress = Math.min(currentTask.progress + 5, 95);
|
|
425
|
+
updateTask(task.id, { progress: newProgress });
|
|
426
|
+
onTaskProgress?.(task.id, newProgress, output);
|
|
427
|
+
}
|
|
428
|
+
})
|
|
429
|
+
.then(async (result) => {
|
|
430
|
+
updateTask(task.id, {
|
|
431
|
+
status: 'completed',
|
|
432
|
+
progress: 100,
|
|
433
|
+
result,
|
|
434
|
+
completed_at: new Date().toISOString(),
|
|
435
|
+
});
|
|
436
|
+
await onTaskComplete?.(task.id);
|
|
437
|
+
})
|
|
438
|
+
.catch(async (error) => {
|
|
439
|
+
updateTask(task.id, {
|
|
440
|
+
status: 'failed',
|
|
441
|
+
error: error instanceof Error ? error.message : String(error),
|
|
442
|
+
});
|
|
443
|
+
await onTaskComplete?.(task.id);
|
|
444
|
+
});
|
|
445
|
+
return {
|
|
446
|
+
task_id: task.id,
|
|
447
|
+
status: 'running',
|
|
448
|
+
message: `Task ${task.id} started. You will receive a notification when ready, or use check_subagent_task tool to poll status.`,
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
// Model fallback chain - try in order until one succeeds
|
|
452
|
+
const MODEL_FALLBACK_CHAIN = [
|
|
453
|
+
'gemini-3-flash-preview',
|
|
454
|
+
'gemini-3-pro-preview',
|
|
455
|
+
'gemini-3-pro',
|
|
456
|
+
'gemini-2.5-flash',
|
|
457
|
+
];
|
|
458
|
+
/**
|
|
459
|
+
* Execute Gemini CLI with a specific model
|
|
460
|
+
* Uses modern syntax: gemini --yolo --model <model> --output-format json "prompt"
|
|
461
|
+
* Note: --prompt flag is deprecated, use positional argument instead
|
|
462
|
+
*/
|
|
463
|
+
function executeWithModel(model, settings, taskConfig, finalPrompt, options, onProgress) {
|
|
464
|
+
const cliArgs = [];
|
|
465
|
+
// Auto-approve mode (--yolo or --approval-mode)
|
|
466
|
+
if (options.approval_mode) {
|
|
467
|
+
cliArgs.push(settings.cli.flags.approval_mode, options.approval_mode);
|
|
468
|
+
}
|
|
469
|
+
else if (settings.defaults.yolo_mode) {
|
|
470
|
+
cliArgs.push(settings.cli.flags.yolo);
|
|
471
|
+
}
|
|
472
|
+
// Model selection: --model <model>
|
|
473
|
+
cliArgs.push(settings.cli.flags.model, model);
|
|
474
|
+
// Sandbox mode if requested
|
|
475
|
+
if (options.sandbox) {
|
|
476
|
+
cliArgs.push(settings.cli.flags.sandbox);
|
|
477
|
+
}
|
|
478
|
+
// Include directories if specified
|
|
479
|
+
if (options.include_directories) {
|
|
480
|
+
cliArgs.push(settings.cli.flags.include_directories, options.include_directories);
|
|
481
|
+
}
|
|
482
|
+
// Output format: --output-format json (for structured response parsing)
|
|
483
|
+
cliArgs.push(settings.cli.flags.output_format, 'json');
|
|
484
|
+
// Prompt as positional argument (--prompt is deprecated)
|
|
485
|
+
cliArgs.push(finalPrompt);
|
|
486
|
+
return new Promise((resolve, reject) => {
|
|
487
|
+
let stdout = '';
|
|
488
|
+
let stderr = '';
|
|
489
|
+
let startTime = Date.now();
|
|
490
|
+
const child = spawn(settings.cli.command, cliArgs, {
|
|
491
|
+
env: process.env,
|
|
492
|
+
shell: false,
|
|
493
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
494
|
+
});
|
|
495
|
+
child.stdout.on('data', (data) => {
|
|
496
|
+
const chunk = data.toString();
|
|
497
|
+
stdout += chunk;
|
|
498
|
+
onProgress?.(chunk);
|
|
499
|
+
});
|
|
500
|
+
child.stderr.on('data', (data) => {
|
|
501
|
+
stderr += data.toString();
|
|
502
|
+
});
|
|
503
|
+
// Handle spawn errors (CLI not found, permission denied, etc.)
|
|
504
|
+
child.on('error', (error) => {
|
|
505
|
+
const execTime = Date.now() - startTime;
|
|
506
|
+
reject(new Error(formatProcessError(error, settings.cli.command, execTime)));
|
|
507
|
+
});
|
|
508
|
+
child.on('close', (code, signal) => {
|
|
509
|
+
const execTime = Date.now() - startTime;
|
|
510
|
+
// Handle process killed by signal
|
|
511
|
+
if (signal) {
|
|
512
|
+
reject(new Error(formatSignalError(signal, model, execTime)));
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
// Success case
|
|
516
|
+
if (code === 0) {
|
|
517
|
+
try {
|
|
518
|
+
const jsonResponse = JSON.parse(stdout.trim());
|
|
519
|
+
// Check for error in JSON response (API errors, etc.)
|
|
520
|
+
if (jsonResponse.error) {
|
|
521
|
+
reject(new Error(formatApiError(jsonResponse.error, model, execTime)));
|
|
522
|
+
return;
|
|
523
|
+
}
|
|
524
|
+
const response = jsonResponse.response || 'Task completed successfully.';
|
|
525
|
+
// Build result with stats
|
|
526
|
+
let statsInfo = '';
|
|
527
|
+
if (jsonResponse.stats?.models) {
|
|
528
|
+
const modelNames = Object.keys(jsonResponse.stats.models);
|
|
529
|
+
const totalTokens = modelNames.reduce((sum, m) => {
|
|
530
|
+
return sum + (jsonResponse.stats?.models?.[m]?.tokens?.total || 0);
|
|
531
|
+
}, 0);
|
|
532
|
+
const toolCalls = jsonResponse.stats?.tools?.totalCalls || 0;
|
|
533
|
+
statsInfo = `\n\n---\n**Stats:** ${totalTokens} tokens | ${toolCalls} tool calls | Models: ${modelNames.join(', ')}`;
|
|
534
|
+
if (jsonResponse.session_id) {
|
|
535
|
+
statsInfo += ` | Session: ${jsonResponse.session_id.slice(0, 8)}...`;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
resolve(`## ${taskConfig.display_name} Result\n\n**Model:** \`${model}\`\n\n${response}${statsInfo}`);
|
|
539
|
+
}
|
|
540
|
+
catch {
|
|
541
|
+
// JSON parsing failed - treat as plain text (older CLI versions)
|
|
542
|
+
const result = stdout.trim() || 'Task completed successfully.';
|
|
543
|
+
resolve(`## ${taskConfig.display_name} Result\n\n**Model:** \`${model}\`\n\n${result}`);
|
|
544
|
+
}
|
|
545
|
+
return;
|
|
546
|
+
}
|
|
547
|
+
// Non-zero exit code - format descriptive error
|
|
548
|
+
reject(new Error(formatExitCodeError(code, stdout, stderr, model, execTime)));
|
|
549
|
+
});
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* Execute Gemini CLI with subagent task (blocking mode)
|
|
554
|
+
* Uses model fallback chain: tries models in sequence until one succeeds
|
|
555
|
+
*/
|
|
556
|
+
export async function executeSubagent(args, onProgress) {
|
|
557
|
+
const config = loadSubagentConfig();
|
|
558
|
+
const settings = config.settings;
|
|
559
|
+
const taskConfig = config.task_types[args.task_type];
|
|
560
|
+
if (!taskConfig) {
|
|
561
|
+
throw new Error(`Invalid task_type: ${args.task_type}. Must be: completion-inspector, helper-friend, or manual-tester`);
|
|
562
|
+
}
|
|
563
|
+
const includeInstructions = args.include_instructions ?? settings.defaults.append_instructions;
|
|
564
|
+
const finalPrompt = buildFinalPrompt(args.task_type, args.prompt, includeInstructions);
|
|
565
|
+
const execOptions = {
|
|
566
|
+
sandbox: args.sandbox,
|
|
567
|
+
approval_mode: args.approval_mode,
|
|
568
|
+
include_directories: args.include_directories,
|
|
569
|
+
};
|
|
570
|
+
// If user specified a model, use only that model (no fallback)
|
|
571
|
+
if (args.model) {
|
|
572
|
+
// Error is already well-formatted by executeWithModel, just re-throw
|
|
573
|
+
return await executeWithModel(args.model, settings, taskConfig, finalPrompt, execOptions, onProgress);
|
|
574
|
+
}
|
|
575
|
+
// Use fallback chain
|
|
576
|
+
const errors = [];
|
|
577
|
+
for (const model of MODEL_FALLBACK_CHAIN) {
|
|
578
|
+
try {
|
|
579
|
+
onProgress?.(`🔄 Trying model: ${model}...\n`);
|
|
580
|
+
return await executeWithModel(model, settings, taskConfig, finalPrompt, execOptions, onProgress);
|
|
581
|
+
}
|
|
582
|
+
catch (error) {
|
|
583
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
584
|
+
errors.push(`${model}: ${errorMsg.slice(0, 100)}`);
|
|
585
|
+
onProgress?.(`⚠️ ${model} failed, trying next...\n`);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
// All models failed - provide comprehensive error report
|
|
589
|
+
throw new Error(`## ❌ All Models Failed
|
|
590
|
+
|
|
591
|
+
**Attempted Models:** ${MODEL_FALLBACK_CHAIN.length}
|
|
592
|
+
|
|
593
|
+
**Errors by Model:**
|
|
594
|
+
${errors.map(e => `- ${e}`).join('\n')}
|
|
595
|
+
|
|
596
|
+
**💡 Suggestions:**
|
|
597
|
+
1. Check your Gemini CLI authentication: \`gemini auth\`
|
|
598
|
+
2. Try a specific model: \`model: "gemini-2.5-flash"\`
|
|
599
|
+
3. Simplify your prompt or reduce context size
|
|
600
|
+
4. Check API quota at https://console.cloud.google.com/
|
|
601
|
+
|
|
602
|
+
**Retryable:** Yes (try with simpler task or different model)`);
|
|
603
|
+
}
|
|
604
|
+
//# sourceMappingURL=subagent.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subagent.tool.js","sourceRoot":"","sources":["../../src/tools/subagent.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AA+BtC,sDAAsD;AACtD,MAAM,SAAS,GAAG,IAAI,GAAG,EAAqB,CAAC;AAE/C,wCAAwC;AACxC,MAAM,cAAc,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEtC,kDAAkD;AAClD,IAAI,aAAa,GAAG,KAAK,CAAC;AAE1B;;GAEG;AACH,SAAS,cAAc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CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACxE,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;YACnD,UAAU,EAAE,CAAC,MAAM,KAAK,2BAA2B,CAAC,CAAC;QACvD,CAAC;IACH,CAAC;IAED,yDAAyD;IACzD,MAAM,IAAI,KAAK,CAAC;;wBAEM,oBAAoB,CAAC,MAAM;;;EAGjD,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;;8DAQwB,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geminiExecutor.d.ts","sourceRoot":"","sources":["../../src/utils/geminiExecutor.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geminiExecutor.js","sourceRoot":"","sources":["../../src/utils/geminiExecutor.ts"],"names":[],"mappings":""}
|