@mtaap/mcp 0.2.3 → 0.2.4
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/cli.js +100 -4
- package/dist/cli.js.map +1 -1
- package/dist/index.js +100 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -28,7 +28,7 @@ var import_mcp = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
|
28
28
|
var import_stdio = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
29
29
|
|
|
30
30
|
// src/version.ts
|
|
31
|
-
var VERSION = "0.2.
|
|
31
|
+
var VERSION = "0.2.4";
|
|
32
32
|
|
|
33
33
|
// src/index.ts
|
|
34
34
|
var import_zod3 = require("zod");
|
|
@@ -402,7 +402,8 @@ var ListProjectsInputSchema = import_zod2.z.object({
|
|
|
402
402
|
var ListTasksInputSchema = import_zod2.z.object({
|
|
403
403
|
projectId: import_zod2.z.string().optional(),
|
|
404
404
|
state: import_zod2.z.nativeEnum(TaskState).optional(),
|
|
405
|
-
assigneeId: import_zod2.z.string().optional()
|
|
405
|
+
assigneeId: import_zod2.z.string().optional(),
|
|
406
|
+
includeArchived: import_zod2.z.boolean().optional()
|
|
406
407
|
});
|
|
407
408
|
var cuidOrPrefixedId = import_zod2.z.string().regex(/^([a-z0-9]+|[a-z]+_[a-zA-Z0-9]+)$/);
|
|
408
409
|
var GetTaskInputSchema = import_zod2.z.object({
|
|
@@ -454,6 +455,14 @@ var ApproveTaskInputSchema = import_zod2.z.object({
|
|
|
454
455
|
taskId: cuidOrPrefixedId,
|
|
455
456
|
reviewComments: import_zod2.z.string().max(2e3).optional()
|
|
456
457
|
});
|
|
458
|
+
var ArchiveTaskInputSchema = import_zod2.z.object({
|
|
459
|
+
projectId: cuidOrPrefixedId,
|
|
460
|
+
taskId: cuidOrPrefixedId
|
|
461
|
+
});
|
|
462
|
+
var UnarchiveTaskInputSchema = import_zod2.z.object({
|
|
463
|
+
projectId: cuidOrPrefixedId,
|
|
464
|
+
taskId: cuidOrPrefixedId
|
|
465
|
+
});
|
|
457
466
|
var CreatePersonalProjectInputSchema = import_zod2.z.object({
|
|
458
467
|
name: import_zod2.z.string().min(1).max(100),
|
|
459
468
|
description: import_zod2.z.string().max(500).optional(),
|
|
@@ -1021,6 +1030,7 @@ var MCPApiClient = class {
|
|
|
1021
1030
|
if (filters.projectId) params.set("projectId", filters.projectId);
|
|
1022
1031
|
if (filters.state) params.set("state", filters.state);
|
|
1023
1032
|
if (filters.assigneeId) params.set("assigneeId", filters.assigneeId);
|
|
1033
|
+
if (filters.includeArchived) params.set("includeArchived", "true");
|
|
1024
1034
|
const queryString = params.toString();
|
|
1025
1035
|
const path = queryString ? `/api/mcp/tasks?${queryString}` : "/api/mcp/tasks";
|
|
1026
1036
|
return this.request("GET", path);
|
|
@@ -1065,6 +1075,22 @@ var MCPApiClient = class {
|
|
|
1065
1075
|
deleteBranch
|
|
1066
1076
|
});
|
|
1067
1077
|
}
|
|
1078
|
+
/**
|
|
1079
|
+
* Archive a task (soft delete)
|
|
1080
|
+
*/
|
|
1081
|
+
async archiveTask(taskId, projectId) {
|
|
1082
|
+
return this.request("POST", `/api/mcp/tasks/${taskId}/archive`, {
|
|
1083
|
+
projectId
|
|
1084
|
+
});
|
|
1085
|
+
}
|
|
1086
|
+
/**
|
|
1087
|
+
* Unarchive a task (restore)
|
|
1088
|
+
*/
|
|
1089
|
+
async unarchiveTask(taskId, projectId) {
|
|
1090
|
+
return this.request("DELETE", `/api/mcp/tasks/${taskId}/archive`, {
|
|
1091
|
+
projectId
|
|
1092
|
+
});
|
|
1093
|
+
}
|
|
1068
1094
|
/**
|
|
1069
1095
|
* Report task error
|
|
1070
1096
|
*/
|
|
@@ -1205,7 +1231,8 @@ async function createMCPServer() {
|
|
|
1205
1231
|
inputSchema: {
|
|
1206
1232
|
projectId: import_zod3.z.string().optional().describe("Filter by project ID"),
|
|
1207
1233
|
state: import_zod3.z.nativeEnum(TaskState).optional().describe("Filter by task state"),
|
|
1208
|
-
assigneeId: import_zod3.z.string().optional().describe("Filter by assignee ID")
|
|
1234
|
+
assigneeId: import_zod3.z.string().optional().describe("Filter by assignee ID"),
|
|
1235
|
+
includeArchived: import_zod3.z.boolean().optional().describe("Include archived tasks (default: false)")
|
|
1209
1236
|
}
|
|
1210
1237
|
},
|
|
1211
1238
|
async (args) => {
|
|
@@ -1215,7 +1242,8 @@ async function createMCPServer() {
|
|
|
1215
1242
|
const tasks = await apiClient.listTasks({
|
|
1216
1243
|
projectId: validated.projectId,
|
|
1217
1244
|
state: validated.state,
|
|
1218
|
-
assigneeId: validated.assigneeId
|
|
1245
|
+
assigneeId: validated.assigneeId,
|
|
1246
|
+
includeArchived: validated.includeArchived
|
|
1219
1247
|
});
|
|
1220
1248
|
return {
|
|
1221
1249
|
content: [
|
|
@@ -1523,6 +1551,74 @@ async function createMCPServer() {
|
|
|
1523
1551
|
}
|
|
1524
1552
|
}
|
|
1525
1553
|
);
|
|
1554
|
+
server.registerTool(
|
|
1555
|
+
"archive_task",
|
|
1556
|
+
{
|
|
1557
|
+
description: "Archive a task (soft delete). Task can be restored later.",
|
|
1558
|
+
inputSchema: {
|
|
1559
|
+
projectId: import_zod3.z.string().describe("The project ID"),
|
|
1560
|
+
taskId: import_zod3.z.string().describe("The task ID to archive")
|
|
1561
|
+
}
|
|
1562
|
+
},
|
|
1563
|
+
async (args) => {
|
|
1564
|
+
assertApiKeyPermission(
|
|
1565
|
+
mockApiKey,
|
|
1566
|
+
ApiKeyPermission.WRITE,
|
|
1567
|
+
"archive_task"
|
|
1568
|
+
);
|
|
1569
|
+
const validated = ArchiveTaskInputSchema.parse(args);
|
|
1570
|
+
try {
|
|
1571
|
+
const result = await apiClient.archiveTask(
|
|
1572
|
+
validated.taskId,
|
|
1573
|
+
validated.projectId
|
|
1574
|
+
);
|
|
1575
|
+
return {
|
|
1576
|
+
content: [
|
|
1577
|
+
{
|
|
1578
|
+
type: "text",
|
|
1579
|
+
text: JSON.stringify(result, null, 2)
|
|
1580
|
+
}
|
|
1581
|
+
]
|
|
1582
|
+
};
|
|
1583
|
+
} catch (error) {
|
|
1584
|
+
return handleApiError(error);
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
);
|
|
1588
|
+
server.registerTool(
|
|
1589
|
+
"unarchive_task",
|
|
1590
|
+
{
|
|
1591
|
+
description: "Restore an archived task",
|
|
1592
|
+
inputSchema: {
|
|
1593
|
+
projectId: import_zod3.z.string().describe("The project ID"),
|
|
1594
|
+
taskId: import_zod3.z.string().describe("The task ID to restore")
|
|
1595
|
+
}
|
|
1596
|
+
},
|
|
1597
|
+
async (args) => {
|
|
1598
|
+
assertApiKeyPermission(
|
|
1599
|
+
mockApiKey,
|
|
1600
|
+
ApiKeyPermission.WRITE,
|
|
1601
|
+
"unarchive_task"
|
|
1602
|
+
);
|
|
1603
|
+
const validated = UnarchiveTaskInputSchema.parse(args);
|
|
1604
|
+
try {
|
|
1605
|
+
const result = await apiClient.unarchiveTask(
|
|
1606
|
+
validated.taskId,
|
|
1607
|
+
validated.projectId
|
|
1608
|
+
);
|
|
1609
|
+
return {
|
|
1610
|
+
content: [
|
|
1611
|
+
{
|
|
1612
|
+
type: "text",
|
|
1613
|
+
text: JSON.stringify(result, null, 2)
|
|
1614
|
+
}
|
|
1615
|
+
]
|
|
1616
|
+
};
|
|
1617
|
+
} catch (error) {
|
|
1618
|
+
return handleApiError(error);
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
);
|
|
1526
1622
|
server.registerTool(
|
|
1527
1623
|
"create_personal_project",
|
|
1528
1624
|
{
|