@convex-dev/agent 0.1.18-alpha.1 → 0.5.0-alpha.1

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 (71) hide show
  1. package/dist/client/createTool.d.ts +30 -9
  2. package/dist/client/createTool.d.ts.map +1 -1
  3. package/dist/client/createTool.js +24 -9
  4. package/dist/client/createTool.js.map +1 -1
  5. package/dist/client/definePlaygroundAPI.d.ts +174 -199
  6. package/dist/client/definePlaygroundAPI.d.ts.map +1 -1
  7. package/dist/client/definePlaygroundAPI.js +12 -19
  8. package/dist/client/definePlaygroundAPI.js.map +1 -1
  9. package/dist/client/files.js +4 -4
  10. package/dist/client/files.js.map +1 -1
  11. package/dist/client/index.d.ts +166 -63
  12. package/dist/client/index.d.ts.map +1 -1
  13. package/dist/client/index.js +75 -45
  14. package/dist/client/index.js.map +1 -1
  15. package/dist/client/search.d.ts +27 -6
  16. package/dist/client/search.d.ts.map +1 -1
  17. package/dist/client/search.js.map +1 -1
  18. package/dist/client/streaming.d.ts +3 -2
  19. package/dist/client/streaming.d.ts.map +1 -1
  20. package/dist/client/streaming.js.map +1 -1
  21. package/dist/client/types.d.ts +27 -41
  22. package/dist/client/types.d.ts.map +1 -1
  23. package/dist/component/_generated/api.d.ts +436 -73
  24. package/dist/component/messages.d.ts +246 -43
  25. package/dist/component/messages.d.ts.map +1 -1
  26. package/dist/component/messages.js +2 -2
  27. package/dist/component/messages.js.map +1 -1
  28. package/dist/component/schema.d.ts +1453 -152
  29. package/dist/component/schema.d.ts.map +1 -1
  30. package/dist/component/schema.js +2 -2
  31. package/dist/component/schema.js.map +1 -1
  32. package/dist/component/streams.d.ts +180 -6
  33. package/dist/component/streams.d.ts.map +1 -1
  34. package/dist/mapping.d.ts +12 -14
  35. package/dist/mapping.d.ts.map +1 -1
  36. package/dist/mapping.js +187 -47
  37. package/dist/mapping.js.map +1 -1
  38. package/dist/react/deltas.d.ts +0 -3
  39. package/dist/react/deltas.d.ts.map +1 -1
  40. package/dist/react/deltas.js +140 -44
  41. package/dist/react/deltas.js.map +1 -1
  42. package/dist/react/optimisticallySendMessage.d.ts.map +1 -1
  43. package/dist/react/optimisticallySendMessage.js +2 -1
  44. package/dist/react/optimisticallySendMessage.js.map +1 -1
  45. package/dist/react/toUIMessages.d.ts +5 -4
  46. package/dist/react/toUIMessages.d.ts.map +1 -1
  47. package/dist/react/toUIMessages.js +103 -40
  48. package/dist/react/toUIMessages.js.map +1 -1
  49. package/dist/validators.d.ts +1798 -259
  50. package/dist/validators.d.ts.map +1 -1
  51. package/dist/validators.js +79 -15
  52. package/dist/validators.js.map +1 -1
  53. package/package.json +2 -2
  54. package/src/client/createTool.ts +68 -37
  55. package/src/client/definePlaygroundAPI.ts +24 -25
  56. package/src/client/files.ts +4 -4
  57. package/src/client/index.test.ts +14 -12
  58. package/src/client/index.ts +134 -94
  59. package/src/client/search.ts +3 -2
  60. package/src/client/streaming.ts +4 -3
  61. package/src/client/types.ts +34 -70
  62. package/src/component/_generated/api.d.ts +436 -73
  63. package/src/component/messages.ts +2 -2
  64. package/src/component/schema.ts +2 -2
  65. package/src/mapping.ts +228 -75
  66. package/src/react/deltas.ts +165 -52
  67. package/src/react/optimisticallySendMessage.ts +4 -1
  68. package/src/react/toUIMessages.test.ts +154 -36
  69. package/src/react/toUIMessages.ts +136 -57
  70. package/src/validators.test.ts +2 -99
  71. package/src/validators.ts +95 -17
@@ -121,6 +121,7 @@ export declare const vUserContent: import("convex/values").VUnion<string | ({
121
121
  export declare const vReasoningPart: import("convex/values").VObject<{
122
122
  providerOptions?: Record<string, Record<string, any>> | undefined;
123
123
  signature?: string | undefined;
124
+ state?: "streaming" | "done" | undefined;
124
125
  type: "reasoning";
125
126
  text: string;
126
127
  }, {
@@ -128,7 +129,8 @@ export declare const vReasoningPart: import("convex/values").VObject<{
128
129
  text: import("convex/values").VString<string, "required">;
129
130
  signature: import("convex/values").VString<string | undefined, "optional">;
130
131
  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>;
131
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature">;
132
+ state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
133
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">;
132
134
  export declare const vRedactedReasoningPart: import("convex/values").VObject<{
133
135
  providerOptions?: Record<string, Record<string, any>> | undefined;
134
136
  type: "redacted-reasoning";
@@ -139,6 +141,12 @@ export declare const vRedactedReasoningPart: import("convex/values").VObject<{
139
141
  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>;
140
142
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "data">;
141
143
  export declare const vReasoningDetails: import("convex/values").VArray<({
144
+ providerOptions?: Record<string, Record<string, any>> | undefined;
145
+ signature?: string | undefined;
146
+ state?: "streaming" | "done" | undefined;
147
+ type: "reasoning";
148
+ text: string;
149
+ } | {
142
150
  signature?: string | undefined;
143
151
  type: "text";
144
152
  text: string;
@@ -146,6 +154,12 @@ export declare const vReasoningDetails: import("convex/values").VArray<({
146
154
  type: "redacted";
147
155
  data: string;
148
156
  })[], import("convex/values").VUnion<{
157
+ providerOptions?: Record<string, Record<string, any>> | undefined;
158
+ signature?: string | undefined;
159
+ state?: "streaming" | "done" | undefined;
160
+ type: "reasoning";
161
+ text: string;
162
+ } | {
149
163
  signature?: string | undefined;
150
164
  type: "text";
151
165
  text: string;
@@ -153,6 +167,18 @@ export declare const vReasoningDetails: import("convex/values").VArray<({
153
167
  type: "redacted";
154
168
  data: string;
155
169
  }, [import("convex/values").VObject<{
170
+ providerOptions?: Record<string, Record<string, any>> | undefined;
171
+ signature?: string | undefined;
172
+ state?: "streaming" | "done" | undefined;
173
+ type: "reasoning";
174
+ text: string;
175
+ }, {
176
+ type: import("convex/values").VLiteral<"reasoning", "required">;
177
+ text: import("convex/values").VString<string, "required">;
178
+ signature: import("convex/values").VString<string | undefined, "optional">;
179
+ 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>;
180
+ state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
181
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">, import("convex/values").VObject<{
156
182
  signature?: string | undefined;
157
183
  type: "text";
158
184
  text: string;
@@ -166,9 +192,10 @@ export declare const vReasoningDetails: import("convex/values").VArray<({
166
192
  }, {
167
193
  type: import("convex/values").VLiteral<"redacted", "required">;
168
194
  data: import("convex/values").VString<string, "required">;
169
- }, "required", "type" | "data">], "required", "type" | "text" | "data" | "signature">, "required">;
195
+ }, "required", "type" | "data">], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "data" | "signature" | "state">, "required">;
170
196
  export declare const vToolCallPart: import("convex/values").VObject<{
171
197
  providerOptions?: Record<string, Record<string, any>> | undefined;
198
+ providerExecuted?: boolean | undefined;
172
199
  type: "tool-call";
173
200
  toolCallId: string;
174
201
  toolName: string;
@@ -179,7 +206,8 @@ export declare const vToolCallPart: import("convex/values").VObject<{
179
206
  toolName: import("convex/values").VString<string, "required">;
180
207
  args: import("convex/values").VAny<any, "required", string>;
181
208
  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>;
182
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>;
209
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
210
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>;
183
211
  export declare const vAssistantContent: import("convex/values").VUnion<string | ({
184
212
  providerOptions?: Record<string, Record<string, any>> | undefined;
185
213
  type: "text";
@@ -193,6 +221,7 @@ export declare const vAssistantContent: import("convex/values").VUnion<string |
193
221
  } | {
194
222
  providerOptions?: Record<string, Record<string, any>> | undefined;
195
223
  signature?: string | undefined;
224
+ state?: "streaming" | "done" | undefined;
196
225
  type: "reasoning";
197
226
  text: string;
198
227
  } | {
@@ -201,6 +230,7 @@ export declare const vAssistantContent: import("convex/values").VUnion<string |
201
230
  data: string;
202
231
  } | {
203
232
  providerOptions?: Record<string, Record<string, any>> | undefined;
233
+ providerExecuted?: boolean | undefined;
204
234
  type: "tool-call";
205
235
  toolCallId: string;
206
236
  toolName: string;
@@ -218,6 +248,7 @@ export declare const vAssistantContent: import("convex/values").VUnion<string |
218
248
  } | {
219
249
  providerOptions?: Record<string, Record<string, any>> | undefined;
220
250
  signature?: string | undefined;
251
+ state?: "streaming" | "done" | undefined;
221
252
  type: "reasoning";
222
253
  text: string;
223
254
  } | {
@@ -226,6 +257,7 @@ export declare const vAssistantContent: import("convex/values").VUnion<string |
226
257
  data: string;
227
258
  } | {
228
259
  providerOptions?: Record<string, Record<string, any>> | undefined;
260
+ providerExecuted?: boolean | undefined;
229
261
  type: "tool-call";
230
262
  toolCallId: string;
231
263
  toolName: string;
@@ -243,6 +275,7 @@ export declare const vAssistantContent: import("convex/values").VUnion<string |
243
275
  } | {
244
276
  providerOptions?: Record<string, Record<string, any>> | undefined;
245
277
  signature?: string | undefined;
278
+ state?: "streaming" | "done" | undefined;
246
279
  type: "reasoning";
247
280
  text: string;
248
281
  } | {
@@ -251,6 +284,7 @@ export declare const vAssistantContent: import("convex/values").VUnion<string |
251
284
  data: string;
252
285
  } | {
253
286
  providerOptions?: Record<string, Record<string, any>> | undefined;
287
+ providerExecuted?: boolean | undefined;
254
288
  type: "tool-call";
255
289
  toolCallId: string;
256
290
  toolName: string;
@@ -278,6 +312,7 @@ export declare const vAssistantContent: import("convex/values").VUnion<string |
278
312
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">, import("convex/values").VObject<{
279
313
  providerOptions?: Record<string, Record<string, any>> | undefined;
280
314
  signature?: string | undefined;
315
+ state?: "streaming" | "done" | undefined;
281
316
  type: "reasoning";
282
317
  text: string;
283
318
  }, {
@@ -285,7 +320,8 @@ export declare const vAssistantContent: import("convex/values").VUnion<string |
285
320
  text: import("convex/values").VString<string, "required">;
286
321
  signature: import("convex/values").VString<string | undefined, "optional">;
287
322
  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>;
288
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
323
+ state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
324
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">, import("convex/values").VObject<{
289
325
  providerOptions?: Record<string, Record<string, any>> | undefined;
290
326
  type: "redacted-reasoning";
291
327
  data: string;
@@ -295,6 +331,7 @@ export declare const vAssistantContent: import("convex/values").VUnion<string |
295
331
  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>;
296
332
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "data">, import("convex/values").VObject<{
297
333
  providerOptions?: Record<string, Record<string, any>> | undefined;
334
+ providerExecuted?: boolean | undefined;
298
335
  type: "tool-call";
299
336
  toolCallId: string;
300
337
  toolName: string;
@@ -305,10 +342,13 @@ export declare const vAssistantContent: import("convex/values").VUnion<string |
305
342
  toolName: import("convex/values").VString<string, "required">;
306
343
  args: import("convex/values").VAny<any, "required", string>;
307
344
  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>;
308
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "toolCallId" | "toolName" | "args" | `args.${string}`>, "required">], "required", never>;
309
- export declare const vToolContent: import("convex/values").VArray<{
345
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
346
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "state" | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>, "required">], "required", never>;
347
+ export declare const vToolResultPart: import("convex/values").VObject<{
310
348
  providerOptions?: Record<string, Record<string, any>> | undefined;
311
349
  args?: any;
350
+ providerExecuted?: boolean | undefined;
351
+ isError?: boolean | undefined;
312
352
  experimental_content?: ({
313
353
  type: "text";
314
354
  text: string;
@@ -317,7 +357,62 @@ export declare const vToolContent: import("convex/values").VArray<{
317
357
  type: "image";
318
358
  data: string;
319
359
  })[] | undefined;
360
+ type: "tool-result";
361
+ toolCallId: string;
362
+ toolName: string;
363
+ result: any;
364
+ }, {
365
+ type: import("convex/values").VLiteral<"tool-result", "required">;
366
+ toolCallId: import("convex/values").VString<string, "required">;
367
+ toolName: import("convex/values").VString<string, "required">;
368
+ result: import("convex/values").VAny<any, "required", string>;
369
+ 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>;
370
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
371
+ isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
372
+ args: import("convex/values").VAny<any, "optional", string>;
373
+ experimental_content: import("convex/values").VArray<({
374
+ type: "text";
375
+ text: string;
376
+ } | {
377
+ mimeType?: string | undefined;
378
+ type: "image";
379
+ data: string;
380
+ })[] | undefined, import("convex/values").VUnion<{
381
+ type: "text";
382
+ text: string;
383
+ } | {
384
+ mimeType?: string | undefined;
385
+ type: "image";
386
+ data: string;
387
+ }, [import("convex/values").VObject<{
388
+ type: "text";
389
+ text: string;
390
+ }, {
391
+ type: import("convex/values").VLiteral<"text", "required">;
392
+ text: import("convex/values").VString<string, "required">;
393
+ }, "required", "type" | "text">, import("convex/values").VObject<{
394
+ mimeType?: string | undefined;
395
+ type: "image";
396
+ data: string;
397
+ }, {
398
+ type: import("convex/values").VLiteral<"image", "required">;
399
+ data: import("convex/values").VString<string, "required">;
400
+ mimeType: import("convex/values").VString<string | undefined, "optional">;
401
+ }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
402
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}`>;
403
+ export declare const vToolContent: import("convex/values").VArray<{
404
+ providerOptions?: Record<string, Record<string, any>> | undefined;
405
+ args?: any;
406
+ providerExecuted?: boolean | undefined;
320
407
  isError?: boolean | undefined;
408
+ experimental_content?: ({
409
+ type: "text";
410
+ text: string;
411
+ } | {
412
+ mimeType?: string | undefined;
413
+ type: "image";
414
+ data: string;
415
+ })[] | undefined;
321
416
  type: "tool-result";
322
417
  toolCallId: string;
323
418
  toolName: string;
@@ -325,6 +420,8 @@ export declare const vToolContent: import("convex/values").VArray<{
325
420
  }[], import("convex/values").VObject<{
326
421
  providerOptions?: Record<string, Record<string, any>> | undefined;
327
422
  args?: any;
423
+ providerExecuted?: boolean | undefined;
424
+ isError?: boolean | undefined;
328
425
  experimental_content?: ({
329
426
  type: "text";
330
427
  text: string;
@@ -333,7 +430,6 @@ export declare const vToolContent: import("convex/values").VArray<{
333
430
  type: "image";
334
431
  data: string;
335
432
  })[] | undefined;
336
- isError?: boolean | undefined;
337
433
  type: "tool-result";
338
434
  toolCallId: string;
339
435
  toolName: string;
@@ -343,6 +439,9 @@ export declare const vToolContent: import("convex/values").VArray<{
343
439
  toolCallId: import("convex/values").VString<string, "required">;
344
440
  toolName: import("convex/values").VString<string, "required">;
345
441
  result: import("convex/values").VAny<any, "required", string>;
442
+ 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>;
443
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
444
+ isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
346
445
  args: import("convex/values").VAny<any, "optional", string>;
347
446
  experimental_content: import("convex/values").VArray<({
348
447
  type: "text";
@@ -373,9 +472,7 @@ export declare const vToolContent: import("convex/values").VArray<{
373
472
  data: import("convex/values").VString<string, "required">;
374
473
  mimeType: import("convex/values").VString<string | undefined, "optional">;
375
474
  }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
376
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
377
- 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>;
378
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
475
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}`>, "required">;
379
476
  export declare const vContent: import("convex/values").VUnion<string | ({
380
477
  providerOptions?: Record<string, Record<string, any>> | undefined;
381
478
  type: "text";
@@ -404,6 +501,7 @@ export declare const vContent: import("convex/values").VUnion<string | ({
404
501
  } | {
405
502
  providerOptions?: Record<string, Record<string, any>> | undefined;
406
503
  signature?: string | undefined;
504
+ state?: "streaming" | "done" | undefined;
407
505
  type: "reasoning";
408
506
  text: string;
409
507
  } | {
@@ -412,6 +510,7 @@ export declare const vContent: import("convex/values").VUnion<string | ({
412
510
  data: string;
413
511
  } | {
414
512
  providerOptions?: Record<string, Record<string, any>> | undefined;
513
+ providerExecuted?: boolean | undefined;
415
514
  type: "tool-call";
416
515
  toolCallId: string;
417
516
  toolName: string;
@@ -419,6 +518,8 @@ export declare const vContent: import("convex/values").VUnion<string | ({
419
518
  })[] | {
420
519
  providerOptions?: Record<string, Record<string, any>> | undefined;
421
520
  args?: any;
521
+ providerExecuted?: boolean | undefined;
522
+ isError?: boolean | undefined;
422
523
  experimental_content?: ({
423
524
  type: "text";
424
525
  text: string;
@@ -427,7 +528,6 @@ export declare const vContent: import("convex/values").VUnion<string | ({
427
528
  type: "image";
428
529
  data: string;
429
530
  })[] | undefined;
430
- isError?: boolean | undefined;
431
531
  type: "tool-result";
432
532
  toolCallId: string;
433
533
  toolName: string;
@@ -520,6 +620,7 @@ export declare const vContent: import("convex/values").VUnion<string | ({
520
620
  } | {
521
621
  providerOptions?: Record<string, Record<string, any>> | undefined;
522
622
  signature?: string | undefined;
623
+ state?: "streaming" | "done" | undefined;
523
624
  type: "reasoning";
524
625
  text: string;
525
626
  } | {
@@ -528,6 +629,7 @@ export declare const vContent: import("convex/values").VUnion<string | ({
528
629
  data: string;
529
630
  } | {
530
631
  providerOptions?: Record<string, Record<string, any>> | undefined;
632
+ providerExecuted?: boolean | undefined;
531
633
  type: "tool-call";
532
634
  toolCallId: string;
533
635
  toolName: string;
@@ -545,6 +647,7 @@ export declare const vContent: import("convex/values").VUnion<string | ({
545
647
  } | {
546
648
  providerOptions?: Record<string, Record<string, any>> | undefined;
547
649
  signature?: string | undefined;
650
+ state?: "streaming" | "done" | undefined;
548
651
  type: "reasoning";
549
652
  text: string;
550
653
  } | {
@@ -553,6 +656,7 @@ export declare const vContent: import("convex/values").VUnion<string | ({
553
656
  data: string;
554
657
  } | {
555
658
  providerOptions?: Record<string, Record<string, any>> | undefined;
659
+ providerExecuted?: boolean | undefined;
556
660
  type: "tool-call";
557
661
  toolCallId: string;
558
662
  toolName: string;
@@ -570,6 +674,7 @@ export declare const vContent: import("convex/values").VUnion<string | ({
570
674
  } | {
571
675
  providerOptions?: Record<string, Record<string, any>> | undefined;
572
676
  signature?: string | undefined;
677
+ state?: "streaming" | "done" | undefined;
573
678
  type: "reasoning";
574
679
  text: string;
575
680
  } | {
@@ -578,6 +683,7 @@ export declare const vContent: import("convex/values").VUnion<string | ({
578
683
  data: string;
579
684
  } | {
580
685
  providerOptions?: Record<string, Record<string, any>> | undefined;
686
+ providerExecuted?: boolean | undefined;
581
687
  type: "tool-call";
582
688
  toolCallId: string;
583
689
  toolName: string;
@@ -605,6 +711,7 @@ export declare const vContent: import("convex/values").VUnion<string | ({
605
711
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">, import("convex/values").VObject<{
606
712
  providerOptions?: Record<string, Record<string, any>> | undefined;
607
713
  signature?: string | undefined;
714
+ state?: "streaming" | "done" | undefined;
608
715
  type: "reasoning";
609
716
  text: string;
610
717
  }, {
@@ -612,7 +719,8 @@ export declare const vContent: import("convex/values").VUnion<string | ({
612
719
  text: import("convex/values").VString<string, "required">;
613
720
  signature: import("convex/values").VString<string | undefined, "optional">;
614
721
  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>;
615
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
722
+ state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
723
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">, import("convex/values").VObject<{
616
724
  providerOptions?: Record<string, Record<string, any>> | undefined;
617
725
  type: "redacted-reasoning";
618
726
  data: string;
@@ -622,6 +730,7 @@ export declare const vContent: import("convex/values").VUnion<string | ({
622
730
  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>;
623
731
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "data">, import("convex/values").VObject<{
624
732
  providerOptions?: Record<string, Record<string, any>> | undefined;
733
+ providerExecuted?: boolean | undefined;
625
734
  type: "tool-call";
626
735
  toolCallId: string;
627
736
  toolName: string;
@@ -632,9 +741,12 @@ export declare const vContent: import("convex/values").VUnion<string | ({
632
741
  toolName: import("convex/values").VString<string, "required">;
633
742
  args: import("convex/values").VAny<any, "required", string>;
634
743
  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>;
635
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "toolCallId" | "toolName" | "args" | `args.${string}`>, "required">], "required", never>, import("convex/values").VArray<{
744
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
745
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "state" | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>, "required">], "required", never>, import("convex/values").VArray<{
636
746
  providerOptions?: Record<string, Record<string, any>> | undefined;
637
747
  args?: any;
748
+ providerExecuted?: boolean | undefined;
749
+ isError?: boolean | undefined;
638
750
  experimental_content?: ({
639
751
  type: "text";
640
752
  text: string;
@@ -643,7 +755,6 @@ export declare const vContent: import("convex/values").VUnion<string | ({
643
755
  type: "image";
644
756
  data: string;
645
757
  })[] | undefined;
646
- isError?: boolean | undefined;
647
758
  type: "tool-result";
648
759
  toolCallId: string;
649
760
  toolName: string;
@@ -651,6 +762,8 @@ export declare const vContent: import("convex/values").VUnion<string | ({
651
762
  }[], import("convex/values").VObject<{
652
763
  providerOptions?: Record<string, Record<string, any>> | undefined;
653
764
  args?: any;
765
+ providerExecuted?: boolean | undefined;
766
+ isError?: boolean | undefined;
654
767
  experimental_content?: ({
655
768
  type: "text";
656
769
  text: string;
@@ -659,7 +772,6 @@ export declare const vContent: import("convex/values").VUnion<string | ({
659
772
  type: "image";
660
773
  data: string;
661
774
  })[] | undefined;
662
- isError?: boolean | undefined;
663
775
  type: "tool-result";
664
776
  toolCallId: string;
665
777
  toolName: string;
@@ -669,6 +781,9 @@ export declare const vContent: import("convex/values").VUnion<string | ({
669
781
  toolCallId: import("convex/values").VString<string, "required">;
670
782
  toolName: import("convex/values").VString<string, "required">;
671
783
  result: import("convex/values").VAny<any, "required", string>;
784
+ 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>;
785
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
786
+ isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
672
787
  args: import("convex/values").VAny<any, "optional", string>;
673
788
  experimental_content: import("convex/values").VArray<({
674
789
  type: "text";
@@ -699,9 +814,7 @@ export declare const vContent: import("convex/values").VUnion<string | ({
699
814
  data: import("convex/values").VString<string, "required">;
700
815
  mimeType: import("convex/values").VString<string | undefined, "optional">;
701
816
  }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
702
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
703
- 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>;
704
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">], "required", never>;
817
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}`>, "required">], "required", never>;
705
818
  export type Content = Infer<typeof vContent>;
706
819
  export declare const vUserMessage: import("convex/values").VObject<{
707
820
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -818,6 +931,7 @@ export declare const vAssistantMessage: import("convex/values").VObject<{
818
931
  } | {
819
932
  providerOptions?: Record<string, Record<string, any>> | undefined;
820
933
  signature?: string | undefined;
934
+ state?: "streaming" | "done" | undefined;
821
935
  type: "reasoning";
822
936
  text: string;
823
937
  } | {
@@ -826,6 +940,7 @@ export declare const vAssistantMessage: import("convex/values").VObject<{
826
940
  data: string;
827
941
  } | {
828
942
  providerOptions?: Record<string, Record<string, any>> | undefined;
943
+ providerExecuted?: boolean | undefined;
829
944
  type: "tool-call";
830
945
  toolCallId: string;
831
946
  toolName: string;
@@ -846,6 +961,7 @@ export declare const vAssistantMessage: import("convex/values").VObject<{
846
961
  } | {
847
962
  providerOptions?: Record<string, Record<string, any>> | undefined;
848
963
  signature?: string | undefined;
964
+ state?: "streaming" | "done" | undefined;
849
965
  type: "reasoning";
850
966
  text: string;
851
967
  } | {
@@ -854,6 +970,7 @@ export declare const vAssistantMessage: import("convex/values").VObject<{
854
970
  data: string;
855
971
  } | {
856
972
  providerOptions?: Record<string, Record<string, any>> | undefined;
973
+ providerExecuted?: boolean | undefined;
857
974
  type: "tool-call";
858
975
  toolCallId: string;
859
976
  toolName: string;
@@ -871,6 +988,7 @@ export declare const vAssistantMessage: import("convex/values").VObject<{
871
988
  } | {
872
989
  providerOptions?: Record<string, Record<string, any>> | undefined;
873
990
  signature?: string | undefined;
991
+ state?: "streaming" | "done" | undefined;
874
992
  type: "reasoning";
875
993
  text: string;
876
994
  } | {
@@ -879,6 +997,7 @@ export declare const vAssistantMessage: import("convex/values").VObject<{
879
997
  data: string;
880
998
  } | {
881
999
  providerOptions?: Record<string, Record<string, any>> | undefined;
1000
+ providerExecuted?: boolean | undefined;
882
1001
  type: "tool-call";
883
1002
  toolCallId: string;
884
1003
  toolName: string;
@@ -896,6 +1015,7 @@ export declare const vAssistantMessage: import("convex/values").VObject<{
896
1015
  } | {
897
1016
  providerOptions?: Record<string, Record<string, any>> | undefined;
898
1017
  signature?: string | undefined;
1018
+ state?: "streaming" | "done" | undefined;
899
1019
  type: "reasoning";
900
1020
  text: string;
901
1021
  } | {
@@ -904,6 +1024,7 @@ export declare const vAssistantMessage: import("convex/values").VObject<{
904
1024
  data: string;
905
1025
  } | {
906
1026
  providerOptions?: Record<string, Record<string, any>> | undefined;
1027
+ providerExecuted?: boolean | undefined;
907
1028
  type: "tool-call";
908
1029
  toolCallId: string;
909
1030
  toolName: string;
@@ -931,6 +1052,7 @@ export declare const vAssistantMessage: import("convex/values").VObject<{
931
1052
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">, import("convex/values").VObject<{
932
1053
  providerOptions?: Record<string, Record<string, any>> | undefined;
933
1054
  signature?: string | undefined;
1055
+ state?: "streaming" | "done" | undefined;
934
1056
  type: "reasoning";
935
1057
  text: string;
936
1058
  }, {
@@ -938,7 +1060,8 @@ export declare const vAssistantMessage: import("convex/values").VObject<{
938
1060
  text: import("convex/values").VString<string, "required">;
939
1061
  signature: import("convex/values").VString<string | undefined, "optional">;
940
1062
  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>;
941
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
1063
+ state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
1064
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">, import("convex/values").VObject<{
942
1065
  providerOptions?: Record<string, Record<string, any>> | undefined;
943
1066
  type: "redacted-reasoning";
944
1067
  data: string;
@@ -948,6 +1071,7 @@ export declare const vAssistantMessage: import("convex/values").VObject<{
948
1071
  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>;
949
1072
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "data">, import("convex/values").VObject<{
950
1073
  providerOptions?: Record<string, Record<string, any>> | undefined;
1074
+ providerExecuted?: boolean | undefined;
951
1075
  type: "tool-call";
952
1076
  toolCallId: string;
953
1077
  toolName: string;
@@ -958,7 +1082,8 @@ export declare const vAssistantMessage: import("convex/values").VObject<{
958
1082
  toolName: import("convex/values").VString<string, "required">;
959
1083
  args: import("convex/values").VAny<any, "required", string>;
960
1084
  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>;
961
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "toolCallId" | "toolName" | "args" | `args.${string}`>, "required">], "required", never>;
1085
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
1086
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "state" | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>, "required">], "required", never>;
962
1087
  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>;
963
1088
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">;
964
1089
  export declare const vToolMessage: import("convex/values").VObject<{
@@ -967,6 +1092,8 @@ export declare const vToolMessage: import("convex/values").VObject<{
967
1092
  content: {
968
1093
  providerOptions?: Record<string, Record<string, any>> | undefined;
969
1094
  args?: any;
1095
+ providerExecuted?: boolean | undefined;
1096
+ isError?: boolean | undefined;
970
1097
  experimental_content?: ({
971
1098
  type: "text";
972
1099
  text: string;
@@ -975,7 +1102,6 @@ export declare const vToolMessage: import("convex/values").VObject<{
975
1102
  type: "image";
976
1103
  data: string;
977
1104
  })[] | undefined;
978
- isError?: boolean | undefined;
979
1105
  type: "tool-result";
980
1106
  toolCallId: string;
981
1107
  toolName: string;
@@ -986,6 +1112,8 @@ export declare const vToolMessage: import("convex/values").VObject<{
986
1112
  content: import("convex/values").VArray<{
987
1113
  providerOptions?: Record<string, Record<string, any>> | undefined;
988
1114
  args?: any;
1115
+ providerExecuted?: boolean | undefined;
1116
+ isError?: boolean | undefined;
989
1117
  experimental_content?: ({
990
1118
  type: "text";
991
1119
  text: string;
@@ -994,7 +1122,6 @@ export declare const vToolMessage: import("convex/values").VObject<{
994
1122
  type: "image";
995
1123
  data: string;
996
1124
  })[] | undefined;
997
- isError?: boolean | undefined;
998
1125
  type: "tool-result";
999
1126
  toolCallId: string;
1000
1127
  toolName: string;
@@ -1002,6 +1129,8 @@ export declare const vToolMessage: import("convex/values").VObject<{
1002
1129
  }[], import("convex/values").VObject<{
1003
1130
  providerOptions?: Record<string, Record<string, any>> | undefined;
1004
1131
  args?: any;
1132
+ providerExecuted?: boolean | undefined;
1133
+ isError?: boolean | undefined;
1005
1134
  experimental_content?: ({
1006
1135
  type: "text";
1007
1136
  text: string;
@@ -1010,7 +1139,6 @@ export declare const vToolMessage: import("convex/values").VObject<{
1010
1139
  type: "image";
1011
1140
  data: string;
1012
1141
  })[] | undefined;
1013
- isError?: boolean | undefined;
1014
1142
  type: "tool-result";
1015
1143
  toolCallId: string;
1016
1144
  toolName: string;
@@ -1020,6 +1148,9 @@ export declare const vToolMessage: import("convex/values").VObject<{
1020
1148
  toolCallId: import("convex/values").VString<string, "required">;
1021
1149
  toolName: import("convex/values").VString<string, "required">;
1022
1150
  result: import("convex/values").VAny<any, "required", string>;
1151
+ 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>;
1152
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
1153
+ isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
1023
1154
  args: import("convex/values").VAny<any, "optional", string>;
1024
1155
  experimental_content: import("convex/values").VArray<({
1025
1156
  type: "text";
@@ -1050,9 +1181,7 @@ export declare const vToolMessage: import("convex/values").VObject<{
1050
1181
  data: import("convex/values").VString<string, "required">;
1051
1182
  mimeType: import("convex/values").VString<string | undefined, "optional">;
1052
1183
  }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
1053
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
1054
- 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>;
1055
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
1184
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}`>, "required">;
1056
1185
  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>;
1057
1186
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">;
1058
1187
  export declare const vSystemMessage: import("convex/values").VObject<{
@@ -1099,6 +1228,7 @@ export declare const vMessage: import("convex/values").VUnion<{
1099
1228
  } | {
1100
1229
  providerOptions?: Record<string, Record<string, any>> | undefined;
1101
1230
  signature?: string | undefined;
1231
+ state?: "streaming" | "done" | undefined;
1102
1232
  type: "reasoning";
1103
1233
  text: string;
1104
1234
  } | {
@@ -1107,6 +1237,7 @@ export declare const vMessage: import("convex/values").VUnion<{
1107
1237
  data: string;
1108
1238
  } | {
1109
1239
  providerOptions?: Record<string, Record<string, any>> | undefined;
1240
+ providerExecuted?: boolean | undefined;
1110
1241
  type: "tool-call";
1111
1242
  toolCallId: string;
1112
1243
  toolName: string;
@@ -1118,6 +1249,8 @@ export declare const vMessage: import("convex/values").VUnion<{
1118
1249
  content: {
1119
1250
  providerOptions?: Record<string, Record<string, any>> | undefined;
1120
1251
  args?: any;
1252
+ providerExecuted?: boolean | undefined;
1253
+ isError?: boolean | undefined;
1121
1254
  experimental_content?: ({
1122
1255
  type: "text";
1123
1256
  text: string;
@@ -1126,7 +1259,6 @@ export declare const vMessage: import("convex/values").VUnion<{
1126
1259
  type: "image";
1127
1260
  data: string;
1128
1261
  })[] | undefined;
1129
- isError?: boolean | undefined;
1130
1262
  type: "tool-result";
1131
1263
  toolCallId: string;
1132
1264
  toolName: string;
@@ -1250,6 +1382,7 @@ export declare const vMessage: import("convex/values").VUnion<{
1250
1382
  } | {
1251
1383
  providerOptions?: Record<string, Record<string, any>> | undefined;
1252
1384
  signature?: string | undefined;
1385
+ state?: "streaming" | "done" | undefined;
1253
1386
  type: "reasoning";
1254
1387
  text: string;
1255
1388
  } | {
@@ -1258,6 +1391,7 @@ export declare const vMessage: import("convex/values").VUnion<{
1258
1391
  data: string;
1259
1392
  } | {
1260
1393
  providerOptions?: Record<string, Record<string, any>> | undefined;
1394
+ providerExecuted?: boolean | undefined;
1261
1395
  type: "tool-call";
1262
1396
  toolCallId: string;
1263
1397
  toolName: string;
@@ -1278,6 +1412,7 @@ export declare const vMessage: import("convex/values").VUnion<{
1278
1412
  } | {
1279
1413
  providerOptions?: Record<string, Record<string, any>> | undefined;
1280
1414
  signature?: string | undefined;
1415
+ state?: "streaming" | "done" | undefined;
1281
1416
  type: "reasoning";
1282
1417
  text: string;
1283
1418
  } | {
@@ -1286,6 +1421,7 @@ export declare const vMessage: import("convex/values").VUnion<{
1286
1421
  data: string;
1287
1422
  } | {
1288
1423
  providerOptions?: Record<string, Record<string, any>> | undefined;
1424
+ providerExecuted?: boolean | undefined;
1289
1425
  type: "tool-call";
1290
1426
  toolCallId: string;
1291
1427
  toolName: string;
@@ -1303,6 +1439,7 @@ export declare const vMessage: import("convex/values").VUnion<{
1303
1439
  } | {
1304
1440
  providerOptions?: Record<string, Record<string, any>> | undefined;
1305
1441
  signature?: string | undefined;
1442
+ state?: "streaming" | "done" | undefined;
1306
1443
  type: "reasoning";
1307
1444
  text: string;
1308
1445
  } | {
@@ -1311,6 +1448,7 @@ export declare const vMessage: import("convex/values").VUnion<{
1311
1448
  data: string;
1312
1449
  } | {
1313
1450
  providerOptions?: Record<string, Record<string, any>> | undefined;
1451
+ providerExecuted?: boolean | undefined;
1314
1452
  type: "tool-call";
1315
1453
  toolCallId: string;
1316
1454
  toolName: string;
@@ -1328,6 +1466,7 @@ export declare const vMessage: import("convex/values").VUnion<{
1328
1466
  } | {
1329
1467
  providerOptions?: Record<string, Record<string, any>> | undefined;
1330
1468
  signature?: string | undefined;
1469
+ state?: "streaming" | "done" | undefined;
1331
1470
  type: "reasoning";
1332
1471
  text: string;
1333
1472
  } | {
@@ -1336,6 +1475,7 @@ export declare const vMessage: import("convex/values").VUnion<{
1336
1475
  data: string;
1337
1476
  } | {
1338
1477
  providerOptions?: Record<string, Record<string, any>> | undefined;
1478
+ providerExecuted?: boolean | undefined;
1339
1479
  type: "tool-call";
1340
1480
  toolCallId: string;
1341
1481
  toolName: string;
@@ -1363,6 +1503,7 @@ export declare const vMessage: import("convex/values").VUnion<{
1363
1503
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">, import("convex/values").VObject<{
1364
1504
  providerOptions?: Record<string, Record<string, any>> | undefined;
1365
1505
  signature?: string | undefined;
1506
+ state?: "streaming" | "done" | undefined;
1366
1507
  type: "reasoning";
1367
1508
  text: string;
1368
1509
  }, {
@@ -1370,7 +1511,8 @@ export declare const vMessage: import("convex/values").VUnion<{
1370
1511
  text: import("convex/values").VString<string, "required">;
1371
1512
  signature: import("convex/values").VString<string | undefined, "optional">;
1372
1513
  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>;
1373
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
1514
+ state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
1515
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">, import("convex/values").VObject<{
1374
1516
  providerOptions?: Record<string, Record<string, any>> | undefined;
1375
1517
  type: "redacted-reasoning";
1376
1518
  data: string;
@@ -1380,6 +1522,7 @@ export declare const vMessage: import("convex/values").VUnion<{
1380
1522
  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>;
1381
1523
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "data">, import("convex/values").VObject<{
1382
1524
  providerOptions?: Record<string, Record<string, any>> | undefined;
1525
+ providerExecuted?: boolean | undefined;
1383
1526
  type: "tool-call";
1384
1527
  toolCallId: string;
1385
1528
  toolName: string;
@@ -1390,7 +1533,8 @@ export declare const vMessage: import("convex/values").VUnion<{
1390
1533
  toolName: import("convex/values").VString<string, "required">;
1391
1534
  args: import("convex/values").VAny<any, "required", string>;
1392
1535
  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>;
1393
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "toolCallId" | "toolName" | "args" | `args.${string}`>, "required">], "required", never>;
1536
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
1537
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "state" | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>, "required">], "required", never>;
1394
1538
  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>;
1395
1539
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
1396
1540
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1398,6 +1542,8 @@ export declare const vMessage: import("convex/values").VUnion<{
1398
1542
  content: {
1399
1543
  providerOptions?: Record<string, Record<string, any>> | undefined;
1400
1544
  args?: any;
1545
+ providerExecuted?: boolean | undefined;
1546
+ isError?: boolean | undefined;
1401
1547
  experimental_content?: ({
1402
1548
  type: "text";
1403
1549
  text: string;
@@ -1406,7 +1552,6 @@ export declare const vMessage: import("convex/values").VUnion<{
1406
1552
  type: "image";
1407
1553
  data: string;
1408
1554
  })[] | undefined;
1409
- isError?: boolean | undefined;
1410
1555
  type: "tool-result";
1411
1556
  toolCallId: string;
1412
1557
  toolName: string;
@@ -1417,6 +1562,8 @@ export declare const vMessage: import("convex/values").VUnion<{
1417
1562
  content: import("convex/values").VArray<{
1418
1563
  providerOptions?: Record<string, Record<string, any>> | undefined;
1419
1564
  args?: any;
1565
+ providerExecuted?: boolean | undefined;
1566
+ isError?: boolean | undefined;
1420
1567
  experimental_content?: ({
1421
1568
  type: "text";
1422
1569
  text: string;
@@ -1425,7 +1572,6 @@ export declare const vMessage: import("convex/values").VUnion<{
1425
1572
  type: "image";
1426
1573
  data: string;
1427
1574
  })[] | undefined;
1428
- isError?: boolean | undefined;
1429
1575
  type: "tool-result";
1430
1576
  toolCallId: string;
1431
1577
  toolName: string;
@@ -1433,6 +1579,8 @@ export declare const vMessage: import("convex/values").VUnion<{
1433
1579
  }[], import("convex/values").VObject<{
1434
1580
  providerOptions?: Record<string, Record<string, any>> | undefined;
1435
1581
  args?: any;
1582
+ providerExecuted?: boolean | undefined;
1583
+ isError?: boolean | undefined;
1436
1584
  experimental_content?: ({
1437
1585
  type: "text";
1438
1586
  text: string;
@@ -1441,7 +1589,6 @@ export declare const vMessage: import("convex/values").VUnion<{
1441
1589
  type: "image";
1442
1590
  data: string;
1443
1591
  })[] | undefined;
1444
- isError?: boolean | undefined;
1445
1592
  type: "tool-result";
1446
1593
  toolCallId: string;
1447
1594
  toolName: string;
@@ -1451,6 +1598,9 @@ export declare const vMessage: import("convex/values").VUnion<{
1451
1598
  toolCallId: import("convex/values").VString<string, "required">;
1452
1599
  toolName: import("convex/values").VString<string, "required">;
1453
1600
  result: import("convex/values").VAny<any, "required", string>;
1601
+ 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>;
1602
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
1603
+ isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
1454
1604
  args: import("convex/values").VAny<any, "optional", string>;
1455
1605
  experimental_content: import("convex/values").VArray<({
1456
1606
  type: "text";
@@ -1481,9 +1631,7 @@ export declare const vMessage: import("convex/values").VUnion<{
1481
1631
  data: import("convex/values").VString<string, "required">;
1482
1632
  mimeType: import("convex/values").VString<string | undefined, "optional">;
1483
1633
  }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
1484
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
1485
- 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>;
1486
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
1634
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}`>, "required">;
1487
1635
  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>;
1488
1636
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
1489
1637
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1495,19 +1643,52 @@ export declare const vMessage: import("convex/values").VUnion<{
1495
1643
  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>;
1496
1644
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">], "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">;
1497
1645
  export type Message = Infer<typeof vMessage>;
1498
- export declare const vSource: import("convex/values").VObject<{
1646
+ export declare const vSource: import("convex/values").VUnion<{
1647
+ title?: string | undefined;
1648
+ type?: "source" | undefined;
1649
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1650
+ url?: string | undefined;
1651
+ id: string;
1652
+ sourceType: "url";
1653
+ } | {
1654
+ filename?: string | undefined;
1655
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1656
+ id: string;
1657
+ title: string;
1658
+ type: "source";
1659
+ sourceType: "document";
1660
+ mediaType: string;
1661
+ }, [import("convex/values").VObject<{
1499
1662
  title?: string | undefined;
1663
+ type?: "source" | undefined;
1500
1664
  providerOptions?: Record<string, Record<string, any>> | undefined;
1665
+ url?: string | undefined;
1501
1666
  id: string;
1502
1667
  sourceType: "url";
1503
- url: string;
1504
1668
  }, {
1669
+ type: import("convex/values").VLiteral<"source" | undefined, "optional">;
1505
1670
  sourceType: import("convex/values").VLiteral<"url", "required">;
1506
1671
  id: import("convex/values").VString<string, "required">;
1507
- url: import("convex/values").VString<string, "required">;
1672
+ url: import("convex/values").VString<string | undefined, "optional">;
1508
1673
  title: import("convex/values").VString<string | undefined, "optional">;
1509
1674
  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>;
1510
- }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">;
1675
+ }, "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, import("convex/values").VObject<{
1676
+ filename?: string | undefined;
1677
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1678
+ id: string;
1679
+ title: string;
1680
+ type: "source";
1681
+ sourceType: "document";
1682
+ mediaType: string;
1683
+ }, {
1684
+ type: import("convex/values").VLiteral<"source", "required">;
1685
+ sourceType: import("convex/values").VLiteral<"document", "required">;
1686
+ id: import("convex/values").VString<string, "required">;
1687
+ mediaType: import("convex/values").VString<string, "required">;
1688
+ title: import("convex/values").VString<string, "required">;
1689
+ filename: import("convex/values").VString<string | undefined, "optional">;
1690
+ 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>;
1691
+ }, "required", "id" | "title" | "type" | "filename" | "providerMetadata" | "sourceType" | "mediaType" | `providerMetadata.${string}`>], "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "filename" | "providerMetadata" | "sourceType" | "url" | "mediaType" | `providerMetadata.${string}`>;
1511
1692
  export declare const vRequest: import("convex/values").VObject<{
1512
1693
  url?: string | undefined;
1513
1694
  body?: any;
@@ -1561,6 +1742,7 @@ export declare const vResponse: import("convex/values").VObject<{
1561
1742
  } | {
1562
1743
  providerOptions?: Record<string, Record<string, any>> | undefined;
1563
1744
  signature?: string | undefined;
1745
+ state?: "streaming" | "done" | undefined;
1564
1746
  type: "reasoning";
1565
1747
  text: string;
1566
1748
  } | {
@@ -1569,6 +1751,7 @@ export declare const vResponse: import("convex/values").VObject<{
1569
1751
  data: string;
1570
1752
  } | {
1571
1753
  providerOptions?: Record<string, Record<string, any>> | undefined;
1754
+ providerExecuted?: boolean | undefined;
1572
1755
  type: "tool-call";
1573
1756
  toolCallId: string;
1574
1757
  toolName: string;
@@ -1580,6 +1763,8 @@ export declare const vResponse: import("convex/values").VObject<{
1580
1763
  content: {
1581
1764
  providerOptions?: Record<string, Record<string, any>> | undefined;
1582
1765
  args?: any;
1766
+ providerExecuted?: boolean | undefined;
1767
+ isError?: boolean | undefined;
1583
1768
  experimental_content?: ({
1584
1769
  type: "text";
1585
1770
  text: string;
@@ -1588,7 +1773,6 @@ export declare const vResponse: import("convex/values").VObject<{
1588
1773
  type: "image";
1589
1774
  data: string;
1590
1775
  })[] | undefined;
1591
- isError?: boolean | undefined;
1592
1776
  type: "tool-result";
1593
1777
  toolCallId: string;
1594
1778
  toolName: string;
@@ -1645,6 +1829,7 @@ export declare const vResponse: import("convex/values").VObject<{
1645
1829
  } | {
1646
1830
  providerOptions?: Record<string, Record<string, any>> | undefined;
1647
1831
  signature?: string | undefined;
1832
+ state?: "streaming" | "done" | undefined;
1648
1833
  type: "reasoning";
1649
1834
  text: string;
1650
1835
  } | {
@@ -1653,6 +1838,7 @@ export declare const vResponse: import("convex/values").VObject<{
1653
1838
  data: string;
1654
1839
  } | {
1655
1840
  providerOptions?: Record<string, Record<string, any>> | undefined;
1841
+ providerExecuted?: boolean | undefined;
1656
1842
  type: "tool-call";
1657
1843
  toolCallId: string;
1658
1844
  toolName: string;
@@ -1664,6 +1850,8 @@ export declare const vResponse: import("convex/values").VObject<{
1664
1850
  content: {
1665
1851
  providerOptions?: Record<string, Record<string, any>> | undefined;
1666
1852
  args?: any;
1853
+ providerExecuted?: boolean | undefined;
1854
+ isError?: boolean | undefined;
1667
1855
  experimental_content?: ({
1668
1856
  type: "text";
1669
1857
  text: string;
@@ -1672,7 +1860,6 @@ export declare const vResponse: import("convex/values").VObject<{
1672
1860
  type: "image";
1673
1861
  data: string;
1674
1862
  })[] | undefined;
1675
- isError?: boolean | undefined;
1676
1863
  type: "tool-result";
1677
1864
  toolCallId: string;
1678
1865
  toolName: string;
@@ -1721,6 +1908,7 @@ export declare const vResponse: import("convex/values").VObject<{
1721
1908
  } | {
1722
1909
  providerOptions?: Record<string, Record<string, any>> | undefined;
1723
1910
  signature?: string | undefined;
1911
+ state?: "streaming" | "done" | undefined;
1724
1912
  type: "reasoning";
1725
1913
  text: string;
1726
1914
  } | {
@@ -1729,6 +1917,7 @@ export declare const vResponse: import("convex/values").VObject<{
1729
1917
  data: string;
1730
1918
  } | {
1731
1919
  providerOptions?: Record<string, Record<string, any>> | undefined;
1920
+ providerExecuted?: boolean | undefined;
1732
1921
  type: "tool-call";
1733
1922
  toolCallId: string;
1734
1923
  toolName: string;
@@ -1740,6 +1929,8 @@ export declare const vResponse: import("convex/values").VObject<{
1740
1929
  content: {
1741
1930
  providerOptions?: Record<string, Record<string, any>> | undefined;
1742
1931
  args?: any;
1932
+ providerExecuted?: boolean | undefined;
1933
+ isError?: boolean | undefined;
1743
1934
  experimental_content?: ({
1744
1935
  type: "text";
1745
1936
  text: string;
@@ -1748,7 +1939,6 @@ export declare const vResponse: import("convex/values").VObject<{
1748
1939
  type: "image";
1749
1940
  data: string;
1750
1941
  })[] | undefined;
1751
- isError?: boolean | undefined;
1752
1942
  type: "tool-result";
1753
1943
  toolCallId: string;
1754
1944
  toolName: string;
@@ -1796,6 +1986,7 @@ export declare const vResponse: import("convex/values").VObject<{
1796
1986
  } | {
1797
1987
  providerOptions?: Record<string, Record<string, any>> | undefined;
1798
1988
  signature?: string | undefined;
1989
+ state?: "streaming" | "done" | undefined;
1799
1990
  type: "reasoning";
1800
1991
  text: string;
1801
1992
  } | {
@@ -1804,6 +1995,7 @@ export declare const vResponse: import("convex/values").VObject<{
1804
1995
  data: string;
1805
1996
  } | {
1806
1997
  providerOptions?: Record<string, Record<string, any>> | undefined;
1998
+ providerExecuted?: boolean | undefined;
1807
1999
  type: "tool-call";
1808
2000
  toolCallId: string;
1809
2001
  toolName: string;
@@ -1815,6 +2007,8 @@ export declare const vResponse: import("convex/values").VObject<{
1815
2007
  content: {
1816
2008
  providerOptions?: Record<string, Record<string, any>> | undefined;
1817
2009
  args?: any;
2010
+ providerExecuted?: boolean | undefined;
2011
+ isError?: boolean | undefined;
1818
2012
  experimental_content?: ({
1819
2013
  type: "text";
1820
2014
  text: string;
@@ -1823,7 +2017,6 @@ export declare const vResponse: import("convex/values").VObject<{
1823
2017
  type: "image";
1824
2018
  data: string;
1825
2019
  })[] | undefined;
1826
- isError?: boolean | undefined;
1827
2020
  type: "tool-result";
1828
2021
  toolCallId: string;
1829
2022
  toolName: string;
@@ -1947,6 +2140,7 @@ export declare const vResponse: import("convex/values").VObject<{
1947
2140
  } | {
1948
2141
  providerOptions?: Record<string, Record<string, any>> | undefined;
1949
2142
  signature?: string | undefined;
2143
+ state?: "streaming" | "done" | undefined;
1950
2144
  type: "reasoning";
1951
2145
  text: string;
1952
2146
  } | {
@@ -1955,6 +2149,7 @@ export declare const vResponse: import("convex/values").VObject<{
1955
2149
  data: string;
1956
2150
  } | {
1957
2151
  providerOptions?: Record<string, Record<string, any>> | undefined;
2152
+ providerExecuted?: boolean | undefined;
1958
2153
  type: "tool-call";
1959
2154
  toolCallId: string;
1960
2155
  toolName: string;
@@ -1975,6 +2170,7 @@ export declare const vResponse: import("convex/values").VObject<{
1975
2170
  } | {
1976
2171
  providerOptions?: Record<string, Record<string, any>> | undefined;
1977
2172
  signature?: string | undefined;
2173
+ state?: "streaming" | "done" | undefined;
1978
2174
  type: "reasoning";
1979
2175
  text: string;
1980
2176
  } | {
@@ -1983,6 +2179,7 @@ export declare const vResponse: import("convex/values").VObject<{
1983
2179
  data: string;
1984
2180
  } | {
1985
2181
  providerOptions?: Record<string, Record<string, any>> | undefined;
2182
+ providerExecuted?: boolean | undefined;
1986
2183
  type: "tool-call";
1987
2184
  toolCallId: string;
1988
2185
  toolName: string;
@@ -2000,6 +2197,7 @@ export declare const vResponse: import("convex/values").VObject<{
2000
2197
  } | {
2001
2198
  providerOptions?: Record<string, Record<string, any>> | undefined;
2002
2199
  signature?: string | undefined;
2200
+ state?: "streaming" | "done" | undefined;
2003
2201
  type: "reasoning";
2004
2202
  text: string;
2005
2203
  } | {
@@ -2008,6 +2206,7 @@ export declare const vResponse: import("convex/values").VObject<{
2008
2206
  data: string;
2009
2207
  } | {
2010
2208
  providerOptions?: Record<string, Record<string, any>> | undefined;
2209
+ providerExecuted?: boolean | undefined;
2011
2210
  type: "tool-call";
2012
2211
  toolCallId: string;
2013
2212
  toolName: string;
@@ -2025,6 +2224,7 @@ export declare const vResponse: import("convex/values").VObject<{
2025
2224
  } | {
2026
2225
  providerOptions?: Record<string, Record<string, any>> | undefined;
2027
2226
  signature?: string | undefined;
2227
+ state?: "streaming" | "done" | undefined;
2028
2228
  type: "reasoning";
2029
2229
  text: string;
2030
2230
  } | {
@@ -2033,6 +2233,7 @@ export declare const vResponse: import("convex/values").VObject<{
2033
2233
  data: string;
2034
2234
  } | {
2035
2235
  providerOptions?: Record<string, Record<string, any>> | undefined;
2236
+ providerExecuted?: boolean | undefined;
2036
2237
  type: "tool-call";
2037
2238
  toolCallId: string;
2038
2239
  toolName: string;
@@ -2060,6 +2261,7 @@ export declare const vResponse: import("convex/values").VObject<{
2060
2261
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">, import("convex/values").VObject<{
2061
2262
  providerOptions?: Record<string, Record<string, any>> | undefined;
2062
2263
  signature?: string | undefined;
2264
+ state?: "streaming" | "done" | undefined;
2063
2265
  type: "reasoning";
2064
2266
  text: string;
2065
2267
  }, {
@@ -2067,7 +2269,8 @@ export declare const vResponse: import("convex/values").VObject<{
2067
2269
  text: import("convex/values").VString<string, "required">;
2068
2270
  signature: import("convex/values").VString<string | undefined, "optional">;
2069
2271
  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>;
2070
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
2272
+ state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
2273
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">, import("convex/values").VObject<{
2071
2274
  providerOptions?: Record<string, Record<string, any>> | undefined;
2072
2275
  type: "redacted-reasoning";
2073
2276
  data: string;
@@ -2077,6 +2280,7 @@ export declare const vResponse: import("convex/values").VObject<{
2077
2280
  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>;
2078
2281
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "data">, import("convex/values").VObject<{
2079
2282
  providerOptions?: Record<string, Record<string, any>> | undefined;
2283
+ providerExecuted?: boolean | undefined;
2080
2284
  type: "tool-call";
2081
2285
  toolCallId: string;
2082
2286
  toolName: string;
@@ -2087,7 +2291,8 @@ export declare const vResponse: import("convex/values").VObject<{
2087
2291
  toolName: import("convex/values").VString<string, "required">;
2088
2292
  args: import("convex/values").VAny<any, "required", string>;
2089
2293
  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>;
2090
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "toolCallId" | "toolName" | "args" | `args.${string}`>, "required">], "required", never>;
2294
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
2295
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "state" | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>, "required">], "required", never>;
2091
2296
  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>;
2092
2297
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
2093
2298
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -2095,6 +2300,8 @@ export declare const vResponse: import("convex/values").VObject<{
2095
2300
  content: {
2096
2301
  providerOptions?: Record<string, Record<string, any>> | undefined;
2097
2302
  args?: any;
2303
+ providerExecuted?: boolean | undefined;
2304
+ isError?: boolean | undefined;
2098
2305
  experimental_content?: ({
2099
2306
  type: "text";
2100
2307
  text: string;
@@ -2103,7 +2310,6 @@ export declare const vResponse: import("convex/values").VObject<{
2103
2310
  type: "image";
2104
2311
  data: string;
2105
2312
  })[] | undefined;
2106
- isError?: boolean | undefined;
2107
2313
  type: "tool-result";
2108
2314
  toolCallId: string;
2109
2315
  toolName: string;
@@ -2114,6 +2320,8 @@ export declare const vResponse: import("convex/values").VObject<{
2114
2320
  content: import("convex/values").VArray<{
2115
2321
  providerOptions?: Record<string, Record<string, any>> | undefined;
2116
2322
  args?: any;
2323
+ providerExecuted?: boolean | undefined;
2324
+ isError?: boolean | undefined;
2117
2325
  experimental_content?: ({
2118
2326
  type: "text";
2119
2327
  text: string;
@@ -2122,7 +2330,6 @@ export declare const vResponse: import("convex/values").VObject<{
2122
2330
  type: "image";
2123
2331
  data: string;
2124
2332
  })[] | undefined;
2125
- isError?: boolean | undefined;
2126
2333
  type: "tool-result";
2127
2334
  toolCallId: string;
2128
2335
  toolName: string;
@@ -2130,6 +2337,8 @@ export declare const vResponse: import("convex/values").VObject<{
2130
2337
  }[], import("convex/values").VObject<{
2131
2338
  providerOptions?: Record<string, Record<string, any>> | undefined;
2132
2339
  args?: any;
2340
+ providerExecuted?: boolean | undefined;
2341
+ isError?: boolean | undefined;
2133
2342
  experimental_content?: ({
2134
2343
  type: "text";
2135
2344
  text: string;
@@ -2138,7 +2347,6 @@ export declare const vResponse: import("convex/values").VObject<{
2138
2347
  type: "image";
2139
2348
  data: string;
2140
2349
  })[] | undefined;
2141
- isError?: boolean | undefined;
2142
2350
  type: "tool-result";
2143
2351
  toolCallId: string;
2144
2352
  toolName: string;
@@ -2148,6 +2356,9 @@ export declare const vResponse: import("convex/values").VObject<{
2148
2356
  toolCallId: import("convex/values").VString<string, "required">;
2149
2357
  toolName: import("convex/values").VString<string, "required">;
2150
2358
  result: import("convex/values").VAny<any, "required", string>;
2359
+ 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>;
2360
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
2361
+ isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
2151
2362
  args: import("convex/values").VAny<any, "optional", string>;
2152
2363
  experimental_content: import("convex/values").VArray<({
2153
2364
  type: "text";
@@ -2178,9 +2389,7 @@ export declare const vResponse: import("convex/values").VObject<{
2178
2389
  data: import("convex/values").VString<string, "required">;
2179
2390
  mimeType: import("convex/values").VString<string | undefined, "optional">;
2180
2391
  }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
2181
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
2182
- 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>;
2183
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
2392
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}`>, "required">;
2184
2393
  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>;
2185
2394
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
2186
2395
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -2210,6 +2419,8 @@ export declare const vResponseWithoutMessages: import("convex/values").VObject<{
2210
2419
  }, "required", "id" | "body" | "headers" | `body.${string}` | `headers.${string}` | "timestamp" | "modelId">;
2211
2420
  export declare const vFinishReason: import("convex/values").VUnion<"length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown", [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">], "required", never>;
2212
2421
  export declare const vUsage: import("convex/values").VObject<{
2422
+ reasoningTokens?: number | undefined;
2423
+ cachedInputTokens?: number | undefined;
2213
2424
  promptTokens: number;
2214
2425
  completionTokens: number;
2215
2426
  totalTokens: number;
@@ -2217,9 +2428,11 @@ export declare const vUsage: import("convex/values").VObject<{
2217
2428
  promptTokens: import("convex/values").VFloat64<number, "required">;
2218
2429
  completionTokens: import("convex/values").VFloat64<number, "required">;
2219
2430
  totalTokens: import("convex/values").VFloat64<number, "required">;
2220
- }, "required", "promptTokens" | "completionTokens" | "totalTokens">;
2431
+ reasoningTokens: import("convex/values").VFloat64<number | undefined, "optional">;
2432
+ cachedInputTokens: import("convex/values").VFloat64<number | undefined, "optional">;
2433
+ }, "required", "promptTokens" | "completionTokens" | "totalTokens" | "reasoningTokens" | "cachedInputTokens">;
2221
2434
  export type Usage = Infer<typeof vUsage>;
2222
- export declare const vLanguageModelV1CallWarning: import("convex/values").VUnion<{
2435
+ export declare const vLanguageModelCallWarning: import("convex/values").VUnion<{
2223
2436
  details?: string | undefined;
2224
2437
  type: "unsupported-setting";
2225
2438
  setting: string;
@@ -2262,19 +2475,36 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2262
2475
  text?: string | undefined;
2263
2476
  reasoning?: string | undefined;
2264
2477
  usage?: {
2478
+ reasoningTokens?: number | undefined;
2479
+ cachedInputTokens?: number | undefined;
2265
2480
  promptTokens: number;
2266
2481
  completionTokens: number;
2267
2482
  totalTokens: number;
2268
2483
  } | undefined;
2269
2484
  providerMetadata?: Record<string, Record<string, any>> | undefined;
2270
- sources?: {
2485
+ sources?: ({
2271
2486
  title?: string | undefined;
2487
+ type?: "source" | undefined;
2272
2488
  providerOptions?: Record<string, Record<string, any>> | undefined;
2489
+ url?: string | undefined;
2273
2490
  id: string;
2274
2491
  sourceType: "url";
2275
- url: string;
2276
- }[] | undefined;
2492
+ } | {
2493
+ filename?: string | undefined;
2494
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
2495
+ id: string;
2496
+ title: string;
2497
+ type: "source";
2498
+ sourceType: "document";
2499
+ mediaType: string;
2500
+ })[] | undefined;
2277
2501
  reasoningDetails?: ({
2502
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2503
+ signature?: string | undefined;
2504
+ state?: "streaming" | "done" | undefined;
2505
+ type: "reasoning";
2506
+ text: string;
2507
+ } | {
2278
2508
  signature?: string | undefined;
2279
2509
  type: "text";
2280
2510
  text: string;
@@ -2330,6 +2560,7 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2330
2560
  } | {
2331
2561
  providerOptions?: Record<string, Record<string, any>> | undefined;
2332
2562
  signature?: string | undefined;
2563
+ state?: "streaming" | "done" | undefined;
2333
2564
  type: "reasoning";
2334
2565
  text: string;
2335
2566
  } | {
@@ -2338,6 +2569,7 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2338
2569
  data: string;
2339
2570
  } | {
2340
2571
  providerOptions?: Record<string, Record<string, any>> | undefined;
2572
+ providerExecuted?: boolean | undefined;
2341
2573
  type: "tool-call";
2342
2574
  toolCallId: string;
2343
2575
  toolName: string;
@@ -2349,6 +2581,8 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2349
2581
  content: {
2350
2582
  providerOptions?: Record<string, Record<string, any>> | undefined;
2351
2583
  args?: any;
2584
+ providerExecuted?: boolean | undefined;
2585
+ isError?: boolean | undefined;
2352
2586
  experimental_content?: ({
2353
2587
  type: "text";
2354
2588
  text: string;
@@ -2357,7 +2591,6 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2357
2591
  type: "image";
2358
2592
  data: string;
2359
2593
  })[] | undefined;
2360
- isError?: boolean | undefined;
2361
2594
  type: "tool-result";
2362
2595
  toolCallId: string;
2363
2596
  toolName: string;
@@ -2405,6 +2638,7 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2405
2638
  } | {
2406
2639
  providerOptions?: Record<string, Record<string, any>> | undefined;
2407
2640
  signature?: string | undefined;
2641
+ state?: "streaming" | "done" | undefined;
2408
2642
  type: "reasoning";
2409
2643
  text: string;
2410
2644
  } | {
@@ -2413,6 +2647,7 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2413
2647
  data: string;
2414
2648
  } | {
2415
2649
  providerOptions?: Record<string, Record<string, any>> | undefined;
2650
+ providerExecuted?: boolean | undefined;
2416
2651
  type: "tool-call";
2417
2652
  toolCallId: string;
2418
2653
  toolName: string;
@@ -2424,6 +2659,8 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2424
2659
  content: {
2425
2660
  providerOptions?: Record<string, Record<string, any>> | undefined;
2426
2661
  args?: any;
2662
+ providerExecuted?: boolean | undefined;
2663
+ isError?: boolean | undefined;
2427
2664
  experimental_content?: ({
2428
2665
  type: "text";
2429
2666
  text: string;
@@ -2432,7 +2669,6 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2432
2669
  type: "image";
2433
2670
  data: string;
2434
2671
  })[] | undefined;
2435
- isError?: boolean | undefined;
2436
2672
  type: "tool-result";
2437
2673
  toolCallId: string;
2438
2674
  toolName: string;
@@ -2556,6 +2792,7 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2556
2792
  } | {
2557
2793
  providerOptions?: Record<string, Record<string, any>> | undefined;
2558
2794
  signature?: string | undefined;
2795
+ state?: "streaming" | "done" | undefined;
2559
2796
  type: "reasoning";
2560
2797
  text: string;
2561
2798
  } | {
@@ -2564,6 +2801,7 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2564
2801
  data: string;
2565
2802
  } | {
2566
2803
  providerOptions?: Record<string, Record<string, any>> | undefined;
2804
+ providerExecuted?: boolean | undefined;
2567
2805
  type: "tool-call";
2568
2806
  toolCallId: string;
2569
2807
  toolName: string;
@@ -2584,6 +2822,7 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2584
2822
  } | {
2585
2823
  providerOptions?: Record<string, Record<string, any>> | undefined;
2586
2824
  signature?: string | undefined;
2825
+ state?: "streaming" | "done" | undefined;
2587
2826
  type: "reasoning";
2588
2827
  text: string;
2589
2828
  } | {
@@ -2592,6 +2831,7 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2592
2831
  data: string;
2593
2832
  } | {
2594
2833
  providerOptions?: Record<string, Record<string, any>> | undefined;
2834
+ providerExecuted?: boolean | undefined;
2595
2835
  type: "tool-call";
2596
2836
  toolCallId: string;
2597
2837
  toolName: string;
@@ -2609,6 +2849,7 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2609
2849
  } | {
2610
2850
  providerOptions?: Record<string, Record<string, any>> | undefined;
2611
2851
  signature?: string | undefined;
2852
+ state?: "streaming" | "done" | undefined;
2612
2853
  type: "reasoning";
2613
2854
  text: string;
2614
2855
  } | {
@@ -2617,6 +2858,7 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2617
2858
  data: string;
2618
2859
  } | {
2619
2860
  providerOptions?: Record<string, Record<string, any>> | undefined;
2861
+ providerExecuted?: boolean | undefined;
2620
2862
  type: "tool-call";
2621
2863
  toolCallId: string;
2622
2864
  toolName: string;
@@ -2634,6 +2876,7 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2634
2876
  } | {
2635
2877
  providerOptions?: Record<string, Record<string, any>> | undefined;
2636
2878
  signature?: string | undefined;
2879
+ state?: "streaming" | "done" | undefined;
2637
2880
  type: "reasoning";
2638
2881
  text: string;
2639
2882
  } | {
@@ -2642,6 +2885,7 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2642
2885
  data: string;
2643
2886
  } | {
2644
2887
  providerOptions?: Record<string, Record<string, any>> | undefined;
2888
+ providerExecuted?: boolean | undefined;
2645
2889
  type: "tool-call";
2646
2890
  toolCallId: string;
2647
2891
  toolName: string;
@@ -2669,6 +2913,7 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2669
2913
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">, import("convex/values").VObject<{
2670
2914
  providerOptions?: Record<string, Record<string, any>> | undefined;
2671
2915
  signature?: string | undefined;
2916
+ state?: "streaming" | "done" | undefined;
2672
2917
  type: "reasoning";
2673
2918
  text: string;
2674
2919
  }, {
@@ -2676,7 +2921,8 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2676
2921
  text: import("convex/values").VString<string, "required">;
2677
2922
  signature: import("convex/values").VString<string | undefined, "optional">;
2678
2923
  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>;
2679
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
2924
+ state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
2925
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">, import("convex/values").VObject<{
2680
2926
  providerOptions?: Record<string, Record<string, any>> | undefined;
2681
2927
  type: "redacted-reasoning";
2682
2928
  data: string;
@@ -2686,6 +2932,7 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2686
2932
  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>;
2687
2933
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "data">, import("convex/values").VObject<{
2688
2934
  providerOptions?: Record<string, Record<string, any>> | undefined;
2935
+ providerExecuted?: boolean | undefined;
2689
2936
  type: "tool-call";
2690
2937
  toolCallId: string;
2691
2938
  toolName: string;
@@ -2696,7 +2943,8 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2696
2943
  toolName: import("convex/values").VString<string, "required">;
2697
2944
  args: import("convex/values").VAny<any, "required", string>;
2698
2945
  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>;
2699
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "toolCallId" | "toolName" | "args" | `args.${string}`>, "required">], "required", never>;
2946
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
2947
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "state" | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>, "required">], "required", never>;
2700
2948
  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>;
2701
2949
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
2702
2950
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -2704,6 +2952,8 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2704
2952
  content: {
2705
2953
  providerOptions?: Record<string, Record<string, any>> | undefined;
2706
2954
  args?: any;
2955
+ providerExecuted?: boolean | undefined;
2956
+ isError?: boolean | undefined;
2707
2957
  experimental_content?: ({
2708
2958
  type: "text";
2709
2959
  text: string;
@@ -2712,7 +2962,6 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2712
2962
  type: "image";
2713
2963
  data: string;
2714
2964
  })[] | undefined;
2715
- isError?: boolean | undefined;
2716
2965
  type: "tool-result";
2717
2966
  toolCallId: string;
2718
2967
  toolName: string;
@@ -2723,6 +2972,8 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2723
2972
  content: import("convex/values").VArray<{
2724
2973
  providerOptions?: Record<string, Record<string, any>> | undefined;
2725
2974
  args?: any;
2975
+ providerExecuted?: boolean | undefined;
2976
+ isError?: boolean | undefined;
2726
2977
  experimental_content?: ({
2727
2978
  type: "text";
2728
2979
  text: string;
@@ -2731,7 +2982,6 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2731
2982
  type: "image";
2732
2983
  data: string;
2733
2984
  })[] | undefined;
2734
- isError?: boolean | undefined;
2735
2985
  type: "tool-result";
2736
2986
  toolCallId: string;
2737
2987
  toolName: string;
@@ -2739,6 +2989,8 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2739
2989
  }[], import("convex/values").VObject<{
2740
2990
  providerOptions?: Record<string, Record<string, any>> | undefined;
2741
2991
  args?: any;
2992
+ providerExecuted?: boolean | undefined;
2993
+ isError?: boolean | undefined;
2742
2994
  experimental_content?: ({
2743
2995
  type: "text";
2744
2996
  text: string;
@@ -2747,7 +2999,6 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2747
2999
  type: "image";
2748
3000
  data: string;
2749
3001
  })[] | undefined;
2750
- isError?: boolean | undefined;
2751
3002
  type: "tool-result";
2752
3003
  toolCallId: string;
2753
3004
  toolName: string;
@@ -2757,6 +3008,9 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2757
3008
  toolCallId: import("convex/values").VString<string, "required">;
2758
3009
  toolName: import("convex/values").VString<string, "required">;
2759
3010
  result: import("convex/values").VAny<any, "required", string>;
3011
+ 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>;
3012
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
3013
+ isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
2760
3014
  args: import("convex/values").VAny<any, "optional", string>;
2761
3015
  experimental_content: import("convex/values").VArray<({
2762
3016
  type: "text";
@@ -2787,9 +3041,7 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2787
3041
  data: import("convex/values").VString<string, "required">;
2788
3042
  mimeType: import("convex/values").VString<string | undefined, "optional">;
2789
3043
  }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
2790
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
2791
- 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>;
2792
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
3044
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}`>, "required">;
2793
3045
  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>;
2794
3046
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
2795
3047
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -2806,27 +3058,75 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2806
3058
  model: import("convex/values").VString<string | undefined, "optional">;
2807
3059
  provider: import("convex/values").VString<string | undefined, "optional">;
2808
3060
  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>;
2809
- sources: import("convex/values").VArray<{
3061
+ sources: import("convex/values").VArray<({
2810
3062
  title?: string | undefined;
3063
+ type?: "source" | undefined;
2811
3064
  providerOptions?: Record<string, Record<string, any>> | undefined;
3065
+ url?: string | undefined;
3066
+ id: string;
3067
+ sourceType: "url";
3068
+ } | {
3069
+ filename?: string | undefined;
3070
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
3071
+ id: string;
3072
+ title: string;
3073
+ type: "source";
3074
+ sourceType: "document";
3075
+ mediaType: string;
3076
+ })[] | undefined, import("convex/values").VUnion<{
3077
+ title?: string | undefined;
3078
+ type?: "source" | undefined;
3079
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3080
+ url?: string | undefined;
2812
3081
  id: string;
2813
3082
  sourceType: "url";
2814
- url: string;
2815
- }[] | undefined, import("convex/values").VObject<{
3083
+ } | {
3084
+ filename?: string | undefined;
3085
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
3086
+ id: string;
3087
+ title: string;
3088
+ type: "source";
3089
+ sourceType: "document";
3090
+ mediaType: string;
3091
+ }, [import("convex/values").VObject<{
2816
3092
  title?: string | undefined;
3093
+ type?: "source" | undefined;
2817
3094
  providerOptions?: Record<string, Record<string, any>> | undefined;
3095
+ url?: string | undefined;
2818
3096
  id: string;
2819
3097
  sourceType: "url";
2820
- url: string;
2821
3098
  }, {
3099
+ type: import("convex/values").VLiteral<"source" | undefined, "optional">;
2822
3100
  sourceType: import("convex/values").VLiteral<"url", "required">;
2823
3101
  id: import("convex/values").VString<string, "required">;
2824
- url: import("convex/values").VString<string, "required">;
3102
+ url: import("convex/values").VString<string | undefined, "optional">;
2825
3103
  title: import("convex/values").VString<string | undefined, "optional">;
2826
3104
  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>;
2827
- }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, "optional">;
3105
+ }, "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, import("convex/values").VObject<{
3106
+ filename?: string | undefined;
3107
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
3108
+ id: string;
3109
+ title: string;
3110
+ type: "source";
3111
+ sourceType: "document";
3112
+ mediaType: string;
3113
+ }, {
3114
+ type: import("convex/values").VLiteral<"source", "required">;
3115
+ sourceType: import("convex/values").VLiteral<"document", "required">;
3116
+ id: import("convex/values").VString<string, "required">;
3117
+ mediaType: import("convex/values").VString<string, "required">;
3118
+ title: import("convex/values").VString<string, "required">;
3119
+ filename: import("convex/values").VString<string | undefined, "optional">;
3120
+ 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>;
3121
+ }, "required", "id" | "title" | "type" | "filename" | "providerMetadata" | "sourceType" | "mediaType" | `providerMetadata.${string}`>], "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "filename" | "providerMetadata" | "sourceType" | "url" | "mediaType" | `providerMetadata.${string}`>, "optional">;
2828
3122
  reasoning: import("convex/values").VString<string | undefined, "optional">;
2829
3123
  reasoningDetails: import("convex/values").VArray<({
3124
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3125
+ signature?: string | undefined;
3126
+ state?: "streaming" | "done" | undefined;
3127
+ type: "reasoning";
3128
+ text: string;
3129
+ } | {
2830
3130
  signature?: string | undefined;
2831
3131
  type: "text";
2832
3132
  text: string;
@@ -2834,6 +3134,12 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2834
3134
  type: "redacted";
2835
3135
  data: string;
2836
3136
  })[] | undefined, import("convex/values").VUnion<{
3137
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3138
+ signature?: string | undefined;
3139
+ state?: "streaming" | "done" | undefined;
3140
+ type: "reasoning";
3141
+ text: string;
3142
+ } | {
2837
3143
  signature?: string | undefined;
2838
3144
  type: "text";
2839
3145
  text: string;
@@ -2841,6 +3147,18 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2841
3147
  type: "redacted";
2842
3148
  data: string;
2843
3149
  }, [import("convex/values").VObject<{
3150
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3151
+ signature?: string | undefined;
3152
+ state?: "streaming" | "done" | undefined;
3153
+ type: "reasoning";
3154
+ text: string;
3155
+ }, {
3156
+ type: import("convex/values").VLiteral<"reasoning", "required">;
3157
+ text: import("convex/values").VString<string, "required">;
3158
+ signature: import("convex/values").VString<string | undefined, "optional">;
3159
+ 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>;
3160
+ state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
3161
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">, import("convex/values").VObject<{
2844
3162
  signature?: string | undefined;
2845
3163
  type: "text";
2846
3164
  text: string;
@@ -2854,8 +3172,10 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2854
3172
  }, {
2855
3173
  type: import("convex/values").VLiteral<"redacted", "required">;
2856
3174
  data: import("convex/values").VString<string, "required">;
2857
- }, "required", "type" | "data">], "required", "type" | "text" | "data" | "signature">, "optional">;
3175
+ }, "required", "type" | "data">], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "data" | "signature" | "state">, "optional">;
2858
3176
  usage: import("convex/values").VObject<{
3177
+ reasoningTokens?: number | undefined;
3178
+ cachedInputTokens?: number | undefined;
2859
3179
  promptTokens: number;
2860
3180
  completionTokens: number;
2861
3181
  totalTokens: number;
@@ -2863,7 +3183,9 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2863
3183
  promptTokens: import("convex/values").VFloat64<number, "required">;
2864
3184
  completionTokens: import("convex/values").VFloat64<number, "required">;
2865
3185
  totalTokens: import("convex/values").VFloat64<number, "required">;
2866
- }, "optional", "promptTokens" | "completionTokens" | "totalTokens">;
3186
+ reasoningTokens: import("convex/values").VFloat64<number | undefined, "optional">;
3187
+ cachedInputTokens: import("convex/values").VFloat64<number | undefined, "optional">;
3188
+ }, "optional", "promptTokens" | "completionTokens" | "totalTokens" | "reasoningTokens" | "cachedInputTokens">;
2867
3189
  warnings: import("convex/values").VArray<({
2868
3190
  details?: string | undefined;
2869
3191
  type: "unsupported-setting";
@@ -2910,7 +3232,7 @@ export declare const vMessageWithMetadataInternal: import("convex/values").VObje
2910
3232
  message: import("convex/values").VString<string, "required">;
2911
3233
  }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
2912
3234
  error: import("convex/values").VString<string | undefined, "optional">;
2913
- }, "required", "id" | "fileIds" | "error" | "model" | "provider" | "message" | "text" | "reasoning" | "usage" | "providerMetadata" | "sources" | "reasoningDetails" | "warnings" | "finishReason" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | `providerMetadata.${string}`>;
3235
+ }, "required", "id" | "fileIds" | "error" | "model" | "provider" | "message" | "text" | "reasoning" | "usage" | "providerMetadata" | "sources" | `providerMetadata.${string}` | "reasoningDetails" | "warnings" | "finishReason" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "usage.reasoningTokens" | "usage.cachedInputTokens">;
2914
3236
  export declare const vMessageWithMetadata: import("convex/values").VObject<{
2915
3237
  id?: string | undefined;
2916
3238
  fileIds?: string[] | undefined;
@@ -2920,19 +3242,36 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
2920
3242
  text?: string | undefined;
2921
3243
  reasoning?: string | undefined;
2922
3244
  usage?: {
3245
+ reasoningTokens?: number | undefined;
3246
+ cachedInputTokens?: number | undefined;
2923
3247
  promptTokens: number;
2924
3248
  completionTokens: number;
2925
3249
  totalTokens: number;
2926
3250
  } | undefined;
2927
3251
  providerMetadata?: Record<string, Record<string, any>> | undefined;
2928
- sources?: {
3252
+ sources?: ({
2929
3253
  title?: string | undefined;
3254
+ type?: "source" | undefined;
2930
3255
  providerOptions?: Record<string, Record<string, any>> | undefined;
3256
+ url?: string | undefined;
2931
3257
  id: string;
2932
3258
  sourceType: "url";
2933
- url: string;
2934
- }[] | undefined;
3259
+ } | {
3260
+ filename?: string | undefined;
3261
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
3262
+ id: string;
3263
+ title: string;
3264
+ type: "source";
3265
+ sourceType: "document";
3266
+ mediaType: string;
3267
+ })[] | undefined;
2935
3268
  reasoningDetails?: ({
3269
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3270
+ signature?: string | undefined;
3271
+ state?: "streaming" | "done" | undefined;
3272
+ type: "reasoning";
3273
+ text: string;
3274
+ } | {
2936
3275
  signature?: string | undefined;
2937
3276
  type: "text";
2938
3277
  text: string;
@@ -2988,6 +3327,7 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
2988
3327
  } | {
2989
3328
  providerOptions?: Record<string, Record<string, any>> | undefined;
2990
3329
  signature?: string | undefined;
3330
+ state?: "streaming" | "done" | undefined;
2991
3331
  type: "reasoning";
2992
3332
  text: string;
2993
3333
  } | {
@@ -2996,6 +3336,7 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
2996
3336
  data: string;
2997
3337
  } | {
2998
3338
  providerOptions?: Record<string, Record<string, any>> | undefined;
3339
+ providerExecuted?: boolean | undefined;
2999
3340
  type: "tool-call";
3000
3341
  toolCallId: string;
3001
3342
  toolName: string;
@@ -3007,6 +3348,8 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3007
3348
  content: {
3008
3349
  providerOptions?: Record<string, Record<string, any>> | undefined;
3009
3350
  args?: any;
3351
+ providerExecuted?: boolean | undefined;
3352
+ isError?: boolean | undefined;
3010
3353
  experimental_content?: ({
3011
3354
  type: "text";
3012
3355
  text: string;
@@ -3015,7 +3358,6 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3015
3358
  type: "image";
3016
3359
  data: string;
3017
3360
  })[] | undefined;
3018
- isError?: boolean | undefined;
3019
3361
  type: "tool-result";
3020
3362
  toolCallId: string;
3021
3363
  toolName: string;
@@ -3064,6 +3406,7 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3064
3406
  } | {
3065
3407
  providerOptions?: Record<string, Record<string, any>> | undefined;
3066
3408
  signature?: string | undefined;
3409
+ state?: "streaming" | "done" | undefined;
3067
3410
  type: "reasoning";
3068
3411
  text: string;
3069
3412
  } | {
@@ -3072,6 +3415,7 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3072
3415
  data: string;
3073
3416
  } | {
3074
3417
  providerOptions?: Record<string, Record<string, any>> | undefined;
3418
+ providerExecuted?: boolean | undefined;
3075
3419
  type: "tool-call";
3076
3420
  toolCallId: string;
3077
3421
  toolName: string;
@@ -3083,6 +3427,8 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3083
3427
  content: {
3084
3428
  providerOptions?: Record<string, Record<string, any>> | undefined;
3085
3429
  args?: any;
3430
+ providerExecuted?: boolean | undefined;
3431
+ isError?: boolean | undefined;
3086
3432
  experimental_content?: ({
3087
3433
  type: "text";
3088
3434
  text: string;
@@ -3091,7 +3437,6 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3091
3437
  type: "image";
3092
3438
  data: string;
3093
3439
  })[] | undefined;
3094
- isError?: boolean | undefined;
3095
3440
  type: "tool-result";
3096
3441
  toolCallId: string;
3097
3442
  toolName: string;
@@ -3215,6 +3560,7 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3215
3560
  } | {
3216
3561
  providerOptions?: Record<string, Record<string, any>> | undefined;
3217
3562
  signature?: string | undefined;
3563
+ state?: "streaming" | "done" | undefined;
3218
3564
  type: "reasoning";
3219
3565
  text: string;
3220
3566
  } | {
@@ -3223,6 +3569,7 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3223
3569
  data: string;
3224
3570
  } | {
3225
3571
  providerOptions?: Record<string, Record<string, any>> | undefined;
3572
+ providerExecuted?: boolean | undefined;
3226
3573
  type: "tool-call";
3227
3574
  toolCallId: string;
3228
3575
  toolName: string;
@@ -3243,6 +3590,7 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3243
3590
  } | {
3244
3591
  providerOptions?: Record<string, Record<string, any>> | undefined;
3245
3592
  signature?: string | undefined;
3593
+ state?: "streaming" | "done" | undefined;
3246
3594
  type: "reasoning";
3247
3595
  text: string;
3248
3596
  } | {
@@ -3251,6 +3599,7 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3251
3599
  data: string;
3252
3600
  } | {
3253
3601
  providerOptions?: Record<string, Record<string, any>> | undefined;
3602
+ providerExecuted?: boolean | undefined;
3254
3603
  type: "tool-call";
3255
3604
  toolCallId: string;
3256
3605
  toolName: string;
@@ -3268,6 +3617,7 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3268
3617
  } | {
3269
3618
  providerOptions?: Record<string, Record<string, any>> | undefined;
3270
3619
  signature?: string | undefined;
3620
+ state?: "streaming" | "done" | undefined;
3271
3621
  type: "reasoning";
3272
3622
  text: string;
3273
3623
  } | {
@@ -3276,6 +3626,7 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3276
3626
  data: string;
3277
3627
  } | {
3278
3628
  providerOptions?: Record<string, Record<string, any>> | undefined;
3629
+ providerExecuted?: boolean | undefined;
3279
3630
  type: "tool-call";
3280
3631
  toolCallId: string;
3281
3632
  toolName: string;
@@ -3293,6 +3644,7 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3293
3644
  } | {
3294
3645
  providerOptions?: Record<string, Record<string, any>> | undefined;
3295
3646
  signature?: string | undefined;
3647
+ state?: "streaming" | "done" | undefined;
3296
3648
  type: "reasoning";
3297
3649
  text: string;
3298
3650
  } | {
@@ -3301,6 +3653,7 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3301
3653
  data: string;
3302
3654
  } | {
3303
3655
  providerOptions?: Record<string, Record<string, any>> | undefined;
3656
+ providerExecuted?: boolean | undefined;
3304
3657
  type: "tool-call";
3305
3658
  toolCallId: string;
3306
3659
  toolName: string;
@@ -3328,6 +3681,7 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3328
3681
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">, import("convex/values").VObject<{
3329
3682
  providerOptions?: Record<string, Record<string, any>> | undefined;
3330
3683
  signature?: string | undefined;
3684
+ state?: "streaming" | "done" | undefined;
3331
3685
  type: "reasoning";
3332
3686
  text: string;
3333
3687
  }, {
@@ -3335,7 +3689,8 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3335
3689
  text: import("convex/values").VString<string, "required">;
3336
3690
  signature: import("convex/values").VString<string | undefined, "optional">;
3337
3691
  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>;
3338
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
3692
+ state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
3693
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">, import("convex/values").VObject<{
3339
3694
  providerOptions?: Record<string, Record<string, any>> | undefined;
3340
3695
  type: "redacted-reasoning";
3341
3696
  data: string;
@@ -3345,6 +3700,7 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3345
3700
  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>;
3346
3701
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "data">, import("convex/values").VObject<{
3347
3702
  providerOptions?: Record<string, Record<string, any>> | undefined;
3703
+ providerExecuted?: boolean | undefined;
3348
3704
  type: "tool-call";
3349
3705
  toolCallId: string;
3350
3706
  toolName: string;
@@ -3355,7 +3711,8 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3355
3711
  toolName: import("convex/values").VString<string, "required">;
3356
3712
  args: import("convex/values").VAny<any, "required", string>;
3357
3713
  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>;
3358
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "toolCallId" | "toolName" | "args" | `args.${string}`>, "required">], "required", never>;
3714
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
3715
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "state" | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>, "required">], "required", never>;
3359
3716
  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>;
3360
3717
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
3361
3718
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -3363,6 +3720,8 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3363
3720
  content: {
3364
3721
  providerOptions?: Record<string, Record<string, any>> | undefined;
3365
3722
  args?: any;
3723
+ providerExecuted?: boolean | undefined;
3724
+ isError?: boolean | undefined;
3366
3725
  experimental_content?: ({
3367
3726
  type: "text";
3368
3727
  text: string;
@@ -3371,7 +3730,6 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3371
3730
  type: "image";
3372
3731
  data: string;
3373
3732
  })[] | undefined;
3374
- isError?: boolean | undefined;
3375
3733
  type: "tool-result";
3376
3734
  toolCallId: string;
3377
3735
  toolName: string;
@@ -3382,6 +3740,8 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3382
3740
  content: import("convex/values").VArray<{
3383
3741
  providerOptions?: Record<string, Record<string, any>> | undefined;
3384
3742
  args?: any;
3743
+ providerExecuted?: boolean | undefined;
3744
+ isError?: boolean | undefined;
3385
3745
  experimental_content?: ({
3386
3746
  type: "text";
3387
3747
  text: string;
@@ -3390,7 +3750,6 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3390
3750
  type: "image";
3391
3751
  data: string;
3392
3752
  })[] | undefined;
3393
- isError?: boolean | undefined;
3394
3753
  type: "tool-result";
3395
3754
  toolCallId: string;
3396
3755
  toolName: string;
@@ -3398,6 +3757,8 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3398
3757
  }[], import("convex/values").VObject<{
3399
3758
  providerOptions?: Record<string, Record<string, any>> | undefined;
3400
3759
  args?: any;
3760
+ providerExecuted?: boolean | undefined;
3761
+ isError?: boolean | undefined;
3401
3762
  experimental_content?: ({
3402
3763
  type: "text";
3403
3764
  text: string;
@@ -3406,7 +3767,6 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3406
3767
  type: "image";
3407
3768
  data: string;
3408
3769
  })[] | undefined;
3409
- isError?: boolean | undefined;
3410
3770
  type: "tool-result";
3411
3771
  toolCallId: string;
3412
3772
  toolName: string;
@@ -3416,6 +3776,9 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3416
3776
  toolCallId: import("convex/values").VString<string, "required">;
3417
3777
  toolName: import("convex/values").VString<string, "required">;
3418
3778
  result: import("convex/values").VAny<any, "required", string>;
3779
+ 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>;
3780
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
3781
+ isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
3419
3782
  args: import("convex/values").VAny<any, "optional", string>;
3420
3783
  experimental_content: import("convex/values").VArray<({
3421
3784
  type: "text";
@@ -3446,9 +3809,7 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3446
3809
  data: import("convex/values").VString<string, "required">;
3447
3810
  mimeType: import("convex/values").VString<string | undefined, "optional">;
3448
3811
  }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
3449
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
3450
- 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>;
3451
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
3812
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}`>, "required">;
3452
3813
  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>;
3453
3814
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
3454
3815
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -3464,27 +3825,75 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3464
3825
  model: import("convex/values").VString<string | undefined, "optional">;
3465
3826
  provider: import("convex/values").VString<string | undefined, "optional">;
3466
3827
  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>;
3467
- sources: import("convex/values").VArray<{
3828
+ sources: import("convex/values").VArray<({
3468
3829
  title?: string | undefined;
3830
+ type?: "source" | undefined;
3469
3831
  providerOptions?: Record<string, Record<string, any>> | undefined;
3832
+ url?: string | undefined;
3470
3833
  id: string;
3471
3834
  sourceType: "url";
3472
- url: string;
3473
- }[] | undefined, import("convex/values").VObject<{
3835
+ } | {
3836
+ filename?: string | undefined;
3837
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
3838
+ id: string;
3839
+ title: string;
3840
+ type: "source";
3841
+ sourceType: "document";
3842
+ mediaType: string;
3843
+ })[] | undefined, import("convex/values").VUnion<{
3474
3844
  title?: string | undefined;
3845
+ type?: "source" | undefined;
3475
3846
  providerOptions?: Record<string, Record<string, any>> | undefined;
3847
+ url?: string | undefined;
3476
3848
  id: string;
3477
3849
  sourceType: "url";
3478
- url: string;
3479
- }, {
3480
- sourceType: import("convex/values").VLiteral<"url", "required">;
3481
- id: import("convex/values").VString<string, "required">;
3482
- url: import("convex/values").VString<string, "required">;
3483
- title: import("convex/values").VString<string | undefined, "optional">;
3850
+ } | {
3851
+ filename?: string | undefined;
3852
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
3853
+ id: string;
3854
+ title: string;
3855
+ type: "source";
3856
+ sourceType: "document";
3857
+ mediaType: string;
3858
+ }, [import("convex/values").VObject<{
3859
+ title?: string | undefined;
3860
+ type?: "source" | undefined;
3861
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3862
+ url?: string | undefined;
3863
+ id: string;
3864
+ sourceType: "url";
3865
+ }, {
3866
+ type: import("convex/values").VLiteral<"source" | undefined, "optional">;
3867
+ sourceType: import("convex/values").VLiteral<"url", "required">;
3868
+ id: import("convex/values").VString<string, "required">;
3869
+ url: import("convex/values").VString<string | undefined, "optional">;
3870
+ title: import("convex/values").VString<string | undefined, "optional">;
3484
3871
  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>;
3485
- }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, "optional">;
3872
+ }, "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, import("convex/values").VObject<{
3873
+ filename?: string | undefined;
3874
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
3875
+ id: string;
3876
+ title: string;
3877
+ type: "source";
3878
+ sourceType: "document";
3879
+ mediaType: string;
3880
+ }, {
3881
+ type: import("convex/values").VLiteral<"source", "required">;
3882
+ sourceType: import("convex/values").VLiteral<"document", "required">;
3883
+ id: import("convex/values").VString<string, "required">;
3884
+ mediaType: import("convex/values").VString<string, "required">;
3885
+ title: import("convex/values").VString<string, "required">;
3886
+ filename: import("convex/values").VString<string | undefined, "optional">;
3887
+ 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>;
3888
+ }, "required", "id" | "title" | "type" | "filename" | "providerMetadata" | "sourceType" | "mediaType" | `providerMetadata.${string}`>], "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "filename" | "providerMetadata" | "sourceType" | "url" | "mediaType" | `providerMetadata.${string}`>, "optional">;
3486
3889
  reasoning: import("convex/values").VString<string | undefined, "optional">;
3487
3890
  reasoningDetails: import("convex/values").VArray<({
3891
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3892
+ signature?: string | undefined;
3893
+ state?: "streaming" | "done" | undefined;
3894
+ type: "reasoning";
3895
+ text: string;
3896
+ } | {
3488
3897
  signature?: string | undefined;
3489
3898
  type: "text";
3490
3899
  text: string;
@@ -3492,6 +3901,12 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3492
3901
  type: "redacted";
3493
3902
  data: string;
3494
3903
  })[] | undefined, import("convex/values").VUnion<{
3904
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3905
+ signature?: string | undefined;
3906
+ state?: "streaming" | "done" | undefined;
3907
+ type: "reasoning";
3908
+ text: string;
3909
+ } | {
3495
3910
  signature?: string | undefined;
3496
3911
  type: "text";
3497
3912
  text: string;
@@ -3499,6 +3914,18 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3499
3914
  type: "redacted";
3500
3915
  data: string;
3501
3916
  }, [import("convex/values").VObject<{
3917
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3918
+ signature?: string | undefined;
3919
+ state?: "streaming" | "done" | undefined;
3920
+ type: "reasoning";
3921
+ text: string;
3922
+ }, {
3923
+ type: import("convex/values").VLiteral<"reasoning", "required">;
3924
+ text: import("convex/values").VString<string, "required">;
3925
+ signature: import("convex/values").VString<string | undefined, "optional">;
3926
+ 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>;
3927
+ state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
3928
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">, import("convex/values").VObject<{
3502
3929
  signature?: string | undefined;
3503
3930
  type: "text";
3504
3931
  text: string;
@@ -3512,8 +3939,10 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3512
3939
  }, {
3513
3940
  type: import("convex/values").VLiteral<"redacted", "required">;
3514
3941
  data: import("convex/values").VString<string, "required">;
3515
- }, "required", "type" | "data">], "required", "type" | "text" | "data" | "signature">, "optional">;
3942
+ }, "required", "type" | "data">], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "data" | "signature" | "state">, "optional">;
3516
3943
  usage: import("convex/values").VObject<{
3944
+ reasoningTokens?: number | undefined;
3945
+ cachedInputTokens?: number | undefined;
3517
3946
  promptTokens: number;
3518
3947
  completionTokens: number;
3519
3948
  totalTokens: number;
@@ -3521,7 +3950,9 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3521
3950
  promptTokens: import("convex/values").VFloat64<number, "required">;
3522
3951
  completionTokens: import("convex/values").VFloat64<number, "required">;
3523
3952
  totalTokens: import("convex/values").VFloat64<number, "required">;
3524
- }, "optional", "promptTokens" | "completionTokens" | "totalTokens">;
3953
+ reasoningTokens: import("convex/values").VFloat64<number | undefined, "optional">;
3954
+ cachedInputTokens: import("convex/values").VFloat64<number | undefined, "optional">;
3955
+ }, "optional", "promptTokens" | "completionTokens" | "totalTokens" | "reasoningTokens" | "cachedInputTokens">;
3525
3956
  warnings: import("convex/values").VArray<({
3526
3957
  details?: string | undefined;
3527
3958
  type: "unsupported-setting";
@@ -3568,7 +3999,7 @@ export declare const vMessageWithMetadata: import("convex/values").VObject<{
3568
3999
  message: import("convex/values").VString<string, "required">;
3569
4000
  }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
3570
4001
  error: import("convex/values").VString<string | undefined, "optional">;
3571
- }, "required", "id" | "fileIds" | "error" | "model" | "provider" | "message" | "text" | "reasoning" | "usage" | "providerMetadata" | "sources" | "reasoningDetails" | "warnings" | "finishReason" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | `providerMetadata.${string}`>;
4002
+ }, "required", "id" | "fileIds" | "error" | "model" | "provider" | "message" | "text" | "reasoning" | "usage" | "providerMetadata" | "sources" | `providerMetadata.${string}` | "reasoningDetails" | "warnings" | "finishReason" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "usage.reasoningTokens" | "usage.cachedInputTokens">;
3572
4003
  export type MessageWithMetadata = Infer<typeof vMessageWithMetadata>;
3573
4004
  export declare const vMessageEmbeddings: import("convex/values").VObject<{
3574
4005
  model: string;
@@ -3686,7 +4117,7 @@ export declare const vObjectResult: import("convex/values").VObject<{
3686
4117
  message: import("convex/values").VString<string, "required">;
3687
4118
  }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
3688
4119
  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>;
3689
- }, "required", "object" | "error" | "usage" | "providerMetadata" | "warnings" | "finishReason" | `providerMetadata.${string}` | "request" | "response" | `object.${string}` | `usage.${string}` | "request.url" | "request.body" | "request.headers" | "request.method" | `request.body.${string}` | `request.headers.${string}` | "response.id" | "response.body" | "response.headers" | `response.body.${string}` | `response.headers.${string}` | "response.timestamp" | "response.modelId">;
4120
+ }, "required", "object" | "error" | "usage" | "providerMetadata" | `providerMetadata.${string}` | "warnings" | "finishReason" | "request" | "response" | `object.${string}` | `usage.${string}` | "request.url" | "request.body" | "request.headers" | "request.method" | `request.body.${string}` | `request.headers.${string}` | "response.id" | "response.body" | "response.headers" | `response.body.${string}` | `response.headers.${string}` | "response.timestamp" | "response.modelId">;
3690
4121
  export type ObjectResult = Infer<typeof vObjectResult>;
3691
4122
  export declare const vContextOptionsSearchOptions: import("convex/values").VObject<{
3692
4123
  textSearch?: boolean | undefined;
@@ -3808,6 +4239,7 @@ export declare const vTextArgs: import("convex/values").VObject<{
3808
4239
  } | {
3809
4240
  providerOptions?: Record<string, Record<string, any>> | undefined;
3810
4241
  signature?: string | undefined;
4242
+ state?: "streaming" | "done" | undefined;
3811
4243
  type: "reasoning";
3812
4244
  text: string;
3813
4245
  } | {
@@ -3816,6 +4248,7 @@ export declare const vTextArgs: import("convex/values").VObject<{
3816
4248
  data: string;
3817
4249
  } | {
3818
4250
  providerOptions?: Record<string, Record<string, any>> | undefined;
4251
+ providerExecuted?: boolean | undefined;
3819
4252
  type: "tool-call";
3820
4253
  toolCallId: string;
3821
4254
  toolName: string;
@@ -3827,6 +4260,8 @@ export declare const vTextArgs: import("convex/values").VObject<{
3827
4260
  content: {
3828
4261
  providerOptions?: Record<string, Record<string, any>> | undefined;
3829
4262
  args?: any;
4263
+ providerExecuted?: boolean | undefined;
4264
+ isError?: boolean | undefined;
3830
4265
  experimental_content?: ({
3831
4266
  type: "text";
3832
4267
  text: string;
@@ -3835,7 +4270,6 @@ export declare const vTextArgs: import("convex/values").VObject<{
3835
4270
  type: "image";
3836
4271
  data: string;
3837
4272
  })[] | undefined;
3838
- isError?: boolean | undefined;
3839
4273
  type: "tool-result";
3840
4274
  toolCallId: string;
3841
4275
  toolName: string;
@@ -3933,6 +4367,7 @@ export declare const vTextArgs: import("convex/values").VObject<{
3933
4367
  } | {
3934
4368
  providerOptions?: Record<string, Record<string, any>> | undefined;
3935
4369
  signature?: string | undefined;
4370
+ state?: "streaming" | "done" | undefined;
3936
4371
  type: "reasoning";
3937
4372
  text: string;
3938
4373
  } | {
@@ -3941,6 +4376,7 @@ export declare const vTextArgs: import("convex/values").VObject<{
3941
4376
  data: string;
3942
4377
  } | {
3943
4378
  providerOptions?: Record<string, Record<string, any>> | undefined;
4379
+ providerExecuted?: boolean | undefined;
3944
4380
  type: "tool-call";
3945
4381
  toolCallId: string;
3946
4382
  toolName: string;
@@ -3952,6 +4388,8 @@ export declare const vTextArgs: import("convex/values").VObject<{
3952
4388
  content: {
3953
4389
  providerOptions?: Record<string, Record<string, any>> | undefined;
3954
4390
  args?: any;
4391
+ providerExecuted?: boolean | undefined;
4392
+ isError?: boolean | undefined;
3955
4393
  experimental_content?: ({
3956
4394
  type: "text";
3957
4395
  text: string;
@@ -3960,7 +4398,6 @@ export declare const vTextArgs: import("convex/values").VObject<{
3960
4398
  type: "image";
3961
4399
  data: string;
3962
4400
  })[] | undefined;
3963
- isError?: boolean | undefined;
3964
4401
  type: "tool-result";
3965
4402
  toolCallId: string;
3966
4403
  toolName: string;
@@ -4005,6 +4442,7 @@ export declare const vTextArgs: import("convex/values").VObject<{
4005
4442
  } | {
4006
4443
  providerOptions?: Record<string, Record<string, any>> | undefined;
4007
4444
  signature?: string | undefined;
4445
+ state?: "streaming" | "done" | undefined;
4008
4446
  type: "reasoning";
4009
4447
  text: string;
4010
4448
  } | {
@@ -4013,6 +4451,7 @@ export declare const vTextArgs: import("convex/values").VObject<{
4013
4451
  data: string;
4014
4452
  } | {
4015
4453
  providerOptions?: Record<string, Record<string, any>> | undefined;
4454
+ providerExecuted?: boolean | undefined;
4016
4455
  type: "tool-call";
4017
4456
  toolCallId: string;
4018
4457
  toolName: string;
@@ -4024,6 +4463,8 @@ export declare const vTextArgs: import("convex/values").VObject<{
4024
4463
  content: {
4025
4464
  providerOptions?: Record<string, Record<string, any>> | undefined;
4026
4465
  args?: any;
4466
+ providerExecuted?: boolean | undefined;
4467
+ isError?: boolean | undefined;
4027
4468
  experimental_content?: ({
4028
4469
  type: "text";
4029
4470
  text: string;
@@ -4032,7 +4473,6 @@ export declare const vTextArgs: import("convex/values").VObject<{
4032
4473
  type: "image";
4033
4474
  data: string;
4034
4475
  })[] | undefined;
4035
- isError?: boolean | undefined;
4036
4476
  type: "tool-result";
4037
4477
  toolCallId: string;
4038
4478
  toolName: string;
@@ -4156,6 +4596,7 @@ export declare const vTextArgs: import("convex/values").VObject<{
4156
4596
  } | {
4157
4597
  providerOptions?: Record<string, Record<string, any>> | undefined;
4158
4598
  signature?: string | undefined;
4599
+ state?: "streaming" | "done" | undefined;
4159
4600
  type: "reasoning";
4160
4601
  text: string;
4161
4602
  } | {
@@ -4164,6 +4605,7 @@ export declare const vTextArgs: import("convex/values").VObject<{
4164
4605
  data: string;
4165
4606
  } | {
4166
4607
  providerOptions?: Record<string, Record<string, any>> | undefined;
4608
+ providerExecuted?: boolean | undefined;
4167
4609
  type: "tool-call";
4168
4610
  toolCallId: string;
4169
4611
  toolName: string;
@@ -4184,6 +4626,7 @@ export declare const vTextArgs: import("convex/values").VObject<{
4184
4626
  } | {
4185
4627
  providerOptions?: Record<string, Record<string, any>> | undefined;
4186
4628
  signature?: string | undefined;
4629
+ state?: "streaming" | "done" | undefined;
4187
4630
  type: "reasoning";
4188
4631
  text: string;
4189
4632
  } | {
@@ -4192,6 +4635,7 @@ export declare const vTextArgs: import("convex/values").VObject<{
4192
4635
  data: string;
4193
4636
  } | {
4194
4637
  providerOptions?: Record<string, Record<string, any>> | undefined;
4638
+ providerExecuted?: boolean | undefined;
4195
4639
  type: "tool-call";
4196
4640
  toolCallId: string;
4197
4641
  toolName: string;
@@ -4209,6 +4653,7 @@ export declare const vTextArgs: import("convex/values").VObject<{
4209
4653
  } | {
4210
4654
  providerOptions?: Record<string, Record<string, any>> | undefined;
4211
4655
  signature?: string | undefined;
4656
+ state?: "streaming" | "done" | undefined;
4212
4657
  type: "reasoning";
4213
4658
  text: string;
4214
4659
  } | {
@@ -4217,6 +4662,7 @@ export declare const vTextArgs: import("convex/values").VObject<{
4217
4662
  data: string;
4218
4663
  } | {
4219
4664
  providerOptions?: Record<string, Record<string, any>> | undefined;
4665
+ providerExecuted?: boolean | undefined;
4220
4666
  type: "tool-call";
4221
4667
  toolCallId: string;
4222
4668
  toolName: string;
@@ -4234,6 +4680,7 @@ export declare const vTextArgs: import("convex/values").VObject<{
4234
4680
  } | {
4235
4681
  providerOptions?: Record<string, Record<string, any>> | undefined;
4236
4682
  signature?: string | undefined;
4683
+ state?: "streaming" | "done" | undefined;
4237
4684
  type: "reasoning";
4238
4685
  text: string;
4239
4686
  } | {
@@ -4242,6 +4689,7 @@ export declare const vTextArgs: import("convex/values").VObject<{
4242
4689
  data: string;
4243
4690
  } | {
4244
4691
  providerOptions?: Record<string, Record<string, any>> | undefined;
4692
+ providerExecuted?: boolean | undefined;
4245
4693
  type: "tool-call";
4246
4694
  toolCallId: string;
4247
4695
  toolName: string;
@@ -4269,6 +4717,7 @@ export declare const vTextArgs: import("convex/values").VObject<{
4269
4717
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">, import("convex/values").VObject<{
4270
4718
  providerOptions?: Record<string, Record<string, any>> | undefined;
4271
4719
  signature?: string | undefined;
4720
+ state?: "streaming" | "done" | undefined;
4272
4721
  type: "reasoning";
4273
4722
  text: string;
4274
4723
  }, {
@@ -4276,7 +4725,8 @@ export declare const vTextArgs: import("convex/values").VObject<{
4276
4725
  text: import("convex/values").VString<string, "required">;
4277
4726
  signature: import("convex/values").VString<string | undefined, "optional">;
4278
4727
  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>;
4279
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
4728
+ state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
4729
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">, import("convex/values").VObject<{
4280
4730
  providerOptions?: Record<string, Record<string, any>> | undefined;
4281
4731
  type: "redacted-reasoning";
4282
4732
  data: string;
@@ -4286,6 +4736,7 @@ export declare const vTextArgs: import("convex/values").VObject<{
4286
4736
  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>;
4287
4737
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "data">, import("convex/values").VObject<{
4288
4738
  providerOptions?: Record<string, Record<string, any>> | undefined;
4739
+ providerExecuted?: boolean | undefined;
4289
4740
  type: "tool-call";
4290
4741
  toolCallId: string;
4291
4742
  toolName: string;
@@ -4296,7 +4747,8 @@ export declare const vTextArgs: import("convex/values").VObject<{
4296
4747
  toolName: import("convex/values").VString<string, "required">;
4297
4748
  args: import("convex/values").VAny<any, "required", string>;
4298
4749
  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>;
4299
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "toolCallId" | "toolName" | "args" | `args.${string}`>, "required">], "required", never>;
4750
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
4751
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "state" | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>, "required">], "required", never>;
4300
4752
  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>;
4301
4753
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
4302
4754
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -4304,6 +4756,8 @@ export declare const vTextArgs: import("convex/values").VObject<{
4304
4756
  content: {
4305
4757
  providerOptions?: Record<string, Record<string, any>> | undefined;
4306
4758
  args?: any;
4759
+ providerExecuted?: boolean | undefined;
4760
+ isError?: boolean | undefined;
4307
4761
  experimental_content?: ({
4308
4762
  type: "text";
4309
4763
  text: string;
@@ -4312,7 +4766,6 @@ export declare const vTextArgs: import("convex/values").VObject<{
4312
4766
  type: "image";
4313
4767
  data: string;
4314
4768
  })[] | undefined;
4315
- isError?: boolean | undefined;
4316
4769
  type: "tool-result";
4317
4770
  toolCallId: string;
4318
4771
  toolName: string;
@@ -4323,6 +4776,8 @@ export declare const vTextArgs: import("convex/values").VObject<{
4323
4776
  content: import("convex/values").VArray<{
4324
4777
  providerOptions?: Record<string, Record<string, any>> | undefined;
4325
4778
  args?: any;
4779
+ providerExecuted?: boolean | undefined;
4780
+ isError?: boolean | undefined;
4326
4781
  experimental_content?: ({
4327
4782
  type: "text";
4328
4783
  text: string;
@@ -4331,7 +4786,6 @@ export declare const vTextArgs: import("convex/values").VObject<{
4331
4786
  type: "image";
4332
4787
  data: string;
4333
4788
  })[] | undefined;
4334
- isError?: boolean | undefined;
4335
4789
  type: "tool-result";
4336
4790
  toolCallId: string;
4337
4791
  toolName: string;
@@ -4339,6 +4793,8 @@ export declare const vTextArgs: import("convex/values").VObject<{
4339
4793
  }[], import("convex/values").VObject<{
4340
4794
  providerOptions?: Record<string, Record<string, any>> | undefined;
4341
4795
  args?: any;
4796
+ providerExecuted?: boolean | undefined;
4797
+ isError?: boolean | undefined;
4342
4798
  experimental_content?: ({
4343
4799
  type: "text";
4344
4800
  text: string;
@@ -4347,7 +4803,6 @@ export declare const vTextArgs: import("convex/values").VObject<{
4347
4803
  type: "image";
4348
4804
  data: string;
4349
4805
  })[] | undefined;
4350
- isError?: boolean | undefined;
4351
4806
  type: "tool-result";
4352
4807
  toolCallId: string;
4353
4808
  toolName: string;
@@ -4357,6 +4812,9 @@ export declare const vTextArgs: import("convex/values").VObject<{
4357
4812
  toolCallId: import("convex/values").VString<string, "required">;
4358
4813
  toolName: import("convex/values").VString<string, "required">;
4359
4814
  result: import("convex/values").VAny<any, "required", string>;
4815
+ 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>;
4816
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
4817
+ isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
4360
4818
  args: import("convex/values").VAny<any, "optional", string>;
4361
4819
  experimental_content: import("convex/values").VArray<({
4362
4820
  type: "text";
@@ -4387,9 +4845,7 @@ export declare const vTextArgs: import("convex/values").VObject<{
4387
4845
  data: import("convex/values").VString<string, "required">;
4388
4846
  mimeType: import("convex/values").VString<string | undefined, "optional">;
4389
4847
  }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
4390
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
4391
- 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>;
4392
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
4848
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}`>, "required">;
4393
4849
  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>;
4394
4850
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
4395
4851
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -4501,6 +4957,7 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4501
4957
  } | {
4502
4958
  providerOptions?: Record<string, Record<string, any>> | undefined;
4503
4959
  signature?: string | undefined;
4960
+ state?: "streaming" | "done" | undefined;
4504
4961
  type: "reasoning";
4505
4962
  text: string;
4506
4963
  } | {
@@ -4509,6 +4966,7 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4509
4966
  data: string;
4510
4967
  } | {
4511
4968
  providerOptions?: Record<string, Record<string, any>> | undefined;
4969
+ providerExecuted?: boolean | undefined;
4512
4970
  type: "tool-call";
4513
4971
  toolCallId: string;
4514
4972
  toolName: string;
@@ -4520,6 +4978,8 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4520
4978
  content: {
4521
4979
  providerOptions?: Record<string, Record<string, any>> | undefined;
4522
4980
  args?: any;
4981
+ providerExecuted?: boolean | undefined;
4982
+ isError?: boolean | undefined;
4523
4983
  experimental_content?: ({
4524
4984
  type: "text";
4525
4985
  text: string;
@@ -4528,7 +4988,6 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4528
4988
  type: "image";
4529
4989
  data: string;
4530
4990
  })[] | undefined;
4531
- isError?: boolean | undefined;
4532
4991
  type: "tool-result";
4533
4992
  toolCallId: string;
4534
4993
  toolName: string;
@@ -4606,6 +5065,7 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4606
5065
  } | {
4607
5066
  providerOptions?: Record<string, Record<string, any>> | undefined;
4608
5067
  signature?: string | undefined;
5068
+ state?: "streaming" | "done" | undefined;
4609
5069
  type: "reasoning";
4610
5070
  text: string;
4611
5071
  } | {
@@ -4614,6 +5074,7 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4614
5074
  data: string;
4615
5075
  } | {
4616
5076
  providerOptions?: Record<string, Record<string, any>> | undefined;
5077
+ providerExecuted?: boolean | undefined;
4617
5078
  type: "tool-call";
4618
5079
  toolCallId: string;
4619
5080
  toolName: string;
@@ -4625,6 +5086,8 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4625
5086
  content: {
4626
5087
  providerOptions?: Record<string, Record<string, any>> | undefined;
4627
5088
  args?: any;
5089
+ providerExecuted?: boolean | undefined;
5090
+ isError?: boolean | undefined;
4628
5091
  experimental_content?: ({
4629
5092
  type: "text";
4630
5093
  text: string;
@@ -4633,7 +5096,6 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4633
5096
  type: "image";
4634
5097
  data: string;
4635
5098
  })[] | undefined;
4636
- isError?: boolean | undefined;
4637
5099
  type: "tool-result";
4638
5100
  toolCallId: string;
4639
5101
  toolName: string;
@@ -4678,6 +5140,7 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4678
5140
  } | {
4679
5141
  providerOptions?: Record<string, Record<string, any>> | undefined;
4680
5142
  signature?: string | undefined;
5143
+ state?: "streaming" | "done" | undefined;
4681
5144
  type: "reasoning";
4682
5145
  text: string;
4683
5146
  } | {
@@ -4686,6 +5149,7 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4686
5149
  data: string;
4687
5150
  } | {
4688
5151
  providerOptions?: Record<string, Record<string, any>> | undefined;
5152
+ providerExecuted?: boolean | undefined;
4689
5153
  type: "tool-call";
4690
5154
  toolCallId: string;
4691
5155
  toolName: string;
@@ -4697,6 +5161,8 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4697
5161
  content: {
4698
5162
  providerOptions?: Record<string, Record<string, any>> | undefined;
4699
5163
  args?: any;
5164
+ providerExecuted?: boolean | undefined;
5165
+ isError?: boolean | undefined;
4700
5166
  experimental_content?: ({
4701
5167
  type: "text";
4702
5168
  text: string;
@@ -4705,7 +5171,6 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4705
5171
  type: "image";
4706
5172
  data: string;
4707
5173
  })[] | undefined;
4708
- isError?: boolean | undefined;
4709
5174
  type: "tool-result";
4710
5175
  toolCallId: string;
4711
5176
  toolName: string;
@@ -4829,6 +5294,7 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4829
5294
  } | {
4830
5295
  providerOptions?: Record<string, Record<string, any>> | undefined;
4831
5296
  signature?: string | undefined;
5297
+ state?: "streaming" | "done" | undefined;
4832
5298
  type: "reasoning";
4833
5299
  text: string;
4834
5300
  } | {
@@ -4837,6 +5303,7 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4837
5303
  data: string;
4838
5304
  } | {
4839
5305
  providerOptions?: Record<string, Record<string, any>> | undefined;
5306
+ providerExecuted?: boolean | undefined;
4840
5307
  type: "tool-call";
4841
5308
  toolCallId: string;
4842
5309
  toolName: string;
@@ -4857,6 +5324,7 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4857
5324
  } | {
4858
5325
  providerOptions?: Record<string, Record<string, any>> | undefined;
4859
5326
  signature?: string | undefined;
5327
+ state?: "streaming" | "done" | undefined;
4860
5328
  type: "reasoning";
4861
5329
  text: string;
4862
5330
  } | {
@@ -4865,6 +5333,7 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4865
5333
  data: string;
4866
5334
  } | {
4867
5335
  providerOptions?: Record<string, Record<string, any>> | undefined;
5336
+ providerExecuted?: boolean | undefined;
4868
5337
  type: "tool-call";
4869
5338
  toolCallId: string;
4870
5339
  toolName: string;
@@ -4882,6 +5351,7 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4882
5351
  } | {
4883
5352
  providerOptions?: Record<string, Record<string, any>> | undefined;
4884
5353
  signature?: string | undefined;
5354
+ state?: "streaming" | "done" | undefined;
4885
5355
  type: "reasoning";
4886
5356
  text: string;
4887
5357
  } | {
@@ -4890,6 +5360,7 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4890
5360
  data: string;
4891
5361
  } | {
4892
5362
  providerOptions?: Record<string, Record<string, any>> | undefined;
5363
+ providerExecuted?: boolean | undefined;
4893
5364
  type: "tool-call";
4894
5365
  toolCallId: string;
4895
5366
  toolName: string;
@@ -4907,6 +5378,7 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4907
5378
  } | {
4908
5379
  providerOptions?: Record<string, Record<string, any>> | undefined;
4909
5380
  signature?: string | undefined;
5381
+ state?: "streaming" | "done" | undefined;
4910
5382
  type: "reasoning";
4911
5383
  text: string;
4912
5384
  } | {
@@ -4915,6 +5387,7 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4915
5387
  data: string;
4916
5388
  } | {
4917
5389
  providerOptions?: Record<string, Record<string, any>> | undefined;
5390
+ providerExecuted?: boolean | undefined;
4918
5391
  type: "tool-call";
4919
5392
  toolCallId: string;
4920
5393
  toolName: string;
@@ -4942,6 +5415,7 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4942
5415
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">, import("convex/values").VObject<{
4943
5416
  providerOptions?: Record<string, Record<string, any>> | undefined;
4944
5417
  signature?: string | undefined;
5418
+ state?: "streaming" | "done" | undefined;
4945
5419
  type: "reasoning";
4946
5420
  text: string;
4947
5421
  }, {
@@ -4949,7 +5423,8 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4949
5423
  text: import("convex/values").VString<string, "required">;
4950
5424
  signature: import("convex/values").VString<string | undefined, "optional">;
4951
5425
  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>;
4952
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
5426
+ state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
5427
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">, import("convex/values").VObject<{
4953
5428
  providerOptions?: Record<string, Record<string, any>> | undefined;
4954
5429
  type: "redacted-reasoning";
4955
5430
  data: string;
@@ -4959,6 +5434,7 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4959
5434
  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>;
4960
5435
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "data">, import("convex/values").VObject<{
4961
5436
  providerOptions?: Record<string, Record<string, any>> | undefined;
5437
+ providerExecuted?: boolean | undefined;
4962
5438
  type: "tool-call";
4963
5439
  toolCallId: string;
4964
5440
  toolName: string;
@@ -4969,7 +5445,8 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4969
5445
  toolName: import("convex/values").VString<string, "required">;
4970
5446
  args: import("convex/values").VAny<any, "required", string>;
4971
5447
  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>;
4972
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "toolCallId" | "toolName" | "args" | `args.${string}`>, "required">], "required", never>;
5448
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
5449
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "state" | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>, "required">], "required", never>;
4973
5450
  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>;
4974
5451
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
4975
5452
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -4977,6 +5454,8 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4977
5454
  content: {
4978
5455
  providerOptions?: Record<string, Record<string, any>> | undefined;
4979
5456
  args?: any;
5457
+ providerExecuted?: boolean | undefined;
5458
+ isError?: boolean | undefined;
4980
5459
  experimental_content?: ({
4981
5460
  type: "text";
4982
5461
  text: string;
@@ -4985,7 +5464,6 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4985
5464
  type: "image";
4986
5465
  data: string;
4987
5466
  })[] | undefined;
4988
- isError?: boolean | undefined;
4989
5467
  type: "tool-result";
4990
5468
  toolCallId: string;
4991
5469
  toolName: string;
@@ -4996,6 +5474,8 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
4996
5474
  content: import("convex/values").VArray<{
4997
5475
  providerOptions?: Record<string, Record<string, any>> | undefined;
4998
5476
  args?: any;
5477
+ providerExecuted?: boolean | undefined;
5478
+ isError?: boolean | undefined;
4999
5479
  experimental_content?: ({
5000
5480
  type: "text";
5001
5481
  text: string;
@@ -5004,7 +5484,6 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
5004
5484
  type: "image";
5005
5485
  data: string;
5006
5486
  })[] | undefined;
5007
- isError?: boolean | undefined;
5008
5487
  type: "tool-result";
5009
5488
  toolCallId: string;
5010
5489
  toolName: string;
@@ -5012,6 +5491,8 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
5012
5491
  }[], import("convex/values").VObject<{
5013
5492
  providerOptions?: Record<string, Record<string, any>> | undefined;
5014
5493
  args?: any;
5494
+ providerExecuted?: boolean | undefined;
5495
+ isError?: boolean | undefined;
5015
5496
  experimental_content?: ({
5016
5497
  type: "text";
5017
5498
  text: string;
@@ -5020,7 +5501,6 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
5020
5501
  type: "image";
5021
5502
  data: string;
5022
5503
  })[] | undefined;
5023
- isError?: boolean | undefined;
5024
5504
  type: "tool-result";
5025
5505
  toolCallId: string;
5026
5506
  toolName: string;
@@ -5030,6 +5510,9 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
5030
5510
  toolCallId: import("convex/values").VString<string, "required">;
5031
5511
  toolName: import("convex/values").VString<string, "required">;
5032
5512
  result: import("convex/values").VAny<any, "required", string>;
5513
+ 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>;
5514
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
5515
+ isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
5033
5516
  args: import("convex/values").VAny<any, "optional", string>;
5034
5517
  experimental_content: import("convex/values").VArray<({
5035
5518
  type: "text";
@@ -5060,9 +5543,7 @@ export declare const vSafeObjectArgs: import("convex/values").VObject<{
5060
5543
  data: import("convex/values").VString<string, "required">;
5061
5544
  mimeType: import("convex/values").VString<string | undefined, "optional">;
5062
5545
  }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
5063
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
5064
- 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>;
5065
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
5546
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}`>, "required">;
5066
5547
  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>;
5067
5548
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
5068
5549
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -5157,8 +5638,9 @@ export declare function vPaginationResult<T extends Validator<Value, "required",
5157
5638
  splitCursor: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
5158
5639
  pageStatus: import("convex/values").VUnion<"SplitRecommended" | "SplitRequired" | null | undefined, [import("convex/values").VLiteral<"SplitRecommended", "required">, import("convex/values").VLiteral<"SplitRequired", "required">, import("convex/values").VNull<null, "required">], "optional", never>;
5159
5640
  }, "required", "page" | "continueCursor" | "isDone" | "splitCursor" | "pageStatus">;
5160
- export declare const vTextStreamPart: import("convex/values").VUnion<{
5641
+ export declare const vTextStreamPartV4: import("convex/values").VUnion<{
5161
5642
  providerOptions?: Record<string, Record<string, any>> | undefined;
5643
+ providerExecuted?: boolean | undefined;
5162
5644
  type: "tool-call";
5163
5645
  toolCallId: string;
5164
5646
  toolName: string;
@@ -5166,6 +5648,8 @@ export declare const vTextStreamPart: import("convex/values").VUnion<{
5166
5648
  } | {
5167
5649
  providerOptions?: Record<string, Record<string, any>> | undefined;
5168
5650
  args?: any;
5651
+ providerExecuted?: boolean | undefined;
5652
+ isError?: boolean | undefined;
5169
5653
  experimental_content?: ({
5170
5654
  type: "text";
5171
5655
  text: string;
@@ -5174,7 +5658,6 @@ export declare const vTextStreamPart: import("convex/values").VUnion<{
5174
5658
  type: "image";
5175
5659
  data: string;
5176
5660
  })[] | undefined;
5177
- isError?: boolean | undefined;
5178
5661
  type: "tool-result";
5179
5662
  toolCallId: string;
5180
5663
  toolName: string;
@@ -5190,9 +5673,9 @@ export declare const vTextStreamPart: import("convex/values").VUnion<{
5190
5673
  source: {
5191
5674
  title?: string | undefined;
5192
5675
  providerOptions?: Record<string, Record<string, any>> | undefined;
5676
+ url?: string | undefined;
5193
5677
  id: string;
5194
5678
  sourceType: "url";
5195
- url: string;
5196
5679
  };
5197
5680
  } | {
5198
5681
  type: "tool-call-streaming-start";
@@ -5220,27 +5703,28 @@ export declare const vTextStreamPart: import("convex/values").VUnion<{
5220
5703
  source: {
5221
5704
  title?: string | undefined;
5222
5705
  providerOptions?: Record<string, Record<string, any>> | undefined;
5706
+ url?: string | undefined;
5223
5707
  id: string;
5224
5708
  sourceType: "url";
5225
- url: string;
5226
5709
  };
5227
5710
  }, {
5228
5711
  type: import("convex/values").VLiteral<"source", "required">;
5229
5712
  source: import("convex/values").VObject<{
5230
5713
  title?: string | undefined;
5231
5714
  providerOptions?: Record<string, Record<string, any>> | undefined;
5715
+ url?: string | undefined;
5232
5716
  id: string;
5233
5717
  sourceType: "url";
5234
- url: string;
5235
5718
  }, {
5236
5719
  sourceType: import("convex/values").VLiteral<"url", "required">;
5237
5720
  id: import("convex/values").VString<string, "required">;
5238
- url: import("convex/values").VString<string, "required">;
5721
+ url: import("convex/values").VString<string | undefined, "optional">;
5239
5722
  title: import("convex/values").VString<string | undefined, "optional">;
5240
5723
  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>;
5241
5724
  }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">;
5242
5725
  }, "required", "type" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url">, import("convex/values").VObject<{
5243
5726
  providerOptions?: Record<string, Record<string, any>> | undefined;
5727
+ providerExecuted?: boolean | undefined;
5244
5728
  type: "tool-call";
5245
5729
  toolCallId: string;
5246
5730
  toolName: string;
@@ -5251,27 +5735,12 @@ export declare const vTextStreamPart: import("convex/values").VUnion<{
5251
5735
  toolName: import("convex/values").VString<string, "required">;
5252
5736
  args: import("convex/values").VAny<any, "required", string>;
5253
5737
  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>;
5254
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>, import("convex/values").VObject<{
5255
- type: "tool-call-streaming-start";
5256
- toolCallId: string;
5257
- toolName: string;
5258
- }, {
5259
- type: import("convex/values").VLiteral<"tool-call-streaming-start", "required">;
5260
- toolCallId: import("convex/values").VString<string, "required">;
5261
- toolName: import("convex/values").VString<string, "required">;
5262
- }, "required", "type" | "toolCallId" | "toolName">, import("convex/values").VObject<{
5263
- type: "tool-call-delta";
5264
- toolCallId: string;
5265
- toolName: string;
5266
- argsTextDelta: string;
5267
- }, {
5268
- type: import("convex/values").VLiteral<"tool-call-delta", "required">;
5269
- toolCallId: import("convex/values").VString<string, "required">;
5270
- toolName: import("convex/values").VString<string, "required">;
5271
- argsTextDelta: import("convex/values").VString<string, "required">;
5272
- }, "required", "type" | "toolCallId" | "toolName" | "argsTextDelta">, import("convex/values").VObject<{
5738
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
5739
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>, import("convex/values").VObject<{
5273
5740
  providerOptions?: Record<string, Record<string, any>> | undefined;
5274
5741
  args?: any;
5742
+ providerExecuted?: boolean | undefined;
5743
+ isError?: boolean | undefined;
5275
5744
  experimental_content?: ({
5276
5745
  type: "text";
5277
5746
  text: string;
@@ -5280,7 +5749,6 @@ export declare const vTextStreamPart: import("convex/values").VUnion<{
5280
5749
  type: "image";
5281
5750
  data: string;
5282
5751
  })[] | undefined;
5283
- isError?: boolean | undefined;
5284
5752
  type: "tool-result";
5285
5753
  toolCallId: string;
5286
5754
  toolName: string;
@@ -5290,6 +5758,9 @@ export declare const vTextStreamPart: import("convex/values").VUnion<{
5290
5758
  toolCallId: import("convex/values").VString<string, "required">;
5291
5759
  toolName: import("convex/values").VString<string, "required">;
5292
5760
  result: import("convex/values").VAny<any, "required", string>;
5761
+ 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>;
5762
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
5763
+ isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
5293
5764
  args: import("convex/values").VAny<any, "optional", string>;
5294
5765
  experimental_content: import("convex/values").VArray<({
5295
5766
  type: "text";
@@ -5320,88 +5791,859 @@ export declare const vTextStreamPart: import("convex/values").VUnion<{
5320
5791
  data: import("convex/values").VString<string, "required">;
5321
5792
  mimeType: import("convex/values").VString<string | undefined, "optional">;
5322
5793
  }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
5323
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
5324
- 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>;
5325
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>], "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}` | "textDelta" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url" | "argsTextDelta">;
5326
- export type TextStreamPart = Infer<typeof vTextStreamPart>;
5327
- export declare const vStreamCursor: import("convex/values").VObject<{
5328
- streamId: string;
5329
- cursor: number;
5794
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}`>, import("convex/values").VObject<{
5795
+ type: "tool-call-streaming-start";
5796
+ toolCallId: string;
5797
+ toolName: string;
5330
5798
  }, {
5331
- streamId: import("convex/values").VString<string, "required">;
5332
- cursor: import("convex/values").VFloat64<number, "required">;
5333
- }, "required", "streamId" | "cursor">;
5334
- export type StreamCursor = Infer<typeof vStreamCursor>;
5335
- export declare const vStreamArgs: import("convex/values").VUnion<{
5336
- startOrder?: number | undefined;
5337
- kind: "list";
5799
+ type: import("convex/values").VLiteral<"tool-call-streaming-start", "required">;
5800
+ toolCallId: import("convex/values").VString<string, "required">;
5801
+ toolName: import("convex/values").VString<string, "required">;
5802
+ }, "required", "type" | "toolCallId" | "toolName">, import("convex/values").VObject<{
5803
+ type: "tool-call-delta";
5804
+ toolCallId: string;
5805
+ toolName: string;
5806
+ argsTextDelta: string;
5807
+ }, {
5808
+ type: import("convex/values").VLiteral<"tool-call-delta", "required">;
5809
+ toolCallId: import("convex/values").VString<string, "required">;
5810
+ toolName: import("convex/values").VString<string, "required">;
5811
+ argsTextDelta: import("convex/values").VString<string, "required">;
5812
+ }, "required", "type" | "toolCallId" | "toolName" | "argsTextDelta">], "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}` | "source" | "textDelta" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url" | "argsTextDelta">;
5813
+ export declare const vTextStreamPartV5: import("convex/values").VUnion<{
5814
+ title?: string | undefined;
5815
+ type?: "source" | undefined;
5816
+ providerOptions?: Record<string, Record<string, any>> | undefined;
5817
+ url?: string | undefined;
5818
+ id: string;
5819
+ sourceType: "url";
5338
5820
  } | {
5339
- kind: "deltas";
5340
- cursors: {
5341
- streamId: string;
5342
- cursor: number;
5343
- }[];
5344
- } | undefined, [import("convex/values").VObject<{
5345
- startOrder?: number | undefined;
5346
- kind: "list";
5821
+ filename?: string | undefined;
5822
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
5823
+ id: string;
5824
+ title: string;
5825
+ type: "source";
5826
+ sourceType: "document";
5827
+ mediaType: string;
5828
+ } | {
5829
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
5830
+ id: string;
5831
+ type: "text-delta";
5832
+ text: string;
5833
+ } | {
5834
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
5835
+ id: string;
5836
+ type: "reasoning-delta";
5837
+ text: string;
5838
+ } | {
5839
+ providerExecuted?: boolean | undefined;
5840
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
5841
+ dynamic?: boolean | undefined;
5842
+ type: "tool-call";
5843
+ toolCallId: string;
5844
+ toolName: string;
5845
+ input: any;
5846
+ } | {
5847
+ providerExecuted?: boolean | undefined;
5848
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
5849
+ dynamic?: boolean | undefined;
5850
+ id: string;
5851
+ type: "tool-input-start";
5852
+ toolName: string;
5853
+ } | {
5854
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
5855
+ id: string;
5856
+ type: "tool-input-delta";
5857
+ delta: string;
5858
+ } | {
5859
+ providerExecuted?: boolean | undefined;
5860
+ input?: any;
5861
+ dynamic?: boolean | undefined;
5862
+ output?: any;
5863
+ type: "tool-result";
5864
+ toolCallId: string;
5865
+ toolName: string;
5866
+ } | {
5867
+ type: "raw";
5868
+ rawValue: any;
5869
+ }, [import("convex/values").VObject<{
5870
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
5871
+ id: string;
5872
+ type: "text-delta";
5873
+ text: string;
5347
5874
  }, {
5348
- kind: import("convex/values").VLiteral<"list", "required">;
5349
- startOrder: import("convex/values").VFloat64<number | undefined, "optional">;
5350
- }, "required", "kind" | "startOrder">, import("convex/values").VObject<{
5351
- kind: "deltas";
5352
- cursors: {
5353
- streamId: string;
5354
- cursor: number;
5355
- }[];
5875
+ type: import("convex/values").VLiteral<"text-delta", "required">;
5876
+ id: import("convex/values").VString<string, "required">;
5877
+ text: import("convex/values").VString<string, "required">;
5878
+ 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>;
5879
+ }, "required", "id" | "type" | "text" | "providerMetadata" | `providerMetadata.${string}`>, import("convex/values").VObject<{
5880
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
5881
+ id: string;
5882
+ type: "reasoning-delta";
5883
+ text: string;
5356
5884
  }, {
5357
- kind: import("convex/values").VLiteral<"deltas", "required">;
5358
- cursors: import("convex/values").VArray<{
5359
- streamId: string;
5360
- cursor: number;
5361
- }[], import("convex/values").VObject<{
5362
- streamId: string;
5363
- cursor: number;
5364
- }, {
5365
- streamId: import("convex/values").VString<string, "required">;
5366
- cursor: import("convex/values").VFloat64<number, "required">;
5367
- }, "required", "streamId" | "cursor">, "required">;
5368
- }, "required", "kind" | "cursors">], "optional", "kind" | "startOrder" | "cursors">;
5369
- export type StreamArgs = Infer<typeof vStreamArgs>;
5370
- export declare const vStreamMessage: import("convex/values").VObject<{
5371
- userId?: string | undefined;
5372
- agentName?: string | undefined;
5373
- model?: string | undefined;
5374
- provider?: string | undefined;
5885
+ type: import("convex/values").VLiteral<"reasoning-delta", "required">;
5886
+ id: import("convex/values").VString<string, "required">;
5887
+ text: import("convex/values").VString<string, "required">;
5888
+ 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>;
5889
+ }, "required", "id" | "type" | "text" | "providerMetadata" | `providerMetadata.${string}`>, import("convex/values").VUnion<{
5890
+ title?: string | undefined;
5891
+ type?: "source" | undefined;
5375
5892
  providerOptions?: Record<string, Record<string, any>> | undefined;
5376
- status: "streaming" | "finished" | "aborted";
5377
- order: number;
5378
- stepOrder: number;
5379
- streamId: string;
5893
+ url?: string | undefined;
5894
+ id: string;
5895
+ sourceType: "url";
5896
+ } | {
5897
+ filename?: string | undefined;
5898
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
5899
+ id: string;
5900
+ title: string;
5901
+ type: "source";
5902
+ sourceType: "document";
5903
+ mediaType: string;
5904
+ }, [import("convex/values").VObject<{
5905
+ title?: string | undefined;
5906
+ type?: "source" | undefined;
5907
+ providerOptions?: Record<string, Record<string, any>> | undefined;
5908
+ url?: string | undefined;
5909
+ id: string;
5910
+ sourceType: "url";
5380
5911
  }, {
5381
- streamId: import("convex/values").VString<string, "required">;
5382
- status: import("convex/values").VUnion<"streaming" | "finished" | "aborted", [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"finished", "required">, import("convex/values").VLiteral<"aborted", "required">], "required", never>;
5383
- order: import("convex/values").VFloat64<number, "required">;
5384
- stepOrder: import("convex/values").VFloat64<number, "required">;
5385
- userId: import("convex/values").VString<string | undefined, "optional">;
5386
- agentName: import("convex/values").VString<string | undefined, "optional">;
5387
- model: import("convex/values").VString<string | undefined, "optional">;
5388
- provider: import("convex/values").VString<string | undefined, "optional">;
5912
+ type: import("convex/values").VLiteral<"source" | undefined, "optional">;
5913
+ sourceType: import("convex/values").VLiteral<"url", "required">;
5914
+ id: import("convex/values").VString<string, "required">;
5915
+ url: import("convex/values").VString<string | undefined, "optional">;
5916
+ title: import("convex/values").VString<string | undefined, "optional">;
5389
5917
  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>;
5390
- }, "required", "status" | "userId" | "order" | "stepOrder" | "agentName" | "model" | "provider" | "providerOptions" | `providerOptions.${string}` | "streamId">;
5391
- export type StreamMessage = Infer<typeof vStreamMessage>;
5392
- export declare const vStreamDelta: import("convex/values").VObject<{
5393
- streamId: string;
5394
- start: number;
5395
- end: number;
5396
- parts: ({
5397
- providerOptions?: Record<string, Record<string, any>> | undefined;
5398
- type: "tool-call";
5399
- toolCallId: string;
5400
- toolName: string;
5918
+ }, "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, import("convex/values").VObject<{
5919
+ filename?: string | undefined;
5920
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
5921
+ id: string;
5922
+ title: string;
5923
+ type: "source";
5924
+ sourceType: "document";
5925
+ mediaType: string;
5926
+ }, {
5927
+ type: import("convex/values").VLiteral<"source", "required">;
5928
+ sourceType: import("convex/values").VLiteral<"document", "required">;
5929
+ id: import("convex/values").VString<string, "required">;
5930
+ mediaType: import("convex/values").VString<string, "required">;
5931
+ title: import("convex/values").VString<string, "required">;
5932
+ filename: import("convex/values").VString<string | undefined, "optional">;
5933
+ 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>;
5934
+ }, "required", "id" | "title" | "type" | "filename" | "providerMetadata" | "sourceType" | "mediaType" | `providerMetadata.${string}`>], "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "filename" | "providerMetadata" | "sourceType" | "url" | "mediaType" | `providerMetadata.${string}`>, import("convex/values").VObject<{
5935
+ providerExecuted?: boolean | undefined;
5936
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
5937
+ dynamic?: boolean | undefined;
5938
+ type: "tool-call";
5939
+ toolCallId: string;
5940
+ toolName: string;
5941
+ input: any;
5942
+ }, {
5943
+ type: import("convex/values").VLiteral<"tool-call", "required">;
5944
+ toolCallId: import("convex/values").VString<string, "required">;
5945
+ toolName: import("convex/values").VString<string, "required">;
5946
+ input: import("convex/values").VAny<any, "required", string>;
5947
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
5948
+ dynamic: import("convex/values").VBoolean<boolean | undefined, "optional">;
5949
+ 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>;
5950
+ }, "required", "type" | "toolCallId" | "toolName" | "providerExecuted" | "providerMetadata" | `providerMetadata.${string}` | "input" | "dynamic" | `input.${string}`>, import("convex/values").VObject<{
5951
+ providerExecuted?: boolean | undefined;
5952
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
5953
+ dynamic?: boolean | undefined;
5954
+ id: string;
5955
+ type: "tool-input-start";
5956
+ toolName: string;
5957
+ }, {
5958
+ type: import("convex/values").VLiteral<"tool-input-start", "required">;
5959
+ id: import("convex/values").VString<string, "required">;
5960
+ toolName: import("convex/values").VString<string, "required">;
5961
+ 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>;
5962
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
5963
+ dynamic: import("convex/values").VBoolean<boolean | undefined, "optional">;
5964
+ }, "required", "id" | "type" | "toolName" | "providerExecuted" | "providerMetadata" | `providerMetadata.${string}` | "dynamic">, import("convex/values").VObject<{
5965
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
5966
+ id: string;
5967
+ type: "tool-input-delta";
5968
+ delta: string;
5969
+ }, {
5970
+ type: import("convex/values").VLiteral<"tool-input-delta", "required">;
5971
+ id: import("convex/values").VString<string, "required">;
5972
+ delta: import("convex/values").VString<string, "required">;
5973
+ 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>;
5974
+ }, "required", "id" | "type" | "providerMetadata" | `providerMetadata.${string}` | "delta">, import("convex/values").VObject<{
5975
+ providerExecuted?: boolean | undefined;
5976
+ input?: any;
5977
+ dynamic?: boolean | undefined;
5978
+ output?: any;
5979
+ type: "tool-result";
5980
+ toolCallId: string;
5981
+ toolName: string;
5982
+ }, {
5983
+ type: import("convex/values").VLiteral<"tool-result", "required">;
5984
+ toolCallId: import("convex/values").VString<string, "required">;
5985
+ toolName: import("convex/values").VString<string, "required">;
5986
+ input: import("convex/values").VAny<any, "optional", string>;
5987
+ output: import("convex/values").VAny<any, "optional", string>;
5988
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
5989
+ dynamic: import("convex/values").VBoolean<boolean | undefined, "optional">;
5990
+ }, "required", "type" | "toolCallId" | "toolName" | "providerExecuted" | "input" | "dynamic" | `input.${string}` | "output" | `output.${string}`>, import("convex/values").VObject<{
5991
+ type: "raw";
5992
+ rawValue: any;
5993
+ }, {
5994
+ type: import("convex/values").VLiteral<"raw", "required">;
5995
+ rawValue: import("convex/values").VAny<any, "required", string>;
5996
+ }, "required", "type" | "rawValue" | `rawValue.${string}`>], "required", "id" | "title" | "type" | "providerOptions" | "text" | `providerOptions.${string}` | "filename" | "toolCallId" | "toolName" | "providerExecuted" | "providerMetadata" | "sourceType" | "url" | "mediaType" | `providerMetadata.${string}` | "input" | "dynamic" | `input.${string}` | "delta" | "output" | `output.${string}` | "rawValue" | `rawValue.${string}`>;
5997
+ export declare const vTextStreamPart: import("convex/values").VUnion<{
5998
+ providerOptions?: Record<string, Record<string, any>> | undefined;
5999
+ providerExecuted?: boolean | undefined;
6000
+ type: "tool-call";
6001
+ toolCallId: string;
6002
+ toolName: string;
6003
+ args: any;
6004
+ } | {
6005
+ providerOptions?: Record<string, Record<string, any>> | undefined;
6006
+ args?: any;
6007
+ providerExecuted?: boolean | undefined;
6008
+ isError?: boolean | undefined;
6009
+ experimental_content?: ({
6010
+ type: "text";
6011
+ text: string;
6012
+ } | {
6013
+ mimeType?: string | undefined;
6014
+ type: "image";
6015
+ data: string;
6016
+ })[] | undefined;
6017
+ type: "tool-result";
6018
+ toolCallId: string;
6019
+ toolName: string;
6020
+ result: any;
6021
+ } | {
6022
+ title?: string | undefined;
6023
+ type?: "source" | undefined;
6024
+ providerOptions?: Record<string, Record<string, any>> | undefined;
6025
+ url?: string | undefined;
6026
+ id: string;
6027
+ sourceType: "url";
6028
+ } | {
6029
+ filename?: string | undefined;
6030
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6031
+ id: string;
6032
+ title: string;
6033
+ type: "source";
6034
+ sourceType: "document";
6035
+ mediaType: string;
6036
+ } | {
6037
+ type: "text-delta";
6038
+ textDelta: string;
6039
+ } | {
6040
+ type: "reasoning";
6041
+ textDelta: string;
6042
+ } | {
6043
+ type: "source";
6044
+ source: {
6045
+ title?: string | undefined;
6046
+ providerOptions?: Record<string, Record<string, any>> | undefined;
6047
+ url?: string | undefined;
6048
+ id: string;
6049
+ sourceType: "url";
6050
+ };
6051
+ } | {
6052
+ type: "tool-call-streaming-start";
6053
+ toolCallId: string;
6054
+ toolName: string;
6055
+ } | {
6056
+ type: "tool-call-delta";
6057
+ toolCallId: string;
6058
+ toolName: string;
6059
+ argsTextDelta: string;
6060
+ } | {
6061
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6062
+ id: string;
6063
+ type: "text-delta";
6064
+ text: string;
6065
+ } | {
6066
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6067
+ id: string;
6068
+ type: "reasoning-delta";
6069
+ text: string;
6070
+ } | {
6071
+ providerExecuted?: boolean | undefined;
6072
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6073
+ dynamic?: boolean | undefined;
6074
+ type: "tool-call";
6075
+ toolCallId: string;
6076
+ toolName: string;
6077
+ input: any;
6078
+ } | {
6079
+ providerExecuted?: boolean | undefined;
6080
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6081
+ dynamic?: boolean | undefined;
6082
+ id: string;
6083
+ type: "tool-input-start";
6084
+ toolName: string;
6085
+ } | {
6086
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6087
+ id: string;
6088
+ type: "tool-input-delta";
6089
+ delta: string;
6090
+ } | {
6091
+ providerExecuted?: boolean | undefined;
6092
+ input?: any;
6093
+ dynamic?: boolean | undefined;
6094
+ output?: any;
6095
+ type: "tool-result";
6096
+ toolCallId: string;
6097
+ toolName: string;
6098
+ } | {
6099
+ type: "raw";
6100
+ rawValue: any;
6101
+ }, [import("convex/values").VUnion<{
6102
+ providerOptions?: Record<string, Record<string, any>> | undefined;
6103
+ providerExecuted?: boolean | undefined;
6104
+ type: "tool-call";
6105
+ toolCallId: string;
6106
+ toolName: string;
6107
+ args: any;
6108
+ } | {
6109
+ providerOptions?: Record<string, Record<string, any>> | undefined;
6110
+ args?: any;
6111
+ providerExecuted?: boolean | undefined;
6112
+ isError?: boolean | undefined;
6113
+ experimental_content?: ({
6114
+ type: "text";
6115
+ text: string;
6116
+ } | {
6117
+ mimeType?: string | undefined;
6118
+ type: "image";
6119
+ data: string;
6120
+ })[] | undefined;
6121
+ type: "tool-result";
6122
+ toolCallId: string;
6123
+ toolName: string;
6124
+ result: any;
6125
+ } | {
6126
+ type: "text-delta";
6127
+ textDelta: string;
6128
+ } | {
6129
+ type: "reasoning";
6130
+ textDelta: string;
6131
+ } | {
6132
+ type: "source";
6133
+ source: {
6134
+ title?: string | undefined;
6135
+ providerOptions?: Record<string, Record<string, any>> | undefined;
6136
+ url?: string | undefined;
6137
+ id: string;
6138
+ sourceType: "url";
6139
+ };
6140
+ } | {
6141
+ type: "tool-call-streaming-start";
6142
+ toolCallId: string;
6143
+ toolName: string;
6144
+ } | {
6145
+ type: "tool-call-delta";
6146
+ toolCallId: string;
6147
+ toolName: string;
6148
+ argsTextDelta: string;
6149
+ }, [import("convex/values").VObject<{
6150
+ type: "text-delta";
6151
+ textDelta: string;
6152
+ }, {
6153
+ type: import("convex/values").VLiteral<"text-delta", "required">;
6154
+ textDelta: import("convex/values").VString<string, "required">;
6155
+ }, "required", "type" | "textDelta">, import("convex/values").VObject<{
6156
+ type: "reasoning";
6157
+ textDelta: string;
6158
+ }, {
6159
+ type: import("convex/values").VLiteral<"reasoning", "required">;
6160
+ textDelta: import("convex/values").VString<string, "required">;
6161
+ }, "required", "type" | "textDelta">, import("convex/values").VObject<{
6162
+ type: "source";
6163
+ source: {
6164
+ title?: string | undefined;
6165
+ providerOptions?: Record<string, Record<string, any>> | undefined;
6166
+ url?: string | undefined;
6167
+ id: string;
6168
+ sourceType: "url";
6169
+ };
6170
+ }, {
6171
+ type: import("convex/values").VLiteral<"source", "required">;
6172
+ source: import("convex/values").VObject<{
6173
+ title?: string | undefined;
6174
+ providerOptions?: Record<string, Record<string, any>> | undefined;
6175
+ url?: string | undefined;
6176
+ id: string;
6177
+ sourceType: "url";
6178
+ }, {
6179
+ sourceType: import("convex/values").VLiteral<"url", "required">;
6180
+ id: import("convex/values").VString<string, "required">;
6181
+ url: import("convex/values").VString<string | undefined, "optional">;
6182
+ title: import("convex/values").VString<string | undefined, "optional">;
6183
+ 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>;
6184
+ }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">;
6185
+ }, "required", "type" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url">, import("convex/values").VObject<{
6186
+ providerOptions?: Record<string, Record<string, any>> | undefined;
6187
+ providerExecuted?: boolean | undefined;
6188
+ type: "tool-call";
6189
+ toolCallId: string;
6190
+ toolName: string;
6191
+ args: any;
6192
+ }, {
6193
+ type: import("convex/values").VLiteral<"tool-call", "required">;
6194
+ toolCallId: import("convex/values").VString<string, "required">;
6195
+ toolName: import("convex/values").VString<string, "required">;
6196
+ args: import("convex/values").VAny<any, "required", string>;
6197
+ 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>;
6198
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
6199
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>, import("convex/values").VObject<{
6200
+ providerOptions?: Record<string, Record<string, any>> | undefined;
6201
+ args?: any;
6202
+ providerExecuted?: boolean | undefined;
6203
+ isError?: boolean | undefined;
6204
+ experimental_content?: ({
6205
+ type: "text";
6206
+ text: string;
6207
+ } | {
6208
+ mimeType?: string | undefined;
6209
+ type: "image";
6210
+ data: string;
6211
+ })[] | undefined;
6212
+ type: "tool-result";
6213
+ toolCallId: string;
6214
+ toolName: string;
6215
+ result: any;
6216
+ }, {
6217
+ type: import("convex/values").VLiteral<"tool-result", "required">;
6218
+ toolCallId: import("convex/values").VString<string, "required">;
6219
+ toolName: import("convex/values").VString<string, "required">;
6220
+ result: import("convex/values").VAny<any, "required", string>;
6221
+ 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>;
6222
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
6223
+ isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
6224
+ args: import("convex/values").VAny<any, "optional", string>;
6225
+ experimental_content: import("convex/values").VArray<({
6226
+ type: "text";
6227
+ text: string;
6228
+ } | {
6229
+ mimeType?: string | undefined;
6230
+ type: "image";
6231
+ data: string;
6232
+ })[] | undefined, import("convex/values").VUnion<{
6233
+ type: "text";
6234
+ text: string;
6235
+ } | {
6236
+ mimeType?: string | undefined;
6237
+ type: "image";
6238
+ data: string;
6239
+ }, [import("convex/values").VObject<{
6240
+ type: "text";
6241
+ text: string;
6242
+ }, {
6243
+ type: import("convex/values").VLiteral<"text", "required">;
6244
+ text: import("convex/values").VString<string, "required">;
6245
+ }, "required", "type" | "text">, import("convex/values").VObject<{
6246
+ mimeType?: string | undefined;
6247
+ type: "image";
6248
+ data: string;
6249
+ }, {
6250
+ type: import("convex/values").VLiteral<"image", "required">;
6251
+ data: import("convex/values").VString<string, "required">;
6252
+ mimeType: import("convex/values").VString<string | undefined, "optional">;
6253
+ }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
6254
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}`>, import("convex/values").VObject<{
6255
+ type: "tool-call-streaming-start";
6256
+ toolCallId: string;
6257
+ toolName: string;
6258
+ }, {
6259
+ type: import("convex/values").VLiteral<"tool-call-streaming-start", "required">;
6260
+ toolCallId: import("convex/values").VString<string, "required">;
6261
+ toolName: import("convex/values").VString<string, "required">;
6262
+ }, "required", "type" | "toolCallId" | "toolName">, import("convex/values").VObject<{
6263
+ type: "tool-call-delta";
6264
+ toolCallId: string;
6265
+ toolName: string;
6266
+ argsTextDelta: string;
6267
+ }, {
6268
+ type: import("convex/values").VLiteral<"tool-call-delta", "required">;
6269
+ toolCallId: import("convex/values").VString<string, "required">;
6270
+ toolName: import("convex/values").VString<string, "required">;
6271
+ argsTextDelta: import("convex/values").VString<string, "required">;
6272
+ }, "required", "type" | "toolCallId" | "toolName" | "argsTextDelta">], "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}` | "source" | "textDelta" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url" | "argsTextDelta">, import("convex/values").VUnion<{
6273
+ title?: string | undefined;
6274
+ type?: "source" | undefined;
6275
+ providerOptions?: Record<string, Record<string, any>> | undefined;
6276
+ url?: string | undefined;
6277
+ id: string;
6278
+ sourceType: "url";
6279
+ } | {
6280
+ filename?: string | undefined;
6281
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6282
+ id: string;
6283
+ title: string;
6284
+ type: "source";
6285
+ sourceType: "document";
6286
+ mediaType: string;
6287
+ } | {
6288
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6289
+ id: string;
6290
+ type: "text-delta";
6291
+ text: string;
6292
+ } | {
6293
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6294
+ id: string;
6295
+ type: "reasoning-delta";
6296
+ text: string;
6297
+ } | {
6298
+ providerExecuted?: boolean | undefined;
6299
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6300
+ dynamic?: boolean | undefined;
6301
+ type: "tool-call";
6302
+ toolCallId: string;
6303
+ toolName: string;
6304
+ input: any;
6305
+ } | {
6306
+ providerExecuted?: boolean | undefined;
6307
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6308
+ dynamic?: boolean | undefined;
6309
+ id: string;
6310
+ type: "tool-input-start";
6311
+ toolName: string;
6312
+ } | {
6313
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6314
+ id: string;
6315
+ type: "tool-input-delta";
6316
+ delta: string;
6317
+ } | {
6318
+ providerExecuted?: boolean | undefined;
6319
+ input?: any;
6320
+ dynamic?: boolean | undefined;
6321
+ output?: any;
6322
+ type: "tool-result";
6323
+ toolCallId: string;
6324
+ toolName: string;
6325
+ } | {
6326
+ type: "raw";
6327
+ rawValue: any;
6328
+ }, [import("convex/values").VObject<{
6329
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6330
+ id: string;
6331
+ type: "text-delta";
6332
+ text: string;
6333
+ }, {
6334
+ type: import("convex/values").VLiteral<"text-delta", "required">;
6335
+ id: import("convex/values").VString<string, "required">;
6336
+ text: import("convex/values").VString<string, "required">;
6337
+ 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>;
6338
+ }, "required", "id" | "type" | "text" | "providerMetadata" | `providerMetadata.${string}`>, import("convex/values").VObject<{
6339
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6340
+ id: string;
6341
+ type: "reasoning-delta";
6342
+ text: string;
6343
+ }, {
6344
+ type: import("convex/values").VLiteral<"reasoning-delta", "required">;
6345
+ id: import("convex/values").VString<string, "required">;
6346
+ text: import("convex/values").VString<string, "required">;
6347
+ 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>;
6348
+ }, "required", "id" | "type" | "text" | "providerMetadata" | `providerMetadata.${string}`>, import("convex/values").VUnion<{
6349
+ title?: string | undefined;
6350
+ type?: "source" | undefined;
6351
+ providerOptions?: Record<string, Record<string, any>> | undefined;
6352
+ url?: string | undefined;
6353
+ id: string;
6354
+ sourceType: "url";
6355
+ } | {
6356
+ filename?: string | undefined;
6357
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6358
+ id: string;
6359
+ title: string;
6360
+ type: "source";
6361
+ sourceType: "document";
6362
+ mediaType: string;
6363
+ }, [import("convex/values").VObject<{
6364
+ title?: string | undefined;
6365
+ type?: "source" | undefined;
6366
+ providerOptions?: Record<string, Record<string, any>> | undefined;
6367
+ url?: string | undefined;
6368
+ id: string;
6369
+ sourceType: "url";
6370
+ }, {
6371
+ type: import("convex/values").VLiteral<"source" | undefined, "optional">;
6372
+ sourceType: import("convex/values").VLiteral<"url", "required">;
6373
+ id: import("convex/values").VString<string, "required">;
6374
+ url: import("convex/values").VString<string | undefined, "optional">;
6375
+ title: import("convex/values").VString<string | undefined, "optional">;
6376
+ 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>;
6377
+ }, "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, import("convex/values").VObject<{
6378
+ filename?: string | undefined;
6379
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6380
+ id: string;
6381
+ title: string;
6382
+ type: "source";
6383
+ sourceType: "document";
6384
+ mediaType: string;
6385
+ }, {
6386
+ type: import("convex/values").VLiteral<"source", "required">;
6387
+ sourceType: import("convex/values").VLiteral<"document", "required">;
6388
+ id: import("convex/values").VString<string, "required">;
6389
+ mediaType: import("convex/values").VString<string, "required">;
6390
+ title: import("convex/values").VString<string, "required">;
6391
+ filename: import("convex/values").VString<string | undefined, "optional">;
6392
+ 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>;
6393
+ }, "required", "id" | "title" | "type" | "filename" | "providerMetadata" | "sourceType" | "mediaType" | `providerMetadata.${string}`>], "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "filename" | "providerMetadata" | "sourceType" | "url" | "mediaType" | `providerMetadata.${string}`>, import("convex/values").VObject<{
6394
+ providerExecuted?: boolean | undefined;
6395
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6396
+ dynamic?: boolean | undefined;
6397
+ type: "tool-call";
6398
+ toolCallId: string;
6399
+ toolName: string;
6400
+ input: any;
6401
+ }, {
6402
+ type: import("convex/values").VLiteral<"tool-call", "required">;
6403
+ toolCallId: import("convex/values").VString<string, "required">;
6404
+ toolName: import("convex/values").VString<string, "required">;
6405
+ input: import("convex/values").VAny<any, "required", string>;
6406
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
6407
+ dynamic: import("convex/values").VBoolean<boolean | undefined, "optional">;
6408
+ 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>;
6409
+ }, "required", "type" | "toolCallId" | "toolName" | "providerExecuted" | "providerMetadata" | `providerMetadata.${string}` | "input" | "dynamic" | `input.${string}`>, import("convex/values").VObject<{
6410
+ providerExecuted?: boolean | undefined;
6411
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6412
+ dynamic?: boolean | undefined;
6413
+ id: string;
6414
+ type: "tool-input-start";
6415
+ toolName: string;
6416
+ }, {
6417
+ type: import("convex/values").VLiteral<"tool-input-start", "required">;
6418
+ id: import("convex/values").VString<string, "required">;
6419
+ toolName: import("convex/values").VString<string, "required">;
6420
+ 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>;
6421
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
6422
+ dynamic: import("convex/values").VBoolean<boolean | undefined, "optional">;
6423
+ }, "required", "id" | "type" | "toolName" | "providerExecuted" | "providerMetadata" | `providerMetadata.${string}` | "dynamic">, import("convex/values").VObject<{
6424
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6425
+ id: string;
6426
+ type: "tool-input-delta";
6427
+ delta: string;
6428
+ }, {
6429
+ type: import("convex/values").VLiteral<"tool-input-delta", "required">;
6430
+ id: import("convex/values").VString<string, "required">;
6431
+ delta: import("convex/values").VString<string, "required">;
6432
+ 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>;
6433
+ }, "required", "id" | "type" | "providerMetadata" | `providerMetadata.${string}` | "delta">, import("convex/values").VObject<{
6434
+ providerExecuted?: boolean | undefined;
6435
+ input?: any;
6436
+ dynamic?: boolean | undefined;
6437
+ output?: any;
6438
+ type: "tool-result";
6439
+ toolCallId: string;
6440
+ toolName: string;
6441
+ }, {
6442
+ type: import("convex/values").VLiteral<"tool-result", "required">;
6443
+ toolCallId: import("convex/values").VString<string, "required">;
6444
+ toolName: import("convex/values").VString<string, "required">;
6445
+ input: import("convex/values").VAny<any, "optional", string>;
6446
+ output: import("convex/values").VAny<any, "optional", string>;
6447
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
6448
+ dynamic: import("convex/values").VBoolean<boolean | undefined, "optional">;
6449
+ }, "required", "type" | "toolCallId" | "toolName" | "providerExecuted" | "input" | "dynamic" | `input.${string}` | "output" | `output.${string}`>, import("convex/values").VObject<{
6450
+ type: "raw";
6451
+ rawValue: any;
6452
+ }, {
6453
+ type: import("convex/values").VLiteral<"raw", "required">;
6454
+ rawValue: import("convex/values").VAny<any, "required", string>;
6455
+ }, "required", "type" | "rawValue" | `rawValue.${string}`>], "required", "id" | "title" | "type" | "providerOptions" | "text" | `providerOptions.${string}` | "filename" | "toolCallId" | "toolName" | "providerExecuted" | "providerMetadata" | "sourceType" | "url" | "mediaType" | `providerMetadata.${string}` | "input" | "dynamic" | `input.${string}` | "delta" | "output" | `output.${string}` | "rawValue" | `rawValue.${string}`>], "required", "id" | "title" | "type" | "providerOptions" | "text" | `providerOptions.${string}` | "filename" | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}` | "providerMetadata" | "source" | "sourceType" | "url" | "mediaType" | `providerMetadata.${string}` | "textDelta" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url" | "argsTextDelta" | "input" | "dynamic" | `input.${string}` | "delta" | "output" | `output.${string}` | "rawValue" | `rawValue.${string}`>;
6456
+ export type TextStreamPart = Infer<typeof vTextStreamPart>;
6457
+ export declare const vStreamCursor: import("convex/values").VObject<{
6458
+ streamId: string;
6459
+ cursor: number;
6460
+ }, {
6461
+ streamId: import("convex/values").VString<string, "required">;
6462
+ cursor: import("convex/values").VFloat64<number, "required">;
6463
+ }, "required", "streamId" | "cursor">;
6464
+ export type StreamCursor = Infer<typeof vStreamCursor>;
6465
+ export declare const vStreamArgs: import("convex/values").VUnion<{
6466
+ startOrder?: number | undefined;
6467
+ kind: "list";
6468
+ } | {
6469
+ kind: "deltas";
6470
+ cursors: {
6471
+ streamId: string;
6472
+ cursor: number;
6473
+ }[];
6474
+ } | undefined, [import("convex/values").VObject<{
6475
+ startOrder?: number | undefined;
6476
+ kind: "list";
6477
+ }, {
6478
+ kind: import("convex/values").VLiteral<"list", "required">;
6479
+ startOrder: import("convex/values").VFloat64<number | undefined, "optional">;
6480
+ }, "required", "kind" | "startOrder">, import("convex/values").VObject<{
6481
+ kind: "deltas";
6482
+ cursors: {
6483
+ streamId: string;
6484
+ cursor: number;
6485
+ }[];
6486
+ }, {
6487
+ kind: import("convex/values").VLiteral<"deltas", "required">;
6488
+ cursors: import("convex/values").VArray<{
6489
+ streamId: string;
6490
+ cursor: number;
6491
+ }[], import("convex/values").VObject<{
6492
+ streamId: string;
6493
+ cursor: number;
6494
+ }, {
6495
+ streamId: import("convex/values").VString<string, "required">;
6496
+ cursor: import("convex/values").VFloat64<number, "required">;
6497
+ }, "required", "streamId" | "cursor">, "required">;
6498
+ }, "required", "kind" | "cursors">], "optional", "kind" | "startOrder" | "cursors">;
6499
+ export type StreamArgs = Infer<typeof vStreamArgs>;
6500
+ export declare const vStreamMessage: import("convex/values").VObject<{
6501
+ userId?: string | undefined;
6502
+ agentName?: string | undefined;
6503
+ model?: string | undefined;
6504
+ provider?: string | undefined;
6505
+ providerOptions?: Record<string, Record<string, any>> | undefined;
6506
+ status: "streaming" | "finished" | "aborted";
6507
+ order: number;
6508
+ stepOrder: number;
6509
+ streamId: string;
6510
+ }, {
6511
+ streamId: import("convex/values").VString<string, "required">;
6512
+ status: import("convex/values").VUnion<"streaming" | "finished" | "aborted", [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"finished", "required">, import("convex/values").VLiteral<"aborted", "required">], "required", never>;
6513
+ order: import("convex/values").VFloat64<number, "required">;
6514
+ stepOrder: import("convex/values").VFloat64<number, "required">;
6515
+ userId: import("convex/values").VString<string | undefined, "optional">;
6516
+ agentName: import("convex/values").VString<string | undefined, "optional">;
6517
+ model: import("convex/values").VString<string | undefined, "optional">;
6518
+ provider: import("convex/values").VString<string | undefined, "optional">;
6519
+ 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>;
6520
+ }, "required", "status" | "userId" | "order" | "stepOrder" | "agentName" | "model" | "provider" | "providerOptions" | `providerOptions.${string}` | "streamId">;
6521
+ export type StreamMessage = Infer<typeof vStreamMessage>;
6522
+ export declare const vStreamDelta: import("convex/values").VObject<{
6523
+ streamId: string;
6524
+ start: number;
6525
+ end: number;
6526
+ parts: ({
6527
+ providerOptions?: Record<string, Record<string, any>> | undefined;
6528
+ providerExecuted?: boolean | undefined;
6529
+ type: "tool-call";
6530
+ toolCallId: string;
6531
+ toolName: string;
6532
+ args: any;
6533
+ } | {
6534
+ providerOptions?: Record<string, Record<string, any>> | undefined;
6535
+ args?: any;
6536
+ providerExecuted?: boolean | undefined;
6537
+ isError?: boolean | undefined;
6538
+ experimental_content?: ({
6539
+ type: "text";
6540
+ text: string;
6541
+ } | {
6542
+ mimeType?: string | undefined;
6543
+ type: "image";
6544
+ data: string;
6545
+ })[] | undefined;
6546
+ type: "tool-result";
6547
+ toolCallId: string;
6548
+ toolName: string;
6549
+ result: any;
6550
+ } | {
6551
+ title?: string | undefined;
6552
+ type?: "source" | undefined;
6553
+ providerOptions?: Record<string, Record<string, any>> | undefined;
6554
+ url?: string | undefined;
6555
+ id: string;
6556
+ sourceType: "url";
6557
+ } | {
6558
+ filename?: string | undefined;
6559
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6560
+ id: string;
6561
+ title: string;
6562
+ type: "source";
6563
+ sourceType: "document";
6564
+ mediaType: string;
6565
+ } | {
6566
+ type: "text-delta";
6567
+ textDelta: string;
6568
+ } | {
6569
+ type: "reasoning";
6570
+ textDelta: string;
6571
+ } | {
6572
+ type: "source";
6573
+ source: {
6574
+ title?: string | undefined;
6575
+ providerOptions?: Record<string, Record<string, any>> | undefined;
6576
+ url?: string | undefined;
6577
+ id: string;
6578
+ sourceType: "url";
6579
+ };
6580
+ } | {
6581
+ type: "tool-call-streaming-start";
6582
+ toolCallId: string;
6583
+ toolName: string;
6584
+ } | {
6585
+ type: "tool-call-delta";
6586
+ toolCallId: string;
6587
+ toolName: string;
6588
+ argsTextDelta: string;
6589
+ } | {
6590
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6591
+ id: string;
6592
+ type: "text-delta";
6593
+ text: string;
6594
+ } | {
6595
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6596
+ id: string;
6597
+ type: "reasoning-delta";
6598
+ text: string;
6599
+ } | {
6600
+ providerExecuted?: boolean | undefined;
6601
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6602
+ dynamic?: boolean | undefined;
6603
+ type: "tool-call";
6604
+ toolCallId: string;
6605
+ toolName: string;
6606
+ input: any;
6607
+ } | {
6608
+ providerExecuted?: boolean | undefined;
6609
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6610
+ dynamic?: boolean | undefined;
6611
+ id: string;
6612
+ type: "tool-input-start";
6613
+ toolName: string;
6614
+ } | {
6615
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6616
+ id: string;
6617
+ type: "tool-input-delta";
6618
+ delta: string;
6619
+ } | {
6620
+ providerExecuted?: boolean | undefined;
6621
+ input?: any;
6622
+ dynamic?: boolean | undefined;
6623
+ output?: any;
6624
+ type: "tool-result";
6625
+ toolCallId: string;
6626
+ toolName: string;
6627
+ } | {
6628
+ type: "raw";
6629
+ rawValue: any;
6630
+ })[];
6631
+ }, {
6632
+ streamId: import("convex/values").VString<string, "required">;
6633
+ start: import("convex/values").VFloat64<number, "required">;
6634
+ end: import("convex/values").VFloat64<number, "required">;
6635
+ parts: import("convex/values").VArray<({
6636
+ providerOptions?: Record<string, Record<string, any>> | undefined;
6637
+ providerExecuted?: boolean | undefined;
6638
+ type: "tool-call";
6639
+ toolCallId: string;
6640
+ toolName: string;
5401
6641
  args: any;
5402
6642
  } | {
5403
6643
  providerOptions?: Record<string, Record<string, any>> | undefined;
5404
6644
  args?: any;
6645
+ providerExecuted?: boolean | undefined;
6646
+ isError?: boolean | undefined;
5405
6647
  experimental_content?: ({
5406
6648
  type: "text";
5407
6649
  text: string;
@@ -5410,11 +6652,25 @@ export declare const vStreamDelta: import("convex/values").VObject<{
5410
6652
  type: "image";
5411
6653
  data: string;
5412
6654
  })[] | undefined;
5413
- isError?: boolean | undefined;
5414
6655
  type: "tool-result";
5415
6656
  toolCallId: string;
5416
6657
  toolName: string;
5417
6658
  result: any;
6659
+ } | {
6660
+ title?: string | undefined;
6661
+ type?: "source" | undefined;
6662
+ providerOptions?: Record<string, Record<string, any>> | undefined;
6663
+ url?: string | undefined;
6664
+ id: string;
6665
+ sourceType: "url";
6666
+ } | {
6667
+ filename?: string | undefined;
6668
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6669
+ id: string;
6670
+ title: string;
6671
+ type: "source";
6672
+ sourceType: "document";
6673
+ mediaType: string;
5418
6674
  } | {
5419
6675
  type: "text-delta";
5420
6676
  textDelta: string;
@@ -5426,9 +6682,9 @@ export declare const vStreamDelta: import("convex/values").VObject<{
5426
6682
  source: {
5427
6683
  title?: string | undefined;
5428
6684
  providerOptions?: Record<string, Record<string, any>> | undefined;
6685
+ url?: string | undefined;
5429
6686
  id: string;
5430
6687
  sourceType: "url";
5431
- url: string;
5432
6688
  };
5433
6689
  } | {
5434
6690
  type: "tool-call-streaming-start";
@@ -5439,13 +6695,50 @@ export declare const vStreamDelta: import("convex/values").VObject<{
5439
6695
  toolCallId: string;
5440
6696
  toolName: string;
5441
6697
  argsTextDelta: string;
5442
- })[];
5443
- }, {
5444
- streamId: import("convex/values").VString<string, "required">;
5445
- start: import("convex/values").VFloat64<number, "required">;
5446
- end: import("convex/values").VFloat64<number, "required">;
5447
- parts: import("convex/values").VArray<({
6698
+ } | {
6699
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6700
+ id: string;
6701
+ type: "text-delta";
6702
+ text: string;
6703
+ } | {
6704
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6705
+ id: string;
6706
+ type: "reasoning-delta";
6707
+ text: string;
6708
+ } | {
6709
+ providerExecuted?: boolean | undefined;
6710
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6711
+ dynamic?: boolean | undefined;
6712
+ type: "tool-call";
6713
+ toolCallId: string;
6714
+ toolName: string;
6715
+ input: any;
6716
+ } | {
6717
+ providerExecuted?: boolean | undefined;
6718
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6719
+ dynamic?: boolean | undefined;
6720
+ id: string;
6721
+ type: "tool-input-start";
6722
+ toolName: string;
6723
+ } | {
6724
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6725
+ id: string;
6726
+ type: "tool-input-delta";
6727
+ delta: string;
6728
+ } | {
6729
+ providerExecuted?: boolean | undefined;
6730
+ input?: any;
6731
+ dynamic?: boolean | undefined;
6732
+ output?: any;
6733
+ type: "tool-result";
6734
+ toolCallId: string;
6735
+ toolName: string;
6736
+ } | {
6737
+ type: "raw";
6738
+ rawValue: any;
6739
+ })[], import("convex/values").VUnion<{
5448
6740
  providerOptions?: Record<string, Record<string, any>> | undefined;
6741
+ providerExecuted?: boolean | undefined;
5449
6742
  type: "tool-call";
5450
6743
  toolCallId: string;
5451
6744
  toolName: string;
@@ -5453,6 +6746,8 @@ export declare const vStreamDelta: import("convex/values").VObject<{
5453
6746
  } | {
5454
6747
  providerOptions?: Record<string, Record<string, any>> | undefined;
5455
6748
  args?: any;
6749
+ providerExecuted?: boolean | undefined;
6750
+ isError?: boolean | undefined;
5456
6751
  experimental_content?: ({
5457
6752
  type: "text";
5458
6753
  text: string;
@@ -5461,11 +6756,25 @@ export declare const vStreamDelta: import("convex/values").VObject<{
5461
6756
  type: "image";
5462
6757
  data: string;
5463
6758
  })[] | undefined;
5464
- isError?: boolean | undefined;
5465
6759
  type: "tool-result";
5466
6760
  toolCallId: string;
5467
6761
  toolName: string;
5468
6762
  result: any;
6763
+ } | {
6764
+ title?: string | undefined;
6765
+ type?: "source" | undefined;
6766
+ providerOptions?: Record<string, Record<string, any>> | undefined;
6767
+ url?: string | undefined;
6768
+ id: string;
6769
+ sourceType: "url";
6770
+ } | {
6771
+ filename?: string | undefined;
6772
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6773
+ id: string;
6774
+ title: string;
6775
+ type: "source";
6776
+ sourceType: "document";
6777
+ mediaType: string;
5469
6778
  } | {
5470
6779
  type: "text-delta";
5471
6780
  textDelta: string;
@@ -5477,9 +6786,9 @@ export declare const vStreamDelta: import("convex/values").VObject<{
5477
6786
  source: {
5478
6787
  title?: string | undefined;
5479
6788
  providerOptions?: Record<string, Record<string, any>> | undefined;
6789
+ url?: string | undefined;
5480
6790
  id: string;
5481
6791
  sourceType: "url";
5482
- url: string;
5483
6792
  };
5484
6793
  } | {
5485
6794
  type: "tool-call-streaming-start";
@@ -5490,8 +6799,50 @@ export declare const vStreamDelta: import("convex/values").VObject<{
5490
6799
  toolCallId: string;
5491
6800
  toolName: string;
5492
6801
  argsTextDelta: string;
5493
- })[], import("convex/values").VUnion<{
6802
+ } | {
6803
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6804
+ id: string;
6805
+ type: "text-delta";
6806
+ text: string;
6807
+ } | {
6808
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6809
+ id: string;
6810
+ type: "reasoning-delta";
6811
+ text: string;
6812
+ } | {
6813
+ providerExecuted?: boolean | undefined;
6814
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6815
+ dynamic?: boolean | undefined;
6816
+ type: "tool-call";
6817
+ toolCallId: string;
6818
+ toolName: string;
6819
+ input: any;
6820
+ } | {
6821
+ providerExecuted?: boolean | undefined;
6822
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6823
+ dynamic?: boolean | undefined;
6824
+ id: string;
6825
+ type: "tool-input-start";
6826
+ toolName: string;
6827
+ } | {
6828
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
6829
+ id: string;
6830
+ type: "tool-input-delta";
6831
+ delta: string;
6832
+ } | {
6833
+ providerExecuted?: boolean | undefined;
6834
+ input?: any;
6835
+ dynamic?: boolean | undefined;
6836
+ output?: any;
6837
+ type: "tool-result";
6838
+ toolCallId: string;
6839
+ toolName: string;
6840
+ } | {
6841
+ type: "raw";
6842
+ rawValue: any;
6843
+ }, [import("convex/values").VUnion<{
5494
6844
  providerOptions?: Record<string, Record<string, any>> | undefined;
6845
+ providerExecuted?: boolean | undefined;
5495
6846
  type: "tool-call";
5496
6847
  toolCallId: string;
5497
6848
  toolName: string;
@@ -5499,6 +6850,8 @@ export declare const vStreamDelta: import("convex/values").VObject<{
5499
6850
  } | {
5500
6851
  providerOptions?: Record<string, Record<string, any>> | undefined;
5501
6852
  args?: any;
6853
+ providerExecuted?: boolean | undefined;
6854
+ isError?: boolean | undefined;
5502
6855
  experimental_content?: ({
5503
6856
  type: "text";
5504
6857
  text: string;
@@ -5507,7 +6860,6 @@ export declare const vStreamDelta: import("convex/values").VObject<{
5507
6860
  type: "image";
5508
6861
  data: string;
5509
6862
  })[] | undefined;
5510
- isError?: boolean | undefined;
5511
6863
  type: "tool-result";
5512
6864
  toolCallId: string;
5513
6865
  toolName: string;
@@ -5523,9 +6875,9 @@ export declare const vStreamDelta: import("convex/values").VObject<{
5523
6875
  source: {
5524
6876
  title?: string | undefined;
5525
6877
  providerOptions?: Record<string, Record<string, any>> | undefined;
6878
+ url?: string | undefined;
5526
6879
  id: string;
5527
6880
  sourceType: "url";
5528
- url: string;
5529
6881
  };
5530
6882
  } | {
5531
6883
  type: "tool-call-streaming-start";
@@ -5553,27 +6905,28 @@ export declare const vStreamDelta: import("convex/values").VObject<{
5553
6905
  source: {
5554
6906
  title?: string | undefined;
5555
6907
  providerOptions?: Record<string, Record<string, any>> | undefined;
6908
+ url?: string | undefined;
5556
6909
  id: string;
5557
6910
  sourceType: "url";
5558
- url: string;
5559
6911
  };
5560
6912
  }, {
5561
6913
  type: import("convex/values").VLiteral<"source", "required">;
5562
6914
  source: import("convex/values").VObject<{
5563
6915
  title?: string | undefined;
5564
6916
  providerOptions?: Record<string, Record<string, any>> | undefined;
6917
+ url?: string | undefined;
5565
6918
  id: string;
5566
6919
  sourceType: "url";
5567
- url: string;
5568
6920
  }, {
5569
6921
  sourceType: import("convex/values").VLiteral<"url", "required">;
5570
6922
  id: import("convex/values").VString<string, "required">;
5571
- url: import("convex/values").VString<string, "required">;
6923
+ url: import("convex/values").VString<string | undefined, "optional">;
5572
6924
  title: import("convex/values").VString<string | undefined, "optional">;
5573
6925
  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>;
5574
6926
  }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">;
5575
6927
  }, "required", "type" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url">, import("convex/values").VObject<{
5576
6928
  providerOptions?: Record<string, Record<string, any>> | undefined;
6929
+ providerExecuted?: boolean | undefined;
5577
6930
  type: "tool-call";
5578
6931
  toolCallId: string;
5579
6932
  toolName: string;
@@ -5584,27 +6937,12 @@ export declare const vStreamDelta: import("convex/values").VObject<{
5584
6937
  toolName: import("convex/values").VString<string, "required">;
5585
6938
  args: import("convex/values").VAny<any, "required", string>;
5586
6939
  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>;
5587
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>, import("convex/values").VObject<{
5588
- type: "tool-call-streaming-start";
5589
- toolCallId: string;
5590
- toolName: string;
5591
- }, {
5592
- type: import("convex/values").VLiteral<"tool-call-streaming-start", "required">;
5593
- toolCallId: import("convex/values").VString<string, "required">;
5594
- toolName: import("convex/values").VString<string, "required">;
5595
- }, "required", "type" | "toolCallId" | "toolName">, import("convex/values").VObject<{
5596
- type: "tool-call-delta";
5597
- toolCallId: string;
5598
- toolName: string;
5599
- argsTextDelta: string;
5600
- }, {
5601
- type: import("convex/values").VLiteral<"tool-call-delta", "required">;
5602
- toolCallId: import("convex/values").VString<string, "required">;
5603
- toolName: import("convex/values").VString<string, "required">;
5604
- argsTextDelta: import("convex/values").VString<string, "required">;
5605
- }, "required", "type" | "toolCallId" | "toolName" | "argsTextDelta">, import("convex/values").VObject<{
6940
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
6941
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>, import("convex/values").VObject<{
5606
6942
  providerOptions?: Record<string, Record<string, any>> | undefined;
5607
6943
  args?: any;
6944
+ providerExecuted?: boolean | undefined;
6945
+ isError?: boolean | undefined;
5608
6946
  experimental_content?: ({
5609
6947
  type: "text";
5610
6948
  text: string;
@@ -5613,7 +6951,6 @@ export declare const vStreamDelta: import("convex/values").VObject<{
5613
6951
  type: "image";
5614
6952
  data: string;
5615
6953
  })[] | undefined;
5616
- isError?: boolean | undefined;
5617
6954
  type: "tool-result";
5618
6955
  toolCallId: string;
5619
6956
  toolName: string;
@@ -5623,6 +6960,9 @@ export declare const vStreamDelta: import("convex/values").VObject<{
5623
6960
  toolCallId: import("convex/values").VString<string, "required">;
5624
6961
  toolName: import("convex/values").VString<string, "required">;
5625
6962
  result: import("convex/values").VAny<any, "required", string>;
6963
+ 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>;
6964
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
6965
+ isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
5626
6966
  args: import("convex/values").VAny<any, "optional", string>;
5627
6967
  experimental_content: import("convex/values").VArray<({
5628
6968
  type: "text";
@@ -5653,9 +6993,208 @@ export declare const vStreamDelta: import("convex/values").VObject<{
5653
6993
  data: import("convex/values").VString<string, "required">;
5654
6994
  mimeType: import("convex/values").VString<string | undefined, "optional">;
5655
6995
  }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
5656
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
6996
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}`>, import("convex/values").VObject<{
6997
+ type: "tool-call-streaming-start";
6998
+ toolCallId: string;
6999
+ toolName: string;
7000
+ }, {
7001
+ type: import("convex/values").VLiteral<"tool-call-streaming-start", "required">;
7002
+ toolCallId: import("convex/values").VString<string, "required">;
7003
+ toolName: import("convex/values").VString<string, "required">;
7004
+ }, "required", "type" | "toolCallId" | "toolName">, import("convex/values").VObject<{
7005
+ type: "tool-call-delta";
7006
+ toolCallId: string;
7007
+ toolName: string;
7008
+ argsTextDelta: string;
7009
+ }, {
7010
+ type: import("convex/values").VLiteral<"tool-call-delta", "required">;
7011
+ toolCallId: import("convex/values").VString<string, "required">;
7012
+ toolName: import("convex/values").VString<string, "required">;
7013
+ argsTextDelta: import("convex/values").VString<string, "required">;
7014
+ }, "required", "type" | "toolCallId" | "toolName" | "argsTextDelta">], "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}` | "source" | "textDelta" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url" | "argsTextDelta">, import("convex/values").VUnion<{
7015
+ title?: string | undefined;
7016
+ type?: "source" | undefined;
7017
+ providerOptions?: Record<string, Record<string, any>> | undefined;
7018
+ url?: string | undefined;
7019
+ id: string;
7020
+ sourceType: "url";
7021
+ } | {
7022
+ filename?: string | undefined;
7023
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
7024
+ id: string;
7025
+ title: string;
7026
+ type: "source";
7027
+ sourceType: "document";
7028
+ mediaType: string;
7029
+ } | {
7030
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
7031
+ id: string;
7032
+ type: "text-delta";
7033
+ text: string;
7034
+ } | {
7035
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
7036
+ id: string;
7037
+ type: "reasoning-delta";
7038
+ text: string;
7039
+ } | {
7040
+ providerExecuted?: boolean | undefined;
7041
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
7042
+ dynamic?: boolean | undefined;
7043
+ type: "tool-call";
7044
+ toolCallId: string;
7045
+ toolName: string;
7046
+ input: any;
7047
+ } | {
7048
+ providerExecuted?: boolean | undefined;
7049
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
7050
+ dynamic?: boolean | undefined;
7051
+ id: string;
7052
+ type: "tool-input-start";
7053
+ toolName: string;
7054
+ } | {
7055
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
7056
+ id: string;
7057
+ type: "tool-input-delta";
7058
+ delta: string;
7059
+ } | {
7060
+ providerExecuted?: boolean | undefined;
7061
+ input?: any;
7062
+ dynamic?: boolean | undefined;
7063
+ output?: any;
7064
+ type: "tool-result";
7065
+ toolCallId: string;
7066
+ toolName: string;
7067
+ } | {
7068
+ type: "raw";
7069
+ rawValue: any;
7070
+ }, [import("convex/values").VObject<{
7071
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
7072
+ id: string;
7073
+ type: "text-delta";
7074
+ text: string;
7075
+ }, {
7076
+ type: import("convex/values").VLiteral<"text-delta", "required">;
7077
+ id: import("convex/values").VString<string, "required">;
7078
+ text: import("convex/values").VString<string, "required">;
7079
+ 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>;
7080
+ }, "required", "id" | "type" | "text" | "providerMetadata" | `providerMetadata.${string}`>, import("convex/values").VObject<{
7081
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
7082
+ id: string;
7083
+ type: "reasoning-delta";
7084
+ text: string;
7085
+ }, {
7086
+ type: import("convex/values").VLiteral<"reasoning-delta", "required">;
7087
+ id: import("convex/values").VString<string, "required">;
7088
+ text: import("convex/values").VString<string, "required">;
7089
+ 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>;
7090
+ }, "required", "id" | "type" | "text" | "providerMetadata" | `providerMetadata.${string}`>, import("convex/values").VUnion<{
7091
+ title?: string | undefined;
7092
+ type?: "source" | undefined;
7093
+ providerOptions?: Record<string, Record<string, any>> | undefined;
7094
+ url?: string | undefined;
7095
+ id: string;
7096
+ sourceType: "url";
7097
+ } | {
7098
+ filename?: string | undefined;
7099
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
7100
+ id: string;
7101
+ title: string;
7102
+ type: "source";
7103
+ sourceType: "document";
7104
+ mediaType: string;
7105
+ }, [import("convex/values").VObject<{
7106
+ title?: string | undefined;
7107
+ type?: "source" | undefined;
7108
+ providerOptions?: Record<string, Record<string, any>> | undefined;
7109
+ url?: string | undefined;
7110
+ id: string;
7111
+ sourceType: "url";
7112
+ }, {
7113
+ type: import("convex/values").VLiteral<"source" | undefined, "optional">;
7114
+ sourceType: import("convex/values").VLiteral<"url", "required">;
7115
+ id: import("convex/values").VString<string, "required">;
7116
+ url: import("convex/values").VString<string | undefined, "optional">;
7117
+ title: import("convex/values").VString<string | undefined, "optional">;
5657
7118
  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>;
5658
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>], "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}` | "textDelta" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url" | "argsTextDelta">, "required">;
7119
+ }, "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, import("convex/values").VObject<{
7120
+ filename?: string | undefined;
7121
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
7122
+ id: string;
7123
+ title: string;
7124
+ type: "source";
7125
+ sourceType: "document";
7126
+ mediaType: string;
7127
+ }, {
7128
+ type: import("convex/values").VLiteral<"source", "required">;
7129
+ sourceType: import("convex/values").VLiteral<"document", "required">;
7130
+ id: import("convex/values").VString<string, "required">;
7131
+ mediaType: import("convex/values").VString<string, "required">;
7132
+ title: import("convex/values").VString<string, "required">;
7133
+ filename: import("convex/values").VString<string | undefined, "optional">;
7134
+ 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>;
7135
+ }, "required", "id" | "title" | "type" | "filename" | "providerMetadata" | "sourceType" | "mediaType" | `providerMetadata.${string}`>], "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "filename" | "providerMetadata" | "sourceType" | "url" | "mediaType" | `providerMetadata.${string}`>, import("convex/values").VObject<{
7136
+ providerExecuted?: boolean | undefined;
7137
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
7138
+ dynamic?: boolean | undefined;
7139
+ type: "tool-call";
7140
+ toolCallId: string;
7141
+ toolName: string;
7142
+ input: any;
7143
+ }, {
7144
+ type: import("convex/values").VLiteral<"tool-call", "required">;
7145
+ toolCallId: import("convex/values").VString<string, "required">;
7146
+ toolName: import("convex/values").VString<string, "required">;
7147
+ input: import("convex/values").VAny<any, "required", string>;
7148
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
7149
+ dynamic: import("convex/values").VBoolean<boolean | undefined, "optional">;
7150
+ 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>;
7151
+ }, "required", "type" | "toolCallId" | "toolName" | "providerExecuted" | "providerMetadata" | `providerMetadata.${string}` | "input" | "dynamic" | `input.${string}`>, import("convex/values").VObject<{
7152
+ providerExecuted?: boolean | undefined;
7153
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
7154
+ dynamic?: boolean | undefined;
7155
+ id: string;
7156
+ type: "tool-input-start";
7157
+ toolName: string;
7158
+ }, {
7159
+ type: import("convex/values").VLiteral<"tool-input-start", "required">;
7160
+ id: import("convex/values").VString<string, "required">;
7161
+ toolName: import("convex/values").VString<string, "required">;
7162
+ 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>;
7163
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
7164
+ dynamic: import("convex/values").VBoolean<boolean | undefined, "optional">;
7165
+ }, "required", "id" | "type" | "toolName" | "providerExecuted" | "providerMetadata" | `providerMetadata.${string}` | "dynamic">, import("convex/values").VObject<{
7166
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
7167
+ id: string;
7168
+ type: "tool-input-delta";
7169
+ delta: string;
7170
+ }, {
7171
+ type: import("convex/values").VLiteral<"tool-input-delta", "required">;
7172
+ id: import("convex/values").VString<string, "required">;
7173
+ delta: import("convex/values").VString<string, "required">;
7174
+ 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>;
7175
+ }, "required", "id" | "type" | "providerMetadata" | `providerMetadata.${string}` | "delta">, import("convex/values").VObject<{
7176
+ providerExecuted?: boolean | undefined;
7177
+ input?: any;
7178
+ dynamic?: boolean | undefined;
7179
+ output?: any;
7180
+ type: "tool-result";
7181
+ toolCallId: string;
7182
+ toolName: string;
7183
+ }, {
7184
+ type: import("convex/values").VLiteral<"tool-result", "required">;
7185
+ toolCallId: import("convex/values").VString<string, "required">;
7186
+ toolName: import("convex/values").VString<string, "required">;
7187
+ input: import("convex/values").VAny<any, "optional", string>;
7188
+ output: import("convex/values").VAny<any, "optional", string>;
7189
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
7190
+ dynamic: import("convex/values").VBoolean<boolean | undefined, "optional">;
7191
+ }, "required", "type" | "toolCallId" | "toolName" | "providerExecuted" | "input" | "dynamic" | `input.${string}` | "output" | `output.${string}`>, import("convex/values").VObject<{
7192
+ type: "raw";
7193
+ rawValue: any;
7194
+ }, {
7195
+ type: import("convex/values").VLiteral<"raw", "required">;
7196
+ rawValue: import("convex/values").VAny<any, "required", string>;
7197
+ }, "required", "type" | "rawValue" | `rawValue.${string}`>], "required", "id" | "title" | "type" | "providerOptions" | "text" | `providerOptions.${string}` | "filename" | "toolCallId" | "toolName" | "providerExecuted" | "providerMetadata" | "sourceType" | "url" | "mediaType" | `providerMetadata.${string}` | "input" | "dynamic" | `input.${string}` | "delta" | "output" | `output.${string}` | "rawValue" | `rawValue.${string}`>], "required", "id" | "title" | "type" | "providerOptions" | "text" | `providerOptions.${string}` | "filename" | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}` | "providerMetadata" | "source" | "sourceType" | "url" | "mediaType" | `providerMetadata.${string}` | "textDelta" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url" | "argsTextDelta" | "input" | "dynamic" | `input.${string}` | "delta" | "output" | `output.${string}` | "rawValue" | `rawValue.${string}`>, "required">;
5659
7198
  }, "required", "streamId" | "start" | "end" | "parts">;
5660
7199
  export type StreamDelta = Infer<typeof vStreamDelta>;
5661
7200
  export {};