@agllama/mcp 0.5.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/LICENSE +21 -0
- package/README.md +248 -0
- package/dist/api-client.d.ts +120 -0
- package/dist/api-client.d.ts.map +1 -0
- package/dist/api-client.js +421 -0
- package/dist/api-client.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +4 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +673 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/backlog.d.ts +22 -0
- package/dist/tools/backlog.d.ts.map +1 -0
- package/dist/tools/backlog.js +109 -0
- package/dist/tools/backlog.js.map +1 -0
- package/dist/tools/boardConfig.d.ts +77 -0
- package/dist/tools/boardConfig.d.ts.map +1 -0
- package/dist/tools/boardConfig.js +154 -0
- package/dist/tools/boardConfig.js.map +1 -0
- package/dist/tools/boardTemplates.d.ts +47 -0
- package/dist/tools/boardTemplates.d.ts.map +1 -0
- package/dist/tools/boardTemplates.js +119 -0
- package/dist/tools/boardTemplates.js.map +1 -0
- package/dist/tools/boards.d.ts +62 -0
- package/dist/tools/boards.d.ts.map +1 -0
- package/dist/tools/boards.js +260 -0
- package/dist/tools/boards.js.map +1 -0
- package/dist/tools/comments.d.ts +82 -0
- package/dist/tools/comments.d.ts.map +1 -0
- package/dist/tools/comments.js +275 -0
- package/dist/tools/comments.js.map +1 -0
- package/dist/tools/connect.d.ts +7 -0
- package/dist/tools/connect.d.ts.map +1 -0
- package/dist/tools/connect.js +50 -0
- package/dist/tools/connect.js.map +1 -0
- package/dist/tools/context.d.ts +19 -0
- package/dist/tools/context.d.ts.map +1 -0
- package/dist/tools/context.js +136 -0
- package/dist/tools/context.js.map +1 -0
- package/dist/tools/documents.d.ts +99 -0
- package/dist/tools/documents.d.ts.map +1 -0
- package/dist/tools/documents.js +252 -0
- package/dist/tools/documents.js.map +1 -0
- package/dist/tools/help.d.ts +13 -0
- package/dist/tools/help.d.ts.map +1 -0
- package/dist/tools/help.js +485 -0
- package/dist/tools/help.js.map +1 -0
- package/dist/tools/index.d.ts +21 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +21 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/issueLinks.d.ts +45 -0
- package/dist/tools/issueLinks.d.ts.map +1 -0
- package/dist/tools/issueLinks.js +147 -0
- package/dist/tools/issueLinks.js.map +1 -0
- package/dist/tools/issues.d.ts +307 -0
- package/dist/tools/issues.d.ts.map +1 -0
- package/dist/tools/issues.js +715 -0
- package/dist/tools/issues.js.map +1 -0
- package/dist/tools/labels.d.ts +56 -0
- package/dist/tools/labels.d.ts.map +1 -0
- package/dist/tools/labels.js +213 -0
- package/dist/tools/labels.js.map +1 -0
- package/dist/tools/members.d.ts +13 -0
- package/dist/tools/members.d.ts.map +1 -0
- package/dist/tools/members.js +43 -0
- package/dist/tools/members.js.map +1 -0
- package/dist/tools/organizations.d.ts +35 -0
- package/dist/tools/organizations.d.ts.map +1 -0
- package/dist/tools/organizations.js +116 -0
- package/dist/tools/organizations.js.map +1 -0
- package/dist/tools/projects.d.ts +67 -0
- package/dist/tools/projects.d.ts.map +1 -0
- package/dist/tools/projects.js +165 -0
- package/dist/tools/projects.js.map +1 -0
- package/dist/tools/search.d.ts +34 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/tools/search.js +85 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/tools/session.d.ts +38 -0
- package/dist/tools/session.d.ts.map +1 -0
- package/dist/tools/session.js +158 -0
- package/dist/tools/session.js.map +1 -0
- package/dist/tools/sprints.d.ts +141 -0
- package/dist/tools/sprints.d.ts.map +1 -0
- package/dist/tools/sprints.js +470 -0
- package/dist/tools/sprints.js.map +1 -0
- package/dist/tools/status.d.ts +22 -0
- package/dist/tools/status.d.ts.map +1 -0
- package/dist/tools/status.js +81 -0
- package/dist/tools/status.js.map +1 -0
- package/dist/tools/workflows.d.ts +137 -0
- package/dist/tools/workflows.d.ts.map +1 -0
- package/dist/tools/workflows.js +355 -0
- package/dist/tools/workflows.js.map +1 -0
- package/dist/types.d.ts +434 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/column-instructions.d.ts +21 -0
- package/dist/utils/column-instructions.d.ts.map +1 -0
- package/dist/utils/column-instructions.js +54 -0
- package/dist/utils/column-instructions.js.map +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sprints.d.ts","sourceRoot":"","sources":["../../src/tools/sprints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,mBAAmB,uBAAuB,CAAC;AAExD,eAAO,MAAM,0BAA0B,uGAC2B,CAAC;AAEnE,eAAO,MAAM,qBAAqB;;;;;;;;;EAShC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEzE,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,oBAAoB,GAC1B,OAAO,CAAC,MAAM,CAAC,CAuEjB;AAMD,eAAO,MAAM,oBAAoB,wBAAwB,CAAC;AAE1D,eAAO,MAAM,2BAA2B,kGACkB,CAAC;AAE3D,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;EAgBjC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE3E,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,MAAM,CAAC,CAoEjB;AAMD,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AAEzD,eAAO,MAAM,0BAA0B,wHACe,CAAC;AAEvD,eAAO,MAAM,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AAsB;;;;;;;;;;;;;;;;;;EAMjC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE3E,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,MAAM,CAAC,CAyCjB;AAMD,eAAO,MAAM,oBAAoB,wBAAwB,CAAC;AAE1D,eAAO,MAAM,2BAA2B,wLAGiB,CAAC;AAE1D,eAAO,MAAM,sBAAsB;;;;;;EAEjC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE3E,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,MAAM,CAAC,CA8BjB"}
|
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getApiClient, LlamaApiError } from '../api-client.js';
|
|
3
|
+
import { getSessionDefaults } from './session.js';
|
|
4
|
+
// ============================================
|
|
5
|
+
// List Sprints
|
|
6
|
+
// ============================================
|
|
7
|
+
export const listSprintsToolName = 'llama_list_sprints';
|
|
8
|
+
export const listSprintsToolDescription = `List all sprints for a project.
|
|
9
|
+
Returns planned, active, and completed sprints with their issues.`;
|
|
10
|
+
export const listSprintsToolSchema = z.object({
|
|
11
|
+
orgSlug: z
|
|
12
|
+
.string()
|
|
13
|
+
.optional()
|
|
14
|
+
.describe('Organization slug (uses session default if not provided)'),
|
|
15
|
+
projectKey: z
|
|
16
|
+
.string()
|
|
17
|
+
.optional()
|
|
18
|
+
.describe('Project key (uses session default if not provided)'),
|
|
19
|
+
});
|
|
20
|
+
export async function executeListSprints(input) {
|
|
21
|
+
try {
|
|
22
|
+
const session = await getSessionDefaults();
|
|
23
|
+
const orgSlug = input.orgSlug ?? session?.orgSlug;
|
|
24
|
+
const projectKey = input.projectKey ?? session?.projectKey;
|
|
25
|
+
if (!orgSlug) {
|
|
26
|
+
return JSON.stringify({
|
|
27
|
+
success: false,
|
|
28
|
+
error: 'orgSlug is required. Either provide it or set session context with llama_set_context first.',
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
if (!projectKey) {
|
|
32
|
+
return JSON.stringify({
|
|
33
|
+
success: false,
|
|
34
|
+
error: 'projectKey is required. Either provide it or set session context with llama_set_context first.',
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
const client = getApiClient();
|
|
38
|
+
// Record tool call
|
|
39
|
+
try {
|
|
40
|
+
await client.recordToolCall('llama_list_sprints', { orgSlug, projectKey });
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
// Ignore recording errors
|
|
44
|
+
}
|
|
45
|
+
const sprints = await client.listSprints(orgSlug, projectKey);
|
|
46
|
+
return JSON.stringify({
|
|
47
|
+
success: true,
|
|
48
|
+
sprints: sprints.map((s) => ({
|
|
49
|
+
id: s.id,
|
|
50
|
+
name: s.name,
|
|
51
|
+
status: s.status,
|
|
52
|
+
goal: s.goal,
|
|
53
|
+
period: s.startDate && s.endDate
|
|
54
|
+
? `${s.startDate.split('T')[0]} to ${s.endDate.split('T')[0]}`
|
|
55
|
+
: 'Not scheduled',
|
|
56
|
+
issueCount: s.issueCount,
|
|
57
|
+
completedCount: s.completedCount,
|
|
58
|
+
})),
|
|
59
|
+
}, null, 2);
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
if (error instanceof LlamaApiError) {
|
|
63
|
+
return JSON.stringify({
|
|
64
|
+
success: false,
|
|
65
|
+
error: `Failed to list sprints: ${error.message}`,
|
|
66
|
+
statusCode: error.statusCode,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return JSON.stringify({
|
|
70
|
+
success: false,
|
|
71
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
// ============================================
|
|
76
|
+
// Create Sprint
|
|
77
|
+
// ============================================
|
|
78
|
+
export const createSprintToolName = 'llama_create_sprint';
|
|
79
|
+
export const createSprintToolDescription = `Create a new sprint for a project.
|
|
80
|
+
Sprints start in PLANNED status and can be started later.`;
|
|
81
|
+
export const createSprintToolSchema = z.object({
|
|
82
|
+
orgSlug: z
|
|
83
|
+
.string()
|
|
84
|
+
.optional()
|
|
85
|
+
.describe('Organization slug (uses session default if not provided)'),
|
|
86
|
+
projectKey: z
|
|
87
|
+
.string()
|
|
88
|
+
.optional()
|
|
89
|
+
.describe('Project key (uses session default if not provided)'),
|
|
90
|
+
name: z.string().describe('Sprint name (e.g., "Sprint 5")'),
|
|
91
|
+
goal: z.string().optional().describe('Sprint goal'),
|
|
92
|
+
startDate: z
|
|
93
|
+
.string()
|
|
94
|
+
.optional()
|
|
95
|
+
.describe('Start date (ISO format: YYYY-MM-DD)'),
|
|
96
|
+
endDate: z.string().optional().describe('End date (ISO format: YYYY-MM-DD)'),
|
|
97
|
+
});
|
|
98
|
+
export async function executeCreateSprint(input) {
|
|
99
|
+
try {
|
|
100
|
+
const session = await getSessionDefaults();
|
|
101
|
+
const orgSlug = input.orgSlug ?? session?.orgSlug;
|
|
102
|
+
const projectKey = input.projectKey ?? session?.projectKey;
|
|
103
|
+
if (!orgSlug) {
|
|
104
|
+
return JSON.stringify({
|
|
105
|
+
success: false,
|
|
106
|
+
error: 'orgSlug is required. Either provide it or set session context with llama_set_context first.',
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
if (!projectKey) {
|
|
110
|
+
return JSON.stringify({
|
|
111
|
+
success: false,
|
|
112
|
+
error: 'projectKey is required. Either provide it or set session context with llama_set_context first.',
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
const client = getApiClient();
|
|
116
|
+
// Record tool call
|
|
117
|
+
try {
|
|
118
|
+
await client.recordToolCall('llama_create_sprint', { orgSlug, projectKey });
|
|
119
|
+
}
|
|
120
|
+
catch {
|
|
121
|
+
// Ignore recording errors
|
|
122
|
+
}
|
|
123
|
+
const sprint = await client.createSprint(orgSlug, projectKey, {
|
|
124
|
+
name: input.name,
|
|
125
|
+
goal: input.goal,
|
|
126
|
+
startDate: input.startDate,
|
|
127
|
+
endDate: input.endDate,
|
|
128
|
+
});
|
|
129
|
+
return JSON.stringify({
|
|
130
|
+
success: true,
|
|
131
|
+
message: `Created sprint "${sprint.name}"`,
|
|
132
|
+
sprint: {
|
|
133
|
+
id: sprint.id,
|
|
134
|
+
name: sprint.name,
|
|
135
|
+
status: sprint.status,
|
|
136
|
+
goal: sprint.goal,
|
|
137
|
+
},
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
if (error instanceof LlamaApiError) {
|
|
142
|
+
return JSON.stringify({
|
|
143
|
+
success: false,
|
|
144
|
+
error: `Failed to create sprint: ${error.message}`,
|
|
145
|
+
statusCode: error.statusCode,
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
return JSON.stringify({
|
|
149
|
+
success: false,
|
|
150
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
// ============================================
|
|
155
|
+
// Add Issues to Sprint
|
|
156
|
+
// ============================================
|
|
157
|
+
export const addToSprintToolName = 'llama_add_to_sprint';
|
|
158
|
+
export const addToSprintToolDescription = `Move one or more issues to a sprint (or remove from sprint).
|
|
159
|
+
Pass null for sprintId to move issues to the backlog.`;
|
|
160
|
+
export const addToSprintToolSchema = z.object({
|
|
161
|
+
orgSlug: z
|
|
162
|
+
.string()
|
|
163
|
+
.optional()
|
|
164
|
+
.describe('Organization slug (uses session default if not provided)'),
|
|
165
|
+
projectKey: z
|
|
166
|
+
.string()
|
|
167
|
+
.optional()
|
|
168
|
+
.describe('Project key (uses session default if not provided)'),
|
|
169
|
+
issueKeys: z
|
|
170
|
+
.array(z.string())
|
|
171
|
+
.min(1)
|
|
172
|
+
.max(20)
|
|
173
|
+
.describe('Issue keys to move (max 20)'),
|
|
174
|
+
sprintId: z
|
|
175
|
+
.string()
|
|
176
|
+
.nullable()
|
|
177
|
+
.describe('Sprint ID to move to, or null for backlog'),
|
|
178
|
+
});
|
|
179
|
+
export async function executeAddToSprint(input) {
|
|
180
|
+
try {
|
|
181
|
+
const session = await getSessionDefaults();
|
|
182
|
+
const orgSlug = input.orgSlug ?? session?.orgSlug;
|
|
183
|
+
const projectKey = input.projectKey ?? session?.projectKey;
|
|
184
|
+
if (!orgSlug) {
|
|
185
|
+
return JSON.stringify({
|
|
186
|
+
success: false,
|
|
187
|
+
error: 'orgSlug is required. Either provide it or set session context with llama_set_context first.',
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
if (!projectKey) {
|
|
191
|
+
return JSON.stringify({
|
|
192
|
+
success: false,
|
|
193
|
+
error: 'projectKey is required. Either provide it or set session context with llama_set_context first.',
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
const client = getApiClient();
|
|
197
|
+
// Record tool call
|
|
198
|
+
try {
|
|
199
|
+
await client.recordToolCall('llama_add_to_sprint', { orgSlug, projectKey });
|
|
200
|
+
}
|
|
201
|
+
catch {
|
|
202
|
+
// Ignore recording errors
|
|
203
|
+
}
|
|
204
|
+
const issues = await client.addIssuesToSprint(orgSlug, projectKey, input.issueKeys, input.sprintId);
|
|
205
|
+
const destination = input.sprintId ? 'sprint' : 'backlog';
|
|
206
|
+
return JSON.stringify({
|
|
207
|
+
success: true,
|
|
208
|
+
message: `Moved ${issues.length} issue(s) to ${destination}`,
|
|
209
|
+
issues: issues.map((i) => ({
|
|
210
|
+
key: i.key,
|
|
211
|
+
summary: i.summary,
|
|
212
|
+
})),
|
|
213
|
+
}, null, 2);
|
|
214
|
+
}
|
|
215
|
+
catch (error) {
|
|
216
|
+
if (error instanceof LlamaApiError) {
|
|
217
|
+
return JSON.stringify({
|
|
218
|
+
success: false,
|
|
219
|
+
error: `Failed to move issues: ${error.message}`,
|
|
220
|
+
statusCode: error.statusCode,
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
return JSON.stringify({
|
|
224
|
+
success: false,
|
|
225
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
// ============================================
|
|
230
|
+
// Get Sprint
|
|
231
|
+
// ============================================
|
|
232
|
+
export const getSprintToolName = 'llama_get_sprint';
|
|
233
|
+
export const getSprintToolDescription = `Get details for a specific sprint by ID.
|
|
234
|
+
Returns sprint info including all issues in the sprint.`;
|
|
235
|
+
export const getSprintToolSchema = z.object({
|
|
236
|
+
sprintId: z.string().describe('Sprint ID'),
|
|
237
|
+
});
|
|
238
|
+
export async function executeGetSprint(input) {
|
|
239
|
+
try {
|
|
240
|
+
const client = getApiClient();
|
|
241
|
+
const sprint = await client.getSprint(input.sprintId);
|
|
242
|
+
return JSON.stringify({
|
|
243
|
+
success: true,
|
|
244
|
+
sprint: {
|
|
245
|
+
id: sprint.id,
|
|
246
|
+
name: sprint.name,
|
|
247
|
+
status: sprint.status,
|
|
248
|
+
goal: sprint.goal,
|
|
249
|
+
startDate: sprint.startDate,
|
|
250
|
+
endDate: sprint.endDate,
|
|
251
|
+
issueCount: sprint.issueCount,
|
|
252
|
+
completedCount: sprint.completedCount,
|
|
253
|
+
issues: sprint.issues?.map((i) => ({
|
|
254
|
+
key: i.key,
|
|
255
|
+
summary: i.summary,
|
|
256
|
+
type: i.type,
|
|
257
|
+
status: i.status,
|
|
258
|
+
priority: i.priority,
|
|
259
|
+
assignee: i.assignee,
|
|
260
|
+
})),
|
|
261
|
+
},
|
|
262
|
+
}, null, 2);
|
|
263
|
+
}
|
|
264
|
+
catch (error) {
|
|
265
|
+
if (error instanceof LlamaApiError) {
|
|
266
|
+
return JSON.stringify({
|
|
267
|
+
success: false,
|
|
268
|
+
error: `Failed to get sprint: ${error.message}`,
|
|
269
|
+
statusCode: error.statusCode,
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
return JSON.stringify({
|
|
273
|
+
success: false,
|
|
274
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
// ============================================
|
|
279
|
+
// Start Sprint
|
|
280
|
+
// ============================================
|
|
281
|
+
export const startSprintToolName = 'llama_start_sprint';
|
|
282
|
+
export const startSprintToolDescription = `Start a planned sprint.
|
|
283
|
+
Only one sprint can be active at a time per project.
|
|
284
|
+
Optionally specify start and end dates.`;
|
|
285
|
+
export const startSprintToolSchema = z.object({
|
|
286
|
+
sprintId: z.string().describe('Sprint ID to start'),
|
|
287
|
+
startDate: z
|
|
288
|
+
.string()
|
|
289
|
+
.optional()
|
|
290
|
+
.describe('Start date (ISO format: YYYY-MM-DD). Defaults to today.'),
|
|
291
|
+
endDate: z
|
|
292
|
+
.string()
|
|
293
|
+
.optional()
|
|
294
|
+
.describe('End date (ISO format: YYYY-MM-DD). Typically 2 weeks from start.'),
|
|
295
|
+
});
|
|
296
|
+
export async function executeStartSprint(input) {
|
|
297
|
+
try {
|
|
298
|
+
const client = getApiClient();
|
|
299
|
+
const sprint = await client.startSprint(input.sprintId, {
|
|
300
|
+
startDate: input.startDate,
|
|
301
|
+
endDate: input.endDate,
|
|
302
|
+
});
|
|
303
|
+
return JSON.stringify({
|
|
304
|
+
success: true,
|
|
305
|
+
message: `Started sprint "${sprint.name}"`,
|
|
306
|
+
sprint: {
|
|
307
|
+
id: sprint.id,
|
|
308
|
+
name: sprint.name,
|
|
309
|
+
status: sprint.status,
|
|
310
|
+
startDate: sprint.startDate,
|
|
311
|
+
endDate: sprint.endDate,
|
|
312
|
+
},
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
catch (error) {
|
|
316
|
+
if (error instanceof LlamaApiError) {
|
|
317
|
+
return JSON.stringify({
|
|
318
|
+
success: false,
|
|
319
|
+
error: `Failed to start sprint: ${error.message}`,
|
|
320
|
+
statusCode: error.statusCode,
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
return JSON.stringify({
|
|
324
|
+
success: false,
|
|
325
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
// ============================================
|
|
330
|
+
// Complete Sprint
|
|
331
|
+
// ============================================
|
|
332
|
+
export const completeSprintToolName = 'llama_complete_sprint';
|
|
333
|
+
export const completeSprintToolDescription = `Complete an active sprint.
|
|
334
|
+
Incomplete issues can be moved to backlog or another sprint.`;
|
|
335
|
+
export const completeSprintToolSchema = z.object({
|
|
336
|
+
sprintId: z.string().describe('Sprint ID to complete'),
|
|
337
|
+
moveIncompleteToBacklog: z
|
|
338
|
+
.boolean()
|
|
339
|
+
.optional()
|
|
340
|
+
.describe('Move incomplete issues to backlog (default: true)'),
|
|
341
|
+
moveIncompleteToSprintId: z
|
|
342
|
+
.string()
|
|
343
|
+
.optional()
|
|
344
|
+
.describe('Move incomplete issues to this sprint instead of backlog'),
|
|
345
|
+
});
|
|
346
|
+
export async function executeCompleteSprint(input) {
|
|
347
|
+
try {
|
|
348
|
+
const client = getApiClient();
|
|
349
|
+
const sprint = await client.completeSprint(input.sprintId, {
|
|
350
|
+
moveIncompleteToBacklog: input.moveIncompleteToBacklog,
|
|
351
|
+
moveIncompleteToSprintId: input.moveIncompleteToSprintId,
|
|
352
|
+
});
|
|
353
|
+
return JSON.stringify({
|
|
354
|
+
success: true,
|
|
355
|
+
message: `Completed sprint "${sprint.name}"`,
|
|
356
|
+
sprint: {
|
|
357
|
+
id: sprint.id,
|
|
358
|
+
name: sprint.name,
|
|
359
|
+
status: sprint.status,
|
|
360
|
+
completedCount: sprint.completedCount,
|
|
361
|
+
issueCount: sprint.issueCount,
|
|
362
|
+
},
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
catch (error) {
|
|
366
|
+
if (error instanceof LlamaApiError) {
|
|
367
|
+
return JSON.stringify({
|
|
368
|
+
success: false,
|
|
369
|
+
error: `Failed to complete sprint: ${error.message}`,
|
|
370
|
+
statusCode: error.statusCode,
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
return JSON.stringify({
|
|
374
|
+
success: false,
|
|
375
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
// ============================================
|
|
380
|
+
// Update Sprint
|
|
381
|
+
// ============================================
|
|
382
|
+
export const updateSprintToolName = 'llama_update_sprint';
|
|
383
|
+
export const updateSprintToolDescription = `Update a sprint's name, goal, or dates.
|
|
384
|
+
Only include the fields you want to change.`;
|
|
385
|
+
export const updateSprintToolSchema = z.object({
|
|
386
|
+
sprintId: z.string().describe('Sprint ID to update'),
|
|
387
|
+
name: z.string().optional().describe('New sprint name'),
|
|
388
|
+
goal: z.string().optional().describe('New sprint goal'),
|
|
389
|
+
startDate: z.string().optional().describe('New start date (YYYY-MM-DD)'),
|
|
390
|
+
endDate: z.string().optional().describe('New end date (YYYY-MM-DD)'),
|
|
391
|
+
});
|
|
392
|
+
export async function executeUpdateSprint(input) {
|
|
393
|
+
try {
|
|
394
|
+
const { sprintId, ...updates } = input;
|
|
395
|
+
const updateFields = {};
|
|
396
|
+
if (updates.name !== undefined)
|
|
397
|
+
updateFields.name = updates.name;
|
|
398
|
+
if (updates.goal !== undefined)
|
|
399
|
+
updateFields.goal = updates.goal;
|
|
400
|
+
if (updates.startDate !== undefined)
|
|
401
|
+
updateFields.startDate = updates.startDate;
|
|
402
|
+
if (updates.endDate !== undefined)
|
|
403
|
+
updateFields.endDate = updates.endDate;
|
|
404
|
+
const client = getApiClient();
|
|
405
|
+
const sprint = await client.updateSprint(sprintId, updateFields);
|
|
406
|
+
return JSON.stringify({
|
|
407
|
+
success: true,
|
|
408
|
+
message: `Updated sprint "${sprint.name}"`,
|
|
409
|
+
sprint: {
|
|
410
|
+
id: sprint.id,
|
|
411
|
+
name: sprint.name,
|
|
412
|
+
goal: sprint.goal,
|
|
413
|
+
startDate: sprint.startDate,
|
|
414
|
+
endDate: sprint.endDate,
|
|
415
|
+
},
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
catch (error) {
|
|
419
|
+
if (error instanceof LlamaApiError) {
|
|
420
|
+
return JSON.stringify({
|
|
421
|
+
success: false,
|
|
422
|
+
error: `Failed to update sprint: ${error.message}`,
|
|
423
|
+
statusCode: error.statusCode,
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
return JSON.stringify({
|
|
427
|
+
success: false,
|
|
428
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
// ============================================
|
|
433
|
+
// Delete Sprint
|
|
434
|
+
// ============================================
|
|
435
|
+
export const deleteSprintToolName = 'llama_delete_sprint';
|
|
436
|
+
export const deleteSprintToolDescription = `Delete a sprint.
|
|
437
|
+
Issues in the sprint will be moved to the backlog.
|
|
438
|
+
Cannot delete an active sprint - complete it first.
|
|
439
|
+
Returns the number of issues that were moved to backlog.`;
|
|
440
|
+
export const deleteSprintToolSchema = z.object({
|
|
441
|
+
sprintId: z.string().describe('Sprint ID to delete'),
|
|
442
|
+
});
|
|
443
|
+
export async function executeDeleteSprint(input) {
|
|
444
|
+
try {
|
|
445
|
+
const client = getApiClient();
|
|
446
|
+
const result = await client.deleteSprint(input.sprintId);
|
|
447
|
+
return JSON.stringify({
|
|
448
|
+
success: true,
|
|
449
|
+
message: `Deleted sprint`,
|
|
450
|
+
issuesMovedToBacklog: result.issuesMovedToBacklog,
|
|
451
|
+
impact: result.issuesMovedToBacklog > 0
|
|
452
|
+
? `${result.issuesMovedToBacklog} issue${result.issuesMovedToBacklog === 1 ? '' : 's'} moved to backlog`
|
|
453
|
+
: 'Sprint had no issues',
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
catch (error) {
|
|
457
|
+
if (error instanceof LlamaApiError) {
|
|
458
|
+
return JSON.stringify({
|
|
459
|
+
success: false,
|
|
460
|
+
error: `Failed to delete sprint: ${error.message}`,
|
|
461
|
+
statusCode: error.statusCode,
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
return JSON.stringify({
|
|
465
|
+
success: false,
|
|
466
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
//# sourceMappingURL=sprints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sprints.js","sourceRoot":"","sources":["../../src/tools/sprints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,+CAA+C;AAC/C,eAAe;AACf,+CAA+C;AAE/C,MAAM,CAAC,MAAM,mBAAmB,GAAG,oBAAoB,CAAC;AAExD,MAAM,CAAC,MAAM,0BAA0B,GAAG;kEACwB,CAAC;AAEnE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,0DAA0D,CAAC;IACvE,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,oDAAoD,CAAC;CAClE,CAAC,CAAC;AAIH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,KAA2B;IAE3B,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,kBAAkB,EAAE,CAAC;QAE3C,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,OAAO,EAAE,OAAO,CAAC;QAClD,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,OAAO,EAAE,UAAU,CAAC;QAE3D,IAAI,CAAC,O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,KAAK;gBACd,KAAK,EAAE,4BAA4B,KAAK,CAAC,OAAO,EAAE;gBAClD,UAAU,EAAE,KAAK,CAAC,UAAU;aAC7B,CAAC,CAAC;QACP,CAAC;QAED,OAAO,IAAI,CAAC,SAAS,CACnB;YACE,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC,CAAC;IACP,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const updateStatusToolName = "llama_update_status";
|
|
3
|
+
export declare const updateStatusToolDescription = "Move an issue to a different status in the workflow.\nFirst use llama_context to see available statuses for the project.\n\nCommon status names: \"To Do\", \"In Progress\", \"In Review\", \"Done\"\nThe exact names depend on the project's workflow configuration.";
|
|
4
|
+
export declare const updateStatusToolSchema: z.ZodObject<{
|
|
5
|
+
orgSlug: z.ZodOptional<z.ZodString>;
|
|
6
|
+
projectKey: z.ZodOptional<z.ZodString>;
|
|
7
|
+
issueKey: z.ZodString;
|
|
8
|
+
statusId: z.ZodString;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
issueKey: string;
|
|
11
|
+
statusId: string;
|
|
12
|
+
orgSlug?: string | undefined;
|
|
13
|
+
projectKey?: string | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
issueKey: string;
|
|
16
|
+
statusId: string;
|
|
17
|
+
orgSlug?: string | undefined;
|
|
18
|
+
projectKey?: string | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
export type UpdateStatusToolInput = z.infer<typeof updateStatusToolSchema>;
|
|
21
|
+
export declare function executeUpdateStatus(input: UpdateStatusToolInput): Promise<string>;
|
|
22
|
+
//# sourceMappingURL=status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/tools/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,oBAAoB,wBAAwB,CAAC;AAE1D,eAAO,MAAM,2BAA2B,0QAIwB,CAAC;AAEjE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;EAWjC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE3E,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,MAAM,CAAC,CAiFjB"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getApiClient, LlamaApiError } from '../api-client.js';
|
|
3
|
+
import { getColumnInstructionsForStatus } from '../utils/column-instructions.js';
|
|
4
|
+
import { getSessionDefaults } from './session.js';
|
|
5
|
+
export const updateStatusToolName = 'llama_update_status';
|
|
6
|
+
export const updateStatusToolDescription = `Move an issue to a different status in the workflow.
|
|
7
|
+
First use llama_context to see available statuses for the project.
|
|
8
|
+
|
|
9
|
+
Common status names: "To Do", "In Progress", "In Review", "Done"
|
|
10
|
+
The exact names depend on the project's workflow configuration.`;
|
|
11
|
+
export const updateStatusToolSchema = z.object({
|
|
12
|
+
orgSlug: z
|
|
13
|
+
.string()
|
|
14
|
+
.optional()
|
|
15
|
+
.describe('Organization slug (uses session default if not provided)'),
|
|
16
|
+
projectKey: z
|
|
17
|
+
.string()
|
|
18
|
+
.optional()
|
|
19
|
+
.describe('Project key (uses session default if not provided)'),
|
|
20
|
+
issueKey: z.string().describe('Issue key to update'),
|
|
21
|
+
statusId: z.string().describe('Status ID to transition to (from workflow.statuses)'),
|
|
22
|
+
});
|
|
23
|
+
export async function executeUpdateStatus(input) {
|
|
24
|
+
try {
|
|
25
|
+
const session = await getSessionDefaults();
|
|
26
|
+
const orgSlug = input.orgSlug ?? session?.orgSlug;
|
|
27
|
+
const projectKey = input.projectKey ?? session?.projectKey;
|
|
28
|
+
if (!orgSlug) {
|
|
29
|
+
return JSON.stringify({
|
|
30
|
+
success: false,
|
|
31
|
+
error: 'orgSlug is required. Either provide it or set session context with llama_set_context first.',
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
if (!projectKey) {
|
|
35
|
+
return JSON.stringify({
|
|
36
|
+
success: false,
|
|
37
|
+
error: 'projectKey is required. Either provide it or set session context with llama_set_context first.',
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
const client = getApiClient();
|
|
41
|
+
// Record tool call
|
|
42
|
+
try {
|
|
43
|
+
await client.recordToolCall('llama_update_status', { orgSlug, projectKey });
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
// Ignore recording errors
|
|
47
|
+
}
|
|
48
|
+
const issue = await client.updateIssue(orgSlug, projectKey, input.issueKey, { statusId: input.statusId });
|
|
49
|
+
// Check if the new status has column AI instructions
|
|
50
|
+
const columnInstructions = await getColumnInstructionsForStatus(orgSlug, projectKey, input.statusId);
|
|
51
|
+
const response = {
|
|
52
|
+
success: true,
|
|
53
|
+
message: `Moved ${issue.key} to status "${issue.status.name}"`,
|
|
54
|
+
issue: {
|
|
55
|
+
key: issue.key,
|
|
56
|
+
summary: issue.summary,
|
|
57
|
+
status: issue.status,
|
|
58
|
+
statusCategory: issue.statusCategory,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
// Add column instructions if they exist
|
|
62
|
+
if (columnInstructions) {
|
|
63
|
+
response.columnInstructions = columnInstructions;
|
|
64
|
+
}
|
|
65
|
+
return JSON.stringify(response);
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
if (error instanceof LlamaApiError) {
|
|
69
|
+
return JSON.stringify({
|
|
70
|
+
success: false,
|
|
71
|
+
error: `Failed to update status: ${error.message}`,
|
|
72
|
+
statusCode: error.statusCode,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
return JSON.stringify({
|
|
76
|
+
success: false,
|
|
77
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/tools/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,CAAC,MAAM,oBAAoB,GAAG,qBAAqB,CAAC;AAE1D,MAAM,CAAC,MAAM,2BAA2B,GAAG;;;;gEAIqB,CAAC;AAEjE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,0DAA0D,CAAC;IACvE,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,oDAAoD,CAAC;IACjE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;IACpD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qDAAqD,CAAC;CACrF,CAAC,CAAC;AAIH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,KAA4B;IAE5B,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,kBAAkB,EAAE,CAAC;QAE3C,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,OAAO,EAAE,OAAO,CAAC;QAClD,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,OAAO,EAAE,UAAU,CAAC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