@agllama/mcp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +249 -0
- package/dist/api-client.d.ts +71 -0
- package/dist/api-client.d.ts.map +1 -0
- package/dist/api-client.js +315 -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 +495 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/backlog.d.ts +16 -0
- package/dist/tools/backlog.d.ts.map +1 -0
- package/dist/tools/backlog.js +59 -0
- package/dist/tools/backlog.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 +158 -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 +162 -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 +61 -0
- package/dist/tools/connect.js.map +1 -0
- package/dist/tools/context.d.ts +16 -0
- package/dist/tools/context.d.ts.map +1 -0
- package/dist/tools/context.js +79 -0
- package/dist/tools/context.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 +421 -0
- package/dist/tools/help.js.map +1 -0
- package/dist/tools/index.d.ts +17 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +17 -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 +90 -0
- package/dist/tools/issueLinks.js.map +1 -0
- package/dist/tools/issues.d.ts +127 -0
- package/dist/tools/issues.d.ts.map +1 -0
- package/dist/tools/issues.js +262 -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 +123 -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 +62 -0
- package/dist/tools/search.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 +380 -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 +44 -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 +312 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getApiClient, LlamaApiError } from '../api-client.js';
|
|
3
|
+
// ============================================
|
|
4
|
+
// Create Issue Link
|
|
5
|
+
// ============================================
|
|
6
|
+
export const createIssueLinkToolName = 'llama_create_issue_link';
|
|
7
|
+
export const createIssueLinkToolDescription = `Create a link between two issues.
|
|
8
|
+
|
|
9
|
+
Link types:
|
|
10
|
+
- BLOCKS: This issue blocks the target issue
|
|
11
|
+
- IS_BLOCKED_BY: This issue is blocked by the target issue
|
|
12
|
+
- RELATES_TO: General relationship between issues
|
|
13
|
+
- DUPLICATES: This issue duplicates the target issue
|
|
14
|
+
- IS_DUPLICATED_BY: This issue is duplicated by the target issue`;
|
|
15
|
+
export const createIssueLinkToolSchema = z.object({
|
|
16
|
+
orgSlug: z.string().describe('Organization slug'),
|
|
17
|
+
projectKey: z.string().describe('Project key'),
|
|
18
|
+
issueKey: z.string().describe('Source issue key'),
|
|
19
|
+
targetIssueKey: z.string().describe('Target issue key to link to'),
|
|
20
|
+
type: z
|
|
21
|
+
.enum(['BLOCKS', 'IS_BLOCKED_BY', 'RELATES_TO', 'DUPLICATES', 'IS_DUPLICATED_BY'])
|
|
22
|
+
.describe('Type of link'),
|
|
23
|
+
});
|
|
24
|
+
export async function executeCreateIssueLink(input) {
|
|
25
|
+
try {
|
|
26
|
+
const client = getApiClient();
|
|
27
|
+
const link = await client.createIssueLink(input.orgSlug, input.projectKey, input.issueKey, {
|
|
28
|
+
targetIssueKey: input.targetIssueKey,
|
|
29
|
+
type: input.type,
|
|
30
|
+
});
|
|
31
|
+
return JSON.stringify({
|
|
32
|
+
success: true,
|
|
33
|
+
message: `Created link: ${input.issueKey} ${input.type} ${input.targetIssueKey}`,
|
|
34
|
+
link: {
|
|
35
|
+
id: link.id,
|
|
36
|
+
type: link.type,
|
|
37
|
+
sourceIssueKey: link.sourceIssueKey,
|
|
38
|
+
targetIssueKey: link.targetIssueKey,
|
|
39
|
+
},
|
|
40
|
+
}, null, 2);
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
if (error instanceof LlamaApiError) {
|
|
44
|
+
return JSON.stringify({
|
|
45
|
+
success: false,
|
|
46
|
+
error: `Failed to create issue link: ${error.message}`,
|
|
47
|
+
statusCode: error.statusCode,
|
|
48
|
+
}, null, 2);
|
|
49
|
+
}
|
|
50
|
+
return JSON.stringify({
|
|
51
|
+
success: false,
|
|
52
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
53
|
+
}, null, 2);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
// ============================================
|
|
57
|
+
// Delete Issue Link
|
|
58
|
+
// ============================================
|
|
59
|
+
export const deleteIssueLinkToolName = 'llama_delete_issue_link';
|
|
60
|
+
export const deleteIssueLinkToolDescription = `Remove a link between two issues.`;
|
|
61
|
+
export const deleteIssueLinkToolSchema = z.object({
|
|
62
|
+
orgSlug: z.string().describe('Organization slug'),
|
|
63
|
+
projectKey: z.string().describe('Project key'),
|
|
64
|
+
issueKey: z.string().describe('Source issue key'),
|
|
65
|
+
linkId: z.string().describe('Link ID to delete'),
|
|
66
|
+
});
|
|
67
|
+
export async function executeDeleteIssueLink(input) {
|
|
68
|
+
try {
|
|
69
|
+
const client = getApiClient();
|
|
70
|
+
await client.deleteIssueLink(input.orgSlug, input.projectKey, input.issueKey, input.linkId);
|
|
71
|
+
return JSON.stringify({
|
|
72
|
+
success: true,
|
|
73
|
+
message: `Deleted link from ${input.issueKey}`,
|
|
74
|
+
}, null, 2);
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
if (error instanceof LlamaApiError) {
|
|
78
|
+
return JSON.stringify({
|
|
79
|
+
success: false,
|
|
80
|
+
error: `Failed to delete issue link: ${error.message}`,
|
|
81
|
+
statusCode: error.statusCode,
|
|
82
|
+
}, null, 2);
|
|
83
|
+
}
|
|
84
|
+
return JSON.stringify({
|
|
85
|
+
success: false,
|
|
86
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
87
|
+
}, null, 2);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=issueLinks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issueLinks.js","sourceRoot":"","sources":["../../src/tools/issue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C;IACjD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;CACjD,CAAC,CAAC;AAIH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,KAA+B;IAE/B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;QAC9B,MAAM,MAAM,CAAC,eAAe,CAC1B,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,QAAQ,EACd,KAAK,CAAC,MAAM,CACb,CAAC;QAEF,OAAO,IAAI,CAAC,SAAS,CACnB;YACE,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,qBAAqB,KAAK,CAAC,QAAQ,EAAE;SAC/C,EACD,IAAI,EACJ,CAAC,CACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,aAAa,EAAE,CAAC;YACnC,OAAO,IAAI,CAAC,SAAS,CACnB;gBACE,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,gCAAgC,KAAK,CAAC,OAAO,EAAE;gBACtD,UAAU,EAAE,KAAK,CAAC,UAAU;aAC7B,EACD,IAAI,EACJ,CAAC,CACF,CAAC;QACJ,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,EACD,IAAI,EACJ,CAAC,CACF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const getIssueToolName = "llama_get_issue";
|
|
3
|
+
export declare const getIssueToolDescription = "Get full details for a specific issue by its key (e.g., \"PROJ-123\").\nReturns complete issue information including description, comments, and history.";
|
|
4
|
+
export declare const getIssueToolSchema: z.ZodObject<{
|
|
5
|
+
orgSlug: z.ZodString;
|
|
6
|
+
projectKey: z.ZodString;
|
|
7
|
+
issueKey: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
orgSlug: string;
|
|
10
|
+
projectKey: string;
|
|
11
|
+
issueKey: string;
|
|
12
|
+
}, {
|
|
13
|
+
orgSlug: string;
|
|
14
|
+
projectKey: string;
|
|
15
|
+
issueKey: string;
|
|
16
|
+
}>;
|
|
17
|
+
export type GetIssueToolInput = z.infer<typeof getIssueToolSchema>;
|
|
18
|
+
export declare function executeGetIssue(input: GetIssueToolInput): Promise<string>;
|
|
19
|
+
export declare const createIssueToolName = "llama_create_issue";
|
|
20
|
+
export declare const createIssueToolDescription = "Create a new issue in Llama.\n\nIssue types: EPIC, STORY, TASK, BUG, SUBTASK\nPriority levels: CRITICAL, HIGH, MEDIUM (default), LOW, TRIVIAL\n\nFor subtasks, provide the parentKey of the parent issue.\nTo add to a sprint, provide the sprintId from llama_context.";
|
|
21
|
+
export declare const createIssueToolSchema: z.ZodObject<{
|
|
22
|
+
orgSlug: z.ZodString;
|
|
23
|
+
projectKey: z.ZodString;
|
|
24
|
+
summary: z.ZodString;
|
|
25
|
+
description: z.ZodOptional<z.ZodString>;
|
|
26
|
+
type: z.ZodEnum<["EPIC", "STORY", "TASK", "BUG", "SUBTASK"]>;
|
|
27
|
+
priority: z.ZodOptional<z.ZodEnum<["CRITICAL", "HIGH", "MEDIUM", "LOW", "TRIVIAL"]>>;
|
|
28
|
+
assigneeId: z.ZodOptional<z.ZodString>;
|
|
29
|
+
sprintId: z.ZodOptional<z.ZodString>;
|
|
30
|
+
parentKey: z.ZodOptional<z.ZodString>;
|
|
31
|
+
epicKey: z.ZodOptional<z.ZodString>;
|
|
32
|
+
estimate: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
type: "EPIC" | "STORY" | "TASK" | "BUG" | "SUBTASK";
|
|
36
|
+
orgSlug: string;
|
|
37
|
+
projectKey: string;
|
|
38
|
+
summary: string;
|
|
39
|
+
priority?: "CRITICAL" | "HIGH" | "MEDIUM" | "LOW" | "TRIVIAL" | undefined;
|
|
40
|
+
assigneeId?: string | undefined;
|
|
41
|
+
sprintId?: string | undefined;
|
|
42
|
+
labels?: string[] | undefined;
|
|
43
|
+
description?: string | undefined;
|
|
44
|
+
parentKey?: string | undefined;
|
|
45
|
+
epicKey?: string | undefined;
|
|
46
|
+
estimate?: number | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
type: "EPIC" | "STORY" | "TASK" | "BUG" | "SUBTASK";
|
|
49
|
+
orgSlug: string;
|
|
50
|
+
projectKey: string;
|
|
51
|
+
summary: string;
|
|
52
|
+
priority?: "CRITICAL" | "HIGH" | "MEDIUM" | "LOW" | "TRIVIAL" | undefined;
|
|
53
|
+
assigneeId?: string | undefined;
|
|
54
|
+
sprintId?: string | undefined;
|
|
55
|
+
labels?: string[] | undefined;
|
|
56
|
+
description?: string | undefined;
|
|
57
|
+
parentKey?: string | undefined;
|
|
58
|
+
epicKey?: string | undefined;
|
|
59
|
+
estimate?: number | undefined;
|
|
60
|
+
}>;
|
|
61
|
+
export type CreateIssueToolInput = z.infer<typeof createIssueToolSchema>;
|
|
62
|
+
export declare function executeCreateIssue(input: CreateIssueToolInput): Promise<string>;
|
|
63
|
+
export declare const updateIssueToolName = "llama_update_issue";
|
|
64
|
+
export declare const updateIssueToolDescription = "Update an existing issue's fields.\nOnly include the fields you want to change.\nSet assigneeId or sprintId to null to unassign/remove from sprint.";
|
|
65
|
+
export declare const updateIssueToolSchema: z.ZodObject<{
|
|
66
|
+
orgSlug: z.ZodString;
|
|
67
|
+
projectKey: z.ZodString;
|
|
68
|
+
issueKey: z.ZodString;
|
|
69
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
70
|
+
description: z.ZodOptional<z.ZodString>;
|
|
71
|
+
type: z.ZodOptional<z.ZodEnum<["EPIC", "STORY", "TASK", "BUG", "SUBTASK"]>>;
|
|
72
|
+
priority: z.ZodOptional<z.ZodEnum<["CRITICAL", "HIGH", "MEDIUM", "LOW", "TRIVIAL"]>>;
|
|
73
|
+
statusId: z.ZodOptional<z.ZodString>;
|
|
74
|
+
assigneeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
|
+
sprintId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
76
|
+
epicKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
77
|
+
estimate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
78
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
79
|
+
}, "strip", z.ZodTypeAny, {
|
|
80
|
+
orgSlug: string;
|
|
81
|
+
projectKey: string;
|
|
82
|
+
issueKey: string;
|
|
83
|
+
type?: "EPIC" | "STORY" | "TASK" | "BUG" | "SUBTASK" | undefined;
|
|
84
|
+
priority?: "CRITICAL" | "HIGH" | "MEDIUM" | "LOW" | "TRIVIAL" | undefined;
|
|
85
|
+
assigneeId?: string | null | undefined;
|
|
86
|
+
sprintId?: string | null | undefined;
|
|
87
|
+
labels?: string[] | undefined;
|
|
88
|
+
summary?: string | undefined;
|
|
89
|
+
description?: string | undefined;
|
|
90
|
+
epicKey?: string | null | undefined;
|
|
91
|
+
estimate?: number | null | undefined;
|
|
92
|
+
statusId?: string | undefined;
|
|
93
|
+
}, {
|
|
94
|
+
orgSlug: string;
|
|
95
|
+
projectKey: string;
|
|
96
|
+
issueKey: string;
|
|
97
|
+
type?: "EPIC" | "STORY" | "TASK" | "BUG" | "SUBTASK" | undefined;
|
|
98
|
+
priority?: "CRITICAL" | "HIGH" | "MEDIUM" | "LOW" | "TRIVIAL" | undefined;
|
|
99
|
+
assigneeId?: string | null | undefined;
|
|
100
|
+
sprintId?: string | null | undefined;
|
|
101
|
+
labels?: string[] | undefined;
|
|
102
|
+
summary?: string | undefined;
|
|
103
|
+
description?: string | undefined;
|
|
104
|
+
epicKey?: string | null | undefined;
|
|
105
|
+
estimate?: number | null | undefined;
|
|
106
|
+
statusId?: string | undefined;
|
|
107
|
+
}>;
|
|
108
|
+
export type UpdateIssueToolInput = z.infer<typeof updateIssueToolSchema>;
|
|
109
|
+
export declare function executeUpdateIssue(input: UpdateIssueToolInput): Promise<string>;
|
|
110
|
+
export declare const deleteIssueToolName = "llama_delete_issue";
|
|
111
|
+
export declare const deleteIssueToolDescription = "Soft-delete an issue. The issue can be restored later if needed.\nUse with caution - this action removes the issue from views.";
|
|
112
|
+
export declare const deleteIssueToolSchema: z.ZodObject<{
|
|
113
|
+
orgSlug: z.ZodString;
|
|
114
|
+
projectKey: z.ZodString;
|
|
115
|
+
issueKey: z.ZodString;
|
|
116
|
+
}, "strip", z.ZodTypeAny, {
|
|
117
|
+
orgSlug: string;
|
|
118
|
+
projectKey: string;
|
|
119
|
+
issueKey: string;
|
|
120
|
+
}, {
|
|
121
|
+
orgSlug: string;
|
|
122
|
+
projectKey: string;
|
|
123
|
+
issueKey: string;
|
|
124
|
+
}>;
|
|
125
|
+
export type DeleteIssueToolInput = z.infer<typeof deleteIssueToolSchema>;
|
|
126
|
+
export declare function executeDeleteIssue(input: DeleteIssueToolInput): Promise<string>;
|
|
127
|
+
//# sourceMappingURL=issues.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issues.d.ts","sourceRoot":"","sources":["../../src/tools/issues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,gBAAgB,oBAAoB,CAAC;AAElD,eAAO,MAAM,uBAAuB,6JAC6C,CAAC;AAElF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;EAI7B,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEnE,wBAAsB,eAAe,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,CAmC/E;AAMD,eAAO,MAAM,mBAAmB,uBAAuB,CAAC;AAExD,eAAO,MAAM,0BAA0B,4QAMsB,CAAC;AAE9D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBhC,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,mBAAmB,uBAAuB,CAAC;AAExD,eAAO,MAAM,0BAA0B,wJAE4B,CAAC;AAEpE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BhC,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,CAgFjB;AAMD,eAAO,MAAM,mBAAmB,uBAAuB,CAAC;AAExD,eAAO,MAAM,0BAA0B,mIACsB,CAAC;AAE9D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAIhC,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,CAmCjB"}
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getApiClient, LlamaApiError } from '../api-client.js';
|
|
3
|
+
// ============================================
|
|
4
|
+
// Get Issue
|
|
5
|
+
// ============================================
|
|
6
|
+
export const getIssueToolName = 'llama_get_issue';
|
|
7
|
+
export const getIssueToolDescription = `Get full details for a specific issue by its key (e.g., "PROJ-123").
|
|
8
|
+
Returns complete issue information including description, comments, and history.`;
|
|
9
|
+
export const getIssueToolSchema = z.object({
|
|
10
|
+
orgSlug: z.string().describe('Organization slug'),
|
|
11
|
+
projectKey: z.string().describe('Project key'),
|
|
12
|
+
issueKey: z.string().describe('Issue key (e.g., "PROJ-123")'),
|
|
13
|
+
});
|
|
14
|
+
export async function executeGetIssue(input) {
|
|
15
|
+
try {
|
|
16
|
+
const client = getApiClient();
|
|
17
|
+
const issue = await client.getIssue(input.orgSlug, input.projectKey, input.issueKey);
|
|
18
|
+
return JSON.stringify({
|
|
19
|
+
success: true,
|
|
20
|
+
issue,
|
|
21
|
+
}, null, 2);
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
if (error instanceof LlamaApiError) {
|
|
25
|
+
return JSON.stringify({
|
|
26
|
+
success: false,
|
|
27
|
+
error: `Failed to get issue: ${error.message}`,
|
|
28
|
+
statusCode: error.statusCode,
|
|
29
|
+
}, null, 2);
|
|
30
|
+
}
|
|
31
|
+
return JSON.stringify({
|
|
32
|
+
success: false,
|
|
33
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
34
|
+
}, null, 2);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
// ============================================
|
|
38
|
+
// Create Issue
|
|
39
|
+
// ============================================
|
|
40
|
+
export const createIssueToolName = 'llama_create_issue';
|
|
41
|
+
export const createIssueToolDescription = `Create a new issue in Llama.
|
|
42
|
+
|
|
43
|
+
Issue types: EPIC, STORY, TASK, BUG, SUBTASK
|
|
44
|
+
Priority levels: CRITICAL, HIGH, MEDIUM (default), LOW, TRIVIAL
|
|
45
|
+
|
|
46
|
+
For subtasks, provide the parentKey of the parent issue.
|
|
47
|
+
To add to a sprint, provide the sprintId from llama_context.`;
|
|
48
|
+
export const createIssueToolSchema = z.object({
|
|
49
|
+
orgSlug: z.string().describe('Organization slug'),
|
|
50
|
+
projectKey: z.string().describe('Project key'),
|
|
51
|
+
summary: z.string().describe('Issue title/summary'),
|
|
52
|
+
description: z.string().optional().describe('Detailed description (markdown supported)'),
|
|
53
|
+
type: z
|
|
54
|
+
.enum(['EPIC', 'STORY', 'TASK', 'BUG', 'SUBTASK'])
|
|
55
|
+
.describe('Issue type'),
|
|
56
|
+
priority: z
|
|
57
|
+
.enum(['CRITICAL', 'HIGH', 'MEDIUM', 'LOW', 'TRIVIAL'])
|
|
58
|
+
.optional()
|
|
59
|
+
.describe('Priority level (default: MEDIUM)'),
|
|
60
|
+
assigneeId: z.string().optional().describe('User ID to assign the issue to'),
|
|
61
|
+
sprintId: z.string().optional().describe('Sprint ID to add the issue to'),
|
|
62
|
+
parentKey: z.string().optional().describe('Parent issue key for subtasks (SUBTASK only)'),
|
|
63
|
+
epicKey: z.string().optional().describe('Epic issue key to link this issue to (for STORY, TASK, BUG)'),
|
|
64
|
+
estimate: z.number().optional().describe('Story points estimate'),
|
|
65
|
+
labels: z.array(z.string()).optional().describe('Labels to attach'),
|
|
66
|
+
});
|
|
67
|
+
export async function executeCreateIssue(input) {
|
|
68
|
+
try {
|
|
69
|
+
const client = getApiClient();
|
|
70
|
+
// Resolve epicKey to parentId if provided
|
|
71
|
+
let parentId;
|
|
72
|
+
if (input.epicKey) {
|
|
73
|
+
// Look up the Epic to get its ID
|
|
74
|
+
const epic = await client.getIssue(input.orgSlug, input.projectKey, input.epicKey);
|
|
75
|
+
if (epic.type !== 'EPIC') {
|
|
76
|
+
return JSON.stringify({
|
|
77
|
+
success: false,
|
|
78
|
+
error: `Issue ${input.epicKey} is not an Epic (type: ${epic.type})`,
|
|
79
|
+
}, null, 2);
|
|
80
|
+
}
|
|
81
|
+
parentId = epic.id;
|
|
82
|
+
}
|
|
83
|
+
else if (input.parentKey) {
|
|
84
|
+
// For subtasks, look up the parent to get its ID
|
|
85
|
+
const parent = await client.getIssue(input.orgSlug, input.projectKey, input.parentKey);
|
|
86
|
+
parentId = parent.id;
|
|
87
|
+
}
|
|
88
|
+
const issue = await client.createIssue(input.orgSlug, input.projectKey, {
|
|
89
|
+
summary: input.summary,
|
|
90
|
+
description: input.description,
|
|
91
|
+
type: input.type,
|
|
92
|
+
priority: input.priority,
|
|
93
|
+
assigneeId: input.assigneeId,
|
|
94
|
+
sprintId: input.sprintId,
|
|
95
|
+
parentId,
|
|
96
|
+
estimate: input.estimate,
|
|
97
|
+
labels: input.labels,
|
|
98
|
+
});
|
|
99
|
+
return JSON.stringify({
|
|
100
|
+
success: true,
|
|
101
|
+
message: `Created issue ${issue.key}`,
|
|
102
|
+
issue: {
|
|
103
|
+
key: issue.key,
|
|
104
|
+
summary: issue.summary,
|
|
105
|
+
type: issue.type,
|
|
106
|
+
status: issue.status,
|
|
107
|
+
priority: issue.priority,
|
|
108
|
+
},
|
|
109
|
+
}, null, 2);
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
if (error instanceof LlamaApiError) {
|
|
113
|
+
return JSON.stringify({
|
|
114
|
+
success: false,
|
|
115
|
+
error: `Failed to create issue: ${error.message}`,
|
|
116
|
+
statusCode: error.statusCode,
|
|
117
|
+
}, null, 2);
|
|
118
|
+
}
|
|
119
|
+
return JSON.stringify({
|
|
120
|
+
success: false,
|
|
121
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
122
|
+
}, null, 2);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// ============================================
|
|
126
|
+
// Update Issue
|
|
127
|
+
// ============================================
|
|
128
|
+
export const updateIssueToolName = 'llama_update_issue';
|
|
129
|
+
export const updateIssueToolDescription = `Update an existing issue's fields.
|
|
130
|
+
Only include the fields you want to change.
|
|
131
|
+
Set assigneeId or sprintId to null to unassign/remove from sprint.`;
|
|
132
|
+
export const updateIssueToolSchema = z.object({
|
|
133
|
+
orgSlug: z.string().describe('Organization slug'),
|
|
134
|
+
projectKey: z.string().describe('Project key'),
|
|
135
|
+
issueKey: z.string().describe('Issue key to update'),
|
|
136
|
+
summary: z.string().optional().describe('New summary'),
|
|
137
|
+
description: z.string().optional().describe('New description'),
|
|
138
|
+
type: z.enum(['EPIC', 'STORY', 'TASK', 'BUG', 'SUBTASK']).optional(),
|
|
139
|
+
priority: z.enum(['CRITICAL', 'HIGH', 'MEDIUM', 'LOW', 'TRIVIAL']).optional(),
|
|
140
|
+
statusId: z.string().optional().describe('Status ID to transition to'),
|
|
141
|
+
assigneeId: z
|
|
142
|
+
.string()
|
|
143
|
+
.nullable()
|
|
144
|
+
.optional()
|
|
145
|
+
.describe('User ID or null to unassign'),
|
|
146
|
+
sprintId: z
|
|
147
|
+
.string()
|
|
148
|
+
.nullable()
|
|
149
|
+
.optional()
|
|
150
|
+
.describe('Sprint ID or null to remove from sprint'),
|
|
151
|
+
epicKey: z
|
|
152
|
+
.string()
|
|
153
|
+
.nullable()
|
|
154
|
+
.optional()
|
|
155
|
+
.describe('Epic issue key to link to, or null to remove from Epic'),
|
|
156
|
+
estimate: z.number().nullable().optional().describe('Story points'),
|
|
157
|
+
labels: z.array(z.string()).optional().describe('Replace all labels'),
|
|
158
|
+
});
|
|
159
|
+
export async function executeUpdateIssue(input) {
|
|
160
|
+
try {
|
|
161
|
+
const { orgSlug, projectKey, issueKey, ...updates } = input;
|
|
162
|
+
const client = getApiClient();
|
|
163
|
+
// Build update object with only provided fields
|
|
164
|
+
const updateFields = {};
|
|
165
|
+
if (updates.summary !== undefined)
|
|
166
|
+
updateFields.summary = updates.summary;
|
|
167
|
+
if (updates.description !== undefined)
|
|
168
|
+
updateFields.description = updates.description;
|
|
169
|
+
if (updates.type !== undefined)
|
|
170
|
+
updateFields.type = updates.type;
|
|
171
|
+
if (updates.priority !== undefined)
|
|
172
|
+
updateFields.priority = updates.priority;
|
|
173
|
+
if (updates.statusId !== undefined)
|
|
174
|
+
updateFields.statusId = updates.statusId;
|
|
175
|
+
if (updates.assigneeId !== undefined)
|
|
176
|
+
updateFields.assigneeId = updates.assigneeId;
|
|
177
|
+
if (updates.sprintId !== undefined)
|
|
178
|
+
updateFields.sprintId = updates.sprintId;
|
|
179
|
+
if (updates.estimate !== undefined)
|
|
180
|
+
updateFields.estimate = updates.estimate;
|
|
181
|
+
if (updates.labels !== undefined)
|
|
182
|
+
updateFields.labels = updates.labels;
|
|
183
|
+
// Handle epicKey -> parentId conversion
|
|
184
|
+
if (updates.epicKey !== undefined) {
|
|
185
|
+
if (updates.epicKey === null) {
|
|
186
|
+
updateFields.parentId = null;
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
// Look up the Epic to get its ID
|
|
190
|
+
const epic = await client.getIssue(orgSlug, projectKey, updates.epicKey);
|
|
191
|
+
if (epic.type !== 'EPIC') {
|
|
192
|
+
return JSON.stringify({
|
|
193
|
+
success: false,
|
|
194
|
+
error: `Issue ${updates.epicKey} is not an Epic (type: ${epic.type})`,
|
|
195
|
+
}, null, 2);
|
|
196
|
+
}
|
|
197
|
+
updateFields.parentId = epic.id;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
const issue = await client.updateIssue(orgSlug, projectKey, issueKey, updateFields);
|
|
201
|
+
return JSON.stringify({
|
|
202
|
+
success: true,
|
|
203
|
+
message: `Updated issue ${issue.key}`,
|
|
204
|
+
issue: {
|
|
205
|
+
key: issue.key,
|
|
206
|
+
summary: issue.summary,
|
|
207
|
+
type: issue.type,
|
|
208
|
+
status: issue.status,
|
|
209
|
+
priority: issue.priority,
|
|
210
|
+
assignee: issue.assignee,
|
|
211
|
+
},
|
|
212
|
+
}, null, 2);
|
|
213
|
+
}
|
|
214
|
+
catch (error) {
|
|
215
|
+
if (error instanceof LlamaApiError) {
|
|
216
|
+
return JSON.stringify({
|
|
217
|
+
success: false,
|
|
218
|
+
error: `Failed to update issue: ${error.message}`,
|
|
219
|
+
statusCode: error.statusCode,
|
|
220
|
+
}, null, 2);
|
|
221
|
+
}
|
|
222
|
+
return JSON.stringify({
|
|
223
|
+
success: false,
|
|
224
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
225
|
+
}, null, 2);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
// ============================================
|
|
229
|
+
// Delete Issue (Soft)
|
|
230
|
+
// ============================================
|
|
231
|
+
export const deleteIssueToolName = 'llama_delete_issue';
|
|
232
|
+
export const deleteIssueToolDescription = `Soft-delete an issue. The issue can be restored later if needed.
|
|
233
|
+
Use with caution - this action removes the issue from views.`;
|
|
234
|
+
export const deleteIssueToolSchema = z.object({
|
|
235
|
+
orgSlug: z.string().describe('Organization slug'),
|
|
236
|
+
projectKey: z.string().describe('Project key'),
|
|
237
|
+
issueKey: z.string().describe('Issue key to delete'),
|
|
238
|
+
});
|
|
239
|
+
export async function executeDeleteIssue(input) {
|
|
240
|
+
try {
|
|
241
|
+
const client = getApiClient();
|
|
242
|
+
await client.deleteIssue(input.orgSlug, input.projectKey, input.issueKey);
|
|
243
|
+
return JSON.stringify({
|
|
244
|
+
success: true,
|
|
245
|
+
message: `Deleted issue ${input.issueKey}`,
|
|
246
|
+
}, null, 2);
|
|
247
|
+
}
|
|
248
|
+
catch (error) {
|
|
249
|
+
if (error instanceof LlamaApiError) {
|
|
250
|
+
return JSON.stringify({
|
|
251
|
+
success: false,
|
|
252
|
+
error: `Failed to delete issue: ${error.message}`,
|
|
253
|
+
statusCode: error.statusCode,
|
|
254
|
+
}, null, 2);
|
|
255
|
+
}
|
|
256
|
+
return JSON.stringify({
|
|
257
|
+
success: false,
|
|
258
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
259
|
+
}, null, 2);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
//# sourceMappingURL=issues.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issues.js","sourceRoot":"","sources":["../../src/tools/issues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,aAAa,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AU,kBAAkB,CACtC,KAA2B;IAE3B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;QAC9B,MAAM,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;QAE1E,OAAO,IAAI,CAAC,SAAS,CACnB;YACE,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,iBAAiB,KAAK,CAAC,QAAQ,EAAE;SAC3C,EACD,IAAI,EACJ,CAAC,CACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,aAAa,EAAE,CAAC;YACnC,OAAO,IAAI,CAAC,SAAS,CACnB;gBACE,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,2BAA2B,KAAK,CAAC,OAAO,EAAE;gBACjD,UAAU,EAAE,KAAK,CAAC,UAAU;aAC7B,EACD,IAAI,EACJ,CAAC,CACF,CAAC;QACJ,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,EACD,IAAI,EACJ,CAAC,CACF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const listLabelsToolName = "llama_list_labels";
|
|
3
|
+
export declare const listLabelsToolDescription = "List all labels in a project.\nReturns label name, color, description, and usage count.";
|
|
4
|
+
export declare const listLabelsToolSchema: z.ZodObject<{
|
|
5
|
+
orgSlug: z.ZodString;
|
|
6
|
+
projectKey: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
orgSlug: string;
|
|
9
|
+
projectKey: string;
|
|
10
|
+
}, {
|
|
11
|
+
orgSlug: string;
|
|
12
|
+
projectKey: string;
|
|
13
|
+
}>;
|
|
14
|
+
export type ListLabelsToolInput = z.infer<typeof listLabelsToolSchema>;
|
|
15
|
+
export declare function executeListLabels(input: ListLabelsToolInput): Promise<string>;
|
|
16
|
+
export declare const createLabelToolName = "llama_create_label";
|
|
17
|
+
export declare const createLabelToolDescription = "Create a new label in a project.\nLabels can be added to issues for categorization and filtering.";
|
|
18
|
+
export declare const createLabelToolSchema: z.ZodObject<{
|
|
19
|
+
orgSlug: z.ZodString;
|
|
20
|
+
projectKey: z.ZodString;
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
color: z.ZodString;
|
|
23
|
+
description: z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
orgSlug: string;
|
|
26
|
+
projectKey: string;
|
|
27
|
+
name: string;
|
|
28
|
+
color: string;
|
|
29
|
+
description?: string | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
orgSlug: string;
|
|
32
|
+
projectKey: string;
|
|
33
|
+
name: string;
|
|
34
|
+
color: string;
|
|
35
|
+
description?: string | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
export type CreateLabelToolInput = z.infer<typeof createLabelToolSchema>;
|
|
38
|
+
export declare function executeCreateLabel(input: CreateLabelToolInput): Promise<string>;
|
|
39
|
+
export declare const deleteLabelToolName = "llama_delete_label";
|
|
40
|
+
export declare const deleteLabelToolDescription = "Delete a label from a project.\nThis removes the label from all issues that have it.";
|
|
41
|
+
export declare const deleteLabelToolSchema: z.ZodObject<{
|
|
42
|
+
orgSlug: z.ZodString;
|
|
43
|
+
projectKey: z.ZodString;
|
|
44
|
+
labelName: z.ZodString;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
orgSlug: string;
|
|
47
|
+
projectKey: string;
|
|
48
|
+
labelName: string;
|
|
49
|
+
}, {
|
|
50
|
+
orgSlug: string;
|
|
51
|
+
projectKey: string;
|
|
52
|
+
labelName: string;
|
|
53
|
+
}>;
|
|
54
|
+
export type DeleteLabelToolInput = z.infer<typeof deleteLabelToolSchema>;
|
|
55
|
+
export declare function executeDeleteLabel(input: DeleteLabelToolInput): Promise<string>;
|
|
56
|
+
//# sourceMappingURL=labels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../src/tools/labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AAEtD,eAAO,MAAM,yBAAyB,4FACmB,CAAC;AAE1D,eAAO,MAAM,oBAAoB;;;;;;;;;EAG/B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEvE,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,mBAAmB,GACzB,OAAO,CAAC,MAAM,CAAC,CAyCjB;AAMD,eAAO,MAAM,mBAAmB,uBAAuB,CAAC;AAExD,eAAO,MAAM,0BAA0B,sGACyB,CAAC;AAEjE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;EAQhC,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,CA4CjB;AAMD,eAAO,MAAM,mBAAmB,uBAAuB,CAAC;AAExD,eAAO,MAAM,0BAA0B,yFACc,CAAC;AAEtD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAIhC,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,CAmCjB"}
|