@vibescope/mcp-server 0.2.1 → 0.2.3

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 (93) hide show
  1. package/README.md +63 -38
  2. package/dist/api-client.d.ts +187 -0
  3. package/dist/api-client.js +53 -1
  4. package/dist/handlers/blockers.js +9 -8
  5. package/dist/handlers/bodies-of-work.js +14 -14
  6. package/dist/handlers/connectors.d.ts +45 -0
  7. package/dist/handlers/connectors.js +183 -0
  8. package/dist/handlers/cost.d.ts +10 -0
  9. package/dist/handlers/cost.js +54 -0
  10. package/dist/handlers/decisions.js +3 -3
  11. package/dist/handlers/deployment.js +35 -19
  12. package/dist/handlers/discovery.d.ts +7 -0
  13. package/dist/handlers/discovery.js +61 -2
  14. package/dist/handlers/fallback.js +5 -4
  15. package/dist/handlers/file-checkouts.d.ts +2 -0
  16. package/dist/handlers/file-checkouts.js +38 -6
  17. package/dist/handlers/findings.js +13 -12
  18. package/dist/handlers/git-issues.js +4 -4
  19. package/dist/handlers/ideas.js +5 -5
  20. package/dist/handlers/index.d.ts +1 -0
  21. package/dist/handlers/index.js +3 -0
  22. package/dist/handlers/milestones.js +5 -5
  23. package/dist/handlers/organizations.js +13 -13
  24. package/dist/handlers/progress.js +2 -2
  25. package/dist/handlers/project.js +6 -6
  26. package/dist/handlers/requests.js +3 -3
  27. package/dist/handlers/session.js +28 -9
  28. package/dist/handlers/sprints.js +17 -17
  29. package/dist/handlers/tasks.d.ts +2 -0
  30. package/dist/handlers/tasks.js +78 -20
  31. package/dist/handlers/types.d.ts +64 -2
  32. package/dist/handlers/types.js +48 -1
  33. package/dist/handlers/validation.js +3 -3
  34. package/dist/index.js +7 -2716
  35. package/dist/token-tracking.d.ts +74 -0
  36. package/dist/token-tracking.js +122 -0
  37. package/dist/tools.js +298 -9
  38. package/dist/utils.d.ts +5 -0
  39. package/dist/utils.js +17 -0
  40. package/docs/TOOLS.md +2053 -0
  41. package/package.json +4 -1
  42. package/scripts/generate-docs.ts +212 -0
  43. package/src/api-client.test.ts +723 -0
  44. package/src/api-client.ts +236 -1
  45. package/src/handlers/__test-setup__.ts +9 -0
  46. package/src/handlers/blockers.test.ts +31 -19
  47. package/src/handlers/blockers.ts +9 -8
  48. package/src/handlers/bodies-of-work.test.ts +55 -32
  49. package/src/handlers/bodies-of-work.ts +14 -14
  50. package/src/handlers/connectors.test.ts +834 -0
  51. package/src/handlers/connectors.ts +229 -0
  52. package/src/handlers/cost.ts +66 -0
  53. package/src/handlers/decisions.test.ts +34 -25
  54. package/src/handlers/decisions.ts +3 -3
  55. package/src/handlers/deployment.ts +39 -19
  56. package/src/handlers/discovery.ts +61 -2
  57. package/src/handlers/fallback.test.ts +26 -22
  58. package/src/handlers/fallback.ts +5 -4
  59. package/src/handlers/file-checkouts.test.ts +242 -49
  60. package/src/handlers/file-checkouts.ts +44 -6
  61. package/src/handlers/findings.test.ts +38 -24
  62. package/src/handlers/findings.ts +13 -12
  63. package/src/handlers/git-issues.test.ts +51 -43
  64. package/src/handlers/git-issues.ts +4 -4
  65. package/src/handlers/ideas.test.ts +28 -23
  66. package/src/handlers/ideas.ts +5 -5
  67. package/src/handlers/index.ts +3 -0
  68. package/src/handlers/milestones.test.ts +33 -28
  69. package/src/handlers/milestones.ts +5 -5
  70. package/src/handlers/organizations.test.ts +104 -83
  71. package/src/handlers/organizations.ts +13 -13
  72. package/src/handlers/progress.test.ts +20 -14
  73. package/src/handlers/progress.ts +2 -2
  74. package/src/handlers/project.test.ts +34 -27
  75. package/src/handlers/project.ts +6 -6
  76. package/src/handlers/requests.test.ts +27 -18
  77. package/src/handlers/requests.ts +3 -3
  78. package/src/handlers/session.test.ts +47 -0
  79. package/src/handlers/session.ts +26 -9
  80. package/src/handlers/sprints.test.ts +71 -50
  81. package/src/handlers/sprints.ts +17 -17
  82. package/src/handlers/tasks.test.ts +77 -15
  83. package/src/handlers/tasks.ts +90 -21
  84. package/src/handlers/tool-categories.test.ts +66 -0
  85. package/src/handlers/types.ts +81 -2
  86. package/src/handlers/validation.test.ts +78 -45
  87. package/src/handlers/validation.ts +3 -3
  88. package/src/index.ts +12 -2732
  89. package/src/token-tracking.test.ts +453 -0
  90. package/src/token-tracking.ts +164 -0
  91. package/src/tools.ts +298 -9
  92. package/src/utils.test.ts +2 -2
  93. package/src/utils.ts +17 -0
@@ -142,7 +142,7 @@ export const createBodyOfWork: Handler = async (args, ctx) => {
142
142
  });
143
143
 
144
144
  if (!response.ok) {
145
- throw new Error(`Failed to create body of work: ${response.error}`);
145
+ return { result: { error: response.error || 'Failed to create body of work' }, isError: true };
146
146
  }
147
147
 
148
148
  return {
@@ -186,7 +186,7 @@ export const updateBodyOfWork: Handler = async (args, ctx) => {
186
186
  });
187
187
 
188
188
  if (!response.ok) {
189
- throw new Error(`Failed to update body of work: ${response.error}`);
189
+ return { result: { error: response.error || 'Failed to update body of work' }, isError: true };
190
190
  }
191
191
 
192
192
  return { result: { success: true, body_of_work_id } };
@@ -226,7 +226,7 @@ export const getBodyOfWork: Handler = async (args, ctx) => {
226
226
  }>('get_body_of_work', { body_of_work_id, summary_only });
227
227
 
228
228
  if (!response.ok) {
229
- throw new Error(`Failed to get body of work: ${response.error}`);
229
+ return { result: { error: response.error || 'Failed to get body of work' }, isError: true };
230
230
  }
231
231
 
232
232
  return { result: response.data };
@@ -261,7 +261,7 @@ export const getBodiesOfWork: Handler = async (args, ctx) => {
261
261
  });
262
262
 
263
263
  if (!response.ok) {
264
- throw new Error(`Failed to fetch bodies of work: ${response.error}`);
264
+ return { result: { error: response.error || 'Failed to fetch bodies of work' }, isError: true };
265
265
  }
266
266
 
267
267
  return { result: response.data };
@@ -277,7 +277,7 @@ export const deleteBodyOfWork: Handler = async (args, ctx) => {
277
277
  });
278
278
 
279
279
  if (!response.ok) {
280
- throw new Error(`Failed to delete body of work: ${response.error}`);
280
+ return { result: { error: response.error || 'Failed to delete body of work' }, isError: true };
281
281
  }
282
282
 
283
283
  return { result: { success: true, message: 'Body of work deleted. Tasks are preserved.' } };
@@ -302,7 +302,7 @@ export const addTaskToBodyOfWork: Handler = async (args, ctx) => {
302
302
  });
303
303
 
304
304
  if (!response.ok) {
305
- throw new Error(`Failed to add task to body of work: ${response.error}`);
305
+ return { result: { error: response.error || 'Failed to add task to body of work' }, isError: true };
306
306
  }
307
307
 
308
308
  return { result: response.data };
@@ -320,7 +320,7 @@ export const removeTaskFromBodyOfWork: Handler = async (args, ctx) => {
320
320
  }>('remove_task_from_body_of_work', { task_id });
321
321
 
322
322
  if (!response.ok) {
323
- throw new Error(`Failed to remove task from body of work: ${response.error}`);
323
+ return { result: { error: response.error || 'Failed to remove task from body of work' }, isError: true };
324
324
  }
325
325
 
326
326
  return { result: response.data };
@@ -340,7 +340,7 @@ export const activateBodyOfWork: Handler = async (args, ctx) => {
340
340
  }>('activate_body_of_work', { body_of_work_id });
341
341
 
342
342
  if (!response.ok) {
343
- throw new Error(`Failed to activate body of work: ${response.error}`);
343
+ return { result: { error: response.error || 'Failed to activate body of work' }, isError: true };
344
344
  }
345
345
 
346
346
  return { result: response.data };
@@ -350,7 +350,7 @@ export const addTaskDependency: Handler = async (args, ctx) => {
350
350
  const { body_of_work_id, task_id, depends_on_task_id } = parseArgs(args, addTaskDependencySchema);
351
351
 
352
352
  if (task_id === depends_on_task_id) {
353
- throw new Error('A task cannot depend on itself');
353
+ return { result: { error: 'A task cannot depend on itself' }, isError: true };
354
354
  }
355
355
 
356
356
  const apiClient = getApiClient();
@@ -368,7 +368,7 @@ export const addTaskDependency: Handler = async (args, ctx) => {
368
368
  });
369
369
 
370
370
  if (!response.ok) {
371
- throw new Error(`Failed to add task dependency: ${response.error}`);
371
+ return { result: { error: response.error || 'Failed to add task dependency' }, isError: true };
372
372
  }
373
373
 
374
374
  return { result: response.data };
@@ -389,7 +389,7 @@ export const removeTaskDependency: Handler = async (args, ctx) => {
389
389
  });
390
390
 
391
391
  if (!response.ok) {
392
- throw new Error(`Failed to remove task dependency: ${response.error}`);
392
+ return { result: { error: response.error || 'Failed to remove task dependency' }, isError: true };
393
393
  }
394
394
 
395
395
  return { result: response.data };
@@ -399,7 +399,7 @@ export const getTaskDependencies: Handler = async (args, ctx) => {
399
399
  const { body_of_work_id, task_id } = parseArgs(args, getTaskDependenciesSchema);
400
400
 
401
401
  if (!body_of_work_id && !task_id) {
402
- throw new Error('Either body_of_work_id or task_id is required');
402
+ return { result: { error: 'Either body_of_work_id or task_id is required' }, isError: true };
403
403
  }
404
404
 
405
405
  const apiClient = getApiClient();
@@ -417,7 +417,7 @@ export const getTaskDependencies: Handler = async (args, ctx) => {
417
417
  });
418
418
 
419
419
  if (!response.ok) {
420
- throw new Error(`Failed to fetch task dependencies: ${response.error}`);
420
+ return { result: { error: response.error || 'Failed to fetch task dependencies' }, isError: true };
421
421
  }
422
422
 
423
423
  return { result: response.data };
@@ -443,7 +443,7 @@ export const getNextBodyOfWorkTask: Handler = async (args, ctx) => {
443
443
  }>('get_next_body_of_work_task', { body_of_work_id });
444
444
 
445
445
  if (!response.ok) {
446
- throw new Error(`Failed to get next body of work task: ${response.error}`);
446
+ return { result: { error: response.error || 'Failed to get next body of work task' }, isError: true };
447
447
  }
448
448
 
449
449
  return { result: response.data };