@vibescope/mcp-server 0.0.1 → 0.2.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.
Files changed (173) hide show
  1. package/README.md +113 -98
  2. package/dist/api-client.d.ts +1169 -0
  3. package/dist/api-client.js +713 -0
  4. package/dist/cli.d.ts +1 -6
  5. package/dist/cli.js +39 -240
  6. package/dist/config/tool-categories.d.ts +31 -0
  7. package/dist/config/tool-categories.js +253 -0
  8. package/dist/handlers/blockers.js +57 -58
  9. package/dist/handlers/bodies-of-work.d.ts +2 -0
  10. package/dist/handlers/bodies-of-work.js +108 -477
  11. package/dist/handlers/cost.d.ts +1 -0
  12. package/dist/handlers/cost.js +35 -113
  13. package/dist/handlers/decisions.d.ts +2 -0
  14. package/dist/handlers/decisions.js +28 -27
  15. package/dist/handlers/deployment.js +113 -828
  16. package/dist/handlers/discovery.d.ts +3 -0
  17. package/dist/handlers/discovery.js +26 -627
  18. package/dist/handlers/fallback.d.ts +2 -0
  19. package/dist/handlers/fallback.js +56 -142
  20. package/dist/handlers/findings.d.ts +8 -1
  21. package/dist/handlers/findings.js +65 -68
  22. package/dist/handlers/git-issues.d.ts +9 -13
  23. package/dist/handlers/git-issues.js +80 -225
  24. package/dist/handlers/ideas.d.ts +3 -0
  25. package/dist/handlers/ideas.js +53 -134
  26. package/dist/handlers/index.d.ts +2 -0
  27. package/dist/handlers/index.js +6 -0
  28. package/dist/handlers/milestones.d.ts +2 -0
  29. package/dist/handlers/milestones.js +51 -98
  30. package/dist/handlers/organizations.js +79 -275
  31. package/dist/handlers/progress.d.ts +2 -0
  32. package/dist/handlers/progress.js +25 -123
  33. package/dist/handlers/project.js +42 -221
  34. package/dist/handlers/requests.d.ts +2 -0
  35. package/dist/handlers/requests.js +23 -83
  36. package/dist/handlers/session.js +119 -590
  37. package/dist/handlers/sprints.d.ts +32 -0
  38. package/dist/handlers/sprints.js +275 -0
  39. package/dist/handlers/tasks.d.ts +7 -10
  40. package/dist/handlers/tasks.js +245 -894
  41. package/dist/handlers/tool-docs.d.ts +9 -0
  42. package/dist/handlers/tool-docs.js +904 -0
  43. package/dist/handlers/types.d.ts +11 -3
  44. package/dist/handlers/validation.d.ts +1 -1
  45. package/dist/handlers/validation.js +38 -153
  46. package/dist/index.js +493 -162
  47. package/dist/knowledge.js +106 -9
  48. package/dist/tools.js +34 -4
  49. package/dist/validators.d.ts +21 -0
  50. package/dist/validators.js +91 -0
  51. package/package.json +2 -3
  52. package/src/api-client.ts +1822 -0
  53. package/src/cli.test.ts +128 -302
  54. package/src/cli.ts +41 -285
  55. package/src/handlers/__test-setup__.ts +215 -0
  56. package/src/handlers/__test-utils__.ts +4 -134
  57. package/src/handlers/blockers.test.ts +114 -124
  58. package/src/handlers/blockers.ts +68 -70
  59. package/src/handlers/bodies-of-work.test.ts +236 -831
  60. package/src/handlers/bodies-of-work.ts +210 -525
  61. package/src/handlers/cost.test.ts +149 -113
  62. package/src/handlers/cost.ts +44 -132
  63. package/src/handlers/decisions.test.ts +111 -209
  64. package/src/handlers/decisions.ts +35 -27
  65. package/src/handlers/deployment.test.ts +193 -239
  66. package/src/handlers/deployment.ts +143 -896
  67. package/src/handlers/discovery.test.ts +20 -67
  68. package/src/handlers/discovery.ts +29 -714
  69. package/src/handlers/fallback.test.ts +206 -361
  70. package/src/handlers/fallback.ts +81 -156
  71. package/src/handlers/findings.test.ts +229 -320
  72. package/src/handlers/findings.ts +76 -64
  73. package/src/handlers/git-issues.test.ts +623 -0
  74. package/src/handlers/git-issues.ts +174 -0
  75. package/src/handlers/ideas.test.ts +229 -343
  76. package/src/handlers/ideas.ts +69 -143
  77. package/src/handlers/index.ts +6 -0
  78. package/src/handlers/milestones.test.ts +167 -281
  79. package/src/handlers/milestones.ts +54 -93
  80. package/src/handlers/organizations.test.ts +275 -467
  81. package/src/handlers/organizations.ts +84 -294
  82. package/src/handlers/progress.test.ts +112 -218
  83. package/src/handlers/progress.ts +29 -142
  84. package/src/handlers/project.test.ts +203 -226
  85. package/src/handlers/project.ts +48 -238
  86. package/src/handlers/requests.test.ts +74 -342
  87. package/src/handlers/requests.ts +25 -83
  88. package/src/handlers/session.test.ts +276 -206
  89. package/src/handlers/session.ts +136 -662
  90. package/src/handlers/sprints.test.ts +711 -0
  91. package/src/handlers/sprints.ts +510 -0
  92. package/src/handlers/tasks.test.ts +669 -353
  93. package/src/handlers/tasks.ts +263 -1015
  94. package/src/handlers/tool-docs.ts +1024 -0
  95. package/src/handlers/types.ts +12 -4
  96. package/src/handlers/validation.test.ts +237 -568
  97. package/src/handlers/validation.ts +43 -167
  98. package/src/index.ts +493 -186
  99. package/src/tools.ts +2532 -0
  100. package/src/validators.test.ts +223 -223
  101. package/src/validators.ts +127 -0
  102. package/tsconfig.json +1 -1
  103. package/vitest.config.ts +14 -13
  104. package/dist/cli.test.d.ts +0 -1
  105. package/dist/cli.test.js +0 -367
  106. package/dist/handlers/__test-utils__.d.ts +0 -72
  107. package/dist/handlers/__test-utils__.js +0 -176
  108. package/dist/handlers/checkouts.d.ts +0 -37
  109. package/dist/handlers/checkouts.js +0 -377
  110. package/dist/handlers/knowledge-query.d.ts +0 -22
  111. package/dist/handlers/knowledge-query.js +0 -253
  112. package/dist/handlers/knowledge.d.ts +0 -12
  113. package/dist/handlers/knowledge.js +0 -108
  114. package/dist/handlers/roles.d.ts +0 -30
  115. package/dist/handlers/roles.js +0 -281
  116. package/dist/handlers/tasks.test.d.ts +0 -1
  117. package/dist/handlers/tasks.test.js +0 -431
  118. package/dist/utils.test.d.ts +0 -1
  119. package/dist/utils.test.js +0 -532
  120. package/dist/validators.test.d.ts +0 -1
  121. package/dist/validators.test.js +0 -176
  122. package/src/knowledge.ts +0 -132
  123. package/src/tmpclaude-0078-cwd +0 -1
  124. package/src/tmpclaude-0ee1-cwd +0 -1
  125. package/src/tmpclaude-2dd5-cwd +0 -1
  126. package/src/tmpclaude-344c-cwd +0 -1
  127. package/src/tmpclaude-3860-cwd +0 -1
  128. package/src/tmpclaude-4b63-cwd +0 -1
  129. package/src/tmpclaude-5c73-cwd +0 -1
  130. package/src/tmpclaude-5ee3-cwd +0 -1
  131. package/src/tmpclaude-6795-cwd +0 -1
  132. package/src/tmpclaude-709e-cwd +0 -1
  133. package/src/tmpclaude-9839-cwd +0 -1
  134. package/src/tmpclaude-d829-cwd +0 -1
  135. package/src/tmpclaude-e072-cwd +0 -1
  136. package/src/tmpclaude-f6ee-cwd +0 -1
  137. package/tmpclaude-0439-cwd +0 -1
  138. package/tmpclaude-132f-cwd +0 -1
  139. package/tmpclaude-15bb-cwd +0 -1
  140. package/tmpclaude-165a-cwd +0 -1
  141. package/tmpclaude-1ba9-cwd +0 -1
  142. package/tmpclaude-21a3-cwd +0 -1
  143. package/tmpclaude-2a38-cwd +0 -1
  144. package/tmpclaude-2adf-cwd +0 -1
  145. package/tmpclaude-2f56-cwd +0 -1
  146. package/tmpclaude-3626-cwd +0 -1
  147. package/tmpclaude-3727-cwd +0 -1
  148. package/tmpclaude-40bc-cwd +0 -1
  149. package/tmpclaude-436f-cwd +0 -1
  150. package/tmpclaude-4783-cwd +0 -1
  151. package/tmpclaude-4b6d-cwd +0 -1
  152. package/tmpclaude-4ba4-cwd +0 -1
  153. package/tmpclaude-51e6-cwd +0 -1
  154. package/tmpclaude-5ecf-cwd +0 -1
  155. package/tmpclaude-6f97-cwd +0 -1
  156. package/tmpclaude-7fb2-cwd +0 -1
  157. package/tmpclaude-825c-cwd +0 -1
  158. package/tmpclaude-8baf-cwd +0 -1
  159. package/tmpclaude-8d9f-cwd +0 -1
  160. package/tmpclaude-975c-cwd +0 -1
  161. package/tmpclaude-9983-cwd +0 -1
  162. package/tmpclaude-a045-cwd +0 -1
  163. package/tmpclaude-ac4a-cwd +0 -1
  164. package/tmpclaude-b593-cwd +0 -1
  165. package/tmpclaude-b891-cwd +0 -1
  166. package/tmpclaude-c032-cwd +0 -1
  167. package/tmpclaude-cf43-cwd +0 -1
  168. package/tmpclaude-d040-cwd +0 -1
  169. package/tmpclaude-dcdd-cwd +0 -1
  170. package/tmpclaude-dcee-cwd +0 -1
  171. package/tmpclaude-e16b-cwd +0 -1
  172. package/tmpclaude-ecd2-cwd +0 -1
  173. package/tmpclaude-f48d-cwd +0 -1
@@ -4,6 +4,9 @@
4
4
  * Handles tool discovery and documentation:
5
5
  * - discover_tools
6
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.
7
10
  */
8
11
  import type { Handler, HandlerRegistry } from './types.js';
9
12
  export declare const discoverTools: Handler;
@@ -4,7 +4,24 @@
4
4
  * Handles tool discovery and documentation:
5
5
  * - discover_tools
6
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
+ // Lazy-loaded tool documentation cache
12
+ let toolInfoCache = null;
13
+ /**
14
+ * Lazy-load tool documentation.
15
+ * Only loads the TOOL_INFO module when get_tool_info is called.
7
16
  */
17
+ async function getToolDocs() {
18
+ if (toolInfoCache) {
19
+ return toolInfoCache;
20
+ }
21
+ const { TOOL_INFO } = await import('./tool-docs.js');
22
+ toolInfoCache = TOOL_INFO;
23
+ return toolInfoCache;
24
+ }
8
25
  // Tool categories with brief descriptions
9
26
  const TOOL_CATEGORIES = {
10
27
  session: {
@@ -183,632 +200,12 @@ const TOOL_CATEGORIES = {
183
200
  { name: 'get_task_costs', brief: 'Cost per task' },
184
201
  ],
185
202
  },
186
- };
187
- // Detailed tool info (fetched on-demand)
188
- const TOOL_INFO = {
189
- start_work_session: `# start_work_session
190
- Initialize agent session and get assigned work.
191
-
192
- **Parameters:**
193
- - project_id (optional): Project UUID
194
- - git_url (optional): Git URL to find project
195
- - mode: 'lite' (default) or 'full' for complete context
196
-
197
- **Returns:** session_id, persona, project info, next_task
198
-
199
- **Example:** start_work_session(git_url: "https://github.com/org/repo")`,
200
- get_help: `# get_help
201
- Get workflow guidance on specific topics.
202
-
203
- **Parameters:**
204
- - topic (required): One of: getting_started, tasks, validation, deployment, git, blockers, milestones, fallback, session, tokens, topics
205
-
206
- **Example:** get_help(topic: "deployment")`,
207
- get_token_usage: `# get_token_usage
208
- Get token usage statistics for current session.
209
-
210
- **Returns:** total calls, total tokens, breakdown by tool, averages`,
211
- heartbeat: `# heartbeat
212
- Send heartbeat to maintain active status. Call every 30-60 seconds.
213
-
214
- **Parameters:**
215
- - session_id (optional): Uses current session if not provided`,
216
- end_work_session: `# end_work_session
217
- End session and release claimed tasks.
218
-
219
- **Parameters:**
220
- - session_id (optional): Uses current session if not provided
221
-
222
- **Returns:** Session summary with tasks completed, time spent`,
223
- get_project_context: `# get_project_context
224
- Get full project context including goals, instructions, tasks, blockers, decisions.
225
-
226
- **Parameters:**
227
- - project_id (optional): Project UUID
228
- - git_url (optional): Git URL to find project
229
-
230
- Without params, lists all projects.`,
231
- get_git_workflow: `# get_git_workflow
232
- Get git workflow config and branching instructions.
233
-
234
- **Parameters:**
235
- - project_id (required): Project UUID
236
- - task_id (optional): Include branch naming suggestion
237
-
238
- **Returns:** workflow type, branch names, auto-settings`,
239
- create_project: `# create_project
240
- Create a new project to track.
241
-
242
- **Parameters:**
243
- - name (required): Project display name
244
- - description: Brief description
245
- - goal: What "done" looks like
246
- - git_url: Repository URL
247
- - tech_stack: Array of technologies`,
248
- update_project: `# update_project
249
- Update project settings.
250
-
251
- **Parameters:**
252
- - project_id (required): Project UUID
253
- - name, description, goal, git_url, tech_stack, status
254
- - git_workflow: none, trunk-based, github-flow, git-flow
255
- - git_main_branch, git_develop_branch, git_auto_branch, git_auto_tag`,
256
- update_project_readme: `# update_project_readme
257
- Sync README content to the dashboard.
258
-
259
- **Parameters:**
260
- - project_id (required): Project UUID
261
- - readme_content (required): Markdown content`,
262
- get_tasks: `# get_tasks
263
- Get tasks for a project.
264
-
265
- **Parameters:**
266
- - project_id (required): Project UUID
267
- - status (optional): pending, in_progress, completed, cancelled
268
- - limit (optional): Max tasks (default 50)`,
269
- get_next_task: `# get_next_task
270
- Get highest priority pending task not claimed by another agent.
271
-
272
- **Parameters:**
273
- - project_id (required): Project UUID
274
-
275
- **Returns:** task or null, may suggest fallback activity`,
276
- add_task: `# add_task
277
- Create a new task.
278
-
279
- **Parameters:**
280
- - project_id (required): Project UUID
281
- - title (required): Task title
282
- - description: Detailed description
283
- - priority: 1-5 (1=highest, default 3)
284
- - estimated_minutes: Time estimate`,
285
- update_task: `# update_task
286
- Update task status, progress, or details.
287
-
288
- **Parameters:**
289
- - task_id (required): Task UUID
290
- - status: pending, in_progress, completed, cancelled
291
- - progress_percentage: 0-100
292
- - progress_note: Brief note (auto-logged)
293
- - title, description, priority, estimated_minutes, git_branch
294
-
295
- **Best practice:** Include progress_note with progress_percentage`,
296
- complete_task: `# complete_task
297
- Mark task as done.
298
-
299
- **Parameters:**
300
- - task_id (required): Task UUID
301
- - summary: What was done
302
-
303
- **Returns:** next_task, validation_count, blockers_count, deployment_priority`,
304
- delete_task: `# delete_task
305
- Delete a task.
306
-
307
- **Parameters:**
308
- - task_id (required): Task UUID`,
309
- batch_update_tasks: `# batch_update_tasks
310
- Update multiple tasks at once.
311
-
312
- **Parameters:**
313
- - updates (required): Array of {task_id, status?, progress_percentage?, progress_note?, priority?}`,
314
- batch_complete_tasks: `# batch_complete_tasks
315
- Complete multiple tasks at once.
316
-
317
- **Parameters:**
318
- - completions (required): Array of {task_id, summary?}`,
319
- add_task_reference: `# add_task_reference
320
- Add a reference URL to a task.
321
-
322
- **Parameters:**
323
- - task_id (required): Task UUID
324
- - url (required): Reference URL
325
- - label (optional): Display label`,
326
- remove_task_reference: `# remove_task_reference
327
- Remove a reference URL from a task.
328
-
329
- **Parameters:**
330
- - task_id (required): Task UUID
331
- - url (required): URL to remove`,
332
- add_milestone: `# add_milestone
333
- Add a milestone/step to a task.
334
-
335
- **Parameters:**
336
- - task_id (required): Task UUID
337
- - title (required): Milestone title
338
- - description (optional): Details
339
- - order_index (optional): Position (0-based)`,
340
- update_milestone: `# update_milestone
341
- Update a milestone.
342
-
343
- **Parameters:**
344
- - milestone_id (required): Milestone UUID
345
- - title, description, status (pending/in_progress/completed), order_index`,
346
- complete_milestone: `# complete_milestone
347
- Mark milestone as completed.
348
-
349
- **Parameters:**
350
- - milestone_id (required): Milestone UUID`,
351
- delete_milestone: `# delete_milestone
352
- Delete a milestone.
353
-
354
- **Parameters:**
355
- - milestone_id (required): Milestone UUID`,
356
- get_milestones: `# get_milestones
357
- Get all milestones for a task.
358
-
359
- **Parameters:**
360
- - task_id (required): Task UUID`,
361
- log_progress: `# log_progress
362
- Record a progress update.
363
-
364
- **Parameters:**
365
- - project_id (required): Project UUID
366
- - summary (required): Brief summary
367
- - task_id (optional): Link to task
368
- - details (optional): Extended notes`,
369
- get_activity_feed: `# get_activity_feed
370
- Get combined activity feed.
371
-
372
- **Parameters:**
373
- - project_id (required): Project UUID
374
- - types (optional): Array of task, progress, blocker, decision
375
- - created_by (optional): agent or user
376
- - since (optional): ISO date string
377
- - limit (optional): Max items (default 50)`,
378
- add_blocker: `# add_blocker
379
- Record a blocker preventing progress.
380
-
381
- **Parameters:**
382
- - project_id (required): Project UUID
383
- - description (required): What is blocking`,
384
- resolve_blocker: `# resolve_blocker
385
- Mark a blocker as resolved.
386
-
387
- **Parameters:**
388
- - blocker_id (required): Blocker UUID
389
- - resolution_note (optional): How it was resolved`,
390
- get_blockers: `# get_blockers
391
- Get blockers for a project.
392
-
393
- **Parameters:**
394
- - project_id (required): Project UUID
395
- - status (optional): open or resolved (default: open)`,
396
- delete_blocker: `# delete_blocker
397
- Delete a blocker.
398
-
399
- **Parameters:**
400
- - blocker_id (required): Blocker UUID`,
401
- log_decision: `# log_decision
402
- Record an architectural decision.
403
-
404
- **Parameters:**
405
- - project_id (required): Project UUID
406
- - title (required): Decision title
407
- - description (required): What was decided
408
- - rationale (optional): Why
409
- - alternatives_considered (optional): Array of alternatives`,
410
- get_decisions: `# get_decisions
411
- Get recorded decisions.
412
-
413
- **Parameters:**
414
- - project_id (required): Project UUID`,
415
- delete_decision: `# delete_decision
416
- Delete a decision.
417
-
418
- **Parameters:**
419
- - decision_id (required): Decision UUID`,
420
- add_idea: `# add_idea
421
- Record an improvement idea.
422
-
423
- **Parameters:**
424
- - project_id (required): Project UUID
425
- - title (required): Idea title
426
- - description (optional): Details
427
- - status (optional): raw, exploring, planned, in_development, shipped`,
428
- update_idea: `# update_idea
429
- Update an idea.
430
-
431
- **Parameters:**
432
- - idea_id (required): Idea UUID
433
- - title, description, status, doc_url`,
434
- get_ideas: `# get_ideas
435
- Get recorded ideas.
436
-
437
- **Parameters:**
438
- - project_id (required): Project UUID
439
- - status (optional): Filter by status`,
440
- delete_idea: `# delete_idea
441
- Delete an idea.
442
-
443
- **Parameters:**
444
- - idea_id (required): Idea UUID`,
445
- convert_idea_to_task: `# convert_idea_to_task
446
- Convert an idea to a task. Creates a new task from the idea's title and description.
447
-
448
- **Parameters:**
449
- - idea_id (required): Idea UUID to convert
450
- - priority (optional): Task priority 1-5 (default: 3)
451
- - estimated_minutes (optional): Estimated time
452
- - update_status (optional): Update idea to 'in_development' (default: true)
453
-
454
- **Returns:**
455
- - task_id: Created task UUID
456
- - Links idea and task together`,
457
- add_finding: `# add_finding
458
- Record an audit/review finding.
459
-
460
- **Parameters:**
461
- - project_id (required): Project UUID
462
- - title (required): Finding title
463
- - category: performance, security, code_quality, accessibility, documentation, architecture, testing, other
464
- - description: Details with impact and suggested fix
465
- - severity: info, low, medium, high, critical
466
- - file_path, line_number, related_task_id (optional)`,
467
- get_findings: `# get_findings
468
- Get audit findings.
469
-
470
- **Parameters:**
471
- - project_id (required): Project UUID
472
- - category, severity, status (optional filters)
473
- - limit (optional): Max items`,
474
- update_finding: `# update_finding
475
- Update a finding.
476
-
477
- **Parameters:**
478
- - finding_id (required): Finding UUID
479
- - status: open, addressed, dismissed, wontfix
480
- - resolution_note, title, description, severity`,
481
- delete_finding: `# delete_finding
482
- Delete a finding.
483
-
484
- **Parameters:**
485
- - finding_id (required): Finding UUID`,
486
- get_tasks_awaiting_validation: `# get_tasks_awaiting_validation
487
- Get completed tasks needing validation.
488
-
489
- **Parameters:**
490
- - project_id (required): Project UUID
491
-
492
- **Returns:** Tasks with reviewing status (who's reviewing, when started)`,
493
- claim_validation: `# claim_validation
494
- Claim a completed task for review. Shows "being reviewed" on dashboard.
495
-
496
- **Parameters:**
497
- - task_id (required): Task UUID to claim
498
-
499
- **Note:** Claim before reviewing to prevent duplicate work.`,
500
- validate_task: `# validate_task
501
- Validate a completed task.
502
-
503
- **Parameters:**
504
- - task_id (required): Task UUID
505
- - approved (required): true/false
506
- - validation_notes: What was checked, issues found`,
507
- request_deployment: `# request_deployment
508
- Request a deployment.
509
-
510
- **Parameters:**
511
- - project_id (required): Project UUID
512
- - environment: development, staging, production
513
- - version_bump: patch, minor, major
514
- - notes, git_ref (optional)`,
515
- claim_deployment_validation: `# claim_deployment_validation
516
- Claim pending deployment for validation.
517
-
518
- **Parameters:**
519
- - project_id (required): Project UUID
520
-
521
- Next: Run build+tests, then call report_validation`,
522
- report_validation: `# report_validation
523
- Report build/test results.
524
-
525
- **Parameters:**
526
- - project_id (required): Project UUID
527
- - build_passed (required): boolean
528
- - tests_passed (required): boolean
529
- - error_message (if failed)`,
530
- check_deployment_status: `# check_deployment_status
531
- Get active deployment status.
532
-
533
- **Parameters:**
534
- - project_id (required): Project UUID`,
535
- start_deployment: `# start_deployment
536
- Start deployment (requires 'ready' status).
537
-
538
- **Parameters:**
539
- - project_id (required): Project UUID`,
540
- complete_deployment: `# complete_deployment
541
- Mark deployment complete.
542
-
543
- **Parameters:**
544
- - project_id (required): Project UUID
545
- - success (required): boolean
546
- - summary: What was deployed or why failed`,
547
- cancel_deployment: `# cancel_deployment
548
- Cancel active deployment.
549
-
550
- **Parameters:**
551
- - project_id (required): Project UUID
552
- - reason (optional): Why cancelled`,
553
- schedule_deployment: `# schedule_deployment
554
- Schedule a deployment for a specific time.
555
-
556
- **Parameters:**
557
- - project_id (required): Project UUID
558
- - scheduled_at (required): ISO 8601 datetime
559
- - schedule_type (optional): once, daily, weekly, monthly (default: once)
560
- - auto_trigger (optional): Whether agents auto-trigger (default: true)
561
- - environment (optional): development, staging, production (default: production)
562
- - version_bump (optional): patch, minor, major (default: patch)
563
- - notes (optional): Notes about the deployment
564
- - git_ref (optional): Git branch or commit
565
-
566
- **Example:** schedule_deployment(project_id, scheduled_at: "2025-01-15T10:00:00Z", schedule_type: "weekly")`,
567
- get_scheduled_deployments: `# get_scheduled_deployments
568
- List scheduled deployments for a project.
569
-
570
- **Parameters:**
571
- - project_id (required): Project UUID
572
- - include_disabled (optional): Include disabled schedules (default: false)`,
573
- update_scheduled_deployment: `# update_scheduled_deployment
574
- Update a scheduled deployment's configuration.
575
-
576
- **Parameters:**
577
- - schedule_id (required): Schedule UUID
578
- - scheduled_at (optional): New scheduled time
579
- - schedule_type (optional): once, daily, weekly, monthly
580
- - auto_trigger (optional): Whether to auto-trigger
581
- - enabled (optional): Enable or disable
582
- - environment, version_bump, notes, git_ref (optional)`,
583
- delete_scheduled_deployment: `# delete_scheduled_deployment
584
- Delete a scheduled deployment.
585
-
586
- **Parameters:**
587
- - schedule_id (required): Schedule UUID`,
588
- trigger_scheduled_deployment: `# trigger_scheduled_deployment
589
- Manually trigger a scheduled deployment.
590
-
591
- Creates a new deployment using the schedule's configuration.
592
- Updates schedule: last_triggered_at, trigger_count, next scheduled_at (for recurring).
593
-
594
- **Parameters:**
595
- - schedule_id (required): Schedule UUID`,
596
- check_due_deployments: `# check_due_deployments
597
- Check for scheduled deployments that are due.
598
-
599
- Returns schedules where: enabled AND auto_trigger AND scheduled_at <= NOW()
600
-
601
- Use this to find deployments to trigger when working on a project.
602
-
603
- **Parameters:**
604
- - project_id (required): Project UUID`,
605
- start_fallback_activity: `# start_fallback_activity
606
- Start background activity when no tasks.
607
-
608
- **Parameters:**
609
- - project_id (required): Project UUID
610
- - activity (required): feature_ideation, code_review, performance_audit, ux_review, cost_analysis, security_review, test_coverage, documentation_review, dependency_audit, validate_completed_tasks`,
611
- stop_fallback_activity: `# stop_fallback_activity
612
- Stop current fallback activity.
613
-
614
- **Parameters:**
615
- - project_id (required): Project UUID
616
- - summary (optional): What was accomplished`,
617
- get_activity_history: `# get_activity_history
618
- Get background activity history.
619
-
620
- **Parameters:**
621
- - project_id (required): Project UUID
622
- - activity_type (optional): Filter by type
623
- - limit (optional): Max items`,
624
- get_activity_schedules: `# get_activity_schedules
625
- Get activity schedules.
626
-
627
- **Parameters:**
628
- - project_id (required): Project UUID`,
629
- get_pending_requests: `# get_pending_requests
630
- Get unacknowledged user requests.
631
-
632
- **Parameters:**
633
- - project_id (required): Project UUID`,
634
- acknowledge_request: `# acknowledge_request
635
- Mark a request as handled.
636
-
637
- **Parameters:**
638
- - request_id (required): Request UUID`,
639
- answer_question: `# answer_question
640
- Answer a user question from dashboard.
641
-
642
- **Parameters:**
643
- - request_id (required): Request UUID
644
- - answer (required): Your answer`,
645
- discover_tools: `# discover_tools
646
- List available tools by category.
647
-
648
- **Parameters:**
649
- - category (optional): Filter to specific category
650
-
651
- Without category, returns all categories with tool counts.
652
- With category, returns tools in that category with brief descriptions.`,
653
- get_tool_info: `# get_tool_info
654
- Get detailed info for a specific tool.
655
-
656
- **Parameters:**
657
- - tool_name (required): Name of the tool
658
-
659
- Returns: full documentation, parameters, examples, best practices.`,
660
- // Organization tools
661
- list_organizations: `# list_organizations
662
- List organizations the current user belongs to.
663
-
664
- **Parameters:** None
665
-
666
- **Returns:** Array of organizations with role and joined_at`,
667
- create_organization: `# create_organization
668
- Create a new organization. You become the owner.
669
-
670
- **Parameters:**
671
- - name (required): Organization display name
672
- - description (optional): Brief description
673
- - slug (optional): URL-friendly identifier (auto-generated if not provided)
674
-
675
- **Example:** create_organization(name: "Acme Corp", description: "Our development team")`,
676
- update_organization: `# update_organization
677
- Update organization details. Requires admin role.
678
-
679
- **Parameters:**
680
- - organization_id (required): Organization UUID
681
- - name, description, logo_url (optional updates)`,
682
- delete_organization: `# delete_organization
683
- Delete an organization. Requires owner role. Removes all shares.
684
-
685
- **Parameters:**
686
- - organization_id (required): Organization UUID
687
-
688
- **Warning:** This will remove all project shares with this organization.`,
689
- list_org_members: `# list_org_members
690
- List members of an organization.
691
-
692
- **Parameters:**
693
- - organization_id (required): Organization UUID
694
-
695
- **Returns:** Array of members with role and joined_at`,
696
- invite_member: `# invite_member
697
- Invite a user to an organization by email. Requires admin role.
698
-
699
- **Parameters:**
700
- - organization_id (required): Organization UUID
701
- - email (required): Email address to invite
702
- - role (optional): admin, member, or viewer (default: member)
703
-
704
- **Returns:** Invite details with token`,
705
- update_member_role: `# update_member_role
706
- Change a member's role. Requires admin role.
707
-
708
- **Parameters:**
709
- - organization_id (required): Organization UUID
710
- - user_id (required): User UUID to update
711
- - role (required): admin, member, or viewer
712
-
713
- **Note:** Cannot change your own role or the owner's role.`,
714
- remove_member: `# remove_member
715
- Remove a member from an organization. Requires admin role.
716
-
717
- **Parameters:**
718
- - organization_id (required): Organization UUID
719
- - user_id (required): User UUID to remove
720
-
721
- **Note:** Cannot remove the owner. Their org-scoped API keys are invalidated.`,
722
- leave_organization: `# leave_organization
723
- Leave an organization.
724
-
725
- **Parameters:**
726
- - organization_id (required): Organization UUID
727
-
728
- **Note:** Owner cannot leave. Must transfer ownership or delete organization.`,
729
- share_project_with_org: `# share_project_with_org
730
- Share a project with an organization. You must own the project.
731
-
732
- **Parameters:**
733
- - project_id (required): Project UUID
734
- - organization_id (required): Organization UUID to share with
735
- - permission (optional): read, write, or admin (default: read)
736
-
737
- **Permission levels:**
738
- - read: View project and tasks
739
- - write: Add/update tasks, log progress
740
- - admin: All write permissions plus deployments`,
741
- update_project_share: `# update_project_share
742
- Update the permission level for a project share.
743
-
744
- **Parameters:**
745
- - project_id (required): Project UUID
746
- - organization_id (required): Organization UUID
747
- - permission (required): read, write, or admin`,
748
- unshare_project: `# unshare_project
749
- Remove a project share from an organization.
750
-
751
- **Parameters:**
752
- - project_id (required): Project UUID
753
- - organization_id (required): Organization UUID
754
-
755
- **Note:** Org members will lose access immediately.`,
756
- list_project_shares: `# list_project_shares
757
- List all organizations a project is shared with.
758
-
759
- **Parameters:**
760
- - project_id (required): Project UUID
761
-
762
- **Returns:** Array of shares with organization info and permission level`,
763
- // Cost monitoring tools
764
- get_cost_summary: `# get_cost_summary
765
- Get cost summary (daily/weekly/monthly) for a project.
766
-
767
- **Parameters:**
768
- - project_id (required): Project UUID
769
- - period: 'daily' | 'weekly' | 'monthly' (default: daily)
770
- - limit: Max records to return (default: 30)
771
-
772
- **Returns:** Cost summary with totals and breakdown by model`,
773
- get_cost_alerts: `# get_cost_alerts
774
- Get cost alerts for the current user.
775
-
776
- **Parameters:**
777
- - project_id (optional): Filter by project
778
-
779
- **Returns:** Array of configured cost alerts`,
780
- add_cost_alert: `# add_cost_alert
781
- Add a cost threshold alert.
782
-
783
- **Parameters:**
784
- - project_id (optional): Specific project or null for all
785
- - threshold_amount (required): Amount in USD
786
- - threshold_period (required): 'daily' | 'weekly' | 'monthly'
787
- - alert_type: 'warning' | 'critical' (default: warning)
788
-
789
- **Example:** add_cost_alert(threshold_amount: 50, threshold_period: "daily", alert_type: "warning")`,
790
- update_cost_alert: `# update_cost_alert
791
- Update an existing cost alert.
792
-
793
- **Parameters:**
794
- - alert_id (required): Alert UUID
795
- - threshold_amount: New amount in USD
796
- - threshold_period: New period
797
- - alert_type: New alert type
798
- - enabled: Enable/disable the alert`,
799
- delete_cost_alert: `# delete_cost_alert
800
- Delete a cost alert.
801
-
802
- **Parameters:**
803
- - alert_id (required): Alert UUID to delete`,
804
- get_task_costs: `# get_task_costs
805
- Get cost breakdown by task for a project.
806
-
807
- **Parameters:**
808
- - project_id (required): Project UUID
809
- - limit: Max tasks to return (default: 20)
810
-
811
- **Returns:** Tasks sorted by estimated cost with model breakdown`,
203
+ knowledge: {
204
+ description: 'Queryable knowledge base from project data',
205
+ tools: [
206
+ { name: 'query_knowledge_base', brief: 'Aggregated project knowledge in one call' },
207
+ ],
208
+ },
812
209
  };
813
210
  export const discoverTools = async (args) => {
814
211
  const { category } = args;
@@ -850,7 +247,9 @@ export const getToolInfo = async (args) => {
850
247
  if (!tool_name) {
851
248
  return { result: { error: 'tool_name is required' } };
852
249
  }
853
- const info = TOOL_INFO[tool_name];
250
+ // Lazy-load tool documentation
251
+ const toolDocs = await getToolDocs();
252
+ const info = toolDocs[tool_name];
854
253
  if (!info) {
855
254
  return {
856
255
  result: {
@@ -6,6 +6,8 @@
6
6
  * - stop_fallback_activity
7
7
  * - get_activity_history
8
8
  * - get_activity_schedules
9
+ *
10
+ * MIGRATED: Uses Vibescope API client instead of direct Supabase
9
11
  */
10
12
  import type { Handler, HandlerRegistry } from './types.js';
11
13
  export declare const startFallbackActivity: Handler;