@paca-ai/paca-mcp 0.1.0-rc.6
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/api/client.d.ts +53 -0
- package/api/client.d.ts.map +1 -0
- package/api/client.js +267 -0
- package/api/client.js.map +1 -0
- package/api/doc-client.d.ts +26 -0
- package/api/doc-client.d.ts.map +1 -0
- package/api/doc-client.js +109 -0
- package/api/doc-client.js.map +1 -0
- package/api/extended-client.d.ts +44 -0
- package/api/extended-client.d.ts.map +1 -0
- package/api/extended-client.js +167 -0
- package/api/extended-client.js.map +1 -0
- package/api/github-client.d.ts +21 -0
- package/api/github-client.d.ts.map +1 -0
- package/api/github-client.js +87 -0
- package/api/github-client.js.map +1 -0
- package/api/index.d.ts +7 -0
- package/api/index.d.ts.map +1 -0
- package/api/index.js +7 -0
- package/api/index.js.map +1 -0
- package/api/task-extended-client.d.ts +28 -0
- package/api/task-extended-client.d.ts.map +1 -0
- package/api/task-extended-client.js +123 -0
- package/api/task-extended-client.js.map +1 -0
- package/api/views-client.d.ts +36 -0
- package/api/views-client.d.ts.map +1 -0
- package/api/views-client.js +157 -0
- package/api/views-client.js.map +1 -0
- package/index.d.ts +3 -0
- package/index.d.ts.map +1 -0
- package/index.js +41 -0
- package/index.js.map +1 -0
- package/package.json +40 -0
- package/server.d.ts +9 -0
- package/server.d.ts.map +1 -0
- package/server.js +46 -0
- package/server.js.map +1 -0
- package/tools/attachment-tools.d.ts +15 -0
- package/tools/attachment-tools.d.ts.map +1 -0
- package/tools/attachment-tools.js +402 -0
- package/tools/attachment-tools.js.map +1 -0
- package/tools/doc-github-tools.d.ts +15 -0
- package/tools/doc-github-tools.d.ts.map +1 -0
- package/tools/doc-github-tools.js +520 -0
- package/tools/doc-github-tools.js.map +1 -0
- package/tools/document-tools.d.ts +16 -0
- package/tools/document-tools.d.ts.map +1 -0
- package/tools/document-tools.js +224 -0
- package/tools/document-tools.js.map +1 -0
- package/tools/index.d.ts +19 -0
- package/tools/index.d.ts.map +1 -0
- package/tools/index.js +171 -0
- package/tools/index.js.map +1 -0
- package/tools/member-tools.d.ts +15 -0
- package/tools/member-tools.d.ts.map +1 -0
- package/tools/member-tools.js +391 -0
- package/tools/member-tools.js.map +1 -0
- package/tools/project-tools.d.ts +16 -0
- package/tools/project-tools.d.ts.map +1 -0
- package/tools/project-tools.js +178 -0
- package/tools/project-tools.js.map +1 -0
- package/tools/sprint-tools.d.ts +16 -0
- package/tools/sprint-tools.d.ts.map +1 -0
- package/tools/sprint-tools.js +258 -0
- package/tools/sprint-tools.js.map +1 -0
- package/tools/task-activity-tools.d.ts +15 -0
- package/tools/task-activity-tools.d.ts.map +1 -0
- package/tools/task-activity-tools.js +425 -0
- package/tools/task-activity-tools.js.map +1 -0
- package/tools/task-tools.d.ts +16 -0
- package/tools/task-tools.d.ts.map +1 -0
- package/tools/task-tools.js +344 -0
- package/tools/task-tools.js.map +1 -0
- package/tools/task-type-tools.d.ts +12 -0
- package/tools/task-type-tools.d.ts.map +1 -0
- package/tools/task-type-tools.js +459 -0
- package/tools/task-type-tools.js.map +1 -0
- package/tools/view-tools.d.ts +15 -0
- package/tools/view-tools.d.ts.map +1 -0
- package/tools/view-tools.js +660 -0
- package/tools/view-tools.js.map +1 -0
- package/types/index.d.ts +564 -0
- package/types/index.d.ts.map +1 -0
- package/types/index.js +2 -0
- package/types/index.js.map +1 -0
- package/utils/converters.d.ts +13 -0
- package/utils/converters.d.ts.map +1 -0
- package/utils/converters.js +50 -0
- package/utils/converters.js.map +1 -0
- package/utils/formatters.d.ts +34 -0
- package/utils/formatters.d.ts.map +1 -0
- package/utils/formatters.js +87 -0
- package/utils/formatters.js.map +1 -0
- package/utils/index.d.ts +3 -0
- package/utils/index.d.ts.map +1 -0
- package/utils/index.js +3 -0
- package/utils/index.js.map +1 -0
|
@@ -0,0 +1,520 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { formatList } from "../utils/index.js";
|
|
3
|
+
const ListDocFoldersSchema = z.object({
|
|
4
|
+
projectId: z.string(),
|
|
5
|
+
});
|
|
6
|
+
const CreateDocFolderSchema = z.object({
|
|
7
|
+
projectId: z.string(),
|
|
8
|
+
name: z.string(),
|
|
9
|
+
parentId: z.string().optional(),
|
|
10
|
+
});
|
|
11
|
+
const UpdateDocFolderSchema = z.object({
|
|
12
|
+
projectId: z.string(),
|
|
13
|
+
folderId: z.string(),
|
|
14
|
+
name: z.string().optional(),
|
|
15
|
+
parentId: z.string().optional(),
|
|
16
|
+
position: z.number().optional(),
|
|
17
|
+
});
|
|
18
|
+
const DeleteDocFolderSchema = z.object({
|
|
19
|
+
projectId: z.string(),
|
|
20
|
+
folderId: z.string(),
|
|
21
|
+
});
|
|
22
|
+
const ListDocSnapshotsSchema = z.object({
|
|
23
|
+
projectId: z.string(),
|
|
24
|
+
docId: z.string(),
|
|
25
|
+
});
|
|
26
|
+
const GetDocSnapshotSchema = z.object({
|
|
27
|
+
projectId: z.string(),
|
|
28
|
+
docId: z.string(),
|
|
29
|
+
snapshotId: z.string(),
|
|
30
|
+
});
|
|
31
|
+
const GetGitHubIntegrationSchema = z.object({
|
|
32
|
+
projectId: z.string(),
|
|
33
|
+
});
|
|
34
|
+
const SetGitHubTokenSchema = z.object({
|
|
35
|
+
projectId: z.string(),
|
|
36
|
+
token: z.string(),
|
|
37
|
+
});
|
|
38
|
+
const DeleteGitHubTokenSchema = z.object({
|
|
39
|
+
projectId: z.string(),
|
|
40
|
+
});
|
|
41
|
+
const ListGitHubRepositoriesSchema = z.object({
|
|
42
|
+
projectId: z.string(),
|
|
43
|
+
});
|
|
44
|
+
const ListLinkedGitHubReposSchema = z.object({
|
|
45
|
+
projectId: z.string(),
|
|
46
|
+
});
|
|
47
|
+
const LinkGitHubRepositorySchema = z.object({
|
|
48
|
+
projectId: z.string(),
|
|
49
|
+
owner: z.string(),
|
|
50
|
+
repo: z.string(),
|
|
51
|
+
});
|
|
52
|
+
const UnlinkGitHubRepositorySchema = z.object({
|
|
53
|
+
projectId: z.string(),
|
|
54
|
+
repoId: z.number(),
|
|
55
|
+
});
|
|
56
|
+
/**
|
|
57
|
+
* Returns all document folder and file related MCP tools.
|
|
58
|
+
*/
|
|
59
|
+
export function getDocTools() {
|
|
60
|
+
return [
|
|
61
|
+
{
|
|
62
|
+
name: "list_doc_folders",
|
|
63
|
+
description: "List all folders in a project",
|
|
64
|
+
inputSchema: {
|
|
65
|
+
type: "object",
|
|
66
|
+
properties: {
|
|
67
|
+
projectId: {
|
|
68
|
+
type: "string",
|
|
69
|
+
description: "The ID of the project",
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
required: ["projectId"],
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "create_doc_folder",
|
|
77
|
+
description: "Create a new document folder",
|
|
78
|
+
inputSchema: {
|
|
79
|
+
type: "object",
|
|
80
|
+
properties: {
|
|
81
|
+
projectId: {
|
|
82
|
+
type: "string",
|
|
83
|
+
description: "The ID of the project",
|
|
84
|
+
},
|
|
85
|
+
name: {
|
|
86
|
+
type: "string",
|
|
87
|
+
description: "The name of the folder",
|
|
88
|
+
},
|
|
89
|
+
parentId: {
|
|
90
|
+
type: "string",
|
|
91
|
+
description: "The parent folder ID (null for root level)",
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
required: ["projectId", "name"],
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: "update_doc_folder",
|
|
99
|
+
description: "Update a document folder",
|
|
100
|
+
inputSchema: {
|
|
101
|
+
type: "object",
|
|
102
|
+
properties: {
|
|
103
|
+
projectId: {
|
|
104
|
+
type: "string",
|
|
105
|
+
description: "The ID of the project",
|
|
106
|
+
},
|
|
107
|
+
folderId: {
|
|
108
|
+
type: "string",
|
|
109
|
+
description: "The ID of the folder",
|
|
110
|
+
},
|
|
111
|
+
name: {
|
|
112
|
+
type: "string",
|
|
113
|
+
description: "The new name",
|
|
114
|
+
},
|
|
115
|
+
parentId: {
|
|
116
|
+
type: "string",
|
|
117
|
+
description: "The new parent folder ID",
|
|
118
|
+
},
|
|
119
|
+
position: {
|
|
120
|
+
type: "number",
|
|
121
|
+
description: "The new position",
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
required: ["projectId", "folderId"],
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: "delete_doc_folder",
|
|
129
|
+
description: "Delete a document folder",
|
|
130
|
+
inputSchema: {
|
|
131
|
+
type: "object",
|
|
132
|
+
properties: {
|
|
133
|
+
projectId: {
|
|
134
|
+
type: "string",
|
|
135
|
+
description: "The ID of the project",
|
|
136
|
+
},
|
|
137
|
+
folderId: {
|
|
138
|
+
type: "string",
|
|
139
|
+
description: "The ID of the folder",
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
required: ["projectId", "folderId"],
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: "list_doc_snapshots",
|
|
147
|
+
description: "List all snapshots of a document",
|
|
148
|
+
inputSchema: {
|
|
149
|
+
type: "object",
|
|
150
|
+
properties: {
|
|
151
|
+
projectId: {
|
|
152
|
+
type: "string",
|
|
153
|
+
description: "The ID of the project",
|
|
154
|
+
},
|
|
155
|
+
docId: {
|
|
156
|
+
type: "string",
|
|
157
|
+
description: "The ID of the document",
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
required: ["projectId", "docId"],
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: "get_doc_snapshot",
|
|
165
|
+
description: "Get a specific document snapshot",
|
|
166
|
+
inputSchema: {
|
|
167
|
+
type: "object",
|
|
168
|
+
properties: {
|
|
169
|
+
projectId: {
|
|
170
|
+
type: "string",
|
|
171
|
+
description: "The ID of the project",
|
|
172
|
+
},
|
|
173
|
+
docId: {
|
|
174
|
+
type: "string",
|
|
175
|
+
description: "The ID of the document",
|
|
176
|
+
},
|
|
177
|
+
snapshotId: {
|
|
178
|
+
type: "string",
|
|
179
|
+
description: "The ID of the snapshot",
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
required: ["projectId", "docId", "snapshotId"],
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
];
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Returns all GitHub integration related MCP tools.
|
|
189
|
+
*/
|
|
190
|
+
export function getGitHubTools() {
|
|
191
|
+
return [
|
|
192
|
+
{
|
|
193
|
+
name: "get_github_integration",
|
|
194
|
+
description: "Get GitHub integration status for a project",
|
|
195
|
+
inputSchema: {
|
|
196
|
+
type: "object",
|
|
197
|
+
properties: {
|
|
198
|
+
projectId: {
|
|
199
|
+
type: "string",
|
|
200
|
+
description: "The ID of the project",
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
required: ["projectId"],
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
name: "set_github_token",
|
|
208
|
+
description: "Set GitHub token for a project",
|
|
209
|
+
inputSchema: {
|
|
210
|
+
type: "object",
|
|
211
|
+
properties: {
|
|
212
|
+
projectId: {
|
|
213
|
+
type: "string",
|
|
214
|
+
description: "The ID of the project",
|
|
215
|
+
},
|
|
216
|
+
token: {
|
|
217
|
+
type: "string",
|
|
218
|
+
description: "The GitHub personal access token",
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
required: ["projectId", "token"],
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: "delete_github_token",
|
|
226
|
+
description: "Delete GitHub token for a project",
|
|
227
|
+
inputSchema: {
|
|
228
|
+
type: "object",
|
|
229
|
+
properties: {
|
|
230
|
+
projectId: {
|
|
231
|
+
type: "string",
|
|
232
|
+
description: "The ID of the project",
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
required: ["projectId"],
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
name: "list_github_repositories",
|
|
240
|
+
description: "List available GitHub repositories",
|
|
241
|
+
inputSchema: {
|
|
242
|
+
type: "object",
|
|
243
|
+
properties: {
|
|
244
|
+
projectId: {
|
|
245
|
+
type: "string",
|
|
246
|
+
description: "The ID of the project",
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
required: ["projectId"],
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
name: "list_linked_github_repos",
|
|
254
|
+
description: "List linked GitHub repositories",
|
|
255
|
+
inputSchema: {
|
|
256
|
+
type: "object",
|
|
257
|
+
properties: {
|
|
258
|
+
projectId: {
|
|
259
|
+
type: "string",
|
|
260
|
+
description: "The ID of the project",
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
required: ["projectId"],
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
name: "link_github_repository",
|
|
268
|
+
description: "Link a GitHub repository to a project",
|
|
269
|
+
inputSchema: {
|
|
270
|
+
type: "object",
|
|
271
|
+
properties: {
|
|
272
|
+
projectId: {
|
|
273
|
+
type: "string",
|
|
274
|
+
description: "The ID of the project",
|
|
275
|
+
},
|
|
276
|
+
owner: {
|
|
277
|
+
type: "string",
|
|
278
|
+
description: "The repository owner",
|
|
279
|
+
},
|
|
280
|
+
repo: {
|
|
281
|
+
type: "string",
|
|
282
|
+
description: "The repository name",
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
required: ["projectId", "owner", "repo"],
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
name: "unlink_github_repository",
|
|
290
|
+
description: "Unlink a GitHub repository from a project",
|
|
291
|
+
inputSchema: {
|
|
292
|
+
type: "object",
|
|
293
|
+
properties: {
|
|
294
|
+
projectId: {
|
|
295
|
+
type: "string",
|
|
296
|
+
description: "The ID of the project",
|
|
297
|
+
},
|
|
298
|
+
repoId: {
|
|
299
|
+
type: "number",
|
|
300
|
+
description: "The repository ID",
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
required: ["projectId", "repoId"],
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
];
|
|
307
|
+
}
|
|
308
|
+
function formatDocFolder(folder) {
|
|
309
|
+
return `Folder: ${folder.name}
|
|
310
|
+
ID: ${folder.id}
|
|
311
|
+
Parent ID: ${folder.parent_id || "None (Root)"}
|
|
312
|
+
Position: ${folder.position}
|
|
313
|
+
Created by: ${folder.created_by || "Unknown"}
|
|
314
|
+
Created: ${folder.created_at}`;
|
|
315
|
+
}
|
|
316
|
+
function formatDocSnapshot(snapshot) {
|
|
317
|
+
return `Snapshot #${snapshot.snapshot_number}
|
|
318
|
+
ID: ${snapshot.id}
|
|
319
|
+
Title: ${snapshot.title}
|
|
320
|
+
Created by: ${snapshot.created_by_name}
|
|
321
|
+
Created: ${snapshot.created_at}`;
|
|
322
|
+
}
|
|
323
|
+
function formatGitHubIntegration(integration) {
|
|
324
|
+
return `GitHub Integration:
|
|
325
|
+
ID: ${integration.id}
|
|
326
|
+
Project ID: ${integration.project_id}
|
|
327
|
+
Created: ${integration.created_at}
|
|
328
|
+
Updated: ${integration.updated_at}`;
|
|
329
|
+
}
|
|
330
|
+
function formatGitHubRepo(repo) {
|
|
331
|
+
return `Repository: ${repo.full_name}
|
|
332
|
+
ID: ${repo.id}
|
|
333
|
+
Owner: ${repo.owner}
|
|
334
|
+
Repo Name: ${repo.repo_name}
|
|
335
|
+
Full Name: ${repo.full_name}
|
|
336
|
+
Private: ${repo.private ? "Yes" : "No"}
|
|
337
|
+
Default Branch: ${repo.default_branch}
|
|
338
|
+
Webhook ID: ${repo.webhook_id}
|
|
339
|
+
Created: ${repo.created_at}`;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Handles document and GitHub tool calls.
|
|
343
|
+
*/
|
|
344
|
+
export async function handleDocTool(toolName, args, docClient, githubClient) {
|
|
345
|
+
switch (toolName) {
|
|
346
|
+
case "list_doc_folders": {
|
|
347
|
+
const { projectId } = ListDocFoldersSchema.parse(args);
|
|
348
|
+
const folders = await docClient.listFolders(projectId);
|
|
349
|
+
const formatted = formatList(folders, formatDocFolder);
|
|
350
|
+
return {
|
|
351
|
+
content: [
|
|
352
|
+
{
|
|
353
|
+
type: "text",
|
|
354
|
+
text: `Document Folders:\n\n${formatted}`,
|
|
355
|
+
},
|
|
356
|
+
],
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
case "create_doc_folder": {
|
|
360
|
+
const { projectId, name, parentId } = CreateDocFolderSchema.parse(args);
|
|
361
|
+
const folder = await docClient.createFolder(projectId, {
|
|
362
|
+
name,
|
|
363
|
+
parent_id: parentId,
|
|
364
|
+
});
|
|
365
|
+
return {
|
|
366
|
+
content: [
|
|
367
|
+
{
|
|
368
|
+
type: "text",
|
|
369
|
+
text: `Folder created successfully:\n\n${formatDocFolder(folder)}`,
|
|
370
|
+
},
|
|
371
|
+
],
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
case "update_doc_folder": {
|
|
375
|
+
const { projectId, folderId, name, parentId, position } = UpdateDocFolderSchema.parse(args);
|
|
376
|
+
const folder = await docClient.updateFolder(projectId, folderId, {
|
|
377
|
+
name,
|
|
378
|
+
parent_id: parentId,
|
|
379
|
+
position,
|
|
380
|
+
});
|
|
381
|
+
return {
|
|
382
|
+
content: [
|
|
383
|
+
{
|
|
384
|
+
type: "text",
|
|
385
|
+
text: `Folder updated successfully:\n\n${formatDocFolder(folder)}`,
|
|
386
|
+
},
|
|
387
|
+
],
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
case "delete_doc_folder": {
|
|
391
|
+
const { projectId, folderId } = DeleteDocFolderSchema.parse(args);
|
|
392
|
+
await docClient.deleteFolder(projectId, folderId);
|
|
393
|
+
return {
|
|
394
|
+
content: [
|
|
395
|
+
{
|
|
396
|
+
type: "text",
|
|
397
|
+
text: `Folder ${folderId} deleted successfully`,
|
|
398
|
+
},
|
|
399
|
+
],
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
case "list_doc_snapshots": {
|
|
403
|
+
const { projectId, docId } = ListDocSnapshotsSchema.parse(args);
|
|
404
|
+
const snapshots = await docClient.listSnapshots(projectId, docId);
|
|
405
|
+
const formatted = formatList(snapshots, formatDocSnapshot);
|
|
406
|
+
return {
|
|
407
|
+
content: [
|
|
408
|
+
{
|
|
409
|
+
type: "text",
|
|
410
|
+
text: `Document Snapshots:\n\n${formatted}`,
|
|
411
|
+
},
|
|
412
|
+
],
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
case "get_doc_snapshot": {
|
|
416
|
+
const { projectId, docId, snapshotId } = GetDocSnapshotSchema.parse(args);
|
|
417
|
+
const snapshot = await docClient.getSnapshot(projectId, docId, snapshotId);
|
|
418
|
+
return {
|
|
419
|
+
content: [
|
|
420
|
+
{
|
|
421
|
+
type: "text",
|
|
422
|
+
text: formatDocSnapshot(snapshot),
|
|
423
|
+
},
|
|
424
|
+
],
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
case "get_github_integration": {
|
|
428
|
+
const { projectId } = GetGitHubIntegrationSchema.parse(args);
|
|
429
|
+
const integration = await githubClient.getGitHubIntegration(projectId);
|
|
430
|
+
return {
|
|
431
|
+
content: [
|
|
432
|
+
{
|
|
433
|
+
type: "text",
|
|
434
|
+
text: formatGitHubIntegration(integration),
|
|
435
|
+
},
|
|
436
|
+
],
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
case "set_github_token": {
|
|
440
|
+
const { projectId, token } = SetGitHubTokenSchema.parse(args);
|
|
441
|
+
await githubClient.setGitHubToken(projectId, { token });
|
|
442
|
+
return {
|
|
443
|
+
content: [
|
|
444
|
+
{
|
|
445
|
+
type: "text",
|
|
446
|
+
text: `GitHub token set successfully`,
|
|
447
|
+
},
|
|
448
|
+
],
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
case "delete_github_token": {
|
|
452
|
+
const { projectId } = DeleteGitHubTokenSchema.parse(args);
|
|
453
|
+
await githubClient.deleteGitHubToken(projectId);
|
|
454
|
+
return {
|
|
455
|
+
content: [
|
|
456
|
+
{
|
|
457
|
+
type: "text",
|
|
458
|
+
text: `GitHub token deleted successfully`,
|
|
459
|
+
},
|
|
460
|
+
],
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
case "list_github_repositories": {
|
|
464
|
+
const { projectId } = ListGitHubRepositoriesSchema.parse(args);
|
|
465
|
+
const repos = await githubClient.listRepositories(projectId);
|
|
466
|
+
const formatted = formatList(repos, formatGitHubRepo);
|
|
467
|
+
return {
|
|
468
|
+
content: [
|
|
469
|
+
{
|
|
470
|
+
type: "text",
|
|
471
|
+
text: `GitHub Repositories:\n\n${formatted}`,
|
|
472
|
+
},
|
|
473
|
+
],
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
case "list_linked_github_repos": {
|
|
477
|
+
const { projectId } = ListLinkedGitHubReposSchema.parse(args);
|
|
478
|
+
const repos = await githubClient.listLinkedRepositories(projectId);
|
|
479
|
+
const formatted = formatList(repos, formatGitHubRepo);
|
|
480
|
+
return {
|
|
481
|
+
content: [
|
|
482
|
+
{
|
|
483
|
+
type: "text",
|
|
484
|
+
text: `Linked GitHub Repositories:\n\n${formatted}`,
|
|
485
|
+
},
|
|
486
|
+
],
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
case "link_github_repository": {
|
|
490
|
+
const { projectId, owner, repo } = LinkGitHubRepositorySchema.parse(args);
|
|
491
|
+
const linkedRepo = await githubClient.linkRepository(projectId, {
|
|
492
|
+
owner,
|
|
493
|
+
repo_name: repo,
|
|
494
|
+
});
|
|
495
|
+
return {
|
|
496
|
+
content: [
|
|
497
|
+
{
|
|
498
|
+
type: "text",
|
|
499
|
+
text: `Repository linked successfully:\n\n${formatGitHubRepo(linkedRepo)}`,
|
|
500
|
+
},
|
|
501
|
+
],
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
case "unlink_github_repository": {
|
|
505
|
+
const { projectId, repoId } = UnlinkGitHubRepositorySchema.parse(args);
|
|
506
|
+
await githubClient.unlinkRepository(projectId, String(repoId));
|
|
507
|
+
return {
|
|
508
|
+
content: [
|
|
509
|
+
{
|
|
510
|
+
type: "text",
|
|
511
|
+
text: `Repository ${repoId} unlinked successfully`,
|
|
512
|
+
},
|
|
513
|
+
],
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
default:
|
|
517
|
+
throw new Error(`Unknown doc/GitHub tool: ${toolName}`);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
//# sourceMappingURL=doc-github-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc-github-tools.js","sourceRoot":"","sources":["../../src/tools/doc-github-tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAC;AAEH,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC;AAEH,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,QAAQ,EAAE,CAAC,C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PacaAPIClient } from "../api/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Returns all document-related MCP tools.
|
|
5
|
+
* @returns Array of document tools
|
|
6
|
+
*/
|
|
7
|
+
export declare function getDocumentTools(): Tool[];
|
|
8
|
+
/**
|
|
9
|
+
* Handles document-related tool calls.
|
|
10
|
+
* @param toolName - Name of the tool being called
|
|
11
|
+
* @param args - Tool arguments
|
|
12
|
+
* @param client - Paca API client instance
|
|
13
|
+
* @returns Tool response
|
|
14
|
+
*/
|
|
15
|
+
export declare function handleDocumentTool(toolName: string, args: any, client: PacaAPIClient): Promise<any>;
|
|
16
|
+
//# sourceMappingURL=document-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-tools.d.ts","sourceRoot":"","sources":["../../src/tools/document-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAgCrD;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,EAAE,CA+GzC;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACvC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,GAAG,EACT,MAAM,EAAE,aAAa,GACnB,OAAO,CAAC,GAAG,CAAC,CAsFd"}
|