@convex-dev/agent 0.2.2-alpha.4 → 0.2.3-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 (37) hide show
  1. package/dist/client/definePlaygroundAPI.d.ts +85 -8
  2. package/dist/client/definePlaygroundAPI.d.ts.map +1 -1
  3. package/dist/client/index.d.ts +84 -6
  4. package/dist/client/index.d.ts.map +1 -1
  5. package/dist/client/index.js +3 -1
  6. package/dist/client/index.js.map +1 -1
  7. package/dist/client/messages.d.ts +18 -3
  8. package/dist/client/messages.d.ts.map +1 -1
  9. package/dist/client/messages.js +7 -4
  10. package/dist/client/messages.js.map +1 -1
  11. package/dist/client/search.d.ts +17 -2
  12. package/dist/client/search.d.ts.map +1 -1
  13. package/dist/client/streaming.d.ts +195 -21
  14. package/dist/client/streaming.d.ts.map +1 -1
  15. package/dist/component/_generated/api.d.ts +112 -15
  16. package/dist/component/messages.d.ts +187 -21
  17. package/dist/component/messages.d.ts.map +1 -1
  18. package/dist/component/schema.d.ts +517 -55
  19. package/dist/component/schema.d.ts.map +1 -1
  20. package/dist/mapping.d.ts.map +1 -1
  21. package/dist/mapping.js +3 -4
  22. package/dist/mapping.js.map +1 -1
  23. package/dist/react/deltas.d.ts.map +1 -1
  24. package/dist/react/deltas.js +25 -4
  25. package/dist/react/deltas.js.map +1 -1
  26. package/dist/validators.d.ts +1257 -177
  27. package/dist/validators.d.ts.map +1 -1
  28. package/dist/validators.js +2 -3
  29. package/dist/validators.js.map +1 -1
  30. package/package.json +1 -1
  31. package/src/client/index.ts +20 -1
  32. package/src/client/messages.ts +12 -4
  33. package/src/component/_generated/api.d.ts +112 -15
  34. package/src/mapping.ts +8 -7
  35. package/src/react/deltas.ts +33 -8
  36. package/src/react/toUIMessages.test.ts +48 -4
  37. package/src/validators.ts +15 -15
@@ -198,7 +198,6 @@ export type Mounts = {
198
198
  | {
199
199
  providerOptions?: Record<string, Record<string, any>>;
200
200
  signature?: string;
201
- state?: "streaming" | "done";
202
201
  text: string;
203
202
  type: "reasoning";
204
203
  }
@@ -215,6 +214,20 @@ export type Mounts = {
215
214
  toolName: string;
216
215
  type: "tool-call";
217
216
  }
217
+ | {
218
+ args?: any;
219
+ experimental_content?: Array<
220
+ | { text: string; type: "text" }
221
+ | { data: string; mimeType?: string; type: "image" }
222
+ >;
223
+ isError?: boolean;
224
+ providerExecuted?: boolean;
225
+ providerOptions?: Record<string, Record<string, any>>;
226
+ result: any;
227
+ toolCallId: string;
228
+ toolName: string;
229
+ type: "tool-result";
230
+ }
218
231
  >;
219
232
  providerOptions?: Record<string, Record<string, any>>;
220
233
  role: "assistant";
@@ -250,7 +263,6 @@ export type Mounts = {
250
263
  | {
251
264
  providerOptions?: Record<string, Record<string, any>>;
252
265
  signature?: string;
253
- state?: "streaming" | "done";
254
266
  text: string;
255
267
  type: "reasoning";
256
268
  }
@@ -359,7 +371,6 @@ export type Mounts = {
359
371
  | {
360
372
  providerOptions?: Record<string, Record<string, any>>;
361
373
  signature?: string;
362
- state?: "streaming" | "done";
363
374
  text: string;
364
375
  type: "reasoning";
365
376
  }
@@ -376,6 +387,20 @@ export type Mounts = {
376
387
  toolName: string;
377
388
  type: "tool-call";
378
389
  }
390
+ | {
391
+ args?: any;
392
+ experimental_content?: Array<
393
+ | { text: string; type: "text" }
394
+ | { data: string; mimeType?: string; type: "image" }
395
+ >;
396
+ isError?: boolean;
397
+ providerExecuted?: boolean;
398
+ providerOptions?: Record<string, Record<string, any>>;
399
+ result: any;
400
+ toolCallId: string;
401
+ toolName: string;
402
+ type: "tool-result";
403
+ }
379
404
  >;
380
405
  providerOptions?: Record<string, Record<string, any>>;
381
406
  role: "assistant";
@@ -413,7 +438,6 @@ export type Mounts = {
413
438
  | {
414
439
  providerOptions?: Record<string, Record<string, any>>;
415
440
  signature?: string;
416
- state?: "streaming" | "done";
417
441
  text: string;
418
442
  type: "reasoning";
419
443
  }
@@ -553,7 +577,6 @@ export type Mounts = {
553
577
  | {
554
578
  providerOptions?: Record<string, Record<string, any>>;
555
579
  signature?: string;
556
- state?: "streaming" | "done";
557
580
  text: string;
558
581
  type: "reasoning";
559
582
  }
@@ -570,6 +593,20 @@ export type Mounts = {
570
593
  toolName: string;
571
594
  type: "tool-call";
572
595
  }
596
+ | {
597
+ args?: any;
598
+ experimental_content?: Array<
599
+ | { text: string; type: "text" }
600
+ | { data: string; mimeType?: string; type: "image" }
601
+ >;
602
+ isError?: boolean;
603
+ providerExecuted?: boolean;
604
+ providerOptions?: Record<string, Record<string, any>>;
605
+ result: any;
606
+ toolCallId: string;
607
+ toolName: string;
608
+ type: "tool-result";
609
+ }
573
610
  >;
574
611
  providerOptions?: Record<string, Record<string, any>>;
575
612
  role: "assistant";
@@ -607,7 +644,6 @@ export type Mounts = {
607
644
  | {
608
645
  providerOptions?: Record<string, Record<string, any>>;
609
646
  signature?: string;
610
- state?: "streaming" | "done";
611
647
  text: string;
612
648
  type: "reasoning";
613
649
  }
@@ -736,7 +772,6 @@ export type Mounts = {
736
772
  | {
737
773
  providerOptions?: Record<string, Record<string, any>>;
738
774
  signature?: string;
739
- state?: "streaming" | "done";
740
775
  text: string;
741
776
  type: "reasoning";
742
777
  }
@@ -753,6 +788,20 @@ export type Mounts = {
753
788
  toolName: string;
754
789
  type: "tool-call";
755
790
  }
791
+ | {
792
+ args?: any;
793
+ experimental_content?: Array<
794
+ | { text: string; type: "text" }
795
+ | { data: string; mimeType?: string; type: "image" }
796
+ >;
797
+ isError?: boolean;
798
+ providerExecuted?: boolean;
799
+ providerOptions?: Record<string, Record<string, any>>;
800
+ result: any;
801
+ toolCallId: string;
802
+ toolName: string;
803
+ type: "tool-result";
804
+ }
756
805
  >;
757
806
  providerOptions?: Record<string, Record<string, any>>;
758
807
  role: "assistant";
@@ -790,7 +839,6 @@ export type Mounts = {
790
839
  | {
791
840
  providerOptions?: Record<string, Record<string, any>>;
792
841
  signature?: string;
793
- state?: "streaming" | "done";
794
842
  text: string;
795
843
  type: "reasoning";
796
844
  }
@@ -915,7 +963,6 @@ export type Mounts = {
915
963
  | {
916
964
  providerOptions?: Record<string, Record<string, any>>;
917
965
  signature?: string;
918
- state?: "streaming" | "done";
919
966
  text: string;
920
967
  type: "reasoning";
921
968
  }
@@ -932,6 +979,20 @@ export type Mounts = {
932
979
  toolName: string;
933
980
  type: "tool-call";
934
981
  }
982
+ | {
983
+ args?: any;
984
+ experimental_content?: Array<
985
+ | { text: string; type: "text" }
986
+ | { data: string; mimeType?: string; type: "image" }
987
+ >;
988
+ isError?: boolean;
989
+ providerExecuted?: boolean;
990
+ providerOptions?: Record<string, Record<string, any>>;
991
+ result: any;
992
+ toolCallId: string;
993
+ toolName: string;
994
+ type: "tool-result";
995
+ }
935
996
  >;
936
997
  providerOptions?: Record<string, Record<string, any>>;
937
998
  role: "assistant";
@@ -969,7 +1030,6 @@ export type Mounts = {
969
1030
  | {
970
1031
  providerOptions?: Record<string, Record<string, any>>;
971
1032
  signature?: string;
972
- state?: "streaming" | "done";
973
1033
  text: string;
974
1034
  type: "reasoning";
975
1035
  }
@@ -1087,7 +1147,6 @@ export type Mounts = {
1087
1147
  | {
1088
1148
  providerOptions?: Record<string, Record<string, any>>;
1089
1149
  signature?: string;
1090
- state?: "streaming" | "done";
1091
1150
  text: string;
1092
1151
  type: "reasoning";
1093
1152
  }
@@ -1104,6 +1163,20 @@ export type Mounts = {
1104
1163
  toolName: string;
1105
1164
  type: "tool-call";
1106
1165
  }
1166
+ | {
1167
+ args?: any;
1168
+ experimental_content?: Array<
1169
+ | { text: string; type: "text" }
1170
+ | { data: string; mimeType?: string; type: "image" }
1171
+ >;
1172
+ isError?: boolean;
1173
+ providerExecuted?: boolean;
1174
+ providerOptions?: Record<string, Record<string, any>>;
1175
+ result: any;
1176
+ toolCallId: string;
1177
+ toolName: string;
1178
+ type: "tool-result";
1179
+ }
1107
1180
  >;
1108
1181
  providerOptions?: Record<string, Record<string, any>>;
1109
1182
  role: "assistant";
@@ -1141,7 +1214,6 @@ export type Mounts = {
1141
1214
  | {
1142
1215
  providerOptions?: Record<string, Record<string, any>>;
1143
1216
  signature?: string;
1144
- state?: "streaming" | "done";
1145
1217
  text: string;
1146
1218
  type: "reasoning";
1147
1219
  }
@@ -1249,7 +1321,6 @@ export type Mounts = {
1249
1321
  | {
1250
1322
  providerOptions?: Record<string, Record<string, any>>;
1251
1323
  signature?: string;
1252
- state?: "streaming" | "done";
1253
1324
  text: string;
1254
1325
  type: "reasoning";
1255
1326
  }
@@ -1266,6 +1337,20 @@ export type Mounts = {
1266
1337
  toolName: string;
1267
1338
  type: "tool-call";
1268
1339
  }
1340
+ | {
1341
+ args?: any;
1342
+ experimental_content?: Array<
1343
+ | { text: string; type: "text" }
1344
+ | { data: string; mimeType?: string; type: "image" }
1345
+ >;
1346
+ isError?: boolean;
1347
+ providerExecuted?: boolean;
1348
+ providerOptions?: Record<string, Record<string, any>>;
1349
+ result: any;
1350
+ toolCallId: string;
1351
+ toolName: string;
1352
+ type: "tool-result";
1353
+ }
1269
1354
  >;
1270
1355
  providerOptions?: Record<string, Record<string, any>>;
1271
1356
  role: "assistant";
@@ -1361,7 +1446,6 @@ export type Mounts = {
1361
1446
  | {
1362
1447
  providerOptions?: Record<string, Record<string, any>>;
1363
1448
  signature?: string;
1364
- state?: "streaming" | "done";
1365
1449
  text: string;
1366
1450
  type: "reasoning";
1367
1451
  }
@@ -1378,6 +1462,20 @@ export type Mounts = {
1378
1462
  toolName: string;
1379
1463
  type: "tool-call";
1380
1464
  }
1465
+ | {
1466
+ args?: any;
1467
+ experimental_content?: Array<
1468
+ | { text: string; type: "text" }
1469
+ | { data: string; mimeType?: string; type: "image" }
1470
+ >;
1471
+ isError?: boolean;
1472
+ providerExecuted?: boolean;
1473
+ providerOptions?: Record<string, Record<string, any>>;
1474
+ result: any;
1475
+ toolCallId: string;
1476
+ toolName: string;
1477
+ type: "tool-result";
1478
+ }
1381
1479
  >;
1382
1480
  providerOptions?: Record<string, Record<string, any>>;
1383
1481
  role: "assistant";
@@ -1415,7 +1513,6 @@ export type Mounts = {
1415
1513
  | {
1416
1514
  providerOptions?: Record<string, Record<string, any>>;
1417
1515
  signature?: string;
1418
- state?: "streaming" | "done";
1419
1516
  text: string;
1420
1517
  type: "reasoning";
1421
1518
  }