@agllama/mcp 0.10.1 → 0.11.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/dist/api-client.d.ts +55 -0
- package/dist/api-client.d.ts.map +1 -1
- package/dist/api-client.js +26 -0
- package/dist/api-client.js.map +1 -1
- package/dist/hosted/__tests__/toolSurface.test.js +5 -0
- package/dist/hosted/__tests__/toolSurface.test.js.map +1 -1
- package/dist/index.js +0 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +38 -2
- package/dist/server.js.map +1 -1
- package/dist/tools/__tests__/context.corkboard.test.d.ts +2 -0
- package/dist/tools/__tests__/context.corkboard.test.d.ts.map +1 -0
- package/dist/tools/__tests__/context.corkboard.test.js +117 -0
- package/dist/tools/__tests__/context.corkboard.test.js.map +1 -0
- package/dist/tools/__tests__/corkboard.test.d.ts +2 -0
- package/dist/tools/__tests__/corkboard.test.d.ts.map +1 -0
- package/dist/tools/__tests__/corkboard.test.js +217 -0
- package/dist/tools/__tests__/corkboard.test.js.map +1 -0
- package/dist/tools/__tests__/notificationRules.test.d.ts +2 -0
- package/dist/tools/__tests__/notificationRules.test.d.ts.map +1 -0
- package/dist/tools/__tests__/notificationRules.test.js +159 -0
- package/dist/tools/__tests__/notificationRules.test.js.map +1 -0
- package/dist/tools/context.d.ts +3 -0
- package/dist/tools/context.d.ts.map +1 -1
- package/dist/tools/context.js +21 -0
- package/dist/tools/context.js.map +1 -1
- package/dist/tools/corkboard.d.ts +109 -0
- package/dist/tools/corkboard.d.ts.map +1 -0
- package/dist/tools/corkboard.js +223 -0
- package/dist/tools/corkboard.js.map +1 -0
- package/dist/tools/decomposition.d.ts +236 -0
- package/dist/tools/decomposition.d.ts.map +1 -0
- package/dist/tools/decomposition.js +285 -0
- package/dist/tools/decomposition.js.map +1 -0
- package/dist/tools/documents.d.ts +99 -0
- package/dist/tools/documents.d.ts.map +1 -0
- package/dist/tools/documents.js +254 -0
- package/dist/tools/documents.js.map +1 -0
- package/dist/tools/epicSignOff.d.ts +25 -0
- package/dist/tools/epicSignOff.d.ts.map +1 -0
- package/dist/tools/epicSignOff.js +89 -0
- package/dist/tools/epicSignOff.js.map +1 -0
- package/dist/tools/help.d.ts.map +1 -1
- package/dist/tools/help.js +42 -7
- package/dist/tools/help.js.map +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/integrations.d.ts +38 -0
- package/dist/tools/integrations.d.ts.map +1 -0
- package/dist/tools/integrations.js +153 -0
- package/dist/tools/integrations.js.map +1 -0
- package/dist/tools/notificationRules.d.ts +7 -4
- package/dist/tools/notificationRules.d.ts.map +1 -1
- package/dist/tools/notificationRules.js +80 -7
- package/dist/tools/notificationRules.js.map +1 -1
- package/dist/tools/planComments.d.ts.map +1 -0
- package/dist/tools/planComments.js.map +1 -0
- package/dist/tools/status.d.ts.map +1 -0
- package/dist/tools/status.js.map +1 -0
- package/dist/tools/workflows.d.ts +169 -0
- package/dist/tools/workflows.d.ts.map +1 -0
- package/dist/tools/workflows.js +436 -0
- package/dist/tools/workflows.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const analyzeFeatureToolName = "llama_analyze_feature";
|
|
3
|
+
export declare const analyzeFeatureToolDescription = "Start feature decomposition. Returns requirements questions (ask user FIRST), codebase search instructions, and technical questions. Do NOT assume user intent - clarify requirements before generating stories.";
|
|
4
|
+
export declare const analyzeFeatureToolSchema: z.ZodObject<{
|
|
5
|
+
orgSlug: z.ZodOptional<z.ZodString>;
|
|
6
|
+
projectKey: z.ZodOptional<z.ZodString>;
|
|
7
|
+
title: z.ZodString;
|
|
8
|
+
description: z.ZodString;
|
|
9
|
+
scope: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
|
|
10
|
+
gitRef: z.ZodOptional<z.ZodString>;
|
|
11
|
+
issueType: z.ZodDefault<z.ZodOptional<z.ZodEnum<["TASK", "STORY"]>>>;
|
|
12
|
+
userContext: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
description: string;
|
|
15
|
+
title: string;
|
|
16
|
+
issueType: "STORY" | "TASK";
|
|
17
|
+
scope?: string[] | undefined;
|
|
18
|
+
orgSlug?: string | undefined;
|
|
19
|
+
projectKey?: string | undefined;
|
|
20
|
+
gitRef?: string | undefined;
|
|
21
|
+
userContext?: string | undefined;
|
|
22
|
+
}, {
|
|
23
|
+
description: string;
|
|
24
|
+
title: string;
|
|
25
|
+
scope?: unknown;
|
|
26
|
+
orgSlug?: string | undefined;
|
|
27
|
+
projectKey?: string | undefined;
|
|
28
|
+
gitRef?: string | undefined;
|
|
29
|
+
issueType?: "STORY" | "TASK" | undefined;
|
|
30
|
+
userContext?: string | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
export type AnalyzeFeatureToolInput = z.infer<typeof analyzeFeatureToolSchema>;
|
|
33
|
+
export declare function executeAnalyzeFeature(input: AnalyzeFeatureToolInput): Promise<string>;
|
|
34
|
+
export declare const submitDecompositionToolName = "llama_submit_decomposition";
|
|
35
|
+
export declare const submitDecompositionToolDescription = "Submit codebase analysis and generated stories. Call after llama_analyze_feature. Stories include summary, estimate, codeContext, and optional blockedByIndex for dependencies.";
|
|
36
|
+
export declare const submitDecompositionToolSchema: z.ZodObject<{
|
|
37
|
+
decompositionId: z.ZodString;
|
|
38
|
+
analysisAnswers: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
39
|
+
stories: z.ZodArray<z.ZodObject<{
|
|
40
|
+
summary: z.ZodString;
|
|
41
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["STORY", "TASK", "BUG"]>>>;
|
|
42
|
+
estimate: z.ZodNumber;
|
|
43
|
+
description: z.ZodOptional<z.ZodString>;
|
|
44
|
+
codeContext: z.ZodOptional<z.ZodObject<{
|
|
45
|
+
relatedPaths: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
|
|
46
|
+
technicalNotes: z.ZodOptional<z.ZodString>;
|
|
47
|
+
patternRefs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
48
|
+
file: z.ZodString;
|
|
49
|
+
description: z.ZodString;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
file: string;
|
|
52
|
+
description: string;
|
|
53
|
+
}, {
|
|
54
|
+
file: string;
|
|
55
|
+
description: string;
|
|
56
|
+
}>, "many">>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
relatedPaths?: string[] | undefined;
|
|
59
|
+
technicalNotes?: string | undefined;
|
|
60
|
+
patternRefs?: {
|
|
61
|
+
file: string;
|
|
62
|
+
description: string;
|
|
63
|
+
}[] | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
relatedPaths?: unknown;
|
|
66
|
+
technicalNotes?: string | undefined;
|
|
67
|
+
patternRefs?: {
|
|
68
|
+
file: string;
|
|
69
|
+
description: string;
|
|
70
|
+
}[] | undefined;
|
|
71
|
+
}>>;
|
|
72
|
+
labels: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
|
|
73
|
+
blockedByIndex: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
74
|
+
}, "strip", z.ZodTypeAny, {
|
|
75
|
+
type: "STORY" | "TASK" | "BUG";
|
|
76
|
+
summary: string;
|
|
77
|
+
estimate: number;
|
|
78
|
+
labels?: string[] | undefined;
|
|
79
|
+
description?: string | undefined;
|
|
80
|
+
codeContext?: {
|
|
81
|
+
relatedPaths?: string[] | undefined;
|
|
82
|
+
technicalNotes?: string | undefined;
|
|
83
|
+
patternRefs?: {
|
|
84
|
+
file: string;
|
|
85
|
+
description: string;
|
|
86
|
+
}[] | undefined;
|
|
87
|
+
} | undefined;
|
|
88
|
+
blockedByIndex?: number[] | undefined;
|
|
89
|
+
}, {
|
|
90
|
+
summary: string;
|
|
91
|
+
estimate: number;
|
|
92
|
+
type?: "STORY" | "TASK" | "BUG" | undefined;
|
|
93
|
+
labels?: unknown;
|
|
94
|
+
description?: string | undefined;
|
|
95
|
+
codeContext?: {
|
|
96
|
+
relatedPaths?: unknown;
|
|
97
|
+
technicalNotes?: string | undefined;
|
|
98
|
+
patternRefs?: {
|
|
99
|
+
file: string;
|
|
100
|
+
description: string;
|
|
101
|
+
}[] | undefined;
|
|
102
|
+
} | undefined;
|
|
103
|
+
blockedByIndex?: number[] | undefined;
|
|
104
|
+
}>, "many">;
|
|
105
|
+
epicSummary: z.ZodOptional<z.ZodString>;
|
|
106
|
+
warnings: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
|
|
107
|
+
issueType: z.ZodEnum<["TASK", "STORY"]>;
|
|
108
|
+
destination: z.ZodEnum<["backlog", "new_sprint", "existing_sprint"]>;
|
|
109
|
+
newSprintName: z.ZodOptional<z.ZodString>;
|
|
110
|
+
sprintId: z.ZodOptional<z.ZodString>;
|
|
111
|
+
epicStrategy: z.ZodEnum<["new", "existing"]>;
|
|
112
|
+
existingEpicKey: z.ZodOptional<z.ZodString>;
|
|
113
|
+
}, "strip", z.ZodTypeAny, {
|
|
114
|
+
issueType: "STORY" | "TASK";
|
|
115
|
+
destination: "backlog" | "new_sprint" | "existing_sprint";
|
|
116
|
+
epicStrategy: "new" | "existing";
|
|
117
|
+
decompositionId: string;
|
|
118
|
+
analysisAnswers: Record<string, unknown>;
|
|
119
|
+
stories: {
|
|
120
|
+
type: "STORY" | "TASK" | "BUG";
|
|
121
|
+
summary: string;
|
|
122
|
+
estimate: number;
|
|
123
|
+
labels?: string[] | undefined;
|
|
124
|
+
description?: string | undefined;
|
|
125
|
+
codeContext?: {
|
|
126
|
+
relatedPaths?: string[] | undefined;
|
|
127
|
+
technicalNotes?: string | undefined;
|
|
128
|
+
patternRefs?: {
|
|
129
|
+
file: string;
|
|
130
|
+
description: string;
|
|
131
|
+
}[] | undefined;
|
|
132
|
+
} | undefined;
|
|
133
|
+
blockedByIndex?: number[] | undefined;
|
|
134
|
+
}[];
|
|
135
|
+
sprintId?: string | undefined;
|
|
136
|
+
newSprintName?: string | undefined;
|
|
137
|
+
existingEpicKey?: string | undefined;
|
|
138
|
+
epicSummary?: string | undefined;
|
|
139
|
+
warnings?: string[] | undefined;
|
|
140
|
+
}, {
|
|
141
|
+
issueType: "STORY" | "TASK";
|
|
142
|
+
destination: "backlog" | "new_sprint" | "existing_sprint";
|
|
143
|
+
epicStrategy: "new" | "existing";
|
|
144
|
+
decompositionId: string;
|
|
145
|
+
analysisAnswers: Record<string, unknown>;
|
|
146
|
+
stories: {
|
|
147
|
+
summary: string;
|
|
148
|
+
estimate: number;
|
|
149
|
+
type?: "STORY" | "TASK" | "BUG" | undefined;
|
|
150
|
+
labels?: unknown;
|
|
151
|
+
description?: string | undefined;
|
|
152
|
+
codeContext?: {
|
|
153
|
+
relatedPaths?: unknown;
|
|
154
|
+
technicalNotes?: string | undefined;
|
|
155
|
+
patternRefs?: {
|
|
156
|
+
file: string;
|
|
157
|
+
description: string;
|
|
158
|
+
}[] | undefined;
|
|
159
|
+
} | undefined;
|
|
160
|
+
blockedByIndex?: number[] | undefined;
|
|
161
|
+
}[];
|
|
162
|
+
sprintId?: string | undefined;
|
|
163
|
+
newSprintName?: string | undefined;
|
|
164
|
+
existingEpicKey?: string | undefined;
|
|
165
|
+
epicSummary?: string | undefined;
|
|
166
|
+
warnings?: unknown;
|
|
167
|
+
}>;
|
|
168
|
+
export type SubmitDecompositionToolInput = z.infer<typeof submitDecompositionToolSchema>;
|
|
169
|
+
export declare function executeSubmitDecomposition(input: SubmitDecompositionToolInput): Promise<string>;
|
|
170
|
+
export declare const applyDecompositionToolName = "llama_apply_decomposition";
|
|
171
|
+
export declare const applyDecompositionToolDescription = "Create issues from submitted decomposition. Uses preferences stored during submit (epic strategy, destination). Modifications can skip stories or override estimates.";
|
|
172
|
+
export declare const applyDecompositionToolSchema: z.ZodObject<{
|
|
173
|
+
decompositionId: z.ZodString;
|
|
174
|
+
sprintId: z.ZodOptional<z.ZodString>;
|
|
175
|
+
modifications: z.ZodOptional<z.ZodObject<{
|
|
176
|
+
skipIndexes: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
177
|
+
estimateOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
178
|
+
}, "strip", z.ZodTypeAny, {
|
|
179
|
+
skipIndexes?: number[] | undefined;
|
|
180
|
+
estimateOverrides?: Record<string, number> | undefined;
|
|
181
|
+
}, {
|
|
182
|
+
skipIndexes?: number[] | undefined;
|
|
183
|
+
estimateOverrides?: Record<string, number> | undefined;
|
|
184
|
+
}>>;
|
|
185
|
+
}, "strip", z.ZodTypeAny, {
|
|
186
|
+
decompositionId: string;
|
|
187
|
+
sprintId?: string | undefined;
|
|
188
|
+
modifications?: {
|
|
189
|
+
skipIndexes?: number[] | undefined;
|
|
190
|
+
estimateOverrides?: Record<string, number> | undefined;
|
|
191
|
+
} | undefined;
|
|
192
|
+
}, {
|
|
193
|
+
decompositionId: string;
|
|
194
|
+
sprintId?: string | undefined;
|
|
195
|
+
modifications?: {
|
|
196
|
+
skipIndexes?: number[] | undefined;
|
|
197
|
+
estimateOverrides?: Record<string, number> | undefined;
|
|
198
|
+
} | undefined;
|
|
199
|
+
}>;
|
|
200
|
+
export type ApplyDecompositionToolInput = z.infer<typeof applyDecompositionToolSchema>;
|
|
201
|
+
export declare function executeApplyDecomposition(input: ApplyDecompositionToolInput): Promise<string>;
|
|
202
|
+
export declare const getDecompositionToolName = "llama_get_decomposition";
|
|
203
|
+
export declare const getDecompositionToolDescription = "Get details of a feature decomposition by ID.";
|
|
204
|
+
export declare const getDecompositionToolSchema: z.ZodObject<{
|
|
205
|
+
orgSlug: z.ZodOptional<z.ZodString>;
|
|
206
|
+
projectKey: z.ZodOptional<z.ZodString>;
|
|
207
|
+
decompositionId: z.ZodString;
|
|
208
|
+
}, "strip", z.ZodTypeAny, {
|
|
209
|
+
decompositionId: string;
|
|
210
|
+
orgSlug?: string | undefined;
|
|
211
|
+
projectKey?: string | undefined;
|
|
212
|
+
}, {
|
|
213
|
+
decompositionId: string;
|
|
214
|
+
orgSlug?: string | undefined;
|
|
215
|
+
projectKey?: string | undefined;
|
|
216
|
+
}>;
|
|
217
|
+
export type GetDecompositionToolInput = z.infer<typeof getDecompositionToolSchema>;
|
|
218
|
+
export declare function executeGetDecomposition(input: GetDecompositionToolInput): Promise<string>;
|
|
219
|
+
export declare const cancelDecompositionToolName = "llama_cancel_decomposition";
|
|
220
|
+
export declare const cancelDecompositionToolDescription = "Cancel a decomposition that hasn't been applied yet.";
|
|
221
|
+
export declare const cancelDecompositionToolSchema: z.ZodObject<{
|
|
222
|
+
orgSlug: z.ZodOptional<z.ZodString>;
|
|
223
|
+
projectKey: z.ZodOptional<z.ZodString>;
|
|
224
|
+
decompositionId: z.ZodString;
|
|
225
|
+
}, "strip", z.ZodTypeAny, {
|
|
226
|
+
decompositionId: string;
|
|
227
|
+
orgSlug?: string | undefined;
|
|
228
|
+
projectKey?: string | undefined;
|
|
229
|
+
}, {
|
|
230
|
+
decompositionId: string;
|
|
231
|
+
orgSlug?: string | undefined;
|
|
232
|
+
projectKey?: string | undefined;
|
|
233
|
+
}>;
|
|
234
|
+
export type CancelDecompositionToolInput = z.infer<typeof cancelDecompositionToolSchema>;
|
|
235
|
+
export declare function executeCancelDecomposition(input: CancelDecompositionToolInput): Promise<string>;
|
|
236
|
+
//# sourceMappingURL=decomposition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decomposition.d.ts","sourceRoot":"","sources":["../../src/tools/decomposition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkDxB,eAAO,MAAM,sBAAsB,0BA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,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEnF,wBAAsB,uBAAuB,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC,CAiC/F;AAMD,eAAO,MAAM,2BAA2B,+BAA+B,CAAC;AAExE,eAAO,MAAM,kCAAkC,yDAAyD,CAAC;AAEzG,eAAO,MAAM,6BAA6B;;;;;;;;;;;;EAIxC,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEzF,wBAAsB,0BAA0B,CAAC,KAAK,EAAE,4BAA4B,GAAG,OAAO,CAAC,MAAM,CAAC,CAqBrG"}
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getApiClient, LlamaApiError } from '../api-client.js';
|
|
3
|
+
import { getSessionDefaults } from './session.js';
|
|
4
|
+
async function resolveOrgProject(inputOrgSlug, inputProjectKey) {
|
|
5
|
+
const defaults = await getSessionDefaults();
|
|
6
|
+
const orgSlug = inputOrgSlug ?? defaults?.orgSlug;
|
|
7
|
+
const projectKey = inputProjectKey ?? defaults?.projectKey;
|
|
8
|
+
if (!orgSlug) {
|
|
9
|
+
return { error: 'orgSlug is required. Either provide it or set session context with llama_set_context first.' };
|
|
10
|
+
}
|
|
11
|
+
if (!projectKey) {
|
|
12
|
+
return { error: 'projectKey is required. Either provide it or set session context with llama_set_context first.' };
|
|
13
|
+
}
|
|
14
|
+
return { orgSlug, projectKey };
|
|
15
|
+
}
|
|
16
|
+
function formatError(error, operation) {
|
|
17
|
+
if (error instanceof LlamaApiError) {
|
|
18
|
+
return JSON.stringify({
|
|
19
|
+
success: false,
|
|
20
|
+
error: `Failed to ${operation}: ${error.message}`,
|
|
21
|
+
statusCode: error.statusCode,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return JSON.stringify({
|
|
25
|
+
success: false,
|
|
26
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
// ============================================
|
|
30
|
+
// Analyze Feature (Create Decomposition)
|
|
31
|
+
// ============================================
|
|
32
|
+
export const analyzeFeatureToolName = 'llama_analyze_feature';
|
|
33
|
+
export const analyzeFeatureToolDescription = `Start feature decomposition. Returns requirements questions (ask user FIRST), codebase search instructions, and technical questions. Do NOT assume user intent - clarify requirements before generating stories.`;
|
|
34
|
+
export const analyzeFeatureToolSchema = z.object({
|
|
35
|
+
orgSlug: z.string().optional().describe('Org slug (session default)'),
|
|
36
|
+
projectKey: z.string().optional().describe('Project key (session default)'),
|
|
37
|
+
title: z.string().describe('Feature title (e.g., "User profile editing with avatar upload")'),
|
|
38
|
+
description: z.string().describe('Feature description with requirements'),
|
|
39
|
+
scope: z.preprocess((val) => (typeof val === 'string' ? JSON.parse(val) : val), z.array(z.string())).optional().describe('Limit codebase search to these paths (e.g., ["src/components/**", "src/api/**"])'),
|
|
40
|
+
gitRef: z.string().optional().describe('Git branch/commit reference for context'),
|
|
41
|
+
issueType: z.enum(['TASK', 'STORY']).optional().default('TASK').describe('Type for generated issues (default: TASK)'),
|
|
42
|
+
userContext: z.string().optional().describe('Your knowledge about this feature: known patterns, business rules, technical decisions, or relevant notes'),
|
|
43
|
+
});
|
|
44
|
+
export async function executeAnalyzeFeature(input) {
|
|
45
|
+
try {
|
|
46
|
+
const context = await resolveOrgProject(input.orgSlug, input.projectKey);
|
|
47
|
+
if ('error' in context) {
|
|
48
|
+
return JSON.stringify({ success: false, error: context.error });
|
|
49
|
+
}
|
|
50
|
+
const client = getApiClient();
|
|
51
|
+
const decomposition = await client.createDecomposition(context.orgSlug, context.projectKey, {
|
|
52
|
+
title: input.title,
|
|
53
|
+
description: input.description,
|
|
54
|
+
scope: input.scope,
|
|
55
|
+
gitRef: input.gitRef,
|
|
56
|
+
issueType: input.issueType,
|
|
57
|
+
userContext: input.userContext,
|
|
58
|
+
});
|
|
59
|
+
return JSON.stringify({
|
|
60
|
+
success: true,
|
|
61
|
+
message: `Decomposition started. IMPORTANT: Ask the user requirements questions FIRST (user_flow, default_behavior, not_allowed, edge_cases) before searching the codebase. Do NOT assume user intent.`,
|
|
62
|
+
decompositionId: decomposition.id,
|
|
63
|
+
issueType: decomposition.issueType,
|
|
64
|
+
analysisGuide: decomposition.analysisGuide,
|
|
65
|
+
userContext: decomposition.userContext || null,
|
|
66
|
+
// Available options for questionnaire
|
|
67
|
+
existingEpics: decomposition.availableEpics || [],
|
|
68
|
+
availableSprints: decomposition.availableSprints || [],
|
|
69
|
+
questionnaire: {
|
|
70
|
+
required: [
|
|
71
|
+
{ field: 'issueType', question: 'Should I create Tasks or Stories?', options: ['TASK', 'STORY'] },
|
|
72
|
+
{ field: 'destination', question: 'Where should they go?', options: ['backlog', 'new_sprint', 'existing_sprint'] },
|
|
73
|
+
{ field: 'epicStrategy', question: 'Create new epic or use existing?', options: ['new', 'existing'] },
|
|
74
|
+
],
|
|
75
|
+
conditional: [
|
|
76
|
+
{ field: 'newSprintName', when: 'destination === "new_sprint"', question: 'Sprint name?' },
|
|
77
|
+
{ field: 'sprintId', when: 'destination === "existing_sprint"', question: 'Which sprint?' },
|
|
78
|
+
{ field: 'existingEpicKey', when: 'epicStrategy === "existing"', question: 'Which epic?' },
|
|
79
|
+
],
|
|
80
|
+
},
|
|
81
|
+
nextSteps: [
|
|
82
|
+
'1. ASK THE USER the requirements questions (user_flow, default_behavior, not_allowed, edge_cases) - do NOT assume answers',
|
|
83
|
+
'2. Search the codebase using searchPaths and patternSearches',
|
|
84
|
+
'3. Answer technical analysisQuestions (existing_patterns, affected_areas, etc.) based on findings',
|
|
85
|
+
'4. ASK THE USER the questionnaire questions (issueType, destination, epicStrategy)',
|
|
86
|
+
'5. Call llama_submit_decomposition with stories AND all answers',
|
|
87
|
+
],
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
return formatError(error, 'analyze feature');
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
// ============================================
|
|
95
|
+
// Submit Decomposition
|
|
96
|
+
// ============================================
|
|
97
|
+
export const submitDecompositionToolName = 'llama_submit_decomposition';
|
|
98
|
+
export const submitDecompositionToolDescription = `Submit codebase analysis and generated stories. Call after llama_analyze_feature. Stories include summary, estimate, codeContext, and optional blockedByIndex for dependencies.`;
|
|
99
|
+
const codeContextSchema = z.object({
|
|
100
|
+
relatedPaths: z.preprocess((val) => (typeof val === 'string' ? JSON.parse(val) : val), z.array(z.string())).optional().describe('Files this story will touch'),
|
|
101
|
+
technicalNotes: z.string().optional().describe('Implementation guidance based on codebase patterns'),
|
|
102
|
+
patternRefs: z.array(z.object({
|
|
103
|
+
file: z.string(),
|
|
104
|
+
description: z.string(),
|
|
105
|
+
})).optional().describe('Similar code to reference'),
|
|
106
|
+
});
|
|
107
|
+
const storySchema = z.object({
|
|
108
|
+
summary: z.string().max(200).describe('Story summary'),
|
|
109
|
+
type: z.enum(['STORY', 'TASK', 'BUG']).optional().default('TASK'),
|
|
110
|
+
estimate: z.number().int().min(1).max(13).describe('Story points'),
|
|
111
|
+
description: z.string().optional().describe('Detailed description'),
|
|
112
|
+
codeContext: codeContextSchema.optional(),
|
|
113
|
+
labels: z.preprocess((val) => (typeof val === 'string' ? JSON.parse(val) : val), z.array(z.string())).optional().describe('Labels for the story'),
|
|
114
|
+
blockedByIndex: z.array(z.number().int().min(0)).optional().describe('Indexes of stories this one depends on'),
|
|
115
|
+
});
|
|
116
|
+
export const submitDecompositionToolSchema = z.object({
|
|
117
|
+
decompositionId: z.string().describe('ID from llama_analyze_feature response'),
|
|
118
|
+
analysisAnswers: z.record(z.unknown()).describe('Answers to analysisQuestions from the guide'),
|
|
119
|
+
stories: z.array(storySchema).min(1).max(15).describe('Generated stories (1-15)'),
|
|
120
|
+
epicSummary: z.string().max(200).optional().describe('Custom epic summary (defaults to feature title)'),
|
|
121
|
+
warnings: z.preprocess((val) => (typeof val === 'string' ? JSON.parse(val) : val), z.array(z.string())).optional().describe('Any warnings or concerns discovered'),
|
|
122
|
+
// Questionnaire answers
|
|
123
|
+
issueType: z.enum(['TASK', 'STORY']).describe('Issue type for children'),
|
|
124
|
+
destination: z.enum(['backlog', 'new_sprint', 'existing_sprint']).describe('Where to put issues'),
|
|
125
|
+
newSprintName: z.string().optional().describe('Required if destination is new_sprint'),
|
|
126
|
+
sprintId: z.string().optional().describe('Required if destination is existing_sprint'),
|
|
127
|
+
epicStrategy: z.enum(['new', 'existing']).describe('Create new epic or use existing'),
|
|
128
|
+
existingEpicKey: z.string().optional().describe('Required if epicStrategy is existing'),
|
|
129
|
+
});
|
|
130
|
+
export async function executeSubmitDecomposition(input) {
|
|
131
|
+
try {
|
|
132
|
+
const context = await resolveOrgProject();
|
|
133
|
+
if ('error' in context) {
|
|
134
|
+
return JSON.stringify({ success: false, error: context.error });
|
|
135
|
+
}
|
|
136
|
+
const client = getApiClient();
|
|
137
|
+
const decomposition = await client.submitDecompositionAnalysis(context.orgSlug, context.projectKey, input.decompositionId, {
|
|
138
|
+
analysisAnswers: input.analysisAnswers,
|
|
139
|
+
stories: input.stories.map((s) => ({
|
|
140
|
+
...s,
|
|
141
|
+
type: (s.type || input.issueType),
|
|
142
|
+
})),
|
|
143
|
+
epicSummary: input.epicSummary,
|
|
144
|
+
warnings: input.warnings,
|
|
145
|
+
// Pass preferences
|
|
146
|
+
issueType: input.issueType,
|
|
147
|
+
destination: input.destination,
|
|
148
|
+
newSprintName: input.newSprintName,
|
|
149
|
+
sprintId: input.sprintId,
|
|
150
|
+
epicStrategy: input.epicStrategy,
|
|
151
|
+
existingEpicKey: input.existingEpicKey,
|
|
152
|
+
});
|
|
153
|
+
const preview = decomposition.storiesPreview;
|
|
154
|
+
const totalPoints = preview?.stories.reduce((sum, s) => sum + s.estimate, 0) ?? 0;
|
|
155
|
+
return JSON.stringify({
|
|
156
|
+
success: true,
|
|
157
|
+
message: `Analysis submitted. Review the preview and call llama_apply_decomposition to create issues.`,
|
|
158
|
+
decompositionId: decomposition.id,
|
|
159
|
+
status: decomposition.status,
|
|
160
|
+
preview: {
|
|
161
|
+
epicSummary: preview?.epicSummary || decomposition.title,
|
|
162
|
+
storyCount: preview?.stories.length ?? 0,
|
|
163
|
+
totalPoints,
|
|
164
|
+
stories: preview?.stories.map((s, idx) => ({
|
|
165
|
+
index: idx,
|
|
166
|
+
summary: s.summary,
|
|
167
|
+
type: s.type,
|
|
168
|
+
estimate: s.estimate,
|
|
169
|
+
labels: s.labels,
|
|
170
|
+
blockedBy: s.blockedByIndex,
|
|
171
|
+
})),
|
|
172
|
+
warnings: preview?.warnings,
|
|
173
|
+
},
|
|
174
|
+
nextStep: 'Call llama_apply_decomposition to create the epic and issues',
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
catch (error) {
|
|
178
|
+
return formatError(error, 'submit decomposition');
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
// ============================================
|
|
182
|
+
// Apply Decomposition
|
|
183
|
+
// ============================================
|
|
184
|
+
export const applyDecompositionToolName = 'llama_apply_decomposition';
|
|
185
|
+
export const applyDecompositionToolDescription = `Create issues from submitted decomposition. Uses preferences stored during submit (epic strategy, destination). Modifications can skip stories or override estimates.`;
|
|
186
|
+
export const applyDecompositionToolSchema = z.object({
|
|
187
|
+
decompositionId: z.string().describe('ID from previous decomposition steps'),
|
|
188
|
+
sprintId: z.string().optional().describe('Add stories to this sprint (otherwise backlog)'),
|
|
189
|
+
modifications: z.object({
|
|
190
|
+
skipIndexes: z.array(z.number().int().min(0)).optional().describe('Story indexes to skip'),
|
|
191
|
+
estimateOverrides: z.record(z.number().int().min(1).max(13)).optional().describe('Override estimates by index'),
|
|
192
|
+
}).optional(),
|
|
193
|
+
});
|
|
194
|
+
export async function executeApplyDecomposition(input) {
|
|
195
|
+
try {
|
|
196
|
+
const context = await resolveOrgProject();
|
|
197
|
+
if ('error' in context) {
|
|
198
|
+
return JSON.stringify({ success: false, error: context.error });
|
|
199
|
+
}
|
|
200
|
+
const client = getApiClient();
|
|
201
|
+
const result = await client.applyDecomposition(context.orgSlug, context.projectKey, input.decompositionId, {
|
|
202
|
+
sprintId: input.sprintId,
|
|
203
|
+
modifications: input.modifications,
|
|
204
|
+
});
|
|
205
|
+
return JSON.stringify({
|
|
206
|
+
success: true,
|
|
207
|
+
message: `Created ${result.issueKeys.length} issues${result.epicKey ? ` under epic ${result.epicKey}` : ''}`,
|
|
208
|
+
epicKey: result.epicKey || null,
|
|
209
|
+
issueKeys: result.issueKeys,
|
|
210
|
+
sprintId: result.sprintId || null,
|
|
211
|
+
sprintName: result.sprintName || null,
|
|
212
|
+
location: result.sprintId ? `Added to sprint: ${result.sprintName}` : 'Added to backlog',
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
catch (error) {
|
|
216
|
+
return formatError(error, 'apply decomposition');
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
// ============================================
|
|
220
|
+
// Get Decomposition
|
|
221
|
+
// ============================================
|
|
222
|
+
export const getDecompositionToolName = 'llama_get_decomposition';
|
|
223
|
+
export const getDecompositionToolDescription = `Get details of a feature decomposition by ID.`;
|
|
224
|
+
export const getDecompositionToolSchema = z.object({
|
|
225
|
+
orgSlug: z.string().optional().describe('Org slug (session default)'),
|
|
226
|
+
projectKey: z.string().optional().describe('Project key (session default)'),
|
|
227
|
+
decompositionId: z.string().describe('Decomposition ID'),
|
|
228
|
+
});
|
|
229
|
+
export async function executeGetDecomposition(input) {
|
|
230
|
+
try {
|
|
231
|
+
const context = await resolveOrgProject(input.orgSlug, input.projectKey);
|
|
232
|
+
if ('error' in context) {
|
|
233
|
+
return JSON.stringify({ success: false, error: context.error });
|
|
234
|
+
}
|
|
235
|
+
const client = getApiClient();
|
|
236
|
+
const decomposition = await client.getDecomposition(context.orgSlug, context.projectKey, input.decompositionId);
|
|
237
|
+
return JSON.stringify({
|
|
238
|
+
success: true,
|
|
239
|
+
decomposition: {
|
|
240
|
+
id: decomposition.id,
|
|
241
|
+
title: decomposition.title,
|
|
242
|
+
description: decomposition.description,
|
|
243
|
+
status: decomposition.status,
|
|
244
|
+
issueType: decomposition.issueType,
|
|
245
|
+
scope: decomposition.scope,
|
|
246
|
+
analysisGuide: decomposition.analysisGuide,
|
|
247
|
+
storiesPreview: decomposition.storiesPreview,
|
|
248
|
+
epicId: decomposition.epicId,
|
|
249
|
+
epicKey: decomposition.epicKey,
|
|
250
|
+
createdAt: decomposition.createdAt,
|
|
251
|
+
},
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
catch (error) {
|
|
255
|
+
return formatError(error, 'get decomposition');
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
// ============================================
|
|
259
|
+
// Cancel Decomposition
|
|
260
|
+
// ============================================
|
|
261
|
+
export const cancelDecompositionToolName = 'llama_cancel_decomposition';
|
|
262
|
+
export const cancelDecompositionToolDescription = `Cancel a decomposition that hasn't been applied yet.`;
|
|
263
|
+
export const cancelDecompositionToolSchema = z.object({
|
|
264
|
+
orgSlug: z.string().optional().describe('Org slug (session default)'),
|
|
265
|
+
projectKey: z.string().optional().describe('Project key (session default)'),
|
|
266
|
+
decompositionId: z.string().describe('Decomposition ID to cancel'),
|
|
267
|
+
});
|
|
268
|
+
export async function executeCancelDecomposition(input) {
|
|
269
|
+
try {
|
|
270
|
+
const context = await resolveOrgProject(input.orgSlug, input.projectKey);
|
|
271
|
+
if ('error' in context) {
|
|
272
|
+
return JSON.stringify({ success: false, error: context.error });
|
|
273
|
+
}
|
|
274
|
+
const client = getApiClient();
|
|
275
|
+
await client.cancelDecomposition(context.orgSlug, context.projectKey, input.decompositionId);
|
|
276
|
+
return JSON.stringify({
|
|
277
|
+
success: true,
|
|
278
|
+
message: `Cancelled decomposition ${input.decompositionId}`,
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
catch (error) {
|
|
282
|
+
return formatError(error, 'cancel decomposition');
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
//# sourceMappingURL=decomposition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decomposition.js","sourceRoot":"","sources":["../../src/tools/decomposition.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;AAYlD,KAAK,UAAU,iBAAiB,CAC9B,YAAqB,EACrB,eAAwB;IAExB,MAAM,QAAQ,GAAG,MAAM,kBAAkB,EAAE,CAAC;IAC5C,MAAM,OAAO,GAAG,YAAY,IAAI,QAAQ,EAAE,OAAO,CAAC;IAClD,MAAM,UAAU,GAAG,eAAe,IAAI,QAAQ,EAAE,UAAU,CAAC;IAE3D,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,EAAE,KAAK,EAAE,6FAA6F,EAAE,CAAC;IAClH,CAAC;IACD,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,EAAE,KAAK,EAAE,gGAAgG,EAAE,CAAC;IACrH,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AACjC,CAAC;AAED,SAAS,WAAW,CAAC,KAAc,EAAE,SAAiB;IACpD,IAAI,KAAK,YAAY,aAAa,EAAE,CAAC;QACnC,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,aAAa,SAAS,KAAK,KAAK,CAAC,OAAO,EAAE;YACjD,UAAU,EAAE,KAAK,CAAC,UAAU;SAC7B,CAAC,CAAC;IACL,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,CAAC;QACpB,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;KAChE,CA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C;YACpB,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,2BAA2B,KAAK,CAAC,eAAe,EAAE;SAC5D,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,WAAW,CAAC,KAAK,EAAE,sBAAsB,CAAC,CAAC;IACpD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const listDocsToolName = "llama_list_docs";
|
|
3
|
+
export declare const listDocsToolDescription = "List wiki documents in an organization or project.\nWiki documents are HTML pages used for process documentation and sprint templates. Types: STATIC (wiki pages) or SPRINT_TEMPLATE (auto-generated per sprint).\nFilter by type, status (DRAFT, PUBLISHED, ARCHIVED), or search by title.\nNOTE: If the user is looking for feature specs, PRDs, or roadmaps, use llama_list_plans instead.";
|
|
4
|
+
export declare const listDocsToolSchema: z.ZodObject<{
|
|
5
|
+
orgSlug: z.ZodString;
|
|
6
|
+
projectKey: z.ZodOptional<z.ZodString>;
|
|
7
|
+
type: z.ZodOptional<z.ZodEnum<["STATIC", "SPRINT_TEMPLATE"]>>;
|
|
8
|
+
status: z.ZodOptional<z.ZodEnum<["DRAFT", "PUBLISHED", "ARCHIVED"]>>;
|
|
9
|
+
search: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
orgSlug: string;
|
|
12
|
+
type?: "STATIC" | "SPRINT_TEMPLATE" | undefined;
|
|
13
|
+
status?: "DRAFT" | "PUBLISHED" | "ARCHIVED" | undefined;
|
|
14
|
+
search?: string | undefined;
|
|
15
|
+
projectKey?: string | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
orgSlug: string;
|
|
18
|
+
type?: "STATIC" | "SPRINT_TEMPLATE" | undefined;
|
|
19
|
+
status?: "DRAFT" | "PUBLISHED" | "ARCHIVED" | undefined;
|
|
20
|
+
search?: string | undefined;
|
|
21
|
+
projectKey?: string | undefined;
|
|
22
|
+
}>;
|
|
23
|
+
export type ListDocsToolInput = z.infer<typeof listDocsToolSchema>;
|
|
24
|
+
export declare function executeListDocs(input: ListDocsToolInput): Promise<string>;
|
|
25
|
+
export declare const getDocToolName = "llama_get_doc";
|
|
26
|
+
export declare const getDocToolDescription = "Get full wiki document content by ID.\nReturns document metadata and HTML content. Wiki documents are for process docs and sprint templates, not feature specs (use llama_get_plan for those).";
|
|
27
|
+
export declare const getDocToolSchema: z.ZodObject<{
|
|
28
|
+
documentId: z.ZodString;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
documentId: string;
|
|
31
|
+
}, {
|
|
32
|
+
documentId: string;
|
|
33
|
+
}>;
|
|
34
|
+
export type GetDocToolInput = z.infer<typeof getDocToolSchema>;
|
|
35
|
+
export declare function executeGetDoc(input: GetDocToolInput): Promise<string>;
|
|
36
|
+
export declare const createDocToolName = "llama_create_doc";
|
|
37
|
+
export declare const createDocToolDescription = "Create a new wiki document in an organization or project.\nWiki documents have a unique slug (used in URLs) and can be STATIC (wiki page) or SPRINT_TEMPLATE (auto-generated per sprint).\nProvide projectKey to create a project-level doc, omit for org-level.\nNOTE: To create feature specs, PRDs, or roadmaps, use llama_create_plan instead.";
|
|
38
|
+
export declare const createDocToolSchema: z.ZodObject<{
|
|
39
|
+
orgSlug: z.ZodString;
|
|
40
|
+
projectKey: z.ZodOptional<z.ZodString>;
|
|
41
|
+
title: z.ZodString;
|
|
42
|
+
slug: z.ZodString;
|
|
43
|
+
type: z.ZodEnum<["STATIC", "SPRINT_TEMPLATE"]>;
|
|
44
|
+
description: z.ZodOptional<z.ZodString>;
|
|
45
|
+
htmlContent: z.ZodOptional<z.ZodString>;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
type: "STATIC" | "SPRINT_TEMPLATE";
|
|
48
|
+
orgSlug: string;
|
|
49
|
+
slug: string;
|
|
50
|
+
title: string;
|
|
51
|
+
projectKey?: string | undefined;
|
|
52
|
+
description?: string | undefined;
|
|
53
|
+
htmlContent?: string | undefined;
|
|
54
|
+
}, {
|
|
55
|
+
type: "STATIC" | "SPRINT_TEMPLATE";
|
|
56
|
+
orgSlug: string;
|
|
57
|
+
slug: string;
|
|
58
|
+
title: string;
|
|
59
|
+
projectKey?: string | undefined;
|
|
60
|
+
description?: string | undefined;
|
|
61
|
+
htmlContent?: string | undefined;
|
|
62
|
+
}>;
|
|
63
|
+
export type CreateDocToolInput = z.infer<typeof createDocToolSchema>;
|
|
64
|
+
export declare function executeCreateDoc(input: CreateDocToolInput): Promise<string>;
|
|
65
|
+
export declare const updateDocToolName = "llama_update_doc";
|
|
66
|
+
export declare const updateDocToolDescription = "Update a wiki document's content or metadata.\nOnly include the fields you want to change.\nCan update title, content, type, or status (DRAFT/PUBLISHED/ARCHIVED).";
|
|
67
|
+
export declare const updateDocToolSchema: z.ZodObject<{
|
|
68
|
+
documentId: z.ZodString;
|
|
69
|
+
title: z.ZodOptional<z.ZodString>;
|
|
70
|
+
htmlContent: z.ZodOptional<z.ZodString>;
|
|
71
|
+
type: z.ZodOptional<z.ZodEnum<["STATIC", "SPRINT_TEMPLATE"]>>;
|
|
72
|
+
status: z.ZodOptional<z.ZodEnum<["DRAFT", "PUBLISHED", "ARCHIVED"]>>;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
documentId: string;
|
|
75
|
+
type?: "STATIC" | "SPRINT_TEMPLATE" | undefined;
|
|
76
|
+
status?: "DRAFT" | "PUBLISHED" | "ARCHIVED" | undefined;
|
|
77
|
+
title?: string | undefined;
|
|
78
|
+
htmlContent?: string | undefined;
|
|
79
|
+
}, {
|
|
80
|
+
documentId: string;
|
|
81
|
+
type?: "STATIC" | "SPRINT_TEMPLATE" | undefined;
|
|
82
|
+
status?: "DRAFT" | "PUBLISHED" | "ARCHIVED" | undefined;
|
|
83
|
+
title?: string | undefined;
|
|
84
|
+
htmlContent?: string | undefined;
|
|
85
|
+
}>;
|
|
86
|
+
export type UpdateDocToolInput = z.infer<typeof updateDocToolSchema>;
|
|
87
|
+
export declare function executeUpdateDoc(input: UpdateDocToolInput): Promise<string>;
|
|
88
|
+
export declare const deleteDocToolName = "llama_delete_doc";
|
|
89
|
+
export declare const deleteDocToolDescription = "Delete a wiki document permanently.\nUse with caution - this action cannot be undone.";
|
|
90
|
+
export declare const deleteDocToolSchema: z.ZodObject<{
|
|
91
|
+
documentId: z.ZodString;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
documentId: string;
|
|
94
|
+
}, {
|
|
95
|
+
documentId: string;
|
|
96
|
+
}>;
|
|
97
|
+
export type DeleteDocToolInput = z.infer<typeof deleteDocToolSchema>;
|
|
98
|
+
export declare function executeDeleteDoc(input: DeleteDocToolInput): Promise<string>;
|
|
99
|
+
//# sourceMappingURL=documents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../src/tools/documents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,gBAAgB,oBAAoB,CAAC;AAElD,eAAO,MAAM,uBAAuB,kYAG6D,CAAC;AAElG,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;EAM7B,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,CAkD/E;AAMD,eAAO,MAAM,cAAc,kBAAkB,CAAC;AAE9C,eAAO,MAAM,qBAAqB,mMACsH,CAAC;AAEzJ,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,GA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