@vibescope/mcp-server 0.1.0 → 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 (39) hide show
  1. package/README.md +1 -1
  2. package/dist/api-client.d.ts +56 -1
  3. package/dist/api-client.js +17 -2
  4. package/dist/handlers/bodies-of-work.js +3 -2
  5. package/dist/handlers/deployment.js +3 -2
  6. package/dist/handlers/discovery.d.ts +3 -0
  7. package/dist/handlers/discovery.js +20 -652
  8. package/dist/handlers/fallback.js +18 -9
  9. package/dist/handlers/findings.d.ts +8 -1
  10. package/dist/handlers/findings.js +24 -3
  11. package/dist/handlers/session.js +23 -8
  12. package/dist/handlers/sprints.js +3 -2
  13. package/dist/handlers/tasks.js +22 -1
  14. package/dist/handlers/tool-docs.d.ts +4 -3
  15. package/dist/handlers/tool-docs.js +252 -5
  16. package/dist/handlers/validation.js +13 -1
  17. package/dist/index.js +25 -7
  18. package/dist/tools.js +30 -4
  19. package/package.json +1 -1
  20. package/src/api-client.ts +72 -2
  21. package/src/handlers/__test-setup__.ts +5 -0
  22. package/src/handlers/bodies-of-work.ts +27 -11
  23. package/src/handlers/deployment.ts +4 -2
  24. package/src/handlers/discovery.ts +23 -740
  25. package/src/handlers/fallback.test.ts +78 -0
  26. package/src/handlers/fallback.ts +20 -9
  27. package/src/handlers/findings.test.ts +129 -2
  28. package/src/handlers/findings.ts +32 -3
  29. package/src/handlers/session.test.ts +37 -2
  30. package/src/handlers/session.ts +29 -8
  31. package/src/handlers/sprints.ts +19 -6
  32. package/src/handlers/tasks.test.ts +61 -0
  33. package/src/handlers/tasks.ts +26 -1
  34. package/src/handlers/tool-docs.ts +1024 -0
  35. package/src/handlers/validation.test.ts +52 -0
  36. package/src/handlers/validation.ts +14 -1
  37. package/src/index.ts +25 -7
  38. package/src/tools.ts +30 -4
  39. package/src/knowledge.ts +0 -230
package/README.md CHANGED
@@ -13,7 +13,7 @@ Use directly in your MCP config without installing:
13
13
  "mcpServers": {
14
14
  "vibescope": {
15
15
  "command": "npx",
16
- "args": ["-y", "@vibescope/mcp-server"],
16
+ "args": ["-y", "-p", "@vibescope/mcp-server", "vibescope-mcp"],
17
17
  "env": {
18
18
  "VIBESCOPE_API_KEY": "your-api-key"
19
19
  }
@@ -81,7 +81,9 @@ export declare class VibescopeApiClient {
81
81
  };
82
82
  error?: string;
83
83
  }>>;
84
- heartbeat(sessionId: string): Promise<ApiResponse<{
84
+ heartbeat(sessionId: string, options?: {
85
+ current_worktree_path?: string | null;
86
+ }): Promise<ApiResponse<{
85
87
  success: boolean;
86
88
  session_id: string;
87
89
  timestamp: string;
@@ -276,6 +278,20 @@ export declare class VibescopeApiClient {
276
278
  }): Promise<ApiResponse<{
277
279
  success: boolean;
278
280
  task_id: string;
281
+ git_workflow?: {
282
+ workflow: string;
283
+ base_branch: string;
284
+ suggested_branch: string;
285
+ worktree_required: boolean;
286
+ };
287
+ worktree_setup?: {
288
+ message: string;
289
+ commands: string[];
290
+ worktree_path: string;
291
+ branch_name: string;
292
+ cleanup_command: string;
293
+ };
294
+ next_step?: string;
279
295
  }>>;
280
296
  completeTask(taskId: string, params: {
281
297
  summary?: string;
@@ -297,6 +313,7 @@ export declare class VibescopeApiClient {
297
313
  deployment?: string;
298
314
  };
299
315
  next_action: string;
316
+ warnings?: string[];
300
317
  }>>;
301
318
  deleteTask(taskId: string): Promise<ApiResponse<{
302
319
  success: boolean;
@@ -434,6 +451,9 @@ export declare class VibescopeApiClient {
434
451
  severity?: string;
435
452
  status?: string;
436
453
  limit?: number;
454
+ offset?: number;
455
+ search_query?: string;
456
+ summary_only?: boolean;
437
457
  }): Promise<ApiResponse<{
438
458
  findings: Array<{
439
459
  id: string;
@@ -447,6 +467,14 @@ export declare class VibescopeApiClient {
447
467
  resolution_note?: string;
448
468
  created_at: string;
449
469
  }>;
470
+ total_count?: number;
471
+ has_more?: boolean;
472
+ }>>;
473
+ getFindingsStats(projectId: string): Promise<ApiResponse<{
474
+ total: number;
475
+ by_status: Record<string, number>;
476
+ by_severity: Record<string, number>;
477
+ by_category: Record<string, number>;
450
478
  }>>;
451
479
  addFinding(projectId: string, params: {
452
480
  title: string;
@@ -550,16 +578,33 @@ export declare class VibescopeApiClient {
550
578
  validateTask(taskId: string, params: {
551
579
  approved: boolean;
552
580
  validation_notes?: string;
581
+ skip_pr_check?: boolean;
553
582
  }, sessionId?: string): Promise<ApiResponse<{
554
583
  success: boolean;
555
584
  approved: boolean;
556
585
  task_id: string;
557
586
  message?: string;
587
+ workflow?: string;
558
588
  }>>;
559
589
  startFallbackActivity(projectId: string, activity: string, sessionId?: string): Promise<ApiResponse<{
560
590
  success: boolean;
561
591
  activity: string;
562
592
  message: string;
593
+ git_workflow?: {
594
+ workflow: string;
595
+ base_branch: string;
596
+ worktree_recommended: boolean;
597
+ note: string;
598
+ };
599
+ worktree_setup?: {
600
+ message: string;
601
+ commands: string[];
602
+ worktree_path: string;
603
+ branch_name: string;
604
+ cleanup_command: string;
605
+ report_worktree: string;
606
+ };
607
+ next_step?: string;
563
608
  }>>;
564
609
  stopFallbackActivity(projectId: string, summary?: string, sessionId?: string): Promise<ApiResponse<{
565
610
  success: boolean;
@@ -1023,6 +1068,7 @@ export declare class VibescopeApiClient {
1023
1068
  file_path?: string;
1024
1069
  stage?: string;
1025
1070
  blocking?: boolean;
1071
+ recurring?: boolean;
1026
1072
  }): Promise<ApiResponse<{
1027
1073
  success: boolean;
1028
1074
  requirement_id: string;
@@ -1108,6 +1154,15 @@ export declare class VibescopeApiClient {
1108
1154
  success: boolean;
1109
1155
  project_id: string;
1110
1156
  }>>;
1157
+ getHelpTopic(slug: string): Promise<ApiResponse<{
1158
+ slug: string;
1159
+ title: string;
1160
+ content: string;
1161
+ } | null>>;
1162
+ getHelpTopics(): Promise<ApiResponse<Array<{
1163
+ slug: string;
1164
+ title: string;
1165
+ }>>>;
1111
1166
  }
1112
1167
  export declare function getApiClient(): VibescopeApiClient;
1113
1168
  export declare function initApiClient(config: ApiClientConfig): VibescopeApiClient;
@@ -55,9 +55,10 @@ export class VibescopeApiClient {
55
55
  async startSession(params) {
56
56
  return this.request('POST', '/api/mcp/sessions/start', params);
57
57
  }
58
- async heartbeat(sessionId) {
58
+ async heartbeat(sessionId, options) {
59
59
  return this.request('POST', '/api/mcp/sessions/heartbeat', {
60
- session_id: sessionId
60
+ session_id: sessionId,
61
+ ...options
61
62
  });
62
63
  }
63
64
  async endSession(sessionId) {
@@ -221,6 +222,11 @@ export class VibescopeApiClient {
221
222
  ...params
222
223
  });
223
224
  }
225
+ async getFindingsStats(projectId) {
226
+ return this.proxy('get_findings_stats', {
227
+ project_id: projectId
228
+ });
229
+ }
224
230
  async addFinding(projectId, params, sessionId) {
225
231
  return this.proxy('add_finding', {
226
232
  project_id: projectId,
@@ -679,6 +685,15 @@ export class VibescopeApiClient {
679
685
  readme_content: readmeContent
680
686
  });
681
687
  }
688
+ // ============================================================================
689
+ // Help Topics (database-backed)
690
+ // ============================================================================
691
+ async getHelpTopic(slug) {
692
+ return this.proxy('get_help_topic', { slug });
693
+ }
694
+ async getHelpTopics() {
695
+ return this.proxy('get_help_topics', {});
696
+ }
682
697
  }
683
698
  // Singleton instance
684
699
  let apiClient = null;
@@ -77,11 +77,12 @@ export const updateBodyOfWork = async (args, ctx) => {
77
77
  return { result: { success: true, body_of_work_id } };
78
78
  };
79
79
  export const getBodyOfWork = async (args, ctx) => {
80
- const { body_of_work_id } = args;
80
+ const { body_of_work_id, summary_only = false } = args;
81
81
  validateRequired(body_of_work_id, 'body_of_work_id');
82
82
  validateUUID(body_of_work_id, 'body_of_work_id');
83
83
  const apiClient = getApiClient();
84
- const response = await apiClient.proxy('get_body_of_work', { body_of_work_id });
84
+ // Response type varies based on summary_only
85
+ const response = await apiClient.proxy('get_body_of_work', { body_of_work_id, summary_only });
85
86
  if (!response.ok) {
86
87
  throw new Error(`Failed to get body of work: ${response.error}`);
87
88
  }
@@ -130,7 +130,7 @@ export const cancelDeployment = async (args, ctx) => {
130
130
  return { result: response.data };
131
131
  };
132
132
  export const addDeploymentRequirement = async (args, ctx) => {
133
- const { project_id, type, title, description, file_path, stage = 'preparation', blocking = false } = args;
133
+ const { project_id, type, title, description, file_path, stage = 'preparation', blocking = false, recurring = false } = args;
134
134
  validateRequired(project_id, 'project_id');
135
135
  validateUUID(project_id, 'project_id');
136
136
  validateRequired(type, 'type');
@@ -150,7 +150,8 @@ export const addDeploymentRequirement = async (args, ctx) => {
150
150
  description,
151
151
  file_path,
152
152
  stage: stage,
153
- blocking
153
+ blocking,
154
+ recurring
154
155
  });
155
156
  if (!response.ok) {
156
157
  throw new Error(response.error || 'Failed to add deployment requirement');
@@ -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;