@illalabs/interfaces 0.1.0 → 0.2.0-canary.eb4a29bf

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 (79) hide show
  1. package/dist/external.d.ts +3 -0
  2. package/dist/external.d.ts.map +1 -1
  3. package/dist/external.js +3 -0
  4. package/dist/external.js.map +1 -1
  5. package/dist/interfaces/base.d.ts +1 -1
  6. package/dist/interfaces/base.d.ts.map +1 -1
  7. package/dist/interfaces/chat/response.d.ts +2 -2
  8. package/dist/interfaces/chat/response.d.ts.map +1 -1
  9. package/dist/interfaces/index.d.ts +1 -0
  10. package/dist/interfaces/index.d.ts.map +1 -1
  11. package/dist/interfaces/index.js +1 -0
  12. package/dist/interfaces/index.js.map +1 -1
  13. package/dist/schemas/chatContext.d.ts +498 -50
  14. package/dist/schemas/chatContext.d.ts.map +1 -1
  15. package/dist/schemas/chatRequestBody.d.ts +734 -78
  16. package/dist/schemas/chatRequestBody.d.ts.map +1 -1
  17. package/dist/schemas/chatRequestBody.js +1 -0
  18. package/dist/schemas/chatRequestBody.js.map +1 -1
  19. package/dist/schemas/messages.d.ts +921 -77
  20. package/dist/schemas/messages.d.ts.map +1 -1
  21. package/dist/schemas/messages.js +105 -12
  22. package/dist/schemas/messages.js.map +1 -1
  23. package/dist/types/actions/errors.d.ts +67 -0
  24. package/dist/types/actions/errors.d.ts.map +1 -0
  25. package/dist/types/actions/errors.js +5 -0
  26. package/dist/types/actions/errors.js.map +1 -0
  27. package/dist/types/actions/index.d.ts +4 -0
  28. package/dist/types/actions/index.d.ts.map +1 -0
  29. package/dist/types/actions/index.js +4 -0
  30. package/dist/types/actions/index.js.map +1 -0
  31. package/dist/types/actions/inputs.d.ts +16 -0
  32. package/dist/types/actions/inputs.d.ts.map +1 -0
  33. package/dist/types/actions/inputs.js +2 -0
  34. package/dist/types/actions/inputs.js.map +1 -0
  35. package/dist/types/actions/outputs.d.ts +40 -0
  36. package/dist/types/actions/outputs.d.ts.map +1 -0
  37. package/dist/types/actions/outputs.js +2 -0
  38. package/dist/types/actions/outputs.js.map +1 -0
  39. package/dist/types/actions/tools/defiFetchListingsAction.d.ts +14 -0
  40. package/dist/types/actions/tools/defiFetchListingsAction.d.ts.map +1 -0
  41. package/dist/types/actions/tools/defiFetchListingsAction.js +2 -0
  42. package/dist/types/actions/tools/defiFetchListingsAction.js.map +1 -0
  43. package/dist/types/actions/tools/defiPositionsAction.d.ts +26 -0
  44. package/dist/types/actions/tools/defiPositionsAction.d.ts.map +1 -0
  45. package/dist/types/actions/tools/defiPositionsAction.js +2 -0
  46. package/dist/types/actions/tools/defiPositionsAction.js.map +1 -0
  47. package/dist/types/actions/tools/defiSupplyAction.d.ts +14 -0
  48. package/dist/types/actions/tools/defiSupplyAction.d.ts.map +1 -0
  49. package/dist/types/actions/tools/defiSupplyAction.js +2 -0
  50. package/dist/types/actions/tools/defiSupplyAction.js.map +1 -0
  51. package/dist/types/actions/tools/defiWithdrawAction.d.ts +14 -0
  52. package/dist/types/actions/tools/defiWithdrawAction.d.ts.map +1 -0
  53. package/dist/types/actions/tools/defiWithdrawAction.js +2 -0
  54. package/dist/types/actions/tools/defiWithdrawAction.js.map +1 -0
  55. package/dist/types/actions/tools/exchangeRateAction.d.ts +16 -0
  56. package/dist/types/actions/tools/exchangeRateAction.d.ts.map +1 -0
  57. package/dist/types/actions/tools/exchangeRateAction.js +2 -0
  58. package/dist/types/actions/tools/exchangeRateAction.js.map +1 -0
  59. package/dist/types/actions/tools/getWalletBalanceAction.d.ts +13 -0
  60. package/dist/types/actions/tools/getWalletBalanceAction.d.ts.map +1 -0
  61. package/dist/types/actions/tools/getWalletBalanceAction.js +2 -0
  62. package/dist/types/actions/tools/getWalletBalanceAction.js.map +1 -0
  63. package/dist/types/actions/tools/index.d.ts +37 -0
  64. package/dist/types/actions/tools/index.d.ts.map +1 -0
  65. package/dist/types/actions/tools/index.js +2 -0
  66. package/dist/types/actions/tools/index.js.map +1 -0
  67. package/dist/types/actions/tools/swapBridgeAction.d.ts +17 -0
  68. package/dist/types/actions/tools/swapBridgeAction.d.ts.map +1 -0
  69. package/dist/types/actions/tools/swapBridgeAction.js +2 -0
  70. package/dist/types/actions/tools/swapBridgeAction.js.map +1 -0
  71. package/dist/types/actions/tools/tokenTransferAction.d.ts +13 -0
  72. package/dist/types/actions/tools/tokenTransferAction.d.ts.map +1 -0
  73. package/dist/types/actions/tools/tokenTransferAction.js +2 -0
  74. package/dist/types/actions/tools/tokenTransferAction.js.map +1 -0
  75. package/dist/types/messages.d.ts +2 -1
  76. package/dist/types/messages.d.ts.map +1 -1
  77. package/dist/types/messages.js +1 -1
  78. package/dist/types/messages.js.map +1 -1
  79. package/package.json +1 -1
@@ -1,34 +1,186 @@
1
1
  import type { ModelMessage } from "@ai-sdk/provider-utils";
2
+ import type { PrepareTransactionRequestReturnType } from "viem";
2
3
  import { z } from "zod";
4
+ import type { ActionError } from "../types/actions/errors.js";
5
+ import type { DefiFetchListingsActionInput } from "../types/actions/tools/defiFetchListingsAction.js";
6
+ import type { DefiPositionsActionInput } from "../types/actions/tools/defiPositionsAction.js";
7
+ import type { DefiSupplyActionInput } from "../types/actions/tools/defiSupplyAction.js";
8
+ import type { DefiWithdrawActionInput } from "../types/actions/tools/defiWithdrawAction.js";
9
+ import type { ExchangeRateActionInput } from "../types/actions/tools/exchangeRateAction.js";
10
+ import type { GetWalletBalanceActionInput } from "../types/actions/tools/getWalletBalanceAction.js";
11
+ import type { SwapBridgeActionInput } from "../types/actions/tools/swapBridgeAction.js";
12
+ import type { TokenTransferActionInput } from "../types/actions/tools/tokenTransferAction.js";
3
13
  export declare const ToolResultSchema: z.ZodObject<{
4
14
  toolCallId: z.ZodString;
5
15
  toolName: z.ZodString;
6
16
  result: z.ZodUnknown;
7
17
  error: z.ZodOptional<z.ZodUnknown>;
8
18
  }, "strict", z.ZodTypeAny, {
9
- toolCallId: string;
10
19
  toolName: string;
20
+ toolCallId: string;
11
21
  result?: unknown;
12
22
  error?: unknown;
13
23
  }, {
14
- toolCallId: string;
15
24
  toolName: string;
25
+ toolCallId: string;
16
26
  result?: unknown;
17
27
  error?: unknown;
18
28
  }>;
29
+ export declare const PendingToolCallSchema: z.ZodObject<{
30
+ type: z.ZodLiteral<"tool-call">;
31
+ toolCallId: z.ZodString;
32
+ toolName: z.ZodString;
33
+ input: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
34
+ type: z.ZodLiteral<"BatchTransactions">;
35
+ value: z.ZodArray<z.ZodObject<{
36
+ transaction: z.ZodType<PrepareTransactionRequestReturnType>;
37
+ metadata: z.ZodOptional<z.ZodObject<{
38
+ explorerUrl: z.ZodOptional<z.ZodString>;
39
+ usdValue: z.ZodOptional<z.ZodString>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ explorerUrl?: string | undefined;
42
+ usdValue?: string | undefined;
43
+ }, {
44
+ explorerUrl?: string | undefined;
45
+ usdValue?: string | undefined;
46
+ }>>;
47
+ }, "strip", z.ZodTypeAny, {
48
+ transaction: PrepareTransactionRequestReturnType;
49
+ metadata?: {
50
+ explorerUrl?: string | undefined;
51
+ usdValue?: string | undefined;
52
+ } | undefined;
53
+ }, {
54
+ transaction: PrepareTransactionRequestReturnType;
55
+ metadata?: {
56
+ explorerUrl?: string | undefined;
57
+ usdValue?: string | undefined;
58
+ } | undefined;
59
+ }>, "many">;
60
+ }, "strip", z.ZodTypeAny, {
61
+ type: "BatchTransactions";
62
+ value: {
63
+ transaction: PrepareTransactionRequestReturnType;
64
+ metadata?: {
65
+ explorerUrl?: string | undefined;
66
+ usdValue?: string | undefined;
67
+ } | undefined;
68
+ }[];
69
+ }, {
70
+ type: "BatchTransactions";
71
+ value: {
72
+ transaction: PrepareTransactionRequestReturnType;
73
+ metadata?: {
74
+ explorerUrl?: string | undefined;
75
+ usdValue?: string | undefined;
76
+ } | undefined;
77
+ }[];
78
+ }>, z.ZodObject<{
79
+ type: z.ZodLiteral<"SingleTransaction">;
80
+ value: z.ZodObject<{
81
+ transaction: z.ZodType<PrepareTransactionRequestReturnType>;
82
+ metadata: z.ZodOptional<z.ZodObject<{
83
+ explorerUrl: z.ZodOptional<z.ZodString>;
84
+ usdValue: z.ZodOptional<z.ZodString>;
85
+ }, "strip", z.ZodTypeAny, {
86
+ explorerUrl?: string | undefined;
87
+ usdValue?: string | undefined;
88
+ }, {
89
+ explorerUrl?: string | undefined;
90
+ usdValue?: string | undefined;
91
+ }>>;
92
+ }, "strip", z.ZodTypeAny, {
93
+ transaction: PrepareTransactionRequestReturnType;
94
+ metadata?: {
95
+ explorerUrl?: string | undefined;
96
+ usdValue?: string | undefined;
97
+ } | undefined;
98
+ }, {
99
+ transaction: PrepareTransactionRequestReturnType;
100
+ metadata?: {
101
+ explorerUrl?: string | undefined;
102
+ usdValue?: string | undefined;
103
+ } | undefined;
104
+ }>;
105
+ }, "strip", z.ZodTypeAny, {
106
+ type: "SingleTransaction";
107
+ value: {
108
+ transaction: PrepareTransactionRequestReturnType;
109
+ metadata?: {
110
+ explorerUrl?: string | undefined;
111
+ usdValue?: string | undefined;
112
+ } | undefined;
113
+ };
114
+ }, {
115
+ type: "SingleTransaction";
116
+ value: {
117
+ transaction: PrepareTransactionRequestReturnType;
118
+ metadata?: {
119
+ explorerUrl?: string | undefined;
120
+ usdValue?: string | undefined;
121
+ } | undefined;
122
+ };
123
+ }>]>;
124
+ }, "strict", z.ZodTypeAny, {
125
+ type: "tool-call";
126
+ toolName: string;
127
+ toolCallId: string;
128
+ input: {
129
+ type: "BatchTransactions";
130
+ value: {
131
+ transaction: PrepareTransactionRequestReturnType;
132
+ metadata?: {
133
+ explorerUrl?: string | undefined;
134
+ usdValue?: string | undefined;
135
+ } | undefined;
136
+ }[];
137
+ } | {
138
+ type: "SingleTransaction";
139
+ value: {
140
+ transaction: PrepareTransactionRequestReturnType;
141
+ metadata?: {
142
+ explorerUrl?: string | undefined;
143
+ usdValue?: string | undefined;
144
+ } | undefined;
145
+ };
146
+ };
147
+ }, {
148
+ type: "tool-call";
149
+ toolName: string;
150
+ toolCallId: string;
151
+ input: {
152
+ type: "BatchTransactions";
153
+ value: {
154
+ transaction: PrepareTransactionRequestReturnType;
155
+ metadata?: {
156
+ explorerUrl?: string | undefined;
157
+ usdValue?: string | undefined;
158
+ } | undefined;
159
+ }[];
160
+ } | {
161
+ type: "SingleTransaction";
162
+ value: {
163
+ transaction: PrepareTransactionRequestReturnType;
164
+ metadata?: {
165
+ explorerUrl?: string | undefined;
166
+ usdValue?: string | undefined;
167
+ } | undefined;
168
+ };
169
+ };
170
+ }>;
19
171
  export declare const ToolResultArraySchema: z.ZodArray<z.ZodObject<{
20
172
  toolCallId: z.ZodString;
21
173
  toolName: z.ZodString;
22
174
  result: z.ZodUnknown;
23
175
  error: z.ZodOptional<z.ZodUnknown>;
24
176
  }, "strict", z.ZodTypeAny, {
25
- toolCallId: string;
26
177
  toolName: string;
178
+ toolCallId: string;
27
179
  result?: unknown;
28
180
  error?: unknown;
29
181
  }, {
30
- toolCallId: string;
31
182
  toolName: string;
183
+ toolCallId: string;
32
184
  result?: unknown;
33
185
  error?: unknown;
34
186
  }>, "many">;
@@ -41,16 +193,16 @@ export declare const ToolIncompletePartSchema: z.ZodObject<{
41
193
  missingParams: z.ZodArray<z.ZodString, "many">;
42
194
  humanReadableDescription: z.ZodString;
43
195
  }, "strict", z.ZodTypeAny, {
44
- toolCallId: string;
45
- toolName: string;
46
196
  type: "tool-incomplete";
197
+ toolName: string;
198
+ toolCallId: string;
47
199
  missingParams: string[];
48
200
  humanReadableDescription: string;
49
201
  args?: unknown;
50
202
  }, {
51
- toolCallId: string;
52
- toolName: string;
53
203
  type: "tool-incomplete";
204
+ toolName: string;
205
+ toolCallId: string;
54
206
  missingParams: string[];
55
207
  humanReadableDescription: string;
56
208
  args?: unknown;
@@ -59,17 +211,17 @@ export declare const ToolErrorPartSchema: z.ZodObject<{
59
211
  type: z.ZodLiteral<"tool-error">;
60
212
  toolCallId: z.ZodString;
61
213
  toolName: z.ZodString;
62
- error: z.ZodUnknown;
214
+ error: z.ZodType<ActionError<unknown>>;
63
215
  }, "strict", z.ZodTypeAny, {
64
- toolCallId: string;
65
- toolName: string;
66
216
  type: "tool-error";
67
- error?: unknown;
68
- }, {
69
- toolCallId: string;
70
217
  toolName: string;
218
+ toolCallId: string;
219
+ error: ActionError<unknown>;
220
+ }, {
71
221
  type: "tool-error";
72
- error?: unknown;
222
+ toolName: string;
223
+ toolCallId: string;
224
+ error: ActionError<unknown>;
73
225
  }>;
74
226
  export declare const TextPartSchema: z.ZodObject<{
75
227
  type: z.ZodLiteral<"text">;
@@ -81,41 +233,286 @@ export declare const TextPartSchema: z.ZodObject<{
81
233
  type: "text";
82
234
  text: string;
83
235
  }>;
84
- export declare const ToolCallPartSchema: z.ZodObject<{
236
+ /**
237
+ * Discriminated union schema for tool calls based on toolName
238
+ * Each tool has its own specific args schema
239
+ */
240
+ export declare const ToolCallPartSchema: z.ZodDiscriminatedUnion<"toolName", [z.ZodObject<{
85
241
  type: z.ZodLiteral<"tool-call">;
86
242
  toolCallId: z.ZodString;
87
- toolName: z.ZodString;
88
- args: z.ZodUnknown;
243
+ toolName: z.ZodLiteral<"tokenTransfer">;
244
+ args: z.ZodType<TokenTransferActionInput>;
89
245
  }, "strict", z.ZodTypeAny, {
246
+ type: "tool-call";
247
+ toolName: "tokenTransfer";
90
248
  toolCallId: string;
91
- toolName: string;
249
+ args: {
250
+ fromAddress: string;
251
+ toAddress: string;
252
+ amount: string;
253
+ token: string;
254
+ chain: string;
255
+ missingParameters?: string[] | undefined;
256
+ humanFriendlyMessage?: string | undefined;
257
+ };
258
+ }, {
92
259
  type: "tool-call";
93
- args?: unknown;
260
+ toolName: "tokenTransfer";
261
+ toolCallId: string;
262
+ args: {
263
+ fromAddress: string;
264
+ toAddress: string;
265
+ amount: string;
266
+ token: string;
267
+ chain: string;
268
+ missingParameters?: string[] | undefined;
269
+ humanFriendlyMessage?: string | undefined;
270
+ };
271
+ }>, z.ZodObject<{
272
+ type: z.ZodLiteral<"tool-call">;
273
+ toolCallId: z.ZodString;
274
+ toolName: z.ZodLiteral<"swapOrBridge">;
275
+ args: z.ZodType<SwapBridgeActionInput>;
276
+ }, "strict", z.ZodTypeAny, {
277
+ type: "tool-call";
278
+ toolName: "swapOrBridge";
279
+ toolCallId: string;
280
+ args: {
281
+ fromAddress: string;
282
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
283
+ fromToken: string;
284
+ fromAmount: string;
285
+ protocol: "lifi";
286
+ toAddress?: string | undefined;
287
+ missingParameters?: string[] | undefined;
288
+ humanFriendlyMessage?: string | undefined;
289
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
290
+ toToken?: string | undefined;
291
+ toAmount?: string | undefined;
292
+ };
94
293
  }, {
294
+ type: "tool-call";
295
+ toolName: "swapOrBridge";
95
296
  toolCallId: string;
96
- toolName: string;
297
+ args: {
298
+ fromAddress: string;
299
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
300
+ fromToken: string;
301
+ fromAmount: string;
302
+ protocol: "lifi";
303
+ toAddress?: string | undefined;
304
+ missingParameters?: string[] | undefined;
305
+ humanFriendlyMessage?: string | undefined;
306
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
307
+ toToken?: string | undefined;
308
+ toAmount?: string | undefined;
309
+ };
310
+ }>, z.ZodObject<{
311
+ type: z.ZodLiteral<"tool-call">;
312
+ toolCallId: z.ZodString;
313
+ toolName: z.ZodLiteral<"exchangeRate">;
314
+ args: z.ZodType<ExchangeRateActionInput>;
315
+ }, "strict", z.ZodTypeAny, {
97
316
  type: "tool-call";
98
- args?: unknown;
99
- }>;
317
+ toolName: "exchangeRate";
318
+ toolCallId: string;
319
+ args: {
320
+ provider: "coinMarketCap";
321
+ arguments: {
322
+ baseCurrency: string;
323
+ quoteCurrency: string;
324
+ baseAmount?: string | undefined;
325
+ quoteAmount?: string | undefined;
326
+ }[];
327
+ missingParameters?: string[] | undefined;
328
+ humanFriendlyMessage?: string | undefined;
329
+ };
330
+ }, {
331
+ type: "tool-call";
332
+ toolName: "exchangeRate";
333
+ toolCallId: string;
334
+ args: {
335
+ provider: "coinMarketCap";
336
+ arguments: {
337
+ baseCurrency: string;
338
+ quoteCurrency: string;
339
+ baseAmount?: string | undefined;
340
+ quoteAmount?: string | undefined;
341
+ }[];
342
+ missingParameters?: string[] | undefined;
343
+ humanFriendlyMessage?: string | undefined;
344
+ };
345
+ }>, z.ZodObject<{
346
+ type: z.ZodLiteral<"tool-call">;
347
+ toolCallId: z.ZodString;
348
+ toolName: z.ZodLiteral<"getWalletBalance">;
349
+ args: z.ZodType<GetWalletBalanceActionInput>;
350
+ }, "strict", z.ZodTypeAny, {
351
+ type: "tool-call";
352
+ toolName: "getWalletBalance";
353
+ toolCallId: string;
354
+ args: {
355
+ address: string;
356
+ provider: "moralis";
357
+ token?: string | undefined;
358
+ chain?: string | undefined;
359
+ missingParameters?: string[] | undefined;
360
+ humanFriendlyMessage?: string | undefined;
361
+ };
362
+ }, {
363
+ type: "tool-call";
364
+ toolName: "getWalletBalance";
365
+ toolCallId: string;
366
+ args: {
367
+ address: string;
368
+ provider: "moralis";
369
+ token?: string | undefined;
370
+ chain?: string | undefined;
371
+ missingParameters?: string[] | undefined;
372
+ humanFriendlyMessage?: string | undefined;
373
+ };
374
+ }>, z.ZodObject<{
375
+ type: z.ZodLiteral<"tool-call">;
376
+ toolCallId: z.ZodString;
377
+ toolName: z.ZodLiteral<"defiFetchListings">;
378
+ args: z.ZodType<DefiFetchListingsActionInput>;
379
+ }, "strict", z.ZodTypeAny, {
380
+ type: "tool-call";
381
+ toolName: "defiFetchListings";
382
+ toolCallId: string;
383
+ args: {
384
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
385
+ protocol: "aave";
386
+ missingParameters?: string[] | undefined;
387
+ humanFriendlyMessage?: string | undefined;
388
+ tokens?: string[] | undefined;
389
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
390
+ limit?: number | undefined;
391
+ };
392
+ }, {
393
+ type: "tool-call";
394
+ toolName: "defiFetchListings";
395
+ toolCallId: string;
396
+ args: {
397
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
398
+ protocol: "aave";
399
+ missingParameters?: string[] | undefined;
400
+ humanFriendlyMessage?: string | undefined;
401
+ tokens?: string[] | undefined;
402
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
403
+ limit?: number | undefined;
404
+ };
405
+ }>, z.ZodObject<{
406
+ type: z.ZodLiteral<"tool-call">;
407
+ toolCallId: z.ZodString;
408
+ toolName: z.ZodLiteral<"defiSupply">;
409
+ args: z.ZodType<DefiSupplyActionInput>;
410
+ }, "strict", z.ZodTypeAny, {
411
+ type: "tool-call";
412
+ toolName: "defiSupply";
413
+ toolCallId: string;
414
+ args: {
415
+ amount: string;
416
+ token: string;
417
+ chain: string;
418
+ protocol: "aave";
419
+ userAddress: string;
420
+ missingParameters?: string[] | undefined;
421
+ humanFriendlyMessage?: string | undefined;
422
+ };
423
+ }, {
424
+ type: "tool-call";
425
+ toolName: "defiSupply";
426
+ toolCallId: string;
427
+ args: {
428
+ amount: string;
429
+ token: string;
430
+ chain: string;
431
+ protocol: "aave";
432
+ userAddress: string;
433
+ missingParameters?: string[] | undefined;
434
+ humanFriendlyMessage?: string | undefined;
435
+ };
436
+ }>, z.ZodObject<{
437
+ type: z.ZodLiteral<"tool-call">;
438
+ toolCallId: z.ZodString;
439
+ toolName: z.ZodLiteral<"defiWithdraw">;
440
+ args: z.ZodType<DefiWithdrawActionInput>;
441
+ }, "strict", z.ZodTypeAny, {
442
+ type: "tool-call";
443
+ toolName: "defiWithdraw";
444
+ toolCallId: string;
445
+ args: {
446
+ amount: string;
447
+ token: string;
448
+ chain: string;
449
+ protocol: "aave";
450
+ userAddress: string;
451
+ missingParameters?: string[] | undefined;
452
+ humanFriendlyMessage?: string | undefined;
453
+ };
454
+ }, {
455
+ type: "tool-call";
456
+ toolName: "defiWithdraw";
457
+ toolCallId: string;
458
+ args: {
459
+ amount: string;
460
+ token: string;
461
+ chain: string;
462
+ protocol: "aave";
463
+ userAddress: string;
464
+ missingParameters?: string[] | undefined;
465
+ humanFriendlyMessage?: string | undefined;
466
+ };
467
+ }>, z.ZodObject<{
468
+ type: z.ZodLiteral<"tool-call">;
469
+ toolCallId: z.ZodString;
470
+ toolName: z.ZodLiteral<"defiPositions">;
471
+ args: z.ZodType<DefiPositionsActionInput>;
472
+ }, "strict", z.ZodTypeAny, {
473
+ type: "tool-call";
474
+ toolName: "defiPositions";
475
+ toolCallId: string;
476
+ args: {
477
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
478
+ protocol: "aave";
479
+ userAddress: string;
480
+ missingParameters?: string[] | undefined;
481
+ humanFriendlyMessage?: string | undefined;
482
+ tokens?: string[] | undefined;
483
+ };
484
+ }, {
485
+ type: "tool-call";
486
+ toolName: "defiPositions";
487
+ toolCallId: string;
488
+ args: {
489
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
490
+ protocol: "aave";
491
+ userAddress: string;
492
+ missingParameters?: string[] | undefined;
493
+ humanFriendlyMessage?: string | undefined;
494
+ tokens?: string[] | undefined;
495
+ };
496
+ }>]>;
100
497
  export declare const ToolResultPartSchema: z.ZodObject<{
101
498
  type: z.ZodLiteral<"tool-result">;
102
499
  toolCallId: z.ZodString;
103
500
  toolName: z.ZodString;
104
501
  result: z.ZodUnknown;
105
502
  }, "strict", z.ZodTypeAny, {
106
- toolCallId: string;
107
- toolName: string;
108
503
  type: "tool-result";
504
+ toolName: string;
505
+ toolCallId: string;
109
506
  result?: unknown;
110
507
  }, {
111
- toolCallId: string;
112
- toolName: string;
113
508
  type: "tool-result";
509
+ toolName: string;
510
+ toolCallId: string;
114
511
  result?: unknown;
115
512
  }>;
116
513
  export declare const CoreMessageSchema: z.ZodObject<{
117
514
  role: z.ZodEnum<["user", "assistant", "tool", "system"]>;
118
- content: z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
515
+ content: z.ZodArray<z.ZodUnion<[z.ZodObject<{
119
516
  type: z.ZodLiteral<"text">;
120
517
  text: z.ZodString;
121
518
  }, "strict", z.ZodTypeAny, {
@@ -124,35 +521,276 @@ export declare const CoreMessageSchema: z.ZodObject<{
124
521
  }, {
125
522
  type: "text";
126
523
  text: string;
524
+ }>, z.ZodDiscriminatedUnion<"toolName", [z.ZodObject<{
525
+ type: z.ZodLiteral<"tool-call">;
526
+ toolCallId: z.ZodString;
527
+ toolName: z.ZodLiteral<"tokenTransfer">;
528
+ args: z.ZodType<TokenTransferActionInput>;
529
+ }, "strict", z.ZodTypeAny, {
530
+ type: "tool-call";
531
+ toolName: "tokenTransfer";
532
+ toolCallId: string;
533
+ args: {
534
+ fromAddress: string;
535
+ toAddress: string;
536
+ amount: string;
537
+ token: string;
538
+ chain: string;
539
+ missingParameters?: string[] | undefined;
540
+ humanFriendlyMessage?: string | undefined;
541
+ };
542
+ }, {
543
+ type: "tool-call";
544
+ toolName: "tokenTransfer";
545
+ toolCallId: string;
546
+ args: {
547
+ fromAddress: string;
548
+ toAddress: string;
549
+ amount: string;
550
+ token: string;
551
+ chain: string;
552
+ missingParameters?: string[] | undefined;
553
+ humanFriendlyMessage?: string | undefined;
554
+ };
127
555
  }>, z.ZodObject<{
128
556
  type: z.ZodLiteral<"tool-call">;
129
557
  toolCallId: z.ZodString;
130
- toolName: z.ZodString;
131
- args: z.ZodUnknown;
558
+ toolName: z.ZodLiteral<"swapOrBridge">;
559
+ args: z.ZodType<SwapBridgeActionInput>;
132
560
  }, "strict", z.ZodTypeAny, {
561
+ type: "tool-call";
562
+ toolName: "swapOrBridge";
133
563
  toolCallId: string;
134
- toolName: string;
564
+ args: {
565
+ fromAddress: string;
566
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
567
+ fromToken: string;
568
+ fromAmount: string;
569
+ protocol: "lifi";
570
+ toAddress?: string | undefined;
571
+ missingParameters?: string[] | undefined;
572
+ humanFriendlyMessage?: string | undefined;
573
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
574
+ toToken?: string | undefined;
575
+ toAmount?: string | undefined;
576
+ };
577
+ }, {
135
578
  type: "tool-call";
136
- args?: unknown;
579
+ toolName: "swapOrBridge";
580
+ toolCallId: string;
581
+ args: {
582
+ fromAddress: string;
583
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
584
+ fromToken: string;
585
+ fromAmount: string;
586
+ protocol: "lifi";
587
+ toAddress?: string | undefined;
588
+ missingParameters?: string[] | undefined;
589
+ humanFriendlyMessage?: string | undefined;
590
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
591
+ toToken?: string | undefined;
592
+ toAmount?: string | undefined;
593
+ };
594
+ }>, z.ZodObject<{
595
+ type: z.ZodLiteral<"tool-call">;
596
+ toolCallId: z.ZodString;
597
+ toolName: z.ZodLiteral<"exchangeRate">;
598
+ args: z.ZodType<ExchangeRateActionInput>;
599
+ }, "strict", z.ZodTypeAny, {
600
+ type: "tool-call";
601
+ toolName: "exchangeRate";
602
+ toolCallId: string;
603
+ args: {
604
+ provider: "coinMarketCap";
605
+ arguments: {
606
+ baseCurrency: string;
607
+ quoteCurrency: string;
608
+ baseAmount?: string | undefined;
609
+ quoteAmount?: string | undefined;
610
+ }[];
611
+ missingParameters?: string[] | undefined;
612
+ humanFriendlyMessage?: string | undefined;
613
+ };
137
614
  }, {
615
+ type: "tool-call";
616
+ toolName: "exchangeRate";
138
617
  toolCallId: string;
139
- toolName: string;
618
+ args: {
619
+ provider: "coinMarketCap";
620
+ arguments: {
621
+ baseCurrency: string;
622
+ quoteCurrency: string;
623
+ baseAmount?: string | undefined;
624
+ quoteAmount?: string | undefined;
625
+ }[];
626
+ missingParameters?: string[] | undefined;
627
+ humanFriendlyMessage?: string | undefined;
628
+ };
629
+ }>, z.ZodObject<{
630
+ type: z.ZodLiteral<"tool-call">;
631
+ toolCallId: z.ZodString;
632
+ toolName: z.ZodLiteral<"getWalletBalance">;
633
+ args: z.ZodType<GetWalletBalanceActionInput>;
634
+ }, "strict", z.ZodTypeAny, {
140
635
  type: "tool-call";
141
- args?: unknown;
636
+ toolName: "getWalletBalance";
637
+ toolCallId: string;
638
+ args: {
639
+ address: string;
640
+ provider: "moralis";
641
+ token?: string | undefined;
642
+ chain?: string | undefined;
643
+ missingParameters?: string[] | undefined;
644
+ humanFriendlyMessage?: string | undefined;
645
+ };
646
+ }, {
647
+ type: "tool-call";
648
+ toolName: "getWalletBalance";
649
+ toolCallId: string;
650
+ args: {
651
+ address: string;
652
+ provider: "moralis";
653
+ token?: string | undefined;
654
+ chain?: string | undefined;
655
+ missingParameters?: string[] | undefined;
656
+ humanFriendlyMessage?: string | undefined;
657
+ };
658
+ }>, z.ZodObject<{
659
+ type: z.ZodLiteral<"tool-call">;
660
+ toolCallId: z.ZodString;
661
+ toolName: z.ZodLiteral<"defiFetchListings">;
662
+ args: z.ZodType<DefiFetchListingsActionInput>;
663
+ }, "strict", z.ZodTypeAny, {
664
+ type: "tool-call";
665
+ toolName: "defiFetchListings";
666
+ toolCallId: string;
667
+ args: {
668
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
669
+ protocol: "aave";
670
+ missingParameters?: string[] | undefined;
671
+ humanFriendlyMessage?: string | undefined;
672
+ tokens?: string[] | undefined;
673
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
674
+ limit?: number | undefined;
675
+ };
676
+ }, {
677
+ type: "tool-call";
678
+ toolName: "defiFetchListings";
679
+ toolCallId: string;
680
+ args: {
681
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
682
+ protocol: "aave";
683
+ missingParameters?: string[] | undefined;
684
+ humanFriendlyMessage?: string | undefined;
685
+ tokens?: string[] | undefined;
686
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
687
+ limit?: number | undefined;
688
+ };
689
+ }>, z.ZodObject<{
690
+ type: z.ZodLiteral<"tool-call">;
691
+ toolCallId: z.ZodString;
692
+ toolName: z.ZodLiteral<"defiSupply">;
693
+ args: z.ZodType<DefiSupplyActionInput>;
694
+ }, "strict", z.ZodTypeAny, {
695
+ type: "tool-call";
696
+ toolName: "defiSupply";
697
+ toolCallId: string;
698
+ args: {
699
+ amount: string;
700
+ token: string;
701
+ chain: string;
702
+ protocol: "aave";
703
+ userAddress: string;
704
+ missingParameters?: string[] | undefined;
705
+ humanFriendlyMessage?: string | undefined;
706
+ };
707
+ }, {
708
+ type: "tool-call";
709
+ toolName: "defiSupply";
710
+ toolCallId: string;
711
+ args: {
712
+ amount: string;
713
+ token: string;
714
+ chain: string;
715
+ protocol: "aave";
716
+ userAddress: string;
717
+ missingParameters?: string[] | undefined;
718
+ humanFriendlyMessage?: string | undefined;
719
+ };
720
+ }>, z.ZodObject<{
721
+ type: z.ZodLiteral<"tool-call">;
722
+ toolCallId: z.ZodString;
723
+ toolName: z.ZodLiteral<"defiWithdraw">;
724
+ args: z.ZodType<DefiWithdrawActionInput>;
725
+ }, "strict", z.ZodTypeAny, {
726
+ type: "tool-call";
727
+ toolName: "defiWithdraw";
728
+ toolCallId: string;
729
+ args: {
730
+ amount: string;
731
+ token: string;
732
+ chain: string;
733
+ protocol: "aave";
734
+ userAddress: string;
735
+ missingParameters?: string[] | undefined;
736
+ humanFriendlyMessage?: string | undefined;
737
+ };
738
+ }, {
739
+ type: "tool-call";
740
+ toolName: "defiWithdraw";
741
+ toolCallId: string;
742
+ args: {
743
+ amount: string;
744
+ token: string;
745
+ chain: string;
746
+ protocol: "aave";
747
+ userAddress: string;
748
+ missingParameters?: string[] | undefined;
749
+ humanFriendlyMessage?: string | undefined;
750
+ };
142
751
  }>, z.ZodObject<{
752
+ type: z.ZodLiteral<"tool-call">;
753
+ toolCallId: z.ZodString;
754
+ toolName: z.ZodLiteral<"defiPositions">;
755
+ args: z.ZodType<DefiPositionsActionInput>;
756
+ }, "strict", z.ZodTypeAny, {
757
+ type: "tool-call";
758
+ toolName: "defiPositions";
759
+ toolCallId: string;
760
+ args: {
761
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
762
+ protocol: "aave";
763
+ userAddress: string;
764
+ missingParameters?: string[] | undefined;
765
+ humanFriendlyMessage?: string | undefined;
766
+ tokens?: string[] | undefined;
767
+ };
768
+ }, {
769
+ type: "tool-call";
770
+ toolName: "defiPositions";
771
+ toolCallId: string;
772
+ args: {
773
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
774
+ protocol: "aave";
775
+ userAddress: string;
776
+ missingParameters?: string[] | undefined;
777
+ humanFriendlyMessage?: string | undefined;
778
+ tokens?: string[] | undefined;
779
+ };
780
+ }>]>, z.ZodObject<{
143
781
  type: z.ZodLiteral<"tool-result">;
144
782
  toolCallId: z.ZodString;
145
783
  toolName: z.ZodString;
146
784
  result: z.ZodUnknown;
147
785
  }, "strict", z.ZodTypeAny, {
148
- toolCallId: string;
149
- toolName: string;
150
786
  type: "tool-result";
787
+ toolName: string;
788
+ toolCallId: string;
151
789
  result?: unknown;
152
790
  }, {
153
- toolCallId: string;
154
- toolName: string;
155
791
  type: "tool-result";
792
+ toolName: string;
793
+ toolCallId: string;
156
794
  result?: unknown;
157
795
  }>, z.ZodObject<{
158
796
  type: z.ZodLiteral<"tool-incomplete">;
@@ -162,16 +800,16 @@ export declare const CoreMessageSchema: z.ZodObject<{
162
800
  missingParams: z.ZodArray<z.ZodString, "many">;
163
801
  humanReadableDescription: z.ZodString;
164
802
  }, "strict", z.ZodTypeAny, {
165
- toolCallId: string;
166
- toolName: string;
167
803
  type: "tool-incomplete";
804
+ toolName: string;
805
+ toolCallId: string;
168
806
  missingParams: string[];
169
807
  humanReadableDescription: string;
170
808
  args?: unknown;
171
809
  }, {
172
- toolCallId: string;
173
- toolName: string;
174
810
  type: "tool-incomplete";
811
+ toolName: string;
812
+ toolCallId: string;
175
813
  missingParams: string[];
176
814
  humanReadableDescription: string;
177
815
  args?: unknown;
@@ -179,73 +817,279 @@ export declare const CoreMessageSchema: z.ZodObject<{
179
817
  type: z.ZodLiteral<"tool-error">;
180
818
  toolCallId: z.ZodString;
181
819
  toolName: z.ZodString;
182
- error: z.ZodUnknown;
820
+ error: z.ZodType<ActionError<unknown>>;
183
821
  }, "strict", z.ZodTypeAny, {
184
- toolCallId: string;
185
- toolName: string;
186
822
  type: "tool-error";
187
- error?: unknown;
188
- }, {
189
- toolCallId: string;
190
823
  toolName: string;
824
+ toolCallId: string;
825
+ error: ActionError<unknown>;
826
+ }, {
191
827
  type: "tool-error";
192
- error?: unknown;
193
- }>]>, "many">, z.ZodString]>;
828
+ toolName: string;
829
+ toolCallId: string;
830
+ error: ActionError<unknown>;
831
+ }>]>, "many">;
194
832
  }, "strict", z.ZodTypeAny, {
195
833
  role: "user" | "assistant" | "tool" | "system";
196
- content: string | ({
834
+ content: ({
835
+ type: "text";
836
+ text: string;
837
+ } | {
838
+ type: "tool-call";
839
+ toolName: "tokenTransfer";
197
840
  toolCallId: string;
198
- toolName: string;
199
- type: "tool-incomplete";
200
- missingParams: string[];
201
- humanReadableDescription: string;
202
- args?: unknown;
841
+ args: {
842
+ fromAddress: string;
843
+ toAddress: string;
844
+ amount: string;
845
+ token: string;
846
+ chain: string;
847
+ missingParameters?: string[] | undefined;
848
+ humanFriendlyMessage?: string | undefined;
849
+ };
203
850
  } | {
851
+ type: "tool-call";
852
+ toolName: "swapOrBridge";
204
853
  toolCallId: string;
205
- toolName: string;
206
- type: "tool-error";
207
- error?: unknown;
854
+ args: {
855
+ fromAddress: string;
856
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
857
+ fromToken: string;
858
+ fromAmount: string;
859
+ protocol: "lifi";
860
+ toAddress?: string | undefined;
861
+ missingParameters?: string[] | undefined;
862
+ humanFriendlyMessage?: string | undefined;
863
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
864
+ toToken?: string | undefined;
865
+ toAmount?: string | undefined;
866
+ };
208
867
  } | {
209
- type: "text";
210
- text: string;
868
+ type: "tool-call";
869
+ toolName: "exchangeRate";
870
+ toolCallId: string;
871
+ args: {
872
+ provider: "coinMarketCap";
873
+ arguments: {
874
+ baseCurrency: string;
875
+ quoteCurrency: string;
876
+ baseAmount?: string | undefined;
877
+ quoteAmount?: string | undefined;
878
+ }[];
879
+ missingParameters?: string[] | undefined;
880
+ humanFriendlyMessage?: string | undefined;
881
+ };
211
882
  } | {
883
+ type: "tool-call";
884
+ toolName: "getWalletBalance";
212
885
  toolCallId: string;
213
- toolName: string;
886
+ args: {
887
+ address: string;
888
+ provider: "moralis";
889
+ token?: string | undefined;
890
+ chain?: string | undefined;
891
+ missingParameters?: string[] | undefined;
892
+ humanFriendlyMessage?: string | undefined;
893
+ };
894
+ } | {
214
895
  type: "tool-call";
215
- args?: unknown;
896
+ toolName: "defiFetchListings";
897
+ toolCallId: string;
898
+ args: {
899
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
900
+ protocol: "aave";
901
+ missingParameters?: string[] | undefined;
902
+ humanFriendlyMessage?: string | undefined;
903
+ tokens?: string[] | undefined;
904
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
905
+ limit?: number | undefined;
906
+ };
216
907
  } | {
908
+ type: "tool-call";
909
+ toolName: "defiSupply";
217
910
  toolCallId: string;
218
- toolName: string;
219
- type: "tool-result";
220
- result?: unknown;
221
- })[];
222
- }, {
223
- role: "user" | "assistant" | "tool" | "system";
224
- content: string | ({
911
+ args: {
912
+ amount: string;
913
+ token: string;
914
+ chain: string;
915
+ protocol: "aave";
916
+ userAddress: string;
917
+ missingParameters?: string[] | undefined;
918
+ humanFriendlyMessage?: string | undefined;
919
+ };
920
+ } | {
921
+ type: "tool-call";
922
+ toolName: "defiWithdraw";
225
923
  toolCallId: string;
924
+ args: {
925
+ amount: string;
926
+ token: string;
927
+ chain: string;
928
+ protocol: "aave";
929
+ userAddress: string;
930
+ missingParameters?: string[] | undefined;
931
+ humanFriendlyMessage?: string | undefined;
932
+ };
933
+ } | {
934
+ type: "tool-call";
935
+ toolName: "defiPositions";
936
+ toolCallId: string;
937
+ args: {
938
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
939
+ protocol: "aave";
940
+ userAddress: string;
941
+ missingParameters?: string[] | undefined;
942
+ humanFriendlyMessage?: string | undefined;
943
+ tokens?: string[] | undefined;
944
+ };
945
+ } | {
946
+ type: "tool-result";
226
947
  toolName: string;
948
+ toolCallId: string;
949
+ result?: unknown;
950
+ } | {
227
951
  type: "tool-incomplete";
952
+ toolName: string;
953
+ toolCallId: string;
228
954
  missingParams: string[];
229
955
  humanReadableDescription: string;
230
956
  args?: unknown;
231
957
  } | {
232
- toolCallId: string;
233
- toolName: string;
234
958
  type: "tool-error";
235
- error?: unknown;
236
- } | {
959
+ toolName: string;
960
+ toolCallId: string;
961
+ error: ActionError<unknown>;
962
+ })[];
963
+ }, {
964
+ role: "user" | "assistant" | "tool" | "system";
965
+ content: ({
237
966
  type: "text";
238
967
  text: string;
239
968
  } | {
969
+ type: "tool-call";
970
+ toolName: "tokenTransfer";
240
971
  toolCallId: string;
241
- toolName: string;
972
+ args: {
973
+ fromAddress: string;
974
+ toAddress: string;
975
+ amount: string;
976
+ token: string;
977
+ chain: string;
978
+ missingParameters?: string[] | undefined;
979
+ humanFriendlyMessage?: string | undefined;
980
+ };
981
+ } | {
242
982
  type: "tool-call";
243
- args?: unknown;
983
+ toolName: "swapOrBridge";
984
+ toolCallId: string;
985
+ args: {
986
+ fromAddress: string;
987
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
988
+ fromToken: string;
989
+ fromAmount: string;
990
+ protocol: "lifi";
991
+ toAddress?: string | undefined;
992
+ missingParameters?: string[] | undefined;
993
+ humanFriendlyMessage?: string | undefined;
994
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
995
+ toToken?: string | undefined;
996
+ toAmount?: string | undefined;
997
+ };
244
998
  } | {
999
+ type: "tool-call";
1000
+ toolName: "exchangeRate";
245
1001
  toolCallId: string;
246
- toolName: string;
1002
+ args: {
1003
+ provider: "coinMarketCap";
1004
+ arguments: {
1005
+ baseCurrency: string;
1006
+ quoteCurrency: string;
1007
+ baseAmount?: string | undefined;
1008
+ quoteAmount?: string | undefined;
1009
+ }[];
1010
+ missingParameters?: string[] | undefined;
1011
+ humanFriendlyMessage?: string | undefined;
1012
+ };
1013
+ } | {
1014
+ type: "tool-call";
1015
+ toolName: "getWalletBalance";
1016
+ toolCallId: string;
1017
+ args: {
1018
+ address: string;
1019
+ provider: "moralis";
1020
+ token?: string | undefined;
1021
+ chain?: string | undefined;
1022
+ missingParameters?: string[] | undefined;
1023
+ humanFriendlyMessage?: string | undefined;
1024
+ };
1025
+ } | {
1026
+ type: "tool-call";
1027
+ toolName: "defiFetchListings";
1028
+ toolCallId: string;
1029
+ args: {
1030
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1031
+ protocol: "aave";
1032
+ missingParameters?: string[] | undefined;
1033
+ humanFriendlyMessage?: string | undefined;
1034
+ tokens?: string[] | undefined;
1035
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
1036
+ limit?: number | undefined;
1037
+ };
1038
+ } | {
1039
+ type: "tool-call";
1040
+ toolName: "defiSupply";
1041
+ toolCallId: string;
1042
+ args: {
1043
+ amount: string;
1044
+ token: string;
1045
+ chain: string;
1046
+ protocol: "aave";
1047
+ userAddress: string;
1048
+ missingParameters?: string[] | undefined;
1049
+ humanFriendlyMessage?: string | undefined;
1050
+ };
1051
+ } | {
1052
+ type: "tool-call";
1053
+ toolName: "defiWithdraw";
1054
+ toolCallId: string;
1055
+ args: {
1056
+ amount: string;
1057
+ token: string;
1058
+ chain: string;
1059
+ protocol: "aave";
1060
+ userAddress: string;
1061
+ missingParameters?: string[] | undefined;
1062
+ humanFriendlyMessage?: string | undefined;
1063
+ };
1064
+ } | {
1065
+ type: "tool-call";
1066
+ toolName: "defiPositions";
1067
+ toolCallId: string;
1068
+ args: {
1069
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1070
+ protocol: "aave";
1071
+ userAddress: string;
1072
+ missingParameters?: string[] | undefined;
1073
+ humanFriendlyMessage?: string | undefined;
1074
+ tokens?: string[] | undefined;
1075
+ };
1076
+ } | {
247
1077
  type: "tool-result";
1078
+ toolName: string;
1079
+ toolCallId: string;
248
1080
  result?: unknown;
1081
+ } | {
1082
+ type: "tool-incomplete";
1083
+ toolName: string;
1084
+ toolCallId: string;
1085
+ missingParams: string[];
1086
+ humanReadableDescription: string;
1087
+ args?: unknown;
1088
+ } | {
1089
+ type: "tool-error";
1090
+ toolName: string;
1091
+ toolCallId: string;
1092
+ error: ActionError<unknown>;
249
1093
  })[];
250
1094
  }>;
251
1095
  export declare const HistorySchema: z.ZodArray<z.ZodType<ModelMessage, z.ZodTypeDef, ModelMessage>, "many">;