@convex-dev/agent 0.1.18-alpha.1 → 0.2.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/client/createTool.d.ts +31 -10
  2. package/dist/client/createTool.d.ts.map +1 -1
  3. package/dist/client/createTool.js +25 -10
  4. package/dist/client/createTool.js.map +1 -1
  5. package/dist/client/defaultComponent.d.ts +11 -0
  6. package/dist/client/defaultComponent.d.ts.map +1 -0
  7. package/dist/client/defaultComponent.js +7 -0
  8. package/dist/client/defaultComponent.js.map +1 -0
  9. package/dist/client/definePlaygroundAPI.d.ts +174 -199
  10. package/dist/client/definePlaygroundAPI.d.ts.map +1 -1
  11. package/dist/client/definePlaygroundAPI.js +17 -35
  12. package/dist/client/definePlaygroundAPI.js.map +1 -1
  13. package/dist/client/files.d.ts +6 -3
  14. package/dist/client/files.d.ts.map +1 -1
  15. package/dist/client/files.js +7 -7
  16. package/dist/client/files.js.map +1 -1
  17. package/dist/client/index.d.ts +152 -589
  18. package/dist/client/index.d.ts.map +1 -1
  19. package/dist/client/index.js +138 -222
  20. package/dist/client/index.js.map +1 -1
  21. package/dist/client/messages.d.ts +538 -0
  22. package/dist/client/messages.d.ts.map +1 -0
  23. package/dist/client/messages.js +91 -0
  24. package/dist/client/messages.js.map +1 -0
  25. package/dist/client/search.d.ts +30 -7
  26. package/dist/client/search.d.ts.map +1 -1
  27. package/dist/client/search.js +20 -3
  28. package/dist/client/search.js.map +1 -1
  29. package/dist/client/streaming.d.ts +3 -2
  30. package/dist/client/streaming.d.ts.map +1 -1
  31. package/dist/client/streaming.js.map +1 -1
  32. package/dist/client/threads.d.ts +46 -0
  33. package/dist/client/threads.d.ts.map +1 -0
  34. package/dist/client/threads.js +49 -0
  35. package/dist/client/threads.js.map +1 -0
  36. package/dist/client/types.d.ts +39 -42
  37. package/dist/client/types.d.ts.map +1 -1
  38. package/dist/component/_generated/api.d.ts +437 -75
  39. package/dist/component/messages.d.ts +254 -55
  40. package/dist/component/messages.d.ts.map +1 -1
  41. package/dist/component/messages.js +29 -25
  42. package/dist/component/messages.js.map +1 -1
  43. package/dist/component/schema.d.ts +1459 -158
  44. package/dist/component/schema.d.ts.map +1 -1
  45. package/dist/component/schema.js +8 -14
  46. package/dist/component/schema.js.map +1 -1
  47. package/dist/component/streams.d.ts +180 -6
  48. package/dist/component/streams.d.ts.map +1 -1
  49. package/dist/mapping.d.ts +11 -15
  50. package/dist/mapping.d.ts.map +1 -1
  51. package/dist/mapping.js +191 -61
  52. package/dist/mapping.js.map +1 -1
  53. package/dist/react/deltas.d.ts +0 -3
  54. package/dist/react/deltas.d.ts.map +1 -1
  55. package/dist/react/deltas.js +140 -44
  56. package/dist/react/deltas.js.map +1 -1
  57. package/dist/react/optimisticallySendMessage.d.ts.map +1 -1
  58. package/dist/react/optimisticallySendMessage.js +2 -1
  59. package/dist/react/optimisticallySendMessage.js.map +1 -1
  60. package/dist/react/toUIMessages.d.ts +5 -4
  61. package/dist/react/toUIMessages.d.ts.map +1 -1
  62. package/dist/react/toUIMessages.js +103 -40
  63. package/dist/react/toUIMessages.js.map +1 -1
  64. package/dist/validators.d.ts +1978 -1210
  65. package/dist/validators.d.ts.map +1 -1
  66. package/dist/validators.js +90 -54
  67. package/dist/validators.js.map +1 -1
  68. package/package.json +32 -28
  69. package/src/client/createTool.ts +69 -38
  70. package/src/client/defaultComponent.ts +17 -0
  71. package/src/client/definePlaygroundAPI.ts +29 -43
  72. package/src/client/files.ts +7 -8
  73. package/src/client/index.test.ts +20 -18
  74. package/src/client/index.ts +228 -434
  75. package/src/client/messages.ts +191 -0
  76. package/src/client/search.ts +30 -6
  77. package/src/client/streaming.ts +4 -3
  78. package/src/client/threads.ts +78 -0
  79. package/src/client/types.ts +50 -72
  80. package/src/component/_generated/api.d.ts +437 -75
  81. package/src/component/messages.test.ts +182 -40
  82. package/src/component/messages.ts +30 -32
  83. package/src/component/schema.ts +8 -14
  84. package/src/mapping.ts +230 -94
  85. package/src/react/deltas.ts +165 -52
  86. package/src/react/optimisticallySendMessage.ts +4 -1
  87. package/src/react/toUIMessages.test.ts +154 -36
  88. package/src/react/toUIMessages.ts +136 -57
  89. package/src/validators.test.ts +2 -101
  90. package/src/validators.ts +111 -68
  91. package/dist/client/listMessages.d.ts +0 -22
  92. package/dist/client/listMessages.d.ts.map +0 -1
  93. package/dist/client/listMessages.js +0 -25
  94. package/dist/client/listMessages.js.map +0 -1
  95. package/src/client/listMessages.ts +0 -38
  96. package/src/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
@@ -327,6 +327,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
327
327
  } | {
328
328
  providerOptions?: Record<string, Record<string, any>> | undefined;
329
329
  signature?: string | undefined;
330
+ state?: "streaming" | "done" | undefined;
330
331
  type: "reasoning";
331
332
  text: string;
332
333
  } | {
@@ -335,6 +336,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
335
336
  data: string;
336
337
  } | {
337
338
  providerOptions?: Record<string, Record<string, any>> | undefined;
339
+ providerExecuted?: boolean | undefined;
338
340
  type: "tool-call";
339
341
  toolCallId: string;
340
342
  toolName: string;
@@ -346,6 +348,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
346
348
  content: {
347
349
  providerOptions?: Record<string, Record<string, any>> | undefined;
348
350
  args?: any;
351
+ providerExecuted?: boolean | undefined;
352
+ isError?: boolean | undefined;
349
353
  experimental_content?: ({
350
354
  type: "text";
351
355
  text: string;
@@ -354,7 +358,6 @@ export declare const schema: import("convex/server").SchemaDefinition<{
354
358
  type: "image";
355
359
  data: string;
356
360
  })[] | undefined;
357
- isError?: boolean | undefined;
358
361
  type: "tool-result";
359
362
  toolCallId: string;
360
363
  toolName: string;
@@ -368,19 +371,36 @@ export declare const schema: import("convex/server").SchemaDefinition<{
368
371
  text?: string | undefined;
369
372
  reasoning?: string | undefined;
370
373
  usage?: {
374
+ reasoningTokens?: number | undefined;
375
+ cachedInputTokens?: number | undefined;
371
376
  promptTokens: number;
372
377
  completionTokens: number;
373
378
  totalTokens: number;
374
379
  } | undefined;
375
380
  providerMetadata?: Record<string, Record<string, any>> | undefined;
376
- sources?: {
381
+ sources?: ({
377
382
  title?: string | undefined;
383
+ type?: "source" | undefined;
378
384
  providerOptions?: Record<string, Record<string, any>> | undefined;
385
+ url?: string | undefined;
379
386
  id: string;
380
387
  sourceType: "url";
381
- url: string;
382
- }[] | undefined;
388
+ } | {
389
+ filename?: string | undefined;
390
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
391
+ id: string;
392
+ title: string;
393
+ type: "source";
394
+ sourceType: "document";
395
+ mediaType: string;
396
+ })[] | undefined;
383
397
  reasoningDetails?: ({
398
+ providerOptions?: Record<string, Record<string, any>> | undefined;
399
+ signature?: string | undefined;
400
+ state?: "streaming" | "done" | undefined;
401
+ type: "reasoning";
402
+ text: string;
403
+ } | {
384
404
  signature?: string | undefined;
385
405
  type: "text";
386
406
  text: string;
@@ -409,7 +429,6 @@ export declare const schema: import("convex/server").SchemaDefinition<{
409
429
  stepOrder: number;
410
430
  tool: boolean;
411
431
  }, {
412
- id: import("convex/values").VString<string | undefined, "optional">;
413
432
  userId: import("convex/values").VString<string | undefined, "optional">;
414
433
  threadId: import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">;
415
434
  order: import("convex/values").VFloat64<number, "required">;
@@ -457,6 +476,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
457
476
  } | {
458
477
  providerOptions?: Record<string, Record<string, any>> | undefined;
459
478
  signature?: string | undefined;
479
+ state?: "streaming" | "done" | undefined;
460
480
  type: "reasoning";
461
481
  text: string;
462
482
  } | {
@@ -465,6 +485,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
465
485
  data: string;
466
486
  } | {
467
487
  providerOptions?: Record<string, Record<string, any>> | undefined;
488
+ providerExecuted?: boolean | undefined;
468
489
  type: "tool-call";
469
490
  toolCallId: string;
470
491
  toolName: string;
@@ -476,6 +497,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
476
497
  content: {
477
498
  providerOptions?: Record<string, Record<string, any>> | undefined;
478
499
  args?: any;
500
+ providerExecuted?: boolean | undefined;
501
+ isError?: boolean | undefined;
479
502
  experimental_content?: ({
480
503
  type: "text";
481
504
  text: string;
@@ -484,7 +507,6 @@ export declare const schema: import("convex/server").SchemaDefinition<{
484
507
  type: "image";
485
508
  data: string;
486
509
  })[] | undefined;
487
- isError?: boolean | undefined;
488
510
  type: "tool-result";
489
511
  toolCallId: string;
490
512
  toolName: string;
@@ -608,6 +630,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
608
630
  } | {
609
631
  providerOptions?: Record<string, Record<string, any>> | undefined;
610
632
  signature?: string | undefined;
633
+ state?: "streaming" | "done" | undefined;
611
634
  type: "reasoning";
612
635
  text: string;
613
636
  } | {
@@ -616,6 +639,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
616
639
  data: string;
617
640
  } | {
618
641
  providerOptions?: Record<string, Record<string, any>> | undefined;
642
+ providerExecuted?: boolean | undefined;
619
643
  type: "tool-call";
620
644
  toolCallId: string;
621
645
  toolName: string;
@@ -636,6 +660,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
636
660
  } | {
637
661
  providerOptions?: Record<string, Record<string, any>> | undefined;
638
662
  signature?: string | undefined;
663
+ state?: "streaming" | "done" | undefined;
639
664
  type: "reasoning";
640
665
  text: string;
641
666
  } | {
@@ -644,6 +669,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
644
669
  data: string;
645
670
  } | {
646
671
  providerOptions?: Record<string, Record<string, any>> | undefined;
672
+ providerExecuted?: boolean | undefined;
647
673
  type: "tool-call";
648
674
  toolCallId: string;
649
675
  toolName: string;
@@ -661,6 +687,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
661
687
  } | {
662
688
  providerOptions?: Record<string, Record<string, any>> | undefined;
663
689
  signature?: string | undefined;
690
+ state?: "streaming" | "done" | undefined;
664
691
  type: "reasoning";
665
692
  text: string;
666
693
  } | {
@@ -669,6 +696,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
669
696
  data: string;
670
697
  } | {
671
698
  providerOptions?: Record<string, Record<string, any>> | undefined;
699
+ providerExecuted?: boolean | undefined;
672
700
  type: "tool-call";
673
701
  toolCallId: string;
674
702
  toolName: string;
@@ -686,6 +714,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
686
714
  } | {
687
715
  providerOptions?: Record<string, Record<string, any>> | undefined;
688
716
  signature?: string | undefined;
717
+ state?: "streaming" | "done" | undefined;
689
718
  type: "reasoning";
690
719
  text: string;
691
720
  } | {
@@ -694,6 +723,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
694
723
  data: string;
695
724
  } | {
696
725
  providerOptions?: Record<string, Record<string, any>> | undefined;
726
+ providerExecuted?: boolean | undefined;
697
727
  type: "tool-call";
698
728
  toolCallId: string;
699
729
  toolName: string;
@@ -721,6 +751,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
721
751
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">, import("convex/values").VObject<{
722
752
  providerOptions?: Record<string, Record<string, any>> | undefined;
723
753
  signature?: string | undefined;
754
+ state?: "streaming" | "done" | undefined;
724
755
  type: "reasoning";
725
756
  text: string;
726
757
  }, {
@@ -728,7 +759,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
728
759
  text: import("convex/values").VString<string, "required">;
729
760
  signature: import("convex/values").VString<string | undefined, "optional">;
730
761
  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>;
731
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
762
+ state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
763
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">, import("convex/values").VObject<{
732
764
  providerOptions?: Record<string, Record<string, any>> | undefined;
733
765
  type: "redacted-reasoning";
734
766
  data: string;
@@ -738,6 +770,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
738
770
  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>;
739
771
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "data">, import("convex/values").VObject<{
740
772
  providerOptions?: Record<string, Record<string, any>> | undefined;
773
+ providerExecuted?: boolean | undefined;
741
774
  type: "tool-call";
742
775
  toolCallId: string;
743
776
  toolName: string;
@@ -748,7 +781,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
748
781
  toolName: import("convex/values").VString<string, "required">;
749
782
  args: import("convex/values").VAny<any, "required", string>;
750
783
  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>;
751
- }, "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>;
784
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
785
+ }, "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>;
752
786
  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>;
753
787
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
754
788
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -756,6 +790,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
756
790
  content: {
757
791
  providerOptions?: Record<string, Record<string, any>> | undefined;
758
792
  args?: any;
793
+ providerExecuted?: boolean | undefined;
794
+ isError?: boolean | undefined;
759
795
  experimental_content?: ({
760
796
  type: "text";
761
797
  text: string;
@@ -764,7 +800,6 @@ export declare const schema: import("convex/server").SchemaDefinition<{
764
800
  type: "image";
765
801
  data: string;
766
802
  })[] | undefined;
767
- isError?: boolean | undefined;
768
803
  type: "tool-result";
769
804
  toolCallId: string;
770
805
  toolName: string;
@@ -775,6 +810,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
775
810
  content: import("convex/values").VArray<{
776
811
  providerOptions?: Record<string, Record<string, any>> | undefined;
777
812
  args?: any;
813
+ providerExecuted?: boolean | undefined;
814
+ isError?: boolean | undefined;
778
815
  experimental_content?: ({
779
816
  type: "text";
780
817
  text: string;
@@ -783,7 +820,6 @@ export declare const schema: import("convex/server").SchemaDefinition<{
783
820
  type: "image";
784
821
  data: string;
785
822
  })[] | undefined;
786
- isError?: boolean | undefined;
787
823
  type: "tool-result";
788
824
  toolCallId: string;
789
825
  toolName: string;
@@ -791,6 +827,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
791
827
  }[], import("convex/values").VObject<{
792
828
  providerOptions?: Record<string, Record<string, any>> | undefined;
793
829
  args?: any;
830
+ providerExecuted?: boolean | undefined;
831
+ isError?: boolean | undefined;
794
832
  experimental_content?: ({
795
833
  type: "text";
796
834
  text: string;
@@ -799,7 +837,6 @@ export declare const schema: import("convex/server").SchemaDefinition<{
799
837
  type: "image";
800
838
  data: string;
801
839
  })[] | undefined;
802
- isError?: boolean | undefined;
803
840
  type: "tool-result";
804
841
  toolCallId: string;
805
842
  toolName: string;
@@ -809,6 +846,9 @@ export declare const schema: import("convex/server").SchemaDefinition<{
809
846
  toolCallId: import("convex/values").VString<string, "required">;
810
847
  toolName: import("convex/values").VString<string, "required">;
811
848
  result: import("convex/values").VAny<any, "required", string>;
849
+ 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>;
850
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
851
+ isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
812
852
  args: import("convex/values").VAny<any, "optional", string>;
813
853
  experimental_content: import("convex/values").VArray<({
814
854
  type: "text";
@@ -839,9 +879,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
839
879
  data: import("convex/values").VString<string, "required">;
840
880
  mimeType: import("convex/values").VString<string | undefined, "optional">;
841
881
  }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
842
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
843
- 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>;
844
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
882
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}`>, "required">;
845
883
  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>;
846
884
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
847
885
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -855,6 +893,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
855
893
  tool: import("convex/values").VBoolean<boolean, "required">;
856
894
  text: import("convex/values").VString<string | undefined, "optional">;
857
895
  usage: import("convex/values").VObject<{
896
+ reasoningTokens?: number | undefined;
897
+ cachedInputTokens?: number | undefined;
858
898
  promptTokens: number;
859
899
  completionTokens: number;
860
900
  totalTokens: number;
@@ -862,29 +902,79 @@ export declare const schema: import("convex/server").SchemaDefinition<{
862
902
  promptTokens: import("convex/values").VFloat64<number, "required">;
863
903
  completionTokens: import("convex/values").VFloat64<number, "required">;
864
904
  totalTokens: import("convex/values").VFloat64<number, "required">;
865
- }, "optional", "promptTokens" | "completionTokens" | "totalTokens">;
905
+ reasoningTokens: import("convex/values").VFloat64<number | undefined, "optional">;
906
+ cachedInputTokens: import("convex/values").VFloat64<number | undefined, "optional">;
907
+ }, "optional", "promptTokens" | "completionTokens" | "totalTokens" | "reasoningTokens" | "cachedInputTokens">;
866
908
  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>;
867
- sources: import("convex/values").VArray<{
909
+ sources: import("convex/values").VArray<({
868
910
  title?: string | undefined;
911
+ type?: "source" | undefined;
869
912
  providerOptions?: Record<string, Record<string, any>> | undefined;
913
+ url?: string | undefined;
870
914
  id: string;
871
915
  sourceType: "url";
872
- url: string;
873
- }[] | undefined, import("convex/values").VObject<{
916
+ } | {
917
+ filename?: string | undefined;
918
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
919
+ id: string;
920
+ title: string;
921
+ type: "source";
922
+ sourceType: "document";
923
+ mediaType: string;
924
+ })[] | undefined, import("convex/values").VUnion<{
874
925
  title?: string | undefined;
926
+ type?: "source" | undefined;
875
927
  providerOptions?: Record<string, Record<string, any>> | undefined;
928
+ url?: string | undefined;
929
+ id: string;
930
+ sourceType: "url";
931
+ } | {
932
+ filename?: string | undefined;
933
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
934
+ id: string;
935
+ title: string;
936
+ type: "source";
937
+ sourceType: "document";
938
+ mediaType: string;
939
+ }, [import("convex/values").VObject<{
940
+ title?: string | undefined;
941
+ type?: "source" | undefined;
942
+ providerOptions?: Record<string, Record<string, any>> | undefined;
943
+ url?: string | undefined;
876
944
  id: string;
877
945
  sourceType: "url";
878
- url: string;
879
946
  }, {
947
+ type: import("convex/values").VLiteral<"source" | undefined, "optional">;
880
948
  sourceType: import("convex/values").VLiteral<"url", "required">;
881
949
  id: import("convex/values").VString<string, "required">;
882
- url: import("convex/values").VString<string, "required">;
950
+ url: import("convex/values").VString<string | undefined, "optional">;
883
951
  title: import("convex/values").VString<string | undefined, "optional">;
884
952
  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>;
885
- }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, "optional">;
953
+ }, "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, import("convex/values").VObject<{
954
+ filename?: string | undefined;
955
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
956
+ id: string;
957
+ title: string;
958
+ type: "source";
959
+ sourceType: "document";
960
+ mediaType: string;
961
+ }, {
962
+ type: import("convex/values").VLiteral<"source", "required">;
963
+ sourceType: import("convex/values").VLiteral<"document", "required">;
964
+ id: import("convex/values").VString<string, "required">;
965
+ mediaType: import("convex/values").VString<string, "required">;
966
+ title: import("convex/values").VString<string, "required">;
967
+ filename: import("convex/values").VString<string | undefined, "optional">;
968
+ 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>;
969
+ }, "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">;
886
970
  reasoning: import("convex/values").VString<string | undefined, "optional">;
887
971
  reasoningDetails: import("convex/values").VArray<({
972
+ providerOptions?: Record<string, Record<string, any>> | undefined;
973
+ signature?: string | undefined;
974
+ state?: "streaming" | "done" | undefined;
975
+ type: "reasoning";
976
+ text: string;
977
+ } | {
888
978
  signature?: string | undefined;
889
979
  type: "text";
890
980
  text: string;
@@ -892,6 +982,12 @@ export declare const schema: import("convex/server").SchemaDefinition<{
892
982
  type: "redacted";
893
983
  data: string;
894
984
  })[] | undefined, import("convex/values").VUnion<{
985
+ providerOptions?: Record<string, Record<string, any>> | undefined;
986
+ signature?: string | undefined;
987
+ state?: "streaming" | "done" | undefined;
988
+ type: "reasoning";
989
+ text: string;
990
+ } | {
895
991
  signature?: string | undefined;
896
992
  type: "text";
897
993
  text: string;
@@ -899,6 +995,18 @@ export declare const schema: import("convex/server").SchemaDefinition<{
899
995
  type: "redacted";
900
996
  data: string;
901
997
  }, [import("convex/values").VObject<{
998
+ providerOptions?: Record<string, Record<string, any>> | undefined;
999
+ signature?: string | undefined;
1000
+ state?: "streaming" | "done" | undefined;
1001
+ type: "reasoning";
1002
+ text: string;
1003
+ }, {
1004
+ type: import("convex/values").VLiteral<"reasoning", "required">;
1005
+ text: import("convex/values").VString<string, "required">;
1006
+ signature: import("convex/values").VString<string | undefined, "optional">;
1007
+ 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>;
1008
+ state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
1009
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">, import("convex/values").VObject<{
902
1010
  signature?: string | undefined;
903
1011
  type: "text";
904
1012
  text: string;
@@ -912,7 +1020,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
912
1020
  }, {
913
1021
  type: import("convex/values").VLiteral<"redacted", "required">;
914
1022
  data: import("convex/values").VString<string, "required">;
915
- }, "required", "type" | "data">], "required", "type" | "text" | "data" | "signature">, "optional">;
1023
+ }, "required", "type" | "data">], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "data" | "signature" | "state">, "optional">;
916
1024
  warnings: import("convex/values").VArray<({
917
1025
  details?: string | undefined;
918
1026
  type: "unsupported-setting";
@@ -959,10 +1067,11 @@ export declare const schema: import("convex/server").SchemaDefinition<{
959
1067
  message: import("convex/values").VString<string, "required">;
960
1068
  }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
961
1069
  finishReason: import("convex/values").VUnion<"length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined, [import("convex/values").VLiteral<"stop", "required">, import("convex/values").VLiteral<"length", "required">, import("convex/values").VLiteral<"content-filter", "required">, import("convex/values").VLiteral<"tool-calls", "required">, import("convex/values").VLiteral<"error", "required">, import("convex/values").VLiteral<"other", "required">, import("convex/values").VLiteral<"unknown", "required">], "optional", never>;
1070
+ id: import("convex/values").VString<string | undefined, "optional">;
962
1071
  parentMessageId: import("convex/values").VId<import("convex/values").GenericId<"messages"> | undefined, "optional">;
963
1072
  stepId: import("convex/values").VString<string | undefined, "optional">;
964
1073
  files: import("convex/values").VArray<any[] | undefined, import("convex/values").VAny<any, "required", string>, "optional">;
965
- }, "required", "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "files" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | "reasoningDetails" | "warnings" | "finishReason" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | `providerMetadata.${string}`>, {
1074
+ }, "required", "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "files" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | `providerMetadata.${string}` | "reasoningDetails" | "warnings" | "finishReason" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "usage.reasoningTokens" | "usage.cachedInputTokens">, {
966
1075
  threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
967
1076
  embeddingId_threadId: ["embeddingId", "threadId", "_creationTime"];
968
1077
  }, {
@@ -1049,6 +1158,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1049
1158
  end: number;
1050
1159
  parts: ({
1051
1160
  providerOptions?: Record<string, Record<string, any>> | undefined;
1161
+ providerExecuted?: boolean | undefined;
1052
1162
  type: "tool-call";
1053
1163
  toolCallId: string;
1054
1164
  toolName: string;
@@ -1056,6 +1166,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1056
1166
  } | {
1057
1167
  providerOptions?: Record<string, Record<string, any>> | undefined;
1058
1168
  args?: any;
1169
+ providerExecuted?: boolean | undefined;
1170
+ isError?: boolean | undefined;
1059
1171
  experimental_content?: ({
1060
1172
  type: "text";
1061
1173
  text: string;
@@ -1064,11 +1176,25 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1064
1176
  type: "image";
1065
1177
  data: string;
1066
1178
  })[] | undefined;
1067
- isError?: boolean | undefined;
1068
1179
  type: "tool-result";
1069
1180
  toolCallId: string;
1070
1181
  toolName: string;
1071
1182
  result: any;
1183
+ } | {
1184
+ title?: string | undefined;
1185
+ type?: "source" | undefined;
1186
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1187
+ url?: string | undefined;
1188
+ id: string;
1189
+ sourceType: "url";
1190
+ } | {
1191
+ filename?: string | undefined;
1192
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1193
+ id: string;
1194
+ title: string;
1195
+ type: "source";
1196
+ sourceType: "document";
1197
+ mediaType: string;
1072
1198
  } | {
1073
1199
  type: "text-delta";
1074
1200
  textDelta: string;
@@ -1080,9 +1206,9 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1080
1206
  source: {
1081
1207
  title?: string | undefined;
1082
1208
  providerOptions?: Record<string, Record<string, any>> | undefined;
1209
+ url?: string | undefined;
1083
1210
  id: string;
1084
1211
  sourceType: "url";
1085
- url: string;
1086
1212
  };
1087
1213
  } | {
1088
1214
  type: "tool-call-streaming-start";
@@ -1093,6 +1219,47 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1093
1219
  toolCallId: string;
1094
1220
  toolName: string;
1095
1221
  argsTextDelta: string;
1222
+ } | {
1223
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1224
+ id: string;
1225
+ type: "text-delta";
1226
+ text: string;
1227
+ } | {
1228
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1229
+ id: string;
1230
+ type: "reasoning-delta";
1231
+ text: string;
1232
+ } | {
1233
+ providerExecuted?: boolean | undefined;
1234
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1235
+ dynamic?: boolean | undefined;
1236
+ type: "tool-call";
1237
+ toolCallId: string;
1238
+ toolName: string;
1239
+ input: any;
1240
+ } | {
1241
+ providerExecuted?: boolean | undefined;
1242
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1243
+ dynamic?: boolean | undefined;
1244
+ id: string;
1245
+ type: "tool-input-start";
1246
+ toolName: string;
1247
+ } | {
1248
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1249
+ id: string;
1250
+ type: "tool-input-delta";
1251
+ delta: string;
1252
+ } | {
1253
+ providerExecuted?: boolean | undefined;
1254
+ input?: any;
1255
+ dynamic?: boolean | undefined;
1256
+ output?: any;
1257
+ type: "tool-result";
1258
+ toolCallId: string;
1259
+ toolName: string;
1260
+ } | {
1261
+ type: "raw";
1262
+ rawValue: any;
1096
1263
  })[];
1097
1264
  }, {
1098
1265
  streamId: import("convex/values").VId<import("convex/values").GenericId<"streamingMessages">, "required">;
@@ -1100,6 +1267,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1100
1267
  end: import("convex/values").VFloat64<number, "required">;
1101
1268
  parts: import("convex/values").VArray<({
1102
1269
  providerOptions?: Record<string, Record<string, any>> | undefined;
1270
+ providerExecuted?: boolean | undefined;
1103
1271
  type: "tool-call";
1104
1272
  toolCallId: string;
1105
1273
  toolName: string;
@@ -1107,6 +1275,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1107
1275
  } | {
1108
1276
  providerOptions?: Record<string, Record<string, any>> | undefined;
1109
1277
  args?: any;
1278
+ providerExecuted?: boolean | undefined;
1279
+ isError?: boolean | undefined;
1110
1280
  experimental_content?: ({
1111
1281
  type: "text";
1112
1282
  text: string;
@@ -1115,11 +1285,25 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1115
1285
  type: "image";
1116
1286
  data: string;
1117
1287
  })[] | undefined;
1118
- isError?: boolean | undefined;
1119
1288
  type: "tool-result";
1120
1289
  toolCallId: string;
1121
1290
  toolName: string;
1122
1291
  result: any;
1292
+ } | {
1293
+ title?: string | undefined;
1294
+ type?: "source" | undefined;
1295
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1296
+ url?: string | undefined;
1297
+ id: string;
1298
+ sourceType: "url";
1299
+ } | {
1300
+ filename?: string | undefined;
1301
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1302
+ id: string;
1303
+ title: string;
1304
+ type: "source";
1305
+ sourceType: "document";
1306
+ mediaType: string;
1123
1307
  } | {
1124
1308
  type: "text-delta";
1125
1309
  textDelta: string;
@@ -1131,9 +1315,9 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1131
1315
  source: {
1132
1316
  title?: string | undefined;
1133
1317
  providerOptions?: Record<string, Record<string, any>> | undefined;
1318
+ url?: string | undefined;
1134
1319
  id: string;
1135
1320
  sourceType: "url";
1136
- url: string;
1137
1321
  };
1138
1322
  } | {
1139
1323
  type: "tool-call-streaming-start";
@@ -1144,8 +1328,50 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1144
1328
  toolCallId: string;
1145
1329
  toolName: string;
1146
1330
  argsTextDelta: string;
1331
+ } | {
1332
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1333
+ id: string;
1334
+ type: "text-delta";
1335
+ text: string;
1336
+ } | {
1337
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1338
+ id: string;
1339
+ type: "reasoning-delta";
1340
+ text: string;
1341
+ } | {
1342
+ providerExecuted?: boolean | undefined;
1343
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1344
+ dynamic?: boolean | undefined;
1345
+ type: "tool-call";
1346
+ toolCallId: string;
1347
+ toolName: string;
1348
+ input: any;
1349
+ } | {
1350
+ providerExecuted?: boolean | undefined;
1351
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1352
+ dynamic?: boolean | undefined;
1353
+ id: string;
1354
+ type: "tool-input-start";
1355
+ toolName: string;
1356
+ } | {
1357
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1358
+ id: string;
1359
+ type: "tool-input-delta";
1360
+ delta: string;
1361
+ } | {
1362
+ providerExecuted?: boolean | undefined;
1363
+ input?: any;
1364
+ dynamic?: boolean | undefined;
1365
+ output?: any;
1366
+ type: "tool-result";
1367
+ toolCallId: string;
1368
+ toolName: string;
1369
+ } | {
1370
+ type: "raw";
1371
+ rawValue: any;
1147
1372
  })[], import("convex/values").VUnion<{
1148
1373
  providerOptions?: Record<string, Record<string, any>> | undefined;
1374
+ providerExecuted?: boolean | undefined;
1149
1375
  type: "tool-call";
1150
1376
  toolCallId: string;
1151
1377
  toolName: string;
@@ -1153,6 +1379,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1153
1379
  } | {
1154
1380
  providerOptions?: Record<string, Record<string, any>> | undefined;
1155
1381
  args?: any;
1382
+ providerExecuted?: boolean | undefined;
1383
+ isError?: boolean | undefined;
1156
1384
  experimental_content?: ({
1157
1385
  type: "text";
1158
1386
  text: string;
@@ -1161,7 +1389,110 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1161
1389
  type: "image";
1162
1390
  data: string;
1163
1391
  })[] | undefined;
1392
+ type: "tool-result";
1393
+ toolCallId: string;
1394
+ toolName: string;
1395
+ result: any;
1396
+ } | {
1397
+ title?: string | undefined;
1398
+ type?: "source" | undefined;
1399
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1400
+ url?: string | undefined;
1401
+ id: string;
1402
+ sourceType: "url";
1403
+ } | {
1404
+ filename?: string | undefined;
1405
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1406
+ id: string;
1407
+ title: string;
1408
+ type: "source";
1409
+ sourceType: "document";
1410
+ mediaType: string;
1411
+ } | {
1412
+ type: "text-delta";
1413
+ textDelta: string;
1414
+ } | {
1415
+ type: "reasoning";
1416
+ textDelta: string;
1417
+ } | {
1418
+ type: "source";
1419
+ source: {
1420
+ title?: string | undefined;
1421
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1422
+ url?: string | undefined;
1423
+ id: string;
1424
+ sourceType: "url";
1425
+ };
1426
+ } | {
1427
+ type: "tool-call-streaming-start";
1428
+ toolCallId: string;
1429
+ toolName: string;
1430
+ } | {
1431
+ type: "tool-call-delta";
1432
+ toolCallId: string;
1433
+ toolName: string;
1434
+ argsTextDelta: string;
1435
+ } | {
1436
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1437
+ id: string;
1438
+ type: "text-delta";
1439
+ text: string;
1440
+ } | {
1441
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1442
+ id: string;
1443
+ type: "reasoning-delta";
1444
+ text: string;
1445
+ } | {
1446
+ providerExecuted?: boolean | undefined;
1447
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1448
+ dynamic?: boolean | undefined;
1449
+ type: "tool-call";
1450
+ toolCallId: string;
1451
+ toolName: string;
1452
+ input: any;
1453
+ } | {
1454
+ providerExecuted?: boolean | undefined;
1455
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1456
+ dynamic?: boolean | undefined;
1457
+ id: string;
1458
+ type: "tool-input-start";
1459
+ toolName: string;
1460
+ } | {
1461
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1462
+ id: string;
1463
+ type: "tool-input-delta";
1464
+ delta: string;
1465
+ } | {
1466
+ providerExecuted?: boolean | undefined;
1467
+ input?: any;
1468
+ dynamic?: boolean | undefined;
1469
+ output?: any;
1470
+ type: "tool-result";
1471
+ toolCallId: string;
1472
+ toolName: string;
1473
+ } | {
1474
+ type: "raw";
1475
+ rawValue: any;
1476
+ }, [import("convex/values").VUnion<{
1477
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1478
+ providerExecuted?: boolean | undefined;
1479
+ type: "tool-call";
1480
+ toolCallId: string;
1481
+ toolName: string;
1482
+ args: any;
1483
+ } | {
1484
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1485
+ args?: any;
1486
+ providerExecuted?: boolean | undefined;
1164
1487
  isError?: boolean | undefined;
1488
+ experimental_content?: ({
1489
+ type: "text";
1490
+ text: string;
1491
+ } | {
1492
+ mimeType?: string | undefined;
1493
+ type: "image";
1494
+ data: string;
1495
+ })[] | undefined;
1165
1496
  type: "tool-result";
1166
1497
  toolCallId: string;
1167
1498
  toolName: string;
@@ -1177,9 +1508,9 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1177
1508
  source: {
1178
1509
  title?: string | undefined;
1179
1510
  providerOptions?: Record<string, Record<string, any>> | undefined;
1511
+ url?: string | undefined;
1180
1512
  id: string;
1181
1513
  sourceType: "url";
1182
- url: string;
1183
1514
  };
1184
1515
  } | {
1185
1516
  type: "tool-call-streaming-start";
@@ -1207,27 +1538,28 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1207
1538
  source: {
1208
1539
  title?: string | undefined;
1209
1540
  providerOptions?: Record<string, Record<string, any>> | undefined;
1541
+ url?: string | undefined;
1210
1542
  id: string;
1211
1543
  sourceType: "url";
1212
- url: string;
1213
1544
  };
1214
1545
  }, {
1215
1546
  type: import("convex/values").VLiteral<"source", "required">;
1216
1547
  source: import("convex/values").VObject<{
1217
1548
  title?: string | undefined;
1218
1549
  providerOptions?: Record<string, Record<string, any>> | undefined;
1550
+ url?: string | undefined;
1219
1551
  id: string;
1220
1552
  sourceType: "url";
1221
- url: string;
1222
1553
  }, {
1223
1554
  sourceType: import("convex/values").VLiteral<"url", "required">;
1224
1555
  id: import("convex/values").VString<string, "required">;
1225
- url: import("convex/values").VString<string, "required">;
1556
+ url: import("convex/values").VString<string | undefined, "optional">;
1226
1557
  title: import("convex/values").VString<string | undefined, "optional">;
1227
1558
  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>;
1228
1559
  }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">;
1229
1560
  }, "required", "type" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url">, import("convex/values").VObject<{
1230
1561
  providerOptions?: Record<string, Record<string, any>> | undefined;
1562
+ providerExecuted?: boolean | undefined;
1231
1563
  type: "tool-call";
1232
1564
  toolCallId: string;
1233
1565
  toolName: string;
@@ -1238,27 +1570,12 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1238
1570
  toolName: import("convex/values").VString<string, "required">;
1239
1571
  args: import("convex/values").VAny<any, "required", string>;
1240
1572
  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>;
1241
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>, import("convex/values").VObject<{
1242
- type: "tool-call-streaming-start";
1243
- toolCallId: string;
1244
- toolName: string;
1245
- }, {
1246
- type: import("convex/values").VLiteral<"tool-call-streaming-start", "required">;
1247
- toolCallId: import("convex/values").VString<string, "required">;
1248
- toolName: import("convex/values").VString<string, "required">;
1249
- }, "required", "type" | "toolCallId" | "toolName">, import("convex/values").VObject<{
1250
- type: "tool-call-delta";
1251
- toolCallId: string;
1252
- toolName: string;
1253
- argsTextDelta: string;
1254
- }, {
1255
- type: import("convex/values").VLiteral<"tool-call-delta", "required">;
1256
- toolCallId: import("convex/values").VString<string, "required">;
1257
- toolName: import("convex/values").VString<string, "required">;
1258
- argsTextDelta: import("convex/values").VString<string, "required">;
1259
- }, "required", "type" | "toolCallId" | "toolName" | "argsTextDelta">, import("convex/values").VObject<{
1573
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
1574
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>, import("convex/values").VObject<{
1260
1575
  providerOptions?: Record<string, Record<string, any>> | undefined;
1261
1576
  args?: any;
1577
+ providerExecuted?: boolean | undefined;
1578
+ isError?: boolean | undefined;
1262
1579
  experimental_content?: ({
1263
1580
  type: "text";
1264
1581
  text: string;
@@ -1267,7 +1584,6 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1267
1584
  type: "image";
1268
1585
  data: string;
1269
1586
  })[] | undefined;
1270
- isError?: boolean | undefined;
1271
1587
  type: "tool-result";
1272
1588
  toolCallId: string;
1273
1589
  toolName: string;
@@ -1277,6 +1593,9 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1277
1593
  toolCallId: import("convex/values").VString<string, "required">;
1278
1594
  toolName: import("convex/values").VString<string, "required">;
1279
1595
  result: import("convex/values").VAny<any, "required", string>;
1596
+ 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>;
1597
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
1598
+ isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
1280
1599
  args: import("convex/values").VAny<any, "optional", string>;
1281
1600
  experimental_content: import("convex/values").VArray<({
1282
1601
  type: "text";
@@ -1307,9 +1626,208 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1307
1626
  data: import("convex/values").VString<string, "required">;
1308
1627
  mimeType: import("convex/values").VString<string | undefined, "optional">;
1309
1628
  }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
1310
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
1629
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}`>, import("convex/values").VObject<{
1630
+ type: "tool-call-streaming-start";
1631
+ toolCallId: string;
1632
+ toolName: string;
1633
+ }, {
1634
+ type: import("convex/values").VLiteral<"tool-call-streaming-start", "required">;
1635
+ toolCallId: import("convex/values").VString<string, "required">;
1636
+ toolName: import("convex/values").VString<string, "required">;
1637
+ }, "required", "type" | "toolCallId" | "toolName">, import("convex/values").VObject<{
1638
+ type: "tool-call-delta";
1639
+ toolCallId: string;
1640
+ toolName: string;
1641
+ argsTextDelta: string;
1642
+ }, {
1643
+ type: import("convex/values").VLiteral<"tool-call-delta", "required">;
1644
+ toolCallId: import("convex/values").VString<string, "required">;
1645
+ toolName: import("convex/values").VString<string, "required">;
1646
+ argsTextDelta: import("convex/values").VString<string, "required">;
1647
+ }, "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<{
1648
+ title?: string | undefined;
1649
+ type?: "source" | undefined;
1650
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1651
+ url?: string | undefined;
1652
+ id: string;
1653
+ sourceType: "url";
1654
+ } | {
1655
+ filename?: string | undefined;
1656
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1657
+ id: string;
1658
+ title: string;
1659
+ type: "source";
1660
+ sourceType: "document";
1661
+ mediaType: string;
1662
+ } | {
1663
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1664
+ id: string;
1665
+ type: "text-delta";
1666
+ text: string;
1667
+ } | {
1668
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1669
+ id: string;
1670
+ type: "reasoning-delta";
1671
+ text: string;
1672
+ } | {
1673
+ providerExecuted?: boolean | undefined;
1674
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1675
+ dynamic?: boolean | undefined;
1676
+ type: "tool-call";
1677
+ toolCallId: string;
1678
+ toolName: string;
1679
+ input: any;
1680
+ } | {
1681
+ providerExecuted?: boolean | undefined;
1682
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1683
+ dynamic?: boolean | undefined;
1684
+ id: string;
1685
+ type: "tool-input-start";
1686
+ toolName: string;
1687
+ } | {
1688
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1689
+ id: string;
1690
+ type: "tool-input-delta";
1691
+ delta: string;
1692
+ } | {
1693
+ providerExecuted?: boolean | undefined;
1694
+ input?: any;
1695
+ dynamic?: boolean | undefined;
1696
+ output?: any;
1697
+ type: "tool-result";
1698
+ toolCallId: string;
1699
+ toolName: string;
1700
+ } | {
1701
+ type: "raw";
1702
+ rawValue: any;
1703
+ }, [import("convex/values").VObject<{
1704
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1705
+ id: string;
1706
+ type: "text-delta";
1707
+ text: string;
1708
+ }, {
1709
+ type: import("convex/values").VLiteral<"text-delta", "required">;
1710
+ id: import("convex/values").VString<string, "required">;
1711
+ text: import("convex/values").VString<string, "required">;
1712
+ 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>;
1713
+ }, "required", "id" | "type" | "text" | "providerMetadata" | `providerMetadata.${string}`>, import("convex/values").VObject<{
1714
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1715
+ id: string;
1716
+ type: "reasoning-delta";
1717
+ text: string;
1718
+ }, {
1719
+ type: import("convex/values").VLiteral<"reasoning-delta", "required">;
1720
+ id: import("convex/values").VString<string, "required">;
1721
+ text: import("convex/values").VString<string, "required">;
1722
+ 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>;
1723
+ }, "required", "id" | "type" | "text" | "providerMetadata" | `providerMetadata.${string}`>, import("convex/values").VUnion<{
1724
+ title?: string | undefined;
1725
+ type?: "source" | undefined;
1726
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1727
+ url?: string | undefined;
1728
+ id: string;
1729
+ sourceType: "url";
1730
+ } | {
1731
+ filename?: string | undefined;
1732
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1733
+ id: string;
1734
+ title: string;
1735
+ type: "source";
1736
+ sourceType: "document";
1737
+ mediaType: string;
1738
+ }, [import("convex/values").VObject<{
1739
+ title?: string | undefined;
1740
+ type?: "source" | undefined;
1741
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1742
+ url?: string | undefined;
1743
+ id: string;
1744
+ sourceType: "url";
1745
+ }, {
1746
+ type: import("convex/values").VLiteral<"source" | undefined, "optional">;
1747
+ sourceType: import("convex/values").VLiteral<"url", "required">;
1748
+ id: import("convex/values").VString<string, "required">;
1749
+ url: import("convex/values").VString<string | undefined, "optional">;
1750
+ title: import("convex/values").VString<string | undefined, "optional">;
1311
1751
  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>;
1312
- }, "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">;
1752
+ }, "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, import("convex/values").VObject<{
1753
+ filename?: string | undefined;
1754
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1755
+ id: string;
1756
+ title: string;
1757
+ type: "source";
1758
+ sourceType: "document";
1759
+ mediaType: string;
1760
+ }, {
1761
+ type: import("convex/values").VLiteral<"source", "required">;
1762
+ sourceType: import("convex/values").VLiteral<"document", "required">;
1763
+ id: import("convex/values").VString<string, "required">;
1764
+ mediaType: import("convex/values").VString<string, "required">;
1765
+ title: import("convex/values").VString<string, "required">;
1766
+ filename: import("convex/values").VString<string | undefined, "optional">;
1767
+ 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>;
1768
+ }, "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<{
1769
+ providerExecuted?: boolean | undefined;
1770
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1771
+ dynamic?: boolean | undefined;
1772
+ type: "tool-call";
1773
+ toolCallId: string;
1774
+ toolName: string;
1775
+ input: any;
1776
+ }, {
1777
+ type: import("convex/values").VLiteral<"tool-call", "required">;
1778
+ toolCallId: import("convex/values").VString<string, "required">;
1779
+ toolName: import("convex/values").VString<string, "required">;
1780
+ input: import("convex/values").VAny<any, "required", string>;
1781
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
1782
+ dynamic: import("convex/values").VBoolean<boolean | undefined, "optional">;
1783
+ 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>;
1784
+ }, "required", "type" | "toolCallId" | "toolName" | "providerExecuted" | "providerMetadata" | `providerMetadata.${string}` | "input" | "dynamic" | `input.${string}`>, import("convex/values").VObject<{
1785
+ providerExecuted?: boolean | undefined;
1786
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1787
+ dynamic?: boolean | undefined;
1788
+ id: string;
1789
+ type: "tool-input-start";
1790
+ toolName: string;
1791
+ }, {
1792
+ type: import("convex/values").VLiteral<"tool-input-start", "required">;
1793
+ id: import("convex/values").VString<string, "required">;
1794
+ toolName: import("convex/values").VString<string, "required">;
1795
+ 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>;
1796
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
1797
+ dynamic: import("convex/values").VBoolean<boolean | undefined, "optional">;
1798
+ }, "required", "id" | "type" | "toolName" | "providerExecuted" | "providerMetadata" | `providerMetadata.${string}` | "dynamic">, import("convex/values").VObject<{
1799
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1800
+ id: string;
1801
+ type: "tool-input-delta";
1802
+ delta: string;
1803
+ }, {
1804
+ type: import("convex/values").VLiteral<"tool-input-delta", "required">;
1805
+ id: import("convex/values").VString<string, "required">;
1806
+ delta: import("convex/values").VString<string, "required">;
1807
+ 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>;
1808
+ }, "required", "id" | "type" | "providerMetadata" | `providerMetadata.${string}` | "delta">, import("convex/values").VObject<{
1809
+ providerExecuted?: boolean | undefined;
1810
+ input?: any;
1811
+ dynamic?: boolean | undefined;
1812
+ output?: any;
1813
+ type: "tool-result";
1814
+ toolCallId: string;
1815
+ toolName: string;
1816
+ }, {
1817
+ type: import("convex/values").VLiteral<"tool-result", "required">;
1818
+ toolCallId: import("convex/values").VString<string, "required">;
1819
+ toolName: import("convex/values").VString<string, "required">;
1820
+ input: import("convex/values").VAny<any, "optional", string>;
1821
+ output: import("convex/values").VAny<any, "optional", string>;
1822
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
1823
+ dynamic: import("convex/values").VBoolean<boolean | undefined, "optional">;
1824
+ }, "required", "type" | "toolCallId" | "toolName" | "providerExecuted" | "input" | "dynamic" | `input.${string}` | "output" | `output.${string}`>, import("convex/values").VObject<{
1825
+ type: "raw";
1826
+ rawValue: any;
1827
+ }, {
1828
+ type: import("convex/values").VLiteral<"raw", "required">;
1829
+ rawValue: import("convex/values").VAny<any, "required", string>;
1830
+ }, "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">;
1313
1831
  }, "required", "streamId" | "start" | "end" | "parts">, {
1314
1832
  streamId_start_end: ["streamId", "start", "end", "_creationTime"];
1315
1833
  }, {}, {}>;
@@ -1715,6 +2233,7 @@ export declare const vv: {
1715
2233
  } | {
1716
2234
  providerOptions?: Record<string, Record<string, any>> | undefined;
1717
2235
  signature?: string | undefined;
2236
+ state?: "streaming" | "done" | undefined;
1718
2237
  type: "reasoning";
1719
2238
  text: string;
1720
2239
  } | {
@@ -1723,6 +2242,7 @@ export declare const vv: {
1723
2242
  data: string;
1724
2243
  } | {
1725
2244
  providerOptions?: Record<string, Record<string, any>> | undefined;
2245
+ providerExecuted?: boolean | undefined;
1726
2246
  type: "tool-call";
1727
2247
  toolCallId: string;
1728
2248
  toolName: string;
@@ -1734,6 +2254,8 @@ export declare const vv: {
1734
2254
  content: {
1735
2255
  providerOptions?: Record<string, Record<string, any>> | undefined;
1736
2256
  args?: any;
2257
+ providerExecuted?: boolean | undefined;
2258
+ isError?: boolean | undefined;
1737
2259
  experimental_content?: ({
1738
2260
  type: "text";
1739
2261
  text: string;
@@ -1742,7 +2264,6 @@ export declare const vv: {
1742
2264
  type: "image";
1743
2265
  data: string;
1744
2266
  })[] | undefined;
1745
- isError?: boolean | undefined;
1746
2267
  type: "tool-result";
1747
2268
  toolCallId: string;
1748
2269
  toolName: string;
@@ -1756,19 +2277,36 @@ export declare const vv: {
1756
2277
  text?: string | undefined;
1757
2278
  reasoning?: string | undefined;
1758
2279
  usage?: {
2280
+ reasoningTokens?: number | undefined;
2281
+ cachedInputTokens?: number | undefined;
1759
2282
  promptTokens: number;
1760
2283
  completionTokens: number;
1761
2284
  totalTokens: number;
1762
2285
  } | undefined;
1763
2286
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1764
- sources?: {
2287
+ sources?: ({
1765
2288
  title?: string | undefined;
2289
+ type?: "source" | undefined;
1766
2290
  providerOptions?: Record<string, Record<string, any>> | undefined;
2291
+ url?: string | undefined;
1767
2292
  id: string;
1768
2293
  sourceType: "url";
1769
- url: string;
1770
- }[] | undefined;
2294
+ } | {
2295
+ filename?: string | undefined;
2296
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
2297
+ id: string;
2298
+ title: string;
2299
+ type: "source";
2300
+ sourceType: "document";
2301
+ mediaType: string;
2302
+ })[] | undefined;
1771
2303
  reasoningDetails?: ({
2304
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2305
+ signature?: string | undefined;
2306
+ state?: "streaming" | "done" | undefined;
2307
+ type: "reasoning";
2308
+ text: string;
2309
+ } | {
1772
2310
  signature?: string | undefined;
1773
2311
  type: "text";
1774
2312
  text: string;
@@ -1797,7 +2335,7 @@ export declare const vv: {
1797
2335
  stepOrder: number;
1798
2336
  tool: boolean;
1799
2337
  };
1800
- fieldPaths: "_id" | ("_creationTime" | "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "files" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | "reasoningDetails" | "warnings" | "finishReason" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | `providerMetadata.${string}`);
2338
+ fieldPaths: "_id" | ("_creationTime" | "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "files" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | `providerMetadata.${string}` | "reasoningDetails" | "warnings" | "finishReason" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "usage.reasoningTokens" | "usage.cachedInputTokens");
1801
2339
  indexes: {
1802
2340
  threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
1803
2341
  embeddingId_threadId: ["embeddingId", "threadId", "_creationTime"];
@@ -1855,6 +2393,7 @@ export declare const vv: {
1855
2393
  end: number;
1856
2394
  parts: ({
1857
2395
  providerOptions?: Record<string, Record<string, any>> | undefined;
2396
+ providerExecuted?: boolean | undefined;
1858
2397
  type: "tool-call";
1859
2398
  toolCallId: string;
1860
2399
  toolName: string;
@@ -1862,6 +2401,8 @@ export declare const vv: {
1862
2401
  } | {
1863
2402
  providerOptions?: Record<string, Record<string, any>> | undefined;
1864
2403
  args?: any;
2404
+ providerExecuted?: boolean | undefined;
2405
+ isError?: boolean | undefined;
1865
2406
  experimental_content?: ({
1866
2407
  type: "text";
1867
2408
  text: string;
@@ -1870,11 +2411,25 @@ export declare const vv: {
1870
2411
  type: "image";
1871
2412
  data: string;
1872
2413
  })[] | undefined;
1873
- isError?: boolean | undefined;
1874
2414
  type: "tool-result";
1875
2415
  toolCallId: string;
1876
2416
  toolName: string;
1877
2417
  result: any;
2418
+ } | {
2419
+ title?: string | undefined;
2420
+ type?: "source" | undefined;
2421
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2422
+ url?: string | undefined;
2423
+ id: string;
2424
+ sourceType: "url";
2425
+ } | {
2426
+ filename?: string | undefined;
2427
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
2428
+ id: string;
2429
+ title: string;
2430
+ type: "source";
2431
+ sourceType: "document";
2432
+ mediaType: string;
1878
2433
  } | {
1879
2434
  type: "text-delta";
1880
2435
  textDelta: string;
@@ -1886,19 +2441,60 @@ export declare const vv: {
1886
2441
  source: {
1887
2442
  title?: string | undefined;
1888
2443
  providerOptions?: Record<string, Record<string, any>> | undefined;
2444
+ url?: string | undefined;
1889
2445
  id: string;
1890
2446
  sourceType: "url";
1891
- url: string;
1892
2447
  };
1893
2448
  } | {
1894
- type: "tool-call-streaming-start";
2449
+ type: "tool-call-streaming-start";
2450
+ toolCallId: string;
2451
+ toolName: string;
2452
+ } | {
2453
+ type: "tool-call-delta";
2454
+ toolCallId: string;
2455
+ toolName: string;
2456
+ argsTextDelta: string;
2457
+ } | {
2458
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
2459
+ id: string;
2460
+ type: "text-delta";
2461
+ text: string;
2462
+ } | {
2463
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
2464
+ id: string;
2465
+ type: "reasoning-delta";
2466
+ text: string;
2467
+ } | {
2468
+ providerExecuted?: boolean | undefined;
2469
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
2470
+ dynamic?: boolean | undefined;
2471
+ type: "tool-call";
1895
2472
  toolCallId: string;
1896
2473
  toolName: string;
2474
+ input: any;
1897
2475
  } | {
1898
- type: "tool-call-delta";
2476
+ providerExecuted?: boolean | undefined;
2477
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
2478
+ dynamic?: boolean | undefined;
2479
+ id: string;
2480
+ type: "tool-input-start";
2481
+ toolName: string;
2482
+ } | {
2483
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
2484
+ id: string;
2485
+ type: "tool-input-delta";
2486
+ delta: string;
2487
+ } | {
2488
+ providerExecuted?: boolean | undefined;
2489
+ input?: any;
2490
+ dynamic?: boolean | undefined;
2491
+ output?: any;
2492
+ type: "tool-result";
1899
2493
  toolCallId: string;
1900
2494
  toolName: string;
1901
- argsTextDelta: string;
2495
+ } | {
2496
+ type: "raw";
2497
+ rawValue: any;
1902
2498
  })[];
1903
2499
  };
1904
2500
  fieldPaths: "_id" | ("_creationTime" | "streamId" | "start" | "end" | "parts");
@@ -2313,6 +2909,7 @@ export declare const vv: {
2313
2909
  } | {
2314
2910
  providerOptions?: Record<string, Record<string, any>> | undefined;
2315
2911
  signature?: string | undefined;
2912
+ state?: "streaming" | "done" | undefined;
2316
2913
  type: "reasoning";
2317
2914
  text: string;
2318
2915
  } | {
@@ -2321,6 +2918,7 @@ export declare const vv: {
2321
2918
  data: string;
2322
2919
  } | {
2323
2920
  providerOptions?: Record<string, Record<string, any>> | undefined;
2921
+ providerExecuted?: boolean | undefined;
2324
2922
  type: "tool-call";
2325
2923
  toolCallId: string;
2326
2924
  toolName: string;
@@ -2332,6 +2930,8 @@ export declare const vv: {
2332
2930
  content: {
2333
2931
  providerOptions?: Record<string, Record<string, any>> | undefined;
2334
2932
  args?: any;
2933
+ providerExecuted?: boolean | undefined;
2934
+ isError?: boolean | undefined;
2335
2935
  experimental_content?: ({
2336
2936
  type: "text";
2337
2937
  text: string;
@@ -2340,7 +2940,6 @@ export declare const vv: {
2340
2940
  type: "image";
2341
2941
  data: string;
2342
2942
  })[] | undefined;
2343
- isError?: boolean | undefined;
2344
2943
  type: "tool-result";
2345
2944
  toolCallId: string;
2346
2945
  toolName: string;
@@ -2354,19 +2953,36 @@ export declare const vv: {
2354
2953
  text?: string | undefined;
2355
2954
  reasoning?: string | undefined;
2356
2955
  usage?: {
2956
+ reasoningTokens?: number | undefined;
2957
+ cachedInputTokens?: number | undefined;
2357
2958
  promptTokens: number;
2358
2959
  completionTokens: number;
2359
2960
  totalTokens: number;
2360
2961
  } | undefined;
2361
2962
  providerMetadata?: Record<string, Record<string, any>> | undefined;
2362
- sources?: {
2963
+ sources?: ({
2363
2964
  title?: string | undefined;
2965
+ type?: "source" | undefined;
2364
2966
  providerOptions?: Record<string, Record<string, any>> | undefined;
2967
+ url?: string | undefined;
2365
2968
  id: string;
2366
2969
  sourceType: "url";
2367
- url: string;
2368
- }[] | undefined;
2970
+ } | {
2971
+ filename?: string | undefined;
2972
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
2973
+ id: string;
2974
+ title: string;
2975
+ type: "source";
2976
+ sourceType: "document";
2977
+ mediaType: string;
2978
+ })[] | undefined;
2369
2979
  reasoningDetails?: ({
2980
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2981
+ signature?: string | undefined;
2982
+ state?: "streaming" | "done" | undefined;
2983
+ type: "reasoning";
2984
+ text: string;
2985
+ } | {
2370
2986
  signature?: string | undefined;
2371
2987
  type: "text";
2372
2988
  text: string;
@@ -2395,7 +3011,7 @@ export declare const vv: {
2395
3011
  stepOrder: number;
2396
3012
  tool: boolean;
2397
3013
  };
2398
- fieldPaths: "_id" | ("_creationTime" | "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "files" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | "reasoningDetails" | "warnings" | "finishReason" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | `providerMetadata.${string}`);
3014
+ fieldPaths: "_id" | ("_creationTime" | "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "files" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | `providerMetadata.${string}` | "reasoningDetails" | "warnings" | "finishReason" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "usage.reasoningTokens" | "usage.cachedInputTokens");
2399
3015
  indexes: {
2400
3016
  threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
2401
3017
  embeddingId_threadId: ["embeddingId", "threadId", "_creationTime"];
@@ -2453,6 +3069,7 @@ export declare const vv: {
2453
3069
  end: number;
2454
3070
  parts: ({
2455
3071
  providerOptions?: Record<string, Record<string, any>> | undefined;
3072
+ providerExecuted?: boolean | undefined;
2456
3073
  type: "tool-call";
2457
3074
  toolCallId: string;
2458
3075
  toolName: string;
@@ -2460,6 +3077,8 @@ export declare const vv: {
2460
3077
  } | {
2461
3078
  providerOptions?: Record<string, Record<string, any>> | undefined;
2462
3079
  args?: any;
3080
+ providerExecuted?: boolean | undefined;
3081
+ isError?: boolean | undefined;
2463
3082
  experimental_content?: ({
2464
3083
  type: "text";
2465
3084
  text: string;
@@ -2468,11 +3087,25 @@ export declare const vv: {
2468
3087
  type: "image";
2469
3088
  data: string;
2470
3089
  })[] | undefined;
2471
- isError?: boolean | undefined;
2472
3090
  type: "tool-result";
2473
3091
  toolCallId: string;
2474
3092
  toolName: string;
2475
3093
  result: any;
3094
+ } | {
3095
+ title?: string | undefined;
3096
+ type?: "source" | undefined;
3097
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3098
+ url?: string | undefined;
3099
+ id: string;
3100
+ sourceType: "url";
3101
+ } | {
3102
+ filename?: string | undefined;
3103
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
3104
+ id: string;
3105
+ title: string;
3106
+ type: "source";
3107
+ sourceType: "document";
3108
+ mediaType: string;
2476
3109
  } | {
2477
3110
  type: "text-delta";
2478
3111
  textDelta: string;
@@ -2484,9 +3117,9 @@ export declare const vv: {
2484
3117
  source: {
2485
3118
  title?: string | undefined;
2486
3119
  providerOptions?: Record<string, Record<string, any>> | undefined;
3120
+ url?: string | undefined;
2487
3121
  id: string;
2488
3122
  sourceType: "url";
2489
- url: string;
2490
3123
  };
2491
3124
  } | {
2492
3125
  type: "tool-call-streaming-start";
@@ -2497,6 +3130,47 @@ export declare const vv: {
2497
3130
  toolCallId: string;
2498
3131
  toolName: string;
2499
3132
  argsTextDelta: string;
3133
+ } | {
3134
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
3135
+ id: string;
3136
+ type: "text-delta";
3137
+ text: string;
3138
+ } | {
3139
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
3140
+ id: string;
3141
+ type: "reasoning-delta";
3142
+ text: string;
3143
+ } | {
3144
+ providerExecuted?: boolean | undefined;
3145
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
3146
+ dynamic?: boolean | undefined;
3147
+ type: "tool-call";
3148
+ toolCallId: string;
3149
+ toolName: string;
3150
+ input: any;
3151
+ } | {
3152
+ providerExecuted?: boolean | undefined;
3153
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
3154
+ dynamic?: boolean | undefined;
3155
+ id: string;
3156
+ type: "tool-input-start";
3157
+ toolName: string;
3158
+ } | {
3159
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
3160
+ id: string;
3161
+ type: "tool-input-delta";
3162
+ delta: string;
3163
+ } | {
3164
+ providerExecuted?: boolean | undefined;
3165
+ input?: any;
3166
+ dynamic?: boolean | undefined;
3167
+ output?: any;
3168
+ type: "tool-result";
3169
+ toolCallId: string;
3170
+ toolName: string;
3171
+ } | {
3172
+ type: "raw";
3173
+ rawValue: any;
2500
3174
  })[];
2501
3175
  };
2502
3176
  fieldPaths: "_id" | ("_creationTime" | "streamId" | "start" | "end" | "parts");
@@ -2871,6 +3545,7 @@ export declare const vv: {
2871
3545
  } | {
2872
3546
  providerOptions?: Record<string, Record<string, any>> | undefined;
2873
3547
  signature?: string | undefined;
3548
+ state?: "streaming" | "done" | undefined;
2874
3549
  type: "reasoning";
2875
3550
  text: string;
2876
3551
  } | {
@@ -2879,6 +3554,7 @@ export declare const vv: {
2879
3554
  data: string;
2880
3555
  } | {
2881
3556
  providerOptions?: Record<string, Record<string, any>> | undefined;
3557
+ providerExecuted?: boolean | undefined;
2882
3558
  type: "tool-call";
2883
3559
  toolCallId: string;
2884
3560
  toolName: string;
@@ -2890,6 +3566,8 @@ export declare const vv: {
2890
3566
  content: {
2891
3567
  providerOptions?: Record<string, Record<string, any>> | undefined;
2892
3568
  args?: any;
3569
+ providerExecuted?: boolean | undefined;
3570
+ isError?: boolean | undefined;
2893
3571
  experimental_content?: ({
2894
3572
  type: "text";
2895
3573
  text: string;
@@ -2898,7 +3576,6 @@ export declare const vv: {
2898
3576
  type: "image";
2899
3577
  data: string;
2900
3578
  })[] | undefined;
2901
- isError?: boolean | undefined;
2902
3579
  type: "tool-result";
2903
3580
  toolCallId: string;
2904
3581
  toolName: string;
@@ -2912,19 +3589,36 @@ export declare const vv: {
2912
3589
  text?: string | undefined;
2913
3590
  reasoning?: string | undefined;
2914
3591
  usage?: {
3592
+ reasoningTokens?: number | undefined;
3593
+ cachedInputTokens?: number | undefined;
2915
3594
  promptTokens: number;
2916
3595
  completionTokens: number;
2917
3596
  totalTokens: number;
2918
3597
  } | undefined;
2919
3598
  providerMetadata?: Record<string, Record<string, any>> | undefined;
2920
- sources?: {
3599
+ sources?: ({
2921
3600
  title?: string | undefined;
3601
+ type?: "source" | undefined;
2922
3602
  providerOptions?: Record<string, Record<string, any>> | undefined;
3603
+ url?: string | undefined;
2923
3604
  id: string;
2924
3605
  sourceType: "url";
2925
- url: string;
2926
- }[] | undefined;
3606
+ } | {
3607
+ filename?: string | undefined;
3608
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
3609
+ id: string;
3610
+ title: string;
3611
+ type: "source";
3612
+ sourceType: "document";
3613
+ mediaType: string;
3614
+ })[] | undefined;
2927
3615
  reasoningDetails?: ({
3616
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3617
+ signature?: string | undefined;
3618
+ state?: "streaming" | "done" | undefined;
3619
+ type: "reasoning";
3620
+ text: string;
3621
+ } | {
2928
3622
  signature?: string | undefined;
2929
3623
  type: "text";
2930
3624
  text: string;
@@ -2953,7 +3647,6 @@ export declare const vv: {
2953
3647
  stepOrder: number;
2954
3648
  tool: boolean;
2955
3649
  }, {
2956
- id: import("convex/values").VString<string | undefined, "optional">;
2957
3650
  userId: import("convex/values").VString<string | undefined, "optional">;
2958
3651
  threadId: import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">;
2959
3652
  order: import("convex/values").VFloat64<number, "required">;
@@ -3001,6 +3694,7 @@ export declare const vv: {
3001
3694
  } | {
3002
3695
  providerOptions?: Record<string, Record<string, any>> | undefined;
3003
3696
  signature?: string | undefined;
3697
+ state?: "streaming" | "done" | undefined;
3004
3698
  type: "reasoning";
3005
3699
  text: string;
3006
3700
  } | {
@@ -3009,6 +3703,7 @@ export declare const vv: {
3009
3703
  data: string;
3010
3704
  } | {
3011
3705
  providerOptions?: Record<string, Record<string, any>> | undefined;
3706
+ providerExecuted?: boolean | undefined;
3012
3707
  type: "tool-call";
3013
3708
  toolCallId: string;
3014
3709
  toolName: string;
@@ -3020,6 +3715,8 @@ export declare const vv: {
3020
3715
  content: {
3021
3716
  providerOptions?: Record<string, Record<string, any>> | undefined;
3022
3717
  args?: any;
3718
+ providerExecuted?: boolean | undefined;
3719
+ isError?: boolean | undefined;
3023
3720
  experimental_content?: ({
3024
3721
  type: "text";
3025
3722
  text: string;
@@ -3028,7 +3725,6 @@ export declare const vv: {
3028
3725
  type: "image";
3029
3726
  data: string;
3030
3727
  })[] | undefined;
3031
- isError?: boolean | undefined;
3032
3728
  type: "tool-result";
3033
3729
  toolCallId: string;
3034
3730
  toolName: string;
@@ -3152,6 +3848,7 @@ export declare const vv: {
3152
3848
  } | {
3153
3849
  providerOptions?: Record<string, Record<string, any>> | undefined;
3154
3850
  signature?: string | undefined;
3851
+ state?: "streaming" | "done" | undefined;
3155
3852
  type: "reasoning";
3156
3853
  text: string;
3157
3854
  } | {
@@ -3160,6 +3857,7 @@ export declare const vv: {
3160
3857
  data: string;
3161
3858
  } | {
3162
3859
  providerOptions?: Record<string, Record<string, any>> | undefined;
3860
+ providerExecuted?: boolean | undefined;
3163
3861
  type: "tool-call";
3164
3862
  toolCallId: string;
3165
3863
  toolName: string;
@@ -3180,6 +3878,7 @@ export declare const vv: {
3180
3878
  } | {
3181
3879
  providerOptions?: Record<string, Record<string, any>> | undefined;
3182
3880
  signature?: string | undefined;
3881
+ state?: "streaming" | "done" | undefined;
3183
3882
  type: "reasoning";
3184
3883
  text: string;
3185
3884
  } | {
@@ -3188,6 +3887,7 @@ export declare const vv: {
3188
3887
  data: string;
3189
3888
  } | {
3190
3889
  providerOptions?: Record<string, Record<string, any>> | undefined;
3890
+ providerExecuted?: boolean | undefined;
3191
3891
  type: "tool-call";
3192
3892
  toolCallId: string;
3193
3893
  toolName: string;
@@ -3205,6 +3905,7 @@ export declare const vv: {
3205
3905
  } | {
3206
3906
  providerOptions?: Record<string, Record<string, any>> | undefined;
3207
3907
  signature?: string | undefined;
3908
+ state?: "streaming" | "done" | undefined;
3208
3909
  type: "reasoning";
3209
3910
  text: string;
3210
3911
  } | {
@@ -3213,6 +3914,7 @@ export declare const vv: {
3213
3914
  data: string;
3214
3915
  } | {
3215
3916
  providerOptions?: Record<string, Record<string, any>> | undefined;
3917
+ providerExecuted?: boolean | undefined;
3216
3918
  type: "tool-call";
3217
3919
  toolCallId: string;
3218
3920
  toolName: string;
@@ -3230,6 +3932,7 @@ export declare const vv: {
3230
3932
  } | {
3231
3933
  providerOptions?: Record<string, Record<string, any>> | undefined;
3232
3934
  signature?: string | undefined;
3935
+ state?: "streaming" | "done" | undefined;
3233
3936
  type: "reasoning";
3234
3937
  text: string;
3235
3938
  } | {
@@ -3238,6 +3941,7 @@ export declare const vv: {
3238
3941
  data: string;
3239
3942
  } | {
3240
3943
  providerOptions?: Record<string, Record<string, any>> | undefined;
3944
+ providerExecuted?: boolean | undefined;
3241
3945
  type: "tool-call";
3242
3946
  toolCallId: string;
3243
3947
  toolName: string;
@@ -3265,6 +3969,7 @@ export declare const vv: {
3265
3969
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">, import("convex/values").VObject<{
3266
3970
  providerOptions?: Record<string, Record<string, any>> | undefined;
3267
3971
  signature?: string | undefined;
3972
+ state?: "streaming" | "done" | undefined;
3268
3973
  type: "reasoning";
3269
3974
  text: string;
3270
3975
  }, {
@@ -3272,7 +3977,8 @@ export declare const vv: {
3272
3977
  text: import("convex/values").VString<string, "required">;
3273
3978
  signature: import("convex/values").VString<string | undefined, "optional">;
3274
3979
  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>;
3275
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
3980
+ state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
3981
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">, import("convex/values").VObject<{
3276
3982
  providerOptions?: Record<string, Record<string, any>> | undefined;
3277
3983
  type: "redacted-reasoning";
3278
3984
  data: string;
@@ -3282,6 +3988,7 @@ export declare const vv: {
3282
3988
  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>;
3283
3989
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "data">, import("convex/values").VObject<{
3284
3990
  providerOptions?: Record<string, Record<string, any>> | undefined;
3991
+ providerExecuted?: boolean | undefined;
3285
3992
  type: "tool-call";
3286
3993
  toolCallId: string;
3287
3994
  toolName: string;
@@ -3292,7 +3999,8 @@ export declare const vv: {
3292
3999
  toolName: import("convex/values").VString<string, "required">;
3293
4000
  args: import("convex/values").VAny<any, "required", string>;
3294
4001
  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>;
3295
- }, "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>;
4002
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
4003
+ }, "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>;
3296
4004
  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>;
3297
4005
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
3298
4006
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -3300,6 +4008,8 @@ export declare const vv: {
3300
4008
  content: {
3301
4009
  providerOptions?: Record<string, Record<string, any>> | undefined;
3302
4010
  args?: any;
4011
+ providerExecuted?: boolean | undefined;
4012
+ isError?: boolean | undefined;
3303
4013
  experimental_content?: ({
3304
4014
  type: "text";
3305
4015
  text: string;
@@ -3308,7 +4018,6 @@ export declare const vv: {
3308
4018
  type: "image";
3309
4019
  data: string;
3310
4020
  })[] | undefined;
3311
- isError?: boolean | undefined;
3312
4021
  type: "tool-result";
3313
4022
  toolCallId: string;
3314
4023
  toolName: string;
@@ -3319,6 +4028,8 @@ export declare const vv: {
3319
4028
  content: import("convex/values").VArray<{
3320
4029
  providerOptions?: Record<string, Record<string, any>> | undefined;
3321
4030
  args?: any;
4031
+ providerExecuted?: boolean | undefined;
4032
+ isError?: boolean | undefined;
3322
4033
  experimental_content?: ({
3323
4034
  type: "text";
3324
4035
  text: string;
@@ -3327,7 +4038,6 @@ export declare const vv: {
3327
4038
  type: "image";
3328
4039
  data: string;
3329
4040
  })[] | undefined;
3330
- isError?: boolean | undefined;
3331
4041
  type: "tool-result";
3332
4042
  toolCallId: string;
3333
4043
  toolName: string;
@@ -3335,6 +4045,8 @@ export declare const vv: {
3335
4045
  }[], import("convex/values").VObject<{
3336
4046
  providerOptions?: Record<string, Record<string, any>> | undefined;
3337
4047
  args?: any;
4048
+ providerExecuted?: boolean | undefined;
4049
+ isError?: boolean | undefined;
3338
4050
  experimental_content?: ({
3339
4051
  type: "text";
3340
4052
  text: string;
@@ -3343,7 +4055,6 @@ export declare const vv: {
3343
4055
  type: "image";
3344
4056
  data: string;
3345
4057
  })[] | undefined;
3346
- isError?: boolean | undefined;
3347
4058
  type: "tool-result";
3348
4059
  toolCallId: string;
3349
4060
  toolName: string;
@@ -3353,6 +4064,9 @@ export declare const vv: {
3353
4064
  toolCallId: import("convex/values").VString<string, "required">;
3354
4065
  toolName: import("convex/values").VString<string, "required">;
3355
4066
  result: import("convex/values").VAny<any, "required", string>;
4067
+ 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>;
4068
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
4069
+ isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
3356
4070
  args: import("convex/values").VAny<any, "optional", string>;
3357
4071
  experimental_content: import("convex/values").VArray<({
3358
4072
  type: "text";
@@ -3383,9 +4097,7 @@ export declare const vv: {
3383
4097
  data: import("convex/values").VString<string, "required">;
3384
4098
  mimeType: import("convex/values").VString<string | undefined, "optional">;
3385
4099
  }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
3386
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
3387
- 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>;
3388
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
4100
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}`>, "required">;
3389
4101
  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>;
3390
4102
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
3391
4103
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -3399,6 +4111,8 @@ export declare const vv: {
3399
4111
  tool: import("convex/values").VBoolean<boolean, "required">;
3400
4112
  text: import("convex/values").VString<string | undefined, "optional">;
3401
4113
  usage: import("convex/values").VObject<{
4114
+ reasoningTokens?: number | undefined;
4115
+ cachedInputTokens?: number | undefined;
3402
4116
  promptTokens: number;
3403
4117
  completionTokens: number;
3404
4118
  totalTokens: number;
@@ -3406,29 +4120,79 @@ export declare const vv: {
3406
4120
  promptTokens: import("convex/values").VFloat64<number, "required">;
3407
4121
  completionTokens: import("convex/values").VFloat64<number, "required">;
3408
4122
  totalTokens: import("convex/values").VFloat64<number, "required">;
3409
- }, "optional", "promptTokens" | "completionTokens" | "totalTokens">;
4123
+ reasoningTokens: import("convex/values").VFloat64<number | undefined, "optional">;
4124
+ cachedInputTokens: import("convex/values").VFloat64<number | undefined, "optional">;
4125
+ }, "optional", "promptTokens" | "completionTokens" | "totalTokens" | "reasoningTokens" | "cachedInputTokens">;
3410
4126
  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>;
3411
- sources: import("convex/values").VArray<{
4127
+ sources: import("convex/values").VArray<({
4128
+ title?: string | undefined;
4129
+ type?: "source" | undefined;
4130
+ providerOptions?: Record<string, Record<string, any>> | undefined;
4131
+ url?: string | undefined;
4132
+ id: string;
4133
+ sourceType: "url";
4134
+ } | {
4135
+ filename?: string | undefined;
4136
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4137
+ id: string;
4138
+ title: string;
4139
+ type: "source";
4140
+ sourceType: "document";
4141
+ mediaType: string;
4142
+ })[] | undefined, import("convex/values").VUnion<{
3412
4143
  title?: string | undefined;
4144
+ type?: "source" | undefined;
3413
4145
  providerOptions?: Record<string, Record<string, any>> | undefined;
4146
+ url?: string | undefined;
3414
4147
  id: string;
3415
4148
  sourceType: "url";
3416
- url: string;
3417
- }[] | undefined, import("convex/values").VObject<{
4149
+ } | {
4150
+ filename?: string | undefined;
4151
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4152
+ id: string;
4153
+ title: string;
4154
+ type: "source";
4155
+ sourceType: "document";
4156
+ mediaType: string;
4157
+ }, [import("convex/values").VObject<{
3418
4158
  title?: string | undefined;
4159
+ type?: "source" | undefined;
3419
4160
  providerOptions?: Record<string, Record<string, any>> | undefined;
4161
+ url?: string | undefined;
3420
4162
  id: string;
3421
4163
  sourceType: "url";
3422
- url: string;
3423
4164
  }, {
4165
+ type: import("convex/values").VLiteral<"source" | undefined, "optional">;
3424
4166
  sourceType: import("convex/values").VLiteral<"url", "required">;
3425
4167
  id: import("convex/values").VString<string, "required">;
3426
- url: import("convex/values").VString<string, "required">;
4168
+ url: import("convex/values").VString<string | undefined, "optional">;
3427
4169
  title: import("convex/values").VString<string | undefined, "optional">;
3428
4170
  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>;
3429
- }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, "optional">;
4171
+ }, "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, import("convex/values").VObject<{
4172
+ filename?: string | undefined;
4173
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4174
+ id: string;
4175
+ title: string;
4176
+ type: "source";
4177
+ sourceType: "document";
4178
+ mediaType: string;
4179
+ }, {
4180
+ type: import("convex/values").VLiteral<"source", "required">;
4181
+ sourceType: import("convex/values").VLiteral<"document", "required">;
4182
+ id: import("convex/values").VString<string, "required">;
4183
+ mediaType: import("convex/values").VString<string, "required">;
4184
+ title: import("convex/values").VString<string, "required">;
4185
+ filename: import("convex/values").VString<string | undefined, "optional">;
4186
+ 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>;
4187
+ }, "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">;
3430
4188
  reasoning: import("convex/values").VString<string | undefined, "optional">;
3431
4189
  reasoningDetails: import("convex/values").VArray<({
4190
+ providerOptions?: Record<string, Record<string, any>> | undefined;
4191
+ signature?: string | undefined;
4192
+ state?: "streaming" | "done" | undefined;
4193
+ type: "reasoning";
4194
+ text: string;
4195
+ } | {
3432
4196
  signature?: string | undefined;
3433
4197
  type: "text";
3434
4198
  text: string;
@@ -3436,6 +4200,12 @@ export declare const vv: {
3436
4200
  type: "redacted";
3437
4201
  data: string;
3438
4202
  })[] | undefined, import("convex/values").VUnion<{
4203
+ providerOptions?: Record<string, Record<string, any>> | undefined;
4204
+ signature?: string | undefined;
4205
+ state?: "streaming" | "done" | undefined;
4206
+ type: "reasoning";
4207
+ text: string;
4208
+ } | {
3439
4209
  signature?: string | undefined;
3440
4210
  type: "text";
3441
4211
  text: string;
@@ -3443,6 +4213,18 @@ export declare const vv: {
3443
4213
  type: "redacted";
3444
4214
  data: string;
3445
4215
  }, [import("convex/values").VObject<{
4216
+ providerOptions?: Record<string, Record<string, any>> | undefined;
4217
+ signature?: string | undefined;
4218
+ state?: "streaming" | "done" | undefined;
4219
+ type: "reasoning";
4220
+ text: string;
4221
+ }, {
4222
+ type: import("convex/values").VLiteral<"reasoning", "required">;
4223
+ text: import("convex/values").VString<string, "required">;
4224
+ signature: import("convex/values").VString<string | undefined, "optional">;
4225
+ 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>;
4226
+ state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
4227
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">, import("convex/values").VObject<{
3446
4228
  signature?: string | undefined;
3447
4229
  type: "text";
3448
4230
  text: string;
@@ -3456,7 +4238,7 @@ export declare const vv: {
3456
4238
  }, {
3457
4239
  type: import("convex/values").VLiteral<"redacted", "required">;
3458
4240
  data: import("convex/values").VString<string, "required">;
3459
- }, "required", "type" | "data">], "required", "type" | "text" | "data" | "signature">, "optional">;
4241
+ }, "required", "type" | "data">], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "data" | "signature" | "state">, "optional">;
3460
4242
  warnings: import("convex/values").VArray<({
3461
4243
  details?: string | undefined;
3462
4244
  type: "unsupported-setting";
@@ -3503,10 +4285,11 @@ export declare const vv: {
3503
4285
  message: import("convex/values").VString<string, "required">;
3504
4286
  }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
3505
4287
  finishReason: import("convex/values").VUnion<"length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined, [import("convex/values").VLiteral<"stop", "required">, import("convex/values").VLiteral<"length", "required">, import("convex/values").VLiteral<"content-filter", "required">, import("convex/values").VLiteral<"tool-calls", "required">, import("convex/values").VLiteral<"error", "required">, import("convex/values").VLiteral<"other", "required">, import("convex/values").VLiteral<"unknown", "required">], "optional", never>;
4288
+ id: import("convex/values").VString<string | undefined, "optional">;
3506
4289
  parentMessageId: import("convex/values").VId<import("convex/values").GenericId<"messages"> | undefined, "optional">;
3507
4290
  stepId: import("convex/values").VString<string | undefined, "optional">;
3508
4291
  files: import("convex/values").VArray<any[] | undefined, import("convex/values").VAny<any, "required", string>, "optional">;
3509
- }, "required", "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "files" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | "reasoningDetails" | "warnings" | "finishReason" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | `providerMetadata.${string}`>, {
4292
+ }, "required", "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "files" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | `providerMetadata.${string}` | "reasoningDetails" | "warnings" | "finishReason" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "usage.reasoningTokens" | "usage.cachedInputTokens">, {
3510
4293
  threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
3511
4294
  embeddingId_threadId: ["embeddingId", "threadId", "_creationTime"];
3512
4295
  }, {
@@ -3593,6 +4376,7 @@ export declare const vv: {
3593
4376
  end: number;
3594
4377
  parts: ({
3595
4378
  providerOptions?: Record<string, Record<string, any>> | undefined;
4379
+ providerExecuted?: boolean | undefined;
3596
4380
  type: "tool-call";
3597
4381
  toolCallId: string;
3598
4382
  toolName: string;
@@ -3600,6 +4384,8 @@ export declare const vv: {
3600
4384
  } | {
3601
4385
  providerOptions?: Record<string, Record<string, any>> | undefined;
3602
4386
  args?: any;
4387
+ providerExecuted?: boolean | undefined;
4388
+ isError?: boolean | undefined;
3603
4389
  experimental_content?: ({
3604
4390
  type: "text";
3605
4391
  text: string;
@@ -3608,11 +4394,134 @@ export declare const vv: {
3608
4394
  type: "image";
3609
4395
  data: string;
3610
4396
  })[] | undefined;
4397
+ type: "tool-result";
4398
+ toolCallId: string;
4399
+ toolName: string;
4400
+ result: any;
4401
+ } | {
4402
+ title?: string | undefined;
4403
+ type?: "source" | undefined;
4404
+ providerOptions?: Record<string, Record<string, any>> | undefined;
4405
+ url?: string | undefined;
4406
+ id: string;
4407
+ sourceType: "url";
4408
+ } | {
4409
+ filename?: string | undefined;
4410
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4411
+ id: string;
4412
+ title: string;
4413
+ type: "source";
4414
+ sourceType: "document";
4415
+ mediaType: string;
4416
+ } | {
4417
+ type: "text-delta";
4418
+ textDelta: string;
4419
+ } | {
4420
+ type: "reasoning";
4421
+ textDelta: string;
4422
+ } | {
4423
+ type: "source";
4424
+ source: {
4425
+ title?: string | undefined;
4426
+ providerOptions?: Record<string, Record<string, any>> | undefined;
4427
+ url?: string | undefined;
4428
+ id: string;
4429
+ sourceType: "url";
4430
+ };
4431
+ } | {
4432
+ type: "tool-call-streaming-start";
4433
+ toolCallId: string;
4434
+ toolName: string;
4435
+ } | {
4436
+ type: "tool-call-delta";
4437
+ toolCallId: string;
4438
+ toolName: string;
4439
+ argsTextDelta: string;
4440
+ } | {
4441
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4442
+ id: string;
4443
+ type: "text-delta";
4444
+ text: string;
4445
+ } | {
4446
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4447
+ id: string;
4448
+ type: "reasoning-delta";
4449
+ text: string;
4450
+ } | {
4451
+ providerExecuted?: boolean | undefined;
4452
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4453
+ dynamic?: boolean | undefined;
4454
+ type: "tool-call";
4455
+ toolCallId: string;
4456
+ toolName: string;
4457
+ input: any;
4458
+ } | {
4459
+ providerExecuted?: boolean | undefined;
4460
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4461
+ dynamic?: boolean | undefined;
4462
+ id: string;
4463
+ type: "tool-input-start";
4464
+ toolName: string;
4465
+ } | {
4466
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4467
+ id: string;
4468
+ type: "tool-input-delta";
4469
+ delta: string;
4470
+ } | {
4471
+ providerExecuted?: boolean | undefined;
4472
+ input?: any;
4473
+ dynamic?: boolean | undefined;
4474
+ output?: any;
4475
+ type: "tool-result";
4476
+ toolCallId: string;
4477
+ toolName: string;
4478
+ } | {
4479
+ type: "raw";
4480
+ rawValue: any;
4481
+ })[];
4482
+ }, {
4483
+ streamId: import("convex/values").VId<import("convex/values").GenericId<"streamingMessages">, "required">;
4484
+ start: import("convex/values").VFloat64<number, "required">;
4485
+ end: import("convex/values").VFloat64<number, "required">;
4486
+ parts: import("convex/values").VArray<({
4487
+ providerOptions?: Record<string, Record<string, any>> | undefined;
4488
+ providerExecuted?: boolean | undefined;
4489
+ type: "tool-call";
4490
+ toolCallId: string;
4491
+ toolName: string;
4492
+ args: any;
4493
+ } | {
4494
+ providerOptions?: Record<string, Record<string, any>> | undefined;
4495
+ args?: any;
4496
+ providerExecuted?: boolean | undefined;
3611
4497
  isError?: boolean | undefined;
4498
+ experimental_content?: ({
4499
+ type: "text";
4500
+ text: string;
4501
+ } | {
4502
+ mimeType?: string | undefined;
4503
+ type: "image";
4504
+ data: string;
4505
+ })[] | undefined;
3612
4506
  type: "tool-result";
3613
4507
  toolCallId: string;
3614
4508
  toolName: string;
3615
4509
  result: any;
4510
+ } | {
4511
+ title?: string | undefined;
4512
+ type?: "source" | undefined;
4513
+ providerOptions?: Record<string, Record<string, any>> | undefined;
4514
+ url?: string | undefined;
4515
+ id: string;
4516
+ sourceType: "url";
4517
+ } | {
4518
+ filename?: string | undefined;
4519
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4520
+ id: string;
4521
+ title: string;
4522
+ type: "source";
4523
+ sourceType: "document";
4524
+ mediaType: string;
3616
4525
  } | {
3617
4526
  type: "text-delta";
3618
4527
  textDelta: string;
@@ -3624,26 +4533,63 @@ export declare const vv: {
3624
4533
  source: {
3625
4534
  title?: string | undefined;
3626
4535
  providerOptions?: Record<string, Record<string, any>> | undefined;
4536
+ url?: string | undefined;
3627
4537
  id: string;
3628
4538
  sourceType: "url";
3629
- url: string;
3630
4539
  };
3631
4540
  } | {
3632
- type: "tool-call-streaming-start";
4541
+ type: "tool-call-streaming-start";
4542
+ toolCallId: string;
4543
+ toolName: string;
4544
+ } | {
4545
+ type: "tool-call-delta";
4546
+ toolCallId: string;
4547
+ toolName: string;
4548
+ argsTextDelta: string;
4549
+ } | {
4550
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4551
+ id: string;
4552
+ type: "text-delta";
4553
+ text: string;
4554
+ } | {
4555
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4556
+ id: string;
4557
+ type: "reasoning-delta";
4558
+ text: string;
4559
+ } | {
4560
+ providerExecuted?: boolean | undefined;
4561
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4562
+ dynamic?: boolean | undefined;
4563
+ type: "tool-call";
4564
+ toolCallId: string;
4565
+ toolName: string;
4566
+ input: any;
4567
+ } | {
4568
+ providerExecuted?: boolean | undefined;
4569
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4570
+ dynamic?: boolean | undefined;
4571
+ id: string;
4572
+ type: "tool-input-start";
4573
+ toolName: string;
4574
+ } | {
4575
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4576
+ id: string;
4577
+ type: "tool-input-delta";
4578
+ delta: string;
4579
+ } | {
4580
+ providerExecuted?: boolean | undefined;
4581
+ input?: any;
4582
+ dynamic?: boolean | undefined;
4583
+ output?: any;
4584
+ type: "tool-result";
3633
4585
  toolCallId: string;
3634
4586
  toolName: string;
3635
4587
  } | {
3636
- type: "tool-call-delta";
3637
- toolCallId: string;
3638
- toolName: string;
3639
- argsTextDelta: string;
3640
- })[];
3641
- }, {
3642
- streamId: import("convex/values").VId<import("convex/values").GenericId<"streamingMessages">, "required">;
3643
- start: import("convex/values").VFloat64<number, "required">;
3644
- end: import("convex/values").VFloat64<number, "required">;
3645
- parts: import("convex/values").VArray<({
4588
+ type: "raw";
4589
+ rawValue: any;
4590
+ })[], import("convex/values").VUnion<{
3646
4591
  providerOptions?: Record<string, Record<string, any>> | undefined;
4592
+ providerExecuted?: boolean | undefined;
3647
4593
  type: "tool-call";
3648
4594
  toolCallId: string;
3649
4595
  toolName: string;
@@ -3651,6 +4597,8 @@ export declare const vv: {
3651
4597
  } | {
3652
4598
  providerOptions?: Record<string, Record<string, any>> | undefined;
3653
4599
  args?: any;
4600
+ providerExecuted?: boolean | undefined;
4601
+ isError?: boolean | undefined;
3654
4602
  experimental_content?: ({
3655
4603
  type: "text";
3656
4604
  text: string;
@@ -3659,11 +4607,25 @@ export declare const vv: {
3659
4607
  type: "image";
3660
4608
  data: string;
3661
4609
  })[] | undefined;
3662
- isError?: boolean | undefined;
3663
4610
  type: "tool-result";
3664
4611
  toolCallId: string;
3665
4612
  toolName: string;
3666
4613
  result: any;
4614
+ } | {
4615
+ title?: string | undefined;
4616
+ type?: "source" | undefined;
4617
+ providerOptions?: Record<string, Record<string, any>> | undefined;
4618
+ url?: string | undefined;
4619
+ id: string;
4620
+ sourceType: "url";
4621
+ } | {
4622
+ filename?: string | undefined;
4623
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4624
+ id: string;
4625
+ title: string;
4626
+ type: "source";
4627
+ sourceType: "document";
4628
+ mediaType: string;
3667
4629
  } | {
3668
4630
  type: "text-delta";
3669
4631
  textDelta: string;
@@ -3675,9 +4637,9 @@ export declare const vv: {
3675
4637
  source: {
3676
4638
  title?: string | undefined;
3677
4639
  providerOptions?: Record<string, Record<string, any>> | undefined;
4640
+ url?: string | undefined;
3678
4641
  id: string;
3679
4642
  sourceType: "url";
3680
- url: string;
3681
4643
  };
3682
4644
  } | {
3683
4645
  type: "tool-call-streaming-start";
@@ -3688,8 +4650,50 @@ export declare const vv: {
3688
4650
  toolCallId: string;
3689
4651
  toolName: string;
3690
4652
  argsTextDelta: string;
3691
- })[], import("convex/values").VUnion<{
4653
+ } | {
4654
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4655
+ id: string;
4656
+ type: "text-delta";
4657
+ text: string;
4658
+ } | {
4659
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4660
+ id: string;
4661
+ type: "reasoning-delta";
4662
+ text: string;
4663
+ } | {
4664
+ providerExecuted?: boolean | undefined;
4665
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4666
+ dynamic?: boolean | undefined;
4667
+ type: "tool-call";
4668
+ toolCallId: string;
4669
+ toolName: string;
4670
+ input: any;
4671
+ } | {
4672
+ providerExecuted?: boolean | undefined;
4673
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4674
+ dynamic?: boolean | undefined;
4675
+ id: string;
4676
+ type: "tool-input-start";
4677
+ toolName: string;
4678
+ } | {
4679
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4680
+ id: string;
4681
+ type: "tool-input-delta";
4682
+ delta: string;
4683
+ } | {
4684
+ providerExecuted?: boolean | undefined;
4685
+ input?: any;
4686
+ dynamic?: boolean | undefined;
4687
+ output?: any;
4688
+ type: "tool-result";
4689
+ toolCallId: string;
4690
+ toolName: string;
4691
+ } | {
4692
+ type: "raw";
4693
+ rawValue: any;
4694
+ }, [import("convex/values").VUnion<{
3692
4695
  providerOptions?: Record<string, Record<string, any>> | undefined;
4696
+ providerExecuted?: boolean | undefined;
3693
4697
  type: "tool-call";
3694
4698
  toolCallId: string;
3695
4699
  toolName: string;
@@ -3697,6 +4701,8 @@ export declare const vv: {
3697
4701
  } | {
3698
4702
  providerOptions?: Record<string, Record<string, any>> | undefined;
3699
4703
  args?: any;
4704
+ providerExecuted?: boolean | undefined;
4705
+ isError?: boolean | undefined;
3700
4706
  experimental_content?: ({
3701
4707
  type: "text";
3702
4708
  text: string;
@@ -3705,7 +4711,6 @@ export declare const vv: {
3705
4711
  type: "image";
3706
4712
  data: string;
3707
4713
  })[] | undefined;
3708
- isError?: boolean | undefined;
3709
4714
  type: "tool-result";
3710
4715
  toolCallId: string;
3711
4716
  toolName: string;
@@ -3721,9 +4726,9 @@ export declare const vv: {
3721
4726
  source: {
3722
4727
  title?: string | undefined;
3723
4728
  providerOptions?: Record<string, Record<string, any>> | undefined;
4729
+ url?: string | undefined;
3724
4730
  id: string;
3725
4731
  sourceType: "url";
3726
- url: string;
3727
4732
  };
3728
4733
  } | {
3729
4734
  type: "tool-call-streaming-start";
@@ -3751,27 +4756,28 @@ export declare const vv: {
3751
4756
  source: {
3752
4757
  title?: string | undefined;
3753
4758
  providerOptions?: Record<string, Record<string, any>> | undefined;
4759
+ url?: string | undefined;
3754
4760
  id: string;
3755
4761
  sourceType: "url";
3756
- url: string;
3757
4762
  };
3758
4763
  }, {
3759
4764
  type: import("convex/values").VLiteral<"source", "required">;
3760
4765
  source: import("convex/values").VObject<{
3761
4766
  title?: string | undefined;
3762
4767
  providerOptions?: Record<string, Record<string, any>> | undefined;
4768
+ url?: string | undefined;
3763
4769
  id: string;
3764
4770
  sourceType: "url";
3765
- url: string;
3766
4771
  }, {
3767
4772
  sourceType: import("convex/values").VLiteral<"url", "required">;
3768
4773
  id: import("convex/values").VString<string, "required">;
3769
- url: import("convex/values").VString<string, "required">;
4774
+ url: import("convex/values").VString<string | undefined, "optional">;
3770
4775
  title: import("convex/values").VString<string | undefined, "optional">;
3771
4776
  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>;
3772
4777
  }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">;
3773
4778
  }, "required", "type" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url">, import("convex/values").VObject<{
3774
4779
  providerOptions?: Record<string, Record<string, any>> | undefined;
4780
+ providerExecuted?: boolean | undefined;
3775
4781
  type: "tool-call";
3776
4782
  toolCallId: string;
3777
4783
  toolName: string;
@@ -3782,27 +4788,12 @@ export declare const vv: {
3782
4788
  toolName: import("convex/values").VString<string, "required">;
3783
4789
  args: import("convex/values").VAny<any, "required", string>;
3784
4790
  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>;
3785
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>, import("convex/values").VObject<{
3786
- type: "tool-call-streaming-start";
3787
- toolCallId: string;
3788
- toolName: string;
3789
- }, {
3790
- type: import("convex/values").VLiteral<"tool-call-streaming-start", "required">;
3791
- toolCallId: import("convex/values").VString<string, "required">;
3792
- toolName: import("convex/values").VString<string, "required">;
3793
- }, "required", "type" | "toolCallId" | "toolName">, import("convex/values").VObject<{
3794
- type: "tool-call-delta";
3795
- toolCallId: string;
3796
- toolName: string;
3797
- argsTextDelta: string;
3798
- }, {
3799
- type: import("convex/values").VLiteral<"tool-call-delta", "required">;
3800
- toolCallId: import("convex/values").VString<string, "required">;
3801
- toolName: import("convex/values").VString<string, "required">;
3802
- argsTextDelta: import("convex/values").VString<string, "required">;
3803
- }, "required", "type" | "toolCallId" | "toolName" | "argsTextDelta">, import("convex/values").VObject<{
4791
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
4792
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>, import("convex/values").VObject<{
3804
4793
  providerOptions?: Record<string, Record<string, any>> | undefined;
3805
4794
  args?: any;
4795
+ providerExecuted?: boolean | undefined;
4796
+ isError?: boolean | undefined;
3806
4797
  experimental_content?: ({
3807
4798
  type: "text";
3808
4799
  text: string;
@@ -3811,7 +4802,6 @@ export declare const vv: {
3811
4802
  type: "image";
3812
4803
  data: string;
3813
4804
  })[] | undefined;
3814
- isError?: boolean | undefined;
3815
4805
  type: "tool-result";
3816
4806
  toolCallId: string;
3817
4807
  toolName: string;
@@ -3821,6 +4811,9 @@ export declare const vv: {
3821
4811
  toolCallId: import("convex/values").VString<string, "required">;
3822
4812
  toolName: import("convex/values").VString<string, "required">;
3823
4813
  result: import("convex/values").VAny<any, "required", string>;
4814
+ 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>;
4815
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
4816
+ isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
3824
4817
  args: import("convex/values").VAny<any, "optional", string>;
3825
4818
  experimental_content: import("convex/values").VArray<({
3826
4819
  type: "text";
@@ -3851,9 +4844,208 @@ export declare const vv: {
3851
4844
  data: import("convex/values").VString<string, "required">;
3852
4845
  mimeType: import("convex/values").VString<string | undefined, "optional">;
3853
4846
  }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
3854
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
4847
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}`>, import("convex/values").VObject<{
4848
+ type: "tool-call-streaming-start";
4849
+ toolCallId: string;
4850
+ toolName: string;
4851
+ }, {
4852
+ type: import("convex/values").VLiteral<"tool-call-streaming-start", "required">;
4853
+ toolCallId: import("convex/values").VString<string, "required">;
4854
+ toolName: import("convex/values").VString<string, "required">;
4855
+ }, "required", "type" | "toolCallId" | "toolName">, import("convex/values").VObject<{
4856
+ type: "tool-call-delta";
4857
+ toolCallId: string;
4858
+ toolName: string;
4859
+ argsTextDelta: string;
4860
+ }, {
4861
+ type: import("convex/values").VLiteral<"tool-call-delta", "required">;
4862
+ toolCallId: import("convex/values").VString<string, "required">;
4863
+ toolName: import("convex/values").VString<string, "required">;
4864
+ argsTextDelta: import("convex/values").VString<string, "required">;
4865
+ }, "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<{
4866
+ title?: string | undefined;
4867
+ type?: "source" | undefined;
4868
+ providerOptions?: Record<string, Record<string, any>> | undefined;
4869
+ url?: string | undefined;
4870
+ id: string;
4871
+ sourceType: "url";
4872
+ } | {
4873
+ filename?: string | undefined;
4874
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4875
+ id: string;
4876
+ title: string;
4877
+ type: "source";
4878
+ sourceType: "document";
4879
+ mediaType: string;
4880
+ } | {
4881
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4882
+ id: string;
4883
+ type: "text-delta";
4884
+ text: string;
4885
+ } | {
4886
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4887
+ id: string;
4888
+ type: "reasoning-delta";
4889
+ text: string;
4890
+ } | {
4891
+ providerExecuted?: boolean | undefined;
4892
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4893
+ dynamic?: boolean | undefined;
4894
+ type: "tool-call";
4895
+ toolCallId: string;
4896
+ toolName: string;
4897
+ input: any;
4898
+ } | {
4899
+ providerExecuted?: boolean | undefined;
4900
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4901
+ dynamic?: boolean | undefined;
4902
+ id: string;
4903
+ type: "tool-input-start";
4904
+ toolName: string;
4905
+ } | {
4906
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4907
+ id: string;
4908
+ type: "tool-input-delta";
4909
+ delta: string;
4910
+ } | {
4911
+ providerExecuted?: boolean | undefined;
4912
+ input?: any;
4913
+ dynamic?: boolean | undefined;
4914
+ output?: any;
4915
+ type: "tool-result";
4916
+ toolCallId: string;
4917
+ toolName: string;
4918
+ } | {
4919
+ type: "raw";
4920
+ rawValue: any;
4921
+ }, [import("convex/values").VObject<{
4922
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4923
+ id: string;
4924
+ type: "text-delta";
4925
+ text: string;
4926
+ }, {
4927
+ type: import("convex/values").VLiteral<"text-delta", "required">;
4928
+ id: import("convex/values").VString<string, "required">;
4929
+ text: import("convex/values").VString<string, "required">;
4930
+ 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>;
4931
+ }, "required", "id" | "type" | "text" | "providerMetadata" | `providerMetadata.${string}`>, import("convex/values").VObject<{
4932
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4933
+ id: string;
4934
+ type: "reasoning-delta";
4935
+ text: string;
4936
+ }, {
4937
+ type: import("convex/values").VLiteral<"reasoning-delta", "required">;
4938
+ id: import("convex/values").VString<string, "required">;
4939
+ text: import("convex/values").VString<string, "required">;
4940
+ 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>;
4941
+ }, "required", "id" | "type" | "text" | "providerMetadata" | `providerMetadata.${string}`>, import("convex/values").VUnion<{
4942
+ title?: string | undefined;
4943
+ type?: "source" | undefined;
4944
+ providerOptions?: Record<string, Record<string, any>> | undefined;
4945
+ url?: string | undefined;
4946
+ id: string;
4947
+ sourceType: "url";
4948
+ } | {
4949
+ filename?: string | undefined;
4950
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4951
+ id: string;
4952
+ title: string;
4953
+ type: "source";
4954
+ sourceType: "document";
4955
+ mediaType: string;
4956
+ }, [import("convex/values").VObject<{
4957
+ title?: string | undefined;
4958
+ type?: "source" | undefined;
4959
+ providerOptions?: Record<string, Record<string, any>> | undefined;
4960
+ url?: string | undefined;
4961
+ id: string;
4962
+ sourceType: "url";
4963
+ }, {
4964
+ type: import("convex/values").VLiteral<"source" | undefined, "optional">;
4965
+ sourceType: import("convex/values").VLiteral<"url", "required">;
4966
+ id: import("convex/values").VString<string, "required">;
4967
+ url: import("convex/values").VString<string | undefined, "optional">;
4968
+ title: import("convex/values").VString<string | undefined, "optional">;
3855
4969
  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>;
3856
- }, "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">;
4970
+ }, "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, import("convex/values").VObject<{
4971
+ filename?: string | undefined;
4972
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4973
+ id: string;
4974
+ title: string;
4975
+ type: "source";
4976
+ sourceType: "document";
4977
+ mediaType: string;
4978
+ }, {
4979
+ type: import("convex/values").VLiteral<"source", "required">;
4980
+ sourceType: import("convex/values").VLiteral<"document", "required">;
4981
+ id: import("convex/values").VString<string, "required">;
4982
+ mediaType: import("convex/values").VString<string, "required">;
4983
+ title: import("convex/values").VString<string, "required">;
4984
+ filename: import("convex/values").VString<string | undefined, "optional">;
4985
+ 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>;
4986
+ }, "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<{
4987
+ providerExecuted?: boolean | undefined;
4988
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
4989
+ dynamic?: boolean | undefined;
4990
+ type: "tool-call";
4991
+ toolCallId: string;
4992
+ toolName: string;
4993
+ input: any;
4994
+ }, {
4995
+ type: import("convex/values").VLiteral<"tool-call", "required">;
4996
+ toolCallId: import("convex/values").VString<string, "required">;
4997
+ toolName: import("convex/values").VString<string, "required">;
4998
+ input: import("convex/values").VAny<any, "required", string>;
4999
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
5000
+ dynamic: import("convex/values").VBoolean<boolean | undefined, "optional">;
5001
+ 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>;
5002
+ }, "required", "type" | "toolCallId" | "toolName" | "providerExecuted" | "providerMetadata" | `providerMetadata.${string}` | "input" | "dynamic" | `input.${string}`>, import("convex/values").VObject<{
5003
+ providerExecuted?: boolean | undefined;
5004
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
5005
+ dynamic?: boolean | undefined;
5006
+ id: string;
5007
+ type: "tool-input-start";
5008
+ toolName: string;
5009
+ }, {
5010
+ type: import("convex/values").VLiteral<"tool-input-start", "required">;
5011
+ id: import("convex/values").VString<string, "required">;
5012
+ toolName: import("convex/values").VString<string, "required">;
5013
+ 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>;
5014
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
5015
+ dynamic: import("convex/values").VBoolean<boolean | undefined, "optional">;
5016
+ }, "required", "id" | "type" | "toolName" | "providerExecuted" | "providerMetadata" | `providerMetadata.${string}` | "dynamic">, import("convex/values").VObject<{
5017
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
5018
+ id: string;
5019
+ type: "tool-input-delta";
5020
+ delta: string;
5021
+ }, {
5022
+ type: import("convex/values").VLiteral<"tool-input-delta", "required">;
5023
+ id: import("convex/values").VString<string, "required">;
5024
+ delta: import("convex/values").VString<string, "required">;
5025
+ 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>;
5026
+ }, "required", "id" | "type" | "providerMetadata" | `providerMetadata.${string}` | "delta">, import("convex/values").VObject<{
5027
+ providerExecuted?: boolean | undefined;
5028
+ input?: any;
5029
+ dynamic?: boolean | undefined;
5030
+ output?: any;
5031
+ type: "tool-result";
5032
+ toolCallId: string;
5033
+ toolName: string;
5034
+ }, {
5035
+ type: import("convex/values").VLiteral<"tool-result", "required">;
5036
+ toolCallId: import("convex/values").VString<string, "required">;
5037
+ toolName: import("convex/values").VString<string, "required">;
5038
+ input: import("convex/values").VAny<any, "optional", string>;
5039
+ output: import("convex/values").VAny<any, "optional", string>;
5040
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
5041
+ dynamic: import("convex/values").VBoolean<boolean | undefined, "optional">;
5042
+ }, "required", "type" | "toolCallId" | "toolName" | "providerExecuted" | "input" | "dynamic" | `input.${string}` | "output" | `output.${string}`>, import("convex/values").VObject<{
5043
+ type: "raw";
5044
+ rawValue: any;
5045
+ }, {
5046
+ type: import("convex/values").VLiteral<"raw", "required">;
5047
+ rawValue: import("convex/values").VAny<any, "required", string>;
5048
+ }, "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">;
3857
5049
  }, "required", "streamId" | "start" | "end" | "parts">, {
3858
5050
  streamId_start_end: ["streamId", "start", "end", "_creationTime"];
3859
5051
  }, {}, {}>;
@@ -3972,6 +5164,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
3972
5164
  } | {
3973
5165
  providerOptions?: Record<string, Record<string, any>> | undefined;
3974
5166
  signature?: string | undefined;
5167
+ state?: "streaming" | "done" | undefined;
3975
5168
  type: "reasoning";
3976
5169
  text: string;
3977
5170
  } | {
@@ -3980,6 +5173,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
3980
5173
  data: string;
3981
5174
  } | {
3982
5175
  providerOptions?: Record<string, Record<string, any>> | undefined;
5176
+ providerExecuted?: boolean | undefined;
3983
5177
  type: "tool-call";
3984
5178
  toolCallId: string;
3985
5179
  toolName: string;
@@ -3991,6 +5185,8 @@ export declare const vMessageDoc: import("convex/values").VObject<{
3991
5185
  content: {
3992
5186
  providerOptions?: Record<string, Record<string, any>> | undefined;
3993
5187
  args?: any;
5188
+ providerExecuted?: boolean | undefined;
5189
+ isError?: boolean | undefined;
3994
5190
  experimental_content?: ({
3995
5191
  type: "text";
3996
5192
  text: string;
@@ -3999,7 +5195,6 @@ export declare const vMessageDoc: import("convex/values").VObject<{
3999
5195
  type: "image";
4000
5196
  data: string;
4001
5197
  })[] | undefined;
4002
- isError?: boolean | undefined;
4003
5198
  type: "tool-result";
4004
5199
  toolCallId: string;
4005
5200
  toolName: string;
@@ -4013,19 +5208,36 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4013
5208
  text?: string | undefined;
4014
5209
  reasoning?: string | undefined;
4015
5210
  usage?: {
5211
+ reasoningTokens?: number | undefined;
5212
+ cachedInputTokens?: number | undefined;
4016
5213
  promptTokens: number;
4017
5214
  completionTokens: number;
4018
5215
  totalTokens: number;
4019
5216
  } | undefined;
4020
5217
  providerMetadata?: Record<string, Record<string, any>> | undefined;
4021
- sources?: {
5218
+ sources?: ({
4022
5219
  title?: string | undefined;
5220
+ type?: "source" | undefined;
4023
5221
  providerOptions?: Record<string, Record<string, any>> | undefined;
5222
+ url?: string | undefined;
4024
5223
  id: string;
4025
5224
  sourceType: "url";
4026
- url: string;
4027
- }[] | undefined;
5225
+ } | {
5226
+ filename?: string | undefined;
5227
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
5228
+ id: string;
5229
+ title: string;
5230
+ type: "source";
5231
+ sourceType: "document";
5232
+ mediaType: string;
5233
+ })[] | undefined;
4028
5234
  reasoningDetails?: ({
5235
+ providerOptions?: Record<string, Record<string, any>> | undefined;
5236
+ signature?: string | undefined;
5237
+ state?: "streaming" | "done" | undefined;
5238
+ type: "reasoning";
5239
+ text: string;
5240
+ } | {
4029
5241
  signature?: string | undefined;
4030
5242
  type: "text";
4031
5243
  text: string;
@@ -4057,7 +5269,6 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4057
5269
  threadId: import("convex/values").VString<string, "required">;
4058
5270
  embeddingId: import("convex/values").VString<string | undefined, "optional">;
4059
5271
  fileIds: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
4060
- id: import("convex/values").VString<string | undefined, "optional">;
4061
5272
  userId: import("convex/values").VString<string | undefined, "optional">;
4062
5273
  order: import("convex/values").VFloat64<number, "required">;
4063
5274
  stepOrder: import("convex/values").VFloat64<number, "required">;
@@ -4102,6 +5313,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4102
5313
  } | {
4103
5314
  providerOptions?: Record<string, Record<string, any>> | undefined;
4104
5315
  signature?: string | undefined;
5316
+ state?: "streaming" | "done" | undefined;
4105
5317
  type: "reasoning";
4106
5318
  text: string;
4107
5319
  } | {
@@ -4110,6 +5322,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4110
5322
  data: string;
4111
5323
  } | {
4112
5324
  providerOptions?: Record<string, Record<string, any>> | undefined;
5325
+ providerExecuted?: boolean | undefined;
4113
5326
  type: "tool-call";
4114
5327
  toolCallId: string;
4115
5328
  toolName: string;
@@ -4121,6 +5334,8 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4121
5334
  content: {
4122
5335
  providerOptions?: Record<string, Record<string, any>> | undefined;
4123
5336
  args?: any;
5337
+ providerExecuted?: boolean | undefined;
5338
+ isError?: boolean | undefined;
4124
5339
  experimental_content?: ({
4125
5340
  type: "text";
4126
5341
  text: string;
@@ -4129,7 +5344,6 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4129
5344
  type: "image";
4130
5345
  data: string;
4131
5346
  })[] | undefined;
4132
- isError?: boolean | undefined;
4133
5347
  type: "tool-result";
4134
5348
  toolCallId: string;
4135
5349
  toolName: string;
@@ -4253,6 +5467,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4253
5467
  } | {
4254
5468
  providerOptions?: Record<string, Record<string, any>> | undefined;
4255
5469
  signature?: string | undefined;
5470
+ state?: "streaming" | "done" | undefined;
4256
5471
  type: "reasoning";
4257
5472
  text: string;
4258
5473
  } | {
@@ -4261,6 +5476,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4261
5476
  data: string;
4262
5477
  } | {
4263
5478
  providerOptions?: Record<string, Record<string, any>> | undefined;
5479
+ providerExecuted?: boolean | undefined;
4264
5480
  type: "tool-call";
4265
5481
  toolCallId: string;
4266
5482
  toolName: string;
@@ -4281,6 +5497,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4281
5497
  } | {
4282
5498
  providerOptions?: Record<string, Record<string, any>> | undefined;
4283
5499
  signature?: string | undefined;
5500
+ state?: "streaming" | "done" | undefined;
4284
5501
  type: "reasoning";
4285
5502
  text: string;
4286
5503
  } | {
@@ -4289,6 +5506,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4289
5506
  data: string;
4290
5507
  } | {
4291
5508
  providerOptions?: Record<string, Record<string, any>> | undefined;
5509
+ providerExecuted?: boolean | undefined;
4292
5510
  type: "tool-call";
4293
5511
  toolCallId: string;
4294
5512
  toolName: string;
@@ -4306,6 +5524,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4306
5524
  } | {
4307
5525
  providerOptions?: Record<string, Record<string, any>> | undefined;
4308
5526
  signature?: string | undefined;
5527
+ state?: "streaming" | "done" | undefined;
4309
5528
  type: "reasoning";
4310
5529
  text: string;
4311
5530
  } | {
@@ -4314,6 +5533,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4314
5533
  data: string;
4315
5534
  } | {
4316
5535
  providerOptions?: Record<string, Record<string, any>> | undefined;
5536
+ providerExecuted?: boolean | undefined;
4317
5537
  type: "tool-call";
4318
5538
  toolCallId: string;
4319
5539
  toolName: string;
@@ -4331,6 +5551,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4331
5551
  } | {
4332
5552
  providerOptions?: Record<string, Record<string, any>> | undefined;
4333
5553
  signature?: string | undefined;
5554
+ state?: "streaming" | "done" | undefined;
4334
5555
  type: "reasoning";
4335
5556
  text: string;
4336
5557
  } | {
@@ -4339,6 +5560,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4339
5560
  data: string;
4340
5561
  } | {
4341
5562
  providerOptions?: Record<string, Record<string, any>> | undefined;
5563
+ providerExecuted?: boolean | undefined;
4342
5564
  type: "tool-call";
4343
5565
  toolCallId: string;
4344
5566
  toolName: string;
@@ -4366,6 +5588,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4366
5588
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">, import("convex/values").VObject<{
4367
5589
  providerOptions?: Record<string, Record<string, any>> | undefined;
4368
5590
  signature?: string | undefined;
5591
+ state?: "streaming" | "done" | undefined;
4369
5592
  type: "reasoning";
4370
5593
  text: string;
4371
5594
  }, {
@@ -4373,7 +5596,8 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4373
5596
  text: import("convex/values").VString<string, "required">;
4374
5597
  signature: import("convex/values").VString<string | undefined, "optional">;
4375
5598
  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>;
4376
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
5599
+ state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
5600
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">, import("convex/values").VObject<{
4377
5601
  providerOptions?: Record<string, Record<string, any>> | undefined;
4378
5602
  type: "redacted-reasoning";
4379
5603
  data: string;
@@ -4383,6 +5607,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4383
5607
  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>;
4384
5608
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "data">, import("convex/values").VObject<{
4385
5609
  providerOptions?: Record<string, Record<string, any>> | undefined;
5610
+ providerExecuted?: boolean | undefined;
4386
5611
  type: "tool-call";
4387
5612
  toolCallId: string;
4388
5613
  toolName: string;
@@ -4393,7 +5618,8 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4393
5618
  toolName: import("convex/values").VString<string, "required">;
4394
5619
  args: import("convex/values").VAny<any, "required", string>;
4395
5620
  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>;
4396
- }, "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>;
5621
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
5622
+ }, "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>;
4397
5623
  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>;
4398
5624
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
4399
5625
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -4401,6 +5627,8 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4401
5627
  content: {
4402
5628
  providerOptions?: Record<string, Record<string, any>> | undefined;
4403
5629
  args?: any;
5630
+ providerExecuted?: boolean | undefined;
5631
+ isError?: boolean | undefined;
4404
5632
  experimental_content?: ({
4405
5633
  type: "text";
4406
5634
  text: string;
@@ -4409,7 +5637,6 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4409
5637
  type: "image";
4410
5638
  data: string;
4411
5639
  })[] | undefined;
4412
- isError?: boolean | undefined;
4413
5640
  type: "tool-result";
4414
5641
  toolCallId: string;
4415
5642
  toolName: string;
@@ -4420,6 +5647,8 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4420
5647
  content: import("convex/values").VArray<{
4421
5648
  providerOptions?: Record<string, Record<string, any>> | undefined;
4422
5649
  args?: any;
5650
+ providerExecuted?: boolean | undefined;
5651
+ isError?: boolean | undefined;
4423
5652
  experimental_content?: ({
4424
5653
  type: "text";
4425
5654
  text: string;
@@ -4428,7 +5657,6 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4428
5657
  type: "image";
4429
5658
  data: string;
4430
5659
  })[] | undefined;
4431
- isError?: boolean | undefined;
4432
5660
  type: "tool-result";
4433
5661
  toolCallId: string;
4434
5662
  toolName: string;
@@ -4436,6 +5664,8 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4436
5664
  }[], import("convex/values").VObject<{
4437
5665
  providerOptions?: Record<string, Record<string, any>> | undefined;
4438
5666
  args?: any;
5667
+ providerExecuted?: boolean | undefined;
5668
+ isError?: boolean | undefined;
4439
5669
  experimental_content?: ({
4440
5670
  type: "text";
4441
5671
  text: string;
@@ -4444,7 +5674,6 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4444
5674
  type: "image";
4445
5675
  data: string;
4446
5676
  })[] | undefined;
4447
- isError?: boolean | undefined;
4448
5677
  type: "tool-result";
4449
5678
  toolCallId: string;
4450
5679
  toolName: string;
@@ -4454,6 +5683,9 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4454
5683
  toolCallId: import("convex/values").VString<string, "required">;
4455
5684
  toolName: import("convex/values").VString<string, "required">;
4456
5685
  result: import("convex/values").VAny<any, "required", string>;
5686
+ 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>;
5687
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
5688
+ isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
4457
5689
  args: import("convex/values").VAny<any, "optional", string>;
4458
5690
  experimental_content: import("convex/values").VArray<({
4459
5691
  type: "text";
@@ -4484,9 +5716,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4484
5716
  data: import("convex/values").VString<string, "required">;
4485
5717
  mimeType: import("convex/values").VString<string | undefined, "optional">;
4486
5718
  }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
4487
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
4488
- 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>;
4489
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
5719
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}`>, "required">;
4490
5720
  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>;
4491
5721
  }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
4492
5722
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -4500,6 +5730,8 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4500
5730
  tool: import("convex/values").VBoolean<boolean, "required">;
4501
5731
  text: import("convex/values").VString<string | undefined, "optional">;
4502
5732
  usage: import("convex/values").VObject<{
5733
+ reasoningTokens?: number | undefined;
5734
+ cachedInputTokens?: number | undefined;
4503
5735
  promptTokens: number;
4504
5736
  completionTokens: number;
4505
5737
  totalTokens: number;
@@ -4507,29 +5739,79 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4507
5739
  promptTokens: import("convex/values").VFloat64<number, "required">;
4508
5740
  completionTokens: import("convex/values").VFloat64<number, "required">;
4509
5741
  totalTokens: import("convex/values").VFloat64<number, "required">;
4510
- }, "optional", "promptTokens" | "completionTokens" | "totalTokens">;
5742
+ reasoningTokens: import("convex/values").VFloat64<number | undefined, "optional">;
5743
+ cachedInputTokens: import("convex/values").VFloat64<number | undefined, "optional">;
5744
+ }, "optional", "promptTokens" | "completionTokens" | "totalTokens" | "reasoningTokens" | "cachedInputTokens">;
4511
5745
  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>;
4512
- sources: import("convex/values").VArray<{
5746
+ sources: import("convex/values").VArray<({
5747
+ title?: string | undefined;
5748
+ type?: "source" | undefined;
5749
+ providerOptions?: Record<string, Record<string, any>> | undefined;
5750
+ url?: string | undefined;
5751
+ id: string;
5752
+ sourceType: "url";
5753
+ } | {
5754
+ filename?: string | undefined;
5755
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
5756
+ id: string;
5757
+ title: string;
5758
+ type: "source";
5759
+ sourceType: "document";
5760
+ mediaType: string;
5761
+ })[] | undefined, import("convex/values").VUnion<{
4513
5762
  title?: string | undefined;
5763
+ type?: "source" | undefined;
4514
5764
  providerOptions?: Record<string, Record<string, any>> | undefined;
5765
+ url?: string | undefined;
4515
5766
  id: string;
4516
5767
  sourceType: "url";
4517
- url: string;
4518
- }[] | undefined, import("convex/values").VObject<{
5768
+ } | {
5769
+ filename?: string | undefined;
5770
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
5771
+ id: string;
5772
+ title: string;
5773
+ type: "source";
5774
+ sourceType: "document";
5775
+ mediaType: string;
5776
+ }, [import("convex/values").VObject<{
4519
5777
  title?: string | undefined;
5778
+ type?: "source" | undefined;
4520
5779
  providerOptions?: Record<string, Record<string, any>> | undefined;
5780
+ url?: string | undefined;
4521
5781
  id: string;
4522
5782
  sourceType: "url";
4523
- url: string;
4524
5783
  }, {
5784
+ type: import("convex/values").VLiteral<"source" | undefined, "optional">;
4525
5785
  sourceType: import("convex/values").VLiteral<"url", "required">;
4526
5786
  id: import("convex/values").VString<string, "required">;
4527
- url: import("convex/values").VString<string, "required">;
5787
+ url: import("convex/values").VString<string | undefined, "optional">;
4528
5788
  title: import("convex/values").VString<string | undefined, "optional">;
4529
5789
  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>;
4530
- }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, "optional">;
5790
+ }, "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, import("convex/values").VObject<{
5791
+ filename?: string | undefined;
5792
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
5793
+ id: string;
5794
+ title: string;
5795
+ type: "source";
5796
+ sourceType: "document";
5797
+ mediaType: string;
5798
+ }, {
5799
+ type: import("convex/values").VLiteral<"source", "required">;
5800
+ sourceType: import("convex/values").VLiteral<"document", "required">;
5801
+ id: import("convex/values").VString<string, "required">;
5802
+ mediaType: import("convex/values").VString<string, "required">;
5803
+ title: import("convex/values").VString<string, "required">;
5804
+ filename: import("convex/values").VString<string | undefined, "optional">;
5805
+ 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>;
5806
+ }, "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">;
4531
5807
  reasoning: import("convex/values").VString<string | undefined, "optional">;
4532
5808
  reasoningDetails: import("convex/values").VArray<({
5809
+ providerOptions?: Record<string, Record<string, any>> | undefined;
5810
+ signature?: string | undefined;
5811
+ state?: "streaming" | "done" | undefined;
5812
+ type: "reasoning";
5813
+ text: string;
5814
+ } | {
4533
5815
  signature?: string | undefined;
4534
5816
  type: "text";
4535
5817
  text: string;
@@ -4537,6 +5819,12 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4537
5819
  type: "redacted";
4538
5820
  data: string;
4539
5821
  })[] | undefined, import("convex/values").VUnion<{
5822
+ providerOptions?: Record<string, Record<string, any>> | undefined;
5823
+ signature?: string | undefined;
5824
+ state?: "streaming" | "done" | undefined;
5825
+ type: "reasoning";
5826
+ text: string;
5827
+ } | {
4540
5828
  signature?: string | undefined;
4541
5829
  type: "text";
4542
5830
  text: string;
@@ -4544,6 +5832,18 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4544
5832
  type: "redacted";
4545
5833
  data: string;
4546
5834
  }, [import("convex/values").VObject<{
5835
+ providerOptions?: Record<string, Record<string, any>> | undefined;
5836
+ signature?: string | undefined;
5837
+ state?: "streaming" | "done" | undefined;
5838
+ type: "reasoning";
5839
+ text: string;
5840
+ }, {
5841
+ type: import("convex/values").VLiteral<"reasoning", "required">;
5842
+ text: import("convex/values").VString<string, "required">;
5843
+ signature: import("convex/values").VString<string | undefined, "optional">;
5844
+ 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>;
5845
+ state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
5846
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">, import("convex/values").VObject<{
4547
5847
  signature?: string | undefined;
4548
5848
  type: "text";
4549
5849
  text: string;
@@ -4557,7 +5857,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4557
5857
  }, {
4558
5858
  type: import("convex/values").VLiteral<"redacted", "required">;
4559
5859
  data: import("convex/values").VString<string, "required">;
4560
- }, "required", "type" | "data">], "required", "type" | "text" | "data" | "signature">, "optional">;
5860
+ }, "required", "type" | "data">], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "data" | "signature" | "state">, "optional">;
4561
5861
  warnings: import("convex/values").VArray<({
4562
5862
  details?: string | undefined;
4563
5863
  type: "unsupported-setting";
@@ -4604,9 +5904,10 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4604
5904
  message: import("convex/values").VString<string, "required">;
4605
5905
  }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
4606
5906
  finishReason: import("convex/values").VUnion<"length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined, [import("convex/values").VLiteral<"stop", "required">, import("convex/values").VLiteral<"length", "required">, import("convex/values").VLiteral<"content-filter", "required">, import("convex/values").VLiteral<"tool-calls", "required">, import("convex/values").VLiteral<"error", "required">, import("convex/values").VLiteral<"other", "required">, import("convex/values").VLiteral<"unknown", "required">], "optional", never>;
5907
+ id: import("convex/values").VString<string | undefined, "optional">;
4607
5908
  _id: import("convex/values").VString<string, "required">;
4608
5909
  _creationTime: import("convex/values").VFloat64<number, "required">;
4609
- }, "required", "_id" | "_creationTime" | "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | "reasoningDetails" | "warnings" | "finishReason" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | `providerMetadata.${string}`>;
5910
+ }, "required", "_id" | "_creationTime" | "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "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">;
4610
5911
  export type MessageDoc = Infer<typeof vMessageDoc>;
4611
5912
  export default schema;
4612
5913
  //# sourceMappingURL=schema.d.ts.map