@reaudit/mcp-server 1.0.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 +33 -0
- package/README.md +399 -0
- package/dist/auth/oauth-client.d.ts +43 -0
- package/dist/auth/oauth-client.d.ts.map +1 -0
- package/dist/auth/oauth-client.js +340 -0
- package/dist/auth/oauth-client.js.map +1 -0
- package/dist/auth/token-store.d.ts +41 -0
- package/dist/auth/token-store.d.ts.map +1 -0
- package/dist/auth/token-store.js +176 -0
- package/dist/auth/token-store.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +480 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/api-client.d.ts +970 -0
- package/dist/lib/api-client.d.ts.map +1 -0
- package/dist/lib/api-client.js +441 -0
- package/dist/lib/api-client.js.map +1 -0
- package/dist/lib/confirmation.d.ts +92 -0
- package/dist/lib/confirmation.d.ts.map +1 -0
- package/dist/lib/confirmation.js +224 -0
- package/dist/lib/confirmation.js.map +1 -0
- package/dist/lib/error-handler.d.ts +57 -0
- package/dist/lib/error-handler.d.ts.map +1 -0
- package/dist/lib/error-handler.js +235 -0
- package/dist/lib/error-handler.js.map +1 -0
- package/dist/lib/offline-mode.d.ts +107 -0
- package/dist/lib/offline-mode.d.ts.map +1 -0
- package/dist/lib/offline-mode.js +356 -0
- package/dist/lib/offline-mode.js.map +1 -0
- package/dist/lib/progress-tracker.d.ts +87 -0
- package/dist/lib/progress-tracker.d.ts.map +1 -0
- package/dist/lib/progress-tracker.js +238 -0
- package/dist/lib/progress-tracker.js.map +1 -0
- package/dist/prompts/index.d.ts +24 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +305 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/resources/index.d.ts +44 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +125 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/tools/account.d.ts +25 -0
- package/dist/tools/account.d.ts.map +1 -0
- package/dist/tools/account.js +69 -0
- package/dist/tools/account.js.map +1 -0
- package/dist/tools/action-grids.d.ts +414 -0
- package/dist/tools/action-grids.d.ts.map +1 -0
- package/dist/tools/action-grids.js +271 -0
- package/dist/tools/action-grids.js.map +1 -0
- package/dist/tools/analytics-query.d.ts +126 -0
- package/dist/tools/analytics-query.d.ts.map +1 -0
- package/dist/tools/analytics-query.js +106 -0
- package/dist/tools/analytics-query.js.map +1 -0
- package/dist/tools/analytics.d.ts +57 -0
- package/dist/tools/analytics.d.ts.map +1 -0
- package/dist/tools/analytics.js +122 -0
- package/dist/tools/analytics.js.map +1 -0
- package/dist/tools/audits.d.ts +123 -0
- package/dist/tools/audits.d.ts.map +1 -0
- package/dist/tools/audits.js +226 -0
- package/dist/tools/audits.js.map +1 -0
- package/dist/tools/calendar.d.ts +57 -0
- package/dist/tools/calendar.d.ts.map +1 -0
- package/dist/tools/calendar.js +109 -0
- package/dist/tools/calendar.js.map +1 -0
- package/dist/tools/content-generation.d.ts +211 -0
- package/dist/tools/content-generation.d.ts.map +1 -0
- package/dist/tools/content-generation.js +363 -0
- package/dist/tools/content-generation.js.map +1 -0
- package/dist/tools/content.d.ts +92 -0
- package/dist/tools/content.d.ts.map +1 -0
- package/dist/tools/content.js +130 -0
- package/dist/tools/content.js.map +1 -0
- package/dist/tools/indexing.d.ts +132 -0
- package/dist/tools/indexing.d.ts.map +1 -0
- package/dist/tools/indexing.js +190 -0
- package/dist/tools/indexing.js.map +1 -0
- package/dist/tools/optimization.d.ts +70 -0
- package/dist/tools/optimization.d.ts.map +1 -0
- package/dist/tools/optimization.js +106 -0
- package/dist/tools/optimization.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 +113 -0
- package/dist/tools/projects.js.map +1 -0
- package/dist/tools/prompts.d.ts +306 -0
- package/dist/tools/prompts.d.ts.map +1 -0
- package/dist/tools/prompts.js +378 -0
- package/dist/tools/prompts.js.map +1 -0
- package/dist/tools/publishing.d.ts +135 -0
- package/dist/tools/publishing.d.ts.map +1 -0
- package/dist/tools/publishing.js +209 -0
- package/dist/tools/publishing.js.map +1 -0
- package/dist/tools/reports.d.ts +252 -0
- package/dist/tools/reports.d.ts.map +1 -0
- package/dist/tools/reports.js +183 -0
- package/dist/tools/reports.js.map +1 -0
- package/dist/tools/social.d.ts +224 -0
- package/dist/tools/social.d.ts.map +1 -0
- package/dist/tools/social.js +291 -0
- package/dist/tools/social.js.map +1 -0
- package/dist/tools/sources.d.ts +221 -0
- package/dist/tools/sources.d.ts.map +1 -0
- package/dist/tools/sources.js +308 -0
- package/dist/tools/sources.js.map +1 -0
- package/dist/tools/strategy.d.ts +345 -0
- package/dist/tools/strategy.d.ts.map +1 -0
- package/dist/tools/strategy.js +392 -0
- package/dist/tools/strategy.js.map +1 -0
- package/dist/tools/usage.d.ts +101 -0
- package/dist/tools/usage.d.ts.map +1 -0
- package/dist/tools/usage.js +184 -0
- package/dist/tools/usage.js.map +1 -0
- package/dist/tools/visibility.d.ts +95 -0
- package/dist/tools/visibility.d.ts.map +1 -0
- package/dist/tools/visibility.js +163 -0
- package/dist/tools/visibility.js.map +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Action Grid Tools
|
|
3
|
+
*
|
|
4
|
+
* MCP tools for managing optimization task boards.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
import { ReauditAPIClient } from '../lib/api-client.js';
|
|
8
|
+
export declare const listActionGridsSchema: z.ZodObject<{
|
|
9
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
10
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
projectId?: string | undefined;
|
|
13
|
+
limit?: number | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
projectId?: string | undefined;
|
|
16
|
+
limit?: number | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const createActionGridSchema: z.ZodObject<{
|
|
19
|
+
projectId: z.ZodString;
|
|
20
|
+
name: z.ZodString;
|
|
21
|
+
description: z.ZodOptional<z.ZodString>;
|
|
22
|
+
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
23
|
+
title: z.ZodString;
|
|
24
|
+
description: z.ZodOptional<z.ZodString>;
|
|
25
|
+
status: z.ZodOptional<z.ZodEnum<["todo", "in_progress", "done", "skipped"]>>;
|
|
26
|
+
priority: z.ZodOptional<z.ZodEnum<["critical", "high", "medium", "low"]>>;
|
|
27
|
+
category: z.ZodOptional<z.ZodString>;
|
|
28
|
+
assignee: z.ZodOptional<z.ZodString>;
|
|
29
|
+
dueDate: z.ZodOptional<z.ZodString>;
|
|
30
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
title: string;
|
|
33
|
+
status?: "in_progress" | "skipped" | "todo" | "done" | undefined;
|
|
34
|
+
category?: string | undefined;
|
|
35
|
+
description?: string | undefined;
|
|
36
|
+
notes?: string | undefined;
|
|
37
|
+
priority?: "medium" | "critical" | "high" | "low" | undefined;
|
|
38
|
+
assignee?: string | undefined;
|
|
39
|
+
dueDate?: string | undefined;
|
|
40
|
+
}, {
|
|
41
|
+
title: string;
|
|
42
|
+
status?: "in_progress" | "skipped" | "todo" | "done" | undefined;
|
|
43
|
+
category?: string | undefined;
|
|
44
|
+
description?: string | undefined;
|
|
45
|
+
notes?: string | undefined;
|
|
46
|
+
priority?: "medium" | "critical" | "high" | "low" | undefined;
|
|
47
|
+
assignee?: string | undefined;
|
|
48
|
+
dueDate?: string | undefined;
|
|
49
|
+
}>, "many">>;
|
|
50
|
+
categories: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
51
|
+
source: z.ZodOptional<z.ZodEnum<["manual", "audit", "strategy", "ai_suggestion"]>>;
|
|
52
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
projectId: string;
|
|
55
|
+
name: string;
|
|
56
|
+
description?: string | undefined;
|
|
57
|
+
items?: {
|
|
58
|
+
title: string;
|
|
59
|
+
status?: "in_progress" | "skipped" | "todo" | "done" | undefined;
|
|
60
|
+
category?: string | undefined;
|
|
61
|
+
description?: string | undefined;
|
|
62
|
+
notes?: string | undefined;
|
|
63
|
+
priority?: "medium" | "critical" | "high" | "low" | undefined;
|
|
64
|
+
assignee?: string | undefined;
|
|
65
|
+
dueDate?: string | undefined;
|
|
66
|
+
}[] | undefined;
|
|
67
|
+
tags?: string[] | undefined;
|
|
68
|
+
categories?: string[] | undefined;
|
|
69
|
+
source?: "manual" | "audit" | "strategy" | "ai_suggestion" | undefined;
|
|
70
|
+
}, {
|
|
71
|
+
projectId: string;
|
|
72
|
+
name: string;
|
|
73
|
+
description?: string | undefined;
|
|
74
|
+
items?: {
|
|
75
|
+
title: string;
|
|
76
|
+
status?: "in_progress" | "skipped" | "todo" | "done" | undefined;
|
|
77
|
+
category?: string | undefined;
|
|
78
|
+
description?: string | undefined;
|
|
79
|
+
notes?: string | undefined;
|
|
80
|
+
priority?: "medium" | "critical" | "high" | "low" | undefined;
|
|
81
|
+
assignee?: string | undefined;
|
|
82
|
+
dueDate?: string | undefined;
|
|
83
|
+
}[] | undefined;
|
|
84
|
+
tags?: string[] | undefined;
|
|
85
|
+
categories?: string[] | undefined;
|
|
86
|
+
source?: "manual" | "audit" | "strategy" | "ai_suggestion" | undefined;
|
|
87
|
+
}>;
|
|
88
|
+
export declare const getActionGridSchema: z.ZodObject<{
|
|
89
|
+
id: z.ZodString;
|
|
90
|
+
}, "strip", z.ZodTypeAny, {
|
|
91
|
+
id: string;
|
|
92
|
+
}, {
|
|
93
|
+
id: string;
|
|
94
|
+
}>;
|
|
95
|
+
export declare const deleteActionGridSchema: z.ZodObject<{
|
|
96
|
+
id: z.ZodString;
|
|
97
|
+
}, "strip", z.ZodTypeAny, {
|
|
98
|
+
id: string;
|
|
99
|
+
}, {
|
|
100
|
+
id: string;
|
|
101
|
+
}>;
|
|
102
|
+
export declare const addGridItemsSchema: z.ZodObject<{
|
|
103
|
+
gridId: z.ZodString;
|
|
104
|
+
items: z.ZodArray<z.ZodObject<{
|
|
105
|
+
title: z.ZodString;
|
|
106
|
+
description: z.ZodOptional<z.ZodString>;
|
|
107
|
+
status: z.ZodOptional<z.ZodEnum<["todo", "in_progress", "done", "skipped"]>>;
|
|
108
|
+
priority: z.ZodOptional<z.ZodEnum<["critical", "high", "medium", "low"]>>;
|
|
109
|
+
category: z.ZodOptional<z.ZodString>;
|
|
110
|
+
}, "strip", z.ZodTypeAny, {
|
|
111
|
+
title: string;
|
|
112
|
+
status?: "in_progress" | "skipped" | "todo" | "done" | undefined;
|
|
113
|
+
category?: string | undefined;
|
|
114
|
+
description?: string | undefined;
|
|
115
|
+
priority?: "medium" | "critical" | "high" | "low" | undefined;
|
|
116
|
+
}, {
|
|
117
|
+
title: string;
|
|
118
|
+
status?: "in_progress" | "skipped" | "todo" | "done" | undefined;
|
|
119
|
+
category?: string | undefined;
|
|
120
|
+
description?: string | undefined;
|
|
121
|
+
priority?: "medium" | "critical" | "high" | "low" | undefined;
|
|
122
|
+
}>, "many">;
|
|
123
|
+
}, "strip", z.ZodTypeAny, {
|
|
124
|
+
items: {
|
|
125
|
+
title: string;
|
|
126
|
+
status?: "in_progress" | "skipped" | "todo" | "done" | undefined;
|
|
127
|
+
category?: string | undefined;
|
|
128
|
+
description?: string | undefined;
|
|
129
|
+
priority?: "medium" | "critical" | "high" | "low" | undefined;
|
|
130
|
+
}[];
|
|
131
|
+
gridId: string;
|
|
132
|
+
}, {
|
|
133
|
+
items: {
|
|
134
|
+
title: string;
|
|
135
|
+
status?: "in_progress" | "skipped" | "todo" | "done" | undefined;
|
|
136
|
+
category?: string | undefined;
|
|
137
|
+
description?: string | undefined;
|
|
138
|
+
priority?: "medium" | "critical" | "high" | "low" | undefined;
|
|
139
|
+
}[];
|
|
140
|
+
gridId: string;
|
|
141
|
+
}>;
|
|
142
|
+
export declare const updateGridItemSchema: z.ZodObject<{
|
|
143
|
+
gridId: z.ZodString;
|
|
144
|
+
itemId: z.ZodString;
|
|
145
|
+
status: z.ZodOptional<z.ZodEnum<["todo", "in_progress", "done", "skipped"]>>;
|
|
146
|
+
priority: z.ZodOptional<z.ZodEnum<["critical", "high", "medium", "low"]>>;
|
|
147
|
+
assignee: z.ZodOptional<z.ZodString>;
|
|
148
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
149
|
+
}, "strip", z.ZodTypeAny, {
|
|
150
|
+
itemId: string;
|
|
151
|
+
gridId: string;
|
|
152
|
+
status?: "in_progress" | "skipped" | "todo" | "done" | undefined;
|
|
153
|
+
notes?: string | undefined;
|
|
154
|
+
priority?: "medium" | "critical" | "high" | "low" | undefined;
|
|
155
|
+
assignee?: string | undefined;
|
|
156
|
+
}, {
|
|
157
|
+
itemId: string;
|
|
158
|
+
gridId: string;
|
|
159
|
+
status?: "in_progress" | "skipped" | "todo" | "done" | undefined;
|
|
160
|
+
notes?: string | undefined;
|
|
161
|
+
priority?: "medium" | "critical" | "high" | "low" | undefined;
|
|
162
|
+
assignee?: string | undefined;
|
|
163
|
+
}>;
|
|
164
|
+
/**
|
|
165
|
+
* List action grids
|
|
166
|
+
*/
|
|
167
|
+
export declare function listActionGrids(client: ReauditAPIClient, args: z.infer<typeof listActionGridsSchema>): Promise<string>;
|
|
168
|
+
/**
|
|
169
|
+
* Create an action grid
|
|
170
|
+
*/
|
|
171
|
+
export declare function createActionGrid(client: ReauditAPIClient, args: z.infer<typeof createActionGridSchema>): Promise<string>;
|
|
172
|
+
/**
|
|
173
|
+
* Get action grid details
|
|
174
|
+
*/
|
|
175
|
+
export declare function getActionGrid(client: ReauditAPIClient, args: z.infer<typeof getActionGridSchema>): Promise<string>;
|
|
176
|
+
/**
|
|
177
|
+
* Delete an action grid
|
|
178
|
+
*/
|
|
179
|
+
export declare function deleteActionGrid(client: ReauditAPIClient, args: z.infer<typeof deleteActionGridSchema>): Promise<string>;
|
|
180
|
+
/**
|
|
181
|
+
* Add items to an action grid
|
|
182
|
+
*/
|
|
183
|
+
export declare function addGridItems(client: ReauditAPIClient, args: z.infer<typeof addGridItemsSchema>): Promise<string>;
|
|
184
|
+
/**
|
|
185
|
+
* Update an action grid item
|
|
186
|
+
*/
|
|
187
|
+
export declare function updateGridItem(client: ReauditAPIClient, args: z.infer<typeof updateGridItemSchema>): Promise<string>;
|
|
188
|
+
/**
|
|
189
|
+
* Tool definitions for MCP
|
|
190
|
+
*/
|
|
191
|
+
export declare const actionGridTools: ({
|
|
192
|
+
name: string;
|
|
193
|
+
description: string;
|
|
194
|
+
inputSchema: {
|
|
195
|
+
type: "object";
|
|
196
|
+
properties: {
|
|
197
|
+
projectId: {
|
|
198
|
+
type: string;
|
|
199
|
+
description: string;
|
|
200
|
+
};
|
|
201
|
+
limit: {
|
|
202
|
+
type: string;
|
|
203
|
+
description: string;
|
|
204
|
+
};
|
|
205
|
+
name?: undefined;
|
|
206
|
+
description?: undefined;
|
|
207
|
+
items?: undefined;
|
|
208
|
+
categories?: undefined;
|
|
209
|
+
source?: undefined;
|
|
210
|
+
tags?: undefined;
|
|
211
|
+
id?: undefined;
|
|
212
|
+
gridId?: undefined;
|
|
213
|
+
itemId?: undefined;
|
|
214
|
+
status?: undefined;
|
|
215
|
+
priority?: undefined;
|
|
216
|
+
assignee?: undefined;
|
|
217
|
+
notes?: undefined;
|
|
218
|
+
};
|
|
219
|
+
required?: undefined;
|
|
220
|
+
};
|
|
221
|
+
} | {
|
|
222
|
+
name: string;
|
|
223
|
+
description: string;
|
|
224
|
+
inputSchema: {
|
|
225
|
+
type: "object";
|
|
226
|
+
properties: {
|
|
227
|
+
projectId: {
|
|
228
|
+
type: string;
|
|
229
|
+
description: string;
|
|
230
|
+
};
|
|
231
|
+
name: {
|
|
232
|
+
type: string;
|
|
233
|
+
description: string;
|
|
234
|
+
};
|
|
235
|
+
description: {
|
|
236
|
+
type: string;
|
|
237
|
+
description: string;
|
|
238
|
+
};
|
|
239
|
+
items: {
|
|
240
|
+
type: string;
|
|
241
|
+
items: {
|
|
242
|
+
type: string;
|
|
243
|
+
properties: {
|
|
244
|
+
title: {
|
|
245
|
+
type: string;
|
|
246
|
+
};
|
|
247
|
+
description: {
|
|
248
|
+
type: string;
|
|
249
|
+
};
|
|
250
|
+
status: {
|
|
251
|
+
type: string;
|
|
252
|
+
enum: string[];
|
|
253
|
+
};
|
|
254
|
+
priority: {
|
|
255
|
+
type: string;
|
|
256
|
+
enum: string[];
|
|
257
|
+
};
|
|
258
|
+
category: {
|
|
259
|
+
type: string;
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
required: string[];
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
categories: {
|
|
266
|
+
type: string;
|
|
267
|
+
items: {
|
|
268
|
+
type: string;
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
source: {
|
|
272
|
+
type: string;
|
|
273
|
+
enum: string[];
|
|
274
|
+
};
|
|
275
|
+
tags: {
|
|
276
|
+
type: string;
|
|
277
|
+
items: {
|
|
278
|
+
type: string;
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
limit?: undefined;
|
|
282
|
+
id?: undefined;
|
|
283
|
+
gridId?: undefined;
|
|
284
|
+
itemId?: undefined;
|
|
285
|
+
status?: undefined;
|
|
286
|
+
priority?: undefined;
|
|
287
|
+
assignee?: undefined;
|
|
288
|
+
notes?: undefined;
|
|
289
|
+
};
|
|
290
|
+
required: string[];
|
|
291
|
+
};
|
|
292
|
+
} | {
|
|
293
|
+
name: string;
|
|
294
|
+
description: string;
|
|
295
|
+
inputSchema: {
|
|
296
|
+
type: "object";
|
|
297
|
+
properties: {
|
|
298
|
+
id: {
|
|
299
|
+
type: string;
|
|
300
|
+
description: string;
|
|
301
|
+
};
|
|
302
|
+
projectId?: undefined;
|
|
303
|
+
limit?: undefined;
|
|
304
|
+
name?: undefined;
|
|
305
|
+
description?: undefined;
|
|
306
|
+
items?: undefined;
|
|
307
|
+
categories?: undefined;
|
|
308
|
+
source?: undefined;
|
|
309
|
+
tags?: undefined;
|
|
310
|
+
gridId?: undefined;
|
|
311
|
+
itemId?: undefined;
|
|
312
|
+
status?: undefined;
|
|
313
|
+
priority?: undefined;
|
|
314
|
+
assignee?: undefined;
|
|
315
|
+
notes?: undefined;
|
|
316
|
+
};
|
|
317
|
+
required: string[];
|
|
318
|
+
};
|
|
319
|
+
} | {
|
|
320
|
+
name: string;
|
|
321
|
+
description: string;
|
|
322
|
+
inputSchema: {
|
|
323
|
+
type: "object";
|
|
324
|
+
properties: {
|
|
325
|
+
gridId: {
|
|
326
|
+
type: string;
|
|
327
|
+
description: string;
|
|
328
|
+
};
|
|
329
|
+
items: {
|
|
330
|
+
type: string;
|
|
331
|
+
items: {
|
|
332
|
+
type: string;
|
|
333
|
+
properties: {
|
|
334
|
+
title: {
|
|
335
|
+
type: string;
|
|
336
|
+
};
|
|
337
|
+
description: {
|
|
338
|
+
type: string;
|
|
339
|
+
};
|
|
340
|
+
status: {
|
|
341
|
+
type: string;
|
|
342
|
+
enum: string[];
|
|
343
|
+
};
|
|
344
|
+
priority: {
|
|
345
|
+
type: string;
|
|
346
|
+
enum: string[];
|
|
347
|
+
};
|
|
348
|
+
category: {
|
|
349
|
+
type: string;
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
required: string[];
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
projectId?: undefined;
|
|
356
|
+
limit?: undefined;
|
|
357
|
+
name?: undefined;
|
|
358
|
+
description?: undefined;
|
|
359
|
+
categories?: undefined;
|
|
360
|
+
source?: undefined;
|
|
361
|
+
tags?: undefined;
|
|
362
|
+
id?: undefined;
|
|
363
|
+
itemId?: undefined;
|
|
364
|
+
status?: undefined;
|
|
365
|
+
priority?: undefined;
|
|
366
|
+
assignee?: undefined;
|
|
367
|
+
notes?: undefined;
|
|
368
|
+
};
|
|
369
|
+
required: string[];
|
|
370
|
+
};
|
|
371
|
+
} | {
|
|
372
|
+
name: string;
|
|
373
|
+
description: string;
|
|
374
|
+
inputSchema: {
|
|
375
|
+
type: "object";
|
|
376
|
+
properties: {
|
|
377
|
+
gridId: {
|
|
378
|
+
type: string;
|
|
379
|
+
description: string;
|
|
380
|
+
};
|
|
381
|
+
itemId: {
|
|
382
|
+
type: string;
|
|
383
|
+
description: string;
|
|
384
|
+
};
|
|
385
|
+
status: {
|
|
386
|
+
type: string;
|
|
387
|
+
enum: string[];
|
|
388
|
+
};
|
|
389
|
+
priority: {
|
|
390
|
+
type: string;
|
|
391
|
+
enum: string[];
|
|
392
|
+
};
|
|
393
|
+
assignee: {
|
|
394
|
+
type: string;
|
|
395
|
+
description: string;
|
|
396
|
+
};
|
|
397
|
+
notes: {
|
|
398
|
+
type: string;
|
|
399
|
+
description: string;
|
|
400
|
+
};
|
|
401
|
+
projectId?: undefined;
|
|
402
|
+
limit?: undefined;
|
|
403
|
+
name?: undefined;
|
|
404
|
+
description?: undefined;
|
|
405
|
+
items?: undefined;
|
|
406
|
+
categories?: undefined;
|
|
407
|
+
source?: undefined;
|
|
408
|
+
tags?: undefined;
|
|
409
|
+
id?: undefined;
|
|
410
|
+
};
|
|
411
|
+
required: string[];
|
|
412
|
+
};
|
|
413
|
+
})[];
|
|
414
|
+
//# sourceMappingURL=action-grids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-grids.d.ts","sourceRoot":"","sources":["../../src/tools/action-grids.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,eAAO,MAAM,qBAAqB;;;;;;;;;EAGhC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBjC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;EAAmD,CAAC;AACpF,eAAO,MAAM,sBAAsB;;;;;;EAAmD,CAAC;AAEvF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS7B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;EAO/B,CAAC;AAEH;;GAEG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,GAC1C,OAAO,CAAC,MAAM,CAAC,CAsBjB;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,GAC3C,OAAO,CAAC,MAAM,CAAC,CAYjB;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,GACxC,OAAO,CAAC,MAAM,CAAC,CAkCjB;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,GAC3C,OAAO,CAAC,MAAM,CAAC,CAGjB;AAED;;GAEG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,GACvC,OAAO,CAAC,MAAM,CAAC,CAGjB;AAED;;GAEG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,GACzC,OAAO,CAAC,MAAM,CAAC,CAUjB;AAED;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyG3B,CAAC"}
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Action Grid Tools
|
|
4
|
+
*
|
|
5
|
+
* MCP tools for managing optimization task boards.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.actionGridTools = exports.updateGridItemSchema = exports.addGridItemsSchema = exports.deleteActionGridSchema = exports.getActionGridSchema = exports.createActionGridSchema = exports.listActionGridsSchema = void 0;
|
|
9
|
+
exports.listActionGrids = listActionGrids;
|
|
10
|
+
exports.createActionGrid = createActionGrid;
|
|
11
|
+
exports.getActionGrid = getActionGrid;
|
|
12
|
+
exports.deleteActionGrid = deleteActionGrid;
|
|
13
|
+
exports.addGridItems = addGridItems;
|
|
14
|
+
exports.updateGridItem = updateGridItem;
|
|
15
|
+
const zod_1 = require("zod");
|
|
16
|
+
exports.listActionGridsSchema = zod_1.z.object({
|
|
17
|
+
projectId: zod_1.z.string().optional().describe('Filter by project ID'),
|
|
18
|
+
limit: zod_1.z.number().optional().describe('Max grids to return (default: 20, max: 50)'),
|
|
19
|
+
});
|
|
20
|
+
exports.createActionGridSchema = zod_1.z.object({
|
|
21
|
+
projectId: zod_1.z.string().describe('Project ID'),
|
|
22
|
+
name: zod_1.z.string().describe('Grid name'),
|
|
23
|
+
description: zod_1.z.string().optional().describe('Grid description'),
|
|
24
|
+
items: zod_1.z.array(zod_1.z.object({
|
|
25
|
+
title: zod_1.z.string(),
|
|
26
|
+
description: zod_1.z.string().optional(),
|
|
27
|
+
status: zod_1.z.enum(['todo', 'in_progress', 'done', 'skipped']).optional(),
|
|
28
|
+
priority: zod_1.z.enum(['critical', 'high', 'medium', 'low']).optional(),
|
|
29
|
+
category: zod_1.z.string().optional(),
|
|
30
|
+
assignee: zod_1.z.string().optional(),
|
|
31
|
+
dueDate: zod_1.z.string().optional(),
|
|
32
|
+
notes: zod_1.z.string().optional(),
|
|
33
|
+
})).optional().describe('Initial items'),
|
|
34
|
+
categories: zod_1.z.array(zod_1.z.string()).optional().describe('Category labels'),
|
|
35
|
+
source: zod_1.z.enum(['manual', 'audit', 'strategy', 'ai_suggestion']).optional().describe('Source type'),
|
|
36
|
+
tags: zod_1.z.array(zod_1.z.string()).optional().describe('Tags'),
|
|
37
|
+
});
|
|
38
|
+
exports.getActionGridSchema = zod_1.z.object({ id: zod_1.z.string().describe('Grid ID') });
|
|
39
|
+
exports.deleteActionGridSchema = zod_1.z.object({ id: zod_1.z.string().describe('Grid ID') });
|
|
40
|
+
exports.addGridItemsSchema = zod_1.z.object({
|
|
41
|
+
gridId: zod_1.z.string().describe('Grid ID'),
|
|
42
|
+
items: zod_1.z.array(zod_1.z.object({
|
|
43
|
+
title: zod_1.z.string(),
|
|
44
|
+
description: zod_1.z.string().optional(),
|
|
45
|
+
status: zod_1.z.enum(['todo', 'in_progress', 'done', 'skipped']).optional(),
|
|
46
|
+
priority: zod_1.z.enum(['critical', 'high', 'medium', 'low']).optional(),
|
|
47
|
+
category: zod_1.z.string().optional(),
|
|
48
|
+
})).describe('Items to add'),
|
|
49
|
+
});
|
|
50
|
+
exports.updateGridItemSchema = zod_1.z.object({
|
|
51
|
+
gridId: zod_1.z.string().describe('Grid ID'),
|
|
52
|
+
itemId: zod_1.z.string().describe('Item ID'),
|
|
53
|
+
status: zod_1.z.enum(['todo', 'in_progress', 'done', 'skipped']).optional().describe('New status'),
|
|
54
|
+
priority: zod_1.z.enum(['critical', 'high', 'medium', 'low']).optional().describe('New priority'),
|
|
55
|
+
assignee: zod_1.z.string().optional().describe('Assignee'),
|
|
56
|
+
notes: zod_1.z.string().optional().describe('Notes'),
|
|
57
|
+
});
|
|
58
|
+
/**
|
|
59
|
+
* List action grids
|
|
60
|
+
*/
|
|
61
|
+
async function listActionGrids(client, args) {
|
|
62
|
+
const result = await client.listActionGrids(args.projectId, args.limit);
|
|
63
|
+
let response = `## Action Grids\n`;
|
|
64
|
+
response += `Total: ${result.count}\n\n`;
|
|
65
|
+
if (result.grids.length === 0) {
|
|
66
|
+
response += 'No action grids found. Create one with create_action_grid.\n';
|
|
67
|
+
return response;
|
|
68
|
+
}
|
|
69
|
+
for (const grid of result.grids) {
|
|
70
|
+
response += `### ${grid.name}\n`;
|
|
71
|
+
if (grid.description)
|
|
72
|
+
response += `${grid.description}\n`;
|
|
73
|
+
response += `- ID: ${grid.id}\n`;
|
|
74
|
+
response += `- Items: ${grid.stats.total} total (${grid.stats.todo} todo, ${grid.stats.inProgress} in progress, ${grid.stats.done} done)\n`;
|
|
75
|
+
response += `- Categories: ${grid.categories?.join(', ') || 'none'}\n`;
|
|
76
|
+
if (grid.tags?.length)
|
|
77
|
+
response += `- Tags: ${grid.tags.join(', ')}\n`;
|
|
78
|
+
response += '\n';
|
|
79
|
+
}
|
|
80
|
+
return response;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Create an action grid
|
|
84
|
+
*/
|
|
85
|
+
async function createActionGrid(client, args) {
|
|
86
|
+
const result = await client.createActionGrid({
|
|
87
|
+
projectId: args.projectId,
|
|
88
|
+
name: args.name,
|
|
89
|
+
description: args.description,
|
|
90
|
+
items: args.items,
|
|
91
|
+
categories: args.categories,
|
|
92
|
+
source: args.source,
|
|
93
|
+
tags: args.tags,
|
|
94
|
+
});
|
|
95
|
+
return `## Action Grid Created\n\n- ID: ${result.id}\n- Name: ${result.name}\n- Items: ${result.itemCount}\n- Categories: ${result.categories?.join(', ')}\n`;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Get action grid details
|
|
99
|
+
*/
|
|
100
|
+
async function getActionGrid(client, args) {
|
|
101
|
+
const grid = await client.getActionGrid(args.id);
|
|
102
|
+
let response = `## ${grid.name}\n`;
|
|
103
|
+
if (grid.description)
|
|
104
|
+
response += `${grid.description}\n\n`;
|
|
105
|
+
response += `### Progress\n`;
|
|
106
|
+
response += `- Total: ${grid.stats.total}\n`;
|
|
107
|
+
response += `- Todo: ${grid.stats.todo} | In Progress: ${grid.stats.inProgress} | Done: ${grid.stats.done} | Skipped: ${grid.stats.skipped}\n\n`;
|
|
108
|
+
if (grid.items && grid.items.length > 0) {
|
|
109
|
+
// Group by category
|
|
110
|
+
const byCategory = {};
|
|
111
|
+
for (const item of grid.items) {
|
|
112
|
+
const cat = item.category || 'General';
|
|
113
|
+
if (!byCategory[cat])
|
|
114
|
+
byCategory[cat] = [];
|
|
115
|
+
byCategory[cat].push(item);
|
|
116
|
+
}
|
|
117
|
+
for (const [category, items] of Object.entries(byCategory)) {
|
|
118
|
+
response += `### ${category}\n`;
|
|
119
|
+
for (const item of items) {
|
|
120
|
+
const statusIcon = item.status === 'done' ? '✅' : item.status === 'in_progress' ? '🔄' : item.status === 'skipped' ? '⏭️' : '⬜';
|
|
121
|
+
const priorityTag = item.priority === 'critical' ? '🔴' : item.priority === 'high' ? '🟠' : item.priority === 'medium' ? '🟡' : '🟢';
|
|
122
|
+
response += `${statusIcon} ${priorityTag} **${item.title}** (ID: ${item.id})\n`;
|
|
123
|
+
if (item.description)
|
|
124
|
+
response += ` ${item.description}\n`;
|
|
125
|
+
if (item.assignee)
|
|
126
|
+
response += ` Assignee: ${item.assignee}\n`;
|
|
127
|
+
if (item.notes)
|
|
128
|
+
response += ` Notes: ${item.notes}\n`;
|
|
129
|
+
}
|
|
130
|
+
response += '\n';
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return response;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Delete an action grid
|
|
137
|
+
*/
|
|
138
|
+
async function deleteActionGrid(client, args) {
|
|
139
|
+
await client.deleteActionGrid(args.id);
|
|
140
|
+
return `Action grid ${args.id} has been deleted.`;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Add items to an action grid
|
|
144
|
+
*/
|
|
145
|
+
async function addGridItems(client, args) {
|
|
146
|
+
const result = await client.addActionGridItems(args.gridId, args.items);
|
|
147
|
+
return `Added ${result.addedCount} items to grid. Total items: ${result.totalItems}\nCategories: ${result.categories?.join(', ')}`;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Update an action grid item
|
|
151
|
+
*/
|
|
152
|
+
async function updateGridItem(client, args) {
|
|
153
|
+
const result = await client.updateActionGridItem(args.gridId, args.itemId, {
|
|
154
|
+
status: args.status,
|
|
155
|
+
priority: args.priority,
|
|
156
|
+
assignee: args.assignee,
|
|
157
|
+
notes: args.notes,
|
|
158
|
+
});
|
|
159
|
+
const item = result.item;
|
|
160
|
+
return `Updated item "${item.title}" — Status: ${item.status}, Priority: ${item.priority}`;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Tool definitions for MCP
|
|
164
|
+
*/
|
|
165
|
+
exports.actionGridTools = [
|
|
166
|
+
{
|
|
167
|
+
name: 'list_action_grids',
|
|
168
|
+
description: 'List optimization task boards (action grids) for a project.',
|
|
169
|
+
inputSchema: {
|
|
170
|
+
type: 'object',
|
|
171
|
+
properties: {
|
|
172
|
+
projectId: { type: 'string', description: 'Filter by project' },
|
|
173
|
+
limit: { type: 'number', description: 'Max grids (default: 20, max: 50)' },
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: 'create_action_grid',
|
|
179
|
+
description: 'Create an optimization task board with categorized items. Use for SEO tasks, content optimization, or any workflow.',
|
|
180
|
+
inputSchema: {
|
|
181
|
+
type: 'object',
|
|
182
|
+
properties: {
|
|
183
|
+
projectId: { type: 'string', description: 'Project ID' },
|
|
184
|
+
name: { type: 'string', description: 'Grid name' },
|
|
185
|
+
description: { type: 'string', description: 'Grid description' },
|
|
186
|
+
items: {
|
|
187
|
+
type: 'array',
|
|
188
|
+
items: {
|
|
189
|
+
type: 'object',
|
|
190
|
+
properties: {
|
|
191
|
+
title: { type: 'string' },
|
|
192
|
+
description: { type: 'string' },
|
|
193
|
+
status: { type: 'string', enum: ['todo', 'in_progress', 'done', 'skipped'] },
|
|
194
|
+
priority: { type: 'string', enum: ['critical', 'high', 'medium', 'low'] },
|
|
195
|
+
category: { type: 'string' },
|
|
196
|
+
},
|
|
197
|
+
required: ['title'],
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
categories: { type: 'array', items: { type: 'string' } },
|
|
201
|
+
source: { type: 'string', enum: ['manual', 'audit', 'strategy', 'ai_suggestion'] },
|
|
202
|
+
tags: { type: 'array', items: { type: 'string' } },
|
|
203
|
+
},
|
|
204
|
+
required: ['projectId', 'name'],
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
name: 'get_action_grid',
|
|
209
|
+
description: 'Get an action grid with all items, grouped by category and showing progress.',
|
|
210
|
+
inputSchema: {
|
|
211
|
+
type: 'object',
|
|
212
|
+
properties: {
|
|
213
|
+
id: { type: 'string', description: 'Grid ID' },
|
|
214
|
+
},
|
|
215
|
+
required: ['id'],
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
name: 'delete_action_grid',
|
|
220
|
+
description: 'Delete an action grid.',
|
|
221
|
+
inputSchema: {
|
|
222
|
+
type: 'object',
|
|
223
|
+
properties: {
|
|
224
|
+
id: { type: 'string', description: 'Grid ID' },
|
|
225
|
+
},
|
|
226
|
+
required: ['id'],
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: 'add_grid_items',
|
|
231
|
+
description: 'Add new items to an existing action grid.',
|
|
232
|
+
inputSchema: {
|
|
233
|
+
type: 'object',
|
|
234
|
+
properties: {
|
|
235
|
+
gridId: { type: 'string', description: 'Grid ID' },
|
|
236
|
+
items: {
|
|
237
|
+
type: 'array',
|
|
238
|
+
items: {
|
|
239
|
+
type: 'object',
|
|
240
|
+
properties: {
|
|
241
|
+
title: { type: 'string' },
|
|
242
|
+
description: { type: 'string' },
|
|
243
|
+
status: { type: 'string', enum: ['todo', 'in_progress', 'done', 'skipped'] },
|
|
244
|
+
priority: { type: 'string', enum: ['critical', 'high', 'medium', 'low'] },
|
|
245
|
+
category: { type: 'string' },
|
|
246
|
+
},
|
|
247
|
+
required: ['title'],
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
required: ['gridId', 'items'],
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
name: 'update_grid_item',
|
|
256
|
+
description: 'Update status, priority, assignee, or notes of an action grid item.',
|
|
257
|
+
inputSchema: {
|
|
258
|
+
type: 'object',
|
|
259
|
+
properties: {
|
|
260
|
+
gridId: { type: 'string', description: 'Grid ID' },
|
|
261
|
+
itemId: { type: 'string', description: 'Item ID' },
|
|
262
|
+
status: { type: 'string', enum: ['todo', 'in_progress', 'done', 'skipped'] },
|
|
263
|
+
priority: { type: 'string', enum: ['critical', 'high', 'medium', 'low'] },
|
|
264
|
+
assignee: { type: 'string', description: 'Assignee name' },
|
|
265
|
+
notes: { type: 'string', description: 'Notes' },
|
|
266
|
+
},
|
|
267
|
+
required: ['gridId', 'itemId'],
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
];
|
|
271
|
+
//# sourceMappingURL=action-grids.js.map
|