@convex-dev/agent 0.3.2 → 0.6.0-alpha.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 (99) hide show
  1. package/dist/UIMessages.d.ts +3 -2
  2. package/dist/UIMessages.d.ts.map +1 -1
  3. package/dist/UIMessages.js +100 -19
  4. package/dist/UIMessages.js.map +1 -1
  5. package/dist/client/createTool.d.ts +129 -25
  6. package/dist/client/createTool.d.ts.map +1 -1
  7. package/dist/client/createTool.js +65 -8
  8. package/dist/client/createTool.js.map +1 -1
  9. package/dist/client/definePlaygroundAPI.d.ts +560 -35
  10. package/dist/client/definePlaygroundAPI.d.ts.map +1 -1
  11. package/dist/client/files.d.ts.map +1 -1
  12. package/dist/client/files.js +4 -2
  13. package/dist/client/files.js.map +1 -1
  14. package/dist/client/index.d.ts +462 -37
  15. package/dist/client/index.d.ts.map +1 -1
  16. package/dist/client/index.js +26 -7
  17. package/dist/client/index.js.map +1 -1
  18. package/dist/client/messages.d.ts +114 -9
  19. package/dist/client/messages.d.ts.map +1 -1
  20. package/dist/client/mockModel.d.ts +17 -17
  21. package/dist/client/mockModel.d.ts.map +1 -1
  22. package/dist/client/mockModel.js +8 -6
  23. package/dist/client/mockModel.js.map +1 -1
  24. package/dist/client/saveInputMessages.d.ts +1 -1
  25. package/dist/client/saveInputMessages.d.ts.map +1 -1
  26. package/dist/client/saveInputMessages.js +1 -1
  27. package/dist/client/saveInputMessages.js.map +1 -1
  28. package/dist/client/search.d.ts +132 -14
  29. package/dist/client/search.d.ts.map +1 -1
  30. package/dist/client/search.js +66 -19
  31. package/dist/client/search.js.map +1 -1
  32. package/dist/client/streamText.d.ts +4 -4
  33. package/dist/client/streamText.d.ts.map +1 -1
  34. package/dist/client/streamText.js.map +1 -1
  35. package/dist/client/streaming.d.ts +1491 -87
  36. package/dist/client/streaming.d.ts.map +1 -1
  37. package/dist/client/types.d.ts +26 -6
  38. package/dist/client/types.d.ts.map +1 -1
  39. package/dist/component/_generated/component.d.ts +862 -19
  40. package/dist/component/_generated/component.d.ts.map +1 -1
  41. package/dist/component/files.d.ts +12 -6
  42. package/dist/component/files.d.ts.map +1 -1
  43. package/dist/component/files.js +10 -2
  44. package/dist/component/files.js.map +1 -1
  45. package/dist/component/messages.d.ts +1247 -92
  46. package/dist/component/messages.d.ts.map +1 -1
  47. package/dist/component/schema.d.ts +2823 -217
  48. package/dist/component/schema.d.ts.map +1 -1
  49. package/dist/component/schema.js +3 -1
  50. package/dist/component/schema.js.map +1 -1
  51. package/dist/component/streams.js +1 -1
  52. package/dist/component/streams.js.map +1 -1
  53. package/dist/component/threads.d.ts +10 -10
  54. package/dist/component/vector/index.d.ts +1 -1
  55. package/dist/deltas.d.ts.map +1 -1
  56. package/dist/deltas.js +40 -5
  57. package/dist/deltas.js.map +1 -1
  58. package/dist/mapping.d.ts.map +1 -1
  59. package/dist/mapping.js +117 -25
  60. package/dist/mapping.js.map +1 -1
  61. package/dist/react/useThreadMessages.d.ts.map +1 -1
  62. package/dist/react/useThreadMessages.js +17 -9
  63. package/dist/react/useThreadMessages.js.map +1 -1
  64. package/dist/shared.d.ts +2 -2
  65. package/dist/shared.d.ts.map +1 -1
  66. package/dist/shared.js.map +1 -1
  67. package/dist/validators.d.ts +12196 -624
  68. package/dist/validators.d.ts.map +1 -1
  69. package/dist/validators.js +152 -9
  70. package/dist/validators.js.map +1 -1
  71. package/package.json +24 -22
  72. package/src/UIMessages.combineUIMessages.test.ts +239 -0
  73. package/src/UIMessages.ts +184 -66
  74. package/src/client/createTool.ts +291 -67
  75. package/src/client/files.ts +4 -2
  76. package/src/client/index.test.ts +1 -0
  77. package/src/client/index.ts +46 -25
  78. package/src/client/mockModel.ts +36 -34
  79. package/src/client/saveInputMessages.ts +2 -2
  80. package/src/client/search.test.ts +166 -0
  81. package/src/client/search.ts +121 -38
  82. package/src/client/streamText.ts +5 -5
  83. package/src/client/types.ts +31 -18
  84. package/src/component/_generated/component.ts +2329 -338
  85. package/src/component/files.ts +11 -2
  86. package/src/component/messages.test.ts +7 -7
  87. package/src/component/schema.ts +3 -1
  88. package/src/component/setup.test.ts +7 -0
  89. package/src/component/streams.ts +1 -1
  90. package/src/deltas.test.ts +90 -0
  91. package/src/deltas.ts +47 -8
  92. package/src/fromUIMessages.test.ts +32 -27
  93. package/src/mapping.test.ts +48 -0
  94. package/src/mapping.ts +234 -142
  95. package/src/react/useThreadMessages.ts +21 -9
  96. package/src/shared.ts +2 -0
  97. package/src/toUIMessages.test.ts +539 -1
  98. package/src/validators.ts +179 -20
  99. package/src/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
@@ -47,15 +47,17 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
47
47
  text: string;
48
48
  } | {
49
49
  providerOptions?: Record<string, Record<string, any>> | undefined;
50
+ mediaType?: string | undefined;
50
51
  mimeType?: string | undefined;
51
52
  type: "image";
52
53
  image: string | ArrayBuffer;
53
54
  } | {
54
55
  providerOptions?: Record<string, Record<string, any>> | undefined;
55
56
  providerMetadata?: Record<string, Record<string, any>> | undefined;
57
+ mediaType?: string | undefined;
58
+ mimeType?: string | undefined;
56
59
  filename?: string | undefined;
57
60
  type: "file";
58
- mimeType: string;
59
61
  data: string | ArrayBuffer;
60
62
  })[];
61
63
  } | {
@@ -69,9 +71,10 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
69
71
  } | {
70
72
  providerOptions?: Record<string, Record<string, any>> | undefined;
71
73
  providerMetadata?: Record<string, Record<string, any>> | undefined;
74
+ mediaType?: string | undefined;
75
+ mimeType?: string | undefined;
72
76
  filename?: string | undefined;
73
77
  type: "file";
74
- mimeType: string;
75
78
  data: string | ArrayBuffer;
76
79
  } | {
77
80
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -87,6 +90,16 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
87
90
  } | {
88
91
  providerOptions?: Record<string, Record<string, any>> | undefined;
89
92
  providerMetadata?: Record<string, Record<string, any>> | undefined;
93
+ args?: any;
94
+ providerExecuted?: boolean | undefined;
95
+ type: "tool-call";
96
+ toolCallId: string;
97
+ toolName: string;
98
+ input: any;
99
+ } | {
100
+ providerOptions?: Record<string, Record<string, any>> | undefined;
101
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
102
+ input?: any;
90
103
  providerExecuted?: boolean | undefined;
91
104
  type: "tool-call";
92
105
  toolCallId: string;
@@ -98,26 +111,65 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
98
111
  args?: any;
99
112
  providerExecuted?: boolean | undefined;
100
113
  output?: {
114
+ providerOptions?: Record<string, Record<string, any>> | undefined;
101
115
  type: "text";
102
116
  value: string;
103
117
  } | {
118
+ providerOptions?: Record<string, Record<string, any>> | undefined;
104
119
  type: "json";
105
120
  value: any;
106
121
  } | {
122
+ providerOptions?: Record<string, Record<string, any>> | undefined;
107
123
  type: "error-text";
108
124
  value: string;
109
125
  } | {
126
+ providerOptions?: Record<string, Record<string, any>> | undefined;
110
127
  type: "error-json";
111
128
  value: any;
129
+ } | {
130
+ providerOptions?: Record<string, Record<string, any>> | undefined;
131
+ reason?: string | undefined;
132
+ type: "execution-denied";
112
133
  } | {
113
134
  type: "content";
114
135
  value: ({
136
+ providerOptions?: Record<string, Record<string, any>> | undefined;
115
137
  type: "text";
116
138
  text: string;
117
139
  } | {
118
140
  type: "media";
141
+ mediaType: string;
119
142
  data: string;
143
+ } | {
144
+ providerOptions?: Record<string, Record<string, any>> | undefined;
145
+ filename?: string | undefined;
146
+ type: "file-data";
147
+ mediaType: string;
148
+ data: string;
149
+ } | {
150
+ providerOptions?: Record<string, Record<string, any>> | undefined;
151
+ type: "file-url";
152
+ url: string;
153
+ } | {
154
+ providerOptions?: Record<string, Record<string, any>> | undefined;
155
+ type: "file-id";
156
+ fileId: string | Record<string, string>;
157
+ } | {
158
+ providerOptions?: Record<string, Record<string, any>> | undefined;
159
+ type: "image-data";
120
160
  mediaType: string;
161
+ data: string;
162
+ } | {
163
+ providerOptions?: Record<string, Record<string, any>> | undefined;
164
+ type: "image-url";
165
+ url: string;
166
+ } | {
167
+ providerOptions?: Record<string, Record<string, any>> | undefined;
168
+ type: "image-file-id";
169
+ fileId: string | Record<string, string>;
170
+ } | {
171
+ providerOptions?: Record<string, Record<string, any>> | undefined;
172
+ type: "custom";
121
173
  })[];
122
174
  } | undefined;
123
175
  result?: any;
@@ -139,8 +191,8 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
139
191
  providerMetadata?: Record<string, Record<string, any>> | undefined;
140
192
  id: string;
141
193
  type: "source";
142
- sourceType: "url";
143
194
  url: string;
195
+ sourceType: "url";
144
196
  } | {
145
197
  providerOptions?: Record<string, Record<string, any>> | undefined;
146
198
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -150,36 +202,81 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
150
202
  type: "source";
151
203
  mediaType: string;
152
204
  sourceType: "document";
205
+ } | {
206
+ providerOptions?: Record<string, Record<string, any>> | undefined;
207
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
208
+ type: "tool-approval-request";
209
+ toolCallId: string;
210
+ approvalId: string;
153
211
  })[];
154
212
  } | {
155
213
  providerOptions?: Record<string, Record<string, any>> | undefined;
156
214
  role: "tool";
157
- content: {
215
+ content: ({
158
216
  providerOptions?: Record<string, Record<string, any>> | undefined;
159
217
  providerMetadata?: Record<string, Record<string, any>> | undefined;
160
218
  args?: any;
161
219
  providerExecuted?: boolean | undefined;
162
220
  output?: {
221
+ providerOptions?: Record<string, Record<string, any>> | undefined;
163
222
  type: "text";
164
223
  value: string;
165
224
  } | {
225
+ providerOptions?: Record<string, Record<string, any>> | undefined;
166
226
  type: "json";
167
227
  value: any;
168
228
  } | {
229
+ providerOptions?: Record<string, Record<string, any>> | undefined;
169
230
  type: "error-text";
170
231
  value: string;
171
232
  } | {
233
+ providerOptions?: Record<string, Record<string, any>> | undefined;
172
234
  type: "error-json";
173
235
  value: any;
236
+ } | {
237
+ providerOptions?: Record<string, Record<string, any>> | undefined;
238
+ reason?: string | undefined;
239
+ type: "execution-denied";
174
240
  } | {
175
241
  type: "content";
176
242
  value: ({
243
+ providerOptions?: Record<string, Record<string, any>> | undefined;
177
244
  type: "text";
178
245
  text: string;
179
246
  } | {
180
247
  type: "media";
248
+ mediaType: string;
249
+ data: string;
250
+ } | {
251
+ providerOptions?: Record<string, Record<string, any>> | undefined;
252
+ filename?: string | undefined;
253
+ type: "file-data";
254
+ mediaType: string;
181
255
  data: string;
256
+ } | {
257
+ providerOptions?: Record<string, Record<string, any>> | undefined;
258
+ type: "file-url";
259
+ url: string;
260
+ } | {
261
+ providerOptions?: Record<string, Record<string, any>> | undefined;
262
+ type: "file-id";
263
+ fileId: string | Record<string, string>;
264
+ } | {
265
+ providerOptions?: Record<string, Record<string, any>> | undefined;
266
+ type: "image-data";
182
267
  mediaType: string;
268
+ data: string;
269
+ } | {
270
+ providerOptions?: Record<string, Record<string, any>> | undefined;
271
+ type: "image-url";
272
+ url: string;
273
+ } | {
274
+ providerOptions?: Record<string, Record<string, any>> | undefined;
275
+ type: "image-file-id";
276
+ fileId: string | Record<string, string>;
277
+ } | {
278
+ providerOptions?: Record<string, Record<string, any>> | undefined;
279
+ type: "custom";
183
280
  })[];
184
281
  } | undefined;
185
282
  result?: any;
@@ -195,7 +292,15 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
195
292
  type: "tool-result";
196
293
  toolCallId: string;
197
294
  toolName: string;
198
- }[];
295
+ } | {
296
+ providerOptions?: Record<string, Record<string, any>> | undefined;
297
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
298
+ providerExecuted?: boolean | undefined;
299
+ reason?: string | undefined;
300
+ type: "tool-approval-response";
301
+ approvalId: string;
302
+ approved: boolean;
303
+ })[];
199
304
  } | {
200
305
  providerOptions?: Record<string, Record<string, any>> | undefined;
201
306
  role: "system";
@@ -217,8 +322,8 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
217
322
  providerOptions?: Record<string, Record<string, any>> | undefined;
218
323
  providerMetadata?: Record<string, Record<string, any>> | undefined;
219
324
  id: string;
220
- sourceType: "url";
221
325
  url: string;
326
+ sourceType: "url";
222
327
  } | {
223
328
  providerOptions?: Record<string, Record<string, any>> | undefined;
224
329
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -241,7 +346,7 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
241
346
  type: "other";
242
347
  message: string;
243
348
  })[] | undefined;
244
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
349
+ finishReason?: "error" | "length" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
245
350
  reasoningDetails?: ({
246
351
  providerOptions?: Record<string, Record<string, any>> | undefined;
247
352
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -256,13 +361,13 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
256
361
  type: "redacted";
257
362
  data: string;
258
363
  })[] | undefined;
259
- _id: string;
260
- _creationTime: number;
261
364
  status: "pending" | "success" | "failed";
262
365
  order: number;
366
+ _creationTime: number;
263
367
  threadId: string;
264
368
  stepOrder: number;
265
369
  tool: boolean;
370
+ _id: string;
266
371
  }[];
267
372
  continueCursor: string;
268
373
  isDone: boolean;
@@ -386,15 +491,17 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
386
491
  text: string;
387
492
  } | {
388
493
  providerOptions?: Record<string, Record<string, any>> | undefined;
494
+ mediaType?: string | undefined;
389
495
  mimeType?: string | undefined;
390
496
  type: "image";
391
497
  image: string | ArrayBuffer;
392
498
  } | {
393
499
  providerOptions?: Record<string, Record<string, any>> | undefined;
394
500
  providerMetadata?: Record<string, Record<string, any>> | undefined;
501
+ mediaType?: string | undefined;
502
+ mimeType?: string | undefined;
395
503
  filename?: string | undefined;
396
504
  type: "file";
397
- mimeType: string;
398
505
  data: string | ArrayBuffer;
399
506
  })[];
400
507
  } | {
@@ -408,9 +515,10 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
408
515
  } | {
409
516
  providerOptions?: Record<string, Record<string, any>> | undefined;
410
517
  providerMetadata?: Record<string, Record<string, any>> | undefined;
518
+ mediaType?: string | undefined;
519
+ mimeType?: string | undefined;
411
520
  filename?: string | undefined;
412
521
  type: "file";
413
- mimeType: string;
414
522
  data: string | ArrayBuffer;
415
523
  } | {
416
524
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -426,6 +534,16 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
426
534
  } | {
427
535
  providerOptions?: Record<string, Record<string, any>> | undefined;
428
536
  providerMetadata?: Record<string, Record<string, any>> | undefined;
537
+ args?: any;
538
+ providerExecuted?: boolean | undefined;
539
+ type: "tool-call";
540
+ toolCallId: string;
541
+ toolName: string;
542
+ input: any;
543
+ } | {
544
+ providerOptions?: Record<string, Record<string, any>> | undefined;
545
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
546
+ input?: any;
429
547
  providerExecuted?: boolean | undefined;
430
548
  type: "tool-call";
431
549
  toolCallId: string;
@@ -437,26 +555,65 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
437
555
  args?: any;
438
556
  providerExecuted?: boolean | undefined;
439
557
  output?: {
558
+ providerOptions?: Record<string, Record<string, any>> | undefined;
440
559
  type: "text";
441
560
  value: string;
442
561
  } | {
562
+ providerOptions?: Record<string, Record<string, any>> | undefined;
443
563
  type: "json";
444
564
  value: any;
445
565
  } | {
566
+ providerOptions?: Record<string, Record<string, any>> | undefined;
446
567
  type: "error-text";
447
568
  value: string;
448
569
  } | {
570
+ providerOptions?: Record<string, Record<string, any>> | undefined;
449
571
  type: "error-json";
450
572
  value: any;
573
+ } | {
574
+ providerOptions?: Record<string, Record<string, any>> | undefined;
575
+ reason?: string | undefined;
576
+ type: "execution-denied";
451
577
  } | {
452
578
  type: "content";
453
579
  value: ({
580
+ providerOptions?: Record<string, Record<string, any>> | undefined;
454
581
  type: "text";
455
582
  text: string;
456
583
  } | {
457
584
  type: "media";
585
+ mediaType: string;
586
+ data: string;
587
+ } | {
588
+ providerOptions?: Record<string, Record<string, any>> | undefined;
589
+ filename?: string | undefined;
590
+ type: "file-data";
591
+ mediaType: string;
458
592
  data: string;
593
+ } | {
594
+ providerOptions?: Record<string, Record<string, any>> | undefined;
595
+ type: "file-url";
596
+ url: string;
597
+ } | {
598
+ providerOptions?: Record<string, Record<string, any>> | undefined;
599
+ type: "file-id";
600
+ fileId: string | Record<string, string>;
601
+ } | {
602
+ providerOptions?: Record<string, Record<string, any>> | undefined;
603
+ type: "image-data";
459
604
  mediaType: string;
605
+ data: string;
606
+ } | {
607
+ providerOptions?: Record<string, Record<string, any>> | undefined;
608
+ type: "image-url";
609
+ url: string;
610
+ } | {
611
+ providerOptions?: Record<string, Record<string, any>> | undefined;
612
+ type: "image-file-id";
613
+ fileId: string | Record<string, string>;
614
+ } | {
615
+ providerOptions?: Record<string, Record<string, any>> | undefined;
616
+ type: "custom";
460
617
  })[];
461
618
  } | undefined;
462
619
  result?: any;
@@ -478,8 +635,8 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
478
635
  providerMetadata?: Record<string, Record<string, any>> | undefined;
479
636
  id: string;
480
637
  type: "source";
481
- sourceType: "url";
482
638
  url: string;
639
+ sourceType: "url";
483
640
  } | {
484
641
  providerOptions?: Record<string, Record<string, any>> | undefined;
485
642
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -489,36 +646,81 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
489
646
  type: "source";
490
647
  mediaType: string;
491
648
  sourceType: "document";
649
+ } | {
650
+ providerOptions?: Record<string, Record<string, any>> | undefined;
651
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
652
+ type: "tool-approval-request";
653
+ toolCallId: string;
654
+ approvalId: string;
492
655
  })[];
493
656
  } | {
494
657
  providerOptions?: Record<string, Record<string, any>> | undefined;
495
658
  role: "tool";
496
- content: {
659
+ content: ({
497
660
  providerOptions?: Record<string, Record<string, any>> | undefined;
498
661
  providerMetadata?: Record<string, Record<string, any>> | undefined;
499
662
  args?: any;
500
663
  providerExecuted?: boolean | undefined;
501
664
  output?: {
665
+ providerOptions?: Record<string, Record<string, any>> | undefined;
502
666
  type: "text";
503
667
  value: string;
504
668
  } | {
669
+ providerOptions?: Record<string, Record<string, any>> | undefined;
505
670
  type: "json";
506
671
  value: any;
507
672
  } | {
673
+ providerOptions?: Record<string, Record<string, any>> | undefined;
508
674
  type: "error-text";
509
675
  value: string;
510
676
  } | {
677
+ providerOptions?: Record<string, Record<string, any>> | undefined;
511
678
  type: "error-json";
512
679
  value: any;
680
+ } | {
681
+ providerOptions?: Record<string, Record<string, any>> | undefined;
682
+ reason?: string | undefined;
683
+ type: "execution-denied";
513
684
  } | {
514
685
  type: "content";
515
686
  value: ({
687
+ providerOptions?: Record<string, Record<string, any>> | undefined;
516
688
  type: "text";
517
689
  text: string;
518
690
  } | {
519
691
  type: "media";
692
+ mediaType: string;
693
+ data: string;
694
+ } | {
695
+ providerOptions?: Record<string, Record<string, any>> | undefined;
696
+ filename?: string | undefined;
697
+ type: "file-data";
698
+ mediaType: string;
520
699
  data: string;
700
+ } | {
701
+ providerOptions?: Record<string, Record<string, any>> | undefined;
702
+ type: "file-url";
703
+ url: string;
704
+ } | {
705
+ providerOptions?: Record<string, Record<string, any>> | undefined;
706
+ type: "file-id";
707
+ fileId: string | Record<string, string>;
708
+ } | {
709
+ providerOptions?: Record<string, Record<string, any>> | undefined;
710
+ type: "image-data";
521
711
  mediaType: string;
712
+ data: string;
713
+ } | {
714
+ providerOptions?: Record<string, Record<string, any>> | undefined;
715
+ type: "image-url";
716
+ url: string;
717
+ } | {
718
+ providerOptions?: Record<string, Record<string, any>> | undefined;
719
+ type: "image-file-id";
720
+ fileId: string | Record<string, string>;
721
+ } | {
722
+ providerOptions?: Record<string, Record<string, any>> | undefined;
723
+ type: "custom";
522
724
  })[];
523
725
  } | undefined;
524
726
  result?: any;
@@ -534,7 +736,15 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
534
736
  type: "tool-result";
535
737
  toolCallId: string;
536
738
  toolName: string;
537
- }[];
739
+ } | {
740
+ providerOptions?: Record<string, Record<string, any>> | undefined;
741
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
742
+ providerExecuted?: boolean | undefined;
743
+ reason?: string | undefined;
744
+ type: "tool-approval-response";
745
+ approvalId: string;
746
+ approved: boolean;
747
+ })[];
538
748
  } | {
539
749
  providerOptions?: Record<string, Record<string, any>> | undefined;
540
750
  role: "system";
@@ -556,8 +766,8 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
556
766
  providerOptions?: Record<string, Record<string, any>> | undefined;
557
767
  providerMetadata?: Record<string, Record<string, any>> | undefined;
558
768
  id: string;
559
- sourceType: "url";
560
769
  url: string;
770
+ sourceType: "url";
561
771
  } | {
562
772
  providerOptions?: Record<string, Record<string, any>> | undefined;
563
773
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -580,7 +790,7 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
580
790
  type: "other";
581
791
  message: string;
582
792
  })[] | undefined;
583
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
793
+ finishReason?: "error" | "length" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
584
794
  reasoningDetails?: ({
585
795
  providerOptions?: Record<string, Record<string, any>> | undefined;
586
796
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -595,13 +805,13 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
595
805
  type: "redacted";
596
806
  data: string;
597
807
  })[] | undefined;
598
- _id: string;
599
- _creationTime: number;
600
808
  status: "pending" | "success" | "failed";
601
809
  order: number;
810
+ _creationTime: number;
602
811
  threadId: string;
603
812
  stepOrder: number;
604
813
  tool: boolean;
814
+ _id: string;
605
815
  }[], import("convex/values").VObject<{
606
816
  id?: string | undefined;
607
817
  userId?: string | undefined;
@@ -622,15 +832,17 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
622
832
  text: string;
623
833
  } | {
624
834
  providerOptions?: Record<string, Record<string, any>> | undefined;
835
+ mediaType?: string | undefined;
625
836
  mimeType?: string | undefined;
626
837
  type: "image";
627
838
  image: string | ArrayBuffer;
628
839
  } | {
629
840
  providerOptions?: Record<string, Record<string, any>> | undefined;
630
841
  providerMetadata?: Record<string, Record<string, any>> | undefined;
842
+ mediaType?: string | undefined;
843
+ mimeType?: string | undefined;
631
844
  filename?: string | undefined;
632
845
  type: "file";
633
- mimeType: string;
634
846
  data: string | ArrayBuffer;
635
847
  })[];
636
848
  } | {
@@ -644,9 +856,10 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
644
856
  } | {
645
857
  providerOptions?: Record<string, Record<string, any>> | undefined;
646
858
  providerMetadata?: Record<string, Record<string, any>> | undefined;
859
+ mediaType?: string | undefined;
860
+ mimeType?: string | undefined;
647
861
  filename?: string | undefined;
648
862
  type: "file";
649
- mimeType: string;
650
863
  data: string | ArrayBuffer;
651
864
  } | {
652
865
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -662,6 +875,16 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
662
875
  } | {
663
876
  providerOptions?: Record<string, Record<string, any>> | undefined;
664
877
  providerMetadata?: Record<string, Record<string, any>> | undefined;
878
+ args?: any;
879
+ providerExecuted?: boolean | undefined;
880
+ type: "tool-call";
881
+ toolCallId: string;
882
+ toolName: string;
883
+ input: any;
884
+ } | {
885
+ providerOptions?: Record<string, Record<string, any>> | undefined;
886
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
887
+ input?: any;
665
888
  providerExecuted?: boolean | undefined;
666
889
  type: "tool-call";
667
890
  toolCallId: string;
@@ -673,26 +896,65 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
673
896
  args?: any;
674
897
  providerExecuted?: boolean | undefined;
675
898
  output?: {
899
+ providerOptions?: Record<string, Record<string, any>> | undefined;
676
900
  type: "text";
677
901
  value: string;
678
902
  } | {
903
+ providerOptions?: Record<string, Record<string, any>> | undefined;
679
904
  type: "json";
680
905
  value: any;
681
906
  } | {
907
+ providerOptions?: Record<string, Record<string, any>> | undefined;
682
908
  type: "error-text";
683
909
  value: string;
684
910
  } | {
911
+ providerOptions?: Record<string, Record<string, any>> | undefined;
685
912
  type: "error-json";
686
913
  value: any;
914
+ } | {
915
+ providerOptions?: Record<string, Record<string, any>> | undefined;
916
+ reason?: string | undefined;
917
+ type: "execution-denied";
687
918
  } | {
688
919
  type: "content";
689
920
  value: ({
921
+ providerOptions?: Record<string, Record<string, any>> | undefined;
690
922
  type: "text";
691
923
  text: string;
692
924
  } | {
693
925
  type: "media";
926
+ mediaType: string;
927
+ data: string;
928
+ } | {
929
+ providerOptions?: Record<string, Record<string, any>> | undefined;
930
+ filename?: string | undefined;
931
+ type: "file-data";
932
+ mediaType: string;
694
933
  data: string;
934
+ } | {
935
+ providerOptions?: Record<string, Record<string, any>> | undefined;
936
+ type: "file-url";
937
+ url: string;
938
+ } | {
939
+ providerOptions?: Record<string, Record<string, any>> | undefined;
940
+ type: "file-id";
941
+ fileId: string | Record<string, string>;
942
+ } | {
943
+ providerOptions?: Record<string, Record<string, any>> | undefined;
944
+ type: "image-data";
695
945
  mediaType: string;
946
+ data: string;
947
+ } | {
948
+ providerOptions?: Record<string, Record<string, any>> | undefined;
949
+ type: "image-url";
950
+ url: string;
951
+ } | {
952
+ providerOptions?: Record<string, Record<string, any>> | undefined;
953
+ type: "image-file-id";
954
+ fileId: string | Record<string, string>;
955
+ } | {
956
+ providerOptions?: Record<string, Record<string, any>> | undefined;
957
+ type: "custom";
696
958
  })[];
697
959
  } | undefined;
698
960
  result?: any;
@@ -714,8 +976,8 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
714
976
  providerMetadata?: Record<string, Record<string, any>> | undefined;
715
977
  id: string;
716
978
  type: "source";
717
- sourceType: "url";
718
979
  url: string;
980
+ sourceType: "url";
719
981
  } | {
720
982
  providerOptions?: Record<string, Record<string, any>> | undefined;
721
983
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -725,36 +987,81 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
725
987
  type: "source";
726
988
  mediaType: string;
727
989
  sourceType: "document";
990
+ } | {
991
+ providerOptions?: Record<string, Record<string, any>> | undefined;
992
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
993
+ type: "tool-approval-request";
994
+ toolCallId: string;
995
+ approvalId: string;
728
996
  })[];
729
997
  } | {
730
998
  providerOptions?: Record<string, Record<string, any>> | undefined;
731
999
  role: "tool";
732
- content: {
1000
+ content: ({
733
1001
  providerOptions?: Record<string, Record<string, any>> | undefined;
734
1002
  providerMetadata?: Record<string, Record<string, any>> | undefined;
735
1003
  args?: any;
736
1004
  providerExecuted?: boolean | undefined;
737
1005
  output?: {
1006
+ providerOptions?: Record<string, Record<string, any>> | undefined;
738
1007
  type: "text";
739
1008
  value: string;
740
1009
  } | {
1010
+ providerOptions?: Record<string, Record<string, any>> | undefined;
741
1011
  type: "json";
742
1012
  value: any;
743
1013
  } | {
1014
+ providerOptions?: Record<string, Record<string, any>> | undefined;
744
1015
  type: "error-text";
745
1016
  value: string;
746
1017
  } | {
1018
+ providerOptions?: Record<string, Record<string, any>> | undefined;
747
1019
  type: "error-json";
748
1020
  value: any;
1021
+ } | {
1022
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1023
+ reason?: string | undefined;
1024
+ type: "execution-denied";
749
1025
  } | {
750
1026
  type: "content";
751
1027
  value: ({
1028
+ providerOptions?: Record<string, Record<string, any>> | undefined;
752
1029
  type: "text";
753
1030
  text: string;
754
1031
  } | {
755
1032
  type: "media";
1033
+ mediaType: string;
756
1034
  data: string;
1035
+ } | {
1036
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1037
+ filename?: string | undefined;
1038
+ type: "file-data";
1039
+ mediaType: string;
1040
+ data: string;
1041
+ } | {
1042
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1043
+ type: "file-url";
1044
+ url: string;
1045
+ } | {
1046
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1047
+ type: "file-id";
1048
+ fileId: string | Record<string, string>;
1049
+ } | {
1050
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1051
+ type: "image-data";
757
1052
  mediaType: string;
1053
+ data: string;
1054
+ } | {
1055
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1056
+ type: "image-url";
1057
+ url: string;
1058
+ } | {
1059
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1060
+ type: "image-file-id";
1061
+ fileId: string | Record<string, string>;
1062
+ } | {
1063
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1064
+ type: "custom";
758
1065
  })[];
759
1066
  } | undefined;
760
1067
  result?: any;
@@ -770,7 +1077,15 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
770
1077
  type: "tool-result";
771
1078
  toolCallId: string;
772
1079
  toolName: string;
773
- }[];
1080
+ } | {
1081
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1082
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1083
+ providerExecuted?: boolean | undefined;
1084
+ reason?: string | undefined;
1085
+ type: "tool-approval-response";
1086
+ approvalId: string;
1087
+ approved: boolean;
1088
+ })[];
774
1089
  } | {
775
1090
  providerOptions?: Record<string, Record<string, any>> | undefined;
776
1091
  role: "system";
@@ -792,8 +1107,8 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
792
1107
  providerOptions?: Record<string, Record<string, any>> | undefined;
793
1108
  providerMetadata?: Record<string, Record<string, any>> | undefined;
794
1109
  id: string;
795
- sourceType: "url";
796
1110
  url: string;
1111
+ sourceType: "url";
797
1112
  } | {
798
1113
  providerOptions?: Record<string, Record<string, any>> | undefined;
799
1114
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -816,7 +1131,7 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
816
1131
  type: "other";
817
1132
  message: string;
818
1133
  })[] | undefined;
819
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
1134
+ finishReason?: "error" | "length" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
820
1135
  reasoningDetails?: ({
821
1136
  providerOptions?: Record<string, Record<string, any>> | undefined;
822
1137
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -831,13 +1146,13 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
831
1146
  type: "redacted";
832
1147
  data: string;
833
1148
  })[] | undefined;
834
- _id: string;
835
- _creationTime: number;
836
1149
  status: "pending" | "success" | "failed";
837
1150
  order: number;
1151
+ _creationTime: number;
838
1152
  threadId: string;
839
1153
  stepOrder: number;
840
1154
  tool: boolean;
1155
+ _id: string;
841
1156
  }, {
842
1157
  _id: import("convex/values").VString<string, "required">;
843
1158
  _creationTime: import("convex/values").VFloat64<number, "required">;
@@ -863,15 +1178,17 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
863
1178
  text: string;
864
1179
  } | {
865
1180
  providerOptions?: Record<string, Record<string, any>> | undefined;
1181
+ mediaType?: string | undefined;
866
1182
  mimeType?: string | undefined;
867
1183
  type: "image";
868
1184
  image: string | ArrayBuffer;
869
1185
  } | {
870
1186
  providerOptions?: Record<string, Record<string, any>> | undefined;
871
1187
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1188
+ mediaType?: string | undefined;
1189
+ mimeType?: string | undefined;
872
1190
  filename?: string | undefined;
873
1191
  type: "file";
874
- mimeType: string;
875
1192
  data: string | ArrayBuffer;
876
1193
  })[];
877
1194
  } | {
@@ -885,9 +1202,10 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
885
1202
  } | {
886
1203
  providerOptions?: Record<string, Record<string, any>> | undefined;
887
1204
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1205
+ mediaType?: string | undefined;
1206
+ mimeType?: string | undefined;
888
1207
  filename?: string | undefined;
889
1208
  type: "file";
890
- mimeType: string;
891
1209
  data: string | ArrayBuffer;
892
1210
  } | {
893
1211
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -903,6 +1221,16 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
903
1221
  } | {
904
1222
  providerOptions?: Record<string, Record<string, any>> | undefined;
905
1223
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1224
+ args?: any;
1225
+ providerExecuted?: boolean | undefined;
1226
+ type: "tool-call";
1227
+ toolCallId: string;
1228
+ toolName: string;
1229
+ input: any;
1230
+ } | {
1231
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1232
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1233
+ input?: any;
906
1234
  providerExecuted?: boolean | undefined;
907
1235
  type: "tool-call";
908
1236
  toolCallId: string;
@@ -914,26 +1242,65 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
914
1242
  args?: any;
915
1243
  providerExecuted?: boolean | undefined;
916
1244
  output?: {
1245
+ providerOptions?: Record<string, Record<string, any>> | undefined;
917
1246
  type: "text";
918
1247
  value: string;
919
1248
  } | {
1249
+ providerOptions?: Record<string, Record<string, any>> | undefined;
920
1250
  type: "json";
921
1251
  value: any;
922
1252
  } | {
1253
+ providerOptions?: Record<string, Record<string, any>> | undefined;
923
1254
  type: "error-text";
924
1255
  value: string;
925
1256
  } | {
1257
+ providerOptions?: Record<string, Record<string, any>> | undefined;
926
1258
  type: "error-json";
927
1259
  value: any;
1260
+ } | {
1261
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1262
+ reason?: string | undefined;
1263
+ type: "execution-denied";
928
1264
  } | {
929
1265
  type: "content";
930
1266
  value: ({
1267
+ providerOptions?: Record<string, Record<string, any>> | undefined;
931
1268
  type: "text";
932
1269
  text: string;
933
1270
  } | {
934
1271
  type: "media";
1272
+ mediaType: string;
1273
+ data: string;
1274
+ } | {
1275
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1276
+ filename?: string | undefined;
1277
+ type: "file-data";
1278
+ mediaType: string;
935
1279
  data: string;
1280
+ } | {
1281
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1282
+ type: "file-url";
1283
+ url: string;
1284
+ } | {
1285
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1286
+ type: "file-id";
1287
+ fileId: string | Record<string, string>;
1288
+ } | {
1289
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1290
+ type: "image-data";
936
1291
  mediaType: string;
1292
+ data: string;
1293
+ } | {
1294
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1295
+ type: "image-url";
1296
+ url: string;
1297
+ } | {
1298
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1299
+ type: "image-file-id";
1300
+ fileId: string | Record<string, string>;
1301
+ } | {
1302
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1303
+ type: "custom";
937
1304
  })[];
938
1305
  } | undefined;
939
1306
  result?: any;
@@ -955,8 +1322,8 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
955
1322
  providerMetadata?: Record<string, Record<string, any>> | undefined;
956
1323
  id: string;
957
1324
  type: "source";
958
- sourceType: "url";
959
1325
  url: string;
1326
+ sourceType: "url";
960
1327
  } | {
961
1328
  providerOptions?: Record<string, Record<string, any>> | undefined;
962
1329
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -966,36 +1333,81 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
966
1333
  type: "source";
967
1334
  mediaType: string;
968
1335
  sourceType: "document";
1336
+ } | {
1337
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1338
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1339
+ type: "tool-approval-request";
1340
+ toolCallId: string;
1341
+ approvalId: string;
969
1342
  })[];
970
1343
  } | {
971
1344
  providerOptions?: Record<string, Record<string, any>> | undefined;
972
1345
  role: "tool";
973
- content: {
1346
+ content: ({
974
1347
  providerOptions?: Record<string, Record<string, any>> | undefined;
975
1348
  providerMetadata?: Record<string, Record<string, any>> | undefined;
976
1349
  args?: any;
977
1350
  providerExecuted?: boolean | undefined;
978
1351
  output?: {
1352
+ providerOptions?: Record<string, Record<string, any>> | undefined;
979
1353
  type: "text";
980
1354
  value: string;
981
1355
  } | {
1356
+ providerOptions?: Record<string, Record<string, any>> | undefined;
982
1357
  type: "json";
983
1358
  value: any;
984
1359
  } | {
1360
+ providerOptions?: Record<string, Record<string, any>> | undefined;
985
1361
  type: "error-text";
986
1362
  value: string;
987
1363
  } | {
1364
+ providerOptions?: Record<string, Record<string, any>> | undefined;
988
1365
  type: "error-json";
989
1366
  value: any;
1367
+ } | {
1368
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1369
+ reason?: string | undefined;
1370
+ type: "execution-denied";
990
1371
  } | {
991
1372
  type: "content";
992
1373
  value: ({
1374
+ providerOptions?: Record<string, Record<string, any>> | undefined;
993
1375
  type: "text";
994
1376
  text: string;
995
1377
  } | {
996
1378
  type: "media";
1379
+ mediaType: string;
1380
+ data: string;
1381
+ } | {
1382
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1383
+ filename?: string | undefined;
1384
+ type: "file-data";
1385
+ mediaType: string;
997
1386
  data: string;
1387
+ } | {
1388
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1389
+ type: "file-url";
1390
+ url: string;
1391
+ } | {
1392
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1393
+ type: "file-id";
1394
+ fileId: string | Record<string, string>;
1395
+ } | {
1396
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1397
+ type: "image-data";
998
1398
  mediaType: string;
1399
+ data: string;
1400
+ } | {
1401
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1402
+ type: "image-url";
1403
+ url: string;
1404
+ } | {
1405
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1406
+ type: "image-file-id";
1407
+ fileId: string | Record<string, string>;
1408
+ } | {
1409
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1410
+ type: "custom";
999
1411
  })[];
1000
1412
  } | undefined;
1001
1413
  result?: any;
@@ -1011,7 +1423,15 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1011
1423
  type: "tool-result";
1012
1424
  toolCallId: string;
1013
1425
  toolName: string;
1014
- }[];
1426
+ } | {
1427
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1428
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1429
+ providerExecuted?: boolean | undefined;
1430
+ reason?: string | undefined;
1431
+ type: "tool-approval-response";
1432
+ approvalId: string;
1433
+ approved: boolean;
1434
+ })[];
1015
1435
  } | {
1016
1436
  providerOptions?: Record<string, Record<string, any>> | undefined;
1017
1437
  role: "system";
@@ -1026,15 +1446,17 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1026
1446
  text: string;
1027
1447
  } | {
1028
1448
  providerOptions?: Record<string, Record<string, any>> | undefined;
1449
+ mediaType?: string | undefined;
1029
1450
  mimeType?: string | undefined;
1030
1451
  type: "image";
1031
1452
  image: string | ArrayBuffer;
1032
1453
  } | {
1033
1454
  providerOptions?: Record<string, Record<string, any>> | undefined;
1034
1455
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1456
+ mediaType?: string | undefined;
1457
+ mimeType?: string | undefined;
1035
1458
  filename?: string | undefined;
1036
1459
  type: "file";
1037
- mimeType: string;
1038
1460
  data: string | ArrayBuffer;
1039
1461
  })[];
1040
1462
  }, {
@@ -1046,15 +1468,17 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1046
1468
  text: string;
1047
1469
  } | {
1048
1470
  providerOptions?: Record<string, Record<string, any>> | undefined;
1471
+ mediaType?: string | undefined;
1049
1472
  mimeType?: string | undefined;
1050
1473
  type: "image";
1051
1474
  image: string | ArrayBuffer;
1052
1475
  } | {
1053
1476
  providerOptions?: Record<string, Record<string, any>> | undefined;
1054
1477
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1478
+ mediaType?: string | undefined;
1479
+ mimeType?: string | undefined;
1055
1480
  filename?: string | undefined;
1056
1481
  type: "file";
1057
- mimeType: string;
1058
1482
  data: string | ArrayBuffer;
1059
1483
  })[], [import("convex/values").VString<string, "required">, import("convex/values").VArray<({
1060
1484
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1063,15 +1487,17 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1063
1487
  text: string;
1064
1488
  } | {
1065
1489
  providerOptions?: Record<string, Record<string, any>> | undefined;
1490
+ mediaType?: string | undefined;
1066
1491
  mimeType?: string | undefined;
1067
1492
  type: "image";
1068
1493
  image: string | ArrayBuffer;
1069
1494
  } | {
1070
1495
  providerOptions?: Record<string, Record<string, any>> | undefined;
1071
1496
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1497
+ mediaType?: string | undefined;
1498
+ mimeType?: string | undefined;
1072
1499
  filename?: string | undefined;
1073
1500
  type: "file";
1074
- mimeType: string;
1075
1501
  data: string | ArrayBuffer;
1076
1502
  })[], import("convex/values").VUnion<{
1077
1503
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1080,15 +1506,17 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1080
1506
  text: string;
1081
1507
  } | {
1082
1508
  providerOptions?: Record<string, Record<string, any>> | undefined;
1509
+ mediaType?: string | undefined;
1083
1510
  mimeType?: string | undefined;
1084
1511
  type: "image";
1085
1512
  image: string | ArrayBuffer;
1086
1513
  } | {
1087
1514
  providerOptions?: Record<string, Record<string, any>> | undefined;
1088
1515
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1516
+ mediaType?: string | undefined;
1517
+ mimeType?: string | undefined;
1089
1518
  filename?: string | undefined;
1090
1519
  type: "file";
1091
- mimeType: string;
1092
1520
  data: string | ArrayBuffer;
1093
1521
  }, [import("convex/values").VObject<{
1094
1522
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1102,29 +1530,33 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1102
1530
  providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1103
1531
  }, "required", "type" | "providerOptions" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}`>, import("convex/values").VObject<{
1104
1532
  providerOptions?: Record<string, Record<string, any>> | undefined;
1533
+ mediaType?: string | undefined;
1105
1534
  mimeType?: string | undefined;
1106
1535
  type: "image";
1107
1536
  image: string | ArrayBuffer;
1108
1537
  }, {
1109
1538
  type: import("convex/values").VLiteral<"image", "required">;
1110
1539
  image: import("convex/values").VUnion<string | ArrayBuffer, [import("convex/values").VString<string, "required">, import("convex/values").VBytes<ArrayBuffer, "required">], "required", never>;
1540
+ mediaType: import("convex/values").VString<string | undefined, "optional">;
1111
1541
  mimeType: import("convex/values").VString<string | undefined, "optional">;
1112
1542
  providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1113
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "image" | "mimeType">, import("convex/values").VObject<{
1543
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "image" | "mediaType" | "mimeType">, import("convex/values").VObject<{
1114
1544
  providerOptions?: Record<string, Record<string, any>> | undefined;
1115
1545
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1546
+ mediaType?: string | undefined;
1547
+ mimeType?: string | undefined;
1116
1548
  filename?: string | undefined;
1117
1549
  type: "file";
1118
- mimeType: string;
1119
1550
  data: string | ArrayBuffer;
1120
1551
  }, {
1121
1552
  type: import("convex/values").VLiteral<"file", "required">;
1122
1553
  data: import("convex/values").VUnion<string | ArrayBuffer, [import("convex/values").VString<string, "required">, import("convex/values").VBytes<ArrayBuffer, "required">], "required", never>;
1123
1554
  filename: import("convex/values").VString<string | undefined, "optional">;
1124
- mimeType: import("convex/values").VString<string, "required">;
1555
+ mediaType: import("convex/values").VString<string | undefined, "optional">;
1556
+ mimeType: import("convex/values").VString<string | undefined, "optional">;
1125
1557
  providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1126
1558
  providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1127
- }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "mimeType" | "data" | "filename">], "required", "type" | "providerOptions" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "image" | "mimeType" | "data" | "filename">, "required">], "required", never>;
1559
+ }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "mediaType" | "mimeType" | "data" | "filename">], "required", "type" | "providerOptions" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "image" | "mediaType" | "mimeType" | "data" | "filename">, "required">], "required", never>;
1128
1560
  providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1129
1561
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
1130
1562
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1137,9 +1569,10 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1137
1569
  } | {
1138
1570
  providerOptions?: Record<string, Record<string, any>> | undefined;
1139
1571
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1572
+ mediaType?: string | undefined;
1573
+ mimeType?: string | undefined;
1140
1574
  filename?: string | undefined;
1141
1575
  type: "file";
1142
- mimeType: string;
1143
1576
  data: string | ArrayBuffer;
1144
1577
  } | {
1145
1578
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1155,6 +1588,16 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1155
1588
  } | {
1156
1589
  providerOptions?: Record<string, Record<string, any>> | undefined;
1157
1590
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1591
+ args?: any;
1592
+ providerExecuted?: boolean | undefined;
1593
+ type: "tool-call";
1594
+ toolCallId: string;
1595
+ toolName: string;
1596
+ input: any;
1597
+ } | {
1598
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1599
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1600
+ input?: any;
1158
1601
  providerExecuted?: boolean | undefined;
1159
1602
  type: "tool-call";
1160
1603
  toolCallId: string;
@@ -1166,26 +1609,65 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1166
1609
  args?: any;
1167
1610
  providerExecuted?: boolean | undefined;
1168
1611
  output?: {
1612
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1169
1613
  type: "text";
1170
1614
  value: string;
1171
1615
  } | {
1616
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1172
1617
  type: "json";
1173
1618
  value: any;
1174
1619
  } | {
1620
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1175
1621
  type: "error-text";
1176
1622
  value: string;
1177
1623
  } | {
1624
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1178
1625
  type: "error-json";
1179
1626
  value: any;
1627
+ } | {
1628
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1629
+ reason?: string | undefined;
1630
+ type: "execution-denied";
1180
1631
  } | {
1181
1632
  type: "content";
1182
1633
  value: ({
1634
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1183
1635
  type: "text";
1184
1636
  text: string;
1185
1637
  } | {
1186
1638
  type: "media";
1639
+ mediaType: string;
1640
+ data: string;
1641
+ } | {
1642
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1643
+ filename?: string | undefined;
1644
+ type: "file-data";
1645
+ mediaType: string;
1187
1646
  data: string;
1647
+ } | {
1648
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1649
+ type: "file-url";
1650
+ url: string;
1651
+ } | {
1652
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1653
+ type: "file-id";
1654
+ fileId: string | Record<string, string>;
1655
+ } | {
1656
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1657
+ type: "image-data";
1188
1658
  mediaType: string;
1659
+ data: string;
1660
+ } | {
1661
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1662
+ type: "image-url";
1663
+ url: string;
1664
+ } | {
1665
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1666
+ type: "image-file-id";
1667
+ fileId: string | Record<string, string>;
1668
+ } | {
1669
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1670
+ type: "custom";
1189
1671
  })[];
1190
1672
  } | undefined;
1191
1673
  result?: any;
@@ -1207,8 +1689,8 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1207
1689
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1208
1690
  id: string;
1209
1691
  type: "source";
1210
- sourceType: "url";
1211
1692
  url: string;
1693
+ sourceType: "url";
1212
1694
  } | {
1213
1695
  providerOptions?: Record<string, Record<string, any>> | undefined;
1214
1696
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -1218,6 +1700,12 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1218
1700
  type: "source";
1219
1701
  mediaType: string;
1220
1702
  sourceType: "document";
1703
+ } | {
1704
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1705
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1706
+ type: "tool-approval-request";
1707
+ toolCallId: string;
1708
+ approvalId: string;
1221
1709
  })[];
1222
1710
  }, {
1223
1711
  role: import("convex/values").VLiteral<"assistant", "required">;
@@ -1229,9 +1717,10 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1229
1717
  } | {
1230
1718
  providerOptions?: Record<string, Record<string, any>> | undefined;
1231
1719
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1720
+ mediaType?: string | undefined;
1721
+ mimeType?: string | undefined;
1232
1722
  filename?: string | undefined;
1233
1723
  type: "file";
1234
- mimeType: string;
1235
1724
  data: string | ArrayBuffer;
1236
1725
  } | {
1237
1726
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1247,6 +1736,16 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1247
1736
  } | {
1248
1737
  providerOptions?: Record<string, Record<string, any>> | undefined;
1249
1738
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1739
+ args?: any;
1740
+ providerExecuted?: boolean | undefined;
1741
+ type: "tool-call";
1742
+ toolCallId: string;
1743
+ toolName: string;
1744
+ input: any;
1745
+ } | {
1746
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1747
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1748
+ input?: any;
1250
1749
  providerExecuted?: boolean | undefined;
1251
1750
  type: "tool-call";
1252
1751
  toolCallId: string;
@@ -1258,26 +1757,65 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1258
1757
  args?: any;
1259
1758
  providerExecuted?: boolean | undefined;
1260
1759
  output?: {
1760
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1261
1761
  type: "text";
1262
1762
  value: string;
1263
1763
  } | {
1764
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1264
1765
  type: "json";
1265
1766
  value: any;
1266
1767
  } | {
1768
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1267
1769
  type: "error-text";
1268
1770
  value: string;
1269
1771
  } | {
1772
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1270
1773
  type: "error-json";
1271
1774
  value: any;
1775
+ } | {
1776
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1777
+ reason?: string | undefined;
1778
+ type: "execution-denied";
1272
1779
  } | {
1273
1780
  type: "content";
1274
1781
  value: ({
1782
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1275
1783
  type: "text";
1276
1784
  text: string;
1277
1785
  } | {
1278
1786
  type: "media";
1787
+ mediaType: string;
1788
+ data: string;
1789
+ } | {
1790
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1791
+ filename?: string | undefined;
1792
+ type: "file-data";
1793
+ mediaType: string;
1279
1794
  data: string;
1795
+ } | {
1796
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1797
+ type: "file-url";
1798
+ url: string;
1799
+ } | {
1800
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1801
+ type: "file-id";
1802
+ fileId: string | Record<string, string>;
1803
+ } | {
1804
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1805
+ type: "image-data";
1280
1806
  mediaType: string;
1807
+ data: string;
1808
+ } | {
1809
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1810
+ type: "image-url";
1811
+ url: string;
1812
+ } | {
1813
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1814
+ type: "image-file-id";
1815
+ fileId: string | Record<string, string>;
1816
+ } | {
1817
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1818
+ type: "custom";
1281
1819
  })[];
1282
1820
  } | undefined;
1283
1821
  result?: any;
@@ -1299,8 +1837,8 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1299
1837
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1300
1838
  id: string;
1301
1839
  type: "source";
1302
- sourceType: "url";
1303
1840
  url: string;
1841
+ sourceType: "url";
1304
1842
  } | {
1305
1843
  providerOptions?: Record<string, Record<string, any>> | undefined;
1306
1844
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -1310,7 +1848,13 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1310
1848
  type: "source";
1311
1849
  mediaType: string;
1312
1850
  sourceType: "document";
1313
- })[], [import("convex/values").VString<string, "required">, import("convex/values").VArray<({
1851
+ } | {
1852
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1853
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1854
+ type: "tool-approval-request";
1855
+ toolCallId: string;
1856
+ approvalId: string;
1857
+ })[], [import("convex/values").VString<string, "required">, import("convex/values").VArray<({
1314
1858
  providerOptions?: Record<string, Record<string, any>> | undefined;
1315
1859
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1316
1860
  type: "text";
@@ -1318,9 +1862,10 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1318
1862
  } | {
1319
1863
  providerOptions?: Record<string, Record<string, any>> | undefined;
1320
1864
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1865
+ mediaType?: string | undefined;
1866
+ mimeType?: string | undefined;
1321
1867
  filename?: string | undefined;
1322
1868
  type: "file";
1323
- mimeType: string;
1324
1869
  data: string | ArrayBuffer;
1325
1870
  } | {
1326
1871
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1336,6 +1881,16 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1336
1881
  } | {
1337
1882
  providerOptions?: Record<string, Record<string, any>> | undefined;
1338
1883
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1884
+ args?: any;
1885
+ providerExecuted?: boolean | undefined;
1886
+ type: "tool-call";
1887
+ toolCallId: string;
1888
+ toolName: string;
1889
+ input: any;
1890
+ } | {
1891
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1892
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1893
+ input?: any;
1339
1894
  providerExecuted?: boolean | undefined;
1340
1895
  type: "tool-call";
1341
1896
  toolCallId: string;
@@ -1347,26 +1902,65 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1347
1902
  args?: any;
1348
1903
  providerExecuted?: boolean | undefined;
1349
1904
  output?: {
1905
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1350
1906
  type: "text";
1351
1907
  value: string;
1352
1908
  } | {
1909
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1353
1910
  type: "json";
1354
1911
  value: any;
1355
1912
  } | {
1913
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1356
1914
  type: "error-text";
1357
1915
  value: string;
1358
1916
  } | {
1917
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1359
1918
  type: "error-json";
1360
1919
  value: any;
1920
+ } | {
1921
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1922
+ reason?: string | undefined;
1923
+ type: "execution-denied";
1361
1924
  } | {
1362
1925
  type: "content";
1363
1926
  value: ({
1927
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1364
1928
  type: "text";
1365
1929
  text: string;
1366
1930
  } | {
1367
1931
  type: "media";
1932
+ mediaType: string;
1368
1933
  data: string;
1934
+ } | {
1935
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1936
+ filename?: string | undefined;
1937
+ type: "file-data";
1369
1938
  mediaType: string;
1939
+ data: string;
1940
+ } | {
1941
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1942
+ type: "file-url";
1943
+ url: string;
1944
+ } | {
1945
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1946
+ type: "file-id";
1947
+ fileId: string | Record<string, string>;
1948
+ } | {
1949
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1950
+ type: "image-data";
1951
+ mediaType: string;
1952
+ data: string;
1953
+ } | {
1954
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1955
+ type: "image-url";
1956
+ url: string;
1957
+ } | {
1958
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1959
+ type: "image-file-id";
1960
+ fileId: string | Record<string, string>;
1961
+ } | {
1962
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1963
+ type: "custom";
1370
1964
  })[];
1371
1965
  } | undefined;
1372
1966
  result?: any;
@@ -1388,8 +1982,8 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1388
1982
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1389
1983
  id: string;
1390
1984
  type: "source";
1391
- sourceType: "url";
1392
1985
  url: string;
1986
+ sourceType: "url";
1393
1987
  } | {
1394
1988
  providerOptions?: Record<string, Record<string, any>> | undefined;
1395
1989
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -1399,6 +1993,12 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1399
1993
  type: "source";
1400
1994
  mediaType: string;
1401
1995
  sourceType: "document";
1996
+ } | {
1997
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1998
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1999
+ type: "tool-approval-request";
2000
+ toolCallId: string;
2001
+ approvalId: string;
1402
2002
  })[], import("convex/values").VUnion<{
1403
2003
  providerOptions?: Record<string, Record<string, any>> | undefined;
1404
2004
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -1407,9 +2007,10 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1407
2007
  } | {
1408
2008
  providerOptions?: Record<string, Record<string, any>> | undefined;
1409
2009
  providerMetadata?: Record<string, Record<string, any>> | undefined;
2010
+ mediaType?: string | undefined;
2011
+ mimeType?: string | undefined;
1410
2012
  filename?: string | undefined;
1411
2013
  type: "file";
1412
- mimeType: string;
1413
2014
  data: string | ArrayBuffer;
1414
2015
  } | {
1415
2016
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1425,6 +2026,16 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1425
2026
  } | {
1426
2027
  providerOptions?: Record<string, Record<string, any>> | undefined;
1427
2028
  providerMetadata?: Record<string, Record<string, any>> | undefined;
2029
+ args?: any;
2030
+ providerExecuted?: boolean | undefined;
2031
+ type: "tool-call";
2032
+ toolCallId: string;
2033
+ toolName: string;
2034
+ input: any;
2035
+ } | {
2036
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2037
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
2038
+ input?: any;
1428
2039
  providerExecuted?: boolean | undefined;
1429
2040
  type: "tool-call";
1430
2041
  toolCallId: string;
@@ -1436,26 +2047,65 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1436
2047
  args?: any;
1437
2048
  providerExecuted?: boolean | undefined;
1438
2049
  output?: {
2050
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1439
2051
  type: "text";
1440
2052
  value: string;
1441
2053
  } | {
2054
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1442
2055
  type: "json";
1443
2056
  value: any;
1444
2057
  } | {
2058
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1445
2059
  type: "error-text";
1446
2060
  value: string;
1447
2061
  } | {
2062
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1448
2063
  type: "error-json";
1449
2064
  value: any;
2065
+ } | {
2066
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2067
+ reason?: string | undefined;
2068
+ type: "execution-denied";
1450
2069
  } | {
1451
2070
  type: "content";
1452
2071
  value: ({
2072
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1453
2073
  type: "text";
1454
2074
  text: string;
1455
2075
  } | {
1456
2076
  type: "media";
2077
+ mediaType: string;
1457
2078
  data: string;
2079
+ } | {
2080
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2081
+ filename?: string | undefined;
2082
+ type: "file-data";
1458
2083
  mediaType: string;
2084
+ data: string;
2085
+ } | {
2086
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2087
+ type: "file-url";
2088
+ url: string;
2089
+ } | {
2090
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2091
+ type: "file-id";
2092
+ fileId: string | Record<string, string>;
2093
+ } | {
2094
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2095
+ type: "image-data";
2096
+ mediaType: string;
2097
+ data: string;
2098
+ } | {
2099
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2100
+ type: "image-url";
2101
+ url: string;
2102
+ } | {
2103
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2104
+ type: "image-file-id";
2105
+ fileId: string | Record<string, string>;
2106
+ } | {
2107
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2108
+ type: "custom";
1459
2109
  })[];
1460
2110
  } | undefined;
1461
2111
  result?: any;
@@ -1477,8 +2127,8 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1477
2127
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1478
2128
  id: string;
1479
2129
  type: "source";
1480
- sourceType: "url";
1481
2130
  url: string;
2131
+ sourceType: "url";
1482
2132
  } | {
1483
2133
  providerOptions?: Record<string, Record<string, any>> | undefined;
1484
2134
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -1488,6 +2138,12 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1488
2138
  type: "source";
1489
2139
  mediaType: string;
1490
2140
  sourceType: "document";
2141
+ } | {
2142
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2143
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
2144
+ type: "tool-approval-request";
2145
+ toolCallId: string;
2146
+ approvalId: string;
1491
2147
  }, [import("convex/values").VObject<{
1492
2148
  providerOptions?: Record<string, Record<string, any>> | undefined;
1493
2149
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -1501,18 +2157,20 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1501
2157
  }, "required", "type" | "providerOptions" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}`>, import("convex/values").VObject<{
1502
2158
  providerOptions?: Record<string, Record<string, any>> | undefined;
1503
2159
  providerMetadata?: Record<string, Record<string, any>> | undefined;
2160
+ mediaType?: string | undefined;
2161
+ mimeType?: string | undefined;
1504
2162
  filename?: string | undefined;
1505
2163
  type: "file";
1506
- mimeType: string;
1507
2164
  data: string | ArrayBuffer;
1508
2165
  }, {
1509
2166
  type: import("convex/values").VLiteral<"file", "required">;
1510
2167
  data: import("convex/values").VUnion<string | ArrayBuffer, [import("convex/values").VString<string, "required">, import("convex/values").VBytes<ArrayBuffer, "required">], "required", never>;
1511
2168
  filename: import("convex/values").VString<string | undefined, "optional">;
1512
- mimeType: import("convex/values").VString<string, "required">;
2169
+ mediaType: import("convex/values").VString<string | undefined, "optional">;
2170
+ mimeType: import("convex/values").VString<string | undefined, "optional">;
1513
2171
  providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1514
2172
  providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1515
- }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "mimeType" | "data" | "filename">, import("convex/values").VObject<{
2173
+ }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "mediaType" | "mimeType" | "data" | "filename">, import("convex/values").VObject<{
1516
2174
  providerOptions?: Record<string, Record<string, any>> | undefined;
1517
2175
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1518
2176
  signature?: string | undefined;
@@ -1534,9 +2192,46 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1534
2192
  data: import("convex/values").VString<string, "required">;
1535
2193
  providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1536
2194
  providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1537
- }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "data">, import("convex/values").VObject<{
2195
+ }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "data">, import("convex/values").VUnion<{
2196
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2197
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
2198
+ args?: any;
2199
+ providerExecuted?: boolean | undefined;
2200
+ type: "tool-call";
2201
+ toolCallId: string;
2202
+ toolName: string;
2203
+ input: any;
2204
+ } | {
2205
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2206
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
2207
+ input?: any;
2208
+ providerExecuted?: boolean | undefined;
2209
+ type: "tool-call";
2210
+ toolCallId: string;
2211
+ toolName: string;
2212
+ args: any;
2213
+ }, [import("convex/values").VObject<{
2214
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2215
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
2216
+ args?: any;
2217
+ providerExecuted?: boolean | undefined;
2218
+ type: "tool-call";
2219
+ toolCallId: string;
2220
+ toolName: string;
2221
+ input: any;
2222
+ }, {
2223
+ type: import("convex/values").VLiteral<"tool-call", "required">;
2224
+ toolCallId: import("convex/values").VString<string, "required">;
2225
+ toolName: import("convex/values").VString<string, "required">;
2226
+ input: import("convex/values").VAny<any, "required", string>;
2227
+ args: import("convex/values").VAny<any, "optional", string>;
2228
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
2229
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2230
+ providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2231
+ }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "toolCallId" | "toolName" | "input" | "args" | "providerExecuted" | `input.${string}` | `args.${string}`>, import("convex/values").VObject<{
1538
2232
  providerOptions?: Record<string, Record<string, any>> | undefined;
1539
2233
  providerMetadata?: Record<string, Record<string, any>> | undefined;
2234
+ input?: any;
1540
2235
  providerExecuted?: boolean | undefined;
1541
2236
  type: "tool-call";
1542
2237
  toolCallId: string;
@@ -1547,35 +2242,75 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1547
2242
  toolCallId: import("convex/values").VString<string, "required">;
1548
2243
  toolName: import("convex/values").VString<string, "required">;
1549
2244
  args: import("convex/values").VAny<any, "required", string>;
2245
+ input: import("convex/values").VAny<any, "optional", string>;
1550
2246
  providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
1551
2247
  providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1552
2248
  providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1553
- }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>, import("convex/values").VObject<{
2249
+ }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "toolCallId" | "toolName" | "input" | "args" | "providerExecuted" | `input.${string}` | `args.${string}`>], "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "toolCallId" | "toolName" | "input" | "args" | "providerExecuted" | `input.${string}` | `args.${string}`>, import("convex/values").VObject<{
1554
2250
  providerOptions?: Record<string, Record<string, any>> | undefined;
1555
2251
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1556
2252
  args?: any;
1557
2253
  providerExecuted?: boolean | undefined;
1558
2254
  output?: {
2255
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1559
2256
  type: "text";
1560
2257
  value: string;
1561
2258
  } | {
2259
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1562
2260
  type: "json";
1563
2261
  value: any;
1564
2262
  } | {
2263
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1565
2264
  type: "error-text";
1566
2265
  value: string;
1567
2266
  } | {
2267
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1568
2268
  type: "error-json";
1569
2269
  value: any;
2270
+ } | {
2271
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2272
+ reason?: string | undefined;
2273
+ type: "execution-denied";
1570
2274
  } | {
1571
2275
  type: "content";
1572
2276
  value: ({
2277
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1573
2278
  type: "text";
1574
2279
  text: string;
1575
2280
  } | {
1576
2281
  type: "media";
2282
+ mediaType: string;
2283
+ data: string;
2284
+ } | {
2285
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2286
+ filename?: string | undefined;
2287
+ type: "file-data";
2288
+ mediaType: string;
1577
2289
  data: string;
2290
+ } | {
2291
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2292
+ type: "file-url";
2293
+ url: string;
2294
+ } | {
2295
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2296
+ type: "file-id";
2297
+ fileId: string | Record<string, string>;
2298
+ } | {
2299
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2300
+ type: "image-data";
1578
2301
  mediaType: string;
2302
+ data: string;
2303
+ } | {
2304
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2305
+ type: "image-url";
2306
+ url: string;
2307
+ } | {
2308
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2309
+ type: "image-file-id";
2310
+ fileId: string | Record<string, string>;
2311
+ } | {
2312
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2313
+ type: "custom";
1579
2314
  })[];
1580
2315
  } | undefined;
1581
2316
  result?: any;
@@ -1596,93 +2331,303 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1596
2331
  toolCallId: import("convex/values").VString<string, "required">;
1597
2332
  toolName: import("convex/values").VString<string, "required">;
1598
2333
  output: import("convex/values").VUnion<{
2334
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1599
2335
  type: "text";
1600
2336
  value: string;
1601
2337
  } | {
2338
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1602
2339
  type: "json";
1603
2340
  value: any;
1604
2341
  } | {
2342
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1605
2343
  type: "error-text";
1606
2344
  value: string;
1607
2345
  } | {
2346
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1608
2347
  type: "error-json";
1609
2348
  value: any;
2349
+ } | {
2350
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2351
+ reason?: string | undefined;
2352
+ type: "execution-denied";
1610
2353
  } | {
1611
2354
  type: "content";
1612
2355
  value: ({
2356
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1613
2357
  type: "text";
1614
2358
  text: string;
1615
2359
  } | {
1616
2360
  type: "media";
2361
+ mediaType: string;
1617
2362
  data: string;
2363
+ } | {
2364
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2365
+ filename?: string | undefined;
2366
+ type: "file-data";
1618
2367
  mediaType: string;
2368
+ data: string;
2369
+ } | {
2370
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2371
+ type: "file-url";
2372
+ url: string;
2373
+ } | {
2374
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2375
+ type: "file-id";
2376
+ fileId: string | Record<string, string>;
2377
+ } | {
2378
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2379
+ type: "image-data";
2380
+ mediaType: string;
2381
+ data: string;
2382
+ } | {
2383
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2384
+ type: "image-url";
2385
+ url: string;
2386
+ } | {
2387
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2388
+ type: "image-file-id";
2389
+ fileId: string | Record<string, string>;
2390
+ } | {
2391
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2392
+ type: "custom";
1619
2393
  })[];
1620
2394
  } | undefined, [import("convex/values").VObject<{
2395
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1621
2396
  type: "text";
1622
2397
  value: string;
1623
2398
  }, {
1624
2399
  type: import("convex/values").VLiteral<"text", "required">;
1625
2400
  value: import("convex/values").VString<string, "required">;
1626
- }, "required", "type" | "value">, import("convex/values").VObject<{
2401
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2402
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "value">, import("convex/values").VObject<{
2403
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1627
2404
  type: "json";
1628
2405
  value: any;
1629
2406
  }, {
1630
2407
  type: import("convex/values").VLiteral<"json", "required">;
1631
2408
  value: import("convex/values").VAny<any, "required", string>;
1632
- }, "required", "type" | "value" | `value.${string}`>, import("convex/values").VObject<{
2409
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2410
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "value" | `value.${string}`>, import("convex/values").VObject<{
2411
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1633
2412
  type: "error-text";
1634
2413
  value: string;
1635
2414
  }, {
1636
2415
  type: import("convex/values").VLiteral<"error-text", "required">;
1637
2416
  value: import("convex/values").VString<string, "required">;
1638
- }, "required", "type" | "value">, import("convex/values").VObject<{
2417
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2418
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "value">, import("convex/values").VObject<{
2419
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1639
2420
  type: "error-json";
1640
2421
  value: any;
1641
2422
  }, {
1642
2423
  type: import("convex/values").VLiteral<"error-json", "required">;
1643
2424
  value: import("convex/values").VAny<any, "required", string>;
1644
- }, "required", "type" | "value" | `value.${string}`>, import("convex/values").VObject<{
2425
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2426
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "value" | `value.${string}`>, import("convex/values").VObject<{
2427
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2428
+ reason?: string | undefined;
2429
+ type: "execution-denied";
2430
+ }, {
2431
+ type: import("convex/values").VLiteral<"execution-denied", "required">;
2432
+ reason: import("convex/values").VString<string | undefined, "optional">;
2433
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2434
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "reason">, import("convex/values").VObject<{
1645
2435
  type: "content";
1646
2436
  value: ({
2437
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1647
2438
  type: "text";
1648
2439
  text: string;
1649
2440
  } | {
1650
2441
  type: "media";
2442
+ mediaType: string;
1651
2443
  data: string;
2444
+ } | {
2445
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2446
+ filename?: string | undefined;
2447
+ type: "file-data";
2448
+ mediaType: string;
2449
+ data: string;
2450
+ } | {
2451
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2452
+ type: "file-url";
2453
+ url: string;
2454
+ } | {
2455
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2456
+ type: "file-id";
2457
+ fileId: string | Record<string, string>;
2458
+ } | {
2459
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2460
+ type: "image-data";
1652
2461
  mediaType: string;
2462
+ data: string;
2463
+ } | {
2464
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2465
+ type: "image-url";
2466
+ url: string;
2467
+ } | {
2468
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2469
+ type: "image-file-id";
2470
+ fileId: string | Record<string, string>;
2471
+ } | {
2472
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2473
+ type: "custom";
1653
2474
  })[];
1654
2475
  }, {
1655
2476
  type: import("convex/values").VLiteral<"content", "required">;
1656
2477
  value: import("convex/values").VArray<({
2478
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1657
2479
  type: "text";
1658
2480
  text: string;
1659
2481
  } | {
1660
2482
  type: "media";
2483
+ mediaType: string;
1661
2484
  data: string;
2485
+ } | {
2486
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2487
+ filename?: string | undefined;
2488
+ type: "file-data";
2489
+ mediaType: string;
2490
+ data: string;
2491
+ } | {
2492
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2493
+ type: "file-url";
2494
+ url: string;
2495
+ } | {
2496
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2497
+ type: "file-id";
2498
+ fileId: string | Record<string, string>;
2499
+ } | {
2500
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2501
+ type: "image-data";
1662
2502
  mediaType: string;
2503
+ data: string;
2504
+ } | {
2505
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2506
+ type: "image-url";
2507
+ url: string;
2508
+ } | {
2509
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2510
+ type: "image-file-id";
2511
+ fileId: string | Record<string, string>;
2512
+ } | {
2513
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2514
+ type: "custom";
1663
2515
  })[], import("convex/values").VUnion<{
2516
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1664
2517
  type: "text";
1665
2518
  text: string;
1666
2519
  } | {
1667
2520
  type: "media";
2521
+ mediaType: string;
1668
2522
  data: string;
2523
+ } | {
2524
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2525
+ filename?: string | undefined;
2526
+ type: "file-data";
2527
+ mediaType: string;
2528
+ data: string;
2529
+ } | {
2530
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2531
+ type: "file-url";
2532
+ url: string;
2533
+ } | {
2534
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2535
+ type: "file-id";
2536
+ fileId: string | Record<string, string>;
2537
+ } | {
2538
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2539
+ type: "image-data";
1669
2540
  mediaType: string;
2541
+ data: string;
2542
+ } | {
2543
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2544
+ type: "image-url";
2545
+ url: string;
2546
+ } | {
2547
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2548
+ type: "image-file-id";
2549
+ fileId: string | Record<string, string>;
2550
+ } | {
2551
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2552
+ type: "custom";
1670
2553
  }, [import("convex/values").VObject<{
2554
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1671
2555
  type: "text";
1672
2556
  text: string;
1673
2557
  }, {
1674
2558
  type: import("convex/values").VLiteral<"text", "required">;
1675
2559
  text: import("convex/values").VString<string, "required">;
1676
- }, "required", "type" | "text">, import("convex/values").VObject<{
2560
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2561
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
1677
2562
  type: "media";
1678
- data: string;
1679
2563
  mediaType: string;
2564
+ data: string;
1680
2565
  }, {
1681
2566
  type: import("convex/values").VLiteral<"media", "required">;
1682
2567
  data: import("convex/values").VString<string, "required">;
1683
2568
  mediaType: import("convex/values").VString<string, "required">;
1684
- }, "required", "type" | "data" | "mediaType">], "required", "type" | "text" | "data" | "mediaType">, "required">;
1685
- }, "required", "type" | "value">], "optional", "type" | "value" | `value.${string}`>;
2569
+ }, "required", "type" | "mediaType" | "data">, import("convex/values").VObject<{
2570
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2571
+ filename?: string | undefined;
2572
+ type: "file-data";
2573
+ mediaType: string;
2574
+ data: string;
2575
+ }, {
2576
+ type: import("convex/values").VLiteral<"file-data", "required">;
2577
+ data: import("convex/values").VString<string, "required">;
2578
+ mediaType: import("convex/values").VString<string, "required">;
2579
+ filename: import("convex/values").VString<string | undefined, "optional">;
2580
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2581
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mediaType" | "data" | "filename">, import("convex/values").VObject<{
2582
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2583
+ type: "file-url";
2584
+ url: string;
2585
+ }, {
2586
+ type: import("convex/values").VLiteral<"file-url", "required">;
2587
+ url: import("convex/values").VString<string, "required">;
2588
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2589
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "url">, import("convex/values").VObject<{
2590
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2591
+ type: "file-id";
2592
+ fileId: string | Record<string, string>;
2593
+ }, {
2594
+ type: import("convex/values").VLiteral<"file-id", "required">;
2595
+ fileId: import("convex/values").VUnion<string | Record<string, string>, [import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, string>, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "required", string>], "required", string>;
2596
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2597
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "fileId" | `fileId.${string}`>, import("convex/values").VObject<{
2598
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2599
+ type: "image-data";
2600
+ mediaType: string;
2601
+ data: string;
2602
+ }, {
2603
+ type: import("convex/values").VLiteral<"image-data", "required">;
2604
+ data: import("convex/values").VString<string, "required">;
2605
+ mediaType: import("convex/values").VString<string, "required">;
2606
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2607
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mediaType" | "data">, import("convex/values").VObject<{
2608
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2609
+ type: "image-url";
2610
+ url: string;
2611
+ }, {
2612
+ type: import("convex/values").VLiteral<"image-url", "required">;
2613
+ url: import("convex/values").VString<string, "required">;
2614
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2615
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "url">, import("convex/values").VObject<{
2616
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2617
+ type: "image-file-id";
2618
+ fileId: string | Record<string, string>;
2619
+ }, {
2620
+ type: import("convex/values").VLiteral<"image-file-id", "required">;
2621
+ fileId: import("convex/values").VUnion<string | Record<string, string>, [import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, string>, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "required", string>], "required", string>;
2622
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2623
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "fileId" | `fileId.${string}`>, import("convex/values").VObject<{
2624
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2625
+ type: "custom";
2626
+ }, {
2627
+ type: import("convex/values").VLiteral<"custom", "required">;
2628
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2629
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mediaType" | "data" | "filename" | "url" | "fileId" | `fileId.${string}`>, "required">;
2630
+ }, "required", "type" | "value">], "optional", "type" | "providerOptions" | `providerOptions.${string}` | "value" | `value.${string}` | "reason">;
1686
2631
  providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1687
2632
  providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1688
2633
  providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
@@ -1718,14 +2663,14 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1718
2663
  data: import("convex/values").VString<string, "required">;
1719
2664
  mimeType: import("convex/values").VString<string | undefined, "optional">;
1720
2665
  }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
1721
- }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "output" | "result" | "isError" | "experimental_content" | "output.type" | "output.value" | `output.value.${string}` | `result.${string}`>, import("convex/values").VUnion<{
2666
+ }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "output" | "result" | "isError" | "experimental_content" | "output.type" | "output.providerOptions" | `output.providerOptions.${string}` | "output.value" | `output.value.${string}` | "output.reason" | `result.${string}`>, import("convex/values").VUnion<{
1722
2667
  title?: string | undefined;
1723
2668
  providerOptions?: Record<string, Record<string, any>> | undefined;
1724
2669
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1725
2670
  id: string;
1726
2671
  type: "source";
1727
- sourceType: "url";
1728
2672
  url: string;
2673
+ sourceType: "url";
1729
2674
  } | {
1730
2675
  providerOptions?: Record<string, Record<string, any>> | undefined;
1731
2676
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -1741,8 +2686,8 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1741
2686
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1742
2687
  id: string;
1743
2688
  type: "source";
1744
- sourceType: "url";
1745
2689
  url: string;
2690
+ sourceType: "url";
1746
2691
  }, {
1747
2692
  type: import("convex/values").VLiteral<"source", "required">;
1748
2693
  sourceType: import("convex/values").VLiteral<"url", "required">;
@@ -1751,7 +2696,7 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1751
2696
  title: import("convex/values").VString<string | undefined, "optional">;
1752
2697
  providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1753
2698
  providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1754
- }, "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "sourceType" | "url">, import("convex/values").VObject<{
2699
+ }, "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "url" | "sourceType">, import("convex/values").VObject<{
1755
2700
  providerOptions?: Record<string, Record<string, any>> | undefined;
1756
2701
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1757
2702
  filename?: string | undefined;
@@ -1769,37 +2714,88 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1769
2714
  filename: import("convex/values").VString<string | undefined, "optional">;
1770
2715
  providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1771
2716
  providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1772
- }, "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "filename" | "mediaType" | "sourceType">], "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "filename" | "mediaType" | "sourceType" | "url">], "required", "id" | "title" | "type" | "providerOptions" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "mimeType" | "data" | "filename" | "signature" | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "output" | "mediaType" | "result" | "isError" | "experimental_content" | "output.type" | "output.value" | `output.value.${string}` | `result.${string}` | "sourceType" | "url">, "required">], "required", never>;
2717
+ }, "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "mediaType" | "filename" | "sourceType">], "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "mediaType" | "filename" | "url" | "sourceType">, import("convex/values").VObject<{
2718
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2719
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
2720
+ type: "tool-approval-request";
2721
+ toolCallId: string;
2722
+ approvalId: string;
2723
+ }, {
2724
+ type: import("convex/values").VLiteral<"tool-approval-request", "required">;
2725
+ approvalId: import("convex/values").VString<string, "required">;
2726
+ toolCallId: import("convex/values").VString<string, "required">;
2727
+ providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2728
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2729
+ }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "toolCallId" | "approvalId">], "required", "id" | "title" | "type" | "providerOptions" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "mediaType" | "mimeType" | "data" | "filename" | "signature" | "toolCallId" | "toolName" | "input" | "args" | "providerExecuted" | `input.${string}` | `args.${string}` | "output" | "url" | "result" | "isError" | "experimental_content" | "output.type" | "output.providerOptions" | `output.providerOptions.${string}` | "output.value" | `output.value.${string}` | "output.reason" | `result.${string}` | "sourceType" | "approvalId">, "required">], "required", never>;
1773
2730
  providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1774
2731
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
1775
2732
  providerOptions?: Record<string, Record<string, any>> | undefined;
1776
2733
  role: "tool";
1777
- content: {
2734
+ content: ({
1778
2735
  providerOptions?: Record<string, Record<string, any>> | undefined;
1779
2736
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1780
2737
  args?: any;
1781
2738
  providerExecuted?: boolean | undefined;
1782
2739
  output?: {
2740
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1783
2741
  type: "text";
1784
2742
  value: string;
1785
2743
  } | {
2744
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1786
2745
  type: "json";
1787
2746
  value: any;
1788
2747
  } | {
2748
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1789
2749
  type: "error-text";
1790
2750
  value: string;
1791
2751
  } | {
2752
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1792
2753
  type: "error-json";
1793
2754
  value: any;
2755
+ } | {
2756
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2757
+ reason?: string | undefined;
2758
+ type: "execution-denied";
1794
2759
  } | {
1795
2760
  type: "content";
1796
2761
  value: ({
2762
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1797
2763
  type: "text";
1798
2764
  text: string;
1799
2765
  } | {
1800
2766
  type: "media";
2767
+ mediaType: string;
2768
+ data: string;
2769
+ } | {
2770
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2771
+ filename?: string | undefined;
2772
+ type: "file-data";
2773
+ mediaType: string;
1801
2774
  data: string;
2775
+ } | {
2776
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2777
+ type: "file-url";
2778
+ url: string;
2779
+ } | {
2780
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2781
+ type: "file-id";
2782
+ fileId: string | Record<string, string>;
2783
+ } | {
2784
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2785
+ type: "image-data";
1802
2786
  mediaType: string;
2787
+ data: string;
2788
+ } | {
2789
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2790
+ type: "image-url";
2791
+ url: string;
2792
+ } | {
2793
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2794
+ type: "image-file-id";
2795
+ fileId: string | Record<string, string>;
2796
+ } | {
2797
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2798
+ type: "custom";
1803
2799
  })[];
1804
2800
  } | undefined;
1805
2801
  result?: any;
@@ -1815,35 +2811,82 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1815
2811
  type: "tool-result";
1816
2812
  toolCallId: string;
1817
2813
  toolName: string;
1818
- }[];
2814
+ } | {
2815
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2816
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
2817
+ providerExecuted?: boolean | undefined;
2818
+ reason?: string | undefined;
2819
+ type: "tool-approval-response";
2820
+ approvalId: string;
2821
+ approved: boolean;
2822
+ })[];
1819
2823
  }, {
1820
2824
  role: import("convex/values").VLiteral<"tool", "required">;
1821
- content: import("convex/values").VArray<{
2825
+ content: import("convex/values").VArray<({
1822
2826
  providerOptions?: Record<string, Record<string, any>> | undefined;
1823
2827
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1824
2828
  args?: any;
1825
2829
  providerExecuted?: boolean | undefined;
1826
2830
  output?: {
2831
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1827
2832
  type: "text";
1828
2833
  value: string;
1829
2834
  } | {
2835
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1830
2836
  type: "json";
1831
2837
  value: any;
1832
2838
  } | {
2839
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1833
2840
  type: "error-text";
1834
2841
  value: string;
1835
2842
  } | {
2843
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1836
2844
  type: "error-json";
1837
2845
  value: any;
2846
+ } | {
2847
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2848
+ reason?: string | undefined;
2849
+ type: "execution-denied";
1838
2850
  } | {
1839
2851
  type: "content";
1840
2852
  value: ({
2853
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1841
2854
  type: "text";
1842
2855
  text: string;
1843
2856
  } | {
1844
2857
  type: "media";
2858
+ mediaType: string;
1845
2859
  data: string;
2860
+ } | {
2861
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2862
+ filename?: string | undefined;
2863
+ type: "file-data";
1846
2864
  mediaType: string;
2865
+ data: string;
2866
+ } | {
2867
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2868
+ type: "file-url";
2869
+ url: string;
2870
+ } | {
2871
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2872
+ type: "file-id";
2873
+ fileId: string | Record<string, string>;
2874
+ } | {
2875
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2876
+ type: "image-data";
2877
+ mediaType: string;
2878
+ data: string;
2879
+ } | {
2880
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2881
+ type: "image-url";
2882
+ url: string;
2883
+ } | {
2884
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2885
+ type: "image-file-id";
2886
+ fileId: string | Record<string, string>;
2887
+ } | {
2888
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2889
+ type: "custom";
1847
2890
  })[];
1848
2891
  } | undefined;
1849
2892
  result?: any;
@@ -1859,32 +2902,167 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1859
2902
  type: "tool-result";
1860
2903
  toolCallId: string;
1861
2904
  toolName: string;
1862
- }[], import("convex/values").VObject<{
2905
+ } | {
2906
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2907
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
2908
+ providerExecuted?: boolean | undefined;
2909
+ reason?: string | undefined;
2910
+ type: "tool-approval-response";
2911
+ approvalId: string;
2912
+ approved: boolean;
2913
+ })[], import("convex/values").VUnion<{
2914
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2915
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
2916
+ args?: any;
2917
+ providerExecuted?: boolean | undefined;
2918
+ output?: {
2919
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2920
+ type: "text";
2921
+ value: string;
2922
+ } | {
2923
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2924
+ type: "json";
2925
+ value: any;
2926
+ } | {
2927
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2928
+ type: "error-text";
2929
+ value: string;
2930
+ } | {
2931
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2932
+ type: "error-json";
2933
+ value: any;
2934
+ } | {
2935
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2936
+ reason?: string | undefined;
2937
+ type: "execution-denied";
2938
+ } | {
2939
+ type: "content";
2940
+ value: ({
2941
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2942
+ type: "text";
2943
+ text: string;
2944
+ } | {
2945
+ type: "media";
2946
+ mediaType: string;
2947
+ data: string;
2948
+ } | {
2949
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2950
+ filename?: string | undefined;
2951
+ type: "file-data";
2952
+ mediaType: string;
2953
+ data: string;
2954
+ } | {
2955
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2956
+ type: "file-url";
2957
+ url: string;
2958
+ } | {
2959
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2960
+ type: "file-id";
2961
+ fileId: string | Record<string, string>;
2962
+ } | {
2963
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2964
+ type: "image-data";
2965
+ mediaType: string;
2966
+ data: string;
2967
+ } | {
2968
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2969
+ type: "image-url";
2970
+ url: string;
2971
+ } | {
2972
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2973
+ type: "image-file-id";
2974
+ fileId: string | Record<string, string>;
2975
+ } | {
2976
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2977
+ type: "custom";
2978
+ })[];
2979
+ } | undefined;
2980
+ result?: any;
2981
+ isError?: boolean | undefined;
2982
+ experimental_content?: ({
2983
+ type: "text";
2984
+ text: string;
2985
+ } | {
2986
+ mimeType?: string | undefined;
2987
+ type: "image";
2988
+ data: string;
2989
+ })[] | undefined;
2990
+ type: "tool-result";
2991
+ toolCallId: string;
2992
+ toolName: string;
2993
+ } | {
2994
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2995
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
2996
+ providerExecuted?: boolean | undefined;
2997
+ reason?: string | undefined;
2998
+ type: "tool-approval-response";
2999
+ approvalId: string;
3000
+ approved: boolean;
3001
+ }, [import("convex/values").VObject<{
1863
3002
  providerOptions?: Record<string, Record<string, any>> | undefined;
1864
3003
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1865
3004
  args?: any;
1866
3005
  providerExecuted?: boolean | undefined;
1867
3006
  output?: {
3007
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1868
3008
  type: "text";
1869
3009
  value: string;
1870
3010
  } | {
3011
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1871
3012
  type: "json";
1872
3013
  value: any;
1873
3014
  } | {
3015
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1874
3016
  type: "error-text";
1875
3017
  value: string;
1876
3018
  } | {
3019
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1877
3020
  type: "error-json";
1878
3021
  value: any;
3022
+ } | {
3023
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3024
+ reason?: string | undefined;
3025
+ type: "execution-denied";
1879
3026
  } | {
1880
3027
  type: "content";
1881
3028
  value: ({
3029
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1882
3030
  type: "text";
1883
3031
  text: string;
1884
3032
  } | {
1885
3033
  type: "media";
3034
+ mediaType: string;
3035
+ data: string;
3036
+ } | {
3037
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3038
+ filename?: string | undefined;
3039
+ type: "file-data";
3040
+ mediaType: string;
1886
3041
  data: string;
3042
+ } | {
3043
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3044
+ type: "file-url";
3045
+ url: string;
3046
+ } | {
3047
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3048
+ type: "file-id";
3049
+ fileId: string | Record<string, string>;
3050
+ } | {
3051
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3052
+ type: "image-data";
1887
3053
  mediaType: string;
3054
+ data: string;
3055
+ } | {
3056
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3057
+ type: "image-url";
3058
+ url: string;
3059
+ } | {
3060
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3061
+ type: "image-file-id";
3062
+ fileId: string | Record<string, string>;
3063
+ } | {
3064
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3065
+ type: "custom";
1888
3066
  })[];
1889
3067
  } | undefined;
1890
3068
  result?: any;
@@ -1905,93 +3083,303 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
1905
3083
  toolCallId: import("convex/values").VString<string, "required">;
1906
3084
  toolName: import("convex/values").VString<string, "required">;
1907
3085
  output: import("convex/values").VUnion<{
3086
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1908
3087
  type: "text";
1909
3088
  value: string;
1910
3089
  } | {
3090
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1911
3091
  type: "json";
1912
3092
  value: any;
1913
3093
  } | {
3094
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1914
3095
  type: "error-text";
1915
3096
  value: string;
1916
3097
  } | {
3098
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1917
3099
  type: "error-json";
1918
3100
  value: any;
3101
+ } | {
3102
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3103
+ reason?: string | undefined;
3104
+ type: "execution-denied";
1919
3105
  } | {
1920
3106
  type: "content";
1921
3107
  value: ({
3108
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1922
3109
  type: "text";
1923
3110
  text: string;
1924
3111
  } | {
1925
3112
  type: "media";
3113
+ mediaType: string;
1926
3114
  data: string;
3115
+ } | {
3116
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3117
+ filename?: string | undefined;
3118
+ type: "file-data";
1927
3119
  mediaType: string;
3120
+ data: string;
3121
+ } | {
3122
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3123
+ type: "file-url";
3124
+ url: string;
3125
+ } | {
3126
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3127
+ type: "file-id";
3128
+ fileId: string | Record<string, string>;
3129
+ } | {
3130
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3131
+ type: "image-data";
3132
+ mediaType: string;
3133
+ data: string;
3134
+ } | {
3135
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3136
+ type: "image-url";
3137
+ url: string;
3138
+ } | {
3139
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3140
+ type: "image-file-id";
3141
+ fileId: string | Record<string, string>;
3142
+ } | {
3143
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3144
+ type: "custom";
1928
3145
  })[];
1929
3146
  } | undefined, [import("convex/values").VObject<{
3147
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1930
3148
  type: "text";
1931
3149
  value: string;
1932
3150
  }, {
1933
3151
  type: import("convex/values").VLiteral<"text", "required">;
1934
3152
  value: import("convex/values").VString<string, "required">;
1935
- }, "required", "type" | "value">, import("convex/values").VObject<{
3153
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3154
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "value">, import("convex/values").VObject<{
3155
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1936
3156
  type: "json";
1937
3157
  value: any;
1938
3158
  }, {
1939
3159
  type: import("convex/values").VLiteral<"json", "required">;
1940
3160
  value: import("convex/values").VAny<any, "required", string>;
1941
- }, "required", "type" | "value" | `value.${string}`>, import("convex/values").VObject<{
3161
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3162
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "value" | `value.${string}`>, import("convex/values").VObject<{
3163
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1942
3164
  type: "error-text";
1943
3165
  value: string;
1944
3166
  }, {
1945
3167
  type: import("convex/values").VLiteral<"error-text", "required">;
1946
3168
  value: import("convex/values").VString<string, "required">;
1947
- }, "required", "type" | "value">, import("convex/values").VObject<{
3169
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3170
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "value">, import("convex/values").VObject<{
3171
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1948
3172
  type: "error-json";
1949
3173
  value: any;
1950
3174
  }, {
1951
3175
  type: import("convex/values").VLiteral<"error-json", "required">;
1952
3176
  value: import("convex/values").VAny<any, "required", string>;
1953
- }, "required", "type" | "value" | `value.${string}`>, import("convex/values").VObject<{
3177
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3178
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "value" | `value.${string}`>, import("convex/values").VObject<{
3179
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3180
+ reason?: string | undefined;
3181
+ type: "execution-denied";
3182
+ }, {
3183
+ type: import("convex/values").VLiteral<"execution-denied", "required">;
3184
+ reason: import("convex/values").VString<string | undefined, "optional">;
3185
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3186
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "reason">, import("convex/values").VObject<{
1954
3187
  type: "content";
1955
3188
  value: ({
3189
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1956
3190
  type: "text";
1957
3191
  text: string;
1958
3192
  } | {
1959
3193
  type: "media";
3194
+ mediaType: string;
1960
3195
  data: string;
3196
+ } | {
3197
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3198
+ filename?: string | undefined;
3199
+ type: "file-data";
1961
3200
  mediaType: string;
3201
+ data: string;
3202
+ } | {
3203
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3204
+ type: "file-url";
3205
+ url: string;
3206
+ } | {
3207
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3208
+ type: "file-id";
3209
+ fileId: string | Record<string, string>;
3210
+ } | {
3211
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3212
+ type: "image-data";
3213
+ mediaType: string;
3214
+ data: string;
3215
+ } | {
3216
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3217
+ type: "image-url";
3218
+ url: string;
3219
+ } | {
3220
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3221
+ type: "image-file-id";
3222
+ fileId: string | Record<string, string>;
3223
+ } | {
3224
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3225
+ type: "custom";
1962
3226
  })[];
1963
3227
  }, {
1964
3228
  type: import("convex/values").VLiteral<"content", "required">;
1965
3229
  value: import("convex/values").VArray<({
3230
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1966
3231
  type: "text";
1967
3232
  text: string;
1968
3233
  } | {
1969
3234
  type: "media";
3235
+ mediaType: string;
1970
3236
  data: string;
3237
+ } | {
3238
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3239
+ filename?: string | undefined;
3240
+ type: "file-data";
1971
3241
  mediaType: string;
3242
+ data: string;
3243
+ } | {
3244
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3245
+ type: "file-url";
3246
+ url: string;
3247
+ } | {
3248
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3249
+ type: "file-id";
3250
+ fileId: string | Record<string, string>;
3251
+ } | {
3252
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3253
+ type: "image-data";
3254
+ mediaType: string;
3255
+ data: string;
3256
+ } | {
3257
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3258
+ type: "image-url";
3259
+ url: string;
3260
+ } | {
3261
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3262
+ type: "image-file-id";
3263
+ fileId: string | Record<string, string>;
3264
+ } | {
3265
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3266
+ type: "custom";
1972
3267
  })[], import("convex/values").VUnion<{
3268
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1973
3269
  type: "text";
1974
3270
  text: string;
1975
3271
  } | {
1976
3272
  type: "media";
3273
+ mediaType: string;
1977
3274
  data: string;
3275
+ } | {
3276
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3277
+ filename?: string | undefined;
3278
+ type: "file-data";
1978
3279
  mediaType: string;
3280
+ data: string;
3281
+ } | {
3282
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3283
+ type: "file-url";
3284
+ url: string;
3285
+ } | {
3286
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3287
+ type: "file-id";
3288
+ fileId: string | Record<string, string>;
3289
+ } | {
3290
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3291
+ type: "image-data";
3292
+ mediaType: string;
3293
+ data: string;
3294
+ } | {
3295
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3296
+ type: "image-url";
3297
+ url: string;
3298
+ } | {
3299
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3300
+ type: "image-file-id";
3301
+ fileId: string | Record<string, string>;
3302
+ } | {
3303
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3304
+ type: "custom";
1979
3305
  }, [import("convex/values").VObject<{
3306
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1980
3307
  type: "text";
1981
3308
  text: string;
1982
3309
  }, {
1983
3310
  type: import("convex/values").VLiteral<"text", "required">;
1984
3311
  text: import("convex/values").VString<string, "required">;
1985
- }, "required", "type" | "text">, import("convex/values").VObject<{
3312
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3313
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
1986
3314
  type: "media";
1987
- data: string;
1988
3315
  mediaType: string;
3316
+ data: string;
1989
3317
  }, {
1990
3318
  type: import("convex/values").VLiteral<"media", "required">;
1991
3319
  data: import("convex/values").VString<string, "required">;
1992
3320
  mediaType: import("convex/values").VString<string, "required">;
1993
- }, "required", "type" | "data" | "mediaType">], "required", "type" | "text" | "data" | "mediaType">, "required">;
1994
- }, "required", "type" | "value">], "optional", "type" | "value" | `value.${string}`>;
3321
+ }, "required", "type" | "mediaType" | "data">, import("convex/values").VObject<{
3322
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3323
+ filename?: string | undefined;
3324
+ type: "file-data";
3325
+ mediaType: string;
3326
+ data: string;
3327
+ }, {
3328
+ type: import("convex/values").VLiteral<"file-data", "required">;
3329
+ data: import("convex/values").VString<string, "required">;
3330
+ mediaType: import("convex/values").VString<string, "required">;
3331
+ filename: import("convex/values").VString<string | undefined, "optional">;
3332
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3333
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mediaType" | "data" | "filename">, import("convex/values").VObject<{
3334
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3335
+ type: "file-url";
3336
+ url: string;
3337
+ }, {
3338
+ type: import("convex/values").VLiteral<"file-url", "required">;
3339
+ url: import("convex/values").VString<string, "required">;
3340
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3341
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "url">, import("convex/values").VObject<{
3342
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3343
+ type: "file-id";
3344
+ fileId: string | Record<string, string>;
3345
+ }, {
3346
+ type: import("convex/values").VLiteral<"file-id", "required">;
3347
+ fileId: import("convex/values").VUnion<string | Record<string, string>, [import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, string>, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "required", string>], "required", string>;
3348
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3349
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "fileId" | `fileId.${string}`>, import("convex/values").VObject<{
3350
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3351
+ type: "image-data";
3352
+ mediaType: string;
3353
+ data: string;
3354
+ }, {
3355
+ type: import("convex/values").VLiteral<"image-data", "required">;
3356
+ data: import("convex/values").VString<string, "required">;
3357
+ mediaType: import("convex/values").VString<string, "required">;
3358
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3359
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mediaType" | "data">, import("convex/values").VObject<{
3360
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3361
+ type: "image-url";
3362
+ url: string;
3363
+ }, {
3364
+ type: import("convex/values").VLiteral<"image-url", "required">;
3365
+ url: import("convex/values").VString<string, "required">;
3366
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3367
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "url">, import("convex/values").VObject<{
3368
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3369
+ type: "image-file-id";
3370
+ fileId: string | Record<string, string>;
3371
+ }, {
3372
+ type: import("convex/values").VLiteral<"image-file-id", "required">;
3373
+ fileId: import("convex/values").VUnion<string | Record<string, string>, [import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, string>, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "required", string>], "required", string>;
3374
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3375
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "fileId" | `fileId.${string}`>, import("convex/values").VObject<{
3376
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3377
+ type: "custom";
3378
+ }, {
3379
+ type: import("convex/values").VLiteral<"custom", "required">;
3380
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3381
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mediaType" | "data" | "filename" | "url" | "fileId" | `fileId.${string}`>, "required">;
3382
+ }, "required", "type" | "value">], "optional", "type" | "providerOptions" | `providerOptions.${string}` | "value" | `value.${string}` | "reason">;
1995
3383
  providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1996
3384
  providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1997
3385
  providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
@@ -2027,7 +3415,23 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
2027
3415
  data: import("convex/values").VString<string, "required">;
2028
3416
  mimeType: import("convex/values").VString<string | undefined, "optional">;
2029
3417
  }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
2030
- }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "output" | "result" | "isError" | "experimental_content" | "output.type" | "output.value" | `output.value.${string}` | `result.${string}`>, "required">;
3418
+ }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "output" | "result" | "isError" | "experimental_content" | "output.type" | "output.providerOptions" | `output.providerOptions.${string}` | "output.value" | `output.value.${string}` | "output.reason" | `result.${string}`>, import("convex/values").VObject<{
3419
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3420
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
3421
+ providerExecuted?: boolean | undefined;
3422
+ reason?: string | undefined;
3423
+ type: "tool-approval-response";
3424
+ approvalId: string;
3425
+ approved: boolean;
3426
+ }, {
3427
+ type: import("convex/values").VLiteral<"tool-approval-response", "required">;
3428
+ approvalId: import("convex/values").VString<string, "required">;
3429
+ approved: import("convex/values").VBoolean<boolean, "required">;
3430
+ reason: import("convex/values").VString<string | undefined, "optional">;
3431
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
3432
+ providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3433
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3434
+ }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "providerExecuted" | "reason" | "approvalId" | "approved">], "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "output" | "reason" | "result" | "isError" | "experimental_content" | "output.type" | "output.providerOptions" | `output.providerOptions.${string}` | "output.value" | `output.value.${string}` | "output.reason" | `result.${string}` | "approvalId" | "approved">, "required">;
2031
3435
  providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2032
3436
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
2033
3437
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -2060,8 +3464,8 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
2060
3464
  providerOptions?: Record<string, Record<string, any>> | undefined;
2061
3465
  providerMetadata?: Record<string, Record<string, any>> | undefined;
2062
3466
  id: string;
2063
- sourceType: "url";
2064
3467
  url: string;
3468
+ sourceType: "url";
2065
3469
  } | {
2066
3470
  providerOptions?: Record<string, Record<string, any>> | undefined;
2067
3471
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -2077,8 +3481,8 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
2077
3481
  providerOptions?: Record<string, Record<string, any>> | undefined;
2078
3482
  providerMetadata?: Record<string, Record<string, any>> | undefined;
2079
3483
  id: string;
2080
- sourceType: "url";
2081
3484
  url: string;
3485
+ sourceType: "url";
2082
3486
  } | {
2083
3487
  providerOptions?: Record<string, Record<string, any>> | undefined;
2084
3488
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -2094,8 +3498,8 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
2094
3498
  providerOptions?: Record<string, Record<string, any>> | undefined;
2095
3499
  providerMetadata?: Record<string, Record<string, any>> | undefined;
2096
3500
  id: string;
2097
- sourceType: "url";
2098
3501
  url: string;
3502
+ sourceType: "url";
2099
3503
  }, {
2100
3504
  type: import("convex/values").VLiteral<"source" | undefined, "optional">;
2101
3505
  sourceType: import("convex/values").VLiteral<"url", "required">;
@@ -2104,7 +3508,7 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
2104
3508
  title: import("convex/values").VString<string | undefined, "optional">;
2105
3509
  providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2106
3510
  providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2107
- }, "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "sourceType" | "url">, import("convex/values").VObject<{
3511
+ }, "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "url" | "sourceType">, import("convex/values").VObject<{
2108
3512
  providerOptions?: Record<string, Record<string, any>> | undefined;
2109
3513
  providerMetadata?: Record<string, Record<string, any>> | undefined;
2110
3514
  filename?: string | undefined;
@@ -2122,7 +3526,7 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
2122
3526
  filename: import("convex/values").VString<string | undefined, "optional">;
2123
3527
  providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2124
3528
  providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2125
- }, "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "filename" | "mediaType" | "sourceType">], "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "filename" | "mediaType" | "sourceType" | "url">, "optional">;
3529
+ }, "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "mediaType" | "filename" | "sourceType">], "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "mediaType" | "filename" | "url" | "sourceType">, "optional">;
2126
3530
  warnings: import("convex/values").VArray<({
2127
3531
  details?: string | undefined;
2128
3532
  type: "unsupported-setting";
@@ -2168,7 +3572,7 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
2168
3572
  type: import("convex/values").VLiteral<"other", "required">;
2169
3573
  message: import("convex/values").VString<string, "required">;
2170
3574
  }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
2171
- finishReason: import("convex/values").VUnion<"length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined, [import("convex/values").VLiteral<"stop", "required">, import("convex/values").VLiteral<"length", "required">, import("convex/values").VLiteral<"content-filter", "required">, import("convex/values").VLiteral<"tool-calls", "required">, import("convex/values").VLiteral<"error", "required">, import("convex/values").VLiteral<"other", "required">, import("convex/values").VLiteral<"unknown", "required">], "optional", never>;
3575
+ finishReason: import("convex/values").VUnion<"error" | "length" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined, [import("convex/values").VLiteral<"stop", "required">, import("convex/values").VLiteral<"length", "required">, import("convex/values").VLiteral<"content-filter", "required">, import("convex/values").VLiteral<"tool-calls", "required">, import("convex/values").VLiteral<"error", "required">, import("convex/values").VLiteral<"other", "required">, import("convex/values").VLiteral<"unknown", "required">], "optional", never>;
2172
3576
  reasoning: import("convex/values").VString<string | undefined, "optional">;
2173
3577
  reasoningDetails: import("convex/values").VArray<({
2174
3578
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -2224,7 +3628,7 @@ export declare const vStreamMessagesReturnValue: import("convex/values").VObject
2224
3628
  data: import("convex/values").VString<string, "required">;
2225
3629
  }, "required", "type" | "data">], "required", "type" | "providerOptions" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "data" | "signature">, "optional">;
2226
3630
  id: import("convex/values").VString<string | undefined, "optional">;
2227
- }, "required", "_id" | "_creationTime" | "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "reasoning" | "tool" | "usage" | "sources" | "warnings" | "finishReason" | "reasoningDetails" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "usage.reasoningTokens" | "usage.cachedInputTokens">, "required">;
3631
+ }, "required", "id" | "status" | "userId" | "order" | "_creationTime" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "reasoning" | "tool" | "usage" | "sources" | "warnings" | "finishReason" | "reasoningDetails" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "usage.reasoningTokens" | "usage.cachedInputTokens" | "_id">, "required">;
2228
3632
  continueCursor: import("convex/values").VString<string, "required">;
2229
3633
  isDone: import("convex/values").VBoolean<boolean, "required">;
2230
3634
  splitCursor: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "optional", never>;