@illalabs/interfaces 0.3.0-canary.2110efe9 → 0.3.0-canary.2c2d50f5

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