@illalabs/interfaces 0.2.1 → 0.3.0-canary.1a04c18e

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 (116) 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 +90 -590
  10. package/dist/schemas/chatContext.d.ts.map +1 -1
  11. package/dist/schemas/chatRequestBody.d.ts +278 -1960
  12. package/dist/schemas/chatRequestBody.d.ts.map +1 -1
  13. package/dist/schemas/chatRequestBody.js +6 -4
  14. package/dist/schemas/chatRequestBody.js.map +1 -1
  15. package/dist/schemas/executionCheckerQueryParams.d.ts +5 -5
  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 +3 -0
  21. package/dist/schemas/index.d.ts.map +1 -1
  22. package/dist/schemas/index.js +3 -0
  23. package/dist/schemas/index.js.map +1 -1
  24. package/dist/schemas/messages.d.ts +95 -930
  25. package/dist/schemas/messages.d.ts.map +1 -1
  26. package/dist/schemas/messages.js +10 -113
  27. package/dist/schemas/messages.js.map +1 -1
  28. package/dist/schemas/modelContext.d.ts +23 -0
  29. package/dist/schemas/modelContext.d.ts.map +1 -0
  30. package/dist/schemas/modelContext.js +13 -0
  31. package/dist/schemas/modelContext.js.map +1 -0
  32. package/dist/schemas/telemetryEvents.d.ts +1645 -0
  33. package/dist/schemas/telemetryEvents.d.ts.map +1 -0
  34. package/dist/schemas/telemetryEvents.js +236 -0
  35. package/dist/schemas/telemetryEvents.js.map +1 -0
  36. package/dist/schemas/toolAutorouter.d.ts +6 -6
  37. package/dist/tools/IllaToolError.d.ts +117 -0
  38. package/dist/tools/IllaToolError.d.ts.map +1 -0
  39. package/dist/tools/IllaToolError.js +147 -0
  40. package/dist/tools/IllaToolError.js.map +1 -0
  41. package/dist/tools/IllaToolOutcome.d.ts +131 -0
  42. package/dist/tools/IllaToolOutcome.d.ts.map +1 -0
  43. package/dist/tools/IllaToolOutcome.js +191 -0
  44. package/dist/tools/IllaToolOutcome.js.map +1 -0
  45. package/dist/tools/index.d.ts +3 -0
  46. package/dist/tools/index.d.ts.map +1 -0
  47. package/dist/tools/index.js +3 -0
  48. package/dist/tools/index.js.map +1 -0
  49. package/dist/types/actions/inputs.d.ts +5 -3
  50. package/dist/types/actions/inputs.d.ts.map +1 -1
  51. package/dist/types/actions/tools/{swapBridgeAction.d.ts → bridgeAction.d.ts} +4 -4
  52. package/dist/types/actions/tools/bridgeAction.d.ts.map +1 -0
  53. package/dist/types/actions/tools/bridgeAction.js +2 -0
  54. package/dist/types/actions/tools/bridgeAction.js.map +1 -0
  55. package/dist/types/actions/tools/defiFetchListingsAction.d.ts +1 -2
  56. package/dist/types/actions/tools/defiFetchListingsAction.d.ts.map +1 -1
  57. package/dist/types/actions/tools/defiFetchListingsAction.js +1 -1
  58. package/dist/types/actions/tools/defiFetchListingsAction.js.map +1 -1
  59. package/dist/types/actions/tools/defiPositionsAction.d.ts +1 -2
  60. package/dist/types/actions/tools/defiPositionsAction.d.ts.map +1 -1
  61. package/dist/types/actions/tools/defiPositionsAction.js +1 -1
  62. package/dist/types/actions/tools/defiPositionsAction.js.map +1 -1
  63. package/dist/types/actions/tools/defiSupplyAction.d.ts +1 -2
  64. package/dist/types/actions/tools/defiSupplyAction.d.ts.map +1 -1
  65. package/dist/types/actions/tools/defiSupplyAction.js +1 -1
  66. package/dist/types/actions/tools/defiSupplyAction.js.map +1 -1
  67. package/dist/types/actions/tools/defiWithdrawAction.d.ts +1 -2
  68. package/dist/types/actions/tools/defiWithdrawAction.d.ts.map +1 -1
  69. package/dist/types/actions/tools/defiWithdrawAction.js +1 -1
  70. package/dist/types/actions/tools/defiWithdrawAction.js.map +1 -1
  71. package/dist/types/actions/tools/exchangeRateAction.d.ts +1 -2
  72. package/dist/types/actions/tools/exchangeRateAction.d.ts.map +1 -1
  73. package/dist/types/actions/tools/exchangeRateAction.js +1 -1
  74. package/dist/types/actions/tools/exchangeRateAction.js.map +1 -1
  75. package/dist/types/actions/tools/getWalletBalanceAction.d.ts +2 -2
  76. package/dist/types/actions/tools/getWalletBalanceAction.d.ts.map +1 -1
  77. package/dist/types/actions/tools/getWalletBalanceAction.js +1 -1
  78. package/dist/types/actions/tools/getWalletBalanceAction.js.map +1 -1
  79. package/dist/types/actions/tools/index.d.ts +9 -3
  80. package/dist/types/actions/tools/index.d.ts.map +1 -1
  81. package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts +21 -0
  82. package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts.map +1 -0
  83. package/dist/types/actions/tools/predictionMarketsFetchAction.js +2 -0
  84. package/dist/types/actions/tools/predictionMarketsFetchAction.js.map +1 -0
  85. package/dist/types/actions/tools/swapAction.d.ts +16 -0
  86. package/dist/types/actions/tools/swapAction.d.ts.map +1 -0
  87. package/dist/types/actions/tools/swapAction.js +2 -0
  88. package/dist/types/actions/tools/swapAction.js.map +1 -0
  89. package/dist/types/actions/tools/tokenTransferAction.d.ts +1 -2
  90. package/dist/types/actions/tools/tokenTransferAction.d.ts.map +1 -1
  91. package/dist/types/actions/tools/tokenTransferAction.js +1 -1
  92. package/dist/types/actions/tools/tokenTransferAction.js.map +1 -1
  93. package/dist/types/index.d.ts +2 -0
  94. package/dist/types/index.d.ts.map +1 -1
  95. package/dist/types/index.js +2 -0
  96. package/dist/types/index.js.map +1 -1
  97. package/dist/types/messages.d.ts +3 -6
  98. package/dist/types/messages.d.ts.map +1 -1
  99. package/dist/types/messages.js +1 -1
  100. package/dist/types/messages.js.map +1 -1
  101. package/dist/types/streaming.d.ts +81 -0
  102. package/dist/types/streaming.d.ts.map +1 -0
  103. package/dist/types/streaming.js +2 -0
  104. package/dist/types/streaming.js.map +1 -0
  105. package/dist/types/telemetry.d.ts +139 -0
  106. package/dist/types/telemetry.d.ts.map +1 -0
  107. package/dist/types/telemetry.js +7 -0
  108. package/dist/types/telemetry.js.map +1 -0
  109. package/dist/utils/constants.d.ts +6 -4
  110. package/dist/utils/constants.d.ts.map +1 -1
  111. package/dist/utils/constants.js +18 -3
  112. package/dist/utils/constants.js.map +1 -1
  113. package/package.json +4 -4
  114. package/dist/types/actions/tools/swapBridgeAction.d.ts.map +0 -1
  115. package/dist/types/actions/tools/swapBridgeAction.js +0 -2
  116. package/dist/types/actions/tools/swapBridgeAction.js.map +0 -1
@@ -1,31 +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 { 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";
13
- export declare const ToolResultSchema: z.ZodObject<{
14
- toolCallId: z.ZodString;
15
- toolName: z.ZodString;
16
- result: z.ZodUnknown;
17
- error: z.ZodOptional<z.ZodUnknown>;
18
- }, "strict", z.ZodTypeAny, {
19
- toolName: string;
20
- toolCallId: string;
21
- result?: unknown;
22
- error?: unknown;
23
- }, {
24
- toolName: string;
25
- toolCallId: string;
26
- result?: unknown;
27
- error?: unknown;
28
- }>;
29
4
  export declare const PendingToolCallSchema: z.ZodObject<{
30
5
  type: z.ZodLiteral<"tool-call">;
31
6
  toolCallId: z.ZodString;
@@ -58,7 +33,6 @@ export declare const PendingToolCallSchema: z.ZodObject<{
58
33
  } | undefined;
59
34
  }>, "many">;
60
35
  }, "strip", z.ZodTypeAny, {
61
- type: "BatchTransactions";
62
36
  value: {
63
37
  transaction: PrepareTransactionRequestReturnType;
64
38
  metadata?: {
@@ -66,8 +40,8 @@ export declare const PendingToolCallSchema: z.ZodObject<{
66
40
  usdValue?: string | undefined;
67
41
  } | undefined;
68
42
  }[];
69
- }, {
70
43
  type: "BatchTransactions";
44
+ }, {
71
45
  value: {
72
46
  transaction: PrepareTransactionRequestReturnType;
73
47
  metadata?: {
@@ -75,6 +49,7 @@ export declare const PendingToolCallSchema: z.ZodObject<{
75
49
  usdValue?: string | undefined;
76
50
  } | undefined;
77
51
  }[];
52
+ type: "BatchTransactions";
78
53
  }>, z.ZodObject<{
79
54
  type: z.ZodLiteral<"SingleTransaction">;
80
55
  value: z.ZodObject<{
@@ -103,7 +78,6 @@ export declare const PendingToolCallSchema: z.ZodObject<{
103
78
  } | undefined;
104
79
  }>;
105
80
  }, "strip", z.ZodTypeAny, {
106
- type: "SingleTransaction";
107
81
  value: {
108
82
  transaction: PrepareTransactionRequestReturnType;
109
83
  metadata?: {
@@ -111,8 +85,8 @@ export declare const PendingToolCallSchema: z.ZodObject<{
111
85
  usdValue?: string | undefined;
112
86
  } | undefined;
113
87
  };
114
- }, {
115
88
  type: "SingleTransaction";
89
+ }, {
116
90
  value: {
117
91
  transaction: PrepareTransactionRequestReturnType;
118
92
  metadata?: {
@@ -120,13 +94,11 @@ export declare const PendingToolCallSchema: z.ZodObject<{
120
94
  usdValue?: string | undefined;
121
95
  } | undefined;
122
96
  };
97
+ type: "SingleTransaction";
123
98
  }>]>;
124
99
  }, "strict", z.ZodTypeAny, {
125
100
  type: "tool-call";
126
- toolName: string;
127
- toolCallId: string;
128
101
  input: {
129
- type: "BatchTransactions";
130
102
  value: {
131
103
  transaction: PrepareTransactionRequestReturnType;
132
104
  metadata?: {
@@ -134,8 +106,8 @@ export declare const PendingToolCallSchema: z.ZodObject<{
134
106
  usdValue?: string | undefined;
135
107
  } | undefined;
136
108
  }[];
109
+ type: "BatchTransactions";
137
110
  } | {
138
- type: "SingleTransaction";
139
111
  value: {
140
112
  transaction: PrepareTransactionRequestReturnType;
141
113
  metadata?: {
@@ -143,13 +115,13 @@ export declare const PendingToolCallSchema: z.ZodObject<{
143
115
  usdValue?: string | undefined;
144
116
  } | undefined;
145
117
  };
118
+ type: "SingleTransaction";
146
119
  };
120
+ toolCallId: string;
121
+ toolName: string;
147
122
  }, {
148
123
  type: "tool-call";
149
- toolName: string;
150
- toolCallId: string;
151
124
  input: {
152
- type: "BatchTransactions";
153
125
  value: {
154
126
  transaction: PrepareTransactionRequestReturnType;
155
127
  metadata?: {
@@ -157,8 +129,8 @@ export declare const PendingToolCallSchema: z.ZodObject<{
157
129
  usdValue?: string | undefined;
158
130
  } | undefined;
159
131
  }[];
132
+ type: "BatchTransactions";
160
133
  } | {
161
- type: "SingleTransaction";
162
134
  value: {
163
135
  transaction: PrepareTransactionRequestReturnType;
164
136
  metadata?: {
@@ -166,63 +138,14 @@ export declare const PendingToolCallSchema: z.ZodObject<{
166
138
  usdValue?: string | undefined;
167
139
  } | undefined;
168
140
  };
141
+ type: "SingleTransaction";
169
142
  };
170
- }>;
171
- export declare const ToolResultArraySchema: z.ZodArray<z.ZodObject<{
172
- toolCallId: z.ZodString;
173
- toolName: z.ZodString;
174
- result: z.ZodUnknown;
175
- error: z.ZodOptional<z.ZodUnknown>;
176
- }, "strict", z.ZodTypeAny, {
177
- toolName: string;
178
- toolCallId: string;
179
- result?: unknown;
180
- error?: unknown;
181
- }, {
182
- toolName: string;
183
- toolCallId: string;
184
- result?: unknown;
185
- error?: unknown;
186
- }>, "many">;
187
- export declare const MessageSchema: z.ZodString;
188
- export declare const ToolIncompletePartSchema: z.ZodObject<{
189
- type: z.ZodLiteral<"tool-incomplete">;
190
- toolCallId: z.ZodString;
191
- toolName: z.ZodString;
192
- args: z.ZodUnknown;
193
- missingParams: z.ZodArray<z.ZodString, "many">;
194
- humanReadableDescription: z.ZodString;
195
- }, "strict", z.ZodTypeAny, {
196
- type: "tool-incomplete";
197
- toolName: string;
198
- toolCallId: string;
199
- missingParams: string[];
200
- humanReadableDescription: string;
201
- args?: unknown;
202
- }, {
203
- type: "tool-incomplete";
204
- toolName: string;
205
- toolCallId: string;
206
- missingParams: string[];
207
- humanReadableDescription: string;
208
- args?: unknown;
209
- }>;
210
- export declare const ToolErrorPartSchema: z.ZodObject<{
211
- type: z.ZodLiteral<"tool-error">;
212
- toolCallId: z.ZodString;
213
- toolName: z.ZodString;
214
- error: z.ZodType<ActionError<unknown>>;
215
- }, "strict", z.ZodTypeAny, {
216
- type: "tool-error";
217
- toolName: string;
218
143
  toolCallId: string;
219
- error: ActionError<unknown>;
220
- }, {
221
- type: "tool-error";
222
144
  toolName: string;
223
- toolCallId: string;
224
- error: ActionError<unknown>;
225
145
  }>;
146
+ /**
147
+ * Text content part schema for prompt messages.
148
+ */
226
149
  export declare const TextPartSchema: z.ZodObject<{
227
150
  type: z.ZodLiteral<"text">;
228
151
  text: z.ZodString;
@@ -234,285 +157,12 @@ export declare const TextPartSchema: z.ZodObject<{
234
157
  text: string;
235
158
  }>;
236
159
  /**
237
- * Discriminated union schema for tool calls based on toolName
238
- * 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.
239
162
  */
240
- export declare const ToolCallPartSchema: z.ZodDiscriminatedUnion<"toolName", [z.ZodObject<{
241
- type: z.ZodLiteral<"tool-call">;
242
- toolCallId: z.ZodString;
243
- toolName: z.ZodLiteral<"tokenTransfer">;
244
- args: z.ZodType<TokenTransferActionInput>;
245
- }, "strict", z.ZodTypeAny, {
246
- type: "tool-call";
247
- toolName: "tokenTransfer";
248
- toolCallId: 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
- }, {
259
- type: "tool-call";
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
- };
293
- }, {
294
- type: "tool-call";
295
- toolName: "swapOrBridge";
296
- toolCallId: 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, {
316
- type: "tool-call";
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
- }>]>;
497
- export declare const ToolResultPartSchema: z.ZodObject<{
498
- type: z.ZodLiteral<"tool-result">;
499
- toolCallId: z.ZodString;
500
- toolName: z.ZodString;
501
- result: z.ZodUnknown;
502
- }, "strict", z.ZodTypeAny, {
503
- type: "tool-result";
504
- toolName: string;
505
- toolCallId: string;
506
- result?: unknown;
507
- }, {
508
- type: "tool-result";
509
- toolName: string;
510
- toolCallId: string;
511
- result?: unknown;
512
- }>;
513
- export declare const CoreMessageSchema: z.ZodObject<{
514
- role: z.ZodEnum<["user", "assistant", "tool", "system"]>;
515
- 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<{
516
166
  type: z.ZodLiteral<"text">;
517
167
  text: z.ZodString;
518
168
  }, "strict", z.ZodTypeAny, {
@@ -521,576 +171,91 @@ export declare const CoreMessageSchema: z.ZodObject<{
521
171
  }, {
522
172
  type: "text";
523
173
  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
- };
555
- }>, z.ZodObject<{
556
- type: z.ZodLiteral<"tool-call">;
557
- toolCallId: z.ZodString;
558
- toolName: z.ZodLiteral<"swapOrBridge">;
559
- args: z.ZodType<SwapBridgeActionInput>;
560
- }, "strict", z.ZodTypeAny, {
561
- type: "tool-call";
562
- toolName: "swapOrBridge";
563
- toolCallId: 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
- }, {
578
- type: "tool-call";
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
- };
614
- }, {
615
- type: "tool-call";
616
- toolName: "exchangeRate";
617
- toolCallId: 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, {
635
- type: "tool-call";
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
- };
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<{
781
- type: z.ZodLiteral<"tool-result">;
782
- toolCallId: z.ZodString;
783
- toolName: z.ZodString;
784
- result: z.ZodUnknown;
785
- }, "strict", z.ZodTypeAny, {
786
- type: "tool-result";
787
- toolName: string;
788
- toolCallId: string;
789
- result?: unknown;
790
- }, {
791
- type: "tool-result";
792
- toolName: string;
793
- toolCallId: string;
794
- result?: unknown;
795
- }>, z.ZodObject<{
796
- type: z.ZodLiteral<"tool-incomplete">;
797
- toolCallId: z.ZodString;
798
- toolName: z.ZodString;
799
- args: z.ZodUnknown;
800
- missingParams: z.ZodArray<z.ZodString, "many">;
801
- 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">;
802
204
  }, "strict", z.ZodTypeAny, {
803
- type: "tool-incomplete";
804
- toolName: string;
805
- toolCallId: string;
806
- missingParams: string[];
807
- humanReadableDescription: string;
808
- args?: unknown;
205
+ type: "input";
206
+ errors: {
207
+ path: string;
208
+ message: string;
209
+ }[];
809
210
  }, {
810
- type: "tool-incomplete";
811
- toolName: string;
812
- toolCallId: string;
813
- missingParams: string[];
814
- humanReadableDescription: string;
815
- args?: unknown;
211
+ type: "input";
212
+ errors: {
213
+ path: string;
214
+ message: string;
215
+ }[];
816
216
  }>, z.ZodObject<{
817
- type: z.ZodLiteral<"tool-error">;
818
- toolCallId: z.ZodString;
819
- toolName: z.ZodString;
820
- error: z.ZodType<ActionError<unknown>>;
217
+ type: z.ZodLiteral<"execution">;
218
+ message: z.ZodString;
219
+ details: z.ZodOptional<z.ZodUnknown>;
821
220
  }, "strict", z.ZodTypeAny, {
822
- type: "tool-error";
823
- toolName: string;
824
- toolCallId: string;
825
- error: ActionError<unknown>;
221
+ message: string;
222
+ type: "execution";
223
+ details?: unknown;
826
224
  }, {
827
- type: "tool-error";
828
- toolName: string;
829
- toolCallId: string;
830
- error: ActionError<unknown>;
831
- }>]>, "many">;
225
+ message: string;
226
+ type: "execution";
227
+ details?: unknown;
228
+ }>]>>;
832
229
  }, "strict", z.ZodTypeAny, {
833
- role: "user" | "assistant" | "tool" | "system";
834
- content: ({
835
- type: "text";
836
- text: string;
837
- } | {
838
- type: "tool-call";
839
- toolName: "tokenTransfer";
840
- toolCallId: string;
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
- };
850
- } | {
851
- type: "tool-call";
852
- toolName: "swapOrBridge";
853
- toolCallId: string;
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
- };
867
- } | {
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
- };
882
- } | {
883
- type: "tool-call";
884
- toolName: "getWalletBalance";
885
- toolCallId: 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
- } | {
895
- type: "tool-call";
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
- };
907
- } | {
908
- type: "tool-call";
909
- toolName: "defiSupply";
910
- toolCallId: 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";
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";
947
- toolName: string;
948
- toolCallId: string;
949
- result?: unknown;
950
- } | {
951
- type: "tool-incomplete";
952
- toolName: string;
953
- toolCallId: string;
954
- missingParams: string[];
955
- humanReadableDescription: string;
956
- 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
+ }[];
957
239
  } | {
958
- type: "tool-error";
959
- toolName: string;
960
- toolCallId: string;
961
- error: ActionError<unknown>;
962
- })[];
240
+ message: string;
241
+ type: "execution";
242
+ details?: unknown;
243
+ } | undefined;
963
244
  }, {
964
- role: "user" | "assistant" | "tool" | "system";
965
- content: ({
966
- type: "text";
967
- text: string;
968
- } | {
969
- type: "tool-call";
970
- toolName: "tokenTransfer";
971
- toolCallId: 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
- } | {
982
- type: "tool-call";
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
- };
998
- } | {
999
- type: "tool-call";
1000
- toolName: "exchangeRate";
1001
- toolCallId: 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
- } | {
1077
- type: "tool-result";
1078
- toolName: string;
1079
- toolCallId: string;
1080
- result?: unknown;
1081
- } | {
1082
- type: "tool-incomplete";
1083
- toolName: string;
1084
- toolCallId: string;
1085
- missingParams: string[];
1086
- humanReadableDescription: string;
1087
- 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
+ }[];
1088
254
  } | {
1089
- type: "tool-error";
1090
- toolName: string;
1091
- toolCallId: string;
1092
- error: ActionError<unknown>;
1093
- })[];
1094
- }>;
255
+ message: string;
256
+ type: "execution";
257
+ details?: unknown;
258
+ } | undefined;
259
+ }>, "many">;
1095
260
  export declare const HistorySchema: z.ZodArray<z.ZodType<ModelMessage, z.ZodTypeDef, ModelMessage>, "many">;
1096
261
  //# sourceMappingURL=messages.d.ts.map