@task-mcp/shared 1.0.19 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/schemas/task.d.ts +290 -34
- package/dist/schemas/task.d.ts.map +1 -1
- package/dist/schemas/task.js +50 -13
- package/dist/schemas/task.js.map +1 -1
- package/dist/utils/date.d.ts +13 -0
- package/dist/utils/date.d.ts.map +1 -1
- package/dist/utils/date.js +29 -0
- package/dist/utils/date.js.map +1 -1
- package/dist/utils/hierarchy.d.ts +27 -0
- package/dist/utils/hierarchy.d.ts.map +1 -1
- package/dist/utils/hierarchy.js +48 -1
- package/dist/utils/hierarchy.js.map +1 -1
- package/dist/utils/hierarchy.test.js +86 -1
- package/dist/utils/hierarchy.test.js.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/natural-language.d.ts.map +1 -1
- package/dist/utils/natural-language.js +6 -0
- package/dist/utils/natural-language.js.map +1 -1
- package/dist/utils/natural-language.test.js +42 -1
- package/dist/utils/natural-language.test.js.map +1 -1
- package/dist/utils/priority-queue.test.d.ts +2 -0
- package/dist/utils/priority-queue.test.d.ts.map +1 -0
- package/dist/utils/priority-queue.test.js +82 -0
- package/dist/utils/priority-queue.test.js.map +1 -0
- package/dist/utils/projection.d.ts.map +1 -1
- package/dist/utils/projection.js +13 -3
- package/dist/utils/projection.js.map +1 -1
- package/dist/utils/workspace.test.d.ts +2 -0
- package/dist/utils/workspace.test.d.ts.map +1 -0
- package/dist/utils/workspace.test.js +97 -0
- package/dist/utils/workspace.test.js.map +1 -0
- package/package.json +1 -1
- package/src/schemas/task.ts +60 -14
- package/src/utils/date.ts +40 -0
- package/src/utils/hierarchy.test.ts +94 -0
- package/src/utils/hierarchy.ts +63 -1
- package/src/utils/index.ts +2 -0
- package/src/utils/natural-language.test.ts +61 -1
- package/src/utils/natural-language.ts +12 -0
- package/src/utils/priority-queue.test.ts +103 -0
- package/src/utils/projection.ts +14 -3
- package/src/utils/workspace.test.ts +125 -0
package/dist/schemas/task.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare const Dependency: z.ZodObject<{
|
|
|
19
19
|
reason?: string | undefined;
|
|
20
20
|
}>;
|
|
21
21
|
export type Dependency = z.infer<typeof Dependency>;
|
|
22
|
-
export declare const TimeEstimate: z.ZodObject<{
|
|
22
|
+
export declare const TimeEstimate: z.ZodEffects<z.ZodObject<{
|
|
23
23
|
optimistic: z.ZodOptional<z.ZodNumber>;
|
|
24
24
|
expected: z.ZodOptional<z.ZodNumber>;
|
|
25
25
|
pessimistic: z.ZodOptional<z.ZodNumber>;
|
|
@@ -34,24 +34,70 @@ export declare const TimeEstimate: z.ZodObject<{
|
|
|
34
34
|
optimistic?: number | undefined;
|
|
35
35
|
pessimistic?: number | undefined;
|
|
36
36
|
confidence?: "high" | "medium" | "low" | undefined;
|
|
37
|
+
}>, {
|
|
38
|
+
expected?: number | undefined;
|
|
39
|
+
optimistic?: number | undefined;
|
|
40
|
+
pessimistic?: number | undefined;
|
|
41
|
+
confidence?: "high" | "medium" | "low" | undefined;
|
|
42
|
+
}, {
|
|
43
|
+
expected?: number | undefined;
|
|
44
|
+
optimistic?: number | undefined;
|
|
45
|
+
pessimistic?: number | undefined;
|
|
46
|
+
confidence?: "high" | "medium" | "low" | undefined;
|
|
37
47
|
}>;
|
|
38
48
|
export type TimeEstimate = z.infer<typeof TimeEstimate>;
|
|
39
|
-
export declare const Recurrence: z.ZodObject<{
|
|
40
|
-
pattern: z.
|
|
49
|
+
export declare const Recurrence: z.ZodDiscriminatedUnion<"pattern", [z.ZodObject<{
|
|
50
|
+
pattern: z.ZodLiteral<"daily">;
|
|
51
|
+
interval: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
pattern: "daily";
|
|
55
|
+
interval?: number | undefined;
|
|
56
|
+
endDate?: string | undefined;
|
|
57
|
+
}, {
|
|
58
|
+
pattern: "daily";
|
|
59
|
+
interval?: number | undefined;
|
|
60
|
+
endDate?: string | undefined;
|
|
61
|
+
}>, z.ZodObject<{
|
|
62
|
+
pattern: z.ZodLiteral<"weekly">;
|
|
41
63
|
interval: z.ZodOptional<z.ZodNumber>;
|
|
42
64
|
daysOfWeek: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
43
65
|
endDate: z.ZodOptional<z.ZodString>;
|
|
44
66
|
}, "strip", z.ZodTypeAny, {
|
|
45
|
-
pattern: "
|
|
67
|
+
pattern: "weekly";
|
|
46
68
|
interval?: number | undefined;
|
|
47
|
-
daysOfWeek?: number[] | undefined;
|
|
48
69
|
endDate?: string | undefined;
|
|
70
|
+
daysOfWeek?: number[] | undefined;
|
|
49
71
|
}, {
|
|
50
|
-
pattern: "
|
|
72
|
+
pattern: "weekly";
|
|
51
73
|
interval?: number | undefined;
|
|
74
|
+
endDate?: string | undefined;
|
|
52
75
|
daysOfWeek?: number[] | undefined;
|
|
76
|
+
}>, z.ZodObject<{
|
|
77
|
+
pattern: z.ZodLiteral<"monthly">;
|
|
78
|
+
interval: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
80
|
+
}, "strip", z.ZodTypeAny, {
|
|
81
|
+
pattern: "monthly";
|
|
82
|
+
interval?: number | undefined;
|
|
53
83
|
endDate?: string | undefined;
|
|
54
|
-
}
|
|
84
|
+
}, {
|
|
85
|
+
pattern: "monthly";
|
|
86
|
+
interval?: number | undefined;
|
|
87
|
+
endDate?: string | undefined;
|
|
88
|
+
}>, z.ZodObject<{
|
|
89
|
+
pattern: z.ZodLiteral<"after_completion">;
|
|
90
|
+
interval: z.ZodNumber;
|
|
91
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
pattern: "after_completion";
|
|
94
|
+
interval: number;
|
|
95
|
+
endDate?: string | undefined;
|
|
96
|
+
}, {
|
|
97
|
+
pattern: "after_completion";
|
|
98
|
+
interval: number;
|
|
99
|
+
endDate?: string | undefined;
|
|
100
|
+
}>]>;
|
|
55
101
|
export type Recurrence = z.infer<typeof Recurrence>;
|
|
56
102
|
export declare const ComplexityFactor: z.ZodEnum<["cross_cutting", "state_management", "error_handling", "performance", "security", "external_dependency", "data_migration", "breaking_change", "unclear_requirements", "coordination"]>;
|
|
57
103
|
export type ComplexityFactor = z.infer<typeof ComplexityFactor>;
|
|
@@ -124,7 +170,7 @@ export declare const Task: z.ZodObject<{
|
|
|
124
170
|
type: "blocks" | "blocked_by" | "related";
|
|
125
171
|
reason?: string | undefined;
|
|
126
172
|
}>, "many">>;
|
|
127
|
-
estimate: z.ZodOptional<z.ZodObject<{
|
|
173
|
+
estimate: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
128
174
|
optimistic: z.ZodOptional<z.ZodNumber>;
|
|
129
175
|
expected: z.ZodOptional<z.ZodNumber>;
|
|
130
176
|
pessimistic: z.ZodOptional<z.ZodNumber>;
|
|
@@ -139,6 +185,16 @@ export declare const Task: z.ZodObject<{
|
|
|
139
185
|
optimistic?: number | undefined;
|
|
140
186
|
pessimistic?: number | undefined;
|
|
141
187
|
confidence?: "high" | "medium" | "low" | undefined;
|
|
188
|
+
}>, {
|
|
189
|
+
expected?: number | undefined;
|
|
190
|
+
optimistic?: number | undefined;
|
|
191
|
+
pessimistic?: number | undefined;
|
|
192
|
+
confidence?: "high" | "medium" | "low" | undefined;
|
|
193
|
+
}, {
|
|
194
|
+
expected?: number | undefined;
|
|
195
|
+
optimistic?: number | undefined;
|
|
196
|
+
pessimistic?: number | undefined;
|
|
197
|
+
confidence?: "high" | "medium" | "low" | undefined;
|
|
142
198
|
}>>;
|
|
143
199
|
actualMinutes: z.ZodOptional<z.ZodNumber>;
|
|
144
200
|
dueDate: z.ZodOptional<z.ZodString>;
|
|
@@ -148,22 +204,58 @@ export declare const Task: z.ZodObject<{
|
|
|
148
204
|
contexts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
149
205
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
150
206
|
sortOrder: z.ZodOptional<z.ZodNumber>;
|
|
151
|
-
recurrence: z.ZodOptional<z.ZodObject<{
|
|
152
|
-
pattern: z.
|
|
207
|
+
recurrence: z.ZodOptional<z.ZodDiscriminatedUnion<"pattern", [z.ZodObject<{
|
|
208
|
+
pattern: z.ZodLiteral<"daily">;
|
|
209
|
+
interval: z.ZodOptional<z.ZodNumber>;
|
|
210
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
211
|
+
}, "strip", z.ZodTypeAny, {
|
|
212
|
+
pattern: "daily";
|
|
213
|
+
interval?: number | undefined;
|
|
214
|
+
endDate?: string | undefined;
|
|
215
|
+
}, {
|
|
216
|
+
pattern: "daily";
|
|
217
|
+
interval?: number | undefined;
|
|
218
|
+
endDate?: string | undefined;
|
|
219
|
+
}>, z.ZodObject<{
|
|
220
|
+
pattern: z.ZodLiteral<"weekly">;
|
|
153
221
|
interval: z.ZodOptional<z.ZodNumber>;
|
|
154
222
|
daysOfWeek: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
155
223
|
endDate: z.ZodOptional<z.ZodString>;
|
|
156
224
|
}, "strip", z.ZodTypeAny, {
|
|
157
|
-
pattern: "
|
|
225
|
+
pattern: "weekly";
|
|
158
226
|
interval?: number | undefined;
|
|
159
|
-
daysOfWeek?: number[] | undefined;
|
|
160
227
|
endDate?: string | undefined;
|
|
228
|
+
daysOfWeek?: number[] | undefined;
|
|
161
229
|
}, {
|
|
162
|
-
pattern: "
|
|
230
|
+
pattern: "weekly";
|
|
163
231
|
interval?: number | undefined;
|
|
232
|
+
endDate?: string | undefined;
|
|
164
233
|
daysOfWeek?: number[] | undefined;
|
|
234
|
+
}>, z.ZodObject<{
|
|
235
|
+
pattern: z.ZodLiteral<"monthly">;
|
|
236
|
+
interval: z.ZodOptional<z.ZodNumber>;
|
|
237
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
238
|
+
}, "strip", z.ZodTypeAny, {
|
|
239
|
+
pattern: "monthly";
|
|
240
|
+
interval?: number | undefined;
|
|
165
241
|
endDate?: string | undefined;
|
|
166
|
-
}
|
|
242
|
+
}, {
|
|
243
|
+
pattern: "monthly";
|
|
244
|
+
interval?: number | undefined;
|
|
245
|
+
endDate?: string | undefined;
|
|
246
|
+
}>, z.ZodObject<{
|
|
247
|
+
pattern: z.ZodLiteral<"after_completion">;
|
|
248
|
+
interval: z.ZodNumber;
|
|
249
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
250
|
+
}, "strip", z.ZodTypeAny, {
|
|
251
|
+
pattern: "after_completion";
|
|
252
|
+
interval: number;
|
|
253
|
+
endDate?: string | undefined;
|
|
254
|
+
}, {
|
|
255
|
+
pattern: "after_completion";
|
|
256
|
+
interval: number;
|
|
257
|
+
endDate?: string | undefined;
|
|
258
|
+
}>]>>;
|
|
167
259
|
createdAt: z.ZodString;
|
|
168
260
|
updatedAt: z.ZodString;
|
|
169
261
|
criticalPath: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -242,9 +334,21 @@ export declare const Task: z.ZodObject<{
|
|
|
242
334
|
tags?: string[] | undefined;
|
|
243
335
|
sortOrder?: number | undefined;
|
|
244
336
|
recurrence?: {
|
|
245
|
-
pattern: "daily"
|
|
337
|
+
pattern: "daily";
|
|
246
338
|
interval?: number | undefined;
|
|
339
|
+
endDate?: string | undefined;
|
|
340
|
+
} | {
|
|
341
|
+
pattern: "weekly";
|
|
342
|
+
interval?: number | undefined;
|
|
343
|
+
endDate?: string | undefined;
|
|
247
344
|
daysOfWeek?: number[] | undefined;
|
|
345
|
+
} | {
|
|
346
|
+
pattern: "monthly";
|
|
347
|
+
interval?: number | undefined;
|
|
348
|
+
endDate?: string | undefined;
|
|
349
|
+
} | {
|
|
350
|
+
pattern: "after_completion";
|
|
351
|
+
interval: number;
|
|
248
352
|
endDate?: string | undefined;
|
|
249
353
|
} | undefined;
|
|
250
354
|
criticalPath?: boolean | undefined;
|
|
@@ -297,9 +401,21 @@ export declare const Task: z.ZodObject<{
|
|
|
297
401
|
tags?: string[] | undefined;
|
|
298
402
|
sortOrder?: number | undefined;
|
|
299
403
|
recurrence?: {
|
|
300
|
-
pattern: "daily"
|
|
404
|
+
pattern: "daily";
|
|
301
405
|
interval?: number | undefined;
|
|
406
|
+
endDate?: string | undefined;
|
|
407
|
+
} | {
|
|
408
|
+
pattern: "weekly";
|
|
409
|
+
interval?: number | undefined;
|
|
410
|
+
endDate?: string | undefined;
|
|
302
411
|
daysOfWeek?: number[] | undefined;
|
|
412
|
+
} | {
|
|
413
|
+
pattern: "monthly";
|
|
414
|
+
interval?: number | undefined;
|
|
415
|
+
endDate?: string | undefined;
|
|
416
|
+
} | {
|
|
417
|
+
pattern: "after_completion";
|
|
418
|
+
interval: number;
|
|
303
419
|
endDate?: string | undefined;
|
|
304
420
|
} | undefined;
|
|
305
421
|
criticalPath?: boolean | undefined;
|
|
@@ -341,7 +457,7 @@ export declare const TaskCreateInput: z.ZodObject<{
|
|
|
341
457
|
type: "blocks" | "blocked_by" | "related";
|
|
342
458
|
reason?: string | undefined;
|
|
343
459
|
}>, "many">>;
|
|
344
|
-
estimate: z.ZodOptional<z.ZodObject<{
|
|
460
|
+
estimate: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
345
461
|
optimistic: z.ZodOptional<z.ZodNumber>;
|
|
346
462
|
expected: z.ZodOptional<z.ZodNumber>;
|
|
347
463
|
pessimistic: z.ZodOptional<z.ZodNumber>;
|
|
@@ -356,28 +472,74 @@ export declare const TaskCreateInput: z.ZodObject<{
|
|
|
356
472
|
optimistic?: number | undefined;
|
|
357
473
|
pessimistic?: number | undefined;
|
|
358
474
|
confidence?: "high" | "medium" | "low" | undefined;
|
|
475
|
+
}>, {
|
|
476
|
+
expected?: number | undefined;
|
|
477
|
+
optimistic?: number | undefined;
|
|
478
|
+
pessimistic?: number | undefined;
|
|
479
|
+
confidence?: "high" | "medium" | "low" | undefined;
|
|
480
|
+
}, {
|
|
481
|
+
expected?: number | undefined;
|
|
482
|
+
optimistic?: number | undefined;
|
|
483
|
+
pessimistic?: number | undefined;
|
|
484
|
+
confidence?: "high" | "medium" | "low" | undefined;
|
|
359
485
|
}>>;
|
|
360
486
|
dueDate: z.ZodOptional<z.ZodString>;
|
|
361
487
|
startDate: z.ZodOptional<z.ZodString>;
|
|
362
488
|
contexts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
363
489
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
364
490
|
sortOrder: z.ZodOptional<z.ZodNumber>;
|
|
365
|
-
recurrence: z.ZodOptional<z.ZodObject<{
|
|
366
|
-
pattern: z.
|
|
491
|
+
recurrence: z.ZodOptional<z.ZodDiscriminatedUnion<"pattern", [z.ZodObject<{
|
|
492
|
+
pattern: z.ZodLiteral<"daily">;
|
|
493
|
+
interval: z.ZodOptional<z.ZodNumber>;
|
|
494
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
495
|
+
}, "strip", z.ZodTypeAny, {
|
|
496
|
+
pattern: "daily";
|
|
497
|
+
interval?: number | undefined;
|
|
498
|
+
endDate?: string | undefined;
|
|
499
|
+
}, {
|
|
500
|
+
pattern: "daily";
|
|
501
|
+
interval?: number | undefined;
|
|
502
|
+
endDate?: string | undefined;
|
|
503
|
+
}>, z.ZodObject<{
|
|
504
|
+
pattern: z.ZodLiteral<"weekly">;
|
|
367
505
|
interval: z.ZodOptional<z.ZodNumber>;
|
|
368
506
|
daysOfWeek: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
369
507
|
endDate: z.ZodOptional<z.ZodString>;
|
|
370
508
|
}, "strip", z.ZodTypeAny, {
|
|
371
|
-
pattern: "
|
|
509
|
+
pattern: "weekly";
|
|
372
510
|
interval?: number | undefined;
|
|
373
|
-
daysOfWeek?: number[] | undefined;
|
|
374
511
|
endDate?: string | undefined;
|
|
512
|
+
daysOfWeek?: number[] | undefined;
|
|
375
513
|
}, {
|
|
376
|
-
pattern: "
|
|
514
|
+
pattern: "weekly";
|
|
377
515
|
interval?: number | undefined;
|
|
516
|
+
endDate?: string | undefined;
|
|
378
517
|
daysOfWeek?: number[] | undefined;
|
|
518
|
+
}>, z.ZodObject<{
|
|
519
|
+
pattern: z.ZodLiteral<"monthly">;
|
|
520
|
+
interval: z.ZodOptional<z.ZodNumber>;
|
|
521
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
522
|
+
}, "strip", z.ZodTypeAny, {
|
|
523
|
+
pattern: "monthly";
|
|
524
|
+
interval?: number | undefined;
|
|
379
525
|
endDate?: string | undefined;
|
|
380
|
-
}
|
|
526
|
+
}, {
|
|
527
|
+
pattern: "monthly";
|
|
528
|
+
interval?: number | undefined;
|
|
529
|
+
endDate?: string | undefined;
|
|
530
|
+
}>, z.ZodObject<{
|
|
531
|
+
pattern: z.ZodLiteral<"after_completion">;
|
|
532
|
+
interval: z.ZodNumber;
|
|
533
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
534
|
+
}, "strip", z.ZodTypeAny, {
|
|
535
|
+
pattern: "after_completion";
|
|
536
|
+
interval: number;
|
|
537
|
+
endDate?: string | undefined;
|
|
538
|
+
}, {
|
|
539
|
+
pattern: "after_completion";
|
|
540
|
+
interval: number;
|
|
541
|
+
endDate?: string | undefined;
|
|
542
|
+
}>]>>;
|
|
381
543
|
}, "strip", z.ZodTypeAny, {
|
|
382
544
|
title: string;
|
|
383
545
|
description?: string | undefined;
|
|
@@ -400,9 +562,21 @@ export declare const TaskCreateInput: z.ZodObject<{
|
|
|
400
562
|
tags?: string[] | undefined;
|
|
401
563
|
sortOrder?: number | undefined;
|
|
402
564
|
recurrence?: {
|
|
403
|
-
pattern: "daily"
|
|
565
|
+
pattern: "daily";
|
|
404
566
|
interval?: number | undefined;
|
|
567
|
+
endDate?: string | undefined;
|
|
568
|
+
} | {
|
|
569
|
+
pattern: "weekly";
|
|
570
|
+
interval?: number | undefined;
|
|
571
|
+
endDate?: string | undefined;
|
|
405
572
|
daysOfWeek?: number[] | undefined;
|
|
573
|
+
} | {
|
|
574
|
+
pattern: "monthly";
|
|
575
|
+
interval?: number | undefined;
|
|
576
|
+
endDate?: string | undefined;
|
|
577
|
+
} | {
|
|
578
|
+
pattern: "after_completion";
|
|
579
|
+
interval: number;
|
|
406
580
|
endDate?: string | undefined;
|
|
407
581
|
} | undefined;
|
|
408
582
|
}, {
|
|
@@ -427,9 +601,21 @@ export declare const TaskCreateInput: z.ZodObject<{
|
|
|
427
601
|
tags?: string[] | undefined;
|
|
428
602
|
sortOrder?: number | undefined;
|
|
429
603
|
recurrence?: {
|
|
430
|
-
pattern: "daily"
|
|
604
|
+
pattern: "daily";
|
|
431
605
|
interval?: number | undefined;
|
|
606
|
+
endDate?: string | undefined;
|
|
607
|
+
} | {
|
|
608
|
+
pattern: "weekly";
|
|
609
|
+
interval?: number | undefined;
|
|
610
|
+
endDate?: string | undefined;
|
|
432
611
|
daysOfWeek?: number[] | undefined;
|
|
612
|
+
} | {
|
|
613
|
+
pattern: "monthly";
|
|
614
|
+
interval?: number | undefined;
|
|
615
|
+
endDate?: string | undefined;
|
|
616
|
+
} | {
|
|
617
|
+
pattern: "after_completion";
|
|
618
|
+
interval: number;
|
|
433
619
|
endDate?: string | undefined;
|
|
434
620
|
} | undefined;
|
|
435
621
|
}>;
|
|
@@ -453,7 +639,7 @@ export declare const TaskUpdateInput: z.ZodObject<{
|
|
|
453
639
|
type: "blocks" | "blocked_by" | "related";
|
|
454
640
|
reason?: string | undefined;
|
|
455
641
|
}>, "many">>;
|
|
456
|
-
estimate: z.ZodOptional<z.ZodObject<{
|
|
642
|
+
estimate: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
457
643
|
optimistic: z.ZodOptional<z.ZodNumber>;
|
|
458
644
|
expected: z.ZodOptional<z.ZodNumber>;
|
|
459
645
|
pessimistic: z.ZodOptional<z.ZodNumber>;
|
|
@@ -468,6 +654,16 @@ export declare const TaskUpdateInput: z.ZodObject<{
|
|
|
468
654
|
optimistic?: number | undefined;
|
|
469
655
|
pessimistic?: number | undefined;
|
|
470
656
|
confidence?: "high" | "medium" | "low" | undefined;
|
|
657
|
+
}>, {
|
|
658
|
+
expected?: number | undefined;
|
|
659
|
+
optimistic?: number | undefined;
|
|
660
|
+
pessimistic?: number | undefined;
|
|
661
|
+
confidence?: "high" | "medium" | "low" | undefined;
|
|
662
|
+
}, {
|
|
663
|
+
expected?: number | undefined;
|
|
664
|
+
optimistic?: number | undefined;
|
|
665
|
+
pessimistic?: number | undefined;
|
|
666
|
+
confidence?: "high" | "medium" | "low" | undefined;
|
|
471
667
|
}>>;
|
|
472
668
|
actualMinutes: z.ZodOptional<z.ZodNumber>;
|
|
473
669
|
dueDate: z.ZodOptional<z.ZodString>;
|
|
@@ -475,22 +671,58 @@ export declare const TaskUpdateInput: z.ZodObject<{
|
|
|
475
671
|
contexts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
476
672
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
477
673
|
sortOrder: z.ZodOptional<z.ZodNumber>;
|
|
478
|
-
recurrence: z.ZodOptional<z.ZodObject<{
|
|
479
|
-
pattern: z.
|
|
674
|
+
recurrence: z.ZodOptional<z.ZodDiscriminatedUnion<"pattern", [z.ZodObject<{
|
|
675
|
+
pattern: z.ZodLiteral<"daily">;
|
|
676
|
+
interval: z.ZodOptional<z.ZodNumber>;
|
|
677
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
678
|
+
}, "strip", z.ZodTypeAny, {
|
|
679
|
+
pattern: "daily";
|
|
680
|
+
interval?: number | undefined;
|
|
681
|
+
endDate?: string | undefined;
|
|
682
|
+
}, {
|
|
683
|
+
pattern: "daily";
|
|
684
|
+
interval?: number | undefined;
|
|
685
|
+
endDate?: string | undefined;
|
|
686
|
+
}>, z.ZodObject<{
|
|
687
|
+
pattern: z.ZodLiteral<"weekly">;
|
|
480
688
|
interval: z.ZodOptional<z.ZodNumber>;
|
|
481
689
|
daysOfWeek: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
482
690
|
endDate: z.ZodOptional<z.ZodString>;
|
|
483
691
|
}, "strip", z.ZodTypeAny, {
|
|
484
|
-
pattern: "
|
|
692
|
+
pattern: "weekly";
|
|
485
693
|
interval?: number | undefined;
|
|
486
|
-
daysOfWeek?: number[] | undefined;
|
|
487
694
|
endDate?: string | undefined;
|
|
695
|
+
daysOfWeek?: number[] | undefined;
|
|
488
696
|
}, {
|
|
489
|
-
pattern: "
|
|
697
|
+
pattern: "weekly";
|
|
490
698
|
interval?: number | undefined;
|
|
699
|
+
endDate?: string | undefined;
|
|
491
700
|
daysOfWeek?: number[] | undefined;
|
|
701
|
+
}>, z.ZodObject<{
|
|
702
|
+
pattern: z.ZodLiteral<"monthly">;
|
|
703
|
+
interval: z.ZodOptional<z.ZodNumber>;
|
|
704
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
705
|
+
}, "strip", z.ZodTypeAny, {
|
|
706
|
+
pattern: "monthly";
|
|
707
|
+
interval?: number | undefined;
|
|
492
708
|
endDate?: string | undefined;
|
|
493
|
-
}
|
|
709
|
+
}, {
|
|
710
|
+
pattern: "monthly";
|
|
711
|
+
interval?: number | undefined;
|
|
712
|
+
endDate?: string | undefined;
|
|
713
|
+
}>, z.ZodObject<{
|
|
714
|
+
pattern: z.ZodLiteral<"after_completion">;
|
|
715
|
+
interval: z.ZodNumber;
|
|
716
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
717
|
+
}, "strip", z.ZodTypeAny, {
|
|
718
|
+
pattern: "after_completion";
|
|
719
|
+
interval: number;
|
|
720
|
+
endDate?: string | undefined;
|
|
721
|
+
}, {
|
|
722
|
+
pattern: "after_completion";
|
|
723
|
+
interval: number;
|
|
724
|
+
endDate?: string | undefined;
|
|
725
|
+
}>]>>;
|
|
494
726
|
complexity: z.ZodOptional<z.ZodObject<{
|
|
495
727
|
score: z.ZodOptional<z.ZodNumber>;
|
|
496
728
|
factors: z.ZodOptional<z.ZodArray<z.ZodEnum<["cross_cutting", "state_management", "error_handling", "performance", "security", "external_dependency", "data_migration", "breaking_change", "unclear_requirements", "coordination"]>, "many">>;
|
|
@@ -556,9 +788,21 @@ export declare const TaskUpdateInput: z.ZodObject<{
|
|
|
556
788
|
tags?: string[] | undefined;
|
|
557
789
|
sortOrder?: number | undefined;
|
|
558
790
|
recurrence?: {
|
|
559
|
-
pattern: "daily"
|
|
791
|
+
pattern: "daily";
|
|
560
792
|
interval?: number | undefined;
|
|
793
|
+
endDate?: string | undefined;
|
|
794
|
+
} | {
|
|
795
|
+
pattern: "weekly";
|
|
796
|
+
interval?: number | undefined;
|
|
797
|
+
endDate?: string | undefined;
|
|
561
798
|
daysOfWeek?: number[] | undefined;
|
|
799
|
+
} | {
|
|
800
|
+
pattern: "monthly";
|
|
801
|
+
interval?: number | undefined;
|
|
802
|
+
endDate?: string | undefined;
|
|
803
|
+
} | {
|
|
804
|
+
pattern: "after_completion";
|
|
805
|
+
interval: number;
|
|
562
806
|
endDate?: string | undefined;
|
|
563
807
|
} | undefined;
|
|
564
808
|
complexity?: {
|
|
@@ -600,9 +844,21 @@ export declare const TaskUpdateInput: z.ZodObject<{
|
|
|
600
844
|
tags?: string[] | undefined;
|
|
601
845
|
sortOrder?: number | undefined;
|
|
602
846
|
recurrence?: {
|
|
603
|
-
pattern: "daily"
|
|
847
|
+
pattern: "daily";
|
|
604
848
|
interval?: number | undefined;
|
|
849
|
+
endDate?: string | undefined;
|
|
850
|
+
} | {
|
|
851
|
+
pattern: "weekly";
|
|
852
|
+
interval?: number | undefined;
|
|
853
|
+
endDate?: string | undefined;
|
|
605
854
|
daysOfWeek?: number[] | undefined;
|
|
855
|
+
} | {
|
|
856
|
+
pattern: "monthly";
|
|
857
|
+
interval?: number | undefined;
|
|
858
|
+
endDate?: string | undefined;
|
|
859
|
+
} | {
|
|
860
|
+
pattern: "after_completion";
|
|
861
|
+
interval: number;
|
|
606
862
|
endDate?: string | undefined;
|
|
607
863
|
} | undefined;
|
|
608
864
|
complexity?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../src/schemas/task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,QAAQ,kDAAgD,CAAC;AACtE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAGhD,eAAO,MAAM,UAAU,4EAMrB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAGpD,eAAO,MAAM,cAAc,gDAA8C,CAAC;AAC1E,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAG5D,eAAO,MAAM,UAAU;;;;;;;;;;;;EAIrB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAGpD,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../src/schemas/task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,QAAQ,kDAAgD,CAAC;AACtE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAGhD,eAAO,MAAM,UAAU,4EAMrB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAGpD,eAAO,MAAM,cAAc,g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Dependency = z.object({
|
|
|
17
17
|
type: DependencyType,
|
|
18
18
|
reason: z.string().optional(),
|
|
19
19
|
});
|
|
20
|
-
// Time estimation
|
|
21
|
-
export const TimeEstimate = z
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
// Time estimation (values in minutes, max 10080 = 1 week)
|
|
21
|
+
export const TimeEstimate = z
|
|
22
|
+
.object({
|
|
23
|
+
optimistic: z.number().min(0).max(10080).optional(), // minutes
|
|
24
|
+
expected: z.number().min(0).max(10080).optional(), // minutes
|
|
25
|
+
pessimistic: z.number().min(0).max(10080).optional(), // minutes
|
|
25
26
|
confidence: z.enum(["low", "medium", "high"]).optional(),
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
27
|
+
})
|
|
28
|
+
.refine((data) => {
|
|
29
|
+
const { optimistic, expected, pessimistic } = data;
|
|
30
|
+
if (optimistic !== undefined &&
|
|
31
|
+
expected !== undefined &&
|
|
32
|
+
optimistic > expected) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
if (expected !== undefined &&
|
|
36
|
+
pessimistic !== undefined &&
|
|
37
|
+
expected > pessimistic) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
if (optimistic !== undefined &&
|
|
41
|
+
pessimistic !== undefined &&
|
|
42
|
+
optimistic > pessimistic) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
return true;
|
|
46
|
+
}, { message: "Time estimates must satisfy: optimistic <= expected <= pessimistic" });
|
|
47
|
+
// Recurrence pattern (discriminated union for type-safe pattern handling)
|
|
48
|
+
export const Recurrence = z.discriminatedUnion("pattern", [
|
|
49
|
+
z.object({
|
|
50
|
+
pattern: z.literal("daily"),
|
|
51
|
+
interval: z.number().min(1).optional(), // every N days
|
|
52
|
+
endDate: z.string().optional(),
|
|
53
|
+
}),
|
|
54
|
+
z.object({
|
|
55
|
+
pattern: z.literal("weekly"),
|
|
56
|
+
interval: z.number().min(1).optional(), // every N weeks
|
|
57
|
+
daysOfWeek: z.array(z.number().min(0).max(6)).optional(), // 0-6 for weekly
|
|
58
|
+
endDate: z.string().optional(),
|
|
59
|
+
}),
|
|
60
|
+
z.object({
|
|
61
|
+
pattern: z.literal("monthly"),
|
|
62
|
+
interval: z.number().min(1).optional(), // every N months
|
|
63
|
+
endDate: z.string().optional(),
|
|
64
|
+
}),
|
|
65
|
+
z.object({
|
|
66
|
+
pattern: z.literal("after_completion"),
|
|
67
|
+
interval: z.number().min(1), // Required: days after completion
|
|
68
|
+
endDate: z.string().optional(),
|
|
69
|
+
}),
|
|
70
|
+
]);
|
|
34
71
|
// Complexity factors that contribute to task difficulty
|
|
35
72
|
export const ComplexityFactor = z.enum([
|
|
36
73
|
"cross_cutting",
|
package/dist/schemas/task.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task.js","sourceRoot":"","sources":["../../src/schemas/task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,kBAAkB;AAClB,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;AAGtE,uCAAuC;AACvC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,IAAI,CAAC;IAC/B,SAAS;IACT,aAAa;IACb,SAAS;IACT,WAAW;IACX,WAAW;CACZ,CAAC,CAAC;AAGH,gCAAgC;AAChC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC,CAAC;AAG1E,2BAA2B;AAC3B,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,MAAM,EAAE,CAAC,CAA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ClB,UAAU,EAAE,kBAAkB,CAAC,QAAQ,EAAE;IACzC,SAAS,EAAE,iBAAiB,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC"}
|
package/dist/utils/date.d.ts
CHANGED
|
@@ -21,6 +21,14 @@ export type DateParseResult = {
|
|
|
21
21
|
error: string;
|
|
22
22
|
reason: DateParseErrorReason;
|
|
23
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* Result type for isWithinDaysSafe operation
|
|
26
|
+
*/
|
|
27
|
+
export interface IsWithinDaysResult {
|
|
28
|
+
success: boolean;
|
|
29
|
+
withinDays?: boolean;
|
|
30
|
+
error?: string;
|
|
31
|
+
}
|
|
24
32
|
/**
|
|
25
33
|
* Get current ISO timestamp
|
|
26
34
|
*/
|
|
@@ -78,4 +86,9 @@ export declare function isPastDue(date: Date | string): boolean;
|
|
|
78
86
|
* Returns false for invalid dates or invalid days parameter (does not throw)
|
|
79
87
|
*/
|
|
80
88
|
export declare function isWithinDays(date: Date | string, days: number): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Safe version of isWithinDays that returns a Result type
|
|
91
|
+
* Allows distinguishing between errors and actual out-of-range results
|
|
92
|
+
*/
|
|
93
|
+
export declare function isWithinDaysSafe(date: Date | string, days: number): IsWithinDaysResult;
|
|
81
94
|
//# sourceMappingURL=date.d.ts.map
|
package/dist/utils/date.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/utils/date.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,cAAe,SAAQ,KAAK;aAGrB,KAAK,EAAE,MAAM;aACb,MAAM,EAAE,oBAAoB;gBAF5C,OAAO,EAAE,MAAM,EACC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,oBAAoB;CAK/C;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAC5B,aAAa,GACb,gBAAgB,GAChB,cAAc,GACd,cAAc,CAAC;AAEnB;;GAE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