@illalabs/interfaces 0.2.0 → 0.3.0-canary.9f7bb0cd

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 (34) hide show
  1. package/dist/schemas/chatContext.d.ts +132 -47
  2. package/dist/schemas/chatContext.d.ts.map +1 -1
  3. package/dist/schemas/chatContext.js +2 -2
  4. package/dist/schemas/chatContext.js.map +1 -1
  5. package/dist/schemas/chatRequestBody.d.ts +1667 -67
  6. package/dist/schemas/chatRequestBody.d.ts.map +1 -1
  7. package/dist/schemas/chatRequestBody.js +8 -3
  8. package/dist/schemas/chatRequestBody.js.map +1 -1
  9. package/dist/schemas/executionCheckerQueryParams.d.ts +5 -5
  10. package/dist/schemas/messages.d.ts +162 -55
  11. package/dist/schemas/messages.d.ts.map +1 -1
  12. package/dist/schemas/messages.js +9 -1
  13. package/dist/schemas/messages.js.map +1 -1
  14. package/dist/schemas/toolAutorouter.d.ts +6 -6
  15. package/dist/types/actions/inputs.d.ts +4 -3
  16. package/dist/types/actions/inputs.d.ts.map +1 -1
  17. package/dist/types/actions/tools/{swapBridgeAction.d.ts → bridgeAction.d.ts} +3 -3
  18. package/dist/types/actions/tools/bridgeAction.d.ts.map +1 -0
  19. package/dist/types/actions/tools/bridgeAction.js +2 -0
  20. package/dist/types/actions/tools/bridgeAction.js.map +1 -0
  21. package/dist/types/actions/tools/index.d.ts +6 -3
  22. package/dist/types/actions/tools/index.d.ts.map +1 -1
  23. package/dist/types/actions/tools/swapAction.d.ts +16 -0
  24. package/dist/types/actions/tools/swapAction.d.ts.map +1 -0
  25. package/dist/types/actions/tools/swapAction.js +2 -0
  26. package/dist/types/actions/tools/swapAction.js.map +1 -0
  27. package/dist/utils/constants.d.ts +2 -2
  28. package/dist/utils/constants.d.ts.map +1 -1
  29. package/dist/utils/constants.js +4 -2
  30. package/dist/utils/constants.js.map +1 -1
  31. package/package.json +1 -1
  32. package/dist/types/actions/tools/swapBridgeAction.d.ts.map +0 -1
  33. package/dist/types/actions/tools/swapBridgeAction.js +0 -2
  34. package/dist/types/actions/tools/swapBridgeAction.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
2
+ export declare const CoreApiChatBodyRequestBaseSchema: z.ZodObject<{
3
3
  toolsConfig: z.ZodObject<{
4
4
  autoRouter: z.ZodOptional<z.ZodObject<{
5
5
  defi: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
@@ -29,7 +29,6 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
29
29
  }>]>>;
30
30
  swapOrBridge: z.ZodOptional<z.ZodEnum<["lifi"]>>;
31
31
  }, "strict", z.ZodTypeAny, {
32
- swapOrBridge?: "lifi" | undefined;
33
32
  defi?: {
34
33
  lending: "aave";
35
34
  supply?: undefined;
@@ -39,8 +38,8 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
39
38
  withdraw: "aave";
40
39
  lending?: undefined;
41
40
  } | undefined;
42
- }, {
43
41
  swapOrBridge?: "lifi" | undefined;
42
+ }, {
44
43
  defi?: {
45
44
  lending: "aave";
46
45
  supply?: undefined;
@@ -50,10 +49,10 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
50
49
  withdraw: "aave";
51
50
  lending?: undefined;
52
51
  } | undefined;
52
+ swapOrBridge?: "lifi" | undefined;
53
53
  }>>;
54
54
  }, "strict", z.ZodTypeAny, {
55
55
  autoRouter?: {
56
- swapOrBridge?: "lifi" | undefined;
57
56
  defi?: {
58
57
  lending: "aave";
59
58
  supply?: undefined;
@@ -63,10 +62,10 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
63
62
  withdraw: "aave";
64
63
  lending?: undefined;
65
64
  } | undefined;
65
+ swapOrBridge?: "lifi" | undefined;
66
66
  } | undefined;
67
67
  }, {
68
68
  autoRouter?: {
69
- swapOrBridge?: "lifi" | undefined;
70
69
  defi?: {
71
70
  lending: "aave";
72
71
  supply?: undefined;
@@ -76,6 +75,7 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
76
75
  withdraw: "aave";
77
76
  lending?: undefined;
78
77
  } | undefined;
78
+ swapOrBridge?: "lifi" | undefined;
79
79
  } | undefined;
80
80
  }>;
81
81
  messages: z.ZodArray<z.ZodType<import("@ai-sdk/provider-utils").ModelMessage, z.ZodTypeDef, import("@ai-sdk/provider-utils").ModelMessage>, "many">;
@@ -86,7 +86,7 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
86
86
  }, {
87
87
  address: string;
88
88
  }>;
89
- prompt: z.ZodObject<{
89
+ prompt: z.ZodOptional<z.ZodObject<{
90
90
  role: z.ZodEnum<["user", "assistant", "tool", "system"]>;
91
91
  content: z.ZodArray<z.ZodUnion<[z.ZodObject<{
92
92
  type: z.ZodLiteral<"text">;
@@ -131,28 +131,48 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
131
131
  }>, z.ZodObject<{
132
132
  type: z.ZodLiteral<"tool-call">;
133
133
  toolCallId: z.ZodString;
134
- toolName: z.ZodLiteral<"swapOrBridge">;
135
- args: z.ZodType<import("../external.js").SwapBridgeActionInput>;
134
+ toolName: z.ZodLiteral<"swap">;
135
+ args: z.ZodType<import("../external.js").SwapActionInput>;
136
136
  }, "strict", z.ZodTypeAny, {
137
137
  type: "tool-call";
138
- toolName: "swapOrBridge";
138
+ toolName: "swap";
139
139
  toolCallId: string;
140
140
  args: {
141
141
  fromAddress: string;
142
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
143
142
  fromToken: string;
144
143
  fromAmount: string;
145
144
  protocol: "lifi";
145
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
146
+ toToken?: string | undefined;
146
147
  toAddress?: string | undefined;
148
+ toAmount?: string | undefined;
147
149
  missingParameters?: string[] | undefined;
148
150
  humanFriendlyMessage?: string | undefined;
149
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
151
+ };
152
+ }, {
153
+ type: "tool-call";
154
+ toolName: "swap";
155
+ toolCallId: string;
156
+ args: {
157
+ fromAddress: string;
158
+ fromToken: string;
159
+ fromAmount: string;
160
+ protocol: "lifi";
161
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
150
162
  toToken?: string | undefined;
163
+ toAddress?: string | undefined;
151
164
  toAmount?: string | undefined;
165
+ missingParameters?: string[] | undefined;
166
+ humanFriendlyMessage?: string | undefined;
152
167
  };
153
- }, {
168
+ }>, z.ZodObject<{
169
+ type: z.ZodLiteral<"tool-call">;
170
+ toolCallId: z.ZodString;
171
+ toolName: z.ZodLiteral<"bridge">;
172
+ args: z.ZodType<import("../external.js").BridgeActionInput>;
173
+ }, "strict", z.ZodTypeAny, {
154
174
  type: "tool-call";
155
- toolName: "swapOrBridge";
175
+ toolName: "bridge";
156
176
  toolCallId: string;
157
177
  args: {
158
178
  fromAddress: string;
@@ -160,12 +180,29 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
160
180
  fromToken: string;
161
181
  fromAmount: string;
162
182
  protocol: "lifi";
183
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
184
+ toToken?: string | undefined;
163
185
  toAddress?: string | undefined;
186
+ toAmount?: string | undefined;
164
187
  missingParameters?: string[] | undefined;
165
188
  humanFriendlyMessage?: string | undefined;
189
+ };
190
+ }, {
191
+ type: "tool-call";
192
+ toolName: "bridge";
193
+ toolCallId: string;
194
+ args: {
195
+ fromAddress: string;
196
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
197
+ fromToken: string;
198
+ fromAmount: string;
199
+ protocol: "lifi";
166
200
  toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
167
201
  toToken?: string | undefined;
202
+ toAddress?: string | undefined;
168
203
  toAmount?: string | undefined;
204
+ missingParameters?: string[] | undefined;
205
+ humanFriendlyMessage?: string | undefined;
169
206
  };
170
207
  }>, z.ZodObject<{
171
208
  type: z.ZodLiteral<"tool-call">;
@@ -214,10 +251,10 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
214
251
  args: {
215
252
  address: string;
216
253
  provider: "moralis";
217
- token?: string | undefined;
218
- chain?: string | undefined;
219
254
  missingParameters?: string[] | undefined;
220
255
  humanFriendlyMessage?: string | undefined;
256
+ token?: string | undefined;
257
+ chain?: string | undefined;
221
258
  };
222
259
  }, {
223
260
  type: "tool-call";
@@ -226,10 +263,10 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
226
263
  args: {
227
264
  address: string;
228
265
  provider: "moralis";
229
- token?: string | undefined;
230
- chain?: string | undefined;
231
266
  missingParameters?: string[] | undefined;
232
267
  humanFriendlyMessage?: string | undefined;
268
+ token?: string | undefined;
269
+ chain?: string | undefined;
233
270
  };
234
271
  }>, z.ZodObject<{
235
272
  type: z.ZodLiteral<"tool-call">;
@@ -241,8 +278,8 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
241
278
  toolName: "defiFetchListings";
242
279
  toolCallId: string;
243
280
  args: {
244
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
245
281
  protocol: "aave";
282
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
246
283
  missingParameters?: string[] | undefined;
247
284
  humanFriendlyMessage?: string | undefined;
248
285
  tokens?: string[] | undefined;
@@ -254,8 +291,8 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
254
291
  toolName: "defiFetchListings";
255
292
  toolCallId: string;
256
293
  args: {
257
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
258
294
  protocol: "aave";
295
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
259
296
  missingParameters?: string[] | undefined;
260
297
  humanFriendlyMessage?: string | undefined;
261
298
  tokens?: string[] | undefined;
@@ -272,10 +309,10 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
272
309
  toolName: "defiSupply";
273
310
  toolCallId: string;
274
311
  args: {
312
+ protocol: "aave";
275
313
  amount: string;
276
314
  token: string;
277
315
  chain: string;
278
- protocol: "aave";
279
316
  userAddress: string;
280
317
  missingParameters?: string[] | undefined;
281
318
  humanFriendlyMessage?: string | undefined;
@@ -285,10 +322,10 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
285
322
  toolName: "defiSupply";
286
323
  toolCallId: string;
287
324
  args: {
325
+ protocol: "aave";
288
326
  amount: string;
289
327
  token: string;
290
328
  chain: string;
291
- protocol: "aave";
292
329
  userAddress: string;
293
330
  missingParameters?: string[] | undefined;
294
331
  humanFriendlyMessage?: string | undefined;
@@ -303,10 +340,10 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
303
340
  toolName: "defiWithdraw";
304
341
  toolCallId: string;
305
342
  args: {
343
+ protocol: "aave";
306
344
  amount: string;
307
345
  token: string;
308
346
  chain: string;
309
- protocol: "aave";
310
347
  userAddress: string;
311
348
  missingParameters?: string[] | undefined;
312
349
  humanFriendlyMessage?: string | undefined;
@@ -316,10 +353,10 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
316
353
  toolName: "defiWithdraw";
317
354
  toolCallId: string;
318
355
  args: {
356
+ protocol: "aave";
319
357
  amount: string;
320
358
  token: string;
321
359
  chain: string;
322
- protocol: "aave";
323
360
  userAddress: string;
324
361
  missingParameters?: string[] | undefined;
325
362
  humanFriendlyMessage?: string | undefined;
@@ -334,8 +371,8 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
334
371
  toolName: "defiPositions";
335
372
  toolCallId: string;
336
373
  args: {
337
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
338
374
  protocol: "aave";
375
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
339
376
  userAddress: string;
340
377
  missingParameters?: string[] | undefined;
341
378
  humanFriendlyMessage?: string | undefined;
@@ -346,8 +383,8 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
346
383
  toolName: "defiPositions";
347
384
  toolCallId: string;
348
385
  args: {
349
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
350
386
  protocol: "aave";
387
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
351
388
  userAddress: string;
352
389
  missingParameters?: string[] | undefined;
353
390
  humanFriendlyMessage?: string | undefined;
@@ -425,20 +462,36 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
425
462
  };
426
463
  } | {
427
464
  type: "tool-call";
428
- toolName: "swapOrBridge";
465
+ toolName: "swap";
429
466
  toolCallId: string;
430
467
  args: {
431
468
  fromAddress: string;
432
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
433
469
  fromToken: string;
434
470
  fromAmount: string;
435
471
  protocol: "lifi";
472
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
473
+ toToken?: string | undefined;
436
474
  toAddress?: string | undefined;
475
+ toAmount?: string | undefined;
437
476
  missingParameters?: string[] | undefined;
438
477
  humanFriendlyMessage?: string | undefined;
478
+ };
479
+ } | {
480
+ type: "tool-call";
481
+ toolName: "bridge";
482
+ toolCallId: string;
483
+ args: {
484
+ fromAddress: string;
485
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
486
+ fromToken: string;
487
+ fromAmount: string;
488
+ protocol: "lifi";
439
489
  toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
440
490
  toToken?: string | undefined;
491
+ toAddress?: string | undefined;
441
492
  toAmount?: string | undefined;
493
+ missingParameters?: string[] | undefined;
494
+ humanFriendlyMessage?: string | undefined;
442
495
  };
443
496
  } | {
444
497
  type: "tool-call";
@@ -462,18 +515,18 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
462
515
  args: {
463
516
  address: string;
464
517
  provider: "moralis";
465
- token?: string | undefined;
466
- chain?: string | undefined;
467
518
  missingParameters?: string[] | undefined;
468
519
  humanFriendlyMessage?: string | undefined;
520
+ token?: string | undefined;
521
+ chain?: string | undefined;
469
522
  };
470
523
  } | {
471
524
  type: "tool-call";
472
525
  toolName: "defiFetchListings";
473
526
  toolCallId: string;
474
527
  args: {
475
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
476
528
  protocol: "aave";
529
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
477
530
  missingParameters?: string[] | undefined;
478
531
  humanFriendlyMessage?: string | undefined;
479
532
  tokens?: string[] | undefined;
@@ -485,10 +538,10 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
485
538
  toolName: "defiSupply";
486
539
  toolCallId: string;
487
540
  args: {
541
+ protocol: "aave";
488
542
  amount: string;
489
543
  token: string;
490
544
  chain: string;
491
- protocol: "aave";
492
545
  userAddress: string;
493
546
  missingParameters?: string[] | undefined;
494
547
  humanFriendlyMessage?: string | undefined;
@@ -498,10 +551,10 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
498
551
  toolName: "defiWithdraw";
499
552
  toolCallId: string;
500
553
  args: {
554
+ protocol: "aave";
501
555
  amount: string;
502
556
  token: string;
503
557
  chain: string;
504
- protocol: "aave";
505
558
  userAddress: string;
506
559
  missingParameters?: string[] | undefined;
507
560
  humanFriendlyMessage?: string | undefined;
@@ -511,8 +564,8 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
511
564
  toolName: "defiPositions";
512
565
  toolCallId: string;
513
566
  args: {
514
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
515
567
  protocol: "aave";
568
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
516
569
  userAddress: string;
517
570
  missingParameters?: string[] | undefined;
518
571
  humanFriendlyMessage?: string | undefined;
@@ -556,20 +609,36 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
556
609
  };
557
610
  } | {
558
611
  type: "tool-call";
559
- toolName: "swapOrBridge";
612
+ toolName: "swap";
560
613
  toolCallId: string;
561
614
  args: {
562
615
  fromAddress: string;
563
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
564
616
  fromToken: string;
565
617
  fromAmount: string;
566
618
  protocol: "lifi";
619
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
620
+ toToken?: string | undefined;
567
621
  toAddress?: string | undefined;
622
+ toAmount?: string | undefined;
568
623
  missingParameters?: string[] | undefined;
569
624
  humanFriendlyMessage?: string | undefined;
625
+ };
626
+ } | {
627
+ type: "tool-call";
628
+ toolName: "bridge";
629
+ toolCallId: string;
630
+ args: {
631
+ fromAddress: string;
632
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
633
+ fromToken: string;
634
+ fromAmount: string;
635
+ protocol: "lifi";
570
636
  toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
571
637
  toToken?: string | undefined;
638
+ toAddress?: string | undefined;
572
639
  toAmount?: string | undefined;
640
+ missingParameters?: string[] | undefined;
641
+ humanFriendlyMessage?: string | undefined;
573
642
  };
574
643
  } | {
575
644
  type: "tool-call";
@@ -593,18 +662,18 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
593
662
  args: {
594
663
  address: string;
595
664
  provider: "moralis";
596
- token?: string | undefined;
597
- chain?: string | undefined;
598
665
  missingParameters?: string[] | undefined;
599
666
  humanFriendlyMessage?: string | undefined;
667
+ token?: string | undefined;
668
+ chain?: string | undefined;
600
669
  };
601
670
  } | {
602
671
  type: "tool-call";
603
672
  toolName: "defiFetchListings";
604
673
  toolCallId: string;
605
674
  args: {
606
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
607
675
  protocol: "aave";
676
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
608
677
  missingParameters?: string[] | undefined;
609
678
  humanFriendlyMessage?: string | undefined;
610
679
  tokens?: string[] | undefined;
@@ -616,10 +685,10 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
616
685
  toolName: "defiSupply";
617
686
  toolCallId: string;
618
687
  args: {
688
+ protocol: "aave";
619
689
  amount: string;
620
690
  token: string;
621
691
  chain: string;
622
- protocol: "aave";
623
692
  userAddress: string;
624
693
  missingParameters?: string[] | undefined;
625
694
  humanFriendlyMessage?: string | undefined;
@@ -629,10 +698,10 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
629
698
  toolName: "defiWithdraw";
630
699
  toolCallId: string;
631
700
  args: {
701
+ protocol: "aave";
632
702
  amount: string;
633
703
  token: string;
634
704
  chain: string;
635
- protocol: "aave";
636
705
  userAddress: string;
637
706
  missingParameters?: string[] | undefined;
638
707
  humanFriendlyMessage?: string | undefined;
@@ -642,8 +711,8 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
642
711
  toolName: "defiPositions";
643
712
  toolCallId: string;
644
713
  args: {
645
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
646
714
  protocol: "aave";
715
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
647
716
  userAddress: string;
648
717
  missingParameters?: string[] | undefined;
649
718
  humanFriendlyMessage?: string | undefined;
@@ -667,7 +736,23 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
667
736
  toolCallId: string;
668
737
  error: import("../types/actions/errors.js").ActionError<unknown>;
669
738
  })[];
670
- }>;
739
+ }>>;
740
+ toolResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
741
+ toolCallId: z.ZodString;
742
+ toolName: z.ZodString;
743
+ result: z.ZodUnknown;
744
+ error: z.ZodOptional<z.ZodUnknown>;
745
+ }, "strict", z.ZodTypeAny, {
746
+ toolName: string;
747
+ toolCallId: string;
748
+ result?: unknown;
749
+ error?: unknown;
750
+ }, {
751
+ toolName: string;
752
+ toolCallId: string;
753
+ result?: unknown;
754
+ error?: unknown;
755
+ }>, "many">>;
671
756
  languageModel: z.ZodOptional<z.ZodString>;
672
757
  personalityContext: z.ZodDefault<z.ZodOptional<z.ZodObject<{
673
758
  channel: z.ZodEnum<["voice", "text"]>;
@@ -679,7 +764,6 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
679
764
  }, "strict", z.ZodTypeAny, {
680
765
  toolsConfig: {
681
766
  autoRouter?: {
682
- swapOrBridge?: "lifi" | undefined;
683
767
  defi?: {
684
768
  lending: "aave";
685
769
  supply?: undefined;
@@ -689,13 +773,17 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
689
773
  withdraw: "aave";
690
774
  lending?: undefined;
691
775
  } | undefined;
776
+ swapOrBridge?: "lifi" | undefined;
692
777
  } | undefined;
693
778
  };
694
779
  messages: import("@ai-sdk/provider-utils").ModelMessage[];
695
780
  userContext: {
696
781
  address: `0x${string}`;
697
782
  };
698
- prompt: {
783
+ personalityContext: {
784
+ channel: "text" | "voice";
785
+ };
786
+ prompt?: {
699
787
  role: "user" | "assistant" | "tool" | "system";
700
788
  content: ({
701
789
  type: "text";
@@ -715,20 +803,36 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
715
803
  };
716
804
  } | {
717
805
  type: "tool-call";
718
- toolName: "swapOrBridge";
806
+ toolName: "swap";
719
807
  toolCallId: string;
720
808
  args: {
721
809
  fromAddress: string;
722
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
723
810
  fromToken: string;
724
811
  fromAmount: string;
725
812
  protocol: "lifi";
813
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
814
+ toToken?: string | undefined;
726
815
  toAddress?: string | undefined;
816
+ toAmount?: string | undefined;
727
817
  missingParameters?: string[] | undefined;
728
818
  humanFriendlyMessage?: string | undefined;
819
+ };
820
+ } | {
821
+ type: "tool-call";
822
+ toolName: "bridge";
823
+ toolCallId: string;
824
+ args: {
825
+ fromAddress: string;
826
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
827
+ fromToken: string;
828
+ fromAmount: string;
829
+ protocol: "lifi";
729
830
  toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
730
831
  toToken?: string | undefined;
832
+ toAddress?: string | undefined;
731
833
  toAmount?: string | undefined;
834
+ missingParameters?: string[] | undefined;
835
+ humanFriendlyMessage?: string | undefined;
732
836
  };
733
837
  } | {
734
838
  type: "tool-call";
@@ -752,18 +856,18 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
752
856
  args: {
753
857
  address: string;
754
858
  provider: "moralis";
755
- token?: string | undefined;
756
- chain?: string | undefined;
757
859
  missingParameters?: string[] | undefined;
758
860
  humanFriendlyMessage?: string | undefined;
861
+ token?: string | undefined;
862
+ chain?: string | undefined;
759
863
  };
760
864
  } | {
761
865
  type: "tool-call";
762
866
  toolName: "defiFetchListings";
763
867
  toolCallId: string;
764
868
  args: {
765
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
766
869
  protocol: "aave";
870
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
767
871
  missingParameters?: string[] | undefined;
768
872
  humanFriendlyMessage?: string | undefined;
769
873
  tokens?: string[] | undefined;
@@ -775,10 +879,10 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
775
879
  toolName: "defiSupply";
776
880
  toolCallId: string;
777
881
  args: {
882
+ protocol: "aave";
778
883
  amount: string;
779
884
  token: string;
780
885
  chain: string;
781
- protocol: "aave";
782
886
  userAddress: string;
783
887
  missingParameters?: string[] | undefined;
784
888
  humanFriendlyMessage?: string | undefined;
@@ -788,10 +892,10 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
788
892
  toolName: "defiWithdraw";
789
893
  toolCallId: string;
790
894
  args: {
895
+ protocol: "aave";
791
896
  amount: string;
792
897
  token: string;
793
898
  chain: string;
794
- protocol: "aave";
795
899
  userAddress: string;
796
900
  missingParameters?: string[] | undefined;
797
901
  humanFriendlyMessage?: string | undefined;
@@ -801,8 +905,8 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
801
905
  toolName: "defiPositions";
802
906
  toolCallId: string;
803
907
  args: {
804
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
805
908
  protocol: "aave";
909
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
806
910
  userAddress: string;
807
911
  missingParameters?: string[] | undefined;
808
912
  humanFriendlyMessage?: string | undefined;
@@ -826,15 +930,17 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
826
930
  toolCallId: string;
827
931
  error: import("../types/actions/errors.js").ActionError<unknown>;
828
932
  })[];
829
- };
830
- personalityContext: {
831
- channel: "text" | "voice";
832
- };
933
+ } | undefined;
934
+ toolResults?: {
935
+ toolName: string;
936
+ toolCallId: string;
937
+ result?: unknown;
938
+ error?: unknown;
939
+ }[] | undefined;
833
940
  languageModel?: string | undefined;
834
941
  }, {
835
942
  toolsConfig: {
836
943
  autoRouter?: {
837
- swapOrBridge?: "lifi" | undefined;
838
944
  defi?: {
839
945
  lending: "aave";
840
946
  supply?: undefined;
@@ -844,13 +950,14 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
844
950
  withdraw: "aave";
845
951
  lending?: undefined;
846
952
  } | undefined;
953
+ swapOrBridge?: "lifi" | undefined;
847
954
  } | undefined;
848
955
  };
849
956
  messages: import("@ai-sdk/provider-utils").ModelMessage[];
850
957
  userContext: {
851
958
  address: string;
852
959
  };
853
- prompt: {
960
+ prompt?: {
854
961
  role: "user" | "assistant" | "tool" | "system";
855
962
  content: ({
856
963
  type: "text";
@@ -870,20 +977,36 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
870
977
  };
871
978
  } | {
872
979
  type: "tool-call";
873
- toolName: "swapOrBridge";
980
+ toolName: "swap";
874
981
  toolCallId: string;
875
982
  args: {
876
983
  fromAddress: string;
877
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
878
984
  fromToken: string;
879
985
  fromAmount: string;
880
986
  protocol: "lifi";
987
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
988
+ toToken?: string | undefined;
881
989
  toAddress?: string | undefined;
990
+ toAmount?: string | undefined;
882
991
  missingParameters?: string[] | undefined;
883
992
  humanFriendlyMessage?: string | undefined;
993
+ };
994
+ } | {
995
+ type: "tool-call";
996
+ toolName: "bridge";
997
+ toolCallId: string;
998
+ args: {
999
+ fromAddress: string;
1000
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1001
+ fromToken: string;
1002
+ fromAmount: string;
1003
+ protocol: "lifi";
884
1004
  toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
885
1005
  toToken?: string | undefined;
1006
+ toAddress?: string | undefined;
886
1007
  toAmount?: string | undefined;
1008
+ missingParameters?: string[] | undefined;
1009
+ humanFriendlyMessage?: string | undefined;
887
1010
  };
888
1011
  } | {
889
1012
  type: "tool-call";
@@ -907,18 +1030,18 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
907
1030
  args: {
908
1031
  address: string;
909
1032
  provider: "moralis";
910
- token?: string | undefined;
911
- chain?: string | undefined;
912
1033
  missingParameters?: string[] | undefined;
913
1034
  humanFriendlyMessage?: string | undefined;
1035
+ token?: string | undefined;
1036
+ chain?: string | undefined;
914
1037
  };
915
1038
  } | {
916
1039
  type: "tool-call";
917
1040
  toolName: "defiFetchListings";
918
1041
  toolCallId: string;
919
1042
  args: {
920
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
921
1043
  protocol: "aave";
1044
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
922
1045
  missingParameters?: string[] | undefined;
923
1046
  humanFriendlyMessage?: string | undefined;
924
1047
  tokens?: string[] | undefined;
@@ -930,10 +1053,10 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
930
1053
  toolName: "defiSupply";
931
1054
  toolCallId: string;
932
1055
  args: {
1056
+ protocol: "aave";
933
1057
  amount: string;
934
1058
  token: string;
935
1059
  chain: string;
936
- protocol: "aave";
937
1060
  userAddress: string;
938
1061
  missingParameters?: string[] | undefined;
939
1062
  humanFriendlyMessage?: string | undefined;
@@ -943,10 +1066,10 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
943
1066
  toolName: "defiWithdraw";
944
1067
  toolCallId: string;
945
1068
  args: {
1069
+ protocol: "aave";
946
1070
  amount: string;
947
1071
  token: string;
948
1072
  chain: string;
949
- protocol: "aave";
950
1073
  userAddress: string;
951
1074
  missingParameters?: string[] | undefined;
952
1075
  humanFriendlyMessage?: string | undefined;
@@ -956,8 +1079,8 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
956
1079
  toolName: "defiPositions";
957
1080
  toolCallId: string;
958
1081
  args: {
959
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
960
1082
  protocol: "aave";
1083
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
961
1084
  userAddress: string;
962
1085
  missingParameters?: string[] | undefined;
963
1086
  humanFriendlyMessage?: string | undefined;
@@ -981,7 +1104,1484 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
981
1104
  toolCallId: string;
982
1105
  error: import("../types/actions/errors.js").ActionError<unknown>;
983
1106
  })[];
984
- };
1107
+ } | undefined;
1108
+ toolResults?: {
1109
+ toolName: string;
1110
+ toolCallId: string;
1111
+ result?: unknown;
1112
+ error?: unknown;
1113
+ }[] | undefined;
1114
+ languageModel?: string | undefined;
1115
+ personalityContext?: {
1116
+ channel: "text" | "voice";
1117
+ } | undefined;
1118
+ }>;
1119
+ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
1120
+ toolsConfig: z.ZodObject<{
1121
+ autoRouter: z.ZodOptional<z.ZodObject<{
1122
+ defi: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
1123
+ lending: z.ZodEnum<["aave"]>;
1124
+ supply: z.ZodOptional<z.ZodNever>;
1125
+ withdraw: z.ZodOptional<z.ZodNever>;
1126
+ }, "strict", z.ZodTypeAny, {
1127
+ lending: "aave";
1128
+ supply?: undefined;
1129
+ withdraw?: undefined;
1130
+ }, {
1131
+ lending: "aave";
1132
+ supply?: undefined;
1133
+ withdraw?: undefined;
1134
+ }>, z.ZodObject<{
1135
+ lending: z.ZodOptional<z.ZodNever>;
1136
+ supply: z.ZodEnum<["aave"]>;
1137
+ withdraw: z.ZodEnum<["aave"]>;
1138
+ }, "strict", z.ZodTypeAny, {
1139
+ supply: "aave";
1140
+ withdraw: "aave";
1141
+ lending?: undefined;
1142
+ }, {
1143
+ supply: "aave";
1144
+ withdraw: "aave";
1145
+ lending?: undefined;
1146
+ }>]>>;
1147
+ swapOrBridge: z.ZodOptional<z.ZodEnum<["lifi"]>>;
1148
+ }, "strict", z.ZodTypeAny, {
1149
+ defi?: {
1150
+ lending: "aave";
1151
+ supply?: undefined;
1152
+ withdraw?: undefined;
1153
+ } | {
1154
+ supply: "aave";
1155
+ withdraw: "aave";
1156
+ lending?: undefined;
1157
+ } | undefined;
1158
+ swapOrBridge?: "lifi" | undefined;
1159
+ }, {
1160
+ defi?: {
1161
+ lending: "aave";
1162
+ supply?: undefined;
1163
+ withdraw?: undefined;
1164
+ } | {
1165
+ supply: "aave";
1166
+ withdraw: "aave";
1167
+ lending?: undefined;
1168
+ } | undefined;
1169
+ swapOrBridge?: "lifi" | undefined;
1170
+ }>>;
1171
+ }, "strict", z.ZodTypeAny, {
1172
+ autoRouter?: {
1173
+ defi?: {
1174
+ lending: "aave";
1175
+ supply?: undefined;
1176
+ withdraw?: undefined;
1177
+ } | {
1178
+ supply: "aave";
1179
+ withdraw: "aave";
1180
+ lending?: undefined;
1181
+ } | undefined;
1182
+ swapOrBridge?: "lifi" | undefined;
1183
+ } | undefined;
1184
+ }, {
1185
+ autoRouter?: {
1186
+ defi?: {
1187
+ lending: "aave";
1188
+ supply?: undefined;
1189
+ withdraw?: undefined;
1190
+ } | {
1191
+ supply: "aave";
1192
+ withdraw: "aave";
1193
+ lending?: undefined;
1194
+ } | undefined;
1195
+ swapOrBridge?: "lifi" | undefined;
1196
+ } | undefined;
1197
+ }>;
1198
+ messages: z.ZodArray<z.ZodType<import("@ai-sdk/provider-utils").ModelMessage, z.ZodTypeDef, import("@ai-sdk/provider-utils").ModelMessage>, "many">;
1199
+ userContext: z.ZodObject<{
1200
+ address: z.ZodEffects<z.ZodString, `0x${string}`, string>;
1201
+ }, "strict", z.ZodTypeAny, {
1202
+ address: `0x${string}`;
1203
+ }, {
1204
+ address: string;
1205
+ }>;
1206
+ prompt: z.ZodOptional<z.ZodObject<{
1207
+ role: z.ZodEnum<["user", "assistant", "tool", "system"]>;
1208
+ content: z.ZodArray<z.ZodUnion<[z.ZodObject<{
1209
+ type: z.ZodLiteral<"text">;
1210
+ text: z.ZodString;
1211
+ }, "strict", z.ZodTypeAny, {
1212
+ type: "text";
1213
+ text: string;
1214
+ }, {
1215
+ type: "text";
1216
+ text: string;
1217
+ }>, z.ZodDiscriminatedUnion<"toolName", [z.ZodObject<{
1218
+ type: z.ZodLiteral<"tool-call">;
1219
+ toolCallId: z.ZodString;
1220
+ toolName: z.ZodLiteral<"tokenTransfer">;
1221
+ args: z.ZodType<import("../external.js").TokenTransferActionInput>;
1222
+ }, "strict", z.ZodTypeAny, {
1223
+ type: "tool-call";
1224
+ toolName: "tokenTransfer";
1225
+ toolCallId: string;
1226
+ args: {
1227
+ fromAddress: string;
1228
+ toAddress: string;
1229
+ amount: string;
1230
+ token: string;
1231
+ chain: string;
1232
+ missingParameters?: string[] | undefined;
1233
+ humanFriendlyMessage?: string | undefined;
1234
+ };
1235
+ }, {
1236
+ type: "tool-call";
1237
+ toolName: "tokenTransfer";
1238
+ toolCallId: string;
1239
+ args: {
1240
+ fromAddress: string;
1241
+ toAddress: string;
1242
+ amount: string;
1243
+ token: string;
1244
+ chain: string;
1245
+ missingParameters?: string[] | undefined;
1246
+ humanFriendlyMessage?: string | undefined;
1247
+ };
1248
+ }>, z.ZodObject<{
1249
+ type: z.ZodLiteral<"tool-call">;
1250
+ toolCallId: z.ZodString;
1251
+ toolName: z.ZodLiteral<"swap">;
1252
+ args: z.ZodType<import("../external.js").SwapActionInput>;
1253
+ }, "strict", z.ZodTypeAny, {
1254
+ type: "tool-call";
1255
+ toolName: "swap";
1256
+ toolCallId: string;
1257
+ args: {
1258
+ fromAddress: string;
1259
+ fromToken: string;
1260
+ fromAmount: string;
1261
+ protocol: "lifi";
1262
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1263
+ toToken?: string | undefined;
1264
+ toAddress?: string | undefined;
1265
+ toAmount?: string | undefined;
1266
+ missingParameters?: string[] | undefined;
1267
+ humanFriendlyMessage?: string | undefined;
1268
+ };
1269
+ }, {
1270
+ type: "tool-call";
1271
+ toolName: "swap";
1272
+ toolCallId: string;
1273
+ args: {
1274
+ fromAddress: string;
1275
+ fromToken: string;
1276
+ fromAmount: string;
1277
+ protocol: "lifi";
1278
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1279
+ toToken?: string | undefined;
1280
+ toAddress?: string | undefined;
1281
+ toAmount?: string | undefined;
1282
+ missingParameters?: string[] | undefined;
1283
+ humanFriendlyMessage?: string | undefined;
1284
+ };
1285
+ }>, z.ZodObject<{
1286
+ type: z.ZodLiteral<"tool-call">;
1287
+ toolCallId: z.ZodString;
1288
+ toolName: z.ZodLiteral<"bridge">;
1289
+ args: z.ZodType<import("../external.js").BridgeActionInput>;
1290
+ }, "strict", z.ZodTypeAny, {
1291
+ type: "tool-call";
1292
+ toolName: "bridge";
1293
+ toolCallId: string;
1294
+ args: {
1295
+ fromAddress: string;
1296
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1297
+ fromToken: string;
1298
+ fromAmount: string;
1299
+ protocol: "lifi";
1300
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
1301
+ toToken?: string | undefined;
1302
+ toAddress?: string | undefined;
1303
+ toAmount?: string | undefined;
1304
+ missingParameters?: string[] | undefined;
1305
+ humanFriendlyMessage?: string | undefined;
1306
+ };
1307
+ }, {
1308
+ type: "tool-call";
1309
+ toolName: "bridge";
1310
+ toolCallId: string;
1311
+ args: {
1312
+ fromAddress: string;
1313
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1314
+ fromToken: string;
1315
+ fromAmount: string;
1316
+ protocol: "lifi";
1317
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
1318
+ toToken?: string | undefined;
1319
+ toAddress?: string | undefined;
1320
+ toAmount?: string | undefined;
1321
+ missingParameters?: string[] | undefined;
1322
+ humanFriendlyMessage?: string | undefined;
1323
+ };
1324
+ }>, z.ZodObject<{
1325
+ type: z.ZodLiteral<"tool-call">;
1326
+ toolCallId: z.ZodString;
1327
+ toolName: z.ZodLiteral<"exchangeRate">;
1328
+ args: z.ZodType<import("../external.js").ExchangeRateActionInput>;
1329
+ }, "strict", z.ZodTypeAny, {
1330
+ type: "tool-call";
1331
+ toolName: "exchangeRate";
1332
+ toolCallId: string;
1333
+ args: {
1334
+ provider: "coinMarketCap";
1335
+ arguments: {
1336
+ baseCurrency: string;
1337
+ quoteCurrency: string;
1338
+ baseAmount?: string | undefined;
1339
+ quoteAmount?: string | undefined;
1340
+ }[];
1341
+ missingParameters?: string[] | undefined;
1342
+ humanFriendlyMessage?: string | undefined;
1343
+ };
1344
+ }, {
1345
+ type: "tool-call";
1346
+ toolName: "exchangeRate";
1347
+ toolCallId: string;
1348
+ args: {
1349
+ provider: "coinMarketCap";
1350
+ arguments: {
1351
+ baseCurrency: string;
1352
+ quoteCurrency: string;
1353
+ baseAmount?: string | undefined;
1354
+ quoteAmount?: string | undefined;
1355
+ }[];
1356
+ missingParameters?: string[] | undefined;
1357
+ humanFriendlyMessage?: string | undefined;
1358
+ };
1359
+ }>, z.ZodObject<{
1360
+ type: z.ZodLiteral<"tool-call">;
1361
+ toolCallId: z.ZodString;
1362
+ toolName: z.ZodLiteral<"getWalletBalance">;
1363
+ args: z.ZodType<import("../external.js").GetWalletBalanceActionInput>;
1364
+ }, "strict", z.ZodTypeAny, {
1365
+ type: "tool-call";
1366
+ toolName: "getWalletBalance";
1367
+ toolCallId: string;
1368
+ args: {
1369
+ address: string;
1370
+ provider: "moralis";
1371
+ missingParameters?: string[] | undefined;
1372
+ humanFriendlyMessage?: string | undefined;
1373
+ token?: string | undefined;
1374
+ chain?: string | undefined;
1375
+ };
1376
+ }, {
1377
+ type: "tool-call";
1378
+ toolName: "getWalletBalance";
1379
+ toolCallId: string;
1380
+ args: {
1381
+ address: string;
1382
+ provider: "moralis";
1383
+ missingParameters?: string[] | undefined;
1384
+ humanFriendlyMessage?: string | undefined;
1385
+ token?: string | undefined;
1386
+ chain?: string | undefined;
1387
+ };
1388
+ }>, z.ZodObject<{
1389
+ type: z.ZodLiteral<"tool-call">;
1390
+ toolCallId: z.ZodString;
1391
+ toolName: z.ZodLiteral<"defiFetchListings">;
1392
+ args: z.ZodType<import("../external.js").DefiFetchListingsActionInput>;
1393
+ }, "strict", z.ZodTypeAny, {
1394
+ type: "tool-call";
1395
+ toolName: "defiFetchListings";
1396
+ toolCallId: string;
1397
+ args: {
1398
+ protocol: "aave";
1399
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1400
+ missingParameters?: string[] | undefined;
1401
+ humanFriendlyMessage?: string | undefined;
1402
+ tokens?: string[] | undefined;
1403
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
1404
+ limit?: number | undefined;
1405
+ };
1406
+ }, {
1407
+ type: "tool-call";
1408
+ toolName: "defiFetchListings";
1409
+ toolCallId: string;
1410
+ args: {
1411
+ protocol: "aave";
1412
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1413
+ missingParameters?: string[] | undefined;
1414
+ humanFriendlyMessage?: string | undefined;
1415
+ tokens?: string[] | undefined;
1416
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
1417
+ limit?: number | undefined;
1418
+ };
1419
+ }>, z.ZodObject<{
1420
+ type: z.ZodLiteral<"tool-call">;
1421
+ toolCallId: z.ZodString;
1422
+ toolName: z.ZodLiteral<"defiSupply">;
1423
+ args: z.ZodType<import("../external.js").DefiSupplyActionInput>;
1424
+ }, "strict", z.ZodTypeAny, {
1425
+ type: "tool-call";
1426
+ toolName: "defiSupply";
1427
+ toolCallId: string;
1428
+ args: {
1429
+ protocol: "aave";
1430
+ amount: string;
1431
+ token: string;
1432
+ chain: string;
1433
+ userAddress: string;
1434
+ missingParameters?: string[] | undefined;
1435
+ humanFriendlyMessage?: string | undefined;
1436
+ };
1437
+ }, {
1438
+ type: "tool-call";
1439
+ toolName: "defiSupply";
1440
+ toolCallId: string;
1441
+ args: {
1442
+ protocol: "aave";
1443
+ amount: string;
1444
+ token: string;
1445
+ chain: string;
1446
+ userAddress: string;
1447
+ missingParameters?: string[] | undefined;
1448
+ humanFriendlyMessage?: string | undefined;
1449
+ };
1450
+ }>, z.ZodObject<{
1451
+ type: z.ZodLiteral<"tool-call">;
1452
+ toolCallId: z.ZodString;
1453
+ toolName: z.ZodLiteral<"defiWithdraw">;
1454
+ args: z.ZodType<import("../external.js").DefiWithdrawActionInput>;
1455
+ }, "strict", z.ZodTypeAny, {
1456
+ type: "tool-call";
1457
+ toolName: "defiWithdraw";
1458
+ toolCallId: string;
1459
+ args: {
1460
+ protocol: "aave";
1461
+ amount: string;
1462
+ token: string;
1463
+ chain: string;
1464
+ userAddress: string;
1465
+ missingParameters?: string[] | undefined;
1466
+ humanFriendlyMessage?: string | undefined;
1467
+ };
1468
+ }, {
1469
+ type: "tool-call";
1470
+ toolName: "defiWithdraw";
1471
+ toolCallId: string;
1472
+ args: {
1473
+ protocol: "aave";
1474
+ amount: string;
1475
+ token: string;
1476
+ chain: string;
1477
+ userAddress: string;
1478
+ missingParameters?: string[] | undefined;
1479
+ humanFriendlyMessage?: string | undefined;
1480
+ };
1481
+ }>, z.ZodObject<{
1482
+ type: z.ZodLiteral<"tool-call">;
1483
+ toolCallId: z.ZodString;
1484
+ toolName: z.ZodLiteral<"defiPositions">;
1485
+ args: z.ZodType<import("../external.js").DefiPositionsActionInput>;
1486
+ }, "strict", z.ZodTypeAny, {
1487
+ type: "tool-call";
1488
+ toolName: "defiPositions";
1489
+ toolCallId: string;
1490
+ args: {
1491
+ protocol: "aave";
1492
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1493
+ userAddress: string;
1494
+ missingParameters?: string[] | undefined;
1495
+ humanFriendlyMessage?: string | undefined;
1496
+ tokens?: string[] | undefined;
1497
+ };
1498
+ }, {
1499
+ type: "tool-call";
1500
+ toolName: "defiPositions";
1501
+ toolCallId: string;
1502
+ args: {
1503
+ protocol: "aave";
1504
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1505
+ userAddress: string;
1506
+ missingParameters?: string[] | undefined;
1507
+ humanFriendlyMessage?: string | undefined;
1508
+ tokens?: string[] | undefined;
1509
+ };
1510
+ }>]>, z.ZodObject<{
1511
+ type: z.ZodLiteral<"tool-result">;
1512
+ toolCallId: z.ZodString;
1513
+ toolName: z.ZodString;
1514
+ result: z.ZodUnknown;
1515
+ }, "strict", z.ZodTypeAny, {
1516
+ type: "tool-result";
1517
+ toolName: string;
1518
+ toolCallId: string;
1519
+ result?: unknown;
1520
+ }, {
1521
+ type: "tool-result";
1522
+ toolName: string;
1523
+ toolCallId: string;
1524
+ result?: unknown;
1525
+ }>, z.ZodObject<{
1526
+ type: z.ZodLiteral<"tool-incomplete">;
1527
+ toolCallId: z.ZodString;
1528
+ toolName: z.ZodString;
1529
+ args: z.ZodUnknown;
1530
+ missingParams: z.ZodArray<z.ZodString, "many">;
1531
+ humanReadableDescription: z.ZodString;
1532
+ }, "strict", z.ZodTypeAny, {
1533
+ type: "tool-incomplete";
1534
+ toolName: string;
1535
+ toolCallId: string;
1536
+ missingParams: string[];
1537
+ humanReadableDescription: string;
1538
+ args?: unknown;
1539
+ }, {
1540
+ type: "tool-incomplete";
1541
+ toolName: string;
1542
+ toolCallId: string;
1543
+ missingParams: string[];
1544
+ humanReadableDescription: string;
1545
+ args?: unknown;
1546
+ }>, z.ZodObject<{
1547
+ type: z.ZodLiteral<"tool-error">;
1548
+ toolCallId: z.ZodString;
1549
+ toolName: z.ZodString;
1550
+ error: z.ZodType<import("../types/actions/errors.js").ActionError<unknown>>;
1551
+ }, "strict", z.ZodTypeAny, {
1552
+ type: "tool-error";
1553
+ toolName: string;
1554
+ toolCallId: string;
1555
+ error: import("../types/actions/errors.js").ActionError<unknown>;
1556
+ }, {
1557
+ type: "tool-error";
1558
+ toolName: string;
1559
+ toolCallId: string;
1560
+ error: import("../types/actions/errors.js").ActionError<unknown>;
1561
+ }>]>, "many">;
1562
+ }, "strict", z.ZodTypeAny, {
1563
+ role: "user" | "assistant" | "tool" | "system";
1564
+ content: ({
1565
+ type: "text";
1566
+ text: string;
1567
+ } | {
1568
+ type: "tool-call";
1569
+ toolName: "tokenTransfer";
1570
+ toolCallId: string;
1571
+ args: {
1572
+ fromAddress: string;
1573
+ toAddress: string;
1574
+ amount: string;
1575
+ token: string;
1576
+ chain: string;
1577
+ missingParameters?: string[] | undefined;
1578
+ humanFriendlyMessage?: string | undefined;
1579
+ };
1580
+ } | {
1581
+ type: "tool-call";
1582
+ toolName: "swap";
1583
+ toolCallId: string;
1584
+ args: {
1585
+ fromAddress: string;
1586
+ fromToken: string;
1587
+ fromAmount: string;
1588
+ protocol: "lifi";
1589
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1590
+ toToken?: string | undefined;
1591
+ toAddress?: string | undefined;
1592
+ toAmount?: string | undefined;
1593
+ missingParameters?: string[] | undefined;
1594
+ humanFriendlyMessage?: string | undefined;
1595
+ };
1596
+ } | {
1597
+ type: "tool-call";
1598
+ toolName: "bridge";
1599
+ toolCallId: string;
1600
+ args: {
1601
+ fromAddress: string;
1602
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1603
+ fromToken: string;
1604
+ fromAmount: string;
1605
+ protocol: "lifi";
1606
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
1607
+ toToken?: string | undefined;
1608
+ toAddress?: string | undefined;
1609
+ toAmount?: string | undefined;
1610
+ missingParameters?: string[] | undefined;
1611
+ humanFriendlyMessage?: string | undefined;
1612
+ };
1613
+ } | {
1614
+ type: "tool-call";
1615
+ toolName: "exchangeRate";
1616
+ toolCallId: string;
1617
+ args: {
1618
+ provider: "coinMarketCap";
1619
+ arguments: {
1620
+ baseCurrency: string;
1621
+ quoteCurrency: string;
1622
+ baseAmount?: string | undefined;
1623
+ quoteAmount?: string | undefined;
1624
+ }[];
1625
+ missingParameters?: string[] | undefined;
1626
+ humanFriendlyMessage?: string | undefined;
1627
+ };
1628
+ } | {
1629
+ type: "tool-call";
1630
+ toolName: "getWalletBalance";
1631
+ toolCallId: string;
1632
+ args: {
1633
+ address: string;
1634
+ provider: "moralis";
1635
+ missingParameters?: string[] | undefined;
1636
+ humanFriendlyMessage?: string | undefined;
1637
+ token?: string | undefined;
1638
+ chain?: string | undefined;
1639
+ };
1640
+ } | {
1641
+ type: "tool-call";
1642
+ toolName: "defiFetchListings";
1643
+ toolCallId: string;
1644
+ args: {
1645
+ protocol: "aave";
1646
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1647
+ missingParameters?: string[] | undefined;
1648
+ humanFriendlyMessage?: string | undefined;
1649
+ tokens?: string[] | undefined;
1650
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
1651
+ limit?: number | undefined;
1652
+ };
1653
+ } | {
1654
+ type: "tool-call";
1655
+ toolName: "defiSupply";
1656
+ toolCallId: string;
1657
+ args: {
1658
+ protocol: "aave";
1659
+ amount: string;
1660
+ token: string;
1661
+ chain: string;
1662
+ userAddress: string;
1663
+ missingParameters?: string[] | undefined;
1664
+ humanFriendlyMessage?: string | undefined;
1665
+ };
1666
+ } | {
1667
+ type: "tool-call";
1668
+ toolName: "defiWithdraw";
1669
+ toolCallId: string;
1670
+ args: {
1671
+ protocol: "aave";
1672
+ amount: string;
1673
+ token: string;
1674
+ chain: string;
1675
+ userAddress: string;
1676
+ missingParameters?: string[] | undefined;
1677
+ humanFriendlyMessage?: string | undefined;
1678
+ };
1679
+ } | {
1680
+ type: "tool-call";
1681
+ toolName: "defiPositions";
1682
+ toolCallId: string;
1683
+ args: {
1684
+ protocol: "aave";
1685
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1686
+ userAddress: string;
1687
+ missingParameters?: string[] | undefined;
1688
+ humanFriendlyMessage?: string | undefined;
1689
+ tokens?: string[] | undefined;
1690
+ };
1691
+ } | {
1692
+ type: "tool-result";
1693
+ toolName: string;
1694
+ toolCallId: string;
1695
+ result?: unknown;
1696
+ } | {
1697
+ type: "tool-incomplete";
1698
+ toolName: string;
1699
+ toolCallId: string;
1700
+ missingParams: string[];
1701
+ humanReadableDescription: string;
1702
+ args?: unknown;
1703
+ } | {
1704
+ type: "tool-error";
1705
+ toolName: string;
1706
+ toolCallId: string;
1707
+ error: import("../types/actions/errors.js").ActionError<unknown>;
1708
+ })[];
1709
+ }, {
1710
+ role: "user" | "assistant" | "tool" | "system";
1711
+ content: ({
1712
+ type: "text";
1713
+ text: string;
1714
+ } | {
1715
+ type: "tool-call";
1716
+ toolName: "tokenTransfer";
1717
+ toolCallId: string;
1718
+ args: {
1719
+ fromAddress: string;
1720
+ toAddress: string;
1721
+ amount: string;
1722
+ token: string;
1723
+ chain: string;
1724
+ missingParameters?: string[] | undefined;
1725
+ humanFriendlyMessage?: string | undefined;
1726
+ };
1727
+ } | {
1728
+ type: "tool-call";
1729
+ toolName: "swap";
1730
+ toolCallId: string;
1731
+ args: {
1732
+ fromAddress: string;
1733
+ fromToken: string;
1734
+ fromAmount: string;
1735
+ protocol: "lifi";
1736
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1737
+ toToken?: string | undefined;
1738
+ toAddress?: string | undefined;
1739
+ toAmount?: string | undefined;
1740
+ missingParameters?: string[] | undefined;
1741
+ humanFriendlyMessage?: string | undefined;
1742
+ };
1743
+ } | {
1744
+ type: "tool-call";
1745
+ toolName: "bridge";
1746
+ toolCallId: string;
1747
+ args: {
1748
+ fromAddress: string;
1749
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1750
+ fromToken: string;
1751
+ fromAmount: string;
1752
+ protocol: "lifi";
1753
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
1754
+ toToken?: string | undefined;
1755
+ toAddress?: string | undefined;
1756
+ toAmount?: string | undefined;
1757
+ missingParameters?: string[] | undefined;
1758
+ humanFriendlyMessage?: string | undefined;
1759
+ };
1760
+ } | {
1761
+ type: "tool-call";
1762
+ toolName: "exchangeRate";
1763
+ toolCallId: string;
1764
+ args: {
1765
+ provider: "coinMarketCap";
1766
+ arguments: {
1767
+ baseCurrency: string;
1768
+ quoteCurrency: string;
1769
+ baseAmount?: string | undefined;
1770
+ quoteAmount?: string | undefined;
1771
+ }[];
1772
+ missingParameters?: string[] | undefined;
1773
+ humanFriendlyMessage?: string | undefined;
1774
+ };
1775
+ } | {
1776
+ type: "tool-call";
1777
+ toolName: "getWalletBalance";
1778
+ toolCallId: string;
1779
+ args: {
1780
+ address: string;
1781
+ provider: "moralis";
1782
+ missingParameters?: string[] | undefined;
1783
+ humanFriendlyMessage?: string | undefined;
1784
+ token?: string | undefined;
1785
+ chain?: string | undefined;
1786
+ };
1787
+ } | {
1788
+ type: "tool-call";
1789
+ toolName: "defiFetchListings";
1790
+ toolCallId: string;
1791
+ args: {
1792
+ protocol: "aave";
1793
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1794
+ missingParameters?: string[] | undefined;
1795
+ humanFriendlyMessage?: string | undefined;
1796
+ tokens?: string[] | undefined;
1797
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
1798
+ limit?: number | undefined;
1799
+ };
1800
+ } | {
1801
+ type: "tool-call";
1802
+ toolName: "defiSupply";
1803
+ toolCallId: string;
1804
+ args: {
1805
+ protocol: "aave";
1806
+ amount: string;
1807
+ token: string;
1808
+ chain: string;
1809
+ userAddress: string;
1810
+ missingParameters?: string[] | undefined;
1811
+ humanFriendlyMessage?: string | undefined;
1812
+ };
1813
+ } | {
1814
+ type: "tool-call";
1815
+ toolName: "defiWithdraw";
1816
+ toolCallId: string;
1817
+ args: {
1818
+ protocol: "aave";
1819
+ amount: string;
1820
+ token: string;
1821
+ chain: string;
1822
+ userAddress: string;
1823
+ missingParameters?: string[] | undefined;
1824
+ humanFriendlyMessage?: string | undefined;
1825
+ };
1826
+ } | {
1827
+ type: "tool-call";
1828
+ toolName: "defiPositions";
1829
+ toolCallId: string;
1830
+ args: {
1831
+ protocol: "aave";
1832
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1833
+ userAddress: string;
1834
+ missingParameters?: string[] | undefined;
1835
+ humanFriendlyMessage?: string | undefined;
1836
+ tokens?: string[] | undefined;
1837
+ };
1838
+ } | {
1839
+ type: "tool-result";
1840
+ toolName: string;
1841
+ toolCallId: string;
1842
+ result?: unknown;
1843
+ } | {
1844
+ type: "tool-incomplete";
1845
+ toolName: string;
1846
+ toolCallId: string;
1847
+ missingParams: string[];
1848
+ humanReadableDescription: string;
1849
+ args?: unknown;
1850
+ } | {
1851
+ type: "tool-error";
1852
+ toolName: string;
1853
+ toolCallId: string;
1854
+ error: import("../types/actions/errors.js").ActionError<unknown>;
1855
+ })[];
1856
+ }>>;
1857
+ toolResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
1858
+ toolCallId: z.ZodString;
1859
+ toolName: z.ZodString;
1860
+ result: z.ZodUnknown;
1861
+ error: z.ZodOptional<z.ZodUnknown>;
1862
+ }, "strict", z.ZodTypeAny, {
1863
+ toolName: string;
1864
+ toolCallId: string;
1865
+ result?: unknown;
1866
+ error?: unknown;
1867
+ }, {
1868
+ toolName: string;
1869
+ toolCallId: string;
1870
+ result?: unknown;
1871
+ error?: unknown;
1872
+ }>, "many">>;
1873
+ languageModel: z.ZodOptional<z.ZodString>;
1874
+ personalityContext: z.ZodDefault<z.ZodOptional<z.ZodObject<{
1875
+ channel: z.ZodEnum<["voice", "text"]>;
1876
+ }, "strip", z.ZodTypeAny, {
1877
+ channel: "text" | "voice";
1878
+ }, {
1879
+ channel: "text" | "voice";
1880
+ }>>>;
1881
+ }, "strict", z.ZodTypeAny, {
1882
+ toolsConfig: {
1883
+ autoRouter?: {
1884
+ defi?: {
1885
+ lending: "aave";
1886
+ supply?: undefined;
1887
+ withdraw?: undefined;
1888
+ } | {
1889
+ supply: "aave";
1890
+ withdraw: "aave";
1891
+ lending?: undefined;
1892
+ } | undefined;
1893
+ swapOrBridge?: "lifi" | undefined;
1894
+ } | undefined;
1895
+ };
1896
+ messages: import("@ai-sdk/provider-utils").ModelMessage[];
1897
+ userContext: {
1898
+ address: `0x${string}`;
1899
+ };
1900
+ personalityContext: {
1901
+ channel: "text" | "voice";
1902
+ };
1903
+ prompt?: {
1904
+ role: "user" | "assistant" | "tool" | "system";
1905
+ content: ({
1906
+ type: "text";
1907
+ text: string;
1908
+ } | {
1909
+ type: "tool-call";
1910
+ toolName: "tokenTransfer";
1911
+ toolCallId: string;
1912
+ args: {
1913
+ fromAddress: string;
1914
+ toAddress: string;
1915
+ amount: string;
1916
+ token: string;
1917
+ chain: string;
1918
+ missingParameters?: string[] | undefined;
1919
+ humanFriendlyMessage?: string | undefined;
1920
+ };
1921
+ } | {
1922
+ type: "tool-call";
1923
+ toolName: "swap";
1924
+ toolCallId: string;
1925
+ args: {
1926
+ fromAddress: string;
1927
+ fromToken: string;
1928
+ fromAmount: string;
1929
+ protocol: "lifi";
1930
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1931
+ toToken?: string | undefined;
1932
+ toAddress?: string | undefined;
1933
+ toAmount?: string | undefined;
1934
+ missingParameters?: string[] | undefined;
1935
+ humanFriendlyMessage?: string | undefined;
1936
+ };
1937
+ } | {
1938
+ type: "tool-call";
1939
+ toolName: "bridge";
1940
+ toolCallId: string;
1941
+ args: {
1942
+ fromAddress: string;
1943
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1944
+ fromToken: string;
1945
+ fromAmount: string;
1946
+ protocol: "lifi";
1947
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
1948
+ toToken?: string | undefined;
1949
+ toAddress?: string | undefined;
1950
+ toAmount?: string | undefined;
1951
+ missingParameters?: string[] | undefined;
1952
+ humanFriendlyMessage?: string | undefined;
1953
+ };
1954
+ } | {
1955
+ type: "tool-call";
1956
+ toolName: "exchangeRate";
1957
+ toolCallId: string;
1958
+ args: {
1959
+ provider: "coinMarketCap";
1960
+ arguments: {
1961
+ baseCurrency: string;
1962
+ quoteCurrency: string;
1963
+ baseAmount?: string | undefined;
1964
+ quoteAmount?: string | undefined;
1965
+ }[];
1966
+ missingParameters?: string[] | undefined;
1967
+ humanFriendlyMessage?: string | undefined;
1968
+ };
1969
+ } | {
1970
+ type: "tool-call";
1971
+ toolName: "getWalletBalance";
1972
+ toolCallId: string;
1973
+ args: {
1974
+ address: string;
1975
+ provider: "moralis";
1976
+ missingParameters?: string[] | undefined;
1977
+ humanFriendlyMessage?: string | undefined;
1978
+ token?: string | undefined;
1979
+ chain?: string | undefined;
1980
+ };
1981
+ } | {
1982
+ type: "tool-call";
1983
+ toolName: "defiFetchListings";
1984
+ toolCallId: string;
1985
+ args: {
1986
+ protocol: "aave";
1987
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1988
+ missingParameters?: string[] | undefined;
1989
+ humanFriendlyMessage?: string | undefined;
1990
+ tokens?: string[] | undefined;
1991
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
1992
+ limit?: number | undefined;
1993
+ };
1994
+ } | {
1995
+ type: "tool-call";
1996
+ toolName: "defiSupply";
1997
+ toolCallId: string;
1998
+ args: {
1999
+ protocol: "aave";
2000
+ amount: string;
2001
+ token: string;
2002
+ chain: string;
2003
+ userAddress: string;
2004
+ missingParameters?: string[] | undefined;
2005
+ humanFriendlyMessage?: string | undefined;
2006
+ };
2007
+ } | {
2008
+ type: "tool-call";
2009
+ toolName: "defiWithdraw";
2010
+ toolCallId: string;
2011
+ args: {
2012
+ protocol: "aave";
2013
+ amount: string;
2014
+ token: string;
2015
+ chain: string;
2016
+ userAddress: string;
2017
+ missingParameters?: string[] | undefined;
2018
+ humanFriendlyMessage?: string | undefined;
2019
+ };
2020
+ } | {
2021
+ type: "tool-call";
2022
+ toolName: "defiPositions";
2023
+ toolCallId: string;
2024
+ args: {
2025
+ protocol: "aave";
2026
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2027
+ userAddress: string;
2028
+ missingParameters?: string[] | undefined;
2029
+ humanFriendlyMessage?: string | undefined;
2030
+ tokens?: string[] | undefined;
2031
+ };
2032
+ } | {
2033
+ type: "tool-result";
2034
+ toolName: string;
2035
+ toolCallId: string;
2036
+ result?: unknown;
2037
+ } | {
2038
+ type: "tool-incomplete";
2039
+ toolName: string;
2040
+ toolCallId: string;
2041
+ missingParams: string[];
2042
+ humanReadableDescription: string;
2043
+ args?: unknown;
2044
+ } | {
2045
+ type: "tool-error";
2046
+ toolName: string;
2047
+ toolCallId: string;
2048
+ error: import("../types/actions/errors.js").ActionError<unknown>;
2049
+ })[];
2050
+ } | undefined;
2051
+ toolResults?: {
2052
+ toolName: string;
2053
+ toolCallId: string;
2054
+ result?: unknown;
2055
+ error?: unknown;
2056
+ }[] | undefined;
2057
+ languageModel?: string | undefined;
2058
+ }, {
2059
+ toolsConfig: {
2060
+ autoRouter?: {
2061
+ defi?: {
2062
+ lending: "aave";
2063
+ supply?: undefined;
2064
+ withdraw?: undefined;
2065
+ } | {
2066
+ supply: "aave";
2067
+ withdraw: "aave";
2068
+ lending?: undefined;
2069
+ } | undefined;
2070
+ swapOrBridge?: "lifi" | undefined;
2071
+ } | undefined;
2072
+ };
2073
+ messages: import("@ai-sdk/provider-utils").ModelMessage[];
2074
+ userContext: {
2075
+ address: string;
2076
+ };
2077
+ prompt?: {
2078
+ role: "user" | "assistant" | "tool" | "system";
2079
+ content: ({
2080
+ type: "text";
2081
+ text: string;
2082
+ } | {
2083
+ type: "tool-call";
2084
+ toolName: "tokenTransfer";
2085
+ toolCallId: string;
2086
+ args: {
2087
+ fromAddress: string;
2088
+ toAddress: string;
2089
+ amount: string;
2090
+ token: string;
2091
+ chain: string;
2092
+ missingParameters?: string[] | undefined;
2093
+ humanFriendlyMessage?: string | undefined;
2094
+ };
2095
+ } | {
2096
+ type: "tool-call";
2097
+ toolName: "swap";
2098
+ toolCallId: string;
2099
+ args: {
2100
+ fromAddress: string;
2101
+ fromToken: string;
2102
+ fromAmount: string;
2103
+ protocol: "lifi";
2104
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2105
+ toToken?: string | undefined;
2106
+ toAddress?: string | undefined;
2107
+ toAmount?: string | undefined;
2108
+ missingParameters?: string[] | undefined;
2109
+ humanFriendlyMessage?: string | undefined;
2110
+ };
2111
+ } | {
2112
+ type: "tool-call";
2113
+ toolName: "bridge";
2114
+ toolCallId: string;
2115
+ args: {
2116
+ fromAddress: string;
2117
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2118
+ fromToken: string;
2119
+ fromAmount: string;
2120
+ protocol: "lifi";
2121
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
2122
+ toToken?: string | undefined;
2123
+ toAddress?: string | undefined;
2124
+ toAmount?: string | undefined;
2125
+ missingParameters?: string[] | undefined;
2126
+ humanFriendlyMessage?: string | undefined;
2127
+ };
2128
+ } | {
2129
+ type: "tool-call";
2130
+ toolName: "exchangeRate";
2131
+ toolCallId: string;
2132
+ args: {
2133
+ provider: "coinMarketCap";
2134
+ arguments: {
2135
+ baseCurrency: string;
2136
+ quoteCurrency: string;
2137
+ baseAmount?: string | undefined;
2138
+ quoteAmount?: string | undefined;
2139
+ }[];
2140
+ missingParameters?: string[] | undefined;
2141
+ humanFriendlyMessage?: string | undefined;
2142
+ };
2143
+ } | {
2144
+ type: "tool-call";
2145
+ toolName: "getWalletBalance";
2146
+ toolCallId: string;
2147
+ args: {
2148
+ address: string;
2149
+ provider: "moralis";
2150
+ missingParameters?: string[] | undefined;
2151
+ humanFriendlyMessage?: string | undefined;
2152
+ token?: string | undefined;
2153
+ chain?: string | undefined;
2154
+ };
2155
+ } | {
2156
+ type: "tool-call";
2157
+ toolName: "defiFetchListings";
2158
+ toolCallId: string;
2159
+ args: {
2160
+ protocol: "aave";
2161
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2162
+ missingParameters?: string[] | undefined;
2163
+ humanFriendlyMessage?: string | undefined;
2164
+ tokens?: string[] | undefined;
2165
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
2166
+ limit?: number | undefined;
2167
+ };
2168
+ } | {
2169
+ type: "tool-call";
2170
+ toolName: "defiSupply";
2171
+ toolCallId: string;
2172
+ args: {
2173
+ protocol: "aave";
2174
+ amount: string;
2175
+ token: string;
2176
+ chain: string;
2177
+ userAddress: string;
2178
+ missingParameters?: string[] | undefined;
2179
+ humanFriendlyMessage?: string | undefined;
2180
+ };
2181
+ } | {
2182
+ type: "tool-call";
2183
+ toolName: "defiWithdraw";
2184
+ toolCallId: string;
2185
+ args: {
2186
+ protocol: "aave";
2187
+ amount: string;
2188
+ token: string;
2189
+ chain: string;
2190
+ userAddress: string;
2191
+ missingParameters?: string[] | undefined;
2192
+ humanFriendlyMessage?: string | undefined;
2193
+ };
2194
+ } | {
2195
+ type: "tool-call";
2196
+ toolName: "defiPositions";
2197
+ toolCallId: string;
2198
+ args: {
2199
+ protocol: "aave";
2200
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2201
+ userAddress: string;
2202
+ missingParameters?: string[] | undefined;
2203
+ humanFriendlyMessage?: string | undefined;
2204
+ tokens?: string[] | undefined;
2205
+ };
2206
+ } | {
2207
+ type: "tool-result";
2208
+ toolName: string;
2209
+ toolCallId: string;
2210
+ result?: unknown;
2211
+ } | {
2212
+ type: "tool-incomplete";
2213
+ toolName: string;
2214
+ toolCallId: string;
2215
+ missingParams: string[];
2216
+ humanReadableDescription: string;
2217
+ args?: unknown;
2218
+ } | {
2219
+ type: "tool-error";
2220
+ toolName: string;
2221
+ toolCallId: string;
2222
+ error: import("../types/actions/errors.js").ActionError<unknown>;
2223
+ })[];
2224
+ } | undefined;
2225
+ toolResults?: {
2226
+ toolName: string;
2227
+ toolCallId: string;
2228
+ result?: unknown;
2229
+ error?: unknown;
2230
+ }[] | undefined;
2231
+ languageModel?: string | undefined;
2232
+ personalityContext?: {
2233
+ channel: "text" | "voice";
2234
+ } | undefined;
2235
+ }>, {
2236
+ toolsConfig: {
2237
+ autoRouter?: {
2238
+ defi?: {
2239
+ lending: "aave";
2240
+ supply?: undefined;
2241
+ withdraw?: undefined;
2242
+ } | {
2243
+ supply: "aave";
2244
+ withdraw: "aave";
2245
+ lending?: undefined;
2246
+ } | undefined;
2247
+ swapOrBridge?: "lifi" | undefined;
2248
+ } | undefined;
2249
+ };
2250
+ messages: import("@ai-sdk/provider-utils").ModelMessage[];
2251
+ userContext: {
2252
+ address: `0x${string}`;
2253
+ };
2254
+ personalityContext: {
2255
+ channel: "text" | "voice";
2256
+ };
2257
+ prompt?: {
2258
+ role: "user" | "assistant" | "tool" | "system";
2259
+ content: ({
2260
+ type: "text";
2261
+ text: string;
2262
+ } | {
2263
+ type: "tool-call";
2264
+ toolName: "tokenTransfer";
2265
+ toolCallId: string;
2266
+ args: {
2267
+ fromAddress: string;
2268
+ toAddress: string;
2269
+ amount: string;
2270
+ token: string;
2271
+ chain: string;
2272
+ missingParameters?: string[] | undefined;
2273
+ humanFriendlyMessage?: string | undefined;
2274
+ };
2275
+ } | {
2276
+ type: "tool-call";
2277
+ toolName: "swap";
2278
+ toolCallId: string;
2279
+ args: {
2280
+ fromAddress: string;
2281
+ fromToken: string;
2282
+ fromAmount: string;
2283
+ protocol: "lifi";
2284
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2285
+ toToken?: string | undefined;
2286
+ toAddress?: string | undefined;
2287
+ toAmount?: string | undefined;
2288
+ missingParameters?: string[] | undefined;
2289
+ humanFriendlyMessage?: string | undefined;
2290
+ };
2291
+ } | {
2292
+ type: "tool-call";
2293
+ toolName: "bridge";
2294
+ toolCallId: string;
2295
+ args: {
2296
+ fromAddress: string;
2297
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2298
+ fromToken: string;
2299
+ fromAmount: string;
2300
+ protocol: "lifi";
2301
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
2302
+ toToken?: string | undefined;
2303
+ toAddress?: string | undefined;
2304
+ toAmount?: string | undefined;
2305
+ missingParameters?: string[] | undefined;
2306
+ humanFriendlyMessage?: string | undefined;
2307
+ };
2308
+ } | {
2309
+ type: "tool-call";
2310
+ toolName: "exchangeRate";
2311
+ toolCallId: string;
2312
+ args: {
2313
+ provider: "coinMarketCap";
2314
+ arguments: {
2315
+ baseCurrency: string;
2316
+ quoteCurrency: string;
2317
+ baseAmount?: string | undefined;
2318
+ quoteAmount?: string | undefined;
2319
+ }[];
2320
+ missingParameters?: string[] | undefined;
2321
+ humanFriendlyMessage?: string | undefined;
2322
+ };
2323
+ } | {
2324
+ type: "tool-call";
2325
+ toolName: "getWalletBalance";
2326
+ toolCallId: string;
2327
+ args: {
2328
+ address: string;
2329
+ provider: "moralis";
2330
+ missingParameters?: string[] | undefined;
2331
+ humanFriendlyMessage?: string | undefined;
2332
+ token?: string | undefined;
2333
+ chain?: string | undefined;
2334
+ };
2335
+ } | {
2336
+ type: "tool-call";
2337
+ toolName: "defiFetchListings";
2338
+ toolCallId: string;
2339
+ args: {
2340
+ protocol: "aave";
2341
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2342
+ missingParameters?: string[] | undefined;
2343
+ humanFriendlyMessage?: string | undefined;
2344
+ tokens?: string[] | undefined;
2345
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
2346
+ limit?: number | undefined;
2347
+ };
2348
+ } | {
2349
+ type: "tool-call";
2350
+ toolName: "defiSupply";
2351
+ toolCallId: string;
2352
+ args: {
2353
+ protocol: "aave";
2354
+ amount: string;
2355
+ token: string;
2356
+ chain: string;
2357
+ userAddress: string;
2358
+ missingParameters?: string[] | undefined;
2359
+ humanFriendlyMessage?: string | undefined;
2360
+ };
2361
+ } | {
2362
+ type: "tool-call";
2363
+ toolName: "defiWithdraw";
2364
+ toolCallId: string;
2365
+ args: {
2366
+ protocol: "aave";
2367
+ amount: string;
2368
+ token: string;
2369
+ chain: string;
2370
+ userAddress: string;
2371
+ missingParameters?: string[] | undefined;
2372
+ humanFriendlyMessage?: string | undefined;
2373
+ };
2374
+ } | {
2375
+ type: "tool-call";
2376
+ toolName: "defiPositions";
2377
+ toolCallId: string;
2378
+ args: {
2379
+ protocol: "aave";
2380
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2381
+ userAddress: string;
2382
+ missingParameters?: string[] | undefined;
2383
+ humanFriendlyMessage?: string | undefined;
2384
+ tokens?: string[] | undefined;
2385
+ };
2386
+ } | {
2387
+ type: "tool-result";
2388
+ toolName: string;
2389
+ toolCallId: string;
2390
+ result?: unknown;
2391
+ } | {
2392
+ type: "tool-incomplete";
2393
+ toolName: string;
2394
+ toolCallId: string;
2395
+ missingParams: string[];
2396
+ humanReadableDescription: string;
2397
+ args?: unknown;
2398
+ } | {
2399
+ type: "tool-error";
2400
+ toolName: string;
2401
+ toolCallId: string;
2402
+ error: import("../types/actions/errors.js").ActionError<unknown>;
2403
+ })[];
2404
+ } | undefined;
2405
+ toolResults?: {
2406
+ toolName: string;
2407
+ toolCallId: string;
2408
+ result?: unknown;
2409
+ error?: unknown;
2410
+ }[] | undefined;
2411
+ languageModel?: string | undefined;
2412
+ }, {
2413
+ toolsConfig: {
2414
+ autoRouter?: {
2415
+ defi?: {
2416
+ lending: "aave";
2417
+ supply?: undefined;
2418
+ withdraw?: undefined;
2419
+ } | {
2420
+ supply: "aave";
2421
+ withdraw: "aave";
2422
+ lending?: undefined;
2423
+ } | undefined;
2424
+ swapOrBridge?: "lifi" | undefined;
2425
+ } | undefined;
2426
+ };
2427
+ messages: import("@ai-sdk/provider-utils").ModelMessage[];
2428
+ userContext: {
2429
+ address: string;
2430
+ };
2431
+ prompt?: {
2432
+ role: "user" | "assistant" | "tool" | "system";
2433
+ content: ({
2434
+ type: "text";
2435
+ text: string;
2436
+ } | {
2437
+ type: "tool-call";
2438
+ toolName: "tokenTransfer";
2439
+ toolCallId: string;
2440
+ args: {
2441
+ fromAddress: string;
2442
+ toAddress: string;
2443
+ amount: string;
2444
+ token: string;
2445
+ chain: string;
2446
+ missingParameters?: string[] | undefined;
2447
+ humanFriendlyMessage?: string | undefined;
2448
+ };
2449
+ } | {
2450
+ type: "tool-call";
2451
+ toolName: "swap";
2452
+ toolCallId: string;
2453
+ args: {
2454
+ fromAddress: string;
2455
+ fromToken: string;
2456
+ fromAmount: string;
2457
+ protocol: "lifi";
2458
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2459
+ toToken?: string | undefined;
2460
+ toAddress?: string | undefined;
2461
+ toAmount?: string | undefined;
2462
+ missingParameters?: string[] | undefined;
2463
+ humanFriendlyMessage?: string | undefined;
2464
+ };
2465
+ } | {
2466
+ type: "tool-call";
2467
+ toolName: "bridge";
2468
+ toolCallId: string;
2469
+ args: {
2470
+ fromAddress: string;
2471
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2472
+ fromToken: string;
2473
+ fromAmount: string;
2474
+ protocol: "lifi";
2475
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
2476
+ toToken?: string | undefined;
2477
+ toAddress?: string | undefined;
2478
+ toAmount?: string | undefined;
2479
+ missingParameters?: string[] | undefined;
2480
+ humanFriendlyMessage?: string | undefined;
2481
+ };
2482
+ } | {
2483
+ type: "tool-call";
2484
+ toolName: "exchangeRate";
2485
+ toolCallId: string;
2486
+ args: {
2487
+ provider: "coinMarketCap";
2488
+ arguments: {
2489
+ baseCurrency: string;
2490
+ quoteCurrency: string;
2491
+ baseAmount?: string | undefined;
2492
+ quoteAmount?: string | undefined;
2493
+ }[];
2494
+ missingParameters?: string[] | undefined;
2495
+ humanFriendlyMessage?: string | undefined;
2496
+ };
2497
+ } | {
2498
+ type: "tool-call";
2499
+ toolName: "getWalletBalance";
2500
+ toolCallId: string;
2501
+ args: {
2502
+ address: string;
2503
+ provider: "moralis";
2504
+ missingParameters?: string[] | undefined;
2505
+ humanFriendlyMessage?: string | undefined;
2506
+ token?: string | undefined;
2507
+ chain?: string | undefined;
2508
+ };
2509
+ } | {
2510
+ type: "tool-call";
2511
+ toolName: "defiFetchListings";
2512
+ toolCallId: string;
2513
+ args: {
2514
+ protocol: "aave";
2515
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2516
+ missingParameters?: string[] | undefined;
2517
+ humanFriendlyMessage?: string | undefined;
2518
+ tokens?: string[] | undefined;
2519
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
2520
+ limit?: number | undefined;
2521
+ };
2522
+ } | {
2523
+ type: "tool-call";
2524
+ toolName: "defiSupply";
2525
+ toolCallId: string;
2526
+ args: {
2527
+ protocol: "aave";
2528
+ amount: string;
2529
+ token: string;
2530
+ chain: string;
2531
+ userAddress: string;
2532
+ missingParameters?: string[] | undefined;
2533
+ humanFriendlyMessage?: string | undefined;
2534
+ };
2535
+ } | {
2536
+ type: "tool-call";
2537
+ toolName: "defiWithdraw";
2538
+ toolCallId: string;
2539
+ args: {
2540
+ protocol: "aave";
2541
+ amount: string;
2542
+ token: string;
2543
+ chain: string;
2544
+ userAddress: string;
2545
+ missingParameters?: string[] | undefined;
2546
+ humanFriendlyMessage?: string | undefined;
2547
+ };
2548
+ } | {
2549
+ type: "tool-call";
2550
+ toolName: "defiPositions";
2551
+ toolCallId: string;
2552
+ args: {
2553
+ protocol: "aave";
2554
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2555
+ userAddress: string;
2556
+ missingParameters?: string[] | undefined;
2557
+ humanFriendlyMessage?: string | undefined;
2558
+ tokens?: string[] | undefined;
2559
+ };
2560
+ } | {
2561
+ type: "tool-result";
2562
+ toolName: string;
2563
+ toolCallId: string;
2564
+ result?: unknown;
2565
+ } | {
2566
+ type: "tool-incomplete";
2567
+ toolName: string;
2568
+ toolCallId: string;
2569
+ missingParams: string[];
2570
+ humanReadableDescription: string;
2571
+ args?: unknown;
2572
+ } | {
2573
+ type: "tool-error";
2574
+ toolName: string;
2575
+ toolCallId: string;
2576
+ error: import("../types/actions/errors.js").ActionError<unknown>;
2577
+ })[];
2578
+ } | undefined;
2579
+ toolResults?: {
2580
+ toolName: string;
2581
+ toolCallId: string;
2582
+ result?: unknown;
2583
+ error?: unknown;
2584
+ }[] | undefined;
985
2585
  languageModel?: string | undefined;
986
2586
  personalityContext?: {
987
2587
  channel: "text" | "voice";