@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
@@ -29,7 +29,6 @@ export declare const CoreApiChatBodyRequestBaseSchema: z.ZodObject<{
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 CoreApiChatBodyRequestBaseSchema: z.ZodObject<{
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 CoreApiChatBodyRequestBaseSchema: z.ZodObject<{
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 CoreApiChatBodyRequestBaseSchema: z.ZodObject<{
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 CoreApiChatBodyRequestBaseSchema: z.ZodObject<{
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 CoreApiChatBodyRequestBaseSchema: z.ZodObject<{
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,10 +194,11 @@ export declare const CoreApiChatBodyRequestBaseSchema: z.ZodObject<{
692
194
  }, {
693
195
  channel: "text" | "voice";
694
196
  }>>>;
197
+ /** Client-generated request ID for telemetry subscription */
198
+ requestId: z.ZodOptional<z.ZodString>;
695
199
  }, "strict", z.ZodTypeAny, {
696
200
  toolsConfig: {
697
201
  autoRouter?: {
698
- swapOrBridge?: "lifi" | undefined;
699
202
  defi?: {
700
203
  lending: "aave";
701
204
  supply?: undefined;
@@ -705,158 +208,45 @@ export declare const CoreApiChatBodyRequestBaseSchema: z.ZodObject<{
705
208
  withdraw: "aave";
706
209
  lending?: undefined;
707
210
  } | undefined;
211
+ swapOrBridge?: "lifi" | undefined;
708
212
  } | undefined;
709
213
  };
710
214
  messages: import("@ai-sdk/provider-utils").ModelMessage[];
711
215
  userContext: {
712
216
  address: `0x${string}`;
217
+ signerWallet?: `0x${string}` | undefined;
713
218
  };
219
+ languageModel: string;
714
220
  personalityContext: {
715
221
  channel: "text" | "voice";
716
222
  };
717
223
  prompt?: {
718
- role: "user" | "assistant" | "tool" | "system";
719
- content: ({
224
+ role: "user";
225
+ content: {
720
226
  type: "text";
721
227
  text: string;
722
- } | {
723
- type: "tool-call";
724
- toolName: "tokenTransfer";
725
- toolCallId: string;
726
- args: {
727
- fromAddress: string;
728
- toAddress: string;
729
- amount: string;
730
- token: string;
731
- chain: string;
732
- missingParameters?: string[] | undefined;
733
- humanFriendlyMessage?: string | undefined;
734
- };
735
- } | {
736
- type: "tool-call";
737
- toolName: "swapOrBridge";
738
- toolCallId: string;
739
- args: {
740
- fromAddress: string;
741
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
742
- fromToken: string;
743
- fromAmount: string;
744
- protocol: "lifi";
745
- toAddress?: string | undefined;
746
- missingParameters?: string[] | undefined;
747
- humanFriendlyMessage?: string | undefined;
748
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
749
- toToken?: string | undefined;
750
- toAmount?: string | undefined;
751
- };
752
- } | {
753
- type: "tool-call";
754
- toolName: "exchangeRate";
755
- toolCallId: string;
756
- args: {
757
- provider: "coinMarketCap";
758
- arguments: {
759
- baseCurrency: string;
760
- quoteCurrency: string;
761
- baseAmount?: string | undefined;
762
- quoteAmount?: string | undefined;
763
- }[];
764
- missingParameters?: string[] | undefined;
765
- humanFriendlyMessage?: string | undefined;
766
- };
767
- } | {
768
- type: "tool-call";
769
- toolName: "getWalletBalance";
770
- toolCallId: string;
771
- args: {
772
- address: string;
773
- provider: "moralis";
774
- token?: string | undefined;
775
- chain?: string | undefined;
776
- missingParameters?: string[] | undefined;
777
- humanFriendlyMessage?: string | undefined;
778
- };
779
- } | {
780
- type: "tool-call";
781
- toolName: "defiFetchListings";
782
- toolCallId: string;
783
- args: {
784
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
785
- protocol: "aave";
786
- missingParameters?: string[] | undefined;
787
- humanFriendlyMessage?: string | undefined;
788
- tokens?: string[] | undefined;
789
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
790
- limit?: number | undefined;
791
- };
792
- } | {
793
- type: "tool-call";
794
- toolName: "defiSupply";
795
- toolCallId: string;
796
- args: {
797
- amount: string;
798
- token: string;
799
- chain: string;
800
- protocol: "aave";
801
- userAddress: string;
802
- missingParameters?: string[] | undefined;
803
- humanFriendlyMessage?: string | undefined;
804
- };
805
- } | {
806
- type: "tool-call";
807
- toolName: "defiWithdraw";
808
- toolCallId: string;
809
- args: {
810
- amount: string;
811
- token: string;
812
- chain: string;
813
- protocol: "aave";
814
- userAddress: string;
815
- missingParameters?: string[] | undefined;
816
- humanFriendlyMessage?: string | undefined;
817
- };
818
- } | {
819
- type: "tool-call";
820
- toolName: "defiPositions";
821
- toolCallId: string;
822
- args: {
823
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
824
- protocol: "aave";
825
- userAddress: string;
826
- missingParameters?: string[] | undefined;
827
- humanFriendlyMessage?: string | undefined;
828
- tokens?: string[] | undefined;
829
- };
830
- } | {
831
- type: "tool-result";
832
- toolName: string;
833
- toolCallId: string;
834
- result?: unknown;
835
- } | {
836
- type: "tool-incomplete";
837
- toolName: string;
838
- toolCallId: string;
839
- missingParams: string[];
840
- humanReadableDescription: string;
841
- args?: unknown;
842
- } | {
843
- type: "tool-error";
844
- toolName: string;
845
- toolCallId: string;
846
- error: import("../types/actions/errors.js").ActionError<unknown>;
847
- })[];
228
+ }[];
848
229
  } | undefined;
849
230
  toolResults?: {
850
- toolName: string;
851
- toolCallId: string;
231
+ id: string;
232
+ name: string;
852
233
  result?: unknown;
853
- error?: unknown;
234
+ error?: {
235
+ type: "input";
236
+ errors: {
237
+ path: string;
238
+ message: string;
239
+ }[];
240
+ } | {
241
+ message: string;
242
+ type: "execution";
243
+ details?: unknown;
244
+ } | undefined;
854
245
  }[] | undefined;
855
- languageModel?: string | undefined;
246
+ requestId?: string | undefined;
856
247
  }, {
857
248
  toolsConfig: {
858
249
  autoRouter?: {
859
- swapOrBridge?: "lifi" | undefined;
860
250
  defi?: {
861
251
  lending: "aave";
862
252
  supply?: undefined;
@@ -866,154 +256,42 @@ export declare const CoreApiChatBodyRequestBaseSchema: z.ZodObject<{
866
256
  withdraw: "aave";
867
257
  lending?: undefined;
868
258
  } | undefined;
259
+ swapOrBridge?: "lifi" | undefined;
869
260
  } | undefined;
870
261
  };
871
262
  messages: import("@ai-sdk/provider-utils").ModelMessage[];
872
263
  userContext: {
873
264
  address: string;
265
+ signerWallet?: string | undefined;
874
266
  };
267
+ languageModel: string;
875
268
  prompt?: {
876
- role: "user" | "assistant" | "tool" | "system";
877
- content: ({
269
+ role: "user";
270
+ content: {
878
271
  type: "text";
879
272
  text: string;
880
- } | {
881
- type: "tool-call";
882
- toolName: "tokenTransfer";
883
- toolCallId: string;
884
- args: {
885
- fromAddress: string;
886
- toAddress: string;
887
- amount: string;
888
- token: string;
889
- chain: string;
890
- missingParameters?: string[] | undefined;
891
- humanFriendlyMessage?: string | undefined;
892
- };
893
- } | {
894
- type: "tool-call";
895
- toolName: "swapOrBridge";
896
- toolCallId: string;
897
- args: {
898
- fromAddress: string;
899
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
900
- fromToken: string;
901
- fromAmount: string;
902
- protocol: "lifi";
903
- toAddress?: string | undefined;
904
- missingParameters?: string[] | undefined;
905
- humanFriendlyMessage?: string | undefined;
906
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
907
- toToken?: string | undefined;
908
- toAmount?: string | undefined;
909
- };
910
- } | {
911
- type: "tool-call";
912
- toolName: "exchangeRate";
913
- toolCallId: string;
914
- args: {
915
- provider: "coinMarketCap";
916
- arguments: {
917
- baseCurrency: string;
918
- quoteCurrency: string;
919
- baseAmount?: string | undefined;
920
- quoteAmount?: string | undefined;
921
- }[];
922
- missingParameters?: string[] | undefined;
923
- humanFriendlyMessage?: string | undefined;
924
- };
925
- } | {
926
- type: "tool-call";
927
- toolName: "getWalletBalance";
928
- toolCallId: string;
929
- args: {
930
- address: string;
931
- provider: "moralis";
932
- token?: string | undefined;
933
- chain?: string | undefined;
934
- missingParameters?: string[] | undefined;
935
- humanFriendlyMessage?: string | undefined;
936
- };
937
- } | {
938
- type: "tool-call";
939
- toolName: "defiFetchListings";
940
- toolCallId: string;
941
- args: {
942
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
943
- protocol: "aave";
944
- missingParameters?: string[] | undefined;
945
- humanFriendlyMessage?: string | undefined;
946
- tokens?: string[] | undefined;
947
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
948
- limit?: number | undefined;
949
- };
950
- } | {
951
- type: "tool-call";
952
- toolName: "defiSupply";
953
- toolCallId: string;
954
- args: {
955
- amount: string;
956
- token: string;
957
- chain: string;
958
- protocol: "aave";
959
- userAddress: string;
960
- missingParameters?: string[] | undefined;
961
- humanFriendlyMessage?: string | undefined;
962
- };
963
- } | {
964
- type: "tool-call";
965
- toolName: "defiWithdraw";
966
- toolCallId: string;
967
- args: {
968
- amount: string;
969
- token: string;
970
- chain: string;
971
- protocol: "aave";
972
- userAddress: string;
973
- missingParameters?: string[] | undefined;
974
- humanFriendlyMessage?: string | undefined;
975
- };
976
- } | {
977
- type: "tool-call";
978
- toolName: "defiPositions";
979
- toolCallId: string;
980
- args: {
981
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
982
- protocol: "aave";
983
- userAddress: string;
984
- missingParameters?: string[] | undefined;
985
- humanFriendlyMessage?: string | undefined;
986
- tokens?: string[] | undefined;
987
- };
988
- } | {
989
- type: "tool-result";
990
- toolName: string;
991
- toolCallId: string;
992
- result?: unknown;
993
- } | {
994
- type: "tool-incomplete";
995
- toolName: string;
996
- toolCallId: string;
997
- missingParams: string[];
998
- humanReadableDescription: string;
999
- args?: unknown;
1000
- } | {
1001
- type: "tool-error";
1002
- toolName: string;
1003
- toolCallId: string;
1004
- error: import("../types/actions/errors.js").ActionError<unknown>;
1005
- })[];
273
+ }[];
1006
274
  } | undefined;
1007
275
  toolResults?: {
1008
- toolName: string;
1009
- toolCallId: string;
276
+ id: string;
277
+ name: string;
1010
278
  result?: unknown;
1011
- error?: unknown;
279
+ error?: {
280
+ type: "input";
281
+ errors: {
282
+ path: string;
283
+ message: string;
284
+ }[];
285
+ } | {
286
+ message: string;
287
+ type: "execution";
288
+ details?: unknown;
289
+ } | undefined;
1012
290
  }[] | undefined;
1013
- languageModel?: string | undefined;
1014
291
  personalityContext?: {
1015
292
  channel: "text" | "voice";
1016
293
  } | undefined;
294
+ requestId?: string | undefined;
1017
295
  }>;
1018
296
  export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
1019
297
  toolsConfig: z.ZodObject<{
@@ -1045,7 +323,6 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
1045
323
  }>]>>;
1046
324
  swapOrBridge: z.ZodOptional<z.ZodEnum<["lifi"]>>;
1047
325
  }, "strict", z.ZodTypeAny, {
1048
- swapOrBridge?: "lifi" | undefined;
1049
326
  defi?: {
1050
327
  lending: "aave";
1051
328
  supply?: undefined;
@@ -1055,8 +332,8 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
1055
332
  withdraw: "aave";
1056
333
  lending?: undefined;
1057
334
  } | undefined;
1058
- }, {
1059
335
  swapOrBridge?: "lifi" | undefined;
336
+ }, {
1060
337
  defi?: {
1061
338
  lending: "aave";
1062
339
  supply?: undefined;
@@ -1066,10 +343,10 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
1066
343
  withdraw: "aave";
1067
344
  lending?: undefined;
1068
345
  } | undefined;
346
+ swapOrBridge?: "lifi" | undefined;
1069
347
  }>>;
1070
348
  }, "strict", z.ZodTypeAny, {
1071
349
  autoRouter?: {
1072
- swapOrBridge?: "lifi" | undefined;
1073
350
  defi?: {
1074
351
  lending: "aave";
1075
352
  supply?: undefined;
@@ -1079,10 +356,10 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
1079
356
  withdraw: "aave";
1080
357
  lending?: undefined;
1081
358
  } | undefined;
359
+ swapOrBridge?: "lifi" | undefined;
1082
360
  } | undefined;
1083
361
  }, {
1084
362
  autoRouter?: {
1085
- swapOrBridge?: "lifi" | undefined;
1086
363
  defi?: {
1087
364
  lending: "aave";
1088
365
  supply?: undefined;
@@ -1092,19 +369,23 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
1092
369
  withdraw: "aave";
1093
370
  lending?: undefined;
1094
371
  } | undefined;
372
+ swapOrBridge?: "lifi" | undefined;
1095
373
  } | undefined;
1096
374
  }>;
1097
375
  messages: z.ZodArray<z.ZodType<import("@ai-sdk/provider-utils").ModelMessage, z.ZodTypeDef, import("@ai-sdk/provider-utils").ModelMessage>, "many">;
1098
376
  userContext: z.ZodObject<{
1099
377
  address: z.ZodEffects<z.ZodString, `0x${string}`, string>;
378
+ signerWallet: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
1100
379
  }, "strict", z.ZodTypeAny, {
1101
380
  address: `0x${string}`;
381
+ signerWallet?: `0x${string}` | undefined;
1102
382
  }, {
1103
383
  address: string;
384
+ signerWallet?: string | undefined;
1104
385
  }>;
1105
386
  prompt: z.ZodOptional<z.ZodObject<{
1106
- role: z.ZodEnum<["user", "assistant", "tool", "system"]>;
1107
- content: z.ZodArray<z.ZodUnion<[z.ZodObject<{
387
+ role: z.ZodLiteral<"user">;
388
+ content: z.ZodArray<z.ZodObject<{
1108
389
  type: z.ZodLiteral<"text">;
1109
390
  text: z.ZodString;
1110
391
  }, "strict", z.ZodTypeAny, {
@@ -1113,594 +394,93 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
1113
394
  }, {
1114
395
  type: "text";
1115
396
  text: string;
1116
- }>, z.ZodDiscriminatedUnion<"toolName", [z.ZodObject<{
1117
- type: z.ZodLiteral<"tool-call">;
1118
- toolCallId: z.ZodString;
1119
- toolName: z.ZodLiteral<"tokenTransfer">;
1120
- args: z.ZodType<import("../external.js").TokenTransferActionInput>;
1121
- }, "strict", z.ZodTypeAny, {
1122
- type: "tool-call";
1123
- toolName: "tokenTransfer";
1124
- toolCallId: string;
1125
- args: {
1126
- fromAddress: string;
1127
- toAddress: string;
1128
- amount: string;
1129
- token: string;
1130
- chain: string;
1131
- missingParameters?: string[] | undefined;
1132
- humanFriendlyMessage?: string | undefined;
1133
- };
1134
- }, {
1135
- type: "tool-call";
1136
- toolName: "tokenTransfer";
1137
- toolCallId: string;
1138
- args: {
1139
- fromAddress: string;
1140
- toAddress: string;
1141
- amount: string;
1142
- token: string;
1143
- chain: string;
1144
- missingParameters?: string[] | undefined;
1145
- humanFriendlyMessage?: string | undefined;
1146
- };
1147
- }>, z.ZodObject<{
1148
- type: z.ZodLiteral<"tool-call">;
1149
- toolCallId: z.ZodString;
1150
- toolName: z.ZodLiteral<"swapOrBridge">;
1151
- args: z.ZodType<import("../external.js").SwapBridgeActionInput>;
1152
- }, "strict", z.ZodTypeAny, {
1153
- type: "tool-call";
1154
- toolName: "swapOrBridge";
1155
- toolCallId: string;
1156
- args: {
1157
- fromAddress: string;
1158
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1159
- fromToken: string;
1160
- fromAmount: string;
1161
- protocol: "lifi";
1162
- toAddress?: string | undefined;
1163
- missingParameters?: string[] | undefined;
1164
- humanFriendlyMessage?: string | undefined;
1165
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
1166
- toToken?: string | undefined;
1167
- toAmount?: string | undefined;
1168
- };
1169
- }, {
1170
- type: "tool-call";
1171
- toolName: "swapOrBridge";
1172
- toolCallId: string;
1173
- args: {
1174
- fromAddress: string;
1175
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1176
- fromToken: string;
1177
- fromAmount: string;
1178
- protocol: "lifi";
1179
- toAddress?: string | undefined;
1180
- missingParameters?: string[] | undefined;
1181
- humanFriendlyMessage?: string | undefined;
1182
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
1183
- toToken?: string | undefined;
1184
- toAmount?: string | undefined;
1185
- };
1186
- }>, z.ZodObject<{
1187
- type: z.ZodLiteral<"tool-call">;
1188
- toolCallId: z.ZodString;
1189
- toolName: z.ZodLiteral<"exchangeRate">;
1190
- args: z.ZodType<import("../external.js").ExchangeRateActionInput>;
1191
- }, "strict", z.ZodTypeAny, {
1192
- type: "tool-call";
1193
- toolName: "exchangeRate";
1194
- toolCallId: string;
1195
- args: {
1196
- provider: "coinMarketCap";
1197
- arguments: {
1198
- baseCurrency: string;
1199
- quoteCurrency: string;
1200
- baseAmount?: string | undefined;
1201
- quoteAmount?: string | undefined;
1202
- }[];
1203
- missingParameters?: string[] | undefined;
1204
- humanFriendlyMessage?: string | undefined;
1205
- };
1206
- }, {
1207
- type: "tool-call";
1208
- toolName: "exchangeRate";
1209
- toolCallId: string;
1210
- args: {
1211
- provider: "coinMarketCap";
1212
- arguments: {
1213
- baseCurrency: string;
1214
- quoteCurrency: string;
1215
- baseAmount?: string | undefined;
1216
- quoteAmount?: string | undefined;
1217
- }[];
1218
- missingParameters?: string[] | undefined;
1219
- humanFriendlyMessage?: string | undefined;
1220
- };
1221
- }>, z.ZodObject<{
1222
- type: z.ZodLiteral<"tool-call">;
1223
- toolCallId: z.ZodString;
1224
- toolName: z.ZodLiteral<"getWalletBalance">;
1225
- args: z.ZodType<import("../external.js").GetWalletBalanceActionInput>;
1226
- }, "strict", z.ZodTypeAny, {
1227
- type: "tool-call";
1228
- toolName: "getWalletBalance";
1229
- toolCallId: string;
1230
- args: {
1231
- address: string;
1232
- provider: "moralis";
1233
- token?: string | undefined;
1234
- chain?: string | undefined;
1235
- missingParameters?: string[] | undefined;
1236
- humanFriendlyMessage?: string | undefined;
1237
- };
1238
- }, {
1239
- type: "tool-call";
1240
- toolName: "getWalletBalance";
1241
- toolCallId: string;
1242
- args: {
1243
- address: string;
1244
- provider: "moralis";
1245
- token?: string | undefined;
1246
- chain?: string | undefined;
1247
- missingParameters?: string[] | undefined;
1248
- humanFriendlyMessage?: string | undefined;
1249
- };
1250
- }>, z.ZodObject<{
1251
- type: z.ZodLiteral<"tool-call">;
1252
- toolCallId: z.ZodString;
1253
- toolName: z.ZodLiteral<"defiFetchListings">;
1254
- args: z.ZodType<import("../external.js").DefiFetchListingsActionInput>;
1255
- }, "strict", z.ZodTypeAny, {
1256
- type: "tool-call";
1257
- toolName: "defiFetchListings";
1258
- toolCallId: string;
1259
- args: {
1260
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1261
- protocol: "aave";
1262
- missingParameters?: string[] | undefined;
1263
- humanFriendlyMessage?: string | undefined;
1264
- tokens?: string[] | undefined;
1265
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
1266
- limit?: number | undefined;
1267
- };
1268
- }, {
1269
- type: "tool-call";
1270
- toolName: "defiFetchListings";
1271
- toolCallId: string;
1272
- args: {
1273
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1274
- protocol: "aave";
1275
- missingParameters?: string[] | undefined;
1276
- humanFriendlyMessage?: string | undefined;
1277
- tokens?: string[] | undefined;
1278
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
1279
- limit?: number | undefined;
1280
- };
1281
- }>, z.ZodObject<{
1282
- type: z.ZodLiteral<"tool-call">;
1283
- toolCallId: z.ZodString;
1284
- toolName: z.ZodLiteral<"defiSupply">;
1285
- args: z.ZodType<import("../external.js").DefiSupplyActionInput>;
1286
- }, "strict", z.ZodTypeAny, {
1287
- type: "tool-call";
1288
- toolName: "defiSupply";
1289
- toolCallId: string;
1290
- args: {
1291
- amount: string;
1292
- token: string;
1293
- chain: string;
1294
- protocol: "aave";
1295
- userAddress: string;
1296
- missingParameters?: string[] | undefined;
1297
- humanFriendlyMessage?: string | undefined;
1298
- };
1299
- }, {
1300
- type: "tool-call";
1301
- toolName: "defiSupply";
1302
- toolCallId: string;
1303
- args: {
1304
- amount: string;
1305
- token: string;
1306
- chain: string;
1307
- protocol: "aave";
1308
- userAddress: string;
1309
- missingParameters?: string[] | undefined;
1310
- humanFriendlyMessage?: string | undefined;
1311
- };
1312
- }>, z.ZodObject<{
1313
- type: z.ZodLiteral<"tool-call">;
1314
- toolCallId: z.ZodString;
1315
- toolName: z.ZodLiteral<"defiWithdraw">;
1316
- args: z.ZodType<import("../external.js").DefiWithdrawActionInput>;
1317
- }, "strict", z.ZodTypeAny, {
1318
- type: "tool-call";
1319
- toolName: "defiWithdraw";
1320
- toolCallId: string;
1321
- args: {
1322
- amount: string;
1323
- token: string;
1324
- chain: string;
1325
- protocol: "aave";
1326
- userAddress: string;
1327
- missingParameters?: string[] | undefined;
1328
- humanFriendlyMessage?: string | undefined;
1329
- };
1330
- }, {
1331
- type: "tool-call";
1332
- toolName: "defiWithdraw";
1333
- toolCallId: string;
1334
- args: {
1335
- amount: string;
1336
- token: string;
1337
- chain: string;
1338
- protocol: "aave";
1339
- userAddress: string;
1340
- missingParameters?: string[] | undefined;
1341
- humanFriendlyMessage?: string | undefined;
1342
- };
1343
- }>, z.ZodObject<{
1344
- type: z.ZodLiteral<"tool-call">;
1345
- toolCallId: z.ZodString;
1346
- toolName: z.ZodLiteral<"defiPositions">;
1347
- args: z.ZodType<import("../external.js").DefiPositionsActionInput>;
1348
- }, "strict", z.ZodTypeAny, {
1349
- type: "tool-call";
1350
- toolName: "defiPositions";
1351
- toolCallId: string;
1352
- args: {
1353
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1354
- protocol: "aave";
1355
- userAddress: string;
1356
- missingParameters?: string[] | undefined;
1357
- humanFriendlyMessage?: string | undefined;
1358
- tokens?: string[] | undefined;
1359
- };
1360
- }, {
1361
- type: "tool-call";
1362
- toolName: "defiPositions";
1363
- toolCallId: string;
1364
- args: {
1365
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1366
- protocol: "aave";
1367
- userAddress: string;
1368
- missingParameters?: string[] | undefined;
1369
- humanFriendlyMessage?: string | undefined;
1370
- tokens?: string[] | undefined;
1371
- };
1372
- }>]>, z.ZodObject<{
1373
- type: z.ZodLiteral<"tool-result">;
1374
- toolCallId: z.ZodString;
1375
- toolName: z.ZodString;
1376
- result: z.ZodUnknown;
1377
- }, "strict", z.ZodTypeAny, {
1378
- type: "tool-result";
1379
- toolName: string;
1380
- toolCallId: string;
1381
- result?: unknown;
1382
- }, {
1383
- type: "tool-result";
1384
- toolName: string;
1385
- toolCallId: string;
1386
- result?: unknown;
1387
- }>, z.ZodObject<{
1388
- type: z.ZodLiteral<"tool-incomplete">;
1389
- toolCallId: z.ZodString;
1390
- toolName: z.ZodString;
1391
- args: z.ZodUnknown;
1392
- missingParams: z.ZodArray<z.ZodString, "many">;
1393
- humanReadableDescription: z.ZodString;
1394
- }, "strict", z.ZodTypeAny, {
1395
- type: "tool-incomplete";
1396
- toolName: string;
1397
- toolCallId: string;
1398
- missingParams: string[];
1399
- humanReadableDescription: string;
1400
- args?: unknown;
1401
- }, {
1402
- type: "tool-incomplete";
1403
- toolName: string;
1404
- toolCallId: string;
1405
- missingParams: string[];
1406
- humanReadableDescription: string;
1407
- args?: unknown;
1408
- }>, z.ZodObject<{
1409
- type: z.ZodLiteral<"tool-error">;
1410
- toolCallId: z.ZodString;
1411
- toolName: z.ZodString;
1412
- error: z.ZodType<import("../types/actions/errors.js").ActionError<unknown>>;
1413
- }, "strict", z.ZodTypeAny, {
1414
- type: "tool-error";
1415
- toolName: string;
1416
- toolCallId: string;
1417
- error: import("../types/actions/errors.js").ActionError<unknown>;
1418
- }, {
1419
- type: "tool-error";
1420
- toolName: string;
1421
- toolCallId: string;
1422
- error: import("../types/actions/errors.js").ActionError<unknown>;
1423
- }>]>, "many">;
397
+ }>, "many">;
1424
398
  }, "strict", z.ZodTypeAny, {
1425
- role: "user" | "assistant" | "tool" | "system";
1426
- content: ({
399
+ role: "user";
400
+ content: {
1427
401
  type: "text";
1428
402
  text: string;
1429
- } | {
1430
- type: "tool-call";
1431
- toolName: "tokenTransfer";
1432
- toolCallId: string;
1433
- args: {
1434
- fromAddress: string;
1435
- toAddress: string;
1436
- amount: string;
1437
- token: string;
1438
- chain: string;
1439
- missingParameters?: string[] | undefined;
1440
- humanFriendlyMessage?: string | undefined;
1441
- };
1442
- } | {
1443
- type: "tool-call";
1444
- toolName: "swapOrBridge";
1445
- toolCallId: string;
1446
- args: {
1447
- fromAddress: string;
1448
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1449
- fromToken: string;
1450
- fromAmount: string;
1451
- protocol: "lifi";
1452
- toAddress?: string | undefined;
1453
- missingParameters?: string[] | undefined;
1454
- humanFriendlyMessage?: string | undefined;
1455
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
1456
- toToken?: string | undefined;
1457
- toAmount?: string | undefined;
1458
- };
1459
- } | {
1460
- type: "tool-call";
1461
- toolName: "exchangeRate";
1462
- toolCallId: string;
1463
- args: {
1464
- provider: "coinMarketCap";
1465
- arguments: {
1466
- baseCurrency: string;
1467
- quoteCurrency: string;
1468
- baseAmount?: string | undefined;
1469
- quoteAmount?: string | undefined;
1470
- }[];
1471
- missingParameters?: string[] | undefined;
1472
- humanFriendlyMessage?: string | undefined;
1473
- };
1474
- } | {
1475
- type: "tool-call";
1476
- toolName: "getWalletBalance";
1477
- toolCallId: string;
1478
- args: {
1479
- address: string;
1480
- provider: "moralis";
1481
- token?: string | undefined;
1482
- chain?: string | undefined;
1483
- missingParameters?: string[] | undefined;
1484
- humanFriendlyMessage?: string | undefined;
1485
- };
1486
- } | {
1487
- type: "tool-call";
1488
- toolName: "defiFetchListings";
1489
- toolCallId: string;
1490
- args: {
1491
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1492
- protocol: "aave";
1493
- missingParameters?: string[] | undefined;
1494
- humanFriendlyMessage?: string | undefined;
1495
- tokens?: string[] | undefined;
1496
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
1497
- limit?: number | undefined;
1498
- };
1499
- } | {
1500
- type: "tool-call";
1501
- toolName: "defiSupply";
1502
- toolCallId: string;
1503
- args: {
1504
- amount: string;
1505
- token: string;
1506
- chain: string;
1507
- protocol: "aave";
1508
- userAddress: string;
1509
- missingParameters?: string[] | undefined;
1510
- humanFriendlyMessage?: string | undefined;
1511
- };
1512
- } | {
1513
- type: "tool-call";
1514
- toolName: "defiWithdraw";
1515
- toolCallId: string;
1516
- args: {
1517
- amount: string;
1518
- token: string;
1519
- chain: string;
1520
- protocol: "aave";
1521
- userAddress: string;
1522
- missingParameters?: string[] | undefined;
1523
- humanFriendlyMessage?: string | undefined;
1524
- };
1525
- } | {
1526
- type: "tool-call";
1527
- toolName: "defiPositions";
1528
- toolCallId: string;
1529
- args: {
1530
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1531
- protocol: "aave";
1532
- userAddress: string;
1533
- missingParameters?: string[] | undefined;
1534
- humanFriendlyMessage?: string | undefined;
1535
- tokens?: string[] | undefined;
1536
- };
1537
- } | {
1538
- type: "tool-result";
1539
- toolName: string;
1540
- toolCallId: string;
1541
- result?: unknown;
1542
- } | {
1543
- type: "tool-incomplete";
1544
- toolName: string;
1545
- toolCallId: string;
1546
- missingParams: string[];
1547
- humanReadableDescription: string;
1548
- args?: unknown;
1549
- } | {
1550
- type: "tool-error";
1551
- toolName: string;
1552
- toolCallId: string;
1553
- error: import("../types/actions/errors.js").ActionError<unknown>;
1554
- })[];
403
+ }[];
1555
404
  }, {
1556
- role: "user" | "assistant" | "tool" | "system";
1557
- content: ({
405
+ role: "user";
406
+ content: {
1558
407
  type: "text";
1559
408
  text: string;
1560
- } | {
1561
- type: "tool-call";
1562
- toolName: "tokenTransfer";
1563
- toolCallId: string;
1564
- args: {
1565
- fromAddress: string;
1566
- toAddress: string;
1567
- amount: string;
1568
- token: string;
1569
- chain: string;
1570
- missingParameters?: string[] | undefined;
1571
- humanFriendlyMessage?: string | undefined;
1572
- };
1573
- } | {
1574
- type: "tool-call";
1575
- toolName: "swapOrBridge";
1576
- toolCallId: string;
1577
- args: {
1578
- fromAddress: string;
1579
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1580
- fromToken: string;
1581
- fromAmount: string;
1582
- protocol: "lifi";
1583
- toAddress?: string | undefined;
1584
- missingParameters?: string[] | undefined;
1585
- humanFriendlyMessage?: string | undefined;
1586
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
1587
- toToken?: string | undefined;
1588
- toAmount?: string | undefined;
1589
- };
1590
- } | {
1591
- type: "tool-call";
1592
- toolName: "exchangeRate";
1593
- toolCallId: string;
1594
- args: {
1595
- provider: "coinMarketCap";
1596
- arguments: {
1597
- baseCurrency: string;
1598
- quoteCurrency: string;
1599
- baseAmount?: string | undefined;
1600
- quoteAmount?: string | undefined;
1601
- }[];
1602
- missingParameters?: string[] | undefined;
1603
- humanFriendlyMessage?: string | undefined;
1604
- };
1605
- } | {
1606
- type: "tool-call";
1607
- toolName: "getWalletBalance";
1608
- toolCallId: string;
1609
- args: {
1610
- address: string;
1611
- provider: "moralis";
1612
- token?: string | undefined;
1613
- chain?: string | undefined;
1614
- missingParameters?: string[] | undefined;
1615
- humanFriendlyMessage?: string | undefined;
1616
- };
1617
- } | {
1618
- type: "tool-call";
1619
- toolName: "defiFetchListings";
1620
- toolCallId: string;
1621
- args: {
1622
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1623
- protocol: "aave";
1624
- missingParameters?: string[] | undefined;
1625
- humanFriendlyMessage?: string | undefined;
1626
- tokens?: string[] | undefined;
1627
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
1628
- limit?: number | undefined;
1629
- };
1630
- } | {
1631
- type: "tool-call";
1632
- toolName: "defiSupply";
1633
- toolCallId: string;
1634
- args: {
1635
- amount: string;
1636
- token: string;
1637
- chain: string;
1638
- protocol: "aave";
1639
- userAddress: string;
1640
- missingParameters?: string[] | undefined;
1641
- humanFriendlyMessage?: string | undefined;
1642
- };
1643
- } | {
1644
- type: "tool-call";
1645
- toolName: "defiWithdraw";
1646
- toolCallId: string;
1647
- args: {
1648
- amount: string;
1649
- token: string;
1650
- chain: string;
1651
- protocol: "aave";
1652
- userAddress: string;
1653
- missingParameters?: string[] | undefined;
1654
- humanFriendlyMessage?: string | undefined;
1655
- };
1656
- } | {
1657
- type: "tool-call";
1658
- toolName: "defiPositions";
1659
- toolCallId: string;
1660
- args: {
1661
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1662
- protocol: "aave";
1663
- userAddress: string;
1664
- missingParameters?: string[] | undefined;
1665
- humanFriendlyMessage?: string | undefined;
1666
- tokens?: string[] | undefined;
1667
- };
1668
- } | {
1669
- type: "tool-result";
1670
- toolName: string;
1671
- toolCallId: string;
1672
- result?: unknown;
1673
- } | {
1674
- type: "tool-incomplete";
1675
- toolName: string;
1676
- toolCallId: string;
1677
- missingParams: string[];
1678
- humanReadableDescription: string;
1679
- args?: unknown;
1680
- } | {
1681
- type: "tool-error";
1682
- toolName: string;
1683
- toolCallId: string;
1684
- error: import("../types/actions/errors.js").ActionError<unknown>;
1685
- })[];
409
+ }[];
1686
410
  }>>;
1687
411
  toolResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
1688
- toolCallId: z.ZodString;
1689
- toolName: z.ZodString;
1690
- result: z.ZodUnknown;
1691
- error: z.ZodOptional<z.ZodUnknown>;
412
+ id: z.ZodString;
413
+ name: z.ZodString;
414
+ result: z.ZodOptional<z.ZodUnknown>;
415
+ error: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
416
+ type: z.ZodLiteral<"input">;
417
+ errors: z.ZodArray<z.ZodObject<{
418
+ path: z.ZodString;
419
+ message: z.ZodString;
420
+ }, "strict", z.ZodTypeAny, {
421
+ path: string;
422
+ message: string;
423
+ }, {
424
+ path: string;
425
+ message: string;
426
+ }>, "many">;
427
+ }, "strict", z.ZodTypeAny, {
428
+ type: "input";
429
+ errors: {
430
+ path: string;
431
+ message: string;
432
+ }[];
433
+ }, {
434
+ type: "input";
435
+ errors: {
436
+ path: string;
437
+ message: string;
438
+ }[];
439
+ }>, z.ZodObject<{
440
+ type: z.ZodLiteral<"execution">;
441
+ message: z.ZodString;
442
+ details: z.ZodOptional<z.ZodUnknown>;
443
+ }, "strict", z.ZodTypeAny, {
444
+ message: string;
445
+ type: "execution";
446
+ details?: unknown;
447
+ }, {
448
+ message: string;
449
+ type: "execution";
450
+ details?: unknown;
451
+ }>]>>;
1692
452
  }, "strict", z.ZodTypeAny, {
1693
- toolName: string;
1694
- toolCallId: string;
453
+ id: string;
454
+ name: string;
1695
455
  result?: unknown;
1696
- error?: unknown;
456
+ error?: {
457
+ type: "input";
458
+ errors: {
459
+ path: string;
460
+ message: string;
461
+ }[];
462
+ } | {
463
+ message: string;
464
+ type: "execution";
465
+ details?: unknown;
466
+ } | undefined;
1697
467
  }, {
1698
- toolName: string;
1699
- toolCallId: string;
468
+ id: string;
469
+ name: string;
1700
470
  result?: unknown;
1701
- error?: unknown;
471
+ error?: {
472
+ type: "input";
473
+ errors: {
474
+ path: string;
475
+ message: string;
476
+ }[];
477
+ } | {
478
+ message: string;
479
+ type: "execution";
480
+ details?: unknown;
481
+ } | undefined;
1702
482
  }>, "many">>;
1703
- languageModel: z.ZodOptional<z.ZodString>;
483
+ languageModel: z.ZodString;
1704
484
  personalityContext: z.ZodDefault<z.ZodOptional<z.ZodObject<{
1705
485
  channel: z.ZodEnum<["voice", "text"]>;
1706
486
  }, "strip", z.ZodTypeAny, {
@@ -1708,10 +488,11 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
1708
488
  }, {
1709
489
  channel: "text" | "voice";
1710
490
  }>>>;
491
+ /** Client-generated request ID for telemetry subscription */
492
+ requestId: z.ZodOptional<z.ZodString>;
1711
493
  }, "strict", z.ZodTypeAny, {
1712
494
  toolsConfig: {
1713
495
  autoRouter?: {
1714
- swapOrBridge?: "lifi" | undefined;
1715
496
  defi?: {
1716
497
  lending: "aave";
1717
498
  supply?: undefined;
@@ -1721,158 +502,45 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
1721
502
  withdraw: "aave";
1722
503
  lending?: undefined;
1723
504
  } | undefined;
505
+ swapOrBridge?: "lifi" | undefined;
1724
506
  } | undefined;
1725
507
  };
1726
508
  messages: import("@ai-sdk/provider-utils").ModelMessage[];
1727
509
  userContext: {
1728
510
  address: `0x${string}`;
511
+ signerWallet?: `0x${string}` | undefined;
1729
512
  };
513
+ languageModel: string;
1730
514
  personalityContext: {
1731
515
  channel: "text" | "voice";
1732
516
  };
1733
517
  prompt?: {
1734
- role: "user" | "assistant" | "tool" | "system";
1735
- content: ({
518
+ role: "user";
519
+ content: {
1736
520
  type: "text";
1737
521
  text: string;
1738
- } | {
1739
- type: "tool-call";
1740
- toolName: "tokenTransfer";
1741
- toolCallId: string;
1742
- args: {
1743
- fromAddress: string;
1744
- toAddress: string;
1745
- amount: string;
1746
- token: string;
1747
- chain: string;
1748
- missingParameters?: string[] | undefined;
1749
- humanFriendlyMessage?: string | undefined;
1750
- };
1751
- } | {
1752
- type: "tool-call";
1753
- toolName: "swapOrBridge";
1754
- toolCallId: string;
1755
- args: {
1756
- fromAddress: string;
1757
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1758
- fromToken: string;
1759
- fromAmount: string;
1760
- protocol: "lifi";
1761
- toAddress?: string | undefined;
1762
- missingParameters?: string[] | undefined;
1763
- humanFriendlyMessage?: string | undefined;
1764
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
1765
- toToken?: string | undefined;
1766
- toAmount?: string | undefined;
1767
- };
1768
- } | {
1769
- type: "tool-call";
1770
- toolName: "exchangeRate";
1771
- toolCallId: string;
1772
- args: {
1773
- provider: "coinMarketCap";
1774
- arguments: {
1775
- baseCurrency: string;
1776
- quoteCurrency: string;
1777
- baseAmount?: string | undefined;
1778
- quoteAmount?: string | undefined;
1779
- }[];
1780
- missingParameters?: string[] | undefined;
1781
- humanFriendlyMessage?: string | undefined;
1782
- };
1783
- } | {
1784
- type: "tool-call";
1785
- toolName: "getWalletBalance";
1786
- toolCallId: string;
1787
- args: {
1788
- address: string;
1789
- provider: "moralis";
1790
- token?: string | undefined;
1791
- chain?: string | undefined;
1792
- missingParameters?: string[] | undefined;
1793
- humanFriendlyMessage?: string | undefined;
1794
- };
1795
- } | {
1796
- type: "tool-call";
1797
- toolName: "defiFetchListings";
1798
- toolCallId: string;
1799
- args: {
1800
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1801
- protocol: "aave";
1802
- missingParameters?: string[] | undefined;
1803
- humanFriendlyMessage?: string | undefined;
1804
- tokens?: string[] | undefined;
1805
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
1806
- limit?: number | undefined;
1807
- };
1808
- } | {
1809
- type: "tool-call";
1810
- toolName: "defiSupply";
1811
- toolCallId: string;
1812
- args: {
1813
- amount: string;
1814
- token: string;
1815
- chain: string;
1816
- protocol: "aave";
1817
- userAddress: string;
1818
- missingParameters?: string[] | undefined;
1819
- humanFriendlyMessage?: string | undefined;
1820
- };
1821
- } | {
1822
- type: "tool-call";
1823
- toolName: "defiWithdraw";
1824
- toolCallId: string;
1825
- args: {
1826
- amount: string;
1827
- token: string;
1828
- chain: string;
1829
- protocol: "aave";
1830
- userAddress: string;
1831
- missingParameters?: string[] | undefined;
1832
- humanFriendlyMessage?: string | undefined;
1833
- };
1834
- } | {
1835
- type: "tool-call";
1836
- toolName: "defiPositions";
1837
- toolCallId: string;
1838
- args: {
1839
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1840
- protocol: "aave";
1841
- userAddress: string;
1842
- missingParameters?: string[] | undefined;
1843
- humanFriendlyMessage?: string | undefined;
1844
- tokens?: string[] | undefined;
1845
- };
1846
- } | {
1847
- type: "tool-result";
1848
- toolName: string;
1849
- toolCallId: string;
1850
- result?: unknown;
1851
- } | {
1852
- type: "tool-incomplete";
1853
- toolName: string;
1854
- toolCallId: string;
1855
- missingParams: string[];
1856
- humanReadableDescription: string;
1857
- args?: unknown;
1858
- } | {
1859
- type: "tool-error";
1860
- toolName: string;
1861
- toolCallId: string;
1862
- error: import("../types/actions/errors.js").ActionError<unknown>;
1863
- })[];
522
+ }[];
1864
523
  } | undefined;
1865
524
  toolResults?: {
1866
- toolName: string;
1867
- toolCallId: string;
525
+ id: string;
526
+ name: string;
1868
527
  result?: unknown;
1869
- error?: unknown;
528
+ error?: {
529
+ type: "input";
530
+ errors: {
531
+ path: string;
532
+ message: string;
533
+ }[];
534
+ } | {
535
+ message: string;
536
+ type: "execution";
537
+ details?: unknown;
538
+ } | undefined;
1870
539
  }[] | undefined;
1871
- languageModel?: string | undefined;
540
+ requestId?: string | undefined;
1872
541
  }, {
1873
542
  toolsConfig: {
1874
543
  autoRouter?: {
1875
- swapOrBridge?: "lifi" | undefined;
1876
544
  defi?: {
1877
545
  lending: "aave";
1878
546
  supply?: undefined;
@@ -1882,158 +550,45 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
1882
550
  withdraw: "aave";
1883
551
  lending?: undefined;
1884
552
  } | undefined;
553
+ swapOrBridge?: "lifi" | undefined;
1885
554
  } | undefined;
1886
555
  };
1887
556
  messages: import("@ai-sdk/provider-utils").ModelMessage[];
1888
557
  userContext: {
1889
558
  address: string;
559
+ signerWallet?: string | undefined;
1890
560
  };
561
+ languageModel: string;
1891
562
  prompt?: {
1892
- role: "user" | "assistant" | "tool" | "system";
1893
- content: ({
563
+ role: "user";
564
+ content: {
1894
565
  type: "text";
1895
566
  text: string;
1896
- } | {
1897
- type: "tool-call";
1898
- toolName: "tokenTransfer";
1899
- toolCallId: string;
1900
- args: {
1901
- fromAddress: string;
1902
- toAddress: string;
1903
- amount: string;
1904
- token: string;
1905
- chain: string;
1906
- missingParameters?: string[] | undefined;
1907
- humanFriendlyMessage?: string | undefined;
1908
- };
1909
- } | {
1910
- type: "tool-call";
1911
- toolName: "swapOrBridge";
1912
- toolCallId: string;
1913
- args: {
1914
- fromAddress: string;
1915
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1916
- fromToken: string;
1917
- fromAmount: string;
1918
- protocol: "lifi";
1919
- toAddress?: string | undefined;
1920
- missingParameters?: string[] | undefined;
1921
- humanFriendlyMessage?: string | undefined;
1922
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
1923
- toToken?: string | undefined;
1924
- toAmount?: string | undefined;
1925
- };
1926
- } | {
1927
- type: "tool-call";
1928
- toolName: "exchangeRate";
1929
- toolCallId: string;
1930
- args: {
1931
- provider: "coinMarketCap";
1932
- arguments: {
1933
- baseCurrency: string;
1934
- quoteCurrency: string;
1935
- baseAmount?: string | undefined;
1936
- quoteAmount?: string | undefined;
1937
- }[];
1938
- missingParameters?: string[] | undefined;
1939
- humanFriendlyMessage?: string | undefined;
1940
- };
1941
- } | {
1942
- type: "tool-call";
1943
- toolName: "getWalletBalance";
1944
- toolCallId: string;
1945
- args: {
1946
- address: string;
1947
- provider: "moralis";
1948
- token?: string | undefined;
1949
- chain?: string | undefined;
1950
- missingParameters?: string[] | undefined;
1951
- humanFriendlyMessage?: string | undefined;
1952
- };
1953
- } | {
1954
- type: "tool-call";
1955
- toolName: "defiFetchListings";
1956
- toolCallId: string;
1957
- args: {
1958
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1959
- protocol: "aave";
1960
- missingParameters?: string[] | undefined;
1961
- humanFriendlyMessage?: string | undefined;
1962
- tokens?: string[] | undefined;
1963
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
1964
- limit?: number | undefined;
1965
- };
1966
- } | {
1967
- type: "tool-call";
1968
- toolName: "defiSupply";
1969
- toolCallId: string;
1970
- args: {
1971
- amount: string;
1972
- token: string;
1973
- chain: string;
1974
- protocol: "aave";
1975
- userAddress: string;
1976
- missingParameters?: string[] | undefined;
1977
- humanFriendlyMessage?: string | undefined;
1978
- };
1979
- } | {
1980
- type: "tool-call";
1981
- toolName: "defiWithdraw";
1982
- toolCallId: string;
1983
- args: {
1984
- amount: string;
1985
- token: string;
1986
- chain: string;
1987
- protocol: "aave";
1988
- userAddress: string;
1989
- missingParameters?: string[] | undefined;
1990
- humanFriendlyMessage?: string | undefined;
1991
- };
1992
- } | {
1993
- type: "tool-call";
1994
- toolName: "defiPositions";
1995
- toolCallId: string;
1996
- args: {
1997
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1998
- protocol: "aave";
1999
- userAddress: string;
2000
- missingParameters?: string[] | undefined;
2001
- humanFriendlyMessage?: string | undefined;
2002
- tokens?: string[] | undefined;
2003
- };
2004
- } | {
2005
- type: "tool-result";
2006
- toolName: string;
2007
- toolCallId: string;
2008
- result?: unknown;
2009
- } | {
2010
- type: "tool-incomplete";
2011
- toolName: string;
2012
- toolCallId: string;
2013
- missingParams: string[];
2014
- humanReadableDescription: string;
2015
- args?: unknown;
2016
- } | {
2017
- type: "tool-error";
2018
- toolName: string;
2019
- toolCallId: string;
2020
- error: import("../types/actions/errors.js").ActionError<unknown>;
2021
- })[];
567
+ }[];
2022
568
  } | undefined;
2023
569
  toolResults?: {
2024
- toolName: string;
2025
- toolCallId: string;
570
+ id: string;
571
+ name: string;
2026
572
  result?: unknown;
2027
- error?: unknown;
573
+ error?: {
574
+ type: "input";
575
+ errors: {
576
+ path: string;
577
+ message: string;
578
+ }[];
579
+ } | {
580
+ message: string;
581
+ type: "execution";
582
+ details?: unknown;
583
+ } | undefined;
2028
584
  }[] | undefined;
2029
- languageModel?: string | undefined;
2030
585
  personalityContext?: {
2031
586
  channel: "text" | "voice";
2032
587
  } | undefined;
588
+ requestId?: string | undefined;
2033
589
  }>, {
2034
590
  toolsConfig: {
2035
591
  autoRouter?: {
2036
- swapOrBridge?: "lifi" | undefined;
2037
592
  defi?: {
2038
593
  lending: "aave";
2039
594
  supply?: undefined;
@@ -2043,158 +598,45 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
2043
598
  withdraw: "aave";
2044
599
  lending?: undefined;
2045
600
  } | undefined;
601
+ swapOrBridge?: "lifi" | undefined;
2046
602
  } | undefined;
2047
603
  };
2048
604
  messages: import("@ai-sdk/provider-utils").ModelMessage[];
2049
605
  userContext: {
2050
606
  address: `0x${string}`;
607
+ signerWallet?: `0x${string}` | undefined;
2051
608
  };
609
+ languageModel: string;
2052
610
  personalityContext: {
2053
611
  channel: "text" | "voice";
2054
612
  };
2055
613
  prompt?: {
2056
- role: "user" | "assistant" | "tool" | "system";
2057
- content: ({
614
+ role: "user";
615
+ content: {
2058
616
  type: "text";
2059
617
  text: string;
2060
- } | {
2061
- type: "tool-call";
2062
- toolName: "tokenTransfer";
2063
- toolCallId: string;
2064
- args: {
2065
- fromAddress: string;
2066
- toAddress: string;
2067
- amount: string;
2068
- token: string;
2069
- chain: string;
2070
- missingParameters?: string[] | undefined;
2071
- humanFriendlyMessage?: string | undefined;
2072
- };
2073
- } | {
2074
- type: "tool-call";
2075
- toolName: "swapOrBridge";
2076
- toolCallId: string;
2077
- args: {
2078
- fromAddress: string;
2079
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2080
- fromToken: string;
2081
- fromAmount: string;
2082
- protocol: "lifi";
2083
- toAddress?: string | undefined;
2084
- missingParameters?: string[] | undefined;
2085
- humanFriendlyMessage?: string | undefined;
2086
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
2087
- toToken?: string | undefined;
2088
- toAmount?: string | undefined;
2089
- };
2090
- } | {
2091
- type: "tool-call";
2092
- toolName: "exchangeRate";
2093
- toolCallId: string;
2094
- args: {
2095
- provider: "coinMarketCap";
2096
- arguments: {
2097
- baseCurrency: string;
2098
- quoteCurrency: string;
2099
- baseAmount?: string | undefined;
2100
- quoteAmount?: string | undefined;
2101
- }[];
2102
- missingParameters?: string[] | undefined;
2103
- humanFriendlyMessage?: string | undefined;
2104
- };
2105
- } | {
2106
- type: "tool-call";
2107
- toolName: "getWalletBalance";
2108
- toolCallId: string;
2109
- args: {
2110
- address: string;
2111
- provider: "moralis";
2112
- token?: string | undefined;
2113
- chain?: string | undefined;
2114
- missingParameters?: string[] | undefined;
2115
- humanFriendlyMessage?: string | undefined;
2116
- };
2117
- } | {
2118
- type: "tool-call";
2119
- toolName: "defiFetchListings";
2120
- toolCallId: string;
2121
- args: {
2122
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2123
- protocol: "aave";
2124
- missingParameters?: string[] | undefined;
2125
- humanFriendlyMessage?: string | undefined;
2126
- tokens?: string[] | undefined;
2127
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
2128
- limit?: number | undefined;
2129
- };
2130
- } | {
2131
- type: "tool-call";
2132
- toolName: "defiSupply";
2133
- toolCallId: string;
2134
- args: {
2135
- amount: string;
2136
- token: string;
2137
- chain: string;
2138
- protocol: "aave";
2139
- userAddress: string;
2140
- missingParameters?: string[] | undefined;
2141
- humanFriendlyMessage?: string | undefined;
2142
- };
2143
- } | {
2144
- type: "tool-call";
2145
- toolName: "defiWithdraw";
2146
- toolCallId: string;
2147
- args: {
2148
- amount: string;
2149
- token: string;
2150
- chain: string;
2151
- protocol: "aave";
2152
- userAddress: string;
2153
- missingParameters?: string[] | undefined;
2154
- humanFriendlyMessage?: string | undefined;
2155
- };
2156
- } | {
2157
- type: "tool-call";
2158
- toolName: "defiPositions";
2159
- toolCallId: string;
2160
- args: {
2161
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2162
- protocol: "aave";
2163
- userAddress: string;
2164
- missingParameters?: string[] | undefined;
2165
- humanFriendlyMessage?: string | undefined;
2166
- tokens?: string[] | undefined;
2167
- };
2168
- } | {
2169
- type: "tool-result";
2170
- toolName: string;
2171
- toolCallId: string;
2172
- result?: unknown;
2173
- } | {
2174
- type: "tool-incomplete";
2175
- toolName: string;
2176
- toolCallId: string;
2177
- missingParams: string[];
2178
- humanReadableDescription: string;
2179
- args?: unknown;
2180
- } | {
2181
- type: "tool-error";
2182
- toolName: string;
2183
- toolCallId: string;
2184
- error: import("../types/actions/errors.js").ActionError<unknown>;
2185
- })[];
618
+ }[];
2186
619
  } | undefined;
2187
620
  toolResults?: {
2188
- toolName: string;
2189
- toolCallId: string;
621
+ id: string;
622
+ name: string;
2190
623
  result?: unknown;
2191
- error?: unknown;
624
+ error?: {
625
+ type: "input";
626
+ errors: {
627
+ path: string;
628
+ message: string;
629
+ }[];
630
+ } | {
631
+ message: string;
632
+ type: "execution";
633
+ details?: unknown;
634
+ } | undefined;
2192
635
  }[] | undefined;
2193
- languageModel?: string | undefined;
636
+ requestId?: string | undefined;
2194
637
  }, {
2195
638
  toolsConfig: {
2196
639
  autoRouter?: {
2197
- swapOrBridge?: "lifi" | undefined;
2198
640
  defi?: {
2199
641
  lending: "aave";
2200
642
  supply?: undefined;
@@ -2204,153 +646,41 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
2204
646
  withdraw: "aave";
2205
647
  lending?: undefined;
2206
648
  } | undefined;
649
+ swapOrBridge?: "lifi" | undefined;
2207
650
  } | undefined;
2208
651
  };
2209
652
  messages: import("@ai-sdk/provider-utils").ModelMessage[];
2210
653
  userContext: {
2211
654
  address: string;
655
+ signerWallet?: string | undefined;
2212
656
  };
657
+ languageModel: string;
2213
658
  prompt?: {
2214
- role: "user" | "assistant" | "tool" | "system";
2215
- content: ({
659
+ role: "user";
660
+ content: {
2216
661
  type: "text";
2217
662
  text: string;
2218
- } | {
2219
- type: "tool-call";
2220
- toolName: "tokenTransfer";
2221
- toolCallId: string;
2222
- args: {
2223
- fromAddress: string;
2224
- toAddress: string;
2225
- amount: string;
2226
- token: string;
2227
- chain: string;
2228
- missingParameters?: string[] | undefined;
2229
- humanFriendlyMessage?: string | undefined;
2230
- };
2231
- } | {
2232
- type: "tool-call";
2233
- toolName: "swapOrBridge";
2234
- toolCallId: string;
2235
- args: {
2236
- fromAddress: string;
2237
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2238
- fromToken: string;
2239
- fromAmount: string;
2240
- protocol: "lifi";
2241
- toAddress?: string | undefined;
2242
- missingParameters?: string[] | undefined;
2243
- humanFriendlyMessage?: string | undefined;
2244
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
2245
- toToken?: string | undefined;
2246
- toAmount?: string | undefined;
2247
- };
2248
- } | {
2249
- type: "tool-call";
2250
- toolName: "exchangeRate";
2251
- toolCallId: string;
2252
- args: {
2253
- provider: "coinMarketCap";
2254
- arguments: {
2255
- baseCurrency: string;
2256
- quoteCurrency: string;
2257
- baseAmount?: string | undefined;
2258
- quoteAmount?: string | undefined;
2259
- }[];
2260
- missingParameters?: string[] | undefined;
2261
- humanFriendlyMessage?: string | undefined;
2262
- };
2263
- } | {
2264
- type: "tool-call";
2265
- toolName: "getWalletBalance";
2266
- toolCallId: string;
2267
- args: {
2268
- address: string;
2269
- provider: "moralis";
2270
- token?: string | undefined;
2271
- chain?: string | undefined;
2272
- missingParameters?: string[] | undefined;
2273
- humanFriendlyMessage?: string | undefined;
2274
- };
2275
- } | {
2276
- type: "tool-call";
2277
- toolName: "defiFetchListings";
2278
- toolCallId: string;
2279
- args: {
2280
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2281
- protocol: "aave";
2282
- missingParameters?: string[] | undefined;
2283
- humanFriendlyMessage?: string | undefined;
2284
- tokens?: string[] | undefined;
2285
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
2286
- limit?: number | undefined;
2287
- };
2288
- } | {
2289
- type: "tool-call";
2290
- toolName: "defiSupply";
2291
- toolCallId: string;
2292
- args: {
2293
- amount: string;
2294
- token: string;
2295
- chain: string;
2296
- protocol: "aave";
2297
- userAddress: string;
2298
- missingParameters?: string[] | undefined;
2299
- humanFriendlyMessage?: string | undefined;
2300
- };
2301
- } | {
2302
- type: "tool-call";
2303
- toolName: "defiWithdraw";
2304
- toolCallId: string;
2305
- args: {
2306
- amount: string;
2307
- token: string;
2308
- chain: string;
2309
- protocol: "aave";
2310
- userAddress: string;
2311
- missingParameters?: string[] | undefined;
2312
- humanFriendlyMessage?: string | undefined;
2313
- };
2314
- } | {
2315
- type: "tool-call";
2316
- toolName: "defiPositions";
2317
- toolCallId: string;
2318
- args: {
2319
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2320
- protocol: "aave";
2321
- userAddress: string;
2322
- missingParameters?: string[] | undefined;
2323
- humanFriendlyMessage?: string | undefined;
2324
- tokens?: string[] | undefined;
2325
- };
2326
- } | {
2327
- type: "tool-result";
2328
- toolName: string;
2329
- toolCallId: string;
2330
- result?: unknown;
2331
- } | {
2332
- type: "tool-incomplete";
2333
- toolName: string;
2334
- toolCallId: string;
2335
- missingParams: string[];
2336
- humanReadableDescription: string;
2337
- args?: unknown;
2338
- } | {
2339
- type: "tool-error";
2340
- toolName: string;
2341
- toolCallId: string;
2342
- error: import("../types/actions/errors.js").ActionError<unknown>;
2343
- })[];
663
+ }[];
2344
664
  } | undefined;
2345
665
  toolResults?: {
2346
- toolName: string;
2347
- toolCallId: string;
666
+ id: string;
667
+ name: string;
2348
668
  result?: unknown;
2349
- error?: unknown;
669
+ error?: {
670
+ type: "input";
671
+ errors: {
672
+ path: string;
673
+ message: string;
674
+ }[];
675
+ } | {
676
+ message: string;
677
+ type: "execution";
678
+ details?: unknown;
679
+ } | undefined;
2350
680
  }[] | undefined;
2351
- languageModel?: string | undefined;
2352
681
  personalityContext?: {
2353
682
  channel: "text" | "voice";
2354
683
  } | undefined;
684
+ requestId?: string | undefined;
2355
685
  }>;
2356
686
  //# sourceMappingURL=chatRequestBody.d.ts.map