@xpert-ai/contracts 3.38.1 → 3.39.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 (33) hide show
  1. package/index.cjs.js +150 -22
  2. package/index.esm.js +134 -23
  3. package/package.json +2 -2
  4. package/src/ai/assistant-capability.model.d.ts +21 -0
  5. package/src/ai/chat.model.d.ts +2 -0
  6. package/src/ai/conversation-trail.model.d.ts +12 -12
  7. package/src/ai/execution-activity.model.d.ts +10 -10
  8. package/src/ai/index.d.ts +1 -1
  9. package/src/ai/project-pipeline/analytics.d.ts +4 -4
  10. package/src/ai/project-pipeline/commands.schema.d.ts +17 -11
  11. package/src/ai/project-pipeline/configuration-declaration.schema.d.ts +6 -6
  12. package/src/ai/project-pipeline/configuration-form.d.ts +47 -47
  13. package/src/ai/project-pipeline/configuration.schema.d.ts +8 -8
  14. package/src/ai/project-pipeline/contribution.schema.d.ts +18 -18
  15. package/src/ai/project-pipeline/index.d.ts +1 -0
  16. package/src/ai/project-pipeline/model-usage-statistics.d.ts +2 -2
  17. package/src/ai/project-pipeline/operation-actions.schema.d.ts +112 -0
  18. package/src/ai/project-pipeline/operation.schema.d.ts +3 -0
  19. package/src/ai/project-pipeline/portfolio.schema.d.ts +8 -8
  20. package/src/ai/project-pipeline/provider-actions.schema.d.ts +74 -74
  21. package/src/ai/project-pipeline/runtime.schema.d.ts +28 -28
  22. package/src/ai/project-task-graph.model.d.ts +2 -0
  23. package/src/ai/project-task-runtime.model.d.ts +39 -35
  24. package/src/ai/xpert-tool.model.d.ts +3 -3
  25. package/src/ai/xpert-toolset.model.d.ts +2 -0
  26. package/src/always-on/agent-output.model.d.ts +8 -7
  27. package/src/always-on/output-workbench.schema.d.ts +13 -10
  28. package/src/artifacts/artifact-presentation.model.d.ts +5 -1
  29. package/src/user-notification.schema.d.ts +689 -97
  30. package/src/view-extension/index.d.ts +2 -0
  31. package/src/view-extension/project-workbench.d.ts +5 -0
  32. package/src/view-extension/workbench-entry.schema.d.ts +218 -0
  33. package/src/view-extension/workbench.d.ts +2 -0
@@ -1,5 +1,6 @@
1
1
  import type { AgentOutputItem } from './always-on/agent-output.model';
2
2
  import { z } from 'zod/v3';
3
+ import { type WorkbenchEntryTarget } from './view-extension/workbench-entry.schema';
3
4
  export declare const notificationClientSchema: z.ZodEnum<["web", "desktop"]>;
4
5
  export type NotificationClient = z.infer<typeof notificationClientSchema>;
5
6
  export declare const announcementActionSchema: z.ZodObject<{
@@ -254,6 +255,7 @@ export declare const announcementSchema: z.ZodObject<{
254
255
  }, "strict", z.ZodTypeAny, {
255
256
  status: "draft" | "published" | "withdrawn";
256
257
  revision: number;
258
+ id: string;
257
259
  title: string;
258
260
  body: string;
259
261
  category: "general" | "maintenance" | "model_retirement";
@@ -266,17 +268,16 @@ export declare const announcementSchema: z.ZodObject<{
266
268
  label: string;
267
269
  url: string;
268
270
  } | null;
269
- id: string;
270
271
  createdAt: string;
271
272
  dismissedAt: string | null;
272
273
  }, {
273
274
  status: "draft" | "published" | "withdrawn";
274
275
  revision: number;
276
+ id: string;
275
277
  title: string;
276
278
  body: string;
277
279
  clients: ("web" | "desktop")[];
278
280
  startsAt: string;
279
- id: string;
280
281
  createdAt: string;
281
282
  category?: "general" | "maintenance" | "model_retirement" | undefined;
282
283
  severity?: "info" | "important" | undefined;
@@ -394,13 +395,13 @@ declare const taskNotificationSchema: z.ZodObject<{
394
395
  }>;
395
396
  }, "strict", z.ZodTypeAny, {
396
397
  kind: "agent.completed";
398
+ id: string;
397
399
  action: {
398
400
  type: "open_conversation";
399
401
  assistantId: string;
400
402
  conversationId: string;
401
403
  threadId: string | null;
402
404
  };
403
- id: string;
404
405
  createdAt: string;
405
406
  source: {
406
407
  type: "scheduled_task";
@@ -412,13 +413,13 @@ declare const taskNotificationSchema: z.ZodObject<{
412
413
  readAt: string | null;
413
414
  }, {
414
415
  kind: "agent.completed";
416
+ id: string;
415
417
  action: {
416
418
  type: "open_conversation";
417
419
  assistantId: string;
418
420
  conversationId: string;
419
421
  threadId: string | null;
420
422
  };
421
- id: string;
422
423
  createdAt: string;
423
424
  source: {
424
425
  type: "scheduled_task";
@@ -431,7 +432,7 @@ declare const taskNotificationSchema: z.ZodObject<{
431
432
  }>;
432
433
  type TaskNotification = Omit<Required<z.output<typeof taskNotificationSchema>>, 'source' | 'action'> & {
433
434
  source: Required<z.output<typeof notificationSourceSchema>>;
434
- action: Required<NonNullable<z.output<typeof userNotificationSchema>['action']>>;
435
+ action: OpenConversationAction;
435
436
  };
436
437
  export declare const agentOutputOriginSchema: z.ZodObject<{
437
438
  type: z.ZodLiteral<"agent_output">;
@@ -443,6 +444,175 @@ export declare const agentOutputOriginSchema: z.ZodObject<{
443
444
  type: "agent_output";
444
445
  deliveryId: string;
445
446
  }>;
447
+ /** Opt-in protocol; older clients must not receive kinds they cannot render. */
448
+ export declare const ACTION_NOTIFICATION_ACCEPT = "application/json; profile=\"xpert-notifications-v2\"";
449
+ /** Opt-in protocol for generic Workbench targets; v2 remains restricted to Project pipelines. */
450
+ export declare const WORKBENCH_NOTIFICATION_ACCEPT = "application/json; profile=\"xpert-notifications-v3\"";
451
+ export declare const actionNotificationSourceSchema: z.ZodObject<{
452
+ type: z.ZodLiteral<"action">;
453
+ provider: z.ZodString;
454
+ key: z.ZodString;
455
+ version: z.ZodString;
456
+ }, "strict", z.ZodTypeAny, {
457
+ key: string;
458
+ type: "action";
459
+ provider: string;
460
+ version: string;
461
+ }, {
462
+ key: string;
463
+ type: "action";
464
+ provider: string;
465
+ version: string;
466
+ }>;
467
+ export declare const notificationWorkbenchSchema: z.ZodDiscriminatedUnion<"target", [z.ZodObject<{
468
+ target: z.ZodLiteral<"project.pipelines">;
469
+ organizationId: z.ZodNullable<z.ZodString>;
470
+ projectId: z.ZodString;
471
+ pipelineInstanceId: z.ZodString;
472
+ pipelineRoundId: z.ZodString;
473
+ pipelineNodeId: z.ZodString;
474
+ }, "strict", z.ZodTypeAny, {
475
+ projectId: string;
476
+ target: "project.pipelines";
477
+ organizationId: string | null;
478
+ pipelineInstanceId: string;
479
+ pipelineRoundId: string;
480
+ pipelineNodeId: string;
481
+ }, {
482
+ projectId: string;
483
+ target: "project.pipelines";
484
+ organizationId: string | null;
485
+ pipelineInstanceId: string;
486
+ pipelineRoundId: string;
487
+ pipelineNodeId: string;
488
+ }>, z.ZodObject<{
489
+ viewKey: z.ZodString;
490
+ selectionId: z.ZodOptional<z.ZodString>;
491
+ parameters: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, "many">]>>, Record<string, string | number | boolean | (string | number | boolean | null)[] | null>, Record<string, string | number | boolean | (string | number | boolean | null)[] | null>>>;
492
+ } & {
493
+ projectId: z.ZodNullable<z.ZodString>;
494
+ } & {
495
+ target: z.ZodLiteral<"workbench.view">;
496
+ assistantId: z.ZodString;
497
+ organizationId: z.ZodNullable<z.ZodString>;
498
+ }, "strict", z.ZodTypeAny, {
499
+ viewKey: string;
500
+ projectId: string | null;
501
+ target: "workbench.view";
502
+ assistantId: string;
503
+ organizationId: string | null;
504
+ selectionId?: string | undefined;
505
+ parameters?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
506
+ }, {
507
+ viewKey: string;
508
+ projectId: string | null;
509
+ target: "workbench.view";
510
+ assistantId: string;
511
+ organizationId: string | null;
512
+ selectionId?: string | undefined;
513
+ parameters?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
514
+ }>]>;
515
+ export declare const actionNotificationPresentationSchema: z.ZodObject<{
516
+ title: z.ZodString;
517
+ state: z.ZodEnum<["pending", "handled", "closed"]>;
518
+ workbench: z.ZodDiscriminatedUnion<"target", [z.ZodObject<{
519
+ target: z.ZodLiteral<"project.pipelines">;
520
+ organizationId: z.ZodNullable<z.ZodString>;
521
+ projectId: z.ZodString;
522
+ pipelineInstanceId: z.ZodString;
523
+ pipelineRoundId: z.ZodString;
524
+ pipelineNodeId: z.ZodString;
525
+ }, "strict", z.ZodTypeAny, {
526
+ projectId: string;
527
+ target: "project.pipelines";
528
+ organizationId: string | null;
529
+ pipelineInstanceId: string;
530
+ pipelineRoundId: string;
531
+ pipelineNodeId: string;
532
+ }, {
533
+ projectId: string;
534
+ target: "project.pipelines";
535
+ organizationId: string | null;
536
+ pipelineInstanceId: string;
537
+ pipelineRoundId: string;
538
+ pipelineNodeId: string;
539
+ }>, z.ZodObject<{
540
+ viewKey: z.ZodString;
541
+ selectionId: z.ZodOptional<z.ZodString>;
542
+ parameters: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, "many">]>>, Record<string, string | number | boolean | (string | number | boolean | null)[] | null>, Record<string, string | number | boolean | (string | number | boolean | null)[] | null>>>;
543
+ } & {
544
+ projectId: z.ZodNullable<z.ZodString>;
545
+ } & {
546
+ target: z.ZodLiteral<"workbench.view">;
547
+ assistantId: z.ZodString;
548
+ organizationId: z.ZodNullable<z.ZodString>;
549
+ }, "strict", z.ZodTypeAny, {
550
+ viewKey: string;
551
+ projectId: string | null;
552
+ target: "workbench.view";
553
+ assistantId: string;
554
+ organizationId: string | null;
555
+ selectionId?: string | undefined;
556
+ parameters?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
557
+ }, {
558
+ viewKey: string;
559
+ projectId: string | null;
560
+ target: "workbench.view";
561
+ assistantId: string;
562
+ organizationId: string | null;
563
+ selectionId?: string | undefined;
564
+ parameters?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
565
+ }>]>;
566
+ }, "strict", z.ZodTypeAny, {
567
+ state: "handled" | "pending" | "closed";
568
+ title: string;
569
+ workbench: {
570
+ viewKey: string;
571
+ projectId: string | null;
572
+ target: "workbench.view";
573
+ assistantId: string;
574
+ organizationId: string | null;
575
+ selectionId?: string | undefined;
576
+ parameters?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
577
+ } | {
578
+ projectId: string;
579
+ target: "project.pipelines";
580
+ organizationId: string | null;
581
+ pipelineInstanceId: string;
582
+ pipelineRoundId: string;
583
+ pipelineNodeId: string;
584
+ };
585
+ }, {
586
+ state: "handled" | "pending" | "closed";
587
+ title: string;
588
+ workbench: {
589
+ viewKey: string;
590
+ projectId: string | null;
591
+ target: "workbench.view";
592
+ assistantId: string;
593
+ organizationId: string | null;
594
+ selectionId?: string | undefined;
595
+ parameters?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
596
+ } | {
597
+ projectId: string;
598
+ target: "project.pipelines";
599
+ organizationId: string | null;
600
+ pipelineInstanceId: string;
601
+ pipelineRoundId: string;
602
+ pipelineNodeId: string;
603
+ };
604
+ }>;
605
+ export type ActionNotificationSource = Required<z.output<typeof actionNotificationSourceSchema>>;
606
+ export type NotificationWorkbench = WorkbenchEntryTarget;
607
+ export type ActionNotificationPresentation = Omit<Required<z.output<typeof actionNotificationPresentationSchema>>, 'workbench'> & {
608
+ workbench: NotificationWorkbench;
609
+ };
610
+ export type ActionNotification = Omit<TaskNotification, 'kind' | 'source' | 'action'> & {
611
+ kind: 'action.required';
612
+ source: ActionNotificationSource;
613
+ presentation: ActionNotificationPresentation;
614
+ action: null;
615
+ };
446
616
  export declare const userNotificationSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
447
617
  id: z.ZodString;
448
618
  kind: z.ZodLiteral<"agent.completed">;
@@ -485,13 +655,13 @@ export declare const userNotificationSchema: z.ZodDiscriminatedUnion<"kind", [z.
485
655
  }>;
486
656
  }, "strict", z.ZodTypeAny, {
487
657
  kind: "agent.completed";
658
+ id: string;
488
659
  action: {
489
660
  type: "open_conversation";
490
661
  assistantId: string;
491
662
  conversationId: string;
492
663
  threadId: string | null;
493
664
  };
494
- id: string;
495
665
  createdAt: string;
496
666
  source: {
497
667
  type: "scheduled_task";
@@ -503,13 +673,13 @@ export declare const userNotificationSchema: z.ZodDiscriminatedUnion<"kind", [z.
503
673
  readAt: string | null;
504
674
  }, {
505
675
  kind: "agent.completed";
676
+ id: string;
506
677
  action: {
507
678
  type: "open_conversation";
508
679
  assistantId: string;
509
680
  conversationId: string;
510
681
  threadId: string | null;
511
682
  };
512
- id: string;
513
683
  createdAt: string;
514
684
  source: {
515
685
  type: "scheduled_task";
@@ -608,6 +778,11 @@ export declare const userNotificationSchema: z.ZodDiscriminatedUnion<"kind", [z.
608
778
  organizationId: z.ZodString;
609
779
  projectId: z.ZodNullable<z.ZodString>;
610
780
  }, "strict", z.ZodTypeAny, {
781
+ viewKey: string;
782
+ selectionId: string;
783
+ projectId: string | null;
784
+ assistantId: string;
785
+ organizationId: string;
611
786
  state: "handled" | "pending";
612
787
  title: {
613
788
  en_US: string;
@@ -617,12 +792,12 @@ export declare const userNotificationSchema: z.ZodDiscriminatedUnion<"kind", [z.
617
792
  en_US: string;
618
793
  zh_Hans: string;
619
794
  };
795
+ }, {
620
796
  viewKey: string;
621
797
  selectionId: string;
798
+ projectId: string | null;
622
799
  assistantId: string;
623
800
  organizationId: string;
624
- projectId: string | null;
625
- }, {
626
801
  state: "handled" | "pending";
627
802
  title: {
628
803
  en_US: string;
@@ -632,13 +807,9 @@ export declare const userNotificationSchema: z.ZodDiscriminatedUnion<"kind", [z.
632
807
  en_US: string;
633
808
  zh_Hans: string;
634
809
  };
635
- viewKey: string;
636
- selectionId: string;
637
- assistantId: string;
638
- organizationId: string;
639
- projectId: string | null;
640
810
  }>>;
641
811
  }, "strict", z.ZodTypeAny, {
812
+ id: string;
642
813
  title: string;
643
814
  action: {
644
815
  type: "open_conversation";
@@ -646,7 +817,6 @@ export declare const userNotificationSchema: z.ZodDiscriminatedUnion<"kind", [z.
646
817
  conversationId: string;
647
818
  threadId: string | null;
648
819
  } | null;
649
- id: string;
650
820
  fields?: {
651
821
  value: string;
652
822
  label: {
@@ -655,6 +825,11 @@ export declare const userNotificationSchema: z.ZodDiscriminatedUnion<"kind", [z.
655
825
  };
656
826
  }[] | undefined;
657
827
  workbench?: {
828
+ viewKey: string;
829
+ selectionId: string;
830
+ projectId: string | null;
831
+ assistantId: string;
832
+ organizationId: string;
658
833
  state: "handled" | "pending";
659
834
  title: {
660
835
  en_US: string;
@@ -664,13 +839,9 @@ export declare const userNotificationSchema: z.ZodDiscriminatedUnion<"kind", [z.
664
839
  en_US: string;
665
840
  zh_Hans: string;
666
841
  };
667
- viewKey: string;
668
- selectionId: string;
669
- assistantId: string;
670
- organizationId: string;
671
- projectId: string | null;
672
842
  } | undefined;
673
843
  }, {
844
+ id: string;
674
845
  title: string;
675
846
  action: {
676
847
  type: "open_conversation";
@@ -678,7 +849,6 @@ export declare const userNotificationSchema: z.ZodDiscriminatedUnion<"kind", [z.
678
849
  conversationId: string;
679
850
  threadId: string | null;
680
851
  } | null;
681
- id: string;
682
852
  fields?: {
683
853
  value: string;
684
854
  label: {
@@ -687,6 +857,11 @@ export declare const userNotificationSchema: z.ZodDiscriminatedUnion<"kind", [z.
687
857
  };
688
858
  }[] | undefined;
689
859
  workbench?: {
860
+ viewKey: string;
861
+ selectionId: string;
862
+ projectId: string | null;
863
+ assistantId: string;
864
+ organizationId: string;
690
865
  state: "handled" | "pending";
691
866
  title: {
692
867
  en_US: string;
@@ -696,11 +871,6 @@ export declare const userNotificationSchema: z.ZodDiscriminatedUnion<"kind", [z.
696
871
  en_US: string;
697
872
  zh_Hans: string;
698
873
  };
699
- viewKey: string;
700
- selectionId: string;
701
- assistantId: string;
702
- organizationId: string;
703
- projectId: string | null;
704
874
  } | undefined;
705
875
  }>, "many">>;
706
876
  titles: z.ZodArray<z.ZodString, "many">;
@@ -722,13 +892,13 @@ export declare const userNotificationSchema: z.ZodDiscriminatedUnion<"kind", [z.
722
892
  }>>;
723
893
  }, "strict", z.ZodTypeAny, {
724
894
  kind: "agent.output";
895
+ id: string;
725
896
  action: {
726
897
  type: "open_conversation";
727
898
  assistantId: string;
728
899
  conversationId: string;
729
900
  threadId: string | null;
730
901
  } | null;
731
- id: string;
732
902
  createdAt: string;
733
903
  source: {
734
904
  type: "agent_output";
@@ -737,6 +907,7 @@ export declare const userNotificationSchema: z.ZodDiscriminatedUnion<"kind", [z.
737
907
  readAt: string | null;
738
908
  titles: string[];
739
909
  items?: {
910
+ id: string;
740
911
  title: string;
741
912
  action: {
742
913
  type: "open_conversation";
@@ -744,7 +915,6 @@ export declare const userNotificationSchema: z.ZodDiscriminatedUnion<"kind", [z.
744
915
  conversationId: string;
745
916
  threadId: string | null;
746
917
  } | null;
747
- id: string;
748
918
  fields?: {
749
919
  value: string;
750
920
  label: {
@@ -753,6 +923,11 @@ export declare const userNotificationSchema: z.ZodDiscriminatedUnion<"kind", [z.
753
923
  };
754
924
  }[] | undefined;
755
925
  workbench?: {
926
+ viewKey: string;
927
+ selectionId: string;
928
+ projectId: string | null;
929
+ assistantId: string;
930
+ organizationId: string;
756
931
  state: "handled" | "pending";
757
932
  title: {
758
933
  en_US: string;
@@ -762,22 +937,17 @@ export declare const userNotificationSchema: z.ZodDiscriminatedUnion<"kind", [z.
762
937
  en_US: string;
763
938
  zh_Hans: string;
764
939
  };
765
- viewKey: string;
766
- selectionId: string;
767
- assistantId: string;
768
- organizationId: string;
769
- projectId: string | null;
770
940
  } | undefined;
771
941
  }[] | undefined;
772
942
  }, {
773
943
  kind: "agent.output";
944
+ id: string;
774
945
  action: {
775
946
  type: "open_conversation";
776
947
  assistantId: string;
777
948
  conversationId: string;
778
949
  threadId: string | null;
779
950
  } | null;
780
- id: string;
781
951
  createdAt: string;
782
952
  source: {
783
953
  type: "agent_output";
@@ -786,6 +956,7 @@ export declare const userNotificationSchema: z.ZodDiscriminatedUnion<"kind", [z.
786
956
  readAt: string | null;
787
957
  titles: string[];
788
958
  items?: {
959
+ id: string;
789
960
  title: string;
790
961
  action: {
791
962
  type: "open_conversation";
@@ -793,7 +964,6 @@ export declare const userNotificationSchema: z.ZodDiscriminatedUnion<"kind", [z.
793
964
  conversationId: string;
794
965
  threadId: string | null;
795
966
  } | null;
796
- id: string;
797
967
  fields?: {
798
968
  value: string;
799
969
  label: {
@@ -802,6 +972,11 @@ export declare const userNotificationSchema: z.ZodDiscriminatedUnion<"kind", [z.
802
972
  };
803
973
  }[] | undefined;
804
974
  workbench?: {
975
+ viewKey: string;
976
+ selectionId: string;
977
+ projectId: string | null;
978
+ assistantId: string;
979
+ organizationId: string;
805
980
  state: "handled" | "pending";
806
981
  title: {
807
982
  en_US: string;
@@ -811,15 +986,187 @@ export declare const userNotificationSchema: z.ZodDiscriminatedUnion<"kind", [z.
811
986
  en_US: string;
812
987
  zh_Hans: string;
813
988
  };
989
+ } | undefined;
990
+ }[] | undefined;
991
+ }>, z.ZodObject<{
992
+ id: z.ZodString;
993
+ createdAt: z.ZodString;
994
+ readAt: z.ZodNullable<z.ZodString>;
995
+ } & {
996
+ kind: z.ZodLiteral<"action.required">;
997
+ source: z.ZodObject<{
998
+ type: z.ZodLiteral<"action">;
999
+ provider: z.ZodString;
1000
+ key: z.ZodString;
1001
+ version: z.ZodString;
1002
+ }, "strict", z.ZodTypeAny, {
1003
+ key: string;
1004
+ type: "action";
1005
+ provider: string;
1006
+ version: string;
1007
+ }, {
1008
+ key: string;
1009
+ type: "action";
1010
+ provider: string;
1011
+ version: string;
1012
+ }>;
1013
+ presentation: z.ZodObject<{
1014
+ title: z.ZodString;
1015
+ state: z.ZodEnum<["pending", "handled", "closed"]>;
1016
+ workbench: z.ZodDiscriminatedUnion<"target", [z.ZodObject<{
1017
+ target: z.ZodLiteral<"project.pipelines">;
1018
+ organizationId: z.ZodNullable<z.ZodString>;
1019
+ projectId: z.ZodString;
1020
+ pipelineInstanceId: z.ZodString;
1021
+ pipelineRoundId: z.ZodString;
1022
+ pipelineNodeId: z.ZodString;
1023
+ }, "strict", z.ZodTypeAny, {
1024
+ projectId: string;
1025
+ target: "project.pipelines";
1026
+ organizationId: string | null;
1027
+ pipelineInstanceId: string;
1028
+ pipelineRoundId: string;
1029
+ pipelineNodeId: string;
1030
+ }, {
1031
+ projectId: string;
1032
+ target: "project.pipelines";
1033
+ organizationId: string | null;
1034
+ pipelineInstanceId: string;
1035
+ pipelineRoundId: string;
1036
+ pipelineNodeId: string;
1037
+ }>, z.ZodObject<{
1038
+ viewKey: z.ZodString;
1039
+ selectionId: z.ZodOptional<z.ZodString>;
1040
+ parameters: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, "many">]>>, Record<string, string | number | boolean | (string | number | boolean | null)[] | null>, Record<string, string | number | boolean | (string | number | boolean | null)[] | null>>>;
1041
+ } & {
1042
+ projectId: z.ZodNullable<z.ZodString>;
1043
+ } & {
1044
+ target: z.ZodLiteral<"workbench.view">;
1045
+ assistantId: z.ZodString;
1046
+ organizationId: z.ZodNullable<z.ZodString>;
1047
+ }, "strict", z.ZodTypeAny, {
814
1048
  viewKey: string;
815
- selectionId: string;
1049
+ projectId: string | null;
1050
+ target: "workbench.view";
816
1051
  assistantId: string;
817
- organizationId: string;
1052
+ organizationId: string | null;
1053
+ selectionId?: string | undefined;
1054
+ parameters?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
1055
+ }, {
1056
+ viewKey: string;
818
1057
  projectId: string | null;
819
- } | undefined;
820
- }[] | undefined;
1058
+ target: "workbench.view";
1059
+ assistantId: string;
1060
+ organizationId: string | null;
1061
+ selectionId?: string | undefined;
1062
+ parameters?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
1063
+ }>]>;
1064
+ }, "strict", z.ZodTypeAny, {
1065
+ state: "handled" | "pending" | "closed";
1066
+ title: string;
1067
+ workbench: {
1068
+ viewKey: string;
1069
+ projectId: string | null;
1070
+ target: "workbench.view";
1071
+ assistantId: string;
1072
+ organizationId: string | null;
1073
+ selectionId?: string | undefined;
1074
+ parameters?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
1075
+ } | {
1076
+ projectId: string;
1077
+ target: "project.pipelines";
1078
+ organizationId: string | null;
1079
+ pipelineInstanceId: string;
1080
+ pipelineRoundId: string;
1081
+ pipelineNodeId: string;
1082
+ };
1083
+ }, {
1084
+ state: "handled" | "pending" | "closed";
1085
+ title: string;
1086
+ workbench: {
1087
+ viewKey: string;
1088
+ projectId: string | null;
1089
+ target: "workbench.view";
1090
+ assistantId: string;
1091
+ organizationId: string | null;
1092
+ selectionId?: string | undefined;
1093
+ parameters?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
1094
+ } | {
1095
+ projectId: string;
1096
+ target: "project.pipelines";
1097
+ organizationId: string | null;
1098
+ pipelineInstanceId: string;
1099
+ pipelineRoundId: string;
1100
+ pipelineNodeId: string;
1101
+ };
1102
+ }>;
1103
+ action: z.ZodNull;
1104
+ }, "strict", z.ZodTypeAny, {
1105
+ kind: "action.required";
1106
+ id: string;
1107
+ action: null;
1108
+ createdAt: string;
1109
+ source: {
1110
+ key: string;
1111
+ type: "action";
1112
+ provider: string;
1113
+ version: string;
1114
+ };
1115
+ readAt: string | null;
1116
+ presentation: {
1117
+ state: "handled" | "pending" | "closed";
1118
+ title: string;
1119
+ workbench: {
1120
+ viewKey: string;
1121
+ projectId: string | null;
1122
+ target: "workbench.view";
1123
+ assistantId: string;
1124
+ organizationId: string | null;
1125
+ selectionId?: string | undefined;
1126
+ parameters?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
1127
+ } | {
1128
+ projectId: string;
1129
+ target: "project.pipelines";
1130
+ organizationId: string | null;
1131
+ pipelineInstanceId: string;
1132
+ pipelineRoundId: string;
1133
+ pipelineNodeId: string;
1134
+ };
1135
+ };
1136
+ }, {
1137
+ kind: "action.required";
1138
+ id: string;
1139
+ action: null;
1140
+ createdAt: string;
1141
+ source: {
1142
+ key: string;
1143
+ type: "action";
1144
+ provider: string;
1145
+ version: string;
1146
+ };
1147
+ readAt: string | null;
1148
+ presentation: {
1149
+ state: "handled" | "pending" | "closed";
1150
+ title: string;
1151
+ workbench: {
1152
+ viewKey: string;
1153
+ projectId: string | null;
1154
+ target: "workbench.view";
1155
+ assistantId: string;
1156
+ organizationId: string | null;
1157
+ selectionId?: string | undefined;
1158
+ parameters?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
1159
+ } | {
1160
+ projectId: string;
1161
+ target: "project.pipelines";
1162
+ organizationId: string | null;
1163
+ pipelineInstanceId: string;
1164
+ pipelineRoundId: string;
1165
+ pipelineNodeId: string;
1166
+ };
1167
+ };
821
1168
  }>]>;
822
- export type UserNotification = TaskNotification | {
1169
+ export type UserNotification = TaskNotification | ActionNotification | {
823
1170
  id: string;
824
1171
  kind: 'agent.output';
825
1172
  createdAt: string;
@@ -862,6 +1209,7 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
862
1209
  }, "strict", z.ZodTypeAny, {
863
1210
  status: "draft" | "published" | "withdrawn";
864
1211
  revision: number;
1212
+ id: string;
865
1213
  title: string;
866
1214
  body: string;
867
1215
  category: "general" | "maintenance" | "model_retirement";
@@ -874,17 +1222,16 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
874
1222
  label: string;
875
1223
  url: string;
876
1224
  } | null;
877
- id: string;
878
1225
  createdAt: string;
879
1226
  dismissedAt: string | null;
880
1227
  }, {
881
1228
  status: "draft" | "published" | "withdrawn";
882
1229
  revision: number;
1230
+ id: string;
883
1231
  title: string;
884
1232
  body: string;
885
1233
  clients: ("web" | "desktop")[];
886
1234
  startsAt: string;
887
- id: string;
888
1235
  createdAt: string;
889
1236
  category?: "general" | "maintenance" | "model_retirement" | undefined;
890
1237
  severity?: "info" | "important" | undefined;
@@ -938,13 +1285,13 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
938
1285
  }>;
939
1286
  }, "strict", z.ZodTypeAny, {
940
1287
  kind: "agent.completed";
1288
+ id: string;
941
1289
  action: {
942
1290
  type: "open_conversation";
943
1291
  assistantId: string;
944
1292
  conversationId: string;
945
1293
  threadId: string | null;
946
1294
  };
947
- id: string;
948
1295
  createdAt: string;
949
1296
  source: {
950
1297
  type: "scheduled_task";
@@ -956,13 +1303,13 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
956
1303
  readAt: string | null;
957
1304
  }, {
958
1305
  kind: "agent.completed";
1306
+ id: string;
959
1307
  action: {
960
1308
  type: "open_conversation";
961
1309
  assistantId: string;
962
1310
  conversationId: string;
963
1311
  threadId: string | null;
964
1312
  };
965
- id: string;
966
1313
  createdAt: string;
967
1314
  source: {
968
1315
  type: "scheduled_task";
@@ -1061,6 +1408,11 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1061
1408
  organizationId: z.ZodString;
1062
1409
  projectId: z.ZodNullable<z.ZodString>;
1063
1410
  }, "strict", z.ZodTypeAny, {
1411
+ viewKey: string;
1412
+ selectionId: string;
1413
+ projectId: string | null;
1414
+ assistantId: string;
1415
+ organizationId: string;
1064
1416
  state: "handled" | "pending";
1065
1417
  title: {
1066
1418
  en_US: string;
@@ -1070,12 +1422,12 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1070
1422
  en_US: string;
1071
1423
  zh_Hans: string;
1072
1424
  };
1425
+ }, {
1073
1426
  viewKey: string;
1074
1427
  selectionId: string;
1428
+ projectId: string | null;
1075
1429
  assistantId: string;
1076
1430
  organizationId: string;
1077
- projectId: string | null;
1078
- }, {
1079
1431
  state: "handled" | "pending";
1080
1432
  title: {
1081
1433
  en_US: string;
@@ -1085,13 +1437,9 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1085
1437
  en_US: string;
1086
1438
  zh_Hans: string;
1087
1439
  };
1088
- viewKey: string;
1089
- selectionId: string;
1090
- assistantId: string;
1091
- organizationId: string;
1092
- projectId: string | null;
1093
1440
  }>>;
1094
1441
  }, "strict", z.ZodTypeAny, {
1442
+ id: string;
1095
1443
  title: string;
1096
1444
  action: {
1097
1445
  type: "open_conversation";
@@ -1099,7 +1447,6 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1099
1447
  conversationId: string;
1100
1448
  threadId: string | null;
1101
1449
  } | null;
1102
- id: string;
1103
1450
  fields?: {
1104
1451
  value: string;
1105
1452
  label: {
@@ -1108,6 +1455,11 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1108
1455
  };
1109
1456
  }[] | undefined;
1110
1457
  workbench?: {
1458
+ viewKey: string;
1459
+ selectionId: string;
1460
+ projectId: string | null;
1461
+ assistantId: string;
1462
+ organizationId: string;
1111
1463
  state: "handled" | "pending";
1112
1464
  title: {
1113
1465
  en_US: string;
@@ -1117,13 +1469,9 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1117
1469
  en_US: string;
1118
1470
  zh_Hans: string;
1119
1471
  };
1120
- viewKey: string;
1121
- selectionId: string;
1122
- assistantId: string;
1123
- organizationId: string;
1124
- projectId: string | null;
1125
1472
  } | undefined;
1126
1473
  }, {
1474
+ id: string;
1127
1475
  title: string;
1128
1476
  action: {
1129
1477
  type: "open_conversation";
@@ -1131,7 +1479,6 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1131
1479
  conversationId: string;
1132
1480
  threadId: string | null;
1133
1481
  } | null;
1134
- id: string;
1135
1482
  fields?: {
1136
1483
  value: string;
1137
1484
  label: {
@@ -1140,6 +1487,11 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1140
1487
  };
1141
1488
  }[] | undefined;
1142
1489
  workbench?: {
1490
+ viewKey: string;
1491
+ selectionId: string;
1492
+ projectId: string | null;
1493
+ assistantId: string;
1494
+ organizationId: string;
1143
1495
  state: "handled" | "pending";
1144
1496
  title: {
1145
1497
  en_US: string;
@@ -1149,11 +1501,6 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1149
1501
  en_US: string;
1150
1502
  zh_Hans: string;
1151
1503
  };
1152
- viewKey: string;
1153
- selectionId: string;
1154
- assistantId: string;
1155
- organizationId: string;
1156
- projectId: string | null;
1157
1504
  } | undefined;
1158
1505
  }>, "many">>;
1159
1506
  titles: z.ZodArray<z.ZodString, "many">;
@@ -1175,13 +1522,13 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1175
1522
  }>>;
1176
1523
  }, "strict", z.ZodTypeAny, {
1177
1524
  kind: "agent.output";
1525
+ id: string;
1178
1526
  action: {
1179
1527
  type: "open_conversation";
1180
1528
  assistantId: string;
1181
1529
  conversationId: string;
1182
1530
  threadId: string | null;
1183
1531
  } | null;
1184
- id: string;
1185
1532
  createdAt: string;
1186
1533
  source: {
1187
1534
  type: "agent_output";
@@ -1190,6 +1537,7 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1190
1537
  readAt: string | null;
1191
1538
  titles: string[];
1192
1539
  items?: {
1540
+ id: string;
1193
1541
  title: string;
1194
1542
  action: {
1195
1543
  type: "open_conversation";
@@ -1197,7 +1545,6 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1197
1545
  conversationId: string;
1198
1546
  threadId: string | null;
1199
1547
  } | null;
1200
- id: string;
1201
1548
  fields?: {
1202
1549
  value: string;
1203
1550
  label: {
@@ -1206,6 +1553,11 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1206
1553
  };
1207
1554
  }[] | undefined;
1208
1555
  workbench?: {
1556
+ viewKey: string;
1557
+ selectionId: string;
1558
+ projectId: string | null;
1559
+ assistantId: string;
1560
+ organizationId: string;
1209
1561
  state: "handled" | "pending";
1210
1562
  title: {
1211
1563
  en_US: string;
@@ -1215,22 +1567,17 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1215
1567
  en_US: string;
1216
1568
  zh_Hans: string;
1217
1569
  };
1218
- viewKey: string;
1219
- selectionId: string;
1220
- assistantId: string;
1221
- organizationId: string;
1222
- projectId: string | null;
1223
1570
  } | undefined;
1224
1571
  }[] | undefined;
1225
1572
  }, {
1226
1573
  kind: "agent.output";
1574
+ id: string;
1227
1575
  action: {
1228
1576
  type: "open_conversation";
1229
1577
  assistantId: string;
1230
1578
  conversationId: string;
1231
1579
  threadId: string | null;
1232
1580
  } | null;
1233
- id: string;
1234
1581
  createdAt: string;
1235
1582
  source: {
1236
1583
  type: "agent_output";
@@ -1239,6 +1586,7 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1239
1586
  readAt: string | null;
1240
1587
  titles: string[];
1241
1588
  items?: {
1589
+ id: string;
1242
1590
  title: string;
1243
1591
  action: {
1244
1592
  type: "open_conversation";
@@ -1246,7 +1594,6 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1246
1594
  conversationId: string;
1247
1595
  threadId: string | null;
1248
1596
  } | null;
1249
- id: string;
1250
1597
  fields?: {
1251
1598
  value: string;
1252
1599
  label: {
@@ -1255,6 +1602,11 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1255
1602
  };
1256
1603
  }[] | undefined;
1257
1604
  workbench?: {
1605
+ viewKey: string;
1606
+ selectionId: string;
1607
+ projectId: string | null;
1608
+ assistantId: string;
1609
+ organizationId: string;
1258
1610
  state: "handled" | "pending";
1259
1611
  title: {
1260
1612
  en_US: string;
@@ -1264,22 +1616,196 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1264
1616
  en_US: string;
1265
1617
  zh_Hans: string;
1266
1618
  };
1619
+ } | undefined;
1620
+ }[] | undefined;
1621
+ }>, z.ZodObject<{
1622
+ id: z.ZodString;
1623
+ createdAt: z.ZodString;
1624
+ readAt: z.ZodNullable<z.ZodString>;
1625
+ } & {
1626
+ kind: z.ZodLiteral<"action.required">;
1627
+ source: z.ZodObject<{
1628
+ type: z.ZodLiteral<"action">;
1629
+ provider: z.ZodString;
1630
+ key: z.ZodString;
1631
+ version: z.ZodString;
1632
+ }, "strict", z.ZodTypeAny, {
1633
+ key: string;
1634
+ type: "action";
1635
+ provider: string;
1636
+ version: string;
1637
+ }, {
1638
+ key: string;
1639
+ type: "action";
1640
+ provider: string;
1641
+ version: string;
1642
+ }>;
1643
+ presentation: z.ZodObject<{
1644
+ title: z.ZodString;
1645
+ state: z.ZodEnum<["pending", "handled", "closed"]>;
1646
+ workbench: z.ZodDiscriminatedUnion<"target", [z.ZodObject<{
1647
+ target: z.ZodLiteral<"project.pipelines">;
1648
+ organizationId: z.ZodNullable<z.ZodString>;
1649
+ projectId: z.ZodString;
1650
+ pipelineInstanceId: z.ZodString;
1651
+ pipelineRoundId: z.ZodString;
1652
+ pipelineNodeId: z.ZodString;
1653
+ }, "strict", z.ZodTypeAny, {
1654
+ projectId: string;
1655
+ target: "project.pipelines";
1656
+ organizationId: string | null;
1657
+ pipelineInstanceId: string;
1658
+ pipelineRoundId: string;
1659
+ pipelineNodeId: string;
1660
+ }, {
1661
+ projectId: string;
1662
+ target: "project.pipelines";
1663
+ organizationId: string | null;
1664
+ pipelineInstanceId: string;
1665
+ pipelineRoundId: string;
1666
+ pipelineNodeId: string;
1667
+ }>, z.ZodObject<{
1668
+ viewKey: z.ZodString;
1669
+ selectionId: z.ZodOptional<z.ZodString>;
1670
+ parameters: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, "many">]>>, Record<string, string | number | boolean | (string | number | boolean | null)[] | null>, Record<string, string | number | boolean | (string | number | boolean | null)[] | null>>>;
1671
+ } & {
1672
+ projectId: z.ZodNullable<z.ZodString>;
1673
+ } & {
1674
+ target: z.ZodLiteral<"workbench.view">;
1675
+ assistantId: z.ZodString;
1676
+ organizationId: z.ZodNullable<z.ZodString>;
1677
+ }, "strict", z.ZodTypeAny, {
1267
1678
  viewKey: string;
1268
- selectionId: string;
1679
+ projectId: string | null;
1680
+ target: "workbench.view";
1269
1681
  assistantId: string;
1270
- organizationId: string;
1682
+ organizationId: string | null;
1683
+ selectionId?: string | undefined;
1684
+ parameters?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
1685
+ }, {
1686
+ viewKey: string;
1271
1687
  projectId: string | null;
1272
- } | undefined;
1273
- }[] | undefined;
1688
+ target: "workbench.view";
1689
+ assistantId: string;
1690
+ organizationId: string | null;
1691
+ selectionId?: string | undefined;
1692
+ parameters?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
1693
+ }>]>;
1694
+ }, "strict", z.ZodTypeAny, {
1695
+ state: "handled" | "pending" | "closed";
1696
+ title: string;
1697
+ workbench: {
1698
+ viewKey: string;
1699
+ projectId: string | null;
1700
+ target: "workbench.view";
1701
+ assistantId: string;
1702
+ organizationId: string | null;
1703
+ selectionId?: string | undefined;
1704
+ parameters?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
1705
+ } | {
1706
+ projectId: string;
1707
+ target: "project.pipelines";
1708
+ organizationId: string | null;
1709
+ pipelineInstanceId: string;
1710
+ pipelineRoundId: string;
1711
+ pipelineNodeId: string;
1712
+ };
1713
+ }, {
1714
+ state: "handled" | "pending" | "closed";
1715
+ title: string;
1716
+ workbench: {
1717
+ viewKey: string;
1718
+ projectId: string | null;
1719
+ target: "workbench.view";
1720
+ assistantId: string;
1721
+ organizationId: string | null;
1722
+ selectionId?: string | undefined;
1723
+ parameters?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
1724
+ } | {
1725
+ projectId: string;
1726
+ target: "project.pipelines";
1727
+ organizationId: string | null;
1728
+ pipelineInstanceId: string;
1729
+ pipelineRoundId: string;
1730
+ pipelineNodeId: string;
1731
+ };
1732
+ }>;
1733
+ action: z.ZodNull;
1734
+ }, "strict", z.ZodTypeAny, {
1735
+ kind: "action.required";
1736
+ id: string;
1737
+ action: null;
1738
+ createdAt: string;
1739
+ source: {
1740
+ key: string;
1741
+ type: "action";
1742
+ provider: string;
1743
+ version: string;
1744
+ };
1745
+ readAt: string | null;
1746
+ presentation: {
1747
+ state: "handled" | "pending" | "closed";
1748
+ title: string;
1749
+ workbench: {
1750
+ viewKey: string;
1751
+ projectId: string | null;
1752
+ target: "workbench.view";
1753
+ assistantId: string;
1754
+ organizationId: string | null;
1755
+ selectionId?: string | undefined;
1756
+ parameters?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
1757
+ } | {
1758
+ projectId: string;
1759
+ target: "project.pipelines";
1760
+ organizationId: string | null;
1761
+ pipelineInstanceId: string;
1762
+ pipelineRoundId: string;
1763
+ pipelineNodeId: string;
1764
+ };
1765
+ };
1766
+ }, {
1767
+ kind: "action.required";
1768
+ id: string;
1769
+ action: null;
1770
+ createdAt: string;
1771
+ source: {
1772
+ key: string;
1773
+ type: "action";
1774
+ provider: string;
1775
+ version: string;
1776
+ };
1777
+ readAt: string | null;
1778
+ presentation: {
1779
+ state: "handled" | "pending" | "closed";
1780
+ title: string;
1781
+ workbench: {
1782
+ viewKey: string;
1783
+ projectId: string | null;
1784
+ target: "workbench.view";
1785
+ assistantId: string;
1786
+ organizationId: string | null;
1787
+ selectionId?: string | undefined;
1788
+ parameters?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
1789
+ } | {
1790
+ projectId: string;
1791
+ target: "project.pipelines";
1792
+ organizationId: string | null;
1793
+ pipelineInstanceId: string;
1794
+ pipelineRoundId: string;
1795
+ pipelineNodeId: string;
1796
+ };
1797
+ };
1274
1798
  }>]>, "many">;
1275
1799
  hasMoreAnnouncements: z.ZodBoolean;
1276
1800
  hasMoreNotifications: z.ZodBoolean;
1801
+ pendingCount: z.ZodOptional<z.ZodNumber>;
1277
1802
  }, "strict", z.ZodTypeAny, {
1278
- supported: true;
1279
1803
  version: string;
1804
+ supported: true;
1280
1805
  announcements: {
1281
1806
  status: "draft" | "published" | "withdrawn";
1282
1807
  revision: number;
1808
+ id: string;
1283
1809
  title: string;
1284
1810
  body: string;
1285
1811
  category: "general" | "maintenance" | "model_retirement";
@@ -1292,19 +1818,18 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1292
1818
  label: string;
1293
1819
  url: string;
1294
1820
  } | null;
1295
- id: string;
1296
1821
  createdAt: string;
1297
1822
  dismissedAt: string | null;
1298
1823
  }[];
1299
1824
  notifications: ({
1300
1825
  kind: "agent.completed";
1826
+ id: string;
1301
1827
  action: {
1302
1828
  type: "open_conversation";
1303
1829
  assistantId: string;
1304
1830
  conversationId: string;
1305
1831
  threadId: string | null;
1306
1832
  };
1307
- id: string;
1308
1833
  createdAt: string;
1309
1834
  source: {
1310
1835
  type: "scheduled_task";
@@ -1316,13 +1841,13 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1316
1841
  readAt: string | null;
1317
1842
  } | {
1318
1843
  kind: "agent.output";
1844
+ id: string;
1319
1845
  action: {
1320
1846
  type: "open_conversation";
1321
1847
  assistantId: string;
1322
1848
  conversationId: string;
1323
1849
  threadId: string | null;
1324
1850
  } | null;
1325
- id: string;
1326
1851
  createdAt: string;
1327
1852
  source: {
1328
1853
  type: "agent_output";
@@ -1331,6 +1856,7 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1331
1856
  readAt: string | null;
1332
1857
  titles: string[];
1333
1858
  items?: {
1859
+ id: string;
1334
1860
  title: string;
1335
1861
  action: {
1336
1862
  type: "open_conversation";
@@ -1338,7 +1864,6 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1338
1864
  conversationId: string;
1339
1865
  threadId: string | null;
1340
1866
  } | null;
1341
- id: string;
1342
1867
  fields?: {
1343
1868
  value: string;
1344
1869
  label: {
@@ -1347,6 +1872,11 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1347
1872
  };
1348
1873
  }[] | undefined;
1349
1874
  workbench?: {
1875
+ viewKey: string;
1876
+ selectionId: string;
1877
+ projectId: string | null;
1878
+ assistantId: string;
1879
+ organizationId: string;
1350
1880
  state: "handled" | "pending";
1351
1881
  title: {
1352
1882
  en_US: string;
@@ -1356,27 +1886,55 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1356
1886
  en_US: string;
1357
1887
  zh_Hans: string;
1358
1888
  };
1359
- viewKey: string;
1360
- selectionId: string;
1361
- assistantId: string;
1362
- organizationId: string;
1363
- projectId: string | null;
1364
1889
  } | undefined;
1365
1890
  }[] | undefined;
1891
+ } | {
1892
+ kind: "action.required";
1893
+ id: string;
1894
+ action: null;
1895
+ createdAt: string;
1896
+ source: {
1897
+ key: string;
1898
+ type: "action";
1899
+ provider: string;
1900
+ version: string;
1901
+ };
1902
+ readAt: string | null;
1903
+ presentation: {
1904
+ state: "handled" | "pending" | "closed";
1905
+ title: string;
1906
+ workbench: {
1907
+ viewKey: string;
1908
+ projectId: string | null;
1909
+ target: "workbench.view";
1910
+ assistantId: string;
1911
+ organizationId: string | null;
1912
+ selectionId?: string | undefined;
1913
+ parameters?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
1914
+ } | {
1915
+ projectId: string;
1916
+ target: "project.pipelines";
1917
+ organizationId: string | null;
1918
+ pipelineInstanceId: string;
1919
+ pipelineRoundId: string;
1920
+ pipelineNodeId: string;
1921
+ };
1922
+ };
1366
1923
  })[];
1367
1924
  hasMoreAnnouncements: boolean;
1368
1925
  hasMoreNotifications: boolean;
1926
+ pendingCount?: number | undefined;
1369
1927
  }, {
1370
- supported: true;
1371
1928
  version: string;
1929
+ supported: true;
1372
1930
  announcements: {
1373
1931
  status: "draft" | "published" | "withdrawn";
1374
1932
  revision: number;
1933
+ id: string;
1375
1934
  title: string;
1376
1935
  body: string;
1377
1936
  clients: ("web" | "desktop")[];
1378
1937
  startsAt: string;
1379
- id: string;
1380
1938
  createdAt: string;
1381
1939
  category?: "general" | "maintenance" | "model_retirement" | undefined;
1382
1940
  severity?: "info" | "important" | undefined;
@@ -1390,13 +1948,13 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1390
1948
  }[];
1391
1949
  notifications: ({
1392
1950
  kind: "agent.completed";
1951
+ id: string;
1393
1952
  action: {
1394
1953
  type: "open_conversation";
1395
1954
  assistantId: string;
1396
1955
  conversationId: string;
1397
1956
  threadId: string | null;
1398
1957
  };
1399
- id: string;
1400
1958
  createdAt: string;
1401
1959
  source: {
1402
1960
  type: "scheduled_task";
@@ -1408,13 +1966,13 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1408
1966
  readAt: string | null;
1409
1967
  } | {
1410
1968
  kind: "agent.output";
1969
+ id: string;
1411
1970
  action: {
1412
1971
  type: "open_conversation";
1413
1972
  assistantId: string;
1414
1973
  conversationId: string;
1415
1974
  threadId: string | null;
1416
1975
  } | null;
1417
- id: string;
1418
1976
  createdAt: string;
1419
1977
  source: {
1420
1978
  type: "agent_output";
@@ -1423,6 +1981,7 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1423
1981
  readAt: string | null;
1424
1982
  titles: string[];
1425
1983
  items?: {
1984
+ id: string;
1426
1985
  title: string;
1427
1986
  action: {
1428
1987
  type: "open_conversation";
@@ -1430,7 +1989,6 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1430
1989
  conversationId: string;
1431
1990
  threadId: string | null;
1432
1991
  } | null;
1433
- id: string;
1434
1992
  fields?: {
1435
1993
  value: string;
1436
1994
  label: {
@@ -1439,6 +1997,11 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1439
1997
  };
1440
1998
  }[] | undefined;
1441
1999
  workbench?: {
2000
+ viewKey: string;
2001
+ selectionId: string;
2002
+ projectId: string | null;
2003
+ assistantId: string;
2004
+ organizationId: string;
1442
2005
  state: "handled" | "pending";
1443
2006
  title: {
1444
2007
  en_US: string;
@@ -1448,20 +2011,49 @@ export declare const notificationSnapshotSchema: z.ZodObject<{
1448
2011
  en_US: string;
1449
2012
  zh_Hans: string;
1450
2013
  };
1451
- viewKey: string;
1452
- selectionId: string;
1453
- assistantId: string;
1454
- organizationId: string;
1455
- projectId: string | null;
1456
2014
  } | undefined;
1457
2015
  }[] | undefined;
2016
+ } | {
2017
+ kind: "action.required";
2018
+ id: string;
2019
+ action: null;
2020
+ createdAt: string;
2021
+ source: {
2022
+ key: string;
2023
+ type: "action";
2024
+ provider: string;
2025
+ version: string;
2026
+ };
2027
+ readAt: string | null;
2028
+ presentation: {
2029
+ state: "handled" | "pending" | "closed";
2030
+ title: string;
2031
+ workbench: {
2032
+ viewKey: string;
2033
+ projectId: string | null;
2034
+ target: "workbench.view";
2035
+ assistantId: string;
2036
+ organizationId: string | null;
2037
+ selectionId?: string | undefined;
2038
+ parameters?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
2039
+ } | {
2040
+ projectId: string;
2041
+ target: "project.pipelines";
2042
+ organizationId: string | null;
2043
+ pipelineInstanceId: string;
2044
+ pipelineRoundId: string;
2045
+ pipelineNodeId: string;
2046
+ };
2047
+ };
1458
2048
  })[];
1459
2049
  hasMoreAnnouncements: boolean;
1460
2050
  hasMoreNotifications: boolean;
2051
+ pendingCount?: number | undefined;
1461
2052
  }>;
1462
- export type NotificationSnapshot = Omit<Required<z.output<typeof notificationSnapshotSchema>>, 'announcements' | 'notifications'> & {
2053
+ export type NotificationSnapshot = Omit<Required<z.output<typeof notificationSnapshotSchema>>, 'announcements' | 'notifications' | 'pendingCount'> & {
1463
2054
  announcements: Announcement[];
1464
2055
  notifications: UserNotification[];
2056
+ pendingCount?: number;
1465
2057
  };
1466
2058
  export declare const notificationChangeSchema: z.ZodObject<{
1467
2059
  schemaVersion: z.ZodLiteral<1>;