@archastro/sdk 0.14.0 → 0.16.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 (130) hide show
  1. package/dist/channels/api_chat_channel.d.ts +8 -0
  2. package/dist/channels/api_chat_channel.d.ts.map +1 -1
  3. package/dist/channels/api_chat_channel.js +17 -1
  4. package/dist/channels/api_chat_channel.js.map +1 -1
  5. package/dist/client.d.ts +6 -0
  6. package/dist/client.d.ts.map +1 -1
  7. package/dist/client.js +7 -1
  8. package/dist/client.js.map +1 -1
  9. package/dist/effective-access.d.ts +34 -0
  10. package/dist/effective-access.d.ts.map +1 -0
  11. package/dist/effective-access.js +51 -0
  12. package/dist/effective-access.js.map +1 -0
  13. package/dist/index.d.ts +1 -0
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +2 -1
  16. package/dist/index.js.map +1 -1
  17. package/dist/types/ai.d.ts +109 -109
  18. package/dist/types/ai.js +10 -10
  19. package/dist/types/ai.js.map +1 -1
  20. package/dist/types/automations.d.ts +15 -15
  21. package/dist/types/automations.js +6 -6
  22. package/dist/types/automations.js.map +1 -1
  23. package/dist/types/chat.d.ts +3005 -2434
  24. package/dist/types/chat.d.ts.map +1 -1
  25. package/dist/types/chat.js +22 -4
  26. package/dist/types/chat.js.map +1 -1
  27. package/dist/types/common.d.ts +2703 -3254
  28. package/dist/types/common.d.ts.map +1 -1
  29. package/dist/types/common.js +235 -227
  30. package/dist/types/common.js.map +1 -1
  31. package/dist/types/config.d.ts +11 -11
  32. package/dist/types/config.js +3 -3
  33. package/dist/types/config.js.map +1 -1
  34. package/dist/types/events.d.ts +810 -0
  35. package/dist/types/events.d.ts.map +1 -0
  36. package/dist/types/events.js +77 -0
  37. package/dist/types/events.js.map +1 -0
  38. package/dist/types/expressions.d.ts +66 -0
  39. package/dist/types/expressions.d.ts.map +1 -0
  40. package/dist/types/expressions.js +27 -0
  41. package/dist/types/expressions.js.map +1 -0
  42. package/dist/types/extractions.d.ts +3 -3
  43. package/dist/types/extractions.js +2 -2
  44. package/dist/types/extractions.js.map +1 -1
  45. package/dist/types/graph.d.ts +34 -0
  46. package/dist/types/graph.d.ts.map +1 -0
  47. package/dist/types/graph.js +16 -0
  48. package/dist/types/graph.js.map +1 -0
  49. package/dist/types/index.d.ts +5 -0
  50. package/dist/types/index.d.ts.map +1 -1
  51. package/dist/types/index.js +6 -1
  52. package/dist/types/index.js.map +1 -1
  53. package/dist/types/notifications.d.ts +3 -3
  54. package/dist/types/notifications.js +2 -2
  55. package/dist/types/notifications.js.map +1 -1
  56. package/dist/types/oauth.d.ts +5 -5
  57. package/dist/types/scripts.d.ts +800 -0
  58. package/dist/types/scripts.d.ts.map +1 -0
  59. package/dist/types/scripts.js +112 -0
  60. package/dist/types/scripts.js.map +1 -0
  61. package/dist/types/status.d.ts +8 -8
  62. package/dist/types/status.js +2 -2
  63. package/dist/types/status.js.map +1 -1
  64. package/dist/types/system.d.ts +2 -2
  65. package/dist/types/tasks.d.ts +12 -6
  66. package/dist/types/tasks.d.ts.map +1 -1
  67. package/dist/types/tasks.js +5 -3
  68. package/dist/types/tasks.js.map +1 -1
  69. package/dist/types/teams.d.ts +334 -334
  70. package/dist/types/teams.js +5 -5
  71. package/dist/types/teams.js.map +1 -1
  72. package/dist/types/threads.d.ts +242 -202
  73. package/dist/types/threads.d.ts.map +1 -1
  74. package/dist/types/threads.js +6 -6
  75. package/dist/types/threads.js.map +1 -1
  76. package/dist/types/users.d.ts +50 -6
  77. package/dist/types/users.d.ts.map +1 -1
  78. package/dist/types/users.js +18 -3
  79. package/dist/types/users.js.map +1 -1
  80. package/dist/types/workflows.d.ts +544 -0
  81. package/dist/types/workflows.d.ts.map +1 -0
  82. package/dist/types/workflows.js +91 -0
  83. package/dist/types/workflows.js.map +1 -0
  84. package/dist/v1/resources/agents.d.ts +4 -3
  85. package/dist/v1/resources/agents.d.ts.map +1 -1
  86. package/dist/v1/resources/agents.js +1 -1
  87. package/dist/v1/resources/agents.js.map +1 -1
  88. package/dist/v1/resources/ai.d.ts +2 -2
  89. package/dist/v1/resources/ai.d.ts.map +1 -1
  90. package/dist/v1/resources/ai.js +1 -1
  91. package/dist/v1/resources/event_subscriptions.d.ts +1 -1
  92. package/dist/v1/resources/event_subscriptions.js +1 -1
  93. package/dist/v1/resources/index.d.ts +3 -0
  94. package/dist/v1/resources/index.d.ts.map +1 -1
  95. package/dist/v1/resources/index.js +4 -1
  96. package/dist/v1/resources/index.js.map +1 -1
  97. package/dist/v1/resources/scripts.d.ts +117 -0
  98. package/dist/v1/resources/scripts.d.ts.map +1 -0
  99. package/dist/v1/resources/scripts.js +116 -0
  100. package/dist/v1/resources/scripts.js.map +1 -0
  101. package/dist/v1/resources/ssh_keys.d.ts +13 -0
  102. package/dist/v1/resources/ssh_keys.d.ts.map +1 -0
  103. package/dist/v1/resources/ssh_keys.js +19 -0
  104. package/dist/v1/resources/ssh_keys.js.map +1 -0
  105. package/dist/v1/resources/tasks.d.ts +7 -0
  106. package/dist/v1/resources/tasks.d.ts.map +1 -1
  107. package/dist/v1/resources/tasks.js +4 -1
  108. package/dist/v1/resources/tasks.js.map +1 -1
  109. package/dist/v1/resources/teams.d.ts +10 -0
  110. package/dist/v1/resources/teams.d.ts.map +1 -1
  111. package/dist/v1/resources/teams.js +1 -1
  112. package/dist/v1/resources/threads.d.ts +6 -0
  113. package/dist/v1/resources/threads.d.ts.map +1 -1
  114. package/dist/v1/resources/threads.js +1 -1
  115. package/dist/v1/resources/users.d.ts +66 -4
  116. package/dist/v1/resources/users.d.ts.map +1 -1
  117. package/dist/v1/resources/users.js +52 -3
  118. package/dist/v1/resources/users.js.map +1 -1
  119. package/dist/v1/resources/work_items.d.ts +1 -1
  120. package/dist/v1/resources/work_items.d.ts.map +1 -1
  121. package/dist/v1/resources/work_items.js +1 -1
  122. package/dist/v1/resources/workflows.d.ts +205 -0
  123. package/dist/v1/resources/workflows.d.ts.map +1 -0
  124. package/dist/v1/resources/workflows.js +205 -0
  125. package/dist/v1/resources/workflows.js.map +1 -0
  126. package/dist/v1.d.ts +6 -0
  127. package/dist/v1.d.ts.map +1 -1
  128. package/dist/v1.js +10 -1
  129. package/dist/v1.js.map +1 -1
  130. package/package.json +1 -1
@@ -127,7 +127,7 @@ export declare const threadSchema: z.ZodObject<{
127
127
  email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
128
128
  id: z.ZodString;
129
129
  is_system_user: z.ZodOptional<z.ZodBoolean>;
130
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
130
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
131
131
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
132
132
  org: z.ZodOptional<z.ZodNullable<z.ZodString>>;
133
133
  org_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -150,7 +150,7 @@ export declare const threadSchema: z.ZodObject<{
150
150
  created_by_team?: string | null | undefined;
151
151
  created_by_user?: string | null | undefined;
152
152
  is_system_user?: boolean | undefined;
153
- metadata?: Record<string, unknown> | undefined;
153
+ metadata?: Record<string, {} | null> | undefined;
154
154
  org_name?: string | null | undefined;
155
155
  org_role?: string | null | undefined;
156
156
  org_slug?: string | null | undefined;
@@ -170,7 +170,7 @@ export declare const threadSchema: z.ZodObject<{
170
170
  created_by_team?: string | null | undefined;
171
171
  created_by_user?: string | null | undefined;
172
172
  is_system_user?: boolean | undefined;
173
- metadata?: Record<string, unknown> | undefined;
173
+ metadata?: Record<string, {} | null> | undefined;
174
174
  org_name?: string | null | undefined;
175
175
  org_role?: string | null | undefined;
176
176
  org_slug?: string | null | undefined;
@@ -199,7 +199,7 @@ export declare const threadSchema: z.ZodObject<{
199
199
  /** Display name of the sender of the most recent message — the same message `last_message_preview` snippets. Populated on thread list endpoints; `null` when the thread has no messages or the endpoint doesn't compute activity enrichment. */
200
200
  last_message_sender: z.ZodOptional<z.ZodNullable<z.ZodString>>;
201
201
  /** Arbitrary key-value metadata attached to the thread. Shape is application-defined; `null` if no metadata has been set. */
202
- metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
202
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>>;
203
203
  /** Whether the authenticated user has muted notifications for this thread. `true` suppresses all notification delivery. */
204
204
  muted: z.ZodOptional<z.ZodBoolean>;
205
205
  /** ID of the organization this thread belongs to (`org_...`). `null` for threads outside an org context. */
@@ -368,7 +368,7 @@ export declare const threadSchema: z.ZodObject<{
368
368
  image_width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
369
369
  media_type: z.ZodOptional<z.ZodString>;
370
370
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
371
- object: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
371
+ object: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
372
372
  title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
373
373
  type: z.ZodString;
374
374
  url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -454,7 +454,7 @@ export declare const threadSchema: z.ZodObject<{
454
454
  }, "strip", z.ZodTypeAny, {
455
455
  type: string;
456
456
  id: string;
457
- object?: Record<string, unknown> | undefined;
457
+ object?: Record<string, {} | null> | undefined;
458
458
  description?: string | null | undefined;
459
459
  name?: string | null | undefined;
460
460
  height?: number | null | undefined;
@@ -501,7 +501,7 @@ export declare const threadSchema: z.ZodObject<{
501
501
  }, {
502
502
  type: string;
503
503
  id: string;
504
- object?: Record<string, unknown> | undefined;
504
+ object?: Record<string, {} | null> | undefined;
505
505
  description?: string | null | undefined;
506
506
  name?: string | null | undefined;
507
507
  height?: number | null | undefined;
@@ -548,33 +548,49 @@ export declare const threadSchema: z.ZodObject<{
548
548
  }>, "many">>;
549
549
  branched_thread: z.ZodOptional<z.ZodNullable<z.ZodString>>;
550
550
  content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
551
+ context: z.ZodOptional<z.ZodArray<z.ZodObject<{
552
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
553
+ content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
554
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
555
+ type: z.ZodString;
556
+ }, "strip", z.ZodTypeAny, {
557
+ type: string;
558
+ content?: string | null | undefined;
559
+ title?: string | null | undefined;
560
+ attributes?: Record<string, {} | null> | undefined;
561
+ }, {
562
+ type: string;
563
+ content?: string | null | undefined;
564
+ title?: string | null | undefined;
565
+ attributes?: Record<string, {} | null> | undefined;
566
+ }>, "many">>;
551
567
  created_at: z.ZodOptional<z.ZodString>;
552
568
  has_replies: z.ZodOptional<z.ZodBoolean>;
553
569
  id: z.ZodString;
554
570
  idempotency_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
555
571
  is_deleted: z.ZodOptional<z.ZodBoolean>;
556
572
  legacy_agent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
557
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
573
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
558
574
  org: z.ZodOptional<z.ZodNullable<z.ZodString>>;
559
575
  reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
560
- payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
576
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
561
577
  type: z.ZodString;
562
578
  user: z.ZodOptional<z.ZodString>;
563
579
  }, "strip", z.ZodTypeAny, {
564
580
  type: string;
565
- payload?: Record<string, unknown> | undefined;
581
+ payload?: Record<string, {} | null> | undefined;
566
582
  user?: string | undefined;
567
583
  }, {
568
584
  type: string;
569
- payload?: Record<string, unknown> | undefined;
585
+ payload?: Record<string, {} | null> | undefined;
570
586
  user?: string | undefined;
571
587
  }>, "many">>;
572
588
  rendering_mode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
573
- replies: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
589
+ replies: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>, "many">>;
574
590
  replies_after_cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
575
591
  replies_before_cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
576
592
  reply_count: z.ZodOptional<z.ZodNumber>;
577
- reply_to: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
593
+ reply_to: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>>;
578
594
  root_message_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
579
595
  sandbox: z.ZodOptional<z.ZodNullable<z.ZodString>>;
580
596
  team: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -592,7 +608,7 @@ export declare const threadSchema: z.ZodObject<{
592
608
  email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
593
609
  id: z.ZodString;
594
610
  is_system_user: z.ZodOptional<z.ZodBoolean>;
595
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
611
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
596
612
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
597
613
  org: z.ZodOptional<z.ZodNullable<z.ZodString>>;
598
614
  org_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -615,7 +631,7 @@ export declare const threadSchema: z.ZodObject<{
615
631
  created_by_team?: string | null | undefined;
616
632
  created_by_user?: string | null | undefined;
617
633
  is_system_user?: boolean | undefined;
618
- metadata?: Record<string, unknown> | undefined;
634
+ metadata?: Record<string, {} | null> | undefined;
619
635
  org_name?: string | null | undefined;
620
636
  org_role?: string | null | undefined;
621
637
  org_slug?: string | null | undefined;
@@ -635,7 +651,7 @@ export declare const threadSchema: z.ZodObject<{
635
651
  created_by_team?: string | null | undefined;
636
652
  created_by_user?: string | null | undefined;
637
653
  is_system_user?: boolean | undefined;
638
- metadata?: Record<string, unknown> | undefined;
654
+ metadata?: Record<string, {} | null> | undefined;
639
655
  org_name?: string | null | undefined;
640
656
  org_role?: string | null | undefined;
641
657
  org_slug?: string | null | undefined;
@@ -666,14 +682,14 @@ export declare const threadSchema: z.ZodObject<{
666
682
  created_by_team?: string | null | undefined;
667
683
  created_by_user?: string | null | undefined;
668
684
  is_system_user?: boolean | undefined;
669
- metadata?: Record<string, unknown> | undefined;
685
+ metadata?: Record<string, {} | null> | undefined;
670
686
  org_name?: string | null | undefined;
671
687
  org_role?: string | null | undefined;
672
688
  org_slug?: string | null | undefined;
673
689
  sandbox_name?: string | null | undefined;
674
690
  } | null | undefined;
675
691
  sandbox?: string | null | undefined;
676
- metadata?: Record<string, unknown> | undefined;
692
+ metadata?: Record<string, {} | null> | undefined;
677
693
  acl?: {
678
694
  add?: {
679
695
  actions: string[];
@@ -693,7 +709,7 @@ export declare const threadSchema: z.ZodObject<{
693
709
  attachments?: {
694
710
  type: string;
695
711
  id: string;
696
- object?: Record<string, unknown> | undefined;
712
+ object?: Record<string, {} | null> | undefined;
697
713
  description?: string | null | undefined;
698
714
  name?: string | null | undefined;
699
715
  height?: number | null | undefined;
@@ -739,6 +755,12 @@ export declare const threadSchema: z.ZodObject<{
739
755
  version?: number | null | undefined;
740
756
  }[] | undefined;
741
757
  visibility?: "default" | "private" | undefined;
758
+ context?: {
759
+ type: string;
760
+ content?: string | null | undefined;
761
+ title?: string | null | undefined;
762
+ attributes?: Record<string, {} | null> | undefined;
763
+ }[] | undefined;
742
764
  actors?: {
743
765
  alias?: string | null | undefined;
744
766
  name?: string | null | undefined;
@@ -761,15 +783,15 @@ export declare const threadSchema: z.ZodObject<{
761
783
  legacy_agent?: string | null | undefined;
762
784
  reactions?: {
763
785
  type: string;
764
- payload?: Record<string, unknown> | undefined;
786
+ payload?: Record<string, {} | null> | undefined;
765
787
  user?: string | undefined;
766
788
  }[] | undefined;
767
789
  rendering_mode?: string | null | undefined;
768
- replies?: Record<string, unknown>[] | undefined;
790
+ replies?: Record<string, {} | null>[] | undefined;
769
791
  replies_after_cursor?: string | null | undefined;
770
792
  replies_before_cursor?: string | null | undefined;
771
793
  reply_count?: number | undefined;
772
- reply_to?: Record<string, unknown> | null | undefined;
794
+ reply_to?: Record<string, {} | null> | null | undefined;
773
795
  root_message_id?: string | null | undefined;
774
796
  }, {
775
797
  id: string;
@@ -795,14 +817,14 @@ export declare const threadSchema: z.ZodObject<{
795
817
  created_by_team?: string | null | undefined;
796
818
  created_by_user?: string | null | undefined;
797
819
  is_system_user?: boolean | undefined;
798
- metadata?: Record<string, unknown> | undefined;
820
+ metadata?: Record<string, {} | null> | undefined;
799
821
  org_name?: string | null | undefined;
800
822
  org_role?: string | null | undefined;
801
823
  org_slug?: string | null | undefined;
802
824
  sandbox_name?: string | null | undefined;
803
825
  } | null | undefined;
804
826
  sandbox?: string | null | undefined;
805
- metadata?: Record<string, unknown> | undefined;
827
+ metadata?: Record<string, {} | null> | undefined;
806
828
  acl?: {
807
829
  add?: {
808
830
  actions: string[];
@@ -822,7 +844,7 @@ export declare const threadSchema: z.ZodObject<{
822
844
  attachments?: {
823
845
  type: string;
824
846
  id: string;
825
- object?: Record<string, unknown> | undefined;
847
+ object?: Record<string, {} | null> | undefined;
826
848
  description?: string | null | undefined;
827
849
  name?: string | null | undefined;
828
850
  height?: number | null | undefined;
@@ -868,6 +890,12 @@ export declare const threadSchema: z.ZodObject<{
868
890
  version?: number | null | undefined;
869
891
  }[] | undefined;
870
892
  visibility?: "default" | "private" | undefined;
893
+ context?: {
894
+ type: string;
895
+ content?: string | null | undefined;
896
+ title?: string | null | undefined;
897
+ attributes?: Record<string, {} | null> | undefined;
898
+ }[] | undefined;
871
899
  actors?: {
872
900
  alias?: string | null | undefined;
873
901
  name?: string | null | undefined;
@@ -890,15 +918,15 @@ export declare const threadSchema: z.ZodObject<{
890
918
  legacy_agent?: string | null | undefined;
891
919
  reactions?: {
892
920
  type: string;
893
- payload?: Record<string, unknown> | undefined;
921
+ payload?: Record<string, {} | null> | undefined;
894
922
  user?: string | undefined;
895
923
  }[] | undefined;
896
924
  rendering_mode?: string | null | undefined;
897
- replies?: Record<string, unknown>[] | undefined;
925
+ replies?: Record<string, {} | null>[] | undefined;
898
926
  replies_after_cursor?: string | null | undefined;
899
927
  replies_before_cursor?: string | null | undefined;
900
928
  reply_count?: number | undefined;
901
- reply_to?: Record<string, unknown> | null | undefined;
929
+ reply_to?: Record<string, {} | null> | null | undefined;
902
930
  root_message_id?: string | null | undefined;
903
931
  }>>>;
904
932
  /** Array of participant user IDs (`usr_...`) who are members of this thread. */
@@ -916,7 +944,7 @@ export declare const threadSchema: z.ZodObject<{
916
944
  email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
917
945
  id: z.ZodString;
918
946
  is_system_user: z.ZodOptional<z.ZodBoolean>;
919
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
947
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
920
948
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
921
949
  org: z.ZodOptional<z.ZodNullable<z.ZodString>>;
922
950
  org_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -939,7 +967,7 @@ export declare const threadSchema: z.ZodObject<{
939
967
  created_by_team?: string | null | undefined;
940
968
  created_by_user?: string | null | undefined;
941
969
  is_system_user?: boolean | undefined;
942
- metadata?: Record<string, unknown> | undefined;
970
+ metadata?: Record<string, {} | null> | undefined;
943
971
  org_name?: string | null | undefined;
944
972
  org_role?: string | null | undefined;
945
973
  org_slug?: string | null | undefined;
@@ -959,7 +987,7 @@ export declare const threadSchema: z.ZodObject<{
959
987
  created_by_team?: string | null | undefined;
960
988
  created_by_user?: string | null | undefined;
961
989
  is_system_user?: boolean | undefined;
962
- metadata?: Record<string, unknown> | undefined;
990
+ metadata?: Record<string, {} | null> | undefined;
963
991
  org_name?: string | null | undefined;
964
992
  org_role?: string | null | undefined;
965
993
  org_slug?: string | null | undefined;
@@ -1046,7 +1074,7 @@ export declare const threadSchema: z.ZodObject<{
1046
1074
  identity: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1047
1075
  last_applied_template_config: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1048
1076
  lookup_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1049
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1077
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
1050
1078
  name: z.ZodOptional<z.ZodString>;
1051
1079
  org: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1052
1080
  org_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1058,14 +1086,14 @@ export declare const threadSchema: z.ZodObject<{
1058
1086
  category_keys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1059
1087
  created_at: z.ZodOptional<z.ZodString>;
1060
1088
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1061
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1089
+ events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
1062
1090
  id: z.ZodString;
1063
1091
  image_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1064
1092
  kind: z.ZodString;
1065
1093
  latest_solution: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1066
1094
  latest_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1067
1095
  lookup_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1068
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1096
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
1069
1097
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1070
1098
  org: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1071
1099
  org_logo: z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -1107,7 +1135,7 @@ export declare const threadSchema: z.ZodObject<{
1107
1135
  details: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1108
1136
  automation_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1109
1137
  invoke_contract: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1110
- input_schema: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1138
+ input_schema: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>>;
1111
1139
  participants: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1112
1140
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1113
1141
  name: z.ZodString;
@@ -1125,19 +1153,19 @@ export declare const threadSchema: z.ZodObject<{
1125
1153
  description?: string | null | undefined;
1126
1154
  }>, "many">>>;
1127
1155
  prefills: z.ZodObject<{
1128
- participants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1129
- payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1156
+ participants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
1157
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
1130
1158
  }, "strip", z.ZodTypeAny, {
1131
- participants?: Record<string, unknown> | undefined;
1132
- payload?: Record<string, unknown> | undefined;
1159
+ participants?: Record<string, {} | null> | undefined;
1160
+ payload?: Record<string, {} | null> | undefined;
1133
1161
  }, {
1134
- participants?: Record<string, unknown> | undefined;
1135
- payload?: Record<string, unknown> | undefined;
1162
+ participants?: Record<string, {} | null> | undefined;
1163
+ payload?: Record<string, {} | null> | undefined;
1136
1164
  }>;
1137
1165
  }, "strip", z.ZodTypeAny, {
1138
1166
  prefills: {
1139
- participants?: Record<string, unknown> | undefined;
1140
- payload?: Record<string, unknown> | undefined;
1167
+ participants?: Record<string, {} | null> | undefined;
1168
+ payload?: Record<string, {} | null> | undefined;
1141
1169
  };
1142
1170
  participants?: {
1143
1171
  name: string;
@@ -1145,11 +1173,11 @@ export declare const threadSchema: z.ZodObject<{
1145
1173
  type: string;
1146
1174
  description?: string | null | undefined;
1147
1175
  }[] | null | undefined;
1148
- input_schema?: Record<string, unknown> | null | undefined;
1176
+ input_schema?: Record<string, {} | null> | null | undefined;
1149
1177
  }, {
1150
1178
  prefills: {
1151
- participants?: Record<string, unknown> | undefined;
1152
- payload?: Record<string, unknown> | undefined;
1179
+ participants?: Record<string, {} | null> | undefined;
1180
+ payload?: Record<string, {} | null> | undefined;
1153
1181
  };
1154
1182
  participants?: {
1155
1183
  name: string;
@@ -1157,7 +1185,7 @@ export declare const threadSchema: z.ZodObject<{
1157
1185
  type: string;
1158
1186
  description?: string | null | undefined;
1159
1187
  }[] | null | undefined;
1160
- input_schema?: Record<string, unknown> | null | undefined;
1188
+ input_schema?: Record<string, {} | null> | null | undefined;
1161
1189
  }>>>;
1162
1190
  type: z.ZodLiteral<"automation">;
1163
1191
  }, "strip", z.ZodTypeAny, {
@@ -1165,8 +1193,8 @@ export declare const threadSchema: z.ZodObject<{
1165
1193
  automation_type?: string | null | undefined;
1166
1194
  invoke_contract?: {
1167
1195
  prefills: {
1168
- participants?: Record<string, unknown> | undefined;
1169
- payload?: Record<string, unknown> | undefined;
1196
+ participants?: Record<string, {} | null> | undefined;
1197
+ payload?: Record<string, {} | null> | undefined;
1170
1198
  };
1171
1199
  participants?: {
1172
1200
  name: string;
@@ -1174,15 +1202,15 @@ export declare const threadSchema: z.ZodObject<{
1174
1202
  type: string;
1175
1203
  description?: string | null | undefined;
1176
1204
  }[] | null | undefined;
1177
- input_schema?: Record<string, unknown> | null | undefined;
1205
+ input_schema?: Record<string, {} | null> | null | undefined;
1178
1206
  } | null | undefined;
1179
1207
  }, {
1180
1208
  type: "automation";
1181
1209
  automation_type?: string | null | undefined;
1182
1210
  invoke_contract?: {
1183
1211
  prefills: {
1184
- participants?: Record<string, unknown> | undefined;
1185
- payload?: Record<string, unknown> | undefined;
1212
+ participants?: Record<string, {} | null> | undefined;
1213
+ payload?: Record<string, {} | null> | undefined;
1186
1214
  };
1187
1215
  participants?: {
1188
1216
  name: string;
@@ -1190,7 +1218,7 @@ export declare const threadSchema: z.ZodObject<{
1190
1218
  type: string;
1191
1219
  description?: string | null | undefined;
1192
1220
  }[] | null | undefined;
1193
- input_schema?: Record<string, unknown> | null | undefined;
1221
+ input_schema?: Record<string, {} | null> | null | undefined;
1194
1222
  } | null | undefined;
1195
1223
  }>]>>>;
1196
1224
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1213,8 +1241,8 @@ export declare const threadSchema: z.ZodObject<{
1213
1241
  automation_type?: string | null | undefined;
1214
1242
  invoke_contract?: {
1215
1243
  prefills: {
1216
- participants?: Record<string, unknown> | undefined;
1217
- payload?: Record<string, unknown> | undefined;
1244
+ participants?: Record<string, {} | null> | undefined;
1245
+ payload?: Record<string, {} | null> | undefined;
1218
1246
  };
1219
1247
  participants?: {
1220
1248
  name: string;
@@ -1222,7 +1250,7 @@ export declare const threadSchema: z.ZodObject<{
1222
1250
  type: string;
1223
1251
  description?: string | null | undefined;
1224
1252
  }[] | null | undefined;
1225
- input_schema?: Record<string, unknown> | null | undefined;
1253
+ input_schema?: Record<string, {} | null> | null | undefined;
1226
1254
  } | null | undefined;
1227
1255
  } | null | undefined;
1228
1256
  display_name?: string | null | undefined;
@@ -1239,8 +1267,8 @@ export declare const threadSchema: z.ZodObject<{
1239
1267
  automation_type?: string | null | undefined;
1240
1268
  invoke_contract?: {
1241
1269
  prefills: {
1242
- participants?: Record<string, unknown> | undefined;
1243
- payload?: Record<string, unknown> | undefined;
1270
+ participants?: Record<string, {} | null> | undefined;
1271
+ payload?: Record<string, {} | null> | undefined;
1244
1272
  };
1245
1273
  participants?: {
1246
1274
  name: string;
@@ -1248,7 +1276,7 @@ export declare const threadSchema: z.ZodObject<{
1248
1276
  type: string;
1249
1277
  description?: string | null | undefined;
1250
1278
  }[] | null | undefined;
1251
- input_schema?: Record<string, unknown> | null | undefined;
1279
+ input_schema?: Record<string, {} | null> | null | undefined;
1252
1280
  } | null | undefined;
1253
1281
  } | null | undefined;
1254
1282
  display_name?: string | null | undefined;
@@ -1273,8 +1301,8 @@ export declare const threadSchema: z.ZodObject<{
1273
1301
  automation_type?: string | null | undefined;
1274
1302
  invoke_contract?: {
1275
1303
  prefills: {
1276
- participants?: Record<string, unknown> | undefined;
1277
- payload?: Record<string, unknown> | undefined;
1304
+ participants?: Record<string, {} | null> | undefined;
1305
+ payload?: Record<string, {} | null> | undefined;
1278
1306
  };
1279
1307
  participants?: {
1280
1308
  name: string;
@@ -1282,7 +1310,7 @@ export declare const threadSchema: z.ZodObject<{
1282
1310
  type: string;
1283
1311
  description?: string | null | undefined;
1284
1312
  }[] | null | undefined;
1285
- input_schema?: Record<string, unknown> | null | undefined;
1313
+ input_schema?: Record<string, {} | null> | null | undefined;
1286
1314
  } | null | undefined;
1287
1315
  } | null | undefined;
1288
1316
  display_name?: string | null | undefined;
@@ -1295,11 +1323,11 @@ export declare const threadSchema: z.ZodObject<{
1295
1323
  updated_at?: string | undefined;
1296
1324
  lookup_key?: string | null | undefined;
1297
1325
  virtual_path?: string | null | undefined;
1298
- metadata?: Record<string, unknown> | undefined;
1326
+ metadata?: Record<string, {} | null> | undefined;
1299
1327
  org_name?: string | null | undefined;
1300
1328
  org_slug?: string | null | undefined;
1301
1329
  category_keys?: string[] | undefined;
1302
- events?: Record<string, unknown> | undefined;
1330
+ events?: Record<string, {} | null> | undefined;
1303
1331
  image_url?: string | null | undefined;
1304
1332
  latest_solution?: string | null | undefined;
1305
1333
  latest_version?: string | null | undefined;
@@ -1335,8 +1363,8 @@ export declare const threadSchema: z.ZodObject<{
1335
1363
  automation_type?: string | null | undefined;
1336
1364
  invoke_contract?: {
1337
1365
  prefills: {
1338
- participants?: Record<string, unknown> | undefined;
1339
- payload?: Record<string, unknown> | undefined;
1366
+ participants?: Record<string, {} | null> | undefined;
1367
+ payload?: Record<string, {} | null> | undefined;
1340
1368
  };
1341
1369
  participants?: {
1342
1370
  name: string;
@@ -1344,7 +1372,7 @@ export declare const threadSchema: z.ZodObject<{
1344
1372
  type: string;
1345
1373
  description?: string | null | undefined;
1346
1374
  }[] | null | undefined;
1347
- input_schema?: Record<string, unknown> | null | undefined;
1375
+ input_schema?: Record<string, {} | null> | null | undefined;
1348
1376
  } | null | undefined;
1349
1377
  } | null | undefined;
1350
1378
  display_name?: string | null | undefined;
@@ -1357,11 +1385,11 @@ export declare const threadSchema: z.ZodObject<{
1357
1385
  updated_at?: string | undefined;
1358
1386
  lookup_key?: string | null | undefined;
1359
1387
  virtual_path?: string | null | undefined;
1360
- metadata?: Record<string, unknown> | undefined;
1388
+ metadata?: Record<string, {} | null> | undefined;
1361
1389
  org_name?: string | null | undefined;
1362
1390
  org_slug?: string | null | undefined;
1363
1391
  category_keys?: string[] | undefined;
1364
- events?: Record<string, unknown> | undefined;
1392
+ events?: Record<string, {} | null> | undefined;
1365
1393
  image_url?: string | null | undefined;
1366
1394
  latest_solution?: string | null | undefined;
1367
1395
  latest_version?: string | null | undefined;
@@ -1385,14 +1413,14 @@ export declare const threadSchema: z.ZodObject<{
1385
1413
  category_keys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1386
1414
  created_at: z.ZodOptional<z.ZodString>;
1387
1415
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1388
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1416
+ events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
1389
1417
  id: z.ZodString;
1390
1418
  image_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1391
1419
  kind: z.ZodString;
1392
1420
  latest_solution: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1393
1421
  latest_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1394
1422
  lookup_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1395
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1423
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
1396
1424
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1397
1425
  org: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1398
1426
  org_logo: z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -1434,7 +1462,7 @@ export declare const threadSchema: z.ZodObject<{
1434
1462
  details: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1435
1463
  automation_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1436
1464
  invoke_contract: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1437
- input_schema: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1465
+ input_schema: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>>;
1438
1466
  participants: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1439
1467
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1440
1468
  name: z.ZodString;
@@ -1452,19 +1480,19 @@ export declare const threadSchema: z.ZodObject<{
1452
1480
  description?: string | null | undefined;
1453
1481
  }>, "many">>>;
1454
1482
  prefills: z.ZodObject<{
1455
- participants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1456
- payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1483
+ participants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
1484
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
1457
1485
  }, "strip", z.ZodTypeAny, {
1458
- participants?: Record<string, unknown> | undefined;
1459
- payload?: Record<string, unknown> | undefined;
1486
+ participants?: Record<string, {} | null> | undefined;
1487
+ payload?: Record<string, {} | null> | undefined;
1460
1488
  }, {
1461
- participants?: Record<string, unknown> | undefined;
1462
- payload?: Record<string, unknown> | undefined;
1489
+ participants?: Record<string, {} | null> | undefined;
1490
+ payload?: Record<string, {} | null> | undefined;
1463
1491
  }>;
1464
1492
  }, "strip", z.ZodTypeAny, {
1465
1493
  prefills: {
1466
- participants?: Record<string, unknown> | undefined;
1467
- payload?: Record<string, unknown> | undefined;
1494
+ participants?: Record<string, {} | null> | undefined;
1495
+ payload?: Record<string, {} | null> | undefined;
1468
1496
  };
1469
1497
  participants?: {
1470
1498
  name: string;
@@ -1472,11 +1500,11 @@ export declare const threadSchema: z.ZodObject<{
1472
1500
  type: string;
1473
1501
  description?: string | null | undefined;
1474
1502
  }[] | null | undefined;
1475
- input_schema?: Record<string, unknown> | null | undefined;
1503
+ input_schema?: Record<string, {} | null> | null | undefined;
1476
1504
  }, {
1477
1505
  prefills: {
1478
- participants?: Record<string, unknown> | undefined;
1479
- payload?: Record<string, unknown> | undefined;
1506
+ participants?: Record<string, {} | null> | undefined;
1507
+ payload?: Record<string, {} | null> | undefined;
1480
1508
  };
1481
1509
  participants?: {
1482
1510
  name: string;
@@ -1484,7 +1512,7 @@ export declare const threadSchema: z.ZodObject<{
1484
1512
  type: string;
1485
1513
  description?: string | null | undefined;
1486
1514
  }[] | null | undefined;
1487
- input_schema?: Record<string, unknown> | null | undefined;
1515
+ input_schema?: Record<string, {} | null> | null | undefined;
1488
1516
  }>>>;
1489
1517
  type: z.ZodLiteral<"automation">;
1490
1518
  }, "strip", z.ZodTypeAny, {
@@ -1492,8 +1520,8 @@ export declare const threadSchema: z.ZodObject<{
1492
1520
  automation_type?: string | null | undefined;
1493
1521
  invoke_contract?: {
1494
1522
  prefills: {
1495
- participants?: Record<string, unknown> | undefined;
1496
- payload?: Record<string, unknown> | undefined;
1523
+ participants?: Record<string, {} | null> | undefined;
1524
+ payload?: Record<string, {} | null> | undefined;
1497
1525
  };
1498
1526
  participants?: {
1499
1527
  name: string;
@@ -1501,15 +1529,15 @@ export declare const threadSchema: z.ZodObject<{
1501
1529
  type: string;
1502
1530
  description?: string | null | undefined;
1503
1531
  }[] | null | undefined;
1504
- input_schema?: Record<string, unknown> | null | undefined;
1532
+ input_schema?: Record<string, {} | null> | null | undefined;
1505
1533
  } | null | undefined;
1506
1534
  }, {
1507
1535
  type: "automation";
1508
1536
  automation_type?: string | null | undefined;
1509
1537
  invoke_contract?: {
1510
1538
  prefills: {
1511
- participants?: Record<string, unknown> | undefined;
1512
- payload?: Record<string, unknown> | undefined;
1539
+ participants?: Record<string, {} | null> | undefined;
1540
+ payload?: Record<string, {} | null> | undefined;
1513
1541
  };
1514
1542
  participants?: {
1515
1543
  name: string;
@@ -1517,7 +1545,7 @@ export declare const threadSchema: z.ZodObject<{
1517
1545
  type: string;
1518
1546
  description?: string | null | undefined;
1519
1547
  }[] | null | undefined;
1520
- input_schema?: Record<string, unknown> | null | undefined;
1548
+ input_schema?: Record<string, {} | null> | null | undefined;
1521
1549
  } | null | undefined;
1522
1550
  }>]>>>;
1523
1551
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1540,8 +1568,8 @@ export declare const threadSchema: z.ZodObject<{
1540
1568
  automation_type?: string | null | undefined;
1541
1569
  invoke_contract?: {
1542
1570
  prefills: {
1543
- participants?: Record<string, unknown> | undefined;
1544
- payload?: Record<string, unknown> | undefined;
1571
+ participants?: Record<string, {} | null> | undefined;
1572
+ payload?: Record<string, {} | null> | undefined;
1545
1573
  };
1546
1574
  participants?: {
1547
1575
  name: string;
@@ -1549,7 +1577,7 @@ export declare const threadSchema: z.ZodObject<{
1549
1577
  type: string;
1550
1578
  description?: string | null | undefined;
1551
1579
  }[] | null | undefined;
1552
- input_schema?: Record<string, unknown> | null | undefined;
1580
+ input_schema?: Record<string, {} | null> | null | undefined;
1553
1581
  } | null | undefined;
1554
1582
  } | null | undefined;
1555
1583
  display_name?: string | null | undefined;
@@ -1566,8 +1594,8 @@ export declare const threadSchema: z.ZodObject<{
1566
1594
  automation_type?: string | null | undefined;
1567
1595
  invoke_contract?: {
1568
1596
  prefills: {
1569
- participants?: Record<string, unknown> | undefined;
1570
- payload?: Record<string, unknown> | undefined;
1597
+ participants?: Record<string, {} | null> | undefined;
1598
+ payload?: Record<string, {} | null> | undefined;
1571
1599
  };
1572
1600
  participants?: {
1573
1601
  name: string;
@@ -1575,7 +1603,7 @@ export declare const threadSchema: z.ZodObject<{
1575
1603
  type: string;
1576
1604
  description?: string | null | undefined;
1577
1605
  }[] | null | undefined;
1578
- input_schema?: Record<string, unknown> | null | undefined;
1606
+ input_schema?: Record<string, {} | null> | null | undefined;
1579
1607
  } | null | undefined;
1580
1608
  } | null | undefined;
1581
1609
  display_name?: string | null | undefined;
@@ -1600,8 +1628,8 @@ export declare const threadSchema: z.ZodObject<{
1600
1628
  automation_type?: string | null | undefined;
1601
1629
  invoke_contract?: {
1602
1630
  prefills: {
1603
- participants?: Record<string, unknown> | undefined;
1604
- payload?: Record<string, unknown> | undefined;
1631
+ participants?: Record<string, {} | null> | undefined;
1632
+ payload?: Record<string, {} | null> | undefined;
1605
1633
  };
1606
1634
  participants?: {
1607
1635
  name: string;
@@ -1609,7 +1637,7 @@ export declare const threadSchema: z.ZodObject<{
1609
1637
  type: string;
1610
1638
  description?: string | null | undefined;
1611
1639
  }[] | null | undefined;
1612
- input_schema?: Record<string, unknown> | null | undefined;
1640
+ input_schema?: Record<string, {} | null> | null | undefined;
1613
1641
  } | null | undefined;
1614
1642
  } | null | undefined;
1615
1643
  display_name?: string | null | undefined;
@@ -1622,11 +1650,11 @@ export declare const threadSchema: z.ZodObject<{
1622
1650
  updated_at?: string | undefined;
1623
1651
  lookup_key?: string | null | undefined;
1624
1652
  virtual_path?: string | null | undefined;
1625
- metadata?: Record<string, unknown> | undefined;
1653
+ metadata?: Record<string, {} | null> | undefined;
1626
1654
  org_name?: string | null | undefined;
1627
1655
  org_slug?: string | null | undefined;
1628
1656
  category_keys?: string[] | undefined;
1629
- events?: Record<string, unknown> | undefined;
1657
+ events?: Record<string, {} | null> | undefined;
1630
1658
  image_url?: string | null | undefined;
1631
1659
  latest_solution?: string | null | undefined;
1632
1660
  latest_version?: string | null | undefined;
@@ -1662,8 +1690,8 @@ export declare const threadSchema: z.ZodObject<{
1662
1690
  automation_type?: string | null | undefined;
1663
1691
  invoke_contract?: {
1664
1692
  prefills: {
1665
- participants?: Record<string, unknown> | undefined;
1666
- payload?: Record<string, unknown> | undefined;
1693
+ participants?: Record<string, {} | null> | undefined;
1694
+ payload?: Record<string, {} | null> | undefined;
1667
1695
  };
1668
1696
  participants?: {
1669
1697
  name: string;
@@ -1671,7 +1699,7 @@ export declare const threadSchema: z.ZodObject<{
1671
1699
  type: string;
1672
1700
  description?: string | null | undefined;
1673
1701
  }[] | null | undefined;
1674
- input_schema?: Record<string, unknown> | null | undefined;
1702
+ input_schema?: Record<string, {} | null> | null | undefined;
1675
1703
  } | null | undefined;
1676
1704
  } | null | undefined;
1677
1705
  display_name?: string | null | undefined;
@@ -1684,11 +1712,11 @@ export declare const threadSchema: z.ZodObject<{
1684
1712
  updated_at?: string | undefined;
1685
1713
  lookup_key?: string | null | undefined;
1686
1714
  virtual_path?: string | null | undefined;
1687
- metadata?: Record<string, unknown> | undefined;
1715
+ metadata?: Record<string, {} | null> | undefined;
1688
1716
  org_name?: string | null | undefined;
1689
1717
  org_slug?: string | null | undefined;
1690
1718
  category_keys?: string[] | undefined;
1691
- events?: Record<string, unknown> | undefined;
1719
+ events?: Record<string, {} | null> | undefined;
1692
1720
  image_url?: string | null | undefined;
1693
1721
  latest_solution?: string | null | undefined;
1694
1722
  latest_version?: string | null | undefined;
@@ -1757,8 +1785,8 @@ export declare const threadSchema: z.ZodObject<{
1757
1785
  automation_type?: string | null | undefined;
1758
1786
  invoke_contract?: {
1759
1787
  prefills: {
1760
- participants?: Record<string, unknown> | undefined;
1761
- payload?: Record<string, unknown> | undefined;
1788
+ participants?: Record<string, {} | null> | undefined;
1789
+ payload?: Record<string, {} | null> | undefined;
1762
1790
  };
1763
1791
  participants?: {
1764
1792
  name: string;
@@ -1766,7 +1794,7 @@ export declare const threadSchema: z.ZodObject<{
1766
1794
  type: string;
1767
1795
  description?: string | null | undefined;
1768
1796
  }[] | null | undefined;
1769
- input_schema?: Record<string, unknown> | null | undefined;
1797
+ input_schema?: Record<string, {} | null> | null | undefined;
1770
1798
  } | null | undefined;
1771
1799
  } | null | undefined;
1772
1800
  display_name?: string | null | undefined;
@@ -1779,11 +1807,11 @@ export declare const threadSchema: z.ZodObject<{
1779
1807
  updated_at?: string | undefined;
1780
1808
  lookup_key?: string | null | undefined;
1781
1809
  virtual_path?: string | null | undefined;
1782
- metadata?: Record<string, unknown> | undefined;
1810
+ metadata?: Record<string, {} | null> | undefined;
1783
1811
  org_name?: string | null | undefined;
1784
1812
  org_slug?: string | null | undefined;
1785
1813
  category_keys?: string[] | undefined;
1786
- events?: Record<string, unknown> | undefined;
1814
+ events?: Record<string, {} | null> | undefined;
1787
1815
  image_url?: string | null | undefined;
1788
1816
  latest_solution?: string | null | undefined;
1789
1817
  latest_version?: string | null | undefined;
@@ -1831,8 +1859,8 @@ export declare const threadSchema: z.ZodObject<{
1831
1859
  automation_type?: string | null | undefined;
1832
1860
  invoke_contract?: {
1833
1861
  prefills: {
1834
- participants?: Record<string, unknown> | undefined;
1835
- payload?: Record<string, unknown> | undefined;
1862
+ participants?: Record<string, {} | null> | undefined;
1863
+ payload?: Record<string, {} | null> | undefined;
1836
1864
  };
1837
1865
  participants?: {
1838
1866
  name: string;
@@ -1840,7 +1868,7 @@ export declare const threadSchema: z.ZodObject<{
1840
1868
  type: string;
1841
1869
  description?: string | null | undefined;
1842
1870
  }[] | null | undefined;
1843
- input_schema?: Record<string, unknown> | null | undefined;
1871
+ input_schema?: Record<string, {} | null> | null | undefined;
1844
1872
  } | null | undefined;
1845
1873
  } | null | undefined;
1846
1874
  display_name?: string | null | undefined;
@@ -1853,11 +1881,11 @@ export declare const threadSchema: z.ZodObject<{
1853
1881
  updated_at?: string | undefined;
1854
1882
  lookup_key?: string | null | undefined;
1855
1883
  virtual_path?: string | null | undefined;
1856
- metadata?: Record<string, unknown> | undefined;
1884
+ metadata?: Record<string, {} | null> | undefined;
1857
1885
  org_name?: string | null | undefined;
1858
1886
  org_slug?: string | null | undefined;
1859
1887
  category_keys?: string[] | undefined;
1860
- events?: Record<string, unknown> | undefined;
1888
+ events?: Record<string, {} | null> | undefined;
1861
1889
  image_url?: string | null | undefined;
1862
1890
  latest_solution?: string | null | undefined;
1863
1891
  latest_version?: string | null | undefined;
@@ -1895,8 +1923,8 @@ export declare const threadSchema: z.ZodObject<{
1895
1923
  automation_type?: string | null | undefined;
1896
1924
  invoke_contract?: {
1897
1925
  prefills: {
1898
- participants?: Record<string, unknown> | undefined;
1899
- payload?: Record<string, unknown> | undefined;
1926
+ participants?: Record<string, {} | null> | undefined;
1927
+ payload?: Record<string, {} | null> | undefined;
1900
1928
  };
1901
1929
  participants?: {
1902
1930
  name: string;
@@ -1904,7 +1932,7 @@ export declare const threadSchema: z.ZodObject<{
1904
1932
  type: string;
1905
1933
  description?: string | null | undefined;
1906
1934
  }[] | null | undefined;
1907
- input_schema?: Record<string, unknown> | null | undefined;
1935
+ input_schema?: Record<string, {} | null> | null | undefined;
1908
1936
  } | null | undefined;
1909
1937
  } | null | undefined;
1910
1938
  display_name?: string | null | undefined;
@@ -1917,11 +1945,11 @@ export declare const threadSchema: z.ZodObject<{
1917
1945
  updated_at?: string | undefined;
1918
1946
  lookup_key?: string | null | undefined;
1919
1947
  virtual_path?: string | null | undefined;
1920
- metadata?: Record<string, unknown> | undefined;
1948
+ metadata?: Record<string, {} | null> | undefined;
1921
1949
  org_name?: string | null | undefined;
1922
1950
  org_slug?: string | null | undefined;
1923
1951
  category_keys?: string[] | undefined;
1924
- events?: Record<string, unknown> | undefined;
1952
+ events?: Record<string, {} | null> | undefined;
1925
1953
  image_url?: string | null | undefined;
1926
1954
  latest_solution?: string | null | undefined;
1927
1955
  latest_version?: string | null | undefined;
@@ -1969,8 +1997,8 @@ export declare const threadSchema: z.ZodObject<{
1969
1997
  automation_type?: string | null | undefined;
1970
1998
  invoke_contract?: {
1971
1999
  prefills: {
1972
- participants?: Record<string, unknown> | undefined;
1973
- payload?: Record<string, unknown> | undefined;
2000
+ participants?: Record<string, {} | null> | undefined;
2001
+ payload?: Record<string, {} | null> | undefined;
1974
2002
  };
1975
2003
  participants?: {
1976
2004
  name: string;
@@ -1978,7 +2006,7 @@ export declare const threadSchema: z.ZodObject<{
1978
2006
  type: string;
1979
2007
  description?: string | null | undefined;
1980
2008
  }[] | null | undefined;
1981
- input_schema?: Record<string, unknown> | null | undefined;
2009
+ input_schema?: Record<string, {} | null> | null | undefined;
1982
2010
  } | null | undefined;
1983
2011
  } | null | undefined;
1984
2012
  display_name?: string | null | undefined;
@@ -1991,11 +2019,11 @@ export declare const threadSchema: z.ZodObject<{
1991
2019
  updated_at?: string | undefined;
1992
2020
  lookup_key?: string | null | undefined;
1993
2021
  virtual_path?: string | null | undefined;
1994
- metadata?: Record<string, unknown> | undefined;
2022
+ metadata?: Record<string, {} | null> | undefined;
1995
2023
  org_name?: string | null | undefined;
1996
2024
  org_slug?: string | null | undefined;
1997
2025
  category_keys?: string[] | undefined;
1998
- events?: Record<string, unknown> | undefined;
2026
+ events?: Record<string, {} | null> | undefined;
1999
2027
  image_url?: string | null | undefined;
2000
2028
  latest_solution?: string | null | undefined;
2001
2029
  latest_version?: string | null | undefined;
@@ -2033,7 +2061,7 @@ export declare const threadSchema: z.ZodObject<{
2033
2061
  user?: string | null | undefined;
2034
2062
  sandbox?: string | null | undefined;
2035
2063
  lookup_key?: string | null | undefined;
2036
- metadata?: Record<string, unknown> | undefined;
2064
+ metadata?: Record<string, {} | null> | undefined;
2037
2065
  org_name?: string | null | undefined;
2038
2066
  acl?: {
2039
2067
  add?: {
@@ -2074,8 +2102,8 @@ export declare const threadSchema: z.ZodObject<{
2074
2102
  automation_type?: string | null | undefined;
2075
2103
  invoke_contract?: {
2076
2104
  prefills: {
2077
- participants?: Record<string, unknown> | undefined;
2078
- payload?: Record<string, unknown> | undefined;
2105
+ participants?: Record<string, {} | null> | undefined;
2106
+ payload?: Record<string, {} | null> | undefined;
2079
2107
  };
2080
2108
  participants?: {
2081
2109
  name: string;
@@ -2083,7 +2111,7 @@ export declare const threadSchema: z.ZodObject<{
2083
2111
  type: string;
2084
2112
  description?: string | null | undefined;
2085
2113
  }[] | null | undefined;
2086
- input_schema?: Record<string, unknown> | null | undefined;
2114
+ input_schema?: Record<string, {} | null> | null | undefined;
2087
2115
  } | null | undefined;
2088
2116
  } | null | undefined;
2089
2117
  display_name?: string | null | undefined;
@@ -2096,11 +2124,11 @@ export declare const threadSchema: z.ZodObject<{
2096
2124
  updated_at?: string | undefined;
2097
2125
  lookup_key?: string | null | undefined;
2098
2126
  virtual_path?: string | null | undefined;
2099
- metadata?: Record<string, unknown> | undefined;
2127
+ metadata?: Record<string, {} | null> | undefined;
2100
2128
  org_name?: string | null | undefined;
2101
2129
  org_slug?: string | null | undefined;
2102
2130
  category_keys?: string[] | undefined;
2103
- events?: Record<string, unknown> | undefined;
2131
+ events?: Record<string, {} | null> | undefined;
2104
2132
  image_url?: string | null | undefined;
2105
2133
  latest_solution?: string | null | undefined;
2106
2134
  latest_version?: string | null | undefined;
@@ -2148,8 +2176,8 @@ export declare const threadSchema: z.ZodObject<{
2148
2176
  automation_type?: string | null | undefined;
2149
2177
  invoke_contract?: {
2150
2178
  prefills: {
2151
- participants?: Record<string, unknown> | undefined;
2152
- payload?: Record<string, unknown> | undefined;
2179
+ participants?: Record<string, {} | null> | undefined;
2180
+ payload?: Record<string, {} | null> | undefined;
2153
2181
  };
2154
2182
  participants?: {
2155
2183
  name: string;
@@ -2157,7 +2185,7 @@ export declare const threadSchema: z.ZodObject<{
2157
2185
  type: string;
2158
2186
  description?: string | null | undefined;
2159
2187
  }[] | null | undefined;
2160
- input_schema?: Record<string, unknown> | null | undefined;
2188
+ input_schema?: Record<string, {} | null> | null | undefined;
2161
2189
  } | null | undefined;
2162
2190
  } | null | undefined;
2163
2191
  display_name?: string | null | undefined;
@@ -2170,11 +2198,11 @@ export declare const threadSchema: z.ZodObject<{
2170
2198
  updated_at?: string | undefined;
2171
2199
  lookup_key?: string | null | undefined;
2172
2200
  virtual_path?: string | null | undefined;
2173
- metadata?: Record<string, unknown> | undefined;
2201
+ metadata?: Record<string, {} | null> | undefined;
2174
2202
  org_name?: string | null | undefined;
2175
2203
  org_slug?: string | null | undefined;
2176
2204
  category_keys?: string[] | undefined;
2177
- events?: Record<string, unknown> | undefined;
2205
+ events?: Record<string, {} | null> | undefined;
2178
2206
  image_url?: string | null | undefined;
2179
2207
  latest_solution?: string | null | undefined;
2180
2208
  latest_version?: string | null | undefined;
@@ -2209,7 +2237,7 @@ export declare const threadSchema: z.ZodObject<{
2209
2237
  user?: string | null | undefined;
2210
2238
  sandbox?: string | null | undefined;
2211
2239
  lookup_key?: string | null | undefined;
2212
- metadata?: Record<string, unknown> | undefined;
2240
+ metadata?: Record<string, {} | null> | undefined;
2213
2241
  org_name?: string | null | undefined;
2214
2242
  acl?: {
2215
2243
  add?: {
@@ -2250,8 +2278,8 @@ export declare const threadSchema: z.ZodObject<{
2250
2278
  automation_type?: string | null | undefined;
2251
2279
  invoke_contract?: {
2252
2280
  prefills: {
2253
- participants?: Record<string, unknown> | undefined;
2254
- payload?: Record<string, unknown> | undefined;
2281
+ participants?: Record<string, {} | null> | undefined;
2282
+ payload?: Record<string, {} | null> | undefined;
2255
2283
  };
2256
2284
  participants?: {
2257
2285
  name: string;
@@ -2259,7 +2287,7 @@ export declare const threadSchema: z.ZodObject<{
2259
2287
  type: string;
2260
2288
  description?: string | null | undefined;
2261
2289
  }[] | null | undefined;
2262
- input_schema?: Record<string, unknown> | null | undefined;
2290
+ input_schema?: Record<string, {} | null> | null | undefined;
2263
2291
  } | null | undefined;
2264
2292
  } | null | undefined;
2265
2293
  display_name?: string | null | undefined;
@@ -2272,11 +2300,11 @@ export declare const threadSchema: z.ZodObject<{
2272
2300
  updated_at?: string | undefined;
2273
2301
  lookup_key?: string | null | undefined;
2274
2302
  virtual_path?: string | null | undefined;
2275
- metadata?: Record<string, unknown> | undefined;
2303
+ metadata?: Record<string, {} | null> | undefined;
2276
2304
  org_name?: string | null | undefined;
2277
2305
  org_slug?: string | null | undefined;
2278
2306
  category_keys?: string[] | undefined;
2279
- events?: Record<string, unknown> | undefined;
2307
+ events?: Record<string, {} | null> | undefined;
2280
2308
  image_url?: string | null | undefined;
2281
2309
  latest_solution?: string | null | undefined;
2282
2310
  latest_version?: string | null | undefined;
@@ -2324,8 +2352,8 @@ export declare const threadSchema: z.ZodObject<{
2324
2352
  automation_type?: string | null | undefined;
2325
2353
  invoke_contract?: {
2326
2354
  prefills: {
2327
- participants?: Record<string, unknown> | undefined;
2328
- payload?: Record<string, unknown> | undefined;
2355
+ participants?: Record<string, {} | null> | undefined;
2356
+ payload?: Record<string, {} | null> | undefined;
2329
2357
  };
2330
2358
  participants?: {
2331
2359
  name: string;
@@ -2333,7 +2361,7 @@ export declare const threadSchema: z.ZodObject<{
2333
2361
  type: string;
2334
2362
  description?: string | null | undefined;
2335
2363
  }[] | null | undefined;
2336
- input_schema?: Record<string, unknown> | null | undefined;
2364
+ input_schema?: Record<string, {} | null> | null | undefined;
2337
2365
  } | null | undefined;
2338
2366
  } | null | undefined;
2339
2367
  display_name?: string | null | undefined;
@@ -2346,11 +2374,11 @@ export declare const threadSchema: z.ZodObject<{
2346
2374
  updated_at?: string | undefined;
2347
2375
  lookup_key?: string | null | undefined;
2348
2376
  virtual_path?: string | null | undefined;
2349
- metadata?: Record<string, unknown> | undefined;
2377
+ metadata?: Record<string, {} | null> | undefined;
2350
2378
  org_name?: string | null | undefined;
2351
2379
  org_slug?: string | null | undefined;
2352
2380
  category_keys?: string[] | undefined;
2353
- events?: Record<string, unknown> | undefined;
2381
+ events?: Record<string, {} | null> | undefined;
2354
2382
  image_url?: string | null | undefined;
2355
2383
  latest_solution?: string | null | undefined;
2356
2384
  latest_version?: string | null | undefined;
@@ -2389,7 +2417,7 @@ export declare const threadSchema: z.ZodObject<{
2389
2417
  /** URL-safe slug for the thread, used in human-readable permalinks. `null` if not assigned. */
2390
2418
  slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2391
2419
  /** Threads that are nested under this thread as replies to a parent message. Present only when sub-thread enrichment is requested. */
2392
- sub_threads: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>>;
2420
+ sub_threads: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>, "many">>>;
2393
2421
  /** Status tags on the thread (e.g. `"blocked"`, `"needs-review"`). Edited by any thread participant via the `/threads/:thread/tags` endpoints and filterable on the thread list endpoints. Empty array if none set. */
2394
2422
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2395
2423
  /** ID of the team that owns this thread (`team_...`). `null` for user-owned or agent-owned threads. */
@@ -2429,7 +2457,7 @@ export declare const threadSchema: z.ZodObject<{
2429
2457
  created_by_team?: string | null | undefined;
2430
2458
  created_by_user?: string | null | undefined;
2431
2459
  is_system_user?: boolean | undefined;
2432
- metadata?: Record<string, unknown> | undefined;
2460
+ metadata?: Record<string, {} | null> | undefined;
2433
2461
  org_name?: string | null | undefined;
2434
2462
  org_role?: string | null | undefined;
2435
2463
  org_slug?: string | null | undefined;
@@ -2439,7 +2467,7 @@ export declare const threadSchema: z.ZodObject<{
2439
2467
  updated_at?: string | undefined;
2440
2468
  user?: string | null | undefined;
2441
2469
  sandbox?: string | null | undefined;
2442
- metadata?: Record<string, unknown> | null | undefined;
2470
+ metadata?: Record<string, {} | null> | null | undefined;
2443
2471
  title?: string | null | undefined;
2444
2472
  slug?: string | null | undefined;
2445
2473
  muted?: boolean | undefined;
@@ -2460,7 +2488,7 @@ export declare const threadSchema: z.ZodObject<{
2460
2488
  created_by_team?: string | null | undefined;
2461
2489
  created_by_user?: string | null | undefined;
2462
2490
  is_system_user?: boolean | undefined;
2463
- metadata?: Record<string, unknown> | undefined;
2491
+ metadata?: Record<string, {} | null> | undefined;
2464
2492
  org_name?: string | null | undefined;
2465
2493
  org_role?: string | null | undefined;
2466
2494
  org_slug?: string | null | undefined;
@@ -2497,14 +2525,14 @@ export declare const threadSchema: z.ZodObject<{
2497
2525
  created_by_team?: string | null | undefined;
2498
2526
  created_by_user?: string | null | undefined;
2499
2527
  is_system_user?: boolean | undefined;
2500
- metadata?: Record<string, unknown> | undefined;
2528
+ metadata?: Record<string, {} | null> | undefined;
2501
2529
  org_name?: string | null | undefined;
2502
2530
  org_role?: string | null | undefined;
2503
2531
  org_slug?: string | null | undefined;
2504
2532
  sandbox_name?: string | null | undefined;
2505
2533
  } | null | undefined;
2506
2534
  sandbox?: string | null | undefined;
2507
- metadata?: Record<string, unknown> | undefined;
2535
+ metadata?: Record<string, {} | null> | undefined;
2508
2536
  acl?: {
2509
2537
  add?: {
2510
2538
  actions: string[];
@@ -2524,7 +2552,7 @@ export declare const threadSchema: z.ZodObject<{
2524
2552
  attachments?: {
2525
2553
  type: string;
2526
2554
  id: string;
2527
- object?: Record<string, unknown> | undefined;
2555
+ object?: Record<string, {} | null> | undefined;
2528
2556
  description?: string | null | undefined;
2529
2557
  name?: string | null | undefined;
2530
2558
  height?: number | null | undefined;
@@ -2570,6 +2598,12 @@ export declare const threadSchema: z.ZodObject<{
2570
2598
  version?: number | null | undefined;
2571
2599
  }[] | undefined;
2572
2600
  visibility?: "default" | "private" | undefined;
2601
+ context?: {
2602
+ type: string;
2603
+ content?: string | null | undefined;
2604
+ title?: string | null | undefined;
2605
+ attributes?: Record<string, {} | null> | undefined;
2606
+ }[] | undefined;
2573
2607
  actors?: {
2574
2608
  alias?: string | null | undefined;
2575
2609
  name?: string | null | undefined;
@@ -2592,15 +2626,15 @@ export declare const threadSchema: z.ZodObject<{
2592
2626
  legacy_agent?: string | null | undefined;
2593
2627
  reactions?: {
2594
2628
  type: string;
2595
- payload?: Record<string, unknown> | undefined;
2629
+ payload?: Record<string, {} | null> | undefined;
2596
2630
  user?: string | undefined;
2597
2631
  }[] | undefined;
2598
2632
  rendering_mode?: string | null | undefined;
2599
- replies?: Record<string, unknown>[] | undefined;
2633
+ replies?: Record<string, {} | null>[] | undefined;
2600
2634
  replies_after_cursor?: string | null | undefined;
2601
2635
  replies_before_cursor?: string | null | undefined;
2602
2636
  reply_count?: number | undefined;
2603
- reply_to?: Record<string, unknown> | null | undefined;
2637
+ reply_to?: Record<string, {} | null> | null | undefined;
2604
2638
  root_message_id?: string | null | undefined;
2605
2639
  } | null | undefined;
2606
2640
  participant?: string[] | undefined;
@@ -2618,7 +2652,7 @@ export declare const threadSchema: z.ZodObject<{
2618
2652
  user?: string | null | undefined;
2619
2653
  sandbox?: string | null | undefined;
2620
2654
  lookup_key?: string | null | undefined;
2621
- metadata?: Record<string, unknown> | undefined;
2655
+ metadata?: Record<string, {} | null> | undefined;
2622
2656
  org_name?: string | null | undefined;
2623
2657
  acl?: {
2624
2658
  add?: {
@@ -2659,8 +2693,8 @@ export declare const threadSchema: z.ZodObject<{
2659
2693
  automation_type?: string | null | undefined;
2660
2694
  invoke_contract?: {
2661
2695
  prefills: {
2662
- participants?: Record<string, unknown> | undefined;
2663
- payload?: Record<string, unknown> | undefined;
2696
+ participants?: Record<string, {} | null> | undefined;
2697
+ payload?: Record<string, {} | null> | undefined;
2664
2698
  };
2665
2699
  participants?: {
2666
2700
  name: string;
@@ -2668,7 +2702,7 @@ export declare const threadSchema: z.ZodObject<{
2668
2702
  type: string;
2669
2703
  description?: string | null | undefined;
2670
2704
  }[] | null | undefined;
2671
- input_schema?: Record<string, unknown> | null | undefined;
2705
+ input_schema?: Record<string, {} | null> | null | undefined;
2672
2706
  } | null | undefined;
2673
2707
  } | null | undefined;
2674
2708
  display_name?: string | null | undefined;
@@ -2681,11 +2715,11 @@ export declare const threadSchema: z.ZodObject<{
2681
2715
  updated_at?: string | undefined;
2682
2716
  lookup_key?: string | null | undefined;
2683
2717
  virtual_path?: string | null | undefined;
2684
- metadata?: Record<string, unknown> | undefined;
2718
+ metadata?: Record<string, {} | null> | undefined;
2685
2719
  org_name?: string | null | undefined;
2686
2720
  org_slug?: string | null | undefined;
2687
2721
  category_keys?: string[] | undefined;
2688
- events?: Record<string, unknown> | undefined;
2722
+ events?: Record<string, {} | null> | undefined;
2689
2723
  image_url?: string | null | undefined;
2690
2724
  latest_solution?: string | null | undefined;
2691
2725
  latest_version?: string | null | undefined;
@@ -2733,8 +2767,8 @@ export declare const threadSchema: z.ZodObject<{
2733
2767
  automation_type?: string | null | undefined;
2734
2768
  invoke_contract?: {
2735
2769
  prefills: {
2736
- participants?: Record<string, unknown> | undefined;
2737
- payload?: Record<string, unknown> | undefined;
2770
+ participants?: Record<string, {} | null> | undefined;
2771
+ payload?: Record<string, {} | null> | undefined;
2738
2772
  };
2739
2773
  participants?: {
2740
2774
  name: string;
@@ -2742,7 +2776,7 @@ export declare const threadSchema: z.ZodObject<{
2742
2776
  type: string;
2743
2777
  description?: string | null | undefined;
2744
2778
  }[] | null | undefined;
2745
- input_schema?: Record<string, unknown> | null | undefined;
2779
+ input_schema?: Record<string, {} | null> | null | undefined;
2746
2780
  } | null | undefined;
2747
2781
  } | null | undefined;
2748
2782
  display_name?: string | null | undefined;
@@ -2755,11 +2789,11 @@ export declare const threadSchema: z.ZodObject<{
2755
2789
  updated_at?: string | undefined;
2756
2790
  lookup_key?: string | null | undefined;
2757
2791
  virtual_path?: string | null | undefined;
2758
- metadata?: Record<string, unknown> | undefined;
2792
+ metadata?: Record<string, {} | null> | undefined;
2759
2793
  org_name?: string | null | undefined;
2760
2794
  org_slug?: string | null | undefined;
2761
2795
  category_keys?: string[] | undefined;
2762
- events?: Record<string, unknown> | undefined;
2796
+ events?: Record<string, {} | null> | undefined;
2763
2797
  image_url?: string | null | undefined;
2764
2798
  latest_solution?: string | null | undefined;
2765
2799
  latest_version?: string | null | undefined;
@@ -2785,7 +2819,7 @@ export declare const threadSchema: z.ZodObject<{
2785
2819
  settings?: {
2786
2820
  agent_enabled?: boolean | null | undefined;
2787
2821
  } | undefined;
2788
- sub_threads?: Record<string, unknown>[] | null | undefined;
2822
+ sub_threads?: Record<string, {} | null>[] | null | undefined;
2789
2823
  tags?: string[] | undefined;
2790
2824
  ttl?: string | null | undefined;
2791
2825
  unread_count?: number | null | undefined;
@@ -2812,7 +2846,7 @@ export declare const threadSchema: z.ZodObject<{
2812
2846
  created_by_team?: string | null | undefined;
2813
2847
  created_by_user?: string | null | undefined;
2814
2848
  is_system_user?: boolean | undefined;
2815
- metadata?: Record<string, unknown> | undefined;
2849
+ metadata?: Record<string, {} | null> | undefined;
2816
2850
  org_name?: string | null | undefined;
2817
2851
  org_role?: string | null | undefined;
2818
2852
  org_slug?: string | null | undefined;
@@ -2822,7 +2856,7 @@ export declare const threadSchema: z.ZodObject<{
2822
2856
  updated_at?: string | undefined;
2823
2857
  user?: string | null | undefined;
2824
2858
  sandbox?: string | null | undefined;
2825
- metadata?: Record<string, unknown> | null | undefined;
2859
+ metadata?: Record<string, {} | null> | null | undefined;
2826
2860
  title?: string | null | undefined;
2827
2861
  slug?: string | null | undefined;
2828
2862
  muted?: boolean | undefined;
@@ -2843,7 +2877,7 @@ export declare const threadSchema: z.ZodObject<{
2843
2877
  created_by_team?: string | null | undefined;
2844
2878
  created_by_user?: string | null | undefined;
2845
2879
  is_system_user?: boolean | undefined;
2846
- metadata?: Record<string, unknown> | undefined;
2880
+ metadata?: Record<string, {} | null> | undefined;
2847
2881
  org_name?: string | null | undefined;
2848
2882
  org_role?: string | null | undefined;
2849
2883
  org_slug?: string | null | undefined;
@@ -2880,14 +2914,14 @@ export declare const threadSchema: z.ZodObject<{
2880
2914
  created_by_team?: string | null | undefined;
2881
2915
  created_by_user?: string | null | undefined;
2882
2916
  is_system_user?: boolean | undefined;
2883
- metadata?: Record<string, unknown> | undefined;
2917
+ metadata?: Record<string, {} | null> | undefined;
2884
2918
  org_name?: string | null | undefined;
2885
2919
  org_role?: string | null | undefined;
2886
2920
  org_slug?: string | null | undefined;
2887
2921
  sandbox_name?: string | null | undefined;
2888
2922
  } | null | undefined;
2889
2923
  sandbox?: string | null | undefined;
2890
- metadata?: Record<string, unknown> | undefined;
2924
+ metadata?: Record<string, {} | null> | undefined;
2891
2925
  acl?: {
2892
2926
  add?: {
2893
2927
  actions: string[];
@@ -2907,7 +2941,7 @@ export declare const threadSchema: z.ZodObject<{
2907
2941
  attachments?: {
2908
2942
  type: string;
2909
2943
  id: string;
2910
- object?: Record<string, unknown> | undefined;
2944
+ object?: Record<string, {} | null> | undefined;
2911
2945
  description?: string | null | undefined;
2912
2946
  name?: string | null | undefined;
2913
2947
  height?: number | null | undefined;
@@ -2953,6 +2987,12 @@ export declare const threadSchema: z.ZodObject<{
2953
2987
  version?: number | null | undefined;
2954
2988
  }[] | undefined;
2955
2989
  visibility?: "default" | "private" | undefined;
2990
+ context?: {
2991
+ type: string;
2992
+ content?: string | null | undefined;
2993
+ title?: string | null | undefined;
2994
+ attributes?: Record<string, {} | null> | undefined;
2995
+ }[] | undefined;
2956
2996
  actors?: {
2957
2997
  alias?: string | null | undefined;
2958
2998
  name?: string | null | undefined;
@@ -2975,15 +3015,15 @@ export declare const threadSchema: z.ZodObject<{
2975
3015
  legacy_agent?: string | null | undefined;
2976
3016
  reactions?: {
2977
3017
  type: string;
2978
- payload?: Record<string, unknown> | undefined;
3018
+ payload?: Record<string, {} | null> | undefined;
2979
3019
  user?: string | undefined;
2980
3020
  }[] | undefined;
2981
3021
  rendering_mode?: string | null | undefined;
2982
- replies?: Record<string, unknown>[] | undefined;
3022
+ replies?: Record<string, {} | null>[] | undefined;
2983
3023
  replies_after_cursor?: string | null | undefined;
2984
3024
  replies_before_cursor?: string | null | undefined;
2985
3025
  reply_count?: number | undefined;
2986
- reply_to?: Record<string, unknown> | null | undefined;
3026
+ reply_to?: Record<string, {} | null> | null | undefined;
2987
3027
  root_message_id?: string | null | undefined;
2988
3028
  } | null | undefined;
2989
3029
  participant?: string[] | undefined;
@@ -3001,7 +3041,7 @@ export declare const threadSchema: z.ZodObject<{
3001
3041
  user?: string | null | undefined;
3002
3042
  sandbox?: string | null | undefined;
3003
3043
  lookup_key?: string | null | undefined;
3004
- metadata?: Record<string, unknown> | undefined;
3044
+ metadata?: Record<string, {} | null> | undefined;
3005
3045
  org_name?: string | null | undefined;
3006
3046
  acl?: {
3007
3047
  add?: {
@@ -3042,8 +3082,8 @@ export declare const threadSchema: z.ZodObject<{
3042
3082
  automation_type?: string | null | undefined;
3043
3083
  invoke_contract?: {
3044
3084
  prefills: {
3045
- participants?: Record<string, unknown> | undefined;
3046
- payload?: Record<string, unknown> | undefined;
3085
+ participants?: Record<string, {} | null> | undefined;
3086
+ payload?: Record<string, {} | null> | undefined;
3047
3087
  };
3048
3088
  participants?: {
3049
3089
  name: string;
@@ -3051,7 +3091,7 @@ export declare const threadSchema: z.ZodObject<{
3051
3091
  type: string;
3052
3092
  description?: string | null | undefined;
3053
3093
  }[] | null | undefined;
3054
- input_schema?: Record<string, unknown> | null | undefined;
3094
+ input_schema?: Record<string, {} | null> | null | undefined;
3055
3095
  } | null | undefined;
3056
3096
  } | null | undefined;
3057
3097
  display_name?: string | null | undefined;
@@ -3064,11 +3104,11 @@ export declare const threadSchema: z.ZodObject<{
3064
3104
  updated_at?: string | undefined;
3065
3105
  lookup_key?: string | null | undefined;
3066
3106
  virtual_path?: string | null | undefined;
3067
- metadata?: Record<string, unknown> | undefined;
3107
+ metadata?: Record<string, {} | null> | undefined;
3068
3108
  org_name?: string | null | undefined;
3069
3109
  org_slug?: string | null | undefined;
3070
3110
  category_keys?: string[] | undefined;
3071
- events?: Record<string, unknown> | undefined;
3111
+ events?: Record<string, {} | null> | undefined;
3072
3112
  image_url?: string | null | undefined;
3073
3113
  latest_solution?: string | null | undefined;
3074
3114
  latest_version?: string | null | undefined;
@@ -3116,8 +3156,8 @@ export declare const threadSchema: z.ZodObject<{
3116
3156
  automation_type?: string | null | undefined;
3117
3157
  invoke_contract?: {
3118
3158
  prefills: {
3119
- participants?: Record<string, unknown> | undefined;
3120
- payload?: Record<string, unknown> | undefined;
3159
+ participants?: Record<string, {} | null> | undefined;
3160
+ payload?: Record<string, {} | null> | undefined;
3121
3161
  };
3122
3162
  participants?: {
3123
3163
  name: string;
@@ -3125,7 +3165,7 @@ export declare const threadSchema: z.ZodObject<{
3125
3165
  type: string;
3126
3166
  description?: string | null | undefined;
3127
3167
  }[] | null | undefined;
3128
- input_schema?: Record<string, unknown> | null | undefined;
3168
+ input_schema?: Record<string, {} | null> | null | undefined;
3129
3169
  } | null | undefined;
3130
3170
  } | null | undefined;
3131
3171
  display_name?: string | null | undefined;
@@ -3138,11 +3178,11 @@ export declare const threadSchema: z.ZodObject<{
3138
3178
  updated_at?: string | undefined;
3139
3179
  lookup_key?: string | null | undefined;
3140
3180
  virtual_path?: string | null | undefined;
3141
- metadata?: Record<string, unknown> | undefined;
3181
+ metadata?: Record<string, {} | null> | undefined;
3142
3182
  org_name?: string | null | undefined;
3143
3183
  org_slug?: string | null | undefined;
3144
3184
  category_keys?: string[] | undefined;
3145
- events?: Record<string, unknown> | undefined;
3185
+ events?: Record<string, {} | null> | undefined;
3146
3186
  image_url?: string | null | undefined;
3147
3187
  latest_solution?: string | null | undefined;
3148
3188
  latest_version?: string | null | undefined;
@@ -3168,7 +3208,7 @@ export declare const threadSchema: z.ZodObject<{
3168
3208
  settings?: {
3169
3209
  agent_enabled?: boolean | null | undefined;
3170
3210
  } | undefined;
3171
- sub_threads?: Record<string, unknown>[] | null | undefined;
3211
+ sub_threads?: Record<string, {} | null>[] | null | undefined;
3172
3212
  tags?: string[] | undefined;
3173
3213
  ttl?: string | null | undefined;
3174
3214
  unread_count?: number | null | undefined;
@@ -3288,7 +3328,7 @@ export declare const threadMessageSchema: z.ZodObject<{
3288
3328
  }[] | undefined;
3289
3329
  }>>;
3290
3330
  /** Admin-only diagnostic metadata for the message, including execution trajectory details. Only present in developer portal responses. */
3291
- admin: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3331
+ admin: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
3292
3332
  /** Agent ID (`agt_...`) associated with the message. `null` if not agent-scoped. */
3293
3333
  agent: z.ZodOptional<z.ZodString>;
3294
3334
  /** Local agent execution mode for this message. One of `cli`, `embedded`, or `null` when the message was not created by a local agent execution path. */
@@ -3332,7 +3372,7 @@ export declare const threadMessageSchema: z.ZodObject<{
3332
3372
  image_width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3333
3373
  media_type: z.ZodOptional<z.ZodString>;
3334
3374
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3335
- object: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3375
+ object: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
3336
3376
  title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3337
3377
  type: z.ZodString;
3338
3378
  url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -3418,7 +3458,7 @@ export declare const threadMessageSchema: z.ZodObject<{
3418
3458
  }, "strip", z.ZodTypeAny, {
3419
3459
  type: string;
3420
3460
  id: string;
3421
- object?: Record<string, unknown> | undefined;
3461
+ object?: Record<string, {} | null> | undefined;
3422
3462
  description?: string | null | undefined;
3423
3463
  name?: string | null | undefined;
3424
3464
  height?: number | null | undefined;
@@ -3465,7 +3505,7 @@ export declare const threadMessageSchema: z.ZodObject<{
3465
3505
  }, {
3466
3506
  type: string;
3467
3507
  id: string;
3468
- object?: Record<string, unknown> | undefined;
3508
+ object?: Record<string, {} | null> | undefined;
3469
3509
  description?: string | null | undefined;
3470
3510
  name?: string | null | undefined;
3471
3511
  height?: number | null | undefined;
@@ -3517,7 +3557,7 @@ export declare const threadMessageSchema: z.ZodObject<{
3517
3557
  /** Message ID (`msg_...`). */
3518
3558
  id: z.ZodString;
3519
3559
  /** Key-value metadata attached to the message. Always present; defaults to an empty object. The `metadata` query parameter filters on this same object, so a caller can read back the field it selects on. */
3520
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3560
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<{} | null, z.ZodTypeDef, {} | null>>>;
3521
3561
  /** Organization ID (`org_...`) this message is scoped to. `null` if not org-scoped. */
3522
3562
  org: z.ZodOptional<z.ZodString>;
3523
3563
  /** ID of the root message in this reply chain (`msg_...`). `null` for a top-level message. The value is persisted when the reply is created, so callers can correlate a multi-turn session without walking parent messages. */
@@ -3549,7 +3589,7 @@ export declare const threadMessageSchema: z.ZodObject<{
3549
3589
  created_at?: string | undefined;
3550
3590
  user?: string | undefined;
3551
3591
  sandbox?: string | undefined;
3552
- metadata?: Record<string, unknown> | undefined;
3592
+ metadata?: Record<string, {} | null> | undefined;
3553
3593
  acl?: {
3554
3594
  add?: {
3555
3595
  actions: string[];
@@ -3569,7 +3609,7 @@ export declare const threadMessageSchema: z.ZodObject<{
3569
3609
  attachments?: {
3570
3610
  type: string;
3571
3611
  id: string;
3572
- object?: Record<string, unknown> | undefined;
3612
+ object?: Record<string, {} | null> | undefined;
3573
3613
  description?: string | null | undefined;
3574
3614
  name?: string | null | undefined;
3575
3615
  height?: number | null | undefined;
@@ -3617,7 +3657,7 @@ export declare const threadMessageSchema: z.ZodObject<{
3617
3657
  visibility?: "default" | "private" | undefined;
3618
3658
  agent_mode?: "cli" | "embedded" | undefined;
3619
3659
  root_message_id?: string | null | undefined;
3620
- admin?: Record<string, unknown> | undefined;
3660
+ admin?: Record<string, {} | null> | undefined;
3621
3661
  sender?: string | undefined;
3622
3662
  sender_name?: string | undefined;
3623
3663
  sender_type?: string | undefined;
@@ -3632,7 +3672,7 @@ export declare const threadMessageSchema: z.ZodObject<{
3632
3672
  created_at?: string | undefined;
3633
3673
  user?: string | undefined;
3634
3674
  sandbox?: string | undefined;
3635
- metadata?: Record<string, unknown> | undefined;
3675
+ metadata?: Record<string, {} | null> | undefined;
3636
3676
  acl?: {
3637
3677
  add?: {
3638
3678
  actions: string[];
@@ -3652,7 +3692,7 @@ export declare const threadMessageSchema: z.ZodObject<{
3652
3692
  attachments?: {
3653
3693
  type: string;
3654
3694
  id: string;
3655
- object?: Record<string, unknown> | undefined;
3695
+ object?: Record<string, {} | null> | undefined;
3656
3696
  description?: string | null | undefined;
3657
3697
  name?: string | null | undefined;
3658
3698
  height?: number | null | undefined;
@@ -3700,7 +3740,7 @@ export declare const threadMessageSchema: z.ZodObject<{
3700
3740
  visibility?: "default" | "private" | undefined;
3701
3741
  agent_mode?: "cli" | "embedded" | undefined;
3702
3742
  root_message_id?: string | null | undefined;
3703
- admin?: Record<string, unknown> | undefined;
3743
+ admin?: Record<string, {} | null> | undefined;
3704
3744
  sender?: string | undefined;
3705
3745
  sender_name?: string | undefined;
3706
3746
  sender_type?: string | undefined;