@sebastienheyd/clickup-mcp 1.7.1 → 1.7.2
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/shared/utils.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export declare function getSpaceDetails(spaceId: string): Promise<any>;
|
|
|
42
42
|
* Get or create a task search index with specified filters
|
|
43
43
|
* Caches promises to prevent race conditions on concurrent calls
|
|
44
44
|
*/
|
|
45
|
-
export declare function getTaskSearchIndex(space_ids?: string[], list_ids?: string[], assignees?: string[]): Promise<Fuse<any> | null>;
|
|
45
|
+
export declare function getTaskSearchIndex(space_ids?: string[], list_ids?: string[], assignees?: string[], include_closed?: boolean, archived?: boolean): Promise<Fuse<any> | null>;
|
|
46
46
|
/**
|
|
47
47
|
* Generate a ClickUp task URL from a task ID
|
|
48
48
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/shared/utils.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,SAAS,CAAC;AAI3B;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAG7C;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiB3E;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQ/D;AAKD;;;GAGG;AACH,wBAAsB,cAAc,iBA6BnC;AAGD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CA8C/D;AAED;;GAEG;A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,CAAC,EACpB,KAAK,EAAE,MAAM,EAAE,GACd,OAAO,CAAC,CAAC,EAAE,CAAC,CA8Dd"}
|
package/dist/shared/utils.js
CHANGED
|
@@ -216,12 +216,14 @@ const taskIndices = new Map();
|
|
|
216
216
|
* Get or create a task search index with specified filters
|
|
217
217
|
* Caches promises to prevent race conditions on concurrent calls
|
|
218
218
|
*/
|
|
219
|
-
async function getTaskSearchIndex(space_ids, list_ids, assignees) {
|
|
219
|
+
async function getTaskSearchIndex(space_ids, list_ids, assignees, include_closed, archived) {
|
|
220
220
|
// Create cache key from sorted filter arrays
|
|
221
221
|
const key = JSON.stringify({
|
|
222
222
|
space_ids: space_ids?.sort(),
|
|
223
223
|
list_ids: list_ids?.sort(),
|
|
224
|
-
assignees: assignees?.sort()
|
|
224
|
+
assignees: assignees?.sort(),
|
|
225
|
+
include_closed,
|
|
226
|
+
archived
|
|
225
227
|
});
|
|
226
228
|
// Check for existing valid index promise
|
|
227
229
|
const cachedPromise = taskIndices.get(key);
|
|
@@ -231,7 +233,7 @@ async function getTaskSearchIndex(space_ids, list_ids, assignees) {
|
|
|
231
233
|
// Create the fetch promise
|
|
232
234
|
const fetchPromise = (async () => {
|
|
233
235
|
console.error(`Refreshing task index for filters: ${key}`);
|
|
234
|
-
const tasks = await fetchTasks(space_ids, list_ids, assignees);
|
|
236
|
+
const tasks = await fetchTasks(space_ids, list_ids, assignees, include_closed, archived);
|
|
235
237
|
const index = createFuseIndex(tasks);
|
|
236
238
|
console.error(`Task index created with ${tasks.length} tasks`);
|
|
237
239
|
return index;
|
|
@@ -247,8 +249,14 @@ async function getTaskSearchIndex(space_ids, list_ids, assignees) {
|
|
|
247
249
|
/**
|
|
248
250
|
* Fetch tasks using team endpoint with dynamic filters
|
|
249
251
|
*/
|
|
250
|
-
async function fetchTasks(space_ids, list_ids, assignees) {
|
|
252
|
+
async function fetchTasks(space_ids, list_ids, assignees, include_closed, archived) {
|
|
251
253
|
const queryParams = ['order_by=updated', 'subtasks=true'];
|
|
254
|
+
if (include_closed) {
|
|
255
|
+
queryParams.push('include_closed=true');
|
|
256
|
+
}
|
|
257
|
+
if (archived) {
|
|
258
|
+
queryParams.push('archived=true');
|
|
259
|
+
}
|
|
252
260
|
// Add filter parameters
|
|
253
261
|
if (space_ids?.length) {
|
|
254
262
|
space_ids.forEach(id => queryParams.push(`space_ids[]=${id}`));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-tools.d.ts","sourceRoot":"","sources":["../../src/tools/search-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAC;AAQlE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"search-tools.d.ts","sourceRoot":"","sources":["../../src/tools/search-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAC;AAQlE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,QA4NnE"}
|
|
@@ -46,12 +46,20 @@ function registerSearchTools(server, userData) {
|
|
|
46
46
|
.boolean()
|
|
47
47
|
.optional()
|
|
48
48
|
.describe(`Filter for tasks assigned to the current user (${userData.user.username} (${userData.user.id}))`),
|
|
49
|
+
include_closed: zod_1.z
|
|
50
|
+
.boolean()
|
|
51
|
+
.optional()
|
|
52
|
+
.describe("Include closed tasks in results (default: false)"),
|
|
53
|
+
archived: zod_1.z
|
|
54
|
+
.boolean()
|
|
55
|
+
.optional()
|
|
56
|
+
.describe("Include archived tasks in results (default: false). Note: only returns individually archived tasks, not tasks in archived spaces/folders/lists."),
|
|
49
57
|
}, {
|
|
50
58
|
readOnlyHint: true
|
|
51
|
-
}, async ({ terms, list_ids, space_ids, only_todo, status, assigned_to_me }) => {
|
|
59
|
+
}, async ({ terms, list_ids, space_ids, only_todo, status, assigned_to_me, include_closed, archived }) => {
|
|
52
60
|
// Get current user ID if filtering by assigned_to_me
|
|
53
61
|
const assignees = assigned_to_me ? [userData.user.id] : [];
|
|
54
|
-
const searchIndex = await (0, utils_1.getTaskSearchIndex)(space_ids, list_ids, assignees);
|
|
62
|
+
const searchIndex = await (0, utils_1.getTaskSearchIndex)(space_ids, list_ids, assignees, include_closed, archived);
|
|
55
63
|
if (!searchIndex) {
|
|
56
64
|
return {
|
|
57
65
|
content: [
|
package/package.json
CHANGED