@illalabs/interfaces 0.3.0-canary.f3dad1f7 → 0.3.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 (52) hide show
  1. package/dist/schemas/chatContext.d.ts +3 -0
  2. package/dist/schemas/chatContext.d.ts.map +1 -1
  3. package/dist/schemas/chatRequestBody.d.ts +12 -0
  4. package/dist/schemas/chatRequestBody.d.ts.map +1 -1
  5. package/dist/schemas/messages.d.ts +473 -0
  6. package/dist/schemas/messages.d.ts.map +1 -1
  7. package/dist/schemas/messages.js +64 -0
  8. package/dist/schemas/messages.js.map +1 -1
  9. package/dist/schemas/modelContext.d.ts +3 -3
  10. package/dist/schemas/telemetryEvents.d.ts +1302 -44
  11. package/dist/schemas/telemetryEvents.d.ts.map +1 -1
  12. package/dist/schemas/telemetryEvents.js +4 -18
  13. package/dist/schemas/telemetryEvents.js.map +1 -1
  14. package/dist/schemas/userContext.d.ts +3 -0
  15. package/dist/schemas/userContext.d.ts.map +1 -1
  16. package/dist/schemas/userContext.js +4 -0
  17. package/dist/schemas/userContext.js.map +1 -1
  18. package/dist/tools/IllaToolError.d.ts +6 -2
  19. package/dist/tools/IllaToolError.d.ts.map +1 -1
  20. package/dist/tools/IllaToolError.js +6 -2
  21. package/dist/tools/IllaToolError.js.map +1 -1
  22. package/dist/tools/IllaToolOutcome.js +1 -1
  23. package/dist/tools/IllaToolOutcome.js.map +1 -1
  24. package/dist/types/actions/inputs.d.ts +6 -2
  25. package/dist/types/actions/inputs.d.ts.map +1 -1
  26. package/dist/types/actions/outputs.d.ts +19 -1
  27. package/dist/types/actions/outputs.d.ts.map +1 -1
  28. package/dist/types/actions/tools/getWalletBalanceAction.d.ts +3 -1
  29. package/dist/types/actions/tools/getWalletBalanceAction.d.ts.map +1 -1
  30. package/dist/types/actions/tools/index.d.ts +12 -0
  31. package/dist/types/actions/tools/index.d.ts.map +1 -1
  32. package/dist/types/actions/tools/polymarketPostOrderAction.d.ts +81 -0
  33. package/dist/types/actions/tools/polymarketPostOrderAction.d.ts.map +1 -0
  34. package/dist/types/actions/tools/polymarketPostOrderAction.js +2 -0
  35. package/dist/types/actions/tools/polymarketPostOrderAction.js.map +1 -0
  36. package/dist/types/actions/tools/predictionMarketsBetAction.d.ts +19 -0
  37. package/dist/types/actions/tools/predictionMarketsBetAction.d.ts.map +1 -0
  38. package/dist/types/actions/tools/predictionMarketsBetAction.js +2 -0
  39. package/dist/types/actions/tools/predictionMarketsBetAction.js.map +1 -0
  40. package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts +21 -0
  41. package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts.map +1 -0
  42. package/dist/types/actions/tools/predictionMarketsFetchAction.js +2 -0
  43. package/dist/types/actions/tools/predictionMarketsFetchAction.js.map +1 -0
  44. package/dist/types/actions/tools/predictionMarketsPositionsAction.d.ts +25 -0
  45. package/dist/types/actions/tools/predictionMarketsPositionsAction.d.ts.map +1 -0
  46. package/dist/types/actions/tools/predictionMarketsPositionsAction.js +2 -0
  47. package/dist/types/actions/tools/predictionMarketsPositionsAction.js.map +1 -0
  48. package/dist/utils/constants.d.ts +5 -3
  49. package/dist/utils/constants.d.ts.map +1 -1
  50. package/dist/utils/constants.js +11 -1
  51. package/dist/utils/constants.js.map +1 -1
  52. package/package.json +1 -1
@@ -890,17 +890,464 @@ export declare const resultEventDataSchema: z.ZodObject<{
890
890
  messages: z.ZodArray<z.ZodType<ModelMessage, z.ZodTypeDef, ModelMessage>, "many">;
891
891
  text: z.ZodString;
892
892
  pendingTools: z.ZodOptional<z.ZodArray<z.ZodObject<{
893
+ type: z.ZodLiteral<"tool-call">;
893
894
  toolCallId: z.ZodString;
894
895
  toolName: z.ZodString;
895
- toolInput: z.ZodUnknown;
896
- }, "strip", z.ZodTypeAny, {
896
+ input: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
897
+ type: z.ZodLiteral<"BatchTransactions">;
898
+ value: z.ZodArray<z.ZodObject<{
899
+ transaction: z.ZodType<import("viem").PrepareTransactionRequestReturnType>;
900
+ metadata: z.ZodOptional<z.ZodObject<{
901
+ explorerUrl: z.ZodOptional<z.ZodString>;
902
+ usdValue: z.ZodOptional<z.ZodString>;
903
+ }, "strip", z.ZodTypeAny, {
904
+ explorerUrl?: string | undefined;
905
+ usdValue?: string | undefined;
906
+ }, {
907
+ explorerUrl?: string | undefined;
908
+ usdValue?: string | undefined;
909
+ }>>;
910
+ }, "strip", z.ZodTypeAny, {
911
+ transaction: import("viem").PrepareTransactionRequestReturnType;
912
+ metadata?: {
913
+ explorerUrl?: string | undefined;
914
+ usdValue?: string | undefined;
915
+ } | undefined;
916
+ }, {
917
+ transaction: import("viem").PrepareTransactionRequestReturnType;
918
+ metadata?: {
919
+ explorerUrl?: string | undefined;
920
+ usdValue?: string | undefined;
921
+ } | undefined;
922
+ }>, "many">;
923
+ }, "strip", z.ZodTypeAny, {
924
+ value: {
925
+ transaction: import("viem").PrepareTransactionRequestReturnType;
926
+ metadata?: {
927
+ explorerUrl?: string | undefined;
928
+ usdValue?: string | undefined;
929
+ } | undefined;
930
+ }[];
931
+ type: "BatchTransactions";
932
+ }, {
933
+ value: {
934
+ transaction: import("viem").PrepareTransactionRequestReturnType;
935
+ metadata?: {
936
+ explorerUrl?: string | undefined;
937
+ usdValue?: string | undefined;
938
+ } | undefined;
939
+ }[];
940
+ type: "BatchTransactions";
941
+ }>, z.ZodObject<{
942
+ type: z.ZodLiteral<"SingleTransaction">;
943
+ value: z.ZodObject<{
944
+ transaction: z.ZodType<import("viem").PrepareTransactionRequestReturnType>;
945
+ metadata: z.ZodOptional<z.ZodObject<{
946
+ explorerUrl: z.ZodOptional<z.ZodString>;
947
+ usdValue: z.ZodOptional<z.ZodString>;
948
+ }, "strip", z.ZodTypeAny, {
949
+ explorerUrl?: string | undefined;
950
+ usdValue?: string | undefined;
951
+ }, {
952
+ explorerUrl?: string | undefined;
953
+ usdValue?: string | undefined;
954
+ }>>;
955
+ }, "strip", z.ZodTypeAny, {
956
+ transaction: import("viem").PrepareTransactionRequestReturnType;
957
+ metadata?: {
958
+ explorerUrl?: string | undefined;
959
+ usdValue?: string | undefined;
960
+ } | undefined;
961
+ }, {
962
+ transaction: import("viem").PrepareTransactionRequestReturnType;
963
+ metadata?: {
964
+ explorerUrl?: string | undefined;
965
+ usdValue?: string | undefined;
966
+ } | undefined;
967
+ }>;
968
+ }, "strip", z.ZodTypeAny, {
969
+ value: {
970
+ transaction: import("viem").PrepareTransactionRequestReturnType;
971
+ metadata?: {
972
+ explorerUrl?: string | undefined;
973
+ usdValue?: string | undefined;
974
+ } | undefined;
975
+ };
976
+ type: "SingleTransaction";
977
+ }, {
978
+ value: {
979
+ transaction: import("viem").PrepareTransactionRequestReturnType;
980
+ metadata?: {
981
+ explorerUrl?: string | undefined;
982
+ usdValue?: string | undefined;
983
+ } | undefined;
984
+ };
985
+ type: "SingleTransaction";
986
+ }>, z.ZodObject<{
987
+ type: z.ZodLiteral<"SignatureRequests">;
988
+ value: z.ZodObject<{
989
+ signatureRequests: z.ZodArray<z.ZodDiscriminatedUnion<"signMethod", [z.ZodObject<{
990
+ id: z.ZodString;
991
+ signerAddress: z.ZodString;
992
+ description: z.ZodOptional<z.ZodString>;
993
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
994
+ } & {
995
+ signMethod: z.ZodLiteral<"typedData">;
996
+ typedData: z.ZodObject<{
997
+ types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
998
+ name: z.ZodString;
999
+ type: z.ZodString;
1000
+ }, "strip", z.ZodTypeAny, {
1001
+ type: string;
1002
+ name: string;
1003
+ }, {
1004
+ type: string;
1005
+ name: string;
1006
+ }>, "many">>;
1007
+ domain: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1008
+ message: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1009
+ primaryType: z.ZodString;
1010
+ }, "strip", z.ZodTypeAny, {
1011
+ message: Record<string, unknown>;
1012
+ types: Record<string, {
1013
+ type: string;
1014
+ name: string;
1015
+ }[]>;
1016
+ domain: Record<string, unknown>;
1017
+ primaryType: string;
1018
+ }, {
1019
+ message: Record<string, unknown>;
1020
+ types: Record<string, {
1021
+ type: string;
1022
+ name: string;
1023
+ }[]>;
1024
+ domain: Record<string, unknown>;
1025
+ primaryType: string;
1026
+ }>;
1027
+ }, "strip", z.ZodTypeAny, {
1028
+ id: string;
1029
+ signerAddress: string;
1030
+ signMethod: "typedData";
1031
+ typedData: {
1032
+ message: Record<string, unknown>;
1033
+ types: Record<string, {
1034
+ type: string;
1035
+ name: string;
1036
+ }[]>;
1037
+ domain: Record<string, unknown>;
1038
+ primaryType: string;
1039
+ };
1040
+ description?: string | undefined;
1041
+ metadata?: Record<string, unknown> | undefined;
1042
+ }, {
1043
+ id: string;
1044
+ signerAddress: string;
1045
+ signMethod: "typedData";
1046
+ typedData: {
1047
+ message: Record<string, unknown>;
1048
+ types: Record<string, {
1049
+ type: string;
1050
+ name: string;
1051
+ }[]>;
1052
+ domain: Record<string, unknown>;
1053
+ primaryType: string;
1054
+ };
1055
+ description?: string | undefined;
1056
+ metadata?: Record<string, unknown> | undefined;
1057
+ }>, z.ZodObject<{
1058
+ id: z.ZodString;
1059
+ signerAddress: z.ZodString;
1060
+ description: z.ZodOptional<z.ZodString>;
1061
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1062
+ } & {
1063
+ signMethod: z.ZodLiteral<"message">;
1064
+ rawHash: z.ZodString;
1065
+ }, "strip", z.ZodTypeAny, {
1066
+ id: string;
1067
+ signerAddress: string;
1068
+ signMethod: "message";
1069
+ rawHash: string;
1070
+ description?: string | undefined;
1071
+ metadata?: Record<string, unknown> | undefined;
1072
+ }, {
1073
+ id: string;
1074
+ signerAddress: string;
1075
+ signMethod: "message";
1076
+ rawHash: string;
1077
+ description?: string | undefined;
1078
+ metadata?: Record<string, unknown> | undefined;
1079
+ }>]>, "many">;
1080
+ transactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1081
+ transaction: z.ZodType<import("viem").PrepareTransactionRequestReturnType>;
1082
+ metadata: z.ZodOptional<z.ZodObject<{
1083
+ explorerUrl: z.ZodOptional<z.ZodString>;
1084
+ usdValue: z.ZodOptional<z.ZodString>;
1085
+ }, "strip", z.ZodTypeAny, {
1086
+ explorerUrl?: string | undefined;
1087
+ usdValue?: string | undefined;
1088
+ }, {
1089
+ explorerUrl?: string | undefined;
1090
+ usdValue?: string | undefined;
1091
+ }>>;
1092
+ }, "strip", z.ZodTypeAny, {
1093
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1094
+ metadata?: {
1095
+ explorerUrl?: string | undefined;
1096
+ usdValue?: string | undefined;
1097
+ } | undefined;
1098
+ }, {
1099
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1100
+ metadata?: {
1101
+ explorerUrl?: string | undefined;
1102
+ usdValue?: string | undefined;
1103
+ } | undefined;
1104
+ }>, "many">>;
1105
+ }, "strip", z.ZodTypeAny, {
1106
+ signatureRequests: ({
1107
+ id: string;
1108
+ signerAddress: string;
1109
+ signMethod: "typedData";
1110
+ typedData: {
1111
+ message: Record<string, unknown>;
1112
+ types: Record<string, {
1113
+ type: string;
1114
+ name: string;
1115
+ }[]>;
1116
+ domain: Record<string, unknown>;
1117
+ primaryType: string;
1118
+ };
1119
+ description?: string | undefined;
1120
+ metadata?: Record<string, unknown> | undefined;
1121
+ } | {
1122
+ id: string;
1123
+ signerAddress: string;
1124
+ signMethod: "message";
1125
+ rawHash: string;
1126
+ description?: string | undefined;
1127
+ metadata?: Record<string, unknown> | undefined;
1128
+ })[];
1129
+ transactions?: {
1130
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1131
+ metadata?: {
1132
+ explorerUrl?: string | undefined;
1133
+ usdValue?: string | undefined;
1134
+ } | undefined;
1135
+ }[] | undefined;
1136
+ }, {
1137
+ signatureRequests: ({
1138
+ id: string;
1139
+ signerAddress: string;
1140
+ signMethod: "typedData";
1141
+ typedData: {
1142
+ message: Record<string, unknown>;
1143
+ types: Record<string, {
1144
+ type: string;
1145
+ name: string;
1146
+ }[]>;
1147
+ domain: Record<string, unknown>;
1148
+ primaryType: string;
1149
+ };
1150
+ description?: string | undefined;
1151
+ metadata?: Record<string, unknown> | undefined;
1152
+ } | {
1153
+ id: string;
1154
+ signerAddress: string;
1155
+ signMethod: "message";
1156
+ rawHash: string;
1157
+ description?: string | undefined;
1158
+ metadata?: Record<string, unknown> | undefined;
1159
+ })[];
1160
+ transactions?: {
1161
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1162
+ metadata?: {
1163
+ explorerUrl?: string | undefined;
1164
+ usdValue?: string | undefined;
1165
+ } | undefined;
1166
+ }[] | undefined;
1167
+ }>;
1168
+ }, "strip", z.ZodTypeAny, {
1169
+ value: {
1170
+ signatureRequests: ({
1171
+ id: string;
1172
+ signerAddress: string;
1173
+ signMethod: "typedData";
1174
+ typedData: {
1175
+ message: Record<string, unknown>;
1176
+ types: Record<string, {
1177
+ type: string;
1178
+ name: string;
1179
+ }[]>;
1180
+ domain: Record<string, unknown>;
1181
+ primaryType: string;
1182
+ };
1183
+ description?: string | undefined;
1184
+ metadata?: Record<string, unknown> | undefined;
1185
+ } | {
1186
+ id: string;
1187
+ signerAddress: string;
1188
+ signMethod: "message";
1189
+ rawHash: string;
1190
+ description?: string | undefined;
1191
+ metadata?: Record<string, unknown> | undefined;
1192
+ })[];
1193
+ transactions?: {
1194
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1195
+ metadata?: {
1196
+ explorerUrl?: string | undefined;
1197
+ usdValue?: string | undefined;
1198
+ } | undefined;
1199
+ }[] | undefined;
1200
+ };
1201
+ type: "SignatureRequests";
1202
+ }, {
1203
+ value: {
1204
+ signatureRequests: ({
1205
+ id: string;
1206
+ signerAddress: string;
1207
+ signMethod: "typedData";
1208
+ typedData: {
1209
+ message: Record<string, unknown>;
1210
+ types: Record<string, {
1211
+ type: string;
1212
+ name: string;
1213
+ }[]>;
1214
+ domain: Record<string, unknown>;
1215
+ primaryType: string;
1216
+ };
1217
+ description?: string | undefined;
1218
+ metadata?: Record<string, unknown> | undefined;
1219
+ } | {
1220
+ id: string;
1221
+ signerAddress: string;
1222
+ signMethod: "message";
1223
+ rawHash: string;
1224
+ description?: string | undefined;
1225
+ metadata?: Record<string, unknown> | undefined;
1226
+ })[];
1227
+ transactions?: {
1228
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1229
+ metadata?: {
1230
+ explorerUrl?: string | undefined;
1231
+ usdValue?: string | undefined;
1232
+ } | undefined;
1233
+ }[] | undefined;
1234
+ };
1235
+ type: "SignatureRequests";
1236
+ }>]>;
1237
+ }, "strict", z.ZodTypeAny, {
1238
+ type: "tool-call";
1239
+ input: {
1240
+ value: {
1241
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1242
+ metadata?: {
1243
+ explorerUrl?: string | undefined;
1244
+ usdValue?: string | undefined;
1245
+ } | undefined;
1246
+ }[];
1247
+ type: "BatchTransactions";
1248
+ } | {
1249
+ value: {
1250
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1251
+ metadata?: {
1252
+ explorerUrl?: string | undefined;
1253
+ usdValue?: string | undefined;
1254
+ } | undefined;
1255
+ };
1256
+ type: "SingleTransaction";
1257
+ } | {
1258
+ value: {
1259
+ signatureRequests: ({
1260
+ id: string;
1261
+ signerAddress: string;
1262
+ signMethod: "typedData";
1263
+ typedData: {
1264
+ message: Record<string, unknown>;
1265
+ types: Record<string, {
1266
+ type: string;
1267
+ name: string;
1268
+ }[]>;
1269
+ domain: Record<string, unknown>;
1270
+ primaryType: string;
1271
+ };
1272
+ description?: string | undefined;
1273
+ metadata?: Record<string, unknown> | undefined;
1274
+ } | {
1275
+ id: string;
1276
+ signerAddress: string;
1277
+ signMethod: "message";
1278
+ rawHash: string;
1279
+ description?: string | undefined;
1280
+ metadata?: Record<string, unknown> | undefined;
1281
+ })[];
1282
+ transactions?: {
1283
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1284
+ metadata?: {
1285
+ explorerUrl?: string | undefined;
1286
+ usdValue?: string | undefined;
1287
+ } | undefined;
1288
+ }[] | undefined;
1289
+ };
1290
+ type: "SignatureRequests";
1291
+ };
897
1292
  toolCallId: string;
898
1293
  toolName: string;
899
- toolInput?: unknown;
900
1294
  }, {
1295
+ type: "tool-call";
1296
+ input: {
1297
+ value: {
1298
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1299
+ metadata?: {
1300
+ explorerUrl?: string | undefined;
1301
+ usdValue?: string | undefined;
1302
+ } | undefined;
1303
+ }[];
1304
+ type: "BatchTransactions";
1305
+ } | {
1306
+ value: {
1307
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1308
+ metadata?: {
1309
+ explorerUrl?: string | undefined;
1310
+ usdValue?: string | undefined;
1311
+ } | undefined;
1312
+ };
1313
+ type: "SingleTransaction";
1314
+ } | {
1315
+ value: {
1316
+ signatureRequests: ({
1317
+ id: string;
1318
+ signerAddress: string;
1319
+ signMethod: "typedData";
1320
+ typedData: {
1321
+ message: Record<string, unknown>;
1322
+ types: Record<string, {
1323
+ type: string;
1324
+ name: string;
1325
+ }[]>;
1326
+ domain: Record<string, unknown>;
1327
+ primaryType: string;
1328
+ };
1329
+ description?: string | undefined;
1330
+ metadata?: Record<string, unknown> | undefined;
1331
+ } | {
1332
+ id: string;
1333
+ signerAddress: string;
1334
+ signMethod: "message";
1335
+ rawHash: string;
1336
+ description?: string | undefined;
1337
+ metadata?: Record<string, unknown> | undefined;
1338
+ })[];
1339
+ transactions?: {
1340
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1341
+ metadata?: {
1342
+ explorerUrl?: string | undefined;
1343
+ usdValue?: string | undefined;
1344
+ } | undefined;
1345
+ }[] | undefined;
1346
+ };
1347
+ type: "SignatureRequests";
1348
+ };
901
1349
  toolCallId: string;
902
1350
  toolName: string;
903
- toolInput?: unknown;
904
1351
  }>, "many">>;
905
1352
  incompleteTools: z.ZodOptional<z.ZodArray<z.ZodObject<{
906
1353
  toolCallId: z.ZodString;
@@ -916,17 +1363,73 @@ export declare const resultEventDataSchema: z.ZodObject<{
916
1363
  toolInput?: unknown;
917
1364
  }>, "many">>;
918
1365
  toolErrors: z.ZodOptional<z.ZodArray<z.ZodObject<{
919
- toolCallId: z.ZodString;
920
- toolName: z.ZodString;
921
- error: z.ZodString;
922
- }, "strip", z.ZodTypeAny, {
923
- error: string;
924
- toolCallId: string;
925
- toolName: string;
1366
+ id: z.ZodString;
1367
+ name: z.ZodString;
1368
+ data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1369
+ type: z.ZodLiteral<"input">;
1370
+ errors: z.ZodArray<z.ZodObject<{
1371
+ path: z.ZodString;
1372
+ message: z.ZodString;
1373
+ }, "strict", z.ZodTypeAny, {
1374
+ path: string;
1375
+ message: string;
1376
+ }, {
1377
+ path: string;
1378
+ message: string;
1379
+ }>, "many">;
1380
+ }, "strict", z.ZodTypeAny, {
1381
+ type: "input";
1382
+ errors: {
1383
+ path: string;
1384
+ message: string;
1385
+ }[];
1386
+ }, {
1387
+ type: "input";
1388
+ errors: {
1389
+ path: string;
1390
+ message: string;
1391
+ }[];
1392
+ }>, z.ZodObject<{
1393
+ type: z.ZodLiteral<"execution">;
1394
+ message: z.ZodString;
1395
+ details: z.ZodOptional<z.ZodUnknown>;
1396
+ }, "strict", z.ZodTypeAny, {
1397
+ message: string;
1398
+ type: "execution";
1399
+ details?: unknown;
1400
+ }, {
1401
+ message: string;
1402
+ type: "execution";
1403
+ details?: unknown;
1404
+ }>]>;
1405
+ }, "strict", z.ZodTypeAny, {
1406
+ id: string;
1407
+ name: string;
1408
+ data: {
1409
+ type: "input";
1410
+ errors: {
1411
+ path: string;
1412
+ message: string;
1413
+ }[];
1414
+ } | {
1415
+ message: string;
1416
+ type: "execution";
1417
+ details?: unknown;
1418
+ };
926
1419
  }, {
927
- error: string;
928
- toolCallId: string;
929
- toolName: string;
1420
+ id: string;
1421
+ name: string;
1422
+ data: {
1423
+ type: "input";
1424
+ errors: {
1425
+ path: string;
1426
+ message: string;
1427
+ }[];
1428
+ } | {
1429
+ message: string;
1430
+ type: "execution";
1431
+ details?: unknown;
1432
+ };
930
1433
  }>, "many">>;
931
1434
  requestId: z.ZodString;
932
1435
  }, "strip", z.ZodTypeAny, {
@@ -936,9 +1439,62 @@ export declare const resultEventDataSchema: z.ZodObject<{
936
1439
  messages: ModelMessage[];
937
1440
  requestId: string;
938
1441
  pendingTools?: {
1442
+ type: "tool-call";
1443
+ input: {
1444
+ value: {
1445
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1446
+ metadata?: {
1447
+ explorerUrl?: string | undefined;
1448
+ usdValue?: string | undefined;
1449
+ } | undefined;
1450
+ }[];
1451
+ type: "BatchTransactions";
1452
+ } | {
1453
+ value: {
1454
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1455
+ metadata?: {
1456
+ explorerUrl?: string | undefined;
1457
+ usdValue?: string | undefined;
1458
+ } | undefined;
1459
+ };
1460
+ type: "SingleTransaction";
1461
+ } | {
1462
+ value: {
1463
+ signatureRequests: ({
1464
+ id: string;
1465
+ signerAddress: string;
1466
+ signMethod: "typedData";
1467
+ typedData: {
1468
+ message: Record<string, unknown>;
1469
+ types: Record<string, {
1470
+ type: string;
1471
+ name: string;
1472
+ }[]>;
1473
+ domain: Record<string, unknown>;
1474
+ primaryType: string;
1475
+ };
1476
+ description?: string | undefined;
1477
+ metadata?: Record<string, unknown> | undefined;
1478
+ } | {
1479
+ id: string;
1480
+ signerAddress: string;
1481
+ signMethod: "message";
1482
+ rawHash: string;
1483
+ description?: string | undefined;
1484
+ metadata?: Record<string, unknown> | undefined;
1485
+ })[];
1486
+ transactions?: {
1487
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1488
+ metadata?: {
1489
+ explorerUrl?: string | undefined;
1490
+ usdValue?: string | undefined;
1491
+ } | undefined;
1492
+ }[] | undefined;
1493
+ };
1494
+ type: "SignatureRequests";
1495
+ };
939
1496
  toolCallId: string;
940
1497
  toolName: string;
941
- toolInput?: unknown;
942
1498
  }[] | undefined;
943
1499
  incompleteTools?: {
944
1500
  toolCallId: string;
@@ -946,9 +1502,19 @@ export declare const resultEventDataSchema: z.ZodObject<{
946
1502
  toolInput?: unknown;
947
1503
  }[] | undefined;
948
1504
  toolErrors?: {
949
- error: string;
950
- toolCallId: string;
951
- toolName: string;
1505
+ id: string;
1506
+ name: string;
1507
+ data: {
1508
+ type: "input";
1509
+ errors: {
1510
+ path: string;
1511
+ message: string;
1512
+ }[];
1513
+ } | {
1514
+ message: string;
1515
+ type: "execution";
1516
+ details?: unknown;
1517
+ };
952
1518
  }[] | undefined;
953
1519
  }, {
954
1520
  type: "result";
@@ -957,9 +1523,62 @@ export declare const resultEventDataSchema: z.ZodObject<{
957
1523
  messages: ModelMessage[];
958
1524
  requestId: string;
959
1525
  pendingTools?: {
1526
+ type: "tool-call";
1527
+ input: {
1528
+ value: {
1529
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1530
+ metadata?: {
1531
+ explorerUrl?: string | undefined;
1532
+ usdValue?: string | undefined;
1533
+ } | undefined;
1534
+ }[];
1535
+ type: "BatchTransactions";
1536
+ } | {
1537
+ value: {
1538
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1539
+ metadata?: {
1540
+ explorerUrl?: string | undefined;
1541
+ usdValue?: string | undefined;
1542
+ } | undefined;
1543
+ };
1544
+ type: "SingleTransaction";
1545
+ } | {
1546
+ value: {
1547
+ signatureRequests: ({
1548
+ id: string;
1549
+ signerAddress: string;
1550
+ signMethod: "typedData";
1551
+ typedData: {
1552
+ message: Record<string, unknown>;
1553
+ types: Record<string, {
1554
+ type: string;
1555
+ name: string;
1556
+ }[]>;
1557
+ domain: Record<string, unknown>;
1558
+ primaryType: string;
1559
+ };
1560
+ description?: string | undefined;
1561
+ metadata?: Record<string, unknown> | undefined;
1562
+ } | {
1563
+ id: string;
1564
+ signerAddress: string;
1565
+ signMethod: "message";
1566
+ rawHash: string;
1567
+ description?: string | undefined;
1568
+ metadata?: Record<string, unknown> | undefined;
1569
+ })[];
1570
+ transactions?: {
1571
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1572
+ metadata?: {
1573
+ explorerUrl?: string | undefined;
1574
+ usdValue?: string | undefined;
1575
+ } | undefined;
1576
+ }[] | undefined;
1577
+ };
1578
+ type: "SignatureRequests";
1579
+ };
960
1580
  toolCallId: string;
961
1581
  toolName: string;
962
- toolInput?: unknown;
963
1582
  }[] | undefined;
964
1583
  incompleteTools?: {
965
1584
  toolCallId: string;
@@ -967,9 +1586,19 @@ export declare const resultEventDataSchema: z.ZodObject<{
967
1586
  toolInput?: unknown;
968
1587
  }[] | undefined;
969
1588
  toolErrors?: {
970
- error: string;
971
- toolCallId: string;
972
- toolName: string;
1589
+ id: string;
1590
+ name: string;
1591
+ data: {
1592
+ type: "input";
1593
+ errors: {
1594
+ path: string;
1595
+ message: string;
1596
+ }[];
1597
+ } | {
1598
+ message: string;
1599
+ type: "execution";
1600
+ details?: unknown;
1601
+ };
973
1602
  }[] | undefined;
974
1603
  }>;
975
1604
  /**
@@ -1032,17 +1661,464 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
1032
1661
  messages: z.ZodArray<z.ZodType<ModelMessage, z.ZodTypeDef, ModelMessage>, "many">;
1033
1662
  text: z.ZodString;
1034
1663
  pendingTools: z.ZodOptional<z.ZodArray<z.ZodObject<{
1664
+ type: z.ZodLiteral<"tool-call">;
1035
1665
  toolCallId: z.ZodString;
1036
1666
  toolName: z.ZodString;
1037
- toolInput: z.ZodUnknown;
1038
- }, "strip", z.ZodTypeAny, {
1667
+ input: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1668
+ type: z.ZodLiteral<"BatchTransactions">;
1669
+ value: z.ZodArray<z.ZodObject<{
1670
+ transaction: z.ZodType<import("viem").PrepareTransactionRequestReturnType>;
1671
+ metadata: z.ZodOptional<z.ZodObject<{
1672
+ explorerUrl: z.ZodOptional<z.ZodString>;
1673
+ usdValue: z.ZodOptional<z.ZodString>;
1674
+ }, "strip", z.ZodTypeAny, {
1675
+ explorerUrl?: string | undefined;
1676
+ usdValue?: string | undefined;
1677
+ }, {
1678
+ explorerUrl?: string | undefined;
1679
+ usdValue?: string | undefined;
1680
+ }>>;
1681
+ }, "strip", z.ZodTypeAny, {
1682
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1683
+ metadata?: {
1684
+ explorerUrl?: string | undefined;
1685
+ usdValue?: string | undefined;
1686
+ } | undefined;
1687
+ }, {
1688
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1689
+ metadata?: {
1690
+ explorerUrl?: string | undefined;
1691
+ usdValue?: string | undefined;
1692
+ } | undefined;
1693
+ }>, "many">;
1694
+ }, "strip", z.ZodTypeAny, {
1695
+ value: {
1696
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1697
+ metadata?: {
1698
+ explorerUrl?: string | undefined;
1699
+ usdValue?: string | undefined;
1700
+ } | undefined;
1701
+ }[];
1702
+ type: "BatchTransactions";
1703
+ }, {
1704
+ value: {
1705
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1706
+ metadata?: {
1707
+ explorerUrl?: string | undefined;
1708
+ usdValue?: string | undefined;
1709
+ } | undefined;
1710
+ }[];
1711
+ type: "BatchTransactions";
1712
+ }>, z.ZodObject<{
1713
+ type: z.ZodLiteral<"SingleTransaction">;
1714
+ value: z.ZodObject<{
1715
+ transaction: z.ZodType<import("viem").PrepareTransactionRequestReturnType>;
1716
+ metadata: z.ZodOptional<z.ZodObject<{
1717
+ explorerUrl: z.ZodOptional<z.ZodString>;
1718
+ usdValue: z.ZodOptional<z.ZodString>;
1719
+ }, "strip", z.ZodTypeAny, {
1720
+ explorerUrl?: string | undefined;
1721
+ usdValue?: string | undefined;
1722
+ }, {
1723
+ explorerUrl?: string | undefined;
1724
+ usdValue?: string | undefined;
1725
+ }>>;
1726
+ }, "strip", z.ZodTypeAny, {
1727
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1728
+ metadata?: {
1729
+ explorerUrl?: string | undefined;
1730
+ usdValue?: string | undefined;
1731
+ } | undefined;
1732
+ }, {
1733
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1734
+ metadata?: {
1735
+ explorerUrl?: string | undefined;
1736
+ usdValue?: string | undefined;
1737
+ } | undefined;
1738
+ }>;
1739
+ }, "strip", z.ZodTypeAny, {
1740
+ value: {
1741
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1742
+ metadata?: {
1743
+ explorerUrl?: string | undefined;
1744
+ usdValue?: string | undefined;
1745
+ } | undefined;
1746
+ };
1747
+ type: "SingleTransaction";
1748
+ }, {
1749
+ value: {
1750
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1751
+ metadata?: {
1752
+ explorerUrl?: string | undefined;
1753
+ usdValue?: string | undefined;
1754
+ } | undefined;
1755
+ };
1756
+ type: "SingleTransaction";
1757
+ }>, z.ZodObject<{
1758
+ type: z.ZodLiteral<"SignatureRequests">;
1759
+ value: z.ZodObject<{
1760
+ signatureRequests: z.ZodArray<z.ZodDiscriminatedUnion<"signMethod", [z.ZodObject<{
1761
+ id: z.ZodString;
1762
+ signerAddress: z.ZodString;
1763
+ description: z.ZodOptional<z.ZodString>;
1764
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1765
+ } & {
1766
+ signMethod: z.ZodLiteral<"typedData">;
1767
+ typedData: z.ZodObject<{
1768
+ types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
1769
+ name: z.ZodString;
1770
+ type: z.ZodString;
1771
+ }, "strip", z.ZodTypeAny, {
1772
+ type: string;
1773
+ name: string;
1774
+ }, {
1775
+ type: string;
1776
+ name: string;
1777
+ }>, "many">>;
1778
+ domain: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1779
+ message: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1780
+ primaryType: z.ZodString;
1781
+ }, "strip", z.ZodTypeAny, {
1782
+ message: Record<string, unknown>;
1783
+ types: Record<string, {
1784
+ type: string;
1785
+ name: string;
1786
+ }[]>;
1787
+ domain: Record<string, unknown>;
1788
+ primaryType: string;
1789
+ }, {
1790
+ message: Record<string, unknown>;
1791
+ types: Record<string, {
1792
+ type: string;
1793
+ name: string;
1794
+ }[]>;
1795
+ domain: Record<string, unknown>;
1796
+ primaryType: string;
1797
+ }>;
1798
+ }, "strip", z.ZodTypeAny, {
1799
+ id: string;
1800
+ signerAddress: string;
1801
+ signMethod: "typedData";
1802
+ typedData: {
1803
+ message: Record<string, unknown>;
1804
+ types: Record<string, {
1805
+ type: string;
1806
+ name: string;
1807
+ }[]>;
1808
+ domain: Record<string, unknown>;
1809
+ primaryType: string;
1810
+ };
1811
+ description?: string | undefined;
1812
+ metadata?: Record<string, unknown> | undefined;
1813
+ }, {
1814
+ id: string;
1815
+ signerAddress: string;
1816
+ signMethod: "typedData";
1817
+ typedData: {
1818
+ message: Record<string, unknown>;
1819
+ types: Record<string, {
1820
+ type: string;
1821
+ name: string;
1822
+ }[]>;
1823
+ domain: Record<string, unknown>;
1824
+ primaryType: string;
1825
+ };
1826
+ description?: string | undefined;
1827
+ metadata?: Record<string, unknown> | undefined;
1828
+ }>, z.ZodObject<{
1829
+ id: z.ZodString;
1830
+ signerAddress: z.ZodString;
1831
+ description: z.ZodOptional<z.ZodString>;
1832
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1833
+ } & {
1834
+ signMethod: z.ZodLiteral<"message">;
1835
+ rawHash: z.ZodString;
1836
+ }, "strip", z.ZodTypeAny, {
1837
+ id: string;
1838
+ signerAddress: string;
1839
+ signMethod: "message";
1840
+ rawHash: string;
1841
+ description?: string | undefined;
1842
+ metadata?: Record<string, unknown> | undefined;
1843
+ }, {
1844
+ id: string;
1845
+ signerAddress: string;
1846
+ signMethod: "message";
1847
+ rawHash: string;
1848
+ description?: string | undefined;
1849
+ metadata?: Record<string, unknown> | undefined;
1850
+ }>]>, "many">;
1851
+ transactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1852
+ transaction: z.ZodType<import("viem").PrepareTransactionRequestReturnType>;
1853
+ metadata: z.ZodOptional<z.ZodObject<{
1854
+ explorerUrl: z.ZodOptional<z.ZodString>;
1855
+ usdValue: z.ZodOptional<z.ZodString>;
1856
+ }, "strip", z.ZodTypeAny, {
1857
+ explorerUrl?: string | undefined;
1858
+ usdValue?: string | undefined;
1859
+ }, {
1860
+ explorerUrl?: string | undefined;
1861
+ usdValue?: string | undefined;
1862
+ }>>;
1863
+ }, "strip", z.ZodTypeAny, {
1864
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1865
+ metadata?: {
1866
+ explorerUrl?: string | undefined;
1867
+ usdValue?: string | undefined;
1868
+ } | undefined;
1869
+ }, {
1870
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1871
+ metadata?: {
1872
+ explorerUrl?: string | undefined;
1873
+ usdValue?: string | undefined;
1874
+ } | undefined;
1875
+ }>, "many">>;
1876
+ }, "strip", z.ZodTypeAny, {
1877
+ signatureRequests: ({
1878
+ id: string;
1879
+ signerAddress: string;
1880
+ signMethod: "typedData";
1881
+ typedData: {
1882
+ message: Record<string, unknown>;
1883
+ types: Record<string, {
1884
+ type: string;
1885
+ name: string;
1886
+ }[]>;
1887
+ domain: Record<string, unknown>;
1888
+ primaryType: string;
1889
+ };
1890
+ description?: string | undefined;
1891
+ metadata?: Record<string, unknown> | undefined;
1892
+ } | {
1893
+ id: string;
1894
+ signerAddress: string;
1895
+ signMethod: "message";
1896
+ rawHash: string;
1897
+ description?: string | undefined;
1898
+ metadata?: Record<string, unknown> | undefined;
1899
+ })[];
1900
+ transactions?: {
1901
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1902
+ metadata?: {
1903
+ explorerUrl?: string | undefined;
1904
+ usdValue?: string | undefined;
1905
+ } | undefined;
1906
+ }[] | undefined;
1907
+ }, {
1908
+ signatureRequests: ({
1909
+ id: string;
1910
+ signerAddress: string;
1911
+ signMethod: "typedData";
1912
+ typedData: {
1913
+ message: Record<string, unknown>;
1914
+ types: Record<string, {
1915
+ type: string;
1916
+ name: string;
1917
+ }[]>;
1918
+ domain: Record<string, unknown>;
1919
+ primaryType: string;
1920
+ };
1921
+ description?: string | undefined;
1922
+ metadata?: Record<string, unknown> | undefined;
1923
+ } | {
1924
+ id: string;
1925
+ signerAddress: string;
1926
+ signMethod: "message";
1927
+ rawHash: string;
1928
+ description?: string | undefined;
1929
+ metadata?: Record<string, unknown> | undefined;
1930
+ })[];
1931
+ transactions?: {
1932
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1933
+ metadata?: {
1934
+ explorerUrl?: string | undefined;
1935
+ usdValue?: string | undefined;
1936
+ } | undefined;
1937
+ }[] | undefined;
1938
+ }>;
1939
+ }, "strip", z.ZodTypeAny, {
1940
+ value: {
1941
+ signatureRequests: ({
1942
+ id: string;
1943
+ signerAddress: string;
1944
+ signMethod: "typedData";
1945
+ typedData: {
1946
+ message: Record<string, unknown>;
1947
+ types: Record<string, {
1948
+ type: string;
1949
+ name: string;
1950
+ }[]>;
1951
+ domain: Record<string, unknown>;
1952
+ primaryType: string;
1953
+ };
1954
+ description?: string | undefined;
1955
+ metadata?: Record<string, unknown> | undefined;
1956
+ } | {
1957
+ id: string;
1958
+ signerAddress: string;
1959
+ signMethod: "message";
1960
+ rawHash: string;
1961
+ description?: string | undefined;
1962
+ metadata?: Record<string, unknown> | undefined;
1963
+ })[];
1964
+ transactions?: {
1965
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1966
+ metadata?: {
1967
+ explorerUrl?: string | undefined;
1968
+ usdValue?: string | undefined;
1969
+ } | undefined;
1970
+ }[] | undefined;
1971
+ };
1972
+ type: "SignatureRequests";
1973
+ }, {
1974
+ value: {
1975
+ signatureRequests: ({
1976
+ id: string;
1977
+ signerAddress: string;
1978
+ signMethod: "typedData";
1979
+ typedData: {
1980
+ message: Record<string, unknown>;
1981
+ types: Record<string, {
1982
+ type: string;
1983
+ name: string;
1984
+ }[]>;
1985
+ domain: Record<string, unknown>;
1986
+ primaryType: string;
1987
+ };
1988
+ description?: string | undefined;
1989
+ metadata?: Record<string, unknown> | undefined;
1990
+ } | {
1991
+ id: string;
1992
+ signerAddress: string;
1993
+ signMethod: "message";
1994
+ rawHash: string;
1995
+ description?: string | undefined;
1996
+ metadata?: Record<string, unknown> | undefined;
1997
+ })[];
1998
+ transactions?: {
1999
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2000
+ metadata?: {
2001
+ explorerUrl?: string | undefined;
2002
+ usdValue?: string | undefined;
2003
+ } | undefined;
2004
+ }[] | undefined;
2005
+ };
2006
+ type: "SignatureRequests";
2007
+ }>]>;
2008
+ }, "strict", z.ZodTypeAny, {
2009
+ type: "tool-call";
2010
+ input: {
2011
+ value: {
2012
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2013
+ metadata?: {
2014
+ explorerUrl?: string | undefined;
2015
+ usdValue?: string | undefined;
2016
+ } | undefined;
2017
+ }[];
2018
+ type: "BatchTransactions";
2019
+ } | {
2020
+ value: {
2021
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2022
+ metadata?: {
2023
+ explorerUrl?: string | undefined;
2024
+ usdValue?: string | undefined;
2025
+ } | undefined;
2026
+ };
2027
+ type: "SingleTransaction";
2028
+ } | {
2029
+ value: {
2030
+ signatureRequests: ({
2031
+ id: string;
2032
+ signerAddress: string;
2033
+ signMethod: "typedData";
2034
+ typedData: {
2035
+ message: Record<string, unknown>;
2036
+ types: Record<string, {
2037
+ type: string;
2038
+ name: string;
2039
+ }[]>;
2040
+ domain: Record<string, unknown>;
2041
+ primaryType: string;
2042
+ };
2043
+ description?: string | undefined;
2044
+ metadata?: Record<string, unknown> | undefined;
2045
+ } | {
2046
+ id: string;
2047
+ signerAddress: string;
2048
+ signMethod: "message";
2049
+ rawHash: string;
2050
+ description?: string | undefined;
2051
+ metadata?: Record<string, unknown> | undefined;
2052
+ })[];
2053
+ transactions?: {
2054
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2055
+ metadata?: {
2056
+ explorerUrl?: string | undefined;
2057
+ usdValue?: string | undefined;
2058
+ } | undefined;
2059
+ }[] | undefined;
2060
+ };
2061
+ type: "SignatureRequests";
2062
+ };
1039
2063
  toolCallId: string;
1040
2064
  toolName: string;
1041
- toolInput?: unknown;
1042
2065
  }, {
2066
+ type: "tool-call";
2067
+ input: {
2068
+ value: {
2069
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2070
+ metadata?: {
2071
+ explorerUrl?: string | undefined;
2072
+ usdValue?: string | undefined;
2073
+ } | undefined;
2074
+ }[];
2075
+ type: "BatchTransactions";
2076
+ } | {
2077
+ value: {
2078
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2079
+ metadata?: {
2080
+ explorerUrl?: string | undefined;
2081
+ usdValue?: string | undefined;
2082
+ } | undefined;
2083
+ };
2084
+ type: "SingleTransaction";
2085
+ } | {
2086
+ value: {
2087
+ signatureRequests: ({
2088
+ id: string;
2089
+ signerAddress: string;
2090
+ signMethod: "typedData";
2091
+ typedData: {
2092
+ message: Record<string, unknown>;
2093
+ types: Record<string, {
2094
+ type: string;
2095
+ name: string;
2096
+ }[]>;
2097
+ domain: Record<string, unknown>;
2098
+ primaryType: string;
2099
+ };
2100
+ description?: string | undefined;
2101
+ metadata?: Record<string, unknown> | undefined;
2102
+ } | {
2103
+ id: string;
2104
+ signerAddress: string;
2105
+ signMethod: "message";
2106
+ rawHash: string;
2107
+ description?: string | undefined;
2108
+ metadata?: Record<string, unknown> | undefined;
2109
+ })[];
2110
+ transactions?: {
2111
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2112
+ metadata?: {
2113
+ explorerUrl?: string | undefined;
2114
+ usdValue?: string | undefined;
2115
+ } | undefined;
2116
+ }[] | undefined;
2117
+ };
2118
+ type: "SignatureRequests";
2119
+ };
1043
2120
  toolCallId: string;
1044
2121
  toolName: string;
1045
- toolInput?: unknown;
1046
2122
  }>, "many">>;
1047
2123
  incompleteTools: z.ZodOptional<z.ZodArray<z.ZodObject<{
1048
2124
  toolCallId: z.ZodString;
@@ -1058,17 +2134,73 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
1058
2134
  toolInput?: unknown;
1059
2135
  }>, "many">>;
1060
2136
  toolErrors: z.ZodOptional<z.ZodArray<z.ZodObject<{
1061
- toolCallId: z.ZodString;
1062
- toolName: z.ZodString;
1063
- error: z.ZodString;
1064
- }, "strip", z.ZodTypeAny, {
1065
- error: string;
1066
- toolCallId: string;
1067
- toolName: string;
2137
+ id: z.ZodString;
2138
+ name: z.ZodString;
2139
+ data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2140
+ type: z.ZodLiteral<"input">;
2141
+ errors: z.ZodArray<z.ZodObject<{
2142
+ path: z.ZodString;
2143
+ message: z.ZodString;
2144
+ }, "strict", z.ZodTypeAny, {
2145
+ path: string;
2146
+ message: string;
2147
+ }, {
2148
+ path: string;
2149
+ message: string;
2150
+ }>, "many">;
2151
+ }, "strict", z.ZodTypeAny, {
2152
+ type: "input";
2153
+ errors: {
2154
+ path: string;
2155
+ message: string;
2156
+ }[];
2157
+ }, {
2158
+ type: "input";
2159
+ errors: {
2160
+ path: string;
2161
+ message: string;
2162
+ }[];
2163
+ }>, z.ZodObject<{
2164
+ type: z.ZodLiteral<"execution">;
2165
+ message: z.ZodString;
2166
+ details: z.ZodOptional<z.ZodUnknown>;
2167
+ }, "strict", z.ZodTypeAny, {
2168
+ message: string;
2169
+ type: "execution";
2170
+ details?: unknown;
2171
+ }, {
2172
+ message: string;
2173
+ type: "execution";
2174
+ details?: unknown;
2175
+ }>]>;
2176
+ }, "strict", z.ZodTypeAny, {
2177
+ id: string;
2178
+ name: string;
2179
+ data: {
2180
+ type: "input";
2181
+ errors: {
2182
+ path: string;
2183
+ message: string;
2184
+ }[];
2185
+ } | {
2186
+ message: string;
2187
+ type: "execution";
2188
+ details?: unknown;
2189
+ };
1068
2190
  }, {
1069
- error: string;
1070
- toolCallId: string;
1071
- toolName: string;
2191
+ id: string;
2192
+ name: string;
2193
+ data: {
2194
+ type: "input";
2195
+ errors: {
2196
+ path: string;
2197
+ message: string;
2198
+ }[];
2199
+ } | {
2200
+ message: string;
2201
+ type: "execution";
2202
+ details?: unknown;
2203
+ };
1072
2204
  }>, "many">>;
1073
2205
  requestId: z.ZodString;
1074
2206
  }, "strip", z.ZodTypeAny, {
@@ -1078,9 +2210,62 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
1078
2210
  messages: ModelMessage[];
1079
2211
  requestId: string;
1080
2212
  pendingTools?: {
2213
+ type: "tool-call";
2214
+ input: {
2215
+ value: {
2216
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2217
+ metadata?: {
2218
+ explorerUrl?: string | undefined;
2219
+ usdValue?: string | undefined;
2220
+ } | undefined;
2221
+ }[];
2222
+ type: "BatchTransactions";
2223
+ } | {
2224
+ value: {
2225
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2226
+ metadata?: {
2227
+ explorerUrl?: string | undefined;
2228
+ usdValue?: string | undefined;
2229
+ } | undefined;
2230
+ };
2231
+ type: "SingleTransaction";
2232
+ } | {
2233
+ value: {
2234
+ signatureRequests: ({
2235
+ id: string;
2236
+ signerAddress: string;
2237
+ signMethod: "typedData";
2238
+ typedData: {
2239
+ message: Record<string, unknown>;
2240
+ types: Record<string, {
2241
+ type: string;
2242
+ name: string;
2243
+ }[]>;
2244
+ domain: Record<string, unknown>;
2245
+ primaryType: string;
2246
+ };
2247
+ description?: string | undefined;
2248
+ metadata?: Record<string, unknown> | undefined;
2249
+ } | {
2250
+ id: string;
2251
+ signerAddress: string;
2252
+ signMethod: "message";
2253
+ rawHash: string;
2254
+ description?: string | undefined;
2255
+ metadata?: Record<string, unknown> | undefined;
2256
+ })[];
2257
+ transactions?: {
2258
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2259
+ metadata?: {
2260
+ explorerUrl?: string | undefined;
2261
+ usdValue?: string | undefined;
2262
+ } | undefined;
2263
+ }[] | undefined;
2264
+ };
2265
+ type: "SignatureRequests";
2266
+ };
1081
2267
  toolCallId: string;
1082
2268
  toolName: string;
1083
- toolInput?: unknown;
1084
2269
  }[] | undefined;
1085
2270
  incompleteTools?: {
1086
2271
  toolCallId: string;
@@ -1088,9 +2273,19 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
1088
2273
  toolInput?: unknown;
1089
2274
  }[] | undefined;
1090
2275
  toolErrors?: {
1091
- error: string;
1092
- toolCallId: string;
1093
- toolName: string;
2276
+ id: string;
2277
+ name: string;
2278
+ data: {
2279
+ type: "input";
2280
+ errors: {
2281
+ path: string;
2282
+ message: string;
2283
+ }[];
2284
+ } | {
2285
+ message: string;
2286
+ type: "execution";
2287
+ details?: unknown;
2288
+ };
1094
2289
  }[] | undefined;
1095
2290
  }, {
1096
2291
  type: "result";
@@ -1099,9 +2294,62 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
1099
2294
  messages: ModelMessage[];
1100
2295
  requestId: string;
1101
2296
  pendingTools?: {
2297
+ type: "tool-call";
2298
+ input: {
2299
+ value: {
2300
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2301
+ metadata?: {
2302
+ explorerUrl?: string | undefined;
2303
+ usdValue?: string | undefined;
2304
+ } | undefined;
2305
+ }[];
2306
+ type: "BatchTransactions";
2307
+ } | {
2308
+ value: {
2309
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2310
+ metadata?: {
2311
+ explorerUrl?: string | undefined;
2312
+ usdValue?: string | undefined;
2313
+ } | undefined;
2314
+ };
2315
+ type: "SingleTransaction";
2316
+ } | {
2317
+ value: {
2318
+ signatureRequests: ({
2319
+ id: string;
2320
+ signerAddress: string;
2321
+ signMethod: "typedData";
2322
+ typedData: {
2323
+ message: Record<string, unknown>;
2324
+ types: Record<string, {
2325
+ type: string;
2326
+ name: string;
2327
+ }[]>;
2328
+ domain: Record<string, unknown>;
2329
+ primaryType: string;
2330
+ };
2331
+ description?: string | undefined;
2332
+ metadata?: Record<string, unknown> | undefined;
2333
+ } | {
2334
+ id: string;
2335
+ signerAddress: string;
2336
+ signMethod: "message";
2337
+ rawHash: string;
2338
+ description?: string | undefined;
2339
+ metadata?: Record<string, unknown> | undefined;
2340
+ })[];
2341
+ transactions?: {
2342
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2343
+ metadata?: {
2344
+ explorerUrl?: string | undefined;
2345
+ usdValue?: string | undefined;
2346
+ } | undefined;
2347
+ }[] | undefined;
2348
+ };
2349
+ type: "SignatureRequests";
2350
+ };
1102
2351
  toolCallId: string;
1103
2352
  toolName: string;
1104
- toolInput?: unknown;
1105
2353
  }[] | undefined;
1106
2354
  incompleteTools?: {
1107
2355
  toolCallId: string;
@@ -1109,9 +2357,19 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
1109
2357
  toolInput?: unknown;
1110
2358
  }[] | undefined;
1111
2359
  toolErrors?: {
1112
- error: string;
1113
- toolCallId: string;
1114
- toolName: string;
2360
+ id: string;
2361
+ name: string;
2362
+ data: {
2363
+ type: "input";
2364
+ errors: {
2365
+ path: string;
2366
+ message: string;
2367
+ }[];
2368
+ } | {
2369
+ message: string;
2370
+ type: "execution";
2371
+ details?: unknown;
2372
+ };
1115
2373
  }[] | undefined;
1116
2374
  }>, z.ZodObject<{
1117
2375
  type: z.ZodLiteral<"error">;