@illalabs/interfaces 0.2.1 → 0.3.0-canary-dev-c9b759da

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 (134) 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 +93 -590
  10. package/dist/schemas/chatContext.d.ts.map +1 -1
  11. package/dist/schemas/chatRequestBody.d.ts +290 -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 +566 -928
  25. package/dist/schemas/messages.d.ts.map +1 -1
  26. package/dist/schemas/messages.js +74 -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 +2417 -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/schemas/userContext.d.ts +3 -0
  38. package/dist/schemas/userContext.d.ts.map +1 -1
  39. package/dist/schemas/userContext.js +4 -0
  40. package/dist/schemas/userContext.js.map +1 -1
  41. package/dist/tools/IllaToolError.d.ts +117 -0
  42. package/dist/tools/IllaToolError.d.ts.map +1 -0
  43. package/dist/tools/IllaToolError.js +147 -0
  44. package/dist/tools/IllaToolError.js.map +1 -0
  45. package/dist/tools/IllaToolOutcome.d.ts +131 -0
  46. package/dist/tools/IllaToolOutcome.d.ts.map +1 -0
  47. package/dist/tools/IllaToolOutcome.js +191 -0
  48. package/dist/tools/IllaToolOutcome.js.map +1 -0
  49. package/dist/tools/index.d.ts +3 -0
  50. package/dist/tools/index.d.ts.map +1 -0
  51. package/dist/tools/index.js +3 -0
  52. package/dist/tools/index.js.map +1 -0
  53. package/dist/types/actions/inputs.d.ts +8 -3
  54. package/dist/types/actions/inputs.d.ts.map +1 -1
  55. package/dist/types/actions/outputs.d.ts +19 -1
  56. package/dist/types/actions/outputs.d.ts.map +1 -1
  57. package/dist/types/actions/tools/{swapBridgeAction.d.ts → bridgeAction.d.ts} +4 -4
  58. package/dist/types/actions/tools/bridgeAction.d.ts.map +1 -0
  59. package/dist/types/actions/tools/bridgeAction.js +2 -0
  60. package/dist/types/actions/tools/bridgeAction.js.map +1 -0
  61. package/dist/types/actions/tools/defiFetchListingsAction.d.ts +1 -2
  62. package/dist/types/actions/tools/defiFetchListingsAction.d.ts.map +1 -1
  63. package/dist/types/actions/tools/defiFetchListingsAction.js +1 -1
  64. package/dist/types/actions/tools/defiFetchListingsAction.js.map +1 -1
  65. package/dist/types/actions/tools/defiPositionsAction.d.ts +1 -2
  66. package/dist/types/actions/tools/defiPositionsAction.d.ts.map +1 -1
  67. package/dist/types/actions/tools/defiPositionsAction.js +1 -1
  68. package/dist/types/actions/tools/defiPositionsAction.js.map +1 -1
  69. package/dist/types/actions/tools/defiSupplyAction.d.ts +1 -2
  70. package/dist/types/actions/tools/defiSupplyAction.d.ts.map +1 -1
  71. package/dist/types/actions/tools/defiSupplyAction.js +1 -1
  72. package/dist/types/actions/tools/defiSupplyAction.js.map +1 -1
  73. package/dist/types/actions/tools/defiWithdrawAction.d.ts +1 -2
  74. package/dist/types/actions/tools/defiWithdrawAction.d.ts.map +1 -1
  75. package/dist/types/actions/tools/defiWithdrawAction.js +1 -1
  76. package/dist/types/actions/tools/defiWithdrawAction.js.map +1 -1
  77. package/dist/types/actions/tools/exchangeRateAction.d.ts +1 -2
  78. package/dist/types/actions/tools/exchangeRateAction.d.ts.map +1 -1
  79. package/dist/types/actions/tools/exchangeRateAction.js +1 -1
  80. package/dist/types/actions/tools/exchangeRateAction.js.map +1 -1
  81. package/dist/types/actions/tools/getWalletBalanceAction.d.ts +4 -3
  82. package/dist/types/actions/tools/getWalletBalanceAction.d.ts.map +1 -1
  83. package/dist/types/actions/tools/getWalletBalanceAction.js +1 -1
  84. package/dist/types/actions/tools/getWalletBalanceAction.js.map +1 -1
  85. package/dist/types/actions/tools/index.d.ts +18 -3
  86. package/dist/types/actions/tools/index.d.ts.map +1 -1
  87. package/dist/types/actions/tools/polymarketPostOrderAction.d.ts +81 -0
  88. package/dist/types/actions/tools/polymarketPostOrderAction.d.ts.map +1 -0
  89. package/dist/types/actions/tools/polymarketPostOrderAction.js +2 -0
  90. package/dist/types/actions/tools/polymarketPostOrderAction.js.map +1 -0
  91. package/dist/types/actions/tools/predictionMarketsBetAction.d.ts +19 -0
  92. package/dist/types/actions/tools/predictionMarketsBetAction.d.ts.map +1 -0
  93. package/dist/types/actions/tools/predictionMarketsBetAction.js +2 -0
  94. package/dist/types/actions/tools/predictionMarketsBetAction.js.map +1 -0
  95. package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts +21 -0
  96. package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts.map +1 -0
  97. package/dist/types/actions/tools/predictionMarketsFetchAction.js +2 -0
  98. package/dist/types/actions/tools/predictionMarketsFetchAction.js.map +1 -0
  99. package/dist/types/actions/tools/predictionMarketsPositionsAction.d.ts +25 -0
  100. package/dist/types/actions/tools/predictionMarketsPositionsAction.d.ts.map +1 -0
  101. package/dist/types/actions/tools/predictionMarketsPositionsAction.js +2 -0
  102. package/dist/types/actions/tools/predictionMarketsPositionsAction.js.map +1 -0
  103. package/dist/types/actions/tools/swapAction.d.ts +16 -0
  104. package/dist/types/actions/tools/swapAction.d.ts.map +1 -0
  105. package/dist/types/actions/tools/swapAction.js +2 -0
  106. package/dist/types/actions/tools/swapAction.js.map +1 -0
  107. package/dist/types/actions/tools/tokenTransferAction.d.ts +1 -2
  108. package/dist/types/actions/tools/tokenTransferAction.d.ts.map +1 -1
  109. package/dist/types/actions/tools/tokenTransferAction.js +1 -1
  110. package/dist/types/actions/tools/tokenTransferAction.js.map +1 -1
  111. package/dist/types/index.d.ts +2 -0
  112. package/dist/types/index.d.ts.map +1 -1
  113. package/dist/types/index.js +2 -0
  114. package/dist/types/index.js.map +1 -1
  115. package/dist/types/messages.d.ts +3 -6
  116. package/dist/types/messages.d.ts.map +1 -1
  117. package/dist/types/messages.js +1 -1
  118. package/dist/types/messages.js.map +1 -1
  119. package/dist/types/streaming.d.ts +81 -0
  120. package/dist/types/streaming.d.ts.map +1 -0
  121. package/dist/types/streaming.js +2 -0
  122. package/dist/types/streaming.js.map +1 -0
  123. package/dist/types/telemetry.d.ts +139 -0
  124. package/dist/types/telemetry.d.ts.map +1 -0
  125. package/dist/types/telemetry.js +7 -0
  126. package/dist/types/telemetry.js.map +1 -0
  127. package/dist/utils/constants.d.ts +7 -5
  128. package/dist/utils/constants.d.ts.map +1 -1
  129. package/dist/utils/constants.js +22 -4
  130. package/dist/utils/constants.js.map +1 -1
  131. package/package.json +4 -4
  132. package/dist/types/actions/tools/swapBridgeAction.d.ts.map +0 -1
  133. package/dist/types/actions/tools/swapBridgeAction.js +0 -2
  134. package/dist/types/actions/tools/swapBridgeAction.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pick<{
2
+ export declare const ChatContextSchema: z.ZodObject<Pick<{
3
3
  toolsConfig: z.ZodObject<{
4
4
  autoRouter: z.ZodOptional<z.ZodObject<{
5
5
  defi: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
@@ -29,7 +29,6 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
29
29
  }>]>>;
30
30
  swapOrBridge: z.ZodOptional<z.ZodEnum<["lifi"]>>;
31
31
  }, "strict", z.ZodTypeAny, {
32
- swapOrBridge?: "lifi" | undefined;
33
32
  defi?: {
34
33
  lending: "aave";
35
34
  supply?: undefined;
@@ -39,8 +38,8 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
39
38
  withdraw: "aave";
40
39
  lending?: undefined;
41
40
  } | undefined;
42
- }, {
43
41
  swapOrBridge?: "lifi" | undefined;
42
+ }, {
44
43
  defi?: {
45
44
  lending: "aave";
46
45
  supply?: undefined;
@@ -50,10 +49,10 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
50
49
  withdraw: "aave";
51
50
  lending?: undefined;
52
51
  } | undefined;
52
+ swapOrBridge?: "lifi" | undefined;
53
53
  }>>;
54
54
  }, "strict", z.ZodTypeAny, {
55
55
  autoRouter?: {
56
- swapOrBridge?: "lifi" | undefined;
57
56
  defi?: {
58
57
  lending: "aave";
59
58
  supply?: undefined;
@@ -63,10 +62,10 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
63
62
  withdraw: "aave";
64
63
  lending?: undefined;
65
64
  } | undefined;
65
+ swapOrBridge?: "lifi" | undefined;
66
66
  } | undefined;
67
67
  }, {
68
68
  autoRouter?: {
69
- swapOrBridge?: "lifi" | undefined;
70
69
  defi?: {
71
70
  lending: "aave";
72
71
  supply?: undefined;
@@ -76,19 +75,23 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
76
75
  withdraw: "aave";
77
76
  lending?: undefined;
78
77
  } | undefined;
78
+ swapOrBridge?: "lifi" | undefined;
79
79
  } | undefined;
80
80
  }>;
81
81
  messages: z.ZodArray<z.ZodType<import("@ai-sdk/provider-utils").ModelMessage, z.ZodTypeDef, import("@ai-sdk/provider-utils").ModelMessage>, "many">;
82
82
  userContext: z.ZodObject<{
83
83
  address: z.ZodEffects<z.ZodString, `0x${string}`, string>;
84
+ signerWallet: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
84
85
  }, "strict", z.ZodTypeAny, {
85
86
  address: `0x${string}`;
87
+ signerWallet?: `0x${string}` | undefined;
86
88
  }, {
87
89
  address: string;
90
+ signerWallet?: string | undefined;
88
91
  }>;
89
92
  prompt: z.ZodOptional<z.ZodObject<{
90
- role: z.ZodEnum<["user", "assistant", "tool", "system"]>;
91
- content: z.ZodArray<z.ZodUnion<[z.ZodObject<{
93
+ role: z.ZodLiteral<"user">;
94
+ content: z.ZodArray<z.ZodObject<{
92
95
  type: z.ZodLiteral<"text">;
93
96
  text: z.ZodString;
94
97
  }, "strict", z.ZodTypeAny, {
@@ -97,594 +100,93 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
97
100
  }, {
98
101
  type: "text";
99
102
  text: string;
100
- }>, z.ZodDiscriminatedUnion<"toolName", [z.ZodObject<{
101
- type: z.ZodLiteral<"tool-call">;
102
- toolCallId: z.ZodString;
103
- toolName: z.ZodLiteral<"tokenTransfer">;
104
- args: z.ZodType<import("../external.js").TokenTransferActionInput>;
105
- }, "strict", z.ZodTypeAny, {
106
- type: "tool-call";
107
- toolName: "tokenTransfer";
108
- toolCallId: string;
109
- args: {
110
- fromAddress: string;
111
- toAddress: string;
112
- amount: string;
113
- token: string;
114
- chain: string;
115
- missingParameters?: string[] | undefined;
116
- humanFriendlyMessage?: string | undefined;
117
- };
118
- }, {
119
- type: "tool-call";
120
- toolName: "tokenTransfer";
121
- toolCallId: string;
122
- args: {
123
- fromAddress: string;
124
- toAddress: string;
125
- amount: string;
126
- token: string;
127
- chain: string;
128
- missingParameters?: string[] | undefined;
129
- humanFriendlyMessage?: string | undefined;
130
- };
131
- }>, z.ZodObject<{
132
- type: z.ZodLiteral<"tool-call">;
133
- toolCallId: z.ZodString;
134
- toolName: z.ZodLiteral<"swapOrBridge">;
135
- args: z.ZodType<import("../external.js").SwapBridgeActionInput>;
136
- }, "strict", z.ZodTypeAny, {
137
- type: "tool-call";
138
- toolName: "swapOrBridge";
139
- toolCallId: string;
140
- args: {
141
- fromAddress: string;
142
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
143
- fromToken: string;
144
- fromAmount: string;
145
- protocol: "lifi";
146
- toAddress?: string | undefined;
147
- missingParameters?: string[] | undefined;
148
- humanFriendlyMessage?: string | undefined;
149
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
150
- toToken?: string | undefined;
151
- toAmount?: string | undefined;
152
- };
153
- }, {
154
- type: "tool-call";
155
- toolName: "swapOrBridge";
156
- toolCallId: string;
157
- args: {
158
- fromAddress: string;
159
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
160
- fromToken: string;
161
- fromAmount: string;
162
- protocol: "lifi";
163
- toAddress?: string | undefined;
164
- missingParameters?: string[] | undefined;
165
- humanFriendlyMessage?: string | undefined;
166
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
167
- toToken?: string | undefined;
168
- toAmount?: string | undefined;
169
- };
170
- }>, z.ZodObject<{
171
- type: z.ZodLiteral<"tool-call">;
172
- toolCallId: z.ZodString;
173
- toolName: z.ZodLiteral<"exchangeRate">;
174
- args: z.ZodType<import("../external.js").ExchangeRateActionInput>;
175
- }, "strict", z.ZodTypeAny, {
176
- type: "tool-call";
177
- toolName: "exchangeRate";
178
- toolCallId: string;
179
- args: {
180
- provider: "coinMarketCap";
181
- arguments: {
182
- baseCurrency: string;
183
- quoteCurrency: string;
184
- baseAmount?: string | undefined;
185
- quoteAmount?: string | undefined;
186
- }[];
187
- missingParameters?: string[] | undefined;
188
- humanFriendlyMessage?: string | undefined;
189
- };
190
- }, {
191
- type: "tool-call";
192
- toolName: "exchangeRate";
193
- toolCallId: string;
194
- args: {
195
- provider: "coinMarketCap";
196
- arguments: {
197
- baseCurrency: string;
198
- quoteCurrency: string;
199
- baseAmount?: string | undefined;
200
- quoteAmount?: string | undefined;
201
- }[];
202
- missingParameters?: string[] | undefined;
203
- humanFriendlyMessage?: string | undefined;
204
- };
205
- }>, z.ZodObject<{
206
- type: z.ZodLiteral<"tool-call">;
207
- toolCallId: z.ZodString;
208
- toolName: z.ZodLiteral<"getWalletBalance">;
209
- args: z.ZodType<import("../external.js").GetWalletBalanceActionInput>;
210
- }, "strict", z.ZodTypeAny, {
211
- type: "tool-call";
212
- toolName: "getWalletBalance";
213
- toolCallId: string;
214
- args: {
215
- address: string;
216
- provider: "moralis";
217
- token?: string | undefined;
218
- chain?: string | undefined;
219
- missingParameters?: string[] | undefined;
220
- humanFriendlyMessage?: string | undefined;
221
- };
222
- }, {
223
- type: "tool-call";
224
- toolName: "getWalletBalance";
225
- toolCallId: string;
226
- args: {
227
- address: string;
228
- provider: "moralis";
229
- token?: string | undefined;
230
- chain?: string | undefined;
231
- missingParameters?: string[] | undefined;
232
- humanFriendlyMessage?: string | undefined;
233
- };
234
- }>, z.ZodObject<{
235
- type: z.ZodLiteral<"tool-call">;
236
- toolCallId: z.ZodString;
237
- toolName: z.ZodLiteral<"defiFetchListings">;
238
- args: z.ZodType<import("../external.js").DefiFetchListingsActionInput>;
239
- }, "strict", z.ZodTypeAny, {
240
- type: "tool-call";
241
- toolName: "defiFetchListings";
242
- toolCallId: string;
243
- args: {
244
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
245
- protocol: "aave";
246
- missingParameters?: string[] | undefined;
247
- humanFriendlyMessage?: string | undefined;
248
- tokens?: string[] | undefined;
249
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
250
- limit?: number | undefined;
251
- };
252
- }, {
253
- type: "tool-call";
254
- toolName: "defiFetchListings";
255
- toolCallId: string;
256
- args: {
257
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
258
- protocol: "aave";
259
- missingParameters?: string[] | undefined;
260
- humanFriendlyMessage?: string | undefined;
261
- tokens?: string[] | undefined;
262
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
263
- limit?: number | undefined;
264
- };
265
- }>, z.ZodObject<{
266
- type: z.ZodLiteral<"tool-call">;
267
- toolCallId: z.ZodString;
268
- toolName: z.ZodLiteral<"defiSupply">;
269
- args: z.ZodType<import("../external.js").DefiSupplyActionInput>;
270
- }, "strict", z.ZodTypeAny, {
271
- type: "tool-call";
272
- toolName: "defiSupply";
273
- toolCallId: string;
274
- args: {
275
- amount: string;
276
- token: string;
277
- chain: string;
278
- protocol: "aave";
279
- userAddress: string;
280
- missingParameters?: string[] | undefined;
281
- humanFriendlyMessage?: string | undefined;
282
- };
283
- }, {
284
- type: "tool-call";
285
- toolName: "defiSupply";
286
- toolCallId: string;
287
- args: {
288
- amount: string;
289
- token: string;
290
- chain: string;
291
- protocol: "aave";
292
- userAddress: string;
293
- missingParameters?: string[] | undefined;
294
- humanFriendlyMessage?: string | undefined;
295
- };
296
- }>, z.ZodObject<{
297
- type: z.ZodLiteral<"tool-call">;
298
- toolCallId: z.ZodString;
299
- toolName: z.ZodLiteral<"defiWithdraw">;
300
- args: z.ZodType<import("../external.js").DefiWithdrawActionInput>;
301
- }, "strict", z.ZodTypeAny, {
302
- type: "tool-call";
303
- toolName: "defiWithdraw";
304
- toolCallId: string;
305
- args: {
306
- amount: string;
307
- token: string;
308
- chain: string;
309
- protocol: "aave";
310
- userAddress: string;
311
- missingParameters?: string[] | undefined;
312
- humanFriendlyMessage?: string | undefined;
313
- };
314
- }, {
315
- type: "tool-call";
316
- toolName: "defiWithdraw";
317
- toolCallId: string;
318
- args: {
319
- amount: string;
320
- token: string;
321
- chain: string;
322
- protocol: "aave";
323
- userAddress: string;
324
- missingParameters?: string[] | undefined;
325
- humanFriendlyMessage?: string | undefined;
326
- };
327
- }>, z.ZodObject<{
328
- type: z.ZodLiteral<"tool-call">;
329
- toolCallId: z.ZodString;
330
- toolName: z.ZodLiteral<"defiPositions">;
331
- args: z.ZodType<import("../external.js").DefiPositionsActionInput>;
332
- }, "strict", z.ZodTypeAny, {
333
- type: "tool-call";
334
- toolName: "defiPositions";
335
- toolCallId: string;
336
- args: {
337
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
338
- protocol: "aave";
339
- userAddress: string;
340
- missingParameters?: string[] | undefined;
341
- humanFriendlyMessage?: string | undefined;
342
- tokens?: string[] | undefined;
343
- };
344
- }, {
345
- type: "tool-call";
346
- toolName: "defiPositions";
347
- toolCallId: string;
348
- args: {
349
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
350
- protocol: "aave";
351
- userAddress: string;
352
- missingParameters?: string[] | undefined;
353
- humanFriendlyMessage?: string | undefined;
354
- tokens?: string[] | undefined;
355
- };
356
- }>]>, z.ZodObject<{
357
- type: z.ZodLiteral<"tool-result">;
358
- toolCallId: z.ZodString;
359
- toolName: z.ZodString;
360
- result: z.ZodUnknown;
361
- }, "strict", z.ZodTypeAny, {
362
- type: "tool-result";
363
- toolName: string;
364
- toolCallId: string;
365
- result?: unknown;
366
- }, {
367
- type: "tool-result";
368
- toolName: string;
369
- toolCallId: string;
370
- result?: unknown;
371
- }>, z.ZodObject<{
372
- type: z.ZodLiteral<"tool-incomplete">;
373
- toolCallId: z.ZodString;
374
- toolName: z.ZodString;
375
- args: z.ZodUnknown;
376
- missingParams: z.ZodArray<z.ZodString, "many">;
377
- humanReadableDescription: z.ZodString;
378
- }, "strict", z.ZodTypeAny, {
379
- type: "tool-incomplete";
380
- toolName: string;
381
- toolCallId: string;
382
- missingParams: string[];
383
- humanReadableDescription: string;
384
- args?: unknown;
385
- }, {
386
- type: "tool-incomplete";
387
- toolName: string;
388
- toolCallId: string;
389
- missingParams: string[];
390
- humanReadableDescription: string;
391
- args?: unknown;
392
- }>, z.ZodObject<{
393
- type: z.ZodLiteral<"tool-error">;
394
- toolCallId: z.ZodString;
395
- toolName: z.ZodString;
396
- error: z.ZodType<import("../types/actions/errors.js").ActionError<unknown>>;
397
- }, "strict", z.ZodTypeAny, {
398
- type: "tool-error";
399
- toolName: string;
400
- toolCallId: string;
401
- error: import("../types/actions/errors.js").ActionError<unknown>;
402
- }, {
403
- type: "tool-error";
404
- toolName: string;
405
- toolCallId: string;
406
- error: import("../types/actions/errors.js").ActionError<unknown>;
407
- }>]>, "many">;
103
+ }>, "many">;
408
104
  }, "strict", z.ZodTypeAny, {
409
- role: "user" | "assistant" | "tool" | "system";
410
- content: ({
105
+ role: "user";
106
+ content: {
411
107
  type: "text";
412
108
  text: string;
413
- } | {
414
- type: "tool-call";
415
- toolName: "tokenTransfer";
416
- toolCallId: string;
417
- args: {
418
- fromAddress: string;
419
- toAddress: string;
420
- amount: string;
421
- token: string;
422
- chain: string;
423
- missingParameters?: string[] | undefined;
424
- humanFriendlyMessage?: string | undefined;
425
- };
426
- } | {
427
- type: "tool-call";
428
- toolName: "swapOrBridge";
429
- toolCallId: string;
430
- args: {
431
- fromAddress: string;
432
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
433
- fromToken: string;
434
- fromAmount: string;
435
- protocol: "lifi";
436
- toAddress?: string | undefined;
437
- missingParameters?: string[] | undefined;
438
- humanFriendlyMessage?: string | undefined;
439
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
440
- toToken?: string | undefined;
441
- toAmount?: string | undefined;
442
- };
443
- } | {
444
- type: "tool-call";
445
- toolName: "exchangeRate";
446
- toolCallId: string;
447
- args: {
448
- provider: "coinMarketCap";
449
- arguments: {
450
- baseCurrency: string;
451
- quoteCurrency: string;
452
- baseAmount?: string | undefined;
453
- quoteAmount?: string | undefined;
454
- }[];
455
- missingParameters?: string[] | undefined;
456
- humanFriendlyMessage?: string | undefined;
457
- };
458
- } | {
459
- type: "tool-call";
460
- toolName: "getWalletBalance";
461
- toolCallId: string;
462
- args: {
463
- address: string;
464
- provider: "moralis";
465
- token?: string | undefined;
466
- chain?: string | undefined;
467
- missingParameters?: string[] | undefined;
468
- humanFriendlyMessage?: string | undefined;
469
- };
470
- } | {
471
- type: "tool-call";
472
- toolName: "defiFetchListings";
473
- toolCallId: string;
474
- args: {
475
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
476
- protocol: "aave";
477
- missingParameters?: string[] | undefined;
478
- humanFriendlyMessage?: string | undefined;
479
- tokens?: string[] | undefined;
480
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
481
- limit?: number | undefined;
482
- };
483
- } | {
484
- type: "tool-call";
485
- toolName: "defiSupply";
486
- toolCallId: string;
487
- args: {
488
- amount: string;
489
- token: string;
490
- chain: string;
491
- protocol: "aave";
492
- userAddress: string;
493
- missingParameters?: string[] | undefined;
494
- humanFriendlyMessage?: string | undefined;
495
- };
496
- } | {
497
- type: "tool-call";
498
- toolName: "defiWithdraw";
499
- toolCallId: string;
500
- args: {
501
- amount: string;
502
- token: string;
503
- chain: string;
504
- protocol: "aave";
505
- userAddress: string;
506
- missingParameters?: string[] | undefined;
507
- humanFriendlyMessage?: string | undefined;
508
- };
509
- } | {
510
- type: "tool-call";
511
- toolName: "defiPositions";
512
- toolCallId: string;
513
- args: {
514
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
515
- protocol: "aave";
516
- userAddress: string;
517
- missingParameters?: string[] | undefined;
518
- humanFriendlyMessage?: string | undefined;
519
- tokens?: string[] | undefined;
520
- };
521
- } | {
522
- type: "tool-result";
523
- toolName: string;
524
- toolCallId: string;
525
- result?: unknown;
526
- } | {
527
- type: "tool-incomplete";
528
- toolName: string;
529
- toolCallId: string;
530
- missingParams: string[];
531
- humanReadableDescription: string;
532
- args?: unknown;
533
- } | {
534
- type: "tool-error";
535
- toolName: string;
536
- toolCallId: string;
537
- error: import("../types/actions/errors.js").ActionError<unknown>;
538
- })[];
109
+ }[];
539
110
  }, {
540
- role: "user" | "assistant" | "tool" | "system";
541
- content: ({
111
+ role: "user";
112
+ content: {
542
113
  type: "text";
543
114
  text: string;
544
- } | {
545
- type: "tool-call";
546
- toolName: "tokenTransfer";
547
- toolCallId: string;
548
- args: {
549
- fromAddress: string;
550
- toAddress: string;
551
- amount: string;
552
- token: string;
553
- chain: string;
554
- missingParameters?: string[] | undefined;
555
- humanFriendlyMessage?: string | undefined;
556
- };
557
- } | {
558
- type: "tool-call";
559
- toolName: "swapOrBridge";
560
- toolCallId: string;
561
- args: {
562
- fromAddress: string;
563
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
564
- fromToken: string;
565
- fromAmount: string;
566
- protocol: "lifi";
567
- toAddress?: string | undefined;
568
- missingParameters?: string[] | undefined;
569
- humanFriendlyMessage?: string | undefined;
570
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
571
- toToken?: string | undefined;
572
- toAmount?: string | undefined;
573
- };
574
- } | {
575
- type: "tool-call";
576
- toolName: "exchangeRate";
577
- toolCallId: string;
578
- args: {
579
- provider: "coinMarketCap";
580
- arguments: {
581
- baseCurrency: string;
582
- quoteCurrency: string;
583
- baseAmount?: string | undefined;
584
- quoteAmount?: string | undefined;
585
- }[];
586
- missingParameters?: string[] | undefined;
587
- humanFriendlyMessage?: string | undefined;
588
- };
589
- } | {
590
- type: "tool-call";
591
- toolName: "getWalletBalance";
592
- toolCallId: string;
593
- args: {
594
- address: string;
595
- provider: "moralis";
596
- token?: string | undefined;
597
- chain?: string | undefined;
598
- missingParameters?: string[] | undefined;
599
- humanFriendlyMessage?: string | undefined;
600
- };
601
- } | {
602
- type: "tool-call";
603
- toolName: "defiFetchListings";
604
- toolCallId: string;
605
- args: {
606
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
607
- protocol: "aave";
608
- missingParameters?: string[] | undefined;
609
- humanFriendlyMessage?: string | undefined;
610
- tokens?: string[] | undefined;
611
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
612
- limit?: number | undefined;
613
- };
614
- } | {
615
- type: "tool-call";
616
- toolName: "defiSupply";
617
- toolCallId: string;
618
- args: {
619
- amount: string;
620
- token: string;
621
- chain: string;
622
- protocol: "aave";
623
- userAddress: string;
624
- missingParameters?: string[] | undefined;
625
- humanFriendlyMessage?: string | undefined;
626
- };
627
- } | {
628
- type: "tool-call";
629
- toolName: "defiWithdraw";
630
- toolCallId: string;
631
- args: {
632
- amount: string;
633
- token: string;
634
- chain: string;
635
- protocol: "aave";
636
- userAddress: string;
637
- missingParameters?: string[] | undefined;
638
- humanFriendlyMessage?: string | undefined;
639
- };
640
- } | {
641
- type: "tool-call";
642
- toolName: "defiPositions";
643
- toolCallId: string;
644
- args: {
645
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
646
- protocol: "aave";
647
- userAddress: string;
648
- missingParameters?: string[] | undefined;
649
- humanFriendlyMessage?: string | undefined;
650
- tokens?: string[] | undefined;
651
- };
652
- } | {
653
- type: "tool-result";
654
- toolName: string;
655
- toolCallId: string;
656
- result?: unknown;
657
- } | {
658
- type: "tool-incomplete";
659
- toolName: string;
660
- toolCallId: string;
661
- missingParams: string[];
662
- humanReadableDescription: string;
663
- args?: unknown;
664
- } | {
665
- type: "tool-error";
666
- toolName: string;
667
- toolCallId: string;
668
- error: import("../types/actions/errors.js").ActionError<unknown>;
669
- })[];
115
+ }[];
670
116
  }>>;
671
117
  toolResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
672
- toolCallId: z.ZodString;
673
- toolName: z.ZodString;
674
- result: z.ZodUnknown;
675
- error: z.ZodOptional<z.ZodUnknown>;
118
+ id: z.ZodString;
119
+ name: z.ZodString;
120
+ result: z.ZodOptional<z.ZodUnknown>;
121
+ error: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
122
+ type: z.ZodLiteral<"input">;
123
+ errors: z.ZodArray<z.ZodObject<{
124
+ path: z.ZodString;
125
+ message: z.ZodString;
126
+ }, "strict", z.ZodTypeAny, {
127
+ path: string;
128
+ message: string;
129
+ }, {
130
+ path: string;
131
+ message: string;
132
+ }>, "many">;
133
+ }, "strict", z.ZodTypeAny, {
134
+ type: "input";
135
+ errors: {
136
+ path: string;
137
+ message: string;
138
+ }[];
139
+ }, {
140
+ type: "input";
141
+ errors: {
142
+ path: string;
143
+ message: string;
144
+ }[];
145
+ }>, z.ZodObject<{
146
+ type: z.ZodLiteral<"execution">;
147
+ message: z.ZodString;
148
+ details: z.ZodOptional<z.ZodUnknown>;
149
+ }, "strict", z.ZodTypeAny, {
150
+ message: string;
151
+ type: "execution";
152
+ details?: unknown;
153
+ }, {
154
+ message: string;
155
+ type: "execution";
156
+ details?: unknown;
157
+ }>]>>;
676
158
  }, "strict", z.ZodTypeAny, {
677
- toolName: string;
678
- toolCallId: string;
159
+ id: string;
160
+ name: string;
679
161
  result?: unknown;
680
- error?: unknown;
162
+ error?: {
163
+ type: "input";
164
+ errors: {
165
+ path: string;
166
+ message: string;
167
+ }[];
168
+ } | {
169
+ message: string;
170
+ type: "execution";
171
+ details?: unknown;
172
+ } | undefined;
681
173
  }, {
682
- toolName: string;
683
- toolCallId: string;
174
+ id: string;
175
+ name: string;
684
176
  result?: unknown;
685
- error?: unknown;
177
+ error?: {
178
+ type: "input";
179
+ errors: {
180
+ path: string;
181
+ message: string;
182
+ }[];
183
+ } | {
184
+ message: string;
185
+ type: "execution";
186
+ details?: unknown;
187
+ } | undefined;
686
188
  }>, "many">>;
687
- languageModel: z.ZodOptional<z.ZodString>;
189
+ languageModel: z.ZodString;
688
190
  personalityContext: z.ZodDefault<z.ZodOptional<z.ZodObject<{
689
191
  channel: z.ZodEnum<["voice", "text"]>;
690
192
  }, "strip", z.ZodTypeAny, {
@@ -692,7 +194,8 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
692
194
  }, {
693
195
  channel: "text" | "voice";
694
196
  }>>>;
695
- }, "messages">, {
197
+ requestId: z.ZodOptional<z.ZodString>;
198
+ }, "messages"> & {
696
199
  toolsConfig: z.ZodObject<{
697
200
  autoRouter: z.ZodOptional<z.ZodObject<{
698
201
  defi: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
@@ -722,7 +225,6 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
722
225
  }>]>>;
723
226
  swapOrBridge: z.ZodOptional<z.ZodEnum<["lifi"]>>;
724
227
  }, "strict", z.ZodTypeAny, {
725
- swapOrBridge?: "lifi" | undefined;
726
228
  defi?: {
727
229
  lending: "aave";
728
230
  supply?: undefined;
@@ -732,8 +234,8 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
732
234
  withdraw: "aave";
733
235
  lending?: undefined;
734
236
  } | undefined;
735
- }, {
736
237
  swapOrBridge?: "lifi" | undefined;
238
+ }, {
737
239
  defi?: {
738
240
  lending: "aave";
739
241
  supply?: undefined;
@@ -743,10 +245,10 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
743
245
  withdraw: "aave";
744
246
  lending?: undefined;
745
247
  } | undefined;
248
+ swapOrBridge?: "lifi" | undefined;
746
249
  }>>;
747
250
  }, "strict", z.ZodTypeAny, {
748
251
  autoRouter?: {
749
- swapOrBridge?: "lifi" | undefined;
750
252
  defi?: {
751
253
  lending: "aave";
752
254
  supply?: undefined;
@@ -756,10 +258,10 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
756
258
  withdraw: "aave";
757
259
  lending?: undefined;
758
260
  } | undefined;
261
+ swapOrBridge?: "lifi" | undefined;
759
262
  } | undefined;
760
263
  }, {
761
264
  autoRouter?: {
762
- swapOrBridge?: "lifi" | undefined;
763
265
  defi?: {
764
266
  lending: "aave";
765
267
  supply?: undefined;
@@ -769,12 +271,12 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
769
271
  withdraw: "aave";
770
272
  lending?: undefined;
771
273
  } | undefined;
274
+ swapOrBridge?: "lifi" | undefined;
772
275
  } | undefined;
773
276
  }>;
774
- }>, "strip", z.ZodTypeAny, {
277
+ }, "strip", z.ZodTypeAny, {
775
278
  toolsConfig: {
776
279
  autoRouter?: {
777
- swapOrBridge?: "lifi" | undefined;
778
280
  defi?: {
779
281
  lending: "aave";
780
282
  supply?: undefined;
@@ -784,13 +286,13 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
784
286
  withdraw: "aave";
785
287
  lending?: undefined;
786
288
  } | undefined;
289
+ swapOrBridge?: "lifi" | undefined;
787
290
  } | undefined;
788
291
  };
789
292
  messages: import("@ai-sdk/provider-utils").ModelMessage[];
790
293
  }, {
791
294
  toolsConfig: {
792
295
  autoRouter?: {
793
- swapOrBridge?: "lifi" | undefined;
794
296
  defi?: {
795
297
  lending: "aave";
796
298
  supply?: undefined;
@@ -800,6 +302,7 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
800
302
  withdraw: "aave";
801
303
  lending?: undefined;
802
304
  } | undefined;
305
+ swapOrBridge?: "lifi" | undefined;
803
306
  } | undefined;
804
307
  };
805
308
  messages: import("@ai-sdk/provider-utils").ModelMessage[];