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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) 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 +95 -579
  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 +511 -827
  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 +95 -930
  27. package/dist/schemas/messages.d.ts.map +1 -1
  28. package/dist/schemas/messages.js +10 -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 +1645 -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 +6 -6
  39. package/dist/tools/IllaToolError.d.ts +117 -0
  40. package/dist/tools/IllaToolError.d.ts.map +1 -0
  41. package/dist/tools/IllaToolError.js +147 -0
  42. package/dist/tools/IllaToolError.js.map +1 -0
  43. package/dist/tools/IllaToolOutcome.d.ts +131 -0
  44. package/dist/tools/IllaToolOutcome.d.ts.map +1 -0
  45. package/dist/tools/IllaToolOutcome.js +191 -0
  46. package/dist/tools/IllaToolOutcome.js.map +1 -0
  47. package/dist/tools/index.d.ts +3 -0
  48. package/dist/tools/index.d.ts.map +1 -0
  49. package/dist/tools/index.js +3 -0
  50. package/dist/tools/index.js.map +1 -0
  51. package/dist/types/actions/inputs.d.ts +5 -3
  52. package/dist/types/actions/inputs.d.ts.map +1 -1
  53. package/dist/types/actions/tools/{swapBridgeAction.d.ts → bridgeAction.d.ts} +4 -4
  54. package/dist/types/actions/tools/bridgeAction.d.ts.map +1 -0
  55. package/dist/types/actions/tools/bridgeAction.js +2 -0
  56. package/dist/types/actions/tools/bridgeAction.js.map +1 -0
  57. package/dist/types/actions/tools/defiFetchListingsAction.d.ts +1 -2
  58. package/dist/types/actions/tools/defiFetchListingsAction.d.ts.map +1 -1
  59. package/dist/types/actions/tools/defiFetchListingsAction.js +1 -1
  60. package/dist/types/actions/tools/defiFetchListingsAction.js.map +1 -1
  61. package/dist/types/actions/tools/defiPositionsAction.d.ts +1 -2
  62. package/dist/types/actions/tools/defiPositionsAction.d.ts.map +1 -1
  63. package/dist/types/actions/tools/defiPositionsAction.js +1 -1
  64. package/dist/types/actions/tools/defiPositionsAction.js.map +1 -1
  65. package/dist/types/actions/tools/defiSupplyAction.d.ts +1 -2
  66. package/dist/types/actions/tools/defiSupplyAction.d.ts.map +1 -1
  67. package/dist/types/actions/tools/defiSupplyAction.js +1 -1
  68. package/dist/types/actions/tools/defiSupplyAction.js.map +1 -1
  69. package/dist/types/actions/tools/defiWithdrawAction.d.ts +1 -2
  70. package/dist/types/actions/tools/defiWithdrawAction.d.ts.map +1 -1
  71. package/dist/types/actions/tools/defiWithdrawAction.js +1 -1
  72. package/dist/types/actions/tools/defiWithdrawAction.js.map +1 -1
  73. package/dist/types/actions/tools/exchangeRateAction.d.ts +1 -2
  74. package/dist/types/actions/tools/exchangeRateAction.d.ts.map +1 -1
  75. package/dist/types/actions/tools/exchangeRateAction.js +1 -1
  76. package/dist/types/actions/tools/exchangeRateAction.js.map +1 -1
  77. package/dist/types/actions/tools/getWalletBalanceAction.d.ts +2 -2
  78. package/dist/types/actions/tools/getWalletBalanceAction.d.ts.map +1 -1
  79. package/dist/types/actions/tools/getWalletBalanceAction.js +1 -1
  80. package/dist/types/actions/tools/getWalletBalanceAction.js.map +1 -1
  81. package/dist/types/actions/tools/index.d.ts +9 -3
  82. package/dist/types/actions/tools/index.d.ts.map +1 -1
  83. package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts +21 -0
  84. package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts.map +1 -0
  85. package/dist/types/actions/tools/predictionMarketsFetchAction.js +2 -0
  86. package/dist/types/actions/tools/predictionMarketsFetchAction.js.map +1 -0
  87. package/dist/types/actions/tools/swapAction.d.ts +16 -0
  88. package/dist/types/actions/tools/swapAction.d.ts.map +1 -0
  89. package/dist/types/actions/tools/swapAction.js +2 -0
  90. package/dist/types/actions/tools/swapAction.js.map +1 -0
  91. package/dist/types/actions/tools/tokenTransferAction.d.ts +1 -2
  92. package/dist/types/actions/tools/tokenTransferAction.d.ts.map +1 -1
  93. package/dist/types/actions/tools/tokenTransferAction.js +1 -1
  94. package/dist/types/actions/tools/tokenTransferAction.js.map +1 -1
  95. package/dist/types/index.d.ts +2 -0
  96. package/dist/types/index.d.ts.map +1 -1
  97. package/dist/types/index.js +2 -0
  98. package/dist/types/index.js.map +1 -1
  99. package/dist/types/messages.d.ts +3 -6
  100. package/dist/types/messages.d.ts.map +1 -1
  101. package/dist/types/messages.js +1 -1
  102. package/dist/types/messages.js.map +1 -1
  103. package/dist/types/streaming.d.ts +81 -0
  104. package/dist/types/streaming.d.ts.map +1 -0
  105. package/dist/types/streaming.js +2 -0
  106. package/dist/types/streaming.js.map +1 -0
  107. package/dist/types/telemetry.d.ts +139 -0
  108. package/dist/types/telemetry.d.ts.map +1 -0
  109. package/dist/types/telemetry.js +7 -0
  110. package/dist/types/telemetry.js.map +1 -0
  111. package/dist/utils/constants.d.ts +6 -4
  112. package/dist/utils/constants.d.ts.map +1 -1
  113. package/dist/utils/constants.js +18 -3
  114. package/dist/utils/constants.js.map +1 -1
  115. package/package.json +4 -4
  116. package/dist/types/actions/tools/swapBridgeAction.d.ts.map +0 -1
  117. package/dist/types/actions/tools/swapBridgeAction.js +0 -2
  118. 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<{
@@ -29,7 +29,6 @@ export declare const CoreApiChatBodyRequestSchema: 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 CoreApiChatBodyRequestSchema: 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 CoreApiChatBodyRequestSchema: 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 CoreApiChatBodyRequestSchema: 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,6 +75,7 @@ export declare const CoreApiChatBodyRequestSchema: 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">;
@@ -86,9 +86,9 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
86
86
  }, {
87
87
  address: string;
88
88
  }>;
89
- prompt: z.ZodObject<{
90
- role: z.ZodEnum<["user", "assistant", "tool", "system"]>;
91
- content: z.ZodArray<z.ZodUnion<[z.ZodObject<{
89
+ prompt: z.ZodOptional<z.ZodObject<{
90
+ role: z.ZodLiteral<"user">;
91
+ content: z.ZodArray<z.ZodObject<{
92
92
  type: z.ZodLiteral<"text">;
93
93
  text: z.ZodString;
94
94
  }, "strict", z.ZodTypeAny, {
@@ -97,578 +97,382 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
97
97
  }, {
98
98
  type: "text";
99
99
  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>;
100
+ }>, "many">;
101
+ }, "strict", z.ZodTypeAny, {
102
+ role: "user";
103
+ content: {
104
+ type: "text";
105
+ text: string;
106
+ }[];
107
+ }, {
108
+ role: "user";
109
+ content: {
110
+ type: "text";
111
+ text: string;
112
+ }[];
113
+ }>>;
114
+ toolResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
115
+ id: z.ZodString;
116
+ name: z.ZodString;
117
+ result: z.ZodOptional<z.ZodUnknown>;
118
+ error: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
119
+ type: z.ZodLiteral<"input">;
120
+ errors: z.ZodArray<z.ZodObject<{
121
+ path: z.ZodString;
122
+ message: z.ZodString;
123
+ }, "strict", z.ZodTypeAny, {
124
+ path: string;
125
+ message: string;
126
+ }, {
127
+ path: string;
128
+ message: string;
129
+ }>, "many">;
270
130
  }, "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
- };
131
+ type: "input";
132
+ errors: {
133
+ path: string;
134
+ message: string;
135
+ }[];
283
136
  }, {
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
- };
137
+ type: "input";
138
+ errors: {
139
+ path: string;
140
+ message: string;
141
+ }[];
296
142
  }>, 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>;
143
+ type: z.ZodLiteral<"execution">;
144
+ message: z.ZodString;
145
+ details: z.ZodOptional<z.ZodUnknown>;
301
146
  }, "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
- };
147
+ message: string;
148
+ type: "execution";
149
+ details?: unknown;
314
150
  }, {
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>;
151
+ message: string;
152
+ type: "execution";
153
+ details?: unknown;
154
+ }>]>>;
155
+ }, "strict", z.ZodTypeAny, {
156
+ id: string;
157
+ name: string;
158
+ result?: unknown;
159
+ error?: {
160
+ type: "input";
161
+ errors: {
162
+ path: string;
163
+ message: string;
164
+ }[];
165
+ } | {
166
+ message: string;
167
+ type: "execution";
168
+ details?: unknown;
169
+ } | undefined;
170
+ }, {
171
+ id: string;
172
+ name: string;
173
+ result?: unknown;
174
+ error?: {
175
+ type: "input";
176
+ errors: {
177
+ path: string;
178
+ message: string;
179
+ }[];
180
+ } | {
181
+ message: string;
182
+ type: "execution";
183
+ details?: unknown;
184
+ } | undefined;
185
+ }>, "many">>;
186
+ languageModel: z.ZodString;
187
+ personalityContext: z.ZodDefault<z.ZodOptional<z.ZodObject<{
188
+ channel: z.ZodEnum<["voice", "text"]>;
189
+ }, "strip", z.ZodTypeAny, {
190
+ channel: "text" | "voice";
191
+ }, {
192
+ channel: "text" | "voice";
193
+ }>>>;
194
+ /** Client-generated request ID for telemetry subscription */
195
+ requestId: z.ZodOptional<z.ZodString>;
196
+ }, "strict", z.ZodTypeAny, {
197
+ toolsConfig: {
198
+ autoRouter?: {
199
+ defi?: {
200
+ lending: "aave";
201
+ supply?: undefined;
202
+ withdraw?: undefined;
203
+ } | {
204
+ supply: "aave";
205
+ withdraw: "aave";
206
+ lending?: undefined;
207
+ } | undefined;
208
+ swapOrBridge?: "lifi" | undefined;
209
+ } | undefined;
210
+ };
211
+ messages: import("@ai-sdk/provider-utils").ModelMessage[];
212
+ userContext: {
213
+ address: `0x${string}`;
214
+ };
215
+ languageModel: string;
216
+ personalityContext: {
217
+ channel: "text" | "voice";
218
+ };
219
+ prompt?: {
220
+ role: "user";
221
+ content: {
222
+ type: "text";
223
+ text: string;
224
+ }[];
225
+ } | undefined;
226
+ toolResults?: {
227
+ id: string;
228
+ name: string;
229
+ result?: unknown;
230
+ error?: {
231
+ type: "input";
232
+ errors: {
233
+ path: string;
234
+ message: string;
235
+ }[];
236
+ } | {
237
+ message: string;
238
+ type: "execution";
239
+ details?: unknown;
240
+ } | undefined;
241
+ }[] | undefined;
242
+ requestId?: string | undefined;
243
+ }, {
244
+ toolsConfig: {
245
+ autoRouter?: {
246
+ defi?: {
247
+ lending: "aave";
248
+ supply?: undefined;
249
+ withdraw?: undefined;
250
+ } | {
251
+ supply: "aave";
252
+ withdraw: "aave";
253
+ lending?: undefined;
254
+ } | undefined;
255
+ swapOrBridge?: "lifi" | undefined;
256
+ } | undefined;
257
+ };
258
+ messages: import("@ai-sdk/provider-utils").ModelMessage[];
259
+ userContext: {
260
+ address: string;
261
+ };
262
+ languageModel: string;
263
+ prompt?: {
264
+ role: "user";
265
+ content: {
266
+ type: "text";
267
+ text: string;
268
+ }[];
269
+ } | undefined;
270
+ toolResults?: {
271
+ id: string;
272
+ name: string;
273
+ result?: unknown;
274
+ error?: {
275
+ type: "input";
276
+ errors: {
277
+ path: string;
278
+ message: string;
279
+ }[];
280
+ } | {
281
+ message: string;
282
+ type: "execution";
283
+ details?: unknown;
284
+ } | undefined;
285
+ }[] | undefined;
286
+ personalityContext?: {
287
+ channel: "text" | "voice";
288
+ } | undefined;
289
+ requestId?: string | undefined;
290
+ }>;
291
+ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
292
+ toolsConfig: z.ZodObject<{
293
+ autoRouter: z.ZodOptional<z.ZodObject<{
294
+ defi: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
295
+ lending: z.ZodEnum<["aave"]>;
296
+ supply: z.ZodOptional<z.ZodNever>;
297
+ withdraw: z.ZodOptional<z.ZodNever>;
298
+ }, "strict", z.ZodTypeAny, {
299
+ lending: "aave";
300
+ supply?: undefined;
301
+ withdraw?: undefined;
302
+ }, {
303
+ lending: "aave";
304
+ supply?: undefined;
305
+ withdraw?: undefined;
306
+ }>, z.ZodObject<{
307
+ lending: z.ZodOptional<z.ZodNever>;
308
+ supply: z.ZodEnum<["aave"]>;
309
+ withdraw: z.ZodEnum<["aave"]>;
310
+ }, "strict", z.ZodTypeAny, {
311
+ supply: "aave";
312
+ withdraw: "aave";
313
+ lending?: undefined;
314
+ }, {
315
+ supply: "aave";
316
+ withdraw: "aave";
317
+ lending?: undefined;
318
+ }>]>>;
319
+ swapOrBridge: z.ZodOptional<z.ZodEnum<["lifi"]>>;
332
320
  }, "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
- };
321
+ defi?: {
322
+ lending: "aave";
323
+ supply?: undefined;
324
+ withdraw?: undefined;
325
+ } | {
326
+ supply: "aave";
327
+ withdraw: "aave";
328
+ lending?: undefined;
329
+ } | undefined;
330
+ swapOrBridge?: "lifi" | undefined;
344
331
  }, {
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;
332
+ defi?: {
333
+ lending: "aave";
334
+ supply?: undefined;
335
+ withdraw?: undefined;
336
+ } | {
337
+ supply: "aave";
338
+ withdraw: "aave";
339
+ lending?: undefined;
340
+ } | undefined;
341
+ swapOrBridge?: "lifi" | undefined;
342
+ }>>;
343
+ }, "strict", z.ZodTypeAny, {
344
+ autoRouter?: {
345
+ defi?: {
346
+ lending: "aave";
347
+ supply?: undefined;
348
+ withdraw?: undefined;
349
+ } | {
350
+ supply: "aave";
351
+ withdraw: "aave";
352
+ lending?: undefined;
353
+ } | undefined;
354
+ swapOrBridge?: "lifi" | undefined;
355
+ } | undefined;
356
+ }, {
357
+ autoRouter?: {
358
+ defi?: {
359
+ lending: "aave";
360
+ supply?: undefined;
361
+ withdraw?: undefined;
362
+ } | {
363
+ supply: "aave";
364
+ withdraw: "aave";
365
+ lending?: undefined;
366
+ } | undefined;
367
+ swapOrBridge?: "lifi" | undefined;
368
+ } | undefined;
369
+ }>;
370
+ messages: z.ZodArray<z.ZodType<import("@ai-sdk/provider-utils").ModelMessage, z.ZodTypeDef, import("@ai-sdk/provider-utils").ModelMessage>, "many">;
371
+ userContext: z.ZodObject<{
372
+ address: z.ZodEffects<z.ZodString, `0x${string}`, string>;
373
+ }, "strict", z.ZodTypeAny, {
374
+ address: `0x${string}`;
375
+ }, {
376
+ address: string;
377
+ }>;
378
+ prompt: z.ZodOptional<z.ZodObject<{
379
+ role: z.ZodLiteral<"user">;
380
+ content: z.ZodArray<z.ZodObject<{
381
+ type: z.ZodLiteral<"text">;
382
+ text: z.ZodString;
361
383
  }, "strict", z.ZodTypeAny, {
362
- type: "tool-result";
363
- toolName: string;
364
- toolCallId: string;
365
- result?: unknown;
384
+ type: "text";
385
+ text: string;
366
386
  }, {
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;
387
+ type: "text";
388
+ text: string;
389
+ }>, "many">;
390
+ }, "strict", z.ZodTypeAny, {
391
+ role: "user";
392
+ content: {
393
+ type: "text";
394
+ text: string;
395
+ }[];
396
+ }, {
397
+ role: "user";
398
+ content: {
399
+ type: "text";
400
+ text: string;
401
+ }[];
402
+ }>>;
403
+ toolResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
404
+ id: z.ZodString;
405
+ name: z.ZodString;
406
+ result: z.ZodOptional<z.ZodUnknown>;
407
+ error: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
408
+ type: z.ZodLiteral<"input">;
409
+ errors: z.ZodArray<z.ZodObject<{
410
+ path: z.ZodString;
411
+ message: z.ZodString;
412
+ }, "strict", z.ZodTypeAny, {
413
+ path: string;
414
+ message: string;
415
+ }, {
416
+ path: string;
417
+ message: string;
418
+ }>, "many">;
378
419
  }, "strict", z.ZodTypeAny, {
379
- type: "tool-incomplete";
380
- toolName: string;
381
- toolCallId: string;
382
- missingParams: string[];
383
- humanReadableDescription: string;
384
- args?: unknown;
420
+ type: "input";
421
+ errors: {
422
+ path: string;
423
+ message: string;
424
+ }[];
385
425
  }, {
386
- type: "tool-incomplete";
387
- toolName: string;
388
- toolCallId: string;
389
- missingParams: string[];
390
- humanReadableDescription: string;
391
- args?: unknown;
426
+ type: "input";
427
+ errors: {
428
+ path: string;
429
+ message: string;
430
+ }[];
392
431
  }>, 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>>;
432
+ type: z.ZodLiteral<"execution">;
433
+ message: z.ZodString;
434
+ details: z.ZodOptional<z.ZodUnknown>;
397
435
  }, "strict", z.ZodTypeAny, {
398
- type: "tool-error";
399
- toolName: string;
400
- toolCallId: string;
401
- error: import("../types/actions/errors.js").ActionError<unknown>;
436
+ message: string;
437
+ type: "execution";
438
+ details?: unknown;
402
439
  }, {
403
- type: "tool-error";
404
- toolName: string;
405
- toolCallId: string;
406
- error: import("../types/actions/errors.js").ActionError<unknown>;
407
- }>]>, "many">;
440
+ message: string;
441
+ type: "execution";
442
+ details?: unknown;
443
+ }>]>>;
408
444
  }, "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
- })[];
445
+ id: string;
446
+ name: string;
447
+ result?: unknown;
448
+ error?: {
449
+ type: "input";
450
+ errors: {
451
+ path: string;
452
+ message: string;
453
+ }[];
454
+ } | {
455
+ message: string;
456
+ type: "execution";
457
+ details?: unknown;
458
+ } | undefined;
539
459
  }, {
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>;
460
+ id: string;
461
+ name: string;
462
+ result?: unknown;
463
+ error?: {
464
+ type: "input";
465
+ errors: {
466
+ path: string;
467
+ message: string;
468
+ }[];
469
+ } | {
470
+ message: string;
471
+ type: "execution";
472
+ details?: unknown;
473
+ } | undefined;
474
+ }>, "many">>;
475
+ languageModel: z.ZodString;
672
476
  personalityContext: z.ZodDefault<z.ZodOptional<z.ZodObject<{
673
477
  channel: z.ZodEnum<["voice", "text"]>;
674
478
  }, "strip", z.ZodTypeAny, {
@@ -676,10 +480,11 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
676
480
  }, {
677
481
  channel: "text" | "voice";
678
482
  }>>>;
483
+ /** Client-generated request ID for telemetry subscription */
484
+ requestId: z.ZodOptional<z.ZodString>;
679
485
  }, "strict", z.ZodTypeAny, {
680
486
  toolsConfig: {
681
487
  autoRouter?: {
682
- swapOrBridge?: "lifi" | undefined;
683
488
  defi?: {
684
489
  lending: "aave";
685
490
  supply?: undefined;
@@ -689,152 +494,138 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
689
494
  withdraw: "aave";
690
495
  lending?: undefined;
691
496
  } | undefined;
497
+ swapOrBridge?: "lifi" | undefined;
692
498
  } | undefined;
693
499
  };
694
500
  messages: import("@ai-sdk/provider-utils").ModelMessage[];
695
501
  userContext: {
696
502
  address: `0x${string}`;
697
503
  };
698
- prompt: {
699
- role: "user" | "assistant" | "tool" | "system";
700
- content: ({
504
+ languageModel: string;
505
+ personalityContext: {
506
+ channel: "text" | "voice";
507
+ };
508
+ prompt?: {
509
+ role: "user";
510
+ content: {
701
511
  type: "text";
702
512
  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
- })[];
513
+ }[];
514
+ } | undefined;
515
+ toolResults?: {
516
+ id: string;
517
+ name: string;
518
+ result?: unknown;
519
+ error?: {
520
+ type: "input";
521
+ errors: {
522
+ path: string;
523
+ message: string;
524
+ }[];
525
+ } | {
526
+ message: string;
527
+ type: "execution";
528
+ details?: unknown;
529
+ } | undefined;
530
+ }[] | undefined;
531
+ requestId?: string | undefined;
532
+ }, {
533
+ toolsConfig: {
534
+ autoRouter?: {
535
+ defi?: {
536
+ lending: "aave";
537
+ supply?: undefined;
538
+ withdraw?: undefined;
539
+ } | {
540
+ supply: "aave";
541
+ withdraw: "aave";
542
+ lending?: undefined;
543
+ } | undefined;
544
+ swapOrBridge?: "lifi" | undefined;
545
+ } | undefined;
546
+ };
547
+ messages: import("@ai-sdk/provider-utils").ModelMessage[];
548
+ userContext: {
549
+ address: string;
550
+ };
551
+ languageModel: string;
552
+ prompt?: {
553
+ role: "user";
554
+ content: {
555
+ type: "text";
556
+ text: string;
557
+ }[];
558
+ } | undefined;
559
+ toolResults?: {
560
+ id: string;
561
+ name: string;
562
+ result?: unknown;
563
+ error?: {
564
+ type: "input";
565
+ errors: {
566
+ path: string;
567
+ message: string;
568
+ }[];
569
+ } | {
570
+ message: string;
571
+ type: "execution";
572
+ details?: unknown;
573
+ } | undefined;
574
+ }[] | undefined;
575
+ personalityContext?: {
576
+ channel: "text" | "voice";
577
+ } | undefined;
578
+ requestId?: string | undefined;
579
+ }>, {
580
+ toolsConfig: {
581
+ autoRouter?: {
582
+ defi?: {
583
+ lending: "aave";
584
+ supply?: undefined;
585
+ withdraw?: undefined;
586
+ } | {
587
+ supply: "aave";
588
+ withdraw: "aave";
589
+ lending?: undefined;
590
+ } | undefined;
591
+ swapOrBridge?: "lifi" | undefined;
592
+ } | undefined;
829
593
  };
594
+ messages: import("@ai-sdk/provider-utils").ModelMessage[];
595
+ userContext: {
596
+ address: `0x${string}`;
597
+ };
598
+ languageModel: string;
830
599
  personalityContext: {
831
600
  channel: "text" | "voice";
832
601
  };
833
- languageModel?: string | undefined;
602
+ prompt?: {
603
+ role: "user";
604
+ content: {
605
+ type: "text";
606
+ text: string;
607
+ }[];
608
+ } | undefined;
609
+ toolResults?: {
610
+ id: string;
611
+ name: string;
612
+ result?: unknown;
613
+ error?: {
614
+ type: "input";
615
+ errors: {
616
+ path: string;
617
+ message: string;
618
+ }[];
619
+ } | {
620
+ message: string;
621
+ type: "execution";
622
+ details?: unknown;
623
+ } | undefined;
624
+ }[] | undefined;
625
+ requestId?: string | undefined;
834
626
  }, {
835
627
  toolsConfig: {
836
628
  autoRouter?: {
837
- swapOrBridge?: "lifi" | undefined;
838
629
  defi?: {
839
630
  lending: "aave";
840
631
  supply?: undefined;
@@ -844,147 +635,40 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
844
635
  withdraw: "aave";
845
636
  lending?: undefined;
846
637
  } | undefined;
638
+ swapOrBridge?: "lifi" | undefined;
847
639
  } | undefined;
848
640
  };
849
641
  messages: import("@ai-sdk/provider-utils").ModelMessage[];
850
642
  userContext: {
851
643
  address: string;
852
644
  };
853
- prompt: {
854
- role: "user" | "assistant" | "tool" | "system";
855
- content: ({
645
+ languageModel: string;
646
+ prompt?: {
647
+ role: "user";
648
+ content: {
856
649
  type: "text";
857
650
  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;
651
+ }[];
652
+ } | undefined;
653
+ toolResults?: {
654
+ id: string;
655
+ name: string;
656
+ result?: unknown;
657
+ error?: {
658
+ type: "input";
659
+ errors: {
660
+ path: string;
661
+ message: string;
662
+ }[];
663
+ } | {
664
+ message: string;
665
+ type: "execution";
666
+ details?: unknown;
667
+ } | undefined;
668
+ }[] | undefined;
986
669
  personalityContext?: {
987
670
  channel: "text" | "voice";
988
671
  } | undefined;
672
+ requestId?: string | undefined;
989
673
  }>;
990
674
  //# sourceMappingURL=chatRequestBody.d.ts.map