@illalabs/interfaces 0.2.0 → 0.3.0-canary-beta-08a68673

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 (137) 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 +100 -581
  10. package/dist/schemas/chatContext.d.ts.map +1 -1
  11. package/dist/schemas/chatContext.js +2 -2
  12. package/dist/schemas/chatContext.js.map +1 -1
  13. package/dist/schemas/chatRequestBody.d.ts +524 -828
  14. package/dist/schemas/chatRequestBody.d.ts.map +1 -1
  15. package/dist/schemas/chatRequestBody.js +11 -4
  16. package/dist/schemas/chatRequestBody.js.map +1 -1
  17. package/dist/schemas/executionCheckerQueryParams.d.ts +5 -5
  18. package/dist/schemas/illaTools.d.ts +266 -0
  19. package/dist/schemas/illaTools.d.ts.map +1 -0
  20. package/dist/schemas/illaTools.js +58 -0
  21. package/dist/schemas/illaTools.js.map +1 -0
  22. package/dist/schemas/index.d.ts +3 -0
  23. package/dist/schemas/index.d.ts.map +1 -1
  24. package/dist/schemas/index.js +3 -0
  25. package/dist/schemas/index.js.map +1 -1
  26. package/dist/schemas/messages.d.ts +566 -928
  27. package/dist/schemas/messages.d.ts.map +1 -1
  28. package/dist/schemas/messages.js +74 -113
  29. package/dist/schemas/messages.js.map +1 -1
  30. package/dist/schemas/modelContext.d.ts +23 -0
  31. package/dist/schemas/modelContext.d.ts.map +1 -0
  32. package/dist/schemas/modelContext.js +13 -0
  33. package/dist/schemas/modelContext.js.map +1 -0
  34. package/dist/schemas/telemetryEvents.d.ts +2417 -0
  35. package/dist/schemas/telemetryEvents.d.ts.map +1 -0
  36. package/dist/schemas/telemetryEvents.js +236 -0
  37. package/dist/schemas/telemetryEvents.js.map +1 -0
  38. package/dist/schemas/toolAutorouter.d.ts +9 -9
  39. package/dist/schemas/toolAutorouter.d.ts.map +1 -1
  40. package/dist/schemas/userContext.d.ts +3 -0
  41. package/dist/schemas/userContext.d.ts.map +1 -1
  42. package/dist/schemas/userContext.js +4 -0
  43. package/dist/schemas/userContext.js.map +1 -1
  44. package/dist/tools/IllaToolError.d.ts +117 -0
  45. package/dist/tools/IllaToolError.d.ts.map +1 -0
  46. package/dist/tools/IllaToolError.js +147 -0
  47. package/dist/tools/IllaToolError.js.map +1 -0
  48. package/dist/tools/IllaToolOutcome.d.ts +131 -0
  49. package/dist/tools/IllaToolOutcome.d.ts.map +1 -0
  50. package/dist/tools/IllaToolOutcome.js +191 -0
  51. package/dist/tools/IllaToolOutcome.js.map +1 -0
  52. package/dist/tools/index.d.ts +3 -0
  53. package/dist/tools/index.d.ts.map +1 -0
  54. package/dist/tools/index.js +3 -0
  55. package/dist/tools/index.js.map +1 -0
  56. package/dist/types/actions/inputs.d.ts +8 -3
  57. package/dist/types/actions/inputs.d.ts.map +1 -1
  58. package/dist/types/actions/outputs.d.ts +19 -1
  59. package/dist/types/actions/outputs.d.ts.map +1 -1
  60. package/dist/types/actions/tools/{swapBridgeAction.d.ts → bridgeAction.d.ts} +4 -4
  61. package/dist/types/actions/tools/bridgeAction.d.ts.map +1 -0
  62. package/dist/types/actions/tools/bridgeAction.js +2 -0
  63. package/dist/types/actions/tools/bridgeAction.js.map +1 -0
  64. package/dist/types/actions/tools/defiFetchListingsAction.d.ts +1 -2
  65. package/dist/types/actions/tools/defiFetchListingsAction.d.ts.map +1 -1
  66. package/dist/types/actions/tools/defiFetchListingsAction.js +1 -1
  67. package/dist/types/actions/tools/defiFetchListingsAction.js.map +1 -1
  68. package/dist/types/actions/tools/defiPositionsAction.d.ts +1 -2
  69. package/dist/types/actions/tools/defiPositionsAction.d.ts.map +1 -1
  70. package/dist/types/actions/tools/defiPositionsAction.js +1 -1
  71. package/dist/types/actions/tools/defiPositionsAction.js.map +1 -1
  72. package/dist/types/actions/tools/defiSupplyAction.d.ts +1 -2
  73. package/dist/types/actions/tools/defiSupplyAction.d.ts.map +1 -1
  74. package/dist/types/actions/tools/defiSupplyAction.js +1 -1
  75. package/dist/types/actions/tools/defiSupplyAction.js.map +1 -1
  76. package/dist/types/actions/tools/defiWithdrawAction.d.ts +1 -2
  77. package/dist/types/actions/tools/defiWithdrawAction.d.ts.map +1 -1
  78. package/dist/types/actions/tools/defiWithdrawAction.js +1 -1
  79. package/dist/types/actions/tools/defiWithdrawAction.js.map +1 -1
  80. package/dist/types/actions/tools/exchangeRateAction.d.ts +1 -2
  81. package/dist/types/actions/tools/exchangeRateAction.d.ts.map +1 -1
  82. package/dist/types/actions/tools/exchangeRateAction.js +1 -1
  83. package/dist/types/actions/tools/exchangeRateAction.js.map +1 -1
  84. package/dist/types/actions/tools/getWalletBalanceAction.d.ts +4 -3
  85. package/dist/types/actions/tools/getWalletBalanceAction.d.ts.map +1 -1
  86. package/dist/types/actions/tools/getWalletBalanceAction.js +1 -1
  87. package/dist/types/actions/tools/getWalletBalanceAction.js.map +1 -1
  88. package/dist/types/actions/tools/index.d.ts +18 -3
  89. package/dist/types/actions/tools/index.d.ts.map +1 -1
  90. package/dist/types/actions/tools/polymarketPostOrderAction.d.ts +83 -0
  91. package/dist/types/actions/tools/polymarketPostOrderAction.d.ts.map +1 -0
  92. package/dist/types/actions/tools/polymarketPostOrderAction.js +2 -0
  93. package/dist/types/actions/tools/polymarketPostOrderAction.js.map +1 -0
  94. package/dist/types/actions/tools/predictionMarketsBetAction.d.ts +19 -0
  95. package/dist/types/actions/tools/predictionMarketsBetAction.d.ts.map +1 -0
  96. package/dist/types/actions/tools/predictionMarketsBetAction.js +2 -0
  97. package/dist/types/actions/tools/predictionMarketsBetAction.js.map +1 -0
  98. package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts +21 -0
  99. package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts.map +1 -0
  100. package/dist/types/actions/tools/predictionMarketsFetchAction.js +2 -0
  101. package/dist/types/actions/tools/predictionMarketsFetchAction.js.map +1 -0
  102. package/dist/types/actions/tools/predictionMarketsPositionsAction.d.ts +25 -0
  103. package/dist/types/actions/tools/predictionMarketsPositionsAction.d.ts.map +1 -0
  104. package/dist/types/actions/tools/predictionMarketsPositionsAction.js +2 -0
  105. package/dist/types/actions/tools/predictionMarketsPositionsAction.js.map +1 -0
  106. package/dist/types/actions/tools/swapAction.d.ts +16 -0
  107. package/dist/types/actions/tools/swapAction.d.ts.map +1 -0
  108. package/dist/types/actions/tools/swapAction.js +2 -0
  109. package/dist/types/actions/tools/swapAction.js.map +1 -0
  110. package/dist/types/actions/tools/tokenTransferAction.d.ts +1 -2
  111. package/dist/types/actions/tools/tokenTransferAction.d.ts.map +1 -1
  112. package/dist/types/actions/tools/tokenTransferAction.js +1 -1
  113. package/dist/types/actions/tools/tokenTransferAction.js.map +1 -1
  114. package/dist/types/index.d.ts +2 -0
  115. package/dist/types/index.d.ts.map +1 -1
  116. package/dist/types/index.js +2 -0
  117. package/dist/types/index.js.map +1 -1
  118. package/dist/types/messages.d.ts +3 -6
  119. package/dist/types/messages.d.ts.map +1 -1
  120. package/dist/types/messages.js +1 -1
  121. package/dist/types/messages.js.map +1 -1
  122. package/dist/types/streaming.d.ts +81 -0
  123. package/dist/types/streaming.d.ts.map +1 -0
  124. package/dist/types/streaming.js +2 -0
  125. package/dist/types/streaming.js.map +1 -0
  126. package/dist/types/telemetry.d.ts +139 -0
  127. package/dist/types/telemetry.d.ts.map +1 -0
  128. package/dist/types/telemetry.js +7 -0
  129. package/dist/types/telemetry.js.map +1 -0
  130. package/dist/utils/constants.d.ts +8 -6
  131. package/dist/utils/constants.d.ts.map +1 -1
  132. package/dist/utils/constants.js +23 -5
  133. package/dist/utils/constants.js.map +1 -1
  134. package/package.json +4 -4
  135. package/dist/types/actions/tools/swapBridgeAction.d.ts.map +0 -1
  136. package/dist/types/actions/tools/swapBridgeAction.js +0 -2
  137. 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<{
@@ -27,9 +27,8 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
27
27
  withdraw: "aave";
28
28
  lending?: undefined;
29
29
  }>]>>;
30
- swapOrBridge: z.ZodOptional<z.ZodEnum<["lifi"]>>;
30
+ swapOrBridge: z.ZodOptional<z.ZodEnum<["lifi", "rubic"]>>;
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;
41
+ swapOrBridge?: "lifi" | "rubic" | undefined;
42
42
  }, {
43
- swapOrBridge?: "lifi" | undefined;
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" | "rubic" | 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" | "rubic" | 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" | "rubic" | 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
- prompt: z.ZodObject<{
90
- role: z.ZodEnum<["user", "assistant", "tool", "system"]>;
91
- content: z.ZodArray<z.ZodUnion<[z.ZodObject<{
92
+ prompt: z.ZodOptional<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,578 +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;
103
+ }>, "many">;
104
+ }, "strict", z.ZodTypeAny, {
105
+ role: "user";
106
+ content: {
107
+ type: "text";
108
+ text: string;
109
+ }[];
110
+ }, {
111
+ role: "user";
112
+ content: {
113
+ type: "text";
114
+ text: string;
115
+ }[];
116
+ }>>;
117
+ toolResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
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">;
378
133
  }, "strict", z.ZodTypeAny, {
379
- type: "tool-incomplete";
380
- toolName: string;
381
- toolCallId: string;
382
- missingParams: string[];
383
- humanReadableDescription: string;
384
- args?: unknown;
134
+ type: "input";
135
+ errors: {
136
+ path: string;
137
+ message: string;
138
+ }[];
385
139
  }, {
386
- type: "tool-incomplete";
387
- toolName: string;
388
- toolCallId: string;
389
- missingParams: string[];
390
- humanReadableDescription: string;
391
- args?: unknown;
140
+ type: "input";
141
+ errors: {
142
+ path: string;
143
+ message: string;
144
+ }[];
392
145
  }>, 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>>;
146
+ type: z.ZodLiteral<"execution">;
147
+ message: z.ZodString;
148
+ details: z.ZodOptional<z.ZodUnknown>;
397
149
  }, "strict", z.ZodTypeAny, {
398
- type: "tool-error";
399
- toolName: string;
400
- toolCallId: string;
401
- error: import("../types/actions/errors.js").ActionError<unknown>;
150
+ message: string;
151
+ type: "execution";
152
+ details?: unknown;
402
153
  }, {
403
- type: "tool-error";
404
- toolName: string;
405
- toolCallId: string;
406
- error: import("../types/actions/errors.js").ActionError<unknown>;
407
- }>]>, "many">;
154
+ message: string;
155
+ type: "execution";
156
+ details?: unknown;
157
+ }>]>>;
408
158
  }, "strict", z.ZodTypeAny, {
409
- role: "user" | "assistant" | "tool" | "system";
410
- content: ({
411
- type: "text";
412
- 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;
159
+ id: string;
160
+ name: string;
161
+ result?: unknown;
162
+ error?: {
163
+ type: "input";
164
+ errors: {
165
+ path: string;
166
+ message: string;
167
+ }[];
533
168
  } | {
534
- type: "tool-error";
535
- toolName: string;
536
- toolCallId: string;
537
- error: import("../types/actions/errors.js").ActionError<unknown>;
538
- })[];
169
+ message: string;
170
+ type: "execution";
171
+ details?: unknown;
172
+ } | undefined;
539
173
  }, {
540
- role: "user" | "assistant" | "tool" | "system";
541
- content: ({
542
- type: "text";
543
- 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
- };
174
+ id: string;
175
+ name: string;
176
+ result?: unknown;
177
+ error?: {
178
+ type: "input";
179
+ errors: {
180
+ path: string;
181
+ message: string;
182
+ }[];
614
183
  } | {
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
- })[];
670
- }>;
671
- languageModel: z.ZodOptional<z.ZodString>;
184
+ message: string;
185
+ type: "execution";
186
+ details?: unknown;
187
+ } | undefined;
188
+ }>, "many">>;
189
+ languageModel: z.ZodString;
672
190
  personalityContext: z.ZodDefault<z.ZodOptional<z.ZodObject<{
673
191
  channel: z.ZodEnum<["voice", "text"]>;
674
192
  }, "strip", z.ZodTypeAny, {
@@ -676,7 +194,8 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
676
194
  }, {
677
195
  channel: "text" | "voice";
678
196
  }>>>;
679
- }, "messages">, {
197
+ requestId: z.ZodOptional<z.ZodString>;
198
+ }, "messages"> & {
680
199
  toolsConfig: z.ZodObject<{
681
200
  autoRouter: z.ZodOptional<z.ZodObject<{
682
201
  defi: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
@@ -704,9 +223,8 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
704
223
  withdraw: "aave";
705
224
  lending?: undefined;
706
225
  }>]>>;
707
- swapOrBridge: z.ZodOptional<z.ZodEnum<["lifi"]>>;
226
+ swapOrBridge: z.ZodOptional<z.ZodEnum<["lifi", "rubic"]>>;
708
227
  }, "strict", z.ZodTypeAny, {
709
- swapOrBridge?: "lifi" | undefined;
710
228
  defi?: {
711
229
  lending: "aave";
712
230
  supply?: undefined;
@@ -716,8 +234,8 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
716
234
  withdraw: "aave";
717
235
  lending?: undefined;
718
236
  } | undefined;
237
+ swapOrBridge?: "lifi" | "rubic" | undefined;
719
238
  }, {
720
- swapOrBridge?: "lifi" | undefined;
721
239
  defi?: {
722
240
  lending: "aave";
723
241
  supply?: undefined;
@@ -727,10 +245,10 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
727
245
  withdraw: "aave";
728
246
  lending?: undefined;
729
247
  } | undefined;
248
+ swapOrBridge?: "lifi" | "rubic" | undefined;
730
249
  }>>;
731
250
  }, "strict", z.ZodTypeAny, {
732
251
  autoRouter?: {
733
- swapOrBridge?: "lifi" | undefined;
734
252
  defi?: {
735
253
  lending: "aave";
736
254
  supply?: undefined;
@@ -740,10 +258,10 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
740
258
  withdraw: "aave";
741
259
  lending?: undefined;
742
260
  } | undefined;
261
+ swapOrBridge?: "lifi" | "rubic" | undefined;
743
262
  } | undefined;
744
263
  }, {
745
264
  autoRouter?: {
746
- swapOrBridge?: "lifi" | undefined;
747
265
  defi?: {
748
266
  lending: "aave";
749
267
  supply?: undefined;
@@ -753,12 +271,12 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
753
271
  withdraw: "aave";
754
272
  lending?: undefined;
755
273
  } | undefined;
274
+ swapOrBridge?: "lifi" | "rubic" | undefined;
756
275
  } | undefined;
757
276
  }>;
758
- }>, "strip", z.ZodTypeAny, {
277
+ }, "strip", z.ZodTypeAny, {
759
278
  toolsConfig: {
760
279
  autoRouter?: {
761
- swapOrBridge?: "lifi" | undefined;
762
280
  defi?: {
763
281
  lending: "aave";
764
282
  supply?: undefined;
@@ -768,13 +286,13 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
768
286
  withdraw: "aave";
769
287
  lending?: undefined;
770
288
  } | undefined;
289
+ swapOrBridge?: "lifi" | "rubic" | undefined;
771
290
  } | undefined;
772
291
  };
773
292
  messages: import("@ai-sdk/provider-utils").ModelMessage[];
774
293
  }, {
775
294
  toolsConfig: {
776
295
  autoRouter?: {
777
- swapOrBridge?: "lifi" | undefined;
778
296
  defi?: {
779
297
  lending: "aave";
780
298
  supply?: undefined;
@@ -784,6 +302,7 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
784
302
  withdraw: "aave";
785
303
  lending?: undefined;
786
304
  } | undefined;
305
+ swapOrBridge?: "lifi" | "rubic" | undefined;
787
306
  } | undefined;
788
307
  };
789
308
  messages: import("@ai-sdk/provider-utils").ModelMessage[];