@agllama/mcp 0.5.13 → 0.5.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,125 @@
1
+ import { z } from 'zod';
2
+ export declare const listProjectErrorsToolName = "llama_list_errors";
3
+ export declare const listProjectErrorsToolDescription = "List errors from the Error Inbox for a project.\nReturns errors reported via the external API with filtering and sorting options.\nUse this to triage errors before accepting or dismissing them.";
4
+ export declare const listProjectErrorsToolSchema: z.ZodObject<{
5
+ orgSlug: z.ZodOptional<z.ZodString>;
6
+ projectKey: z.ZodOptional<z.ZodString>;
7
+ status: z.ZodOptional<z.ZodEnum<["PENDING", "ACCEPTED", "DISMISSED"]>>;
8
+ sortBy: z.ZodOptional<z.ZodEnum<["createdAt", "lastSeenAt", "occurrenceCount"]>>;
9
+ sortOrder: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
10
+ page: z.ZodOptional<z.ZodNumber>;
11
+ limit: z.ZodOptional<z.ZodNumber>;
12
+ }, "strip", z.ZodTypeAny, {
13
+ status?: "PENDING" | "ACCEPTED" | "DISMISSED" | undefined;
14
+ limit?: number | undefined;
15
+ page?: number | undefined;
16
+ sortBy?: "createdAt" | "lastSeenAt" | "occurrenceCount" | undefined;
17
+ sortOrder?: "asc" | "desc" | undefined;
18
+ orgSlug?: string | undefined;
19
+ projectKey?: string | undefined;
20
+ }, {
21
+ status?: "PENDING" | "ACCEPTED" | "DISMISSED" | undefined;
22
+ limit?: number | undefined;
23
+ page?: number | undefined;
24
+ sortBy?: "createdAt" | "lastSeenAt" | "occurrenceCount" | undefined;
25
+ sortOrder?: "asc" | "desc" | undefined;
26
+ orgSlug?: string | undefined;
27
+ projectKey?: string | undefined;
28
+ }>;
29
+ export type ListProjectErrorsToolInput = z.infer<typeof listProjectErrorsToolSchema>;
30
+ export declare function executeListProjectErrors(input: ListProjectErrorsToolInput): Promise<string>;
31
+ export declare const getProjectErrorToolName = "llama_get_error";
32
+ export declare const getProjectErrorToolDescription = "Get detailed information about a specific error from the Error Inbox.\nReturns the full error details including stack trace and metadata.";
33
+ export declare const getProjectErrorToolSchema: z.ZodObject<{
34
+ orgSlug: z.ZodOptional<z.ZodString>;
35
+ projectKey: z.ZodOptional<z.ZodString>;
36
+ errorId: z.ZodString;
37
+ }, "strip", z.ZodTypeAny, {
38
+ errorId: string;
39
+ orgSlug?: string | undefined;
40
+ projectKey?: string | undefined;
41
+ }, {
42
+ errorId: string;
43
+ orgSlug?: string | undefined;
44
+ projectKey?: string | undefined;
45
+ }>;
46
+ export type GetProjectErrorToolInput = z.infer<typeof getProjectErrorToolSchema>;
47
+ export declare function executeGetProjectError(input: GetProjectErrorToolInput): Promise<string>;
48
+ export declare const getErrorCountToolName = "llama_get_error_count";
49
+ export declare const getErrorCountToolDescription = "Get the count of pending errors in the Error Inbox.\nUseful for checking if there are errors that need attention.";
50
+ export declare const getErrorCountToolSchema: z.ZodObject<{
51
+ orgSlug: z.ZodOptional<z.ZodString>;
52
+ projectKey: z.ZodOptional<z.ZodString>;
53
+ }, "strip", z.ZodTypeAny, {
54
+ orgSlug?: string | undefined;
55
+ projectKey?: string | undefined;
56
+ }, {
57
+ orgSlug?: string | undefined;
58
+ projectKey?: string | undefined;
59
+ }>;
60
+ export type GetErrorCountToolInput = z.infer<typeof getErrorCountToolSchema>;
61
+ export declare function executeGetErrorCount(input: GetErrorCountToolInput): Promise<string>;
62
+ export declare const acceptProjectErrorToolName = "llama_accept_error";
63
+ export declare const acceptProjectErrorToolDescription = "Accept an error from the Error Inbox and create a BUG issue from it.\nThe error details (stack trace, metadata) are included in the issue description.\nOptionally specify priority, assignee, sprint, and labels for the new issue.";
64
+ export declare const acceptProjectErrorToolSchema: z.ZodObject<{
65
+ orgSlug: z.ZodOptional<z.ZodString>;
66
+ projectKey: z.ZodOptional<z.ZodString>;
67
+ errorId: z.ZodString;
68
+ priority: z.ZodOptional<z.ZodEnum<["CRITICAL", "HIGH", "MEDIUM", "LOW", "TRIVIAL"]>>;
69
+ assigneeId: z.ZodOptional<z.ZodString>;
70
+ sprintId: z.ZodOptional<z.ZodString>;
71
+ labels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
72
+ }, "strip", z.ZodTypeAny, {
73
+ errorId: string;
74
+ priority?: "CRITICAL" | "HIGH" | "MEDIUM" | "LOW" | "TRIVIAL" | undefined;
75
+ assigneeId?: string | undefined;
76
+ sprintId?: string | undefined;
77
+ labels?: string[] | undefined;
78
+ orgSlug?: string | undefined;
79
+ projectKey?: string | undefined;
80
+ }, {
81
+ errorId: string;
82
+ priority?: "CRITICAL" | "HIGH" | "MEDIUM" | "LOW" | "TRIVIAL" | undefined;
83
+ assigneeId?: string | undefined;
84
+ sprintId?: string | undefined;
85
+ labels?: string[] | undefined;
86
+ orgSlug?: string | undefined;
87
+ projectKey?: string | undefined;
88
+ }>;
89
+ export type AcceptProjectErrorToolInput = z.infer<typeof acceptProjectErrorToolSchema>;
90
+ export declare function executeAcceptProjectError(input: AcceptProjectErrorToolInput): Promise<string>;
91
+ export declare const dismissProjectErrorToolName = "llama_dismiss_error";
92
+ export declare const dismissProjectErrorToolDescription = "Dismiss a single error from the Error Inbox.\nDismissed errors are hidden from the default view but can still be queried.";
93
+ export declare const dismissProjectErrorToolSchema: z.ZodObject<{
94
+ orgSlug: z.ZodOptional<z.ZodString>;
95
+ projectKey: z.ZodOptional<z.ZodString>;
96
+ errorId: z.ZodString;
97
+ }, "strip", z.ZodTypeAny, {
98
+ errorId: string;
99
+ orgSlug?: string | undefined;
100
+ projectKey?: string | undefined;
101
+ }, {
102
+ errorId: string;
103
+ orgSlug?: string | undefined;
104
+ projectKey?: string | undefined;
105
+ }>;
106
+ export type DismissProjectErrorToolInput = z.infer<typeof dismissProjectErrorToolSchema>;
107
+ export declare function executeDismissProjectError(input: DismissProjectErrorToolInput): Promise<string>;
108
+ export declare const bulkDismissProjectErrorsToolName = "llama_bulk_dismiss_errors";
109
+ export declare const bulkDismissProjectErrorsToolDescription = "Dismiss multiple errors from the Error Inbox at once.\nOnly pending errors can be dismissed. Already accepted errors are skipped.";
110
+ export declare const bulkDismissProjectErrorsToolSchema: z.ZodObject<{
111
+ orgSlug: z.ZodOptional<z.ZodString>;
112
+ projectKey: z.ZodOptional<z.ZodString>;
113
+ errorIds: z.ZodArray<z.ZodString, "many">;
114
+ }, "strip", z.ZodTypeAny, {
115
+ errorIds: string[];
116
+ orgSlug?: string | undefined;
117
+ projectKey?: string | undefined;
118
+ }, {
119
+ errorIds: string[];
120
+ orgSlug?: string | undefined;
121
+ projectKey?: string | undefined;
122
+ }>;
123
+ export type BulkDismissProjectErrorsToolInput = z.infer<typeof bulkDismissProjectErrorsToolSchema>;
124
+ export declare function executeBulkDismissProjectErrors(input: BulkDismissProjectErrorsToolInput): Promise<string>;
125
+ //# sourceMappingURL=projectErrors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projectErrors.d.ts","sourceRoot":"","sources":["../../src/tools/projectErrors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,yBAAyB,sBAAsB,CAAC;AAE7D,eAAO,MAAM,gCAAgC,sMAEkB,CAAC;AAEhE,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;EAoBtC,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAErF,wBAAsB,wBAAwB,CAC5C,KAAK,EAAE,0BAA0B,GAChC,OAAO,CAAC,MAAM,CAAC,CA8EjB;AAMD,eAAO,MAAM,uBAAuB,oBAAoB,CAAC;AAEzD,eAAO,MAAM,8BAA8B,8IACwB,CAAC;AAEpE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;EAUpC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEjF,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CAAC,CAAC;AAEnG,wBAAsB,+BAA+B,CACnD,KAAK,EAAE,iCAAiC,GACvC,OAAO,CAAC,MAAM,CAAC,CA0DjB"}
@@ -0,0 +1,460 @@
1
+ import { z } from 'zod';
2
+ import { getApiClient, LlamaApiError } from '../api-client.js';
3
+ import { getSessionDefaults } from './session.js';
4
+ // ============================================
5
+ // List Project Errors
6
+ // ============================================
7
+ export const listProjectErrorsToolName = 'llama_list_errors';
8
+ export const listProjectErrorsToolDescription = `List errors from the Error Inbox for a project.
9
+ Returns errors reported via the external API with filtering and sorting options.
10
+ Use this to triage errors before accepting or dismissing them.`;
11
+ export const listProjectErrorsToolSchema = 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
+ status: z
21
+ .enum(['PENDING', 'ACCEPTED', 'DISMISSED'])
22
+ .optional()
23
+ .describe('Filter by status (default: all statuses)'),
24
+ sortBy: z
25
+ .enum(['createdAt', 'lastSeenAt', 'occurrenceCount'])
26
+ .optional()
27
+ .describe('Sort field (default: createdAt)'),
28
+ sortOrder: z.enum(['asc', 'desc']).optional().describe('Sort order (default: desc)'),
29
+ page: z.number().int().positive().optional().describe('Page number (default: 1)'),
30
+ limit: z.number().int().positive().max(100).optional().describe('Items per page (default: 25, max: 100)'),
31
+ });
32
+ export async function executeListProjectErrors(input) {
33
+ try {
34
+ const session = await getSessionDefaults();
35
+ const orgSlug = input.orgSlug ?? session?.orgSlug;
36
+ const projectKey = input.projectKey ?? session?.projectKey;
37
+ if (!orgSlug) {
38
+ return JSON.stringify({
39
+ success: false,
40
+ error: 'orgSlug is required. Either provide it or set session context with llama_set_context first.',
41
+ });
42
+ }
43
+ if (!projectKey) {
44
+ return JSON.stringify({
45
+ success: false,
46
+ error: 'projectKey is required. Either provide it or set session context with llama_set_context first.',
47
+ });
48
+ }
49
+ const client = getApiClient();
50
+ // Record tool call
51
+ try {
52
+ await client.recordToolCall('llama_list_errors', { orgSlug, projectKey });
53
+ }
54
+ catch {
55
+ // Ignore recording errors
56
+ }
57
+ const result = await client.listProjectErrors(orgSlug, projectKey, {
58
+ status: input.status,
59
+ sortBy: input.sortBy,
60
+ sortOrder: input.sortOrder,
61
+ page: input.page,
62
+ limit: input.limit,
63
+ });
64
+ return JSON.stringify({
65
+ success: true,
66
+ errors: result.errors.map((e) => ({
67
+ id: e.id,
68
+ title: e.title,
69
+ message: e.message,
70
+ source: e.source,
71
+ occurrenceCount: e.occurrenceCount,
72
+ status: e.status,
73
+ createdAt: e.createdAt,
74
+ lastSeenAt: e.lastSeenAt,
75
+ acceptedAsIssue: e.acceptedAsIssue,
76
+ })),
77
+ total: result.total,
78
+ filters: {
79
+ status: input.status || 'all',
80
+ sortBy: input.sortBy || 'createdAt',
81
+ sortOrder: input.sortOrder || 'desc',
82
+ },
83
+ }, null, 2);
84
+ }
85
+ catch (error) {
86
+ if (error instanceof LlamaApiError) {
87
+ return JSON.stringify({
88
+ success: false,
89
+ error: `Failed to list errors: ${error.message}`,
90
+ statusCode: error.statusCode,
91
+ });
92
+ }
93
+ return JSON.stringify({
94
+ success: false,
95
+ error: error instanceof Error ? error.message : 'Unknown error',
96
+ });
97
+ }
98
+ }
99
+ // ============================================
100
+ // Get Project Error
101
+ // ============================================
102
+ export const getProjectErrorToolName = 'llama_get_error';
103
+ export const getProjectErrorToolDescription = `Get detailed information about a specific error from the Error Inbox.
104
+ Returns the full error details including stack trace and metadata.`;
105
+ export const getProjectErrorToolSchema = z.object({
106
+ orgSlug: z
107
+ .string()
108
+ .optional()
109
+ .describe('Organization slug (uses session default if not provided)'),
110
+ projectKey: z
111
+ .string()
112
+ .optional()
113
+ .describe('Project key (uses session default if not provided)'),
114
+ errorId: z.string().describe('Error ID to retrieve'),
115
+ });
116
+ export async function executeGetProjectError(input) {
117
+ try {
118
+ const session = await getSessionDefaults();
119
+ const orgSlug = input.orgSlug ?? session?.orgSlug;
120
+ const projectKey = input.projectKey ?? session?.projectKey;
121
+ if (!orgSlug) {
122
+ return JSON.stringify({
123
+ success: false,
124
+ error: 'orgSlug is required. Either provide it or set session context with llama_set_context first.',
125
+ });
126
+ }
127
+ if (!projectKey) {
128
+ return JSON.stringify({
129
+ success: false,
130
+ error: 'projectKey is required. Either provide it or set session context with llama_set_context first.',
131
+ });
132
+ }
133
+ const client = getApiClient();
134
+ // Record tool call
135
+ try {
136
+ await client.recordToolCall('llama_get_error', { orgSlug, projectKey, errorId: input.errorId });
137
+ }
138
+ catch {
139
+ // Ignore recording errors
140
+ }
141
+ const error = await client.getProjectError(orgSlug, projectKey, input.errorId);
142
+ return JSON.stringify({
143
+ success: true,
144
+ error: {
145
+ id: error.id,
146
+ title: error.title,
147
+ message: error.message,
148
+ source: error.source,
149
+ fingerprint: error.fingerprint,
150
+ occurrenceCount: error.occurrenceCount,
151
+ status: error.status,
152
+ stackTrace: error.stackTrace,
153
+ metadata: error.metadata,
154
+ createdAt: error.createdAt,
155
+ lastSeenAt: error.lastSeenAt,
156
+ updatedAt: error.updatedAt,
157
+ acceptedAsIssue: error.acceptedAsIssue,
158
+ },
159
+ }, null, 2);
160
+ }
161
+ catch (error) {
162
+ if (error instanceof LlamaApiError) {
163
+ return JSON.stringify({
164
+ success: false,
165
+ error: `Failed to get error: ${error.message}`,
166
+ statusCode: error.statusCode,
167
+ });
168
+ }
169
+ return JSON.stringify({
170
+ success: false,
171
+ error: error instanceof Error ? error.message : 'Unknown error',
172
+ });
173
+ }
174
+ }
175
+ // ============================================
176
+ // Get Pending Error Count
177
+ // ============================================
178
+ export const getErrorCountToolName = 'llama_get_error_count';
179
+ export const getErrorCountToolDescription = `Get the count of pending errors in the Error Inbox.
180
+ Useful for checking if there are errors that need attention.`;
181
+ export const getErrorCountToolSchema = z.object({
182
+ orgSlug: z
183
+ .string()
184
+ .optional()
185
+ .describe('Organization slug (uses session default if not provided)'),
186
+ projectKey: z
187
+ .string()
188
+ .optional()
189
+ .describe('Project key (uses session default if not provided)'),
190
+ });
191
+ export async function executeGetErrorCount(input) {
192
+ try {
193
+ const session = await getSessionDefaults();
194
+ const orgSlug = input.orgSlug ?? session?.orgSlug;
195
+ const projectKey = input.projectKey ?? session?.projectKey;
196
+ if (!orgSlug) {
197
+ return JSON.stringify({
198
+ success: false,
199
+ error: 'orgSlug is required. Either provide it or set session context with llama_set_context first.',
200
+ });
201
+ }
202
+ if (!projectKey) {
203
+ return JSON.stringify({
204
+ success: false,
205
+ error: 'projectKey is required. Either provide it or set session context with llama_set_context first.',
206
+ });
207
+ }
208
+ const client = getApiClient();
209
+ // Record tool call
210
+ try {
211
+ await client.recordToolCall('llama_get_error_count', { orgSlug, projectKey });
212
+ }
213
+ catch {
214
+ // Ignore recording errors
215
+ }
216
+ const result = await client.getProjectErrorPendingCount(orgSlug, projectKey);
217
+ return JSON.stringify({
218
+ success: true,
219
+ pendingCount: result.count,
220
+ message: result.count === 0
221
+ ? 'No pending errors in the Error Inbox'
222
+ : `${result.count} pending error${result.count === 1 ? '' : 's'} in the Error Inbox`,
223
+ }, null, 2);
224
+ }
225
+ catch (error) {
226
+ if (error instanceof LlamaApiError) {
227
+ return JSON.stringify({
228
+ success: false,
229
+ error: `Failed to get error count: ${error.message}`,
230
+ statusCode: error.statusCode,
231
+ });
232
+ }
233
+ return JSON.stringify({
234
+ success: false,
235
+ error: error instanceof Error ? error.message : 'Unknown error',
236
+ });
237
+ }
238
+ }
239
+ // ============================================
240
+ // Accept Project Error
241
+ // ============================================
242
+ export const acceptProjectErrorToolName = 'llama_accept_error';
243
+ export const acceptProjectErrorToolDescription = `Accept an error from the Error Inbox and create a BUG issue from it.
244
+ The error details (stack trace, metadata) are included in the issue description.
245
+ Optionally specify priority, assignee, sprint, and labels for the new issue.`;
246
+ export const acceptProjectErrorToolSchema = z.object({
247
+ orgSlug: z
248
+ .string()
249
+ .optional()
250
+ .describe('Organization slug (uses session default if not provided)'),
251
+ projectKey: z
252
+ .string()
253
+ .optional()
254
+ .describe('Project key (uses session default if not provided)'),
255
+ errorId: z.string().describe('Error ID to accept'),
256
+ priority: z
257
+ .enum(['CRITICAL', 'HIGH', 'MEDIUM', 'LOW', 'TRIVIAL'])
258
+ .optional()
259
+ .describe('Priority for the created issue (default: MEDIUM)'),
260
+ assigneeId: z.string().optional().describe('User ID to assign the issue to'),
261
+ sprintId: z.string().optional().describe('Sprint ID to add the issue to'),
262
+ labels: z.array(z.string()).optional().describe('Labels to add to the issue'),
263
+ });
264
+ export async function executeAcceptProjectError(input) {
265
+ try {
266
+ const session = await getSessionDefaults();
267
+ const orgSlug = input.orgSlug ?? session?.orgSlug;
268
+ const projectKey = input.projectKey ?? session?.projectKey;
269
+ if (!orgSlug) {
270
+ return JSON.stringify({
271
+ success: false,
272
+ error: 'orgSlug is required. Either provide it or set session context with llama_set_context first.',
273
+ });
274
+ }
275
+ if (!projectKey) {
276
+ return JSON.stringify({
277
+ success: false,
278
+ error: 'projectKey is required. Either provide it or set session context with llama_set_context first.',
279
+ });
280
+ }
281
+ const client = getApiClient();
282
+ // Record tool call
283
+ try {
284
+ await client.recordToolCall('llama_accept_error', { orgSlug, projectKey, errorId: input.errorId });
285
+ }
286
+ catch {
287
+ // Ignore recording errors
288
+ }
289
+ const result = await client.acceptProjectError(orgSlug, projectKey, input.errorId, {
290
+ priority: input.priority,
291
+ assigneeId: input.assigneeId,
292
+ sprintId: input.sprintId,
293
+ labels: input.labels,
294
+ });
295
+ return JSON.stringify({
296
+ success: true,
297
+ message: `Error accepted and created issue ${result.issue.key}`,
298
+ issue: {
299
+ id: result.issue.id,
300
+ key: result.issue.key,
301
+ summary: result.issue.summary,
302
+ },
303
+ error: {
304
+ id: result.error.id,
305
+ title: result.error.title,
306
+ status: result.error.status,
307
+ occurrenceCount: result.error.occurrenceCount,
308
+ },
309
+ }, null, 2);
310
+ }
311
+ catch (error) {
312
+ if (error instanceof LlamaApiError) {
313
+ return JSON.stringify({
314
+ success: false,
315
+ error: `Failed to accept error: ${error.message}`,
316
+ statusCode: error.statusCode,
317
+ });
318
+ }
319
+ return JSON.stringify({
320
+ success: false,
321
+ error: error instanceof Error ? error.message : 'Unknown error',
322
+ });
323
+ }
324
+ }
325
+ // ============================================
326
+ // Dismiss Project Error
327
+ // ============================================
328
+ export const dismissProjectErrorToolName = 'llama_dismiss_error';
329
+ export const dismissProjectErrorToolDescription = `Dismiss a single error from the Error Inbox.
330
+ Dismissed errors are hidden from the default view but can still be queried.`;
331
+ export const dismissProjectErrorToolSchema = z.object({
332
+ orgSlug: z
333
+ .string()
334
+ .optional()
335
+ .describe('Organization slug (uses session default if not provided)'),
336
+ projectKey: z
337
+ .string()
338
+ .optional()
339
+ .describe('Project key (uses session default if not provided)'),
340
+ errorId: z.string().describe('Error ID to dismiss'),
341
+ });
342
+ export async function executeDismissProjectError(input) {
343
+ try {
344
+ const session = await getSessionDefaults();
345
+ const orgSlug = input.orgSlug ?? session?.orgSlug;
346
+ const projectKey = input.projectKey ?? session?.projectKey;
347
+ if (!orgSlug) {
348
+ return JSON.stringify({
349
+ success: false,
350
+ error: 'orgSlug is required. Either provide it or set session context with llama_set_context first.',
351
+ });
352
+ }
353
+ if (!projectKey) {
354
+ return JSON.stringify({
355
+ success: false,
356
+ error: 'projectKey is required. Either provide it or set session context with llama_set_context first.',
357
+ });
358
+ }
359
+ const client = getApiClient();
360
+ // Record tool call
361
+ try {
362
+ await client.recordToolCall('llama_dismiss_error', { orgSlug, projectKey, errorId: input.errorId });
363
+ }
364
+ catch {
365
+ // Ignore recording errors
366
+ }
367
+ const error = await client.dismissProjectError(orgSlug, projectKey, input.errorId);
368
+ return JSON.stringify({
369
+ success: true,
370
+ message: `Error "${error.title}" dismissed`,
371
+ error: {
372
+ id: error.id,
373
+ title: error.title,
374
+ status: error.status,
375
+ },
376
+ }, null, 2);
377
+ }
378
+ catch (error) {
379
+ if (error instanceof LlamaApiError) {
380
+ return JSON.stringify({
381
+ success: false,
382
+ error: `Failed to dismiss error: ${error.message}`,
383
+ statusCode: error.statusCode,
384
+ });
385
+ }
386
+ return JSON.stringify({
387
+ success: false,
388
+ error: error instanceof Error ? error.message : 'Unknown error',
389
+ });
390
+ }
391
+ }
392
+ // ============================================
393
+ // Bulk Dismiss Project Errors
394
+ // ============================================
395
+ export const bulkDismissProjectErrorsToolName = 'llama_bulk_dismiss_errors';
396
+ export const bulkDismissProjectErrorsToolDescription = `Dismiss multiple errors from the Error Inbox at once.
397
+ Only pending errors can be dismissed. Already accepted errors are skipped.`;
398
+ export const bulkDismissProjectErrorsToolSchema = z.object({
399
+ orgSlug: z
400
+ .string()
401
+ .optional()
402
+ .describe('Organization slug (uses session default if not provided)'),
403
+ projectKey: z
404
+ .string()
405
+ .optional()
406
+ .describe('Project key (uses session default if not provided)'),
407
+ errorIds: z
408
+ .array(z.string())
409
+ .min(1)
410
+ .max(100)
411
+ .describe('Array of error IDs to dismiss (max 100)'),
412
+ });
413
+ export async function executeBulkDismissProjectErrors(input) {
414
+ try {
415
+ const session = await getSessionDefaults();
416
+ const orgSlug = input.orgSlug ?? session?.orgSlug;
417
+ const projectKey = input.projectKey ?? session?.projectKey;
418
+ if (!orgSlug) {
419
+ return JSON.stringify({
420
+ success: false,
421
+ error: 'orgSlug is required. Either provide it or set session context with llama_set_context first.',
422
+ });
423
+ }
424
+ if (!projectKey) {
425
+ return JSON.stringify({
426
+ success: false,
427
+ error: 'projectKey is required. Either provide it or set session context with llama_set_context first.',
428
+ });
429
+ }
430
+ const client = getApiClient();
431
+ // Record tool call
432
+ try {
433
+ await client.recordToolCall('llama_bulk_dismiss_errors', { orgSlug, projectKey, count: input.errorIds.length });
434
+ }
435
+ catch {
436
+ // Ignore recording errors
437
+ }
438
+ const result = await client.bulkDismissProjectErrors(orgSlug, projectKey, input.errorIds);
439
+ return JSON.stringify({
440
+ success: true,
441
+ message: `Dismissed ${result.dismissed} of ${input.errorIds.length} errors`,
442
+ dismissed: result.dismissed,
443
+ requested: input.errorIds.length,
444
+ }, null, 2);
445
+ }
446
+ catch (error) {
447
+ if (error instanceof LlamaApiError) {
448
+ return JSON.stringify({
449
+ success: false,
450
+ error: `Failed to bulk dismiss errors: ${error.message}`,
451
+ statusCode: error.statusCode,
452
+ });
453
+ }
454
+ return JSON.stringify({
455
+ success: false,
456
+ error: error instanceof Error ? error.message : 'Unknown error',
457
+ });
458
+ }
459
+ }
460
+ //# sourceMappingURL=projectErrors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projectErrors.js","sourceRoot":"","sources":["../../src/tools/projectErrors.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,sBAAsB;AACtB,+CAA+C;AAE/C,MAAM,CAAC,MAAM,yBAAyB,GAAG,mBAAmB,CAAC;AAE7D,MAAM,CAAC,MAAM,gCAAgC,GAAG;;+DAEe,CAAC;AAEhE,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,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,MAAM,EAAE,CAAC;SACN,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;SAC1C,QAAQ,EAAE;SACV,QAAQ,CAAC,0CAA0C,CAAC;IACvD,MAAM,EAAE,CAAC;SACN,IAAI,CAAC,CAAC,WAAW,EAAE,YAAY,EAAE,iBAAiB,CAAC,CAAC;SACpD,QAAQ,EAAE;SACV,QAAQ,CAAC,iCAAiC,CAAC;IAC9C,SAAS,EAAE,CAA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ACL,CAAC;AACH,CAAC"}
package/dist/types.d.ts CHANGED
@@ -277,6 +277,14 @@ export interface MCPComment {
277
277
  export interface CreateCommentInput {
278
278
  content: string;
279
279
  }
280
+ export interface MCPPlanComment {
281
+ id: string;
282
+ content: string;
283
+ authorId: string;
284
+ authorName: string;
285
+ createdAt: string;
286
+ updatedAt: string;
287
+ }
280
288
  export interface MCPLabel {
281
289
  name: string;
282
290
  color: string;
@@ -510,4 +518,39 @@ export interface SetSessionInput {
510
518
  projectKey?: string;
511
519
  sprintId?: string;
512
520
  }
521
+ export type ProjectErrorStatus = 'PENDING' | 'ACCEPTED' | 'DISMISSED';
522
+ export interface MCPProjectErrorSummary {
523
+ id: string;
524
+ title: string;
525
+ message: string | null;
526
+ source: string;
527
+ fingerprint: string | null;
528
+ occurrenceCount: number;
529
+ status: ProjectErrorStatus;
530
+ createdAt: string;
531
+ lastSeenAt: string;
532
+ acceptedAsIssue: {
533
+ id: string;
534
+ key: string;
535
+ summary: string;
536
+ } | null;
537
+ }
538
+ export interface MCPProjectErrorDetail extends MCPProjectErrorSummary {
539
+ stackTrace: string | null;
540
+ metadata: Record<string, unknown>;
541
+ updatedAt: string;
542
+ }
543
+ export interface ListProjectErrorsParams {
544
+ page?: number;
545
+ limit?: number;
546
+ status?: ProjectErrorStatus;
547
+ sortBy?: 'createdAt' | 'lastSeenAt' | 'occurrenceCount';
548
+ sortOrder?: 'asc' | 'desc';
549
+ }
550
+ export interface AcceptProjectErrorInput {
551
+ priority?: IssuePriority;
552
+ assigneeId?: string | null;
553
+ sprintId?: string | null;
554
+ labels?: string[];
555
+ }
513
556
  //# sourceMappingURL=types.d.ts.map