@jhl8041/dooray-mcp 0.1.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.
Files changed (138) hide show
  1. package/.claude/settings.local.json +9 -0
  2. package/.serena/project.yml +84 -0
  3. package/CLAUDE.md +119 -0
  4. package/README.md +82 -0
  5. package/dist/api/client.d.ts +70 -0
  6. package/dist/api/client.d.ts.map +1 -0
  7. package/dist/api/client.js +186 -0
  8. package/dist/api/client.js.map +1 -0
  9. package/dist/api/common.d.ts +14 -0
  10. package/dist/api/common.d.ts.map +1 -0
  11. package/dist/api/common.js +25 -0
  12. package/dist/api/common.js.map +1 -0
  13. package/dist/api/projects.d.ts +83 -0
  14. package/dist/api/projects.d.ts.map +1 -0
  15. package/dist/api/projects.js +300 -0
  16. package/dist/api/projects.js.map +1 -0
  17. package/dist/api/wiki.d.ts +38 -0
  18. package/dist/api/wiki.d.ts.map +1 -0
  19. package/dist/api/wiki.js +95 -0
  20. package/dist/api/wiki.js.map +1 -0
  21. package/dist/index.d.ts +7 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +227 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/tools/common/get-my-member-info.d.ts +29 -0
  26. package/dist/tools/common/get-my-member-info.d.ts.map +1 -0
  27. package/dist/tools/common/get-my-member-info.js +95 -0
  28. package/dist/tools/common/get-my-member-info.js.map +1 -0
  29. package/dist/tools/projects/create-task-comment.d.ts +92 -0
  30. package/dist/tools/projects/create-task-comment.d.ts.map +1 -0
  31. package/dist/tools/projects/create-task-comment.js +171 -0
  32. package/dist/tools/projects/create-task-comment.js.map +1 -0
  33. package/dist/tools/projects/create-task.d.ts +191 -0
  34. package/dist/tools/projects/create-task.d.ts.map +1 -0
  35. package/dist/tools/projects/create-task.js +217 -0
  36. package/dist/tools/projects/create-task.js.map +1 -0
  37. package/dist/tools/projects/get-milestone-list.d.ts +49 -0
  38. package/dist/tools/projects/get-milestone-list.d.ts.map +1 -0
  39. package/dist/tools/projects/get-milestone-list.js +112 -0
  40. package/dist/tools/projects/get-milestone-list.js.map +1 -0
  41. package/dist/tools/projects/get-project-list.d.ts +50 -0
  42. package/dist/tools/projects/get-project-list.d.ts.map +1 -0
  43. package/dist/tools/projects/get-project-list.js +113 -0
  44. package/dist/tools/projects/get-project-list.js.map +1 -0
  45. package/dist/tools/projects/get-project-member-group-list.d.ts +55 -0
  46. package/dist/tools/projects/get-project-member-group-list.d.ts.map +1 -0
  47. package/dist/tools/projects/get-project-member-group-list.js +127 -0
  48. package/dist/tools/projects/get-project-member-group-list.js.map +1 -0
  49. package/dist/tools/projects/get-project-member-list.d.ts +66 -0
  50. package/dist/tools/projects/get-project-member-list.d.ts.map +1 -0
  51. package/dist/tools/projects/get-project-member-list.js +159 -0
  52. package/dist/tools/projects/get-project-member-list.js.map +1 -0
  53. package/dist/tools/projects/get-project-template-list.d.ts +55 -0
  54. package/dist/tools/projects/get-project-template-list.d.ts.map +1 -0
  55. package/dist/tools/projects/get-project-template-list.js +127 -0
  56. package/dist/tools/projects/get-project-template-list.js.map +1 -0
  57. package/dist/tools/projects/get-project-template.d.ts +48 -0
  58. package/dist/tools/projects/get-project-template.d.ts.map +1 -0
  59. package/dist/tools/projects/get-project-template.js +132 -0
  60. package/dist/tools/projects/get-project-template.js.map +1 -0
  61. package/dist/tools/projects/get-project-workflow-list.d.ts +41 -0
  62. package/dist/tools/projects/get-project-workflow-list.d.ts.map +1 -0
  63. package/dist/tools/projects/get-project-workflow-list.js +107 -0
  64. package/dist/tools/projects/get-project-workflow-list.js.map +1 -0
  65. package/dist/tools/projects/get-project.d.ts +41 -0
  66. package/dist/tools/projects/get-project.d.ts.map +1 -0
  67. package/dist/tools/projects/get-project.js +110 -0
  68. package/dist/tools/projects/get-project.js.map +1 -0
  69. package/dist/tools/projects/get-tag-list.d.ts +55 -0
  70. package/dist/tools/projects/get-tag-list.d.ts.map +1 -0
  71. package/dist/tools/projects/get-tag-list.js +145 -0
  72. package/dist/tools/projects/get-tag-list.js.map +1 -0
  73. package/dist/tools/projects/get-task-comment-list.d.ts +63 -0
  74. package/dist/tools/projects/get-task-comment-list.d.ts.map +1 -0
  75. package/dist/tools/projects/get-task-comment-list.js +136 -0
  76. package/dist/tools/projects/get-task-comment-list.js.map +1 -0
  77. package/dist/tools/projects/get-task-list.d.ts +184 -0
  78. package/dist/tools/projects/get-task-list.d.ts.map +1 -0
  79. package/dist/tools/projects/get-task-list.js +257 -0
  80. package/dist/tools/projects/get-task-list.js.map +1 -0
  81. package/dist/tools/projects/get-task.d.ts +48 -0
  82. package/dist/tools/projects/get-task.d.ts.map +1 -0
  83. package/dist/tools/projects/get-task.js +130 -0
  84. package/dist/tools/projects/get-task.js.map +1 -0
  85. package/dist/tools/projects/update-task-comment.d.ts +92 -0
  86. package/dist/tools/projects/update-task-comment.d.ts.map +1 -0
  87. package/dist/tools/projects/update-task-comment.js +176 -0
  88. package/dist/tools/projects/update-task-comment.js.map +1 -0
  89. package/dist/tools/projects/update-task.d.ts +196 -0
  90. package/dist/tools/projects/update-task.d.ts.map +1 -0
  91. package/dist/tools/projects/update-task.js +227 -0
  92. package/dist/tools/projects/update-task.js.map +1 -0
  93. package/dist/tools/wiki/create-wiki-page.d.ts +89 -0
  94. package/dist/tools/wiki/create-wiki-page.d.ts.map +1 -0
  95. package/dist/tools/wiki/create-wiki-page.js +142 -0
  96. package/dist/tools/wiki/create-wiki-page.js.map +1 -0
  97. package/dist/tools/wiki/get-wiki-list.d.ts +58 -0
  98. package/dist/tools/wiki/get-wiki-list.d.ts.map +1 -0
  99. package/dist/tools/wiki/get-wiki-list.js +118 -0
  100. package/dist/tools/wiki/get-wiki-list.js.map +1 -0
  101. package/dist/tools/wiki/get-wiki-page-list.d.ts +65 -0
  102. package/dist/tools/wiki/get-wiki-page-list.d.ts.map +1 -0
  103. package/dist/tools/wiki/get-wiki-page-list.js +125 -0
  104. package/dist/tools/wiki/get-wiki-page-list.js.map +1 -0
  105. package/dist/tools/wiki/get-wiki-page.d.ts +48 -0
  106. package/dist/tools/wiki/get-wiki-page.d.ts.map +1 -0
  107. package/dist/tools/wiki/get-wiki-page.js +100 -0
  108. package/dist/tools/wiki/get-wiki-page.js.map +1 -0
  109. package/dist/tools/wiki/update-wiki-page.d.ts +89 -0
  110. package/dist/tools/wiki/update-wiki-page.d.ts.map +1 -0
  111. package/dist/tools/wiki/update-wiki-page.js +140 -0
  112. package/dist/tools/wiki/update-wiki-page.js.map +1 -0
  113. package/dist/types/config.d.ts +18 -0
  114. package/dist/types/config.d.ts.map +1 -0
  115. package/dist/types/config.js +6 -0
  116. package/dist/types/config.js.map +1 -0
  117. package/dist/types/dooray-api.d.ts +387 -0
  118. package/dist/types/dooray-api.d.ts.map +1 -0
  119. package/dist/types/dooray-api.js +7 -0
  120. package/dist/types/dooray-api.js.map +1 -0
  121. package/dist/utils/errors.d.ts +28 -0
  122. package/dist/utils/errors.d.ts.map +1 -0
  123. package/dist/utils/errors.js +60 -0
  124. package/dist/utils/errors.js.map +1 -0
  125. package/dist/utils/logger.d.ts +22 -0
  126. package/dist/utils/logger.d.ts.map +1 -0
  127. package/dist/utils/logger.js +50 -0
  128. package/dist/utils/logger.js.map +1 -0
  129. package/dist/utils/member-transform.d.ts +20 -0
  130. package/dist/utils/member-transform.d.ts.map +1 -0
  131. package/dist/utils/member-transform.js +48 -0
  132. package/dist/utils/member-transform.js.map +1 -0
  133. package/dist/utils/response-filters.d.ts +121 -0
  134. package/dist/utils/response-filters.d.ts.map +1 -0
  135. package/dist/utils/response-filters.js +166 -0
  136. package/dist/utils/response-filters.js.map +1 -0
  137. package/dooray-mcp.iml +8 -0
  138. package/package.json +54 -0
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Get Tag List Tool
3
+ * Get list of tags for a project
4
+ */
5
+ import { z } from 'zod';
6
+ export declare const getTagListSchema: z.ZodObject<{
7
+ projectId: z.ZodString;
8
+ page: z.ZodOptional<z.ZodNumber>;
9
+ size: z.ZodOptional<z.ZodNumber>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ projectId: string;
12
+ page?: number | undefined;
13
+ size?: number | undefined;
14
+ }, {
15
+ projectId: string;
16
+ page?: number | undefined;
17
+ size?: number | undefined;
18
+ }>;
19
+ export type GetTagListInput = z.infer<typeof getTagListSchema>;
20
+ export declare function getTagListHandler(args: GetTagListInput): Promise<{
21
+ content: {
22
+ type: string;
23
+ text: string;
24
+ }[];
25
+ isError?: undefined;
26
+ } | {
27
+ content: {
28
+ type: string;
29
+ text: string;
30
+ }[];
31
+ isError: boolean;
32
+ }>;
33
+ export declare const getTagListTool: {
34
+ name: string;
35
+ description: string;
36
+ inputSchema: {
37
+ type: string;
38
+ properties: {
39
+ projectId: {
40
+ type: string;
41
+ description: string;
42
+ };
43
+ page: {
44
+ type: string;
45
+ description: string;
46
+ };
47
+ size: {
48
+ type: string;
49
+ description: string;
50
+ };
51
+ };
52
+ required: string[];
53
+ };
54
+ };
55
+ //# sourceMappingURL=get-tag-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-tag-list.d.ts","sourceRoot":"","sources":["../../../src/tools/projects/get-tag-list.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAI3B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/D,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,eAAe;;;;;;;;;;;;GA8B5D;AAED,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;CA+D1B,CAAC"}
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+ /**
3
+ * Get Tag List Tool
4
+ * Get list of tags for a project
5
+ */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || (function () {
23
+ var ownKeys = function(o) {
24
+ ownKeys = Object.getOwnPropertyNames || function (o) {
25
+ var ar = [];
26
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
27
+ return ar;
28
+ };
29
+ return ownKeys(o);
30
+ };
31
+ return function (mod) {
32
+ if (mod && mod.__esModule) return mod;
33
+ var result = {};
34
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
35
+ __setModuleDefault(result, mod);
36
+ return result;
37
+ };
38
+ })();
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ exports.getTagListTool = exports.getTagListSchema = void 0;
41
+ exports.getTagListHandler = getTagListHandler;
42
+ const zod_1 = require("zod");
43
+ const projectsApi = __importStar(require("../../api/projects.js"));
44
+ const errors_js_1 = require("../../utils/errors.js");
45
+ const response_filters_js_1 = require("../../utils/response-filters.js");
46
+ exports.getTagListSchema = zod_1.z.object({
47
+ projectId: zod_1.z.string().describe('Project ID'),
48
+ page: zod_1.z.number().optional().describe('Page number (default: 0)'),
49
+ size: zod_1.z.number().optional().describe('Items per page (default: 100, max: 100)'),
50
+ });
51
+ async function getTagListHandler(args) {
52
+ try {
53
+ const result = await projectsApi.getTags({
54
+ projectId: args.projectId,
55
+ page: args.page,
56
+ size: args.size,
57
+ });
58
+ // Group tags by tagGroup for better organization
59
+ const groupedResult = (0, response_filters_js_1.groupTagsByTagGroup)(result.data);
60
+ return {
61
+ content: [
62
+ {
63
+ type: 'text',
64
+ text: JSON.stringify(groupedResult, null, 2),
65
+ },
66
+ ],
67
+ };
68
+ }
69
+ catch (error) {
70
+ return {
71
+ content: [
72
+ {
73
+ type: 'text',
74
+ text: `Error: ${(0, errors_js_1.formatError)(error)}`,
75
+ },
76
+ ],
77
+ isError: true,
78
+ };
79
+ }
80
+ }
81
+ exports.getTagListTool = {
82
+ name: 'get-tag-list',
83
+ description: `Get list of tags for a project, grouped by tag groups.
84
+
85
+ Tags are used to categorize and label tasks. This tool retrieves all available tags organized by their tag groups for better clarity.
86
+
87
+ **Response Format**:
88
+ Returns tags grouped by their tagGroup:
89
+ \`\`\`json
90
+ {
91
+ "tagGroups": [
92
+ {
93
+ "id": "group1",
94
+ "name": "Type",
95
+ "mandatory": true,
96
+ "selectOne": true,
97
+ "tags": [
98
+ { "id": "tag1", "name": "Bug" },
99
+ { "id": "tag2", "name": "Feature" }
100
+ ]
101
+ }
102
+ ]
103
+ }
104
+ \`\`\`
105
+
106
+ **CRITICAL - Mandatory Tag Groups**:
107
+ When creating/updating tasks, you MUST include tags from all mandatory tag groups:
108
+ - **mandatory: true** - At least one tag from this group is required
109
+ - **selectOne: true** - Exactly ONE tag must be selected from this group
110
+ - **selectOne: false** - One OR MORE tags must be selected from this group
111
+
112
+ Failing to provide required tags will result in a 500 error.
113
+
114
+ **URL Pattern Recognition**:
115
+ When given a Dooray URL like "https://nhnent.dooray.com/task/PROJECT_ID", extract the PROJECT_ID (the first numeric ID after "/task/") and use it as the projectId parameter.
116
+
117
+ **Pagination**:
118
+ - Default page size is 100 (maximum) to retrieve all tags
119
+ - Use page parameter to get additional pages if totalCount > 100
120
+
121
+ **Examples**:
122
+ - Get all tags: {"projectId": "123456"}
123
+ - Get second page: {"projectId": "123456", "page": 1, "size": 100}
124
+
125
+ Use tag IDs when creating or updating tasks with create-task or update-task tools.`,
126
+ inputSchema: {
127
+ type: 'object',
128
+ properties: {
129
+ projectId: {
130
+ type: 'string',
131
+ description: 'Project ID to get tags from',
132
+ },
133
+ page: {
134
+ type: 'number',
135
+ description: 'Page number for pagination (default: 0)',
136
+ },
137
+ size: {
138
+ type: 'number',
139
+ description: 'Number of items per page (default: 100, max: 100)',
140
+ },
141
+ },
142
+ required: ['projectId'],
143
+ },
144
+ };
145
+ //# sourceMappingURL=get-tag-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-tag-list.js","sourceRoot":"","sources":["../../../src/tools/projects/get-tag-list.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeH,8CA8BC;AA3CD,6BAAwB;AACxB,mEAAqD;AACrD,qDAAoD;AACpD,yEAAsE;AAEzD,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC;IAC5C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;IAChE,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;CAChF,CAAC,CAAC;AAII,KAAK,UAAU,iBAAiB,CAAC,IAAqB;IAC3D,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,OAAO,CAAC;YACvC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC,CAAC;QAEH,iDAAiD;QACjD,MAAM,aAAa,GAAG,IAAA,yCAAmB,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAEvD,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;iBAC7C;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,UAAU,IAAA,uBAAW,EAAC,KAAK,CAAC,EAAE;iBACrC;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC;AAEY,QAAA,cAAc,GAAG;IAC5B,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mFA0CoE;IACjF,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6BAA6B;aAC3C;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yCAAyC;aACvD;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,mDAAmD;aACjE;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;CACF,CAAC"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Get Task Comment List Tool
3
+ * Get list of comments on a specific task
4
+ */
5
+ import { z } from 'zod';
6
+ export declare const getTaskCommentListSchema: z.ZodObject<{
7
+ projectId: z.ZodString;
8
+ taskId: z.ZodString;
9
+ page: z.ZodOptional<z.ZodNumber>;
10
+ size: z.ZodOptional<z.ZodNumber>;
11
+ order: z.ZodOptional<z.ZodEnum<["createdAt", "-createdAt"]>>;
12
+ }, "strip", z.ZodTypeAny, {
13
+ projectId: string;
14
+ taskId: string;
15
+ page?: number | undefined;
16
+ size?: number | undefined;
17
+ order?: "createdAt" | "-createdAt" | undefined;
18
+ }, {
19
+ projectId: string;
20
+ taskId: string;
21
+ page?: number | undefined;
22
+ size?: number | undefined;
23
+ order?: "createdAt" | "-createdAt" | undefined;
24
+ }>;
25
+ export type GetTaskCommentListInput = z.infer<typeof getTaskCommentListSchema>;
26
+ export declare function getTaskCommentListHandler(args: GetTaskCommentListInput): Promise<string | {
27
+ content: {
28
+ type: string;
29
+ text: string;
30
+ }[];
31
+ }>;
32
+ export declare const getTaskCommentListTool: {
33
+ name: string;
34
+ description: string;
35
+ inputSchema: {
36
+ type: string;
37
+ properties: {
38
+ projectId: {
39
+ type: string;
40
+ description: string;
41
+ };
42
+ taskId: {
43
+ type: string;
44
+ description: string;
45
+ };
46
+ page: {
47
+ type: string;
48
+ description: string;
49
+ };
50
+ size: {
51
+ type: string;
52
+ description: string;
53
+ };
54
+ order: {
55
+ type: string;
56
+ enum: string[];
57
+ description: string;
58
+ };
59
+ };
60
+ required: string[];
61
+ };
62
+ };
63
+ //# sourceMappingURL=get-task-comment-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-task-comment-list.d.ts","sourceRoot":"","sources":["../../../src/tools/projects/get-task-comment-list.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;EAMnC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE/E,wBAAsB,yBAAyB,CAAC,IAAI,EAAE,uBAAuB;;;;;GAmB5E;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+DlC,CAAC"}
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+ /**
3
+ * Get Task Comment List Tool
4
+ * Get list of comments on a specific task
5
+ */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || (function () {
23
+ var ownKeys = function(o) {
24
+ ownKeys = Object.getOwnPropertyNames || function (o) {
25
+ var ar = [];
26
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
27
+ return ar;
28
+ };
29
+ return ownKeys(o);
30
+ };
31
+ return function (mod) {
32
+ if (mod && mod.__esModule) return mod;
33
+ var result = {};
34
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
35
+ __setModuleDefault(result, mod);
36
+ return result;
37
+ };
38
+ })();
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ exports.getTaskCommentListTool = exports.getTaskCommentListSchema = void 0;
41
+ exports.getTaskCommentListHandler = getTaskCommentListHandler;
42
+ const zod_1 = require("zod");
43
+ const projectsApi = __importStar(require("../../api/projects.js"));
44
+ const errors_js_1 = require("../../utils/errors.js");
45
+ const response_filters_js_1 = require("../../utils/response-filters.js");
46
+ exports.getTaskCommentListSchema = zod_1.z.object({
47
+ projectId: zod_1.z.string().describe('Project ID where the task belongs'),
48
+ taskId: zod_1.z.string().describe('Task ID to get comments from'),
49
+ page: zod_1.z.number().min(0).optional().describe('Page number (default: 0)'),
50
+ size: zod_1.z.number().min(1).max(100).optional().describe('Items per page (default: 20, max: 100)'),
51
+ order: zod_1.z.enum(['createdAt', '-createdAt']).optional().describe('Sort order: createdAt (oldest first, default), -createdAt (newest first)'),
52
+ });
53
+ async function getTaskCommentListHandler(args) {
54
+ try {
55
+ const result = await projectsApi.getTaskComments({
56
+ projectId: args.projectId,
57
+ taskId: args.taskId,
58
+ page: args.page,
59
+ size: args.size,
60
+ order: args.order,
61
+ });
62
+ // Filter response to reduce token usage
63
+ const filtered = (0, response_filters_js_1.filterPaginatedResponse)(result, response_filters_js_1.filterTaskCommentForList);
64
+ return {
65
+ content: [{ type: 'text', text: JSON.stringify(filtered, null, 2) }],
66
+ };
67
+ }
68
+ catch (error) {
69
+ return (0, errors_js_1.formatError)(error);
70
+ }
71
+ }
72
+ exports.getTaskCommentListTool = {
73
+ name: 'get-task-comment-list',
74
+ description: `Get list of comments (댓글) on a specific Dooray task.
75
+
76
+ This tool fetches all comments that have been added to a task. Comments are discussions, updates, or notes added by team members.
77
+
78
+ **URL Pattern Recognition**:
79
+ When given a Dooray task URL like "https://nhnent.dooray.com/task/PROJECT_ID/TASK_ID" or "https://nhnent.dooray.com/project/tasks/TASK_ID":
80
+ - Extract the first numeric ID after "/task/" as projectId (if present)
81
+ - Extract the second numeric ID (or the ID after "/tasks/") as taskId
82
+
83
+ **IMPORTANT**: Both projectId and taskId are REQUIRED.
84
+
85
+ **Pagination**:
86
+ - Default page size is 20 (maximum: 100)
87
+ - Use page parameter to get additional pages if totalCount > size
88
+
89
+ **Sorting**:
90
+ - Default: createdAt (oldest comments first)
91
+ - Use "-createdAt" to get newest comments first
92
+
93
+ **Note**: Returns filtered response with essential fields only (id, creator, body).
94
+
95
+ Examples:
96
+ - Get all comments (first page): {"projectId": "123456", "taskId": "789012"}
97
+ - Get newest comments first: {"projectId": "123456", "taskId": "789012", "order": "-createdAt"}
98
+ - Get second page: {"projectId": "123456", "taskId": "789012", "page": 1, "size": 20}
99
+
100
+ Returns a paginated response with totalCount and array of comments containing:
101
+ - **id**: Comment ID
102
+ - **creator**: Who wrote the comment (member or emailUser)
103
+ - For members: {"type": "member", "member": {"organizationMemberId": "..."}}
104
+ - For email users: {"type": "emailUser", "emailUser": {"emailAddress": "...", "name": "..."}}
105
+ - **body**: Comment content with mimeType and content
106
+
107
+ Use this tool to view discussion history, progress updates, or notes on a task.`,
108
+ inputSchema: {
109
+ type: 'object',
110
+ properties: {
111
+ projectId: {
112
+ type: 'string',
113
+ description: 'Project ID where the task belongs',
114
+ },
115
+ taskId: {
116
+ type: 'string',
117
+ description: 'Task ID to get comments from',
118
+ },
119
+ page: {
120
+ type: 'number',
121
+ description: 'Page number (default: 0)',
122
+ },
123
+ size: {
124
+ type: 'number',
125
+ description: 'Items per page (default: 20, max: 100)',
126
+ },
127
+ order: {
128
+ type: 'string',
129
+ enum: ['createdAt', '-createdAt'],
130
+ description: 'Sort order: createdAt (oldest first, default), -createdAt (newest first)',
131
+ },
132
+ },
133
+ required: ['projectId', 'taskId'],
134
+ },
135
+ };
136
+ //# sourceMappingURL=get-task-comment-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-task-comment-list.js","sourceRoot":"","sources":["../../../src/tools/projects/get-task-comment-list.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBH,8DAmBC;AAlCD,6BAAwB;AACxB,mEAAqD;AACrD,qDAAoD;AACpD,yEAAoG;AAEvF,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IACnE,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IAC3D,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;IACvE,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;IAC9F,KAAK,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0EAA0E,CAAC;CAC3I,CAAC,CAAC;AAII,KAAK,UAAU,yBAAyB,CAAC,IAA6B;IAC3E,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,eAAe,CAAC;YAC/C,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;QAEH,wCAAwC;QACxC,MAAM,QAAQ,GAAG,IAAA,6CAAuB,EAAC,MAAM,EAAE,8CAAwB,CAAC,CAAC;QAE3E,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;SACrE,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,IAAA,uBAAW,EAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;AACH,CAAC;AAEY,QAAA,sBAAsB,GAAG;IACpC,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gFAiCiE;IAC9E,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,mCAAmC;aACjD;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8BAA8B;aAC5C;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0BAA0B;aACxC;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wCAAwC;aACtD;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,WAAW,EAAE,YAAY,CAAC;gBACjC,WAAW,EAAE,0EAA0E;aACxF;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,EAAE,QAAQ,CAAC;KAClC;CACF,CAAC"}
@@ -0,0 +1,184 @@
1
+ /**
2
+ * Get Task List Tool
3
+ * Get list of tasks with filters
4
+ */
5
+ import { z } from 'zod';
6
+ export declare const getTaskListSchema: z.ZodObject<{
7
+ projectId: z.ZodString;
8
+ fromEmailAddress: z.ZodOptional<z.ZodString>;
9
+ fromMemberIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10
+ toMemberIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
11
+ ccMemberIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
12
+ tagIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
13
+ parentPostId: z.ZodOptional<z.ZodString>;
14
+ postNumber: z.ZodOptional<z.ZodNumber>;
15
+ postWorkflowClasses: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
16
+ postWorkflowIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
17
+ milestoneIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
18
+ subjects: z.ZodOptional<z.ZodString>;
19
+ createdAt: z.ZodOptional<z.ZodString>;
20
+ updatedAt: z.ZodOptional<z.ZodString>;
21
+ dueAt: z.ZodOptional<z.ZodString>;
22
+ order: z.ZodDefault<z.ZodOptional<z.ZodString>>;
23
+ page: z.ZodOptional<z.ZodNumber>;
24
+ size: z.ZodOptional<z.ZodNumber>;
25
+ }, "strip", z.ZodTypeAny, {
26
+ order: string;
27
+ projectId: string;
28
+ createdAt?: string | undefined;
29
+ page?: number | undefined;
30
+ size?: number | undefined;
31
+ fromEmailAddress?: string | undefined;
32
+ fromMemberIds?: string[] | undefined;
33
+ toMemberIds?: string[] | undefined;
34
+ ccMemberIds?: string[] | undefined;
35
+ tagIds?: string[] | undefined;
36
+ parentPostId?: string | undefined;
37
+ postNumber?: number | undefined;
38
+ postWorkflowClasses?: string[] | undefined;
39
+ postWorkflowIds?: string[] | undefined;
40
+ milestoneIds?: string[] | undefined;
41
+ subjects?: string | undefined;
42
+ updatedAt?: string | undefined;
43
+ dueAt?: string | undefined;
44
+ }, {
45
+ projectId: string;
46
+ createdAt?: string | undefined;
47
+ page?: number | undefined;
48
+ size?: number | undefined;
49
+ fromEmailAddress?: string | undefined;
50
+ fromMemberIds?: string[] | undefined;
51
+ toMemberIds?: string[] | undefined;
52
+ ccMemberIds?: string[] | undefined;
53
+ tagIds?: string[] | undefined;
54
+ parentPostId?: string | undefined;
55
+ postNumber?: number | undefined;
56
+ postWorkflowClasses?: string[] | undefined;
57
+ postWorkflowIds?: string[] | undefined;
58
+ milestoneIds?: string[] | undefined;
59
+ subjects?: string | undefined;
60
+ updatedAt?: string | undefined;
61
+ dueAt?: string | undefined;
62
+ order?: string | undefined;
63
+ }>;
64
+ export type GetTaskListInput = z.infer<typeof getTaskListSchema>;
65
+ export declare function getTaskListHandler(args: GetTaskListInput): Promise<{
66
+ content: {
67
+ type: string;
68
+ text: string;
69
+ }[];
70
+ isError?: undefined;
71
+ } | {
72
+ content: {
73
+ type: string;
74
+ text: string;
75
+ }[];
76
+ isError: boolean;
77
+ }>;
78
+ export declare const getTaskListTool: {
79
+ name: string;
80
+ description: string;
81
+ inputSchema: {
82
+ type: string;
83
+ properties: {
84
+ projectId: {
85
+ type: string;
86
+ description: string;
87
+ };
88
+ fromEmailAddress: {
89
+ type: string;
90
+ description: string;
91
+ };
92
+ fromMemberIds: {
93
+ type: string;
94
+ items: {
95
+ type: string;
96
+ };
97
+ description: string;
98
+ };
99
+ toMemberIds: {
100
+ type: string;
101
+ items: {
102
+ type: string;
103
+ };
104
+ description: string;
105
+ };
106
+ ccMemberIds: {
107
+ type: string;
108
+ items: {
109
+ type: string;
110
+ };
111
+ description: string;
112
+ };
113
+ tagIds: {
114
+ type: string;
115
+ items: {
116
+ type: string;
117
+ };
118
+ description: string;
119
+ };
120
+ parentPostId: {
121
+ type: string;
122
+ description: string;
123
+ };
124
+ postNumber: {
125
+ type: string;
126
+ description: string;
127
+ };
128
+ postWorkflowClasses: {
129
+ type: string;
130
+ items: {
131
+ type: string;
132
+ };
133
+ description: string;
134
+ };
135
+ postWorkflowIds: {
136
+ type: string;
137
+ items: {
138
+ type: string;
139
+ };
140
+ description: string;
141
+ };
142
+ milestoneIds: {
143
+ type: string;
144
+ items: {
145
+ type: string;
146
+ };
147
+ description: string;
148
+ };
149
+ subjects: {
150
+ type: string;
151
+ description: string;
152
+ };
153
+ createdAt: {
154
+ type: string;
155
+ description: string;
156
+ };
157
+ updatedAt: {
158
+ type: string;
159
+ description: string;
160
+ };
161
+ dueAt: {
162
+ type: string;
163
+ description: string;
164
+ };
165
+ order: {
166
+ type: string;
167
+ description: string;
168
+ };
169
+ page: {
170
+ type: string;
171
+ description: string;
172
+ minimum: number;
173
+ };
174
+ size: {
175
+ type: string;
176
+ description: string;
177
+ minimum: number;
178
+ maximum: number;
179
+ };
180
+ };
181
+ required: string[];
182
+ };
183
+ };
184
+ //# sourceMappingURL=get-task-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-task-list.d.ts","sourceRoot":"","sources":["../../../src/tools/projects/get-task-list.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwB5B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEjE,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,gBAAgB;;;;;;;;;;;;GA6C9D;AAED,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4I3B,CAAC"}