huly-mcp-selfhost 1.0.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 (77) hide show
  1. package/.env.example +16 -0
  2. package/README.md +522 -0
  3. package/dist/connection.d.ts +9 -0
  4. package/dist/connection.js +122 -0
  5. package/dist/connection.js.map +1 -0
  6. package/dist/index.d.ts +2 -0
  7. package/dist/index.js +25 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/schemas.d.ts +459 -0
  10. package/dist/schemas.js +196 -0
  11. package/dist/schemas.js.map +1 -0
  12. package/dist/server.d.ts +2 -0
  13. package/dist/server.js +87 -0
  14. package/dist/server.js.map +1 -0
  15. package/dist/tools/attachments.d.ts +28 -0
  16. package/dist/tools/attachments.js +61 -0
  17. package/dist/tools/attachments.js.map +1 -0
  18. package/dist/tools/channels.d.ts +44 -0
  19. package/dist/tools/channels.js +130 -0
  20. package/dist/tools/channels.js.map +1 -0
  21. package/dist/tools/comments.d.ts +27 -0
  22. package/dist/tools/comments.js +60 -0
  23. package/dist/tools/comments.js.map +1 -0
  24. package/dist/tools/components.d.ts +19 -0
  25. package/dist/tools/components.js +57 -0
  26. package/dist/tools/components.js.map +1 -0
  27. package/dist/tools/documents.d.ts +68 -0
  28. package/dist/tools/documents.js +207 -0
  29. package/dist/tools/documents.js.map +1 -0
  30. package/dist/tools/issues.d.ts +56 -0
  31. package/dist/tools/issues.js +262 -0
  32. package/dist/tools/issues.js.map +1 -0
  33. package/dist/tools/labels.d.ts +35 -0
  34. package/dist/tools/labels.js +150 -0
  35. package/dist/tools/labels.js.map +1 -0
  36. package/dist/tools/log-time.d.ts +10 -0
  37. package/dist/tools/log-time.js +31 -0
  38. package/dist/tools/log-time.js.map +1 -0
  39. package/dist/tools/members.d.ts +6 -0
  40. package/dist/tools/members.js +17 -0
  41. package/dist/tools/members.js.map +1 -0
  42. package/dist/tools/milestones.d.ts +19 -0
  43. package/dist/tools/milestones.js +80 -0
  44. package/dist/tools/milestones.js.map +1 -0
  45. package/dist/tools/organizations.d.ts +32 -0
  46. package/dist/tools/organizations.js +86 -0
  47. package/dist/tools/organizations.js.map +1 -0
  48. package/dist/tools/projects.d.ts +24 -0
  49. package/dist/tools/projects.js +64 -0
  50. package/dist/tools/projects.js.map +1 -0
  51. package/dist/tools/relations.d.ts +27 -0
  52. package/dist/tools/relations.js +103 -0
  53. package/dist/tools/relations.js.map +1 -0
  54. package/dist/tools/search.d.ts +9 -0
  55. package/dist/tools/search.js +32 -0
  56. package/dist/tools/search.js.map +1 -0
  57. package/dist/tools/statuses.d.ts +16 -0
  58. package/dist/tools/statuses.js +93 -0
  59. package/dist/tools/statuses.js.map +1 -0
  60. package/dist/utils/errors.d.ts +11 -0
  61. package/dist/utils/errors.js +24 -0
  62. package/dist/utils/errors.js.map +1 -0
  63. package/dist/utils/format.d.ts +4 -0
  64. package/dist/utils/format.js +28 -0
  65. package/dist/utils/format.js.map +1 -0
  66. package/dist/utils/markdown.d.ts +14 -0
  67. package/dist/utils/markdown.js +144 -0
  68. package/dist/utils/markdown.js.map +1 -0
  69. package/dist/utils/storage.d.ts +7 -0
  70. package/dist/utils/storage.js +82 -0
  71. package/dist/utils/storage.js.map +1 -0
  72. package/package.json +68 -0
  73. package/scripts/cleanup-issues.js +132 -0
  74. package/scripts/demo.js +193 -0
  75. package/scripts/import-csv.js +242 -0
  76. package/scripts/sample-tasks.csv +11 -0
  77. package/scripts/setup.js +103 -0
package/dist/index.js ADDED
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
5
+ const server_1 = require("./server");
6
+ const connection_1 = require("./connection");
7
+ async function main() {
8
+ const server = (0, server_1.createServer)();
9
+ const transport = new stdio_js_1.StdioServerTransport();
10
+ process.on('SIGINT', async () => {
11
+ await (0, connection_1.closeConnection)();
12
+ process.exit(0);
13
+ });
14
+ process.on('SIGTERM', async () => {
15
+ await (0, connection_1.closeConnection)();
16
+ process.exit(0);
17
+ });
18
+ await server.connect(transport);
19
+ // Process stays alive — connection maintained until shutdown
20
+ }
21
+ main().catch((err) => {
22
+ console.error('Fatal error starting huly-mcp:', err);
23
+ process.exit(1);
24
+ });
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,wEAAgF;AAChF,qCAAuC;AACvC,6CAA8C;AAE9C,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,IAAA,qBAAY,GAAE,CAAA;IAC7B,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAA;IAE5C,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;QAC9B,MAAM,IAAA,4BAAe,GAAE,CAAA;QACvB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC,CAAC,CAAA;IACF,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QAC/B,MAAM,IAAA,4BAAe,GAAE,CAAA;QACvB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC,CAAC,CAAA;IAEF,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;IAC/B,6DAA6D;AAC/D,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,gCAAgC,EAAE,GAAG,CAAC,CAAA;IACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC,CAAC,CAAA"}
@@ -0,0 +1,459 @@
1
+ import { z } from 'zod';
2
+ export declare const GetProjectSchema: z.ZodObject<{
3
+ identifier: z.ZodString;
4
+ }, "strip", z.ZodTypeAny, {
5
+ identifier: string;
6
+ }, {
7
+ identifier: string;
8
+ }>;
9
+ export declare const ListIssuesSchema: z.ZodObject<{
10
+ projectIdentifier: z.ZodString;
11
+ status: z.ZodOptional<z.ZodString>;
12
+ priority: z.ZodOptional<z.ZodEnum<["NoPriority", "Urgent", "High", "Medium", "Low"]>>;
13
+ limit: z.ZodDefault<z.ZodNumber>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ projectIdentifier: string;
16
+ limit: number;
17
+ status?: string | undefined;
18
+ priority?: "Medium" | "NoPriority" | "Urgent" | "High" | "Low" | undefined;
19
+ }, {
20
+ projectIdentifier: string;
21
+ status?: string | undefined;
22
+ priority?: "Medium" | "NoPriority" | "Urgent" | "High" | "Low" | undefined;
23
+ limit?: number | undefined;
24
+ }>;
25
+ export declare const GetIssueSchema: z.ZodObject<{
26
+ identifier: z.ZodString;
27
+ }, "strip", z.ZodTypeAny, {
28
+ identifier: string;
29
+ }, {
30
+ identifier: string;
31
+ }>;
32
+ export declare const CreateIssueSchema: z.ZodObject<{
33
+ projectIdentifier: z.ZodString;
34
+ title: z.ZodString;
35
+ description: z.ZodOptional<z.ZodString>;
36
+ priority: z.ZodDefault<z.ZodEnum<["NoPriority", "Urgent", "High", "Medium", "Low"]>>;
37
+ statusName: z.ZodOptional<z.ZodString>;
38
+ dueDate: z.ZodOptional<z.ZodString>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ title: string;
41
+ projectIdentifier: string;
42
+ priority: "Medium" | "NoPriority" | "Urgent" | "High" | "Low";
43
+ description?: string | undefined;
44
+ statusName?: string | undefined;
45
+ dueDate?: string | undefined;
46
+ }, {
47
+ title: string;
48
+ projectIdentifier: string;
49
+ priority?: "Medium" | "NoPriority" | "Urgent" | "High" | "Low" | undefined;
50
+ description?: string | undefined;
51
+ statusName?: string | undefined;
52
+ dueDate?: string | undefined;
53
+ }>;
54
+ export declare const DeleteIssueSchema: z.ZodObject<{
55
+ identifier: z.ZodString;
56
+ }, "strip", z.ZodTypeAny, {
57
+ identifier: string;
58
+ }, {
59
+ identifier: string;
60
+ }>;
61
+ export declare const UpdateIssueSchema: z.ZodObject<{
62
+ identifier: z.ZodString;
63
+ title: z.ZodOptional<z.ZodString>;
64
+ description: z.ZodOptional<z.ZodString>;
65
+ statusName: z.ZodOptional<z.ZodString>;
66
+ priority: z.ZodOptional<z.ZodEnum<["NoPriority", "Urgent", "High", "Medium", "Low"]>>;
67
+ dueDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
68
+ assignee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
69
+ componentLabel: z.ZodOptional<z.ZodString>;
70
+ milestoneLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
71
+ }, "strip", z.ZodTypeAny, {
72
+ identifier: string;
73
+ title?: string | undefined;
74
+ priority?: "Medium" | "NoPriority" | "Urgent" | "High" | "Low" | undefined;
75
+ description?: string | undefined;
76
+ statusName?: string | undefined;
77
+ dueDate?: string | null | undefined;
78
+ assignee?: string | null | undefined;
79
+ componentLabel?: string | undefined;
80
+ milestoneLabel?: string | null | undefined;
81
+ }, {
82
+ identifier: string;
83
+ title?: string | undefined;
84
+ priority?: "Medium" | "NoPriority" | "Urgent" | "High" | "Low" | undefined;
85
+ description?: string | undefined;
86
+ statusName?: string | undefined;
87
+ dueDate?: string | null | undefined;
88
+ assignee?: string | null | undefined;
89
+ componentLabel?: string | undefined;
90
+ milestoneLabel?: string | null | undefined;
91
+ }>;
92
+ export declare const AddCommentSchema: z.ZodObject<{
93
+ identifier: z.ZodString;
94
+ message: z.ZodString;
95
+ }, "strip", z.ZodTypeAny, {
96
+ message: string;
97
+ identifier: string;
98
+ }, {
99
+ message: string;
100
+ identifier: string;
101
+ }>;
102
+ export declare const ListMilestonesSchema: z.ZodObject<{
103
+ projectIdentifier: z.ZodString;
104
+ }, "strip", z.ZodTypeAny, {
105
+ projectIdentifier: string;
106
+ }, {
107
+ projectIdentifier: string;
108
+ }>;
109
+ export declare const CreateMilestoneSchema: z.ZodObject<{
110
+ projectIdentifier: z.ZodString;
111
+ label: z.ZodString;
112
+ targetDate: z.ZodString;
113
+ status: z.ZodDefault<z.ZodEnum<["Planned", "InProgress", "Completed", "Canceled"]>>;
114
+ }, "strip", z.ZodTypeAny, {
115
+ status: "Planned" | "InProgress" | "Completed" | "Canceled";
116
+ label: string;
117
+ projectIdentifier: string;
118
+ targetDate: string;
119
+ }, {
120
+ label: string;
121
+ projectIdentifier: string;
122
+ targetDate: string;
123
+ status?: "Planned" | "InProgress" | "Completed" | "Canceled" | undefined;
124
+ }>;
125
+ export declare const ListComponentsSchema: z.ZodObject<{
126
+ projectIdentifier: z.ZodString;
127
+ }, "strip", z.ZodTypeAny, {
128
+ projectIdentifier: string;
129
+ }, {
130
+ projectIdentifier: string;
131
+ }>;
132
+ export declare const CreateComponentSchema: z.ZodObject<{
133
+ projectIdentifier: z.ZodString;
134
+ label: z.ZodString;
135
+ description: z.ZodOptional<z.ZodString>;
136
+ lead: z.ZodOptional<z.ZodString>;
137
+ }, "strip", z.ZodTypeAny, {
138
+ label: string;
139
+ projectIdentifier: string;
140
+ description?: string | undefined;
141
+ lead?: string | undefined;
142
+ }, {
143
+ label: string;
144
+ projectIdentifier: string;
145
+ description?: string | undefined;
146
+ lead?: string | undefined;
147
+ }>;
148
+ export declare const CreateProjectSchema: z.ZodObject<{
149
+ name: z.ZodString;
150
+ identifier: z.ZodString;
151
+ description: z.ZodOptional<z.ZodString>;
152
+ }, "strip", z.ZodTypeAny, {
153
+ identifier: string;
154
+ name: string;
155
+ description?: string | undefined;
156
+ }, {
157
+ identifier: string;
158
+ name: string;
159
+ description?: string | undefined;
160
+ }>;
161
+ export declare const DeleteDocumentSchema: z.ZodObject<{
162
+ documentId: z.ZodString;
163
+ }, "strip", z.ZodTypeAny, {
164
+ documentId: string;
165
+ }, {
166
+ documentId: string;
167
+ }>;
168
+ export declare const CreateTeamspaceSchema: z.ZodObject<{
169
+ name: z.ZodString;
170
+ description: z.ZodOptional<z.ZodString>;
171
+ isPrivate: z.ZodDefault<z.ZodBoolean>;
172
+ }, "strip", z.ZodTypeAny, {
173
+ name: string;
174
+ isPrivate: boolean;
175
+ description?: string | undefined;
176
+ }, {
177
+ name: string;
178
+ description?: string | undefined;
179
+ isPrivate?: boolean | undefined;
180
+ }>;
181
+ export declare const ListDocumentsSchema: z.ZodObject<{
182
+ teamspaceId: z.ZodString;
183
+ }, "strip", z.ZodTypeAny, {
184
+ teamspaceId: string;
185
+ }, {
186
+ teamspaceId: string;
187
+ }>;
188
+ export declare const GetDocumentSchema: z.ZodObject<{
189
+ documentId: z.ZodString;
190
+ }, "strip", z.ZodTypeAny, {
191
+ documentId: string;
192
+ }, {
193
+ documentId: string;
194
+ }>;
195
+ export declare const CreateDocumentSchema: z.ZodObject<{
196
+ teamspaceId: z.ZodString;
197
+ title: z.ZodString;
198
+ parentId: z.ZodOptional<z.ZodString>;
199
+ }, "strip", z.ZodTypeAny, {
200
+ title: string;
201
+ teamspaceId: string;
202
+ parentId?: string | undefined;
203
+ }, {
204
+ title: string;
205
+ teamspaceId: string;
206
+ parentId?: string | undefined;
207
+ }>;
208
+ export declare const SearchIssuesSchema: z.ZodObject<{
209
+ query: z.ZodString;
210
+ limit: z.ZodDefault<z.ZodNumber>;
211
+ }, "strip", z.ZodTypeAny, {
212
+ limit: number;
213
+ query: string;
214
+ }, {
215
+ query: string;
216
+ limit?: number | undefined;
217
+ }>;
218
+ export declare const ListLabelsSchema: z.ZodObject<{
219
+ projectIdentifier: z.ZodOptional<z.ZodString>;
220
+ }, "strip", z.ZodTypeAny, {
221
+ projectIdentifier?: string | undefined;
222
+ }, {
223
+ projectIdentifier?: string | undefined;
224
+ }>;
225
+ export declare const CreateLabelSchema: z.ZodObject<{
226
+ title: z.ZodString;
227
+ color: z.ZodOptional<z.ZodString>;
228
+ }, "strip", z.ZodTypeAny, {
229
+ title: string;
230
+ color?: string | undefined;
231
+ }, {
232
+ title: string;
233
+ color?: string | undefined;
234
+ }>;
235
+ export declare const AddLabelSchema: z.ZodObject<{
236
+ identifier: z.ZodString;
237
+ labelName: z.ZodString;
238
+ }, "strip", z.ZodTypeAny, {
239
+ identifier: string;
240
+ labelName: string;
241
+ }, {
242
+ identifier: string;
243
+ labelName: string;
244
+ }>;
245
+ export declare const RemoveLabelSchema: z.ZodObject<{
246
+ identifier: z.ZodString;
247
+ labelName: z.ZodString;
248
+ }, "strip", z.ZodTypeAny, {
249
+ identifier: string;
250
+ labelName: string;
251
+ }, {
252
+ identifier: string;
253
+ labelName: string;
254
+ }>;
255
+ export declare const AddRelationSchema: z.ZodObject<{
256
+ identifier: z.ZodString;
257
+ relatedTo: z.ZodString;
258
+ }, "strip", z.ZodTypeAny, {
259
+ identifier: string;
260
+ relatedTo: string;
261
+ }, {
262
+ identifier: string;
263
+ relatedTo: string;
264
+ }>;
265
+ export declare const AddBlockedBySchema: z.ZodObject<{
266
+ identifier: z.ZodString;
267
+ blockedBy: z.ZodString;
268
+ }, "strip", z.ZodTypeAny, {
269
+ identifier: string;
270
+ blockedBy: string;
271
+ }, {
272
+ identifier: string;
273
+ blockedBy: string;
274
+ }>;
275
+ export declare const SetParentSchema: z.ZodObject<{
276
+ identifier: z.ZodString;
277
+ parentIdentifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
278
+ }, "strip", z.ZodTypeAny, {
279
+ identifier: string;
280
+ parentIdentifier?: string | null | undefined;
281
+ }, {
282
+ identifier: string;
283
+ parentIdentifier?: string | null | undefined;
284
+ }>;
285
+ export declare const ListCommentsSchema: z.ZodObject<{
286
+ identifier: z.ZodString;
287
+ limit: z.ZodDefault<z.ZodNumber>;
288
+ }, "strip", z.ZodTypeAny, {
289
+ identifier: string;
290
+ limit: number;
291
+ }, {
292
+ identifier: string;
293
+ limit?: number | undefined;
294
+ }>;
295
+ export declare const LogTimeSchema: z.ZodObject<{
296
+ identifier: z.ZodString;
297
+ hours: z.ZodNumber;
298
+ description: z.ZodOptional<z.ZodString>;
299
+ }, "strip", z.ZodTypeAny, {
300
+ identifier: string;
301
+ hours: number;
302
+ description?: string | undefined;
303
+ }, {
304
+ identifier: string;
305
+ hours: number;
306
+ description?: string | undefined;
307
+ }>;
308
+ export declare const UpdateDocumentSchema: z.ZodObject<{
309
+ documentId: z.ZodString;
310
+ markdown: z.ZodString;
311
+ }, "strip", z.ZodTypeAny, {
312
+ documentId: string;
313
+ markdown: string;
314
+ }, {
315
+ documentId: string;
316
+ markdown: string;
317
+ }>;
318
+ export declare const DeleteCommentSchema: z.ZodObject<{
319
+ identifier: z.ZodString;
320
+ commentId: z.ZodString;
321
+ }, "strip", z.ZodTypeAny, {
322
+ identifier: string;
323
+ commentId: string;
324
+ }, {
325
+ identifier: string;
326
+ commentId: string;
327
+ }>;
328
+ export declare const LinkDocumentSchema: z.ZodObject<{
329
+ identifier: z.ZodString;
330
+ documentId: z.ZodString;
331
+ }, "strip", z.ZodTypeAny, {
332
+ identifier: string;
333
+ documentId: string;
334
+ }, {
335
+ identifier: string;
336
+ documentId: string;
337
+ }>;
338
+ export declare const ListChannelsSchema: z.ZodObject<{
339
+ includeArchived: z.ZodDefault<z.ZodBoolean>;
340
+ }, "strip", z.ZodTypeAny, {
341
+ includeArchived: boolean;
342
+ }, {
343
+ includeArchived?: boolean | undefined;
344
+ }>;
345
+ export declare const CreateChannelSchema: z.ZodObject<{
346
+ name: z.ZodString;
347
+ topic: z.ZodOptional<z.ZodString>;
348
+ isPrivate: z.ZodDefault<z.ZodBoolean>;
349
+ }, "strip", z.ZodTypeAny, {
350
+ name: string;
351
+ isPrivate: boolean;
352
+ topic?: string | undefined;
353
+ }, {
354
+ name: string;
355
+ isPrivate?: boolean | undefined;
356
+ topic?: string | undefined;
357
+ }>;
358
+ export declare const StartDirectMessageSchema: z.ZodObject<{
359
+ member: z.ZodString;
360
+ }, "strip", z.ZodTypeAny, {
361
+ member: string;
362
+ }, {
363
+ member: string;
364
+ }>;
365
+ export declare const SendMessageSchema: z.ZodObject<{
366
+ spaceId: z.ZodString;
367
+ message: z.ZodString;
368
+ }, "strip", z.ZodTypeAny, {
369
+ message: string;
370
+ spaceId: string;
371
+ }, {
372
+ message: string;
373
+ spaceId: string;
374
+ }>;
375
+ export declare const ListMessagesSchema: z.ZodObject<{
376
+ spaceId: z.ZodString;
377
+ limit: z.ZodDefault<z.ZodNumber>;
378
+ }, "strip", z.ZodTypeAny, {
379
+ limit: number;
380
+ spaceId: string;
381
+ }, {
382
+ spaceId: string;
383
+ limit?: number | undefined;
384
+ }>;
385
+ export declare const AttachFileSchema: z.ZodObject<{
386
+ identifier: z.ZodString;
387
+ filename: z.ZodString;
388
+ contentBase64: z.ZodString;
389
+ mimeType: z.ZodDefault<z.ZodString>;
390
+ }, "strip", z.ZodTypeAny, {
391
+ identifier: string;
392
+ filename: string;
393
+ contentBase64: string;
394
+ mimeType: string;
395
+ }, {
396
+ identifier: string;
397
+ filename: string;
398
+ contentBase64: string;
399
+ mimeType?: string | undefined;
400
+ }>;
401
+ export declare const ListAttachmentsSchema: z.ZodObject<{
402
+ identifier: z.ZodString;
403
+ }, "strip", z.ZodTypeAny, {
404
+ identifier: string;
405
+ }, {
406
+ identifier: string;
407
+ }>;
408
+ export declare const DeleteAttachmentSchema: z.ZodObject<{
409
+ identifier: z.ZodString;
410
+ attachmentId: z.ZodString;
411
+ }, "strip", z.ZodTypeAny, {
412
+ identifier: string;
413
+ attachmentId: string;
414
+ }, {
415
+ identifier: string;
416
+ attachmentId: string;
417
+ }>;
418
+ export declare const ListIssueStatusesSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
419
+ export declare const CreateIssueStatusSchema: z.ZodObject<{
420
+ name: z.ZodString;
421
+ category: z.ZodEnum<["Backlog", "Todo", "InProgress", "Done", "Cancelled"]>;
422
+ color: z.ZodOptional<z.ZodString>;
423
+ }, "strip", z.ZodTypeAny, {
424
+ name: string;
425
+ category: "InProgress" | "Backlog" | "Todo" | "Done" | "Cancelled";
426
+ color?: string | undefined;
427
+ }, {
428
+ name: string;
429
+ category: "InProgress" | "Backlog" | "Todo" | "Done" | "Cancelled";
430
+ color?: string | undefined;
431
+ }>;
432
+ export declare const ListOrganizationsSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
433
+ export declare const GetOrganizationSchema: z.ZodObject<{
434
+ organizationId: z.ZodString;
435
+ }, "strip", z.ZodTypeAny, {
436
+ organizationId: string;
437
+ }, {
438
+ organizationId: string;
439
+ }>;
440
+ export declare const CreateOrganizationSchema: z.ZodObject<{
441
+ name: z.ZodString;
442
+ city: z.ZodOptional<z.ZodString>;
443
+ }, "strip", z.ZodTypeAny, {
444
+ name: string;
445
+ city?: string | undefined;
446
+ }, {
447
+ name: string;
448
+ city?: string | undefined;
449
+ }>;
450
+ export declare const UpdateOrganizationSchema: z.ZodObject<{
451
+ organizationId: z.ZodString;
452
+ description: z.ZodString;
453
+ }, "strip", z.ZodTypeAny, {
454
+ description: string;
455
+ organizationId: string;
456
+ }, {
457
+ description: string;
458
+ organizationId: string;
459
+ }>;
@@ -0,0 +1,196 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateOrganizationSchema = exports.CreateOrganizationSchema = exports.GetOrganizationSchema = exports.ListOrganizationsSchema = exports.CreateIssueStatusSchema = exports.ListIssueStatusesSchema = exports.DeleteAttachmentSchema = exports.ListAttachmentsSchema = exports.AttachFileSchema = exports.ListMessagesSchema = exports.SendMessageSchema = exports.StartDirectMessageSchema = exports.CreateChannelSchema = exports.ListChannelsSchema = exports.LinkDocumentSchema = exports.DeleteCommentSchema = exports.UpdateDocumentSchema = exports.LogTimeSchema = exports.ListCommentsSchema = exports.SetParentSchema = exports.AddBlockedBySchema = exports.AddRelationSchema = exports.RemoveLabelSchema = exports.AddLabelSchema = exports.CreateLabelSchema = exports.ListLabelsSchema = exports.SearchIssuesSchema = exports.CreateDocumentSchema = exports.GetDocumentSchema = exports.ListDocumentsSchema = exports.CreateTeamspaceSchema = exports.DeleteDocumentSchema = exports.CreateProjectSchema = exports.CreateComponentSchema = exports.ListComponentsSchema = exports.CreateMilestoneSchema = exports.ListMilestonesSchema = exports.AddCommentSchema = exports.UpdateIssueSchema = exports.DeleteIssueSchema = exports.CreateIssueSchema = exports.GetIssueSchema = exports.ListIssuesSchema = exports.GetProjectSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const PriorityEnum = zod_1.z.enum(['NoPriority', 'Urgent', 'High', 'Medium', 'Low']);
6
+ exports.GetProjectSchema = zod_1.z.object({
7
+ identifier: zod_1.z.string().describe('Project identifier, e.g. "PROJ"')
8
+ });
9
+ exports.ListIssuesSchema = zod_1.z.object({
10
+ projectIdentifier: zod_1.z.string().describe('Project identifier, e.g. "PROJ"'),
11
+ status: zod_1.z.string().optional().describe('Filter by status name, e.g. "In Progress"'),
12
+ priority: PriorityEnum.optional().describe('Filter by priority'),
13
+ limit: zod_1.z.number().int().min(1).max(250).default(50).describe('Max issues to return')
14
+ });
15
+ exports.GetIssueSchema = zod_1.z.object({
16
+ identifier: zod_1.z.string().describe('Issue identifier, e.g. "PROJ-123"')
17
+ });
18
+ exports.CreateIssueSchema = zod_1.z.object({
19
+ projectIdentifier: zod_1.z.string().describe('Project identifier, e.g. "PROJ"'),
20
+ title: zod_1.z.string().min(1).describe('Issue title'),
21
+ description: zod_1.z.string().optional().describe('Issue description as Markdown (headings, bold, code, lists, tables, mermaid supported)'),
22
+ priority: PriorityEnum.default('NoPriority').describe('Issue priority'),
23
+ statusName: zod_1.z.string().optional().describe('Status name (defaults to project default)'),
24
+ dueDate: zod_1.z.string().optional().describe('Due date as ISO 8601 string, e.g. "2026-04-01"')
25
+ });
26
+ exports.DeleteIssueSchema = zod_1.z.object({
27
+ identifier: zod_1.z.string().describe('Issue identifier to delete, e.g. "PROJ-123"')
28
+ });
29
+ exports.UpdateIssueSchema = zod_1.z.object({
30
+ identifier: zod_1.z.string().describe('Issue identifier, e.g. "PROJ-123"'),
31
+ title: zod_1.z.string().optional().describe('New title'),
32
+ description: zod_1.z.string().optional().describe('New description as Markdown (replaces existing content)'),
33
+ statusName: zod_1.z.string().optional().describe('New status name'),
34
+ priority: PriorityEnum.optional().describe('New priority'),
35
+ dueDate: zod_1.z.string().nullable().optional().describe('New due date (ISO 8601) or null to clear'),
36
+ assignee: zod_1.z.string().nullable().optional().describe('Assignee name (first/last/full) or null to unassign'),
37
+ componentLabel: zod_1.z.string().optional().describe('Component name to assign, or null to unassign'),
38
+ milestoneLabel: zod_1.z.string().nullable().optional().describe('Milestone name to assign, or null to clear')
39
+ });
40
+ exports.AddCommentSchema = zod_1.z.object({
41
+ identifier: zod_1.z.string().describe('Issue identifier, e.g. "PROJ-123"'),
42
+ message: zod_1.z.string().min(1).describe('Comment text')
43
+ });
44
+ exports.ListMilestonesSchema = zod_1.z.object({
45
+ projectIdentifier: zod_1.z.string().describe('Project identifier, e.g. "PROJ"')
46
+ });
47
+ const MilestoneStatusEnum = zod_1.z.enum(['Planned', 'InProgress', 'Completed', 'Canceled']);
48
+ exports.CreateMilestoneSchema = zod_1.z.object({
49
+ projectIdentifier: zod_1.z.string().describe('Project identifier, e.g. "PROJ"'),
50
+ label: zod_1.z.string().min(1).describe('Milestone name'),
51
+ targetDate: zod_1.z.string().describe('Target date as ISO 8601 string, e.g. "2026-06-01"'),
52
+ status: MilestoneStatusEnum.default('Planned').describe('Milestone status')
53
+ });
54
+ exports.ListComponentsSchema = zod_1.z.object({
55
+ projectIdentifier: zod_1.z.string().describe('Project identifier, e.g. "PROJ"')
56
+ });
57
+ exports.CreateComponentSchema = zod_1.z.object({
58
+ projectIdentifier: zod_1.z.string().describe('Project identifier, e.g. "PROJ"'),
59
+ label: zod_1.z.string().min(1).describe('Component name'),
60
+ description: zod_1.z.string().optional().describe('Component description'),
61
+ lead: zod_1.z.string().optional().describe('Lead member name (first/last/full)')
62
+ });
63
+ exports.CreateProjectSchema = zod_1.z.object({
64
+ name: zod_1.z.string().min(1).describe('Project name, e.g. "My Project"'),
65
+ identifier: zod_1.z.string().min(1).max(5).regex(/^[A-Z]+$/).describe('Short ALL-CAPS identifier, e.g. "MYPROJ"'),
66
+ description: zod_1.z.string().optional().describe('Project description')
67
+ });
68
+ exports.DeleteDocumentSchema = zod_1.z.object({
69
+ documentId: zod_1.z.string().describe('Document _id to delete (from list_documents)')
70
+ });
71
+ exports.CreateTeamspaceSchema = zod_1.z.object({
72
+ name: zod_1.z.string().min(1).describe('Teamspace name'),
73
+ description: zod_1.z.string().optional().describe('Optional description'),
74
+ isPrivate: zod_1.z.boolean().default(false).describe('Whether the teamspace is private (default: false = visible to all members)')
75
+ });
76
+ exports.ListDocumentsSchema = zod_1.z.object({
77
+ teamspaceId: zod_1.z.string().describe('Teamspace _id from list_teamspaces')
78
+ });
79
+ exports.GetDocumentSchema = zod_1.z.object({
80
+ documentId: zod_1.z.string().describe('Document _id from list_documents')
81
+ });
82
+ exports.CreateDocumentSchema = zod_1.z.object({
83
+ teamspaceId: zod_1.z.string().describe('Teamspace _id from list_teamspaces'),
84
+ title: zod_1.z.string().min(1).describe('Document title'),
85
+ parentId: zod_1.z.string().optional().describe('Parent document _id (for nested docs); omit for top-level')
86
+ });
87
+ exports.SearchIssuesSchema = zod_1.z.object({
88
+ query: zod_1.z.string().min(1).describe('Search query'),
89
+ limit: zod_1.z.number().int().min(1).max(50).default(20).describe('Max results')
90
+ });
91
+ // ── Labels ────────────────────────────────────────────────────────────────────
92
+ exports.ListLabelsSchema = zod_1.z.object({
93
+ projectIdentifier: zod_1.z.string().optional().describe('Optional project filter (currently returns all workspace labels)')
94
+ });
95
+ exports.CreateLabelSchema = zod_1.z.object({
96
+ title: zod_1.z.string().min(1).describe('Label name'),
97
+ color: zod_1.z.string().optional().describe('Hex color, e.g. "#FF6B6B" (optional)')
98
+ });
99
+ exports.AddLabelSchema = zod_1.z.object({
100
+ identifier: zod_1.z.string().describe('Issue identifier, e.g. "PROJ-123"'),
101
+ labelName: zod_1.z.string().min(1).describe('Label name to add (auto-created if it does not exist)')
102
+ });
103
+ exports.RemoveLabelSchema = zod_1.z.object({
104
+ identifier: zod_1.z.string().describe('Issue identifier, e.g. "PROJ-123"'),
105
+ labelName: zod_1.z.string().min(1).describe('Label name to remove')
106
+ });
107
+ // ── Relations ─────────────────────────────────────────────────────────────────
108
+ exports.AddRelationSchema = zod_1.z.object({
109
+ identifier: zod_1.z.string().describe('Issue identifier, e.g. "PROJ-123"'),
110
+ relatedTo: zod_1.z.string().describe('Related issue identifier, e.g. "PROJ-456"')
111
+ });
112
+ exports.AddBlockedBySchema = zod_1.z.object({
113
+ identifier: zod_1.z.string().describe('Issue that is blocked, e.g. "PROJ-123"'),
114
+ blockedBy: zod_1.z.string().describe('Issue that blocks it, e.g. "PROJ-100"')
115
+ });
116
+ exports.SetParentSchema = zod_1.z.object({
117
+ identifier: zod_1.z.string().describe('Child issue identifier, e.g. "PROJ-123"'),
118
+ parentIdentifier: zod_1.z.string().nullable().optional().describe('Parent issue identifier, or null to clear parent')
119
+ });
120
+ exports.ListCommentsSchema = zod_1.z.object({
121
+ identifier: zod_1.z.string().describe('Issue identifier, e.g. "PROJ-123"'),
122
+ limit: zod_1.z.number().int().min(1).max(100).default(20).describe('Max comments to return')
123
+ });
124
+ exports.LogTimeSchema = zod_1.z.object({
125
+ identifier: zod_1.z.string().describe('Issue identifier, e.g. "PROJ-123"'),
126
+ hours: zod_1.z.number().positive().describe('Hours spent (e.g. 2.5)'),
127
+ description: zod_1.z.string().optional().describe('What was done (optional note)')
128
+ });
129
+ exports.UpdateDocumentSchema = zod_1.z.object({
130
+ documentId: zod_1.z.string().describe('Document _id from list_documents or create_document'),
131
+ markdown: zod_1.z.string().min(1).describe('Markdown content to set as the document body')
132
+ });
133
+ exports.DeleteCommentSchema = zod_1.z.object({
134
+ identifier: zod_1.z.string().describe('Issue identifier, e.g. "PROJ-123"'),
135
+ commentId: zod_1.z.string().describe('Comment _id from list_comments')
136
+ });
137
+ exports.LinkDocumentSchema = zod_1.z.object({
138
+ identifier: zod_1.z.string().describe('Issue identifier, e.g. "PROJ-123"'),
139
+ documentId: zod_1.z.string().describe('Document _id from list_documents or create_document')
140
+ });
141
+ // ── Chat (Channels & Direct Messages) ──────────────────────────────────────
142
+ exports.ListChannelsSchema = zod_1.z.object({
143
+ includeArchived: zod_1.z.boolean().default(false).describe('Include archived channels')
144
+ });
145
+ exports.CreateChannelSchema = zod_1.z.object({
146
+ name: zod_1.z.string().min(1).describe('Channel name'),
147
+ topic: zod_1.z.string().optional().describe('Optional channel topic/description'),
148
+ isPrivate: zod_1.z.boolean().default(false).describe('Whether the channel is private (invite-only)')
149
+ });
150
+ exports.StartDirectMessageSchema = zod_1.z.object({
151
+ member: zod_1.z.string().min(1).describe('Name (first/last/full) of the workspace member to message')
152
+ });
153
+ exports.SendMessageSchema = zod_1.z.object({
154
+ spaceId: zod_1.z.string().describe('Channel or direct-message _id, from list_channels/create_channel/start_direct_message'),
155
+ message: zod_1.z.string().min(1).describe('Message text')
156
+ });
157
+ exports.ListMessagesSchema = zod_1.z.object({
158
+ spaceId: zod_1.z.string().describe('Channel or direct-message _id'),
159
+ limit: zod_1.z.number().int().min(1).max(200).default(50).describe('Max messages to return')
160
+ });
161
+ // ── Attachments ─────────────────────────────────────────────────────────────
162
+ exports.AttachFileSchema = zod_1.z.object({
163
+ identifier: zod_1.z.string().describe('Issue identifier to attach the file to, e.g. "PROJ-123"'),
164
+ filename: zod_1.z.string().min(1).describe('File name, e.g. "screenshot.png"'),
165
+ contentBase64: zod_1.z.string().min(1).describe('File content, base64-encoded'),
166
+ mimeType: zod_1.z.string().default('application/octet-stream').describe('MIME type, e.g. "image/png"')
167
+ });
168
+ exports.ListAttachmentsSchema = zod_1.z.object({
169
+ identifier: zod_1.z.string().describe('Issue identifier, e.g. "PROJ-123"')
170
+ });
171
+ exports.DeleteAttachmentSchema = zod_1.z.object({
172
+ identifier: zod_1.z.string().describe('Issue identifier, e.g. "PROJ-123"'),
173
+ attachmentId: zod_1.z.string().describe('Attachment _id from list_attachments')
174
+ });
175
+ // ── Issue Statuses (custom workflow states) ────────────────────────────────
176
+ const StatusCategoryEnum = zod_1.z.enum(['Backlog', 'Todo', 'InProgress', 'Done', 'Cancelled']);
177
+ exports.ListIssueStatusesSchema = zod_1.z.object({});
178
+ exports.CreateIssueStatusSchema = zod_1.z.object({
179
+ name: zod_1.z.string().min(1).describe('Status name, e.g. "Waiting for review"'),
180
+ category: StatusCategoryEnum.describe('Which phase this status belongs to (determines grouping/color in the UI)'),
181
+ color: zod_1.z.string().optional().describe('Hex color, e.g. "#FF6B6B" (optional)')
182
+ });
183
+ // ── Organizations (contacts/CRM) ────────────────────────────────────────────
184
+ exports.ListOrganizationsSchema = zod_1.z.object({});
185
+ exports.GetOrganizationSchema = zod_1.z.object({
186
+ organizationId: zod_1.z.string().describe('Organization _id from list_organizations')
187
+ });
188
+ exports.CreateOrganizationSchema = zod_1.z.object({
189
+ name: zod_1.z.string().min(1).describe('Organization name'),
190
+ city: zod_1.z.string().optional().describe('City (optional)')
191
+ });
192
+ exports.UpdateOrganizationSchema = zod_1.z.object({
193
+ organizationId: zod_1.z.string().describe('Organization _id from list_organizations'),
194
+ description: zod_1.z.string().describe('New description as Markdown (replaces existing content)')
195
+ });
196
+ //# sourceMappingURL=schemas.js.map