@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.
- package/.claude/settings.local.json +9 -0
- package/.serena/project.yml +84 -0
- package/CLAUDE.md +119 -0
- package/README.md +82 -0
- package/dist/api/client.d.ts +70 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +186 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/common.d.ts +14 -0
- package/dist/api/common.d.ts.map +1 -0
- package/dist/api/common.js +25 -0
- package/dist/api/common.js.map +1 -0
- package/dist/api/projects.d.ts +83 -0
- package/dist/api/projects.d.ts.map +1 -0
- package/dist/api/projects.js +300 -0
- package/dist/api/projects.js.map +1 -0
- package/dist/api/wiki.d.ts +38 -0
- package/dist/api/wiki.d.ts.map +1 -0
- package/dist/api/wiki.js +95 -0
- package/dist/api/wiki.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +227 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/common/get-my-member-info.d.ts +29 -0
- package/dist/tools/common/get-my-member-info.d.ts.map +1 -0
- package/dist/tools/common/get-my-member-info.js +95 -0
- package/dist/tools/common/get-my-member-info.js.map +1 -0
- package/dist/tools/projects/create-task-comment.d.ts +92 -0
- package/dist/tools/projects/create-task-comment.d.ts.map +1 -0
- package/dist/tools/projects/create-task-comment.js +171 -0
- package/dist/tools/projects/create-task-comment.js.map +1 -0
- package/dist/tools/projects/create-task.d.ts +191 -0
- package/dist/tools/projects/create-task.d.ts.map +1 -0
- package/dist/tools/projects/create-task.js +217 -0
- package/dist/tools/projects/create-task.js.map +1 -0
- package/dist/tools/projects/get-milestone-list.d.ts +49 -0
- package/dist/tools/projects/get-milestone-list.d.ts.map +1 -0
- package/dist/tools/projects/get-milestone-list.js +112 -0
- package/dist/tools/projects/get-milestone-list.js.map +1 -0
- package/dist/tools/projects/get-project-list.d.ts +50 -0
- package/dist/tools/projects/get-project-list.d.ts.map +1 -0
- package/dist/tools/projects/get-project-list.js +113 -0
- package/dist/tools/projects/get-project-list.js.map +1 -0
- package/dist/tools/projects/get-project-member-group-list.d.ts +55 -0
- package/dist/tools/projects/get-project-member-group-list.d.ts.map +1 -0
- package/dist/tools/projects/get-project-member-group-list.js +127 -0
- package/dist/tools/projects/get-project-member-group-list.js.map +1 -0
- package/dist/tools/projects/get-project-member-list.d.ts +66 -0
- package/dist/tools/projects/get-project-member-list.d.ts.map +1 -0
- package/dist/tools/projects/get-project-member-list.js +159 -0
- package/dist/tools/projects/get-project-member-list.js.map +1 -0
- package/dist/tools/projects/get-project-template-list.d.ts +55 -0
- package/dist/tools/projects/get-project-template-list.d.ts.map +1 -0
- package/dist/tools/projects/get-project-template-list.js +127 -0
- package/dist/tools/projects/get-project-template-list.js.map +1 -0
- package/dist/tools/projects/get-project-template.d.ts +48 -0
- package/dist/tools/projects/get-project-template.d.ts.map +1 -0
- package/dist/tools/projects/get-project-template.js +132 -0
- package/dist/tools/projects/get-project-template.js.map +1 -0
- package/dist/tools/projects/get-project-workflow-list.d.ts +41 -0
- package/dist/tools/projects/get-project-workflow-list.d.ts.map +1 -0
- package/dist/tools/projects/get-project-workflow-list.js +107 -0
- package/dist/tools/projects/get-project-workflow-list.js.map +1 -0
- package/dist/tools/projects/get-project.d.ts +41 -0
- package/dist/tools/projects/get-project.d.ts.map +1 -0
- package/dist/tools/projects/get-project.js +110 -0
- package/dist/tools/projects/get-project.js.map +1 -0
- package/dist/tools/projects/get-tag-list.d.ts +55 -0
- package/dist/tools/projects/get-tag-list.d.ts.map +1 -0
- package/dist/tools/projects/get-tag-list.js +145 -0
- package/dist/tools/projects/get-tag-list.js.map +1 -0
- package/dist/tools/projects/get-task-comment-list.d.ts +63 -0
- package/dist/tools/projects/get-task-comment-list.d.ts.map +1 -0
- package/dist/tools/projects/get-task-comment-list.js +136 -0
- package/dist/tools/projects/get-task-comment-list.js.map +1 -0
- package/dist/tools/projects/get-task-list.d.ts +184 -0
- package/dist/tools/projects/get-task-list.d.ts.map +1 -0
- package/dist/tools/projects/get-task-list.js +257 -0
- package/dist/tools/projects/get-task-list.js.map +1 -0
- package/dist/tools/projects/get-task.d.ts +48 -0
- package/dist/tools/projects/get-task.d.ts.map +1 -0
- package/dist/tools/projects/get-task.js +130 -0
- package/dist/tools/projects/get-task.js.map +1 -0
- package/dist/tools/projects/update-task-comment.d.ts +92 -0
- package/dist/tools/projects/update-task-comment.d.ts.map +1 -0
- package/dist/tools/projects/update-task-comment.js +176 -0
- package/dist/tools/projects/update-task-comment.js.map +1 -0
- package/dist/tools/projects/update-task.d.ts +196 -0
- package/dist/tools/projects/update-task.d.ts.map +1 -0
- package/dist/tools/projects/update-task.js +227 -0
- package/dist/tools/projects/update-task.js.map +1 -0
- package/dist/tools/wiki/create-wiki-page.d.ts +89 -0
- package/dist/tools/wiki/create-wiki-page.d.ts.map +1 -0
- package/dist/tools/wiki/create-wiki-page.js +142 -0
- package/dist/tools/wiki/create-wiki-page.js.map +1 -0
- package/dist/tools/wiki/get-wiki-list.d.ts +58 -0
- package/dist/tools/wiki/get-wiki-list.d.ts.map +1 -0
- package/dist/tools/wiki/get-wiki-list.js +118 -0
- package/dist/tools/wiki/get-wiki-list.js.map +1 -0
- package/dist/tools/wiki/get-wiki-page-list.d.ts +65 -0
- package/dist/tools/wiki/get-wiki-page-list.d.ts.map +1 -0
- package/dist/tools/wiki/get-wiki-page-list.js +125 -0
- package/dist/tools/wiki/get-wiki-page-list.js.map +1 -0
- package/dist/tools/wiki/get-wiki-page.d.ts +48 -0
- package/dist/tools/wiki/get-wiki-page.d.ts.map +1 -0
- package/dist/tools/wiki/get-wiki-page.js +100 -0
- package/dist/tools/wiki/get-wiki-page.js.map +1 -0
- package/dist/tools/wiki/update-wiki-page.d.ts +89 -0
- package/dist/tools/wiki/update-wiki-page.d.ts.map +1 -0
- package/dist/tools/wiki/update-wiki-page.js +140 -0
- package/dist/tools/wiki/update-wiki-page.js.map +1 -0
- package/dist/types/config.d.ts +18 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +6 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/dooray-api.d.ts +387 -0
- package/dist/types/dooray-api.d.ts.map +1 -0
- package/dist/types/dooray-api.js +7 -0
- package/dist/types/dooray-api.js.map +1 -0
- package/dist/utils/errors.d.ts +28 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +60 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/logger.d.ts +22 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +50 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/member-transform.d.ts +20 -0
- package/dist/utils/member-transform.d.ts.map +1 -0
- package/dist/utils/member-transform.js +48 -0
- package/dist/utils/member-transform.js.map +1 -0
- package/dist/utils/response-filters.d.ts +121 -0
- package/dist/utils/response-filters.d.ts.map +1 -0
- package/dist/utils/response-filters.js +166 -0
- package/dist/utils/response-filters.js.map +1 -0
- package/dooray-mcp.iml +8 -0
- package/package.json +54 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* Dooray MCP Server
|
|
5
|
+
* Main entry point for the Model Context Protocol server
|
|
6
|
+
*/
|
|
7
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
+
if (k2 === undefined) k2 = k;
|
|
9
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
+
}
|
|
13
|
+
Object.defineProperty(o, k2, desc);
|
|
14
|
+
}) : (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
}));
|
|
18
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
19
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
20
|
+
}) : function(o, v) {
|
|
21
|
+
o["default"] = v;
|
|
22
|
+
});
|
|
23
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
24
|
+
var ownKeys = function(o) {
|
|
25
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
26
|
+
var ar = [];
|
|
27
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
28
|
+
return ar;
|
|
29
|
+
};
|
|
30
|
+
return ownKeys(o);
|
|
31
|
+
};
|
|
32
|
+
return function (mod) {
|
|
33
|
+
if (mod && mod.__esModule) return mod;
|
|
34
|
+
var result = {};
|
|
35
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
36
|
+
__setModuleDefault(result, mod);
|
|
37
|
+
return result;
|
|
38
|
+
};
|
|
39
|
+
})();
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
const index_js_1 = require("@modelcontextprotocol/sdk/server/index.js");
|
|
42
|
+
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
43
|
+
const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
|
|
44
|
+
const dotenv = __importStar(require("dotenv"));
|
|
45
|
+
const client_js_1 = require("./api/client.js");
|
|
46
|
+
const logger_js_1 = require("./utils/logger.js");
|
|
47
|
+
// Import all tools
|
|
48
|
+
const get_my_member_info_js_1 = require("./tools/common/get-my-member-info.js");
|
|
49
|
+
const get_project_list_js_1 = require("./tools/projects/get-project-list.js");
|
|
50
|
+
const get_project_js_1 = require("./tools/projects/get-project.js");
|
|
51
|
+
const get_task_list_js_1 = require("./tools/projects/get-task-list.js");
|
|
52
|
+
const get_task_js_1 = require("./tools/projects/get-task.js");
|
|
53
|
+
const create_task_js_1 = require("./tools/projects/create-task.js");
|
|
54
|
+
const update_task_js_1 = require("./tools/projects/update-task.js");
|
|
55
|
+
const create_task_comment_js_1 = require("./tools/projects/create-task-comment.js");
|
|
56
|
+
const get_task_comment_list_js_1 = require("./tools/projects/get-task-comment-list.js");
|
|
57
|
+
const update_task_comment_js_1 = require("./tools/projects/update-task-comment.js");
|
|
58
|
+
const get_milestone_list_js_1 = require("./tools/projects/get-milestone-list.js");
|
|
59
|
+
const get_tag_list_js_1 = require("./tools/projects/get-tag-list.js");
|
|
60
|
+
const get_project_template_list_js_1 = require("./tools/projects/get-project-template-list.js");
|
|
61
|
+
const get_project_template_js_1 = require("./tools/projects/get-project-template.js");
|
|
62
|
+
const get_project_member_list_js_1 = require("./tools/projects/get-project-member-list.js");
|
|
63
|
+
const get_project_member_group_list_js_1 = require("./tools/projects/get-project-member-group-list.js");
|
|
64
|
+
const get_project_workflow_list_js_1 = require("./tools/projects/get-project-workflow-list.js");
|
|
65
|
+
// Load environment variables
|
|
66
|
+
dotenv.config();
|
|
67
|
+
/**
|
|
68
|
+
* Tool registry mapping tool names to their handlers and schemas
|
|
69
|
+
*/
|
|
70
|
+
const toolRegistry = {
|
|
71
|
+
// Common tools
|
|
72
|
+
'get-my-member-info': { handler: get_my_member_info_js_1.getMyMemberInfoHandler, schema: get_my_member_info_js_1.getMyMemberInfoSchema },
|
|
73
|
+
// Projects tools
|
|
74
|
+
'get-project-list': { handler: get_project_list_js_1.getProjectListHandler, schema: get_project_list_js_1.getProjectListSchema },
|
|
75
|
+
'get-project': { handler: get_project_js_1.getProjectHandler, schema: get_project_js_1.getProjectSchema },
|
|
76
|
+
'get-task-list': { handler: get_task_list_js_1.getTaskListHandler, schema: get_task_list_js_1.getTaskListSchema },
|
|
77
|
+
'get-task': { handler: get_task_js_1.getTaskHandler, schema: get_task_js_1.getTaskSchema },
|
|
78
|
+
'create-task': { handler: create_task_js_1.createTaskHandler, schema: create_task_js_1.createTaskSchema },
|
|
79
|
+
'update-task': { handler: update_task_js_1.updateTaskHandler, schema: update_task_js_1.updateTaskSchema },
|
|
80
|
+
'create-task-comment': { handler: create_task_comment_js_1.createTaskCommentHandler, schema: create_task_comment_js_1.createTaskCommentSchema },
|
|
81
|
+
'get-task-comment-list': { handler: get_task_comment_list_js_1.getTaskCommentListHandler, schema: get_task_comment_list_js_1.getTaskCommentListSchema },
|
|
82
|
+
'update-task-comment': { handler: update_task_comment_js_1.updateTaskCommentHandler, schema: update_task_comment_js_1.updateTaskCommentSchema },
|
|
83
|
+
'get-milestone-list': { handler: get_milestone_list_js_1.getMilestoneListHandler, schema: get_milestone_list_js_1.getMilestoneListSchema },
|
|
84
|
+
'get-tag-list': { handler: get_tag_list_js_1.getTagListHandler, schema: get_tag_list_js_1.getTagListSchema },
|
|
85
|
+
'get-project-template-list': { handler: get_project_template_list_js_1.getProjectTemplateListHandler, schema: get_project_template_list_js_1.getProjectTemplateListSchema },
|
|
86
|
+
'get-project-template': { handler: get_project_template_js_1.getProjectTemplateHandler, schema: get_project_template_js_1.getProjectTemplateSchema },
|
|
87
|
+
'get-project-member-list': { handler: get_project_member_list_js_1.getProjectMemberListHandler, schema: get_project_member_list_js_1.getProjectMemberListSchema },
|
|
88
|
+
'get-project-member-group-list': { handler: get_project_member_group_list_js_1.getProjectMemberGroupListHandler, schema: get_project_member_group_list_js_1.getProjectMemberGroupListSchema },
|
|
89
|
+
'get-project-workflow-list': { handler: get_project_workflow_list_js_1.getProjectWorkflowListHandler, schema: get_project_workflow_list_js_1.getProjectWorkflowListSchema },
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* List of all available tools
|
|
93
|
+
*/
|
|
94
|
+
const tools = [
|
|
95
|
+
get_my_member_info_js_1.getMyMemberInfoTool,
|
|
96
|
+
get_project_list_js_1.getProjectListTool,
|
|
97
|
+
get_project_js_1.getProjectTool,
|
|
98
|
+
get_task_list_js_1.getTaskListTool,
|
|
99
|
+
get_task_js_1.getTaskTool,
|
|
100
|
+
create_task_js_1.createTaskTool,
|
|
101
|
+
update_task_js_1.updateTaskTool,
|
|
102
|
+
create_task_comment_js_1.createTaskCommentTool,
|
|
103
|
+
get_task_comment_list_js_1.getTaskCommentListTool,
|
|
104
|
+
update_task_comment_js_1.updateTaskCommentTool,
|
|
105
|
+
get_milestone_list_js_1.getMilestoneListTool,
|
|
106
|
+
get_tag_list_js_1.getTagListTool,
|
|
107
|
+
get_project_template_list_js_1.getProjectTemplateListTool,
|
|
108
|
+
get_project_template_js_1.getProjectTemplateTool,
|
|
109
|
+
get_project_member_list_js_1.getProjectMemberListTool,
|
|
110
|
+
get_project_member_group_list_js_1.getProjectMemberGroupListTool,
|
|
111
|
+
get_project_workflow_list_js_1.getProjectWorkflowListTool,
|
|
112
|
+
];
|
|
113
|
+
/**
|
|
114
|
+
* Main server initialization
|
|
115
|
+
*/
|
|
116
|
+
async function main() {
|
|
117
|
+
logger_js_1.logger.info('Starting Dooray MCP Server...');
|
|
118
|
+
// Validate API token
|
|
119
|
+
const apiToken = process.env.DOORAY_API_TOKEN;
|
|
120
|
+
if (!apiToken) {
|
|
121
|
+
logger_js_1.logger.error('DOORAY_API_TOKEN environment variable is required');
|
|
122
|
+
process.exit(1);
|
|
123
|
+
}
|
|
124
|
+
// Initialize Dooray API client
|
|
125
|
+
try {
|
|
126
|
+
(0, client_js_1.initializeClient)({
|
|
127
|
+
apiToken,
|
|
128
|
+
baseUrl: process.env.DOORAY_API_BASE_URL,
|
|
129
|
+
});
|
|
130
|
+
logger_js_1.logger.info('Dooray API client initialized');
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
logger_js_1.logger.error('Failed to initialize Dooray API client:', error);
|
|
134
|
+
process.exit(1);
|
|
135
|
+
}
|
|
136
|
+
// Create MCP server
|
|
137
|
+
const server = new index_js_1.Server({
|
|
138
|
+
name: 'dooray-mcp',
|
|
139
|
+
version: '0.1.0',
|
|
140
|
+
}, {
|
|
141
|
+
capabilities: {
|
|
142
|
+
tools: {},
|
|
143
|
+
},
|
|
144
|
+
});
|
|
145
|
+
// Handle list tools request
|
|
146
|
+
server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
|
|
147
|
+
logger_js_1.logger.debug('Handling list_tools request');
|
|
148
|
+
return {
|
|
149
|
+
tools,
|
|
150
|
+
};
|
|
151
|
+
});
|
|
152
|
+
// Handle call tool request
|
|
153
|
+
server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
154
|
+
const { name, arguments: args } = request.params;
|
|
155
|
+
logger_js_1.logger.info(`Tool called: ${name}`);
|
|
156
|
+
logger_js_1.logger.debug(`Tool arguments:`, args);
|
|
157
|
+
const tool = toolRegistry[name];
|
|
158
|
+
if (!tool) {
|
|
159
|
+
logger_js_1.logger.error(`Unknown tool: ${name}`);
|
|
160
|
+
return {
|
|
161
|
+
content: [
|
|
162
|
+
{
|
|
163
|
+
type: 'text',
|
|
164
|
+
text: `Error: Unknown tool '${name}'`,
|
|
165
|
+
},
|
|
166
|
+
],
|
|
167
|
+
isError: true,
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
try {
|
|
171
|
+
// Validate arguments with Zod schema
|
|
172
|
+
const validatedArgs = tool.schema.parse(args || {});
|
|
173
|
+
// Call the tool handler
|
|
174
|
+
const result = await tool.handler(validatedArgs);
|
|
175
|
+
logger_js_1.logger.debug(`Tool ${name} completed successfully`);
|
|
176
|
+
return result;
|
|
177
|
+
}
|
|
178
|
+
catch (error) {
|
|
179
|
+
logger_js_1.logger.error(`Tool ${name} failed:`, error);
|
|
180
|
+
// Handle Zod validation errors
|
|
181
|
+
if (error && typeof error === 'object' && 'errors' in error) {
|
|
182
|
+
const zodError = error;
|
|
183
|
+
const errorMessages = zodError.errors
|
|
184
|
+
.map(e => `${e.path.join('.')}: ${e.message}`)
|
|
185
|
+
.join(', ');
|
|
186
|
+
return {
|
|
187
|
+
content: [
|
|
188
|
+
{
|
|
189
|
+
type: 'text',
|
|
190
|
+
text: `Validation Error: ${errorMessages}`,
|
|
191
|
+
},
|
|
192
|
+
],
|
|
193
|
+
isError: true,
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
return {
|
|
197
|
+
content: [
|
|
198
|
+
{
|
|
199
|
+
type: 'text',
|
|
200
|
+
text: `Error: ${error instanceof Error ? error.message : String(error)}`,
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
isError: true,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
// Start the server with stdio transport
|
|
208
|
+
const transport = new stdio_js_1.StdioServerTransport();
|
|
209
|
+
await server.connect(transport);
|
|
210
|
+
logger_js_1.logger.info(`Dooray MCP Server running with ${tools.length} tools`);
|
|
211
|
+
logger_js_1.logger.info('Tools available: ' + tools.map(t => t.name).join(', '));
|
|
212
|
+
}
|
|
213
|
+
// Error handling
|
|
214
|
+
process.on('uncaughtException', (error) => {
|
|
215
|
+
logger_js_1.logger.error('Uncaught exception:', error);
|
|
216
|
+
process.exit(1);
|
|
217
|
+
});
|
|
218
|
+
process.on('unhandledRejection', (reason, promise) => {
|
|
219
|
+
logger_js_1.logger.error('Unhandled rejection at:', promise, 'reason:', reason);
|
|
220
|
+
process.exit(1);
|
|
221
|
+
});
|
|
222
|
+
// Start the server
|
|
223
|
+
main().catch((error) => {
|
|
224
|
+
logger_js_1.logger.error('Failed to start server:', error);
|
|
225
|
+
process.exit(1);
|
|
226
|
+
});
|
|
227
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AACA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,wEAAmE;AACnE,wEAAiF;AACjF,iEAG4C;AAC5C,+CAAiC;AACjC,+CAAmD;AACnD,iDAA2C;AAE3C,mBAAmB;AACnB,gFA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C;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC,kBAAM,CAAC,IAAI,CAAC,kCAAkC,KAAK,CAAC,MAAM,QAAQ,CAAC,CAAC;IACpE,kBAAM,CAAC,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AACvE,CAAC;AAED,iBAAiB;AACjB,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,CAAC,KAAK,EAAE,EAAE;IACxC,kBAAM,CAAC,KAAK,CAAC,qBAAqB,EAAE,KAAK,CAAC,CAAC;IAC3C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE;IACnD,kBAAM,CAAC,KAAK,CAAC,yBAAyB,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IACpE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,mBAAmB;AACnB,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,kBAAM,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;IAC/C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get My Member Info Tool
|
|
3
|
+
* Get information about the authenticated user
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export declare const getMyMemberInfoSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
7
|
+
export type GetMyMemberInfoInput = z.infer<typeof getMyMemberInfoSchema>;
|
|
8
|
+
export declare function getMyMemberInfoHandler(args: GetMyMemberInfoInput): Promise<{
|
|
9
|
+
content: {
|
|
10
|
+
type: string;
|
|
11
|
+
text: string;
|
|
12
|
+
}[];
|
|
13
|
+
isError?: undefined;
|
|
14
|
+
} | {
|
|
15
|
+
content: {
|
|
16
|
+
type: string;
|
|
17
|
+
text: string;
|
|
18
|
+
}[];
|
|
19
|
+
isError: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const getMyMemberInfoTool: {
|
|
22
|
+
name: string;
|
|
23
|
+
description: string;
|
|
24
|
+
inputSchema: {
|
|
25
|
+
type: string;
|
|
26
|
+
properties: {};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=get-my-member-info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-my-member-info.d.ts","sourceRoot":"","sources":["../../../src/tools/common/get-my-member-info.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,qBAAqB,gDAAe,CAAC;AAElD,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEzE,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,oBAAoB;;;;;;;;;;;;GAuBtE;AAED,eAAO,MAAM,mBAAmB;;;;;;;CAwB/B,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Get My Member Info Tool
|
|
4
|
+
* Get information about the authenticated user
|
|
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.getMyMemberInfoTool = exports.getMyMemberInfoSchema = void 0;
|
|
41
|
+
exports.getMyMemberInfoHandler = getMyMemberInfoHandler;
|
|
42
|
+
const zod_1 = require("zod");
|
|
43
|
+
const commonApi = __importStar(require("../../api/common.js"));
|
|
44
|
+
const errors_js_1 = require("../../utils/errors.js");
|
|
45
|
+
exports.getMyMemberInfoSchema = zod_1.z.object({});
|
|
46
|
+
async function getMyMemberInfoHandler(args) {
|
|
47
|
+
try {
|
|
48
|
+
const result = await commonApi.getMyMemberInfo();
|
|
49
|
+
return {
|
|
50
|
+
content: [
|
|
51
|
+
{
|
|
52
|
+
type: 'text',
|
|
53
|
+
text: JSON.stringify(result, null, 2),
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
return {
|
|
60
|
+
content: [
|
|
61
|
+
{
|
|
62
|
+
type: 'text',
|
|
63
|
+
text: `Error: ${(0, errors_js_1.formatError)(error)}`,
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
isError: true,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.getMyMemberInfoTool = {
|
|
71
|
+
name: 'get-my-member-info',
|
|
72
|
+
description: `Get information about the authenticated user.
|
|
73
|
+
|
|
74
|
+
This tool retrieves your Dooray member profile using your API token. Most importantly, it returns your member ID which is needed for other operations like filtering tasks by assignee.
|
|
75
|
+
|
|
76
|
+
No parameters needed - it automatically uses your authentication token.
|
|
77
|
+
|
|
78
|
+
Examples:
|
|
79
|
+
- Get my info: {} (empty parameters)
|
|
80
|
+
- "What's my Dooray member ID?"
|
|
81
|
+
- "Show my Dooray profile"
|
|
82
|
+
|
|
83
|
+
Returns your complete member profile including:
|
|
84
|
+
- **id**: Your member ID (important for task queries)
|
|
85
|
+
- name, email, organization
|
|
86
|
+
- locale, timezone settings
|
|
87
|
+
- display preferences
|
|
88
|
+
|
|
89
|
+
This is often the first tool to call to get your member ID for use in other tools like list-tasks.`,
|
|
90
|
+
inputSchema: {
|
|
91
|
+
type: 'object',
|
|
92
|
+
properties: {},
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=get-my-member-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-my-member-info.js","sourceRoot":"","sources":["../../../src/tools/common/get-my-member-info.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUH,wDAuBC;AA/BD,6BAAwB;AACxB,+DAAiD;AACjD,qDAAoD;AAEvC,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAI3C,KAAK,UAAU,sBAAsB,CAAC,IAA0B;IACrE,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,eAAe,EAAE,CAAC;QAEjD,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;iBACtC;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,mBAAmB,GAAG;IACjC,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE;;;;;;;;;;;;;;;;;mGAiBoF;IACjG,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,EAAE;KACf;CACF,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create Task Comment Tool
|
|
3
|
+
* Add a comment to an existing task
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export declare const createTaskCommentSchema: z.ZodObject<{
|
|
7
|
+
projectId: z.ZodString;
|
|
8
|
+
taskId: z.ZodString;
|
|
9
|
+
body: z.ZodObject<{
|
|
10
|
+
mimeType: z.ZodEnum<["text/x-markdown", "text/html"]>;
|
|
11
|
+
content: z.ZodString;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
mimeType: "text/x-markdown" | "text/html";
|
|
14
|
+
content: string;
|
|
15
|
+
}, {
|
|
16
|
+
mimeType: "text/x-markdown" | "text/html";
|
|
17
|
+
content: string;
|
|
18
|
+
}>;
|
|
19
|
+
attachFileIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
body: {
|
|
22
|
+
mimeType: "text/x-markdown" | "text/html";
|
|
23
|
+
content: string;
|
|
24
|
+
};
|
|
25
|
+
projectId: string;
|
|
26
|
+
taskId: string;
|
|
27
|
+
attachFileIds?: string[] | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
body: {
|
|
30
|
+
mimeType: "text/x-markdown" | "text/html";
|
|
31
|
+
content: string;
|
|
32
|
+
};
|
|
33
|
+
projectId: string;
|
|
34
|
+
taskId: string;
|
|
35
|
+
attachFileIds?: string[] | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
export type CreateTaskCommentInput = z.infer<typeof createTaskCommentSchema>;
|
|
38
|
+
export declare function createTaskCommentHandler(args: CreateTaskCommentInput): Promise<{
|
|
39
|
+
content: {
|
|
40
|
+
type: string;
|
|
41
|
+
text: string;
|
|
42
|
+
}[];
|
|
43
|
+
isError?: undefined;
|
|
44
|
+
} | {
|
|
45
|
+
content: {
|
|
46
|
+
type: string;
|
|
47
|
+
text: string;
|
|
48
|
+
}[];
|
|
49
|
+
isError: boolean;
|
|
50
|
+
}>;
|
|
51
|
+
export declare const createTaskCommentTool: {
|
|
52
|
+
name: string;
|
|
53
|
+
description: string;
|
|
54
|
+
inputSchema: {
|
|
55
|
+
type: string;
|
|
56
|
+
properties: {
|
|
57
|
+
projectId: {
|
|
58
|
+
type: string;
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
taskId: {
|
|
62
|
+
type: string;
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
body: {
|
|
66
|
+
type: string;
|
|
67
|
+
properties: {
|
|
68
|
+
mimeType: {
|
|
69
|
+
type: string;
|
|
70
|
+
enum: string[];
|
|
71
|
+
description: string;
|
|
72
|
+
};
|
|
73
|
+
content: {
|
|
74
|
+
type: string;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
required: string[];
|
|
79
|
+
description: string;
|
|
80
|
+
};
|
|
81
|
+
attachFileIds: {
|
|
82
|
+
type: string;
|
|
83
|
+
items: {
|
|
84
|
+
type: string;
|
|
85
|
+
};
|
|
86
|
+
description: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
required: string[];
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=create-task-comment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-task-comment.d.ts","sourceRoot":"","sources":["../../../src/tools/projects/create-task-comment.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKlC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE7E,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,sBAAsB;;;;;;;;;;;;GA4B1E;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsFjC,CAAC"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Create Task Comment Tool
|
|
4
|
+
* Add a comment to an existing 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.createTaskCommentTool = exports.createTaskCommentSchema = void 0;
|
|
41
|
+
exports.createTaskCommentHandler = createTaskCommentHandler;
|
|
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 bodySchema = zod_1.z.object({
|
|
46
|
+
mimeType: zod_1.z.enum(['text/x-markdown', 'text/html']),
|
|
47
|
+
content: zod_1.z.string(),
|
|
48
|
+
});
|
|
49
|
+
exports.createTaskCommentSchema = zod_1.z.object({
|
|
50
|
+
projectId: zod_1.z.string().describe('Project ID where the task belongs'),
|
|
51
|
+
taskId: zod_1.z.string().describe('Task ID to add comment to'),
|
|
52
|
+
body: bodySchema.describe('Comment content'),
|
|
53
|
+
attachFileIds: zod_1.z.array(zod_1.z.string()).optional().describe('Array of file IDs to attach (optional)'),
|
|
54
|
+
});
|
|
55
|
+
async function createTaskCommentHandler(args) {
|
|
56
|
+
try {
|
|
57
|
+
const result = await projectsApi.createTaskComment({
|
|
58
|
+
projectId: args.projectId,
|
|
59
|
+
taskId: args.taskId,
|
|
60
|
+
body: args.body,
|
|
61
|
+
attachFileIds: args.attachFileIds,
|
|
62
|
+
});
|
|
63
|
+
return {
|
|
64
|
+
content: [
|
|
65
|
+
{
|
|
66
|
+
type: 'text',
|
|
67
|
+
text: JSON.stringify(result, null, 2),
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
return {
|
|
74
|
+
content: [
|
|
75
|
+
{
|
|
76
|
+
type: 'text',
|
|
77
|
+
text: `Error: ${(0, errors_js_1.formatError)(error)}`,
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
isError: true,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.createTaskCommentTool = {
|
|
85
|
+
name: 'create-task-comment',
|
|
86
|
+
description: `Add a comment (댓글) to an existing Dooray task.
|
|
87
|
+
|
|
88
|
+
This tool creates a comment on a task, separate from editing the task body itself. Use this for:
|
|
89
|
+
- Adding progress updates or status notes
|
|
90
|
+
- Responding to questions or discussions
|
|
91
|
+
- Logging information related to the task
|
|
92
|
+
- Attaching files with context
|
|
93
|
+
|
|
94
|
+
**When to Use**:
|
|
95
|
+
- **create-task-comment**: For adding discussion, updates, or notes (댓글)
|
|
96
|
+
- **update-task**: For modifying the task description, title, or metadata
|
|
97
|
+
|
|
98
|
+
**URL Pattern Recognition**:
|
|
99
|
+
When given a Dooray task URL like "https://nhnent.dooray.com/task/PROJECT_ID/TASK_ID":
|
|
100
|
+
- Extract the first numeric ID after "/task/" as projectId
|
|
101
|
+
- Extract the second numeric ID as taskId
|
|
102
|
+
|
|
103
|
+
**File Attachments**:
|
|
104
|
+
- To attach files, first upload them using the file upload API
|
|
105
|
+
- Then provide the returned file IDs in the attachFileIds parameter
|
|
106
|
+
- See: https://helpdesk.dooray.com/share/pages/9wWo-xwiR66BO5LGshgVTg/2939987647631384419
|
|
107
|
+
|
|
108
|
+
**Content Format**:
|
|
109
|
+
- Use "text/x-markdown" for markdown formatting (recommended)
|
|
110
|
+
- Use "text/html" for rich HTML content
|
|
111
|
+
- Body format: {"mimeType": "text/x-markdown", "content": "..."}
|
|
112
|
+
|
|
113
|
+
**Examples**:
|
|
114
|
+
- Simple comment: {
|
|
115
|
+
"projectId": "123456",
|
|
116
|
+
"taskId": "789012",
|
|
117
|
+
"body": {"mimeType": "text/x-markdown", "content": "Progress update: Completed initial implementation"}
|
|
118
|
+
}
|
|
119
|
+
- With markdown: {
|
|
120
|
+
"projectId": "123456",
|
|
121
|
+
"taskId": "789012",
|
|
122
|
+
"body": {
|
|
123
|
+
"mimeType": "text/x-markdown",
|
|
124
|
+
"content": "## Test Results\\n\\n- ✅ All unit tests passing\\n- ✅ Integration tests passed\\n- ⏳ Performance testing in progress"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
- With file attachments: {
|
|
128
|
+
"projectId": "123456",
|
|
129
|
+
"taskId": "789012",
|
|
130
|
+
"body": {"mimeType": "text/x-markdown", "content": "See attached screenshots"},
|
|
131
|
+
"attachFileIds": ["file123", "file456"]
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
Returns: Created comment with ID.`,
|
|
135
|
+
inputSchema: {
|
|
136
|
+
type: 'object',
|
|
137
|
+
properties: {
|
|
138
|
+
projectId: {
|
|
139
|
+
type: 'string',
|
|
140
|
+
description: 'Project ID where the task belongs',
|
|
141
|
+
},
|
|
142
|
+
taskId: {
|
|
143
|
+
type: 'string',
|
|
144
|
+
description: 'Task ID to add comment to',
|
|
145
|
+
},
|
|
146
|
+
body: {
|
|
147
|
+
type: 'object',
|
|
148
|
+
properties: {
|
|
149
|
+
mimeType: {
|
|
150
|
+
type: 'string',
|
|
151
|
+
enum: ['text/x-markdown', 'text/html'],
|
|
152
|
+
description: 'Content format (use text/x-markdown for most cases)',
|
|
153
|
+
},
|
|
154
|
+
content: {
|
|
155
|
+
type: 'string',
|
|
156
|
+
description: 'Comment content',
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
required: ['mimeType', 'content'],
|
|
160
|
+
description: 'Comment content with format',
|
|
161
|
+
},
|
|
162
|
+
attachFileIds: {
|
|
163
|
+
type: 'array',
|
|
164
|
+
items: { type: 'string' },
|
|
165
|
+
description: 'Array of file IDs to attach (optional). Files must be uploaded first using the file upload API.',
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
required: ['projectId', 'taskId', 'body'],
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
//# sourceMappingURL=create-task-comment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-task-comment.js","sourceRoot":"","sources":["../../../src/tools/projects/create-task-comment.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBH,4DA4BC;AA9CD,6BAAwB;AACxB,mEAAqD;AACrD,qDAAoD;AAEpD,MAAM,UAAU,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1B,QAAQ,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;IAClD,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC;AAEU,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,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