@imenam/mcp-organizer 1.0.10 → 1.0.12

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 (53) hide show
  1. package/README.md +57 -19
  2. package/dist/shared/schemas/agent-api.schema.d.ts +40 -2
  3. package/dist/shared/schemas/agent-api.schema.js +12 -3
  4. package/dist/shared/schemas/agent-tools.schema.d.ts +373 -6
  5. package/dist/shared/schemas/agent-tools.schema.js +54 -3
  6. package/dist/shared/schemas/api.schema.d.ts +26 -0
  7. package/dist/shared/schemas/api.schema.js +9 -0
  8. package/dist/shared/schemas/entities.schema.d.ts +38 -4
  9. package/dist/shared/schemas/entities.schema.js +33 -5
  10. package/dist/shared/schemas/enums.schema.d.ts +4 -2
  11. package/dist/shared/schemas/enums.schema.js +2 -1
  12. package/dist/shared/schemas/notifications-api.schema.d.ts +29 -7
  13. package/dist/shared/schemas/notifications-api.schema.js +21 -5
  14. package/dist/shared/schemas/tasks-api.schema.d.ts +112 -0
  15. package/dist/shared/schemas/tasks-api.schema.js +43 -0
  16. package/dist/shared/schemas/views-api.schema.d.ts +8 -0
  17. package/dist/shared/schemas/views-api.schema.js +5 -1
  18. package/dist/src/agent-api/requests.d.ts +1 -1
  19. package/dist/src/agent-api/requests.js +56 -4
  20. package/dist/src/agent-api/router.js +2 -1
  21. package/dist/src/agent-api/views.d.ts +2 -0
  22. package/dist/src/agent-api/views.js +203 -0
  23. package/dist/src/core/agent.d.ts +5 -1
  24. package/dist/src/core/agent.js +61 -2
  25. package/dist/src/core/board-views.d.ts +11 -1
  26. package/dist/src/core/board-views.js +39 -15
  27. package/dist/src/core/follow-ups.d.ts +7 -0
  28. package/dist/src/core/follow-ups.js +15 -0
  29. package/dist/src/core/history.d.ts +2 -1
  30. package/dist/src/core/history.js +62 -3
  31. package/dist/src/core/migrations.js +482 -421
  32. package/dist/src/core/notifications.js +36 -9
  33. package/dist/src/core/requests.d.ts +10 -1
  34. package/dist/src/core/requests.js +41 -3
  35. package/dist/src/core/snapshots.d.ts +4 -4
  36. package/dist/src/core/snapshots.js +6 -2
  37. package/dist/src/core/spaces.d.ts +2 -2
  38. package/dist/src/core/spaces.js +12 -6
  39. package/dist/src/core/store.d.ts +45 -6
  40. package/dist/src/core/store.js +214 -75
  41. package/dist/src/core/tasks.d.ts +22 -2
  42. package/dist/src/core/tasks.js +121 -12
  43. package/dist/src/gui-api.js +14 -4
  44. package/dist/src/mcp/start.d.ts +1 -1
  45. package/dist/src/mcp/start.js +4 -3
  46. package/dist/src/mcp/tools.js +86 -2
  47. package/dist/src/server/runner.js +4 -18
  48. package/gui/dist/assets/index-CVwckTU6.css +1 -0
  49. package/gui/dist/assets/index-G5uiHeLf.js +99 -0
  50. package/gui/dist/index.html +3 -3
  51. package/package.json +1 -1
  52. package/gui/dist/assets/index-CsMeMdCn.css +0 -1
  53. package/gui/dist/assets/index-DAGRLFSo.js +0 -98
@@ -51,6 +51,11 @@ export declare const CompleteRequestBodySchema: z.ZodObject<{
51
51
  export declare const FailRequestBodySchema: z.ZodObject<{
52
52
  reason: z.ZodString;
53
53
  }, z.core.$strict>;
54
+ /** `POST requests/:id/follow-ups` : points de la demande d'origine que la suite règle (ou rouvre, avec `done: false`). */
55
+ export declare const CheckFollowUpsBodySchema: z.ZodObject<{
56
+ follow_ups: z.ZodArray<z.ZodString>;
57
+ done: z.ZodDefault<z.ZodBoolean>;
58
+ }, z.core.$strict>;
54
59
  /** `GET tasks` : recherche par mots et filtres. */
55
60
  export declare const SearchTasksQuerySchema: z.ZodObject<{
56
61
  query: z.ZodOptional<z.ZodString>;
@@ -186,6 +191,81 @@ export declare const PromoteIdeaBodySchema: z.ZodObject<{
186
191
  }>>;
187
192
  parent: z.ZodOptional<z.ZodString>;
188
193
  }, z.core.$strict>;
194
+ /** `GET views` : vues de l'auteur de la demande. */
195
+ export declare const ListViewsQuerySchema: z.ZodObject<{
196
+ request_id: z.ZodString;
197
+ }, z.core.$strict>;
198
+ export declare const CreateViewBodySchema: z.ZodObject<{
199
+ layout: z.ZodOptional<z.ZodEnum<{
200
+ kanban: "kanban";
201
+ list: "list";
202
+ matrix: "matrix";
203
+ }>>;
204
+ group_by: z.ZodOptional<z.ZodEnum<{
205
+ none: "none";
206
+ priority: "priority";
207
+ status: "status";
208
+ }>>;
209
+ then_by: z.ZodOptional<z.ZodEnum<{
210
+ none: "none";
211
+ priority: "priority";
212
+ status: "status";
213
+ }>>;
214
+ show_empty_groups: z.ZodOptional<z.ZodBoolean>;
215
+ statuses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
216
+ doing: "doing";
217
+ done: "done";
218
+ review: "review";
219
+ todo: "todo";
220
+ }>>>;
221
+ priorities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
222
+ critical: "critical";
223
+ high: "high";
224
+ low: "low";
225
+ medium: "medium";
226
+ }>>>;
227
+ assignees: z.ZodOptional<z.ZodArray<z.ZodString>>;
228
+ unassigned: z.ZodOptional<z.ZodBoolean>;
229
+ request_id: z.ZodString;
230
+ name: z.ZodString;
231
+ }, z.core.$strict>;
232
+ export declare const UpdateViewBodySchema: z.ZodObject<{
233
+ name: z.ZodOptional<z.ZodString>;
234
+ layout: z.ZodOptional<z.ZodEnum<{
235
+ kanban: "kanban";
236
+ list: "list";
237
+ matrix: "matrix";
238
+ }>>;
239
+ group_by: z.ZodOptional<z.ZodEnum<{
240
+ none: "none";
241
+ priority: "priority";
242
+ status: "status";
243
+ }>>;
244
+ then_by: z.ZodOptional<z.ZodEnum<{
245
+ none: "none";
246
+ priority: "priority";
247
+ status: "status";
248
+ }>>;
249
+ show_empty_groups: z.ZodOptional<z.ZodBoolean>;
250
+ statuses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
251
+ doing: "doing";
252
+ done: "done";
253
+ review: "review";
254
+ todo: "todo";
255
+ }>>>;
256
+ priorities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
257
+ critical: "critical";
258
+ high: "high";
259
+ low: "low";
260
+ medium: "medium";
261
+ }>>>;
262
+ assignees: z.ZodOptional<z.ZodArray<z.ZodString>>;
263
+ unassigned: z.ZodOptional<z.ZodBoolean>;
264
+ request_id: z.ZodString;
265
+ }, z.core.$strict>;
266
+ export declare const DeleteViewBodySchema: z.ZodObject<{
267
+ request_id: z.ZodString;
268
+ }, z.core.$strict>;
189
269
  /** Enveloppe de toute réponse réussie : texte pour l'agent et données structurées. */
190
270
  export declare const AgentEnvelopeSchema: z.ZodObject<{
191
271
  text: z.ZodString;
@@ -242,6 +322,13 @@ export declare const AgentTaskSummarySchema: z.ZodObject<{
242
322
  tags: z.ZodArray<z.ZodString>;
243
323
  }, z.core.$strip>;
244
324
  export type AgentTaskSummary = z.infer<typeof AgentTaskSummarySchema>;
325
+ /** Point à régler laissé à l'auteur d'une demande, coché ou non. */
326
+ export declare const AgentFollowUpSchema: z.ZodObject<{
327
+ id: z.ZodString;
328
+ text: z.ZodString;
329
+ done: z.ZodBoolean;
330
+ }, z.core.$strip>;
331
+ export type AgentFollowUp = z.infer<typeof AgentFollowUpSchema>;
245
332
  export declare const AgentRequestSummarySchema: z.ZodObject<{
246
333
  id: z.ZodString;
247
334
  kind: z.ZodEnum<{
@@ -274,8 +361,13 @@ export declare const AgentRequestSummarySchema: z.ZodObject<{
274
361
  claimedAt: z.ZodNullable<z.ZodISODateTime>;
275
362
  claimedByThisToken: z.ZodBoolean;
276
363
  reply: z.ZodNullable<z.ZodString>;
277
- followUps: z.ZodArray<z.ZodString>;
364
+ followUps: z.ZodArray<z.ZodObject<{
365
+ id: z.ZodString;
366
+ text: z.ZodString;
367
+ done: z.ZodBoolean;
368
+ }, z.core.$strip>>;
278
369
  failureReason: z.ZodNullable<z.ZodString>;
370
+ parentRequestId: z.ZodNullable<z.ZodString>;
279
371
  }, z.core.$strip>;
280
372
  export type AgentRequestSummary = z.infer<typeof AgentRequestSummarySchema>;
281
373
  export declare const AgentIdeaSchema: z.ZodObject<{
@@ -328,8 +420,13 @@ export declare const ListRequestsDataSchema: z.ZodObject<{
328
420
  claimedAt: z.ZodNullable<z.ZodISODateTime>;
329
421
  claimedByThisToken: z.ZodBoolean;
330
422
  reply: z.ZodNullable<z.ZodString>;
331
- followUps: z.ZodArray<z.ZodString>;
423
+ followUps: z.ZodArray<z.ZodObject<{
424
+ id: z.ZodString;
425
+ text: z.ZodString;
426
+ done: z.ZodBoolean;
427
+ }, z.core.$strip>>;
332
428
  failureReason: z.ZodNullable<z.ZodString>;
429
+ parentRequestId: z.ZodNullable<z.ZodString>;
333
430
  }, z.core.$strip>>;
334
431
  }, z.core.$strip>;
335
432
  export declare const ClaimRequestDataSchema: z.ZodObject<{
@@ -365,8 +462,13 @@ export declare const ClaimRequestDataSchema: z.ZodObject<{
365
462
  claimedAt: z.ZodNullable<z.ZodISODateTime>;
366
463
  claimedByThisToken: z.ZodBoolean;
367
464
  reply: z.ZodNullable<z.ZodString>;
368
- followUps: z.ZodArray<z.ZodString>;
465
+ followUps: z.ZodArray<z.ZodObject<{
466
+ id: z.ZodString;
467
+ text: z.ZodString;
468
+ done: z.ZodBoolean;
469
+ }, z.core.$strip>>;
369
470
  failureReason: z.ZodNullable<z.ZodString>;
471
+ parentRequestId: z.ZodNullable<z.ZodString>;
370
472
  }, z.core.$strip>;
371
473
  history: z.ZodArray<z.ZodObject<{
372
474
  id: z.ZodString;
@@ -400,8 +502,101 @@ export declare const ClaimRequestDataSchema: z.ZodObject<{
400
502
  claimedAt: z.ZodNullable<z.ZodISODateTime>;
401
503
  claimedByThisToken: z.ZodBoolean;
402
504
  reply: z.ZodNullable<z.ZodString>;
403
- followUps: z.ZodArray<z.ZodString>;
505
+ followUps: z.ZodArray<z.ZodObject<{
506
+ id: z.ZodString;
507
+ text: z.ZodString;
508
+ done: z.ZodBoolean;
509
+ }, z.core.$strip>>;
404
510
  failureReason: z.ZodNullable<z.ZodString>;
511
+ parentRequestId: z.ZodNullable<z.ZodString>;
512
+ }, z.core.$strip>>;
513
+ thread: z.ZodNullable<z.ZodArray<z.ZodObject<{
514
+ authorName: z.ZodString;
515
+ byAgent: z.ZodBoolean;
516
+ body: z.ZodString;
517
+ createdAt: z.ZodISODateTime;
518
+ }, z.core.$strip>>>;
519
+ parent: z.ZodNullable<z.ZodObject<{
520
+ request: z.ZodObject<{
521
+ id: z.ZodString;
522
+ kind: z.ZodEnum<{
523
+ idea: "idea";
524
+ idea_promotion: "idea_promotion";
525
+ message: "message";
526
+ remark: "remark";
527
+ test_review: "test_review";
528
+ }>;
529
+ status: z.ZodEnum<{
530
+ cancelled: "cancelled";
531
+ done: "done";
532
+ failed: "failed";
533
+ pending: "pending";
534
+ processing: "processing";
535
+ }>;
536
+ text: z.ZodString;
537
+ author: z.ZodObject<{
538
+ id: z.ZodString;
539
+ name: z.ZodString;
540
+ email: z.ZodString;
541
+ }, z.core.$strip>;
542
+ contextTask: z.ZodNullable<z.ZodObject<{
543
+ id: z.ZodString;
544
+ key: z.ZodString;
545
+ title: z.ZodString;
546
+ }, z.core.$strip>>;
547
+ contextIdeaId: z.ZodNullable<z.ZodString>;
548
+ createdAt: z.ZodISODateTime;
549
+ claimedAt: z.ZodNullable<z.ZodISODateTime>;
550
+ claimedByThisToken: z.ZodBoolean;
551
+ reply: z.ZodNullable<z.ZodString>;
552
+ followUps: z.ZodArray<z.ZodObject<{
553
+ id: z.ZodString;
554
+ text: z.ZodString;
555
+ done: z.ZodBoolean;
556
+ }, z.core.$strip>>;
557
+ failureReason: z.ZodNullable<z.ZodString>;
558
+ parentRequestId: z.ZodNullable<z.ZodString>;
559
+ }, z.core.$strip>;
560
+ suites: z.ZodArray<z.ZodObject<{
561
+ id: z.ZodString;
562
+ kind: z.ZodEnum<{
563
+ idea: "idea";
564
+ idea_promotion: "idea_promotion";
565
+ message: "message";
566
+ remark: "remark";
567
+ test_review: "test_review";
568
+ }>;
569
+ status: z.ZodEnum<{
570
+ cancelled: "cancelled";
571
+ done: "done";
572
+ failed: "failed";
573
+ pending: "pending";
574
+ processing: "processing";
575
+ }>;
576
+ text: z.ZodString;
577
+ author: z.ZodObject<{
578
+ id: z.ZodString;
579
+ name: z.ZodString;
580
+ email: z.ZodString;
581
+ }, z.core.$strip>;
582
+ contextTask: z.ZodNullable<z.ZodObject<{
583
+ id: z.ZodString;
584
+ key: z.ZodString;
585
+ title: z.ZodString;
586
+ }, z.core.$strip>>;
587
+ contextIdeaId: z.ZodNullable<z.ZodString>;
588
+ createdAt: z.ZodISODateTime;
589
+ claimedAt: z.ZodNullable<z.ZodISODateTime>;
590
+ claimedByThisToken: z.ZodBoolean;
591
+ reply: z.ZodNullable<z.ZodString>;
592
+ followUps: z.ZodArray<z.ZodObject<{
593
+ id: z.ZodString;
594
+ text: z.ZodString;
595
+ done: z.ZodBoolean;
596
+ }, z.core.$strip>>;
597
+ failureReason: z.ZodNullable<z.ZodString>;
598
+ parentRequestId: z.ZodNullable<z.ZodString>;
599
+ }, z.core.$strip>>;
405
600
  }, z.core.$strip>>;
406
601
  instructions: z.ZodObject<{
407
602
  site: z.ZodNullable<z.ZodString>;
@@ -491,11 +686,59 @@ export declare const FinishRequestDataSchema: z.ZodObject<{
491
686
  claimedAt: z.ZodNullable<z.ZodISODateTime>;
492
687
  claimedByThisToken: z.ZodBoolean;
493
688
  reply: z.ZodNullable<z.ZodString>;
494
- followUps: z.ZodArray<z.ZodString>;
689
+ followUps: z.ZodArray<z.ZodObject<{
690
+ id: z.ZodString;
691
+ text: z.ZodString;
692
+ done: z.ZodBoolean;
693
+ }, z.core.$strip>>;
495
694
  failureReason: z.ZodNullable<z.ZodString>;
695
+ parentRequestId: z.ZodNullable<z.ZodString>;
496
696
  }, z.core.$strip>;
497
697
  actionCount: z.ZodNumber;
498
698
  }, z.core.$strip>;
699
+ /** Demande d'origine après que la suite a coché ou rouvert ses points. */
700
+ export declare const CheckFollowUpsDataSchema: z.ZodObject<{
701
+ request: z.ZodObject<{
702
+ id: z.ZodString;
703
+ kind: z.ZodEnum<{
704
+ idea: "idea";
705
+ idea_promotion: "idea_promotion";
706
+ message: "message";
707
+ remark: "remark";
708
+ test_review: "test_review";
709
+ }>;
710
+ status: z.ZodEnum<{
711
+ cancelled: "cancelled";
712
+ done: "done";
713
+ failed: "failed";
714
+ pending: "pending";
715
+ processing: "processing";
716
+ }>;
717
+ text: z.ZodString;
718
+ author: z.ZodObject<{
719
+ id: z.ZodString;
720
+ name: z.ZodString;
721
+ email: z.ZodString;
722
+ }, z.core.$strip>;
723
+ contextTask: z.ZodNullable<z.ZodObject<{
724
+ id: z.ZodString;
725
+ key: z.ZodString;
726
+ title: z.ZodString;
727
+ }, z.core.$strip>>;
728
+ contextIdeaId: z.ZodNullable<z.ZodString>;
729
+ createdAt: z.ZodISODateTime;
730
+ claimedAt: z.ZodNullable<z.ZodISODateTime>;
731
+ claimedByThisToken: z.ZodBoolean;
732
+ reply: z.ZodNullable<z.ZodString>;
733
+ followUps: z.ZodArray<z.ZodObject<{
734
+ id: z.ZodString;
735
+ text: z.ZodString;
736
+ done: z.ZodBoolean;
737
+ }, z.core.$strip>>;
738
+ failureReason: z.ZodNullable<z.ZodString>;
739
+ parentRequestId: z.ZodNullable<z.ZodString>;
740
+ }, z.core.$strip>;
741
+ }, z.core.$strip>;
499
742
  export declare const ContextDataSchema: z.ZodObject<{
500
743
  space: z.ZodObject<{
501
744
  id: z.ZodString;
@@ -783,6 +1026,125 @@ export declare const PromoteIdeaDataSchema: z.ZodObject<{
783
1026
  tags: z.ZodArray<z.ZodString>;
784
1027
  }, z.core.$strip>;
785
1028
  }, z.core.$strip>;
1029
+ /** Vue du tableau de bord d'un membre ; filtres vides : toutes les valeurs. */
1030
+ export declare const AgentViewSchema: z.ZodObject<{
1031
+ id: z.ZodString;
1032
+ name: z.ZodString;
1033
+ layout: z.ZodEnum<{
1034
+ kanban: "kanban";
1035
+ list: "list";
1036
+ matrix: "matrix";
1037
+ }>;
1038
+ groupBy: z.ZodEnum<{
1039
+ none: "none";
1040
+ priority: "priority";
1041
+ status: "status";
1042
+ }>;
1043
+ thenBy: z.ZodEnum<{
1044
+ none: "none";
1045
+ priority: "priority";
1046
+ status: "status";
1047
+ }>;
1048
+ showEmptyGroups: z.ZodBoolean;
1049
+ statuses: z.ZodArray<z.ZodEnum<{
1050
+ doing: "doing";
1051
+ done: "done";
1052
+ review: "review";
1053
+ todo: "todo";
1054
+ }>>;
1055
+ priorities: z.ZodArray<z.ZodEnum<{
1056
+ critical: "critical";
1057
+ high: "high";
1058
+ low: "low";
1059
+ medium: "medium";
1060
+ }>>;
1061
+ assigneeIds: z.ZodArray<z.ZodString>;
1062
+ unassigned: z.ZodBoolean;
1063
+ }, z.core.$strip>;
1064
+ export type AgentView = z.infer<typeof AgentViewSchema>;
1065
+ /** Vues de l'auteur de la demande, dans l'ordre de ses onglets. */
1066
+ export declare const ViewsDataSchema: z.ZodObject<{
1067
+ owner: z.ZodObject<{
1068
+ id: z.ZodString;
1069
+ name: z.ZodString;
1070
+ email: z.ZodString;
1071
+ }, z.core.$strip>;
1072
+ views: z.ZodArray<z.ZodObject<{
1073
+ id: z.ZodString;
1074
+ name: z.ZodString;
1075
+ layout: z.ZodEnum<{
1076
+ kanban: "kanban";
1077
+ list: "list";
1078
+ matrix: "matrix";
1079
+ }>;
1080
+ groupBy: z.ZodEnum<{
1081
+ none: "none";
1082
+ priority: "priority";
1083
+ status: "status";
1084
+ }>;
1085
+ thenBy: z.ZodEnum<{
1086
+ none: "none";
1087
+ priority: "priority";
1088
+ status: "status";
1089
+ }>;
1090
+ showEmptyGroups: z.ZodBoolean;
1091
+ statuses: z.ZodArray<z.ZodEnum<{
1092
+ doing: "doing";
1093
+ done: "done";
1094
+ review: "review";
1095
+ todo: "todo";
1096
+ }>>;
1097
+ priorities: z.ZodArray<z.ZodEnum<{
1098
+ critical: "critical";
1099
+ high: "high";
1100
+ low: "low";
1101
+ medium: "medium";
1102
+ }>>;
1103
+ assigneeIds: z.ZodArray<z.ZodString>;
1104
+ unassigned: z.ZodBoolean;
1105
+ }, z.core.$strip>>;
1106
+ }, z.core.$strip>;
1107
+ export declare const ViewDataSchema: z.ZodObject<{
1108
+ owner: z.ZodObject<{
1109
+ id: z.ZodString;
1110
+ name: z.ZodString;
1111
+ email: z.ZodString;
1112
+ }, z.core.$strip>;
1113
+ view: z.ZodObject<{
1114
+ id: z.ZodString;
1115
+ name: z.ZodString;
1116
+ layout: z.ZodEnum<{
1117
+ kanban: "kanban";
1118
+ list: "list";
1119
+ matrix: "matrix";
1120
+ }>;
1121
+ groupBy: z.ZodEnum<{
1122
+ none: "none";
1123
+ priority: "priority";
1124
+ status: "status";
1125
+ }>;
1126
+ thenBy: z.ZodEnum<{
1127
+ none: "none";
1128
+ priority: "priority";
1129
+ status: "status";
1130
+ }>;
1131
+ showEmptyGroups: z.ZodBoolean;
1132
+ statuses: z.ZodArray<z.ZodEnum<{
1133
+ doing: "doing";
1134
+ done: "done";
1135
+ review: "review";
1136
+ todo: "todo";
1137
+ }>>;
1138
+ priorities: z.ZodArray<z.ZodEnum<{
1139
+ critical: "critical";
1140
+ high: "high";
1141
+ low: "low";
1142
+ medium: "medium";
1143
+ }>>;
1144
+ assigneeIds: z.ZodArray<z.ZodString>;
1145
+ unassigned: z.ZodBoolean;
1146
+ }, z.core.$strip>;
1147
+ }, z.core.$strip>;
786
1148
  /** Présence d'un veilleur de notifications pour le jeton. */
787
1149
  export declare const AgentWatcherSchema: z.ZodObject<{
788
1150
  armed: z.ZodBoolean;
@@ -862,8 +1224,13 @@ export declare const WaitRequestsDataSchema: z.ZodObject<{
862
1224
  claimedAt: z.ZodNullable<z.ZodISODateTime>;
863
1225
  claimedByThisToken: z.ZodBoolean;
864
1226
  reply: z.ZodNullable<z.ZodString>;
865
- followUps: z.ZodArray<z.ZodString>;
1227
+ followUps: z.ZodArray<z.ZodObject<{
1228
+ id: z.ZodString;
1229
+ text: z.ZodString;
1230
+ done: z.ZodBoolean;
1231
+ }, z.core.$strip>>;
866
1232
  failureReason: z.ZodNullable<z.ZodString>;
1233
+ parentRequestId: z.ZodNullable<z.ZodString>;
867
1234
  }, z.core.$strip>>;
868
1235
  cursor: z.ZodISODateTime;
869
1236
  timedOut: z.ZodBoolean;
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
- import { MemberRoleSchema, REQUEST_STATUSES, RequestKindSchema, RequestStatusSchema, SpaceKindSchema, TASK_PRIORITIES, TASK_STATUSES, TASK_TYPES, TaskPrioritySchema, TaskStatusSchema, TaskTypeSchema, TestResultValueSchema, } from "./enums.schema.js";
3
- import { IdSchema, TimestampSchema } from "./entities.schema.js";
2
+ import { BOARD_GROUPINGS, BOARD_LAYOUTS, BoardGroupingSchema, BoardLayoutSchema, MemberRoleSchema, REQUEST_STATUSES, RequestKindSchema, RequestStatusSchema, SpaceKindSchema, TASK_PRIORITIES, TASK_STATUSES, TASK_TYPES, TaskPrioritySchema, TaskStatusSchema, TaskTypeSchema, TestResultValueSchema, } from "./enums.schema.js";
3
+ import { IdSchema, MAX_BOARD_VIEW_NAME_LENGTH, TimestampSchema } from "./entities.schema.js";
4
4
  import { MAX_TAG_LENGTH, MAX_TASK_TITLE_LENGTH } from "./tasks-api.schema.js";
5
5
  /**
6
6
  * API des agents (`/api/agent/*`), partagée par le site et le mode MCP :
@@ -52,6 +52,13 @@ export const CompleteRequestBodySchema = z
52
52
  })
53
53
  .strict();
54
54
  export const FailRequestBodySchema = z.object({ reason: z.string().max(MAX_REASON_LENGTH) }).strict();
55
+ /** `POST requests/:id/follow-ups` : points de la demande d'origine que la suite règle (ou rouvre, avec `done: false`). */
56
+ export const CheckFollowUpsBodySchema = z
57
+ .object({
58
+ follow_ups: z.array(z.string().min(1)).min(1).max(MAX_FOLLOW_UPS),
59
+ done: z.boolean().default(true),
60
+ })
61
+ .strict();
55
62
  /** `GET tasks` : recherche par mots et filtres. */
56
63
  export const SearchTasksQuerySchema = z
57
64
  .object({
@@ -115,6 +122,23 @@ export const PromoteIdeaBodySchema = z
115
122
  parent: RefSchema.optional(),
116
123
  })
117
124
  .strict();
125
+ /** `GET views` : vues de l'auteur de la demande. */
126
+ export const ListViewsQuerySchema = z.object({ request_id: RequestIdSchema }).strict();
127
+ /** Réglages d'une vue tels que l'agent les passe ; `assignees` : identifiants ou adresses e-mail de membres. */
128
+ const ViewSettingsBodySchema = z.object({
129
+ name: z.string().max(MAX_BOARD_VIEW_NAME_LENGTH),
130
+ layout: z.enum(BOARD_LAYOUTS),
131
+ group_by: z.enum(BOARD_GROUPINGS),
132
+ then_by: z.enum(BOARD_GROUPINGS),
133
+ show_empty_groups: z.boolean(),
134
+ statuses: z.array(z.enum(TASK_STATUSES)),
135
+ priorities: z.array(z.enum(TASK_PRIORITIES)),
136
+ assignees: z.array(z.string().min(1)),
137
+ unassigned: z.boolean(),
138
+ });
139
+ export const CreateViewBodySchema = ViewSettingsBodySchema.partial().extend({ request_id: RequestIdSchema, name: ViewSettingsBodySchema.shape.name }).strict();
140
+ export const UpdateViewBodySchema = ViewSettingsBodySchema.partial().extend({ request_id: RequestIdSchema }).strict();
141
+ export const DeleteViewBodySchema = z.object({ request_id: RequestIdSchema }).strict();
118
142
  // --- Réponses ---------------------------------------------------------------------
119
143
  /** Enveloppe de toute réponse réussie : texte pour l'agent et données structurées. */
120
144
  export const AgentEnvelopeSchema = z.object({ text: z.string(), data: z.unknown() });
@@ -134,6 +158,8 @@ export const AgentTaskSummarySchema = z.object({
134
158
  assigneeIds: z.array(IdSchema),
135
159
  tags: z.array(z.string()),
136
160
  });
161
+ /** Point à régler laissé à l'auteur d'une demande, coché ou non. */
162
+ export const AgentFollowUpSchema = z.object({ id: IdSchema, text: z.string(), done: z.boolean() });
137
163
  export const AgentRequestSummarySchema = z.object({
138
164
  id: IdSchema,
139
165
  kind: RequestKindSchema,
@@ -147,8 +173,10 @@ export const AgentRequestSummarySchema = z.object({
147
173
  /** Vrai si la demande est prise par le jeton qui appelle. */
148
174
  claimedByThisToken: z.boolean(),
149
175
  reply: z.string().nullable(),
150
- followUps: z.array(z.string()),
176
+ followUps: z.array(AgentFollowUpSchema),
151
177
  failureReason: z.string().nullable(),
178
+ /** Demande d'origine dont celle-ci est une suite ; null pour une demande d'origine. */
179
+ parentRequestId: IdSchema.nullable(),
152
180
  });
153
181
  export const AgentIdeaSchema = z.object({ id: IdSchema, text: z.string(), archived: z.boolean(), promotedTaskKey: z.string().nullable(), createdAt: TimestampSchema });
154
182
  export const ListRequestsDataSchema = z.object({ space: AgentSpaceSchema, requests: z.array(AgentRequestSummarySchema) });
@@ -156,6 +184,10 @@ export const ClaimRequestDataSchema = z.object({
156
184
  request: AgentRequestSummarySchema,
157
185
  /** Échanges précédents de l'auteur dans l'espace, du plus ancien au plus récent, pour une demande de type message. */
158
186
  history: z.array(AgentRequestSummarySchema),
187
+ /** Pour une demande confiée par un commentaire de tâche : les commentaires du fil jusqu'à celui-ci, du plus ancien au plus récent ; null sinon. */
188
+ thread: z.array(z.object({ authorName: z.string(), byAgent: z.boolean(), body: z.string(), createdAt: TimestampSchema })).nullable(),
189
+ /** Pour une suite : la demande d'origine (avec ses points) et ses suites précédentes ; null sinon. */
190
+ parent: z.object({ request: AgentRequestSummarySchema, suites: z.array(AgentRequestSummarySchema) }).nullable(),
159
191
  /** Instructions personnalisées à suivre : celles du site, puis celles de l'espace ; null quand il n'y en a pas. */
160
192
  instructions: z.object({ site: z.string().nullable(), space: z.string().nullable() }),
161
193
  space: AgentSpaceSchema,
@@ -164,6 +196,8 @@ export const ClaimRequestDataSchema = z.object({
164
196
  ideas: z.array(AgentIdeaSchema),
165
197
  });
166
198
  export const FinishRequestDataSchema = z.object({ request: AgentRequestSummarySchema, actionCount: z.number().int().min(0) });
199
+ /** Demande d'origine après que la suite a coché ou rouvert ses points. */
200
+ export const CheckFollowUpsDataSchema = z.object({ request: AgentRequestSummarySchema });
167
201
  export const ContextDataSchema = z.object({
168
202
  space: AgentSpaceSchema,
169
203
  members: z.array(AgentMemberSchema),
@@ -190,6 +224,23 @@ export const ChecklistDataSchema = z.object({
190
224
  export const CommentDataSchema = z.object({ task: AgentTaskSummarySchema, commentId: IdSchema });
191
225
  export const IdeaDataSchema = z.object({ idea: AgentIdeaSchema });
192
226
  export const PromoteIdeaDataSchema = z.object({ idea: AgentIdeaSchema, task: AgentTaskSummarySchema });
227
+ /** Vue du tableau de bord d'un membre ; filtres vides : toutes les valeurs. */
228
+ export const AgentViewSchema = z.object({
229
+ id: IdSchema,
230
+ name: z.string(),
231
+ layout: BoardLayoutSchema,
232
+ groupBy: BoardGroupingSchema,
233
+ thenBy: BoardGroupingSchema,
234
+ showEmptyGroups: z.boolean(),
235
+ statuses: z.array(TaskStatusSchema),
236
+ priorities: z.array(TaskPrioritySchema),
237
+ assigneeIds: z.array(IdSchema),
238
+ unassigned: z.boolean(),
239
+ });
240
+ const ViewOwnerSchema = z.object({ id: IdSchema, name: z.string(), email: z.string() });
241
+ /** Vues de l'auteur de la demande, dans l'ordre de ses onglets. */
242
+ export const ViewsDataSchema = z.object({ owner: ViewOwnerSchema, views: z.array(AgentViewSchema) });
243
+ export const ViewDataSchema = z.object({ owner: ViewOwnerSchema, view: AgentViewSchema });
193
244
  /** Présence d'un veilleur de notifications pour le jeton. */
194
245
  export const AgentWatcherSchema = z.object({ armed: z.boolean(), since: TimestampSchema.nullable(), lastSeen: TimestampSchema.nullable() });
195
246
  /**
@@ -112,6 +112,14 @@ export declare const RenameSpaceRequestSchema: z.ZodObject<{
112
112
  name: z.ZodString;
113
113
  }, z.core.$strip>;
114
114
  export type RenameSpaceRequest = z.infer<typeof RenameSpaceRequestSchema>;
115
+ /** Nombre de tâches de l'espace assignées à un membre, par statut. */
116
+ export declare const AssignedTaskCountsSchema: z.ZodObject<{
117
+ todo: z.ZodNumber;
118
+ doing: z.ZodNumber;
119
+ review: z.ZodNumber;
120
+ done: z.ZodNumber;
121
+ }, z.core.$strip>;
122
+ export type AssignedTaskCounts = z.infer<typeof AssignedTaskCountsSchema>;
115
123
  export declare const MemberViewSchema: z.ZodObject<{
116
124
  userId: z.ZodString;
117
125
  email: z.ZodPipe<z.ZodString, z.ZodEmail>;
@@ -120,6 +128,12 @@ export declare const MemberViewSchema: z.ZodObject<{
120
128
  member: "member";
121
129
  owner: "owner";
122
130
  }>;
131
+ assignedTasks: z.ZodObject<{
132
+ todo: z.ZodNumber;
133
+ doing: z.ZodNumber;
134
+ review: z.ZodNumber;
135
+ done: z.ZodNumber;
136
+ }, z.core.$strip>;
123
137
  }, z.core.$strip>;
124
138
  export type MemberView = z.infer<typeof MemberViewSchema>;
125
139
  export declare const PendingInvitationViewSchema: z.ZodObject<{
@@ -153,6 +167,12 @@ export declare const MembersResponseSchema: z.ZodObject<{
153
167
  member: "member";
154
168
  owner: "owner";
155
169
  }>;
170
+ assignedTasks: z.ZodObject<{
171
+ todo: z.ZodNumber;
172
+ doing: z.ZodNumber;
173
+ review: z.ZodNumber;
174
+ done: z.ZodNumber;
175
+ }, z.core.$strip>;
156
176
  }, z.core.$strip>>;
157
177
  invitations: z.ZodArray<z.ZodObject<{
158
178
  id: z.ZodString;
@@ -206,6 +226,12 @@ export declare const InviteResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
206
226
  member: "member";
207
227
  owner: "owner";
208
228
  }>;
229
+ assignedTasks: z.ZodObject<{
230
+ todo: z.ZodNumber;
231
+ doing: z.ZodNumber;
232
+ review: z.ZodNumber;
233
+ done: z.ZodNumber;
234
+ }, z.core.$strip>;
209
235
  }, z.core.$strip>;
210
236
  }, z.core.$strip>, z.ZodObject<{
211
237
  outcome: z.ZodLiteral<"invited">;
@@ -60,11 +60,20 @@ export const CreateSpaceRequestSchema = z.object({
60
60
  keyPrefix: z.string().trim().toUpperCase().pipe(KeyPrefixSchema).optional(),
61
61
  });
62
62
  export const RenameSpaceRequestSchema = z.object({ name: SpaceNameSchema });
63
+ /** Nombre de tâches de l'espace assignées à un membre, par statut. */
64
+ export const AssignedTaskCountsSchema = z.object({
65
+ todo: z.number().int().nonnegative(),
66
+ doing: z.number().int().nonnegative(),
67
+ review: z.number().int().nonnegative(),
68
+ done: z.number().int().nonnegative(),
69
+ });
63
70
  export const MemberViewSchema = z.object({
64
71
  userId: IdSchema,
65
72
  email: EmailSchema,
66
73
  displayName: z.string().nullable(),
67
74
  role: MemberRoleSchema,
75
+ /** Tâches de l'espace assignées au membre, désassignées s'il quitte l'espace ou en est retiré. */
76
+ assignedTasks: AssignedTaskCountsSchema,
68
77
  });
69
78
  export const PendingInvitationViewSchema = z.object({
70
79
  id: IdSchema,