@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,123 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getApiClient, LlamaApiError } from '../api-client.js';
|
|
3
|
+
// ============================================
|
|
4
|
+
// List Labels
|
|
5
|
+
// ============================================
|
|
6
|
+
export const listLabelsToolName = 'llama_list_labels';
|
|
7
|
+
export const listLabelsToolDescription = `List all labels in a project.
|
|
8
|
+
Returns label name, color, description, and usage count.`;
|
|
9
|
+
export const listLabelsToolSchema = z.object({
|
|
10
|
+
orgSlug: z.string().describe('Organization slug'),
|
|
11
|
+
projectKey: z.string().describe('Project key'),
|
|
12
|
+
});
|
|
13
|
+
export async function executeListLabels(input) {
|
|
14
|
+
try {
|
|
15
|
+
const client = getApiClient();
|
|
16
|
+
const labels = await client.listLabels(input.orgSlug, input.projectKey);
|
|
17
|
+
return JSON.stringify({
|
|
18
|
+
success: true,
|
|
19
|
+
labels: labels.map((l) => ({
|
|
20
|
+
name: l.name,
|
|
21
|
+
color: l.color,
|
|
22
|
+
description: l.description,
|
|
23
|
+
issueCount: l.issueCount,
|
|
24
|
+
})),
|
|
25
|
+
count: labels.length,
|
|
26
|
+
}, null, 2);
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
if (error instanceof LlamaApiError) {
|
|
30
|
+
return JSON.stringify({
|
|
31
|
+
success: false,
|
|
32
|
+
error: `Failed to list labels: ${error.message}`,
|
|
33
|
+
statusCode: error.statusCode,
|
|
34
|
+
}, null, 2);
|
|
35
|
+
}
|
|
36
|
+
return JSON.stringify({
|
|
37
|
+
success: false,
|
|
38
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
39
|
+
}, null, 2);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
// ============================================
|
|
43
|
+
// Create Label
|
|
44
|
+
// ============================================
|
|
45
|
+
export const createLabelToolName = 'llama_create_label';
|
|
46
|
+
export const createLabelToolDescription = `Create a new label in a project.
|
|
47
|
+
Labels can be added to issues for categorization and filtering.`;
|
|
48
|
+
export const createLabelToolSchema = z.object({
|
|
49
|
+
orgSlug: z.string().describe('Organization slug'),
|
|
50
|
+
projectKey: z.string().describe('Project key'),
|
|
51
|
+
name: z.string().describe('Label name'),
|
|
52
|
+
color: z
|
|
53
|
+
.string()
|
|
54
|
+
.describe('Label color in hex format (e.g., "#ff0000" for red)'),
|
|
55
|
+
description: z.string().optional().describe('Optional label description'),
|
|
56
|
+
});
|
|
57
|
+
export async function executeCreateLabel(input) {
|
|
58
|
+
try {
|
|
59
|
+
const client = getApiClient();
|
|
60
|
+
const label = await client.createLabel(input.orgSlug, input.projectKey, {
|
|
61
|
+
name: input.name,
|
|
62
|
+
color: input.color,
|
|
63
|
+
description: input.description,
|
|
64
|
+
});
|
|
65
|
+
return JSON.stringify({
|
|
66
|
+
success: true,
|
|
67
|
+
message: `Created label "${label.name}"`,
|
|
68
|
+
label: {
|
|
69
|
+
name: label.name,
|
|
70
|
+
color: label.color,
|
|
71
|
+
description: label.description,
|
|
72
|
+
},
|
|
73
|
+
}, null, 2);
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
if (error instanceof LlamaApiError) {
|
|
77
|
+
return JSON.stringify({
|
|
78
|
+
success: false,
|
|
79
|
+
error: `Failed to create label: ${error.message}`,
|
|
80
|
+
statusCode: error.statusCode,
|
|
81
|
+
}, null, 2);
|
|
82
|
+
}
|
|
83
|
+
return JSON.stringify({
|
|
84
|
+
success: false,
|
|
85
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
86
|
+
}, null, 2);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
// ============================================
|
|
90
|
+
// Delete Label
|
|
91
|
+
// ============================================
|
|
92
|
+
export const deleteLabelToolName = 'llama_delete_label';
|
|
93
|
+
export const deleteLabelToolDescription = `Delete a label from a project.
|
|
94
|
+
This removes the label from all issues that have it.`;
|
|
95
|
+
export const deleteLabelToolSchema = z.object({
|
|
96
|
+
orgSlug: z.string().describe('Organization slug'),
|
|
97
|
+
projectKey: z.string().describe('Project key'),
|
|
98
|
+
labelName: z.string().describe('Label name to delete'),
|
|
99
|
+
});
|
|
100
|
+
export async function executeDeleteLabel(input) {
|
|
101
|
+
try {
|
|
102
|
+
const client = getApiClient();
|
|
103
|
+
await client.deleteLabel(input.orgSlug, input.projectKey, input.labelName);
|
|
104
|
+
return JSON.stringify({
|
|
105
|
+
success: true,
|
|
106
|
+
message: `Deleted label "${input.labelName}"`,
|
|
107
|
+
}, null, 2);
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
if (error instanceof LlamaApiError) {
|
|
111
|
+
return JSON.stringify({
|
|
112
|
+
success: false,
|
|
113
|
+
error: `Failed to delete label: ${error.message}`,
|
|
114
|
+
statusCode: error.statusCode,
|
|
115
|
+
}, null, 2);
|
|
116
|
+
}
|
|
117
|
+
return JSON.stringify({
|
|
118
|
+
success: false,
|
|
119
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
120
|
+
}, null, 2);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=labels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labels.js","sourceRoot":"","sources":["../../src/tools/labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE/D,+CAA+C;AAC/C,cAAc;AACd,+CAA+C;AAE/C,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AAEtD,MAAM,CAAC,MAAM,yBAAyB,GAAG;yDACgB,CAAC;AAE1D,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;IACjD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC;CAC/C,CAAC,CAAC;AAIH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,KAA0B;IAE1B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;QAC9B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,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,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,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const listMembersToolName = "llama_list_members";
|
|
3
|
+
export declare const listMembersToolDescription = "List all members in an organization.\nReturns member name, email, role, and join date.\nUse this to find user IDs for assigning issues.";
|
|
4
|
+
export declare const listMembersToolSchema: z.ZodObject<{
|
|
5
|
+
orgSlug: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
orgSlug: string;
|
|
8
|
+
}, {
|
|
9
|
+
orgSlug: string;
|
|
10
|
+
}>;
|
|
11
|
+
export type ListMembersToolInput = z.infer<typeof listMembersToolSchema>;
|
|
12
|
+
export declare function executeListMembers(input: ListMembersToolInput): Promise<string>;
|
|
13
|
+
//# sourceMappingURL=members.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"members.d.ts","sourceRoot":"","sources":["../../src/tools/members.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,mBAAmB,uBAAuB,CAAC;AAExD,eAAO,MAAM,0BAA0B,4IAES,CAAC;AAEjD,eAAO,MAAM,qBAAqB;;;;;;EAEhC,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,CA0CjB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getApiClient, LlamaApiError } from '../api-client.js';
|
|
3
|
+
// ============================================
|
|
4
|
+
// List Members
|
|
5
|
+
// ============================================
|
|
6
|
+
export const listMembersToolName = 'llama_list_members';
|
|
7
|
+
export const listMembersToolDescription = `List all members in an organization.
|
|
8
|
+
Returns member name, email, role, and join date.
|
|
9
|
+
Use this to find user IDs for assigning issues.`;
|
|
10
|
+
export const listMembersToolSchema = z.object({
|
|
11
|
+
orgSlug: z.string().describe('Organization slug'),
|
|
12
|
+
});
|
|
13
|
+
export async function executeListMembers(input) {
|
|
14
|
+
try {
|
|
15
|
+
const client = getApiClient();
|
|
16
|
+
const members = await client.listMembers(input.orgSlug);
|
|
17
|
+
return JSON.stringify({
|
|
18
|
+
success: true,
|
|
19
|
+
members: members.map((m) => ({
|
|
20
|
+
id: m.userId,
|
|
21
|
+
name: m.name,
|
|
22
|
+
email: m.email,
|
|
23
|
+
role: m.role,
|
|
24
|
+
joinedAt: m.joinedAt,
|
|
25
|
+
})),
|
|
26
|
+
count: members.length,
|
|
27
|
+
}, null, 2);
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
if (error instanceof LlamaApiError) {
|
|
31
|
+
return JSON.stringify({
|
|
32
|
+
success: false,
|
|
33
|
+
error: `Failed to list members: ${error.message}`,
|
|
34
|
+
statusCode: error.statusCode,
|
|
35
|
+
}, null, 2);
|
|
36
|
+
}
|
|
37
|
+
return JSON.stringify({
|
|
38
|
+
success: false,
|
|
39
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
40
|
+
}, null, 2);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=members.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"members.js","sourceRoot":"","sources":["../../src/tools/members.ts"],"names":[],"mappings":"AAAA,OAAO,E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,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,35 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const listOrganizationsToolName = "llama_list_organizations";
|
|
3
|
+
export declare const listOrganizationsToolDescription = "List all organizations the current user has access to.\nReturns organization name, slug, description, and member/project counts.";
|
|
4
|
+
export declare const listOrganizationsToolSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
5
|
+
export type ListOrganizationsToolInput = z.infer<typeof listOrganizationsToolSchema>;
|
|
6
|
+
export declare function executeListOrganizations(): Promise<string>;
|
|
7
|
+
export declare const getOrganizationToolName = "llama_get_organization";
|
|
8
|
+
export declare const getOrganizationToolDescription = "Get details for a specific organization by its slug.\nReturns full organization info including stats.";
|
|
9
|
+
export declare const getOrganizationToolSchema: z.ZodObject<{
|
|
10
|
+
orgSlug: z.ZodString;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
orgSlug: string;
|
|
13
|
+
}, {
|
|
14
|
+
orgSlug: string;
|
|
15
|
+
}>;
|
|
16
|
+
export type GetOrganizationToolInput = z.infer<typeof getOrganizationToolSchema>;
|
|
17
|
+
export declare function executeGetOrganization(input: GetOrganizationToolInput): Promise<string>;
|
|
18
|
+
export declare const createOrganizationToolName = "llama_create_organization";
|
|
19
|
+
export declare const createOrganizationToolDescription = "Create a new organization.\nThe slug must be unique and URL-friendly (lowercase letters, numbers, hyphens).";
|
|
20
|
+
export declare const createOrganizationToolSchema: z.ZodObject<{
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
slug: z.ZodString;
|
|
23
|
+
description: z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
name: string;
|
|
26
|
+
slug: string;
|
|
27
|
+
description?: string | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
name: string;
|
|
30
|
+
slug: string;
|
|
31
|
+
description?: string | undefined;
|
|
32
|
+
}>;
|
|
33
|
+
export type CreateOrganizationToolInput = z.infer<typeof createOrganizationToolSchema>;
|
|
34
|
+
export declare function executeCreateOrganization(input: CreateOrganizationToolInput): Promise<string>;
|
|
35
|
+
//# sourceMappingURL=organizations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../src/tools/organizations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,yBAAyB,6BAA6B,CAAC;AAEpE,eAAO,MAAM,gCAAgC,qIAC4B,CAAC;AAE1E,eAAO,MAAM,2BAA2B,gDAAe,CAAC;AAExD,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAErF,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,MAAM,CAAC,CA2ChE;AAMD,eAAO,MAAM,uBAAuB,2BAA2B,CAAC;AAEhE,eAAO,MAAM,8BAA8B,0GACK,CAAC;AAEjD,eAAO,MAAM,yBAAyB;;;;;;EAEpC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEjF,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,wBAAwB,GAC9B,OAAO,CAAC,MAAM,CAAC,CAmCjB;AAMD,eAAO,MAAM,0BAA0B,8BAA8B,CAAC;AAEtE,eAAO,MAAM,iCAAiC,gHACkC,CAAC;AAEjF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;EAIvC,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAEvF,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,2BAA2B,GACjC,OAAO,CAAC,MAAM,CAAC,CA4CjB"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getApiClient, LlamaApiError } from '../api-client.js';
|
|
3
|
+
// ============================================
|
|
4
|
+
// List Organizations
|
|
5
|
+
// ============================================
|
|
6
|
+
export const listOrganizationsToolName = 'llama_list_organizations';
|
|
7
|
+
export const listOrganizationsToolDescription = `List all organizations the current user has access to.
|
|
8
|
+
Returns organization name, slug, description, and member/project counts.`;
|
|
9
|
+
export const listOrganizationsToolSchema = z.object({});
|
|
10
|
+
export async function executeListOrganizations() {
|
|
11
|
+
try {
|
|
12
|
+
const client = getApiClient();
|
|
13
|
+
const organizations = await client.listOrganizations();
|
|
14
|
+
return JSON.stringify({
|
|
15
|
+
success: true,
|
|
16
|
+
organizations: organizations.map((org) => ({
|
|
17
|
+
name: org.name,
|
|
18
|
+
slug: org.slug,
|
|
19
|
+
description: org.description,
|
|
20
|
+
memberCount: org.memberCount,
|
|
21
|
+
projectCount: org.projectCount,
|
|
22
|
+
role: org.role,
|
|
23
|
+
})),
|
|
24
|
+
count: organizations.length,
|
|
25
|
+
}, null, 2);
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
if (error instanceof LlamaApiError) {
|
|
29
|
+
return JSON.stringify({
|
|
30
|
+
success: false,
|
|
31
|
+
error: `Failed to list organizations: ${error.message}`,
|
|
32
|
+
statusCode: error.statusCode,
|
|
33
|
+
}, null, 2);
|
|
34
|
+
}
|
|
35
|
+
return JSON.stringify({
|
|
36
|
+
success: false,
|
|
37
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
38
|
+
}, null, 2);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
// ============================================
|
|
42
|
+
// Get Organization
|
|
43
|
+
// ============================================
|
|
44
|
+
export const getOrganizationToolName = 'llama_get_organization';
|
|
45
|
+
export const getOrganizationToolDescription = `Get details for a specific organization by its slug.
|
|
46
|
+
Returns full organization info including stats.`;
|
|
47
|
+
export const getOrganizationToolSchema = z.object({
|
|
48
|
+
orgSlug: z.string().describe('Organization slug (e.g., "my-team")'),
|
|
49
|
+
});
|
|
50
|
+
export async function executeGetOrganization(input) {
|
|
51
|
+
try {
|
|
52
|
+
const client = getApiClient();
|
|
53
|
+
const org = await client.getOrganization(input.orgSlug);
|
|
54
|
+
return JSON.stringify({
|
|
55
|
+
success: true,
|
|
56
|
+
organization: org,
|
|
57
|
+
}, null, 2);
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
if (error instanceof LlamaApiError) {
|
|
61
|
+
return JSON.stringify({
|
|
62
|
+
success: false,
|
|
63
|
+
error: `Failed to get organization: ${error.message}`,
|
|
64
|
+
statusCode: error.statusCode,
|
|
65
|
+
}, null, 2);
|
|
66
|
+
}
|
|
67
|
+
return JSON.stringify({
|
|
68
|
+
success: false,
|
|
69
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
70
|
+
}, null, 2);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
// ============================================
|
|
74
|
+
// Create Organization
|
|
75
|
+
// ============================================
|
|
76
|
+
export const createOrganizationToolName = 'llama_create_organization';
|
|
77
|
+
export const createOrganizationToolDescription = `Create a new organization.
|
|
78
|
+
The slug must be unique and URL-friendly (lowercase letters, numbers, hyphens).`;
|
|
79
|
+
export const createOrganizationToolSchema = z.object({
|
|
80
|
+
name: z.string().describe('Organization display name'),
|
|
81
|
+
slug: z.string().describe('URL-friendly identifier (e.g., "my-team")'),
|
|
82
|
+
description: z.string().optional().describe('Optional description'),
|
|
83
|
+
});
|
|
84
|
+
export async function executeCreateOrganization(input) {
|
|
85
|
+
try {
|
|
86
|
+
const client = getApiClient();
|
|
87
|
+
const org = await client.createOrganization({
|
|
88
|
+
name: input.name,
|
|
89
|
+
slug: input.slug,
|
|
90
|
+
description: input.description,
|
|
91
|
+
});
|
|
92
|
+
return JSON.stringify({
|
|
93
|
+
success: true,
|
|
94
|
+
message: `Created organization "${org.name}" (${org.slug})`,
|
|
95
|
+
organization: {
|
|
96
|
+
name: org.name,
|
|
97
|
+
slug: org.slug,
|
|
98
|
+
description: org.description,
|
|
99
|
+
},
|
|
100
|
+
}, null, 2);
|
|
101
|
+
}
|
|
102
|
+
catch (error) {
|
|
103
|
+
if (error instanceof LlamaApiError) {
|
|
104
|
+
return JSON.stringify({
|
|
105
|
+
success: false,
|
|
106
|
+
error: `Failed to create organization: ${error.message}`,
|
|
107
|
+
statusCode: error.statusCode,
|
|
108
|
+
}, null, 2);
|
|
109
|
+
}
|
|
110
|
+
return JSON.stringify({
|
|
111
|
+
success: false,
|
|
112
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
113
|
+
}, null, 2);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=organizations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizations.js","sourceRoot":"","sources":["../../src/tools/organizations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE/D,+CAA+C;AAC/C,qBAAqB;AACrB,+CAA+C;AAE/C,MAAM,CAAC,MAAM,yBAAyB,GAAG,0BAA0B,CAAC;AAEpE,MAAM,CAAC,MAAM,gCAAgC,GAAG;yEACyB,CAAC;AAE1E,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAIxD,MAAM,CAAC,KAAK,UAAU,wBAAwB;IAC5C,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,YA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I,EACJ,CAAC,CACF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const listProjectsToolName = "llama_list_projects";
|
|
3
|
+
export declare const listProjectsToolDescription = "List all projects in an organization.\nReturns project key, name, description, and issue counts.";
|
|
4
|
+
export declare const listProjectsToolSchema: z.ZodObject<{
|
|
5
|
+
orgSlug: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
orgSlug: string;
|
|
8
|
+
}, {
|
|
9
|
+
orgSlug: string;
|
|
10
|
+
}>;
|
|
11
|
+
export type ListProjectsToolInput = z.infer<typeof listProjectsToolSchema>;
|
|
12
|
+
export declare function executeListProjects(input: ListProjectsToolInput): Promise<string>;
|
|
13
|
+
export declare const getProjectToolName = "llama_get_project";
|
|
14
|
+
export declare const getProjectToolDescription = "Get details for a specific project.\nReturns full project info including workflow statuses.";
|
|
15
|
+
export declare const getProjectToolSchema: z.ZodObject<{
|
|
16
|
+
orgSlug: z.ZodString;
|
|
17
|
+
projectKey: z.ZodString;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
orgSlug: string;
|
|
20
|
+
projectKey: string;
|
|
21
|
+
}, {
|
|
22
|
+
orgSlug: string;
|
|
23
|
+
projectKey: string;
|
|
24
|
+
}>;
|
|
25
|
+
export type GetProjectToolInput = z.infer<typeof getProjectToolSchema>;
|
|
26
|
+
export declare function executeGetProject(input: GetProjectToolInput): Promise<string>;
|
|
27
|
+
export declare const createProjectToolName = "llama_create_project";
|
|
28
|
+
export declare const createProjectToolDescription = "Create a new project in an organization.\nThe project key must be unique, uppercase, and 2-10 characters (e.g., \"PROJ\", \"DEMO\").\nA default workflow and board will be created automatically.";
|
|
29
|
+
export declare const createProjectToolSchema: z.ZodObject<{
|
|
30
|
+
orgSlug: z.ZodString;
|
|
31
|
+
name: z.ZodString;
|
|
32
|
+
key: z.ZodString;
|
|
33
|
+
description: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
orgSlug: string;
|
|
36
|
+
name: string;
|
|
37
|
+
key: string;
|
|
38
|
+
description?: string | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
orgSlug: string;
|
|
41
|
+
name: string;
|
|
42
|
+
key: string;
|
|
43
|
+
description?: string | undefined;
|
|
44
|
+
}>;
|
|
45
|
+
export type CreateProjectToolInput = z.infer<typeof createProjectToolSchema>;
|
|
46
|
+
export declare function executeCreateProject(input: CreateProjectToolInput): Promise<string>;
|
|
47
|
+
export declare const updateProjectToolName = "llama_update_project";
|
|
48
|
+
export declare const updateProjectToolDescription = "Update a project's name or description.\nOnly include the fields you want to change.";
|
|
49
|
+
export declare const updateProjectToolSchema: z.ZodObject<{
|
|
50
|
+
orgSlug: z.ZodString;
|
|
51
|
+
projectKey: z.ZodString;
|
|
52
|
+
name: z.ZodOptional<z.ZodString>;
|
|
53
|
+
description: z.ZodOptional<z.ZodString>;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
orgSlug: string;
|
|
56
|
+
projectKey: string;
|
|
57
|
+
description?: string | undefined;
|
|
58
|
+
name?: string | undefined;
|
|
59
|
+
}, {
|
|
60
|
+
orgSlug: string;
|
|
61
|
+
projectKey: string;
|
|
62
|
+
description?: string | undefined;
|
|
63
|
+
name?: string | undefined;
|
|
64
|
+
}>;
|
|
65
|
+
export type UpdateProjectToolInput = z.infer<typeof updateProjectToolSchema>;
|
|
66
|
+
export declare function executeUpdateProject(input: UpdateProjectToolInput): Promise<string>;
|
|
67
|
+
//# sourceMappingURL=projects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/tools/projects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,oBAAoB,wBAAwB,CAAC;A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z } from 'zod';
|
|
2
|
+
import { getApiClient, LlamaApiError } from '../api-client.js';
|
|
3
|
+
// ============================================
|
|
4
|
+
// List Projects
|
|
5
|
+
// ============================================
|
|
6
|
+
export const listProjectsToolName = 'llama_list_projects';
|
|
7
|
+
export const listProjectsToolDescription = `List all projects in an organization.
|
|
8
|
+
Returns project key, name, description, and issue counts.`;
|
|
9
|
+
export const listProjectsToolSchema = z.object({
|
|
10
|
+
orgSlug: z.string().describe('Organization slug'),
|
|
11
|
+
});
|
|
12
|
+
export async function executeListProjects(input) {
|
|
13
|
+
try {
|
|
14
|
+
const client = getApiClient();
|
|
15
|
+
const projects = await client.listProjects(input.orgSlug);
|
|
16
|
+
return JSON.stringify({
|
|
17
|
+
success: true,
|
|
18
|
+
projects: projects.map((p) => ({
|
|
19
|
+
key: p.key,
|
|
20
|
+
name: p.name,
|
|
21
|
+
description: p.description,
|
|
22
|
+
issueCount: p.issueCount,
|
|
23
|
+
})),
|
|
24
|
+
count: projects.length,
|
|
25
|
+
}, null, 2);
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
if (error instanceof LlamaApiError) {
|
|
29
|
+
return JSON.stringify({
|
|
30
|
+
success: false,
|
|
31
|
+
error: `Failed to list projects: ${error.message}`,
|
|
32
|
+
statusCode: error.statusCode,
|
|
33
|
+
}, null, 2);
|
|
34
|
+
}
|
|
35
|
+
return JSON.stringify({
|
|
36
|
+
success: false,
|
|
37
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
38
|
+
}, null, 2);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
// ============================================
|
|
42
|
+
// Get Project
|
|
43
|
+
// ============================================
|
|
44
|
+
export const getProjectToolName = 'llama_get_project';
|
|
45
|
+
export const getProjectToolDescription = `Get details for a specific project.
|
|
46
|
+
Returns full project info including workflow statuses.`;
|
|
47
|
+
export const getProjectToolSchema = z.object({
|
|
48
|
+
orgSlug: z.string().describe('Organization slug'),
|
|
49
|
+
projectKey: z.string().describe('Project key (e.g., "PROJ")'),
|
|
50
|
+
});
|
|
51
|
+
export async function executeGetProject(input) {
|
|
52
|
+
try {
|
|
53
|
+
const client = getApiClient();
|
|
54
|
+
const project = await client.getProject(input.orgSlug, input.projectKey);
|
|
55
|
+
return JSON.stringify({
|
|
56
|
+
success: true,
|
|
57
|
+
project,
|
|
58
|
+
}, null, 2);
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
if (error instanceof LlamaApiError) {
|
|
62
|
+
return JSON.stringify({
|
|
63
|
+
success: false,
|
|
64
|
+
error: `Failed to get project: ${error.message}`,
|
|
65
|
+
statusCode: error.statusCode,
|
|
66
|
+
}, null, 2);
|
|
67
|
+
}
|
|
68
|
+
return JSON.stringify({
|
|
69
|
+
success: false,
|
|
70
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
71
|
+
}, null, 2);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
// ============================================
|
|
75
|
+
// Create Project
|
|
76
|
+
// ============================================
|
|
77
|
+
export const createProjectToolName = 'llama_create_project';
|
|
78
|
+
export const createProjectToolDescription = `Create a new project in an organization.
|
|
79
|
+
The project key must be unique, uppercase, and 2-10 characters (e.g., "PROJ", "DEMO").
|
|
80
|
+
A default workflow and board will be created automatically.`;
|
|
81
|
+
export const createProjectToolSchema = z.object({
|
|
82
|
+
orgSlug: z.string().describe('Organization slug'),
|
|
83
|
+
name: z.string().describe('Project display name'),
|
|
84
|
+
key: z.string().describe('Project key (uppercase, 2-10 chars, e.g., "PROJ")'),
|
|
85
|
+
description: z.string().optional().describe('Optional project description'),
|
|
86
|
+
});
|
|
87
|
+
export async function executeCreateProject(input) {
|
|
88
|
+
try {
|
|
89
|
+
const client = getApiClient();
|
|
90
|
+
const project = await client.createProject(input.orgSlug, {
|
|
91
|
+
name: input.name,
|
|
92
|
+
key: input.key.toUpperCase(),
|
|
93
|
+
description: input.description,
|
|
94
|
+
});
|
|
95
|
+
return JSON.stringify({
|
|
96
|
+
success: true,
|
|
97
|
+
message: `Created project "${project.name}" (${project.key})`,
|
|
98
|
+
project: {
|
|
99
|
+
key: project.key,
|
|
100
|
+
name: project.name,
|
|
101
|
+
description: project.description,
|
|
102
|
+
},
|
|
103
|
+
}, null, 2);
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
if (error instanceof LlamaApiError) {
|
|
107
|
+
return JSON.stringify({
|
|
108
|
+
success: false,
|
|
109
|
+
error: `Failed to create project: ${error.message}`,
|
|
110
|
+
statusCode: error.statusCode,
|
|
111
|
+
}, null, 2);
|
|
112
|
+
}
|
|
113
|
+
return JSON.stringify({
|
|
114
|
+
success: false,
|
|
115
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
116
|
+
}, null, 2);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
// ============================================
|
|
120
|
+
// Update Project
|
|
121
|
+
// ============================================
|
|
122
|
+
export const updateProjectToolName = 'llama_update_project';
|
|
123
|
+
export const updateProjectToolDescription = `Update a project's name or description.
|
|
124
|
+
Only include the fields you want to change.`;
|
|
125
|
+
export const updateProjectToolSchema = z.object({
|
|
126
|
+
orgSlug: z.string().describe('Organization slug'),
|
|
127
|
+
projectKey: z.string().describe('Project key'),
|
|
128
|
+
name: z.string().optional().describe('New project name'),
|
|
129
|
+
description: z.string().optional().describe('New project description'),
|
|
130
|
+
});
|
|
131
|
+
export async function executeUpdateProject(input) {
|
|
132
|
+
try {
|
|
133
|
+
const { orgSlug, projectKey, ...updates } = input;
|
|
134
|
+
const updateFields = {};
|
|
135
|
+
if (updates.name !== undefined)
|
|
136
|
+
updateFields.name = updates.name;
|
|
137
|
+
if (updates.description !== undefined)
|
|
138
|
+
updateFields.description = updates.description;
|
|
139
|
+
const client = getApiClient();
|
|
140
|
+
const project = await client.updateProject(orgSlug, projectKey, updateFields);
|
|
141
|
+
return JSON.stringify({
|
|
142
|
+
success: true,
|
|
143
|
+
message: `Updated project ${project.key}`,
|
|
144
|
+
project: {
|
|
145
|
+
key: project.key,
|
|
146
|
+
name: project.name,
|
|
147
|
+
description: project.description,
|
|
148
|
+
},
|
|
149
|
+
}, null, 2);
|
|
150
|
+
}
|
|
151
|
+
catch (error) {
|
|
152
|
+
if (error instanceof LlamaApiError) {
|
|
153
|
+
return JSON.stringify({
|
|
154
|
+
success: false,
|
|
155
|
+
error: `Failed to update project: ${error.message}`,
|
|
156
|
+
statusCode: error.statusCode,
|
|
157
|
+
}, null, 2);
|
|
158
|
+
}
|
|
159
|
+
return JSON.stringify({
|
|
160
|
+
success: false,
|
|
161
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
162
|
+
}, null, 2);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=projects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/tools/projects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE/D,+CAA+C;AAC/C,gBAAgB;AAChB,+CAA+C;AAE/C,MAAM,CAAC,MAAM,oBAAoB,GAAG,qBAAqB,CAAC;AAE1D,MAAM,CAAC,MAAM,2BAA2B,GAAG;0DACe,CAAC;AAE3D,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;CAClD,CAAC,CAAC;AAIH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,KAA4B;IAE5B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;QAC9B,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAE1D,OAAO,IAAI,CAAC,SAAS,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,EAAE,mBAAmB,OAAO,CAAC,GAAG,EAAE;YACzC,OAAO,EAAE;gBACP,GAAG,EAAE,OAAO,CAAC,GAAG;gBAChB,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,WAAW,EAAE,OAAO,CAAC,WAAW;aACjC;SACF,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,6BAA6B,KAAK,CAAC,OAAO,EAAE;gBACnD,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,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const searchToolName = "llama_search";
|
|
3
|
+
export declare const searchToolDescription = "Search for issues across a project.\nSearches issue summaries, descriptions, and keys.\nUse filters to narrow results by type, priority, status, etc.";
|
|
4
|
+
export declare const searchToolSchema: z.ZodObject<{
|
|
5
|
+
orgSlug: z.ZodString;
|
|
6
|
+
query: z.ZodString;
|
|
7
|
+
type: z.ZodOptional<z.ZodEnum<["EPIC", "STORY", "TASK", "BUG", "SUBTASK"]>>;
|
|
8
|
+
priority: z.ZodOptional<z.ZodEnum<["CRITICAL", "HIGH", "MEDIUM", "LOW", "TRIVIAL"]>>;
|
|
9
|
+
status: z.ZodOptional<z.ZodString>;
|
|
10
|
+
assigneeId: z.ZodOptional<z.ZodString>;
|
|
11
|
+
sprintId: z.ZodOptional<z.ZodString>;
|
|
12
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
orgSlug: string;
|
|
15
|
+
query: string;
|
|
16
|
+
type?: "EPIC" | "STORY" | "TASK" | "BUG" | "SUBTASK" | undefined;
|
|
17
|
+
priority?: "CRITICAL" | "HIGH" | "MEDIUM" | "LOW" | "TRIVIAL" | undefined;
|
|
18
|
+
status?: string | undefined;
|
|
19
|
+
assigneeId?: string | undefined;
|
|
20
|
+
sprintId?: string | undefined;
|
|
21
|
+
labels?: string[] | undefined;
|
|
22
|
+
}, {
|
|
23
|
+
orgSlug: string;
|
|
24
|
+
query: string;
|
|
25
|
+
type?: "EPIC" | "STORY" | "TASK" | "BUG" | "SUBTASK" | undefined;
|
|
26
|
+
priority?: "CRITICAL" | "HIGH" | "MEDIUM" | "LOW" | "TRIVIAL" | undefined;
|
|
27
|
+
status?: string | undefined;
|
|
28
|
+
assigneeId?: string | undefined;
|
|
29
|
+
sprintId?: string | undefined;
|
|
30
|
+
labels?: string[] | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
export type SearchToolInput = z.infer<typeof searchToolSchema>;
|
|
33
|
+
export declare function executeSearch(input: SearchToolInput): Promise<string>;
|
|
34
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,cAAc,iBAAiB,CAAC;AAE7C,eAAO,MAAM,qBAAqB,0JAE4B,CAAC;AAE/D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe3B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/D,wBAAsB,aAAa,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAmD3E"}
|