@illalabs/interfaces 0.3.0-canary.f3dad1f7 → 0.4.0-canary-beta-52713059

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 (76) hide show
  1. package/dist/interfaces/chat/response.d.ts +8 -0
  2. package/dist/interfaces/chat/response.d.ts.map +1 -1
  3. package/dist/schemas/chatContext.d.ts +323 -0
  4. package/dist/schemas/chatContext.d.ts.map +1 -1
  5. package/dist/schemas/chatRequestBody.d.ts +1030 -0
  6. package/dist/schemas/chatRequestBody.d.ts.map +1 -1
  7. package/dist/schemas/chatRequestBody.js +7 -0
  8. package/dist/schemas/chatRequestBody.js.map +1 -1
  9. package/dist/schemas/index.d.ts +1 -0
  10. package/dist/schemas/index.d.ts.map +1 -1
  11. package/dist/schemas/index.js +1 -0
  12. package/dist/schemas/index.js.map +1 -1
  13. package/dist/schemas/messages.d.ts +473 -0
  14. package/dist/schemas/messages.d.ts.map +1 -1
  15. package/dist/schemas/messages.js +64 -0
  16. package/dist/schemas/messages.js.map +1 -1
  17. package/dist/schemas/modelContext.d.ts +3 -3
  18. package/dist/schemas/planning.d.ts +666 -0
  19. package/dist/schemas/planning.d.ts.map +1 -0
  20. package/dist/schemas/planning.js +153 -0
  21. package/dist/schemas/planning.js.map +1 -0
  22. package/dist/schemas/telemetryEvents.d.ts +1836 -48
  23. package/dist/schemas/telemetryEvents.d.ts.map +1 -1
  24. package/dist/schemas/telemetryEvents.js +92 -18
  25. package/dist/schemas/telemetryEvents.js.map +1 -1
  26. package/dist/schemas/userContext.d.ts +3 -0
  27. package/dist/schemas/userContext.d.ts.map +1 -1
  28. package/dist/schemas/userContext.js +4 -0
  29. package/dist/schemas/userContext.js.map +1 -1
  30. package/dist/tools/IllaToolError.d.ts +6 -2
  31. package/dist/tools/IllaToolError.d.ts.map +1 -1
  32. package/dist/tools/IllaToolError.js +6 -2
  33. package/dist/tools/IllaToolError.js.map +1 -1
  34. package/dist/tools/IllaToolOutcome.js +1 -1
  35. package/dist/tools/IllaToolOutcome.js.map +1 -1
  36. package/dist/types/actions/inputs.d.ts +6 -2
  37. package/dist/types/actions/inputs.d.ts.map +1 -1
  38. package/dist/types/actions/outputs.d.ts +19 -1
  39. package/dist/types/actions/outputs.d.ts.map +1 -1
  40. package/dist/types/actions/tools/getWalletBalanceAction.d.ts +3 -1
  41. package/dist/types/actions/tools/getWalletBalanceAction.d.ts.map +1 -1
  42. package/dist/types/actions/tools/index.d.ts +12 -0
  43. package/dist/types/actions/tools/index.d.ts.map +1 -1
  44. package/dist/types/actions/tools/polymarketPostOrderAction.d.ts +81 -0
  45. package/dist/types/actions/tools/polymarketPostOrderAction.d.ts.map +1 -0
  46. package/dist/types/actions/tools/polymarketPostOrderAction.js +2 -0
  47. package/dist/types/actions/tools/polymarketPostOrderAction.js.map +1 -0
  48. package/dist/types/actions/tools/predictionMarketsBetAction.d.ts +19 -0
  49. package/dist/types/actions/tools/predictionMarketsBetAction.d.ts.map +1 -0
  50. package/dist/types/actions/tools/predictionMarketsBetAction.js +2 -0
  51. package/dist/types/actions/tools/predictionMarketsBetAction.js.map +1 -0
  52. package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts +21 -0
  53. package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts.map +1 -0
  54. package/dist/types/actions/tools/predictionMarketsFetchAction.js +2 -0
  55. package/dist/types/actions/tools/predictionMarketsFetchAction.js.map +1 -0
  56. package/dist/types/actions/tools/predictionMarketsPositionsAction.d.ts +25 -0
  57. package/dist/types/actions/tools/predictionMarketsPositionsAction.d.ts.map +1 -0
  58. package/dist/types/actions/tools/predictionMarketsPositionsAction.js +2 -0
  59. package/dist/types/actions/tools/predictionMarketsPositionsAction.js.map +1 -0
  60. package/dist/types/index.d.ts +1 -0
  61. package/dist/types/index.d.ts.map +1 -1
  62. package/dist/types/index.js +1 -0
  63. package/dist/types/index.js.map +1 -1
  64. package/dist/types/planning.d.ts +55 -0
  65. package/dist/types/planning.d.ts.map +1 -0
  66. package/dist/types/planning.js +2 -0
  67. package/dist/types/planning.js.map +1 -0
  68. package/dist/types/telemetry.d.ts +36 -1
  69. package/dist/types/telemetry.d.ts.map +1 -1
  70. package/dist/types/telemetry.js +2 -1
  71. package/dist/types/telemetry.js.map +1 -1
  72. package/dist/utils/constants.d.ts +5 -3
  73. package/dist/utils/constants.d.ts.map +1 -1
  74. package/dist/utils/constants.js +11 -1
  75. package/dist/utils/constants.js.map +1 -1
  76. package/package.json +1 -1
@@ -4,20 +4,20 @@ import { z } from "zod";
4
4
  * Telemetry event type enum values.
5
5
  * Used to infer TelemetryEventType in types/telemetry.ts
6
6
  */
7
- export declare const telemetryEventTypes: readonly ["iteration_start", "iteration_end", "tool_call_batch", "tool_result", "scratchpad_reset", "llm_start", "llm_end", "text_delta", "finish", "error", "connected", "stream_end"];
7
+ export declare const telemetryEventTypes: readonly ["iteration_start", "iteration_end", "tool_call_batch", "tool_result", "scratchpad_reset", "llm_start", "llm_end", "text_delta", "finish", "error", "connected", "stream_end", "plan_generated", "plan_step_completed", "plan_invalidated", "replan_started", "replan_complete", "plan_execution_complete"];
8
8
  /**
9
9
  * Base telemetry event schema with common fields
10
10
  */
11
11
  export declare const baseTelemetryEventSchema: z.ZodObject<{
12
12
  requestId: z.ZodString;
13
- type: z.ZodEnum<["iteration_start", "iteration_end", "tool_call_batch", "tool_result", "scratchpad_reset", "llm_start", "llm_end", "text_delta", "finish", "error", "connected", "stream_end"]>;
13
+ type: z.ZodEnum<["iteration_start", "iteration_end", "tool_call_batch", "tool_result", "scratchpad_reset", "llm_start", "llm_end", "text_delta", "finish", "error", "connected", "stream_end", "plan_generated", "plan_step_completed", "plan_invalidated", "replan_started", "replan_complete", "plan_execution_complete"]>;
14
14
  timestamp: z.ZodOptional<z.ZodNumber>;
15
15
  }, "strip", z.ZodTypeAny, {
16
- type: "error" | "iteration_start" | "iteration_end" | "tool_call_batch" | "tool_result" | "scratchpad_reset" | "llm_start" | "llm_end" | "text_delta" | "finish" | "connected" | "stream_end";
16
+ type: "error" | "iteration_start" | "iteration_end" | "tool_call_batch" | "tool_result" | "scratchpad_reset" | "llm_start" | "llm_end" | "text_delta" | "finish" | "connected" | "stream_end" | "plan_generated" | "plan_step_completed" | "plan_invalidated" | "replan_started" | "replan_complete" | "plan_execution_complete";
17
17
  requestId: string;
18
18
  timestamp?: number | undefined;
19
19
  }, {
20
- type: "error" | "iteration_start" | "iteration_end" | "tool_call_batch" | "tool_result" | "scratchpad_reset" | "llm_start" | "llm_end" | "text_delta" | "finish" | "connected" | "stream_end";
20
+ type: "error" | "iteration_start" | "iteration_end" | "tool_call_batch" | "tool_result" | "scratchpad_reset" | "llm_start" | "llm_end" | "text_delta" | "finish" | "connected" | "stream_end" | "plan_generated" | "plan_step_completed" | "plan_invalidated" | "replan_started" | "replan_complete" | "plan_execution_complete";
21
21
  requestId: string;
22
22
  timestamp?: number | undefined;
23
23
  }>;
@@ -472,6 +472,283 @@ export declare const errorTelemetryEventSchema: z.ZodObject<{
472
472
  requestId: string;
473
473
  timestamp?: number | undefined;
474
474
  }>;
475
+ /**
476
+ * Plan generated event schema - emitted when a plan is created
477
+ */
478
+ export declare const planGeneratedEventSchema: z.ZodObject<{
479
+ requestId: z.ZodString;
480
+ timestamp: z.ZodOptional<z.ZodNumber>;
481
+ } & {
482
+ type: z.ZodLiteral<"plan_generated">;
483
+ data: z.ZodObject<{
484
+ planId: z.ZodString;
485
+ version: z.ZodNumber;
486
+ complexity: z.ZodEnum<["low", "medium", "high"]>;
487
+ stepCount: z.ZodNumber;
488
+ autoExecutable: z.ZodBoolean;
489
+ recommendedModel: z.ZodString;
490
+ }, "strip", z.ZodTypeAny, {
491
+ complexity: "low" | "medium" | "high";
492
+ recommendedModel: string;
493
+ planId: string;
494
+ version: number;
495
+ autoExecutable: boolean;
496
+ stepCount: number;
497
+ }, {
498
+ complexity: "low" | "medium" | "high";
499
+ recommendedModel: string;
500
+ planId: string;
501
+ version: number;
502
+ autoExecutable: boolean;
503
+ stepCount: number;
504
+ }>;
505
+ }, "strip", z.ZodTypeAny, {
506
+ type: "plan_generated";
507
+ data: {
508
+ complexity: "low" | "medium" | "high";
509
+ recommendedModel: string;
510
+ planId: string;
511
+ version: number;
512
+ autoExecutable: boolean;
513
+ stepCount: number;
514
+ };
515
+ requestId: string;
516
+ timestamp?: number | undefined;
517
+ }, {
518
+ type: "plan_generated";
519
+ data: {
520
+ complexity: "low" | "medium" | "high";
521
+ recommendedModel: string;
522
+ planId: string;
523
+ version: number;
524
+ autoExecutable: boolean;
525
+ stepCount: number;
526
+ };
527
+ requestId: string;
528
+ timestamp?: number | undefined;
529
+ }>;
530
+ /**
531
+ * Plan step completed event schema - emitted when a plan step finishes
532
+ */
533
+ export declare const planStepCompletedEventSchema: z.ZodObject<{
534
+ requestId: z.ZodString;
535
+ timestamp: z.ZodOptional<z.ZodNumber>;
536
+ } & {
537
+ type: z.ZodLiteral<"plan_step_completed">;
538
+ data: z.ZodObject<{
539
+ planId: z.ZodString;
540
+ stepNumber: z.ZodNumber;
541
+ stepDescription: z.ZodString;
542
+ /** Step execution duration in milliseconds */
543
+ duration: z.ZodNumber;
544
+ }, "strip", z.ZodTypeAny, {
545
+ duration: number;
546
+ stepNumber: number;
547
+ planId: string;
548
+ stepDescription: string;
549
+ }, {
550
+ duration: number;
551
+ stepNumber: number;
552
+ planId: string;
553
+ stepDescription: string;
554
+ }>;
555
+ }, "strip", z.ZodTypeAny, {
556
+ type: "plan_step_completed";
557
+ data: {
558
+ duration: number;
559
+ stepNumber: number;
560
+ planId: string;
561
+ stepDescription: string;
562
+ };
563
+ requestId: string;
564
+ timestamp?: number | undefined;
565
+ }, {
566
+ type: "plan_step_completed";
567
+ data: {
568
+ duration: number;
569
+ stepNumber: number;
570
+ planId: string;
571
+ stepDescription: string;
572
+ };
573
+ requestId: string;
574
+ timestamp?: number | undefined;
575
+ }>;
576
+ /**
577
+ * Plan invalidated event schema - emitted when a plan can no longer be executed
578
+ */
579
+ export declare const planInvalidatedEventSchema: z.ZodObject<{
580
+ requestId: z.ZodString;
581
+ timestamp: z.ZodOptional<z.ZodNumber>;
582
+ } & {
583
+ type: z.ZodLiteral<"plan_invalidated">;
584
+ data: z.ZodObject<{
585
+ planId: z.ZodString;
586
+ reason: z.ZodString;
587
+ failedStep: z.ZodNumber;
588
+ completedSteps: z.ZodArray<z.ZodNumber, "many">;
589
+ }, "strip", z.ZodTypeAny, {
590
+ planId: string;
591
+ reason: string;
592
+ failedStep: number;
593
+ completedSteps: number[];
594
+ }, {
595
+ planId: string;
596
+ reason: string;
597
+ failedStep: number;
598
+ completedSteps: number[];
599
+ }>;
600
+ }, "strip", z.ZodTypeAny, {
601
+ type: "plan_invalidated";
602
+ data: {
603
+ planId: string;
604
+ reason: string;
605
+ failedStep: number;
606
+ completedSteps: number[];
607
+ };
608
+ requestId: string;
609
+ timestamp?: number | undefined;
610
+ }, {
611
+ type: "plan_invalidated";
612
+ data: {
613
+ planId: string;
614
+ reason: string;
615
+ failedStep: number;
616
+ completedSteps: number[];
617
+ };
618
+ requestId: string;
619
+ timestamp?: number | undefined;
620
+ }>;
621
+ /**
622
+ * Replan started event schema - emitted when re-planning begins
623
+ */
624
+ export declare const replanStartedEventSchema: z.ZodObject<{
625
+ requestId: z.ZodString;
626
+ timestamp: z.ZodOptional<z.ZodNumber>;
627
+ } & {
628
+ type: z.ZodLiteral<"replan_started">;
629
+ data: z.ZodObject<{
630
+ previousPlanId: z.ZodString;
631
+ reason: z.ZodString;
632
+ }, "strip", z.ZodTypeAny, {
633
+ previousPlanId: string;
634
+ reason: string;
635
+ }, {
636
+ previousPlanId: string;
637
+ reason: string;
638
+ }>;
639
+ }, "strip", z.ZodTypeAny, {
640
+ type: "replan_started";
641
+ data: {
642
+ previousPlanId: string;
643
+ reason: string;
644
+ };
645
+ requestId: string;
646
+ timestamp?: number | undefined;
647
+ }, {
648
+ type: "replan_started";
649
+ data: {
650
+ previousPlanId: string;
651
+ reason: string;
652
+ };
653
+ requestId: string;
654
+ timestamp?: number | undefined;
655
+ }>;
656
+ /**
657
+ * Replan complete event schema - emitted when re-planning finishes
658
+ */
659
+ export declare const replanCompleteEventSchema: z.ZodObject<{
660
+ requestId: z.ZodString;
661
+ timestamp: z.ZodOptional<z.ZodNumber>;
662
+ } & {
663
+ type: z.ZodLiteral<"replan_complete">;
664
+ data: z.ZodObject<{
665
+ previousPlanId: z.ZodString;
666
+ newPlanId: z.ZodString;
667
+ newVersion: z.ZodNumber;
668
+ preservedSteps: z.ZodArray<z.ZodNumber, "many">;
669
+ }, "strip", z.ZodTypeAny, {
670
+ previousPlanId: string;
671
+ preservedSteps: number[];
672
+ newPlanId: string;
673
+ newVersion: number;
674
+ }, {
675
+ previousPlanId: string;
676
+ preservedSteps: number[];
677
+ newPlanId: string;
678
+ newVersion: number;
679
+ }>;
680
+ }, "strip", z.ZodTypeAny, {
681
+ type: "replan_complete";
682
+ data: {
683
+ previousPlanId: string;
684
+ preservedSteps: number[];
685
+ newPlanId: string;
686
+ newVersion: number;
687
+ };
688
+ requestId: string;
689
+ timestamp?: number | undefined;
690
+ }, {
691
+ type: "replan_complete";
692
+ data: {
693
+ previousPlanId: string;
694
+ preservedSteps: number[];
695
+ newPlanId: string;
696
+ newVersion: number;
697
+ };
698
+ requestId: string;
699
+ timestamp?: number | undefined;
700
+ }>;
701
+ /**
702
+ * Plan execution complete event schema - emitted when plan execution finishes
703
+ */
704
+ export declare const planExecutionCompleteEventSchema: z.ZodObject<{
705
+ requestId: z.ZodString;
706
+ timestamp: z.ZodOptional<z.ZodNumber>;
707
+ } & {
708
+ type: z.ZodLiteral<"plan_execution_complete">;
709
+ data: z.ZodObject<{
710
+ planId: z.ZodString;
711
+ status: z.ZodEnum<["success", "partial", "failed"]>;
712
+ completedSteps: z.ZodNumber;
713
+ totalSteps: z.ZodNumber;
714
+ /** Total plan execution duration in milliseconds */
715
+ duration: z.ZodNumber;
716
+ }, "strip", z.ZodTypeAny, {
717
+ status: "failed" | "success" | "partial";
718
+ duration: number;
719
+ planId: string;
720
+ completedSteps: number;
721
+ totalSteps: number;
722
+ }, {
723
+ status: "failed" | "success" | "partial";
724
+ duration: number;
725
+ planId: string;
726
+ completedSteps: number;
727
+ totalSteps: number;
728
+ }>;
729
+ }, "strip", z.ZodTypeAny, {
730
+ type: "plan_execution_complete";
731
+ data: {
732
+ status: "failed" | "success" | "partial";
733
+ duration: number;
734
+ planId: string;
735
+ completedSteps: number;
736
+ totalSteps: number;
737
+ };
738
+ requestId: string;
739
+ timestamp?: number | undefined;
740
+ }, {
741
+ type: "plan_execution_complete";
742
+ data: {
743
+ status: "failed" | "success" | "partial";
744
+ duration: number;
745
+ planId: string;
746
+ completedSteps: number;
747
+ totalSteps: number;
748
+ };
749
+ requestId: string;
750
+ timestamp?: number | undefined;
751
+ }>;
475
752
  /**
476
753
  * Schema for validating telemetry events.
477
754
  * Discriminated union using the "type" field.
@@ -878,6 +1155,259 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
878
1155
  };
879
1156
  requestId: string;
880
1157
  timestamp?: number | undefined;
1158
+ }>, z.ZodObject<{
1159
+ requestId: z.ZodString;
1160
+ timestamp: z.ZodOptional<z.ZodNumber>;
1161
+ } & {
1162
+ type: z.ZodLiteral<"plan_generated">;
1163
+ data: z.ZodObject<{
1164
+ planId: z.ZodString;
1165
+ version: z.ZodNumber;
1166
+ complexity: z.ZodEnum<["low", "medium", "high"]>;
1167
+ stepCount: z.ZodNumber;
1168
+ autoExecutable: z.ZodBoolean;
1169
+ recommendedModel: z.ZodString;
1170
+ }, "strip", z.ZodTypeAny, {
1171
+ complexity: "low" | "medium" | "high";
1172
+ recommendedModel: string;
1173
+ planId: string;
1174
+ version: number;
1175
+ autoExecutable: boolean;
1176
+ stepCount: number;
1177
+ }, {
1178
+ complexity: "low" | "medium" | "high";
1179
+ recommendedModel: string;
1180
+ planId: string;
1181
+ version: number;
1182
+ autoExecutable: boolean;
1183
+ stepCount: number;
1184
+ }>;
1185
+ }, "strip", z.ZodTypeAny, {
1186
+ type: "plan_generated";
1187
+ data: {
1188
+ complexity: "low" | "medium" | "high";
1189
+ recommendedModel: string;
1190
+ planId: string;
1191
+ version: number;
1192
+ autoExecutable: boolean;
1193
+ stepCount: number;
1194
+ };
1195
+ requestId: string;
1196
+ timestamp?: number | undefined;
1197
+ }, {
1198
+ type: "plan_generated";
1199
+ data: {
1200
+ complexity: "low" | "medium" | "high";
1201
+ recommendedModel: string;
1202
+ planId: string;
1203
+ version: number;
1204
+ autoExecutable: boolean;
1205
+ stepCount: number;
1206
+ };
1207
+ requestId: string;
1208
+ timestamp?: number | undefined;
1209
+ }>, z.ZodObject<{
1210
+ requestId: z.ZodString;
1211
+ timestamp: z.ZodOptional<z.ZodNumber>;
1212
+ } & {
1213
+ type: z.ZodLiteral<"plan_step_completed">;
1214
+ data: z.ZodObject<{
1215
+ planId: z.ZodString;
1216
+ stepNumber: z.ZodNumber;
1217
+ stepDescription: z.ZodString;
1218
+ /** Step execution duration in milliseconds */
1219
+ duration: z.ZodNumber;
1220
+ }, "strip", z.ZodTypeAny, {
1221
+ duration: number;
1222
+ stepNumber: number;
1223
+ planId: string;
1224
+ stepDescription: string;
1225
+ }, {
1226
+ duration: number;
1227
+ stepNumber: number;
1228
+ planId: string;
1229
+ stepDescription: string;
1230
+ }>;
1231
+ }, "strip", z.ZodTypeAny, {
1232
+ type: "plan_step_completed";
1233
+ data: {
1234
+ duration: number;
1235
+ stepNumber: number;
1236
+ planId: string;
1237
+ stepDescription: string;
1238
+ };
1239
+ requestId: string;
1240
+ timestamp?: number | undefined;
1241
+ }, {
1242
+ type: "plan_step_completed";
1243
+ data: {
1244
+ duration: number;
1245
+ stepNumber: number;
1246
+ planId: string;
1247
+ stepDescription: string;
1248
+ };
1249
+ requestId: string;
1250
+ timestamp?: number | undefined;
1251
+ }>, z.ZodObject<{
1252
+ requestId: z.ZodString;
1253
+ timestamp: z.ZodOptional<z.ZodNumber>;
1254
+ } & {
1255
+ type: z.ZodLiteral<"plan_invalidated">;
1256
+ data: z.ZodObject<{
1257
+ planId: z.ZodString;
1258
+ reason: z.ZodString;
1259
+ failedStep: z.ZodNumber;
1260
+ completedSteps: z.ZodArray<z.ZodNumber, "many">;
1261
+ }, "strip", z.ZodTypeAny, {
1262
+ planId: string;
1263
+ reason: string;
1264
+ failedStep: number;
1265
+ completedSteps: number[];
1266
+ }, {
1267
+ planId: string;
1268
+ reason: string;
1269
+ failedStep: number;
1270
+ completedSteps: number[];
1271
+ }>;
1272
+ }, "strip", z.ZodTypeAny, {
1273
+ type: "plan_invalidated";
1274
+ data: {
1275
+ planId: string;
1276
+ reason: string;
1277
+ failedStep: number;
1278
+ completedSteps: number[];
1279
+ };
1280
+ requestId: string;
1281
+ timestamp?: number | undefined;
1282
+ }, {
1283
+ type: "plan_invalidated";
1284
+ data: {
1285
+ planId: string;
1286
+ reason: string;
1287
+ failedStep: number;
1288
+ completedSteps: number[];
1289
+ };
1290
+ requestId: string;
1291
+ timestamp?: number | undefined;
1292
+ }>, z.ZodObject<{
1293
+ requestId: z.ZodString;
1294
+ timestamp: z.ZodOptional<z.ZodNumber>;
1295
+ } & {
1296
+ type: z.ZodLiteral<"replan_started">;
1297
+ data: z.ZodObject<{
1298
+ previousPlanId: z.ZodString;
1299
+ reason: z.ZodString;
1300
+ }, "strip", z.ZodTypeAny, {
1301
+ previousPlanId: string;
1302
+ reason: string;
1303
+ }, {
1304
+ previousPlanId: string;
1305
+ reason: string;
1306
+ }>;
1307
+ }, "strip", z.ZodTypeAny, {
1308
+ type: "replan_started";
1309
+ data: {
1310
+ previousPlanId: string;
1311
+ reason: string;
1312
+ };
1313
+ requestId: string;
1314
+ timestamp?: number | undefined;
1315
+ }, {
1316
+ type: "replan_started";
1317
+ data: {
1318
+ previousPlanId: string;
1319
+ reason: string;
1320
+ };
1321
+ requestId: string;
1322
+ timestamp?: number | undefined;
1323
+ }>, z.ZodObject<{
1324
+ requestId: z.ZodString;
1325
+ timestamp: z.ZodOptional<z.ZodNumber>;
1326
+ } & {
1327
+ type: z.ZodLiteral<"replan_complete">;
1328
+ data: z.ZodObject<{
1329
+ previousPlanId: z.ZodString;
1330
+ newPlanId: z.ZodString;
1331
+ newVersion: z.ZodNumber;
1332
+ preservedSteps: z.ZodArray<z.ZodNumber, "many">;
1333
+ }, "strip", z.ZodTypeAny, {
1334
+ previousPlanId: string;
1335
+ preservedSteps: number[];
1336
+ newPlanId: string;
1337
+ newVersion: number;
1338
+ }, {
1339
+ previousPlanId: string;
1340
+ preservedSteps: number[];
1341
+ newPlanId: string;
1342
+ newVersion: number;
1343
+ }>;
1344
+ }, "strip", z.ZodTypeAny, {
1345
+ type: "replan_complete";
1346
+ data: {
1347
+ previousPlanId: string;
1348
+ preservedSteps: number[];
1349
+ newPlanId: string;
1350
+ newVersion: number;
1351
+ };
1352
+ requestId: string;
1353
+ timestamp?: number | undefined;
1354
+ }, {
1355
+ type: "replan_complete";
1356
+ data: {
1357
+ previousPlanId: string;
1358
+ preservedSteps: number[];
1359
+ newPlanId: string;
1360
+ newVersion: number;
1361
+ };
1362
+ requestId: string;
1363
+ timestamp?: number | undefined;
1364
+ }>, z.ZodObject<{
1365
+ requestId: z.ZodString;
1366
+ timestamp: z.ZodOptional<z.ZodNumber>;
1367
+ } & {
1368
+ type: z.ZodLiteral<"plan_execution_complete">;
1369
+ data: z.ZodObject<{
1370
+ planId: z.ZodString;
1371
+ status: z.ZodEnum<["success", "partial", "failed"]>;
1372
+ completedSteps: z.ZodNumber;
1373
+ totalSteps: z.ZodNumber;
1374
+ /** Total plan execution duration in milliseconds */
1375
+ duration: z.ZodNumber;
1376
+ }, "strip", z.ZodTypeAny, {
1377
+ status: "failed" | "success" | "partial";
1378
+ duration: number;
1379
+ planId: string;
1380
+ completedSteps: number;
1381
+ totalSteps: number;
1382
+ }, {
1383
+ status: "failed" | "success" | "partial";
1384
+ duration: number;
1385
+ planId: string;
1386
+ completedSteps: number;
1387
+ totalSteps: number;
1388
+ }>;
1389
+ }, "strip", z.ZodTypeAny, {
1390
+ type: "plan_execution_complete";
1391
+ data: {
1392
+ status: "failed" | "success" | "partial";
1393
+ duration: number;
1394
+ planId: string;
1395
+ completedSteps: number;
1396
+ totalSteps: number;
1397
+ };
1398
+ requestId: string;
1399
+ timestamp?: number | undefined;
1400
+ }, {
1401
+ type: "plan_execution_complete";
1402
+ data: {
1403
+ status: "failed" | "success" | "partial";
1404
+ duration: number;
1405
+ planId: string;
1406
+ completedSteps: number;
1407
+ totalSteps: number;
1408
+ };
1409
+ requestId: string;
1410
+ timestamp?: number | undefined;
881
1411
  }>]>;
882
1412
  /**
883
1413
  * Schema for validating result events from the streaming endpoint.
@@ -890,17 +1420,464 @@ export declare const resultEventDataSchema: z.ZodObject<{
890
1420
  messages: z.ZodArray<z.ZodType<ModelMessage, z.ZodTypeDef, ModelMessage>, "many">;
891
1421
  text: z.ZodString;
892
1422
  pendingTools: z.ZodOptional<z.ZodArray<z.ZodObject<{
1423
+ type: z.ZodLiteral<"tool-call">;
893
1424
  toolCallId: z.ZodString;
894
1425
  toolName: z.ZodString;
895
- toolInput: z.ZodUnknown;
896
- }, "strip", z.ZodTypeAny, {
1426
+ input: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1427
+ type: z.ZodLiteral<"BatchTransactions">;
1428
+ value: z.ZodArray<z.ZodObject<{
1429
+ transaction: z.ZodType<import("viem").PrepareTransactionRequestReturnType>;
1430
+ metadata: z.ZodOptional<z.ZodObject<{
1431
+ explorerUrl: z.ZodOptional<z.ZodString>;
1432
+ usdValue: z.ZodOptional<z.ZodString>;
1433
+ }, "strip", z.ZodTypeAny, {
1434
+ explorerUrl?: string | undefined;
1435
+ usdValue?: string | undefined;
1436
+ }, {
1437
+ explorerUrl?: string | undefined;
1438
+ usdValue?: string | undefined;
1439
+ }>>;
1440
+ }, "strip", z.ZodTypeAny, {
1441
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1442
+ metadata?: {
1443
+ explorerUrl?: string | undefined;
1444
+ usdValue?: string | undefined;
1445
+ } | undefined;
1446
+ }, {
1447
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1448
+ metadata?: {
1449
+ explorerUrl?: string | undefined;
1450
+ usdValue?: string | undefined;
1451
+ } | undefined;
1452
+ }>, "many">;
1453
+ }, "strip", z.ZodTypeAny, {
1454
+ value: {
1455
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1456
+ metadata?: {
1457
+ explorerUrl?: string | undefined;
1458
+ usdValue?: string | undefined;
1459
+ } | undefined;
1460
+ }[];
1461
+ type: "BatchTransactions";
1462
+ }, {
1463
+ value: {
1464
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1465
+ metadata?: {
1466
+ explorerUrl?: string | undefined;
1467
+ usdValue?: string | undefined;
1468
+ } | undefined;
1469
+ }[];
1470
+ type: "BatchTransactions";
1471
+ }>, z.ZodObject<{
1472
+ type: z.ZodLiteral<"SingleTransaction">;
1473
+ value: z.ZodObject<{
1474
+ transaction: z.ZodType<import("viem").PrepareTransactionRequestReturnType>;
1475
+ metadata: z.ZodOptional<z.ZodObject<{
1476
+ explorerUrl: z.ZodOptional<z.ZodString>;
1477
+ usdValue: z.ZodOptional<z.ZodString>;
1478
+ }, "strip", z.ZodTypeAny, {
1479
+ explorerUrl?: string | undefined;
1480
+ usdValue?: string | undefined;
1481
+ }, {
1482
+ explorerUrl?: string | undefined;
1483
+ usdValue?: string | undefined;
1484
+ }>>;
1485
+ }, "strip", z.ZodTypeAny, {
1486
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1487
+ metadata?: {
1488
+ explorerUrl?: string | undefined;
1489
+ usdValue?: string | undefined;
1490
+ } | undefined;
1491
+ }, {
1492
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1493
+ metadata?: {
1494
+ explorerUrl?: string | undefined;
1495
+ usdValue?: string | undefined;
1496
+ } | undefined;
1497
+ }>;
1498
+ }, "strip", z.ZodTypeAny, {
1499
+ value: {
1500
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1501
+ metadata?: {
1502
+ explorerUrl?: string | undefined;
1503
+ usdValue?: string | undefined;
1504
+ } | undefined;
1505
+ };
1506
+ type: "SingleTransaction";
1507
+ }, {
1508
+ value: {
1509
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1510
+ metadata?: {
1511
+ explorerUrl?: string | undefined;
1512
+ usdValue?: string | undefined;
1513
+ } | undefined;
1514
+ };
1515
+ type: "SingleTransaction";
1516
+ }>, z.ZodObject<{
1517
+ type: z.ZodLiteral<"SignatureRequests">;
1518
+ value: z.ZodObject<{
1519
+ signatureRequests: z.ZodArray<z.ZodDiscriminatedUnion<"signMethod", [z.ZodObject<{
1520
+ id: z.ZodString;
1521
+ signerAddress: z.ZodString;
1522
+ description: z.ZodOptional<z.ZodString>;
1523
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1524
+ } & {
1525
+ signMethod: z.ZodLiteral<"typedData">;
1526
+ typedData: z.ZodObject<{
1527
+ types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
1528
+ name: z.ZodString;
1529
+ type: z.ZodString;
1530
+ }, "strip", z.ZodTypeAny, {
1531
+ type: string;
1532
+ name: string;
1533
+ }, {
1534
+ type: string;
1535
+ name: string;
1536
+ }>, "many">>;
1537
+ domain: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1538
+ message: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1539
+ primaryType: z.ZodString;
1540
+ }, "strip", z.ZodTypeAny, {
1541
+ message: Record<string, unknown>;
1542
+ types: Record<string, {
1543
+ type: string;
1544
+ name: string;
1545
+ }[]>;
1546
+ domain: Record<string, unknown>;
1547
+ primaryType: string;
1548
+ }, {
1549
+ message: Record<string, unknown>;
1550
+ types: Record<string, {
1551
+ type: string;
1552
+ name: string;
1553
+ }[]>;
1554
+ domain: Record<string, unknown>;
1555
+ primaryType: string;
1556
+ }>;
1557
+ }, "strip", z.ZodTypeAny, {
1558
+ id: string;
1559
+ signerAddress: string;
1560
+ signMethod: "typedData";
1561
+ typedData: {
1562
+ message: Record<string, unknown>;
1563
+ types: Record<string, {
1564
+ type: string;
1565
+ name: string;
1566
+ }[]>;
1567
+ domain: Record<string, unknown>;
1568
+ primaryType: string;
1569
+ };
1570
+ description?: string | undefined;
1571
+ metadata?: Record<string, unknown> | undefined;
1572
+ }, {
1573
+ id: string;
1574
+ signerAddress: string;
1575
+ signMethod: "typedData";
1576
+ typedData: {
1577
+ message: Record<string, unknown>;
1578
+ types: Record<string, {
1579
+ type: string;
1580
+ name: string;
1581
+ }[]>;
1582
+ domain: Record<string, unknown>;
1583
+ primaryType: string;
1584
+ };
1585
+ description?: string | undefined;
1586
+ metadata?: Record<string, unknown> | undefined;
1587
+ }>, z.ZodObject<{
1588
+ id: z.ZodString;
1589
+ signerAddress: z.ZodString;
1590
+ description: z.ZodOptional<z.ZodString>;
1591
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1592
+ } & {
1593
+ signMethod: z.ZodLiteral<"message">;
1594
+ rawHash: z.ZodString;
1595
+ }, "strip", z.ZodTypeAny, {
1596
+ id: string;
1597
+ signerAddress: string;
1598
+ signMethod: "message";
1599
+ rawHash: string;
1600
+ description?: string | undefined;
1601
+ metadata?: Record<string, unknown> | undefined;
1602
+ }, {
1603
+ id: string;
1604
+ signerAddress: string;
1605
+ signMethod: "message";
1606
+ rawHash: string;
1607
+ description?: string | undefined;
1608
+ metadata?: Record<string, unknown> | undefined;
1609
+ }>]>, "many">;
1610
+ transactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1611
+ transaction: z.ZodType<import("viem").PrepareTransactionRequestReturnType>;
1612
+ metadata: z.ZodOptional<z.ZodObject<{
1613
+ explorerUrl: z.ZodOptional<z.ZodString>;
1614
+ usdValue: z.ZodOptional<z.ZodString>;
1615
+ }, "strip", z.ZodTypeAny, {
1616
+ explorerUrl?: string | undefined;
1617
+ usdValue?: string | undefined;
1618
+ }, {
1619
+ explorerUrl?: string | undefined;
1620
+ usdValue?: string | undefined;
1621
+ }>>;
1622
+ }, "strip", z.ZodTypeAny, {
1623
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1624
+ metadata?: {
1625
+ explorerUrl?: string | undefined;
1626
+ usdValue?: string | undefined;
1627
+ } | undefined;
1628
+ }, {
1629
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1630
+ metadata?: {
1631
+ explorerUrl?: string | undefined;
1632
+ usdValue?: string | undefined;
1633
+ } | undefined;
1634
+ }>, "many">>;
1635
+ }, "strip", z.ZodTypeAny, {
1636
+ signatureRequests: ({
1637
+ id: string;
1638
+ signerAddress: string;
1639
+ signMethod: "typedData";
1640
+ typedData: {
1641
+ message: Record<string, unknown>;
1642
+ types: Record<string, {
1643
+ type: string;
1644
+ name: string;
1645
+ }[]>;
1646
+ domain: Record<string, unknown>;
1647
+ primaryType: string;
1648
+ };
1649
+ description?: string | undefined;
1650
+ metadata?: Record<string, unknown> | undefined;
1651
+ } | {
1652
+ id: string;
1653
+ signerAddress: string;
1654
+ signMethod: "message";
1655
+ rawHash: string;
1656
+ description?: string | undefined;
1657
+ metadata?: Record<string, unknown> | undefined;
1658
+ })[];
1659
+ transactions?: {
1660
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1661
+ metadata?: {
1662
+ explorerUrl?: string | undefined;
1663
+ usdValue?: string | undefined;
1664
+ } | undefined;
1665
+ }[] | undefined;
1666
+ }, {
1667
+ signatureRequests: ({
1668
+ id: string;
1669
+ signerAddress: string;
1670
+ signMethod: "typedData";
1671
+ typedData: {
1672
+ message: Record<string, unknown>;
1673
+ types: Record<string, {
1674
+ type: string;
1675
+ name: string;
1676
+ }[]>;
1677
+ domain: Record<string, unknown>;
1678
+ primaryType: string;
1679
+ };
1680
+ description?: string | undefined;
1681
+ metadata?: Record<string, unknown> | undefined;
1682
+ } | {
1683
+ id: string;
1684
+ signerAddress: string;
1685
+ signMethod: "message";
1686
+ rawHash: string;
1687
+ description?: string | undefined;
1688
+ metadata?: Record<string, unknown> | undefined;
1689
+ })[];
1690
+ transactions?: {
1691
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1692
+ metadata?: {
1693
+ explorerUrl?: string | undefined;
1694
+ usdValue?: string | undefined;
1695
+ } | undefined;
1696
+ }[] | undefined;
1697
+ }>;
1698
+ }, "strip", z.ZodTypeAny, {
1699
+ value: {
1700
+ signatureRequests: ({
1701
+ id: string;
1702
+ signerAddress: string;
1703
+ signMethod: "typedData";
1704
+ typedData: {
1705
+ message: Record<string, unknown>;
1706
+ types: Record<string, {
1707
+ type: string;
1708
+ name: string;
1709
+ }[]>;
1710
+ domain: Record<string, unknown>;
1711
+ primaryType: string;
1712
+ };
1713
+ description?: string | undefined;
1714
+ metadata?: Record<string, unknown> | undefined;
1715
+ } | {
1716
+ id: string;
1717
+ signerAddress: string;
1718
+ signMethod: "message";
1719
+ rawHash: string;
1720
+ description?: string | undefined;
1721
+ metadata?: Record<string, unknown> | undefined;
1722
+ })[];
1723
+ transactions?: {
1724
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1725
+ metadata?: {
1726
+ explorerUrl?: string | undefined;
1727
+ usdValue?: string | undefined;
1728
+ } | undefined;
1729
+ }[] | undefined;
1730
+ };
1731
+ type: "SignatureRequests";
1732
+ }, {
1733
+ value: {
1734
+ signatureRequests: ({
1735
+ id: string;
1736
+ signerAddress: string;
1737
+ signMethod: "typedData";
1738
+ typedData: {
1739
+ message: Record<string, unknown>;
1740
+ types: Record<string, {
1741
+ type: string;
1742
+ name: string;
1743
+ }[]>;
1744
+ domain: Record<string, unknown>;
1745
+ primaryType: string;
1746
+ };
1747
+ description?: string | undefined;
1748
+ metadata?: Record<string, unknown> | undefined;
1749
+ } | {
1750
+ id: string;
1751
+ signerAddress: string;
1752
+ signMethod: "message";
1753
+ rawHash: string;
1754
+ description?: string | undefined;
1755
+ metadata?: Record<string, unknown> | undefined;
1756
+ })[];
1757
+ transactions?: {
1758
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1759
+ metadata?: {
1760
+ explorerUrl?: string | undefined;
1761
+ usdValue?: string | undefined;
1762
+ } | undefined;
1763
+ }[] | undefined;
1764
+ };
1765
+ type: "SignatureRequests";
1766
+ }>]>;
1767
+ }, "strict", z.ZodTypeAny, {
1768
+ type: "tool-call";
1769
+ input: {
1770
+ value: {
1771
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1772
+ metadata?: {
1773
+ explorerUrl?: string | undefined;
1774
+ usdValue?: string | undefined;
1775
+ } | undefined;
1776
+ }[];
1777
+ type: "BatchTransactions";
1778
+ } | {
1779
+ value: {
1780
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1781
+ metadata?: {
1782
+ explorerUrl?: string | undefined;
1783
+ usdValue?: string | undefined;
1784
+ } | undefined;
1785
+ };
1786
+ type: "SingleTransaction";
1787
+ } | {
1788
+ value: {
1789
+ signatureRequests: ({
1790
+ id: string;
1791
+ signerAddress: string;
1792
+ signMethod: "typedData";
1793
+ typedData: {
1794
+ message: Record<string, unknown>;
1795
+ types: Record<string, {
1796
+ type: string;
1797
+ name: string;
1798
+ }[]>;
1799
+ domain: Record<string, unknown>;
1800
+ primaryType: string;
1801
+ };
1802
+ description?: string | undefined;
1803
+ metadata?: Record<string, unknown> | undefined;
1804
+ } | {
1805
+ id: string;
1806
+ signerAddress: string;
1807
+ signMethod: "message";
1808
+ rawHash: string;
1809
+ description?: string | undefined;
1810
+ metadata?: Record<string, unknown> | undefined;
1811
+ })[];
1812
+ transactions?: {
1813
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1814
+ metadata?: {
1815
+ explorerUrl?: string | undefined;
1816
+ usdValue?: string | undefined;
1817
+ } | undefined;
1818
+ }[] | undefined;
1819
+ };
1820
+ type: "SignatureRequests";
1821
+ };
897
1822
  toolCallId: string;
898
1823
  toolName: string;
899
- toolInput?: unknown;
900
1824
  }, {
1825
+ type: "tool-call";
1826
+ input: {
1827
+ value: {
1828
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1829
+ metadata?: {
1830
+ explorerUrl?: string | undefined;
1831
+ usdValue?: string | undefined;
1832
+ } | undefined;
1833
+ }[];
1834
+ type: "BatchTransactions";
1835
+ } | {
1836
+ value: {
1837
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1838
+ metadata?: {
1839
+ explorerUrl?: string | undefined;
1840
+ usdValue?: string | undefined;
1841
+ } | undefined;
1842
+ };
1843
+ type: "SingleTransaction";
1844
+ } | {
1845
+ value: {
1846
+ signatureRequests: ({
1847
+ id: string;
1848
+ signerAddress: string;
1849
+ signMethod: "typedData";
1850
+ typedData: {
1851
+ message: Record<string, unknown>;
1852
+ types: Record<string, {
1853
+ type: string;
1854
+ name: string;
1855
+ }[]>;
1856
+ domain: Record<string, unknown>;
1857
+ primaryType: string;
1858
+ };
1859
+ description?: string | undefined;
1860
+ metadata?: Record<string, unknown> | undefined;
1861
+ } | {
1862
+ id: string;
1863
+ signerAddress: string;
1864
+ signMethod: "message";
1865
+ rawHash: string;
1866
+ description?: string | undefined;
1867
+ metadata?: Record<string, unknown> | undefined;
1868
+ })[];
1869
+ transactions?: {
1870
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1871
+ metadata?: {
1872
+ explorerUrl?: string | undefined;
1873
+ usdValue?: string | undefined;
1874
+ } | undefined;
1875
+ }[] | undefined;
1876
+ };
1877
+ type: "SignatureRequests";
1878
+ };
901
1879
  toolCallId: string;
902
1880
  toolName: string;
903
- toolInput?: unknown;
904
1881
  }>, "many">>;
905
1882
  incompleteTools: z.ZodOptional<z.ZodArray<z.ZodObject<{
906
1883
  toolCallId: z.ZodString;
@@ -916,17 +1893,73 @@ export declare const resultEventDataSchema: z.ZodObject<{
916
1893
  toolInput?: unknown;
917
1894
  }>, "many">>;
918
1895
  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;
1896
+ id: z.ZodString;
1897
+ name: z.ZodString;
1898
+ data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1899
+ type: z.ZodLiteral<"input">;
1900
+ errors: z.ZodArray<z.ZodObject<{
1901
+ path: z.ZodString;
1902
+ message: z.ZodString;
1903
+ }, "strict", z.ZodTypeAny, {
1904
+ path: string;
1905
+ message: string;
1906
+ }, {
1907
+ path: string;
1908
+ message: string;
1909
+ }>, "many">;
1910
+ }, "strict", z.ZodTypeAny, {
1911
+ type: "input";
1912
+ errors: {
1913
+ path: string;
1914
+ message: string;
1915
+ }[];
1916
+ }, {
1917
+ type: "input";
1918
+ errors: {
1919
+ path: string;
1920
+ message: string;
1921
+ }[];
1922
+ }>, z.ZodObject<{
1923
+ type: z.ZodLiteral<"execution">;
1924
+ message: z.ZodString;
1925
+ details: z.ZodOptional<z.ZodUnknown>;
1926
+ }, "strict", z.ZodTypeAny, {
1927
+ message: string;
1928
+ type: "execution";
1929
+ details?: unknown;
1930
+ }, {
1931
+ message: string;
1932
+ type: "execution";
1933
+ details?: unknown;
1934
+ }>]>;
1935
+ }, "strict", z.ZodTypeAny, {
1936
+ id: string;
1937
+ name: string;
1938
+ data: {
1939
+ type: "input";
1940
+ errors: {
1941
+ path: string;
1942
+ message: string;
1943
+ }[];
1944
+ } | {
1945
+ message: string;
1946
+ type: "execution";
1947
+ details?: unknown;
1948
+ };
926
1949
  }, {
927
- error: string;
928
- toolCallId: string;
929
- toolName: string;
1950
+ id: string;
1951
+ name: string;
1952
+ data: {
1953
+ type: "input";
1954
+ errors: {
1955
+ path: string;
1956
+ message: string;
1957
+ }[];
1958
+ } | {
1959
+ message: string;
1960
+ type: "execution";
1961
+ details?: unknown;
1962
+ };
930
1963
  }>, "many">>;
931
1964
  requestId: z.ZodString;
932
1965
  }, "strip", z.ZodTypeAny, {
@@ -936,9 +1969,62 @@ export declare const resultEventDataSchema: z.ZodObject<{
936
1969
  messages: ModelMessage[];
937
1970
  requestId: string;
938
1971
  pendingTools?: {
1972
+ type: "tool-call";
1973
+ input: {
1974
+ value: {
1975
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1976
+ metadata?: {
1977
+ explorerUrl?: string | undefined;
1978
+ usdValue?: string | undefined;
1979
+ } | undefined;
1980
+ }[];
1981
+ type: "BatchTransactions";
1982
+ } | {
1983
+ value: {
1984
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1985
+ metadata?: {
1986
+ explorerUrl?: string | undefined;
1987
+ usdValue?: string | undefined;
1988
+ } | undefined;
1989
+ };
1990
+ type: "SingleTransaction";
1991
+ } | {
1992
+ value: {
1993
+ signatureRequests: ({
1994
+ id: string;
1995
+ signerAddress: string;
1996
+ signMethod: "typedData";
1997
+ typedData: {
1998
+ message: Record<string, unknown>;
1999
+ types: Record<string, {
2000
+ type: string;
2001
+ name: string;
2002
+ }[]>;
2003
+ domain: Record<string, unknown>;
2004
+ primaryType: string;
2005
+ };
2006
+ description?: string | undefined;
2007
+ metadata?: Record<string, unknown> | undefined;
2008
+ } | {
2009
+ id: string;
2010
+ signerAddress: string;
2011
+ signMethod: "message";
2012
+ rawHash: string;
2013
+ description?: string | undefined;
2014
+ metadata?: Record<string, unknown> | undefined;
2015
+ })[];
2016
+ transactions?: {
2017
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2018
+ metadata?: {
2019
+ explorerUrl?: string | undefined;
2020
+ usdValue?: string | undefined;
2021
+ } | undefined;
2022
+ }[] | undefined;
2023
+ };
2024
+ type: "SignatureRequests";
2025
+ };
939
2026
  toolCallId: string;
940
2027
  toolName: string;
941
- toolInput?: unknown;
942
2028
  }[] | undefined;
943
2029
  incompleteTools?: {
944
2030
  toolCallId: string;
@@ -946,9 +2032,19 @@ export declare const resultEventDataSchema: z.ZodObject<{
946
2032
  toolInput?: unknown;
947
2033
  }[] | undefined;
948
2034
  toolErrors?: {
949
- error: string;
950
- toolCallId: string;
951
- toolName: string;
2035
+ id: string;
2036
+ name: string;
2037
+ data: {
2038
+ type: "input";
2039
+ errors: {
2040
+ path: string;
2041
+ message: string;
2042
+ }[];
2043
+ } | {
2044
+ message: string;
2045
+ type: "execution";
2046
+ details?: unknown;
2047
+ };
952
2048
  }[] | undefined;
953
2049
  }, {
954
2050
  type: "result";
@@ -957,9 +2053,62 @@ export declare const resultEventDataSchema: z.ZodObject<{
957
2053
  messages: ModelMessage[];
958
2054
  requestId: string;
959
2055
  pendingTools?: {
2056
+ type: "tool-call";
2057
+ input: {
2058
+ value: {
2059
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2060
+ metadata?: {
2061
+ explorerUrl?: string | undefined;
2062
+ usdValue?: string | undefined;
2063
+ } | undefined;
2064
+ }[];
2065
+ type: "BatchTransactions";
2066
+ } | {
2067
+ value: {
2068
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2069
+ metadata?: {
2070
+ explorerUrl?: string | undefined;
2071
+ usdValue?: string | undefined;
2072
+ } | undefined;
2073
+ };
2074
+ type: "SingleTransaction";
2075
+ } | {
2076
+ value: {
2077
+ signatureRequests: ({
2078
+ id: string;
2079
+ signerAddress: string;
2080
+ signMethod: "typedData";
2081
+ typedData: {
2082
+ message: Record<string, unknown>;
2083
+ types: Record<string, {
2084
+ type: string;
2085
+ name: string;
2086
+ }[]>;
2087
+ domain: Record<string, unknown>;
2088
+ primaryType: string;
2089
+ };
2090
+ description?: string | undefined;
2091
+ metadata?: Record<string, unknown> | undefined;
2092
+ } | {
2093
+ id: string;
2094
+ signerAddress: string;
2095
+ signMethod: "message";
2096
+ rawHash: string;
2097
+ description?: string | undefined;
2098
+ metadata?: Record<string, unknown> | undefined;
2099
+ })[];
2100
+ transactions?: {
2101
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2102
+ metadata?: {
2103
+ explorerUrl?: string | undefined;
2104
+ usdValue?: string | undefined;
2105
+ } | undefined;
2106
+ }[] | undefined;
2107
+ };
2108
+ type: "SignatureRequests";
2109
+ };
960
2110
  toolCallId: string;
961
2111
  toolName: string;
962
- toolInput?: unknown;
963
2112
  }[] | undefined;
964
2113
  incompleteTools?: {
965
2114
  toolCallId: string;
@@ -967,9 +2116,19 @@ export declare const resultEventDataSchema: z.ZodObject<{
967
2116
  toolInput?: unknown;
968
2117
  }[] | undefined;
969
2118
  toolErrors?: {
970
- error: string;
971
- toolCallId: string;
972
- toolName: string;
2119
+ id: string;
2120
+ name: string;
2121
+ data: {
2122
+ type: "input";
2123
+ errors: {
2124
+ path: string;
2125
+ message: string;
2126
+ }[];
2127
+ } | {
2128
+ message: string;
2129
+ type: "execution";
2130
+ details?: unknown;
2131
+ };
973
2132
  }[] | undefined;
974
2133
  }>;
975
2134
  /**
@@ -1032,17 +2191,464 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
1032
2191
  messages: z.ZodArray<z.ZodType<ModelMessage, z.ZodTypeDef, ModelMessage>, "many">;
1033
2192
  text: z.ZodString;
1034
2193
  pendingTools: z.ZodOptional<z.ZodArray<z.ZodObject<{
2194
+ type: z.ZodLiteral<"tool-call">;
1035
2195
  toolCallId: z.ZodString;
1036
2196
  toolName: z.ZodString;
1037
- toolInput: z.ZodUnknown;
1038
- }, "strip", z.ZodTypeAny, {
2197
+ input: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2198
+ type: z.ZodLiteral<"BatchTransactions">;
2199
+ value: z.ZodArray<z.ZodObject<{
2200
+ transaction: z.ZodType<import("viem").PrepareTransactionRequestReturnType>;
2201
+ metadata: z.ZodOptional<z.ZodObject<{
2202
+ explorerUrl: z.ZodOptional<z.ZodString>;
2203
+ usdValue: z.ZodOptional<z.ZodString>;
2204
+ }, "strip", z.ZodTypeAny, {
2205
+ explorerUrl?: string | undefined;
2206
+ usdValue?: string | undefined;
2207
+ }, {
2208
+ explorerUrl?: string | undefined;
2209
+ usdValue?: string | undefined;
2210
+ }>>;
2211
+ }, "strip", z.ZodTypeAny, {
2212
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2213
+ metadata?: {
2214
+ explorerUrl?: string | undefined;
2215
+ usdValue?: string | undefined;
2216
+ } | undefined;
2217
+ }, {
2218
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2219
+ metadata?: {
2220
+ explorerUrl?: string | undefined;
2221
+ usdValue?: string | undefined;
2222
+ } | undefined;
2223
+ }>, "many">;
2224
+ }, "strip", z.ZodTypeAny, {
2225
+ value: {
2226
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2227
+ metadata?: {
2228
+ explorerUrl?: string | undefined;
2229
+ usdValue?: string | undefined;
2230
+ } | undefined;
2231
+ }[];
2232
+ type: "BatchTransactions";
2233
+ }, {
2234
+ value: {
2235
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2236
+ metadata?: {
2237
+ explorerUrl?: string | undefined;
2238
+ usdValue?: string | undefined;
2239
+ } | undefined;
2240
+ }[];
2241
+ type: "BatchTransactions";
2242
+ }>, z.ZodObject<{
2243
+ type: z.ZodLiteral<"SingleTransaction">;
2244
+ value: z.ZodObject<{
2245
+ transaction: z.ZodType<import("viem").PrepareTransactionRequestReturnType>;
2246
+ metadata: z.ZodOptional<z.ZodObject<{
2247
+ explorerUrl: z.ZodOptional<z.ZodString>;
2248
+ usdValue: z.ZodOptional<z.ZodString>;
2249
+ }, "strip", z.ZodTypeAny, {
2250
+ explorerUrl?: string | undefined;
2251
+ usdValue?: string | undefined;
2252
+ }, {
2253
+ explorerUrl?: string | undefined;
2254
+ usdValue?: string | undefined;
2255
+ }>>;
2256
+ }, "strip", z.ZodTypeAny, {
2257
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2258
+ metadata?: {
2259
+ explorerUrl?: string | undefined;
2260
+ usdValue?: string | undefined;
2261
+ } | undefined;
2262
+ }, {
2263
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2264
+ metadata?: {
2265
+ explorerUrl?: string | undefined;
2266
+ usdValue?: string | undefined;
2267
+ } | undefined;
2268
+ }>;
2269
+ }, "strip", z.ZodTypeAny, {
2270
+ value: {
2271
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2272
+ metadata?: {
2273
+ explorerUrl?: string | undefined;
2274
+ usdValue?: string | undefined;
2275
+ } | undefined;
2276
+ };
2277
+ type: "SingleTransaction";
2278
+ }, {
2279
+ value: {
2280
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2281
+ metadata?: {
2282
+ explorerUrl?: string | undefined;
2283
+ usdValue?: string | undefined;
2284
+ } | undefined;
2285
+ };
2286
+ type: "SingleTransaction";
2287
+ }>, z.ZodObject<{
2288
+ type: z.ZodLiteral<"SignatureRequests">;
2289
+ value: z.ZodObject<{
2290
+ signatureRequests: z.ZodArray<z.ZodDiscriminatedUnion<"signMethod", [z.ZodObject<{
2291
+ id: z.ZodString;
2292
+ signerAddress: z.ZodString;
2293
+ description: z.ZodOptional<z.ZodString>;
2294
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2295
+ } & {
2296
+ signMethod: z.ZodLiteral<"typedData">;
2297
+ typedData: z.ZodObject<{
2298
+ types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
2299
+ name: z.ZodString;
2300
+ type: z.ZodString;
2301
+ }, "strip", z.ZodTypeAny, {
2302
+ type: string;
2303
+ name: string;
2304
+ }, {
2305
+ type: string;
2306
+ name: string;
2307
+ }>, "many">>;
2308
+ domain: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2309
+ message: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2310
+ primaryType: z.ZodString;
2311
+ }, "strip", z.ZodTypeAny, {
2312
+ message: Record<string, unknown>;
2313
+ types: Record<string, {
2314
+ type: string;
2315
+ name: string;
2316
+ }[]>;
2317
+ domain: Record<string, unknown>;
2318
+ primaryType: string;
2319
+ }, {
2320
+ message: Record<string, unknown>;
2321
+ types: Record<string, {
2322
+ type: string;
2323
+ name: string;
2324
+ }[]>;
2325
+ domain: Record<string, unknown>;
2326
+ primaryType: string;
2327
+ }>;
2328
+ }, "strip", z.ZodTypeAny, {
2329
+ id: string;
2330
+ signerAddress: string;
2331
+ signMethod: "typedData";
2332
+ typedData: {
2333
+ message: Record<string, unknown>;
2334
+ types: Record<string, {
2335
+ type: string;
2336
+ name: string;
2337
+ }[]>;
2338
+ domain: Record<string, unknown>;
2339
+ primaryType: string;
2340
+ };
2341
+ description?: string | undefined;
2342
+ metadata?: Record<string, unknown> | undefined;
2343
+ }, {
2344
+ id: string;
2345
+ signerAddress: string;
2346
+ signMethod: "typedData";
2347
+ typedData: {
2348
+ message: Record<string, unknown>;
2349
+ types: Record<string, {
2350
+ type: string;
2351
+ name: string;
2352
+ }[]>;
2353
+ domain: Record<string, unknown>;
2354
+ primaryType: string;
2355
+ };
2356
+ description?: string | undefined;
2357
+ metadata?: Record<string, unknown> | undefined;
2358
+ }>, z.ZodObject<{
2359
+ id: z.ZodString;
2360
+ signerAddress: z.ZodString;
2361
+ description: z.ZodOptional<z.ZodString>;
2362
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2363
+ } & {
2364
+ signMethod: z.ZodLiteral<"message">;
2365
+ rawHash: z.ZodString;
2366
+ }, "strip", z.ZodTypeAny, {
2367
+ id: string;
2368
+ signerAddress: string;
2369
+ signMethod: "message";
2370
+ rawHash: string;
2371
+ description?: string | undefined;
2372
+ metadata?: Record<string, unknown> | undefined;
2373
+ }, {
2374
+ id: string;
2375
+ signerAddress: string;
2376
+ signMethod: "message";
2377
+ rawHash: string;
2378
+ description?: string | undefined;
2379
+ metadata?: Record<string, unknown> | undefined;
2380
+ }>]>, "many">;
2381
+ transactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2382
+ transaction: z.ZodType<import("viem").PrepareTransactionRequestReturnType>;
2383
+ metadata: z.ZodOptional<z.ZodObject<{
2384
+ explorerUrl: z.ZodOptional<z.ZodString>;
2385
+ usdValue: z.ZodOptional<z.ZodString>;
2386
+ }, "strip", z.ZodTypeAny, {
2387
+ explorerUrl?: string | undefined;
2388
+ usdValue?: string | undefined;
2389
+ }, {
2390
+ explorerUrl?: string | undefined;
2391
+ usdValue?: string | undefined;
2392
+ }>>;
2393
+ }, "strip", z.ZodTypeAny, {
2394
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2395
+ metadata?: {
2396
+ explorerUrl?: string | undefined;
2397
+ usdValue?: string | undefined;
2398
+ } | undefined;
2399
+ }, {
2400
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2401
+ metadata?: {
2402
+ explorerUrl?: string | undefined;
2403
+ usdValue?: string | undefined;
2404
+ } | undefined;
2405
+ }>, "many">>;
2406
+ }, "strip", z.ZodTypeAny, {
2407
+ signatureRequests: ({
2408
+ id: string;
2409
+ signerAddress: string;
2410
+ signMethod: "typedData";
2411
+ typedData: {
2412
+ message: Record<string, unknown>;
2413
+ types: Record<string, {
2414
+ type: string;
2415
+ name: string;
2416
+ }[]>;
2417
+ domain: Record<string, unknown>;
2418
+ primaryType: string;
2419
+ };
2420
+ description?: string | undefined;
2421
+ metadata?: Record<string, unknown> | undefined;
2422
+ } | {
2423
+ id: string;
2424
+ signerAddress: string;
2425
+ signMethod: "message";
2426
+ rawHash: string;
2427
+ description?: string | undefined;
2428
+ metadata?: Record<string, unknown> | undefined;
2429
+ })[];
2430
+ transactions?: {
2431
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2432
+ metadata?: {
2433
+ explorerUrl?: string | undefined;
2434
+ usdValue?: string | undefined;
2435
+ } | undefined;
2436
+ }[] | undefined;
2437
+ }, {
2438
+ signatureRequests: ({
2439
+ id: string;
2440
+ signerAddress: string;
2441
+ signMethod: "typedData";
2442
+ typedData: {
2443
+ message: Record<string, unknown>;
2444
+ types: Record<string, {
2445
+ type: string;
2446
+ name: string;
2447
+ }[]>;
2448
+ domain: Record<string, unknown>;
2449
+ primaryType: string;
2450
+ };
2451
+ description?: string | undefined;
2452
+ metadata?: Record<string, unknown> | undefined;
2453
+ } | {
2454
+ id: string;
2455
+ signerAddress: string;
2456
+ signMethod: "message";
2457
+ rawHash: string;
2458
+ description?: string | undefined;
2459
+ metadata?: Record<string, unknown> | undefined;
2460
+ })[];
2461
+ transactions?: {
2462
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2463
+ metadata?: {
2464
+ explorerUrl?: string | undefined;
2465
+ usdValue?: string | undefined;
2466
+ } | undefined;
2467
+ }[] | undefined;
2468
+ }>;
2469
+ }, "strip", z.ZodTypeAny, {
2470
+ value: {
2471
+ signatureRequests: ({
2472
+ id: string;
2473
+ signerAddress: string;
2474
+ signMethod: "typedData";
2475
+ typedData: {
2476
+ message: Record<string, unknown>;
2477
+ types: Record<string, {
2478
+ type: string;
2479
+ name: string;
2480
+ }[]>;
2481
+ domain: Record<string, unknown>;
2482
+ primaryType: string;
2483
+ };
2484
+ description?: string | undefined;
2485
+ metadata?: Record<string, unknown> | undefined;
2486
+ } | {
2487
+ id: string;
2488
+ signerAddress: string;
2489
+ signMethod: "message";
2490
+ rawHash: string;
2491
+ description?: string | undefined;
2492
+ metadata?: Record<string, unknown> | undefined;
2493
+ })[];
2494
+ transactions?: {
2495
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2496
+ metadata?: {
2497
+ explorerUrl?: string | undefined;
2498
+ usdValue?: string | undefined;
2499
+ } | undefined;
2500
+ }[] | undefined;
2501
+ };
2502
+ type: "SignatureRequests";
2503
+ }, {
2504
+ value: {
2505
+ signatureRequests: ({
2506
+ id: string;
2507
+ signerAddress: string;
2508
+ signMethod: "typedData";
2509
+ typedData: {
2510
+ message: Record<string, unknown>;
2511
+ types: Record<string, {
2512
+ type: string;
2513
+ name: string;
2514
+ }[]>;
2515
+ domain: Record<string, unknown>;
2516
+ primaryType: string;
2517
+ };
2518
+ description?: string | undefined;
2519
+ metadata?: Record<string, unknown> | undefined;
2520
+ } | {
2521
+ id: string;
2522
+ signerAddress: string;
2523
+ signMethod: "message";
2524
+ rawHash: string;
2525
+ description?: string | undefined;
2526
+ metadata?: Record<string, unknown> | undefined;
2527
+ })[];
2528
+ transactions?: {
2529
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2530
+ metadata?: {
2531
+ explorerUrl?: string | undefined;
2532
+ usdValue?: string | undefined;
2533
+ } | undefined;
2534
+ }[] | undefined;
2535
+ };
2536
+ type: "SignatureRequests";
2537
+ }>]>;
2538
+ }, "strict", z.ZodTypeAny, {
2539
+ type: "tool-call";
2540
+ input: {
2541
+ value: {
2542
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2543
+ metadata?: {
2544
+ explorerUrl?: string | undefined;
2545
+ usdValue?: string | undefined;
2546
+ } | undefined;
2547
+ }[];
2548
+ type: "BatchTransactions";
2549
+ } | {
2550
+ value: {
2551
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2552
+ metadata?: {
2553
+ explorerUrl?: string | undefined;
2554
+ usdValue?: string | undefined;
2555
+ } | undefined;
2556
+ };
2557
+ type: "SingleTransaction";
2558
+ } | {
2559
+ value: {
2560
+ signatureRequests: ({
2561
+ id: string;
2562
+ signerAddress: string;
2563
+ signMethod: "typedData";
2564
+ typedData: {
2565
+ message: Record<string, unknown>;
2566
+ types: Record<string, {
2567
+ type: string;
2568
+ name: string;
2569
+ }[]>;
2570
+ domain: Record<string, unknown>;
2571
+ primaryType: string;
2572
+ };
2573
+ description?: string | undefined;
2574
+ metadata?: Record<string, unknown> | undefined;
2575
+ } | {
2576
+ id: string;
2577
+ signerAddress: string;
2578
+ signMethod: "message";
2579
+ rawHash: string;
2580
+ description?: string | undefined;
2581
+ metadata?: Record<string, unknown> | undefined;
2582
+ })[];
2583
+ transactions?: {
2584
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2585
+ metadata?: {
2586
+ explorerUrl?: string | undefined;
2587
+ usdValue?: string | undefined;
2588
+ } | undefined;
2589
+ }[] | undefined;
2590
+ };
2591
+ type: "SignatureRequests";
2592
+ };
1039
2593
  toolCallId: string;
1040
2594
  toolName: string;
1041
- toolInput?: unknown;
1042
2595
  }, {
2596
+ type: "tool-call";
2597
+ input: {
2598
+ value: {
2599
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2600
+ metadata?: {
2601
+ explorerUrl?: string | undefined;
2602
+ usdValue?: string | undefined;
2603
+ } | undefined;
2604
+ }[];
2605
+ type: "BatchTransactions";
2606
+ } | {
2607
+ value: {
2608
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2609
+ metadata?: {
2610
+ explorerUrl?: string | undefined;
2611
+ usdValue?: string | undefined;
2612
+ } | undefined;
2613
+ };
2614
+ type: "SingleTransaction";
2615
+ } | {
2616
+ value: {
2617
+ signatureRequests: ({
2618
+ id: string;
2619
+ signerAddress: string;
2620
+ signMethod: "typedData";
2621
+ typedData: {
2622
+ message: Record<string, unknown>;
2623
+ types: Record<string, {
2624
+ type: string;
2625
+ name: string;
2626
+ }[]>;
2627
+ domain: Record<string, unknown>;
2628
+ primaryType: string;
2629
+ };
2630
+ description?: string | undefined;
2631
+ metadata?: Record<string, unknown> | undefined;
2632
+ } | {
2633
+ id: string;
2634
+ signerAddress: string;
2635
+ signMethod: "message";
2636
+ rawHash: string;
2637
+ description?: string | undefined;
2638
+ metadata?: Record<string, unknown> | undefined;
2639
+ })[];
2640
+ transactions?: {
2641
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2642
+ metadata?: {
2643
+ explorerUrl?: string | undefined;
2644
+ usdValue?: string | undefined;
2645
+ } | undefined;
2646
+ }[] | undefined;
2647
+ };
2648
+ type: "SignatureRequests";
2649
+ };
1043
2650
  toolCallId: string;
1044
2651
  toolName: string;
1045
- toolInput?: unknown;
1046
2652
  }>, "many">>;
1047
2653
  incompleteTools: z.ZodOptional<z.ZodArray<z.ZodObject<{
1048
2654
  toolCallId: z.ZodString;
@@ -1058,17 +2664,73 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
1058
2664
  toolInput?: unknown;
1059
2665
  }>, "many">>;
1060
2666
  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;
2667
+ id: z.ZodString;
2668
+ name: z.ZodString;
2669
+ data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2670
+ type: z.ZodLiteral<"input">;
2671
+ errors: z.ZodArray<z.ZodObject<{
2672
+ path: z.ZodString;
2673
+ message: z.ZodString;
2674
+ }, "strict", z.ZodTypeAny, {
2675
+ path: string;
2676
+ message: string;
2677
+ }, {
2678
+ path: string;
2679
+ message: string;
2680
+ }>, "many">;
2681
+ }, "strict", z.ZodTypeAny, {
2682
+ type: "input";
2683
+ errors: {
2684
+ path: string;
2685
+ message: string;
2686
+ }[];
2687
+ }, {
2688
+ type: "input";
2689
+ errors: {
2690
+ path: string;
2691
+ message: string;
2692
+ }[];
2693
+ }>, z.ZodObject<{
2694
+ type: z.ZodLiteral<"execution">;
2695
+ message: z.ZodString;
2696
+ details: z.ZodOptional<z.ZodUnknown>;
2697
+ }, "strict", z.ZodTypeAny, {
2698
+ message: string;
2699
+ type: "execution";
2700
+ details?: unknown;
2701
+ }, {
2702
+ message: string;
2703
+ type: "execution";
2704
+ details?: unknown;
2705
+ }>]>;
2706
+ }, "strict", z.ZodTypeAny, {
2707
+ id: string;
2708
+ name: string;
2709
+ data: {
2710
+ type: "input";
2711
+ errors: {
2712
+ path: string;
2713
+ message: string;
2714
+ }[];
2715
+ } | {
2716
+ message: string;
2717
+ type: "execution";
2718
+ details?: unknown;
2719
+ };
1068
2720
  }, {
1069
- error: string;
1070
- toolCallId: string;
1071
- toolName: string;
2721
+ id: string;
2722
+ name: string;
2723
+ data: {
2724
+ type: "input";
2725
+ errors: {
2726
+ path: string;
2727
+ message: string;
2728
+ }[];
2729
+ } | {
2730
+ message: string;
2731
+ type: "execution";
2732
+ details?: unknown;
2733
+ };
1072
2734
  }>, "many">>;
1073
2735
  requestId: z.ZodString;
1074
2736
  }, "strip", z.ZodTypeAny, {
@@ -1078,9 +2740,62 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
1078
2740
  messages: ModelMessage[];
1079
2741
  requestId: string;
1080
2742
  pendingTools?: {
2743
+ type: "tool-call";
2744
+ input: {
2745
+ value: {
2746
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2747
+ metadata?: {
2748
+ explorerUrl?: string | undefined;
2749
+ usdValue?: string | undefined;
2750
+ } | undefined;
2751
+ }[];
2752
+ type: "BatchTransactions";
2753
+ } | {
2754
+ value: {
2755
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2756
+ metadata?: {
2757
+ explorerUrl?: string | undefined;
2758
+ usdValue?: string | undefined;
2759
+ } | undefined;
2760
+ };
2761
+ type: "SingleTransaction";
2762
+ } | {
2763
+ value: {
2764
+ signatureRequests: ({
2765
+ id: string;
2766
+ signerAddress: string;
2767
+ signMethod: "typedData";
2768
+ typedData: {
2769
+ message: Record<string, unknown>;
2770
+ types: Record<string, {
2771
+ type: string;
2772
+ name: string;
2773
+ }[]>;
2774
+ domain: Record<string, unknown>;
2775
+ primaryType: string;
2776
+ };
2777
+ description?: string | undefined;
2778
+ metadata?: Record<string, unknown> | undefined;
2779
+ } | {
2780
+ id: string;
2781
+ signerAddress: string;
2782
+ signMethod: "message";
2783
+ rawHash: string;
2784
+ description?: string | undefined;
2785
+ metadata?: Record<string, unknown> | undefined;
2786
+ })[];
2787
+ transactions?: {
2788
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2789
+ metadata?: {
2790
+ explorerUrl?: string | undefined;
2791
+ usdValue?: string | undefined;
2792
+ } | undefined;
2793
+ }[] | undefined;
2794
+ };
2795
+ type: "SignatureRequests";
2796
+ };
1081
2797
  toolCallId: string;
1082
2798
  toolName: string;
1083
- toolInput?: unknown;
1084
2799
  }[] | undefined;
1085
2800
  incompleteTools?: {
1086
2801
  toolCallId: string;
@@ -1088,9 +2803,19 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
1088
2803
  toolInput?: unknown;
1089
2804
  }[] | undefined;
1090
2805
  toolErrors?: {
1091
- error: string;
1092
- toolCallId: string;
1093
- toolName: string;
2806
+ id: string;
2807
+ name: string;
2808
+ data: {
2809
+ type: "input";
2810
+ errors: {
2811
+ path: string;
2812
+ message: string;
2813
+ }[];
2814
+ } | {
2815
+ message: string;
2816
+ type: "execution";
2817
+ details?: unknown;
2818
+ };
1094
2819
  }[] | undefined;
1095
2820
  }, {
1096
2821
  type: "result";
@@ -1099,9 +2824,62 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
1099
2824
  messages: ModelMessage[];
1100
2825
  requestId: string;
1101
2826
  pendingTools?: {
2827
+ type: "tool-call";
2828
+ input: {
2829
+ value: {
2830
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2831
+ metadata?: {
2832
+ explorerUrl?: string | undefined;
2833
+ usdValue?: string | undefined;
2834
+ } | undefined;
2835
+ }[];
2836
+ type: "BatchTransactions";
2837
+ } | {
2838
+ value: {
2839
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2840
+ metadata?: {
2841
+ explorerUrl?: string | undefined;
2842
+ usdValue?: string | undefined;
2843
+ } | undefined;
2844
+ };
2845
+ type: "SingleTransaction";
2846
+ } | {
2847
+ value: {
2848
+ signatureRequests: ({
2849
+ id: string;
2850
+ signerAddress: string;
2851
+ signMethod: "typedData";
2852
+ typedData: {
2853
+ message: Record<string, unknown>;
2854
+ types: Record<string, {
2855
+ type: string;
2856
+ name: string;
2857
+ }[]>;
2858
+ domain: Record<string, unknown>;
2859
+ primaryType: string;
2860
+ };
2861
+ description?: string | undefined;
2862
+ metadata?: Record<string, unknown> | undefined;
2863
+ } | {
2864
+ id: string;
2865
+ signerAddress: string;
2866
+ signMethod: "message";
2867
+ rawHash: string;
2868
+ description?: string | undefined;
2869
+ metadata?: Record<string, unknown> | undefined;
2870
+ })[];
2871
+ transactions?: {
2872
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2873
+ metadata?: {
2874
+ explorerUrl?: string | undefined;
2875
+ usdValue?: string | undefined;
2876
+ } | undefined;
2877
+ }[] | undefined;
2878
+ };
2879
+ type: "SignatureRequests";
2880
+ };
1102
2881
  toolCallId: string;
1103
2882
  toolName: string;
1104
- toolInput?: unknown;
1105
2883
  }[] | undefined;
1106
2884
  incompleteTools?: {
1107
2885
  toolCallId: string;
@@ -1109,9 +2887,19 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
1109
2887
  toolInput?: unknown;
1110
2888
  }[] | undefined;
1111
2889
  toolErrors?: {
1112
- error: string;
1113
- toolCallId: string;
1114
- toolName: string;
2890
+ id: string;
2891
+ name: string;
2892
+ data: {
2893
+ type: "input";
2894
+ errors: {
2895
+ path: string;
2896
+ message: string;
2897
+ }[];
2898
+ } | {
2899
+ message: string;
2900
+ type: "execution";
2901
+ details?: unknown;
2902
+ };
1115
2903
  }[] | undefined;
1116
2904
  }>, z.ZodObject<{
1117
2905
  type: z.ZodLiteral<"error">;