@corbat-tech/coco 2.36.0 → 2.38.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/README.md +149 -13
- package/dist/adapters/index.d.ts +37 -0
- package/dist/adapters/index.js +46 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/agent-runtime-DeLcB0Ie.d.ts +756 -0
- package/dist/blueprints-BWcCJfnN.d.ts +99 -0
- package/dist/cli/index.js +1117 -34
- package/dist/cli/index.js.map +1 -1
- package/dist/extension-manifests-DcvOnrp3.d.ts +113 -0
- package/dist/index-Dp1o8c9g.d.ts +2807 -0
- package/dist/index.d.ts +25 -1730
- package/dist/index.js +1878 -403
- package/dist/index.js.map +1 -1
- package/dist/presets/index.d.ts +39 -0
- package/dist/presets/index.js +26585 -0
- package/dist/presets/index.js.map +1 -0
- package/dist/profiles-BcyL-gQ9.d.ts +76 -0
- package/dist/rag-BakFRE-u.d.ts +31 -0
- package/dist/registry-CEpl9Jq0.d.ts +115 -0
- package/dist/runtime/index.d.ts +54 -0
- package/dist/runtime/index.js +26855 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/tools/index.d.ts +5 -0
- package/dist/tools/index.js +18726 -0
- package/dist/tools/index.js.map +1 -0
- package/package.json +9 -3
|
@@ -0,0 +1,2807 @@
|
|
|
1
|
+
import { a as ToolDefinition, T as ToolRegistry } from './registry-CEpl9Jq0.js';
|
|
2
|
+
import './profiles-BcyL-gQ9.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Quality system types for Corbat-Coco
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Multi-dimensional quality scores
|
|
9
|
+
*/
|
|
10
|
+
interface QualityScores {
|
|
11
|
+
/**
|
|
12
|
+
* Overall weighted score (0-100)
|
|
13
|
+
*/
|
|
14
|
+
overall: number;
|
|
15
|
+
/**
|
|
16
|
+
* Individual dimension scores
|
|
17
|
+
*/
|
|
18
|
+
dimensions: QualityDimensions;
|
|
19
|
+
/**
|
|
20
|
+
* Metadata
|
|
21
|
+
*/
|
|
22
|
+
evaluatedAt: Date;
|
|
23
|
+
evaluationDurationMs: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Quality dimensions
|
|
27
|
+
*/
|
|
28
|
+
interface QualityDimensions {
|
|
29
|
+
/**
|
|
30
|
+
* Does the code work correctly? (tests pass, logic correct)
|
|
31
|
+
*/
|
|
32
|
+
correctness: number;
|
|
33
|
+
/**
|
|
34
|
+
* Are all requirements met?
|
|
35
|
+
*/
|
|
36
|
+
completeness: number;
|
|
37
|
+
/**
|
|
38
|
+
* Are edge cases handled?
|
|
39
|
+
*/
|
|
40
|
+
robustness: number;
|
|
41
|
+
/**
|
|
42
|
+
* Is the code clear and understandable?
|
|
43
|
+
*/
|
|
44
|
+
readability: number;
|
|
45
|
+
/**
|
|
46
|
+
* Is the code easy to modify?
|
|
47
|
+
*/
|
|
48
|
+
maintainability: number;
|
|
49
|
+
/**
|
|
50
|
+
* Cyclomatic complexity score (inverted - higher is better)
|
|
51
|
+
*/
|
|
52
|
+
complexity: number;
|
|
53
|
+
/**
|
|
54
|
+
* DRY score - code duplication (inverted - higher is better)
|
|
55
|
+
*/
|
|
56
|
+
duplication: number;
|
|
57
|
+
/**
|
|
58
|
+
* Line and branch coverage
|
|
59
|
+
*/
|
|
60
|
+
testCoverage: number;
|
|
61
|
+
/**
|
|
62
|
+
* Test meaningfulness and quality
|
|
63
|
+
*/
|
|
64
|
+
testQuality: number;
|
|
65
|
+
/**
|
|
66
|
+
* Security vulnerability score (100 = no vulnerabilities)
|
|
67
|
+
*/
|
|
68
|
+
security: number;
|
|
69
|
+
/**
|
|
70
|
+
* Documentation coverage
|
|
71
|
+
*/
|
|
72
|
+
documentation: number;
|
|
73
|
+
/**
|
|
74
|
+
* Linting and style compliance
|
|
75
|
+
*/
|
|
76
|
+
style: number;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Quality thresholds
|
|
80
|
+
*/
|
|
81
|
+
interface QualityThresholds {
|
|
82
|
+
/**
|
|
83
|
+
* Minimum acceptable scores (must achieve to pass)
|
|
84
|
+
*/
|
|
85
|
+
minimum: {
|
|
86
|
+
overall: number;
|
|
87
|
+
testCoverage: number;
|
|
88
|
+
security: number;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Target scores (excellent quality)
|
|
92
|
+
*/
|
|
93
|
+
target: {
|
|
94
|
+
overall: number;
|
|
95
|
+
testCoverage: number;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Convergence threshold (max score delta to consider converged)
|
|
99
|
+
*/
|
|
100
|
+
convergenceThreshold: number;
|
|
101
|
+
/**
|
|
102
|
+
* Maximum iterations before forced completion
|
|
103
|
+
*/
|
|
104
|
+
maxIterations: number;
|
|
105
|
+
/**
|
|
106
|
+
* Minimum iterations before checking convergence
|
|
107
|
+
*/
|
|
108
|
+
minIterations: number;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* File tools for Corbat-Coco
|
|
113
|
+
* Read, write, edit, and search files
|
|
114
|
+
*/
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Read file tool
|
|
118
|
+
*/
|
|
119
|
+
declare const readFileTool: ToolDefinition<{
|
|
120
|
+
path: string;
|
|
121
|
+
encoding?: string;
|
|
122
|
+
maxSize?: number;
|
|
123
|
+
}, {
|
|
124
|
+
content: string;
|
|
125
|
+
lines: number;
|
|
126
|
+
size: number;
|
|
127
|
+
truncated: boolean;
|
|
128
|
+
}>;
|
|
129
|
+
/**
|
|
130
|
+
* Write file tool
|
|
131
|
+
*/
|
|
132
|
+
declare const writeFileTool: ToolDefinition<{
|
|
133
|
+
path: string;
|
|
134
|
+
content: string;
|
|
135
|
+
createDirs?: boolean;
|
|
136
|
+
dryRun?: boolean;
|
|
137
|
+
}, {
|
|
138
|
+
path: string;
|
|
139
|
+
size: number;
|
|
140
|
+
dryRun: boolean;
|
|
141
|
+
wouldCreate: boolean;
|
|
142
|
+
}>;
|
|
143
|
+
/**
|
|
144
|
+
* Edit file tool (find and replace)
|
|
145
|
+
*/
|
|
146
|
+
declare const editFileTool: ToolDefinition<{
|
|
147
|
+
path: string;
|
|
148
|
+
oldText: string;
|
|
149
|
+
newText: string;
|
|
150
|
+
all?: boolean;
|
|
151
|
+
dryRun?: boolean;
|
|
152
|
+
}, {
|
|
153
|
+
path: string;
|
|
154
|
+
replacements: number;
|
|
155
|
+
dryRun: boolean;
|
|
156
|
+
preview?: string;
|
|
157
|
+
}>;
|
|
158
|
+
/**
|
|
159
|
+
* Glob tool (find files by pattern)
|
|
160
|
+
*/
|
|
161
|
+
declare const globTool: ToolDefinition<{
|
|
162
|
+
pattern: string;
|
|
163
|
+
cwd?: string;
|
|
164
|
+
ignore?: string[];
|
|
165
|
+
}, {
|
|
166
|
+
files: string[];
|
|
167
|
+
count: number;
|
|
168
|
+
}>;
|
|
169
|
+
/**
|
|
170
|
+
* File exists tool
|
|
171
|
+
*/
|
|
172
|
+
declare const fileExistsTool: ToolDefinition<{
|
|
173
|
+
path: string;
|
|
174
|
+
}, {
|
|
175
|
+
exists: boolean;
|
|
176
|
+
isFile: boolean;
|
|
177
|
+
isDirectory: boolean;
|
|
178
|
+
}>;
|
|
179
|
+
/**
|
|
180
|
+
* List directory tool
|
|
181
|
+
*/
|
|
182
|
+
declare const listDirTool: ToolDefinition<{
|
|
183
|
+
path: string;
|
|
184
|
+
recursive?: boolean;
|
|
185
|
+
}, {
|
|
186
|
+
entries: Array<{
|
|
187
|
+
name: string;
|
|
188
|
+
type: "file" | "directory";
|
|
189
|
+
size?: number;
|
|
190
|
+
}>;
|
|
191
|
+
}>;
|
|
192
|
+
/**
|
|
193
|
+
* Delete file tool
|
|
194
|
+
*/
|
|
195
|
+
declare const deleteFileTool: ToolDefinition<{
|
|
196
|
+
path: string;
|
|
197
|
+
recursive?: boolean;
|
|
198
|
+
confirm?: boolean;
|
|
199
|
+
}, {
|
|
200
|
+
deleted: boolean;
|
|
201
|
+
path: string;
|
|
202
|
+
}>;
|
|
203
|
+
/**
|
|
204
|
+
* Copy file tool
|
|
205
|
+
*/
|
|
206
|
+
declare const copyFileTool: ToolDefinition<{
|
|
207
|
+
source: string;
|
|
208
|
+
destination: string;
|
|
209
|
+
overwrite?: boolean;
|
|
210
|
+
}, {
|
|
211
|
+
source: string;
|
|
212
|
+
destination: string;
|
|
213
|
+
size: number;
|
|
214
|
+
}>;
|
|
215
|
+
/**
|
|
216
|
+
* Move/rename file tool
|
|
217
|
+
*/
|
|
218
|
+
declare const moveFileTool: ToolDefinition<{
|
|
219
|
+
source: string;
|
|
220
|
+
destination: string;
|
|
221
|
+
overwrite?: boolean;
|
|
222
|
+
}, {
|
|
223
|
+
source: string;
|
|
224
|
+
destination: string;
|
|
225
|
+
}>;
|
|
226
|
+
declare const treeTool: ToolDefinition<{
|
|
227
|
+
path?: string;
|
|
228
|
+
depth?: number;
|
|
229
|
+
showHidden?: boolean;
|
|
230
|
+
dirsOnly?: boolean;
|
|
231
|
+
}, {
|
|
232
|
+
tree: string;
|
|
233
|
+
totalFiles: number;
|
|
234
|
+
totalDirs: number;
|
|
235
|
+
truncated: boolean;
|
|
236
|
+
}>;
|
|
237
|
+
/**
|
|
238
|
+
* All file tools
|
|
239
|
+
*/
|
|
240
|
+
declare const fileTools: (ToolDefinition<{
|
|
241
|
+
path: string;
|
|
242
|
+
encoding?: string;
|
|
243
|
+
maxSize?: number;
|
|
244
|
+
}, {
|
|
245
|
+
content: string;
|
|
246
|
+
lines: number;
|
|
247
|
+
size: number;
|
|
248
|
+
truncated: boolean;
|
|
249
|
+
}> | ToolDefinition<{
|
|
250
|
+
path: string;
|
|
251
|
+
content: string;
|
|
252
|
+
createDirs?: boolean;
|
|
253
|
+
dryRun?: boolean;
|
|
254
|
+
}, {
|
|
255
|
+
path: string;
|
|
256
|
+
size: number;
|
|
257
|
+
dryRun: boolean;
|
|
258
|
+
wouldCreate: boolean;
|
|
259
|
+
}> | ToolDefinition<{
|
|
260
|
+
path: string;
|
|
261
|
+
oldText: string;
|
|
262
|
+
newText: string;
|
|
263
|
+
all?: boolean;
|
|
264
|
+
dryRun?: boolean;
|
|
265
|
+
}, {
|
|
266
|
+
path: string;
|
|
267
|
+
replacements: number;
|
|
268
|
+
dryRun: boolean;
|
|
269
|
+
preview?: string;
|
|
270
|
+
}> | ToolDefinition<{
|
|
271
|
+
pattern: string;
|
|
272
|
+
cwd?: string;
|
|
273
|
+
ignore?: string[];
|
|
274
|
+
}, {
|
|
275
|
+
files: string[];
|
|
276
|
+
count: number;
|
|
277
|
+
}> | ToolDefinition<{
|
|
278
|
+
path: string;
|
|
279
|
+
}, {
|
|
280
|
+
exists: boolean;
|
|
281
|
+
isFile: boolean;
|
|
282
|
+
isDirectory: boolean;
|
|
283
|
+
}> | ToolDefinition<{
|
|
284
|
+
path: string;
|
|
285
|
+
recursive?: boolean;
|
|
286
|
+
}, {
|
|
287
|
+
entries: Array<{
|
|
288
|
+
name: string;
|
|
289
|
+
type: "file" | "directory";
|
|
290
|
+
size?: number;
|
|
291
|
+
}>;
|
|
292
|
+
}> | ToolDefinition<{
|
|
293
|
+
path: string;
|
|
294
|
+
recursive?: boolean;
|
|
295
|
+
confirm?: boolean;
|
|
296
|
+
}, {
|
|
297
|
+
deleted: boolean;
|
|
298
|
+
path: string;
|
|
299
|
+
}> | ToolDefinition<{
|
|
300
|
+
source: string;
|
|
301
|
+
destination: string;
|
|
302
|
+
overwrite?: boolean;
|
|
303
|
+
}, {
|
|
304
|
+
source: string;
|
|
305
|
+
destination: string;
|
|
306
|
+
}> | ToolDefinition<{
|
|
307
|
+
path?: string;
|
|
308
|
+
depth?: number;
|
|
309
|
+
showHidden?: boolean;
|
|
310
|
+
dirsOnly?: boolean;
|
|
311
|
+
}, {
|
|
312
|
+
tree: string;
|
|
313
|
+
totalFiles: number;
|
|
314
|
+
totalDirs: number;
|
|
315
|
+
truncated: boolean;
|
|
316
|
+
}>)[];
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Bash/Shell tools for Corbat-Coco
|
|
320
|
+
* Execute shell commands with safety controls
|
|
321
|
+
*/
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Execute bash command tool
|
|
325
|
+
*/
|
|
326
|
+
declare const bashExecTool: ToolDefinition<{
|
|
327
|
+
command: string;
|
|
328
|
+
cwd?: string;
|
|
329
|
+
timeout?: number;
|
|
330
|
+
env?: Record<string, string>;
|
|
331
|
+
}, {
|
|
332
|
+
stdout: string;
|
|
333
|
+
stderr: string;
|
|
334
|
+
exitCode: number;
|
|
335
|
+
duration: number;
|
|
336
|
+
}>;
|
|
337
|
+
/**
|
|
338
|
+
* Execute bash command in background tool
|
|
339
|
+
*/
|
|
340
|
+
declare const bashBackgroundTool: ToolDefinition<{
|
|
341
|
+
command: string;
|
|
342
|
+
cwd?: string;
|
|
343
|
+
env?: Record<string, string>;
|
|
344
|
+
}, {
|
|
345
|
+
pid: number;
|
|
346
|
+
command: string;
|
|
347
|
+
}>;
|
|
348
|
+
/**
|
|
349
|
+
* Check if command exists tool
|
|
350
|
+
*/
|
|
351
|
+
declare const commandExistsTool: ToolDefinition<{
|
|
352
|
+
command: string;
|
|
353
|
+
}, {
|
|
354
|
+
exists: boolean;
|
|
355
|
+
path?: string;
|
|
356
|
+
}>;
|
|
357
|
+
/**
|
|
358
|
+
* Get environment variable tool (with security filtering)
|
|
359
|
+
*/
|
|
360
|
+
declare const getEnvTool: ToolDefinition<{
|
|
361
|
+
name: string;
|
|
362
|
+
}, {
|
|
363
|
+
value: string | null;
|
|
364
|
+
exists: boolean;
|
|
365
|
+
blocked?: boolean;
|
|
366
|
+
}>;
|
|
367
|
+
/**
|
|
368
|
+
* All bash tools
|
|
369
|
+
*/
|
|
370
|
+
declare const bashTools: (ToolDefinition<{
|
|
371
|
+
command: string;
|
|
372
|
+
cwd?: string;
|
|
373
|
+
timeout?: number;
|
|
374
|
+
env?: Record<string, string>;
|
|
375
|
+
}, {
|
|
376
|
+
stdout: string;
|
|
377
|
+
stderr: string;
|
|
378
|
+
exitCode: number;
|
|
379
|
+
duration: number;
|
|
380
|
+
}> | ToolDefinition<{
|
|
381
|
+
command: string;
|
|
382
|
+
cwd?: string;
|
|
383
|
+
env?: Record<string, string>;
|
|
384
|
+
}, {
|
|
385
|
+
pid: number;
|
|
386
|
+
command: string;
|
|
387
|
+
}> | ToolDefinition<{
|
|
388
|
+
command: string;
|
|
389
|
+
}, {
|
|
390
|
+
exists: boolean;
|
|
391
|
+
path?: string;
|
|
392
|
+
}> | ToolDefinition<{
|
|
393
|
+
name: string;
|
|
394
|
+
}, {
|
|
395
|
+
value: string | null;
|
|
396
|
+
exists: boolean;
|
|
397
|
+
blocked?: boolean;
|
|
398
|
+
}>)[];
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Git tools for Corbat-Coco
|
|
402
|
+
* Version control operations
|
|
403
|
+
*/
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* Git status tool
|
|
407
|
+
*/
|
|
408
|
+
declare const gitStatusTool: ToolDefinition<{
|
|
409
|
+
cwd?: string;
|
|
410
|
+
}, {
|
|
411
|
+
branch: string;
|
|
412
|
+
tracking?: string;
|
|
413
|
+
ahead: number;
|
|
414
|
+
behind: number;
|
|
415
|
+
staged: string[];
|
|
416
|
+
modified: string[];
|
|
417
|
+
untracked: string[];
|
|
418
|
+
conflicted: string[];
|
|
419
|
+
isClean: boolean;
|
|
420
|
+
}>;
|
|
421
|
+
/**
|
|
422
|
+
* Git diff tool
|
|
423
|
+
*/
|
|
424
|
+
declare const gitDiffTool: ToolDefinition<{
|
|
425
|
+
cwd?: string;
|
|
426
|
+
staged?: boolean;
|
|
427
|
+
files?: string[];
|
|
428
|
+
}, {
|
|
429
|
+
diff: string;
|
|
430
|
+
filesChanged: number;
|
|
431
|
+
insertions: number;
|
|
432
|
+
deletions: number;
|
|
433
|
+
}>;
|
|
434
|
+
/**
|
|
435
|
+
* Git add tool
|
|
436
|
+
*/
|
|
437
|
+
declare const gitAddTool: ToolDefinition<{
|
|
438
|
+
cwd?: string;
|
|
439
|
+
files: string[];
|
|
440
|
+
}, {
|
|
441
|
+
added: string[];
|
|
442
|
+
}>;
|
|
443
|
+
/**
|
|
444
|
+
* Git commit tool
|
|
445
|
+
*/
|
|
446
|
+
declare const gitCommitTool: ToolDefinition<{
|
|
447
|
+
cwd?: string;
|
|
448
|
+
message: string;
|
|
449
|
+
author?: string;
|
|
450
|
+
}, {
|
|
451
|
+
hash: string;
|
|
452
|
+
summary: string;
|
|
453
|
+
}>;
|
|
454
|
+
/**
|
|
455
|
+
* Git log tool
|
|
456
|
+
*/
|
|
457
|
+
declare const gitLogTool: ToolDefinition<{
|
|
458
|
+
cwd?: string;
|
|
459
|
+
maxCount?: number;
|
|
460
|
+
file?: string;
|
|
461
|
+
}, {
|
|
462
|
+
commits: Array<{
|
|
463
|
+
hash: string;
|
|
464
|
+
message: string;
|
|
465
|
+
author: string;
|
|
466
|
+
date: string;
|
|
467
|
+
}>;
|
|
468
|
+
}>;
|
|
469
|
+
/**
|
|
470
|
+
* Git branch tool
|
|
471
|
+
*/
|
|
472
|
+
declare const gitBranchTool: ToolDefinition<{
|
|
473
|
+
cwd?: string;
|
|
474
|
+
create?: string;
|
|
475
|
+
delete?: string;
|
|
476
|
+
list?: boolean;
|
|
477
|
+
}, {
|
|
478
|
+
branches: string[];
|
|
479
|
+
current: string;
|
|
480
|
+
}>;
|
|
481
|
+
/**
|
|
482
|
+
* Git checkout tool
|
|
483
|
+
*/
|
|
484
|
+
declare const gitCheckoutTool: ToolDefinition<{
|
|
485
|
+
cwd?: string;
|
|
486
|
+
branch: string;
|
|
487
|
+
create?: boolean;
|
|
488
|
+
}, {
|
|
489
|
+
branch: string;
|
|
490
|
+
}>;
|
|
491
|
+
/**
|
|
492
|
+
* Git push tool
|
|
493
|
+
*/
|
|
494
|
+
declare const gitPushTool: ToolDefinition<{
|
|
495
|
+
cwd?: string;
|
|
496
|
+
remote?: string;
|
|
497
|
+
branch?: string;
|
|
498
|
+
setUpstream?: boolean;
|
|
499
|
+
}, {
|
|
500
|
+
pushed: boolean;
|
|
501
|
+
remote: string;
|
|
502
|
+
branch: string;
|
|
503
|
+
}>;
|
|
504
|
+
/**
|
|
505
|
+
* Git pull tool
|
|
506
|
+
*/
|
|
507
|
+
declare const gitPullTool: ToolDefinition<{
|
|
508
|
+
cwd?: string;
|
|
509
|
+
remote?: string;
|
|
510
|
+
branch?: string;
|
|
511
|
+
rebase?: boolean;
|
|
512
|
+
}, {
|
|
513
|
+
updated: boolean;
|
|
514
|
+
summary: string;
|
|
515
|
+
}>;
|
|
516
|
+
/**
|
|
517
|
+
* Git init tool
|
|
518
|
+
*/
|
|
519
|
+
declare const gitInitTool: ToolDefinition<{
|
|
520
|
+
cwd?: string;
|
|
521
|
+
bare?: boolean;
|
|
522
|
+
}, {
|
|
523
|
+
initialized: boolean;
|
|
524
|
+
path: string;
|
|
525
|
+
}>;
|
|
526
|
+
/**
|
|
527
|
+
* All git tools
|
|
528
|
+
*/
|
|
529
|
+
declare const gitTools: (ToolDefinition<{
|
|
530
|
+
cwd?: string;
|
|
531
|
+
}, {
|
|
532
|
+
branch: string;
|
|
533
|
+
tracking?: string;
|
|
534
|
+
ahead: number;
|
|
535
|
+
behind: number;
|
|
536
|
+
staged: string[];
|
|
537
|
+
modified: string[];
|
|
538
|
+
untracked: string[];
|
|
539
|
+
conflicted: string[];
|
|
540
|
+
isClean: boolean;
|
|
541
|
+
}> | ToolDefinition<{
|
|
542
|
+
cwd?: string;
|
|
543
|
+
staged?: boolean;
|
|
544
|
+
files?: string[];
|
|
545
|
+
}, {
|
|
546
|
+
diff: string;
|
|
547
|
+
filesChanged: number;
|
|
548
|
+
insertions: number;
|
|
549
|
+
deletions: number;
|
|
550
|
+
}> | ToolDefinition<{
|
|
551
|
+
cwd?: string;
|
|
552
|
+
files: string[];
|
|
553
|
+
}, {
|
|
554
|
+
added: string[];
|
|
555
|
+
}> | ToolDefinition<{
|
|
556
|
+
cwd?: string;
|
|
557
|
+
message: string;
|
|
558
|
+
author?: string;
|
|
559
|
+
}, {
|
|
560
|
+
hash: string;
|
|
561
|
+
summary: string;
|
|
562
|
+
}> | ToolDefinition<{
|
|
563
|
+
cwd?: string;
|
|
564
|
+
maxCount?: number;
|
|
565
|
+
file?: string;
|
|
566
|
+
}, {
|
|
567
|
+
commits: Array<{
|
|
568
|
+
hash: string;
|
|
569
|
+
message: string;
|
|
570
|
+
author: string;
|
|
571
|
+
date: string;
|
|
572
|
+
}>;
|
|
573
|
+
}> | ToolDefinition<{
|
|
574
|
+
cwd?: string;
|
|
575
|
+
create?: string;
|
|
576
|
+
delete?: string;
|
|
577
|
+
list?: boolean;
|
|
578
|
+
}, {
|
|
579
|
+
branches: string[];
|
|
580
|
+
current: string;
|
|
581
|
+
}> | ToolDefinition<{
|
|
582
|
+
cwd?: string;
|
|
583
|
+
branch: string;
|
|
584
|
+
create?: boolean;
|
|
585
|
+
}, {
|
|
586
|
+
branch: string;
|
|
587
|
+
}> | ToolDefinition<{
|
|
588
|
+
cwd?: string;
|
|
589
|
+
remote?: string;
|
|
590
|
+
branch?: string;
|
|
591
|
+
setUpstream?: boolean;
|
|
592
|
+
}, {
|
|
593
|
+
pushed: boolean;
|
|
594
|
+
remote: string;
|
|
595
|
+
branch: string;
|
|
596
|
+
}> | ToolDefinition<{
|
|
597
|
+
cwd?: string;
|
|
598
|
+
remote?: string;
|
|
599
|
+
branch?: string;
|
|
600
|
+
rebase?: boolean;
|
|
601
|
+
}, {
|
|
602
|
+
updated: boolean;
|
|
603
|
+
summary: string;
|
|
604
|
+
}> | ToolDefinition<{
|
|
605
|
+
cwd?: string;
|
|
606
|
+
bare?: boolean;
|
|
607
|
+
}, {
|
|
608
|
+
initialized: boolean;
|
|
609
|
+
path: string;
|
|
610
|
+
}>)[];
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* Simple Git Auto-Commit
|
|
614
|
+
*
|
|
615
|
+
* Simplified git automation without complex bash tool integration
|
|
616
|
+
*/
|
|
617
|
+
/**
|
|
618
|
+
* Check if on protected branch
|
|
619
|
+
*/
|
|
620
|
+
declare const checkProtectedBranchTool: ToolDefinition<unknown, {
|
|
621
|
+
stdout: string;
|
|
622
|
+
stderr: string;
|
|
623
|
+
exitCode: number;
|
|
624
|
+
duration: number;
|
|
625
|
+
}>;
|
|
626
|
+
declare const simpleAutoCommitTool: ToolDefinition<{
|
|
627
|
+
message?: string;
|
|
628
|
+
}, {
|
|
629
|
+
stdout: string;
|
|
630
|
+
stderr: string;
|
|
631
|
+
exitCode: number;
|
|
632
|
+
duration: number;
|
|
633
|
+
}>;
|
|
634
|
+
declare const gitSimpleTools: (ToolDefinition<unknown, {
|
|
635
|
+
stdout: string;
|
|
636
|
+
stderr: string;
|
|
637
|
+
exitCode: number;
|
|
638
|
+
duration: number;
|
|
639
|
+
}> | ToolDefinition<{
|
|
640
|
+
message?: string;
|
|
641
|
+
}, {
|
|
642
|
+
stdout: string;
|
|
643
|
+
stderr: string;
|
|
644
|
+
exitCode: number;
|
|
645
|
+
duration: number;
|
|
646
|
+
}>)[];
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* Simple Multi-Agent Tool
|
|
650
|
+
*
|
|
651
|
+
* Spawns sub-agents with specialized roles via the unified AgentManager system.
|
|
652
|
+
* Supports 12 agent types (explore, plan, test, debug, review, architect,
|
|
653
|
+
* security, tdd, refactor, e2e, docs, database) with proper tool whitelists
|
|
654
|
+
* and specialized prompts.
|
|
655
|
+
*/
|
|
656
|
+
/**
|
|
657
|
+
* Spawn a sub-agent with specialized role via the unified AgentManager
|
|
658
|
+
*/
|
|
659
|
+
declare const spawnSimpleAgentTool: ToolDefinition<unknown, {
|
|
660
|
+
stdout: string;
|
|
661
|
+
stderr: string;
|
|
662
|
+
exitCode: number;
|
|
663
|
+
duration: number;
|
|
664
|
+
}>;
|
|
665
|
+
/**
|
|
666
|
+
* Check agent capability
|
|
667
|
+
*/
|
|
668
|
+
declare const checkAgentCapabilityTool: ToolDefinition<unknown, {
|
|
669
|
+
stdout: string;
|
|
670
|
+
stderr: string;
|
|
671
|
+
exitCode: number;
|
|
672
|
+
duration: number;
|
|
673
|
+
}>;
|
|
674
|
+
declare const simpleAgentTools: ToolDefinition<unknown, {
|
|
675
|
+
stdout: string;
|
|
676
|
+
stderr: string;
|
|
677
|
+
exitCode: number;
|
|
678
|
+
duration: number;
|
|
679
|
+
}>[];
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Test tools for Corbat-Coco
|
|
683
|
+
* Run tests and collect coverage
|
|
684
|
+
*/
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* Test result interface
|
|
688
|
+
*/
|
|
689
|
+
interface TestResult {
|
|
690
|
+
passed: number;
|
|
691
|
+
failed: number;
|
|
692
|
+
skipped: number;
|
|
693
|
+
total: number;
|
|
694
|
+
duration: number;
|
|
695
|
+
success: boolean;
|
|
696
|
+
failures: TestFailure[];
|
|
697
|
+
coverage?: CoverageResult;
|
|
698
|
+
}
|
|
699
|
+
/**
|
|
700
|
+
* Test failure interface
|
|
701
|
+
*/
|
|
702
|
+
interface TestFailure {
|
|
703
|
+
name: string;
|
|
704
|
+
file: string;
|
|
705
|
+
message: string;
|
|
706
|
+
stack?: string;
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* Coverage result interface
|
|
710
|
+
*/
|
|
711
|
+
interface CoverageResult {
|
|
712
|
+
lines: number;
|
|
713
|
+
branches: number;
|
|
714
|
+
functions: number;
|
|
715
|
+
statements: number;
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* Run tests tool
|
|
719
|
+
*/
|
|
720
|
+
declare const runTestsTool: ToolDefinition<{
|
|
721
|
+
cwd?: string;
|
|
722
|
+
pattern?: string;
|
|
723
|
+
coverage?: boolean;
|
|
724
|
+
framework?: string;
|
|
725
|
+
watch?: boolean;
|
|
726
|
+
args?: string[];
|
|
727
|
+
}, TestResult>;
|
|
728
|
+
/**
|
|
729
|
+
* Get coverage tool
|
|
730
|
+
*/
|
|
731
|
+
declare const getCoverageTool: ToolDefinition<{
|
|
732
|
+
cwd?: string;
|
|
733
|
+
format?: "summary" | "detailed";
|
|
734
|
+
}, CoverageResult & {
|
|
735
|
+
report?: string;
|
|
736
|
+
}>;
|
|
737
|
+
/**
|
|
738
|
+
* Run single test file tool
|
|
739
|
+
*/
|
|
740
|
+
declare const runTestFileTool: ToolDefinition<{
|
|
741
|
+
cwd?: string;
|
|
742
|
+
file: string;
|
|
743
|
+
framework?: string;
|
|
744
|
+
args?: string[];
|
|
745
|
+
}, TestResult>;
|
|
746
|
+
/**
|
|
747
|
+
* All test tools
|
|
748
|
+
*/
|
|
749
|
+
declare const testTools: (ToolDefinition<{
|
|
750
|
+
cwd?: string;
|
|
751
|
+
pattern?: string;
|
|
752
|
+
coverage?: boolean;
|
|
753
|
+
framework?: string;
|
|
754
|
+
watch?: boolean;
|
|
755
|
+
args?: string[];
|
|
756
|
+
}, TestResult> | ToolDefinition<{
|
|
757
|
+
cwd?: string;
|
|
758
|
+
format?: "summary" | "detailed";
|
|
759
|
+
}, CoverageResult & {
|
|
760
|
+
report?: string;
|
|
761
|
+
}> | ToolDefinition<{
|
|
762
|
+
cwd?: string;
|
|
763
|
+
file: string;
|
|
764
|
+
framework?: string;
|
|
765
|
+
args?: string[];
|
|
766
|
+
}, TestResult>)[];
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* Quality tools for Corbat-Coco
|
|
770
|
+
* Linting, complexity analysis, security scanning
|
|
771
|
+
*/
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* Lint result interface
|
|
775
|
+
*/
|
|
776
|
+
interface LintResult {
|
|
777
|
+
errors: number;
|
|
778
|
+
warnings: number;
|
|
779
|
+
fixable: number;
|
|
780
|
+
issues: LintIssue[];
|
|
781
|
+
score: number | null;
|
|
782
|
+
linter?: string;
|
|
783
|
+
message?: string;
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* Lint issue interface
|
|
787
|
+
*/
|
|
788
|
+
interface LintIssue {
|
|
789
|
+
file: string;
|
|
790
|
+
line: number;
|
|
791
|
+
column: number;
|
|
792
|
+
severity: "error" | "warning";
|
|
793
|
+
message: string;
|
|
794
|
+
rule: string;
|
|
795
|
+
}
|
|
796
|
+
/**
|
|
797
|
+
* Complexity result interface
|
|
798
|
+
*/
|
|
799
|
+
interface ComplexityResult {
|
|
800
|
+
averageComplexity: number;
|
|
801
|
+
maxComplexity: number;
|
|
802
|
+
totalFunctions: number;
|
|
803
|
+
complexFunctions: number;
|
|
804
|
+
score: number;
|
|
805
|
+
files: FileComplexity[];
|
|
806
|
+
}
|
|
807
|
+
/**
|
|
808
|
+
* File complexity interface
|
|
809
|
+
*/
|
|
810
|
+
interface FileComplexity {
|
|
811
|
+
file: string;
|
|
812
|
+
complexity: number;
|
|
813
|
+
functions: FunctionComplexity[];
|
|
814
|
+
}
|
|
815
|
+
/**
|
|
816
|
+
* Function complexity interface
|
|
817
|
+
*/
|
|
818
|
+
interface FunctionComplexity {
|
|
819
|
+
name: string;
|
|
820
|
+
complexity: number;
|
|
821
|
+
line: number;
|
|
822
|
+
}
|
|
823
|
+
/**
|
|
824
|
+
* Run linter tool
|
|
825
|
+
*/
|
|
826
|
+
declare const runLinterTool: ToolDefinition<{
|
|
827
|
+
cwd?: string;
|
|
828
|
+
files?: string[];
|
|
829
|
+
fix?: boolean;
|
|
830
|
+
linter?: string;
|
|
831
|
+
}, LintResult>;
|
|
832
|
+
/**
|
|
833
|
+
* Analyze complexity tool
|
|
834
|
+
*/
|
|
835
|
+
declare const analyzeComplexityTool: ToolDefinition<{
|
|
836
|
+
cwd?: string;
|
|
837
|
+
files?: string[];
|
|
838
|
+
threshold?: number;
|
|
839
|
+
}, ComplexityResult>;
|
|
840
|
+
/**
|
|
841
|
+
* Calculate full quality scores using the new QualityEvaluator
|
|
842
|
+
* This replaces hardcoded values with real measurements
|
|
843
|
+
*/
|
|
844
|
+
declare const calculateQualityTool: ToolDefinition<{
|
|
845
|
+
cwd?: string;
|
|
846
|
+
files?: string[];
|
|
847
|
+
useSnyk?: boolean;
|
|
848
|
+
}, QualityScores>;
|
|
849
|
+
/**
|
|
850
|
+
* All quality tools
|
|
851
|
+
*/
|
|
852
|
+
declare const qualityTools: (ToolDefinition<{
|
|
853
|
+
cwd?: string;
|
|
854
|
+
files?: string[];
|
|
855
|
+
fix?: boolean;
|
|
856
|
+
linter?: string;
|
|
857
|
+
}, LintResult> | ToolDefinition<{
|
|
858
|
+
cwd?: string;
|
|
859
|
+
files?: string[];
|
|
860
|
+
threshold?: number;
|
|
861
|
+
}, ComplexityResult> | ToolDefinition<{
|
|
862
|
+
cwd?: string;
|
|
863
|
+
files?: string[];
|
|
864
|
+
useSnyk?: boolean;
|
|
865
|
+
}, QualityScores>)[];
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* Search tools for Corbat-Coco
|
|
869
|
+
* Content search across files
|
|
870
|
+
*/
|
|
871
|
+
|
|
872
|
+
/**
|
|
873
|
+
* Search match interface
|
|
874
|
+
*/
|
|
875
|
+
interface SearchMatch {
|
|
876
|
+
file: string;
|
|
877
|
+
line: number;
|
|
878
|
+
column: number;
|
|
879
|
+
content: string;
|
|
880
|
+
contextBefore: string[];
|
|
881
|
+
contextAfter: string[];
|
|
882
|
+
}
|
|
883
|
+
/**
|
|
884
|
+
* Search result interface
|
|
885
|
+
*/
|
|
886
|
+
interface SearchResult {
|
|
887
|
+
matches: SearchMatch[];
|
|
888
|
+
totalMatches: number;
|
|
889
|
+
filesSearched: number;
|
|
890
|
+
filesWithMatches: number;
|
|
891
|
+
truncated: boolean;
|
|
892
|
+
}
|
|
893
|
+
/**
|
|
894
|
+
* Grep/search tool
|
|
895
|
+
*/
|
|
896
|
+
declare const grepTool: ToolDefinition<{
|
|
897
|
+
pattern: string;
|
|
898
|
+
path?: string;
|
|
899
|
+
include?: string;
|
|
900
|
+
exclude?: string[];
|
|
901
|
+
contextLines?: number;
|
|
902
|
+
maxResults?: number;
|
|
903
|
+
caseSensitive?: boolean;
|
|
904
|
+
wholeWord?: boolean;
|
|
905
|
+
}, SearchResult>;
|
|
906
|
+
/**
|
|
907
|
+
* Find in file tool (simpler single-file search)
|
|
908
|
+
*/
|
|
909
|
+
declare const findInFileTool: ToolDefinition<{
|
|
910
|
+
file: string;
|
|
911
|
+
pattern: string;
|
|
912
|
+
caseSensitive?: boolean;
|
|
913
|
+
}, {
|
|
914
|
+
matches: Array<{
|
|
915
|
+
line: number;
|
|
916
|
+
content: string;
|
|
917
|
+
}>;
|
|
918
|
+
count: number;
|
|
919
|
+
}>;
|
|
920
|
+
/**
|
|
921
|
+
* All search tools
|
|
922
|
+
*/
|
|
923
|
+
declare const searchTools: (ToolDefinition<{
|
|
924
|
+
pattern: string;
|
|
925
|
+
path?: string;
|
|
926
|
+
include?: string;
|
|
927
|
+
exclude?: string[];
|
|
928
|
+
contextLines?: number;
|
|
929
|
+
maxResults?: number;
|
|
930
|
+
caseSensitive?: boolean;
|
|
931
|
+
wholeWord?: boolean;
|
|
932
|
+
}, SearchResult> | ToolDefinition<{
|
|
933
|
+
file: string;
|
|
934
|
+
pattern: string;
|
|
935
|
+
caseSensitive?: boolean;
|
|
936
|
+
}, {
|
|
937
|
+
matches: Array<{
|
|
938
|
+
line: number;
|
|
939
|
+
content: string;
|
|
940
|
+
}>;
|
|
941
|
+
count: number;
|
|
942
|
+
}>)[];
|
|
943
|
+
|
|
944
|
+
/**
|
|
945
|
+
* HTTP tools for Corbat-Coco
|
|
946
|
+
* Make HTTP requests to external APIs
|
|
947
|
+
*/
|
|
948
|
+
|
|
949
|
+
/**
|
|
950
|
+
* HTTP response interface
|
|
951
|
+
*/
|
|
952
|
+
interface HttpResponse {
|
|
953
|
+
status: number;
|
|
954
|
+
statusText: string;
|
|
955
|
+
headers: Record<string, string>;
|
|
956
|
+
body: string;
|
|
957
|
+
duration: number;
|
|
958
|
+
truncated: boolean;
|
|
959
|
+
}
|
|
960
|
+
/**
|
|
961
|
+
* HTTP fetch tool
|
|
962
|
+
*/
|
|
963
|
+
declare const httpFetchTool: ToolDefinition<{
|
|
964
|
+
url: string;
|
|
965
|
+
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD";
|
|
966
|
+
headers?: Record<string, string>;
|
|
967
|
+
body?: string;
|
|
968
|
+
timeout?: number;
|
|
969
|
+
maxSize?: number;
|
|
970
|
+
}, HttpResponse>;
|
|
971
|
+
/**
|
|
972
|
+
* HTTP JSON fetch tool (convenience wrapper)
|
|
973
|
+
*/
|
|
974
|
+
declare const httpJsonTool: ToolDefinition<{
|
|
975
|
+
url: string;
|
|
976
|
+
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
977
|
+
headers?: Record<string, string>;
|
|
978
|
+
data?: Record<string, unknown>;
|
|
979
|
+
timeout?: number;
|
|
980
|
+
}, {
|
|
981
|
+
status: number;
|
|
982
|
+
data: unknown;
|
|
983
|
+
duration: number;
|
|
984
|
+
}>;
|
|
985
|
+
/**
|
|
986
|
+
* All HTTP tools
|
|
987
|
+
*/
|
|
988
|
+
declare const httpTools: (ToolDefinition<{
|
|
989
|
+
url: string;
|
|
990
|
+
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD";
|
|
991
|
+
headers?: Record<string, string>;
|
|
992
|
+
body?: string;
|
|
993
|
+
timeout?: number;
|
|
994
|
+
maxSize?: number;
|
|
995
|
+
}, HttpResponse> | ToolDefinition<{
|
|
996
|
+
url: string;
|
|
997
|
+
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
998
|
+
headers?: Record<string, string>;
|
|
999
|
+
data?: Record<string, unknown>;
|
|
1000
|
+
timeout?: number;
|
|
1001
|
+
}, {
|
|
1002
|
+
status: number;
|
|
1003
|
+
data: unknown;
|
|
1004
|
+
duration: number;
|
|
1005
|
+
}>)[];
|
|
1006
|
+
|
|
1007
|
+
/**
|
|
1008
|
+
* Build tools for Corbat-Coco
|
|
1009
|
+
* Wrappers for npm, pnpm, yarn, and make
|
|
1010
|
+
*/
|
|
1011
|
+
|
|
1012
|
+
/**
|
|
1013
|
+
* Package manager type
|
|
1014
|
+
*/
|
|
1015
|
+
type PackageManager = "npm" | "pnpm" | "yarn" | "bun";
|
|
1016
|
+
/**
|
|
1017
|
+
* Build result interface
|
|
1018
|
+
*/
|
|
1019
|
+
interface BuildResult {
|
|
1020
|
+
success: boolean;
|
|
1021
|
+
stdout: string;
|
|
1022
|
+
stderr: string;
|
|
1023
|
+
exitCode: number;
|
|
1024
|
+
duration: number;
|
|
1025
|
+
packageManager?: PackageManager;
|
|
1026
|
+
hint?: string;
|
|
1027
|
+
}
|
|
1028
|
+
/**
|
|
1029
|
+
* Run npm/pnpm/yarn script tool
|
|
1030
|
+
*/
|
|
1031
|
+
declare const runScriptTool: ToolDefinition<{
|
|
1032
|
+
script: string;
|
|
1033
|
+
cwd?: string;
|
|
1034
|
+
packageManager?: PackageManager;
|
|
1035
|
+
args?: string[];
|
|
1036
|
+
env?: Record<string, string>;
|
|
1037
|
+
timeout?: number;
|
|
1038
|
+
}, BuildResult>;
|
|
1039
|
+
/**
|
|
1040
|
+
* Install dependencies tool
|
|
1041
|
+
*/
|
|
1042
|
+
declare const installDepsTool: ToolDefinition<{
|
|
1043
|
+
cwd?: string;
|
|
1044
|
+
packageManager?: PackageManager;
|
|
1045
|
+
packages?: string[];
|
|
1046
|
+
dev?: boolean;
|
|
1047
|
+
frozen?: boolean;
|
|
1048
|
+
timeout?: number;
|
|
1049
|
+
}, BuildResult>;
|
|
1050
|
+
/**
|
|
1051
|
+
* Run make target tool
|
|
1052
|
+
*/
|
|
1053
|
+
declare const makeTool: ToolDefinition<{
|
|
1054
|
+
target?: string;
|
|
1055
|
+
cwd?: string;
|
|
1056
|
+
args?: string[];
|
|
1057
|
+
env?: Record<string, string>;
|
|
1058
|
+
timeout?: number;
|
|
1059
|
+
}, BuildResult>;
|
|
1060
|
+
/**
|
|
1061
|
+
* TypeScript compile tool
|
|
1062
|
+
*/
|
|
1063
|
+
declare const tscTool: ToolDefinition<{
|
|
1064
|
+
cwd?: string;
|
|
1065
|
+
project?: string;
|
|
1066
|
+
noEmit?: boolean;
|
|
1067
|
+
watch?: boolean;
|
|
1068
|
+
args?: string[];
|
|
1069
|
+
timeout?: number;
|
|
1070
|
+
}, BuildResult>;
|
|
1071
|
+
/**
|
|
1072
|
+
* All build tools
|
|
1073
|
+
*/
|
|
1074
|
+
declare const buildTools: (ToolDefinition<{
|
|
1075
|
+
script: string;
|
|
1076
|
+
cwd?: string;
|
|
1077
|
+
packageManager?: PackageManager;
|
|
1078
|
+
args?: string[];
|
|
1079
|
+
env?: Record<string, string>;
|
|
1080
|
+
timeout?: number;
|
|
1081
|
+
}, BuildResult> | ToolDefinition<{
|
|
1082
|
+
cwd?: string;
|
|
1083
|
+
packageManager?: PackageManager;
|
|
1084
|
+
packages?: string[];
|
|
1085
|
+
dev?: boolean;
|
|
1086
|
+
frozen?: boolean;
|
|
1087
|
+
timeout?: number;
|
|
1088
|
+
}, BuildResult> | ToolDefinition<{
|
|
1089
|
+
target?: string;
|
|
1090
|
+
cwd?: string;
|
|
1091
|
+
args?: string[];
|
|
1092
|
+
env?: Record<string, string>;
|
|
1093
|
+
timeout?: number;
|
|
1094
|
+
}, BuildResult> | ToolDefinition<{
|
|
1095
|
+
cwd?: string;
|
|
1096
|
+
project?: string;
|
|
1097
|
+
noEmit?: boolean;
|
|
1098
|
+
watch?: boolean;
|
|
1099
|
+
args?: string[];
|
|
1100
|
+
timeout?: number;
|
|
1101
|
+
}, BuildResult> | ToolDefinition<{
|
|
1102
|
+
goal: string;
|
|
1103
|
+
cwd?: string;
|
|
1104
|
+
args?: string[];
|
|
1105
|
+
env?: Record<string, string>;
|
|
1106
|
+
timeout?: number;
|
|
1107
|
+
}, BuildResult> | ToolDefinition<{
|
|
1108
|
+
task: string;
|
|
1109
|
+
cwd?: string;
|
|
1110
|
+
args?: string[];
|
|
1111
|
+
env?: Record<string, string>;
|
|
1112
|
+
timeout?: number;
|
|
1113
|
+
}, BuildResult>)[];
|
|
1114
|
+
|
|
1115
|
+
/**
|
|
1116
|
+
* Permissions management tool
|
|
1117
|
+
*
|
|
1118
|
+
* Allows the LLM to modify tool permissions conversationally.
|
|
1119
|
+
* The user says "block git push" or "allow npm install" in natural language,
|
|
1120
|
+
* Coco invokes this tool, and the confirmation system shows the user
|
|
1121
|
+
* what will change (with risk info) before applying.
|
|
1122
|
+
*
|
|
1123
|
+
* The tool itself only validates and returns risk info.
|
|
1124
|
+
* The actual trust modification is done by agent-loop.ts after
|
|
1125
|
+
* the user confirms via the standard confirmation UI.
|
|
1126
|
+
*
|
|
1127
|
+
* Supports two scopes:
|
|
1128
|
+
* - "project" (default): per-project overrides (deny overrides global allow)
|
|
1129
|
+
* - "global": affects all projects
|
|
1130
|
+
*/
|
|
1131
|
+
|
|
1132
|
+
type RiskLevel = "low" | "medium" | "high" | "unknown";
|
|
1133
|
+
/**
|
|
1134
|
+
* Assess the risk level of a permission pattern based on recommended lists.
|
|
1135
|
+
*/
|
|
1136
|
+
declare function getRiskLevel(pattern: string): RiskLevel;
|
|
1137
|
+
/**
|
|
1138
|
+
* Get a human-readable risk description for a pattern.
|
|
1139
|
+
*/
|
|
1140
|
+
declare function getRiskDescription(pattern: string): string;
|
|
1141
|
+
/**
|
|
1142
|
+
* Get a description of what the action will do.
|
|
1143
|
+
*/
|
|
1144
|
+
declare function getEffectDescription(action: "allow" | "deny" | "ask", pattern: string, scope?: "global" | "project"): string;
|
|
1145
|
+
interface ManagePermissionsInput {
|
|
1146
|
+
action: "allow" | "deny" | "ask";
|
|
1147
|
+
patterns: string[];
|
|
1148
|
+
scope?: "global" | "project";
|
|
1149
|
+
reason?: string;
|
|
1150
|
+
}
|
|
1151
|
+
interface PermissionChange {
|
|
1152
|
+
pattern: string;
|
|
1153
|
+
action: string;
|
|
1154
|
+
risk: string;
|
|
1155
|
+
effect: string;
|
|
1156
|
+
}
|
|
1157
|
+
interface ManagePermissionsOutput {
|
|
1158
|
+
changes: PermissionChange[];
|
|
1159
|
+
summary: string;
|
|
1160
|
+
}
|
|
1161
|
+
declare const managePermissionsTool: ToolDefinition<ManagePermissionsInput, ManagePermissionsOutput>;
|
|
1162
|
+
/**
|
|
1163
|
+
* All permissions tools (for registry)
|
|
1164
|
+
*/
|
|
1165
|
+
declare const permissionsTools: ToolDefinition<ManagePermissionsInput, ManagePermissionsOutput>[];
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* Web Fetch tool for Corbat-Coco
|
|
1169
|
+
* Fetch URLs and convert HTML to clean markdown
|
|
1170
|
+
*/
|
|
1171
|
+
|
|
1172
|
+
/**
|
|
1173
|
+
* Web fetch result interface
|
|
1174
|
+
*/
|
|
1175
|
+
interface WebFetchOutput {
|
|
1176
|
+
title: string;
|
|
1177
|
+
content: string;
|
|
1178
|
+
url: string;
|
|
1179
|
+
contentType: string;
|
|
1180
|
+
wordCount: number;
|
|
1181
|
+
truncated: boolean;
|
|
1182
|
+
duration: number;
|
|
1183
|
+
metadata: {
|
|
1184
|
+
description?: string;
|
|
1185
|
+
author?: string;
|
|
1186
|
+
publishedDate?: string;
|
|
1187
|
+
};
|
|
1188
|
+
}
|
|
1189
|
+
/**
|
|
1190
|
+
* Web fetch tool
|
|
1191
|
+
*/
|
|
1192
|
+
declare const webFetchTool: ToolDefinition<{
|
|
1193
|
+
url: string;
|
|
1194
|
+
extractContent?: boolean;
|
|
1195
|
+
maxLength?: number;
|
|
1196
|
+
timeout?: number;
|
|
1197
|
+
}, WebFetchOutput>;
|
|
1198
|
+
|
|
1199
|
+
/**
|
|
1200
|
+
* Web Search tool for Corbat-Coco
|
|
1201
|
+
* Search the web for documentation, error solutions, and API references
|
|
1202
|
+
*/
|
|
1203
|
+
|
|
1204
|
+
/**
|
|
1205
|
+
* Search result interface
|
|
1206
|
+
*/
|
|
1207
|
+
interface WebSearchResultItem {
|
|
1208
|
+
title: string;
|
|
1209
|
+
url: string;
|
|
1210
|
+
snippet: string;
|
|
1211
|
+
}
|
|
1212
|
+
interface WebSearchOutput {
|
|
1213
|
+
results: WebSearchResultItem[];
|
|
1214
|
+
totalResults: number;
|
|
1215
|
+
engine: string;
|
|
1216
|
+
duration: number;
|
|
1217
|
+
}
|
|
1218
|
+
/**
|
|
1219
|
+
* Web search tool
|
|
1220
|
+
*/
|
|
1221
|
+
declare const webSearchTool: ToolDefinition<{
|
|
1222
|
+
query: string;
|
|
1223
|
+
maxResults?: number;
|
|
1224
|
+
engine?: "duckduckgo" | "brave" | "serpapi";
|
|
1225
|
+
}, WebSearchOutput>;
|
|
1226
|
+
|
|
1227
|
+
/**
|
|
1228
|
+
* All web tools
|
|
1229
|
+
*/
|
|
1230
|
+
declare const webTools: (ToolDefinition<{
|
|
1231
|
+
query: string;
|
|
1232
|
+
maxResults?: number;
|
|
1233
|
+
engine?: "duckduckgo" | "brave" | "serpapi";
|
|
1234
|
+
}, WebSearchOutput> | ToolDefinition<{
|
|
1235
|
+
url: string;
|
|
1236
|
+
extractContent?: boolean;
|
|
1237
|
+
maxLength?: number;
|
|
1238
|
+
timeout?: number;
|
|
1239
|
+
}, WebFetchOutput>)[];
|
|
1240
|
+
|
|
1241
|
+
/**
|
|
1242
|
+
* Visual diff tool for Corbat-Coco
|
|
1243
|
+
*
|
|
1244
|
+
* Provides visual diff rendering that the agent can invoke from chat.
|
|
1245
|
+
* Supports: unstaged, staged, branch comparison, file-to-file, and arbitrary refs.
|
|
1246
|
+
*/
|
|
1247
|
+
|
|
1248
|
+
/**
|
|
1249
|
+
* Show diff — visual rendering of git diffs in the terminal.
|
|
1250
|
+
*
|
|
1251
|
+
* Modes:
|
|
1252
|
+
* 1. Unstaged changes (default): no args
|
|
1253
|
+
* 2. Staged changes: { staged: true }
|
|
1254
|
+
* 3. Branch comparison: { base: "main" }
|
|
1255
|
+
* 4. Between two refs: { base: "main", ref: "feature" }
|
|
1256
|
+
* 5. Specific files: { files: ["src/app.ts"] }
|
|
1257
|
+
*/
|
|
1258
|
+
declare const showDiffTool: ToolDefinition<{
|
|
1259
|
+
cwd?: string;
|
|
1260
|
+
staged?: boolean;
|
|
1261
|
+
base?: string;
|
|
1262
|
+
ref?: string;
|
|
1263
|
+
files?: string[];
|
|
1264
|
+
compact?: boolean;
|
|
1265
|
+
}, {
|
|
1266
|
+
filesChanged: number;
|
|
1267
|
+
additions: number;
|
|
1268
|
+
deletions: number;
|
|
1269
|
+
rendered: true;
|
|
1270
|
+
}>;
|
|
1271
|
+
declare const diffTools: ToolDefinition<{
|
|
1272
|
+
cwd?: string;
|
|
1273
|
+
staged?: boolean;
|
|
1274
|
+
base?: string;
|
|
1275
|
+
ref?: string;
|
|
1276
|
+
files?: string[];
|
|
1277
|
+
compact?: boolean;
|
|
1278
|
+
}, {
|
|
1279
|
+
filesChanged: number;
|
|
1280
|
+
additions: number;
|
|
1281
|
+
deletions: number;
|
|
1282
|
+
rendered: true;
|
|
1283
|
+
}>[];
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* Visual diff renderer for terminal
|
|
1287
|
+
*
|
|
1288
|
+
* Parses git unified diff format and renders with clean Codex-style formatting
|
|
1289
|
+
* showing removed lines with red background (-) and added lines with green background (+).
|
|
1290
|
+
*/
|
|
1291
|
+
interface DiffStats {
|
|
1292
|
+
additions: number;
|
|
1293
|
+
deletions: number;
|
|
1294
|
+
filesChanged: number;
|
|
1295
|
+
}
|
|
1296
|
+
interface DiffFile {
|
|
1297
|
+
path: string;
|
|
1298
|
+
oldPath?: string;
|
|
1299
|
+
type: "modified" | "added" | "deleted" | "renamed";
|
|
1300
|
+
hunks: DiffHunk[];
|
|
1301
|
+
additions: number;
|
|
1302
|
+
deletions: number;
|
|
1303
|
+
}
|
|
1304
|
+
interface DiffHunk {
|
|
1305
|
+
oldStart: number;
|
|
1306
|
+
oldLines: number;
|
|
1307
|
+
newStart: number;
|
|
1308
|
+
newLines: number;
|
|
1309
|
+
heading: string;
|
|
1310
|
+
lines: DiffLine[];
|
|
1311
|
+
}
|
|
1312
|
+
interface DiffLine {
|
|
1313
|
+
type: "add" | "delete" | "context";
|
|
1314
|
+
content: string;
|
|
1315
|
+
oldLineNo?: number;
|
|
1316
|
+
newLineNo?: number;
|
|
1317
|
+
}
|
|
1318
|
+
interface ParsedDiff {
|
|
1319
|
+
files: DiffFile[];
|
|
1320
|
+
stats: DiffStats;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
/**
|
|
1324
|
+
* Project maturity detection
|
|
1325
|
+
*
|
|
1326
|
+
* Heuristic-based detection of project maturity level.
|
|
1327
|
+
* Used by the review tool to adjust recommendations:
|
|
1328
|
+
* - empty: recommend project structure, CI, testing
|
|
1329
|
+
* - new: suggest tests, documentation, standards
|
|
1330
|
+
* - established: enforce existing patterns, check consistency
|
|
1331
|
+
*/
|
|
1332
|
+
type MaturityLevel = "empty" | "new" | "established";
|
|
1333
|
+
|
|
1334
|
+
/**
|
|
1335
|
+
* Code review tool for Corbat-Coco
|
|
1336
|
+
*
|
|
1337
|
+
* Analyzes git diffs between current branch and a base branch,
|
|
1338
|
+
* runs pattern detection and optional linting, and produces
|
|
1339
|
+
* structured review findings ordered by severity.
|
|
1340
|
+
*/
|
|
1341
|
+
|
|
1342
|
+
type ReviewSeverity = "critical" | "major" | "minor" | "info";
|
|
1343
|
+
type ReviewCategory = "security" | "correctness" | "performance" | "maintainability" | "style" | "testing" | "documentation" | "best-practice";
|
|
1344
|
+
interface ReviewFinding {
|
|
1345
|
+
file: string;
|
|
1346
|
+
line?: number;
|
|
1347
|
+
severity: ReviewSeverity;
|
|
1348
|
+
category: ReviewCategory;
|
|
1349
|
+
message: string;
|
|
1350
|
+
suggestion?: {
|
|
1351
|
+
old: string[];
|
|
1352
|
+
new: string[];
|
|
1353
|
+
};
|
|
1354
|
+
}
|
|
1355
|
+
interface ReviewSummary {
|
|
1356
|
+
branch: string;
|
|
1357
|
+
baseBranch: string;
|
|
1358
|
+
filesChanged: number;
|
|
1359
|
+
additions: number;
|
|
1360
|
+
deletions: number;
|
|
1361
|
+
status: "approved" | "needs_work";
|
|
1362
|
+
}
|
|
1363
|
+
interface ReviewResult {
|
|
1364
|
+
summary: ReviewSummary;
|
|
1365
|
+
required: ReviewFinding[];
|
|
1366
|
+
suggestions: ReviewFinding[];
|
|
1367
|
+
maturity: MaturityLevel;
|
|
1368
|
+
diff: ParsedDiff;
|
|
1369
|
+
warnings?: string[];
|
|
1370
|
+
}
|
|
1371
|
+
declare const reviewCodeTool: ToolDefinition<{
|
|
1372
|
+
baseBranch?: string;
|
|
1373
|
+
includeUncommitted?: boolean;
|
|
1374
|
+
runLinter?: boolean;
|
|
1375
|
+
cwd?: string;
|
|
1376
|
+
}, ReviewResult>;
|
|
1377
|
+
declare const reviewTools: ToolDefinition<{
|
|
1378
|
+
baseBranch?: string;
|
|
1379
|
+
includeUncommitted?: boolean;
|
|
1380
|
+
runLinter?: boolean;
|
|
1381
|
+
cwd?: string;
|
|
1382
|
+
}, ReviewResult>[];
|
|
1383
|
+
|
|
1384
|
+
/**
|
|
1385
|
+
* Codebase Map tool for Corbat-Coco
|
|
1386
|
+
* Generate structural map of codebase: classes, functions, exports, interfaces
|
|
1387
|
+
* Token-efficient overview without reading full file contents
|
|
1388
|
+
*/
|
|
1389
|
+
|
|
1390
|
+
/**
|
|
1391
|
+
* Definition types
|
|
1392
|
+
*/
|
|
1393
|
+
type DefinitionType = "class" | "function" | "interface" | "type" | "enum" | "const" | "variable" | "method";
|
|
1394
|
+
/**
|
|
1395
|
+
* A single code definition
|
|
1396
|
+
*/
|
|
1397
|
+
interface CodeDefinition {
|
|
1398
|
+
name: string;
|
|
1399
|
+
type: DefinitionType;
|
|
1400
|
+
line: number;
|
|
1401
|
+
exported: boolean;
|
|
1402
|
+
signature?: string;
|
|
1403
|
+
}
|
|
1404
|
+
/**
|
|
1405
|
+
* File map entry
|
|
1406
|
+
*/
|
|
1407
|
+
interface FileMapEntry {
|
|
1408
|
+
path: string;
|
|
1409
|
+
language: string;
|
|
1410
|
+
definitions: CodeDefinition[];
|
|
1411
|
+
imports: string[];
|
|
1412
|
+
exports: string[];
|
|
1413
|
+
lineCount: number;
|
|
1414
|
+
}
|
|
1415
|
+
/**
|
|
1416
|
+
* Codebase map output
|
|
1417
|
+
*/
|
|
1418
|
+
interface CodebaseMapOutput {
|
|
1419
|
+
files: FileMapEntry[];
|
|
1420
|
+
summary: {
|
|
1421
|
+
totalFiles: number;
|
|
1422
|
+
totalDefinitions: number;
|
|
1423
|
+
languages: Record<string, number>;
|
|
1424
|
+
exportedSymbols: number;
|
|
1425
|
+
};
|
|
1426
|
+
duration: number;
|
|
1427
|
+
}
|
|
1428
|
+
/**
|
|
1429
|
+
* Codebase map tool
|
|
1430
|
+
*/
|
|
1431
|
+
declare const codebaseMapTool: ToolDefinition<{
|
|
1432
|
+
path?: string;
|
|
1433
|
+
include?: string;
|
|
1434
|
+
exclude?: string[];
|
|
1435
|
+
languages?: Array<"typescript" | "javascript" | "python" | "java" | "go" | "rust">;
|
|
1436
|
+
maxFiles?: number;
|
|
1437
|
+
depth?: "overview" | "detailed";
|
|
1438
|
+
includeTests?: boolean;
|
|
1439
|
+
}, CodebaseMapOutput>;
|
|
1440
|
+
/**
|
|
1441
|
+
* All codebase map tools
|
|
1442
|
+
*/
|
|
1443
|
+
declare const codebaseMapTools: ToolDefinition<{
|
|
1444
|
+
path?: string;
|
|
1445
|
+
include?: string;
|
|
1446
|
+
exclude?: string[];
|
|
1447
|
+
languages?: Array<"typescript" | "javascript" | "python" | "java" | "go" | "rust">;
|
|
1448
|
+
maxFiles?: number;
|
|
1449
|
+
depth?: "overview" | "detailed";
|
|
1450
|
+
includeTests?: boolean;
|
|
1451
|
+
}, CodebaseMapOutput>[];
|
|
1452
|
+
|
|
1453
|
+
/**
|
|
1454
|
+
* Memory tools for Corbat-Coco
|
|
1455
|
+
* Persist learnings and context between sessions
|
|
1456
|
+
*/
|
|
1457
|
+
|
|
1458
|
+
/**
|
|
1459
|
+
* Memory entry interface
|
|
1460
|
+
*/
|
|
1461
|
+
interface Memory {
|
|
1462
|
+
id: string;
|
|
1463
|
+
key: string;
|
|
1464
|
+
value: string;
|
|
1465
|
+
tags: string[];
|
|
1466
|
+
scope: "global" | "project";
|
|
1467
|
+
project?: string;
|
|
1468
|
+
createdAt: string;
|
|
1469
|
+
updatedAt: string;
|
|
1470
|
+
accessCount: number;
|
|
1471
|
+
}
|
|
1472
|
+
/**
|
|
1473
|
+
* Create memory tool
|
|
1474
|
+
*/
|
|
1475
|
+
declare const createMemoryTool: ToolDefinition<{
|
|
1476
|
+
key: string;
|
|
1477
|
+
value: string;
|
|
1478
|
+
tags?: string[];
|
|
1479
|
+
scope?: "global" | "project";
|
|
1480
|
+
}, {
|
|
1481
|
+
id: string;
|
|
1482
|
+
key: string;
|
|
1483
|
+
scope: string;
|
|
1484
|
+
created: boolean;
|
|
1485
|
+
}>;
|
|
1486
|
+
/**
|
|
1487
|
+
* Recall memory tool
|
|
1488
|
+
*/
|
|
1489
|
+
declare const recallMemoryTool: ToolDefinition<{
|
|
1490
|
+
query?: string;
|
|
1491
|
+
tags?: string[];
|
|
1492
|
+
scope?: "global" | "project" | "all";
|
|
1493
|
+
limit?: number;
|
|
1494
|
+
}, {
|
|
1495
|
+
memories: Memory[];
|
|
1496
|
+
totalFound: number;
|
|
1497
|
+
}>;
|
|
1498
|
+
/**
|
|
1499
|
+
* List memories tool
|
|
1500
|
+
*/
|
|
1501
|
+
declare const listMemoriesTool: ToolDefinition<{
|
|
1502
|
+
scope?: "global" | "project" | "all";
|
|
1503
|
+
tags?: string[];
|
|
1504
|
+
}, {
|
|
1505
|
+
memories: Array<{
|
|
1506
|
+
id: string;
|
|
1507
|
+
key: string;
|
|
1508
|
+
tags: string[];
|
|
1509
|
+
scope: string;
|
|
1510
|
+
createdAt: string;
|
|
1511
|
+
}>;
|
|
1512
|
+
total: number;
|
|
1513
|
+
}>;
|
|
1514
|
+
/**
|
|
1515
|
+
* All memory tools
|
|
1516
|
+
*/
|
|
1517
|
+
declare const memoryTools: (ToolDefinition<{
|
|
1518
|
+
key: string;
|
|
1519
|
+
value: string;
|
|
1520
|
+
tags?: string[];
|
|
1521
|
+
scope?: "global" | "project";
|
|
1522
|
+
}, {
|
|
1523
|
+
id: string;
|
|
1524
|
+
key: string;
|
|
1525
|
+
scope: string;
|
|
1526
|
+
created: boolean;
|
|
1527
|
+
}> | ToolDefinition<{
|
|
1528
|
+
query?: string;
|
|
1529
|
+
tags?: string[];
|
|
1530
|
+
scope?: "global" | "project" | "all";
|
|
1531
|
+
limit?: number;
|
|
1532
|
+
}, {
|
|
1533
|
+
memories: Memory[];
|
|
1534
|
+
totalFound: number;
|
|
1535
|
+
}> | ToolDefinition<{
|
|
1536
|
+
scope?: "global" | "project" | "all";
|
|
1537
|
+
tags?: string[];
|
|
1538
|
+
}, {
|
|
1539
|
+
memories: Array<{
|
|
1540
|
+
id: string;
|
|
1541
|
+
key: string;
|
|
1542
|
+
tags: string[];
|
|
1543
|
+
scope: string;
|
|
1544
|
+
createdAt: string;
|
|
1545
|
+
}>;
|
|
1546
|
+
total: number;
|
|
1547
|
+
}>)[];
|
|
1548
|
+
|
|
1549
|
+
/**
|
|
1550
|
+
* Checkpoint tools for Corbat-Coco
|
|
1551
|
+
* Create and restore code snapshots using git stash
|
|
1552
|
+
*/
|
|
1553
|
+
|
|
1554
|
+
/**
|
|
1555
|
+
* Checkpoint entry
|
|
1556
|
+
*/
|
|
1557
|
+
interface Checkpoint {
|
|
1558
|
+
id: string;
|
|
1559
|
+
description: string;
|
|
1560
|
+
timestamp: string;
|
|
1561
|
+
stashRef?: string;
|
|
1562
|
+
fileCount: number;
|
|
1563
|
+
files: string[];
|
|
1564
|
+
}
|
|
1565
|
+
/**
|
|
1566
|
+
* Create checkpoint tool
|
|
1567
|
+
*/
|
|
1568
|
+
declare const createCheckpointTool: ToolDefinition<{
|
|
1569
|
+
description: string;
|
|
1570
|
+
}, {
|
|
1571
|
+
id: string;
|
|
1572
|
+
description: string;
|
|
1573
|
+
fileCount: number;
|
|
1574
|
+
files: string[];
|
|
1575
|
+
method: "stash" | "clean";
|
|
1576
|
+
}>;
|
|
1577
|
+
/**
|
|
1578
|
+
* Restore checkpoint tool
|
|
1579
|
+
*/
|
|
1580
|
+
declare const restoreCheckpointTool: ToolDefinition<{
|
|
1581
|
+
id: string;
|
|
1582
|
+
}, {
|
|
1583
|
+
id: string;
|
|
1584
|
+
description: string;
|
|
1585
|
+
restored: boolean;
|
|
1586
|
+
message: string;
|
|
1587
|
+
}>;
|
|
1588
|
+
/**
|
|
1589
|
+
* List checkpoints tool
|
|
1590
|
+
*/
|
|
1591
|
+
declare const listCheckpointsTool: ToolDefinition<{
|
|
1592
|
+
limit?: number;
|
|
1593
|
+
}, {
|
|
1594
|
+
checkpoints: Checkpoint[];
|
|
1595
|
+
total: number;
|
|
1596
|
+
}>;
|
|
1597
|
+
/**
|
|
1598
|
+
* All checkpoint tools
|
|
1599
|
+
*/
|
|
1600
|
+
declare const checkpointTools: (ToolDefinition<{
|
|
1601
|
+
description: string;
|
|
1602
|
+
}, {
|
|
1603
|
+
id: string;
|
|
1604
|
+
description: string;
|
|
1605
|
+
fileCount: number;
|
|
1606
|
+
files: string[];
|
|
1607
|
+
method: "stash" | "clean";
|
|
1608
|
+
}> | ToolDefinition<{
|
|
1609
|
+
id: string;
|
|
1610
|
+
}, {
|
|
1611
|
+
id: string;
|
|
1612
|
+
description: string;
|
|
1613
|
+
restored: boolean;
|
|
1614
|
+
message: string;
|
|
1615
|
+
}> | ToolDefinition<{
|
|
1616
|
+
limit?: number;
|
|
1617
|
+
}, {
|
|
1618
|
+
checkpoints: Checkpoint[];
|
|
1619
|
+
total: number;
|
|
1620
|
+
}>)[];
|
|
1621
|
+
|
|
1622
|
+
/**
|
|
1623
|
+
* Semantic Search tool for Corbat-Coco
|
|
1624
|
+
* Vector-based code search using local embeddings
|
|
1625
|
+
*/
|
|
1626
|
+
|
|
1627
|
+
/**
|
|
1628
|
+
* Semantic search result item
|
|
1629
|
+
*/
|
|
1630
|
+
interface SemanticSearchResultItem {
|
|
1631
|
+
file: string;
|
|
1632
|
+
line: number;
|
|
1633
|
+
snippet: string;
|
|
1634
|
+
score: number;
|
|
1635
|
+
context: string;
|
|
1636
|
+
}
|
|
1637
|
+
/**
|
|
1638
|
+
* Semantic search output
|
|
1639
|
+
*/
|
|
1640
|
+
interface SemanticSearchOutput {
|
|
1641
|
+
results: SemanticSearchResultItem[];
|
|
1642
|
+
totalIndexed: number;
|
|
1643
|
+
indexAge: string;
|
|
1644
|
+
duration: number;
|
|
1645
|
+
warning?: string;
|
|
1646
|
+
}
|
|
1647
|
+
/**
|
|
1648
|
+
* Semantic search tool
|
|
1649
|
+
*/
|
|
1650
|
+
declare const semanticSearchTool: ToolDefinition<{
|
|
1651
|
+
query: string;
|
|
1652
|
+
path?: string;
|
|
1653
|
+
include?: string;
|
|
1654
|
+
maxResults?: number;
|
|
1655
|
+
threshold?: number;
|
|
1656
|
+
reindex?: boolean;
|
|
1657
|
+
}, SemanticSearchOutput>;
|
|
1658
|
+
/**
|
|
1659
|
+
* All semantic search tools
|
|
1660
|
+
*/
|
|
1661
|
+
declare const semanticSearchTools: ToolDefinition<{
|
|
1662
|
+
query: string;
|
|
1663
|
+
path?: string;
|
|
1664
|
+
include?: string;
|
|
1665
|
+
maxResults?: number;
|
|
1666
|
+
threshold?: number;
|
|
1667
|
+
reindex?: boolean;
|
|
1668
|
+
}, SemanticSearchOutput>[];
|
|
1669
|
+
|
|
1670
|
+
/**
|
|
1671
|
+
* Diagram generation tool for Corbat-Coco
|
|
1672
|
+
* Generate Mermaid diagrams from code analysis or descriptions
|
|
1673
|
+
*/
|
|
1674
|
+
|
|
1675
|
+
/**
|
|
1676
|
+
* Diagram output
|
|
1677
|
+
*/
|
|
1678
|
+
interface DiagramOutput {
|
|
1679
|
+
diagram: string;
|
|
1680
|
+
format: string;
|
|
1681
|
+
type: string;
|
|
1682
|
+
nodeCount: number;
|
|
1683
|
+
edgeCount: number;
|
|
1684
|
+
}
|
|
1685
|
+
/**
|
|
1686
|
+
* Diagram generation tool
|
|
1687
|
+
*/
|
|
1688
|
+
declare const generateDiagramTool: ToolDefinition<{
|
|
1689
|
+
type: "class" | "sequence" | "flowchart" | "architecture" | "er" | "mindmap";
|
|
1690
|
+
description?: string;
|
|
1691
|
+
path?: string;
|
|
1692
|
+
include?: string;
|
|
1693
|
+
format?: "mermaid" | "plantuml";
|
|
1694
|
+
}, DiagramOutput>;
|
|
1695
|
+
/**
|
|
1696
|
+
* All diagram tools
|
|
1697
|
+
*/
|
|
1698
|
+
declare const diagramTools: ToolDefinition<{
|
|
1699
|
+
type: "class" | "sequence" | "flowchart" | "architecture" | "er" | "mindmap";
|
|
1700
|
+
description?: string;
|
|
1701
|
+
path?: string;
|
|
1702
|
+
include?: string;
|
|
1703
|
+
format?: "mermaid" | "plantuml";
|
|
1704
|
+
}, DiagramOutput>[];
|
|
1705
|
+
|
|
1706
|
+
/**
|
|
1707
|
+
* PDF Reader tool for Corbat-Coco
|
|
1708
|
+
* Extract text content from PDF files
|
|
1709
|
+
*/
|
|
1710
|
+
|
|
1711
|
+
/**
|
|
1712
|
+
* PDF read output
|
|
1713
|
+
*/
|
|
1714
|
+
interface PdfReadOutput {
|
|
1715
|
+
text: string;
|
|
1716
|
+
pages: number;
|
|
1717
|
+
metadata: {
|
|
1718
|
+
title?: string;
|
|
1719
|
+
author?: string;
|
|
1720
|
+
subject?: string;
|
|
1721
|
+
creator?: string;
|
|
1722
|
+
};
|
|
1723
|
+
truncated: boolean;
|
|
1724
|
+
duration: number;
|
|
1725
|
+
}
|
|
1726
|
+
/**
|
|
1727
|
+
* PDF reader tool
|
|
1728
|
+
*/
|
|
1729
|
+
declare const readPdfTool: ToolDefinition<{
|
|
1730
|
+
path: string;
|
|
1731
|
+
pages?: string;
|
|
1732
|
+
maxPages?: number;
|
|
1733
|
+
}, PdfReadOutput>;
|
|
1734
|
+
/**
|
|
1735
|
+
* All document tools (PDF)
|
|
1736
|
+
*/
|
|
1737
|
+
declare const pdfTools: ToolDefinition<{
|
|
1738
|
+
path: string;
|
|
1739
|
+
pages?: string;
|
|
1740
|
+
maxPages?: number;
|
|
1741
|
+
}, PdfReadOutput>[];
|
|
1742
|
+
|
|
1743
|
+
/**
|
|
1744
|
+
* Image Understanding tool for Corbat-Coco
|
|
1745
|
+
* Analyze images using vision-capable LLM providers
|
|
1746
|
+
*/
|
|
1747
|
+
|
|
1748
|
+
/**
|
|
1749
|
+
* Image understanding output
|
|
1750
|
+
*/
|
|
1751
|
+
interface ImageReadOutput {
|
|
1752
|
+
description: string;
|
|
1753
|
+
provider: string;
|
|
1754
|
+
model: string;
|
|
1755
|
+
duration: number;
|
|
1756
|
+
imageSize: number;
|
|
1757
|
+
format: string;
|
|
1758
|
+
}
|
|
1759
|
+
/**
|
|
1760
|
+
* Image understanding tool
|
|
1761
|
+
*/
|
|
1762
|
+
declare const readImageTool: ToolDefinition<{
|
|
1763
|
+
path: string;
|
|
1764
|
+
prompt?: string;
|
|
1765
|
+
provider?: "anthropic" | "openai" | "gemini";
|
|
1766
|
+
}, ImageReadOutput>;
|
|
1767
|
+
/**
|
|
1768
|
+
* All image tools
|
|
1769
|
+
*/
|
|
1770
|
+
declare const imageTools: ToolDefinition<{
|
|
1771
|
+
path: string;
|
|
1772
|
+
prompt?: string;
|
|
1773
|
+
provider?: "anthropic" | "openai" | "gemini";
|
|
1774
|
+
}, ImageReadOutput>[];
|
|
1775
|
+
|
|
1776
|
+
/**
|
|
1777
|
+
* Database tools for Corbat-Coco
|
|
1778
|
+
* SQLite query execution and schema inspection
|
|
1779
|
+
*/
|
|
1780
|
+
|
|
1781
|
+
/**
|
|
1782
|
+
* SQL query output
|
|
1783
|
+
*/
|
|
1784
|
+
interface SqlQueryOutput {
|
|
1785
|
+
rows: Record<string, unknown>[];
|
|
1786
|
+
columns: string[];
|
|
1787
|
+
rowCount: number;
|
|
1788
|
+
duration: number;
|
|
1789
|
+
readonly: boolean;
|
|
1790
|
+
}
|
|
1791
|
+
/**
|
|
1792
|
+
* Schema inspection output
|
|
1793
|
+
*/
|
|
1794
|
+
interface SchemaInspectOutput {
|
|
1795
|
+
tables: Array<{
|
|
1796
|
+
name: string;
|
|
1797
|
+
columns: Array<{
|
|
1798
|
+
name: string;
|
|
1799
|
+
type: string;
|
|
1800
|
+
nullable: boolean;
|
|
1801
|
+
primaryKey: boolean;
|
|
1802
|
+
defaultValue: string | null;
|
|
1803
|
+
}>;
|
|
1804
|
+
rowCount: number;
|
|
1805
|
+
}>;
|
|
1806
|
+
duration: number;
|
|
1807
|
+
}
|
|
1808
|
+
/**
|
|
1809
|
+
* SQL query tool
|
|
1810
|
+
*/
|
|
1811
|
+
declare const sqlQueryTool: ToolDefinition<{
|
|
1812
|
+
database: string;
|
|
1813
|
+
query: string;
|
|
1814
|
+
params?: unknown[];
|
|
1815
|
+
readonly?: boolean;
|
|
1816
|
+
}, SqlQueryOutput>;
|
|
1817
|
+
/**
|
|
1818
|
+
* Schema inspection tool
|
|
1819
|
+
*/
|
|
1820
|
+
declare const inspectSchemaTool: ToolDefinition<{
|
|
1821
|
+
database: string;
|
|
1822
|
+
table?: string;
|
|
1823
|
+
}, SchemaInspectOutput>;
|
|
1824
|
+
/**
|
|
1825
|
+
* All database tools
|
|
1826
|
+
*/
|
|
1827
|
+
declare const databaseTools: (ToolDefinition<{
|
|
1828
|
+
database: string;
|
|
1829
|
+
query: string;
|
|
1830
|
+
params?: unknown[];
|
|
1831
|
+
readonly?: boolean;
|
|
1832
|
+
}, SqlQueryOutput> | ToolDefinition<{
|
|
1833
|
+
database: string;
|
|
1834
|
+
table?: string;
|
|
1835
|
+
}, SchemaInspectOutput>)[];
|
|
1836
|
+
|
|
1837
|
+
interface ValidationResult {
|
|
1838
|
+
valid: boolean;
|
|
1839
|
+
errors: Array<{
|
|
1840
|
+
line: number;
|
|
1841
|
+
column: number;
|
|
1842
|
+
message: string;
|
|
1843
|
+
}>;
|
|
1844
|
+
warnings: Array<{
|
|
1845
|
+
line: number;
|
|
1846
|
+
column: number;
|
|
1847
|
+
message: string;
|
|
1848
|
+
}>;
|
|
1849
|
+
ast?: unknown;
|
|
1850
|
+
}
|
|
1851
|
+
/**
|
|
1852
|
+
* Tool: Validate code syntax before applying changes
|
|
1853
|
+
*/
|
|
1854
|
+
declare const validateCodeTool: ToolDefinition<unknown, {
|
|
1855
|
+
valid: boolean;
|
|
1856
|
+
errors: {
|
|
1857
|
+
line: number;
|
|
1858
|
+
column: number;
|
|
1859
|
+
message: string;
|
|
1860
|
+
}[];
|
|
1861
|
+
warnings: {
|
|
1862
|
+
line: number;
|
|
1863
|
+
column: number;
|
|
1864
|
+
message: string;
|
|
1865
|
+
}[];
|
|
1866
|
+
hasAst: boolean;
|
|
1867
|
+
}>;
|
|
1868
|
+
/**
|
|
1869
|
+
* Tool: Find missing imports in code
|
|
1870
|
+
*/
|
|
1871
|
+
declare const findMissingImportsTool: ToolDefinition<unknown, {
|
|
1872
|
+
existingImports: string[];
|
|
1873
|
+
missingImports: string[];
|
|
1874
|
+
hasMissing: boolean;
|
|
1875
|
+
}>;
|
|
1876
|
+
declare const astValidatorTools: (ToolDefinition<unknown, {
|
|
1877
|
+
valid: boolean;
|
|
1878
|
+
errors: {
|
|
1879
|
+
line: number;
|
|
1880
|
+
column: number;
|
|
1881
|
+
message: string;
|
|
1882
|
+
}[];
|
|
1883
|
+
warnings: {
|
|
1884
|
+
line: number;
|
|
1885
|
+
column: number;
|
|
1886
|
+
message: string;
|
|
1887
|
+
}[];
|
|
1888
|
+
hasAst: boolean;
|
|
1889
|
+
}> | ToolDefinition<unknown, {
|
|
1890
|
+
existingImports: string[];
|
|
1891
|
+
missingImports: string[];
|
|
1892
|
+
hasMissing: boolean;
|
|
1893
|
+
}>)[];
|
|
1894
|
+
|
|
1895
|
+
interface FunctionInfo {
|
|
1896
|
+
name: string;
|
|
1897
|
+
line: number;
|
|
1898
|
+
params: string[];
|
|
1899
|
+
exported: boolean;
|
|
1900
|
+
async: boolean;
|
|
1901
|
+
}
|
|
1902
|
+
interface ClassInfo {
|
|
1903
|
+
name: string;
|
|
1904
|
+
line: number;
|
|
1905
|
+
methods: string[];
|
|
1906
|
+
exported: boolean;
|
|
1907
|
+
}
|
|
1908
|
+
interface ImportInfo {
|
|
1909
|
+
source: string;
|
|
1910
|
+
items: string[];
|
|
1911
|
+
isDefault: boolean;
|
|
1912
|
+
isNamespace: boolean;
|
|
1913
|
+
}
|
|
1914
|
+
interface ExportInfo {
|
|
1915
|
+
name: string;
|
|
1916
|
+
type: "function" | "class" | "variable" | "type";
|
|
1917
|
+
}
|
|
1918
|
+
interface CodeAnalysisResult {
|
|
1919
|
+
filePath: string;
|
|
1920
|
+
language: string;
|
|
1921
|
+
lines: number;
|
|
1922
|
+
functions: FunctionInfo[];
|
|
1923
|
+
classes: ClassInfo[];
|
|
1924
|
+
imports: ImportInfo[];
|
|
1925
|
+
exports: ExportInfo[];
|
|
1926
|
+
complexity: {
|
|
1927
|
+
cyclomatic: number;
|
|
1928
|
+
functions: number;
|
|
1929
|
+
classes: number;
|
|
1930
|
+
avgFunctionLength: number;
|
|
1931
|
+
};
|
|
1932
|
+
ast?: unknown;
|
|
1933
|
+
}
|
|
1934
|
+
/**
|
|
1935
|
+
* Tool: Analyze code file structure
|
|
1936
|
+
*/
|
|
1937
|
+
declare const analyzeFileTool: ToolDefinition<unknown, {
|
|
1938
|
+
filePath: string;
|
|
1939
|
+
language: string;
|
|
1940
|
+
lines: number;
|
|
1941
|
+
functionsCount: number;
|
|
1942
|
+
classesCount: number;
|
|
1943
|
+
importsCount: number;
|
|
1944
|
+
exportsCount: number;
|
|
1945
|
+
functions: FunctionInfo[];
|
|
1946
|
+
classes: ClassInfo[];
|
|
1947
|
+
imports: ImportInfo[];
|
|
1948
|
+
exports: ExportInfo[];
|
|
1949
|
+
complexity: {
|
|
1950
|
+
cyclomatic: number;
|
|
1951
|
+
functions: number;
|
|
1952
|
+
classes: number;
|
|
1953
|
+
avgFunctionLength: number;
|
|
1954
|
+
};
|
|
1955
|
+
}>;
|
|
1956
|
+
/**
|
|
1957
|
+
* Tool: Analyze directory structure
|
|
1958
|
+
*/
|
|
1959
|
+
declare const analyzeDirectoryTool: ToolDefinition<unknown, {
|
|
1960
|
+
totalFiles: number;
|
|
1961
|
+
totalLines: number;
|
|
1962
|
+
filesByType: Record<string, number>;
|
|
1963
|
+
largestFiles: Array<{
|
|
1964
|
+
file: string;
|
|
1965
|
+
lines: number;
|
|
1966
|
+
}>;
|
|
1967
|
+
mostComplex: Array<{
|
|
1968
|
+
file: string;
|
|
1969
|
+
complexity: number;
|
|
1970
|
+
}>;
|
|
1971
|
+
}>;
|
|
1972
|
+
declare const codeAnalyzerTools: (ToolDefinition<unknown, {
|
|
1973
|
+
filePath: string;
|
|
1974
|
+
language: string;
|
|
1975
|
+
lines: number;
|
|
1976
|
+
functionsCount: number;
|
|
1977
|
+
classesCount: number;
|
|
1978
|
+
importsCount: number;
|
|
1979
|
+
exportsCount: number;
|
|
1980
|
+
functions: FunctionInfo[];
|
|
1981
|
+
classes: ClassInfo[];
|
|
1982
|
+
imports: ImportInfo[];
|
|
1983
|
+
exports: ExportInfo[];
|
|
1984
|
+
complexity: {
|
|
1985
|
+
cyclomatic: number;
|
|
1986
|
+
functions: number;
|
|
1987
|
+
classes: number;
|
|
1988
|
+
avgFunctionLength: number;
|
|
1989
|
+
};
|
|
1990
|
+
}> | ToolDefinition<unknown, {
|
|
1991
|
+
totalFiles: number;
|
|
1992
|
+
totalLines: number;
|
|
1993
|
+
filesByType: Record<string, number>;
|
|
1994
|
+
largestFiles: Array<{
|
|
1995
|
+
file: string;
|
|
1996
|
+
lines: number;
|
|
1997
|
+
}>;
|
|
1998
|
+
mostComplex: Array<{
|
|
1999
|
+
file: string;
|
|
2000
|
+
complexity: number;
|
|
2001
|
+
}>;
|
|
2002
|
+
}>)[];
|
|
2003
|
+
|
|
2004
|
+
/**
|
|
2005
|
+
* Optional LSP-style code intelligence tools.
|
|
2006
|
+
*
|
|
2007
|
+
* These tools do not require a persistent language server. When a language
|
|
2008
|
+
* server is unavailable, they fall back to Coco's lightweight static parsers
|
|
2009
|
+
* and repository search so the agent can still navigate code safely.
|
|
2010
|
+
*/
|
|
2011
|
+
|
|
2012
|
+
interface LspStatusOutput {
|
|
2013
|
+
languageServers: Array<{
|
|
2014
|
+
name: string;
|
|
2015
|
+
available: boolean;
|
|
2016
|
+
}>;
|
|
2017
|
+
fallbackMode: "static-analysis";
|
|
2018
|
+
}
|
|
2019
|
+
interface LspSymbol {
|
|
2020
|
+
file: string;
|
|
2021
|
+
name: string;
|
|
2022
|
+
type: DefinitionType;
|
|
2023
|
+
line: number;
|
|
2024
|
+
exported: boolean;
|
|
2025
|
+
signature?: string;
|
|
2026
|
+
}
|
|
2027
|
+
interface LspReference {
|
|
2028
|
+
file: string;
|
|
2029
|
+
line: number;
|
|
2030
|
+
column: number;
|
|
2031
|
+
content: string;
|
|
2032
|
+
}
|
|
2033
|
+
declare const lspStatusTool: ToolDefinition<Record<string, never>, LspStatusOutput>;
|
|
2034
|
+
declare const lspDocumentSymbolsTool: ToolDefinition<{
|
|
2035
|
+
file: string;
|
|
2036
|
+
}, {
|
|
2037
|
+
symbols: LspSymbol[];
|
|
2038
|
+
}>;
|
|
2039
|
+
declare const lspWorkspaceSymbolsTool: ToolDefinition<{
|
|
2040
|
+
query: string;
|
|
2041
|
+
path?: string;
|
|
2042
|
+
maxFiles?: number;
|
|
2043
|
+
maxResults?: number;
|
|
2044
|
+
}, {
|
|
2045
|
+
symbols: LspSymbol[];
|
|
2046
|
+
searchedFiles: number;
|
|
2047
|
+
truncated: boolean;
|
|
2048
|
+
}>;
|
|
2049
|
+
declare const lspDefinitionTool: ToolDefinition<{
|
|
2050
|
+
symbol: string;
|
|
2051
|
+
path?: string;
|
|
2052
|
+
maxFiles?: number;
|
|
2053
|
+
}, {
|
|
2054
|
+
definition?: LspSymbol;
|
|
2055
|
+
candidates: LspSymbol[];
|
|
2056
|
+
}>;
|
|
2057
|
+
declare const lspReferencesTool: ToolDefinition<{
|
|
2058
|
+
symbol: string;
|
|
2059
|
+
path?: string;
|
|
2060
|
+
maxFiles?: number;
|
|
2061
|
+
maxResults?: number;
|
|
2062
|
+
}, {
|
|
2063
|
+
references: LspReference[];
|
|
2064
|
+
searchedFiles: number;
|
|
2065
|
+
truncated: boolean;
|
|
2066
|
+
}>;
|
|
2067
|
+
declare const lspTools: (ToolDefinition<Record<string, never>, LspStatusOutput> | ToolDefinition<{
|
|
2068
|
+
file: string;
|
|
2069
|
+
}, {
|
|
2070
|
+
symbols: LspSymbol[];
|
|
2071
|
+
}> | ToolDefinition<{
|
|
2072
|
+
query: string;
|
|
2073
|
+
path?: string;
|
|
2074
|
+
maxFiles?: number;
|
|
2075
|
+
maxResults?: number;
|
|
2076
|
+
}, {
|
|
2077
|
+
symbols: LspSymbol[];
|
|
2078
|
+
searchedFiles: number;
|
|
2079
|
+
truncated: boolean;
|
|
2080
|
+
}> | ToolDefinition<{
|
|
2081
|
+
symbol: string;
|
|
2082
|
+
path?: string;
|
|
2083
|
+
maxFiles?: number;
|
|
2084
|
+
}, {
|
|
2085
|
+
definition?: LspSymbol;
|
|
2086
|
+
candidates: LspSymbol[];
|
|
2087
|
+
}> | ToolDefinition<{
|
|
2088
|
+
symbol: string;
|
|
2089
|
+
path?: string;
|
|
2090
|
+
maxFiles?: number;
|
|
2091
|
+
maxResults?: number;
|
|
2092
|
+
}, {
|
|
2093
|
+
references: LspReference[];
|
|
2094
|
+
searchedFiles: number;
|
|
2095
|
+
truncated: boolean;
|
|
2096
|
+
}>)[];
|
|
2097
|
+
|
|
2098
|
+
/**
|
|
2099
|
+
* Repo intelligence graph and ranked context retrieval.
|
|
2100
|
+
*
|
|
2101
|
+
* This builds on codebase_map and adds a lightweight, cacheable ranking layer
|
|
2102
|
+
* for agent context selection.
|
|
2103
|
+
*/
|
|
2104
|
+
|
|
2105
|
+
interface RepoGraphNode extends FileMapEntry {
|
|
2106
|
+
inboundImports: number;
|
|
2107
|
+
testRelated: boolean;
|
|
2108
|
+
}
|
|
2109
|
+
interface RepoIntelligenceGraph {
|
|
2110
|
+
root: string;
|
|
2111
|
+
generatedAt: string;
|
|
2112
|
+
files: RepoGraphNode[];
|
|
2113
|
+
summary: CodebaseMapOutput["summary"];
|
|
2114
|
+
}
|
|
2115
|
+
interface RepoContextRequest {
|
|
2116
|
+
path?: string;
|
|
2117
|
+
query: string;
|
|
2118
|
+
budget?: number;
|
|
2119
|
+
mode?: "ask" | "plan" | "build" | "debug" | "review" | "architect";
|
|
2120
|
+
changedFiles?: string[];
|
|
2121
|
+
refresh?: boolean;
|
|
2122
|
+
}
|
|
2123
|
+
interface RankedContextItem {
|
|
2124
|
+
path: string;
|
|
2125
|
+
score: number;
|
|
2126
|
+
reasons: string[];
|
|
2127
|
+
language: string;
|
|
2128
|
+
lineCount: number;
|
|
2129
|
+
definitions: FileMapEntry["definitions"];
|
|
2130
|
+
imports: string[];
|
|
2131
|
+
exports: string[];
|
|
2132
|
+
}
|
|
2133
|
+
interface RepoContextResult {
|
|
2134
|
+
graph: {
|
|
2135
|
+
root: string;
|
|
2136
|
+
generatedAt: string;
|
|
2137
|
+
totalFiles: number;
|
|
2138
|
+
totalDefinitions: number;
|
|
2139
|
+
};
|
|
2140
|
+
query: string;
|
|
2141
|
+
budget: number;
|
|
2142
|
+
items: RankedContextItem[];
|
|
2143
|
+
}
|
|
2144
|
+
declare function getRepoContext(request: RepoContextRequest): Promise<RepoContextResult>;
|
|
2145
|
+
declare function repoContext(request: RepoContextRequest): Promise<RepoContextResult>;
|
|
2146
|
+
declare const repoContextTool: ToolDefinition<RepoContextRequest, RepoContextResult>;
|
|
2147
|
+
declare const repoIntelligenceTools: ToolDefinition<RepoContextRequest, RepoContextResult>[];
|
|
2148
|
+
|
|
2149
|
+
/**
|
|
2150
|
+
* Subagent types for Corbat-Coco
|
|
2151
|
+
* Defines the types for specialized agents that can be spawned for different tasks
|
|
2152
|
+
*/
|
|
2153
|
+
|
|
2154
|
+
/**
|
|
2155
|
+
* Available agent types for specialized tasks
|
|
2156
|
+
*/
|
|
2157
|
+
type AgentType = "explore" | "plan" | "test" | "debug" | "review" | "architect" | "security" | "tdd" | "refactor" | "e2e" | "docs" | "database";
|
|
2158
|
+
|
|
2159
|
+
/**
|
|
2160
|
+
* Agent task with priority and dependencies
|
|
2161
|
+
*/
|
|
2162
|
+
interface AgentTask {
|
|
2163
|
+
id: string;
|
|
2164
|
+
description: string;
|
|
2165
|
+
priority: "high" | "medium" | "low";
|
|
2166
|
+
estimatedDuration: number;
|
|
2167
|
+
dependencies: string[];
|
|
2168
|
+
status: "pending" | "running" | "completed" | "failed";
|
|
2169
|
+
result?: unknown;
|
|
2170
|
+
error?: string;
|
|
2171
|
+
}
|
|
2172
|
+
/**
|
|
2173
|
+
* Execution strategy for multiple agents
|
|
2174
|
+
*/
|
|
2175
|
+
type ExecutionStrategy = "parallel" | "sequential" | "priority-based" | "pipeline";
|
|
2176
|
+
/**
|
|
2177
|
+
* Tool: Create agent coordination plan
|
|
2178
|
+
*/
|
|
2179
|
+
declare const createAgentPlanTool: ToolDefinition<unknown, {
|
|
2180
|
+
planId: string;
|
|
2181
|
+
strategy: ExecutionStrategy;
|
|
2182
|
+
totalTasks: number;
|
|
2183
|
+
executionOrder: string[];
|
|
2184
|
+
estimatedTime: number;
|
|
2185
|
+
maxParallelism: number;
|
|
2186
|
+
unresolvedDependencies: {
|
|
2187
|
+
taskId: string;
|
|
2188
|
+
dependency: string;
|
|
2189
|
+
}[];
|
|
2190
|
+
tasks: {
|
|
2191
|
+
id: string;
|
|
2192
|
+
description: string;
|
|
2193
|
+
priority: "high" | "medium" | "low";
|
|
2194
|
+
dependencies: string[];
|
|
2195
|
+
status: "pending" | "completed" | "failed" | "running";
|
|
2196
|
+
}[];
|
|
2197
|
+
}>;
|
|
2198
|
+
/**
|
|
2199
|
+
* Tool: Delegate task to specialized sub-agent via AgentManager
|
|
2200
|
+
*/
|
|
2201
|
+
declare const delegateTaskTool: ToolDefinition<unknown, {
|
|
2202
|
+
agentId: string;
|
|
2203
|
+
taskId: string;
|
|
2204
|
+
agentType: AgentType;
|
|
2205
|
+
status: string;
|
|
2206
|
+
message: string;
|
|
2207
|
+
success: boolean;
|
|
2208
|
+
output?: undefined;
|
|
2209
|
+
usage?: undefined;
|
|
2210
|
+
duration?: undefined;
|
|
2211
|
+
} | {
|
|
2212
|
+
agentId: string;
|
|
2213
|
+
taskId: string;
|
|
2214
|
+
agentType: AgentType;
|
|
2215
|
+
status: string;
|
|
2216
|
+
output: string;
|
|
2217
|
+
success: boolean;
|
|
2218
|
+
usage: {
|
|
2219
|
+
inputTokens: number;
|
|
2220
|
+
outputTokens: number;
|
|
2221
|
+
} | undefined;
|
|
2222
|
+
duration: number;
|
|
2223
|
+
message?: undefined;
|
|
2224
|
+
}>;
|
|
2225
|
+
/**
|
|
2226
|
+
* Tool: Aggregate results from multiple agents
|
|
2227
|
+
*/
|
|
2228
|
+
declare const aggregateResultsTool: ToolDefinition<unknown, {
|
|
2229
|
+
totalResults: number;
|
|
2230
|
+
completedCount: number;
|
|
2231
|
+
failedCount: number;
|
|
2232
|
+
strategy: string;
|
|
2233
|
+
aggregatedOutput: string;
|
|
2234
|
+
individualResults: {
|
|
2235
|
+
agentId: string;
|
|
2236
|
+
taskId: string;
|
|
2237
|
+
status: "completed" | "failed";
|
|
2238
|
+
}[];
|
|
2239
|
+
}>;
|
|
2240
|
+
declare const agentCoordinatorTools: (ToolDefinition<unknown, {
|
|
2241
|
+
planId: string;
|
|
2242
|
+
strategy: ExecutionStrategy;
|
|
2243
|
+
totalTasks: number;
|
|
2244
|
+
executionOrder: string[];
|
|
2245
|
+
estimatedTime: number;
|
|
2246
|
+
maxParallelism: number;
|
|
2247
|
+
unresolvedDependencies: {
|
|
2248
|
+
taskId: string;
|
|
2249
|
+
dependency: string;
|
|
2250
|
+
}[];
|
|
2251
|
+
tasks: {
|
|
2252
|
+
id: string;
|
|
2253
|
+
description: string;
|
|
2254
|
+
priority: "high" | "medium" | "low";
|
|
2255
|
+
dependencies: string[];
|
|
2256
|
+
status: "pending" | "completed" | "failed" | "running";
|
|
2257
|
+
}[];
|
|
2258
|
+
}> | ToolDefinition<unknown, {
|
|
2259
|
+
agentId: string;
|
|
2260
|
+
taskId: string;
|
|
2261
|
+
agentType: AgentType;
|
|
2262
|
+
status: string;
|
|
2263
|
+
message: string;
|
|
2264
|
+
success: boolean;
|
|
2265
|
+
output?: undefined;
|
|
2266
|
+
usage?: undefined;
|
|
2267
|
+
duration?: undefined;
|
|
2268
|
+
} | {
|
|
2269
|
+
agentId: string;
|
|
2270
|
+
taskId: string;
|
|
2271
|
+
agentType: AgentType;
|
|
2272
|
+
status: string;
|
|
2273
|
+
output: string;
|
|
2274
|
+
success: boolean;
|
|
2275
|
+
usage: {
|
|
2276
|
+
inputTokens: number;
|
|
2277
|
+
outputTokens: number;
|
|
2278
|
+
} | undefined;
|
|
2279
|
+
duration: number;
|
|
2280
|
+
message?: undefined;
|
|
2281
|
+
}> | ToolDefinition<unknown, {
|
|
2282
|
+
totalResults: number;
|
|
2283
|
+
completedCount: number;
|
|
2284
|
+
failedCount: number;
|
|
2285
|
+
strategy: string;
|
|
2286
|
+
aggregatedOutput: string;
|
|
2287
|
+
individualResults: {
|
|
2288
|
+
agentId: string;
|
|
2289
|
+
taskId: string;
|
|
2290
|
+
status: "completed" | "failed";
|
|
2291
|
+
}[];
|
|
2292
|
+
}>)[];
|
|
2293
|
+
|
|
2294
|
+
interface CodeSuggestion {
|
|
2295
|
+
type: "refactor" | "performance" | "security" | "readability" | "testing";
|
|
2296
|
+
line: number;
|
|
2297
|
+
severity: "high" | "medium" | "low";
|
|
2298
|
+
message: string;
|
|
2299
|
+
suggestion: string;
|
|
2300
|
+
reasoning: string;
|
|
2301
|
+
}
|
|
2302
|
+
/**
|
|
2303
|
+
* Tool: Get smart improvement suggestions for code
|
|
2304
|
+
*/
|
|
2305
|
+
declare const suggestImprovementsTool: ToolDefinition<unknown, {
|
|
2306
|
+
filePath: string;
|
|
2307
|
+
totalSuggestions: number;
|
|
2308
|
+
bySeverity: {
|
|
2309
|
+
high: number;
|
|
2310
|
+
medium: number;
|
|
2311
|
+
low: number;
|
|
2312
|
+
};
|
|
2313
|
+
byType: {
|
|
2314
|
+
refactor: number;
|
|
2315
|
+
performance: number;
|
|
2316
|
+
security: number;
|
|
2317
|
+
readability: number;
|
|
2318
|
+
testing: number;
|
|
2319
|
+
};
|
|
2320
|
+
suggestions: CodeSuggestion[];
|
|
2321
|
+
}>;
|
|
2322
|
+
/**
|
|
2323
|
+
* Tool: Get code quality score
|
|
2324
|
+
*/
|
|
2325
|
+
declare const calculateCodeScoreTool: ToolDefinition<unknown, {
|
|
2326
|
+
filePath: string;
|
|
2327
|
+
score: number;
|
|
2328
|
+
grade: string;
|
|
2329
|
+
lines: number;
|
|
2330
|
+
nonEmptyLines: number;
|
|
2331
|
+
issues: {
|
|
2332
|
+
high: number;
|
|
2333
|
+
medium: number;
|
|
2334
|
+
low: number;
|
|
2335
|
+
total: number;
|
|
2336
|
+
};
|
|
2337
|
+
recommendations: string[];
|
|
2338
|
+
}>;
|
|
2339
|
+
declare const smartSuggestionsTools: (ToolDefinition<unknown, {
|
|
2340
|
+
filePath: string;
|
|
2341
|
+
totalSuggestions: number;
|
|
2342
|
+
bySeverity: {
|
|
2343
|
+
high: number;
|
|
2344
|
+
medium: number;
|
|
2345
|
+
low: number;
|
|
2346
|
+
};
|
|
2347
|
+
byType: {
|
|
2348
|
+
refactor: number;
|
|
2349
|
+
performance: number;
|
|
2350
|
+
security: number;
|
|
2351
|
+
readability: number;
|
|
2352
|
+
testing: number;
|
|
2353
|
+
};
|
|
2354
|
+
suggestions: CodeSuggestion[];
|
|
2355
|
+
}> | ToolDefinition<unknown, {
|
|
2356
|
+
filePath: string;
|
|
2357
|
+
score: number;
|
|
2358
|
+
grade: string;
|
|
2359
|
+
lines: number;
|
|
2360
|
+
nonEmptyLines: number;
|
|
2361
|
+
issues: {
|
|
2362
|
+
high: number;
|
|
2363
|
+
medium: number;
|
|
2364
|
+
low: number;
|
|
2365
|
+
total: number;
|
|
2366
|
+
};
|
|
2367
|
+
recommendations: string[];
|
|
2368
|
+
}>)[];
|
|
2369
|
+
|
|
2370
|
+
/**
|
|
2371
|
+
* Context Enhancement Tool
|
|
2372
|
+
* Intelligent context loading and session-level learning
|
|
2373
|
+
*/
|
|
2374
|
+
interface ContextItem {
|
|
2375
|
+
type: "file" | "conversation" | "decision" | "pattern";
|
|
2376
|
+
content: string;
|
|
2377
|
+
timestamp: number;
|
|
2378
|
+
relevance: number;
|
|
2379
|
+
tags: string[];
|
|
2380
|
+
}
|
|
2381
|
+
interface LearningEntry {
|
|
2382
|
+
pattern: string;
|
|
2383
|
+
userPreference: string;
|
|
2384
|
+
frequency: number;
|
|
2385
|
+
lastUsed: number;
|
|
2386
|
+
}
|
|
2387
|
+
/**
|
|
2388
|
+
* Tool: Add context to session memory
|
|
2389
|
+
*/
|
|
2390
|
+
declare const addContextTool: ToolDefinition<unknown, {
|
|
2391
|
+
contextId: string;
|
|
2392
|
+
type: "decision" | "conversation" | "file" | "pattern";
|
|
2393
|
+
stored: boolean;
|
|
2394
|
+
message: string;
|
|
2395
|
+
}>;
|
|
2396
|
+
/**
|
|
2397
|
+
* Tool: Retrieve relevant context
|
|
2398
|
+
*/
|
|
2399
|
+
declare const getRelevantContextTool: ToolDefinition<unknown, {
|
|
2400
|
+
query: string;
|
|
2401
|
+
resultsFound: number;
|
|
2402
|
+
contexts: {
|
|
2403
|
+
type: "decision" | "conversation" | "file" | "pattern";
|
|
2404
|
+
content: string;
|
|
2405
|
+
tags: string[];
|
|
2406
|
+
timestamp: string;
|
|
2407
|
+
}[];
|
|
2408
|
+
}>;
|
|
2409
|
+
/**
|
|
2410
|
+
* Tool: Record user preference/learning
|
|
2411
|
+
*/
|
|
2412
|
+
declare const recordLearningTool: ToolDefinition<unknown, {
|
|
2413
|
+
pattern: string;
|
|
2414
|
+
preference: string;
|
|
2415
|
+
frequency: number;
|
|
2416
|
+
message: string;
|
|
2417
|
+
}>;
|
|
2418
|
+
/**
|
|
2419
|
+
* Tool: Get learned patterns
|
|
2420
|
+
*/
|
|
2421
|
+
declare const getLearnedPatternsTool: ToolDefinition<unknown, {
|
|
2422
|
+
totalPatterns: number;
|
|
2423
|
+
patterns: {
|
|
2424
|
+
pattern: string;
|
|
2425
|
+
preference: string;
|
|
2426
|
+
frequency: number;
|
|
2427
|
+
lastUsed: string;
|
|
2428
|
+
}[];
|
|
2429
|
+
}>;
|
|
2430
|
+
declare const contextEnhancerTools: (ToolDefinition<unknown, {
|
|
2431
|
+
contextId: string;
|
|
2432
|
+
type: "decision" | "conversation" | "file" | "pattern";
|
|
2433
|
+
stored: boolean;
|
|
2434
|
+
message: string;
|
|
2435
|
+
}> | ToolDefinition<unknown, {
|
|
2436
|
+
query: string;
|
|
2437
|
+
resultsFound: number;
|
|
2438
|
+
contexts: {
|
|
2439
|
+
type: "decision" | "conversation" | "file" | "pattern";
|
|
2440
|
+
content: string;
|
|
2441
|
+
tags: string[];
|
|
2442
|
+
timestamp: string;
|
|
2443
|
+
}[];
|
|
2444
|
+
}> | ToolDefinition<unknown, {
|
|
2445
|
+
pattern: string;
|
|
2446
|
+
preference: string;
|
|
2447
|
+
frequency: number;
|
|
2448
|
+
message: string;
|
|
2449
|
+
}> | ToolDefinition<unknown, {
|
|
2450
|
+
totalPatterns: number;
|
|
2451
|
+
patterns: {
|
|
2452
|
+
pattern: string;
|
|
2453
|
+
preference: string;
|
|
2454
|
+
frequency: number;
|
|
2455
|
+
lastUsed: string;
|
|
2456
|
+
}[];
|
|
2457
|
+
}>)[];
|
|
2458
|
+
|
|
2459
|
+
/**
|
|
2460
|
+
* Skill Enhancement Tool
|
|
2461
|
+
* Dynamic skill loading and custom tool creation
|
|
2462
|
+
*/
|
|
2463
|
+
interface SkillDefinition {
|
|
2464
|
+
name: string;
|
|
2465
|
+
description: string;
|
|
2466
|
+
category: string;
|
|
2467
|
+
handler: string;
|
|
2468
|
+
parameters: Record<string, unknown>;
|
|
2469
|
+
}
|
|
2470
|
+
/**
|
|
2471
|
+
* Tool: Discover available skills
|
|
2472
|
+
*/
|
|
2473
|
+
declare const discoverSkillsTool: ToolDefinition<unknown, {
|
|
2474
|
+
skillsDir: string;
|
|
2475
|
+
totalSkills: number;
|
|
2476
|
+
skills: {
|
|
2477
|
+
name: string;
|
|
2478
|
+
description: string;
|
|
2479
|
+
version: string;
|
|
2480
|
+
dependencies: string[];
|
|
2481
|
+
}[];
|
|
2482
|
+
}>;
|
|
2483
|
+
/**
|
|
2484
|
+
* Tool: Validate skill definition
|
|
2485
|
+
*/
|
|
2486
|
+
declare const validateSkillTool: ToolDefinition<unknown, {
|
|
2487
|
+
valid: boolean;
|
|
2488
|
+
errors: string[];
|
|
2489
|
+
message: string;
|
|
2490
|
+
}>;
|
|
2491
|
+
/**
|
|
2492
|
+
* Tool: Create custom tool from template
|
|
2493
|
+
*/
|
|
2494
|
+
declare const createCustomToolTool: ToolDefinition<unknown, {
|
|
2495
|
+
name: string;
|
|
2496
|
+
template: string;
|
|
2497
|
+
code: string;
|
|
2498
|
+
instructions: string[];
|
|
2499
|
+
}>;
|
|
2500
|
+
declare const skillEnhancerTools: (ToolDefinition<unknown, {
|
|
2501
|
+
skillsDir: string;
|
|
2502
|
+
totalSkills: number;
|
|
2503
|
+
skills: {
|
|
2504
|
+
name: string;
|
|
2505
|
+
description: string;
|
|
2506
|
+
version: string;
|
|
2507
|
+
dependencies: string[];
|
|
2508
|
+
}[];
|
|
2509
|
+
}> | ToolDefinition<unknown, {
|
|
2510
|
+
valid: boolean;
|
|
2511
|
+
errors: string[];
|
|
2512
|
+
message: string;
|
|
2513
|
+
}> | ToolDefinition<unknown, {
|
|
2514
|
+
name: string;
|
|
2515
|
+
template: string;
|
|
2516
|
+
code: string;
|
|
2517
|
+
instructions: string[];
|
|
2518
|
+
}>)[];
|
|
2519
|
+
|
|
2520
|
+
/**
|
|
2521
|
+
* Tool: Analyze repository health
|
|
2522
|
+
*/
|
|
2523
|
+
declare const analyzeRepoHealthTool: ToolDefinition<unknown, {
|
|
2524
|
+
score: number;
|
|
2525
|
+
grade: string;
|
|
2526
|
+
issues: string[];
|
|
2527
|
+
recommendations: string[];
|
|
2528
|
+
message: string;
|
|
2529
|
+
}>;
|
|
2530
|
+
/**
|
|
2531
|
+
* Tool: Get commit statistics
|
|
2532
|
+
*/
|
|
2533
|
+
declare const getCommitStatsTool: ToolDefinition<unknown, {
|
|
2534
|
+
totalCommits: number;
|
|
2535
|
+
authorCount: number;
|
|
2536
|
+
authors: string[];
|
|
2537
|
+
recentActivity: string;
|
|
2538
|
+
active: boolean;
|
|
2539
|
+
}>;
|
|
2540
|
+
/**
|
|
2541
|
+
* Tool: Smart branch recommendation
|
|
2542
|
+
*/
|
|
2543
|
+
declare const recommendBranchTool: ToolDefinition<unknown, {
|
|
2544
|
+
recommendedBranch: string;
|
|
2545
|
+
prefix: string;
|
|
2546
|
+
exists: boolean;
|
|
2547
|
+
command: string;
|
|
2548
|
+
warning: string | undefined;
|
|
2549
|
+
}>;
|
|
2550
|
+
declare const gitEnhancedTools: (ToolDefinition<unknown, {
|
|
2551
|
+
score: number;
|
|
2552
|
+
grade: string;
|
|
2553
|
+
issues: string[];
|
|
2554
|
+
recommendations: string[];
|
|
2555
|
+
message: string;
|
|
2556
|
+
}> | ToolDefinition<unknown, {
|
|
2557
|
+
totalCommits: number;
|
|
2558
|
+
authorCount: number;
|
|
2559
|
+
authors: string[];
|
|
2560
|
+
recentActivity: string;
|
|
2561
|
+
active: boolean;
|
|
2562
|
+
}> | ToolDefinition<unknown, {
|
|
2563
|
+
recommendedBranch: string;
|
|
2564
|
+
prefix: string;
|
|
2565
|
+
exists: boolean;
|
|
2566
|
+
command: string;
|
|
2567
|
+
warning: string | undefined;
|
|
2568
|
+
}>)[];
|
|
2569
|
+
|
|
2570
|
+
/**
|
|
2571
|
+
* GitHub CLI Tools for Corbat-Coco
|
|
2572
|
+
*
|
|
2573
|
+
* Wraps the `gh` CLI to provide structured access to
|
|
2574
|
+
* GitHub operations: PRs, releases, checks, repo info.
|
|
2575
|
+
*/
|
|
2576
|
+
|
|
2577
|
+
declare const ghCheckAuthTool: ToolDefinition<{
|
|
2578
|
+
cwd?: string;
|
|
2579
|
+
}, {
|
|
2580
|
+
authenticated: boolean;
|
|
2581
|
+
user?: string;
|
|
2582
|
+
error?: string;
|
|
2583
|
+
}>;
|
|
2584
|
+
declare const ghRepoInfoTool: ToolDefinition<{
|
|
2585
|
+
cwd?: string;
|
|
2586
|
+
}, {
|
|
2587
|
+
name: string;
|
|
2588
|
+
fullName: string;
|
|
2589
|
+
defaultBranch: string;
|
|
2590
|
+
url: string;
|
|
2591
|
+
private: boolean;
|
|
2592
|
+
}>;
|
|
2593
|
+
declare const ghPrCreateTool: ToolDefinition<{
|
|
2594
|
+
title: string;
|
|
2595
|
+
body: string;
|
|
2596
|
+
base?: string;
|
|
2597
|
+
draft?: boolean;
|
|
2598
|
+
cwd?: string;
|
|
2599
|
+
}, {
|
|
2600
|
+
number: number;
|
|
2601
|
+
url: string;
|
|
2602
|
+
}>;
|
|
2603
|
+
declare const ghPrMergeTool: ToolDefinition<{
|
|
2604
|
+
number: number;
|
|
2605
|
+
method?: "squash" | "merge" | "rebase";
|
|
2606
|
+
deleteBranch?: boolean;
|
|
2607
|
+
subject?: string;
|
|
2608
|
+
body?: string;
|
|
2609
|
+
cwd?: string;
|
|
2610
|
+
}, {
|
|
2611
|
+
merged: boolean;
|
|
2612
|
+
method: string;
|
|
2613
|
+
}>;
|
|
2614
|
+
interface PRCheck {
|
|
2615
|
+
name: string;
|
|
2616
|
+
status: "pass" | "fail" | "pending" | "skipping";
|
|
2617
|
+
conclusion: string;
|
|
2618
|
+
url: string;
|
|
2619
|
+
}
|
|
2620
|
+
declare const ghPrChecksTool: ToolDefinition<{
|
|
2621
|
+
number: number;
|
|
2622
|
+
cwd?: string;
|
|
2623
|
+
}, {
|
|
2624
|
+
checks: PRCheck[];
|
|
2625
|
+
allPassed: boolean;
|
|
2626
|
+
anyFailed: boolean;
|
|
2627
|
+
anyPending: boolean;
|
|
2628
|
+
}>;
|
|
2629
|
+
declare const ghPrListTool: ToolDefinition<{
|
|
2630
|
+
head?: string;
|
|
2631
|
+
state?: string;
|
|
2632
|
+
cwd?: string;
|
|
2633
|
+
}, {
|
|
2634
|
+
prs: Array<{
|
|
2635
|
+
number: number;
|
|
2636
|
+
title: string;
|
|
2637
|
+
url: string;
|
|
2638
|
+
state: string;
|
|
2639
|
+
}>;
|
|
2640
|
+
}>;
|
|
2641
|
+
declare const ghReleaseCreateTool: ToolDefinition<{
|
|
2642
|
+
tag: string;
|
|
2643
|
+
title?: string;
|
|
2644
|
+
notes?: string;
|
|
2645
|
+
draft?: boolean;
|
|
2646
|
+
prerelease?: boolean;
|
|
2647
|
+
cwd?: string;
|
|
2648
|
+
}, {
|
|
2649
|
+
url: string;
|
|
2650
|
+
tag: string;
|
|
2651
|
+
}>;
|
|
2652
|
+
declare const githubTools: (ToolDefinition<{
|
|
2653
|
+
cwd?: string;
|
|
2654
|
+
}, {
|
|
2655
|
+
authenticated: boolean;
|
|
2656
|
+
user?: string;
|
|
2657
|
+
error?: string;
|
|
2658
|
+
}> | ToolDefinition<{
|
|
2659
|
+
cwd?: string;
|
|
2660
|
+
}, {
|
|
2661
|
+
name: string;
|
|
2662
|
+
fullName: string;
|
|
2663
|
+
defaultBranch: string;
|
|
2664
|
+
url: string;
|
|
2665
|
+
private: boolean;
|
|
2666
|
+
}> | ToolDefinition<{
|
|
2667
|
+
title: string;
|
|
2668
|
+
body: string;
|
|
2669
|
+
base?: string;
|
|
2670
|
+
draft?: boolean;
|
|
2671
|
+
cwd?: string;
|
|
2672
|
+
}, {
|
|
2673
|
+
number: number;
|
|
2674
|
+
url: string;
|
|
2675
|
+
}> | ToolDefinition<{
|
|
2676
|
+
number: number;
|
|
2677
|
+
method?: "squash" | "merge" | "rebase";
|
|
2678
|
+
deleteBranch?: boolean;
|
|
2679
|
+
subject?: string;
|
|
2680
|
+
body?: string;
|
|
2681
|
+
cwd?: string;
|
|
2682
|
+
}, {
|
|
2683
|
+
merged: boolean;
|
|
2684
|
+
method: string;
|
|
2685
|
+
}> | ToolDefinition<{
|
|
2686
|
+
number: number;
|
|
2687
|
+
cwd?: string;
|
|
2688
|
+
}, {
|
|
2689
|
+
checks: PRCheck[];
|
|
2690
|
+
allPassed: boolean;
|
|
2691
|
+
anyFailed: boolean;
|
|
2692
|
+
anyPending: boolean;
|
|
2693
|
+
}> | ToolDefinition<{
|
|
2694
|
+
head?: string;
|
|
2695
|
+
state?: string;
|
|
2696
|
+
cwd?: string;
|
|
2697
|
+
}, {
|
|
2698
|
+
prs: Array<{
|
|
2699
|
+
number: number;
|
|
2700
|
+
title: string;
|
|
2701
|
+
url: string;
|
|
2702
|
+
state: string;
|
|
2703
|
+
}>;
|
|
2704
|
+
}> | ToolDefinition<{
|
|
2705
|
+
tag: string;
|
|
2706
|
+
title?: string;
|
|
2707
|
+
notes?: string;
|
|
2708
|
+
draft?: boolean;
|
|
2709
|
+
prerelease?: boolean;
|
|
2710
|
+
cwd?: string;
|
|
2711
|
+
}, {
|
|
2712
|
+
url: string;
|
|
2713
|
+
tag: string;
|
|
2714
|
+
}>)[];
|
|
2715
|
+
|
|
2716
|
+
/**
|
|
2717
|
+
* Open / Execute tool for Corbat-Coco
|
|
2718
|
+
*
|
|
2719
|
+
* Opens files with the system default application or executes
|
|
2720
|
+
* scripts and binaries with the appropriate interpreter.
|
|
2721
|
+
*
|
|
2722
|
+
* Open mode: delegates to the OS (macOS `open`, Linux `xdg-open`)
|
|
2723
|
+
* Exec mode: detects interpreter from extension or +x permissions
|
|
2724
|
+
*/
|
|
2725
|
+
|
|
2726
|
+
interface OpenFileOutput {
|
|
2727
|
+
action: "opened" | "executed";
|
|
2728
|
+
path: string;
|
|
2729
|
+
resolvedCommand: string;
|
|
2730
|
+
stdout?: string;
|
|
2731
|
+
stderr?: string;
|
|
2732
|
+
exitCode?: number;
|
|
2733
|
+
duration: number;
|
|
2734
|
+
}
|
|
2735
|
+
declare const openFileTool: ToolDefinition<{
|
|
2736
|
+
path: string;
|
|
2737
|
+
mode?: "open" | "exec";
|
|
2738
|
+
args?: string[];
|
|
2739
|
+
cwd?: string;
|
|
2740
|
+
timeout?: number;
|
|
2741
|
+
}, OpenFileOutput>;
|
|
2742
|
+
declare const openTools: ToolDefinition<{
|
|
2743
|
+
path: string;
|
|
2744
|
+
mode?: "open" | "exec";
|
|
2745
|
+
args?: string[];
|
|
2746
|
+
cwd?: string;
|
|
2747
|
+
timeout?: number;
|
|
2748
|
+
}, OpenFileOutput>[];
|
|
2749
|
+
|
|
2750
|
+
/**
|
|
2751
|
+
* MCP inspection tools
|
|
2752
|
+
*/
|
|
2753
|
+
|
|
2754
|
+
interface MCPFleetServerStatus {
|
|
2755
|
+
name: string;
|
|
2756
|
+
transport: "stdio" | "http" | "sse";
|
|
2757
|
+
enabled: boolean;
|
|
2758
|
+
connected: boolean;
|
|
2759
|
+
healthy: boolean;
|
|
2760
|
+
toolCount: number;
|
|
2761
|
+
tools?: string[];
|
|
2762
|
+
}
|
|
2763
|
+
interface MCPFleetStatus {
|
|
2764
|
+
configuredCount: number;
|
|
2765
|
+
connectedCount: number;
|
|
2766
|
+
servers: MCPFleetServerStatus[];
|
|
2767
|
+
}
|
|
2768
|
+
interface MCPConnectServerResult {
|
|
2769
|
+
requestedServer: string;
|
|
2770
|
+
connected: boolean;
|
|
2771
|
+
healthy: boolean;
|
|
2772
|
+
toolCount: number;
|
|
2773
|
+
tools?: string[];
|
|
2774
|
+
authTriggered: boolean;
|
|
2775
|
+
message: string;
|
|
2776
|
+
}
|
|
2777
|
+
declare const mcpListServersTool: ToolDefinition<{
|
|
2778
|
+
includeDisabled?: boolean;
|
|
2779
|
+
includeTools?: boolean;
|
|
2780
|
+
projectPath?: string;
|
|
2781
|
+
}, MCPFleetStatus>;
|
|
2782
|
+
declare const mcpConnectServerTool: ToolDefinition<{
|
|
2783
|
+
server: string;
|
|
2784
|
+
includeTools?: boolean;
|
|
2785
|
+
projectPath?: string;
|
|
2786
|
+
}, MCPConnectServerResult>;
|
|
2787
|
+
declare const mcpTools: (ToolDefinition<{
|
|
2788
|
+
includeDisabled?: boolean;
|
|
2789
|
+
includeTools?: boolean;
|
|
2790
|
+
projectPath?: string;
|
|
2791
|
+
}, MCPFleetStatus> | ToolDefinition<{
|
|
2792
|
+
server: string;
|
|
2793
|
+
includeTools?: boolean;
|
|
2794
|
+
projectPath?: string;
|
|
2795
|
+
}, MCPConnectServerResult>)[];
|
|
2796
|
+
|
|
2797
|
+
/**
|
|
2798
|
+
* Tool exports for Corbat-Coco
|
|
2799
|
+
*/
|
|
2800
|
+
|
|
2801
|
+
declare function registerAllTools(registry: ToolRegistry): void;
|
|
2802
|
+
/**
|
|
2803
|
+
* Create a registry with all tools registered
|
|
2804
|
+
*/
|
|
2805
|
+
declare function createFullToolRegistry(): ToolRegistry;
|
|
2806
|
+
|
|
2807
|
+
export { type SearchMatch as $, type AgentTask as A, type BuildResult as B, type Checkpoint as C, type DefinitionType as D, type ExecutionStrategy as E, type FileComplexity as F, type PackageManager as G, type HttpResponse as H, type ImageReadOutput as I, type PdfReadOutput as J, type RepoContextRequest as K, type LearningEntry as L, type MCPConnectServerResult as M, type RepoContextResult as N, type OpenFileOutput as O, type PRCheck as P, type QualityScores as Q, type RankedContextItem as R, type RepoGraphNode as S, type RepoIntelligenceGraph as T, type ReviewCategory as U, type ReviewFinding as V, type ReviewResult as W, type ReviewSeverity as X, type ReviewSummary as Y, type RiskLevel as Z, type SchemaInspectOutput as _, type QualityDimensions as a, ghPrMergeTool as a$, type SearchResult as a0, type SemanticSearchOutput as a1, type SemanticSearchResultItem as a2, type SkillDefinition as a3, type SqlQueryOutput as a4, type TestFailure as a5, type TestResult as a6, type ValidationResult as a7, type WebFetchOutput as a8, type WebSearchOutput as a9, createCustomToolTool as aA, createMemoryTool as aB, databaseTools as aC, delegateTaskTool as aD, deleteFileTool as aE, diagramTools as aF, diffTools as aG, discoverSkillsTool as aH, editFileTool as aI, fileExistsTool as aJ, fileTools as aK, findInFileTool as aL, findMissingImportsTool as aM, generateDiagramTool as aN, getCommitStatsTool as aO, getCoverageTool as aP, getEffectDescription as aQ, getEnvTool as aR, getLearnedPatternsTool as aS, getRelevantContextTool as aT, getRepoContext as aU, getRiskDescription as aV, getRiskLevel as aW, ghCheckAuthTool as aX, ghPrChecksTool as aY, ghPrCreateTool as aZ, ghPrListTool as a_, type WebSearchResultItem as aa, addContextTool as ab, agentCoordinatorTools as ac, aggregateResultsTool as ad, analyzeComplexityTool as ae, analyzeDirectoryTool as af, analyzeFileTool as ag, analyzeRepoHealthTool as ah, astValidatorTools as ai, bashBackgroundTool as aj, bashExecTool as ak, bashTools as al, buildTools as am, calculateCodeScoreTool as an, calculateQualityTool as ao, checkAgentCapabilityTool as ap, checkProtectedBranchTool as aq, checkpointTools as ar, codeAnalyzerTools as as, codebaseMapTool as at, codebaseMapTools as au, commandExistsTool as av, contextEnhancerTools as aw, copyFileTool as ax, createAgentPlanTool as ay, createCheckpointTool as az, type QualityThresholds as b, semanticSearchTools as b$, ghReleaseCreateTool as b0, ghRepoInfoTool as b1, gitAddTool as b2, gitBranchTool as b3, gitCheckoutTool as b4, gitCommitTool as b5, gitDiffTool as b6, gitEnhancedTools as b7, gitInitTool as b8, gitLogTool as b9, mcpListServersTool as bA, mcpTools as bB, memoryTools as bC, moveFileTool as bD, openFileTool as bE, openTools as bF, pdfTools as bG, permissionsTools as bH, qualityTools as bI, readFileTool as bJ, readImageTool as bK, readPdfTool as bL, recallMemoryTool as bM, recommendBranchTool as bN, recordLearningTool as bO, repoContext as bP, repoContextTool as bQ, repoIntelligenceTools as bR, restoreCheckpointTool as bS, reviewCodeTool as bT, reviewTools as bU, runLinterTool as bV, runScriptTool as bW, runTestFileTool as bX, runTestsTool as bY, searchTools as bZ, semanticSearchTool as b_, gitPullTool as ba, gitPushTool as bb, gitSimpleTools as bc, gitStatusTool as bd, gitTools as be, githubTools as bf, globTool as bg, grepTool as bh, httpFetchTool as bi, httpJsonTool as bj, httpTools as bk, imageTools as bl, inspectSchemaTool as bm, installDepsTool as bn, listCheckpointsTool as bo, listDirTool as bp, listMemoriesTool as bq, lspDefinitionTool as br, lspDocumentSymbolsTool as bs, lspReferencesTool as bt, lspStatusTool as bu, lspTools as bv, lspWorkspaceSymbolsTool as bw, makeTool as bx, managePermissionsTool as by, mcpConnectServerTool as bz, createFullToolRegistry as c, showDiffTool as c0, simpleAgentTools as c1, simpleAutoCommitTool as c2, skillEnhancerTools as c3, smartSuggestionsTools as c4, spawnSimpleAgentTool as c5, sqlQueryTool as c6, suggestImprovementsTool as c7, testTools as c8, treeTool as c9, tscTool as ca, validateCodeTool as cb, validateSkillTool as cc, webFetchTool as cd, webSearchTool as ce, webTools as cf, writeFileTool as cg, type ClassInfo as d, type CodeAnalysisResult as e, type CodeDefinition as f, type CodeSuggestion as g, type CodebaseMapOutput as h, type ComplexityResult as i, type ContextItem as j, type CoverageResult as k, type DiagramOutput as l, type ExportInfo as m, type FileMapEntry as n, type FunctionComplexity as o, type FunctionInfo as p, type ImportInfo as q, registerAllTools as r, type LintIssue as s, type LintResult as t, type LspReference as u, type LspStatusOutput as v, type LspSymbol as w, type MCPFleetServerStatus as x, type MCPFleetStatus as y, type Memory as z };
|