@illalabs/interfaces 0.2.0 → 0.3.0-canary.1a98d5f6

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 (42) hide show
  1. package/dist/schemas/chatContext.d.ts +133 -48
  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 +1670 -70
  6. package/dist/schemas/chatRequestBody.d.ts.map +1 -1
  7. package/dist/schemas/chatRequestBody.js +9 -4
  8. package/dist/schemas/chatRequestBody.js.map +1 -1
  9. package/dist/schemas/executionCheckerQueryParams.d.ts +5 -5
  10. package/dist/schemas/index.d.ts +1 -0
  11. package/dist/schemas/index.d.ts.map +1 -1
  12. package/dist/schemas/index.js +1 -0
  13. package/dist/schemas/index.js.map +1 -1
  14. package/dist/schemas/messages.d.ts +162 -55
  15. package/dist/schemas/messages.d.ts.map +1 -1
  16. package/dist/schemas/messages.js +9 -1
  17. package/dist/schemas/messages.js.map +1 -1
  18. package/dist/schemas/modelContext.d.ts +35 -0
  19. package/dist/schemas/modelContext.d.ts.map +1 -0
  20. package/dist/schemas/modelContext.js +29 -0
  21. package/dist/schemas/modelContext.js.map +1 -0
  22. package/dist/schemas/toolAutorouter.d.ts +6 -6
  23. package/dist/types/actions/inputs.d.ts +4 -3
  24. package/dist/types/actions/inputs.d.ts.map +1 -1
  25. package/dist/types/actions/tools/{swapBridgeAction.d.ts → bridgeAction.d.ts} +3 -3
  26. package/dist/types/actions/tools/bridgeAction.d.ts.map +1 -0
  27. package/dist/types/actions/tools/bridgeAction.js +2 -0
  28. package/dist/types/actions/tools/bridgeAction.js.map +1 -0
  29. package/dist/types/actions/tools/index.d.ts +6 -3
  30. package/dist/types/actions/tools/index.d.ts.map +1 -1
  31. package/dist/types/actions/tools/swapAction.d.ts +16 -0
  32. package/dist/types/actions/tools/swapAction.d.ts.map +1 -0
  33. package/dist/types/actions/tools/swapAction.js +2 -0
  34. package/dist/types/actions/tools/swapAction.js.map +1 -0
  35. package/dist/utils/constants.d.ts +4 -4
  36. package/dist/utils/constants.d.ts.map +1 -1
  37. package/dist/utils/constants.js +11 -3
  38. package/dist/utils/constants.js.map +1 -1
  39. package/package.json +1 -1
  40. package/dist/types/actions/tools/swapBridgeAction.d.ts.map +0 -1
  41. package/dist/types/actions/tools/swapBridgeAction.js +0 -2
  42. 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,8 +736,24 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
667
736
  toolCallId: string;
668
737
  error: import("../types/actions/errors.js").ActionError<unknown>;
669
738
  })[];
670
- }>;
671
- languageModel: z.ZodOptional<z.ZodString>;
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">>;
756
+ languageModel: z.ZodString;
672
757
  personalityContext: z.ZodDefault<z.ZodOptional<z.ZodObject<{
673
758
  channel: z.ZodEnum<["voice", "text"]>;
674
759
  }, "strip", z.ZodTypeAny, {
@@ -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,18 @@ 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
+ languageModel: string;
784
+ personalityContext: {
785
+ channel: "text" | "voice";
786
+ };
787
+ prompt?: {
699
788
  role: "user" | "assistant" | "tool" | "system";
700
789
  content: ({
701
790
  type: "text";
@@ -715,20 +804,36 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
715
804
  };
716
805
  } | {
717
806
  type: "tool-call";
718
- toolName: "swapOrBridge";
807
+ toolName: "swap";
719
808
  toolCallId: string;
720
809
  args: {
721
810
  fromAddress: string;
722
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
723
811
  fromToken: string;
724
812
  fromAmount: string;
725
813
  protocol: "lifi";
814
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
815
+ toToken?: string | undefined;
726
816
  toAddress?: string | undefined;
817
+ toAmount?: string | undefined;
727
818
  missingParameters?: string[] | undefined;
728
819
  humanFriendlyMessage?: string | undefined;
820
+ };
821
+ } | {
822
+ type: "tool-call";
823
+ toolName: "bridge";
824
+ toolCallId: string;
825
+ args: {
826
+ fromAddress: string;
827
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
828
+ fromToken: string;
829
+ fromAmount: string;
830
+ protocol: "lifi";
729
831
  toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
730
832
  toToken?: string | undefined;
833
+ toAddress?: string | undefined;
731
834
  toAmount?: string | undefined;
835
+ missingParameters?: string[] | undefined;
836
+ humanFriendlyMessage?: string | undefined;
732
837
  };
733
838
  } | {
734
839
  type: "tool-call";
@@ -752,18 +857,18 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
752
857
  args: {
753
858
  address: string;
754
859
  provider: "moralis";
755
- token?: string | undefined;
756
- chain?: string | undefined;
757
860
  missingParameters?: string[] | undefined;
758
861
  humanFriendlyMessage?: string | undefined;
862
+ token?: string | undefined;
863
+ chain?: string | undefined;
759
864
  };
760
865
  } | {
761
866
  type: "tool-call";
762
867
  toolName: "defiFetchListings";
763
868
  toolCallId: string;
764
869
  args: {
765
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
766
870
  protocol: "aave";
871
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
767
872
  missingParameters?: string[] | undefined;
768
873
  humanFriendlyMessage?: string | undefined;
769
874
  tokens?: string[] | undefined;
@@ -775,10 +880,10 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
775
880
  toolName: "defiSupply";
776
881
  toolCallId: string;
777
882
  args: {
883
+ protocol: "aave";
778
884
  amount: string;
779
885
  token: string;
780
886
  chain: string;
781
- protocol: "aave";
782
887
  userAddress: string;
783
888
  missingParameters?: string[] | undefined;
784
889
  humanFriendlyMessage?: string | undefined;
@@ -788,10 +893,10 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
788
893
  toolName: "defiWithdraw";
789
894
  toolCallId: string;
790
895
  args: {
896
+ protocol: "aave";
791
897
  amount: string;
792
898
  token: string;
793
899
  chain: string;
794
- protocol: "aave";
795
900
  userAddress: string;
796
901
  missingParameters?: string[] | undefined;
797
902
  humanFriendlyMessage?: string | undefined;
@@ -801,8 +906,8 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
801
906
  toolName: "defiPositions";
802
907
  toolCallId: string;
803
908
  args: {
804
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
805
909
  protocol: "aave";
910
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
806
911
  userAddress: string;
807
912
  missingParameters?: string[] | undefined;
808
913
  humanFriendlyMessage?: string | undefined;
@@ -826,15 +931,16 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
826
931
  toolCallId: string;
827
932
  error: import("../types/actions/errors.js").ActionError<unknown>;
828
933
  })[];
829
- };
830
- personalityContext: {
831
- channel: "text" | "voice";
832
- };
833
- languageModel?: string | undefined;
934
+ } | undefined;
935
+ toolResults?: {
936
+ toolName: string;
937
+ toolCallId: string;
938
+ result?: unknown;
939
+ error?: unknown;
940
+ }[] | 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,15 @@ 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
+ languageModel: string;
961
+ prompt?: {
854
962
  role: "user" | "assistant" | "tool" | "system";
855
963
  content: ({
856
964
  type: "text";
@@ -870,20 +978,36 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
870
978
  };
871
979
  } | {
872
980
  type: "tool-call";
873
- toolName: "swapOrBridge";
981
+ toolName: "swap";
874
982
  toolCallId: string;
875
983
  args: {
876
984
  fromAddress: string;
877
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
878
985
  fromToken: string;
879
986
  fromAmount: string;
880
987
  protocol: "lifi";
988
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
989
+ toToken?: string | undefined;
881
990
  toAddress?: string | undefined;
991
+ toAmount?: string | undefined;
882
992
  missingParameters?: string[] | undefined;
883
993
  humanFriendlyMessage?: string | undefined;
994
+ };
995
+ } | {
996
+ type: "tool-call";
997
+ toolName: "bridge";
998
+ toolCallId: string;
999
+ args: {
1000
+ fromAddress: string;
1001
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1002
+ fromToken: string;
1003
+ fromAmount: string;
1004
+ protocol: "lifi";
884
1005
  toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
885
1006
  toToken?: string | undefined;
1007
+ toAddress?: string | undefined;
886
1008
  toAmount?: string | undefined;
1009
+ missingParameters?: string[] | undefined;
1010
+ humanFriendlyMessage?: string | undefined;
887
1011
  };
888
1012
  } | {
889
1013
  type: "tool-call";
@@ -907,18 +1031,18 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
907
1031
  args: {
908
1032
  address: string;
909
1033
  provider: "moralis";
910
- token?: string | undefined;
911
- chain?: string | undefined;
912
1034
  missingParameters?: string[] | undefined;
913
1035
  humanFriendlyMessage?: string | undefined;
1036
+ token?: string | undefined;
1037
+ chain?: string | undefined;
914
1038
  };
915
1039
  } | {
916
1040
  type: "tool-call";
917
1041
  toolName: "defiFetchListings";
918
1042
  toolCallId: string;
919
1043
  args: {
920
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
921
1044
  protocol: "aave";
1045
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
922
1046
  missingParameters?: string[] | undefined;
923
1047
  humanFriendlyMessage?: string | undefined;
924
1048
  tokens?: string[] | undefined;
@@ -930,10 +1054,10 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
930
1054
  toolName: "defiSupply";
931
1055
  toolCallId: string;
932
1056
  args: {
1057
+ protocol: "aave";
933
1058
  amount: string;
934
1059
  token: string;
935
1060
  chain: string;
936
- protocol: "aave";
937
1061
  userAddress: string;
938
1062
  missingParameters?: string[] | undefined;
939
1063
  humanFriendlyMessage?: string | undefined;
@@ -943,10 +1067,10 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
943
1067
  toolName: "defiWithdraw";
944
1068
  toolCallId: string;
945
1069
  args: {
1070
+ protocol: "aave";
946
1071
  amount: string;
947
1072
  token: string;
948
1073
  chain: string;
949
- protocol: "aave";
950
1074
  userAddress: string;
951
1075
  missingParameters?: string[] | undefined;
952
1076
  humanFriendlyMessage?: string | undefined;
@@ -956,8 +1080,8 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
956
1080
  toolName: "defiPositions";
957
1081
  toolCallId: string;
958
1082
  args: {
959
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
960
1083
  protocol: "aave";
1084
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
961
1085
  userAddress: string;
962
1086
  missingParameters?: string[] | undefined;
963
1087
  humanFriendlyMessage?: string | undefined;
@@ -981,8 +1105,1484 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
981
1105
  toolCallId: string;
982
1106
  error: import("../types/actions/errors.js").ActionError<unknown>;
983
1107
  })[];
984
- };
985
- languageModel?: string | undefined;
1108
+ } | undefined;
1109
+ toolResults?: {
1110
+ toolName: string;
1111
+ toolCallId: string;
1112
+ result?: unknown;
1113
+ error?: unknown;
1114
+ }[] | 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.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
+ languageModel: string;
1901
+ personalityContext: {
1902
+ channel: "text" | "voice";
1903
+ };
1904
+ prompt?: {
1905
+ role: "user" | "assistant" | "tool" | "system";
1906
+ content: ({
1907
+ type: "text";
1908
+ text: string;
1909
+ } | {
1910
+ type: "tool-call";
1911
+ toolName: "tokenTransfer";
1912
+ toolCallId: string;
1913
+ args: {
1914
+ fromAddress: string;
1915
+ toAddress: string;
1916
+ amount: string;
1917
+ token: string;
1918
+ chain: string;
1919
+ missingParameters?: string[] | undefined;
1920
+ humanFriendlyMessage?: string | undefined;
1921
+ };
1922
+ } | {
1923
+ type: "tool-call";
1924
+ toolName: "swap";
1925
+ toolCallId: string;
1926
+ args: {
1927
+ fromAddress: string;
1928
+ fromToken: string;
1929
+ fromAmount: string;
1930
+ protocol: "lifi";
1931
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1932
+ toToken?: string | undefined;
1933
+ toAddress?: string | undefined;
1934
+ toAmount?: string | undefined;
1935
+ missingParameters?: string[] | undefined;
1936
+ humanFriendlyMessage?: string | undefined;
1937
+ };
1938
+ } | {
1939
+ type: "tool-call";
1940
+ toolName: "bridge";
1941
+ toolCallId: string;
1942
+ args: {
1943
+ fromAddress: string;
1944
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1945
+ fromToken: string;
1946
+ fromAmount: string;
1947
+ protocol: "lifi";
1948
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
1949
+ toToken?: string | undefined;
1950
+ toAddress?: string | undefined;
1951
+ toAmount?: string | undefined;
1952
+ missingParameters?: string[] | undefined;
1953
+ humanFriendlyMessage?: string | undefined;
1954
+ };
1955
+ } | {
1956
+ type: "tool-call";
1957
+ toolName: "exchangeRate";
1958
+ toolCallId: string;
1959
+ args: {
1960
+ provider: "coinMarketCap";
1961
+ arguments: {
1962
+ baseCurrency: string;
1963
+ quoteCurrency: string;
1964
+ baseAmount?: string | undefined;
1965
+ quoteAmount?: string | undefined;
1966
+ }[];
1967
+ missingParameters?: string[] | undefined;
1968
+ humanFriendlyMessage?: string | undefined;
1969
+ };
1970
+ } | {
1971
+ type: "tool-call";
1972
+ toolName: "getWalletBalance";
1973
+ toolCallId: string;
1974
+ args: {
1975
+ address: string;
1976
+ provider: "moralis";
1977
+ missingParameters?: string[] | undefined;
1978
+ humanFriendlyMessage?: string | undefined;
1979
+ token?: string | undefined;
1980
+ chain?: string | undefined;
1981
+ };
1982
+ } | {
1983
+ type: "tool-call";
1984
+ toolName: "defiFetchListings";
1985
+ toolCallId: string;
1986
+ args: {
1987
+ protocol: "aave";
1988
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1989
+ missingParameters?: string[] | undefined;
1990
+ humanFriendlyMessage?: string | undefined;
1991
+ tokens?: string[] | undefined;
1992
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
1993
+ limit?: number | undefined;
1994
+ };
1995
+ } | {
1996
+ type: "tool-call";
1997
+ toolName: "defiSupply";
1998
+ toolCallId: string;
1999
+ args: {
2000
+ protocol: "aave";
2001
+ amount: string;
2002
+ token: string;
2003
+ chain: string;
2004
+ userAddress: string;
2005
+ missingParameters?: string[] | undefined;
2006
+ humanFriendlyMessage?: string | undefined;
2007
+ };
2008
+ } | {
2009
+ type: "tool-call";
2010
+ toolName: "defiWithdraw";
2011
+ toolCallId: string;
2012
+ args: {
2013
+ protocol: "aave";
2014
+ amount: string;
2015
+ token: string;
2016
+ chain: string;
2017
+ userAddress: string;
2018
+ missingParameters?: string[] | undefined;
2019
+ humanFriendlyMessage?: string | undefined;
2020
+ };
2021
+ } | {
2022
+ type: "tool-call";
2023
+ toolName: "defiPositions";
2024
+ toolCallId: string;
2025
+ args: {
2026
+ protocol: "aave";
2027
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2028
+ userAddress: string;
2029
+ missingParameters?: string[] | undefined;
2030
+ humanFriendlyMessage?: string | undefined;
2031
+ tokens?: string[] | undefined;
2032
+ };
2033
+ } | {
2034
+ type: "tool-result";
2035
+ toolName: string;
2036
+ toolCallId: string;
2037
+ result?: unknown;
2038
+ } | {
2039
+ type: "tool-incomplete";
2040
+ toolName: string;
2041
+ toolCallId: string;
2042
+ missingParams: string[];
2043
+ humanReadableDescription: string;
2044
+ args?: unknown;
2045
+ } | {
2046
+ type: "tool-error";
2047
+ toolName: string;
2048
+ toolCallId: string;
2049
+ error: import("../types/actions/errors.js").ActionError<unknown>;
2050
+ })[];
2051
+ } | undefined;
2052
+ toolResults?: {
2053
+ toolName: string;
2054
+ toolCallId: string;
2055
+ result?: unknown;
2056
+ error?: unknown;
2057
+ }[] | 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
+ languageModel: string;
2078
+ prompt?: {
2079
+ role: "user" | "assistant" | "tool" | "system";
2080
+ content: ({
2081
+ type: "text";
2082
+ text: string;
2083
+ } | {
2084
+ type: "tool-call";
2085
+ toolName: "tokenTransfer";
2086
+ toolCallId: string;
2087
+ args: {
2088
+ fromAddress: string;
2089
+ toAddress: string;
2090
+ amount: string;
2091
+ token: string;
2092
+ chain: string;
2093
+ missingParameters?: string[] | undefined;
2094
+ humanFriendlyMessage?: string | undefined;
2095
+ };
2096
+ } | {
2097
+ type: "tool-call";
2098
+ toolName: "swap";
2099
+ toolCallId: string;
2100
+ args: {
2101
+ fromAddress: string;
2102
+ fromToken: string;
2103
+ fromAmount: string;
2104
+ protocol: "lifi";
2105
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2106
+ toToken?: string | undefined;
2107
+ toAddress?: string | undefined;
2108
+ toAmount?: string | undefined;
2109
+ missingParameters?: string[] | undefined;
2110
+ humanFriendlyMessage?: string | undefined;
2111
+ };
2112
+ } | {
2113
+ type: "tool-call";
2114
+ toolName: "bridge";
2115
+ toolCallId: string;
2116
+ args: {
2117
+ fromAddress: string;
2118
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2119
+ fromToken: string;
2120
+ fromAmount: string;
2121
+ protocol: "lifi";
2122
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
2123
+ toToken?: string | undefined;
2124
+ toAddress?: string | undefined;
2125
+ toAmount?: string | undefined;
2126
+ missingParameters?: string[] | undefined;
2127
+ humanFriendlyMessage?: string | undefined;
2128
+ };
2129
+ } | {
2130
+ type: "tool-call";
2131
+ toolName: "exchangeRate";
2132
+ toolCallId: string;
2133
+ args: {
2134
+ provider: "coinMarketCap";
2135
+ arguments: {
2136
+ baseCurrency: string;
2137
+ quoteCurrency: string;
2138
+ baseAmount?: string | undefined;
2139
+ quoteAmount?: string | undefined;
2140
+ }[];
2141
+ missingParameters?: string[] | undefined;
2142
+ humanFriendlyMessage?: string | undefined;
2143
+ };
2144
+ } | {
2145
+ type: "tool-call";
2146
+ toolName: "getWalletBalance";
2147
+ toolCallId: string;
2148
+ args: {
2149
+ address: string;
2150
+ provider: "moralis";
2151
+ missingParameters?: string[] | undefined;
2152
+ humanFriendlyMessage?: string | undefined;
2153
+ token?: string | undefined;
2154
+ chain?: string | undefined;
2155
+ };
2156
+ } | {
2157
+ type: "tool-call";
2158
+ toolName: "defiFetchListings";
2159
+ toolCallId: string;
2160
+ args: {
2161
+ protocol: "aave";
2162
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2163
+ missingParameters?: string[] | undefined;
2164
+ humanFriendlyMessage?: string | undefined;
2165
+ tokens?: string[] | undefined;
2166
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
2167
+ limit?: number | undefined;
2168
+ };
2169
+ } | {
2170
+ type: "tool-call";
2171
+ toolName: "defiSupply";
2172
+ toolCallId: string;
2173
+ args: {
2174
+ protocol: "aave";
2175
+ amount: string;
2176
+ token: string;
2177
+ chain: string;
2178
+ userAddress: string;
2179
+ missingParameters?: string[] | undefined;
2180
+ humanFriendlyMessage?: string | undefined;
2181
+ };
2182
+ } | {
2183
+ type: "tool-call";
2184
+ toolName: "defiWithdraw";
2185
+ toolCallId: string;
2186
+ args: {
2187
+ protocol: "aave";
2188
+ amount: string;
2189
+ token: string;
2190
+ chain: string;
2191
+ userAddress: string;
2192
+ missingParameters?: string[] | undefined;
2193
+ humanFriendlyMessage?: string | undefined;
2194
+ };
2195
+ } | {
2196
+ type: "tool-call";
2197
+ toolName: "defiPositions";
2198
+ toolCallId: string;
2199
+ args: {
2200
+ protocol: "aave";
2201
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2202
+ userAddress: string;
2203
+ missingParameters?: string[] | undefined;
2204
+ humanFriendlyMessage?: string | undefined;
2205
+ tokens?: string[] | undefined;
2206
+ };
2207
+ } | {
2208
+ type: "tool-result";
2209
+ toolName: string;
2210
+ toolCallId: string;
2211
+ result?: unknown;
2212
+ } | {
2213
+ type: "tool-incomplete";
2214
+ toolName: string;
2215
+ toolCallId: string;
2216
+ missingParams: string[];
2217
+ humanReadableDescription: string;
2218
+ args?: unknown;
2219
+ } | {
2220
+ type: "tool-error";
2221
+ toolName: string;
2222
+ toolCallId: string;
2223
+ error: import("../types/actions/errors.js").ActionError<unknown>;
2224
+ })[];
2225
+ } | undefined;
2226
+ toolResults?: {
2227
+ toolName: string;
2228
+ toolCallId: string;
2229
+ result?: unknown;
2230
+ error?: unknown;
2231
+ }[] | 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
+ languageModel: string;
2255
+ personalityContext: {
2256
+ channel: "text" | "voice";
2257
+ };
2258
+ prompt?: {
2259
+ role: "user" | "assistant" | "tool" | "system";
2260
+ content: ({
2261
+ type: "text";
2262
+ text: string;
2263
+ } | {
2264
+ type: "tool-call";
2265
+ toolName: "tokenTransfer";
2266
+ toolCallId: string;
2267
+ args: {
2268
+ fromAddress: string;
2269
+ toAddress: string;
2270
+ amount: string;
2271
+ token: string;
2272
+ chain: string;
2273
+ missingParameters?: string[] | undefined;
2274
+ humanFriendlyMessage?: string | undefined;
2275
+ };
2276
+ } | {
2277
+ type: "tool-call";
2278
+ toolName: "swap";
2279
+ toolCallId: string;
2280
+ args: {
2281
+ fromAddress: string;
2282
+ fromToken: string;
2283
+ fromAmount: string;
2284
+ protocol: "lifi";
2285
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2286
+ toToken?: string | undefined;
2287
+ toAddress?: string | undefined;
2288
+ toAmount?: string | undefined;
2289
+ missingParameters?: string[] | undefined;
2290
+ humanFriendlyMessage?: string | undefined;
2291
+ };
2292
+ } | {
2293
+ type: "tool-call";
2294
+ toolName: "bridge";
2295
+ toolCallId: string;
2296
+ args: {
2297
+ fromAddress: string;
2298
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2299
+ fromToken: string;
2300
+ fromAmount: string;
2301
+ protocol: "lifi";
2302
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
2303
+ toToken?: string | undefined;
2304
+ toAddress?: string | undefined;
2305
+ toAmount?: string | undefined;
2306
+ missingParameters?: string[] | undefined;
2307
+ humanFriendlyMessage?: string | undefined;
2308
+ };
2309
+ } | {
2310
+ type: "tool-call";
2311
+ toolName: "exchangeRate";
2312
+ toolCallId: string;
2313
+ args: {
2314
+ provider: "coinMarketCap";
2315
+ arguments: {
2316
+ baseCurrency: string;
2317
+ quoteCurrency: string;
2318
+ baseAmount?: string | undefined;
2319
+ quoteAmount?: string | undefined;
2320
+ }[];
2321
+ missingParameters?: string[] | undefined;
2322
+ humanFriendlyMessage?: string | undefined;
2323
+ };
2324
+ } | {
2325
+ type: "tool-call";
2326
+ toolName: "getWalletBalance";
2327
+ toolCallId: string;
2328
+ args: {
2329
+ address: string;
2330
+ provider: "moralis";
2331
+ missingParameters?: string[] | undefined;
2332
+ humanFriendlyMessage?: string | undefined;
2333
+ token?: string | undefined;
2334
+ chain?: string | undefined;
2335
+ };
2336
+ } | {
2337
+ type: "tool-call";
2338
+ toolName: "defiFetchListings";
2339
+ toolCallId: string;
2340
+ args: {
2341
+ protocol: "aave";
2342
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2343
+ missingParameters?: string[] | undefined;
2344
+ humanFriendlyMessage?: string | undefined;
2345
+ tokens?: string[] | undefined;
2346
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
2347
+ limit?: number | undefined;
2348
+ };
2349
+ } | {
2350
+ type: "tool-call";
2351
+ toolName: "defiSupply";
2352
+ toolCallId: string;
2353
+ args: {
2354
+ protocol: "aave";
2355
+ amount: string;
2356
+ token: string;
2357
+ chain: string;
2358
+ userAddress: string;
2359
+ missingParameters?: string[] | undefined;
2360
+ humanFriendlyMessage?: string | undefined;
2361
+ };
2362
+ } | {
2363
+ type: "tool-call";
2364
+ toolName: "defiWithdraw";
2365
+ toolCallId: string;
2366
+ args: {
2367
+ protocol: "aave";
2368
+ amount: string;
2369
+ token: string;
2370
+ chain: string;
2371
+ userAddress: string;
2372
+ missingParameters?: string[] | undefined;
2373
+ humanFriendlyMessage?: string | undefined;
2374
+ };
2375
+ } | {
2376
+ type: "tool-call";
2377
+ toolName: "defiPositions";
2378
+ toolCallId: string;
2379
+ args: {
2380
+ protocol: "aave";
2381
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2382
+ userAddress: string;
2383
+ missingParameters?: string[] | undefined;
2384
+ humanFriendlyMessage?: string | undefined;
2385
+ tokens?: string[] | undefined;
2386
+ };
2387
+ } | {
2388
+ type: "tool-result";
2389
+ toolName: string;
2390
+ toolCallId: string;
2391
+ result?: unknown;
2392
+ } | {
2393
+ type: "tool-incomplete";
2394
+ toolName: string;
2395
+ toolCallId: string;
2396
+ missingParams: string[];
2397
+ humanReadableDescription: string;
2398
+ args?: unknown;
2399
+ } | {
2400
+ type: "tool-error";
2401
+ toolName: string;
2402
+ toolCallId: string;
2403
+ error: import("../types/actions/errors.js").ActionError<unknown>;
2404
+ })[];
2405
+ } | undefined;
2406
+ toolResults?: {
2407
+ toolName: string;
2408
+ toolCallId: string;
2409
+ result?: unknown;
2410
+ error?: unknown;
2411
+ }[] | 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
+ languageModel: string;
2432
+ prompt?: {
2433
+ role: "user" | "assistant" | "tool" | "system";
2434
+ content: ({
2435
+ type: "text";
2436
+ text: string;
2437
+ } | {
2438
+ type: "tool-call";
2439
+ toolName: "tokenTransfer";
2440
+ toolCallId: string;
2441
+ args: {
2442
+ fromAddress: string;
2443
+ toAddress: string;
2444
+ amount: string;
2445
+ token: string;
2446
+ chain: string;
2447
+ missingParameters?: string[] | undefined;
2448
+ humanFriendlyMessage?: string | undefined;
2449
+ };
2450
+ } | {
2451
+ type: "tool-call";
2452
+ toolName: "swap";
2453
+ toolCallId: string;
2454
+ args: {
2455
+ fromAddress: string;
2456
+ fromToken: string;
2457
+ fromAmount: string;
2458
+ protocol: "lifi";
2459
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2460
+ toToken?: string | undefined;
2461
+ toAddress?: string | undefined;
2462
+ toAmount?: string | undefined;
2463
+ missingParameters?: string[] | undefined;
2464
+ humanFriendlyMessage?: string | undefined;
2465
+ };
2466
+ } | {
2467
+ type: "tool-call";
2468
+ toolName: "bridge";
2469
+ toolCallId: string;
2470
+ args: {
2471
+ fromAddress: string;
2472
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2473
+ fromToken: string;
2474
+ fromAmount: string;
2475
+ protocol: "lifi";
2476
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
2477
+ toToken?: string | undefined;
2478
+ toAddress?: string | undefined;
2479
+ toAmount?: string | undefined;
2480
+ missingParameters?: string[] | undefined;
2481
+ humanFriendlyMessage?: string | undefined;
2482
+ };
2483
+ } | {
2484
+ type: "tool-call";
2485
+ toolName: "exchangeRate";
2486
+ toolCallId: string;
2487
+ args: {
2488
+ provider: "coinMarketCap";
2489
+ arguments: {
2490
+ baseCurrency: string;
2491
+ quoteCurrency: string;
2492
+ baseAmount?: string | undefined;
2493
+ quoteAmount?: string | undefined;
2494
+ }[];
2495
+ missingParameters?: string[] | undefined;
2496
+ humanFriendlyMessage?: string | undefined;
2497
+ };
2498
+ } | {
2499
+ type: "tool-call";
2500
+ toolName: "getWalletBalance";
2501
+ toolCallId: string;
2502
+ args: {
2503
+ address: string;
2504
+ provider: "moralis";
2505
+ missingParameters?: string[] | undefined;
2506
+ humanFriendlyMessage?: string | undefined;
2507
+ token?: string | undefined;
2508
+ chain?: string | undefined;
2509
+ };
2510
+ } | {
2511
+ type: "tool-call";
2512
+ toolName: "defiFetchListings";
2513
+ toolCallId: string;
2514
+ args: {
2515
+ protocol: "aave";
2516
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2517
+ missingParameters?: string[] | undefined;
2518
+ humanFriendlyMessage?: string | undefined;
2519
+ tokens?: string[] | undefined;
2520
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
2521
+ limit?: number | undefined;
2522
+ };
2523
+ } | {
2524
+ type: "tool-call";
2525
+ toolName: "defiSupply";
2526
+ toolCallId: string;
2527
+ args: {
2528
+ protocol: "aave";
2529
+ amount: string;
2530
+ token: string;
2531
+ chain: string;
2532
+ userAddress: string;
2533
+ missingParameters?: string[] | undefined;
2534
+ humanFriendlyMessage?: string | undefined;
2535
+ };
2536
+ } | {
2537
+ type: "tool-call";
2538
+ toolName: "defiWithdraw";
2539
+ toolCallId: string;
2540
+ args: {
2541
+ protocol: "aave";
2542
+ amount: string;
2543
+ token: string;
2544
+ chain: string;
2545
+ userAddress: string;
2546
+ missingParameters?: string[] | undefined;
2547
+ humanFriendlyMessage?: string | undefined;
2548
+ };
2549
+ } | {
2550
+ type: "tool-call";
2551
+ toolName: "defiPositions";
2552
+ toolCallId: string;
2553
+ args: {
2554
+ protocol: "aave";
2555
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2556
+ userAddress: string;
2557
+ missingParameters?: string[] | undefined;
2558
+ humanFriendlyMessage?: string | undefined;
2559
+ tokens?: string[] | undefined;
2560
+ };
2561
+ } | {
2562
+ type: "tool-result";
2563
+ toolName: string;
2564
+ toolCallId: string;
2565
+ result?: unknown;
2566
+ } | {
2567
+ type: "tool-incomplete";
2568
+ toolName: string;
2569
+ toolCallId: string;
2570
+ missingParams: string[];
2571
+ humanReadableDescription: string;
2572
+ args?: unknown;
2573
+ } | {
2574
+ type: "tool-error";
2575
+ toolName: string;
2576
+ toolCallId: string;
2577
+ error: import("../types/actions/errors.js").ActionError<unknown>;
2578
+ })[];
2579
+ } | undefined;
2580
+ toolResults?: {
2581
+ toolName: string;
2582
+ toolCallId: string;
2583
+ result?: unknown;
2584
+ error?: unknown;
2585
+ }[] | undefined;
986
2586
  personalityContext?: {
987
2587
  channel: "text" | "voice";
988
2588
  } | undefined;