@hauptsache.net/clickup-mcp 1.2.0 → 1.3.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 +18 -24
- package/dist/cli.js +7 -0
- package/dist/clickup-text.d.ts +1 -1
- package/dist/clickup-text.d.ts.map +1 -1
- package/dist/clickup-text.js +17 -13
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -9
- package/dist/shared/utils.d.ts +16 -26
- package/dist/shared/utils.d.ts.map +1 -1
- package/dist/shared/utils.js +247 -61
- package/dist/tools/doc-tools.d.ts +4 -0
- package/dist/tools/doc-tools.d.ts.map +1 -0
- package/dist/tools/doc-tools.js +485 -0
- package/dist/tools/list-tools.d.ts.map +1 -1
- package/dist/tools/search-tools.d.ts.map +1 -1
- package/dist/tools/search-tools.js +7 -29
- package/dist/tools/space-tools.d.ts.map +1 -1
- package/dist/tools/space-tools.js +94 -98
- package/dist/tools/task-tools.js +1 -1
- package/package.json +3 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Marco Pfeiffer
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,23 +1,10 @@
|
|
|
1
1
|
# ClickUp MCP for AI Assistants
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Model Context Protocol (MCP) server enabling AI assistants to interact with ClickUp workspaces. Get complete task context with comments and images, search across projects, create and update tasks, collaborate through comments, and track time - all through natural language.
|
|
4
4
|
|
|
5
5
|
> **⚠️ Experimental Software Notice**
|
|
6
6
|
> This MCP is experimental and under active development. While implemented with great care to prevent data loss through append-only description updates and other safety measures, it cannot be guaranteed to be completely safe. Please use with caution, especially in production environments. Always test in a non-critical workspace first. 🧪
|
|
7
7
|
|
|
8
|
-
## Two Powerful Use Cases
|
|
9
|
-
|
|
10
|
-
### 🛠️ **For Developers & Agentic Coding**
|
|
11
|
-
Originally built to supercharge coding sessions by providing complete task context to AI coding assistants:
|
|
12
|
-
|
|
13
|
-
- **Instant Requirements**: *"Get task CU-abc123"* → AI gets full requirements, acceptance criteria, comments, and images
|
|
14
|
-
- **Complete Context**: Pass entire task histories to Claude Code, Windsurf, or Cursor for informed development
|
|
15
|
-
- **Visual Specifications**: Include embedded wireframes, mockups, and screenshots in your coding context
|
|
16
|
-
- **Implementation History**: Access all previous discussions and decisions for better code alignment
|
|
17
|
-
|
|
18
|
-
### 📋 **For Project Management & Productivity**
|
|
19
|
-
Extended capabilities for conversational ClickUp management and daily workflow optimization.
|
|
20
|
-
|
|
21
8
|
## What You Can Do
|
|
22
9
|
|
|
23
10
|
Turn natural language into powerful ClickUp actions:
|
|
@@ -49,6 +36,14 @@ Turn natural language into powerful ClickUp actions:
|
|
|
49
36
|
- *"What's the latest update on the database migration?"*
|
|
50
37
|
- *"Add a comment to the design task about the new wireframes"*
|
|
51
38
|
|
|
39
|
+
**Document Management:**
|
|
40
|
+
- *"Find documents about job posting in hauptsache.net space"*
|
|
41
|
+
- *"Search for API documentation across all spaces"*
|
|
42
|
+
- *"Read the API documentation in the development space"*
|
|
43
|
+
- *"Create a new requirements document for the mobile app project"*
|
|
44
|
+
- *"Update the meeting notes with today's decisions"*
|
|
45
|
+
- *"What documents are in the product strategy space?"*
|
|
46
|
+
|
|
52
47
|
## Key Features
|
|
53
48
|
|
|
54
49
|
### 🔍 **Intelligent Search**
|
|
@@ -60,6 +55,7 @@ Turn natural language into powerful ClickUp actions:
|
|
|
60
55
|
- Full comment histories and team discussions
|
|
61
56
|
- Task descriptions with embedded images
|
|
62
57
|
- List descriptions and project guidelines
|
|
58
|
+
- Document content with page navigation
|
|
63
59
|
- Access to complete task history and decisions
|
|
64
60
|
|
|
65
61
|
### ⏱️ **Time Tracking**
|
|
@@ -67,8 +63,9 @@ Turn natural language into powerful ClickUp actions:
|
|
|
67
63
|
- View historical time logs and entries
|
|
68
64
|
- Query time entries by task or date range
|
|
69
65
|
|
|
70
|
-
### 📋 **Task Management**
|
|
66
|
+
### 📋 **Task & Document Management**
|
|
71
67
|
- Create and update tasks with markdown descriptions
|
|
68
|
+
- Create, read, and update documents and pages
|
|
72
69
|
- Add comments and collaborate with team members
|
|
73
70
|
- Manage priorities, due dates, assignees, and tags
|
|
74
71
|
- Handle time estimates and custom field values
|
|
@@ -92,8 +89,7 @@ Turn natural language into powerful ClickUp actions:
|
|
|
92
89
|
"clickup": {
|
|
93
90
|
"command": "npx",
|
|
94
91
|
"args": [
|
|
95
|
-
"-
|
|
96
|
-
"@hauptsache.net/clickup-mcp@1"
|
|
92
|
+
"@hauptsache.net/clickup-mcp@latest"
|
|
97
93
|
],
|
|
98
94
|
"env": {
|
|
99
95
|
"CLICKUP_API_KEY": "your_api_key",
|
|
@@ -123,15 +119,17 @@ The ClickUp MCP supports three operational modes to balance functionality, secur
|
|
|
123
119
|
|------|:------------:|:----:|:-----:|-------------|
|
|
124
120
|
| `getTaskById` | ✅ | ✅ | ✅ | Get complete task details including comments, images, and metadata |
|
|
125
121
|
| `searchTasks` | ✅ | ✅ | ✅ | Find tasks by content, keywords, assignees, or project context |
|
|
126
|
-
| `
|
|
127
|
-
| `listLists` | ❌ | ✅ | ✅ | Browse lists and folders within spaces |
|
|
122
|
+
| `searchSpaces` | ❌ | ✅ | ✅ | Browse workspace structure, project organization, and documents |
|
|
128
123
|
| `getListInfo` | ❌ | ✅ | ✅ | Get list details and available statuses for task creation |
|
|
129
124
|
| `getTimeEntries` | ❌ | ✅ | ✅ | View time entries and analyze time spent across projects |
|
|
125
|
+
| `readDocument` | ❌ | ✅ | ✅ | Get document details, page structure, and content with navigation |
|
|
126
|
+
| `searchDocuments` | ❌ | ✅ | ✅ | Search documents by name and space with fuzzy matching and space filtering |
|
|
130
127
|
| `createTask` | ❌ | ❌ | ✅ | Create new tasks with full markdown support |
|
|
131
128
|
| `updateTask` | ❌ | ❌ | ✅ | Update tasks (status, priority, assignees, etc.) with **SAFE APPEND-ONLY** descriptions |
|
|
132
129
|
| `updateListInfo` | ❌ | ❌ | ✅ | **SAFE APPEND-ONLY** updates to list descriptions (preserves existing content) |
|
|
133
130
|
| `addComment` | ❌ | ❌ | ✅ | Add comments to tasks for collaboration |
|
|
134
131
|
| `createTimeEntry` | ❌ | ❌ | ✅ | Log time entries for task tracking |
|
|
132
|
+
| `writeDocument` | ❌ | ❌ | ✅ | Universal document and page operations with smart document creation |
|
|
135
133
|
|
|
136
134
|
### Setting the Mode
|
|
137
135
|
|
|
@@ -157,10 +155,6 @@ Add the mode to your MCP configuration:
|
|
|
157
155
|
|
|
158
156
|
This MCP server can be configured using environment variables:
|
|
159
157
|
|
|
160
|
-
### ⚠️ Breaking Changes for v1.2.0+
|
|
161
|
-
- **Image Response Size Limiting**: A new `MAX_RESPONSE_SIZE_MB` environment variable (default: 1MB) may cause existing tasks with large images to display fewer images than before. To restore previous behavior, set `MAX_RESPONSE_SIZE_MB=10` (or higher) in your environment.
|
|
162
|
-
- **Enhanced API Rate Limiting**: The search indexing now uses more conservative API call patterns to prevent rate limit exhaustion. Large workspaces may experience slightly slower initial search index building.
|
|
163
|
-
|
|
164
158
|
- `CLICKUP_API_KEY`: (Required) Your ClickUp API key.
|
|
165
159
|
- `CLICKUP_TEAM_ID`: (Required) Your ClickUp Team ID (formerly Workspace ID).
|
|
166
160
|
- `CLICKUP_MCP_MODE`: (Optional) Controls which tools are available. Options: `read-minimal`, `read`, `write` (default).
|
|
@@ -237,4 +231,4 @@ These limitations ensure reliable performance while covering the most common use
|
|
|
237
231
|
|
|
238
232
|
## License
|
|
239
233
|
|
|
240
|
-
|
|
234
|
+
MIT
|
package/dist/cli.js
CHANGED
|
@@ -7,8 +7,15 @@ async function main() {
|
|
|
7
7
|
// Wait for server initialization to complete
|
|
8
8
|
const server = await index_1.serverPromise;
|
|
9
9
|
const args = process.argv.slice(2);
|
|
10
|
+
// Special command to show instructions
|
|
11
|
+
if (args.length === 1 && args[0] === 'instructions') {
|
|
12
|
+
console.log("Server Instructions:");
|
|
13
|
+
console.log(server.server._instructions || "No instructions configured");
|
|
14
|
+
process.exit(0);
|
|
15
|
+
}
|
|
10
16
|
if (args.length < 1) {
|
|
11
17
|
console.error("Usage: npm run cli <tool-name> [param1=value1 param2=value2 ...]");
|
|
18
|
+
console.error(" npm run cli instructions");
|
|
12
19
|
console.error("\nAvailable tools:");
|
|
13
20
|
// @ts-ignore - Accessing private property for testing purposes
|
|
14
21
|
const tools = server._registeredTools;
|
package/dist/clickup-text.d.ts
CHANGED
|
@@ -44,5 +44,5 @@ export declare function processClickUpText(textItems: ClickUpTextItem[]): Promis
|
|
|
44
44
|
* @param attachments Array of attachments from the Clickup API
|
|
45
45
|
* @returns Array of content blocks (text and images)
|
|
46
46
|
*/
|
|
47
|
-
export declare function processClickUpMarkdown(markdownText: string, attachments: ClickUpAttachment[]): (CallToolResult["content"][number] | ImageMetadataBlock)[];
|
|
47
|
+
export declare function processClickUpMarkdown(markdownText: string, attachments: ClickUpAttachment[] | null | undefined): (CallToolResult["content"][number] | ImageMetadataBlock)[];
|
|
48
48
|
//# sourceMappingURL=clickup-text.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clickup-text.d.ts","sourceRoot":"","sources":["../src/clickup-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE;QACN,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC;IACF,UAAU,CAAC,EAAE,GAAG,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,GAAG,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,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AA4BD;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,SAAS,EAAE,eAAe,EAAE,GAC3B,OAAO,CAAC,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,GAAG,kBAAkB,CAAC,EAAE,CAAC,CAiErE;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,iBAAiB,EAAE,GAAG,IAAI,GAAG,SAAS,GAClD,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,GAAG,kBAAkB,CAAC,EAAE,CAyG5D"}
|
package/dist/clickup-text.js
CHANGED
|
@@ -97,8 +97,10 @@ function processClickUpMarkdown(markdownText, attachments) {
|
|
|
97
97
|
let currentTextBlock = "";
|
|
98
98
|
// Create a map of attachment URLs to their full info for easy lookup
|
|
99
99
|
const attachmentMap = new Map();
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
if (attachments && Array.isArray(attachments)) {
|
|
101
|
+
for (const attachment of attachments) {
|
|
102
|
+
attachmentMap.set(attachment.url, attachment);
|
|
103
|
+
}
|
|
102
104
|
}
|
|
103
105
|
// Regular expression to match markdown image syntax: 
|
|
104
106
|
const imageRegex = /!\[([^\]]*)\]\(([^\)]+)\)/g;
|
|
@@ -152,17 +154,19 @@ function processClickUpMarkdown(markdownText, attachments) {
|
|
|
152
154
|
referencedUrls.add(match[2]);
|
|
153
155
|
}
|
|
154
156
|
// Add non-image files inline to the current text block
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
157
|
+
if (attachments && Array.isArray(attachments)) {
|
|
158
|
+
for (const attachment of attachments) {
|
|
159
|
+
if (!referencedUrls.has(attachment.url)) {
|
|
160
|
+
// Determine if this is an image based on URL or type
|
|
161
|
+
const isImage = attachment.thumbnail_large ||
|
|
162
|
+
/\.(jpg|jpeg|png|gif|webp|svg)$/i.test(attachment.url);
|
|
163
|
+
if (!isImage) {
|
|
164
|
+
// This is a non-image file - add inline to current text block
|
|
165
|
+
const fileName = extractFileNameFromUrl(attachment.url) || "file";
|
|
166
|
+
const fileType = extractFileTypeFromUrl(attachment.url);
|
|
167
|
+
const fileTypeText = fileType ? ` (${fileType.toUpperCase()})` : "";
|
|
168
|
+
currentTextBlock += `\nFile: ${fileName}${fileTypeText} - ${attachment.url}`;
|
|
169
|
+
}
|
|
166
170
|
}
|
|
167
171
|
}
|
|
168
172
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
-
declare const server: McpServer;
|
|
4
3
|
declare const serverPromise: Promise<McpServer>;
|
|
5
|
-
export {
|
|
4
|
+
export { serverPromise };
|
|
6
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAkFpE,QAAA,MAAM,aAAa,oBAAqB,CAAC;AAIzC,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.serverPromise =
|
|
4
|
+
exports.serverPromise = void 0;
|
|
5
5
|
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
6
6
|
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
7
7
|
const config_1 = require("./shared/config");
|
|
@@ -13,18 +13,38 @@ const search_tools_1 = require("./tools/search-tools");
|
|
|
13
13
|
const space_tools_1 = require("./tools/space-tools");
|
|
14
14
|
const list_tools_1 = require("./tools/list-tools");
|
|
15
15
|
const time_tools_1 = require("./tools/time-tools");
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
version: require('../package.json').version,
|
|
20
|
-
});
|
|
21
|
-
exports.server = server;
|
|
16
|
+
const doc_tools_1 = require("./tools/doc-tools");
|
|
17
|
+
// Create server variable that will be initialized later
|
|
18
|
+
let server;
|
|
22
19
|
// Register tools based on mode with user data for enhanced documentation
|
|
23
20
|
async function initializeServer() {
|
|
24
21
|
console.error(`Starting ClickUp MCP in ${config_1.CONFIG.mode} mode`);
|
|
25
|
-
// Fetch current user for enhanced tool documentation and API health check
|
|
26
|
-
const userData = await
|
|
22
|
+
// Fetch current user and spaces for enhanced tool documentation and API health check
|
|
23
|
+
const [userData, spacesIndex] = await Promise.all([
|
|
24
|
+
(0, utils_1.getCurrentUser)(),
|
|
25
|
+
(0, utils_1.getSpaceSearchIndex)()
|
|
26
|
+
]);
|
|
27
|
+
const spaces = spacesIndex._docs || [];
|
|
27
28
|
console.error(`Connected as: ${userData.user.username} (${userData.user.email})`);
|
|
29
|
+
// Filter out archived spaces and format as simple list
|
|
30
|
+
const activeSpaces = spaces.filter((s) => !s.archived);
|
|
31
|
+
const formattedSpaces = activeSpaces
|
|
32
|
+
.map((s) => `- ${s.name} (space_id: ${s.id})`)
|
|
33
|
+
.join('\n');
|
|
34
|
+
const instructions = [
|
|
35
|
+
`ClickUp is a Ticket system. It is used to track tasks, bugs, and other work items.`,
|
|
36
|
+
`Is you are asked for infos about projects or tasks, search for tasks or documents in ClickUp (this MCP) first.`,
|
|
37
|
+
`The following spaces/projects are available:`,
|
|
38
|
+
formattedSpaces
|
|
39
|
+
].join('\n');
|
|
40
|
+
console.error(`Pre-loaded ${activeSpaces.length} active spaces`);
|
|
41
|
+
// Create the MCP server with instructions
|
|
42
|
+
server = new mcp_js_1.McpServer({
|
|
43
|
+
name: "Clickup MCP",
|
|
44
|
+
version: require('../package.json').version,
|
|
45
|
+
}, {
|
|
46
|
+
instructions
|
|
47
|
+
});
|
|
28
48
|
if (config_1.CONFIG.mode === 'read-minimal') {
|
|
29
49
|
// Core task context tools for AI coding assistance
|
|
30
50
|
// Only getTaskById and searchTasks
|
|
@@ -38,6 +58,7 @@ async function initializeServer() {
|
|
|
38
58
|
(0, space_tools_1.registerSpaceTools)(server);
|
|
39
59
|
(0, list_tools_1.registerListToolsRead)(server);
|
|
40
60
|
(0, time_tools_1.registerTimeToolsRead)(server);
|
|
61
|
+
(0, doc_tools_1.registerDocumentToolsRead)(server);
|
|
41
62
|
}
|
|
42
63
|
else if (config_1.CONFIG.mode === 'write') {
|
|
43
64
|
// All tools (full functionality)
|
|
@@ -49,6 +70,8 @@ async function initializeServer() {
|
|
|
49
70
|
(0, list_tools_1.registerListToolsWrite)(server);
|
|
50
71
|
(0, time_tools_1.registerTimeToolsRead)(server);
|
|
51
72
|
(0, time_tools_1.registerTimeToolsWrite)(server);
|
|
73
|
+
(0, doc_tools_1.registerDocumentToolsRead)(server);
|
|
74
|
+
(0, doc_tools_1.registerDocumentToolsWrite)(server);
|
|
52
75
|
}
|
|
53
76
|
return server;
|
|
54
77
|
}
|
package/dist/shared/utils.d.ts
CHANGED
|
@@ -36,46 +36,36 @@ export declare function generateSpaceUrl(spaceId: string): string;
|
|
|
36
36
|
*/
|
|
37
37
|
export declare function generateFolderUrl(folderId: string): string;
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* Generate a ClickUp document URL from a document ID and optional page ID
|
|
40
40
|
*/
|
|
41
|
-
export declare function
|
|
42
|
-
/**
|
|
43
|
-
* Format a ClickUp list link as markdown
|
|
44
|
-
*/
|
|
45
|
-
export declare function formatListLink(listId: string, listName?: string): string;
|
|
46
|
-
/**
|
|
47
|
-
* Format a ClickUp space link as markdown
|
|
48
|
-
*/
|
|
49
|
-
export declare function formatSpaceLink(spaceId: string, spaceName?: string): string;
|
|
50
|
-
/**
|
|
51
|
-
* Extract task ID from a ClickUp URL
|
|
52
|
-
*/
|
|
53
|
-
export declare function extractTaskIdFromUrl(url: string): string | null;
|
|
54
|
-
/**
|
|
55
|
-
* Validate if a string is a valid ClickUp URL
|
|
56
|
-
*/
|
|
57
|
-
export declare function isClickUpUrl(url: string): boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Format a prominent link section for responses
|
|
60
|
-
*/
|
|
61
|
-
export declare function formatLinksSection(links: {
|
|
62
|
-
text: string;
|
|
63
|
-
url: string;
|
|
64
|
-
}[]): string;
|
|
41
|
+
export declare function generateDocumentUrl(docId: string, pageId?: string): string;
|
|
65
42
|
/**
|
|
66
43
|
* Get or refresh the space search index
|
|
67
44
|
* Caches promise to prevent race conditions on concurrent calls
|
|
68
45
|
*/
|
|
69
46
|
export declare function getSpaceSearchIndex(): Promise<Fuse<any> | null>;
|
|
70
47
|
/**
|
|
71
|
-
* Get lists and
|
|
48
|
+
* Get lists, folders, and documents for a specific space with caching
|
|
72
49
|
*/
|
|
73
50
|
export declare function getSpaceContent(spaceId: string): Promise<{
|
|
74
51
|
lists: any[];
|
|
75
52
|
folders: any[];
|
|
53
|
+
documents: any[];
|
|
76
54
|
}>;
|
|
77
55
|
/**
|
|
78
56
|
* Gets all team members from ClickUp API with caching
|
|
79
57
|
*/
|
|
80
58
|
export declare function getAllTeamMembers(): Promise<string[]>;
|
|
59
|
+
/**
|
|
60
|
+
* Get or create a document search index with space name resolution
|
|
61
|
+
* Caches promises to prevent race conditions on concurrent calls
|
|
62
|
+
*/
|
|
63
|
+
export declare function getDocumentSearchIndex(space_ids?: string[]): Promise<Fuse<any> | null>;
|
|
64
|
+
/**
|
|
65
|
+
* Performs multi-term search with aggressive boosting for items matching multiple terms
|
|
66
|
+
* @param searchIndex Fuse search index to search within
|
|
67
|
+
* @param terms Array of search terms
|
|
68
|
+
* @returns Array of items sorted by relevance (multi-term matches ranked higher)
|
|
69
|
+
*/
|
|
70
|
+
export declare function performMultiTermSearch<T>(searchIndex: Fuse<T>, terms: string[]): Promise<T[]>;
|
|
81
71
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/shared/utils.ts"],"names":[],"mappings":"
|
|
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;AAKD;;;GAGG;AACH,wBAAsB,cAAc,iBA6BnC;AAGD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpD;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CA0B7D;AAKD;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,SAAS,CAAC,EAAE,MAAM,EAAE,EACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,EACnB,SAAS,CAAC,EAAE,MAAM,EAAE,GACnB,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CA+B3B;AAkED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,C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