@vibescope/mcp-server 0.2.3 → 0.2.5
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/CHANGELOG.md +84 -0
- package/README.md +194 -138
- package/dist/api-client.d.ts +276 -8
- package/dist/api-client.js +123 -8
- package/dist/cli.d.ts +6 -3
- package/dist/cli.js +28 -10
- package/dist/handlers/blockers.d.ts +11 -0
- package/dist/handlers/blockers.js +37 -2
- package/dist/handlers/bodies-of-work.d.ts +2 -0
- package/dist/handlers/bodies-of-work.js +30 -1
- package/dist/handlers/connectors.js +2 -2
- package/dist/handlers/decisions.d.ts +11 -0
- package/dist/handlers/decisions.js +37 -2
- package/dist/handlers/deployment.d.ts +6 -0
- package/dist/handlers/deployment.js +33 -5
- package/dist/handlers/discovery.js +27 -11
- package/dist/handlers/fallback.js +12 -6
- package/dist/handlers/file-checkouts.d.ts +1 -0
- package/dist/handlers/file-checkouts.js +17 -2
- package/dist/handlers/findings.d.ts +5 -0
- package/dist/handlers/findings.js +19 -2
- package/dist/handlers/git-issues.js +4 -2
- package/dist/handlers/ideas.d.ts +5 -0
- package/dist/handlers/ideas.js +19 -2
- package/dist/handlers/progress.js +2 -2
- package/dist/handlers/project.d.ts +1 -0
- package/dist/handlers/project.js +35 -2
- package/dist/handlers/requests.js +6 -3
- package/dist/handlers/roles.js +13 -2
- package/dist/handlers/session.d.ts +12 -0
- package/dist/handlers/session.js +288 -25
- package/dist/handlers/sprints.d.ts +2 -0
- package/dist/handlers/sprints.js +30 -1
- package/dist/handlers/tasks.d.ts +25 -2
- package/dist/handlers/tasks.js +228 -35
- package/dist/handlers/tool-docs.js +834 -767
- package/dist/index.js +73 -73
- package/dist/knowledge.d.ts +6 -0
- package/dist/knowledge.js +218 -0
- package/dist/setup.d.ts +22 -0
- package/dist/setup.js +313 -0
- package/dist/templates/agent-guidelines.d.ts +18 -0
- package/dist/templates/agent-guidelines.js +207 -0
- package/dist/tools.js +527 -174
- package/dist/utils.d.ts +5 -2
- package/dist/utils.js +101 -62
- package/docs/TOOLS.md +2053 -2053
- package/package.json +51 -46
- package/scripts/generate-docs.ts +212 -212
- package/scripts/version-bump.ts +203 -0
- package/src/api-client.test.ts +723 -723
- package/src/api-client.ts +2499 -2140
- package/src/cli.ts +27 -10
- package/src/handlers/__test-setup__.ts +236 -231
- package/src/handlers/__test-utils__.ts +87 -87
- package/src/handlers/blockers.test.ts +468 -392
- package/src/handlers/blockers.ts +163 -109
- package/src/handlers/bodies-of-work.test.ts +704 -704
- package/src/handlers/bodies-of-work.ts +526 -468
- package/src/handlers/connectors.test.ts +834 -834
- package/src/handlers/connectors.ts +229 -229
- package/src/handlers/cost.test.ts +462 -462
- package/src/handlers/cost.ts +285 -285
- package/src/handlers/decisions.test.ts +382 -313
- package/src/handlers/decisions.ts +153 -99
- package/src/handlers/deployment.test.ts +551 -470
- package/src/handlers/deployment.ts +541 -508
- package/src/handlers/discovery.test.ts +206 -206
- package/src/handlers/discovery.ts +390 -374
- package/src/handlers/fallback.test.ts +537 -536
- package/src/handlers/fallback.ts +194 -188
- package/src/handlers/file-checkouts.test.ts +750 -670
- package/src/handlers/file-checkouts.ts +185 -165
- package/src/handlers/findings.test.ts +633 -633
- package/src/handlers/findings.ts +239 -203
- package/src/handlers/git-issues.test.ts +631 -631
- package/src/handlers/git-issues.ts +136 -134
- package/src/handlers/ideas.test.ts +644 -644
- package/src/handlers/ideas.ts +207 -175
- package/src/handlers/index.ts +84 -84
- package/src/handlers/milestones.test.ts +475 -475
- package/src/handlers/milestones.ts +180 -180
- package/src/handlers/organizations.test.ts +826 -826
- package/src/handlers/organizations.ts +315 -315
- package/src/handlers/progress.test.ts +269 -269
- package/src/handlers/progress.ts +77 -77
- package/src/handlers/project.test.ts +546 -546
- package/src/handlers/project.ts +239 -194
- package/src/handlers/requests.test.ts +303 -272
- package/src/handlers/requests.ts +99 -96
- package/src/handlers/roles.test.ts +303 -303
- package/src/handlers/roles.ts +226 -208
- package/src/handlers/session.test.ts +875 -576
- package/src/handlers/session.ts +738 -425
- package/src/handlers/sprints.test.ts +732 -732
- package/src/handlers/sprints.ts +537 -477
- package/src/handlers/tasks.test.ts +907 -980
- package/src/handlers/tasks.ts +945 -716
- package/src/handlers/tool-categories.test.ts +66 -66
- package/src/handlers/tool-docs.ts +1096 -1024
- package/src/handlers/types.test.ts +259 -0
- package/src/handlers/types.ts +175 -175
- package/src/handlers/validation.test.ts +582 -582
- package/src/handlers/validation.ts +97 -97
- package/src/index.ts +792 -792
- package/src/setup.test.ts +231 -0
- package/src/setup.ts +370 -0
- package/src/templates/agent-guidelines.ts +210 -0
- package/src/token-tracking.test.ts +453 -453
- package/src/token-tracking.ts +164 -164
- package/src/tools.ts +3562 -3208
- package/src/utils.test.ts +683 -681
- package/src/utils.ts +436 -392
- package/src/validators.test.ts +223 -223
- package/src/validators.ts +249 -249
- package/tsconfig.json +16 -16
- package/vitest.config.ts +14 -14
|
@@ -1,374 +1,390 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Discovery Handlers
|
|
3
|
-
*
|
|
4
|
-
* Handles tool discovery and documentation:
|
|
5
|
-
* - discover_tools
|
|
6
|
-
* - get_tool_info
|
|
7
|
-
*
|
|
8
|
-
* Note: Tool documentation is lazy-loaded from tool-docs.ts to save tokens.
|
|
9
|
-
* This saves ~8,000 tokens per schema load.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import type { Handler, HandlerRegistry } from './types.js';
|
|
13
|
-
import { parseArgs } from '../validators.js';
|
|
14
|
-
|
|
15
|
-
// Argument schemas for type-safe parsing
|
|
16
|
-
const discoverToolsSchema = {
|
|
17
|
-
category: { type: 'string' as const },
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const getToolInfoSchema = {
|
|
21
|
-
tool_name: { type: 'string' as const, required: true as const },
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
// Lazy-loaded tool documentation cache
|
|
25
|
-
let toolInfoCache: Record<string, string> | null = null;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Lazy-load tool documentation.
|
|
29
|
-
* Only loads the TOOL_INFO module when get_tool_info is called.
|
|
30
|
-
*/
|
|
31
|
-
async function getToolDocs(): Promise<Record<string, string>> {
|
|
32
|
-
if (toolInfoCache) {
|
|
33
|
-
return toolInfoCache;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const { TOOL_INFO } = await import('./tool-docs.js');
|
|
37
|
-
toolInfoCache = TOOL_INFO;
|
|
38
|
-
return toolInfoCache;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Tool categories with brief descriptions (exported for documentation generation)
|
|
42
|
-
export const TOOL_CATEGORIES: Record<string, { description: string; tools: Array<{ name: string; brief: string }> }> = {
|
|
43
|
-
session: {
|
|
44
|
-
description: 'Session lifecycle and monitoring',
|
|
45
|
-
tools: [
|
|
46
|
-
{ name: 'start_work_session', brief: 'Initialize session, get next task' },
|
|
47
|
-
{ name: 'get_help', brief: 'Get workflow guidance' },
|
|
48
|
-
{ name: 'get_token_usage', brief: 'View token stats' },
|
|
49
|
-
{ name: '
|
|
50
|
-
{ name: '
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
{ name: '
|
|
59
|
-
{ name: '
|
|
60
|
-
{ name: '
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
{ name: '
|
|
70
|
-
{ name: '
|
|
71
|
-
{ name: '
|
|
72
|
-
{ name: '
|
|
73
|
-
{ name: '
|
|
74
|
-
{ name: '
|
|
75
|
-
{ name: '
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
{ name: '
|
|
82
|
-
{ name: '
|
|
83
|
-
{ name: '
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
{ name: '
|
|
92
|
-
{ name: '
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
{ name: '
|
|
100
|
-
{ name: '
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
{ name: '
|
|
108
|
-
{ name: '
|
|
109
|
-
{ name: '
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
{ name: '
|
|
118
|
-
{ name: '
|
|
119
|
-
{ name: '
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
{ name: '
|
|
128
|
-
{ name: '
|
|
129
|
-
{ name: '
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
{ name: '
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
{ name: '
|
|
150
|
-
{ name: '
|
|
151
|
-
{ name: '
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
{ name: '
|
|
158
|
-
{ name: '
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
{ name: '
|
|
165
|
-
{ name: '
|
|
166
|
-
{ name: '
|
|
167
|
-
{ name: '
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
{ name: '
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
{ name: '
|
|
180
|
-
{ name: '
|
|
181
|
-
{ name: '
|
|
182
|
-
{ name: '
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
{ name: '
|
|
191
|
-
{ name: '
|
|
192
|
-
{ name: '
|
|
193
|
-
{ name: '
|
|
194
|
-
{ name: '
|
|
195
|
-
{ name: '
|
|
196
|
-
{ name: '
|
|
197
|
-
{ name: '
|
|
198
|
-
{ name: '
|
|
199
|
-
{ name: '
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
{ name: '
|
|
207
|
-
{ name: '
|
|
208
|
-
{ name: '
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
{ name: '
|
|
215
|
-
{ name: '
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
{ name: '
|
|
222
|
-
{ name: '
|
|
223
|
-
{ name: '
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
{ name: '
|
|
233
|
-
|
|
234
|
-
{ name: '
|
|
235
|
-
{ name: '
|
|
236
|
-
{ name: '
|
|
237
|
-
{ name: '
|
|
238
|
-
{ name: '
|
|
239
|
-
{ name: '
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
{ name: '
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
],
|
|
256
|
-
},
|
|
257
|
-
|
|
258
|
-
description: '
|
|
259
|
-
tools: [
|
|
260
|
-
{ name: '
|
|
261
|
-
{ name: '
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
{ name: '
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
{ name: '
|
|
283
|
-
{ name: '
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
{ name: '
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
{ name: '
|
|
306
|
-
{ name: '
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
const
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Discovery Handlers
|
|
3
|
+
*
|
|
4
|
+
* Handles tool discovery and documentation:
|
|
5
|
+
* - discover_tools
|
|
6
|
+
* - get_tool_info
|
|
7
|
+
*
|
|
8
|
+
* Note: Tool documentation is lazy-loaded from tool-docs.ts to save tokens.
|
|
9
|
+
* This saves ~8,000 tokens per schema load.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import type { Handler, HandlerRegistry } from './types.js';
|
|
13
|
+
import { parseArgs } from '../validators.js';
|
|
14
|
+
|
|
15
|
+
// Argument schemas for type-safe parsing
|
|
16
|
+
const discoverToolsSchema = {
|
|
17
|
+
category: { type: 'string' as const },
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const getToolInfoSchema = {
|
|
21
|
+
tool_name: { type: 'string' as const, required: true as const },
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
// Lazy-loaded tool documentation cache
|
|
25
|
+
let toolInfoCache: Record<string, string> | null = null;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Lazy-load tool documentation.
|
|
29
|
+
* Only loads the TOOL_INFO module when get_tool_info is called.
|
|
30
|
+
*/
|
|
31
|
+
async function getToolDocs(): Promise<Record<string, string>> {
|
|
32
|
+
if (toolInfoCache) {
|
|
33
|
+
return toolInfoCache;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const { TOOL_INFO } = await import('./tool-docs.js');
|
|
37
|
+
toolInfoCache = TOOL_INFO;
|
|
38
|
+
return toolInfoCache;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Tool categories with brief descriptions (exported for documentation generation)
|
|
42
|
+
export const TOOL_CATEGORIES: Record<string, { description: string; tools: Array<{ name: string; brief: string }> }> = {
|
|
43
|
+
session: {
|
|
44
|
+
description: 'Session lifecycle and monitoring',
|
|
45
|
+
tools: [
|
|
46
|
+
{ name: 'start_work_session', brief: 'Initialize session, get next task' },
|
|
47
|
+
{ name: 'get_help', brief: 'Get workflow guidance' },
|
|
48
|
+
{ name: 'get_token_usage', brief: 'View token stats' },
|
|
49
|
+
{ name: 'report_token_usage', brief: 'Report actual Claude API usage' },
|
|
50
|
+
{ name: 'heartbeat', brief: 'Maintain active status' },
|
|
51
|
+
{ name: 'end_work_session', brief: 'End session, release tasks' },
|
|
52
|
+
{ name: 'confirm_agent_setup', brief: 'Mark agent setup as complete' },
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
project: {
|
|
56
|
+
description: 'Project CRUD and configuration',
|
|
57
|
+
tools: [
|
|
58
|
+
{ name: 'get_project_context', brief: 'Full project info' },
|
|
59
|
+
{ name: 'get_project_summary', brief: 'Unified stats overview' },
|
|
60
|
+
{ name: 'get_git_workflow', brief: 'Git branching config' },
|
|
61
|
+
{ name: 'create_project', brief: 'Create new project' },
|
|
62
|
+
{ name: 'update_project', brief: 'Modify project settings' },
|
|
63
|
+
{ name: 'update_project_readme', brief: 'Sync README to dashboard' },
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
tasks: {
|
|
67
|
+
description: 'Task management and tracking',
|
|
68
|
+
tools: [
|
|
69
|
+
{ name: 'get_task', brief: 'Get single task by ID' },
|
|
70
|
+
{ name: 'search_tasks', brief: 'Text search tasks' },
|
|
71
|
+
{ name: 'get_tasks_by_priority', brief: 'Filter tasks by priority' },
|
|
72
|
+
{ name: 'get_recent_tasks', brief: 'Get oldest/newest tasks' },
|
|
73
|
+
{ name: 'get_task_stats', brief: 'Get aggregate task counts' },
|
|
74
|
+
{ name: 'get_next_task', brief: 'Get highest priority task' },
|
|
75
|
+
{ name: 'add_task', brief: 'Create new task' },
|
|
76
|
+
{ name: 'update_task', brief: 'Update task status/progress' },
|
|
77
|
+
{ name: 'complete_task', brief: 'Mark task done' },
|
|
78
|
+
{ name: 'delete_task', brief: 'Remove a task' },
|
|
79
|
+
{ name: 'cancel_task', brief: 'Cancel task with reason' },
|
|
80
|
+
{ name: 'batch_update_tasks', brief: 'Update multiple tasks' },
|
|
81
|
+
{ name: 'batch_complete_tasks', brief: 'Complete multiple tasks' },
|
|
82
|
+
{ name: 'add_task_reference', brief: 'Add URL to task' },
|
|
83
|
+
{ name: 'remove_task_reference', brief: 'Remove URL from task' },
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
milestones: {
|
|
87
|
+
description: 'Task breakdown into steps',
|
|
88
|
+
tools: [
|
|
89
|
+
{ name: 'add_milestone', brief: 'Add step to task' },
|
|
90
|
+
{ name: 'update_milestone', brief: 'Update milestone' },
|
|
91
|
+
{ name: 'complete_milestone', brief: 'Mark step done' },
|
|
92
|
+
{ name: 'delete_milestone', brief: 'Remove milestone' },
|
|
93
|
+
{ name: 'get_milestones', brief: 'List task milestones' },
|
|
94
|
+
],
|
|
95
|
+
},
|
|
96
|
+
progress: {
|
|
97
|
+
description: 'Progress logging and activity',
|
|
98
|
+
tools: [
|
|
99
|
+
{ name: 'log_progress', brief: 'Record progress update' },
|
|
100
|
+
{ name: 'get_activity_feed', brief: 'Combined activity feed' },
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
blockers: {
|
|
104
|
+
description: 'Blocker management',
|
|
105
|
+
tools: [
|
|
106
|
+
{ name: 'add_blocker', brief: 'Record a blocker' },
|
|
107
|
+
{ name: 'resolve_blocker', brief: 'Mark resolved' },
|
|
108
|
+
{ name: 'get_blocker', brief: 'Get single blocker' },
|
|
109
|
+
{ name: 'get_blockers', brief: 'List blockers' },
|
|
110
|
+
{ name: 'get_blockers_stats', brief: 'Get blocker statistics' },
|
|
111
|
+
{ name: 'delete_blocker', brief: 'Remove blocker' },
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
decisions: {
|
|
115
|
+
description: 'Architectural decisions',
|
|
116
|
+
tools: [
|
|
117
|
+
{ name: 'log_decision', brief: 'Record decision' },
|
|
118
|
+
{ name: 'get_decision', brief: 'Get single decision' },
|
|
119
|
+
{ name: 'get_decisions', brief: 'List decisions' },
|
|
120
|
+
{ name: 'get_decisions_stats', brief: 'Get decision statistics' },
|
|
121
|
+
{ name: 'delete_decision', brief: 'Remove decision' },
|
|
122
|
+
],
|
|
123
|
+
},
|
|
124
|
+
ideas: {
|
|
125
|
+
description: 'Feature ideas tracking',
|
|
126
|
+
tools: [
|
|
127
|
+
{ name: 'add_idea', brief: 'Record an idea' },
|
|
128
|
+
{ name: 'update_idea', brief: 'Update idea status' },
|
|
129
|
+
{ name: 'get_idea', brief: 'Get single idea' },
|
|
130
|
+
{ name: 'get_ideas', brief: 'List ideas' },
|
|
131
|
+
{ name: 'delete_idea', brief: 'Remove idea' },
|
|
132
|
+
{ name: 'convert_idea_to_task', brief: 'Convert idea to task' },
|
|
133
|
+
],
|
|
134
|
+
},
|
|
135
|
+
findings: {
|
|
136
|
+
description: 'Audit findings/knowledge base',
|
|
137
|
+
tools: [
|
|
138
|
+
{ name: 'add_finding', brief: 'Record audit finding' },
|
|
139
|
+
{ name: 'get_finding', brief: 'Get single finding' },
|
|
140
|
+
{ name: 'get_findings', brief: 'List findings' },
|
|
141
|
+
{ name: 'get_findings_stats', brief: 'Get findings statistics' },
|
|
142
|
+
{ name: 'update_finding', brief: 'Update finding status' },
|
|
143
|
+
{ name: 'delete_finding', brief: 'Remove finding' },
|
|
144
|
+
],
|
|
145
|
+
},
|
|
146
|
+
validation: {
|
|
147
|
+
description: 'Cross-agent task validation',
|
|
148
|
+
tools: [
|
|
149
|
+
{ name: 'get_tasks_awaiting_validation', brief: 'Unvalidated tasks' },
|
|
150
|
+
{ name: 'claim_validation', brief: 'Claim task for review' },
|
|
151
|
+
{ name: 'validate_task', brief: 'Approve/reject task' },
|
|
152
|
+
],
|
|
153
|
+
},
|
|
154
|
+
deployment: {
|
|
155
|
+
description: 'Deployment coordination',
|
|
156
|
+
tools: [
|
|
157
|
+
{ name: 'request_deployment', brief: 'Request deploy' },
|
|
158
|
+
{ name: 'claim_deployment_validation', brief: 'Claim for validation' },
|
|
159
|
+
{ name: 'report_validation', brief: 'Report build/test results' },
|
|
160
|
+
{ name: 'check_deployment_status', brief: 'Get deploy status' },
|
|
161
|
+
{ name: 'start_deployment', brief: 'Begin deployment' },
|
|
162
|
+
{ name: 'complete_deployment', brief: 'Mark deploy done' },
|
|
163
|
+
{ name: 'cancel_deployment', brief: 'Cancel deployment' },
|
|
164
|
+
{ name: 'add_deployment_requirement', brief: 'Add pre-deploy step' },
|
|
165
|
+
{ name: 'complete_deployment_requirement', brief: 'Mark step done' },
|
|
166
|
+
{ name: 'get_deployment_requirements', brief: 'List pre-deploy steps' },
|
|
167
|
+
{ name: 'get_deployment_requirements_stats', brief: 'Get requirements statistics' },
|
|
168
|
+
{ name: 'schedule_deployment', brief: 'Schedule future deployment' },
|
|
169
|
+
{ name: 'get_scheduled_deployments', brief: 'List scheduled deployments' },
|
|
170
|
+
{ name: 'update_scheduled_deployment', brief: 'Update schedule config' },
|
|
171
|
+
{ name: 'delete_scheduled_deployment', brief: 'Delete schedule' },
|
|
172
|
+
{ name: 'trigger_scheduled_deployment', brief: 'Manual trigger' },
|
|
173
|
+
{ name: 'check_due_deployments', brief: 'Check due schedules' },
|
|
174
|
+
],
|
|
175
|
+
},
|
|
176
|
+
fallback: {
|
|
177
|
+
description: 'Background activities when idle',
|
|
178
|
+
tools: [
|
|
179
|
+
{ name: 'start_fallback_activity', brief: 'Start background work' },
|
|
180
|
+
{ name: 'stop_fallback_activity', brief: 'Stop background work' },
|
|
181
|
+
{ name: 'get_activity_history', brief: 'Activity history' },
|
|
182
|
+
{ name: 'get_activity_schedules', brief: 'Activity schedules' },
|
|
183
|
+
],
|
|
184
|
+
},
|
|
185
|
+
bodies_of_work: {
|
|
186
|
+
description: 'Group tasks into bodies of work',
|
|
187
|
+
tools: [
|
|
188
|
+
{ name: 'create_body_of_work', brief: 'Create task group' },
|
|
189
|
+
{ name: 'update_body_of_work', brief: 'Update settings' },
|
|
190
|
+
{ name: 'get_body_of_work', brief: 'Get with tasks' },
|
|
191
|
+
{ name: 'get_bodies_of_work', brief: 'List bodies of work' },
|
|
192
|
+
{ name: 'delete_body_of_work', brief: 'Remove body of work' },
|
|
193
|
+
{ name: 'add_task_to_body_of_work', brief: 'Add task to group' },
|
|
194
|
+
{ name: 'remove_task_from_body_of_work', brief: 'Remove from group' },
|
|
195
|
+
{ name: 'activate_body_of_work', brief: 'Activate for work' },
|
|
196
|
+
{ name: 'add_task_dependency', brief: 'Add task dependency' },
|
|
197
|
+
{ name: 'remove_task_dependency', brief: 'Remove task dependency' },
|
|
198
|
+
{ name: 'get_task_dependencies', brief: 'List task dependencies' },
|
|
199
|
+
{ name: 'get_next_body_of_work_task', brief: 'Get next available task' },
|
|
200
|
+
],
|
|
201
|
+
},
|
|
202
|
+
sprints: {
|
|
203
|
+
description: 'Time-bounded sprints with velocity tracking',
|
|
204
|
+
tools: [
|
|
205
|
+
{ name: 'create_sprint', brief: 'Create new sprint' },
|
|
206
|
+
{ name: 'update_sprint', brief: 'Update sprint details' },
|
|
207
|
+
{ name: 'get_sprint', brief: 'Get sprint with tasks' },
|
|
208
|
+
{ name: 'get_sprints', brief: 'List project sprints' },
|
|
209
|
+
{ name: 'delete_sprint', brief: 'Delete sprint' },
|
|
210
|
+
{ name: 'start_sprint', brief: 'Start sprint' },
|
|
211
|
+
{ name: 'complete_sprint', brief: 'Complete sprint' },
|
|
212
|
+
{ name: 'add_task_to_sprint', brief: 'Add task to sprint' },
|
|
213
|
+
{ name: 'remove_task_from_sprint', brief: 'Remove from sprint' },
|
|
214
|
+
{ name: 'get_sprint_backlog', brief: 'Get available tasks (paginated)' },
|
|
215
|
+
{ name: 'get_sprint_velocity', brief: 'Velocity metrics' },
|
|
216
|
+
],
|
|
217
|
+
},
|
|
218
|
+
requests: {
|
|
219
|
+
description: 'User request handling',
|
|
220
|
+
tools: [
|
|
221
|
+
{ name: 'get_pending_requests', brief: 'Unhandled requests' },
|
|
222
|
+
{ name: 'acknowledge_request', brief: 'Mark handled' },
|
|
223
|
+
{ name: 'answer_question', brief: 'Answer user question' },
|
|
224
|
+
],
|
|
225
|
+
},
|
|
226
|
+
organizations: {
|
|
227
|
+
description: 'Organization and team management',
|
|
228
|
+
tools: [
|
|
229
|
+
// REMOVED: list_organizations - use dashboard
|
|
230
|
+
{ name: 'create_organization', brief: 'Create new org' },
|
|
231
|
+
{ name: 'update_organization', brief: 'Update org settings' },
|
|
232
|
+
{ name: 'delete_organization', brief: 'Delete org' },
|
|
233
|
+
// REMOVED: list_org_members - use dashboard
|
|
234
|
+
{ name: 'invite_member', brief: 'Invite by email' },
|
|
235
|
+
{ name: 'update_member_role', brief: 'Change member role' },
|
|
236
|
+
{ name: 'remove_member', brief: 'Remove from org' },
|
|
237
|
+
{ name: 'leave_organization', brief: 'Leave an org' },
|
|
238
|
+
{ name: 'share_project_with_org', brief: 'Share project' },
|
|
239
|
+
{ name: 'update_project_share', brief: 'Update share perms' },
|
|
240
|
+
{ name: 'unshare_project', brief: 'Remove share' },
|
|
241
|
+
// REMOVED: list_project_shares - use dashboard
|
|
242
|
+
],
|
|
243
|
+
},
|
|
244
|
+
cost: {
|
|
245
|
+
description: 'Cost monitoring and alerts',
|
|
246
|
+
tools: [
|
|
247
|
+
{ name: 'get_cost_summary', brief: 'Cost by period (paginated)' },
|
|
248
|
+
// REMOVED: get_cost_alerts - use dashboard
|
|
249
|
+
{ name: 'add_cost_alert', brief: 'Add threshold alert' },
|
|
250
|
+
{ name: 'update_cost_alert', brief: 'Update alert config' },
|
|
251
|
+
{ name: 'delete_cost_alert', brief: 'Remove alert' },
|
|
252
|
+
// REMOVED: get_task_costs - use get_cost_summary
|
|
253
|
+
// REMOVED: get_body_of_work_costs - use get_cost_summary
|
|
254
|
+
// REMOVED: get_sprint_costs - use get_cost_summary
|
|
255
|
+
],
|
|
256
|
+
},
|
|
257
|
+
git_issues: {
|
|
258
|
+
description: 'Git conflict and issue tracking',
|
|
259
|
+
tools: [
|
|
260
|
+
{ name: 'add_git_issue', brief: 'Record git issue' },
|
|
261
|
+
{ name: 'resolve_git_issue', brief: 'Mark resolved' },
|
|
262
|
+
{ name: 'get_git_issues', brief: 'List git issues' },
|
|
263
|
+
{ name: 'delete_git_issue', brief: 'Delete git issue' },
|
|
264
|
+
],
|
|
265
|
+
},
|
|
266
|
+
knowledge: {
|
|
267
|
+
description: 'Queryable knowledge base from project data',
|
|
268
|
+
tools: [
|
|
269
|
+
{ name: 'query_knowledge_base', brief: 'Aggregated project knowledge in one call' },
|
|
270
|
+
],
|
|
271
|
+
},
|
|
272
|
+
discovery: {
|
|
273
|
+
description: 'Tool discovery and documentation',
|
|
274
|
+
tools: [
|
|
275
|
+
{ name: 'discover_tools', brief: 'List tools by category' },
|
|
276
|
+
{ name: 'get_tool_info', brief: 'Get detailed tool docs' },
|
|
277
|
+
],
|
|
278
|
+
},
|
|
279
|
+
subtasks: {
|
|
280
|
+
description: 'Break tasks into smaller pieces',
|
|
281
|
+
tools: [
|
|
282
|
+
{ name: 'add_subtask', brief: 'Add subtask to task' },
|
|
283
|
+
{ name: 'get_subtasks', brief: 'List task subtasks (paginated)' },
|
|
284
|
+
],
|
|
285
|
+
},
|
|
286
|
+
worktrees: {
|
|
287
|
+
description: 'Git worktree management',
|
|
288
|
+
tools: [
|
|
289
|
+
{ name: 'get_stale_worktrees', brief: 'Find orphaned worktrees' },
|
|
290
|
+
{ name: 'clear_worktree_path', brief: 'Clear worktree from task' },
|
|
291
|
+
],
|
|
292
|
+
},
|
|
293
|
+
roles: {
|
|
294
|
+
description: 'Agent role management',
|
|
295
|
+
tools: [
|
|
296
|
+
{ name: 'get_role_settings', brief: 'Get project role settings' },
|
|
297
|
+
{ name: 'update_role_settings', brief: 'Configure role behavior' },
|
|
298
|
+
{ name: 'set_session_role', brief: 'Set session role' },
|
|
299
|
+
{ name: 'get_agents_by_role', brief: 'List agents by role' },
|
|
300
|
+
],
|
|
301
|
+
},
|
|
302
|
+
file_locks: {
|
|
303
|
+
description: 'File checkout/locking for multi-agent',
|
|
304
|
+
tools: [
|
|
305
|
+
{ name: 'checkout_file', brief: 'Lock file for editing' },
|
|
306
|
+
{ name: 'checkin_file', brief: 'Release file lock' },
|
|
307
|
+
{ name: 'get_file_checkouts', brief: 'List file locks' },
|
|
308
|
+
{ name: 'get_file_checkouts_stats', brief: 'Lock statistics' },
|
|
309
|
+
{ name: 'abandon_checkout', brief: 'Force-release lock' },
|
|
310
|
+
{ name: 'is_file_available', brief: 'Check if file is free' },
|
|
311
|
+
],
|
|
312
|
+
},
|
|
313
|
+
connectors: {
|
|
314
|
+
description: 'External integration connectors',
|
|
315
|
+
tools: [
|
|
316
|
+
{ name: 'get_connectors', brief: 'List project connectors' },
|
|
317
|
+
{ name: 'get_connector', brief: 'Get connector details' },
|
|
318
|
+
{ name: 'add_connector', brief: 'Create new connector' },
|
|
319
|
+
{ name: 'update_connector', brief: 'Update connector config' },
|
|
320
|
+
{ name: 'delete_connector', brief: 'Remove connector' },
|
|
321
|
+
{ name: 'test_connector', brief: 'Send test event' },
|
|
322
|
+
{ name: 'get_connector_events', brief: 'Event history' },
|
|
323
|
+
],
|
|
324
|
+
},
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
export const discoverTools: Handler = async (args) => {
|
|
328
|
+
const { category } = parseArgs(args, discoverToolsSchema);
|
|
329
|
+
|
|
330
|
+
if (category) {
|
|
331
|
+
// Return tools in specific category
|
|
332
|
+
const cat = TOOL_CATEGORIES[category];
|
|
333
|
+
if (!cat) {
|
|
334
|
+
return {
|
|
335
|
+
result: {
|
|
336
|
+
error: `Unknown category: ${category}`,
|
|
337
|
+
available: Object.keys(TOOL_CATEGORIES),
|
|
338
|
+
},
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
return {
|
|
342
|
+
result: {
|
|
343
|
+
category,
|
|
344
|
+
description: cat.description,
|
|
345
|
+
tools: cat.tools,
|
|
346
|
+
},
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
// Return all categories with tool counts
|
|
351
|
+
const categories = Object.entries(TOOL_CATEGORIES).map(([name, cat]) => ({
|
|
352
|
+
name,
|
|
353
|
+
description: cat.description,
|
|
354
|
+
tool_count: cat.tools.length,
|
|
355
|
+
}));
|
|
356
|
+
|
|
357
|
+
return {
|
|
358
|
+
result: {
|
|
359
|
+
categories,
|
|
360
|
+
total_tools: categories.reduce((sum, c) => sum + c.tool_count, 0),
|
|
361
|
+
usage: 'Call discover_tools(category) to list tools, get_tool_info(tool_name) for details',
|
|
362
|
+
},
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
export const getToolInfo: Handler = async (args) => {
|
|
367
|
+
const { tool_name } = parseArgs(args, getToolInfoSchema);
|
|
368
|
+
|
|
369
|
+
// Lazy-load tool documentation
|
|
370
|
+
const toolDocs = await getToolDocs();
|
|
371
|
+
const info = toolDocs[tool_name];
|
|
372
|
+
if (!info) {
|
|
373
|
+
return {
|
|
374
|
+
result: {
|
|
375
|
+
error: `Unknown tool: ${tool_name}`,
|
|
376
|
+
hint: 'Use discover_tools() to list available tools',
|
|
377
|
+
},
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
return { result: { tool: tool_name, info } };
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Discovery handlers registry
|
|
386
|
+
*/
|
|
387
|
+
export const discoveryHandlers: HandlerRegistry = {
|
|
388
|
+
discover_tools: discoverTools,
|
|
389
|
+
get_tool_info: getToolInfo,
|
|
390
|
+
};
|