chatkit-bun 0.0.2

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 (52) hide show
  1. package/README.md +202 -0
  2. package/package.json +40 -0
  3. package/src/actions.ts +39 -0
  4. package/src/agents/accumulate.ts +43 -0
  5. package/src/agents/annotations.ts +157 -0
  6. package/src/agents/context.ts +190 -0
  7. package/src/agents/converter.ts +290 -0
  8. package/src/agents/index.ts +25 -0
  9. package/src/agents/stream.ts +1053 -0
  10. package/src/agents/types.ts +30 -0
  11. package/src/agents/workflows.ts +220 -0
  12. package/src/errors.ts +19 -0
  13. package/src/http.ts +60 -0
  14. package/src/index.ts +11 -0
  15. package/src/serialization.ts +75 -0
  16. package/src/server.ts +874 -0
  17. package/src/sqlite-store.ts +400 -0
  18. package/src/store.ts +98 -0
  19. package/src/types/core.ts +322 -0
  20. package/src/types/server.ts +396 -0
  21. package/src/widgets/components.ts +188 -0
  22. package/src/widgets/diff.ts +151 -0
  23. package/src/widgets/index.ts +6 -0
  24. package/src/widgets/serialization.ts +46 -0
  25. package/src/widgets/stream.ts +104 -0
  26. package/src/widgets/template.ts +180 -0
  27. package/src/widgets/types.ts +52 -0
  28. package/types/actions.d.ts +19 -0
  29. package/types/agents/accumulate.d.ts +4 -0
  30. package/types/agents/annotations.d.ts +21 -0
  31. package/types/agents/context.d.ts +35 -0
  32. package/types/agents/converter.d.ts +60 -0
  33. package/types/agents/index.d.ts +9 -0
  34. package/types/agents/stream.d.ts +4 -0
  35. package/types/agents/types.d.ts +26 -0
  36. package/types/agents/workflows.d.ts +34 -0
  37. package/types/errors.d.ts +11 -0
  38. package/types/http.d.ts +6 -0
  39. package/types/index.d.ts +11 -0
  40. package/types/serialization.d.ts +8 -0
  41. package/types/server.d.ts +73 -0
  42. package/types/sqlite-store.d.ts +43 -0
  43. package/types/store.d.ts +45 -0
  44. package/types/types/core.d.ts +1220 -0
  45. package/types/types/server.d.ts +5841 -0
  46. package/types/widgets/components.d.ts +144 -0
  47. package/types/widgets/diff.d.ts +7 -0
  48. package/types/widgets/index.d.ts +6 -0
  49. package/types/widgets/serialization.d.ts +2 -0
  50. package/types/widgets/stream.d.ts +10 -0
  51. package/types/widgets/template.d.ts +19 -0
  52. package/types/widgets/types.d.ts +24 -0
@@ -0,0 +1,1220 @@
1
+ import { z } from "zod";
2
+ export declare function PageSchema<T extends z.ZodTypeAny>(item: T): z.ZodObject<{
3
+ data: z.ZodDefault<z.ZodArray<T>>;
4
+ has_more: z.ZodDefault<z.ZodBoolean>;
5
+ after: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
+ }, z.core.$strip>;
7
+ export type Page<T> = {
8
+ data: T[];
9
+ has_more: boolean;
10
+ after?: string | null;
11
+ };
12
+ export declare const ThreadStatusSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
13
+ type: z.ZodLiteral<"active">;
14
+ }, z.core.$strip>, z.ZodObject<{
15
+ type: z.ZodLiteral<"locked">;
16
+ reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
+ }, z.core.$strip>, z.ZodObject<{
18
+ type: z.ZodLiteral<"closed">;
19
+ reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
+ }, z.core.$strip>], "type">;
21
+ export type ThreadStatus = z.infer<typeof ThreadStatusSchema>;
22
+ export declare const ThreadMetadataSchema: z.ZodObject<{
23
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
+ id: z.ZodString;
25
+ created_at: z.ZodString;
26
+ status: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
27
+ type: z.ZodLiteral<"active">;
28
+ }, z.core.$strip>, z.ZodObject<{
29
+ type: z.ZodLiteral<"locked">;
30
+ reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31
+ }, z.core.$strip>, z.ZodObject<{
32
+ type: z.ZodLiteral<"closed">;
33
+ reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
+ }, z.core.$strip>], "type">>;
35
+ allowed_image_domains: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
36
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
37
+ }, z.core.$strip>;
38
+ export type ThreadMetadata = z.infer<typeof ThreadMetadataSchema>;
39
+ export declare const AttachmentUploadDescriptorSchema: z.ZodObject<{
40
+ url: z.ZodString;
41
+ method: z.ZodEnum<{
42
+ POST: "POST";
43
+ PUT: "PUT";
44
+ }>;
45
+ headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
46
+ }, z.core.$strip>;
47
+ export type AttachmentUploadDescriptor = z.infer<typeof AttachmentUploadDescriptorSchema>;
48
+ export declare const FileAttachmentSchema: z.ZodObject<{
49
+ id: z.ZodString;
50
+ mime_type: z.ZodString;
51
+ name: z.ZodString;
52
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
53
+ upload_descriptor: z.ZodOptional<z.ZodNullable<z.ZodObject<{
54
+ url: z.ZodString;
55
+ method: z.ZodEnum<{
56
+ POST: "POST";
57
+ PUT: "PUT";
58
+ }>;
59
+ headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
60
+ }, z.core.$strip>>>;
61
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
+ type: z.ZodLiteral<"file">;
63
+ }, z.core.$strip>;
64
+ export type FileAttachment = z.infer<typeof FileAttachmentSchema>;
65
+ export declare const ImageAttachmentSchema: z.ZodObject<{
66
+ id: z.ZodString;
67
+ mime_type: z.ZodString;
68
+ name: z.ZodString;
69
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
70
+ upload_descriptor: z.ZodOptional<z.ZodNullable<z.ZodObject<{
71
+ url: z.ZodString;
72
+ method: z.ZodEnum<{
73
+ POST: "POST";
74
+ PUT: "PUT";
75
+ }>;
76
+ headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
77
+ }, z.core.$strip>>>;
78
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
79
+ type: z.ZodLiteral<"image">;
80
+ preview_url: z.ZodString;
81
+ }, z.core.$strip>;
82
+ export type ImageAttachment = z.infer<typeof ImageAttachmentSchema>;
83
+ export declare const AttachmentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
84
+ id: z.ZodString;
85
+ mime_type: z.ZodString;
86
+ name: z.ZodString;
87
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
88
+ upload_descriptor: z.ZodOptional<z.ZodNullable<z.ZodObject<{
89
+ url: z.ZodString;
90
+ method: z.ZodEnum<{
91
+ POST: "POST";
92
+ PUT: "PUT";
93
+ }>;
94
+ headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
95
+ }, z.core.$strip>>>;
96
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
97
+ type: z.ZodLiteral<"file">;
98
+ }, z.core.$strip>, z.ZodObject<{
99
+ id: z.ZodString;
100
+ mime_type: z.ZodString;
101
+ name: z.ZodString;
102
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
103
+ upload_descriptor: z.ZodOptional<z.ZodNullable<z.ZodObject<{
104
+ url: z.ZodString;
105
+ method: z.ZodEnum<{
106
+ POST: "POST";
107
+ PUT: "PUT";
108
+ }>;
109
+ headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
110
+ }, z.core.$strip>>>;
111
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
112
+ type: z.ZodLiteral<"image">;
113
+ preview_url: z.ZodString;
114
+ }, z.core.$strip>], "type">;
115
+ export type Attachment = z.infer<typeof AttachmentSchema>;
116
+ export declare const SourceBaseSchema: z.ZodObject<{
117
+ title: z.ZodString;
118
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
119
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
120
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
121
+ }, z.core.$strip>;
122
+ export declare const FileSourceSchema: z.ZodObject<{
123
+ title: z.ZodString;
124
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
125
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
126
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
127
+ type: z.ZodLiteral<"file">;
128
+ filename: z.ZodString;
129
+ }, z.core.$strip>;
130
+ export declare const UrlSourceSchema: z.ZodObject<{
131
+ title: z.ZodString;
132
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
133
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
134
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
135
+ type: z.ZodLiteral<"url">;
136
+ url: z.ZodString;
137
+ attribution: z.ZodOptional<z.ZodNullable<z.ZodString>>;
138
+ }, z.core.$strip>;
139
+ export declare const EntitySourceSchema: z.ZodObject<{
140
+ title: z.ZodString;
141
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
142
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
143
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
144
+ type: z.ZodLiteral<"entity">;
145
+ id: z.ZodString;
146
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
147
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
148
+ inline_label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
149
+ interactive: z.ZodDefault<z.ZodBoolean>;
150
+ data: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
151
+ preview: z.ZodOptional<z.ZodNullable<z.ZodLiteral<"lazy">>>;
152
+ }, z.core.$strip>;
153
+ export declare const SourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
154
+ title: z.ZodString;
155
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
156
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
157
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
158
+ type: z.ZodLiteral<"file">;
159
+ filename: z.ZodString;
160
+ }, z.core.$strip>, z.ZodObject<{
161
+ title: z.ZodString;
162
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
163
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
164
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
165
+ type: z.ZodLiteral<"url">;
166
+ url: z.ZodString;
167
+ attribution: z.ZodOptional<z.ZodNullable<z.ZodString>>;
168
+ }, z.core.$strip>, z.ZodObject<{
169
+ title: z.ZodString;
170
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
171
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
172
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
173
+ type: z.ZodLiteral<"entity">;
174
+ id: z.ZodString;
175
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
176
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
177
+ inline_label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
178
+ interactive: z.ZodDefault<z.ZodBoolean>;
179
+ data: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
180
+ preview: z.ZodOptional<z.ZodNullable<z.ZodLiteral<"lazy">>>;
181
+ }, z.core.$strip>], "type">;
182
+ export type Source = z.infer<typeof SourceSchema>;
183
+ export declare const AnnotationSchema: z.ZodObject<{
184
+ type: z.ZodDefault<z.ZodLiteral<"annotation">>;
185
+ source: z.ZodDiscriminatedUnion<[z.ZodObject<{
186
+ title: z.ZodString;
187
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
188
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
189
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
190
+ type: z.ZodLiteral<"file">;
191
+ filename: z.ZodString;
192
+ }, z.core.$strip>, z.ZodObject<{
193
+ title: z.ZodString;
194
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
195
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
196
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
197
+ type: z.ZodLiteral<"url">;
198
+ url: z.ZodString;
199
+ attribution: z.ZodOptional<z.ZodNullable<z.ZodString>>;
200
+ }, z.core.$strip>, z.ZodObject<{
201
+ title: z.ZodString;
202
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
203
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
204
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
205
+ type: z.ZodLiteral<"entity">;
206
+ id: z.ZodString;
207
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
208
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
209
+ inline_label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
210
+ interactive: z.ZodDefault<z.ZodBoolean>;
211
+ data: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
212
+ preview: z.ZodOptional<z.ZodNullable<z.ZodLiteral<"lazy">>>;
213
+ }, z.core.$strip>], "type">;
214
+ index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
215
+ }, z.core.$strip>;
216
+ export type Annotation = z.infer<typeof AnnotationSchema>;
217
+ export declare const AssistantMessageContentSchema: z.ZodObject<{
218
+ type: z.ZodDefault<z.ZodLiteral<"output_text">>;
219
+ text: z.ZodString;
220
+ annotations: z.ZodDefault<z.ZodArray<z.ZodObject<{
221
+ type: z.ZodDefault<z.ZodLiteral<"annotation">>;
222
+ source: z.ZodDiscriminatedUnion<[z.ZodObject<{
223
+ title: z.ZodString;
224
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
225
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
226
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
227
+ type: z.ZodLiteral<"file">;
228
+ filename: z.ZodString;
229
+ }, z.core.$strip>, z.ZodObject<{
230
+ title: z.ZodString;
231
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
232
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
233
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
234
+ type: z.ZodLiteral<"url">;
235
+ url: z.ZodString;
236
+ attribution: z.ZodOptional<z.ZodNullable<z.ZodString>>;
237
+ }, z.core.$strip>, z.ZodObject<{
238
+ title: z.ZodString;
239
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
240
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
241
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
242
+ type: z.ZodLiteral<"entity">;
243
+ id: z.ZodString;
244
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
245
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
246
+ inline_label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
247
+ interactive: z.ZodDefault<z.ZodBoolean>;
248
+ data: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
249
+ preview: z.ZodOptional<z.ZodNullable<z.ZodLiteral<"lazy">>>;
250
+ }, z.core.$strip>], "type">;
251
+ index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
252
+ }, z.core.$strip>>>;
253
+ }, z.core.$strip>;
254
+ export type AssistantMessageContent = z.infer<typeof AssistantMessageContentSchema>;
255
+ export declare const UserMessageTextContentSchema: z.ZodObject<{
256
+ type: z.ZodLiteral<"input_text">;
257
+ text: z.ZodString;
258
+ }, z.core.$strip>;
259
+ export declare const UserMessageTagContentSchema: z.ZodObject<{
260
+ type: z.ZodLiteral<"input_tag">;
261
+ id: z.ZodString;
262
+ text: z.ZodString;
263
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
264
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
265
+ interactive: z.ZodDefault<z.ZodBoolean>;
266
+ }, z.core.$strip>;
267
+ export declare const UserMessageContentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
268
+ type: z.ZodLiteral<"input_text">;
269
+ text: z.ZodString;
270
+ }, z.core.$strip>, z.ZodObject<{
271
+ type: z.ZodLiteral<"input_tag">;
272
+ id: z.ZodString;
273
+ text: z.ZodString;
274
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
275
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
276
+ interactive: z.ZodDefault<z.ZodBoolean>;
277
+ }, z.core.$strip>], "type">;
278
+ export type UserMessageContent = z.infer<typeof UserMessageContentSchema>;
279
+ export declare const ToolChoiceSchema: z.ZodObject<{
280
+ id: z.ZodString;
281
+ }, z.core.$strip>;
282
+ export type ToolChoice = z.infer<typeof ToolChoiceSchema>;
283
+ export declare const InferenceOptionsSchema: z.ZodObject<{
284
+ tool_choice: z.ZodOptional<z.ZodNullable<z.ZodObject<{
285
+ id: z.ZodString;
286
+ }, z.core.$strip>>>;
287
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
288
+ }, z.core.$catchall<z.ZodUnknown>>;
289
+ export type InferenceOptions = z.infer<typeof InferenceOptionsSchema>;
290
+ export declare const CustomTaskSchema: z.ZodObject<{
291
+ status_indicator: z.ZodDefault<z.ZodEnum<{
292
+ none: "none";
293
+ loading: "loading";
294
+ complete: "complete";
295
+ }>>;
296
+ type: z.ZodLiteral<"custom">;
297
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
298
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
299
+ content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
300
+ }, z.core.$strip>;
301
+ export declare const SearchTaskSchema: z.ZodObject<{
302
+ status_indicator: z.ZodDefault<z.ZodEnum<{
303
+ none: "none";
304
+ loading: "loading";
305
+ complete: "complete";
306
+ }>>;
307
+ type: z.ZodLiteral<"web_search">;
308
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
309
+ title_query: z.ZodOptional<z.ZodNullable<z.ZodString>>;
310
+ queries: z.ZodDefault<z.ZodArray<z.ZodString>>;
311
+ sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
312
+ title: z.ZodString;
313
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
314
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
315
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
316
+ type: z.ZodLiteral<"url">;
317
+ url: z.ZodString;
318
+ attribution: z.ZodOptional<z.ZodNullable<z.ZodString>>;
319
+ }, z.core.$strip>>>;
320
+ }, z.core.$strip>;
321
+ export declare const ThoughtTaskSchema: z.ZodObject<{
322
+ status_indicator: z.ZodDefault<z.ZodEnum<{
323
+ none: "none";
324
+ loading: "loading";
325
+ complete: "complete";
326
+ }>>;
327
+ type: z.ZodLiteral<"thought">;
328
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
329
+ content: z.ZodString;
330
+ }, z.core.$strip>;
331
+ export declare const FileTaskSchema: z.ZodObject<{
332
+ status_indicator: z.ZodDefault<z.ZodEnum<{
333
+ none: "none";
334
+ loading: "loading";
335
+ complete: "complete";
336
+ }>>;
337
+ type: z.ZodLiteral<"file">;
338
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
339
+ sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
340
+ title: z.ZodString;
341
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
342
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
343
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
344
+ type: z.ZodLiteral<"file">;
345
+ filename: z.ZodString;
346
+ }, z.core.$strip>>>;
347
+ }, z.core.$strip>;
348
+ export declare const ImageTaskSchema: z.ZodObject<{
349
+ status_indicator: z.ZodDefault<z.ZodEnum<{
350
+ none: "none";
351
+ loading: "loading";
352
+ complete: "complete";
353
+ }>>;
354
+ type: z.ZodLiteral<"image">;
355
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
356
+ }, z.core.$strip>;
357
+ export declare const TaskSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
358
+ status_indicator: z.ZodDefault<z.ZodEnum<{
359
+ none: "none";
360
+ loading: "loading";
361
+ complete: "complete";
362
+ }>>;
363
+ type: z.ZodLiteral<"custom">;
364
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
365
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
366
+ content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
367
+ }, z.core.$strip>, z.ZodObject<{
368
+ status_indicator: z.ZodDefault<z.ZodEnum<{
369
+ none: "none";
370
+ loading: "loading";
371
+ complete: "complete";
372
+ }>>;
373
+ type: z.ZodLiteral<"web_search">;
374
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
375
+ title_query: z.ZodOptional<z.ZodNullable<z.ZodString>>;
376
+ queries: z.ZodDefault<z.ZodArray<z.ZodString>>;
377
+ sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
378
+ title: z.ZodString;
379
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
380
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
381
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
382
+ type: z.ZodLiteral<"url">;
383
+ url: z.ZodString;
384
+ attribution: z.ZodOptional<z.ZodNullable<z.ZodString>>;
385
+ }, z.core.$strip>>>;
386
+ }, z.core.$strip>, z.ZodObject<{
387
+ status_indicator: z.ZodDefault<z.ZodEnum<{
388
+ none: "none";
389
+ loading: "loading";
390
+ complete: "complete";
391
+ }>>;
392
+ type: z.ZodLiteral<"thought">;
393
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
394
+ content: z.ZodString;
395
+ }, z.core.$strip>, z.ZodObject<{
396
+ status_indicator: z.ZodDefault<z.ZodEnum<{
397
+ none: "none";
398
+ loading: "loading";
399
+ complete: "complete";
400
+ }>>;
401
+ type: z.ZodLiteral<"file">;
402
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
403
+ sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
404
+ title: z.ZodString;
405
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
406
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
407
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
408
+ type: z.ZodLiteral<"file">;
409
+ filename: z.ZodString;
410
+ }, z.core.$strip>>>;
411
+ }, z.core.$strip>, z.ZodObject<{
412
+ status_indicator: z.ZodDefault<z.ZodEnum<{
413
+ none: "none";
414
+ loading: "loading";
415
+ complete: "complete";
416
+ }>>;
417
+ type: z.ZodLiteral<"image">;
418
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
419
+ }, z.core.$strip>], "type">;
420
+ export type Task = z.infer<typeof TaskSchema>;
421
+ export declare const WorkflowSummarySchema: z.ZodUnion<readonly [z.ZodObject<{
422
+ title: z.ZodString;
423
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
424
+ }, z.core.$strip>, z.ZodObject<{
425
+ duration: z.ZodNumber;
426
+ }, z.core.$strip>]>;
427
+ export type WorkflowSummary = z.infer<typeof WorkflowSummarySchema>;
428
+ export declare const WorkflowSchema: z.ZodObject<{
429
+ type: z.ZodEnum<{
430
+ custom: "custom";
431
+ reasoning: "reasoning";
432
+ }>;
433
+ tasks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
434
+ status_indicator: z.ZodDefault<z.ZodEnum<{
435
+ none: "none";
436
+ loading: "loading";
437
+ complete: "complete";
438
+ }>>;
439
+ type: z.ZodLiteral<"custom">;
440
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
441
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
442
+ content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
443
+ }, z.core.$strip>, z.ZodObject<{
444
+ status_indicator: z.ZodDefault<z.ZodEnum<{
445
+ none: "none";
446
+ loading: "loading";
447
+ complete: "complete";
448
+ }>>;
449
+ type: z.ZodLiteral<"web_search">;
450
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
451
+ title_query: z.ZodOptional<z.ZodNullable<z.ZodString>>;
452
+ queries: z.ZodDefault<z.ZodArray<z.ZodString>>;
453
+ sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
454
+ title: z.ZodString;
455
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
456
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
457
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
458
+ type: z.ZodLiteral<"url">;
459
+ url: z.ZodString;
460
+ attribution: z.ZodOptional<z.ZodNullable<z.ZodString>>;
461
+ }, z.core.$strip>>>;
462
+ }, z.core.$strip>, z.ZodObject<{
463
+ status_indicator: z.ZodDefault<z.ZodEnum<{
464
+ none: "none";
465
+ loading: "loading";
466
+ complete: "complete";
467
+ }>>;
468
+ type: z.ZodLiteral<"thought">;
469
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
470
+ content: z.ZodString;
471
+ }, z.core.$strip>, z.ZodObject<{
472
+ status_indicator: z.ZodDefault<z.ZodEnum<{
473
+ none: "none";
474
+ loading: "loading";
475
+ complete: "complete";
476
+ }>>;
477
+ type: z.ZodLiteral<"file">;
478
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
479
+ sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
480
+ title: z.ZodString;
481
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
482
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
483
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
484
+ type: z.ZodLiteral<"file">;
485
+ filename: z.ZodString;
486
+ }, z.core.$strip>>>;
487
+ }, z.core.$strip>, z.ZodObject<{
488
+ status_indicator: z.ZodDefault<z.ZodEnum<{
489
+ none: "none";
490
+ loading: "loading";
491
+ complete: "complete";
492
+ }>>;
493
+ type: z.ZodLiteral<"image">;
494
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
495
+ }, z.core.$strip>], "type">>;
496
+ summary: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
497
+ title: z.ZodString;
498
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
499
+ }, z.core.$strip>, z.ZodObject<{
500
+ duration: z.ZodNumber;
501
+ }, z.core.$strip>]>>>;
502
+ expanded: z.ZodDefault<z.ZodBoolean>;
503
+ }, z.core.$strip>;
504
+ export type Workflow = z.infer<typeof WorkflowSchema>;
505
+ export declare const GeneratedImageSchema: z.ZodObject<{
506
+ id: z.ZodString;
507
+ url: z.ZodString;
508
+ }, z.core.$strip>;
509
+ export type GeneratedImage = z.infer<typeof GeneratedImageSchema>;
510
+ export declare const StructuredInputAnswerSchema: z.ZodObject<{
511
+ values: z.ZodDefault<z.ZodArray<z.ZodString>>;
512
+ skipped: z.ZodDefault<z.ZodBoolean>;
513
+ }, z.core.$strip>;
514
+ export type StructuredInputAnswer = z.infer<typeof StructuredInputAnswerSchema>;
515
+ export declare const StructuredInputMultipleChoiceSchema: z.ZodObject<{
516
+ id: z.ZodString;
517
+ question: z.ZodString;
518
+ answer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
519
+ values: z.ZodDefault<z.ZodArray<z.ZodString>>;
520
+ skipped: z.ZodDefault<z.ZodBoolean>;
521
+ }, z.core.$strip>>>;
522
+ type: z.ZodLiteral<"multiple_choice">;
523
+ options: z.ZodArray<z.ZodObject<{
524
+ value: z.ZodString;
525
+ }, z.core.$strip>>;
526
+ multiple: z.ZodDefault<z.ZodBoolean>;
527
+ }, z.core.$strip>;
528
+ export declare const StructuredInputFreeformSchema: z.ZodObject<{
529
+ id: z.ZodString;
530
+ question: z.ZodString;
531
+ answer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
532
+ values: z.ZodDefault<z.ZodArray<z.ZodString>>;
533
+ skipped: z.ZodDefault<z.ZodBoolean>;
534
+ }, z.core.$strip>>>;
535
+ type: z.ZodLiteral<"freeform">;
536
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
537
+ }, z.core.$strip>;
538
+ export declare const StructuredInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
539
+ id: z.ZodString;
540
+ question: z.ZodString;
541
+ answer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
542
+ values: z.ZodDefault<z.ZodArray<z.ZodString>>;
543
+ skipped: z.ZodDefault<z.ZodBoolean>;
544
+ }, z.core.$strip>>>;
545
+ type: z.ZodLiteral<"multiple_choice">;
546
+ options: z.ZodArray<z.ZodObject<{
547
+ value: z.ZodString;
548
+ }, z.core.$strip>>;
549
+ multiple: z.ZodDefault<z.ZodBoolean>;
550
+ }, z.core.$strip>, z.ZodObject<{
551
+ id: z.ZodString;
552
+ question: z.ZodString;
553
+ answer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
554
+ values: z.ZodDefault<z.ZodArray<z.ZodString>>;
555
+ skipped: z.ZodDefault<z.ZodBoolean>;
556
+ }, z.core.$strip>>>;
557
+ type: z.ZodLiteral<"freeform">;
558
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
559
+ }, z.core.$strip>], "type">;
560
+ export type StructuredInput = z.infer<typeof StructuredInputSchema>;
561
+ export declare const ThreadItemBaseSchema: z.ZodObject<{
562
+ id: z.ZodString;
563
+ thread_id: z.ZodString;
564
+ created_at: z.ZodString;
565
+ }, z.core.$strip>;
566
+ export declare const UserMessageItemSchema: z.ZodObject<{
567
+ id: z.ZodString;
568
+ thread_id: z.ZodString;
569
+ created_at: z.ZodString;
570
+ type: z.ZodLiteral<"user_message">;
571
+ content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
572
+ type: z.ZodLiteral<"input_text">;
573
+ text: z.ZodString;
574
+ }, z.core.$strip>, z.ZodObject<{
575
+ type: z.ZodLiteral<"input_tag">;
576
+ id: z.ZodString;
577
+ text: z.ZodString;
578
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
579
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
580
+ interactive: z.ZodDefault<z.ZodBoolean>;
581
+ }, z.core.$strip>], "type">>;
582
+ attachments: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
583
+ id: z.ZodString;
584
+ mime_type: z.ZodString;
585
+ name: z.ZodString;
586
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
587
+ upload_descriptor: z.ZodOptional<z.ZodNullable<z.ZodObject<{
588
+ url: z.ZodString;
589
+ method: z.ZodEnum<{
590
+ POST: "POST";
591
+ PUT: "PUT";
592
+ }>;
593
+ headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
594
+ }, z.core.$strip>>>;
595
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
596
+ type: z.ZodLiteral<"file">;
597
+ }, z.core.$strip>, z.ZodObject<{
598
+ id: z.ZodString;
599
+ mime_type: z.ZodString;
600
+ name: z.ZodString;
601
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
602
+ upload_descriptor: z.ZodOptional<z.ZodNullable<z.ZodObject<{
603
+ url: z.ZodString;
604
+ method: z.ZodEnum<{
605
+ POST: "POST";
606
+ PUT: "PUT";
607
+ }>;
608
+ headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
609
+ }, z.core.$strip>>>;
610
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
611
+ type: z.ZodLiteral<"image">;
612
+ preview_url: z.ZodString;
613
+ }, z.core.$strip>], "type">>>;
614
+ quoted_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
615
+ inference_options: z.ZodDefault<z.ZodObject<{
616
+ tool_choice: z.ZodOptional<z.ZodNullable<z.ZodObject<{
617
+ id: z.ZodString;
618
+ }, z.core.$strip>>>;
619
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
620
+ }, z.core.$catchall<z.ZodUnknown>>>;
621
+ }, z.core.$strip>;
622
+ export declare const AssistantMessageItemSchema: z.ZodObject<{
623
+ id: z.ZodString;
624
+ thread_id: z.ZodString;
625
+ created_at: z.ZodString;
626
+ type: z.ZodLiteral<"assistant_message">;
627
+ content: z.ZodArray<z.ZodObject<{
628
+ type: z.ZodDefault<z.ZodLiteral<"output_text">>;
629
+ text: z.ZodString;
630
+ annotations: z.ZodDefault<z.ZodArray<z.ZodObject<{
631
+ type: z.ZodDefault<z.ZodLiteral<"annotation">>;
632
+ source: z.ZodDiscriminatedUnion<[z.ZodObject<{
633
+ title: z.ZodString;
634
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
635
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
636
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
637
+ type: z.ZodLiteral<"file">;
638
+ filename: z.ZodString;
639
+ }, z.core.$strip>, z.ZodObject<{
640
+ title: z.ZodString;
641
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
642
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
643
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
644
+ type: z.ZodLiteral<"url">;
645
+ url: z.ZodString;
646
+ attribution: z.ZodOptional<z.ZodNullable<z.ZodString>>;
647
+ }, z.core.$strip>, z.ZodObject<{
648
+ title: z.ZodString;
649
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
650
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
651
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
652
+ type: z.ZodLiteral<"entity">;
653
+ id: z.ZodString;
654
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
655
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
656
+ inline_label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
657
+ interactive: z.ZodDefault<z.ZodBoolean>;
658
+ data: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
659
+ preview: z.ZodOptional<z.ZodNullable<z.ZodLiteral<"lazy">>>;
660
+ }, z.core.$strip>], "type">;
661
+ index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
662
+ }, z.core.$strip>>>;
663
+ }, z.core.$strip>>;
664
+ }, z.core.$strip>;
665
+ export declare const ClientToolCallItemSchema: z.ZodObject<{
666
+ id: z.ZodString;
667
+ thread_id: z.ZodString;
668
+ created_at: z.ZodString;
669
+ type: z.ZodLiteral<"client_tool_call">;
670
+ status: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"pending">, z.ZodLiteral<"completed">]>>;
671
+ call_id: z.ZodString;
672
+ name: z.ZodString;
673
+ arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
674
+ output: z.ZodOptional<z.ZodUnknown>;
675
+ }, z.core.$strip>;
676
+ export declare const WidgetItemSchema: z.ZodObject<{
677
+ id: z.ZodString;
678
+ thread_id: z.ZodString;
679
+ created_at: z.ZodString;
680
+ type: z.ZodLiteral<"widget">;
681
+ widget: z.ZodRecord<z.ZodString, z.ZodUnknown>;
682
+ copy_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
683
+ }, z.core.$strip>;
684
+ export declare const GeneratedImageItemSchema: z.ZodObject<{
685
+ id: z.ZodString;
686
+ thread_id: z.ZodString;
687
+ created_at: z.ZodString;
688
+ type: z.ZodLiteral<"generated_image">;
689
+ image: z.ZodOptional<z.ZodNullable<z.ZodObject<{
690
+ id: z.ZodString;
691
+ url: z.ZodString;
692
+ }, z.core.$strip>>>;
693
+ }, z.core.$strip>;
694
+ export declare const StructuredInputItemSchema: z.ZodObject<{
695
+ id: z.ZodString;
696
+ thread_id: z.ZodString;
697
+ created_at: z.ZodString;
698
+ type: z.ZodLiteral<"structured_input">;
699
+ status: z.ZodDefault<z.ZodEnum<{
700
+ skipped: "skipped";
701
+ pending: "pending";
702
+ answered: "answered";
703
+ }>>;
704
+ inputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
705
+ id: z.ZodString;
706
+ question: z.ZodString;
707
+ answer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
708
+ values: z.ZodDefault<z.ZodArray<z.ZodString>>;
709
+ skipped: z.ZodDefault<z.ZodBoolean>;
710
+ }, z.core.$strip>>>;
711
+ type: z.ZodLiteral<"multiple_choice">;
712
+ options: z.ZodArray<z.ZodObject<{
713
+ value: z.ZodString;
714
+ }, z.core.$strip>>;
715
+ multiple: z.ZodDefault<z.ZodBoolean>;
716
+ }, z.core.$strip>, z.ZodObject<{
717
+ id: z.ZodString;
718
+ question: z.ZodString;
719
+ answer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
720
+ values: z.ZodDefault<z.ZodArray<z.ZodString>>;
721
+ skipped: z.ZodDefault<z.ZodBoolean>;
722
+ }, z.core.$strip>>>;
723
+ type: z.ZodLiteral<"freeform">;
724
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
725
+ }, z.core.$strip>], "type">>;
726
+ }, z.core.$strip>;
727
+ export declare const TaskItemSchema: z.ZodObject<{
728
+ id: z.ZodString;
729
+ thread_id: z.ZodString;
730
+ created_at: z.ZodString;
731
+ type: z.ZodLiteral<"task">;
732
+ task: z.ZodDiscriminatedUnion<[z.ZodObject<{
733
+ status_indicator: z.ZodDefault<z.ZodEnum<{
734
+ none: "none";
735
+ loading: "loading";
736
+ complete: "complete";
737
+ }>>;
738
+ type: z.ZodLiteral<"custom">;
739
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
740
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
741
+ content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
742
+ }, z.core.$strip>, z.ZodObject<{
743
+ status_indicator: z.ZodDefault<z.ZodEnum<{
744
+ none: "none";
745
+ loading: "loading";
746
+ complete: "complete";
747
+ }>>;
748
+ type: z.ZodLiteral<"web_search">;
749
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
750
+ title_query: z.ZodOptional<z.ZodNullable<z.ZodString>>;
751
+ queries: z.ZodDefault<z.ZodArray<z.ZodString>>;
752
+ sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
753
+ title: z.ZodString;
754
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
755
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
756
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
757
+ type: z.ZodLiteral<"url">;
758
+ url: z.ZodString;
759
+ attribution: z.ZodOptional<z.ZodNullable<z.ZodString>>;
760
+ }, z.core.$strip>>>;
761
+ }, z.core.$strip>, z.ZodObject<{
762
+ status_indicator: z.ZodDefault<z.ZodEnum<{
763
+ none: "none";
764
+ loading: "loading";
765
+ complete: "complete";
766
+ }>>;
767
+ type: z.ZodLiteral<"thought">;
768
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
769
+ content: z.ZodString;
770
+ }, z.core.$strip>, z.ZodObject<{
771
+ status_indicator: z.ZodDefault<z.ZodEnum<{
772
+ none: "none";
773
+ loading: "loading";
774
+ complete: "complete";
775
+ }>>;
776
+ type: z.ZodLiteral<"file">;
777
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
778
+ sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
779
+ title: z.ZodString;
780
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
781
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
782
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
783
+ type: z.ZodLiteral<"file">;
784
+ filename: z.ZodString;
785
+ }, z.core.$strip>>>;
786
+ }, z.core.$strip>, z.ZodObject<{
787
+ status_indicator: z.ZodDefault<z.ZodEnum<{
788
+ none: "none";
789
+ loading: "loading";
790
+ complete: "complete";
791
+ }>>;
792
+ type: z.ZodLiteral<"image">;
793
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
794
+ }, z.core.$strip>], "type">;
795
+ }, z.core.$strip>;
796
+ export declare const WorkflowItemSchema: z.ZodObject<{
797
+ id: z.ZodString;
798
+ thread_id: z.ZodString;
799
+ created_at: z.ZodString;
800
+ type: z.ZodLiteral<"workflow">;
801
+ workflow: z.ZodObject<{
802
+ type: z.ZodEnum<{
803
+ custom: "custom";
804
+ reasoning: "reasoning";
805
+ }>;
806
+ tasks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
807
+ status_indicator: z.ZodDefault<z.ZodEnum<{
808
+ none: "none";
809
+ loading: "loading";
810
+ complete: "complete";
811
+ }>>;
812
+ type: z.ZodLiteral<"custom">;
813
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
814
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
815
+ content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
816
+ }, z.core.$strip>, z.ZodObject<{
817
+ status_indicator: z.ZodDefault<z.ZodEnum<{
818
+ none: "none";
819
+ loading: "loading";
820
+ complete: "complete";
821
+ }>>;
822
+ type: z.ZodLiteral<"web_search">;
823
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
824
+ title_query: z.ZodOptional<z.ZodNullable<z.ZodString>>;
825
+ queries: z.ZodDefault<z.ZodArray<z.ZodString>>;
826
+ sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
827
+ title: z.ZodString;
828
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
829
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
830
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
831
+ type: z.ZodLiteral<"url">;
832
+ url: z.ZodString;
833
+ attribution: z.ZodOptional<z.ZodNullable<z.ZodString>>;
834
+ }, z.core.$strip>>>;
835
+ }, z.core.$strip>, z.ZodObject<{
836
+ status_indicator: z.ZodDefault<z.ZodEnum<{
837
+ none: "none";
838
+ loading: "loading";
839
+ complete: "complete";
840
+ }>>;
841
+ type: z.ZodLiteral<"thought">;
842
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
843
+ content: z.ZodString;
844
+ }, z.core.$strip>, z.ZodObject<{
845
+ status_indicator: z.ZodDefault<z.ZodEnum<{
846
+ none: "none";
847
+ loading: "loading";
848
+ complete: "complete";
849
+ }>>;
850
+ type: z.ZodLiteral<"file">;
851
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
852
+ sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
853
+ title: z.ZodString;
854
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
855
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
856
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
857
+ type: z.ZodLiteral<"file">;
858
+ filename: z.ZodString;
859
+ }, z.core.$strip>>>;
860
+ }, z.core.$strip>, z.ZodObject<{
861
+ status_indicator: z.ZodDefault<z.ZodEnum<{
862
+ none: "none";
863
+ loading: "loading";
864
+ complete: "complete";
865
+ }>>;
866
+ type: z.ZodLiteral<"image">;
867
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
868
+ }, z.core.$strip>], "type">>;
869
+ summary: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
870
+ title: z.ZodString;
871
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
872
+ }, z.core.$strip>, z.ZodObject<{
873
+ duration: z.ZodNumber;
874
+ }, z.core.$strip>]>>>;
875
+ expanded: z.ZodDefault<z.ZodBoolean>;
876
+ }, z.core.$strip>;
877
+ }, z.core.$strip>;
878
+ export declare const HiddenContextItemSchema: z.ZodObject<{
879
+ id: z.ZodString;
880
+ thread_id: z.ZodString;
881
+ created_at: z.ZodString;
882
+ type: z.ZodLiteral<"hidden_context_item">;
883
+ content: z.ZodUnknown;
884
+ }, z.core.$strip>;
885
+ export declare const SDKHiddenContextItemSchema: z.ZodObject<{
886
+ id: z.ZodString;
887
+ thread_id: z.ZodString;
888
+ created_at: z.ZodString;
889
+ type: z.ZodLiteral<"sdk_hidden_context">;
890
+ content: z.ZodString;
891
+ }, z.core.$strip>;
892
+ export declare const EndOfTurnItemSchema: z.ZodObject<{
893
+ id: z.ZodString;
894
+ thread_id: z.ZodString;
895
+ created_at: z.ZodString;
896
+ type: z.ZodLiteral<"end_of_turn">;
897
+ }, z.core.$strip>;
898
+ export declare const ThreadItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
899
+ id: z.ZodString;
900
+ thread_id: z.ZodString;
901
+ created_at: z.ZodString;
902
+ type: z.ZodLiteral<"user_message">;
903
+ content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
904
+ type: z.ZodLiteral<"input_text">;
905
+ text: z.ZodString;
906
+ }, z.core.$strip>, z.ZodObject<{
907
+ type: z.ZodLiteral<"input_tag">;
908
+ id: z.ZodString;
909
+ text: z.ZodString;
910
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
911
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
912
+ interactive: z.ZodDefault<z.ZodBoolean>;
913
+ }, z.core.$strip>], "type">>;
914
+ attachments: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
915
+ id: z.ZodString;
916
+ mime_type: z.ZodString;
917
+ name: z.ZodString;
918
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
919
+ upload_descriptor: z.ZodOptional<z.ZodNullable<z.ZodObject<{
920
+ url: z.ZodString;
921
+ method: z.ZodEnum<{
922
+ POST: "POST";
923
+ PUT: "PUT";
924
+ }>;
925
+ headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
926
+ }, z.core.$strip>>>;
927
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
928
+ type: z.ZodLiteral<"file">;
929
+ }, z.core.$strip>, z.ZodObject<{
930
+ id: z.ZodString;
931
+ mime_type: z.ZodString;
932
+ name: z.ZodString;
933
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
934
+ upload_descriptor: z.ZodOptional<z.ZodNullable<z.ZodObject<{
935
+ url: z.ZodString;
936
+ method: z.ZodEnum<{
937
+ POST: "POST";
938
+ PUT: "PUT";
939
+ }>;
940
+ headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
941
+ }, z.core.$strip>>>;
942
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
943
+ type: z.ZodLiteral<"image">;
944
+ preview_url: z.ZodString;
945
+ }, z.core.$strip>], "type">>>;
946
+ quoted_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
947
+ inference_options: z.ZodDefault<z.ZodObject<{
948
+ tool_choice: z.ZodOptional<z.ZodNullable<z.ZodObject<{
949
+ id: z.ZodString;
950
+ }, z.core.$strip>>>;
951
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
952
+ }, z.core.$catchall<z.ZodUnknown>>>;
953
+ }, z.core.$strip>, z.ZodObject<{
954
+ id: z.ZodString;
955
+ thread_id: z.ZodString;
956
+ created_at: z.ZodString;
957
+ type: z.ZodLiteral<"assistant_message">;
958
+ content: z.ZodArray<z.ZodObject<{
959
+ type: z.ZodDefault<z.ZodLiteral<"output_text">>;
960
+ text: z.ZodString;
961
+ annotations: z.ZodDefault<z.ZodArray<z.ZodObject<{
962
+ type: z.ZodDefault<z.ZodLiteral<"annotation">>;
963
+ source: z.ZodDiscriminatedUnion<[z.ZodObject<{
964
+ title: z.ZodString;
965
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
966
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
967
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
968
+ type: z.ZodLiteral<"file">;
969
+ filename: z.ZodString;
970
+ }, z.core.$strip>, z.ZodObject<{
971
+ title: z.ZodString;
972
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
973
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
974
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
975
+ type: z.ZodLiteral<"url">;
976
+ url: z.ZodString;
977
+ attribution: z.ZodOptional<z.ZodNullable<z.ZodString>>;
978
+ }, z.core.$strip>, z.ZodObject<{
979
+ title: z.ZodString;
980
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
981
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
982
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
983
+ type: z.ZodLiteral<"entity">;
984
+ id: z.ZodString;
985
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
986
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
987
+ inline_label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
988
+ interactive: z.ZodDefault<z.ZodBoolean>;
989
+ data: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
990
+ preview: z.ZodOptional<z.ZodNullable<z.ZodLiteral<"lazy">>>;
991
+ }, z.core.$strip>], "type">;
992
+ index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
993
+ }, z.core.$strip>>>;
994
+ }, z.core.$strip>>;
995
+ }, z.core.$strip>, z.ZodObject<{
996
+ id: z.ZodString;
997
+ thread_id: z.ZodString;
998
+ created_at: z.ZodString;
999
+ type: z.ZodLiteral<"client_tool_call">;
1000
+ status: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"pending">, z.ZodLiteral<"completed">]>>;
1001
+ call_id: z.ZodString;
1002
+ name: z.ZodString;
1003
+ arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1004
+ output: z.ZodOptional<z.ZodUnknown>;
1005
+ }, z.core.$strip>, z.ZodObject<{
1006
+ id: z.ZodString;
1007
+ thread_id: z.ZodString;
1008
+ created_at: z.ZodString;
1009
+ type: z.ZodLiteral<"widget">;
1010
+ widget: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1011
+ copy_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1012
+ }, z.core.$strip>, z.ZodObject<{
1013
+ id: z.ZodString;
1014
+ thread_id: z.ZodString;
1015
+ created_at: z.ZodString;
1016
+ type: z.ZodLiteral<"generated_image">;
1017
+ image: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1018
+ id: z.ZodString;
1019
+ url: z.ZodString;
1020
+ }, z.core.$strip>>>;
1021
+ }, z.core.$strip>, z.ZodObject<{
1022
+ id: z.ZodString;
1023
+ thread_id: z.ZodString;
1024
+ created_at: z.ZodString;
1025
+ type: z.ZodLiteral<"structured_input">;
1026
+ status: z.ZodDefault<z.ZodEnum<{
1027
+ skipped: "skipped";
1028
+ pending: "pending";
1029
+ answered: "answered";
1030
+ }>>;
1031
+ inputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1032
+ id: z.ZodString;
1033
+ question: z.ZodString;
1034
+ answer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1035
+ values: z.ZodDefault<z.ZodArray<z.ZodString>>;
1036
+ skipped: z.ZodDefault<z.ZodBoolean>;
1037
+ }, z.core.$strip>>>;
1038
+ type: z.ZodLiteral<"multiple_choice">;
1039
+ options: z.ZodArray<z.ZodObject<{
1040
+ value: z.ZodString;
1041
+ }, z.core.$strip>>;
1042
+ multiple: z.ZodDefault<z.ZodBoolean>;
1043
+ }, z.core.$strip>, z.ZodObject<{
1044
+ id: z.ZodString;
1045
+ question: z.ZodString;
1046
+ answer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1047
+ values: z.ZodDefault<z.ZodArray<z.ZodString>>;
1048
+ skipped: z.ZodDefault<z.ZodBoolean>;
1049
+ }, z.core.$strip>>>;
1050
+ type: z.ZodLiteral<"freeform">;
1051
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1052
+ }, z.core.$strip>], "type">>;
1053
+ }, z.core.$strip>, z.ZodObject<{
1054
+ id: z.ZodString;
1055
+ thread_id: z.ZodString;
1056
+ created_at: z.ZodString;
1057
+ type: z.ZodLiteral<"task">;
1058
+ task: z.ZodDiscriminatedUnion<[z.ZodObject<{
1059
+ status_indicator: z.ZodDefault<z.ZodEnum<{
1060
+ none: "none";
1061
+ loading: "loading";
1062
+ complete: "complete";
1063
+ }>>;
1064
+ type: z.ZodLiteral<"custom">;
1065
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1066
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1067
+ content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1068
+ }, z.core.$strip>, z.ZodObject<{
1069
+ status_indicator: z.ZodDefault<z.ZodEnum<{
1070
+ none: "none";
1071
+ loading: "loading";
1072
+ complete: "complete";
1073
+ }>>;
1074
+ type: z.ZodLiteral<"web_search">;
1075
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1076
+ title_query: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1077
+ queries: z.ZodDefault<z.ZodArray<z.ZodString>>;
1078
+ sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
1079
+ title: z.ZodString;
1080
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1081
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1082
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1083
+ type: z.ZodLiteral<"url">;
1084
+ url: z.ZodString;
1085
+ attribution: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1086
+ }, z.core.$strip>>>;
1087
+ }, z.core.$strip>, z.ZodObject<{
1088
+ status_indicator: z.ZodDefault<z.ZodEnum<{
1089
+ none: "none";
1090
+ loading: "loading";
1091
+ complete: "complete";
1092
+ }>>;
1093
+ type: z.ZodLiteral<"thought">;
1094
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1095
+ content: z.ZodString;
1096
+ }, z.core.$strip>, z.ZodObject<{
1097
+ status_indicator: z.ZodDefault<z.ZodEnum<{
1098
+ none: "none";
1099
+ loading: "loading";
1100
+ complete: "complete";
1101
+ }>>;
1102
+ type: z.ZodLiteral<"file">;
1103
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1104
+ sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
1105
+ title: z.ZodString;
1106
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1107
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1108
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1109
+ type: z.ZodLiteral<"file">;
1110
+ filename: z.ZodString;
1111
+ }, z.core.$strip>>>;
1112
+ }, z.core.$strip>, z.ZodObject<{
1113
+ status_indicator: z.ZodDefault<z.ZodEnum<{
1114
+ none: "none";
1115
+ loading: "loading";
1116
+ complete: "complete";
1117
+ }>>;
1118
+ type: z.ZodLiteral<"image">;
1119
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1120
+ }, z.core.$strip>], "type">;
1121
+ }, z.core.$strip>, z.ZodObject<{
1122
+ id: z.ZodString;
1123
+ thread_id: z.ZodString;
1124
+ created_at: z.ZodString;
1125
+ type: z.ZodLiteral<"workflow">;
1126
+ workflow: z.ZodObject<{
1127
+ type: z.ZodEnum<{
1128
+ custom: "custom";
1129
+ reasoning: "reasoning";
1130
+ }>;
1131
+ tasks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1132
+ status_indicator: z.ZodDefault<z.ZodEnum<{
1133
+ none: "none";
1134
+ loading: "loading";
1135
+ complete: "complete";
1136
+ }>>;
1137
+ type: z.ZodLiteral<"custom">;
1138
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1139
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1140
+ content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1141
+ }, z.core.$strip>, z.ZodObject<{
1142
+ status_indicator: z.ZodDefault<z.ZodEnum<{
1143
+ none: "none";
1144
+ loading: "loading";
1145
+ complete: "complete";
1146
+ }>>;
1147
+ type: z.ZodLiteral<"web_search">;
1148
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1149
+ title_query: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1150
+ queries: z.ZodDefault<z.ZodArray<z.ZodString>>;
1151
+ sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
1152
+ title: z.ZodString;
1153
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1154
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1155
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1156
+ type: z.ZodLiteral<"url">;
1157
+ url: z.ZodString;
1158
+ attribution: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1159
+ }, z.core.$strip>>>;
1160
+ }, z.core.$strip>, z.ZodObject<{
1161
+ status_indicator: z.ZodDefault<z.ZodEnum<{
1162
+ none: "none";
1163
+ loading: "loading";
1164
+ complete: "complete";
1165
+ }>>;
1166
+ type: z.ZodLiteral<"thought">;
1167
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1168
+ content: z.ZodString;
1169
+ }, z.core.$strip>, z.ZodObject<{
1170
+ status_indicator: z.ZodDefault<z.ZodEnum<{
1171
+ none: "none";
1172
+ loading: "loading";
1173
+ complete: "complete";
1174
+ }>>;
1175
+ type: z.ZodLiteral<"file">;
1176
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1177
+ sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
1178
+ title: z.ZodString;
1179
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1180
+ timestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1181
+ group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1182
+ type: z.ZodLiteral<"file">;
1183
+ filename: z.ZodString;
1184
+ }, z.core.$strip>>>;
1185
+ }, z.core.$strip>, z.ZodObject<{
1186
+ status_indicator: z.ZodDefault<z.ZodEnum<{
1187
+ none: "none";
1188
+ loading: "loading";
1189
+ complete: "complete";
1190
+ }>>;
1191
+ type: z.ZodLiteral<"image">;
1192
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1193
+ }, z.core.$strip>], "type">>;
1194
+ summary: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
1195
+ title: z.ZodString;
1196
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1197
+ }, z.core.$strip>, z.ZodObject<{
1198
+ duration: z.ZodNumber;
1199
+ }, z.core.$strip>]>>>;
1200
+ expanded: z.ZodDefault<z.ZodBoolean>;
1201
+ }, z.core.$strip>;
1202
+ }, z.core.$strip>, z.ZodObject<{
1203
+ id: z.ZodString;
1204
+ thread_id: z.ZodString;
1205
+ created_at: z.ZodString;
1206
+ type: z.ZodLiteral<"hidden_context_item">;
1207
+ content: z.ZodUnknown;
1208
+ }, z.core.$strip>, z.ZodObject<{
1209
+ id: z.ZodString;
1210
+ thread_id: z.ZodString;
1211
+ created_at: z.ZodString;
1212
+ type: z.ZodLiteral<"sdk_hidden_context">;
1213
+ content: z.ZodString;
1214
+ }, z.core.$strip>, z.ZodObject<{
1215
+ id: z.ZodString;
1216
+ thread_id: z.ZodString;
1217
+ created_at: z.ZodString;
1218
+ type: z.ZodLiteral<"end_of_turn">;
1219
+ }, z.core.$strip>], "type">;
1220
+ export type ThreadItem = z.infer<typeof ThreadItemSchema>;