@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 CoreApiChatBodyRequestSchema: z.ZodObject<{
2
+ export declare const CoreApiChatBodyRequestBaseSchema: z.ZodObject<{
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 CoreApiChatBodyRequestSchema: z.ZodObject<{
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 CoreApiChatBodyRequestSchema: z.ZodObject<{
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 CoreApiChatBodyRequestSchema: z.ZodObject<{
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 CoreApiChatBodyRequestSchema: z.ZodObject<{
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 CoreApiChatBodyRequestSchema: z.ZodObject<{
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,387 @@ export declare const CoreApiChatBodyRequestSchema: 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>;
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">;
270
133
  }, "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
- };
134
+ type: "input";
135
+ errors: {
136
+ path: string;
137
+ message: string;
138
+ }[];
283
139
  }, {
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
- };
140
+ type: "input";
141
+ errors: {
142
+ path: string;
143
+ message: string;
144
+ }[];
296
145
  }>, 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>;
146
+ type: z.ZodLiteral<"execution">;
147
+ message: z.ZodString;
148
+ details: z.ZodOptional<z.ZodUnknown>;
301
149
  }, "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
- };
150
+ message: string;
151
+ type: "execution";
152
+ details?: unknown;
314
153
  }, {
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>;
154
+ message: string;
155
+ type: "execution";
156
+ details?: unknown;
157
+ }>]>>;
158
+ }, "strict", z.ZodTypeAny, {
159
+ id: string;
160
+ name: string;
161
+ result?: 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;
173
+ }, {
174
+ id: string;
175
+ name: string;
176
+ result?: 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;
188
+ }>, "many">>;
189
+ languageModel: z.ZodString;
190
+ personalityContext: z.ZodDefault<z.ZodOptional<z.ZodObject<{
191
+ channel: z.ZodEnum<["voice", "text"]>;
192
+ }, "strip", z.ZodTypeAny, {
193
+ channel: "text" | "voice";
194
+ }, {
195
+ channel: "text" | "voice";
196
+ }>>>;
197
+ /** Client-generated request ID for telemetry subscription */
198
+ requestId: z.ZodOptional<z.ZodString>;
199
+ }, "strict", z.ZodTypeAny, {
200
+ toolsConfig: {
201
+ autoRouter?: {
202
+ defi?: {
203
+ lending: "aave";
204
+ supply?: undefined;
205
+ withdraw?: undefined;
206
+ } | {
207
+ supply: "aave";
208
+ withdraw: "aave";
209
+ lending?: undefined;
210
+ } | undefined;
211
+ swapOrBridge?: "lifi" | "rubic" | undefined;
212
+ } | undefined;
213
+ };
214
+ messages: import("@ai-sdk/provider-utils").ModelMessage[];
215
+ userContext: {
216
+ address: `0x${string}`;
217
+ signerWallet?: `0x${string}` | undefined;
218
+ };
219
+ languageModel: string;
220
+ personalityContext: {
221
+ channel: "text" | "voice";
222
+ };
223
+ prompt?: {
224
+ role: "user";
225
+ content: {
226
+ type: "text";
227
+ text: string;
228
+ }[];
229
+ } | undefined;
230
+ toolResults?: {
231
+ id: string;
232
+ name: string;
233
+ result?: 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;
245
+ }[] | undefined;
246
+ requestId?: string | undefined;
247
+ }, {
248
+ toolsConfig: {
249
+ autoRouter?: {
250
+ defi?: {
251
+ lending: "aave";
252
+ supply?: undefined;
253
+ withdraw?: undefined;
254
+ } | {
255
+ supply: "aave";
256
+ withdraw: "aave";
257
+ lending?: undefined;
258
+ } | undefined;
259
+ swapOrBridge?: "lifi" | "rubic" | undefined;
260
+ } | undefined;
261
+ };
262
+ messages: import("@ai-sdk/provider-utils").ModelMessage[];
263
+ userContext: {
264
+ address: string;
265
+ signerWallet?: string | undefined;
266
+ };
267
+ languageModel: string;
268
+ prompt?: {
269
+ role: "user";
270
+ content: {
271
+ type: "text";
272
+ text: string;
273
+ }[];
274
+ } | undefined;
275
+ toolResults?: {
276
+ id: string;
277
+ name: string;
278
+ result?: 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;
290
+ }[] | undefined;
291
+ personalityContext?: {
292
+ channel: "text" | "voice";
293
+ } | undefined;
294
+ requestId?: string | undefined;
295
+ }>;
296
+ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
297
+ toolsConfig: z.ZodObject<{
298
+ autoRouter: z.ZodOptional<z.ZodObject<{
299
+ defi: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
300
+ lending: z.ZodEnum<["aave"]>;
301
+ supply: z.ZodOptional<z.ZodNever>;
302
+ withdraw: z.ZodOptional<z.ZodNever>;
303
+ }, "strict", z.ZodTypeAny, {
304
+ lending: "aave";
305
+ supply?: undefined;
306
+ withdraw?: undefined;
307
+ }, {
308
+ lending: "aave";
309
+ supply?: undefined;
310
+ withdraw?: undefined;
311
+ }>, z.ZodObject<{
312
+ lending: z.ZodOptional<z.ZodNever>;
313
+ supply: z.ZodEnum<["aave"]>;
314
+ withdraw: z.ZodEnum<["aave"]>;
315
+ }, "strict", z.ZodTypeAny, {
316
+ supply: "aave";
317
+ withdraw: "aave";
318
+ lending?: undefined;
319
+ }, {
320
+ supply: "aave";
321
+ withdraw: "aave";
322
+ lending?: undefined;
323
+ }>]>>;
324
+ swapOrBridge: z.ZodOptional<z.ZodEnum<["lifi", "rubic"]>>;
332
325
  }, "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
- };
326
+ defi?: {
327
+ lending: "aave";
328
+ supply?: undefined;
329
+ withdraw?: undefined;
330
+ } | {
331
+ supply: "aave";
332
+ withdraw: "aave";
333
+ lending?: undefined;
334
+ } | undefined;
335
+ swapOrBridge?: "lifi" | "rubic" | undefined;
344
336
  }, {
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;
337
+ defi?: {
338
+ lending: "aave";
339
+ supply?: undefined;
340
+ withdraw?: undefined;
341
+ } | {
342
+ supply: "aave";
343
+ withdraw: "aave";
344
+ lending?: undefined;
345
+ } | undefined;
346
+ swapOrBridge?: "lifi" | "rubic" | undefined;
347
+ }>>;
348
+ }, "strict", z.ZodTypeAny, {
349
+ autoRouter?: {
350
+ defi?: {
351
+ lending: "aave";
352
+ supply?: undefined;
353
+ withdraw?: undefined;
354
+ } | {
355
+ supply: "aave";
356
+ withdraw: "aave";
357
+ lending?: undefined;
358
+ } | undefined;
359
+ swapOrBridge?: "lifi" | "rubic" | undefined;
360
+ } | undefined;
361
+ }, {
362
+ autoRouter?: {
363
+ defi?: {
364
+ lending: "aave";
365
+ supply?: undefined;
366
+ withdraw?: undefined;
367
+ } | {
368
+ supply: "aave";
369
+ withdraw: "aave";
370
+ lending?: undefined;
371
+ } | undefined;
372
+ swapOrBridge?: "lifi" | "rubic" | undefined;
373
+ } | undefined;
374
+ }>;
375
+ messages: z.ZodArray<z.ZodType<import("@ai-sdk/provider-utils").ModelMessage, z.ZodTypeDef, import("@ai-sdk/provider-utils").ModelMessage>, "many">;
376
+ userContext: z.ZodObject<{
377
+ address: z.ZodEffects<z.ZodString, `0x${string}`, string>;
378
+ signerWallet: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
379
+ }, "strict", z.ZodTypeAny, {
380
+ address: `0x${string}`;
381
+ signerWallet?: `0x${string}` | undefined;
382
+ }, {
383
+ address: string;
384
+ signerWallet?: string | undefined;
385
+ }>;
386
+ prompt: z.ZodOptional<z.ZodObject<{
387
+ role: z.ZodLiteral<"user">;
388
+ content: z.ZodArray<z.ZodObject<{
389
+ type: z.ZodLiteral<"text">;
390
+ text: z.ZodString;
361
391
  }, "strict", z.ZodTypeAny, {
362
- type: "tool-result";
363
- toolName: string;
364
- toolCallId: string;
365
- result?: unknown;
392
+ type: "text";
393
+ text: string;
366
394
  }, {
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;
395
+ type: "text";
396
+ text: string;
397
+ }>, "many">;
398
+ }, "strict", z.ZodTypeAny, {
399
+ role: "user";
400
+ content: {
401
+ type: "text";
402
+ text: string;
403
+ }[];
404
+ }, {
405
+ role: "user";
406
+ content: {
407
+ type: "text";
408
+ text: string;
409
+ }[];
410
+ }>>;
411
+ toolResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
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">;
378
427
  }, "strict", z.ZodTypeAny, {
379
- type: "tool-incomplete";
380
- toolName: string;
381
- toolCallId: string;
382
- missingParams: string[];
383
- humanReadableDescription: string;
384
- args?: unknown;
428
+ type: "input";
429
+ errors: {
430
+ path: string;
431
+ message: string;
432
+ }[];
385
433
  }, {
386
- type: "tool-incomplete";
387
- toolName: string;
388
- toolCallId: string;
389
- missingParams: string[];
390
- humanReadableDescription: string;
391
- args?: unknown;
434
+ type: "input";
435
+ errors: {
436
+ path: string;
437
+ message: string;
438
+ }[];
392
439
  }>, 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>>;
440
+ type: z.ZodLiteral<"execution">;
441
+ message: z.ZodString;
442
+ details: z.ZodOptional<z.ZodUnknown>;
397
443
  }, "strict", z.ZodTypeAny, {
398
- type: "tool-error";
399
- toolName: string;
400
- toolCallId: string;
401
- error: import("../types/actions/errors.js").ActionError<unknown>;
444
+ message: string;
445
+ type: "execution";
446
+ details?: unknown;
402
447
  }, {
403
- type: "tool-error";
404
- toolName: string;
405
- toolCallId: string;
406
- error: import("../types/actions/errors.js").ActionError<unknown>;
407
- }>]>, "many">;
448
+ message: string;
449
+ type: "execution";
450
+ details?: unknown;
451
+ }>]>>;
408
452
  }, "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;
533
- } | {
534
- type: "tool-error";
535
- toolName: string;
536
- toolCallId: string;
537
- error: import("../types/actions/errors.js").ActionError<unknown>;
538
- })[];
453
+ id: string;
454
+ name: string;
455
+ result?: 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;
539
467
  }, {
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
- };
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
- })[];
670
- }>;
671
- languageModel: z.ZodOptional<z.ZodString>;
468
+ id: string;
469
+ name: string;
470
+ result?: 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;
482
+ }>, "many">>;
483
+ languageModel: z.ZodString;
672
484
  personalityContext: z.ZodDefault<z.ZodOptional<z.ZodObject<{
673
485
  channel: z.ZodEnum<["voice", "text"]>;
674
486
  }, "strip", z.ZodTypeAny, {
@@ -676,10 +488,11 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
676
488
  }, {
677
489
  channel: "text" | "voice";
678
490
  }>>>;
491
+ /** Client-generated request ID for telemetry subscription */
492
+ requestId: z.ZodOptional<z.ZodString>;
679
493
  }, "strict", z.ZodTypeAny, {
680
494
  toolsConfig: {
681
495
  autoRouter?: {
682
- swapOrBridge?: "lifi" | undefined;
683
496
  defi?: {
684
497
  lending: "aave";
685
498
  supply?: undefined;
@@ -689,152 +502,141 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
689
502
  withdraw: "aave";
690
503
  lending?: undefined;
691
504
  } | undefined;
505
+ swapOrBridge?: "lifi" | "rubic" | undefined;
692
506
  } | undefined;
693
507
  };
694
508
  messages: import("@ai-sdk/provider-utils").ModelMessage[];
695
509
  userContext: {
696
510
  address: `0x${string}`;
511
+ signerWallet?: `0x${string}` | undefined;
697
512
  };
698
- prompt: {
699
- role: "user" | "assistant" | "tool" | "system";
700
- content: ({
513
+ languageModel: string;
514
+ personalityContext: {
515
+ channel: "text" | "voice";
516
+ };
517
+ prompt?: {
518
+ role: "user";
519
+ content: {
701
520
  type: "text";
702
521
  text: string;
703
- } | {
704
- type: "tool-call";
705
- toolName: "tokenTransfer";
706
- toolCallId: string;
707
- args: {
708
- fromAddress: string;
709
- toAddress: string;
710
- amount: string;
711
- token: string;
712
- chain: string;
713
- missingParameters?: string[] | undefined;
714
- humanFriendlyMessage?: string | undefined;
715
- };
716
- } | {
717
- type: "tool-call";
718
- toolName: "swapOrBridge";
719
- toolCallId: string;
720
- args: {
721
- fromAddress: string;
722
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
723
- fromToken: string;
724
- fromAmount: string;
725
- protocol: "lifi";
726
- toAddress?: string | undefined;
727
- missingParameters?: string[] | undefined;
728
- humanFriendlyMessage?: string | undefined;
729
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
730
- toToken?: string | undefined;
731
- toAmount?: string | undefined;
732
- };
733
- } | {
734
- type: "tool-call";
735
- toolName: "exchangeRate";
736
- toolCallId: string;
737
- args: {
738
- provider: "coinMarketCap";
739
- arguments: {
740
- baseCurrency: string;
741
- quoteCurrency: string;
742
- baseAmount?: string | undefined;
743
- quoteAmount?: string | undefined;
744
- }[];
745
- missingParameters?: string[] | undefined;
746
- humanFriendlyMessage?: string | undefined;
747
- };
748
- } | {
749
- type: "tool-call";
750
- toolName: "getWalletBalance";
751
- toolCallId: string;
752
- args: {
753
- address: string;
754
- provider: "moralis";
755
- token?: string | undefined;
756
- chain?: string | undefined;
757
- missingParameters?: string[] | undefined;
758
- humanFriendlyMessage?: string | undefined;
759
- };
760
- } | {
761
- type: "tool-call";
762
- toolName: "defiFetchListings";
763
- toolCallId: string;
764
- args: {
765
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
766
- protocol: "aave";
767
- missingParameters?: string[] | undefined;
768
- humanFriendlyMessage?: string | undefined;
769
- tokens?: string[] | undefined;
770
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
771
- limit?: number | undefined;
772
- };
773
- } | {
774
- type: "tool-call";
775
- toolName: "defiSupply";
776
- toolCallId: string;
777
- args: {
778
- amount: string;
779
- token: string;
780
- chain: string;
781
- protocol: "aave";
782
- userAddress: string;
783
- missingParameters?: string[] | undefined;
784
- humanFriendlyMessage?: string | undefined;
785
- };
786
- } | {
787
- type: "tool-call";
788
- toolName: "defiWithdraw";
789
- toolCallId: string;
790
- args: {
791
- amount: string;
792
- token: string;
793
- chain: string;
794
- protocol: "aave";
795
- userAddress: string;
796
- missingParameters?: string[] | undefined;
797
- humanFriendlyMessage?: string | undefined;
798
- };
799
- } | {
800
- type: "tool-call";
801
- toolName: "defiPositions";
802
- toolCallId: string;
803
- args: {
804
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
805
- protocol: "aave";
806
- userAddress: string;
807
- missingParameters?: string[] | undefined;
808
- humanFriendlyMessage?: string | undefined;
809
- tokens?: string[] | undefined;
810
- };
811
- } | {
812
- type: "tool-result";
813
- toolName: string;
814
- toolCallId: string;
815
- result?: unknown;
816
- } | {
817
- type: "tool-incomplete";
818
- toolName: string;
819
- toolCallId: string;
820
- missingParams: string[];
821
- humanReadableDescription: string;
822
- args?: unknown;
823
- } | {
824
- type: "tool-error";
825
- toolName: string;
826
- toolCallId: string;
827
- error: import("../types/actions/errors.js").ActionError<unknown>;
828
- })[];
522
+ }[];
523
+ } | undefined;
524
+ toolResults?: {
525
+ id: string;
526
+ name: string;
527
+ result?: 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;
539
+ }[] | undefined;
540
+ requestId?: string | undefined;
541
+ }, {
542
+ toolsConfig: {
543
+ autoRouter?: {
544
+ defi?: {
545
+ lending: "aave";
546
+ supply?: undefined;
547
+ withdraw?: undefined;
548
+ } | {
549
+ supply: "aave";
550
+ withdraw: "aave";
551
+ lending?: undefined;
552
+ } | undefined;
553
+ swapOrBridge?: "lifi" | "rubic" | undefined;
554
+ } | undefined;
555
+ };
556
+ messages: import("@ai-sdk/provider-utils").ModelMessage[];
557
+ userContext: {
558
+ address: string;
559
+ signerWallet?: string | undefined;
829
560
  };
561
+ languageModel: string;
562
+ prompt?: {
563
+ role: "user";
564
+ content: {
565
+ type: "text";
566
+ text: string;
567
+ }[];
568
+ } | undefined;
569
+ toolResults?: {
570
+ id: string;
571
+ name: string;
572
+ result?: 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;
584
+ }[] | undefined;
585
+ personalityContext?: {
586
+ channel: "text" | "voice";
587
+ } | undefined;
588
+ requestId?: string | undefined;
589
+ }>, {
590
+ toolsConfig: {
591
+ autoRouter?: {
592
+ defi?: {
593
+ lending: "aave";
594
+ supply?: undefined;
595
+ withdraw?: undefined;
596
+ } | {
597
+ supply: "aave";
598
+ withdraw: "aave";
599
+ lending?: undefined;
600
+ } | undefined;
601
+ swapOrBridge?: "lifi" | "rubic" | undefined;
602
+ } | undefined;
603
+ };
604
+ messages: import("@ai-sdk/provider-utils").ModelMessage[];
605
+ userContext: {
606
+ address: `0x${string}`;
607
+ signerWallet?: `0x${string}` | undefined;
608
+ };
609
+ languageModel: string;
830
610
  personalityContext: {
831
611
  channel: "text" | "voice";
832
612
  };
833
- languageModel?: string | undefined;
613
+ prompt?: {
614
+ role: "user";
615
+ content: {
616
+ type: "text";
617
+ text: string;
618
+ }[];
619
+ } | undefined;
620
+ toolResults?: {
621
+ id: string;
622
+ name: string;
623
+ result?: 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;
635
+ }[] | undefined;
636
+ requestId?: string | undefined;
834
637
  }, {
835
638
  toolsConfig: {
836
639
  autoRouter?: {
837
- swapOrBridge?: "lifi" | undefined;
838
640
  defi?: {
839
641
  lending: "aave";
840
642
  supply?: undefined;
@@ -844,147 +646,41 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
844
646
  withdraw: "aave";
845
647
  lending?: undefined;
846
648
  } | undefined;
649
+ swapOrBridge?: "lifi" | "rubic" | undefined;
847
650
  } | undefined;
848
651
  };
849
652
  messages: import("@ai-sdk/provider-utils").ModelMessage[];
850
653
  userContext: {
851
654
  address: string;
655
+ signerWallet?: string | undefined;
852
656
  };
853
- prompt: {
854
- role: "user" | "assistant" | "tool" | "system";
855
- content: ({
657
+ languageModel: string;
658
+ prompt?: {
659
+ role: "user";
660
+ content: {
856
661
  type: "text";
857
662
  text: string;
858
- } | {
859
- type: "tool-call";
860
- toolName: "tokenTransfer";
861
- toolCallId: string;
862
- args: {
863
- fromAddress: string;
864
- toAddress: string;
865
- amount: string;
866
- token: string;
867
- chain: string;
868
- missingParameters?: string[] | undefined;
869
- humanFriendlyMessage?: string | undefined;
870
- };
871
- } | {
872
- type: "tool-call";
873
- toolName: "swapOrBridge";
874
- toolCallId: string;
875
- args: {
876
- fromAddress: string;
877
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
878
- fromToken: string;
879
- fromAmount: string;
880
- protocol: "lifi";
881
- toAddress?: string | undefined;
882
- missingParameters?: string[] | undefined;
883
- humanFriendlyMessage?: string | undefined;
884
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
885
- toToken?: string | undefined;
886
- toAmount?: string | undefined;
887
- };
888
- } | {
889
- type: "tool-call";
890
- toolName: "exchangeRate";
891
- toolCallId: string;
892
- args: {
893
- provider: "coinMarketCap";
894
- arguments: {
895
- baseCurrency: string;
896
- quoteCurrency: string;
897
- baseAmount?: string | undefined;
898
- quoteAmount?: string | undefined;
899
- }[];
900
- missingParameters?: string[] | undefined;
901
- humanFriendlyMessage?: string | undefined;
902
- };
903
- } | {
904
- type: "tool-call";
905
- toolName: "getWalletBalance";
906
- toolCallId: string;
907
- args: {
908
- address: string;
909
- provider: "moralis";
910
- token?: string | undefined;
911
- chain?: string | undefined;
912
- missingParameters?: string[] | undefined;
913
- humanFriendlyMessage?: string | undefined;
914
- };
915
- } | {
916
- type: "tool-call";
917
- toolName: "defiFetchListings";
918
- toolCallId: string;
919
- args: {
920
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
921
- protocol: "aave";
922
- missingParameters?: string[] | undefined;
923
- humanFriendlyMessage?: string | undefined;
924
- tokens?: string[] | undefined;
925
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
926
- limit?: number | undefined;
927
- };
928
- } | {
929
- type: "tool-call";
930
- toolName: "defiSupply";
931
- toolCallId: string;
932
- args: {
933
- amount: string;
934
- token: string;
935
- chain: string;
936
- protocol: "aave";
937
- userAddress: string;
938
- missingParameters?: string[] | undefined;
939
- humanFriendlyMessage?: string | undefined;
940
- };
941
- } | {
942
- type: "tool-call";
943
- toolName: "defiWithdraw";
944
- toolCallId: string;
945
- args: {
946
- amount: string;
947
- token: string;
948
- chain: string;
949
- protocol: "aave";
950
- userAddress: string;
951
- missingParameters?: string[] | undefined;
952
- humanFriendlyMessage?: string | undefined;
953
- };
954
- } | {
955
- type: "tool-call";
956
- toolName: "defiPositions";
957
- toolCallId: string;
958
- args: {
959
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
960
- protocol: "aave";
961
- userAddress: string;
962
- missingParameters?: string[] | undefined;
963
- humanFriendlyMessage?: string | undefined;
964
- tokens?: string[] | undefined;
965
- };
966
- } | {
967
- type: "tool-result";
968
- toolName: string;
969
- toolCallId: string;
970
- result?: unknown;
971
- } | {
972
- type: "tool-incomplete";
973
- toolName: string;
974
- toolCallId: string;
975
- missingParams: string[];
976
- humanReadableDescription: string;
977
- args?: unknown;
978
- } | {
979
- type: "tool-error";
980
- toolName: string;
981
- toolCallId: string;
982
- error: import("../types/actions/errors.js").ActionError<unknown>;
983
- })[];
984
- };
985
- languageModel?: string | undefined;
663
+ }[];
664
+ } | undefined;
665
+ toolResults?: {
666
+ id: string;
667
+ name: string;
668
+ result?: 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;
680
+ }[] | undefined;
986
681
  personalityContext?: {
987
682
  channel: "text" | "voice";
988
683
  } | undefined;
684
+ requestId?: string | undefined;
989
685
  }>;
990
686
  //# sourceMappingURL=chatRequestBody.d.ts.map