@vibescope/mcp-server 0.0.1 → 0.1.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/README.md +113 -98
- package/dist/api-client.d.ts +1114 -0
- package/dist/api-client.js +698 -0
- package/dist/cli.d.ts +1 -6
- package/dist/cli.js +39 -240
- package/dist/config/tool-categories.d.ts +31 -0
- package/dist/config/tool-categories.js +253 -0
- package/dist/handlers/blockers.js +57 -58
- package/dist/handlers/bodies-of-work.d.ts +2 -0
- package/dist/handlers/bodies-of-work.js +106 -476
- package/dist/handlers/cost.d.ts +1 -0
- package/dist/handlers/cost.js +35 -113
- package/dist/handlers/decisions.d.ts +2 -0
- package/dist/handlers/decisions.js +28 -27
- package/dist/handlers/deployment.js +112 -828
- package/dist/handlers/discovery.js +31 -0
- package/dist/handlers/fallback.d.ts +2 -0
- package/dist/handlers/fallback.js +39 -134
- package/dist/handlers/findings.js +43 -67
- package/dist/handlers/git-issues.d.ts +9 -13
- package/dist/handlers/git-issues.js +80 -225
- package/dist/handlers/ideas.d.ts +3 -0
- package/dist/handlers/ideas.js +53 -134
- package/dist/handlers/index.d.ts +2 -0
- package/dist/handlers/index.js +6 -0
- package/dist/handlers/milestones.d.ts +2 -0
- package/dist/handlers/milestones.js +51 -98
- package/dist/handlers/organizations.js +79 -275
- package/dist/handlers/progress.d.ts +2 -0
- package/dist/handlers/progress.js +25 -123
- package/dist/handlers/project.js +42 -221
- package/dist/handlers/requests.d.ts +2 -0
- package/dist/handlers/requests.js +23 -83
- package/dist/handlers/session.js +99 -585
- package/dist/handlers/sprints.d.ts +32 -0
- package/dist/handlers/sprints.js +274 -0
- package/dist/handlers/tasks.d.ts +7 -10
- package/dist/handlers/tasks.js +230 -900
- package/dist/handlers/tool-docs.d.ts +8 -0
- package/dist/handlers/tool-docs.js +657 -0
- package/dist/handlers/types.d.ts +11 -3
- package/dist/handlers/validation.d.ts +1 -1
- package/dist/handlers/validation.js +26 -153
- package/dist/index.js +473 -160
- package/dist/knowledge.js +106 -9
- package/dist/tools.js +4 -0
- package/dist/validators.d.ts +21 -0
- package/dist/validators.js +91 -0
- package/package.json +2 -3
- package/src/api-client.ts +1752 -0
- package/src/cli.test.ts +128 -302
- package/src/cli.ts +41 -285
- package/src/handlers/__test-setup__.ts +210 -0
- package/src/handlers/__test-utils__.ts +4 -134
- package/src/handlers/blockers.test.ts +114 -124
- package/src/handlers/blockers.ts +68 -70
- package/src/handlers/bodies-of-work.test.ts +236 -831
- package/src/handlers/bodies-of-work.ts +194 -525
- package/src/handlers/cost.test.ts +149 -113
- package/src/handlers/cost.ts +44 -132
- package/src/handlers/decisions.test.ts +111 -209
- package/src/handlers/decisions.ts +35 -27
- package/src/handlers/deployment.test.ts +193 -239
- package/src/handlers/deployment.ts +140 -895
- package/src/handlers/discovery.test.ts +20 -67
- package/src/handlers/discovery.ts +32 -0
- package/src/handlers/fallback.test.ts +128 -361
- package/src/handlers/fallback.ts +62 -148
- package/src/handlers/findings.test.ts +127 -345
- package/src/handlers/findings.ts +49 -66
- package/src/handlers/git-issues.test.ts +623 -0
- package/src/handlers/git-issues.ts +174 -0
- package/src/handlers/ideas.test.ts +229 -343
- package/src/handlers/ideas.ts +69 -143
- package/src/handlers/index.ts +6 -0
- package/src/handlers/milestones.test.ts +167 -281
- package/src/handlers/milestones.ts +54 -93
- package/src/handlers/organizations.test.ts +275 -467
- package/src/handlers/organizations.ts +84 -294
- package/src/handlers/progress.test.ts +112 -218
- package/src/handlers/progress.ts +29 -142
- package/src/handlers/project.test.ts +203 -226
- package/src/handlers/project.ts +48 -238
- package/src/handlers/requests.test.ts +74 -342
- package/src/handlers/requests.ts +25 -83
- package/src/handlers/session.test.ts +241 -206
- package/src/handlers/session.ts +110 -657
- package/src/handlers/sprints.test.ts +711 -0
- package/src/handlers/sprints.ts +497 -0
- package/src/handlers/tasks.test.ts +608 -353
- package/src/handlers/tasks.ts +248 -1025
- package/src/handlers/types.ts +12 -4
- package/src/handlers/validation.test.ts +189 -572
- package/src/handlers/validation.ts +29 -166
- package/src/index.ts +473 -184
- package/src/knowledge.ts +107 -9
- package/src/tools.ts +2506 -0
- package/src/validators.test.ts +223 -223
- package/src/validators.ts +127 -0
- package/tsconfig.json +1 -1
- package/vitest.config.ts +14 -13
- package/dist/cli.test.d.ts +0 -1
- package/dist/cli.test.js +0 -367
- package/dist/handlers/__test-utils__.d.ts +0 -72
- package/dist/handlers/__test-utils__.js +0 -176
- package/dist/handlers/checkouts.d.ts +0 -37
- package/dist/handlers/checkouts.js +0 -377
- package/dist/handlers/knowledge-query.d.ts +0 -22
- package/dist/handlers/knowledge-query.js +0 -253
- package/dist/handlers/knowledge.d.ts +0 -12
- package/dist/handlers/knowledge.js +0 -108
- package/dist/handlers/roles.d.ts +0 -30
- package/dist/handlers/roles.js +0 -281
- package/dist/handlers/tasks.test.d.ts +0 -1
- package/dist/handlers/tasks.test.js +0 -431
- package/dist/utils.test.d.ts +0 -1
- package/dist/utils.test.js +0 -532
- package/dist/validators.test.d.ts +0 -1
- package/dist/validators.test.js +0 -176
- package/src/tmpclaude-0078-cwd +0 -1
- package/src/tmpclaude-0ee1-cwd +0 -1
- package/src/tmpclaude-2dd5-cwd +0 -1
- package/src/tmpclaude-344c-cwd +0 -1
- package/src/tmpclaude-3860-cwd +0 -1
- package/src/tmpclaude-4b63-cwd +0 -1
- package/src/tmpclaude-5c73-cwd +0 -1
- package/src/tmpclaude-5ee3-cwd +0 -1
- package/src/tmpclaude-6795-cwd +0 -1
- package/src/tmpclaude-709e-cwd +0 -1
- package/src/tmpclaude-9839-cwd +0 -1
- package/src/tmpclaude-d829-cwd +0 -1
- package/src/tmpclaude-e072-cwd +0 -1
- package/src/tmpclaude-f6ee-cwd +0 -1
- package/tmpclaude-0439-cwd +0 -1
- package/tmpclaude-132f-cwd +0 -1
- package/tmpclaude-15bb-cwd +0 -1
- package/tmpclaude-165a-cwd +0 -1
- package/tmpclaude-1ba9-cwd +0 -1
- package/tmpclaude-21a3-cwd +0 -1
- package/tmpclaude-2a38-cwd +0 -1
- package/tmpclaude-2adf-cwd +0 -1
- package/tmpclaude-2f56-cwd +0 -1
- package/tmpclaude-3626-cwd +0 -1
- package/tmpclaude-3727-cwd +0 -1
- package/tmpclaude-40bc-cwd +0 -1
- package/tmpclaude-436f-cwd +0 -1
- package/tmpclaude-4783-cwd +0 -1
- package/tmpclaude-4b6d-cwd +0 -1
- package/tmpclaude-4ba4-cwd +0 -1
- package/tmpclaude-51e6-cwd +0 -1
- package/tmpclaude-5ecf-cwd +0 -1
- package/tmpclaude-6f97-cwd +0 -1
- package/tmpclaude-7fb2-cwd +0 -1
- package/tmpclaude-825c-cwd +0 -1
- package/tmpclaude-8baf-cwd +0 -1
- package/tmpclaude-8d9f-cwd +0 -1
- package/tmpclaude-975c-cwd +0 -1
- package/tmpclaude-9983-cwd +0 -1
- package/tmpclaude-a045-cwd +0 -1
- package/tmpclaude-ac4a-cwd +0 -1
- package/tmpclaude-b593-cwd +0 -1
- package/tmpclaude-b891-cwd +0 -1
- package/tmpclaude-c032-cwd +0 -1
- package/tmpclaude-cf43-cwd +0 -1
- package/tmpclaude-d040-cwd +0 -1
- package/tmpclaude-dcdd-cwd +0 -1
- package/tmpclaude-dcee-cwd +0 -1
- package/tmpclaude-e16b-cwd +0 -1
- package/tmpclaude-ecd2-cwd +0 -1
- package/tmpclaude-f48d-cwd +0 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sprint Handlers
|
|
3
|
+
*
|
|
4
|
+
* Handles sprint-specific operations, leveraging bodies of work infrastructure:
|
|
5
|
+
* - create_sprint
|
|
6
|
+
* - update_sprint
|
|
7
|
+
* - get_sprint
|
|
8
|
+
* - get_sprints
|
|
9
|
+
* - delete_sprint
|
|
10
|
+
* - start_sprint
|
|
11
|
+
* - complete_sprint
|
|
12
|
+
* - add_task_to_sprint
|
|
13
|
+
* - remove_task_from_sprint
|
|
14
|
+
* - get_sprint_backlog
|
|
15
|
+
* - get_sprint_velocity
|
|
16
|
+
*/
|
|
17
|
+
import type { Handler, HandlerRegistry } from './types.js';
|
|
18
|
+
export declare const createSprint: Handler;
|
|
19
|
+
export declare const updateSprint: Handler;
|
|
20
|
+
export declare const getSprint: Handler;
|
|
21
|
+
export declare const getSprints: Handler;
|
|
22
|
+
export declare const deleteSprint: Handler;
|
|
23
|
+
export declare const startSprint: Handler;
|
|
24
|
+
export declare const completeSprint: Handler;
|
|
25
|
+
export declare const addTaskToSprint: Handler;
|
|
26
|
+
export declare const removeTaskFromSprint: Handler;
|
|
27
|
+
export declare const getSprintBacklog: Handler;
|
|
28
|
+
export declare const getSprintVelocity: Handler;
|
|
29
|
+
/**
|
|
30
|
+
* Sprint handlers registry
|
|
31
|
+
*/
|
|
32
|
+
export declare const sprintHandlers: HandlerRegistry;
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sprint Handlers
|
|
3
|
+
*
|
|
4
|
+
* Handles sprint-specific operations, leveraging bodies of work infrastructure:
|
|
5
|
+
* - create_sprint
|
|
6
|
+
* - update_sprint
|
|
7
|
+
* - get_sprint
|
|
8
|
+
* - get_sprints
|
|
9
|
+
* - delete_sprint
|
|
10
|
+
* - start_sprint
|
|
11
|
+
* - complete_sprint
|
|
12
|
+
* - add_task_to_sprint
|
|
13
|
+
* - remove_task_from_sprint
|
|
14
|
+
* - get_sprint_backlog
|
|
15
|
+
* - get_sprint_velocity
|
|
16
|
+
*/
|
|
17
|
+
import { validateRequired, validateUUID, validateEnum } from '../validators.js';
|
|
18
|
+
import { getApiClient } from '../api-client.js';
|
|
19
|
+
const SPRINT_STATUSES = ['planning', 'active', 'in_review', 'retrospective', 'completed', 'cancelled'];
|
|
20
|
+
const TASK_PHASES = ['pre', 'core', 'post'];
|
|
21
|
+
const DEPLOY_ENVIRONMENTS = ['development', 'staging', 'production'];
|
|
22
|
+
const VERSION_BUMPS = ['patch', 'minor', 'major'];
|
|
23
|
+
export const createSprint = async (args, ctx) => {
|
|
24
|
+
const { project_id, title, goal, start_date, end_date, auto_deploy_on_completion, deploy_environment, deploy_version_bump, } = args;
|
|
25
|
+
validateRequired(project_id, 'project_id');
|
|
26
|
+
validateUUID(project_id, 'project_id');
|
|
27
|
+
validateRequired(title, 'title');
|
|
28
|
+
validateRequired(start_date, 'start_date');
|
|
29
|
+
validateRequired(end_date, 'end_date');
|
|
30
|
+
if (deploy_environment) {
|
|
31
|
+
validateEnum(deploy_environment, DEPLOY_ENVIRONMENTS, 'deploy_environment');
|
|
32
|
+
}
|
|
33
|
+
if (deploy_version_bump) {
|
|
34
|
+
validateEnum(deploy_version_bump, VERSION_BUMPS, 'deploy_version_bump');
|
|
35
|
+
}
|
|
36
|
+
// Validate date format and order
|
|
37
|
+
const startDateObj = new Date(start_date);
|
|
38
|
+
const endDateObj = new Date(end_date);
|
|
39
|
+
if (isNaN(startDateObj.getTime())) {
|
|
40
|
+
throw new Error('Invalid start_date format. Use YYYY-MM-DD');
|
|
41
|
+
}
|
|
42
|
+
if (isNaN(endDateObj.getTime())) {
|
|
43
|
+
throw new Error('Invalid end_date format. Use YYYY-MM-DD');
|
|
44
|
+
}
|
|
45
|
+
if (endDateObj < startDateObj) {
|
|
46
|
+
throw new Error('end_date must be on or after start_date');
|
|
47
|
+
}
|
|
48
|
+
const { session } = ctx;
|
|
49
|
+
const apiClient = getApiClient();
|
|
50
|
+
const response = await apiClient.proxy('create_sprint', {
|
|
51
|
+
project_id,
|
|
52
|
+
title,
|
|
53
|
+
goal,
|
|
54
|
+
start_date,
|
|
55
|
+
end_date,
|
|
56
|
+
auto_deploy_on_completion,
|
|
57
|
+
deploy_environment,
|
|
58
|
+
deploy_version_bump,
|
|
59
|
+
}, {
|
|
60
|
+
session_id: session.currentSessionId,
|
|
61
|
+
persona: session.currentPersona,
|
|
62
|
+
instance_id: session.instanceId
|
|
63
|
+
});
|
|
64
|
+
if (!response.ok) {
|
|
65
|
+
throw new Error(`Failed to create sprint: ${response.error}`);
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
result: {
|
|
69
|
+
success: true,
|
|
70
|
+
sprint_id: response.data?.sprint_id,
|
|
71
|
+
sprint_number: response.data?.sprint_number,
|
|
72
|
+
title,
|
|
73
|
+
status: 'planning',
|
|
74
|
+
start_date,
|
|
75
|
+
end_date,
|
|
76
|
+
message: 'Sprint created in planning status. Add tasks with add_task_to_sprint, then call start_sprint when ready.',
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
export const updateSprint = async (args, ctx) => {
|
|
81
|
+
const { sprint_id, title, goal, start_date, end_date, auto_deploy_on_completion, deploy_environment, deploy_version_bump, } = args;
|
|
82
|
+
validateRequired(sprint_id, 'sprint_id');
|
|
83
|
+
validateUUID(sprint_id, 'sprint_id');
|
|
84
|
+
if (deploy_environment) {
|
|
85
|
+
validateEnum(deploy_environment, DEPLOY_ENVIRONMENTS, 'deploy_environment');
|
|
86
|
+
}
|
|
87
|
+
if (deploy_version_bump) {
|
|
88
|
+
validateEnum(deploy_version_bump, VERSION_BUMPS, 'deploy_version_bump');
|
|
89
|
+
}
|
|
90
|
+
// Validate dates if provided
|
|
91
|
+
if (start_date) {
|
|
92
|
+
const startDateObj = new Date(start_date);
|
|
93
|
+
if (isNaN(startDateObj.getTime())) {
|
|
94
|
+
throw new Error('Invalid start_date format. Use YYYY-MM-DD');
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
if (end_date) {
|
|
98
|
+
const endDateObj = new Date(end_date);
|
|
99
|
+
if (isNaN(endDateObj.getTime())) {
|
|
100
|
+
throw new Error('Invalid end_date format. Use YYYY-MM-DD');
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const apiClient = getApiClient();
|
|
104
|
+
const response = await apiClient.proxy('update_sprint', {
|
|
105
|
+
sprint_id,
|
|
106
|
+
title,
|
|
107
|
+
goal,
|
|
108
|
+
start_date,
|
|
109
|
+
end_date,
|
|
110
|
+
auto_deploy_on_completion,
|
|
111
|
+
deploy_environment,
|
|
112
|
+
deploy_version_bump,
|
|
113
|
+
});
|
|
114
|
+
if (!response.ok) {
|
|
115
|
+
throw new Error(`Failed to update sprint: ${response.error}`);
|
|
116
|
+
}
|
|
117
|
+
return { result: { success: true, sprint_id } };
|
|
118
|
+
};
|
|
119
|
+
export const getSprint = async (args, ctx) => {
|
|
120
|
+
const { sprint_id } = args;
|
|
121
|
+
validateRequired(sprint_id, 'sprint_id');
|
|
122
|
+
validateUUID(sprint_id, 'sprint_id');
|
|
123
|
+
const apiClient = getApiClient();
|
|
124
|
+
const response = await apiClient.proxy('get_sprint', { sprint_id });
|
|
125
|
+
if (!response.ok) {
|
|
126
|
+
throw new Error(`Failed to get sprint: ${response.error}`);
|
|
127
|
+
}
|
|
128
|
+
return { result: response.data };
|
|
129
|
+
};
|
|
130
|
+
export const getSprints = async (args, ctx) => {
|
|
131
|
+
const { project_id, status, limit = 20, offset = 0 } = args;
|
|
132
|
+
validateRequired(project_id, 'project_id');
|
|
133
|
+
validateUUID(project_id, 'project_id');
|
|
134
|
+
if (status) {
|
|
135
|
+
validateEnum(status, SPRINT_STATUSES, 'status');
|
|
136
|
+
}
|
|
137
|
+
const apiClient = getApiClient();
|
|
138
|
+
const response = await apiClient.proxy('get_sprints', {
|
|
139
|
+
project_id,
|
|
140
|
+
status,
|
|
141
|
+
limit: Math.min(limit, 100),
|
|
142
|
+
offset,
|
|
143
|
+
});
|
|
144
|
+
if (!response.ok) {
|
|
145
|
+
throw new Error(`Failed to fetch sprints: ${response.error}`);
|
|
146
|
+
}
|
|
147
|
+
return { result: response.data };
|
|
148
|
+
};
|
|
149
|
+
export const deleteSprint = async (args, ctx) => {
|
|
150
|
+
const { sprint_id } = args;
|
|
151
|
+
validateRequired(sprint_id, 'sprint_id');
|
|
152
|
+
validateUUID(sprint_id, 'sprint_id');
|
|
153
|
+
const apiClient = getApiClient();
|
|
154
|
+
const response = await apiClient.proxy('delete_sprint', {
|
|
155
|
+
sprint_id
|
|
156
|
+
});
|
|
157
|
+
if (!response.ok) {
|
|
158
|
+
throw new Error(`Failed to delete sprint: ${response.error}`);
|
|
159
|
+
}
|
|
160
|
+
return { result: { success: true, message: 'Sprint deleted. Tasks are preserved.' } };
|
|
161
|
+
};
|
|
162
|
+
export const startSprint = async (args, ctx) => {
|
|
163
|
+
const { sprint_id } = args;
|
|
164
|
+
validateRequired(sprint_id, 'sprint_id');
|
|
165
|
+
validateUUID(sprint_id, 'sprint_id');
|
|
166
|
+
const apiClient = getApiClient();
|
|
167
|
+
const response = await apiClient.proxy('start_sprint', { sprint_id });
|
|
168
|
+
if (!response.ok) {
|
|
169
|
+
throw new Error(`Failed to start sprint: ${response.error}`);
|
|
170
|
+
}
|
|
171
|
+
return { result: response.data };
|
|
172
|
+
};
|
|
173
|
+
export const completeSprint = async (args, ctx) => {
|
|
174
|
+
const { sprint_id, retrospective_notes, skip_retrospective } = args;
|
|
175
|
+
validateRequired(sprint_id, 'sprint_id');
|
|
176
|
+
validateUUID(sprint_id, 'sprint_id');
|
|
177
|
+
const apiClient = getApiClient();
|
|
178
|
+
const response = await apiClient.proxy('complete_sprint', {
|
|
179
|
+
sprint_id,
|
|
180
|
+
retrospective_notes,
|
|
181
|
+
skip_retrospective,
|
|
182
|
+
});
|
|
183
|
+
if (!response.ok) {
|
|
184
|
+
throw new Error(`Failed to complete sprint: ${response.error}`);
|
|
185
|
+
}
|
|
186
|
+
return { result: response.data };
|
|
187
|
+
};
|
|
188
|
+
export const addTaskToSprint = async (args, ctx) => {
|
|
189
|
+
const { sprint_id, task_id, story_points, phase } = args;
|
|
190
|
+
validateRequired(sprint_id, 'sprint_id');
|
|
191
|
+
validateUUID(sprint_id, 'sprint_id');
|
|
192
|
+
validateRequired(task_id, 'task_id');
|
|
193
|
+
validateUUID(task_id, 'task_id');
|
|
194
|
+
if (phase) {
|
|
195
|
+
validateEnum(phase, TASK_PHASES, 'phase');
|
|
196
|
+
}
|
|
197
|
+
if (story_points !== undefined && (story_points < 0 || !Number.isInteger(story_points))) {
|
|
198
|
+
throw new Error('story_points must be a non-negative integer');
|
|
199
|
+
}
|
|
200
|
+
const apiClient = getApiClient();
|
|
201
|
+
const response = await apiClient.proxy('add_task_to_sprint', {
|
|
202
|
+
sprint_id,
|
|
203
|
+
task_id,
|
|
204
|
+
story_points,
|
|
205
|
+
phase: phase || 'core',
|
|
206
|
+
});
|
|
207
|
+
if (!response.ok) {
|
|
208
|
+
throw new Error(`Failed to add task to sprint: ${response.error}`);
|
|
209
|
+
}
|
|
210
|
+
return { result: response.data };
|
|
211
|
+
};
|
|
212
|
+
export const removeTaskFromSprint = async (args, ctx) => {
|
|
213
|
+
const { sprint_id, task_id } = args;
|
|
214
|
+
validateRequired(sprint_id, 'sprint_id');
|
|
215
|
+
validateUUID(sprint_id, 'sprint_id');
|
|
216
|
+
validateRequired(task_id, 'task_id');
|
|
217
|
+
validateUUID(task_id, 'task_id');
|
|
218
|
+
const apiClient = getApiClient();
|
|
219
|
+
const response = await apiClient.proxy('remove_task_from_sprint', {
|
|
220
|
+
sprint_id,
|
|
221
|
+
task_id,
|
|
222
|
+
});
|
|
223
|
+
if (!response.ok) {
|
|
224
|
+
throw new Error(`Failed to remove task from sprint: ${response.error}`);
|
|
225
|
+
}
|
|
226
|
+
return { result: response.data };
|
|
227
|
+
};
|
|
228
|
+
export const getSprintBacklog = async (args, ctx) => {
|
|
229
|
+
const { project_id, sprint_id } = args;
|
|
230
|
+
validateRequired(project_id, 'project_id');
|
|
231
|
+
validateUUID(project_id, 'project_id');
|
|
232
|
+
if (sprint_id) {
|
|
233
|
+
validateUUID(sprint_id, 'sprint_id');
|
|
234
|
+
}
|
|
235
|
+
const apiClient = getApiClient();
|
|
236
|
+
const response = await apiClient.proxy('get_sprint_backlog', {
|
|
237
|
+
project_id,
|
|
238
|
+
sprint_id,
|
|
239
|
+
});
|
|
240
|
+
if (!response.ok) {
|
|
241
|
+
throw new Error(`Failed to get sprint backlog: ${response.error}`);
|
|
242
|
+
}
|
|
243
|
+
return { result: response.data };
|
|
244
|
+
};
|
|
245
|
+
export const getSprintVelocity = async (args, ctx) => {
|
|
246
|
+
const { project_id, limit = 10 } = args;
|
|
247
|
+
validateRequired(project_id, 'project_id');
|
|
248
|
+
validateUUID(project_id, 'project_id');
|
|
249
|
+
const apiClient = getApiClient();
|
|
250
|
+
const response = await apiClient.proxy('get_sprint_velocity', {
|
|
251
|
+
project_id,
|
|
252
|
+
limit: Math.min(limit, 50),
|
|
253
|
+
});
|
|
254
|
+
if (!response.ok) {
|
|
255
|
+
throw new Error(`Failed to get sprint velocity: ${response.error}`);
|
|
256
|
+
}
|
|
257
|
+
return { result: response.data };
|
|
258
|
+
};
|
|
259
|
+
/**
|
|
260
|
+
* Sprint handlers registry
|
|
261
|
+
*/
|
|
262
|
+
export const sprintHandlers = {
|
|
263
|
+
create_sprint: createSprint,
|
|
264
|
+
update_sprint: updateSprint,
|
|
265
|
+
get_sprint: getSprint,
|
|
266
|
+
get_sprints: getSprints,
|
|
267
|
+
delete_sprint: deleteSprint,
|
|
268
|
+
start_sprint: startSprint,
|
|
269
|
+
complete_sprint: completeSprint,
|
|
270
|
+
add_task_to_sprint: addTaskToSprint,
|
|
271
|
+
remove_task_from_sprint: removeTaskFromSprint,
|
|
272
|
+
get_sprint_backlog: getSprintBacklog,
|
|
273
|
+
get_sprint_velocity: getSprintVelocity,
|
|
274
|
+
};
|
package/dist/handlers/tasks.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Task Handlers
|
|
2
|
+
* Task Handlers (Migrated to API Client)
|
|
3
3
|
*
|
|
4
4
|
* Handles task CRUD and management:
|
|
5
5
|
* - get_tasks
|
|
@@ -12,16 +12,14 @@
|
|
|
12
12
|
* - remove_task_reference
|
|
13
13
|
* - batch_update_tasks
|
|
14
14
|
* - batch_complete_tasks
|
|
15
|
+
* - add_subtask
|
|
16
|
+
* - get_subtasks
|
|
15
17
|
*/
|
|
16
18
|
import type { Handler, HandlerRegistry } from './types.js';
|
|
17
|
-
import type { SupabaseClient } from '@supabase/supabase-js';
|
|
18
|
-
/**
|
|
19
|
-
* Git workflow instructions generator
|
|
20
|
-
*/
|
|
21
19
|
interface GitWorkflowConfig {
|
|
22
20
|
git_workflow: string;
|
|
23
21
|
git_main_branch: string;
|
|
24
|
-
git_develop_branch?: string;
|
|
22
|
+
git_develop_branch?: string | null;
|
|
25
23
|
git_auto_branch?: boolean;
|
|
26
24
|
}
|
|
27
25
|
interface GitMergeInstructions {
|
|
@@ -31,9 +29,7 @@ interface GitMergeInstructions {
|
|
|
31
29
|
cleanup: string[];
|
|
32
30
|
note: string;
|
|
33
31
|
}
|
|
34
|
-
declare function getValidationApprovedGitInstructions(config: GitWorkflowConfig, taskBranch: string | undefined): GitMergeInstructions | undefined;
|
|
35
|
-
export declare function getProjectGitConfig(supabase: SupabaseClient, projectId: string): Promise<GitWorkflowConfig | null>;
|
|
36
|
-
export { getValidationApprovedGitInstructions };
|
|
32
|
+
export declare function getValidationApprovedGitInstructions(config: GitWorkflowConfig, taskBranch: string | undefined): GitMergeInstructions | undefined;
|
|
37
33
|
export declare const getTasks: Handler;
|
|
38
34
|
export declare const getNextTask: Handler;
|
|
39
35
|
export declare const addTask: Handler;
|
|
@@ -43,10 +39,11 @@ export declare const deleteTask: Handler;
|
|
|
43
39
|
export declare const addTaskReference: Handler;
|
|
44
40
|
export declare const removeTaskReference: Handler;
|
|
45
41
|
export declare const batchUpdateTasks: Handler;
|
|
42
|
+
export declare const batchCompleteTasks: Handler;
|
|
46
43
|
export declare const addSubtask: Handler;
|
|
47
44
|
export declare const getSubtasks: Handler;
|
|
48
|
-
export declare const batchCompleteTasks: Handler;
|
|
49
45
|
/**
|
|
50
46
|
* Task handlers registry
|
|
51
47
|
*/
|
|
52
48
|
export declare const taskHandlers: HandlerRegistry;
|
|
49
|
+
export {};
|