@mtaap/mcp 0.2.0 → 0.2.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/index.js CHANGED
@@ -37,16 +37,19 @@ var import_mcp = require("@modelcontextprotocol/sdk/server/mcp.js");
37
37
  var import_stdio = require("@modelcontextprotocol/sdk/server/stdio.js");
38
38
 
39
39
  // src/version.ts
40
- var VERSION = "0.2.0";
40
+ var VERSION = "0.2.2";
41
+
42
+ // src/index.ts
43
+ var import_zod3 = require("zod");
41
44
 
42
45
  // ../../packages/core/dist/constants/enums.js
43
46
  var TaskState;
44
- (function(TaskState3) {
45
- TaskState3["BACKLOG"] = "BACKLOG";
46
- TaskState3["READY"] = "READY";
47
- TaskState3["IN_PROGRESS"] = "IN_PROGRESS";
48
- TaskState3["REVIEW"] = "REVIEW";
49
- TaskState3["DONE"] = "DONE";
47
+ (function(TaskState2) {
48
+ TaskState2["BACKLOG"] = "BACKLOG";
49
+ TaskState2["READY"] = "READY";
50
+ TaskState2["IN_PROGRESS"] = "IN_PROGRESS";
51
+ TaskState2["REVIEW"] = "REVIEW";
52
+ TaskState2["DONE"] = "DONE";
50
53
  })(TaskState || (TaskState = {}));
51
54
  var UserRole;
52
55
  (function(UserRole2) {
@@ -410,42 +413,43 @@ var ListTasksInputSchema = import_zod2.z.object({
410
413
  state: import_zod2.z.nativeEnum(TaskState).optional(),
411
414
  assigneeId: import_zod2.z.string().optional()
412
415
  });
416
+ var cuidOrPrefixedId = import_zod2.z.string().regex(/^([a-z0-9]+|[a-z]+_[a-zA-Z0-9]+)$/);
413
417
  var GetTaskInputSchema = import_zod2.z.object({
414
- taskId: import_zod2.z.string().regex(/^tsk_[a-zA-Z0-9]+$/)
418
+ taskId: cuidOrPrefixedId
415
419
  });
416
420
  var AssignTaskInputSchema = import_zod2.z.object({
417
- projectId: import_zod2.z.string().regex(/^prj_[a-zA-Z0-9]+$/),
418
- taskId: import_zod2.z.string().regex(/^tsk_[a-zA-Z0-9]+$/),
421
+ projectId: cuidOrPrefixedId,
422
+ taskId: cuidOrPrefixedId,
419
423
  expectedState: import_zod2.z.nativeEnum(TaskState).default(TaskState.READY)
420
424
  });
421
425
  var UpdateProgressInputSchema = import_zod2.z.object({
422
- taskId: import_zod2.z.string().regex(/^tsk_[a-zA-Z0-9]+$/),
426
+ taskId: cuidOrPrefixedId,
423
427
  statusMessage: import_zod2.z.string().max(1e3).optional(),
424
428
  completedCheckpointIds: import_zod2.z.array(import_zod2.z.string()).optional(),
425
429
  currentCheckpointIndex: import_zod2.z.number().int().optional()
426
430
  });
427
431
  var CompleteTaskInputSchema = import_zod2.z.object({
428
- projectId: import_zod2.z.string().regex(/^prj_[a-zA-Z0-9]+$/),
429
- taskId: import_zod2.z.string().regex(/^tsk_[a-zA-Z0-9]+$/),
432
+ projectId: cuidOrPrefixedId,
433
+ taskId: cuidOrPrefixedId,
430
434
  pullRequestTitle: import_zod2.z.string().min(1).max(300).optional(),
431
435
  pullRequestBody: import_zod2.z.string().max(1e4).optional()
432
436
  });
433
437
  var ReportErrorInputSchema = import_zod2.z.object({
434
- taskId: import_zod2.z.string().regex(/^tsk_[a-zA-Z0-9]+$/),
438
+ taskId: cuidOrPrefixedId,
435
439
  errorType: import_zod2.z.nativeEnum(ErrorType),
436
440
  errorMessage: import_zod2.z.string().min(1).max(1e3),
437
441
  context: import_zod2.z.string().max(2e3).optional()
438
442
  });
439
443
  var GetProjectContextInputSchema = import_zod2.z.object({
440
- projectId: import_zod2.z.string().regex(/^prj_[a-zA-Z0-9]+$/)
444
+ projectId: cuidOrPrefixedId
441
445
  });
442
446
  var AddNoteInputSchema = import_zod2.z.object({
443
- taskId: import_zod2.z.string().regex(/^tsk_[a-zA-Z0-9]+$/),
447
+ taskId: cuidOrPrefixedId,
444
448
  content: import_zod2.z.string().min(1).max(500)
445
449
  });
446
450
  var AbandonTaskInputSchema = import_zod2.z.object({
447
- projectId: import_zod2.z.string().regex(/^prj_[a-zA-Z0-9]+$/),
448
- taskId: import_zod2.z.string().regex(/^tsk_[a-zA-Z0-9]+$/),
451
+ projectId: cuidOrPrefixedId,
452
+ taskId: cuidOrPrefixedId,
449
453
  deleteBranch: import_zod2.z.boolean().optional()
450
454
  });
451
455
  var CreatePersonalProjectInputSchema = import_zod2.z.object({
@@ -459,7 +463,7 @@ var CreateOrganizationInputSchema = import_zod2.z.object({
459
463
  slug: import_zod2.z.string().min(1).max(100).regex(/^[a-z0-9-]+$/).optional()
460
464
  });
461
465
  var UpdateOrganizationInputSchema = import_zod2.z.object({
462
- organizationId: import_zod2.z.string().regex(/^org_[a-zA-Z0-9]+$/),
466
+ organizationId: cuidOrPrefixedId,
463
467
  name: import_zod2.z.string().min(1).max(255).optional(),
464
468
  logoUrl: import_zod2.z.string().url().nullable().optional(),
465
469
  accentColor: import_zod2.z.string().regex(/^#[0-9A-Fa-f]{6}$/, "Invalid hex color format. Expected #RRGGBB").nullable().optional(),
@@ -482,7 +486,7 @@ var UpdateProjectInputSchema = import_zod2.z.object({
482
486
  tags: import_zod2.z.array(import_zod2.z.string()).optional()
483
487
  });
484
488
  var CreateEpicInputSchema = import_zod2.z.object({
485
- projectId: import_zod2.z.string().regex(/^prj_[a-zA-Z0-9]+$/),
489
+ projectId: cuidOrPrefixedId,
486
490
  name: import_zod2.z.string().min(1).max(200),
487
491
  description: import_zod2.z.string().max(2e3).optional()
488
492
  });
@@ -514,14 +518,14 @@ var AssignTaskWebappInputSchema = import_zod2.z.object({
514
518
  userId: import_zod2.z.string().min(1)
515
519
  });
516
520
  var CreateTagInputSchema = import_zod2.z.object({
517
- organizationId: import_zod2.z.string().regex(/^org_[a-zA-Z0-9]+$/),
521
+ organizationId: cuidOrPrefixedId,
518
522
  name: import_zod2.z.string().min(1).max(50).regex(/^[a-zA-Z0-9\s-]+$/)
519
523
  });
520
524
  var UpdateTagInputSchema = import_zod2.z.object({
521
525
  name: import_zod2.z.string().min(1).max(50).regex(/^[a-zA-Z0-9\s-]+$/)
522
526
  });
523
527
  var UpdateOrganizationSettingsInputSchema = import_zod2.z.object({
524
- organizationId: import_zod2.z.string().regex(/^org_[a-zA-Z0-9]+$/),
528
+ organizationId: cuidOrPrefixedId,
525
529
  ldapEnabled: import_zod2.z.boolean().optional(),
526
530
  ldapUrl: import_zod2.z.string().url().nullable().optional(),
527
531
  ldapBindDN: import_zod2.z.string().nullable().optional(),
@@ -534,21 +538,21 @@ var UpdateOrganizationSettingsInputSchema = import_zod2.z.object({
534
538
  tenantName: import_zod2.z.string().max(255).nullable().optional()
535
539
  });
536
540
  var InviteUserInputSchema = import_zod2.z.object({
537
- organizationId: import_zod2.z.string().regex(/^org_[a-zA-Z0-9]+$/),
541
+ organizationId: cuidOrPrefixedId,
538
542
  email: import_zod2.z.string().email(),
539
543
  role: import_zod2.z.nativeEnum(UserRole).default(UserRole.MEMBER),
540
544
  tags: import_zod2.z.array(import_zod2.z.string()).default([])
541
545
  });
542
546
  var AssignUserTagsInputSchema = import_zod2.z.object({
543
- userId: import_zod2.z.string().regex(/^usr_[a-zA-Z0-9]+$/),
547
+ userId: cuidOrPrefixedId,
544
548
  tags: import_zod2.z.array(import_zod2.z.string()).min(0)
545
549
  });
546
550
  var InviteCollaboratorInputSchema = import_zod2.z.object({
547
- projectId: import_zod2.z.string().regex(/^prj_[a-zA-Z0-9]+$/),
551
+ projectId: cuidOrPrefixedId,
548
552
  email: import_zod2.z.string().email()
549
553
  });
550
554
  var PublishProjectInputSchema = import_zod2.z.object({
551
- projectId: import_zod2.z.string().regex(/^prj_[a-zA-Z0-9]+$/),
555
+ projectId: cuidOrPrefixedId,
552
556
  transferOwnership: import_zod2.z.boolean().default(false),
553
557
  tags: import_zod2.z.array(import_zod2.z.string()).min(1)
554
558
  });
@@ -558,7 +562,7 @@ var GenerateApiKeyInputSchema = import_zod2.z.object({
558
562
  permissions: import_zod2.z.nativeEnum(ApiKeyPermission).default(ApiKeyPermission.WRITE)
559
563
  });
560
564
  var RevokeApiKeyInputSchema = import_zod2.z.object({
561
- keyId: import_zod2.z.string().regex(/^key_[a-zA-Z0-9]+$/)
565
+ keyId: cuidOrPrefixedId
562
566
  });
563
567
  var LoginInputSchema = import_zod2.z.object({
564
568
  email: import_zod2.z.string().email(),
@@ -1130,7 +1134,10 @@ async function createMCPServer() {
1130
1134
  server.registerTool(
1131
1135
  "list_projects",
1132
1136
  {
1133
- description: "List accessible projects (personal + team via tags)"
1137
+ description: "List accessible projects (personal + team via tags)",
1138
+ inputSchema: {
1139
+ workspaceType: import_zod3.z.enum(["TEAM", "PERSONAL", "ALL"]).optional().describe("Filter by workspace type")
1140
+ }
1134
1141
  },
1135
1142
  async (args) => {
1136
1143
  assertApiKeyPermission(
@@ -1157,7 +1164,12 @@ async function createMCPServer() {
1157
1164
  server.registerTool(
1158
1165
  "list_tasks",
1159
1166
  {
1160
- description: "Returns available tasks (filterable by project, state)"
1167
+ description: "Returns available tasks (filterable by project, state)",
1168
+ inputSchema: {
1169
+ projectId: import_zod3.z.string().optional().describe("Filter by project ID"),
1170
+ state: import_zod3.z.nativeEnum(TaskState).optional().describe("Filter by task state"),
1171
+ assigneeId: import_zod3.z.string().optional().describe("Filter by assignee ID")
1172
+ }
1161
1173
  },
1162
1174
  async (args) => {
1163
1175
  assertApiKeyPermission(mockApiKey, ApiKeyPermission.READ, "list_tasks");
@@ -1184,7 +1196,10 @@ async function createMCPServer() {
1184
1196
  server.registerTool(
1185
1197
  "get_task",
1186
1198
  {
1187
- description: "Full task details including acceptance criteria"
1199
+ description: "Full task details including acceptance criteria",
1200
+ inputSchema: {
1201
+ taskId: import_zod3.z.string().describe("The task ID to retrieve")
1202
+ }
1188
1203
  },
1189
1204
  async (args) => {
1190
1205
  assertApiKeyPermission(mockApiKey, ApiKeyPermission.READ, "get_task");
@@ -1207,7 +1222,12 @@ async function createMCPServer() {
1207
1222
  server.registerTool(
1208
1223
  "assign_task",
1209
1224
  {
1210
- description: "Atomic claim - creates branch. Fails if already taken."
1225
+ description: "Atomic claim - creates branch. Fails if already taken.",
1226
+ inputSchema: {
1227
+ projectId: import_zod3.z.string().describe("The project ID"),
1228
+ taskId: import_zod3.z.string().describe("The task ID to assign"),
1229
+ expectedState: import_zod3.z.nativeEnum(TaskState).optional().describe("Expected task state (default: READY)")
1230
+ }
1211
1231
  },
1212
1232
  async (args) => {
1213
1233
  assertApiKeyPermission(
@@ -1238,7 +1258,13 @@ async function createMCPServer() {
1238
1258
  server.registerTool(
1239
1259
  "update_progress",
1240
1260
  {
1241
- description: "Reports status, updates checkboxes, writes checkpoint"
1261
+ description: "Reports status, updates checkboxes, writes checkpoint",
1262
+ inputSchema: {
1263
+ taskId: import_zod3.z.string().describe("The task ID to update"),
1264
+ statusMessage: import_zod3.z.string().optional().describe("Status message (max 1000 chars)"),
1265
+ completedCheckpointIds: import_zod3.z.array(import_zod3.z.string()).optional().describe("Array of completed checkpoint IDs"),
1266
+ currentCheckpointIndex: import_zod3.z.number().optional().describe("Current checkpoint index")
1267
+ }
1242
1268
  },
1243
1269
  async (args) => {
1244
1270
  assertApiKeyPermission(
@@ -1269,7 +1295,13 @@ async function createMCPServer() {
1269
1295
  server.registerTool(
1270
1296
  "complete_task",
1271
1297
  {
1272
- description: "Marks complete, triggers PR, deletes local state file"
1298
+ description: "Marks complete, triggers PR, deletes local state file",
1299
+ inputSchema: {
1300
+ projectId: import_zod3.z.string().describe("The project ID"),
1301
+ taskId: import_zod3.z.string().describe("The task ID to complete"),
1302
+ pullRequestTitle: import_zod3.z.string().optional().describe("PR title (max 300 chars)"),
1303
+ pullRequestBody: import_zod3.z.string().optional().describe("PR body/description (max 10000 chars)")
1304
+ }
1273
1305
  },
1274
1306
  async (args) => {
1275
1307
  assertApiKeyPermission(
@@ -1323,7 +1355,13 @@ async function createMCPServer() {
1323
1355
  server.registerTool(
1324
1356
  "report_error",
1325
1357
  {
1326
- description: "Report unrecoverable error, displays on task in webapp"
1358
+ description: "Report unrecoverable error, displays on task in webapp",
1359
+ inputSchema: {
1360
+ taskId: import_zod3.z.string().describe("The task ID"),
1361
+ errorType: import_zod3.z.nativeEnum(ErrorType).describe("Error type: BUILD_FAILURE, TEST_FAILURE, CONFLICT, AUTH_ERROR, OTHER"),
1362
+ errorMessage: import_zod3.z.string().describe("Error message (max 1000 chars)"),
1363
+ context: import_zod3.z.string().optional().describe("Additional context (max 2000 chars)")
1364
+ }
1327
1365
  },
1328
1366
  async (args) => {
1329
1367
  assertApiKeyPermission(
@@ -1355,7 +1393,10 @@ async function createMCPServer() {
1355
1393
  server.registerTool(
1356
1394
  "get_project_context",
1357
1395
  {
1358
- description: "Returns assembled context (README, stack, conventions)"
1396
+ description: "Returns assembled context (README, stack, conventions)",
1397
+ inputSchema: {
1398
+ projectId: import_zod3.z.string().describe("The project ID")
1399
+ }
1359
1400
  },
1360
1401
  async (args) => {
1361
1402
  assertApiKeyPermission(
@@ -1382,7 +1423,11 @@ async function createMCPServer() {
1382
1423
  server.registerTool(
1383
1424
  "add_note",
1384
1425
  {
1385
- description: "Append implementation notes to task"
1426
+ description: "Append implementation notes to task",
1427
+ inputSchema: {
1428
+ taskId: import_zod3.z.string().describe("The task ID"),
1429
+ content: import_zod3.z.string().describe("Note content (max 500 chars)")
1430
+ }
1386
1431
  },
1387
1432
  async (args) => {
1388
1433
  assertApiKeyPermission(mockApiKey, ApiKeyPermission.WRITE, "add_note");
@@ -1408,7 +1453,12 @@ async function createMCPServer() {
1408
1453
  server.registerTool(
1409
1454
  "abandon_task",
1410
1455
  {
1411
- description: "Unassign from a task and optionally delete the branch"
1456
+ description: "Unassign from a task and optionally delete the branch",
1457
+ inputSchema: {
1458
+ projectId: import_zod3.z.string().describe("The project ID"),
1459
+ taskId: import_zod3.z.string().describe("The task ID to abandon"),
1460
+ deleteBranch: import_zod3.z.boolean().optional().describe("Whether to delete the associated branch")
1461
+ }
1412
1462
  },
1413
1463
  async (args) => {
1414
1464
  assertApiKeyPermission(
@@ -1439,7 +1489,12 @@ async function createMCPServer() {
1439
1489
  server.registerTool(
1440
1490
  "create_personal_project",
1441
1491
  {
1442
- description: "Create project in user's personal workspace"
1492
+ description: "Create project in user's personal workspace",
1493
+ inputSchema: {
1494
+ name: import_zod3.z.string().describe("Project name (max 100 chars)"),
1495
+ description: import_zod3.z.string().optional().describe("Project description (max 500 chars)"),
1496
+ repositoryUrl: import_zod3.z.string().describe("GitHub repository URL")
1497
+ }
1443
1498
  },
1444
1499
  async (args) => {
1445
1500
  assertApiKeyPermission(