@convex-dev/agent 0.2.5-alpha.0 → 0.2.6-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/client/definePlaygroundAPI.d.ts +248 -18
  2. package/dist/client/definePlaygroundAPI.d.ts.map +1 -1
  3. package/dist/client/index.d.ts +211 -33
  4. package/dist/client/index.d.ts.map +1 -1
  5. package/dist/client/index.js +56 -52
  6. package/dist/client/index.js.map +1 -1
  7. package/dist/client/messages.d.ts +50 -4
  8. package/dist/client/messages.d.ts.map +1 -1
  9. package/dist/client/mockModel.d.ts +30 -0
  10. package/dist/client/mockModel.d.ts.map +1 -0
  11. package/dist/client/mockModel.js +153 -0
  12. package/dist/client/mockModel.js.map +1 -0
  13. package/dist/client/search.d.ts +50 -4
  14. package/dist/client/search.d.ts.map +1 -1
  15. package/dist/client/streaming.d.ts +603 -46
  16. package/dist/client/streaming.d.ts.map +1 -1
  17. package/dist/client/streaming.js +30 -35
  18. package/dist/client/streaming.js.map +1 -1
  19. package/dist/client/textStreamParts.d.ts +5 -0
  20. package/dist/client/textStreamParts.d.ts.map +1 -0
  21. package/dist/{parts.js → client/textStreamParts.js} +18 -1
  22. package/dist/client/textStreamParts.js.map +1 -0
  23. package/dist/component/_generated/api.d.ts +240 -16
  24. package/dist/component/messages.d.ts +549 -43
  25. package/dist/component/messages.d.ts.map +1 -1
  26. package/dist/component/messages.js +1 -1
  27. package/dist/component/messages.js.map +1 -1
  28. package/dist/component/schema.d.ts +1546 -98
  29. package/dist/component/schema.d.ts.map +1 -1
  30. package/dist/mapping.d.ts.map +1 -1
  31. package/dist/mapping.js +30 -18
  32. package/dist/mapping.js.map +1 -1
  33. package/dist/react/useSmoothText.d.ts +1 -1
  34. package/dist/react/useSmoothText.d.ts.map +1 -1
  35. package/dist/react/useSmoothText.js +30 -22
  36. package/dist/react/useSmoothText.js.map +1 -1
  37. package/dist/validators.d.ts +3740 -201
  38. package/dist/validators.d.ts.map +1 -1
  39. package/dist/validators.js +10 -1
  40. package/dist/validators.js.map +1 -1
  41. package/package.json +1 -1
  42. package/src/client/index.ts +90 -82
  43. package/src/client/mockModel.ts +195 -0
  44. package/src/client/streaming.ts +46 -54
  45. package/src/{parts.ts → client/textStreamParts.ts} +33 -1
  46. package/src/component/_generated/api.d.ts +240 -16
  47. package/src/component/messages.ts +1 -1
  48. package/src/mapping.test.ts +50 -1
  49. package/src/mapping.ts +42 -17
  50. package/src/react/toUIMessages.test.ts +16 -4
  51. package/src/react/useSmoothText.ts +40 -31
  52. package/src/validators.ts +23 -1
  53. package/dist/parts.d.ts +0 -3
  54. package/dist/parts.d.ts.map +0 -1
  55. package/dist/parts.js.map +0 -1
@@ -59,8 +59,8 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
59
59
  id: string;
60
60
  title: string;
61
61
  type: "source";
62
- sourceType: "document";
63
62
  mediaType: string;
63
+ sourceType: "document";
64
64
  })[] | undefined;
65
65
  warnings?: ({
66
66
  details?: string | undefined;
@@ -149,6 +149,30 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
149
149
  providerMetadata?: Record<string, Record<string, any>> | undefined;
150
150
  args?: any;
151
151
  providerExecuted?: boolean | undefined;
152
+ output?: {
153
+ type: "text";
154
+ value: string;
155
+ } | {
156
+ type: "json";
157
+ value: any;
158
+ } | {
159
+ type: "error-text";
160
+ value: string;
161
+ } | {
162
+ type: "error-json";
163
+ value: any;
164
+ } | {
165
+ type: "content";
166
+ value: ({
167
+ type: "text";
168
+ text: string;
169
+ } | {
170
+ type: "media";
171
+ data: string;
172
+ mediaType: string;
173
+ })[];
174
+ } | undefined;
175
+ result?: any;
152
176
  isError?: boolean | undefined;
153
177
  experimental_content?: ({
154
178
  type: "text";
@@ -161,7 +185,6 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
161
185
  type: "tool-result";
162
186
  toolCallId: string;
163
187
  toolName: string;
164
- result: any;
165
188
  } | {
166
189
  providerOptions?: Record<string, Record<string, any>> | undefined;
167
190
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -177,8 +200,8 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
177
200
  id: string;
178
201
  title: string;
179
202
  type: "source";
180
- sourceType: "document";
181
203
  mediaType: string;
204
+ sourceType: "document";
182
205
  })[];
183
206
  } | {
184
207
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -188,6 +211,30 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
188
211
  providerMetadata?: Record<string, Record<string, any>> | undefined;
189
212
  args?: any;
190
213
  providerExecuted?: boolean | undefined;
214
+ output?: {
215
+ type: "text";
216
+ value: string;
217
+ } | {
218
+ type: "json";
219
+ value: any;
220
+ } | {
221
+ type: "error-text";
222
+ value: string;
223
+ } | {
224
+ type: "error-json";
225
+ value: any;
226
+ } | {
227
+ type: "content";
228
+ value: ({
229
+ type: "text";
230
+ text: string;
231
+ } | {
232
+ type: "media";
233
+ data: string;
234
+ mediaType: string;
235
+ })[];
236
+ } | undefined;
237
+ result?: any;
191
238
  isError?: boolean | undefined;
192
239
  experimental_content?: ({
193
240
  type: "text";
@@ -200,7 +247,6 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
200
247
  type: "tool-result";
201
248
  toolCallId: string;
202
249
  toolName: string;
203
- result: any;
204
250
  }[];
205
251
  } | {
206
252
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -279,6 +325,30 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
279
325
  providerMetadata?: Record<string, Record<string, any>> | undefined;
280
326
  args?: any;
281
327
  providerExecuted?: boolean | undefined;
328
+ output?: {
329
+ type: "text";
330
+ value: string;
331
+ } | {
332
+ type: "json";
333
+ value: any;
334
+ } | {
335
+ type: "error-text";
336
+ value: string;
337
+ } | {
338
+ type: "error-json";
339
+ value: any;
340
+ } | {
341
+ type: "content";
342
+ value: ({
343
+ type: "text";
344
+ text: string;
345
+ } | {
346
+ type: "media";
347
+ data: string;
348
+ mediaType: string;
349
+ })[];
350
+ } | undefined;
351
+ result?: any;
282
352
  isError?: boolean | undefined;
283
353
  experimental_content?: ({
284
354
  type: "text";
@@ -291,7 +361,6 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
291
361
  type: "tool-result";
292
362
  toolCallId: string;
293
363
  toolName: string;
294
- result: any;
295
364
  } | {
296
365
  providerOptions?: Record<string, Record<string, any>> | undefined;
297
366
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -307,8 +376,8 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
307
376
  id: string;
308
377
  title: string;
309
378
  type: "source";
310
- sourceType: "document";
311
379
  mediaType: string;
380
+ sourceType: "document";
312
381
  })[];
313
382
  } | {
314
383
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -318,6 +387,30 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
318
387
  providerMetadata?: Record<string, Record<string, any>> | undefined;
319
388
  args?: any;
320
389
  providerExecuted?: boolean | undefined;
390
+ output?: {
391
+ type: "text";
392
+ value: string;
393
+ } | {
394
+ type: "json";
395
+ value: any;
396
+ } | {
397
+ type: "error-text";
398
+ value: string;
399
+ } | {
400
+ type: "error-json";
401
+ value: any;
402
+ } | {
403
+ type: "content";
404
+ value: ({
405
+ type: "text";
406
+ text: string;
407
+ } | {
408
+ type: "media";
409
+ data: string;
410
+ mediaType: string;
411
+ })[];
412
+ } | undefined;
413
+ result?: any;
321
414
  isError?: boolean | undefined;
322
415
  experimental_content?: ({
323
416
  type: "text";
@@ -330,7 +423,6 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
330
423
  type: "tool-result";
331
424
  toolCallId: string;
332
425
  toolName: string;
333
- result: any;
334
426
  }[];
335
427
  } | {
336
428
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -362,8 +454,8 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
362
454
  id: string;
363
455
  title: string;
364
456
  type: "source";
365
- sourceType: "document";
366
457
  mediaType: string;
458
+ sourceType: "document";
367
459
  })[] | undefined;
368
460
  warnings?: ({
369
461
  details?: string | undefined;
@@ -474,6 +566,30 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
474
566
  providerMetadata?: Record<string, Record<string, any>> | undefined;
475
567
  args?: any;
476
568
  providerExecuted?: boolean | undefined;
569
+ output?: {
570
+ type: "text";
571
+ value: string;
572
+ } | {
573
+ type: "json";
574
+ value: any;
575
+ } | {
576
+ type: "error-text";
577
+ value: string;
578
+ } | {
579
+ type: "error-json";
580
+ value: any;
581
+ } | {
582
+ type: "content";
583
+ value: ({
584
+ type: "text";
585
+ text: string;
586
+ } | {
587
+ type: "media";
588
+ data: string;
589
+ mediaType: string;
590
+ })[];
591
+ } | undefined;
592
+ result?: any;
477
593
  isError?: boolean | undefined;
478
594
  experimental_content?: ({
479
595
  type: "text";
@@ -486,7 +602,6 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
486
602
  type: "tool-result";
487
603
  toolCallId: string;
488
604
  toolName: string;
489
- result: any;
490
605
  } | {
491
606
  providerOptions?: Record<string, Record<string, any>> | undefined;
492
607
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -502,8 +617,8 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
502
617
  id: string;
503
618
  title: string;
504
619
  type: "source";
505
- sourceType: "document";
506
620
  mediaType: string;
621
+ sourceType: "document";
507
622
  })[];
508
623
  } | {
509
624
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -513,6 +628,30 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
513
628
  providerMetadata?: Record<string, Record<string, any>> | undefined;
514
629
  args?: any;
515
630
  providerExecuted?: boolean | undefined;
631
+ output?: {
632
+ type: "text";
633
+ value: string;
634
+ } | {
635
+ type: "json";
636
+ value: any;
637
+ } | {
638
+ type: "error-text";
639
+ value: string;
640
+ } | {
641
+ type: "error-json";
642
+ value: any;
643
+ } | {
644
+ type: "content";
645
+ value: ({
646
+ type: "text";
647
+ text: string;
648
+ } | {
649
+ type: "media";
650
+ data: string;
651
+ mediaType: string;
652
+ })[];
653
+ } | undefined;
654
+ result?: any;
516
655
  isError?: boolean | undefined;
517
656
  experimental_content?: ({
518
657
  type: "text";
@@ -525,7 +664,6 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
525
664
  type: "tool-result";
526
665
  toolCallId: string;
527
666
  toolName: string;
528
- result: any;
529
667
  }[];
530
668
  } | {
531
669
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -557,8 +695,8 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
557
695
  id: string;
558
696
  title: string;
559
697
  type: "source";
560
- sourceType: "document";
561
698
  mediaType: string;
699
+ sourceType: "document";
562
700
  })[] | undefined;
563
701
  warnings?: ({
564
702
  details?: string | undefined;
@@ -673,6 +811,30 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
673
811
  providerMetadata?: Record<string, Record<string, any>> | undefined;
674
812
  args?: any;
675
813
  providerExecuted?: boolean | undefined;
814
+ output?: {
815
+ type: "text";
816
+ value: string;
817
+ } | {
818
+ type: "json";
819
+ value: any;
820
+ } | {
821
+ type: "error-text";
822
+ value: string;
823
+ } | {
824
+ type: "error-json";
825
+ value: any;
826
+ } | {
827
+ type: "content";
828
+ value: ({
829
+ type: "text";
830
+ text: string;
831
+ } | {
832
+ type: "media";
833
+ data: string;
834
+ mediaType: string;
835
+ })[];
836
+ } | undefined;
837
+ result?: any;
676
838
  isError?: boolean | undefined;
677
839
  experimental_content?: ({
678
840
  type: "text";
@@ -685,7 +847,6 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
685
847
  type: "tool-result";
686
848
  toolCallId: string;
687
849
  toolName: string;
688
- result: any;
689
850
  } | {
690
851
  providerOptions?: Record<string, Record<string, any>> | undefined;
691
852
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -701,8 +862,8 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
701
862
  id: string;
702
863
  title: string;
703
864
  type: "source";
704
- sourceType: "document";
705
865
  mediaType: string;
866
+ sourceType: "document";
706
867
  })[];
707
868
  } | {
708
869
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -712,6 +873,30 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
712
873
  providerMetadata?: Record<string, Record<string, any>> | undefined;
713
874
  args?: any;
714
875
  providerExecuted?: boolean | undefined;
876
+ output?: {
877
+ type: "text";
878
+ value: string;
879
+ } | {
880
+ type: "json";
881
+ value: any;
882
+ } | {
883
+ type: "error-text";
884
+ value: string;
885
+ } | {
886
+ type: "error-json";
887
+ value: any;
888
+ } | {
889
+ type: "content";
890
+ value: ({
891
+ type: "text";
892
+ text: string;
893
+ } | {
894
+ type: "media";
895
+ data: string;
896
+ mediaType: string;
897
+ })[];
898
+ } | undefined;
899
+ result?: any;
715
900
  isError?: boolean | undefined;
716
901
  experimental_content?: ({
717
902
  type: "text";
@@ -724,7 +909,6 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
724
909
  type: "tool-result";
725
910
  toolCallId: string;
726
911
  toolName: string;
727
- result: any;
728
912
  }[];
729
913
  } | {
730
914
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -803,6 +987,30 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
803
987
  providerMetadata?: Record<string, Record<string, any>> | undefined;
804
988
  args?: any;
805
989
  providerExecuted?: boolean | undefined;
990
+ output?: {
991
+ type: "text";
992
+ value: string;
993
+ } | {
994
+ type: "json";
995
+ value: any;
996
+ } | {
997
+ type: "error-text";
998
+ value: string;
999
+ } | {
1000
+ type: "error-json";
1001
+ value: any;
1002
+ } | {
1003
+ type: "content";
1004
+ value: ({
1005
+ type: "text";
1006
+ text: string;
1007
+ } | {
1008
+ type: "media";
1009
+ data: string;
1010
+ mediaType: string;
1011
+ })[];
1012
+ } | undefined;
1013
+ result?: any;
806
1014
  isError?: boolean | undefined;
807
1015
  experimental_content?: ({
808
1016
  type: "text";
@@ -815,7 +1023,6 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
815
1023
  type: "tool-result";
816
1024
  toolCallId: string;
817
1025
  toolName: string;
818
- result: any;
819
1026
  } | {
820
1027
  providerOptions?: Record<string, Record<string, any>> | undefined;
821
1028
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -831,8 +1038,8 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
831
1038
  id: string;
832
1039
  title: string;
833
1040
  type: "source";
834
- sourceType: "document";
835
1041
  mediaType: string;
1042
+ sourceType: "document";
836
1043
  })[];
837
1044
  } | {
838
1045
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -842,6 +1049,30 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
842
1049
  providerMetadata?: Record<string, Record<string, any>> | undefined;
843
1050
  args?: any;
844
1051
  providerExecuted?: boolean | undefined;
1052
+ output?: {
1053
+ type: "text";
1054
+ value: string;
1055
+ } | {
1056
+ type: "json";
1057
+ value: any;
1058
+ } | {
1059
+ type: "error-text";
1060
+ value: string;
1061
+ } | {
1062
+ type: "error-json";
1063
+ value: any;
1064
+ } | {
1065
+ type: "content";
1066
+ value: ({
1067
+ type: "text";
1068
+ text: string;
1069
+ } | {
1070
+ type: "media";
1071
+ data: string;
1072
+ mediaType: string;
1073
+ })[];
1074
+ } | undefined;
1075
+ result?: any;
845
1076
  isError?: boolean | undefined;
846
1077
  experimental_content?: ({
847
1078
  type: "text";
@@ -854,7 +1085,6 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
854
1085
  type: "tool-result";
855
1086
  toolCallId: string;
856
1087
  toolName: string;
857
- result: any;
858
1088
  }[];
859
1089
  } | {
860
1090
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -886,8 +1116,8 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
886
1116
  id: string;
887
1117
  title: string;
888
1118
  type: "source";
889
- sourceType: "document";
890
1119
  mediaType: string;
1120
+ sourceType: "document";
891
1121
  })[] | undefined;
892
1122
  warnings?: ({
893
1123
  details?: string | undefined;
@@ -1009,6 +1239,30 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
1009
1239
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1010
1240
  args?: any;
1011
1241
  providerExecuted?: boolean | undefined;
1242
+ output?: {
1243
+ type: "text";
1244
+ value: string;
1245
+ } | {
1246
+ type: "json";
1247
+ value: any;
1248
+ } | {
1249
+ type: "error-text";
1250
+ value: string;
1251
+ } | {
1252
+ type: "error-json";
1253
+ value: any;
1254
+ } | {
1255
+ type: "content";
1256
+ value: ({
1257
+ type: "text";
1258
+ text: string;
1259
+ } | {
1260
+ type: "media";
1261
+ data: string;
1262
+ mediaType: string;
1263
+ })[];
1264
+ } | undefined;
1265
+ result?: any;
1012
1266
  isError?: boolean | undefined;
1013
1267
  experimental_content?: ({
1014
1268
  type: "text";
@@ -1021,7 +1275,6 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
1021
1275
  type: "tool-result";
1022
1276
  toolCallId: string;
1023
1277
  toolName: string;
1024
- result: any;
1025
1278
  } | {
1026
1279
  providerOptions?: Record<string, Record<string, any>> | undefined;
1027
1280
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -1037,8 +1290,8 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
1037
1290
  id: string;
1038
1291
  title: string;
1039
1292
  type: "source";
1040
- sourceType: "document";
1041
1293
  mediaType: string;
1294
+ sourceType: "document";
1042
1295
  })[];
1043
1296
  } | {
1044
1297
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1048,6 +1301,30 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
1048
1301
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1049
1302
  args?: any;
1050
1303
  providerExecuted?: boolean | undefined;
1304
+ output?: {
1305
+ type: "text";
1306
+ value: string;
1307
+ } | {
1308
+ type: "json";
1309
+ value: any;
1310
+ } | {
1311
+ type: "error-text";
1312
+ value: string;
1313
+ } | {
1314
+ type: "error-json";
1315
+ value: any;
1316
+ } | {
1317
+ type: "content";
1318
+ value: ({
1319
+ type: "text";
1320
+ text: string;
1321
+ } | {
1322
+ type: "media";
1323
+ data: string;
1324
+ mediaType: string;
1325
+ })[];
1326
+ } | undefined;
1327
+ result?: any;
1051
1328
  isError?: boolean | undefined;
1052
1329
  experimental_content?: ({
1053
1330
  type: "text";
@@ -1060,7 +1337,6 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
1060
1337
  type: "tool-result";
1061
1338
  toolCallId: string;
1062
1339
  toolName: string;
1063
- result: any;
1064
1340
  }[];
1065
1341
  } | {
1066
1342
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1092,8 +1368,8 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
1092
1368
  id: string;
1093
1369
  title: string;
1094
1370
  type: "source";
1095
- sourceType: "document";
1096
1371
  mediaType: string;
1372
+ sourceType: "document";
1097
1373
  })[] | undefined;
1098
1374
  warnings?: ({
1099
1375
  details?: string | undefined;
@@ -1207,6 +1483,30 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
1207
1483
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1208
1484
  args?: any;
1209
1485
  providerExecuted?: boolean | undefined;
1486
+ output?: {
1487
+ type: "text";
1488
+ value: string;
1489
+ } | {
1490
+ type: "json";
1491
+ value: any;
1492
+ } | {
1493
+ type: "error-text";
1494
+ value: string;
1495
+ } | {
1496
+ type: "error-json";
1497
+ value: any;
1498
+ } | {
1499
+ type: "content";
1500
+ value: ({
1501
+ type: "text";
1502
+ text: string;
1503
+ } | {
1504
+ type: "media";
1505
+ data: string;
1506
+ mediaType: string;
1507
+ })[];
1508
+ } | undefined;
1509
+ result?: any;
1210
1510
  isError?: boolean | undefined;
1211
1511
  experimental_content?: ({
1212
1512
  type: "text";
@@ -1219,7 +1519,6 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
1219
1519
  type: "tool-result";
1220
1520
  toolCallId: string;
1221
1521
  toolName: string;
1222
- result: any;
1223
1522
  } | {
1224
1523
  providerOptions?: Record<string, Record<string, any>> | undefined;
1225
1524
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -1235,8 +1534,8 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
1235
1534
  id: string;
1236
1535
  title: string;
1237
1536
  type: "source";
1238
- sourceType: "document";
1239
1537
  mediaType: string;
1538
+ sourceType: "document";
1240
1539
  })[];
1241
1540
  } | {
1242
1541
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1246,6 +1545,30 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
1246
1545
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1247
1546
  args?: any;
1248
1547
  providerExecuted?: boolean | undefined;
1548
+ output?: {
1549
+ type: "text";
1550
+ value: string;
1551
+ } | {
1552
+ type: "json";
1553
+ value: any;
1554
+ } | {
1555
+ type: "error-text";
1556
+ value: string;
1557
+ } | {
1558
+ type: "error-json";
1559
+ value: any;
1560
+ } | {
1561
+ type: "content";
1562
+ value: ({
1563
+ type: "text";
1564
+ text: string;
1565
+ } | {
1566
+ type: "media";
1567
+ data: string;
1568
+ mediaType: string;
1569
+ })[];
1570
+ } | undefined;
1571
+ result?: any;
1249
1572
  isError?: boolean | undefined;
1250
1573
  experimental_content?: ({
1251
1574
  type: "text";
@@ -1258,7 +1581,6 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
1258
1581
  type: "tool-result";
1259
1582
  toolCallId: string;
1260
1583
  toolName: string;
1261
- result: any;
1262
1584
  }[];
1263
1585
  } | {
1264
1586
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1290,8 +1612,8 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
1290
1612
  id: string;
1291
1613
  title: string;
1292
1614
  type: "source";
1293
- sourceType: "document";
1294
1615
  mediaType: string;
1616
+ sourceType: "document";
1295
1617
  })[] | undefined;
1296
1618
  warnings?: ({
1297
1619
  details?: string | undefined;
@@ -1411,6 +1733,30 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
1411
1733
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1412
1734
  args?: any;
1413
1735
  providerExecuted?: boolean | undefined;
1736
+ output?: {
1737
+ type: "text";
1738
+ value: string;
1739
+ } | {
1740
+ type: "json";
1741
+ value: any;
1742
+ } | {
1743
+ type: "error-text";
1744
+ value: string;
1745
+ } | {
1746
+ type: "error-json";
1747
+ value: any;
1748
+ } | {
1749
+ type: "content";
1750
+ value: ({
1751
+ type: "text";
1752
+ text: string;
1753
+ } | {
1754
+ type: "media";
1755
+ data: string;
1756
+ mediaType: string;
1757
+ })[];
1758
+ } | undefined;
1759
+ result?: any;
1414
1760
  isError?: boolean | undefined;
1415
1761
  experimental_content?: ({
1416
1762
  type: "text";
@@ -1423,7 +1769,6 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
1423
1769
  type: "tool-result";
1424
1770
  toolCallId: string;
1425
1771
  toolName: string;
1426
- result: any;
1427
1772
  } | {
1428
1773
  providerOptions?: Record<string, Record<string, any>> | undefined;
1429
1774
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -1439,8 +1784,8 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
1439
1784
  id: string;
1440
1785
  title: string;
1441
1786
  type: "source";
1442
- sourceType: "document";
1443
1787
  mediaType: string;
1788
+ sourceType: "document";
1444
1789
  })[];
1445
1790
  } | {
1446
1791
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1450,6 +1795,30 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
1450
1795
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1451
1796
  args?: any;
1452
1797
  providerExecuted?: boolean | undefined;
1798
+ output?: {
1799
+ type: "text";
1800
+ value: string;
1801
+ } | {
1802
+ type: "json";
1803
+ value: any;
1804
+ } | {
1805
+ type: "error-text";
1806
+ value: string;
1807
+ } | {
1808
+ type: "error-json";
1809
+ value: any;
1810
+ } | {
1811
+ type: "content";
1812
+ value: ({
1813
+ type: "text";
1814
+ text: string;
1815
+ } | {
1816
+ type: "media";
1817
+ data: string;
1818
+ mediaType: string;
1819
+ })[];
1820
+ } | undefined;
1821
+ result?: any;
1453
1822
  isError?: boolean | undefined;
1454
1823
  experimental_content?: ({
1455
1824
  type: "text";
@@ -1462,7 +1831,6 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
1462
1831
  type: "tool-result";
1463
1832
  toolCallId: string;
1464
1833
  toolName: string;
1465
- result: any;
1466
1834
  }[];
1467
1835
  } | {
1468
1836
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1494,8 +1862,8 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
1494
1862
  id: string;
1495
1863
  title: string;
1496
1864
  type: "source";
1497
- sourceType: "document";
1498
1865
  mediaType: string;
1866
+ sourceType: "document";
1499
1867
  })[] | undefined;
1500
1868
  warnings?: ({
1501
1869
  details?: string | undefined;
@@ -1606,6 +1974,30 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1606
1974
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1607
1975
  args?: any;
1608
1976
  providerExecuted?: boolean | undefined;
1977
+ output?: {
1978
+ type: "text";
1979
+ value: string;
1980
+ } | {
1981
+ type: "json";
1982
+ value: any;
1983
+ } | {
1984
+ type: "error-text";
1985
+ value: string;
1986
+ } | {
1987
+ type: "error-json";
1988
+ value: any;
1989
+ } | {
1990
+ type: "content";
1991
+ value: ({
1992
+ type: "text";
1993
+ text: string;
1994
+ } | {
1995
+ type: "media";
1996
+ data: string;
1997
+ mediaType: string;
1998
+ })[];
1999
+ } | undefined;
2000
+ result?: any;
1609
2001
  isError?: boolean | undefined;
1610
2002
  experimental_content?: ({
1611
2003
  type: "text";
@@ -1618,7 +2010,6 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1618
2010
  type: "tool-result";
1619
2011
  toolCallId: string;
1620
2012
  toolName: string;
1621
- result: any;
1622
2013
  } | {
1623
2014
  providerOptions?: Record<string, Record<string, any>> | undefined;
1624
2015
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -1634,8 +2025,8 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1634
2025
  id: string;
1635
2026
  title: string;
1636
2027
  type: "source";
1637
- sourceType: "document";
1638
2028
  mediaType: string;
2029
+ sourceType: "document";
1639
2030
  })[];
1640
2031
  } | {
1641
2032
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1645,6 +2036,30 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1645
2036
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1646
2037
  args?: any;
1647
2038
  providerExecuted?: boolean | undefined;
2039
+ output?: {
2040
+ type: "text";
2041
+ value: string;
2042
+ } | {
2043
+ type: "json";
2044
+ value: any;
2045
+ } | {
2046
+ type: "error-text";
2047
+ value: string;
2048
+ } | {
2049
+ type: "error-json";
2050
+ value: any;
2051
+ } | {
2052
+ type: "content";
2053
+ value: ({
2054
+ type: "text";
2055
+ text: string;
2056
+ } | {
2057
+ type: "media";
2058
+ data: string;
2059
+ mediaType: string;
2060
+ })[];
2061
+ } | undefined;
2062
+ result?: any;
1648
2063
  isError?: boolean | undefined;
1649
2064
  experimental_content?: ({
1650
2065
  type: "text";
@@ -1657,7 +2072,6 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1657
2072
  type: "tool-result";
1658
2073
  toolCallId: string;
1659
2074
  toolName: string;
1660
- result: any;
1661
2075
  }[];
1662
2076
  } | {
1663
2077
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1689,8 +2103,8 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1689
2103
  id: string;
1690
2104
  title: string;
1691
2105
  type: "source";
1692
- sourceType: "document";
1693
2106
  mediaType: string;
2107
+ sourceType: "document";
1694
2108
  })[] | undefined;
1695
2109
  warnings?: ({
1696
2110
  details?: string | undefined;
@@ -1803,6 +2217,30 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1803
2217
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1804
2218
  args?: any;
1805
2219
  providerExecuted?: boolean | undefined;
2220
+ output?: {
2221
+ type: "text";
2222
+ value: string;
2223
+ } | {
2224
+ type: "json";
2225
+ value: any;
2226
+ } | {
2227
+ type: "error-text";
2228
+ value: string;
2229
+ } | {
2230
+ type: "error-json";
2231
+ value: any;
2232
+ } | {
2233
+ type: "content";
2234
+ value: ({
2235
+ type: "text";
2236
+ text: string;
2237
+ } | {
2238
+ type: "media";
2239
+ data: string;
2240
+ mediaType: string;
2241
+ })[];
2242
+ } | undefined;
2243
+ result?: any;
1806
2244
  isError?: boolean | undefined;
1807
2245
  experimental_content?: ({
1808
2246
  type: "text";
@@ -1815,7 +2253,6 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1815
2253
  type: "tool-result";
1816
2254
  toolCallId: string;
1817
2255
  toolName: string;
1818
- result: any;
1819
2256
  } | {
1820
2257
  providerOptions?: Record<string, Record<string, any>> | undefined;
1821
2258
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -1831,8 +2268,8 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1831
2268
  id: string;
1832
2269
  title: string;
1833
2270
  type: "source";
1834
- sourceType: "document";
1835
2271
  mediaType: string;
2272
+ sourceType: "document";
1836
2273
  })[];
1837
2274
  } | {
1838
2275
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1842,6 +2279,30 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1842
2279
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1843
2280
  args?: any;
1844
2281
  providerExecuted?: boolean | undefined;
2282
+ output?: {
2283
+ type: "text";
2284
+ value: string;
2285
+ } | {
2286
+ type: "json";
2287
+ value: any;
2288
+ } | {
2289
+ type: "error-text";
2290
+ value: string;
2291
+ } | {
2292
+ type: "error-json";
2293
+ value: any;
2294
+ } | {
2295
+ type: "content";
2296
+ value: ({
2297
+ type: "text";
2298
+ text: string;
2299
+ } | {
2300
+ type: "media";
2301
+ data: string;
2302
+ mediaType: string;
2303
+ })[];
2304
+ } | undefined;
2305
+ result?: any;
1845
2306
  isError?: boolean | undefined;
1846
2307
  experimental_content?: ({
1847
2308
  type: "text";
@@ -1854,7 +2315,6 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1854
2315
  type: "tool-result";
1855
2316
  toolCallId: string;
1856
2317
  toolName: string;
1857
- result: any;
1858
2318
  }[];
1859
2319
  } | {
1860
2320
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1886,8 +2346,8 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1886
2346
  id: string;
1887
2347
  title: string;
1888
2348
  type: "source";
1889
- sourceType: "document";
1890
2349
  mediaType: string;
2350
+ sourceType: "document";
1891
2351
  })[] | undefined;
1892
2352
  warnings?: ({
1893
2353
  details?: string | undefined;
@@ -2000,6 +2460,30 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
2000
2460
  providerMetadata?: Record<string, Record<string, any>> | undefined;
2001
2461
  args?: any;
2002
2462
  providerExecuted?: boolean | undefined;
2463
+ output?: {
2464
+ type: "text";
2465
+ value: string;
2466
+ } | {
2467
+ type: "json";
2468
+ value: any;
2469
+ } | {
2470
+ type: "error-text";
2471
+ value: string;
2472
+ } | {
2473
+ type: "error-json";
2474
+ value: any;
2475
+ } | {
2476
+ type: "content";
2477
+ value: ({
2478
+ type: "text";
2479
+ text: string;
2480
+ } | {
2481
+ type: "media";
2482
+ data: string;
2483
+ mediaType: string;
2484
+ })[];
2485
+ } | undefined;
2486
+ result?: any;
2003
2487
  isError?: boolean | undefined;
2004
2488
  experimental_content?: ({
2005
2489
  type: "text";
@@ -2012,7 +2496,6 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
2012
2496
  type: "tool-result";
2013
2497
  toolCallId: string;
2014
2498
  toolName: string;
2015
- result: any;
2016
2499
  } | {
2017
2500
  providerOptions?: Record<string, Record<string, any>> | undefined;
2018
2501
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -2028,8 +2511,8 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
2028
2511
  id: string;
2029
2512
  title: string;
2030
2513
  type: "source";
2031
- sourceType: "document";
2032
2514
  mediaType: string;
2515
+ sourceType: "document";
2033
2516
  })[];
2034
2517
  } | {
2035
2518
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -2039,6 +2522,30 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
2039
2522
  providerMetadata?: Record<string, Record<string, any>> | undefined;
2040
2523
  args?: any;
2041
2524
  providerExecuted?: boolean | undefined;
2525
+ output?: {
2526
+ type: "text";
2527
+ value: string;
2528
+ } | {
2529
+ type: "json";
2530
+ value: any;
2531
+ } | {
2532
+ type: "error-text";
2533
+ value: string;
2534
+ } | {
2535
+ type: "error-json";
2536
+ value: any;
2537
+ } | {
2538
+ type: "content";
2539
+ value: ({
2540
+ type: "text";
2541
+ text: string;
2542
+ } | {
2543
+ type: "media";
2544
+ data: string;
2545
+ mediaType: string;
2546
+ })[];
2547
+ } | undefined;
2548
+ result?: any;
2042
2549
  isError?: boolean | undefined;
2043
2550
  experimental_content?: ({
2044
2551
  type: "text";
@@ -2051,7 +2558,6 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
2051
2558
  type: "tool-result";
2052
2559
  toolCallId: string;
2053
2560
  toolName: string;
2054
- result: any;
2055
2561
  }[];
2056
2562
  } | {
2057
2563
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -2083,8 +2589,8 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
2083
2589
  id: string;
2084
2590
  title: string;
2085
2591
  type: "source";
2086
- sourceType: "document";
2087
2592
  mediaType: string;
2593
+ sourceType: "document";
2088
2594
  })[] | undefined;
2089
2595
  warnings?: ({
2090
2596
  details?: string | undefined;