@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.
- package/dist/client/definePlaygroundAPI.d.ts +248 -18
- package/dist/client/definePlaygroundAPI.d.ts.map +1 -1
- package/dist/client/index.d.ts +211 -33
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +56 -52
- package/dist/client/index.js.map +1 -1
- package/dist/client/messages.d.ts +50 -4
- package/dist/client/messages.d.ts.map +1 -1
- package/dist/client/mockModel.d.ts +30 -0
- package/dist/client/mockModel.d.ts.map +1 -0
- package/dist/client/mockModel.js +153 -0
- package/dist/client/mockModel.js.map +1 -0
- package/dist/client/search.d.ts +50 -4
- package/dist/client/search.d.ts.map +1 -1
- package/dist/client/streaming.d.ts +603 -46
- package/dist/client/streaming.d.ts.map +1 -1
- package/dist/client/streaming.js +30 -35
- package/dist/client/streaming.js.map +1 -1
- package/dist/client/textStreamParts.d.ts +5 -0
- package/dist/client/textStreamParts.d.ts.map +1 -0
- package/dist/{parts.js → client/textStreamParts.js} +18 -1
- package/dist/client/textStreamParts.js.map +1 -0
- package/dist/component/_generated/api.d.ts +240 -16
- package/dist/component/messages.d.ts +549 -43
- package/dist/component/messages.d.ts.map +1 -1
- package/dist/component/messages.js +1 -1
- package/dist/component/messages.js.map +1 -1
- package/dist/component/schema.d.ts +1546 -98
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/mapping.d.ts.map +1 -1
- package/dist/mapping.js +30 -18
- package/dist/mapping.js.map +1 -1
- package/dist/react/useSmoothText.d.ts +1 -1
- package/dist/react/useSmoothText.d.ts.map +1 -1
- package/dist/react/useSmoothText.js +30 -22
- package/dist/react/useSmoothText.js.map +1 -1
- package/dist/validators.d.ts +3740 -201
- package/dist/validators.d.ts.map +1 -1
- package/dist/validators.js +10 -1
- package/dist/validators.js.map +1 -1
- package/package.json +1 -1
- package/src/client/index.ts +90 -82
- package/src/client/mockModel.ts +195 -0
- package/src/client/streaming.ts +46 -54
- package/src/{parts.ts → client/textStreamParts.ts} +33 -1
- package/src/component/_generated/api.d.ts +240 -16
- package/src/component/messages.ts +1 -1
- package/src/mapping.test.ts +50 -1
- package/src/mapping.ts +42 -17
- package/src/react/toUIMessages.test.ts +16 -4
- package/src/react/useSmoothText.ts +40 -31
- package/src/validators.ts +23 -1
- package/dist/parts.d.ts +0 -3
- package/dist/parts.d.ts.map +0 -1
- package/dist/parts.js.map +0 -1
|
@@ -249,13 +249,29 @@ export type Mounts = {
|
|
|
249
249
|
| { data: string; mimeType?: string; type: "image" }
|
|
250
250
|
>;
|
|
251
251
|
isError?: boolean;
|
|
252
|
+
output?:
|
|
253
|
+
| { type: "text"; value: string }
|
|
254
|
+
| { type: "json"; value: any }
|
|
255
|
+
| { type: "error-text"; value: string }
|
|
256
|
+
| { type: "error-json"; value: any }
|
|
257
|
+
| {
|
|
258
|
+
type: "content";
|
|
259
|
+
value: Array<
|
|
260
|
+
| { text: string; type: "text" }
|
|
261
|
+
| {
|
|
262
|
+
data: string;
|
|
263
|
+
mediaType: string;
|
|
264
|
+
type: "media";
|
|
265
|
+
}
|
|
266
|
+
>;
|
|
267
|
+
};
|
|
252
268
|
providerExecuted?: boolean;
|
|
253
269
|
providerMetadata?: Record<
|
|
254
270
|
string,
|
|
255
271
|
Record<string, any>
|
|
256
272
|
>;
|
|
257
273
|
providerOptions?: Record<string, Record<string, any>>;
|
|
258
|
-
result
|
|
274
|
+
result?: any;
|
|
259
275
|
toolCallId: string;
|
|
260
276
|
toolName: string;
|
|
261
277
|
type: "tool-result";
|
|
@@ -297,10 +313,22 @@ export type Mounts = {
|
|
|
297
313
|
| { data: string; mimeType?: string; type: "image" }
|
|
298
314
|
>;
|
|
299
315
|
isError?: boolean;
|
|
316
|
+
output?:
|
|
317
|
+
| { type: "text"; value: string }
|
|
318
|
+
| { type: "json"; value: any }
|
|
319
|
+
| { type: "error-text"; value: string }
|
|
320
|
+
| { type: "error-json"; value: any }
|
|
321
|
+
| {
|
|
322
|
+
type: "content";
|
|
323
|
+
value: Array<
|
|
324
|
+
| { text: string; type: "text" }
|
|
325
|
+
| { data: string; mediaType: string; type: "media" }
|
|
326
|
+
>;
|
|
327
|
+
};
|
|
300
328
|
providerExecuted?: boolean;
|
|
301
329
|
providerMetadata?: Record<string, Record<string, any>>;
|
|
302
330
|
providerOptions?: Record<string, Record<string, any>>;
|
|
303
|
-
result
|
|
331
|
+
result?: any;
|
|
304
332
|
toolCallId: string;
|
|
305
333
|
toolName: string;
|
|
306
334
|
type: "tool-result";
|
|
@@ -483,13 +511,29 @@ export type Mounts = {
|
|
|
483
511
|
| { data: string; mimeType?: string; type: "image" }
|
|
484
512
|
>;
|
|
485
513
|
isError?: boolean;
|
|
514
|
+
output?:
|
|
515
|
+
| { type: "text"; value: string }
|
|
516
|
+
| { type: "json"; value: any }
|
|
517
|
+
| { type: "error-text"; value: string }
|
|
518
|
+
| { type: "error-json"; value: any }
|
|
519
|
+
| {
|
|
520
|
+
type: "content";
|
|
521
|
+
value: Array<
|
|
522
|
+
| { text: string; type: "text" }
|
|
523
|
+
| {
|
|
524
|
+
data: string;
|
|
525
|
+
mediaType: string;
|
|
526
|
+
type: "media";
|
|
527
|
+
}
|
|
528
|
+
>;
|
|
529
|
+
};
|
|
486
530
|
providerExecuted?: boolean;
|
|
487
531
|
providerMetadata?: Record<
|
|
488
532
|
string,
|
|
489
533
|
Record<string, any>
|
|
490
534
|
>;
|
|
491
535
|
providerOptions?: Record<string, Record<string, any>>;
|
|
492
|
-
result
|
|
536
|
+
result?: any;
|
|
493
537
|
toolCallId: string;
|
|
494
538
|
toolName: string;
|
|
495
539
|
type: "tool-result";
|
|
@@ -531,10 +575,22 @@ export type Mounts = {
|
|
|
531
575
|
| { data: string; mimeType?: string; type: "image" }
|
|
532
576
|
>;
|
|
533
577
|
isError?: boolean;
|
|
578
|
+
output?:
|
|
579
|
+
| { type: "text"; value: string }
|
|
580
|
+
| { type: "json"; value: any }
|
|
581
|
+
| { type: "error-text"; value: string }
|
|
582
|
+
| { type: "error-json"; value: any }
|
|
583
|
+
| {
|
|
584
|
+
type: "content";
|
|
585
|
+
value: Array<
|
|
586
|
+
| { text: string; type: "text" }
|
|
587
|
+
| { data: string; mediaType: string; type: "media" }
|
|
588
|
+
>;
|
|
589
|
+
};
|
|
534
590
|
providerExecuted?: boolean;
|
|
535
591
|
providerMetadata?: Record<string, Record<string, any>>;
|
|
536
592
|
providerOptions?: Record<string, Record<string, any>>;
|
|
537
|
-
result
|
|
593
|
+
result?: any;
|
|
538
594
|
toolCallId: string;
|
|
539
595
|
toolName: string;
|
|
540
596
|
type: "tool-result";
|
|
@@ -729,10 +785,26 @@ export type Mounts = {
|
|
|
729
785
|
| { data: string; mimeType?: string; type: "image" }
|
|
730
786
|
>;
|
|
731
787
|
isError?: boolean;
|
|
788
|
+
output?:
|
|
789
|
+
| { type: "text"; value: string }
|
|
790
|
+
| { type: "json"; value: any }
|
|
791
|
+
| { type: "error-text"; value: string }
|
|
792
|
+
| { type: "error-json"; value: any }
|
|
793
|
+
| {
|
|
794
|
+
type: "content";
|
|
795
|
+
value: Array<
|
|
796
|
+
| { text: string; type: "text" }
|
|
797
|
+
| {
|
|
798
|
+
data: string;
|
|
799
|
+
mediaType: string;
|
|
800
|
+
type: "media";
|
|
801
|
+
}
|
|
802
|
+
>;
|
|
803
|
+
};
|
|
732
804
|
providerExecuted?: boolean;
|
|
733
805
|
providerMetadata?: Record<string, Record<string, any>>;
|
|
734
806
|
providerOptions?: Record<string, Record<string, any>>;
|
|
735
|
-
result
|
|
807
|
+
result?: any;
|
|
736
808
|
toolCallId: string;
|
|
737
809
|
toolName: string;
|
|
738
810
|
type: "tool-result";
|
|
@@ -768,10 +840,22 @@ export type Mounts = {
|
|
|
768
840
|
| { data: string; mimeType?: string; type: "image" }
|
|
769
841
|
>;
|
|
770
842
|
isError?: boolean;
|
|
843
|
+
output?:
|
|
844
|
+
| { type: "text"; value: string }
|
|
845
|
+
| { type: "json"; value: any }
|
|
846
|
+
| { type: "error-text"; value: string }
|
|
847
|
+
| { type: "error-json"; value: any }
|
|
848
|
+
| {
|
|
849
|
+
type: "content";
|
|
850
|
+
value: Array<
|
|
851
|
+
| { text: string; type: "text" }
|
|
852
|
+
| { data: string; mediaType: string; type: "media" }
|
|
853
|
+
>;
|
|
854
|
+
};
|
|
771
855
|
providerExecuted?: boolean;
|
|
772
856
|
providerMetadata?: Record<string, Record<string, any>>;
|
|
773
857
|
providerOptions?: Record<string, Record<string, any>>;
|
|
774
|
-
result
|
|
858
|
+
result?: any;
|
|
775
859
|
toolCallId: string;
|
|
776
860
|
toolName: string;
|
|
777
861
|
type: "tool-result";
|
|
@@ -976,13 +1060,29 @@ export type Mounts = {
|
|
|
976
1060
|
| { data: string; mimeType?: string; type: "image" }
|
|
977
1061
|
>;
|
|
978
1062
|
isError?: boolean;
|
|
1063
|
+
output?:
|
|
1064
|
+
| { type: "text"; value: string }
|
|
1065
|
+
| { type: "json"; value: any }
|
|
1066
|
+
| { type: "error-text"; value: string }
|
|
1067
|
+
| { type: "error-json"; value: any }
|
|
1068
|
+
| {
|
|
1069
|
+
type: "content";
|
|
1070
|
+
value: Array<
|
|
1071
|
+
| { text: string; type: "text" }
|
|
1072
|
+
| {
|
|
1073
|
+
data: string;
|
|
1074
|
+
mediaType: string;
|
|
1075
|
+
type: "media";
|
|
1076
|
+
}
|
|
1077
|
+
>;
|
|
1078
|
+
};
|
|
979
1079
|
providerExecuted?: boolean;
|
|
980
1080
|
providerMetadata?: Record<
|
|
981
1081
|
string,
|
|
982
1082
|
Record<string, any>
|
|
983
1083
|
>;
|
|
984
1084
|
providerOptions?: Record<string, Record<string, any>>;
|
|
985
|
-
result
|
|
1085
|
+
result?: any;
|
|
986
1086
|
toolCallId: string;
|
|
987
1087
|
toolName: string;
|
|
988
1088
|
type: "tool-result";
|
|
@@ -1024,10 +1124,22 @@ export type Mounts = {
|
|
|
1024
1124
|
| { data: string; mimeType?: string; type: "image" }
|
|
1025
1125
|
>;
|
|
1026
1126
|
isError?: boolean;
|
|
1127
|
+
output?:
|
|
1128
|
+
| { type: "text"; value: string }
|
|
1129
|
+
| { type: "json"; value: any }
|
|
1130
|
+
| { type: "error-text"; value: string }
|
|
1131
|
+
| { type: "error-json"; value: any }
|
|
1132
|
+
| {
|
|
1133
|
+
type: "content";
|
|
1134
|
+
value: Array<
|
|
1135
|
+
| { text: string; type: "text" }
|
|
1136
|
+
| { data: string; mediaType: string; type: "media" }
|
|
1137
|
+
>;
|
|
1138
|
+
};
|
|
1027
1139
|
providerExecuted?: boolean;
|
|
1028
1140
|
providerMetadata?: Record<string, Record<string, any>>;
|
|
1029
1141
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1030
|
-
result
|
|
1142
|
+
result?: any;
|
|
1031
1143
|
toolCallId: string;
|
|
1032
1144
|
toolName: string;
|
|
1033
1145
|
type: "tool-result";
|
|
@@ -1207,10 +1319,26 @@ export type Mounts = {
|
|
|
1207
1319
|
| { data: string; mimeType?: string; type: "image" }
|
|
1208
1320
|
>;
|
|
1209
1321
|
isError?: boolean;
|
|
1322
|
+
output?:
|
|
1323
|
+
| { type: "text"; value: string }
|
|
1324
|
+
| { type: "json"; value: any }
|
|
1325
|
+
| { type: "error-text"; value: string }
|
|
1326
|
+
| { type: "error-json"; value: any }
|
|
1327
|
+
| {
|
|
1328
|
+
type: "content";
|
|
1329
|
+
value: Array<
|
|
1330
|
+
| { text: string; type: "text" }
|
|
1331
|
+
| {
|
|
1332
|
+
data: string;
|
|
1333
|
+
mediaType: string;
|
|
1334
|
+
type: "media";
|
|
1335
|
+
}
|
|
1336
|
+
>;
|
|
1337
|
+
};
|
|
1210
1338
|
providerExecuted?: boolean;
|
|
1211
1339
|
providerMetadata?: Record<string, Record<string, any>>;
|
|
1212
1340
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1213
|
-
result
|
|
1341
|
+
result?: any;
|
|
1214
1342
|
toolCallId: string;
|
|
1215
1343
|
toolName: string;
|
|
1216
1344
|
type: "tool-result";
|
|
@@ -1246,10 +1374,22 @@ export type Mounts = {
|
|
|
1246
1374
|
| { data: string; mimeType?: string; type: "image" }
|
|
1247
1375
|
>;
|
|
1248
1376
|
isError?: boolean;
|
|
1377
|
+
output?:
|
|
1378
|
+
| { type: "text"; value: string }
|
|
1379
|
+
| { type: "json"; value: any }
|
|
1380
|
+
| { type: "error-text"; value: string }
|
|
1381
|
+
| { type: "error-json"; value: any }
|
|
1382
|
+
| {
|
|
1383
|
+
type: "content";
|
|
1384
|
+
value: Array<
|
|
1385
|
+
| { text: string; type: "text" }
|
|
1386
|
+
| { data: string; mediaType: string; type: "media" }
|
|
1387
|
+
>;
|
|
1388
|
+
};
|
|
1249
1389
|
providerExecuted?: boolean;
|
|
1250
1390
|
providerMetadata?: Record<string, Record<string, any>>;
|
|
1251
1391
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1252
|
-
result
|
|
1392
|
+
result?: any;
|
|
1253
1393
|
toolCallId: string;
|
|
1254
1394
|
toolName: string;
|
|
1255
1395
|
type: "tool-result";
|
|
@@ -1422,10 +1562,26 @@ export type Mounts = {
|
|
|
1422
1562
|
| { data: string; mimeType?: string; type: "image" }
|
|
1423
1563
|
>;
|
|
1424
1564
|
isError?: boolean;
|
|
1565
|
+
output?:
|
|
1566
|
+
| { type: "text"; value: string }
|
|
1567
|
+
| { type: "json"; value: any }
|
|
1568
|
+
| { type: "error-text"; value: string }
|
|
1569
|
+
| { type: "error-json"; value: any }
|
|
1570
|
+
| {
|
|
1571
|
+
type: "content";
|
|
1572
|
+
value: Array<
|
|
1573
|
+
| { text: string; type: "text" }
|
|
1574
|
+
| {
|
|
1575
|
+
data: string;
|
|
1576
|
+
mediaType: string;
|
|
1577
|
+
type: "media";
|
|
1578
|
+
}
|
|
1579
|
+
>;
|
|
1580
|
+
};
|
|
1425
1581
|
providerExecuted?: boolean;
|
|
1426
1582
|
providerMetadata?: Record<string, Record<string, any>>;
|
|
1427
1583
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1428
|
-
result
|
|
1584
|
+
result?: any;
|
|
1429
1585
|
toolCallId: string;
|
|
1430
1586
|
toolName: string;
|
|
1431
1587
|
type: "tool-result";
|
|
@@ -1461,10 +1617,22 @@ export type Mounts = {
|
|
|
1461
1617
|
| { data: string; mimeType?: string; type: "image" }
|
|
1462
1618
|
>;
|
|
1463
1619
|
isError?: boolean;
|
|
1620
|
+
output?:
|
|
1621
|
+
| { type: "text"; value: string }
|
|
1622
|
+
| { type: "json"; value: any }
|
|
1623
|
+
| { type: "error-text"; value: string }
|
|
1624
|
+
| { type: "error-json"; value: any }
|
|
1625
|
+
| {
|
|
1626
|
+
type: "content";
|
|
1627
|
+
value: Array<
|
|
1628
|
+
| { text: string; type: "text" }
|
|
1629
|
+
| { data: string; mediaType: string; type: "media" }
|
|
1630
|
+
>;
|
|
1631
|
+
};
|
|
1464
1632
|
providerExecuted?: boolean;
|
|
1465
1633
|
providerMetadata?: Record<string, Record<string, any>>;
|
|
1466
1634
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1467
|
-
result
|
|
1635
|
+
result?: any;
|
|
1468
1636
|
toolCallId: string;
|
|
1469
1637
|
toolName: string;
|
|
1470
1638
|
type: "tool-result";
|
|
@@ -1648,13 +1816,29 @@ export type Mounts = {
|
|
|
1648
1816
|
| { data: string; mimeType?: string; type: "image" }
|
|
1649
1817
|
>;
|
|
1650
1818
|
isError?: boolean;
|
|
1819
|
+
output?:
|
|
1820
|
+
| { type: "text"; value: string }
|
|
1821
|
+
| { type: "json"; value: any }
|
|
1822
|
+
| { type: "error-text"; value: string }
|
|
1823
|
+
| { type: "error-json"; value: any }
|
|
1824
|
+
| {
|
|
1825
|
+
type: "content";
|
|
1826
|
+
value: Array<
|
|
1827
|
+
| { text: string; type: "text" }
|
|
1828
|
+
| {
|
|
1829
|
+
data: string;
|
|
1830
|
+
mediaType: string;
|
|
1831
|
+
type: "media";
|
|
1832
|
+
}
|
|
1833
|
+
>;
|
|
1834
|
+
};
|
|
1651
1835
|
providerExecuted?: boolean;
|
|
1652
1836
|
providerMetadata?: Record<
|
|
1653
1837
|
string,
|
|
1654
1838
|
Record<string, any>
|
|
1655
1839
|
>;
|
|
1656
1840
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1657
|
-
result
|
|
1841
|
+
result?: any;
|
|
1658
1842
|
toolCallId: string;
|
|
1659
1843
|
toolName: string;
|
|
1660
1844
|
type: "tool-result";
|
|
@@ -1696,10 +1880,22 @@ export type Mounts = {
|
|
|
1696
1880
|
| { data: string; mimeType?: string; type: "image" }
|
|
1697
1881
|
>;
|
|
1698
1882
|
isError?: boolean;
|
|
1883
|
+
output?:
|
|
1884
|
+
| { type: "text"; value: string }
|
|
1885
|
+
| { type: "json"; value: any }
|
|
1886
|
+
| { type: "error-text"; value: string }
|
|
1887
|
+
| { type: "error-json"; value: any }
|
|
1888
|
+
| {
|
|
1889
|
+
type: "content";
|
|
1890
|
+
value: Array<
|
|
1891
|
+
| { text: string; type: "text" }
|
|
1892
|
+
| { data: string; mediaType: string; type: "media" }
|
|
1893
|
+
>;
|
|
1894
|
+
};
|
|
1699
1895
|
providerExecuted?: boolean;
|
|
1700
1896
|
providerMetadata?: Record<string, Record<string, any>>;
|
|
1701
1897
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1702
|
-
result
|
|
1898
|
+
result?: any;
|
|
1703
1899
|
toolCallId: string;
|
|
1704
1900
|
toolName: string;
|
|
1705
1901
|
type: "tool-result";
|
|
@@ -1810,10 +2006,26 @@ export type Mounts = {
|
|
|
1810
2006
|
| { data: string; mimeType?: string; type: "image" }
|
|
1811
2007
|
>;
|
|
1812
2008
|
isError?: boolean;
|
|
2009
|
+
output?:
|
|
2010
|
+
| { type: "text"; value: string }
|
|
2011
|
+
| { type: "json"; value: any }
|
|
2012
|
+
| { type: "error-text"; value: string }
|
|
2013
|
+
| { type: "error-json"; value: any }
|
|
2014
|
+
| {
|
|
2015
|
+
type: "content";
|
|
2016
|
+
value: Array<
|
|
2017
|
+
| { text: string; type: "text" }
|
|
2018
|
+
| {
|
|
2019
|
+
data: string;
|
|
2020
|
+
mediaType: string;
|
|
2021
|
+
type: "media";
|
|
2022
|
+
}
|
|
2023
|
+
>;
|
|
2024
|
+
};
|
|
1813
2025
|
providerExecuted?: boolean;
|
|
1814
2026
|
providerMetadata?: Record<string, Record<string, any>>;
|
|
1815
2027
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1816
|
-
result
|
|
2028
|
+
result?: any;
|
|
1817
2029
|
toolCallId: string;
|
|
1818
2030
|
toolName: string;
|
|
1819
2031
|
type: "tool-result";
|
|
@@ -1849,10 +2061,22 @@ export type Mounts = {
|
|
|
1849
2061
|
| { data: string; mimeType?: string; type: "image" }
|
|
1850
2062
|
>;
|
|
1851
2063
|
isError?: boolean;
|
|
2064
|
+
output?:
|
|
2065
|
+
| { type: "text"; value: string }
|
|
2066
|
+
| { type: "json"; value: any }
|
|
2067
|
+
| { type: "error-text"; value: string }
|
|
2068
|
+
| { type: "error-json"; value: any }
|
|
2069
|
+
| {
|
|
2070
|
+
type: "content";
|
|
2071
|
+
value: Array<
|
|
2072
|
+
| { text: string; type: "text" }
|
|
2073
|
+
| { data: string; mediaType: string; type: "media" }
|
|
2074
|
+
>;
|
|
2075
|
+
};
|
|
1852
2076
|
providerExecuted?: boolean;
|
|
1853
2077
|
providerMetadata?: Record<string, Record<string, any>>;
|
|
1854
2078
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1855
|
-
result
|
|
2079
|
+
result?: any;
|
|
1856
2080
|
toolCallId: string;
|
|
1857
2081
|
toolName: string;
|
|
1858
2082
|
type: "tool-result";
|