@vibescope/mcp-server 0.3.0 → 0.4.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.
- package/dist/api-client/blockers.d.ts +46 -0
- package/dist/api-client/blockers.js +43 -0
- package/dist/api-client/cost.d.ts +112 -0
- package/dist/api-client/cost.js +76 -0
- package/dist/api-client/decisions.d.ts +55 -0
- package/dist/api-client/decisions.js +32 -0
- package/dist/api-client/discovery.d.ts +62 -0
- package/dist/api-client/discovery.js +21 -0
- package/dist/api-client/ideas.d.ts +75 -0
- package/dist/api-client/ideas.js +36 -0
- package/dist/api-client/index.d.ts +749 -0
- package/dist/api-client/index.js +261 -0
- package/dist/api-client/project.d.ts +132 -0
- package/dist/api-client/project.js +45 -0
- package/dist/api-client/session.d.ts +163 -0
- package/dist/api-client/session.js +52 -0
- package/dist/api-client/tasks.d.ts +328 -0
- package/dist/api-client/tasks.js +132 -0
- package/dist/api-client/types.d.ts +25 -0
- package/dist/api-client/types.js +4 -0
- package/dist/api-client/worktrees.d.ts +33 -0
- package/dist/api-client/worktrees.js +26 -0
- package/dist/api-client.d.ts +9 -0
- package/dist/api-client.js +104 -25
- package/dist/handlers/cloud-agents.d.ts +21 -0
- package/dist/handlers/cloud-agents.js +91 -0
- package/dist/handlers/discovery.js +7 -0
- package/dist/handlers/index.d.ts +1 -0
- package/dist/handlers/index.js +3 -0
- package/dist/handlers/session.js +3 -1
- package/dist/handlers/tasks.js +10 -12
- package/dist/handlers/types.d.ts +2 -1
- package/dist/handlers/validation.js +5 -1
- package/dist/index.js +8 -3
- package/dist/token-tracking.js +2 -2
- package/dist/tools/blockers.d.ts +13 -0
- package/dist/tools/blockers.js +119 -0
- package/dist/tools/bodies-of-work.d.ts +19 -0
- package/dist/tools/bodies-of-work.js +280 -0
- package/dist/tools/cloud-agents.d.ts +9 -0
- package/dist/tools/cloud-agents.js +67 -0
- package/dist/tools/connectors.d.ts +14 -0
- package/dist/tools/connectors.js +188 -0
- package/dist/tools/cost.d.ts +11 -0
- package/dist/tools/cost.js +108 -0
- package/dist/tools/decisions.d.ts +12 -0
- package/dist/tools/decisions.js +108 -0
- package/dist/tools/deployment.d.ts +24 -0
- package/dist/tools/deployment.js +439 -0
- package/dist/tools/discovery.d.ts +10 -0
- package/dist/tools/discovery.js +73 -0
- package/dist/tools/fallback.d.ts +11 -0
- package/dist/tools/fallback.js +108 -0
- package/dist/tools/file-checkouts.d.ts +13 -0
- package/dist/tools/file-checkouts.js +141 -0
- package/dist/tools/findings.d.ts +13 -0
- package/dist/tools/findings.js +98 -0
- package/dist/tools/git-issues.d.ts +11 -0
- package/dist/tools/git-issues.js +127 -0
- package/dist/tools/ideas.d.ts +13 -0
- package/dist/tools/ideas.js +159 -0
- package/dist/tools/index.d.ts +71 -0
- package/dist/tools/index.js +98 -0
- package/dist/tools/milestones.d.ts +12 -0
- package/dist/tools/milestones.js +115 -0
- package/dist/tools/organizations.d.ts +17 -0
- package/dist/tools/organizations.js +221 -0
- package/dist/tools/progress.d.ts +9 -0
- package/dist/tools/progress.js +70 -0
- package/dist/tools/project.d.ts +13 -0
- package/dist/tools/project.js +199 -0
- package/dist/tools/requests.d.ts +10 -0
- package/dist/tools/requests.js +65 -0
- package/dist/tools/roles.d.ts +11 -0
- package/dist/tools/roles.js +109 -0
- package/dist/tools/session.d.ts +15 -0
- package/dist/tools/session.js +178 -0
- package/dist/tools/sprints.d.ts +18 -0
- package/dist/tools/sprints.js +295 -0
- package/dist/tools/tasks.d.ts +27 -0
- package/dist/tools/tasks.js +539 -0
- package/dist/tools/types.d.ts +7 -0
- package/dist/tools/types.js +6 -0
- package/dist/tools/validation.d.ts +10 -0
- package/dist/tools/validation.js +72 -0
- package/dist/tools/worktrees.d.ts +9 -0
- package/dist/tools/worktrees.js +63 -0
- package/dist/utils.d.ts +66 -0
- package/dist/utils.js +102 -0
- package/docs/TOOLS.md +55 -2
- package/package.json +2 -2
- package/scripts/generate-docs.ts +1 -1
- package/src/api-client/blockers.ts +86 -0
- package/src/api-client/cost.ts +185 -0
- package/src/api-client/decisions.ts +87 -0
- package/src/api-client/discovery.ts +81 -0
- package/src/api-client/ideas.ts +112 -0
- package/src/api-client/index.ts +344 -0
- package/src/api-client/project.ts +179 -0
- package/src/api-client/session.ts +220 -0
- package/src/api-client/tasks.ts +450 -0
- package/src/api-client/types.ts +32 -0
- package/src/api-client/worktrees.ts +53 -0
- package/src/api-client.test.ts +136 -9
- package/src/api-client.ts +125 -27
- package/src/handlers/__test-utils__.ts +2 -0
- package/src/handlers/cloud-agents.ts +138 -0
- package/src/handlers/discovery.ts +7 -0
- package/src/handlers/index.ts +3 -0
- package/src/handlers/session.ts +3 -1
- package/src/handlers/tasks.ts +10 -12
- package/src/handlers/tool-categories.test.ts +1 -1
- package/src/handlers/types.ts +2 -1
- package/src/handlers/validation.ts +6 -1
- package/src/index.test.ts +2 -2
- package/src/index.ts +8 -2
- package/src/token-tracking.ts +3 -2
- package/src/tools/blockers.ts +122 -0
- package/src/tools/bodies-of-work.ts +283 -0
- package/src/tools/cloud-agents.ts +70 -0
- package/src/tools/connectors.ts +191 -0
- package/src/tools/cost.ts +111 -0
- package/src/tools/decisions.ts +111 -0
- package/src/tools/deployment.ts +442 -0
- package/src/tools/discovery.ts +76 -0
- package/src/tools/fallback.ts +111 -0
- package/src/tools/file-checkouts.ts +145 -0
- package/src/tools/findings.ts +101 -0
- package/src/tools/git-issues.ts +130 -0
- package/src/tools/ideas.ts +162 -0
- package/src/tools/index.ts +131 -0
- package/src/tools/milestones.ts +118 -0
- package/src/tools/organizations.ts +224 -0
- package/src/tools/progress.ts +73 -0
- package/src/tools/project.ts +202 -0
- package/src/tools/requests.ts +68 -0
- package/src/tools/roles.ts +112 -0
- package/src/tools/session.ts +181 -0
- package/src/tools/sprints.ts +298 -0
- package/src/tools/tasks.ts +542 -0
- package/src/tools/tools.test.ts +222 -0
- package/src/tools/types.ts +9 -0
- package/src/tools/validation.ts +75 -0
- package/src/tools/worktrees.ts +66 -0
- package/src/tools.test.ts +1 -1
- package/src/utils.test.ts +229 -0
- package/src/utils.ts +117 -0
- package/dist/tools.d.ts +0 -2
- package/dist/tools.js +0 -3602
- package/src/tools.ts +0 -3607
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blockers API Methods
|
|
3
|
+
*
|
|
4
|
+
* Methods for blocker management:
|
|
5
|
+
* - getBlockers: List blockers for a project
|
|
6
|
+
* - addBlocker: Create a new blocker
|
|
7
|
+
* - resolveBlocker: Mark blocker as resolved
|
|
8
|
+
* - deleteBlocker: Delete a blocker
|
|
9
|
+
* - getBlockersStats: Get blocker statistics
|
|
10
|
+
*/
|
|
11
|
+
import type { ApiResponse, RequestFn } from './types.js';
|
|
12
|
+
export interface BlockersMethods {
|
|
13
|
+
getBlockers(projectId: string, params?: {
|
|
14
|
+
status?: 'open' | 'resolved';
|
|
15
|
+
limit?: number;
|
|
16
|
+
offset?: number;
|
|
17
|
+
}): Promise<ApiResponse<{
|
|
18
|
+
blockers: Array<{
|
|
19
|
+
id: string;
|
|
20
|
+
description: string;
|
|
21
|
+
status: string;
|
|
22
|
+
created_at: string;
|
|
23
|
+
resolved_at?: string;
|
|
24
|
+
resolution_note?: string;
|
|
25
|
+
}>;
|
|
26
|
+
total_count: number;
|
|
27
|
+
has_more: boolean;
|
|
28
|
+
}>>;
|
|
29
|
+
addBlocker(projectId: string, description: string, sessionId?: string): Promise<ApiResponse<{
|
|
30
|
+
success: boolean;
|
|
31
|
+
blocker_id: string;
|
|
32
|
+
}>>;
|
|
33
|
+
resolveBlocker(blockerId: string, resolutionNote?: string): Promise<ApiResponse<{
|
|
34
|
+
success: boolean;
|
|
35
|
+
blocker_id: string;
|
|
36
|
+
}>>;
|
|
37
|
+
deleteBlocker(blockerId: string): Promise<ApiResponse<{
|
|
38
|
+
success: boolean;
|
|
39
|
+
}>>;
|
|
40
|
+
getBlockersStats(projectId: string): Promise<ApiResponse<{
|
|
41
|
+
total: number;
|
|
42
|
+
open: number;
|
|
43
|
+
resolved: number;
|
|
44
|
+
}>>;
|
|
45
|
+
}
|
|
46
|
+
export declare function createBlockersMethods(request: RequestFn): BlockersMethods;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blockers API Methods
|
|
3
|
+
*
|
|
4
|
+
* Methods for blocker management:
|
|
5
|
+
* - getBlockers: List blockers for a project
|
|
6
|
+
* - addBlocker: Create a new blocker
|
|
7
|
+
* - resolveBlocker: Mark blocker as resolved
|
|
8
|
+
* - deleteBlocker: Delete a blocker
|
|
9
|
+
* - getBlockersStats: Get blocker statistics
|
|
10
|
+
*/
|
|
11
|
+
export function createBlockersMethods(request) {
|
|
12
|
+
return {
|
|
13
|
+
async getBlockers(projectId, params) {
|
|
14
|
+
const queryParams = new URLSearchParams();
|
|
15
|
+
if (params?.status)
|
|
16
|
+
queryParams.set('status', params.status);
|
|
17
|
+
if (params?.limit)
|
|
18
|
+
queryParams.set('limit', params.limit.toString());
|
|
19
|
+
if (params?.offset)
|
|
20
|
+
queryParams.set('offset', params.offset.toString());
|
|
21
|
+
const query = queryParams.toString();
|
|
22
|
+
const url = `/api/mcp/projects/${projectId}/blockers${query ? `?${query}` : ''}`;
|
|
23
|
+
return request('GET', url);
|
|
24
|
+
},
|
|
25
|
+
async addBlocker(projectId, description, sessionId) {
|
|
26
|
+
return request('POST', `/api/mcp/projects/${projectId}/blockers`, {
|
|
27
|
+
description,
|
|
28
|
+
session_id: sessionId
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
async resolveBlocker(blockerId, resolutionNote) {
|
|
32
|
+
return request('PATCH', `/api/mcp/blockers/${blockerId}/resolve`, {
|
|
33
|
+
resolution_note: resolutionNote
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
async deleteBlocker(blockerId) {
|
|
37
|
+
return request('DELETE', `/api/mcp/blockers/${blockerId}`);
|
|
38
|
+
},
|
|
39
|
+
async getBlockersStats(projectId) {
|
|
40
|
+
return request('GET', `/api/mcp/projects/${projectId}/blockers/stats`);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cost API Methods
|
|
3
|
+
*
|
|
4
|
+
* Methods for cost tracking and alerts:
|
|
5
|
+
* - getCostSummary: Get cost summary by period
|
|
6
|
+
* - getCostAlerts: List cost alerts
|
|
7
|
+
* - addCostAlert: Create a cost alert
|
|
8
|
+
* - updateCostAlert: Update a cost alert
|
|
9
|
+
* - deleteCostAlert: Delete a cost alert
|
|
10
|
+
* - getTaskCosts: Get costs by task
|
|
11
|
+
* - getBodyOfWorkCosts: Get costs by body of work
|
|
12
|
+
* - getSprintCosts: Get costs by sprint
|
|
13
|
+
* - getTokenUsage: Get token usage stats
|
|
14
|
+
* - reportTokenUsage: Report token usage
|
|
15
|
+
*/
|
|
16
|
+
import type { ApiResponse, RequestFn } from './types.js';
|
|
17
|
+
export interface CostMethods {
|
|
18
|
+
getCostSummary(projectId: string, params?: {
|
|
19
|
+
period?: 'daily' | 'weekly' | 'monthly';
|
|
20
|
+
limit?: number;
|
|
21
|
+
}): Promise<ApiResponse<{
|
|
22
|
+
summary: Array<{
|
|
23
|
+
period: string;
|
|
24
|
+
total_cost: number;
|
|
25
|
+
input_tokens: number;
|
|
26
|
+
output_tokens: number;
|
|
27
|
+
api_calls: number;
|
|
28
|
+
}>;
|
|
29
|
+
}>>;
|
|
30
|
+
getCostAlerts(): Promise<ApiResponse<{
|
|
31
|
+
alerts: Array<{
|
|
32
|
+
id: string;
|
|
33
|
+
project_id?: string;
|
|
34
|
+
threshold_amount: number;
|
|
35
|
+
threshold_period: string;
|
|
36
|
+
alert_type: string;
|
|
37
|
+
enabled: boolean;
|
|
38
|
+
}>;
|
|
39
|
+
}>>;
|
|
40
|
+
addCostAlert(params: {
|
|
41
|
+
project_id?: string;
|
|
42
|
+
threshold_amount: number;
|
|
43
|
+
threshold_period: 'daily' | 'weekly' | 'monthly';
|
|
44
|
+
alert_type?: 'warning' | 'critical';
|
|
45
|
+
}): Promise<ApiResponse<{
|
|
46
|
+
success: boolean;
|
|
47
|
+
alert_id: string;
|
|
48
|
+
}>>;
|
|
49
|
+
updateCostAlert(alertId: string, updates: {
|
|
50
|
+
threshold_amount?: number;
|
|
51
|
+
threshold_period?: 'daily' | 'weekly' | 'monthly';
|
|
52
|
+
alert_type?: 'warning' | 'critical';
|
|
53
|
+
enabled?: boolean;
|
|
54
|
+
}): Promise<ApiResponse<{
|
|
55
|
+
success: boolean;
|
|
56
|
+
alert_id: string;
|
|
57
|
+
}>>;
|
|
58
|
+
deleteCostAlert(alertId: string): Promise<ApiResponse<{
|
|
59
|
+
success: boolean;
|
|
60
|
+
}>>;
|
|
61
|
+
getTaskCosts(projectId: string, limit?: number): Promise<ApiResponse<{
|
|
62
|
+
tasks: Array<{
|
|
63
|
+
task_id: string;
|
|
64
|
+
task_title: string;
|
|
65
|
+
total_cost: number;
|
|
66
|
+
input_tokens: number;
|
|
67
|
+
output_tokens: number;
|
|
68
|
+
}>;
|
|
69
|
+
}>>;
|
|
70
|
+
getBodyOfWorkCosts(params: {
|
|
71
|
+
body_of_work_id?: string;
|
|
72
|
+
project_id?: string;
|
|
73
|
+
limit?: number;
|
|
74
|
+
}): Promise<ApiResponse<{
|
|
75
|
+
bodies_of_work: Array<{
|
|
76
|
+
body_of_work_id: string;
|
|
77
|
+
title: string;
|
|
78
|
+
total_cost: number;
|
|
79
|
+
task_count: number;
|
|
80
|
+
}>;
|
|
81
|
+
}>>;
|
|
82
|
+
getSprintCosts(params: {
|
|
83
|
+
sprint_id?: string;
|
|
84
|
+
project_id?: string;
|
|
85
|
+
limit?: number;
|
|
86
|
+
}): Promise<ApiResponse<{
|
|
87
|
+
sprints: Array<{
|
|
88
|
+
sprint_id: string;
|
|
89
|
+
name: string;
|
|
90
|
+
total_cost: number;
|
|
91
|
+
task_count: number;
|
|
92
|
+
}>;
|
|
93
|
+
}>>;
|
|
94
|
+
getTokenUsage(): Promise<ApiResponse<{
|
|
95
|
+
session_tokens: {
|
|
96
|
+
input: number;
|
|
97
|
+
output: number;
|
|
98
|
+
};
|
|
99
|
+
estimated_cost: number;
|
|
100
|
+
}>>;
|
|
101
|
+
reportTokenUsage(sessionId: string, params: {
|
|
102
|
+
input_tokens: number;
|
|
103
|
+
output_tokens: number;
|
|
104
|
+
model?: string;
|
|
105
|
+
}): Promise<ApiResponse<{
|
|
106
|
+
success: boolean;
|
|
107
|
+
session_id: string;
|
|
108
|
+
total_input_tokens: number;
|
|
109
|
+
total_output_tokens: number;
|
|
110
|
+
}>>;
|
|
111
|
+
}
|
|
112
|
+
export declare function createCostMethods(request: RequestFn): CostMethods;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cost API Methods
|
|
3
|
+
*
|
|
4
|
+
* Methods for cost tracking and alerts:
|
|
5
|
+
* - getCostSummary: Get cost summary by period
|
|
6
|
+
* - getCostAlerts: List cost alerts
|
|
7
|
+
* - addCostAlert: Create a cost alert
|
|
8
|
+
* - updateCostAlert: Update a cost alert
|
|
9
|
+
* - deleteCostAlert: Delete a cost alert
|
|
10
|
+
* - getTaskCosts: Get costs by task
|
|
11
|
+
* - getBodyOfWorkCosts: Get costs by body of work
|
|
12
|
+
* - getSprintCosts: Get costs by sprint
|
|
13
|
+
* - getTokenUsage: Get token usage stats
|
|
14
|
+
* - reportTokenUsage: Report token usage
|
|
15
|
+
*/
|
|
16
|
+
export function createCostMethods(request) {
|
|
17
|
+
return {
|
|
18
|
+
async getCostSummary(projectId, params) {
|
|
19
|
+
const queryParams = new URLSearchParams();
|
|
20
|
+
if (params?.period)
|
|
21
|
+
queryParams.set('period', params.period);
|
|
22
|
+
if (params?.limit)
|
|
23
|
+
queryParams.set('limit', params.limit.toString());
|
|
24
|
+
const query = queryParams.toString();
|
|
25
|
+
const url = `/api/mcp/projects/${projectId}/cost-summary${query ? `?${query}` : ''}`;
|
|
26
|
+
return request('GET', url);
|
|
27
|
+
},
|
|
28
|
+
async getCostAlerts() {
|
|
29
|
+
return request('GET', '/api/mcp/cost-alerts');
|
|
30
|
+
},
|
|
31
|
+
async addCostAlert(params) {
|
|
32
|
+
return request('POST', '/api/mcp/cost-alerts', params);
|
|
33
|
+
},
|
|
34
|
+
async updateCostAlert(alertId, updates) {
|
|
35
|
+
return request('PATCH', `/api/mcp/cost-alerts/${alertId}`, updates);
|
|
36
|
+
},
|
|
37
|
+
async deleteCostAlert(alertId) {
|
|
38
|
+
return request('DELETE', `/api/mcp/cost-alerts/${alertId}`);
|
|
39
|
+
},
|
|
40
|
+
async getTaskCosts(projectId, limit) {
|
|
41
|
+
const url = limit
|
|
42
|
+
? `/api/mcp/projects/${projectId}/task-costs?limit=${limit}`
|
|
43
|
+
: `/api/mcp/projects/${projectId}/task-costs`;
|
|
44
|
+
return request('GET', url);
|
|
45
|
+
},
|
|
46
|
+
async getBodyOfWorkCosts(params) {
|
|
47
|
+
const queryParams = new URLSearchParams();
|
|
48
|
+
if (params.body_of_work_id)
|
|
49
|
+
queryParams.set('body_of_work_id', params.body_of_work_id);
|
|
50
|
+
if (params.project_id)
|
|
51
|
+
queryParams.set('project_id', params.project_id);
|
|
52
|
+
if (params.limit)
|
|
53
|
+
queryParams.set('limit', params.limit.toString());
|
|
54
|
+
return request('GET', `/api/mcp/cost/bodies-of-work?${queryParams.toString()}`);
|
|
55
|
+
},
|
|
56
|
+
async getSprintCosts(params) {
|
|
57
|
+
const queryParams = new URLSearchParams();
|
|
58
|
+
if (params.sprint_id)
|
|
59
|
+
queryParams.set('sprint_id', params.sprint_id);
|
|
60
|
+
if (params.project_id)
|
|
61
|
+
queryParams.set('project_id', params.project_id);
|
|
62
|
+
if (params.limit)
|
|
63
|
+
queryParams.set('limit', params.limit.toString());
|
|
64
|
+
return request('GET', `/api/mcp/cost/sprints?${queryParams.toString()}`);
|
|
65
|
+
},
|
|
66
|
+
async getTokenUsage() {
|
|
67
|
+
return request('GET', '/api/mcp/sessions/token-usage');
|
|
68
|
+
},
|
|
69
|
+
async reportTokenUsage(sessionId, params) {
|
|
70
|
+
return request('POST', '/api/mcp/sessions/token-usage', {
|
|
71
|
+
session_id: sessionId,
|
|
72
|
+
...params
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decisions API Methods
|
|
3
|
+
*
|
|
4
|
+
* Methods for decision tracking:
|
|
5
|
+
* - getDecisions: List decisions for a project
|
|
6
|
+
* - getDecision: Get a single decision
|
|
7
|
+
* - logDecision: Log a new decision
|
|
8
|
+
* - deleteDecision: Delete a decision
|
|
9
|
+
* - getDecisionsStats: Get decision statistics
|
|
10
|
+
*/
|
|
11
|
+
import type { ApiResponse, ProxyFn } from './types.js';
|
|
12
|
+
export interface DecisionsMethods {
|
|
13
|
+
getDecisions(projectId: string, options?: {
|
|
14
|
+
limit?: number;
|
|
15
|
+
offset?: number;
|
|
16
|
+
search_query?: string;
|
|
17
|
+
}): Promise<ApiResponse<{
|
|
18
|
+
decisions: Array<{
|
|
19
|
+
id: string;
|
|
20
|
+
title: string;
|
|
21
|
+
description: string;
|
|
22
|
+
rationale?: string;
|
|
23
|
+
alternatives_considered?: string[];
|
|
24
|
+
created_at: string;
|
|
25
|
+
}>;
|
|
26
|
+
total_count?: number;
|
|
27
|
+
has_more?: boolean;
|
|
28
|
+
}>>;
|
|
29
|
+
getDecision(decisionId: string): Promise<ApiResponse<{
|
|
30
|
+
decision: {
|
|
31
|
+
id: string;
|
|
32
|
+
title: string;
|
|
33
|
+
description: string;
|
|
34
|
+
rationale?: string;
|
|
35
|
+
alternatives_considered?: string[];
|
|
36
|
+
created_at: string;
|
|
37
|
+
};
|
|
38
|
+
}>>;
|
|
39
|
+
logDecision(projectId: string, params: {
|
|
40
|
+
title: string;
|
|
41
|
+
description: string;
|
|
42
|
+
rationale?: string;
|
|
43
|
+
alternatives_considered?: string[];
|
|
44
|
+
}, sessionId?: string): Promise<ApiResponse<{
|
|
45
|
+
success: boolean;
|
|
46
|
+
decision_id: string;
|
|
47
|
+
}>>;
|
|
48
|
+
deleteDecision(decisionId: string): Promise<ApiResponse<{
|
|
49
|
+
success: boolean;
|
|
50
|
+
}>>;
|
|
51
|
+
getDecisionsStats(projectId: string): Promise<ApiResponse<{
|
|
52
|
+
total: number;
|
|
53
|
+
}>>;
|
|
54
|
+
}
|
|
55
|
+
export declare function createDecisionsMethods(proxy: ProxyFn): DecisionsMethods;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decisions API Methods
|
|
3
|
+
*
|
|
4
|
+
* Methods for decision tracking:
|
|
5
|
+
* - getDecisions: List decisions for a project
|
|
6
|
+
* - getDecision: Get a single decision
|
|
7
|
+
* - logDecision: Log a new decision
|
|
8
|
+
* - deleteDecision: Delete a decision
|
|
9
|
+
* - getDecisionsStats: Get decision statistics
|
|
10
|
+
*/
|
|
11
|
+
export function createDecisionsMethods(proxy) {
|
|
12
|
+
return {
|
|
13
|
+
async getDecisions(projectId, options) {
|
|
14
|
+
return proxy('get_decisions', { project_id: projectId, ...options });
|
|
15
|
+
},
|
|
16
|
+
async getDecision(decisionId) {
|
|
17
|
+
return proxy('get_decision', { decision_id: decisionId });
|
|
18
|
+
},
|
|
19
|
+
async logDecision(projectId, params, sessionId) {
|
|
20
|
+
return proxy('log_decision', {
|
|
21
|
+
project_id: projectId,
|
|
22
|
+
...params
|
|
23
|
+
}, sessionId ? { session_id: sessionId } : undefined);
|
|
24
|
+
},
|
|
25
|
+
async deleteDecision(decisionId) {
|
|
26
|
+
return proxy('delete_decision', { decision_id: decisionId });
|
|
27
|
+
},
|
|
28
|
+
async getDecisionsStats(projectId) {
|
|
29
|
+
return proxy('get_decisions_stats', { project_id: projectId });
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discovery API Methods
|
|
3
|
+
*
|
|
4
|
+
* Methods for knowledge and help discovery:
|
|
5
|
+
* - queryKnowledgeBase: Query aggregated project knowledge
|
|
6
|
+
* - getHelpTopic: Get help for a specific topic
|
|
7
|
+
* - getHelpTopics: List all help topics
|
|
8
|
+
*/
|
|
9
|
+
import type { ApiResponse, RequestFn } from './types.js';
|
|
10
|
+
export interface DiscoveryMethods {
|
|
11
|
+
queryKnowledgeBase(projectId: string, params?: {
|
|
12
|
+
scope?: 'summary' | 'detailed';
|
|
13
|
+
categories?: Array<'findings' | 'qa' | 'decisions' | 'completed_tasks' | 'blockers' | 'progress'>;
|
|
14
|
+
limit?: number;
|
|
15
|
+
search_query?: string;
|
|
16
|
+
}): Promise<ApiResponse<{
|
|
17
|
+
findings?: Array<{
|
|
18
|
+
id: string;
|
|
19
|
+
title: string;
|
|
20
|
+
category: string;
|
|
21
|
+
severity: string;
|
|
22
|
+
}>;
|
|
23
|
+
qa?: Array<{
|
|
24
|
+
id: string;
|
|
25
|
+
question: string;
|
|
26
|
+
answer?: string;
|
|
27
|
+
}>;
|
|
28
|
+
decisions?: Array<{
|
|
29
|
+
id: string;
|
|
30
|
+
title: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
}>;
|
|
33
|
+
completed_tasks?: Array<{
|
|
34
|
+
id: string;
|
|
35
|
+
title: string;
|
|
36
|
+
completed_at: string;
|
|
37
|
+
}>;
|
|
38
|
+
blockers?: Array<{
|
|
39
|
+
id: string;
|
|
40
|
+
description: string;
|
|
41
|
+
status: string;
|
|
42
|
+
}>;
|
|
43
|
+
progress?: Array<{
|
|
44
|
+
id: string;
|
|
45
|
+
note: string;
|
|
46
|
+
created_at: string;
|
|
47
|
+
}>;
|
|
48
|
+
}>>;
|
|
49
|
+
getHelpTopic(slug: string): Promise<ApiResponse<{
|
|
50
|
+
topic: {
|
|
51
|
+
slug: string;
|
|
52
|
+
title: string;
|
|
53
|
+
content: string;
|
|
54
|
+
};
|
|
55
|
+
}>>;
|
|
56
|
+
getHelpTopics(): Promise<ApiResponse<Array<{
|
|
57
|
+
slug: string;
|
|
58
|
+
title: string;
|
|
59
|
+
description?: string;
|
|
60
|
+
}>>>;
|
|
61
|
+
}
|
|
62
|
+
export declare function createDiscoveryMethods(request: RequestFn): DiscoveryMethods;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discovery API Methods
|
|
3
|
+
*
|
|
4
|
+
* Methods for knowledge and help discovery:
|
|
5
|
+
* - queryKnowledgeBase: Query aggregated project knowledge
|
|
6
|
+
* - getHelpTopic: Get help for a specific topic
|
|
7
|
+
* - getHelpTopics: List all help topics
|
|
8
|
+
*/
|
|
9
|
+
export function createDiscoveryMethods(request) {
|
|
10
|
+
return {
|
|
11
|
+
async queryKnowledgeBase(projectId, params) {
|
|
12
|
+
return request('POST', `/api/mcp/projects/${projectId}/knowledge`, params || {});
|
|
13
|
+
},
|
|
14
|
+
async getHelpTopic(slug) {
|
|
15
|
+
return request('GET', `/api/mcp/help/${slug}`);
|
|
16
|
+
},
|
|
17
|
+
async getHelpTopics() {
|
|
18
|
+
return request('GET', '/api/mcp/help');
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ideas API Methods
|
|
3
|
+
*
|
|
4
|
+
* Methods for idea management:
|
|
5
|
+
* - getIdeas: List ideas for a project
|
|
6
|
+
* - getIdea: Get a single idea
|
|
7
|
+
* - addIdea: Create a new idea
|
|
8
|
+
* - updateIdea: Update an idea
|
|
9
|
+
* - deleteIdea: Delete an idea
|
|
10
|
+
* - convertIdeaToTask: Convert an idea to a task
|
|
11
|
+
*/
|
|
12
|
+
import type { ApiResponse, ProxyFn } from './types.js';
|
|
13
|
+
export interface IdeasMethods {
|
|
14
|
+
getIdeas(projectId: string, params?: {
|
|
15
|
+
status?: string;
|
|
16
|
+
limit?: number;
|
|
17
|
+
offset?: number;
|
|
18
|
+
search_query?: string;
|
|
19
|
+
}): Promise<ApiResponse<{
|
|
20
|
+
ideas: Array<{
|
|
21
|
+
id: string;
|
|
22
|
+
title: string;
|
|
23
|
+
description?: string;
|
|
24
|
+
status: string;
|
|
25
|
+
doc_url?: string;
|
|
26
|
+
created_at: string;
|
|
27
|
+
}>;
|
|
28
|
+
total_count?: number;
|
|
29
|
+
has_more?: boolean;
|
|
30
|
+
}>>;
|
|
31
|
+
getIdea(ideaId: string): Promise<ApiResponse<{
|
|
32
|
+
idea: {
|
|
33
|
+
id: string;
|
|
34
|
+
title: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
status: string;
|
|
37
|
+
doc_url?: string;
|
|
38
|
+
created_at: string;
|
|
39
|
+
};
|
|
40
|
+
}>>;
|
|
41
|
+
addIdea(projectId: string, params: {
|
|
42
|
+
title: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
status?: string;
|
|
45
|
+
}, sessionId?: string): Promise<ApiResponse<{
|
|
46
|
+
success: boolean;
|
|
47
|
+
idea_id: string;
|
|
48
|
+
}>>;
|
|
49
|
+
updateIdea(ideaId: string, updates: {
|
|
50
|
+
title?: string;
|
|
51
|
+
description?: string;
|
|
52
|
+
status?: string;
|
|
53
|
+
doc_url?: string;
|
|
54
|
+
}): Promise<ApiResponse<{
|
|
55
|
+
success: boolean;
|
|
56
|
+
idea_id: string;
|
|
57
|
+
}>>;
|
|
58
|
+
deleteIdea(ideaId: string): Promise<ApiResponse<{
|
|
59
|
+
success: boolean;
|
|
60
|
+
}>>;
|
|
61
|
+
convertIdeaToTask(ideaId: string, params?: {
|
|
62
|
+
priority?: number;
|
|
63
|
+
estimated_minutes?: number;
|
|
64
|
+
update_status?: boolean;
|
|
65
|
+
}): Promise<ApiResponse<{
|
|
66
|
+
success: boolean;
|
|
67
|
+
task_id?: string;
|
|
68
|
+
task_title?: string;
|
|
69
|
+
idea_id?: string;
|
|
70
|
+
idea_status?: string;
|
|
71
|
+
message?: string;
|
|
72
|
+
error?: string;
|
|
73
|
+
}>>;
|
|
74
|
+
}
|
|
75
|
+
export declare function createIdeasMethods(proxy: ProxyFn): IdeasMethods;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ideas API Methods
|
|
3
|
+
*
|
|
4
|
+
* Methods for idea management:
|
|
5
|
+
* - getIdeas: List ideas for a project
|
|
6
|
+
* - getIdea: Get a single idea
|
|
7
|
+
* - addIdea: Create a new idea
|
|
8
|
+
* - updateIdea: Update an idea
|
|
9
|
+
* - deleteIdea: Delete an idea
|
|
10
|
+
* - convertIdeaToTask: Convert an idea to a task
|
|
11
|
+
*/
|
|
12
|
+
export function createIdeasMethods(proxy) {
|
|
13
|
+
return {
|
|
14
|
+
async getIdeas(projectId, params) {
|
|
15
|
+
return proxy('get_ideas', { project_id: projectId, ...params });
|
|
16
|
+
},
|
|
17
|
+
async getIdea(ideaId) {
|
|
18
|
+
return proxy('get_idea', { idea_id: ideaId });
|
|
19
|
+
},
|
|
20
|
+
async addIdea(projectId, params, sessionId) {
|
|
21
|
+
return proxy('add_idea', {
|
|
22
|
+
project_id: projectId,
|
|
23
|
+
...params
|
|
24
|
+
}, sessionId ? { session_id: sessionId } : undefined);
|
|
25
|
+
},
|
|
26
|
+
async updateIdea(ideaId, updates) {
|
|
27
|
+
return proxy('update_idea', { idea_id: ideaId, ...updates });
|
|
28
|
+
},
|
|
29
|
+
async deleteIdea(ideaId) {
|
|
30
|
+
return proxy('delete_idea', { idea_id: ideaId });
|
|
31
|
+
},
|
|
32
|
+
async convertIdeaToTask(ideaId, params) {
|
|
33
|
+
return proxy('convert_idea_to_task', { idea_id: ideaId, ...params });
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|