@vibescope/mcp-server 0.3.12 → 0.3.14

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.
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Fallback Activity API Methods
3
+ *
4
+ * Handles background activities when agents are idle with no pending tasks.
5
+ */
6
+ import type { ApiResponse, ProxyFn } from './types.js';
7
+ export interface FallbackActivityResult {
8
+ success: boolean;
9
+ activity: string;
10
+ message: string;
11
+ git_workflow?: {
12
+ workflow: string;
13
+ base_branch: string;
14
+ worktree_recommended: boolean;
15
+ note: string;
16
+ };
17
+ worktree_setup?: {
18
+ message: string;
19
+ commands: string[];
20
+ worktree_path: string;
21
+ branch_name: string;
22
+ cleanup_command: string;
23
+ report_worktree: string;
24
+ };
25
+ next_step?: string;
26
+ }
27
+ export interface FallbackMethods {
28
+ startFallbackActivity(projectId: string, activity: string, sessionId?: string): Promise<ApiResponse<FallbackActivityResult>>;
29
+ stopFallbackActivity(projectId: string, summary?: string, sessionId?: string): Promise<ApiResponse<{
30
+ success: boolean;
31
+ }>>;
32
+ }
33
+ export declare function createFallbackMethods(proxy: ProxyFn): FallbackMethods;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Fallback Activity API Methods
3
+ *
4
+ * Handles background activities when agents are idle with no pending tasks.
5
+ */
6
+ export function createFallbackMethods(proxy) {
7
+ return {
8
+ async startFallbackActivity(projectId, activity, sessionId) {
9
+ return proxy('start_fallback_activity', {
10
+ project_id: projectId,
11
+ activity
12
+ }, sessionId ? { session_id: sessionId } : undefined);
13
+ },
14
+ async stopFallbackActivity(projectId, summary, sessionId) {
15
+ return proxy('stop_fallback_activity', {
16
+ project_id: projectId,
17
+ summary
18
+ }, sessionId ? { session_id: sessionId } : undefined);
19
+ }
20
+ };
21
+ }
@@ -1,97 +1,69 @@
1
1
  /**
2
2
  * Findings API Methods
3
3
  *
4
- * Methods for audit findings and knowledge base management:
5
- * - getFindings: List findings for a project
6
- * - getFinding: Get a specific finding
7
- * - addFinding: Create a new finding
8
- * - updateFinding: Update an existing finding
9
- * - deleteFinding: Delete a finding
10
- * - getFindingsStats: Get findings statistics
11
- * - queryKnowledgeBase: Search findings as knowledge base
4
+ * Handles security findings, code quality issues, and audit findings.
12
5
  */
13
- import type { ApiResponse, RequestFn } from './types.js';
6
+ import type { ApiResponse, ProxyFn } from './types.js';
7
+ export interface Finding {
8
+ id: string;
9
+ title: string;
10
+ description?: string;
11
+ category: string;
12
+ severity: string;
13
+ status: string;
14
+ file_path?: string;
15
+ line_number?: number;
16
+ resolution_note?: string;
17
+ created_at: string;
18
+ }
19
+ export interface FindingsStats {
20
+ total: number;
21
+ by_status: Record<string, number>;
22
+ by_severity: Record<string, number>;
23
+ by_category: Record<string, number>;
24
+ }
14
25
  export interface FindingsMethods {
15
26
  getFindings(projectId: string, params?: {
16
27
  category?: string;
17
28
  severity?: string;
18
29
  status?: string;
19
- summary_only?: boolean;
20
30
  limit?: number;
21
31
  offset?: number;
32
+ search_query?: string;
33
+ summary_only?: boolean;
22
34
  }): Promise<ApiResponse<{
23
- findings: Array<{
24
- id: string;
25
- title: string;
26
- description?: string;
27
- category: string;
28
- severity: string;
29
- status: string;
30
- created_at: string;
31
- updated_at?: string;
32
- related_task_id?: string;
33
- }>;
34
- total_count: number;
35
- has_more: boolean;
35
+ findings: Finding[];
36
+ total_count?: number;
37
+ has_more?: boolean;
36
38
  }>>;
37
39
  getFinding(findingId: string): Promise<ApiResponse<{
38
- id: string;
39
- title: string;
40
- description?: string;
41
- category: string;
42
- severity: string;
43
- status: string;
44
- created_at: string;
45
- updated_at?: string;
46
- related_task_id?: string;
40
+ finding: Finding;
47
41
  }>>;
48
- addFinding(params: {
49
- project_id: string;
42
+ getFindingsStats(projectId: string): Promise<ApiResponse<FindingsStats>>;
43
+ addFinding(projectId: string, params: {
50
44
  title: string;
51
45
  description?: string;
52
46
  category?: string;
53
47
  severity?: string;
48
+ file_path?: string;
49
+ line_number?: number;
54
50
  related_task_id?: string;
55
- }): Promise<ApiResponse<{
51
+ }, sessionId?: string): Promise<ApiResponse<{
56
52
  success: boolean;
57
53
  finding_id: string;
58
54
  }>>;
59
- updateFinding(findingId: string, params: {
55
+ updateFinding(findingId: string, updates: {
60
56
  title?: string;
61
57
  description?: string;
62
- category?: string;
63
58
  severity?: string;
64
59
  status?: string;
65
- related_task_id?: string;
60
+ resolution_note?: string;
66
61
  }): Promise<ApiResponse<{
67
62
  success: boolean;
68
63
  finding_id: string;
69
64
  }>>;
70
65
  deleteFinding(findingId: string): Promise<ApiResponse<{
71
66
  success: boolean;
72
- finding_id: string;
73
- }>>;
74
- getFindingsStats(projectId: string): Promise<ApiResponse<{
75
- total: number;
76
- by_severity: Record<string, number>;
77
- by_category: Record<string, number>;
78
- by_status: Record<string, number>;
79
- }>>;
80
- queryKnowledgeBase(projectId: string, params: {
81
- query: string;
82
- category?: string;
83
- severity?: string;
84
- limit?: number;
85
- }): Promise<ApiResponse<{
86
- findings: Array<{
87
- id: string;
88
- title: string;
89
- description?: string;
90
- category: string;
91
- severity: string;
92
- relevance_score?: number;
93
- }>;
94
- total_count: number;
95
67
  }>>;
96
68
  }
97
- export declare function createFindingsMethods(request: RequestFn): FindingsMethods;
69
+ export declare function createFindingsMethods(proxy: ProxyFn): FindingsMethods;
@@ -1,55 +1,36 @@
1
1
  /**
2
2
  * Findings API Methods
3
3
  *
4
- * Methods for audit findings and knowledge base management:
5
- * - getFindings: List findings for a project
6
- * - getFinding: Get a specific finding
7
- * - addFinding: Create a new finding
8
- * - updateFinding: Update an existing finding
9
- * - deleteFinding: Delete a finding
10
- * - getFindingsStats: Get findings statistics
11
- * - queryKnowledgeBase: Search findings as knowledge base
4
+ * Handles security findings, code quality issues, and audit findings.
12
5
  */
13
- export function createFindingsMethods(request) {
6
+ export function createFindingsMethods(proxy) {
14
7
  return {
15
8
  async getFindings(projectId, params) {
16
- return request('/api/mcp/projects/{id}/findings', 'GET', {
17
- path: { id: projectId },
18
- query: params,
9
+ return proxy('get_findings', {
10
+ project_id: projectId,
11
+ ...params
19
12
  });
20
13
  },
21
14
  async getFinding(findingId) {
22
- return request('/api/mcp/findings/{id}', 'GET', {
23
- path: { id: findingId },
24
- });
25
- },
26
- async addFinding(params) {
27
- return request('/api/mcp/projects/{id}/findings', 'POST', {
28
- path: { id: params.project_id },
29
- body: params,
30
- });
31
- },
32
- async updateFinding(findingId, params) {
33
- return request('/api/mcp/findings/{id}', 'PATCH', {
34
- path: { id: findingId },
35
- body: params,
36
- });
37
- },
38
- async deleteFinding(findingId) {
39
- return request('/api/mcp/findings/{id}', 'DELETE', {
40
- path: { id: findingId },
41
- });
15
+ return proxy('get_finding', { finding_id: findingId });
42
16
  },
43
17
  async getFindingsStats(projectId) {
44
- return request('/api/mcp/projects/{id}/findings/stats', 'GET', {
45
- path: { id: projectId },
46
- });
18
+ return proxy('get_findings_stats', { project_id: projectId });
47
19
  },
48
- async queryKnowledgeBase(projectId, params) {
49
- return request('/api/mcp/projects/{id}/findings/query', 'POST', {
50
- path: { id: projectId },
51
- body: params,
20
+ async addFinding(projectId, params, sessionId) {
21
+ return proxy('add_finding', {
22
+ project_id: projectId,
23
+ ...params
24
+ }, sessionId ? { session_id: sessionId } : undefined);
25
+ },
26
+ async updateFinding(findingId, updates) {
27
+ return proxy('update_finding', {
28
+ finding_id: findingId,
29
+ ...updates
52
30
  });
53
31
  },
32
+ async deleteFinding(findingId) {
33
+ return proxy('delete_finding', { finding_id: findingId });
34
+ }
54
35
  };
55
36
  }
@@ -18,6 +18,8 @@ import { type IdeasMethods } from './ideas.js';
18
18
  import { type TasksMethods } from './tasks.js';
19
19
  import { type FindingsMethods } from './findings.js';
20
20
  import { type MilestonesMethods } from './milestones.js';
21
+ import { type ValidationMethods } from './validation.js';
22
+ import { type FallbackMethods } from './fallback.js';
21
23
  export type { ApiClientConfig, ApiResponse, RetryConfig, RequestFn, ProxyFn } from './types.js';
22
24
  export type { SessionMethods } from './session.js';
23
25
  export type { ProjectMethods } from './project.js';
@@ -30,10 +32,12 @@ export type { IdeasMethods } from './ideas.js';
30
32
  export type { TasksMethods } from './tasks.js';
31
33
  export type { FindingsMethods } from './findings.js';
32
34
  export type { MilestonesMethods } from './milestones.js';
35
+ export type { ValidationMethods } from './validation.js';
36
+ export type { FallbackMethods } from './fallback.js';
33
37
  /**
34
38
  * Combined interface for all API methods
35
39
  */
36
- export interface VibescopeApiClientMethods extends SessionMethods, ProjectMethods, BlockersMethods, CostMethods, WorktreesMethods, DiscoveryMethods, DecisionsMethods, IdeasMethods, TasksMethods, Omit<FindingsMethods, 'queryKnowledgeBase'>, MilestonesMethods {
40
+ export interface VibescopeApiClientMethods extends SessionMethods, ProjectMethods, BlockersMethods, CostMethods, WorktreesMethods, DiscoveryMethods, DecisionsMethods, IdeasMethods, TasksMethods, FindingsMethods, MilestonesMethods, ValidationMethods, FallbackMethods {
37
41
  }
38
42
  export declare class VibescopeApiClient implements VibescopeApiClientMethods {
39
43
  private apiKey;
@@ -50,6 +54,8 @@ export declare class VibescopeApiClient implements VibescopeApiClientMethods {
50
54
  private tasksMethods;
51
55
  private findingsMethods;
52
56
  private milestonesMethods;
57
+ private validationMethods;
58
+ private fallbackMethods;
53
59
  constructor(config: ApiClientConfig);
54
60
  private request;
55
61
  /**
@@ -574,11 +580,7 @@ export declare class VibescopeApiClient implements VibescopeApiClientMethods {
574
580
  estimated_minutes?: number;
575
581
  started_at?: string;
576
582
  completed_at?: string;
577
- git_branch
578
- /**
579
- * Combined interface for all API methods
580
- */
581
- ?: string;
583
+ git_branch?: string;
582
584
  blocking?: boolean;
583
585
  references?: Array<{
584
586
  url: string;
@@ -755,78 +757,69 @@ export declare class VibescopeApiClient implements VibescopeApiClientMethods {
755
757
  }>;
756
758
  }>>;
757
759
  getFindings: (projectId: string, params?: Parameters<FindingsMethods["getFindings"]>[1]) => Promise<ApiResponse<{
758
- findings: Array<{
759
- id: string;
760
- title: string;
761
- description?: string;
762
- category: string;
763
- severity: string;
764
- status: string;
765
- created_at: string;
766
- updated_at?: string;
767
- related_task_id?: string;
768
- }>;
769
- total_count: number;
770
- has_more: boolean;
760
+ findings: import("./findings.js").Finding[];
761
+ total_count?: number;
762
+ has_more?: boolean;
771
763
  }>>;
772
764
  getFinding: (findingId: string) => Promise<ApiResponse<{
773
- id: string;
774
- title: string;
775
- description?: string;
776
- category: string;
777
- severity: string;
778
- status: string;
779
- created_at: string;
780
- updated_at?: string;
781
- related_task_id?: string;
765
+ finding: import("./findings.js").Finding;
782
766
  }>>;
783
- addFinding: (params: Parameters<FindingsMethods["addFinding"]>[0]) => Promise<ApiResponse<{
767
+ getFindingsStats: (projectId: string) => Promise<ApiResponse<import("./findings.js").FindingsStats>>;
768
+ addFinding: (projectId: string, params: Parameters<FindingsMethods["addFinding"]>[1], sessionId?: string) => Promise<ApiResponse<{
784
769
  success: boolean;
785
770
  finding_id: string;
786
771
  }>>;
787
- updateFinding: (findingId: string, params: Parameters<FindingsMethods["updateFinding"]>[1]) => Promise<ApiResponse<{
772
+ updateFinding: (findingId: string, updates: Parameters<FindingsMethods["updateFinding"]>[1]) => Promise<ApiResponse<{
788
773
  success: boolean;
789
774
  finding_id: string;
790
775
  }>>;
791
776
  deleteFinding: (findingId: string) => Promise<ApiResponse<{
792
777
  success: boolean;
793
- finding_id: string;
794
778
  }>>;
795
- getFindingsStats: (projectId: string) => Promise<ApiResponse<{
796
- total: number;
797
- by_severity: Record<string, number>;
798
- by_category: Record<string, number>;
799
- by_status: Record<string, number>;
779
+ getMilestones: (taskId: string) => Promise<ApiResponse<{
780
+ milestones: import("./milestones.js").Milestone[];
781
+ stats: import("./milestones.js").MilestoneStats;
800
782
  }>>;
801
- getMilestones: (projectId: string, params?: Parameters<MilestonesMethods["getMilestones"]>[1]) => Promise<ApiResponse<{
802
- milestones: Array<{
783
+ addMilestone: (taskId: string, params: Parameters<MilestonesMethods["addMilestone"]>[1], sessionId?: string) => Promise<ApiResponse<{
784
+ success: boolean;
785
+ milestone_id: string;
786
+ }>>;
787
+ updateMilestone: (milestoneId: string, updates: Parameters<MilestonesMethods["updateMilestone"]>[1]) => Promise<ApiResponse<{
788
+ success: boolean;
789
+ milestone: {
803
790
  id: string;
804
791
  title: string;
805
- description?: string;
806
- due_date?: string;
807
792
  status: string;
808
- created_at: string;
809
- completed_at?: string;
810
- }>;
811
- total_count: number;
812
- has_more: boolean;
793
+ };
813
794
  }>>;
814
- addMilestone: (params: Parameters<MilestonesMethods["addMilestone"]>[0]) => Promise<ApiResponse<{
795
+ completeMilestone: (milestoneId: string) => Promise<ApiResponse<{
815
796
  success: boolean;
816
- milestone_id: string;
797
+ milestone: {
798
+ id: string;
799
+ title: string;
800
+ status: string;
801
+ };
817
802
  }>>;
818
- updateMilestone: (milestoneId: string, params: Parameters<MilestonesMethods["updateMilestone"]>[1]) => Promise<ApiResponse<{
803
+ deleteMilestone: (milestoneId: string) => Promise<ApiResponse<{
819
804
  success: boolean;
820
- milestone_id: string;
821
805
  }>>;
822
- completeMilestone: (milestoneId: string, params?: Parameters<MilestonesMethods["completeMilestone"]>[1]) => Promise<ApiResponse<{
806
+ getTasksAwaitingValidation: (projectId: string) => Promise<ApiResponse<{
807
+ tasks: import("./validation.js").TaskAwaitingValidation[];
808
+ }>>;
809
+ claimValidation: (taskId: string, sessionId?: string) => Promise<ApiResponse<{
823
810
  success: boolean;
824
- milestone_id: string;
825
- completed_at: string;
811
+ task_id: string;
826
812
  }>>;
827
- deleteMilestone: (milestoneId: string) => Promise<ApiResponse<{
813
+ validateTask: (taskId: string, params: Parameters<ValidationMethods["validateTask"]>[1], sessionId?: string) => Promise<ApiResponse<{
814
+ success: boolean;
815
+ approved: boolean;
816
+ task_id: string;
817
+ message?: string;
818
+ workflow?: string;
819
+ }>>;
820
+ startFallbackActivity: (projectId: string, activity: string, sessionId?: string) => Promise<ApiResponse<import("./fallback.js").FallbackActivityResult>>;
821
+ stopFallbackActivity: (projectId: string, summary?: string, sessionId?: string) => Promise<ApiResponse<{
828
822
  success: boolean;
829
- milestone_id: string;
830
823
  }>>;
831
824
  }
832
825
  export declare function getApiClient(): VibescopeApiClient;
@@ -17,6 +17,8 @@ import { createIdeasMethods } from './ideas.js';
17
17
  import { createTasksMethods } from './tasks.js';
18
18
  import { createFindingsMethods } from './findings.js';
19
19
  import { createMilestonesMethods } from './milestones.js';
20
+ import { createValidationMethods } from './validation.js';
21
+ import { createFallbackMethods } from './fallback.js';
20
22
  const DEFAULT_API_URL = 'https://vibescope.dev';
21
23
  // Retry configuration defaults
22
24
  const DEFAULT_RETRY_STATUS_CODES = [429, 503, 504];
@@ -56,6 +58,8 @@ export class VibescopeApiClient {
56
58
  tasksMethods;
57
59
  findingsMethods;
58
60
  milestonesMethods;
61
+ validationMethods;
62
+ fallbackMethods;
59
63
  constructor(config) {
60
64
  this.apiKey = config.apiKey;
61
65
  this.baseUrl = config.baseUrl || process.env.VIBESCOPE_API_URL || DEFAULT_API_URL;
@@ -79,8 +83,10 @@ export class VibescopeApiClient {
79
83
  this.decisionsMethods = createDecisionsMethods(proxy);
80
84
  this.ideasMethods = createIdeasMethods(proxy);
81
85
  this.tasksMethods = createTasksMethods(request, proxy);
82
- this.findingsMethods = createFindingsMethods(request);
83
- this.milestonesMethods = createMilestonesMethods(request);
86
+ this.findingsMethods = createFindingsMethods(proxy);
87
+ this.milestonesMethods = createMilestonesMethods(proxy);
88
+ this.validationMethods = createValidationMethods(proxy);
89
+ this.fallbackMethods = createFallbackMethods(proxy);
84
90
  }
85
91
  async request(method, path, body) {
86
92
  const url = `${this.baseUrl}${path}`;
@@ -253,19 +259,29 @@ export class VibescopeApiClient {
253
259
  // ============================================================================
254
260
  getFindings = (projectId, params) => this.findingsMethods.getFindings(projectId, params);
255
261
  getFinding = (findingId) => this.findingsMethods.getFinding(findingId);
256
- addFinding = (params) => this.findingsMethods.addFinding(params);
257
- updateFinding = (findingId, params) => this.findingsMethods.updateFinding(findingId, params);
258
- deleteFinding = (findingId) => this.findingsMethods.deleteFinding(findingId);
259
262
  getFindingsStats = (projectId) => this.findingsMethods.getFindingsStats(projectId);
260
- // queryKnowledgeBase from FindingsMethods removed - duplicates DiscoveryMethods.queryKnowledgeBase (delegated above)
263
+ addFinding = (projectId, params, sessionId) => this.findingsMethods.addFinding(projectId, params, sessionId);
264
+ updateFinding = (findingId, updates) => this.findingsMethods.updateFinding(findingId, updates);
265
+ deleteFinding = (findingId) => this.findingsMethods.deleteFinding(findingId);
261
266
  // ============================================================================
262
267
  // Milestones methods (delegated)
263
268
  // ============================================================================
264
- getMilestones = (projectId, params) => this.milestonesMethods.getMilestones(projectId, params);
265
- addMilestone = (params) => this.milestonesMethods.addMilestone(params);
266
- updateMilestone = (milestoneId, params) => this.milestonesMethods.updateMilestone(milestoneId, params);
267
- completeMilestone = (milestoneId, params) => this.milestonesMethods.completeMilestone(milestoneId, params);
269
+ getMilestones = (taskId) => this.milestonesMethods.getMilestones(taskId);
270
+ addMilestone = (taskId, params, sessionId) => this.milestonesMethods.addMilestone(taskId, params, sessionId);
271
+ updateMilestone = (milestoneId, updates) => this.milestonesMethods.updateMilestone(milestoneId, updates);
272
+ completeMilestone = (milestoneId) => this.milestonesMethods.completeMilestone(milestoneId);
268
273
  deleteMilestone = (milestoneId) => this.milestonesMethods.deleteMilestone(milestoneId);
274
+ // ============================================================================
275
+ // Validation methods (delegated)
276
+ // ============================================================================
277
+ getTasksAwaitingValidation = (projectId) => this.validationMethods.getTasksAwaitingValidation(projectId);
278
+ claimValidation = (taskId, sessionId) => this.validationMethods.claimValidation(taskId, sessionId);
279
+ validateTask = (taskId, params, sessionId) => this.validationMethods.validateTask(taskId, params, sessionId);
280
+ // ============================================================================
281
+ // Fallback activity methods (delegated)
282
+ // ============================================================================
283
+ startFallbackActivity = (projectId, activity, sessionId) => this.fallbackMethods.startFallbackActivity(projectId, activity, sessionId);
284
+ stopFallbackActivity = (projectId, summary, sessionId) => this.fallbackMethods.stopFallbackActivity(projectId, summary, sessionId);
269
285
  }
270
286
  // Singleton instance
271
287
  let apiClient = null;
@@ -1,60 +1,59 @@
1
1
  /**
2
2
  * Milestones API Methods
3
3
  *
4
- * Methods for milestone management:
5
- * - getMilestones: List milestones for a project
6
- * - addMilestone: Create a new milestone
7
- * - updateMilestone: Update an existing milestone
8
- * - completeMilestone: Mark milestone as completed
9
- * - deleteMilestone: Delete a milestone
4
+ * Handles task milestones for tracking granular progress within tasks.
10
5
  */
11
- import type { ApiResponse, RequestFn } from './types.js';
6
+ import type { ApiResponse, ProxyFn } from './types.js';
7
+ export interface Milestone {
8
+ id: string;
9
+ title: string;
10
+ description?: string;
11
+ status: string;
12
+ order_index: number;
13
+ created_at: string;
14
+ completed_at?: string;
15
+ }
16
+ export interface MilestoneStats {
17
+ total: number;
18
+ completed: number;
19
+ progress_percentage: number;
20
+ }
12
21
  export interface MilestonesMethods {
13
- getMilestones(projectId: string, params?: {
14
- status?: 'pending' | 'completed';
15
- limit?: number;
16
- offset?: number;
17
- }): Promise<ApiResponse<{
18
- milestones: Array<{
19
- id: string;
20
- title: string;
21
- description?: string;
22
- due_date?: string;
23
- status: string;
24
- created_at: string;
25
- completed_at?: string;
26
- }>;
27
- total_count: number;
28
- has_more: boolean;
22
+ getMilestones(taskId: string): Promise<ApiResponse<{
23
+ milestones: Milestone[];
24
+ stats: MilestoneStats;
29
25
  }>>;
30
- addMilestone(params: {
31
- project_id: string;
26
+ addMilestone(taskId: string, params: {
32
27
  title: string;
33
28
  description?: string;
34
- due_date?: string;
35
- }): Promise<ApiResponse<{
29
+ order_index?: number;
30
+ }, sessionId?: string): Promise<ApiResponse<{
36
31
  success: boolean;
37
32
  milestone_id: string;
38
33
  }>>;
39
- updateMilestone(milestoneId: string, params: {
34
+ updateMilestone(milestoneId: string, updates: {
40
35
  title?: string;
41
36
  description?: string;
42
- due_date?: string;
43
37
  status?: string;
38
+ order_index?: number;
44
39
  }): Promise<ApiResponse<{
45
40
  success: boolean;
46
- milestone_id: string;
41
+ milestone: {
42
+ id: string;
43
+ title: string;
44
+ status: string;
45
+ };
47
46
  }>>;
48
- completeMilestone(milestoneId: string, params?: {
49
- completion_note?: string;
50
- }): Promise<ApiResponse<{
47
+ completeMilestone(milestoneId: string): Promise<ApiResponse<{
51
48
  success: boolean;
52
- milestone_id: string;
53
- completed_at: string;
49
+ milestone: {
50
+ id: string;
51
+ title: string;
52
+ status: string;
53
+ };
54
54
  }>>;
55
55
  deleteMilestone(milestoneId: string): Promise<ApiResponse<{
56
56
  success: boolean;
57
- milestone_id: string;
58
57
  }>>;
59
58
  }
60
- export declare function createMilestonesMethods(request: RequestFn): MilestonesMethods;
59
+ export declare function createMilestonesMethods(proxy: ProxyFn): MilestonesMethods;
@@ -1,43 +1,30 @@
1
1
  /**
2
2
  * Milestones API Methods
3
3
  *
4
- * Methods for milestone management:
5
- * - getMilestones: List milestones for a project
6
- * - addMilestone: Create a new milestone
7
- * - updateMilestone: Update an existing milestone
8
- * - completeMilestone: Mark milestone as completed
9
- * - deleteMilestone: Delete a milestone
4
+ * Handles task milestones for tracking granular progress within tasks.
10
5
  */
11
- export function createMilestonesMethods(request) {
6
+ export function createMilestonesMethods(proxy) {
12
7
  return {
13
- async getMilestones(projectId, params) {
14
- return request('/api/mcp/projects/{id}/milestones', 'GET', {
15
- path: { id: projectId },
16
- query: params,
17
- });
8
+ async getMilestones(taskId) {
9
+ return proxy('get_milestones', { task_id: taskId });
18
10
  },
19
- async addMilestone(params) {
20
- return request('/api/mcp/projects/{id}/milestones', 'POST', {
21
- path: { id: params.project_id },
22
- body: params,
23
- });
11
+ async addMilestone(taskId, params, sessionId) {
12
+ return proxy('add_milestone', {
13
+ task_id: taskId,
14
+ ...params
15
+ }, sessionId ? { session_id: sessionId } : undefined);
24
16
  },
25
- async updateMilestone(milestoneId, params) {
26
- return request('/api/mcp/milestones/{id}', 'PATCH', {
27
- path: { id: milestoneId },
28
- body: params,
17
+ async updateMilestone(milestoneId, updates) {
18
+ return proxy('update_milestone', {
19
+ milestone_id: milestoneId,
20
+ ...updates
29
21
  });
30
22
  },
31
- async completeMilestone(milestoneId, params) {
32
- return request('/api/mcp/milestones/{id}/complete', 'POST', {
33
- path: { id: milestoneId },
34
- body: params,
35
- });
23
+ async completeMilestone(milestoneId) {
24
+ return proxy('complete_milestone', { milestone_id: milestoneId });
36
25
  },
37
26
  async deleteMilestone(milestoneId) {
38
- return request('/api/mcp/milestones/{id}', 'DELETE', {
39
- path: { id: milestoneId },
40
- });
41
- },
27
+ return proxy('delete_milestone', { milestone_id: milestoneId });
28
+ }
42
29
  };
43
30
  }