autoproject-mcp 1.0.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 (82) hide show
  1. package/README.md +135 -0
  2. package/dist/client.d.ts +14 -0
  3. package/dist/client.d.ts.map +1 -0
  4. package/dist/client.js +62 -0
  5. package/dist/client.js.map +1 -0
  6. package/dist/index.d.ts +17 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +188 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/prompts/index.d.ts +14 -0
  11. package/dist/prompts/index.d.ts.map +1 -0
  12. package/dist/prompts/index.js +128 -0
  13. package/dist/prompts/index.js.map +1 -0
  14. package/dist/resources/index.d.ts +21 -0
  15. package/dist/resources/index.d.ts.map +1 -0
  16. package/dist/resources/index.js +81 -0
  17. package/dist/resources/index.js.map +1 -0
  18. package/dist/tools/applicationTools.d.ts +24 -0
  19. package/dist/tools/applicationTools.d.ts.map +1 -0
  20. package/dist/tools/applicationTools.js +160 -0
  21. package/dist/tools/applicationTools.js.map +1 -0
  22. package/dist/tools/copilotTools.d.ts +8 -0
  23. package/dist/tools/copilotTools.d.ts.map +1 -0
  24. package/dist/tools/copilotTools.js +55 -0
  25. package/dist/tools/copilotTools.js.map +1 -0
  26. package/dist/tools/defectTools.d.ts +8 -0
  27. package/dist/tools/defectTools.d.ts.map +1 -0
  28. package/dist/tools/defectTools.js +144 -0
  29. package/dist/tools/defectTools.js.map +1 -0
  30. package/dist/tools/documentTools.d.ts +18 -0
  31. package/dist/tools/documentTools.d.ts.map +1 -0
  32. package/dist/tools/documentTools.js +146 -0
  33. package/dist/tools/documentTools.js.map +1 -0
  34. package/dist/tools/evidenceTools.d.ts +8 -0
  35. package/dist/tools/evidenceTools.d.ts.map +1 -0
  36. package/dist/tools/evidenceTools.js +63 -0
  37. package/dist/tools/evidenceTools.js.map +1 -0
  38. package/dist/tools/hierarchyTools.d.ts +8 -0
  39. package/dist/tools/hierarchyTools.d.ts.map +1 -0
  40. package/dist/tools/hierarchyTools.js +86 -0
  41. package/dist/tools/hierarchyTools.js.map +1 -0
  42. package/dist/tools/importTools.d.ts +22 -0
  43. package/dist/tools/importTools.d.ts.map +1 -0
  44. package/dist/tools/importTools.js +145 -0
  45. package/dist/tools/importTools.js.map +1 -0
  46. package/dist/tools/launchPlanTools.d.ts +19 -0
  47. package/dist/tools/launchPlanTools.d.ts.map +1 -0
  48. package/dist/tools/launchPlanTools.js +319 -0
  49. package/dist/tools/launchPlanTools.js.map +1 -0
  50. package/dist/tools/productTools.d.ts +8 -0
  51. package/dist/tools/productTools.d.ts.map +1 -0
  52. package/dist/tools/productTools.js +80 -0
  53. package/dist/tools/productTools.js.map +1 -0
  54. package/dist/tools/releaseCycleLinkTools.d.ts +24 -0
  55. package/dist/tools/releaseCycleLinkTools.d.ts.map +1 -0
  56. package/dist/tools/releaseCycleLinkTools.js +174 -0
  57. package/dist/tools/releaseCycleLinkTools.js.map +1 -0
  58. package/dist/tools/screenTools.d.ts +12 -0
  59. package/dist/tools/screenTools.d.ts.map +1 -0
  60. package/dist/tools/screenTools.js +125 -0
  61. package/dist/tools/screenTools.js.map +1 -0
  62. package/dist/tools/testTools.d.ts +8 -0
  63. package/dist/tools/testTools.d.ts.map +1 -0
  64. package/dist/tools/testTools.js +91 -0
  65. package/dist/tools/testTools.js.map +1 -0
  66. package/dist/tools/ticketTools.d.ts +18 -0
  67. package/dist/tools/ticketTools.d.ts.map +1 -0
  68. package/dist/tools/ticketTools.js +138 -0
  69. package/dist/tools/ticketTools.js.map +1 -0
  70. package/dist/tools/todoTools.d.ts +8 -0
  71. package/dist/tools/todoTools.d.ts.map +1 -0
  72. package/dist/tools/todoTools.js +104 -0
  73. package/dist/tools/todoTools.js.map +1 -0
  74. package/dist/tools/useCaseTools.d.ts +8 -0
  75. package/dist/tools/useCaseTools.d.ts.map +1 -0
  76. package/dist/tools/useCaseTools.js +238 -0
  77. package/dist/tools/useCaseTools.js.map +1 -0
  78. package/dist/tools/workTools.d.ts +8 -0
  79. package/dist/tools/workTools.d.ts.map +1 -0
  80. package/dist/tools/workTools.js +99 -0
  81. package/dist/tools/workTools.js.map +1 -0
  82. package/package.json +37 -0
@@ -0,0 +1,319 @@
1
+ "use strict";
2
+ /**
3
+ * MCP Tools: Launch Plan (Cutover Plan) Management
4
+ *
5
+ * Provides 9 tools for creating and maintaining launch plans and their activities
6
+ * through the AutoProject Agent API.
7
+ *
8
+ * Plan statuses: DRAFT → PENDING_REVIEW → APPROVED → IN_PROGRESS → COMPLETED | CANCELLED
9
+ * Activity statuses: DRAFT → PENDING_REVIEW → APPROVED → READY → IN_PROGRESS → COMPLETED | BLOCKED | ROLLBACK | CANCELLED
10
+ * Environment types: WEB, MOBILE, CLOUD_INFRA, CUSTOM
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.launchPlanToolDefinitions = void 0;
14
+ exports.handleLaunchPlanTool = handleLaunchPlanTool;
15
+ const client_js_1 = require("../client.js");
16
+ const DEFAULT_PRODUCT_ID = process.env.AUTOPROJECT_PRODUCT_ID ?? '';
17
+ // ── Tool definitions ──────────────────────────────────────────────────────────
18
+ exports.launchPlanToolDefinitions = [
19
+ {
20
+ name: 'list_launch_plans',
21
+ description: 'List all launch (cutover) plans for a product. Returns plan id, name, status, environmentType, and planned dates.',
22
+ inputSchema: {
23
+ type: 'object',
24
+ properties: {
25
+ productId: { type: 'string', description: 'Product UUID. Defaults to AUTOPROJECT_PRODUCT_ID env.' },
26
+ },
27
+ required: [],
28
+ },
29
+ },
30
+ {
31
+ name: 'get_launch_plan',
32
+ description: 'Get full details of a launch plan including all its activities.',
33
+ inputSchema: {
34
+ type: 'object',
35
+ properties: {
36
+ productId: { type: 'string', description: 'Product UUID. Defaults to AUTOPROJECT_PRODUCT_ID env.' },
37
+ planId: { type: 'string', description: 'Launch plan UUID.' },
38
+ },
39
+ required: ['planId'],
40
+ },
41
+ },
42
+ {
43
+ name: 'create_launch_plan',
44
+ description: 'Create a new launch plan in DRAFT status. Use this to plan a deployment or cutover event. ' +
45
+ 'environmentType must be one of: WEB, MOBILE, CLOUD_INFRA, CUSTOM.',
46
+ inputSchema: {
47
+ type: 'object',
48
+ properties: {
49
+ productId: { type: 'string', description: 'Product UUID. Defaults to AUTOPROJECT_PRODUCT_ID env.' },
50
+ name: { type: 'string', description: 'Short descriptive name for the launch plan.' },
51
+ description: { type: 'string', description: 'Optional longer description.' },
52
+ environmentType: {
53
+ type: 'string',
54
+ enum: ['WEB', 'MOBILE', 'CLOUD_INFRA', 'CUSTOM'],
55
+ description: 'Type of environment being launched. Default: WEB.',
56
+ },
57
+ plannedStart: { type: 'string', description: 'ISO 8601 planned start date/time.' },
58
+ plannedEnd: { type: 'string', description: 'ISO 8601 planned end date/time.' },
59
+ },
60
+ required: ['name'],
61
+ },
62
+ },
63
+ {
64
+ name: 'update_launch_plan',
65
+ description: 'Update metadata fields of an existing launch plan. Only provided fields are changed.',
66
+ inputSchema: {
67
+ type: 'object',
68
+ properties: {
69
+ productId: { type: 'string', description: 'Product UUID. Defaults to AUTOPROJECT_PRODUCT_ID env.' },
70
+ planId: { type: 'string', description: 'Launch plan UUID.' },
71
+ name: { type: 'string', description: 'New name.' },
72
+ description: { type: 'string', description: 'New description.' },
73
+ environmentType: {
74
+ type: 'string',
75
+ enum: ['WEB', 'MOBILE', 'CLOUD_INFRA', 'CUSTOM'],
76
+ description: 'New environment type.',
77
+ },
78
+ plannedStart: { type: 'string', description: 'New planned start (ISO 8601).' },
79
+ plannedEnd: { type: 'string', description: 'New planned end (ISO 8601).' },
80
+ },
81
+ required: ['planId'],
82
+ },
83
+ },
84
+ {
85
+ name: 'change_launch_plan_status',
86
+ description: 'Transition a launch plan to a new status. Allowed flow: DRAFT → PENDING_REVIEW → APPROVED → IN_PROGRESS → COMPLETED. ' +
87
+ 'CANCELLED is reachable from most statuses. Transitions are validated by the server.',
88
+ inputSchema: {
89
+ type: 'object',
90
+ properties: {
91
+ productId: { type: 'string', description: 'Product UUID. Defaults to AUTOPROJECT_PRODUCT_ID env.' },
92
+ planId: { type: 'string', description: 'Launch plan UUID.' },
93
+ status: {
94
+ type: 'string',
95
+ enum: ['DRAFT', 'PENDING_REVIEW', 'APPROVED', 'IN_PROGRESS', 'COMPLETED', 'CANCELLED'],
96
+ description: 'Target status.',
97
+ },
98
+ notes: { type: 'string', description: 'Optional reason or notes for the transition.' },
99
+ },
100
+ required: ['planId', 'status'],
101
+ },
102
+ },
103
+ {
104
+ name: 'list_launch_activities',
105
+ description: 'List all activities belonging to a launch plan.',
106
+ inputSchema: {
107
+ type: 'object',
108
+ properties: {
109
+ productId: { type: 'string', description: 'Product UUID. Defaults to AUTOPROJECT_PRODUCT_ID env.' },
110
+ planId: { type: 'string', description: 'Launch plan UUID.' },
111
+ },
112
+ required: ['planId'],
113
+ },
114
+ },
115
+ {
116
+ name: 'create_launch_activity',
117
+ description: 'Add an activity (task step) to a launch plan. Activities are created in DRAFT status.',
118
+ inputSchema: {
119
+ type: 'object',
120
+ properties: {
121
+ productId: { type: 'string', description: 'Product UUID. Defaults to AUTOPROJECT_PRODUCT_ID env.' },
122
+ planId: { type: 'string', description: 'Launch plan UUID to add activity to.' },
123
+ title: { type: 'string', description: 'Short title for the activity.' },
124
+ description: { type: 'string', description: 'Detailed description.' },
125
+ ownerId: { type: 'string', description: 'User UUID of the person responsible.' },
126
+ estimatedDurationMins: { type: 'number', description: 'Estimated duration in minutes.' },
127
+ verificationCommand: { type: 'string', description: 'CLI command or URL to verify success.' },
128
+ rollbackStrategy: { type: 'string', description: 'Steps or command to roll back this activity.' },
129
+ sortOrder: { type: 'number', description: 'Display order among activities (lower = first).' },
130
+ },
131
+ required: ['planId', 'title'],
132
+ },
133
+ },
134
+ {
135
+ name: 'update_launch_activity',
136
+ description: 'Update fields of an existing launch activity. Only provided fields are changed.',
137
+ inputSchema: {
138
+ type: 'object',
139
+ properties: {
140
+ productId: { type: 'string', description: 'Product UUID. Defaults to AUTOPROJECT_PRODUCT_ID env.' },
141
+ planId: { type: 'string', description: 'Launch plan UUID.' },
142
+ activityId: { type: 'string', description: 'Activity UUID.' },
143
+ title: { type: 'string', description: 'New title.' },
144
+ description: { type: 'string', description: 'New description.' },
145
+ ownerId: { type: 'string', description: 'New owner user UUID.' },
146
+ estimatedDurationMins: { type: 'number', description: 'New estimated duration in minutes.' },
147
+ verificationCommand: { type: 'string', description: 'New verification command.' },
148
+ rollbackStrategy: { type: 'string', description: 'New rollback strategy.' },
149
+ },
150
+ required: ['planId', 'activityId'],
151
+ },
152
+ },
153
+ {
154
+ name: 'change_activity_status',
155
+ description: 'Transition a launch activity to a new status. ' +
156
+ 'Allowed flow: DRAFT → PENDING_REVIEW → APPROVED → READY → IN_PROGRESS → COMPLETED. ' +
157
+ 'BLOCKED and ROLLBACK are reachable from IN_PROGRESS. CANCELLED is reachable from most statuses. ' +
158
+ 'READY requires all prerequisite activities to be COMPLETED. Transitions are validated by the server.',
159
+ inputSchema: {
160
+ type: 'object',
161
+ properties: {
162
+ productId: { type: 'string', description: 'Product UUID. Defaults to AUTOPROJECT_PRODUCT_ID env.' },
163
+ planId: { type: 'string', description: 'Launch plan UUID.' },
164
+ activityId: { type: 'string', description: 'Activity UUID.' },
165
+ status: {
166
+ type: 'string',
167
+ enum: ['DRAFT', 'PENDING_REVIEW', 'APPROVED', 'READY', 'IN_PROGRESS', 'BLOCKED', 'COMPLETED', 'ROLLBACK', 'CANCELLED'],
168
+ description: 'Target status.',
169
+ },
170
+ notes: { type: 'string', description: 'Optional notes for the transition.' },
171
+ },
172
+ required: ['planId', 'activityId', 'status'],
173
+ },
174
+ },
175
+ ];
176
+ // ── Handlers ──────────────────────────────────────────────────────────────────
177
+ async function handleLaunchPlanTool(toolName, args) {
178
+ const productId = args.productId || DEFAULT_PRODUCT_ID;
179
+ if (!productId) {
180
+ return { content: [{ type: 'text', text: 'Error: productId is required (or set AUTOPROJECT_PRODUCT_ID env).' }] };
181
+ }
182
+ const planId = args.planId;
183
+ const activityId = args.activityId;
184
+ switch (toolName) {
185
+ case 'list_launch_plans': {
186
+ const data = await (0, client_js_1.apiGet)(`/products/${productId}/launch-plans`, {});
187
+ const plans = data?.items ?? [];
188
+ if (plans.length === 0) {
189
+ return { content: [{ type: 'text', text: 'No launch plans found.' }] };
190
+ }
191
+ const lines = plans.map((p) => `[${p.id}] ${p.name} | Status: ${p.status} | Env: ${p.environmentType ?? 'N/A'} | Planned: ${p.plannedStart ?? '?'} → ${p.plannedEnd ?? '?'}`);
192
+ return { content: [{ type: 'text', text: `Launch Plans (${plans.length}):\n${lines.join('\n')}` }] };
193
+ }
194
+ case 'get_launch_plan': {
195
+ if (!planId)
196
+ return { content: [{ type: 'text', text: 'Error: planId is required.' }] };
197
+ const data = await (0, client_js_1.apiGet)(`/products/${productId}/launch-plans/${planId}`, {});
198
+ const plan = data;
199
+ const activities = plan?.activities ?? [];
200
+ const header = `Plan: ${plan.name}\nID: ${plan.id}\nStatus: ${plan.status} | Env: ${plan.environmentType}\nPlanned: ${plan.plannedStart ?? '?'} → ${plan.plannedEnd ?? '?'}\nDescription: ${plan.description ?? 'N/A'}`;
201
+ const actLines = activities.length
202
+ ? activities
203
+ .map((a) => ` [${a.id}] #${a.sortOrder} ${a.title} — ${a.status} (est: ${a.estimatedDurationMins ?? '?'} min)`)
204
+ .join('\n')
205
+ : ' (no activities)';
206
+ return { content: [{ type: 'text', text: `${header}\n\nActivities:\n${actLines}` }] };
207
+ }
208
+ case 'create_launch_plan': {
209
+ const body = { name: args.name };
210
+ if (args.description !== undefined)
211
+ body.description = args.description;
212
+ if (args.environmentType !== undefined)
213
+ body.environmentType = args.environmentType;
214
+ if (args.plannedStart !== undefined)
215
+ body.plannedStart = args.plannedStart;
216
+ if (args.plannedEnd !== undefined)
217
+ body.plannedEnd = args.plannedEnd;
218
+ const data = await (0, client_js_1.apiPost)(`/products/${productId}/launch-plans`, body);
219
+ const plan = data;
220
+ return { content: [{ type: 'text', text: `Launch plan created.\nID: ${plan.id}\nName: ${plan.name}\nStatus: ${plan.status}` }] };
221
+ }
222
+ case 'update_launch_plan': {
223
+ if (!planId)
224
+ return { content: [{ type: 'text', text: 'Error: planId is required.' }] };
225
+ const body = {};
226
+ if (args.name !== undefined)
227
+ body.name = args.name;
228
+ if (args.description !== undefined)
229
+ body.description = args.description;
230
+ if (args.environmentType !== undefined)
231
+ body.environmentType = args.environmentType;
232
+ if (args.plannedStart !== undefined)
233
+ body.plannedStart = args.plannedStart;
234
+ if (args.plannedEnd !== undefined)
235
+ body.plannedEnd = args.plannedEnd;
236
+ const data = await (0, client_js_1.apiPatch)(`/products/${productId}/launch-plans/${planId}`, body);
237
+ const plan = data;
238
+ return { content: [{ type: 'text', text: `Launch plan updated.\nID: ${plan.id}\nName: ${plan.name}\nStatus: ${plan.status}` }] };
239
+ }
240
+ case 'change_launch_plan_status': {
241
+ if (!planId)
242
+ return { content: [{ type: 'text', text: 'Error: planId is required.' }] };
243
+ const body = { status: args.status };
244
+ if (args.notes !== undefined)
245
+ body.notes = args.notes;
246
+ const data = await (0, client_js_1.apiPatch)(`/products/${productId}/launch-plans/${planId}/status`, body);
247
+ const plan = data;
248
+ return { content: [{ type: 'text', text: `Launch plan status changed.\nID: ${plan.id}\nNew status: ${plan.status}` }] };
249
+ }
250
+ case 'list_launch_activities': {
251
+ if (!planId)
252
+ return { content: [{ type: 'text', text: 'Error: planId is required.' }] };
253
+ const data = await (0, client_js_1.apiGet)(`/products/${productId}/launch-plans/${planId}/activities`, {});
254
+ const activities = data?.items ?? [];
255
+ if (activities.length === 0) {
256
+ return { content: [{ type: 'text', text: 'No activities found for this plan.' }] };
257
+ }
258
+ const lines = activities.map((a) => `[${a.id}] #${a.sortOrder} ${a.title} — ${a.status} (est: ${a.estimatedDurationMins ?? '?'} min)`);
259
+ return { content: [{ type: 'text', text: `Activities (${activities.length}):\n${lines.join('\n')}` }] };
260
+ }
261
+ case 'create_launch_activity': {
262
+ if (!planId)
263
+ return { content: [{ type: 'text', text: 'Error: planId is required.' }] };
264
+ const body = { title: args.title };
265
+ if (args.description !== undefined)
266
+ body.description = args.description;
267
+ if (args.ownerId !== undefined)
268
+ body.ownerId = args.ownerId;
269
+ if (args.estimatedDurationMins !== undefined)
270
+ body.estimatedDurationMins = args.estimatedDurationMins;
271
+ if (args.verificationCommand !== undefined)
272
+ body.verificationCommand = args.verificationCommand;
273
+ if (args.rollbackStrategy !== undefined)
274
+ body.rollbackStrategy = args.rollbackStrategy;
275
+ if (args.sortOrder !== undefined)
276
+ body.sortOrder = args.sortOrder;
277
+ const data = await (0, client_js_1.apiPost)(`/products/${productId}/launch-plans/${planId}/activities`, body);
278
+ const activity = data;
279
+ return { content: [{ type: 'text', text: `Activity created.\nID: ${activity.id}\nTitle: ${activity.title}\nStatus: ${activity.status}` }] };
280
+ }
281
+ case 'update_launch_activity': {
282
+ if (!planId)
283
+ return { content: [{ type: 'text', text: 'Error: planId is required.' }] };
284
+ if (!activityId)
285
+ return { content: [{ type: 'text', text: 'Error: activityId is required.' }] };
286
+ const body = {};
287
+ if (args.title !== undefined)
288
+ body.title = args.title;
289
+ if (args.description !== undefined)
290
+ body.description = args.description;
291
+ if (args.ownerId !== undefined)
292
+ body.ownerId = args.ownerId;
293
+ if (args.estimatedDurationMins !== undefined)
294
+ body.estimatedDurationMins = args.estimatedDurationMins;
295
+ if (args.verificationCommand !== undefined)
296
+ body.verificationCommand = args.verificationCommand;
297
+ if (args.rollbackStrategy !== undefined)
298
+ body.rollbackStrategy = args.rollbackStrategy;
299
+ const data = await (0, client_js_1.apiPatch)(`/products/${productId}/launch-plans/${planId}/activities/${activityId}`, body);
300
+ const activity = data;
301
+ return { content: [{ type: 'text', text: `Activity updated.\nID: ${activity.id}\nTitle: ${activity.title}\nStatus: ${activity.status}` }] };
302
+ }
303
+ case 'change_activity_status': {
304
+ if (!planId)
305
+ return { content: [{ type: 'text', text: 'Error: planId is required.' }] };
306
+ if (!activityId)
307
+ return { content: [{ type: 'text', text: 'Error: activityId is required.' }] };
308
+ const body = { status: args.status };
309
+ if (args.notes !== undefined)
310
+ body.notes = args.notes;
311
+ const data = await (0, client_js_1.apiPatch)(`/products/${productId}/launch-plans/${planId}/activities/${activityId}/status`, body);
312
+ const activity = data;
313
+ return { content: [{ type: 'text', text: `Activity status changed.\nID: ${activity.id}\nTitle: ${activity.title}\nNew status: ${activity.status}` }] };
314
+ }
315
+ default:
316
+ return { content: [{ type: 'text', text: `Unknown launch plan tool: ${toolName}` }] };
317
+ }
318
+ }
319
+ //# sourceMappingURL=launchPlanTools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"launchPlanTools.js","sourceRoot":"","sources":["../../src/tools/launchPlanTools.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AA6KH,oDAkIC;AA5SD,4CAAyD;AAEzD,MAAM,kBAAkB,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,IAAI,EAAE,CAAC;AAEpE,iFAAiF;AAEpE,QAAA,yBAAyB,GAAW;IAC/C;QACE,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,mHAAmH;QAChI,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,uDAAuD,EAAE;aACpG;YACD,QAAQ,EAAE,EAAE;SACb;KACF;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,iEAAiE;QAC9E,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,uDAAuD,EAAE;gBACnG,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,mBAAmB,EAAE;aAC7D;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;KACF;IACD;QACE,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EACT,4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I,EAAE,gCAAgC,EAAE,CAAC,EAAE,CAAC;YAChG,MAAM,IAAI,GAA4B,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;YAC9D,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS;gBAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;YAEtD,MAAM,IAAI,GAAG,MAAM,IAAA,oBAAQ,EAAM,aAAa,SAAS,iBAAiB,MAAM,eAAe,UAAU,SAAS,EAAE,IAAI,CAAC,CAAC;YACxH,MAAM,QAAQ,GAAG,IAAI,CAAC;YACtB,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,iCAAiC,QAAQ,CAAC,EAAE,YAAY,QAAQ,CAAC,KAAK,iBAAiB,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;QACzJ,CAAC;QAED;YACE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,6BAA6B,QAAQ,EAAE,EAAE,CAAC,EAAE,CAAC;IAC1F,CAAC;AACH,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * MCP Tools: Product discovery and context bundle
3
+ * Tools: ping, get_capabilities, list_products, get_product_context, search_product
4
+ */
5
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
6
+ export declare const productToolDefinitions: Tool[];
7
+ export declare function handleProductTool(name: string, args: Record<string, unknown>): Promise<unknown>;
8
+ //# sourceMappingURL=productTools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"productTools.d.ts","sourceRoot":"","sources":["../../src/tools/productTools.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAG1D,eAAO,MAAM,sBAAsB,EAAE,IAAI,EAiDxC,CAAC;AAEF,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,oBAoBlF"}
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ /**
3
+ * MCP Tools: Product discovery and context bundle
4
+ * Tools: ping, get_capabilities, list_products, get_product_context, search_product
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.productToolDefinitions = void 0;
8
+ exports.handleProductTool = handleProductTool;
9
+ const client_js_1 = require("../client.js");
10
+ exports.productToolDefinitions = [
11
+ {
12
+ name: 'ping',
13
+ description: 'Check if the AutoProject agent API is reachable and return server health.',
14
+ inputSchema: { type: 'object', properties: {} },
15
+ },
16
+ {
17
+ name: 'get_capabilities',
18
+ description: 'Discover what this API key can do: granted scopes, autonomy level, available tools, and org policy. '
19
+ + 'Call this first when a tool returns a permission error (403) — if a tool you need is missing from the '
20
+ + "scopes list (e.g. read:defects for list_defects), the key is not authorized for it and the workspace "
21
+ + 'owner must grant that scope in AutoProject. Also serves as a usage guide for which tools are available.',
22
+ inputSchema: { type: 'object', properties: {} },
23
+ },
24
+ {
25
+ name: 'list_products',
26
+ description: 'List all products in the organisation that this API key can access.',
27
+ inputSchema: {
28
+ type: 'object',
29
+ properties: {
30
+ limit: { type: 'number', description: 'Max results (default 50, max 200)' },
31
+ },
32
+ },
33
+ },
34
+ {
35
+ name: 'get_product_context',
36
+ description: 'Get a concise LLM-optimised context bundle for a product, including open features, defects, and status summary. Call this at the start of a session.',
37
+ inputSchema: {
38
+ type: 'object',
39
+ properties: {
40
+ productId: { type: 'string', description: 'Product ID' },
41
+ },
42
+ required: ['productId'],
43
+ },
44
+ },
45
+ {
46
+ name: 'search_product',
47
+ description: 'Full-text search across features and defects within a product.',
48
+ inputSchema: {
49
+ type: 'object',
50
+ properties: {
51
+ productId: { type: 'string', description: 'Product ID' },
52
+ query: { type: 'string', description: 'Search query' },
53
+ limit: { type: 'number', description: 'Max results' },
54
+ },
55
+ required: ['productId', 'query'],
56
+ },
57
+ },
58
+ ];
59
+ async function handleProductTool(name, args) {
60
+ switch (name) {
61
+ case 'ping': {
62
+ return await (0, client_js_1.apiGet)('/health');
63
+ }
64
+ case 'get_capabilities': {
65
+ return await (0, client_js_1.apiGet)('/capabilities');
66
+ }
67
+ case 'list_products': {
68
+ return await (0, client_js_1.apiGet)('/products', { limit: args.limit });
69
+ }
70
+ case 'get_product_context': {
71
+ return await (0, client_js_1.apiGet)(`/products/${args.productId}/context-bundle`);
72
+ }
73
+ case 'search_product': {
74
+ return await (0, client_js_1.apiGet)(`/products/${args.productId}/search`, { q: args.query, limit: args.limit });
75
+ }
76
+ default:
77
+ throw new Error(`Unknown product tool: ${name}`);
78
+ }
79
+ }
80
+ //# sourceMappingURL=productTools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"productTools.js","sourceRoot":"","sources":["../../src/tools/productTools.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAwDH,8CAoBC;AAzED,4CAA+C;AAElC,QAAA,sBAAsB,GAAW;IAC5C;QACE,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,2EAA2E;QACxF,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE;KAChD;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,WAAW,EACT,sGAAsG;cACpG,wGAAwG;cACxG,uGAAuG;cACvG,yGAAyG;QAC7G,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE;KAChD;IACD;QACE,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,qEAAqE;QAClF,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,mCAAmC,EAAE;aAC5E;SACF;KACF;IACD;QACE,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,sJAAsJ;QACnK,WAAW,EAAE;YACX,IAAI,EAAE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,SAAS,SAAS,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAClG,CAAC;QACD;YACE,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;IACrD,CAAC;AACH,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * MCP Tools: Release cycle linking for feature groups and sub-features.
3
+ *
4
+ * Workflow for IDE agents:
5
+ * 1. Call list_release_cycles (existing tool) to discover available cycles and their IDs.
6
+ * 2. Call get_feature_group_release_cycle / get_feature_release_cycle to check if already linked.
7
+ * 3. If missing or wrong, call set_feature_group_release_cycle / set_feature_release_cycle.
8
+ *
9
+ * Terminology (aligned with AGENTS.md):
10
+ * "feature group" = DB FeatureGroup / API "features" (Feature Group in UI)
11
+ * "feature" = DB SubFeature / API "sub-features" (Feature in UI)
12
+ *
13
+ * Cascade note: setting a release cycle on a feature group automatically cascades
14
+ * to child features that previously inherited the old parent cycle.
15
+ */
16
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
17
+ export declare const releaseCycleLinkToolDefinitions: Tool[];
18
+ export declare function handleReleaseCycleLinkTool(toolName: string, args: Record<string, unknown>): Promise<{
19
+ content: {
20
+ type: string;
21
+ text: string;
22
+ }[];
23
+ }>;
24
+ //# sourceMappingURL=releaseCycleLinkTools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"releaseCycleLinkTools.d.ts","sourceRoot":"","sources":["../../src/tools/releaseCycleLinkTools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAK1D,eAAO,MAAM,+BAA+B,EAAE,IAAI,EAgEjD,CAAC;AAEF,wBAAsB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;GAqG/F"}
@@ -0,0 +1,174 @@
1
+ "use strict";
2
+ /**
3
+ * MCP Tools: Release cycle linking for feature groups and sub-features.
4
+ *
5
+ * Workflow for IDE agents:
6
+ * 1. Call list_release_cycles (existing tool) to discover available cycles and their IDs.
7
+ * 2. Call get_feature_group_release_cycle / get_feature_release_cycle to check if already linked.
8
+ * 3. If missing or wrong, call set_feature_group_release_cycle / set_feature_release_cycle.
9
+ *
10
+ * Terminology (aligned with AGENTS.md):
11
+ * "feature group" = DB FeatureGroup / API "features" (Feature Group in UI)
12
+ * "feature" = DB SubFeature / API "sub-features" (Feature in UI)
13
+ *
14
+ * Cascade note: setting a release cycle on a feature group automatically cascades
15
+ * to child features that previously inherited the old parent cycle.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.releaseCycleLinkToolDefinitions = void 0;
19
+ exports.handleReleaseCycleLinkTool = handleReleaseCycleLinkTool;
20
+ const client_js_1 = require("../client.js");
21
+ const DEFAULT_PRODUCT_ID = process.env.AUTOPROJECT_PRODUCT_ID ?? '';
22
+ exports.releaseCycleLinkToolDefinitions = [
23
+ {
24
+ name: 'get_feature_group_release_cycle',
25
+ description: 'Get the effective release cycle assigned to a feature group (Feature Group in UI). ' +
26
+ 'Returns the cycle details plus an "inherited" flag — true means the cycle comes from a parent (module), ' +
27
+ 'false means it is directly assigned. Returns null if no cycle is assigned at any level. ' +
28
+ 'Use this to detect missing release cycle links before calling set_feature_group_release_cycle.',
29
+ inputSchema: {
30
+ type: 'object',
31
+ properties: {
32
+ productId: { type: 'string', description: 'Product UUID. Defaults to AUTOPROJECT_PRODUCT_ID env.' },
33
+ featureId: { type: 'string', description: 'Feature group UUID (the "Feature Group" in the UI).' },
34
+ },
35
+ required: ['featureId'],
36
+ },
37
+ },
38
+ {
39
+ name: 'set_feature_group_release_cycle',
40
+ description: 'Assign or update the release cycle for a feature group (Feature Group in UI). ' +
41
+ 'Replaces any existing assignment. Also cascades to child features that previously ' +
42
+ 'inherited the old parent cycle. Use list_release_cycles to get valid releaseCycleIds.',
43
+ inputSchema: {
44
+ type: 'object',
45
+ properties: {
46
+ productId: { type: 'string', description: 'Product UUID. Defaults to AUTOPROJECT_PRODUCT_ID env.' },
47
+ featureId: { type: 'string', description: 'Feature group UUID.' },
48
+ releaseCycleId: { type: 'string', description: 'Release cycle UUID to assign.' },
49
+ },
50
+ required: ['featureId', 'releaseCycleId'],
51
+ },
52
+ },
53
+ {
54
+ name: 'get_feature_release_cycle',
55
+ description: 'Get the effective release cycle for a feature (Feature in UI, called sub-feature in the API). ' +
56
+ 'Returns cycle details plus "inherited" flag — if inherited=true, the cycle comes from the parent feature group. ' +
57
+ 'Returns null if no cycle is assigned at any level.',
58
+ inputSchema: {
59
+ type: 'object',
60
+ properties: {
61
+ productId: { type: 'string', description: 'Product UUID. Defaults to AUTOPROJECT_PRODUCT_ID env.' },
62
+ subFeatureId: { type: 'string', description: 'Feature UUID (the "Feature" in the UI, sub-feature in the API).' },
63
+ },
64
+ required: ['subFeatureId'],
65
+ },
66
+ },
67
+ {
68
+ name: 'set_feature_release_cycle',
69
+ description: 'Assign or update the release cycle for a specific feature (Feature in UI, sub-feature in API). ' +
70
+ 'This overrides any inherited cycle from the parent feature group with an explicit direct assignment. ' +
71
+ 'Use list_release_cycles to get valid releaseCycleIds.',
72
+ inputSchema: {
73
+ type: 'object',
74
+ properties: {
75
+ productId: { type: 'string', description: 'Product UUID. Defaults to AUTOPROJECT_PRODUCT_ID env.' },
76
+ subFeatureId: { type: 'string', description: 'Feature UUID (sub-feature in the API).' },
77
+ releaseCycleId: { type: 'string', description: 'Release cycle UUID to assign.' },
78
+ },
79
+ required: ['subFeatureId', 'releaseCycleId'],
80
+ },
81
+ },
82
+ ];
83
+ async function handleReleaseCycleLinkTool(toolName, args) {
84
+ const productId = args.productId || DEFAULT_PRODUCT_ID;
85
+ if (!productId) {
86
+ return { content: [{ type: 'text', text: 'Error: productId is required (or set AUTOPROJECT_PRODUCT_ID env).' }] };
87
+ }
88
+ switch (toolName) {
89
+ case 'get_feature_group_release_cycle': {
90
+ const featureId = args.featureId;
91
+ if (!featureId)
92
+ return { content: [{ type: 'text', text: 'Error: featureId is required.' }] };
93
+ const data = await (0, client_js_1.apiGet)(`/products/${productId}/features/${featureId}/release-cycle`);
94
+ if (data === null || data === undefined) {
95
+ return { content: [{ type: 'text', text: 'No release cycle is assigned to this feature group.' }] };
96
+ }
97
+ const cycle = data;
98
+ const inheritedNote = cycle.inherited ? ' (inherited from parent module)' : ' (directly assigned)';
99
+ return {
100
+ content: [
101
+ {
102
+ type: 'text',
103
+ text: `Release cycle for feature group ${featureId}:\n` +
104
+ `[${cycle.id}] ${cycle.name}${inheritedNote}\n` +
105
+ `Status: ${cycle.status ?? 'N/A'} | ${cycle.startDate ?? '?'} → ${cycle.endDate ?? '?'}`,
106
+ },
107
+ ],
108
+ };
109
+ }
110
+ case 'set_feature_group_release_cycle': {
111
+ const featureId = args.featureId;
112
+ if (!featureId)
113
+ return { content: [{ type: 'text', text: 'Error: featureId is required.' }] };
114
+ const releaseCycleId = args.releaseCycleId;
115
+ if (!releaseCycleId)
116
+ return { content: [{ type: 'text', text: 'Error: releaseCycleId is required.' }] };
117
+ const data = await (0, client_js_1.apiPut)(`/products/${productId}/features/${featureId}/release-cycle`, { releaseCycleId });
118
+ return {
119
+ content: [
120
+ {
121
+ type: 'text',
122
+ text: `Release cycle assigned to feature group.\n` +
123
+ `Feature group: ${featureId}\n` +
124
+ `Cycle: [${data.releaseCycleId}] ${data.releaseCycleName}\n` +
125
+ `(Child features that shared the previous cycle have been updated too.)`,
126
+ },
127
+ ],
128
+ };
129
+ }
130
+ case 'get_feature_release_cycle': {
131
+ const subFeatureId = args.subFeatureId;
132
+ if (!subFeatureId)
133
+ return { content: [{ type: 'text', text: 'Error: subFeatureId is required.' }] };
134
+ const data = await (0, client_js_1.apiGet)(`/products/${productId}/sub-features/${subFeatureId}/release-cycle`);
135
+ if (data === null || data === undefined) {
136
+ return { content: [{ type: 'text', text: 'No release cycle is assigned to this feature (not even inherited).' }] };
137
+ }
138
+ const cycle = data;
139
+ const inheritedNote = cycle.inherited ? ' (inherited from parent feature group)' : ' (directly assigned)';
140
+ return {
141
+ content: [
142
+ {
143
+ type: 'text',
144
+ text: `Release cycle for feature ${subFeatureId}:\n` +
145
+ `[${cycle.id}] ${cycle.name}${inheritedNote}\n` +
146
+ `Status: ${cycle.status ?? 'N/A'} | ${cycle.startDate ?? '?'} → ${cycle.endDate ?? '?'}`,
147
+ },
148
+ ],
149
+ };
150
+ }
151
+ case 'set_feature_release_cycle': {
152
+ const subFeatureId = args.subFeatureId;
153
+ if (!subFeatureId)
154
+ return { content: [{ type: 'text', text: 'Error: subFeatureId is required.' }] };
155
+ const releaseCycleId = args.releaseCycleId;
156
+ if (!releaseCycleId)
157
+ return { content: [{ type: 'text', text: 'Error: releaseCycleId is required.' }] };
158
+ const data = await (0, client_js_1.apiPut)(`/products/${productId}/sub-features/${subFeatureId}/release-cycle`, { releaseCycleId });
159
+ return {
160
+ content: [
161
+ {
162
+ type: 'text',
163
+ text: `Release cycle assigned to feature.\n` +
164
+ `Feature: ${subFeatureId}\n` +
165
+ `Cycle: [${data.releaseCycleId}] ${data.releaseCycleName}`,
166
+ },
167
+ ],
168
+ };
169
+ }
170
+ default:
171
+ return { content: [{ type: 'text', text: `Unknown release cycle link tool: ${toolName}` }] };
172
+ }
173
+ }
174
+ //# sourceMappingURL=releaseCycleLinkTools.js.map