@illalabs/interfaces 0.3.0-canary.b7f69a88 → 0.3.0-canary.dba8c254

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 (106) 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 +79 -648
  10. package/dist/schemas/chatContext.d.ts.map +1 -1
  11. package/dist/schemas/chatRequestBody.d.ts +256 -2172
  12. package/dist/schemas/chatRequestBody.d.ts.map +1 -1
  13. package/dist/schemas/chatRequestBody.js +5 -3
  14. package/dist/schemas/chatRequestBody.js.map +1 -1
  15. package/dist/schemas/executionCheckerQueryParams.d.ts +2 -2
  16. package/dist/schemas/illaTools.d.ts +266 -0
  17. package/dist/schemas/illaTools.d.ts.map +1 -0
  18. package/dist/schemas/illaTools.js +58 -0
  19. package/dist/schemas/illaTools.js.map +1 -0
  20. package/dist/schemas/index.d.ts +2 -0
  21. package/dist/schemas/index.d.ts.map +1 -1
  22. package/dist/schemas/index.js +2 -0
  23. package/dist/schemas/index.js.map +1 -1
  24. package/dist/schemas/messages.d.ts +95 -1037
  25. package/dist/schemas/messages.d.ts.map +1 -1
  26. package/dist/schemas/messages.js +10 -121
  27. package/dist/schemas/messages.js.map +1 -1
  28. package/dist/schemas/modelContext.d.ts +2 -14
  29. package/dist/schemas/modelContext.d.ts.map +1 -1
  30. package/dist/schemas/modelContext.js +1 -17
  31. package/dist/schemas/modelContext.js.map +1 -1
  32. package/dist/schemas/telemetryEvents.d.ts +1645 -0
  33. package/dist/schemas/telemetryEvents.d.ts.map +1 -0
  34. package/dist/schemas/telemetryEvents.js +236 -0
  35. package/dist/schemas/telemetryEvents.js.map +1 -0
  36. package/dist/tools/IllaToolError.d.ts +117 -0
  37. package/dist/tools/IllaToolError.d.ts.map +1 -0
  38. package/dist/tools/IllaToolError.js +147 -0
  39. package/dist/tools/IllaToolError.js.map +1 -0
  40. package/dist/tools/IllaToolOutcome.d.ts +131 -0
  41. package/dist/tools/IllaToolOutcome.d.ts.map +1 -0
  42. package/dist/tools/IllaToolOutcome.js +191 -0
  43. package/dist/tools/IllaToolOutcome.js.map +1 -0
  44. package/dist/tools/index.d.ts +3 -0
  45. package/dist/tools/index.d.ts.map +1 -0
  46. package/dist/tools/index.js +3 -0
  47. package/dist/tools/index.js.map +1 -0
  48. package/dist/types/actions/inputs.d.ts +3 -2
  49. package/dist/types/actions/inputs.d.ts.map +1 -1
  50. package/dist/types/actions/tools/bridgeAction.d.ts +1 -1
  51. package/dist/types/actions/tools/bridgeAction.d.ts.map +1 -1
  52. package/dist/types/actions/tools/defiFetchListingsAction.d.ts +1 -2
  53. package/dist/types/actions/tools/defiFetchListingsAction.d.ts.map +1 -1
  54. package/dist/types/actions/tools/defiFetchListingsAction.js +1 -1
  55. package/dist/types/actions/tools/defiFetchListingsAction.js.map +1 -1
  56. package/dist/types/actions/tools/defiPositionsAction.d.ts +1 -2
  57. package/dist/types/actions/tools/defiPositionsAction.d.ts.map +1 -1
  58. package/dist/types/actions/tools/defiPositionsAction.js +1 -1
  59. package/dist/types/actions/tools/defiPositionsAction.js.map +1 -1
  60. package/dist/types/actions/tools/defiSupplyAction.d.ts +1 -2
  61. package/dist/types/actions/tools/defiSupplyAction.d.ts.map +1 -1
  62. package/dist/types/actions/tools/defiSupplyAction.js +1 -1
  63. package/dist/types/actions/tools/defiSupplyAction.js.map +1 -1
  64. package/dist/types/actions/tools/defiWithdrawAction.d.ts +1 -2
  65. package/dist/types/actions/tools/defiWithdrawAction.d.ts.map +1 -1
  66. package/dist/types/actions/tools/defiWithdrawAction.js +1 -1
  67. package/dist/types/actions/tools/defiWithdrawAction.js.map +1 -1
  68. package/dist/types/actions/tools/exchangeRateAction.d.ts +1 -2
  69. package/dist/types/actions/tools/exchangeRateAction.d.ts.map +1 -1
  70. package/dist/types/actions/tools/exchangeRateAction.js +1 -1
  71. package/dist/types/actions/tools/exchangeRateAction.js.map +1 -1
  72. package/dist/types/actions/tools/getWalletBalanceAction.d.ts +2 -2
  73. package/dist/types/actions/tools/getWalletBalanceAction.d.ts.map +1 -1
  74. package/dist/types/actions/tools/getWalletBalanceAction.js +1 -1
  75. package/dist/types/actions/tools/getWalletBalanceAction.js.map +1 -1
  76. package/dist/types/actions/tools/index.d.ts +3 -0
  77. package/dist/types/actions/tools/index.d.ts.map +1 -1
  78. package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts +21 -0
  79. package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts.map +1 -0
  80. package/dist/types/actions/tools/predictionMarketsFetchAction.js +2 -0
  81. package/dist/types/actions/tools/predictionMarketsFetchAction.js.map +1 -0
  82. package/dist/types/actions/tools/tokenTransferAction.d.ts +1 -2
  83. package/dist/types/actions/tools/tokenTransferAction.d.ts.map +1 -1
  84. package/dist/types/actions/tools/tokenTransferAction.js +1 -1
  85. package/dist/types/actions/tools/tokenTransferAction.js.map +1 -1
  86. package/dist/types/index.d.ts +2 -0
  87. package/dist/types/index.d.ts.map +1 -1
  88. package/dist/types/index.js +2 -0
  89. package/dist/types/index.js.map +1 -1
  90. package/dist/types/messages.d.ts +3 -6
  91. package/dist/types/messages.d.ts.map +1 -1
  92. package/dist/types/messages.js +1 -1
  93. package/dist/types/messages.js.map +1 -1
  94. package/dist/types/streaming.d.ts +81 -0
  95. package/dist/types/streaming.d.ts.map +1 -0
  96. package/dist/types/streaming.js +2 -0
  97. package/dist/types/streaming.js.map +1 -0
  98. package/dist/types/telemetry.d.ts +139 -0
  99. package/dist/types/telemetry.d.ts.map +1 -0
  100. package/dist/types/telemetry.js +7 -0
  101. package/dist/types/telemetry.js.map +1 -0
  102. package/dist/utils/constants.d.ts +3 -1
  103. package/dist/utils/constants.d.ts.map +1 -1
  104. package/dist/utils/constants.js +2 -0
  105. package/dist/utils/constants.js.map +1 -1
  106. package/package.json +4 -4
@@ -87,8 +87,8 @@ export declare const CoreApiChatBodyRequestBaseSchema: z.ZodObject<{
87
87
  address: string;
88
88
  }>;
89
89
  prompt: z.ZodOptional<z.ZodObject<{
90
- role: z.ZodEnum<["user", "assistant", "tool", "system"]>;
91
- content: z.ZodArray<z.ZodUnion<[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,661 +97,91 @@ export declare const CoreApiChatBodyRequestBaseSchema: 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<"swap">;
135
- args: z.ZodType<import("../external.js").SwapActionInput>;
136
- }, "strict", z.ZodTypeAny, {
137
- type: "tool-call";
138
- toolName: "swap";
139
- toolCallId: string;
140
- args: {
141
- fromAddress: string;
142
- fromToken: string;
143
- fromAmount: string;
144
- protocol: "lifi";
145
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
146
- toToken?: string | undefined;
147
- toAddress?: string | undefined;
148
- toAmount?: string | undefined;
149
- missingParameters?: string[] | undefined;
150
- humanFriendlyMessage?: string | undefined;
151
- };
152
- }, {
153
- type: "tool-call";
154
- toolName: "swap";
155
- toolCallId: string;
156
- args: {
157
- fromAddress: string;
158
- fromToken: string;
159
- fromAmount: string;
160
- protocol: "lifi";
161
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
162
- toToken?: string | undefined;
163
- toAddress?: string | undefined;
164
- toAmount?: string | undefined;
165
- missingParameters?: string[] | undefined;
166
- humanFriendlyMessage?: string | undefined;
167
- };
168
- }>, z.ZodObject<{
169
- type: z.ZodLiteral<"tool-call">;
170
- toolCallId: z.ZodString;
171
- toolName: z.ZodLiteral<"bridge">;
172
- args: z.ZodType<import("../external.js").BridgeActionInput>;
173
- }, "strict", z.ZodTypeAny, {
174
- type: "tool-call";
175
- toolName: "bridge";
176
- toolCallId: string;
177
- args: {
178
- fromAddress: string;
179
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
180
- fromToken: string;
181
- fromAmount: string;
182
- protocol: "lifi";
183
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
184
- toToken?: string | undefined;
185
- toAddress?: string | undefined;
186
- toAmount?: string | undefined;
187
- missingParameters?: string[] | undefined;
188
- humanFriendlyMessage?: string | undefined;
189
- };
190
- }, {
191
- type: "tool-call";
192
- toolName: "bridge";
193
- toolCallId: string;
194
- args: {
195
- fromAddress: string;
196
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
197
- fromToken: string;
198
- fromAmount: string;
199
- protocol: "lifi";
200
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
201
- toToken?: string | undefined;
202
- toAddress?: string | undefined;
203
- toAmount?: string | undefined;
204
- missingParameters?: string[] | undefined;
205
- humanFriendlyMessage?: string | undefined;
206
- };
207
- }>, z.ZodObject<{
208
- type: z.ZodLiteral<"tool-call">;
209
- toolCallId: z.ZodString;
210
- toolName: z.ZodLiteral<"exchangeRate">;
211
- args: z.ZodType<import("../external.js").ExchangeRateActionInput>;
212
- }, "strict", z.ZodTypeAny, {
213
- type: "tool-call";
214
- toolName: "exchangeRate";
215
- toolCallId: string;
216
- args: {
217
- provider: "coinMarketCap";
218
- arguments: {
219
- baseCurrency: string;
220
- quoteCurrency: string;
221
- baseAmount?: string | undefined;
222
- quoteAmount?: string | undefined;
223
- }[];
224
- missingParameters?: string[] | undefined;
225
- humanFriendlyMessage?: string | undefined;
226
- };
227
- }, {
228
- type: "tool-call";
229
- toolName: "exchangeRate";
230
- toolCallId: string;
231
- args: {
232
- provider: "coinMarketCap";
233
- arguments: {
234
- baseCurrency: string;
235
- quoteCurrency: string;
236
- baseAmount?: string | undefined;
237
- quoteAmount?: string | undefined;
238
- }[];
239
- missingParameters?: string[] | undefined;
240
- humanFriendlyMessage?: string | undefined;
241
- };
242
- }>, z.ZodObject<{
243
- type: z.ZodLiteral<"tool-call">;
244
- toolCallId: z.ZodString;
245
- toolName: z.ZodLiteral<"getWalletBalance">;
246
- args: z.ZodType<import("../external.js").GetWalletBalanceActionInput>;
247
- }, "strict", z.ZodTypeAny, {
248
- type: "tool-call";
249
- toolName: "getWalletBalance";
250
- toolCallId: string;
251
- args: {
252
- address: string;
253
- provider: "moralis";
254
- missingParameters?: string[] | undefined;
255
- humanFriendlyMessage?: string | undefined;
256
- token?: string | undefined;
257
- chain?: string | undefined;
258
- };
259
- }, {
260
- type: "tool-call";
261
- toolName: "getWalletBalance";
262
- toolCallId: string;
263
- args: {
264
- address: string;
265
- provider: "moralis";
266
- missingParameters?: string[] | undefined;
267
- humanFriendlyMessage?: string | undefined;
268
- token?: string | undefined;
269
- chain?: string | undefined;
270
- };
271
- }>, z.ZodObject<{
272
- type: z.ZodLiteral<"tool-call">;
273
- toolCallId: z.ZodString;
274
- toolName: z.ZodLiteral<"defiFetchListings">;
275
- args: z.ZodType<import("../external.js").DefiFetchListingsActionInput>;
276
- }, "strict", z.ZodTypeAny, {
277
- type: "tool-call";
278
- toolName: "defiFetchListings";
279
- toolCallId: string;
280
- args: {
281
- protocol: "aave";
282
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
283
- missingParameters?: string[] | undefined;
284
- humanFriendlyMessage?: string | undefined;
285
- tokens?: string[] | undefined;
286
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
287
- limit?: number | undefined;
288
- };
289
- }, {
290
- type: "tool-call";
291
- toolName: "defiFetchListings";
292
- toolCallId: string;
293
- args: {
294
- protocol: "aave";
295
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
296
- missingParameters?: string[] | undefined;
297
- humanFriendlyMessage?: string | undefined;
298
- tokens?: string[] | undefined;
299
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
300
- limit?: number | undefined;
301
- };
302
- }>, z.ZodObject<{
303
- type: z.ZodLiteral<"tool-call">;
304
- toolCallId: z.ZodString;
305
- toolName: z.ZodLiteral<"defiSupply">;
306
- args: z.ZodType<import("../external.js").DefiSupplyActionInput>;
307
- }, "strict", z.ZodTypeAny, {
308
- type: "tool-call";
309
- toolName: "defiSupply";
310
- toolCallId: string;
311
- args: {
312
- protocol: "aave";
313
- amount: string;
314
- token: string;
315
- chain: string;
316
- userAddress: string;
317
- missingParameters?: string[] | undefined;
318
- humanFriendlyMessage?: string | undefined;
319
- };
320
- }, {
321
- type: "tool-call";
322
- toolName: "defiSupply";
323
- toolCallId: string;
324
- args: {
325
- protocol: "aave";
326
- amount: string;
327
- token: string;
328
- chain: string;
329
- userAddress: string;
330
- missingParameters?: string[] | undefined;
331
- humanFriendlyMessage?: string | undefined;
332
- };
333
- }>, z.ZodObject<{
334
- type: z.ZodLiteral<"tool-call">;
335
- toolCallId: z.ZodString;
336
- toolName: z.ZodLiteral<"defiWithdraw">;
337
- args: z.ZodType<import("../external.js").DefiWithdrawActionInput>;
338
- }, "strict", z.ZodTypeAny, {
339
- type: "tool-call";
340
- toolName: "defiWithdraw";
341
- toolCallId: string;
342
- args: {
343
- protocol: "aave";
344
- amount: string;
345
- token: string;
346
- chain: string;
347
- userAddress: string;
348
- missingParameters?: string[] | undefined;
349
- humanFriendlyMessage?: string | undefined;
350
- };
351
- }, {
352
- type: "tool-call";
353
- toolName: "defiWithdraw";
354
- toolCallId: string;
355
- args: {
356
- protocol: "aave";
357
- amount: string;
358
- token: string;
359
- chain: string;
360
- userAddress: string;
361
- missingParameters?: string[] | undefined;
362
- humanFriendlyMessage?: string | undefined;
363
- };
364
- }>, z.ZodObject<{
365
- type: z.ZodLiteral<"tool-call">;
366
- toolCallId: z.ZodString;
367
- toolName: z.ZodLiteral<"defiPositions">;
368
- args: z.ZodType<import("../external.js").DefiPositionsActionInput>;
369
- }, "strict", z.ZodTypeAny, {
370
- type: "tool-call";
371
- toolName: "defiPositions";
372
- toolCallId: string;
373
- args: {
374
- protocol: "aave";
375
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
376
- userAddress: string;
377
- missingParameters?: string[] | undefined;
378
- humanFriendlyMessage?: string | undefined;
379
- tokens?: string[] | undefined;
380
- };
381
- }, {
382
- type: "tool-call";
383
- toolName: "defiPositions";
384
- toolCallId: string;
385
- args: {
386
- protocol: "aave";
387
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
388
- userAddress: string;
389
- missingParameters?: string[] | undefined;
390
- humanFriendlyMessage?: string | undefined;
391
- tokens?: string[] | undefined;
392
- };
393
- }>]>, z.ZodObject<{
394
- type: z.ZodLiteral<"tool-result">;
395
- toolCallId: z.ZodString;
396
- toolName: z.ZodString;
397
- result: z.ZodUnknown;
398
- }, "strict", z.ZodTypeAny, {
399
- type: "tool-result";
400
- toolName: string;
401
- toolCallId: string;
402
- result?: unknown;
403
- }, {
404
- type: "tool-result";
405
- toolName: string;
406
- toolCallId: string;
407
- result?: unknown;
408
- }>, z.ZodObject<{
409
- type: z.ZodLiteral<"tool-incomplete">;
410
- toolCallId: z.ZodString;
411
- toolName: z.ZodString;
412
- args: z.ZodUnknown;
413
- missingParams: z.ZodArray<z.ZodString, "many">;
414
- humanReadableDescription: z.ZodString;
415
- }, "strict", z.ZodTypeAny, {
416
- type: "tool-incomplete";
417
- toolName: string;
418
- toolCallId: string;
419
- missingParams: string[];
420
- humanReadableDescription: string;
421
- args?: unknown;
422
- }, {
423
- type: "tool-incomplete";
424
- toolName: string;
425
- toolCallId: string;
426
- missingParams: string[];
427
- humanReadableDescription: string;
428
- args?: unknown;
429
- }>, z.ZodObject<{
430
- type: z.ZodLiteral<"tool-error">;
431
- toolCallId: z.ZodString;
432
- toolName: z.ZodString;
433
- error: z.ZodType<import("../types/actions/errors.js").ActionError<unknown>>;
434
- }, "strict", z.ZodTypeAny, {
435
- type: "tool-error";
436
- toolName: string;
437
- toolCallId: string;
438
- error: import("../types/actions/errors.js").ActionError<unknown>;
439
- }, {
440
- type: "tool-error";
441
- toolName: string;
442
- toolCallId: string;
443
- error: import("../types/actions/errors.js").ActionError<unknown>;
444
- }>]>, "many">;
100
+ }>, "many">;
445
101
  }, "strict", z.ZodTypeAny, {
446
- role: "user" | "assistant" | "tool" | "system";
447
- content: ({
102
+ role: "user";
103
+ content: {
448
104
  type: "text";
449
105
  text: string;
450
- } | {
451
- type: "tool-call";
452
- toolName: "tokenTransfer";
453
- toolCallId: string;
454
- args: {
455
- fromAddress: string;
456
- toAddress: string;
457
- amount: string;
458
- token: string;
459
- chain: string;
460
- missingParameters?: string[] | undefined;
461
- humanFriendlyMessage?: string | undefined;
462
- };
463
- } | {
464
- type: "tool-call";
465
- toolName: "swap";
466
- toolCallId: string;
467
- args: {
468
- fromAddress: string;
469
- fromToken: string;
470
- fromAmount: string;
471
- protocol: "lifi";
472
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
473
- toToken?: string | undefined;
474
- toAddress?: string | undefined;
475
- toAmount?: string | undefined;
476
- missingParameters?: string[] | undefined;
477
- humanFriendlyMessage?: string | undefined;
478
- };
479
- } | {
480
- type: "tool-call";
481
- toolName: "bridge";
482
- toolCallId: string;
483
- args: {
484
- fromAddress: string;
485
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
486
- fromToken: string;
487
- fromAmount: string;
488
- protocol: "lifi";
489
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
490
- toToken?: string | undefined;
491
- toAddress?: string | undefined;
492
- toAmount?: string | undefined;
493
- missingParameters?: string[] | undefined;
494
- humanFriendlyMessage?: string | undefined;
495
- };
496
- } | {
497
- type: "tool-call";
498
- toolName: "exchangeRate";
499
- toolCallId: string;
500
- args: {
501
- provider: "coinMarketCap";
502
- arguments: {
503
- baseCurrency: string;
504
- quoteCurrency: string;
505
- baseAmount?: string | undefined;
506
- quoteAmount?: string | undefined;
507
- }[];
508
- missingParameters?: string[] | undefined;
509
- humanFriendlyMessage?: string | undefined;
510
- };
511
- } | {
512
- type: "tool-call";
513
- toolName: "getWalletBalance";
514
- toolCallId: string;
515
- args: {
516
- address: string;
517
- provider: "moralis";
518
- missingParameters?: string[] | undefined;
519
- humanFriendlyMessage?: string | undefined;
520
- token?: string | undefined;
521
- chain?: string | undefined;
522
- };
523
- } | {
524
- type: "tool-call";
525
- toolName: "defiFetchListings";
526
- toolCallId: string;
527
- args: {
528
- protocol: "aave";
529
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
530
- missingParameters?: string[] | undefined;
531
- humanFriendlyMessage?: string | undefined;
532
- tokens?: string[] | undefined;
533
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
534
- limit?: number | undefined;
535
- };
536
- } | {
537
- type: "tool-call";
538
- toolName: "defiSupply";
539
- toolCallId: string;
540
- args: {
541
- protocol: "aave";
542
- amount: string;
543
- token: string;
544
- chain: string;
545
- userAddress: string;
546
- missingParameters?: string[] | undefined;
547
- humanFriendlyMessage?: string | undefined;
548
- };
549
- } | {
550
- type: "tool-call";
551
- toolName: "defiWithdraw";
552
- toolCallId: string;
553
- args: {
554
- protocol: "aave";
555
- amount: string;
556
- token: string;
557
- chain: string;
558
- userAddress: string;
559
- missingParameters?: string[] | undefined;
560
- humanFriendlyMessage?: string | undefined;
561
- };
562
- } | {
563
- type: "tool-call";
564
- toolName: "defiPositions";
565
- toolCallId: string;
566
- args: {
567
- protocol: "aave";
568
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
569
- userAddress: string;
570
- missingParameters?: string[] | undefined;
571
- humanFriendlyMessage?: string | undefined;
572
- tokens?: string[] | undefined;
573
- };
574
- } | {
575
- type: "tool-result";
576
- toolName: string;
577
- toolCallId: string;
578
- result?: unknown;
579
- } | {
580
- type: "tool-incomplete";
581
- toolName: string;
582
- toolCallId: string;
583
- missingParams: string[];
584
- humanReadableDescription: string;
585
- args?: unknown;
586
- } | {
587
- type: "tool-error";
588
- toolName: string;
589
- toolCallId: string;
590
- error: import("../types/actions/errors.js").ActionError<unknown>;
591
- })[];
106
+ }[];
592
107
  }, {
593
- role: "user" | "assistant" | "tool" | "system";
594
- content: ({
108
+ role: "user";
109
+ content: {
595
110
  type: "text";
596
111
  text: string;
597
- } | {
598
- type: "tool-call";
599
- toolName: "tokenTransfer";
600
- toolCallId: string;
601
- args: {
602
- fromAddress: string;
603
- toAddress: string;
604
- amount: string;
605
- token: string;
606
- chain: string;
607
- missingParameters?: string[] | undefined;
608
- humanFriendlyMessage?: string | undefined;
609
- };
610
- } | {
611
- type: "tool-call";
612
- toolName: "swap";
613
- toolCallId: string;
614
- args: {
615
- fromAddress: string;
616
- fromToken: string;
617
- fromAmount: string;
618
- protocol: "lifi";
619
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
620
- toToken?: string | undefined;
621
- toAddress?: string | undefined;
622
- toAmount?: string | undefined;
623
- missingParameters?: string[] | undefined;
624
- humanFriendlyMessage?: string | undefined;
625
- };
626
- } | {
627
- type: "tool-call";
628
- toolName: "bridge";
629
- toolCallId: string;
630
- args: {
631
- fromAddress: string;
632
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
633
- fromToken: string;
634
- fromAmount: string;
635
- protocol: "lifi";
636
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
637
- toToken?: string | undefined;
638
- toAddress?: string | undefined;
639
- toAmount?: string | undefined;
640
- missingParameters?: string[] | undefined;
641
- humanFriendlyMessage?: string | undefined;
642
- };
643
- } | {
644
- type: "tool-call";
645
- toolName: "exchangeRate";
646
- toolCallId: string;
647
- args: {
648
- provider: "coinMarketCap";
649
- arguments: {
650
- baseCurrency: string;
651
- quoteCurrency: string;
652
- baseAmount?: string | undefined;
653
- quoteAmount?: string | undefined;
654
- }[];
655
- missingParameters?: string[] | undefined;
656
- humanFriendlyMessage?: string | undefined;
657
- };
658
- } | {
659
- type: "tool-call";
660
- toolName: "getWalletBalance";
661
- toolCallId: string;
662
- args: {
663
- address: string;
664
- provider: "moralis";
665
- missingParameters?: string[] | undefined;
666
- humanFriendlyMessage?: string | undefined;
667
- token?: string | undefined;
668
- chain?: string | undefined;
669
- };
670
- } | {
671
- type: "tool-call";
672
- toolName: "defiFetchListings";
673
- toolCallId: string;
674
- args: {
675
- protocol: "aave";
676
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
677
- missingParameters?: string[] | undefined;
678
- humanFriendlyMessage?: string | undefined;
679
- tokens?: string[] | undefined;
680
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
681
- limit?: number | undefined;
682
- };
683
- } | {
684
- type: "tool-call";
685
- toolName: "defiSupply";
686
- toolCallId: string;
687
- args: {
688
- protocol: "aave";
689
- amount: string;
690
- token: string;
691
- chain: string;
692
- userAddress: string;
693
- missingParameters?: string[] | undefined;
694
- humanFriendlyMessage?: string | undefined;
695
- };
696
- } | {
697
- type: "tool-call";
698
- toolName: "defiWithdraw";
699
- toolCallId: string;
700
- args: {
701
- protocol: "aave";
702
- amount: string;
703
- token: string;
704
- chain: string;
705
- userAddress: string;
706
- missingParameters?: string[] | undefined;
707
- humanFriendlyMessage?: string | undefined;
708
- };
709
- } | {
710
- type: "tool-call";
711
- toolName: "defiPositions";
712
- toolCallId: string;
713
- args: {
714
- protocol: "aave";
715
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
716
- userAddress: string;
717
- missingParameters?: string[] | undefined;
718
- humanFriendlyMessage?: string | undefined;
719
- tokens?: string[] | undefined;
720
- };
721
- } | {
722
- type: "tool-result";
723
- toolName: string;
724
- toolCallId: string;
725
- result?: unknown;
726
- } | {
727
- type: "tool-incomplete";
728
- toolName: string;
729
- toolCallId: string;
730
- missingParams: string[];
731
- humanReadableDescription: string;
732
- args?: unknown;
733
- } | {
734
- type: "tool-error";
735
- toolName: string;
736
- toolCallId: string;
737
- error: import("../types/actions/errors.js").ActionError<unknown>;
738
- })[];
112
+ }[];
739
113
  }>>;
740
114
  toolResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
741
- toolCallId: z.ZodString;
742
- toolName: z.ZodString;
743
- result: z.ZodUnknown;
744
- error: z.ZodOptional<z.ZodUnknown>;
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">;
130
+ }, "strict", z.ZodTypeAny, {
131
+ type: "input";
132
+ errors: {
133
+ path: string;
134
+ message: string;
135
+ }[];
136
+ }, {
137
+ type: "input";
138
+ errors: {
139
+ path: string;
140
+ message: string;
141
+ }[];
142
+ }>, z.ZodObject<{
143
+ type: z.ZodLiteral<"execution">;
144
+ message: z.ZodString;
145
+ details: z.ZodOptional<z.ZodUnknown>;
146
+ }, "strict", z.ZodTypeAny, {
147
+ message: string;
148
+ type: "execution";
149
+ details?: unknown;
150
+ }, {
151
+ message: string;
152
+ type: "execution";
153
+ details?: unknown;
154
+ }>]>>;
745
155
  }, "strict", z.ZodTypeAny, {
746
- toolName: string;
747
- toolCallId: string;
156
+ id: string;
157
+ name: string;
748
158
  result?: unknown;
749
- error?: 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;
750
170
  }, {
751
- toolName: string;
752
- toolCallId: string;
171
+ id: string;
172
+ name: string;
753
173
  result?: unknown;
754
- error?: 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;
755
185
  }>, "many">>;
756
186
  languageModel: z.ZodString;
757
187
  personalityContext: z.ZodDefault<z.ZodOptional<z.ZodObject<{
@@ -761,6 +191,8 @@ export declare const CoreApiChatBodyRequestBaseSchema: z.ZodObject<{
761
191
  }, {
762
192
  channel: "text" | "voice";
763
193
  }>>>;
194
+ /** Client-generated request ID for telemetry subscription */
195
+ requestId: z.ZodOptional<z.ZodString>;
764
196
  }, "strict", z.ZodTypeAny, {
765
197
  toolsConfig: {
766
198
  autoRouter?: {
@@ -785,159 +217,29 @@ export declare const CoreApiChatBodyRequestBaseSchema: z.ZodObject<{
785
217
  channel: "text" | "voice";
786
218
  };
787
219
  prompt?: {
788
- role: "user" | "assistant" | "tool" | "system";
789
- content: ({
220
+ role: "user";
221
+ content: {
790
222
  type: "text";
791
223
  text: string;
792
- } | {
793
- type: "tool-call";
794
- toolName: "tokenTransfer";
795
- toolCallId: string;
796
- args: {
797
- fromAddress: string;
798
- toAddress: string;
799
- amount: string;
800
- token: string;
801
- chain: string;
802
- missingParameters?: string[] | undefined;
803
- humanFriendlyMessage?: string | undefined;
804
- };
805
- } | {
806
- type: "tool-call";
807
- toolName: "swap";
808
- toolCallId: string;
809
- args: {
810
- fromAddress: string;
811
- fromToken: string;
812
- fromAmount: string;
813
- protocol: "lifi";
814
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
815
- toToken?: string | undefined;
816
- toAddress?: string | undefined;
817
- toAmount?: string | undefined;
818
- missingParameters?: string[] | undefined;
819
- humanFriendlyMessage?: string | undefined;
820
- };
821
- } | {
822
- type: "tool-call";
823
- toolName: "bridge";
824
- toolCallId: string;
825
- args: {
826
- fromAddress: string;
827
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
828
- fromToken: string;
829
- fromAmount: string;
830
- protocol: "lifi";
831
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
832
- toToken?: string | undefined;
833
- toAddress?: string | undefined;
834
- toAmount?: string | undefined;
835
- missingParameters?: string[] | undefined;
836
- humanFriendlyMessage?: string | undefined;
837
- };
838
- } | {
839
- type: "tool-call";
840
- toolName: "exchangeRate";
841
- toolCallId: string;
842
- args: {
843
- provider: "coinMarketCap";
844
- arguments: {
845
- baseCurrency: string;
846
- quoteCurrency: string;
847
- baseAmount?: string | undefined;
848
- quoteAmount?: string | undefined;
849
- }[];
850
- missingParameters?: string[] | undefined;
851
- humanFriendlyMessage?: string | undefined;
852
- };
853
- } | {
854
- type: "tool-call";
855
- toolName: "getWalletBalance";
856
- toolCallId: string;
857
- args: {
858
- address: string;
859
- provider: "moralis";
860
- missingParameters?: string[] | undefined;
861
- humanFriendlyMessage?: string | undefined;
862
- token?: string | undefined;
863
- chain?: string | undefined;
864
- };
865
- } | {
866
- type: "tool-call";
867
- toolName: "defiFetchListings";
868
- toolCallId: string;
869
- args: {
870
- protocol: "aave";
871
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
872
- missingParameters?: string[] | undefined;
873
- humanFriendlyMessage?: string | undefined;
874
- tokens?: string[] | undefined;
875
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
876
- limit?: number | undefined;
877
- };
878
- } | {
879
- type: "tool-call";
880
- toolName: "defiSupply";
881
- toolCallId: string;
882
- args: {
883
- protocol: "aave";
884
- amount: string;
885
- token: string;
886
- chain: string;
887
- userAddress: string;
888
- missingParameters?: string[] | undefined;
889
- humanFriendlyMessage?: string | undefined;
890
- };
891
- } | {
892
- type: "tool-call";
893
- toolName: "defiWithdraw";
894
- toolCallId: string;
895
- args: {
896
- protocol: "aave";
897
- amount: string;
898
- token: string;
899
- chain: string;
900
- userAddress: string;
901
- missingParameters?: string[] | undefined;
902
- humanFriendlyMessage?: string | undefined;
903
- };
904
- } | {
905
- type: "tool-call";
906
- toolName: "defiPositions";
907
- toolCallId: string;
908
- args: {
909
- protocol: "aave";
910
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
911
- userAddress: string;
912
- missingParameters?: string[] | undefined;
913
- humanFriendlyMessage?: string | undefined;
914
- tokens?: string[] | undefined;
915
- };
916
- } | {
917
- type: "tool-result";
918
- toolName: string;
919
- toolCallId: string;
920
- result?: unknown;
921
- } | {
922
- type: "tool-incomplete";
923
- toolName: string;
924
- toolCallId: string;
925
- missingParams: string[];
926
- humanReadableDescription: string;
927
- args?: unknown;
928
- } | {
929
- type: "tool-error";
930
- toolName: string;
931
- toolCallId: string;
932
- error: import("../types/actions/errors.js").ActionError<unknown>;
933
- })[];
224
+ }[];
934
225
  } | undefined;
935
226
  toolResults?: {
936
- toolName: string;
937
- toolCallId: string;
227
+ id: string;
228
+ name: string;
938
229
  result?: unknown;
939
- error?: 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;
940
241
  }[] | undefined;
242
+ requestId?: string | undefined;
941
243
  }, {
942
244
  toolsConfig: {
943
245
  autoRouter?: {
@@ -959,162 +261,32 @@ export declare const CoreApiChatBodyRequestBaseSchema: z.ZodObject<{
959
261
  };
960
262
  languageModel: string;
961
263
  prompt?: {
962
- role: "user" | "assistant" | "tool" | "system";
963
- content: ({
264
+ role: "user";
265
+ content: {
964
266
  type: "text";
965
267
  text: string;
966
- } | {
967
- type: "tool-call";
968
- toolName: "tokenTransfer";
969
- toolCallId: string;
970
- args: {
971
- fromAddress: string;
972
- toAddress: string;
973
- amount: string;
974
- token: string;
975
- chain: string;
976
- missingParameters?: string[] | undefined;
977
- humanFriendlyMessage?: string | undefined;
978
- };
979
- } | {
980
- type: "tool-call";
981
- toolName: "swap";
982
- toolCallId: string;
983
- args: {
984
- fromAddress: string;
985
- fromToken: string;
986
- fromAmount: string;
987
- protocol: "lifi";
988
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
989
- toToken?: string | undefined;
990
- toAddress?: string | undefined;
991
- toAmount?: string | undefined;
992
- missingParameters?: string[] | undefined;
993
- humanFriendlyMessage?: string | undefined;
994
- };
995
- } | {
996
- type: "tool-call";
997
- toolName: "bridge";
998
- toolCallId: string;
999
- args: {
1000
- fromAddress: string;
1001
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1002
- fromToken: string;
1003
- fromAmount: string;
1004
- protocol: "lifi";
1005
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
1006
- toToken?: string | undefined;
1007
- toAddress?: string | undefined;
1008
- toAmount?: string | undefined;
1009
- missingParameters?: string[] | undefined;
1010
- humanFriendlyMessage?: string | undefined;
1011
- };
1012
- } | {
1013
- type: "tool-call";
1014
- toolName: "exchangeRate";
1015
- toolCallId: string;
1016
- args: {
1017
- provider: "coinMarketCap";
1018
- arguments: {
1019
- baseCurrency: string;
1020
- quoteCurrency: string;
1021
- baseAmount?: string | undefined;
1022
- quoteAmount?: string | undefined;
1023
- }[];
1024
- missingParameters?: string[] | undefined;
1025
- humanFriendlyMessage?: string | undefined;
1026
- };
1027
- } | {
1028
- type: "tool-call";
1029
- toolName: "getWalletBalance";
1030
- toolCallId: string;
1031
- args: {
1032
- address: string;
1033
- provider: "moralis";
1034
- missingParameters?: string[] | undefined;
1035
- humanFriendlyMessage?: string | undefined;
1036
- token?: string | undefined;
1037
- chain?: string | undefined;
1038
- };
1039
- } | {
1040
- type: "tool-call";
1041
- toolName: "defiFetchListings";
1042
- toolCallId: string;
1043
- args: {
1044
- protocol: "aave";
1045
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1046
- missingParameters?: string[] | undefined;
1047
- humanFriendlyMessage?: string | undefined;
1048
- tokens?: string[] | undefined;
1049
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
1050
- limit?: number | undefined;
1051
- };
1052
- } | {
1053
- type: "tool-call";
1054
- toolName: "defiSupply";
1055
- toolCallId: string;
1056
- args: {
1057
- protocol: "aave";
1058
- amount: string;
1059
- token: string;
1060
- chain: string;
1061
- userAddress: string;
1062
- missingParameters?: string[] | undefined;
1063
- humanFriendlyMessage?: string | undefined;
1064
- };
1065
- } | {
1066
- type: "tool-call";
1067
- toolName: "defiWithdraw";
1068
- toolCallId: string;
1069
- args: {
1070
- protocol: "aave";
1071
- amount: string;
1072
- token: string;
1073
- chain: string;
1074
- userAddress: string;
1075
- missingParameters?: string[] | undefined;
1076
- humanFriendlyMessage?: string | undefined;
1077
- };
1078
- } | {
1079
- type: "tool-call";
1080
- toolName: "defiPositions";
1081
- toolCallId: string;
1082
- args: {
1083
- protocol: "aave";
1084
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1085
- userAddress: string;
1086
- missingParameters?: string[] | undefined;
1087
- humanFriendlyMessage?: string | undefined;
1088
- tokens?: string[] | undefined;
1089
- };
1090
- } | {
1091
- type: "tool-result";
1092
- toolName: string;
1093
- toolCallId: string;
1094
- result?: unknown;
1095
- } | {
1096
- type: "tool-incomplete";
1097
- toolName: string;
1098
- toolCallId: string;
1099
- missingParams: string[];
1100
- humanReadableDescription: string;
1101
- args?: unknown;
1102
- } | {
1103
- type: "tool-error";
1104
- toolName: string;
1105
- toolCallId: string;
1106
- error: import("../types/actions/errors.js").ActionError<unknown>;
1107
- })[];
268
+ }[];
1108
269
  } | undefined;
1109
270
  toolResults?: {
1110
- toolName: string;
1111
- toolCallId: string;
271
+ id: string;
272
+ name: string;
1112
273
  result?: unknown;
1113
- error?: 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;
1114
285
  }[] | undefined;
1115
286
  personalityContext?: {
1116
287
  channel: "text" | "voice";
1117
288
  } | undefined;
289
+ requestId?: string | undefined;
1118
290
  }>;
1119
291
  export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
1120
292
  toolsConfig: z.ZodObject<{
@@ -1204,8 +376,8 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
1204
376
  address: string;
1205
377
  }>;
1206
378
  prompt: z.ZodOptional<z.ZodObject<{
1207
- role: z.ZodEnum<["user", "assistant", "tool", "system"]>;
1208
- content: z.ZodArray<z.ZodUnion<[z.ZodObject<{
379
+ role: z.ZodLiteral<"user">;
380
+ content: z.ZodArray<z.ZodObject<{
1209
381
  type: z.ZodLiteral<"text">;
1210
382
  text: z.ZodString;
1211
383
  }, "strict", z.ZodTypeAny, {
@@ -1214,661 +386,91 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
1214
386
  }, {
1215
387
  type: "text";
1216
388
  text: string;
1217
- }>, z.ZodDiscriminatedUnion<"toolName", [z.ZodObject<{
1218
- type: z.ZodLiteral<"tool-call">;
1219
- toolCallId: z.ZodString;
1220
- toolName: z.ZodLiteral<"tokenTransfer">;
1221
- args: z.ZodType<import("../external.js").TokenTransferActionInput>;
1222
- }, "strict", z.ZodTypeAny, {
1223
- type: "tool-call";
1224
- toolName: "tokenTransfer";
1225
- toolCallId: string;
1226
- args: {
1227
- fromAddress: string;
1228
- toAddress: string;
1229
- amount: string;
1230
- token: string;
1231
- chain: string;
1232
- missingParameters?: string[] | undefined;
1233
- humanFriendlyMessage?: string | undefined;
1234
- };
1235
- }, {
1236
- type: "tool-call";
1237
- toolName: "tokenTransfer";
1238
- toolCallId: string;
1239
- args: {
1240
- fromAddress: string;
1241
- toAddress: string;
1242
- amount: string;
1243
- token: string;
1244
- chain: string;
1245
- missingParameters?: string[] | undefined;
1246
- humanFriendlyMessage?: string | undefined;
1247
- };
1248
- }>, z.ZodObject<{
1249
- type: z.ZodLiteral<"tool-call">;
1250
- toolCallId: z.ZodString;
1251
- toolName: z.ZodLiteral<"swap">;
1252
- args: z.ZodType<import("../external.js").SwapActionInput>;
1253
- }, "strict", z.ZodTypeAny, {
1254
- type: "tool-call";
1255
- toolName: "swap";
1256
- toolCallId: string;
1257
- args: {
1258
- fromAddress: string;
1259
- fromToken: string;
1260
- fromAmount: string;
1261
- protocol: "lifi";
1262
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1263
- toToken?: string | undefined;
1264
- toAddress?: string | undefined;
1265
- toAmount?: string | undefined;
1266
- missingParameters?: string[] | undefined;
1267
- humanFriendlyMessage?: string | undefined;
1268
- };
1269
- }, {
1270
- type: "tool-call";
1271
- toolName: "swap";
1272
- toolCallId: string;
1273
- args: {
1274
- fromAddress: string;
1275
- fromToken: string;
1276
- fromAmount: string;
1277
- protocol: "lifi";
1278
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1279
- toToken?: string | undefined;
1280
- toAddress?: string | undefined;
1281
- toAmount?: string | undefined;
1282
- missingParameters?: string[] | undefined;
1283
- humanFriendlyMessage?: string | undefined;
1284
- };
1285
- }>, z.ZodObject<{
1286
- type: z.ZodLiteral<"tool-call">;
1287
- toolCallId: z.ZodString;
1288
- toolName: z.ZodLiteral<"bridge">;
1289
- args: z.ZodType<import("../external.js").BridgeActionInput>;
1290
- }, "strict", z.ZodTypeAny, {
1291
- type: "tool-call";
1292
- toolName: "bridge";
1293
- toolCallId: string;
1294
- args: {
1295
- fromAddress: string;
1296
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1297
- fromToken: string;
1298
- fromAmount: string;
1299
- protocol: "lifi";
1300
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
1301
- toToken?: string | undefined;
1302
- toAddress?: string | undefined;
1303
- toAmount?: string | undefined;
1304
- missingParameters?: string[] | undefined;
1305
- humanFriendlyMessage?: string | undefined;
1306
- };
1307
- }, {
1308
- type: "tool-call";
1309
- toolName: "bridge";
1310
- toolCallId: string;
1311
- args: {
1312
- fromAddress: string;
1313
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1314
- fromToken: string;
1315
- fromAmount: string;
1316
- protocol: "lifi";
1317
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
1318
- toToken?: string | undefined;
1319
- toAddress?: string | undefined;
1320
- toAmount?: string | undefined;
1321
- missingParameters?: string[] | undefined;
1322
- humanFriendlyMessage?: string | undefined;
1323
- };
1324
- }>, z.ZodObject<{
1325
- type: z.ZodLiteral<"tool-call">;
1326
- toolCallId: z.ZodString;
1327
- toolName: z.ZodLiteral<"exchangeRate">;
1328
- args: z.ZodType<import("../external.js").ExchangeRateActionInput>;
1329
- }, "strict", z.ZodTypeAny, {
1330
- type: "tool-call";
1331
- toolName: "exchangeRate";
1332
- toolCallId: string;
1333
- args: {
1334
- provider: "coinMarketCap";
1335
- arguments: {
1336
- baseCurrency: string;
1337
- quoteCurrency: string;
1338
- baseAmount?: string | undefined;
1339
- quoteAmount?: string | undefined;
1340
- }[];
1341
- missingParameters?: string[] | undefined;
1342
- humanFriendlyMessage?: string | undefined;
1343
- };
1344
- }, {
1345
- type: "tool-call";
1346
- toolName: "exchangeRate";
1347
- toolCallId: string;
1348
- args: {
1349
- provider: "coinMarketCap";
1350
- arguments: {
1351
- baseCurrency: string;
1352
- quoteCurrency: string;
1353
- baseAmount?: string | undefined;
1354
- quoteAmount?: string | undefined;
1355
- }[];
1356
- missingParameters?: string[] | undefined;
1357
- humanFriendlyMessage?: string | undefined;
1358
- };
1359
- }>, z.ZodObject<{
1360
- type: z.ZodLiteral<"tool-call">;
1361
- toolCallId: z.ZodString;
1362
- toolName: z.ZodLiteral<"getWalletBalance">;
1363
- args: z.ZodType<import("../external.js").GetWalletBalanceActionInput>;
1364
- }, "strict", z.ZodTypeAny, {
1365
- type: "tool-call";
1366
- toolName: "getWalletBalance";
1367
- toolCallId: string;
1368
- args: {
1369
- address: string;
1370
- provider: "moralis";
1371
- missingParameters?: string[] | undefined;
1372
- humanFriendlyMessage?: string | undefined;
1373
- token?: string | undefined;
1374
- chain?: string | undefined;
1375
- };
1376
- }, {
1377
- type: "tool-call";
1378
- toolName: "getWalletBalance";
1379
- toolCallId: string;
1380
- args: {
1381
- address: string;
1382
- provider: "moralis";
1383
- missingParameters?: string[] | undefined;
1384
- humanFriendlyMessage?: string | undefined;
1385
- token?: string | undefined;
1386
- chain?: string | undefined;
1387
- };
1388
- }>, z.ZodObject<{
1389
- type: z.ZodLiteral<"tool-call">;
1390
- toolCallId: z.ZodString;
1391
- toolName: z.ZodLiteral<"defiFetchListings">;
1392
- args: z.ZodType<import("../external.js").DefiFetchListingsActionInput>;
1393
- }, "strict", z.ZodTypeAny, {
1394
- type: "tool-call";
1395
- toolName: "defiFetchListings";
1396
- toolCallId: string;
1397
- args: {
1398
- protocol: "aave";
1399
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1400
- missingParameters?: string[] | undefined;
1401
- humanFriendlyMessage?: string | undefined;
1402
- tokens?: string[] | undefined;
1403
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
1404
- limit?: number | undefined;
1405
- };
1406
- }, {
1407
- type: "tool-call";
1408
- toolName: "defiFetchListings";
1409
- toolCallId: string;
1410
- args: {
1411
- protocol: "aave";
1412
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1413
- missingParameters?: string[] | undefined;
1414
- humanFriendlyMessage?: string | undefined;
1415
- tokens?: string[] | undefined;
1416
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
1417
- limit?: number | undefined;
1418
- };
1419
- }>, z.ZodObject<{
1420
- type: z.ZodLiteral<"tool-call">;
1421
- toolCallId: z.ZodString;
1422
- toolName: z.ZodLiteral<"defiSupply">;
1423
- args: z.ZodType<import("../external.js").DefiSupplyActionInput>;
1424
- }, "strict", z.ZodTypeAny, {
1425
- type: "tool-call";
1426
- toolName: "defiSupply";
1427
- toolCallId: string;
1428
- args: {
1429
- protocol: "aave";
1430
- amount: string;
1431
- token: string;
1432
- chain: string;
1433
- userAddress: string;
1434
- missingParameters?: string[] | undefined;
1435
- humanFriendlyMessage?: string | undefined;
1436
- };
1437
- }, {
1438
- type: "tool-call";
1439
- toolName: "defiSupply";
1440
- toolCallId: string;
1441
- args: {
1442
- protocol: "aave";
1443
- amount: string;
1444
- token: string;
1445
- chain: string;
1446
- userAddress: string;
1447
- missingParameters?: string[] | undefined;
1448
- humanFriendlyMessage?: string | undefined;
1449
- };
1450
- }>, z.ZodObject<{
1451
- type: z.ZodLiteral<"tool-call">;
1452
- toolCallId: z.ZodString;
1453
- toolName: z.ZodLiteral<"defiWithdraw">;
1454
- args: z.ZodType<import("../external.js").DefiWithdrawActionInput>;
1455
- }, "strict", z.ZodTypeAny, {
1456
- type: "tool-call";
1457
- toolName: "defiWithdraw";
1458
- toolCallId: string;
1459
- args: {
1460
- protocol: "aave";
1461
- amount: string;
1462
- token: string;
1463
- chain: string;
1464
- userAddress: string;
1465
- missingParameters?: string[] | undefined;
1466
- humanFriendlyMessage?: string | undefined;
1467
- };
1468
- }, {
1469
- type: "tool-call";
1470
- toolName: "defiWithdraw";
1471
- toolCallId: string;
1472
- args: {
1473
- protocol: "aave";
1474
- amount: string;
1475
- token: string;
1476
- chain: string;
1477
- userAddress: string;
1478
- missingParameters?: string[] | undefined;
1479
- humanFriendlyMessage?: string | undefined;
1480
- };
1481
- }>, z.ZodObject<{
1482
- type: z.ZodLiteral<"tool-call">;
1483
- toolCallId: z.ZodString;
1484
- toolName: z.ZodLiteral<"defiPositions">;
1485
- args: z.ZodType<import("../external.js").DefiPositionsActionInput>;
1486
- }, "strict", z.ZodTypeAny, {
1487
- type: "tool-call";
1488
- toolName: "defiPositions";
1489
- toolCallId: string;
1490
- args: {
1491
- protocol: "aave";
1492
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1493
- userAddress: string;
1494
- missingParameters?: string[] | undefined;
1495
- humanFriendlyMessage?: string | undefined;
1496
- tokens?: string[] | undefined;
1497
- };
1498
- }, {
1499
- type: "tool-call";
1500
- toolName: "defiPositions";
1501
- toolCallId: string;
1502
- args: {
1503
- protocol: "aave";
1504
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1505
- userAddress: string;
1506
- missingParameters?: string[] | undefined;
1507
- humanFriendlyMessage?: string | undefined;
1508
- tokens?: string[] | undefined;
1509
- };
1510
- }>]>, z.ZodObject<{
1511
- type: z.ZodLiteral<"tool-result">;
1512
- toolCallId: z.ZodString;
1513
- toolName: z.ZodString;
1514
- result: z.ZodUnknown;
1515
- }, "strict", z.ZodTypeAny, {
1516
- type: "tool-result";
1517
- toolName: string;
1518
- toolCallId: string;
1519
- result?: unknown;
1520
- }, {
1521
- type: "tool-result";
1522
- toolName: string;
1523
- toolCallId: string;
1524
- result?: unknown;
1525
- }>, z.ZodObject<{
1526
- type: z.ZodLiteral<"tool-incomplete">;
1527
- toolCallId: z.ZodString;
1528
- toolName: z.ZodString;
1529
- args: z.ZodUnknown;
1530
- missingParams: z.ZodArray<z.ZodString, "many">;
1531
- humanReadableDescription: z.ZodString;
1532
- }, "strict", z.ZodTypeAny, {
1533
- type: "tool-incomplete";
1534
- toolName: string;
1535
- toolCallId: string;
1536
- missingParams: string[];
1537
- humanReadableDescription: string;
1538
- args?: unknown;
1539
- }, {
1540
- type: "tool-incomplete";
1541
- toolName: string;
1542
- toolCallId: string;
1543
- missingParams: string[];
1544
- humanReadableDescription: string;
1545
- args?: unknown;
1546
- }>, z.ZodObject<{
1547
- type: z.ZodLiteral<"tool-error">;
1548
- toolCallId: z.ZodString;
1549
- toolName: z.ZodString;
1550
- error: z.ZodType<import("../types/actions/errors.js").ActionError<unknown>>;
1551
- }, "strict", z.ZodTypeAny, {
1552
- type: "tool-error";
1553
- toolName: string;
1554
- toolCallId: string;
1555
- error: import("../types/actions/errors.js").ActionError<unknown>;
1556
- }, {
1557
- type: "tool-error";
1558
- toolName: string;
1559
- toolCallId: string;
1560
- error: import("../types/actions/errors.js").ActionError<unknown>;
1561
- }>]>, "many">;
389
+ }>, "many">;
1562
390
  }, "strict", z.ZodTypeAny, {
1563
- role: "user" | "assistant" | "tool" | "system";
1564
- content: ({
391
+ role: "user";
392
+ content: {
1565
393
  type: "text";
1566
394
  text: string;
1567
- } | {
1568
- type: "tool-call";
1569
- toolName: "tokenTransfer";
1570
- toolCallId: string;
1571
- args: {
1572
- fromAddress: string;
1573
- toAddress: string;
1574
- amount: string;
1575
- token: string;
1576
- chain: string;
1577
- missingParameters?: string[] | undefined;
1578
- humanFriendlyMessage?: string | undefined;
1579
- };
1580
- } | {
1581
- type: "tool-call";
1582
- toolName: "swap";
1583
- toolCallId: string;
1584
- args: {
1585
- fromAddress: string;
1586
- fromToken: string;
1587
- fromAmount: string;
1588
- protocol: "lifi";
1589
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1590
- toToken?: string | undefined;
1591
- toAddress?: string | undefined;
1592
- toAmount?: string | undefined;
1593
- missingParameters?: string[] | undefined;
1594
- humanFriendlyMessage?: string | undefined;
1595
- };
1596
- } | {
1597
- type: "tool-call";
1598
- toolName: "bridge";
1599
- toolCallId: string;
1600
- args: {
1601
- fromAddress: string;
1602
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1603
- fromToken: string;
1604
- fromAmount: string;
1605
- protocol: "lifi";
1606
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
1607
- toToken?: string | undefined;
1608
- toAddress?: string | undefined;
1609
- toAmount?: string | undefined;
1610
- missingParameters?: string[] | undefined;
1611
- humanFriendlyMessage?: string | undefined;
1612
- };
1613
- } | {
1614
- type: "tool-call";
1615
- toolName: "exchangeRate";
1616
- toolCallId: string;
1617
- args: {
1618
- provider: "coinMarketCap";
1619
- arguments: {
1620
- baseCurrency: string;
1621
- quoteCurrency: string;
1622
- baseAmount?: string | undefined;
1623
- quoteAmount?: string | undefined;
1624
- }[];
1625
- missingParameters?: string[] | undefined;
1626
- humanFriendlyMessage?: string | undefined;
1627
- };
1628
- } | {
1629
- type: "tool-call";
1630
- toolName: "getWalletBalance";
1631
- toolCallId: string;
1632
- args: {
1633
- address: string;
1634
- provider: "moralis";
1635
- missingParameters?: string[] | undefined;
1636
- humanFriendlyMessage?: string | undefined;
1637
- token?: string | undefined;
1638
- chain?: string | undefined;
1639
- };
1640
- } | {
1641
- type: "tool-call";
1642
- toolName: "defiFetchListings";
1643
- toolCallId: string;
1644
- args: {
1645
- protocol: "aave";
1646
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1647
- missingParameters?: string[] | undefined;
1648
- humanFriendlyMessage?: string | undefined;
1649
- tokens?: string[] | undefined;
1650
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
1651
- limit?: number | undefined;
1652
- };
1653
- } | {
1654
- type: "tool-call";
1655
- toolName: "defiSupply";
1656
- toolCallId: string;
1657
- args: {
1658
- protocol: "aave";
1659
- amount: string;
1660
- token: string;
1661
- chain: string;
1662
- userAddress: string;
1663
- missingParameters?: string[] | undefined;
1664
- humanFriendlyMessage?: string | undefined;
1665
- };
1666
- } | {
1667
- type: "tool-call";
1668
- toolName: "defiWithdraw";
1669
- toolCallId: string;
1670
- args: {
1671
- protocol: "aave";
1672
- amount: string;
1673
- token: string;
1674
- chain: string;
1675
- userAddress: string;
1676
- missingParameters?: string[] | undefined;
1677
- humanFriendlyMessage?: string | undefined;
1678
- };
1679
- } | {
1680
- type: "tool-call";
1681
- toolName: "defiPositions";
1682
- toolCallId: string;
1683
- args: {
1684
- protocol: "aave";
1685
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1686
- userAddress: string;
1687
- missingParameters?: string[] | undefined;
1688
- humanFriendlyMessage?: string | undefined;
1689
- tokens?: string[] | undefined;
1690
- };
1691
- } | {
1692
- type: "tool-result";
1693
- toolName: string;
1694
- toolCallId: string;
1695
- result?: unknown;
1696
- } | {
1697
- type: "tool-incomplete";
1698
- toolName: string;
1699
- toolCallId: string;
1700
- missingParams: string[];
1701
- humanReadableDescription: string;
1702
- args?: unknown;
1703
- } | {
1704
- type: "tool-error";
1705
- toolName: string;
1706
- toolCallId: string;
1707
- error: import("../types/actions/errors.js").ActionError<unknown>;
1708
- })[];
395
+ }[];
1709
396
  }, {
1710
- role: "user" | "assistant" | "tool" | "system";
1711
- content: ({
397
+ role: "user";
398
+ content: {
1712
399
  type: "text";
1713
400
  text: string;
1714
- } | {
1715
- type: "tool-call";
1716
- toolName: "tokenTransfer";
1717
- toolCallId: string;
1718
- args: {
1719
- fromAddress: string;
1720
- toAddress: string;
1721
- amount: string;
1722
- token: string;
1723
- chain: string;
1724
- missingParameters?: string[] | undefined;
1725
- humanFriendlyMessage?: string | undefined;
1726
- };
1727
- } | {
1728
- type: "tool-call";
1729
- toolName: "swap";
1730
- toolCallId: string;
1731
- args: {
1732
- fromAddress: string;
1733
- fromToken: string;
1734
- fromAmount: string;
1735
- protocol: "lifi";
1736
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1737
- toToken?: string | undefined;
1738
- toAddress?: string | undefined;
1739
- toAmount?: string | undefined;
1740
- missingParameters?: string[] | undefined;
1741
- humanFriendlyMessage?: string | undefined;
1742
- };
1743
- } | {
1744
- type: "tool-call";
1745
- toolName: "bridge";
1746
- toolCallId: string;
1747
- args: {
1748
- fromAddress: string;
1749
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1750
- fromToken: string;
1751
- fromAmount: string;
1752
- protocol: "lifi";
1753
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
1754
- toToken?: string | undefined;
1755
- toAddress?: string | undefined;
1756
- toAmount?: string | undefined;
1757
- missingParameters?: string[] | undefined;
1758
- humanFriendlyMessage?: string | undefined;
1759
- };
1760
- } | {
1761
- type: "tool-call";
1762
- toolName: "exchangeRate";
1763
- toolCallId: string;
1764
- args: {
1765
- provider: "coinMarketCap";
1766
- arguments: {
1767
- baseCurrency: string;
1768
- quoteCurrency: string;
1769
- baseAmount?: string | undefined;
1770
- quoteAmount?: string | undefined;
1771
- }[];
1772
- missingParameters?: string[] | undefined;
1773
- humanFriendlyMessage?: string | undefined;
1774
- };
1775
- } | {
1776
- type: "tool-call";
1777
- toolName: "getWalletBalance";
1778
- toolCallId: string;
1779
- args: {
1780
- address: string;
1781
- provider: "moralis";
1782
- missingParameters?: string[] | undefined;
1783
- humanFriendlyMessage?: string | undefined;
1784
- token?: string | undefined;
1785
- chain?: string | undefined;
1786
- };
1787
- } | {
1788
- type: "tool-call";
1789
- toolName: "defiFetchListings";
1790
- toolCallId: string;
1791
- args: {
1792
- protocol: "aave";
1793
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1794
- missingParameters?: string[] | undefined;
1795
- humanFriendlyMessage?: string | undefined;
1796
- tokens?: string[] | undefined;
1797
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
1798
- limit?: number | undefined;
1799
- };
1800
- } | {
1801
- type: "tool-call";
1802
- toolName: "defiSupply";
1803
- toolCallId: string;
1804
- args: {
1805
- protocol: "aave";
1806
- amount: string;
1807
- token: string;
1808
- chain: string;
1809
- userAddress: string;
1810
- missingParameters?: string[] | undefined;
1811
- humanFriendlyMessage?: string | undefined;
1812
- };
1813
- } | {
1814
- type: "tool-call";
1815
- toolName: "defiWithdraw";
1816
- toolCallId: string;
1817
- args: {
1818
- protocol: "aave";
1819
- amount: string;
1820
- token: string;
1821
- chain: string;
1822
- userAddress: string;
1823
- missingParameters?: string[] | undefined;
1824
- humanFriendlyMessage?: string | undefined;
1825
- };
1826
- } | {
1827
- type: "tool-call";
1828
- toolName: "defiPositions";
1829
- toolCallId: string;
1830
- args: {
1831
- protocol: "aave";
1832
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1833
- userAddress: string;
1834
- missingParameters?: string[] | undefined;
1835
- humanFriendlyMessage?: string | undefined;
1836
- tokens?: string[] | undefined;
1837
- };
1838
- } | {
1839
- type: "tool-result";
1840
- toolName: string;
1841
- toolCallId: string;
1842
- result?: unknown;
1843
- } | {
1844
- type: "tool-incomplete";
1845
- toolName: string;
1846
- toolCallId: string;
1847
- missingParams: string[];
1848
- humanReadableDescription: string;
1849
- args?: unknown;
1850
- } | {
1851
- type: "tool-error";
1852
- toolName: string;
1853
- toolCallId: string;
1854
- error: import("../types/actions/errors.js").ActionError<unknown>;
1855
- })[];
401
+ }[];
1856
402
  }>>;
1857
403
  toolResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
1858
- toolCallId: z.ZodString;
1859
- toolName: z.ZodString;
1860
- result: z.ZodUnknown;
1861
- error: z.ZodOptional<z.ZodUnknown>;
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">;
419
+ }, "strict", z.ZodTypeAny, {
420
+ type: "input";
421
+ errors: {
422
+ path: string;
423
+ message: string;
424
+ }[];
425
+ }, {
426
+ type: "input";
427
+ errors: {
428
+ path: string;
429
+ message: string;
430
+ }[];
431
+ }>, z.ZodObject<{
432
+ type: z.ZodLiteral<"execution">;
433
+ message: z.ZodString;
434
+ details: z.ZodOptional<z.ZodUnknown>;
435
+ }, "strict", z.ZodTypeAny, {
436
+ message: string;
437
+ type: "execution";
438
+ details?: unknown;
439
+ }, {
440
+ message: string;
441
+ type: "execution";
442
+ details?: unknown;
443
+ }>]>>;
1862
444
  }, "strict", z.ZodTypeAny, {
1863
- toolName: string;
1864
- toolCallId: string;
445
+ id: string;
446
+ name: string;
1865
447
  result?: unknown;
1866
- error?: 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;
1867
459
  }, {
1868
- toolName: string;
1869
- toolCallId: string;
460
+ id: string;
461
+ name: string;
1870
462
  result?: unknown;
1871
- error?: 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;
1872
474
  }>, "many">>;
1873
475
  languageModel: z.ZodString;
1874
476
  personalityContext: z.ZodDefault<z.ZodOptional<z.ZodObject<{
@@ -1878,6 +480,8 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
1878
480
  }, {
1879
481
  channel: "text" | "voice";
1880
482
  }>>>;
483
+ /** Client-generated request ID for telemetry subscription */
484
+ requestId: z.ZodOptional<z.ZodString>;
1881
485
  }, "strict", z.ZodTypeAny, {
1882
486
  toolsConfig: {
1883
487
  autoRouter?: {
@@ -1902,159 +506,29 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
1902
506
  channel: "text" | "voice";
1903
507
  };
1904
508
  prompt?: {
1905
- role: "user" | "assistant" | "tool" | "system";
1906
- content: ({
509
+ role: "user";
510
+ content: {
1907
511
  type: "text";
1908
512
  text: string;
1909
- } | {
1910
- type: "tool-call";
1911
- toolName: "tokenTransfer";
1912
- toolCallId: string;
1913
- args: {
1914
- fromAddress: string;
1915
- toAddress: string;
1916
- amount: string;
1917
- token: string;
1918
- chain: string;
1919
- missingParameters?: string[] | undefined;
1920
- humanFriendlyMessage?: string | undefined;
1921
- };
1922
- } | {
1923
- type: "tool-call";
1924
- toolName: "swap";
1925
- toolCallId: string;
1926
- args: {
1927
- fromAddress: string;
1928
- fromToken: string;
1929
- fromAmount: string;
1930
- protocol: "lifi";
1931
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1932
- toToken?: string | undefined;
1933
- toAddress?: string | undefined;
1934
- toAmount?: string | undefined;
1935
- missingParameters?: string[] | undefined;
1936
- humanFriendlyMessage?: string | undefined;
1937
- };
1938
- } | {
1939
- type: "tool-call";
1940
- toolName: "bridge";
1941
- toolCallId: string;
1942
- args: {
1943
- fromAddress: string;
1944
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1945
- fromToken: string;
1946
- fromAmount: string;
1947
- protocol: "lifi";
1948
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
1949
- toToken?: string | undefined;
1950
- toAddress?: string | undefined;
1951
- toAmount?: string | undefined;
1952
- missingParameters?: string[] | undefined;
1953
- humanFriendlyMessage?: string | undefined;
1954
- };
1955
- } | {
1956
- type: "tool-call";
1957
- toolName: "exchangeRate";
1958
- toolCallId: string;
1959
- args: {
1960
- provider: "coinMarketCap";
1961
- arguments: {
1962
- baseCurrency: string;
1963
- quoteCurrency: string;
1964
- baseAmount?: string | undefined;
1965
- quoteAmount?: string | undefined;
1966
- }[];
1967
- missingParameters?: string[] | undefined;
1968
- humanFriendlyMessage?: string | undefined;
1969
- };
1970
- } | {
1971
- type: "tool-call";
1972
- toolName: "getWalletBalance";
1973
- toolCallId: string;
1974
- args: {
1975
- address: string;
1976
- provider: "moralis";
1977
- missingParameters?: string[] | undefined;
1978
- humanFriendlyMessage?: string | undefined;
1979
- token?: string | undefined;
1980
- chain?: string | undefined;
1981
- };
1982
- } | {
1983
- type: "tool-call";
1984
- toolName: "defiFetchListings";
1985
- toolCallId: string;
1986
- args: {
1987
- protocol: "aave";
1988
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
1989
- missingParameters?: string[] | undefined;
1990
- humanFriendlyMessage?: string | undefined;
1991
- tokens?: string[] | undefined;
1992
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
1993
- limit?: number | undefined;
1994
- };
1995
- } | {
1996
- type: "tool-call";
1997
- toolName: "defiSupply";
1998
- toolCallId: string;
1999
- args: {
2000
- protocol: "aave";
2001
- amount: string;
2002
- token: string;
2003
- chain: string;
2004
- userAddress: string;
2005
- missingParameters?: string[] | undefined;
2006
- humanFriendlyMessage?: string | undefined;
2007
- };
2008
- } | {
2009
- type: "tool-call";
2010
- toolName: "defiWithdraw";
2011
- toolCallId: string;
2012
- args: {
2013
- protocol: "aave";
2014
- amount: string;
2015
- token: string;
2016
- chain: string;
2017
- userAddress: string;
2018
- missingParameters?: string[] | undefined;
2019
- humanFriendlyMessage?: string | undefined;
2020
- };
2021
- } | {
2022
- type: "tool-call";
2023
- toolName: "defiPositions";
2024
- toolCallId: string;
2025
- args: {
2026
- protocol: "aave";
2027
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2028
- userAddress: string;
2029
- missingParameters?: string[] | undefined;
2030
- humanFriendlyMessage?: string | undefined;
2031
- tokens?: string[] | undefined;
2032
- };
2033
- } | {
2034
- type: "tool-result";
2035
- toolName: string;
2036
- toolCallId: string;
2037
- result?: unknown;
2038
- } | {
2039
- type: "tool-incomplete";
2040
- toolName: string;
2041
- toolCallId: string;
2042
- missingParams: string[];
2043
- humanReadableDescription: string;
2044
- args?: unknown;
2045
- } | {
2046
- type: "tool-error";
2047
- toolName: string;
2048
- toolCallId: string;
2049
- error: import("../types/actions/errors.js").ActionError<unknown>;
2050
- })[];
513
+ }[];
2051
514
  } | undefined;
2052
515
  toolResults?: {
2053
- toolName: string;
2054
- toolCallId: string;
516
+ id: string;
517
+ name: string;
2055
518
  result?: unknown;
2056
- error?: 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;
2057
530
  }[] | undefined;
531
+ requestId?: string | undefined;
2058
532
  }, {
2059
533
  toolsConfig: {
2060
534
  autoRouter?: {
@@ -2076,162 +550,32 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
2076
550
  };
2077
551
  languageModel: string;
2078
552
  prompt?: {
2079
- role: "user" | "assistant" | "tool" | "system";
2080
- content: ({
553
+ role: "user";
554
+ content: {
2081
555
  type: "text";
2082
556
  text: string;
2083
- } | {
2084
- type: "tool-call";
2085
- toolName: "tokenTransfer";
2086
- toolCallId: string;
2087
- args: {
2088
- fromAddress: string;
2089
- toAddress: string;
2090
- amount: string;
2091
- token: string;
2092
- chain: string;
2093
- missingParameters?: string[] | undefined;
2094
- humanFriendlyMessage?: string | undefined;
2095
- };
2096
- } | {
2097
- type: "tool-call";
2098
- toolName: "swap";
2099
- toolCallId: string;
2100
- args: {
2101
- fromAddress: string;
2102
- fromToken: string;
2103
- fromAmount: string;
2104
- protocol: "lifi";
2105
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2106
- toToken?: string | undefined;
2107
- toAddress?: string | undefined;
2108
- toAmount?: string | undefined;
2109
- missingParameters?: string[] | undefined;
2110
- humanFriendlyMessage?: string | undefined;
2111
- };
2112
- } | {
2113
- type: "tool-call";
2114
- toolName: "bridge";
2115
- toolCallId: string;
2116
- args: {
2117
- fromAddress: string;
2118
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2119
- fromToken: string;
2120
- fromAmount: string;
2121
- protocol: "lifi";
2122
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
2123
- toToken?: string | undefined;
2124
- toAddress?: string | undefined;
2125
- toAmount?: string | undefined;
2126
- missingParameters?: string[] | undefined;
2127
- humanFriendlyMessage?: string | undefined;
2128
- };
2129
- } | {
2130
- type: "tool-call";
2131
- toolName: "exchangeRate";
2132
- toolCallId: string;
2133
- args: {
2134
- provider: "coinMarketCap";
2135
- arguments: {
2136
- baseCurrency: string;
2137
- quoteCurrency: string;
2138
- baseAmount?: string | undefined;
2139
- quoteAmount?: string | undefined;
2140
- }[];
2141
- missingParameters?: string[] | undefined;
2142
- humanFriendlyMessage?: string | undefined;
2143
- };
2144
- } | {
2145
- type: "tool-call";
2146
- toolName: "getWalletBalance";
2147
- toolCallId: string;
2148
- args: {
2149
- address: string;
2150
- provider: "moralis";
2151
- missingParameters?: string[] | undefined;
2152
- humanFriendlyMessage?: string | undefined;
2153
- token?: string | undefined;
2154
- chain?: string | undefined;
2155
- };
2156
- } | {
2157
- type: "tool-call";
2158
- toolName: "defiFetchListings";
2159
- toolCallId: string;
2160
- args: {
2161
- protocol: "aave";
2162
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2163
- missingParameters?: string[] | undefined;
2164
- humanFriendlyMessage?: string | undefined;
2165
- tokens?: string[] | undefined;
2166
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
2167
- limit?: number | undefined;
2168
- };
2169
- } | {
2170
- type: "tool-call";
2171
- toolName: "defiSupply";
2172
- toolCallId: string;
2173
- args: {
2174
- protocol: "aave";
2175
- amount: string;
2176
- token: string;
2177
- chain: string;
2178
- userAddress: string;
2179
- missingParameters?: string[] | undefined;
2180
- humanFriendlyMessage?: string | undefined;
2181
- };
2182
- } | {
2183
- type: "tool-call";
2184
- toolName: "defiWithdraw";
2185
- toolCallId: string;
2186
- args: {
2187
- protocol: "aave";
2188
- amount: string;
2189
- token: string;
2190
- chain: string;
2191
- userAddress: string;
2192
- missingParameters?: string[] | undefined;
2193
- humanFriendlyMessage?: string | undefined;
2194
- };
2195
- } | {
2196
- type: "tool-call";
2197
- toolName: "defiPositions";
2198
- toolCallId: string;
2199
- args: {
2200
- protocol: "aave";
2201
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2202
- userAddress: string;
2203
- missingParameters?: string[] | undefined;
2204
- humanFriendlyMessage?: string | undefined;
2205
- tokens?: string[] | undefined;
2206
- };
2207
- } | {
2208
- type: "tool-result";
2209
- toolName: string;
2210
- toolCallId: string;
2211
- result?: unknown;
2212
- } | {
2213
- type: "tool-incomplete";
2214
- toolName: string;
2215
- toolCallId: string;
2216
- missingParams: string[];
2217
- humanReadableDescription: string;
2218
- args?: unknown;
2219
- } | {
2220
- type: "tool-error";
2221
- toolName: string;
2222
- toolCallId: string;
2223
- error: import("../types/actions/errors.js").ActionError<unknown>;
2224
- })[];
557
+ }[];
2225
558
  } | undefined;
2226
559
  toolResults?: {
2227
- toolName: string;
2228
- toolCallId: string;
560
+ id: string;
561
+ name: string;
2229
562
  result?: unknown;
2230
- error?: 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;
2231
574
  }[] | undefined;
2232
575
  personalityContext?: {
2233
576
  channel: "text" | "voice";
2234
577
  } | undefined;
578
+ requestId?: string | undefined;
2235
579
  }>, {
2236
580
  toolsConfig: {
2237
581
  autoRouter?: {
@@ -2256,159 +600,29 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
2256
600
  channel: "text" | "voice";
2257
601
  };
2258
602
  prompt?: {
2259
- role: "user" | "assistant" | "tool" | "system";
2260
- content: ({
603
+ role: "user";
604
+ content: {
2261
605
  type: "text";
2262
606
  text: string;
2263
- } | {
2264
- type: "tool-call";
2265
- toolName: "tokenTransfer";
2266
- toolCallId: string;
2267
- args: {
2268
- fromAddress: string;
2269
- toAddress: string;
2270
- amount: string;
2271
- token: string;
2272
- chain: string;
2273
- missingParameters?: string[] | undefined;
2274
- humanFriendlyMessage?: string | undefined;
2275
- };
2276
- } | {
2277
- type: "tool-call";
2278
- toolName: "swap";
2279
- toolCallId: string;
2280
- args: {
2281
- fromAddress: string;
2282
- fromToken: string;
2283
- fromAmount: string;
2284
- protocol: "lifi";
2285
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2286
- toToken?: string | undefined;
2287
- toAddress?: string | undefined;
2288
- toAmount?: string | undefined;
2289
- missingParameters?: string[] | undefined;
2290
- humanFriendlyMessage?: string | undefined;
2291
- };
2292
- } | {
2293
- type: "tool-call";
2294
- toolName: "bridge";
2295
- toolCallId: string;
2296
- args: {
2297
- fromAddress: string;
2298
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2299
- fromToken: string;
2300
- fromAmount: string;
2301
- protocol: "lifi";
2302
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
2303
- toToken?: string | undefined;
2304
- toAddress?: string | undefined;
2305
- toAmount?: string | undefined;
2306
- missingParameters?: string[] | undefined;
2307
- humanFriendlyMessage?: string | undefined;
2308
- };
2309
- } | {
2310
- type: "tool-call";
2311
- toolName: "exchangeRate";
2312
- toolCallId: string;
2313
- args: {
2314
- provider: "coinMarketCap";
2315
- arguments: {
2316
- baseCurrency: string;
2317
- quoteCurrency: string;
2318
- baseAmount?: string | undefined;
2319
- quoteAmount?: string | undefined;
2320
- }[];
2321
- missingParameters?: string[] | undefined;
2322
- humanFriendlyMessage?: string | undefined;
2323
- };
2324
- } | {
2325
- type: "tool-call";
2326
- toolName: "getWalletBalance";
2327
- toolCallId: string;
2328
- args: {
2329
- address: string;
2330
- provider: "moralis";
2331
- missingParameters?: string[] | undefined;
2332
- humanFriendlyMessage?: string | undefined;
2333
- token?: string | undefined;
2334
- chain?: string | undefined;
2335
- };
2336
- } | {
2337
- type: "tool-call";
2338
- toolName: "defiFetchListings";
2339
- toolCallId: string;
2340
- args: {
2341
- protocol: "aave";
2342
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2343
- missingParameters?: string[] | undefined;
2344
- humanFriendlyMessage?: string | undefined;
2345
- tokens?: string[] | undefined;
2346
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
2347
- limit?: number | undefined;
2348
- };
2349
- } | {
2350
- type: "tool-call";
2351
- toolName: "defiSupply";
2352
- toolCallId: string;
2353
- args: {
2354
- protocol: "aave";
2355
- amount: string;
2356
- token: string;
2357
- chain: string;
2358
- userAddress: string;
2359
- missingParameters?: string[] | undefined;
2360
- humanFriendlyMessage?: string | undefined;
2361
- };
2362
- } | {
2363
- type: "tool-call";
2364
- toolName: "defiWithdraw";
2365
- toolCallId: string;
2366
- args: {
2367
- protocol: "aave";
2368
- amount: string;
2369
- token: string;
2370
- chain: string;
2371
- userAddress: string;
2372
- missingParameters?: string[] | undefined;
2373
- humanFriendlyMessage?: string | undefined;
2374
- };
2375
- } | {
2376
- type: "tool-call";
2377
- toolName: "defiPositions";
2378
- toolCallId: string;
2379
- args: {
2380
- protocol: "aave";
2381
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2382
- userAddress: string;
2383
- missingParameters?: string[] | undefined;
2384
- humanFriendlyMessage?: string | undefined;
2385
- tokens?: string[] | undefined;
2386
- };
2387
- } | {
2388
- type: "tool-result";
2389
- toolName: string;
2390
- toolCallId: string;
2391
- result?: unknown;
2392
- } | {
2393
- type: "tool-incomplete";
2394
- toolName: string;
2395
- toolCallId: string;
2396
- missingParams: string[];
2397
- humanReadableDescription: string;
2398
- args?: unknown;
2399
- } | {
2400
- type: "tool-error";
2401
- toolName: string;
2402
- toolCallId: string;
2403
- error: import("../types/actions/errors.js").ActionError<unknown>;
2404
- })[];
607
+ }[];
2405
608
  } | undefined;
2406
609
  toolResults?: {
2407
- toolName: string;
2408
- toolCallId: string;
610
+ id: string;
611
+ name: string;
2409
612
  result?: unknown;
2410
- error?: 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;
2411
624
  }[] | undefined;
625
+ requestId?: string | undefined;
2412
626
  }, {
2413
627
  toolsConfig: {
2414
628
  autoRouter?: {
@@ -2430,161 +644,31 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodEffects<z.ZodObject<{
2430
644
  };
2431
645
  languageModel: string;
2432
646
  prompt?: {
2433
- role: "user" | "assistant" | "tool" | "system";
2434
- content: ({
647
+ role: "user";
648
+ content: {
2435
649
  type: "text";
2436
650
  text: string;
2437
- } | {
2438
- type: "tool-call";
2439
- toolName: "tokenTransfer";
2440
- toolCallId: string;
2441
- args: {
2442
- fromAddress: string;
2443
- toAddress: string;
2444
- amount: string;
2445
- token: string;
2446
- chain: string;
2447
- missingParameters?: string[] | undefined;
2448
- humanFriendlyMessage?: string | undefined;
2449
- };
2450
- } | {
2451
- type: "tool-call";
2452
- toolName: "swap";
2453
- toolCallId: string;
2454
- args: {
2455
- fromAddress: string;
2456
- fromToken: string;
2457
- fromAmount: string;
2458
- protocol: "lifi";
2459
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2460
- toToken?: string | undefined;
2461
- toAddress?: string | undefined;
2462
- toAmount?: string | undefined;
2463
- missingParameters?: string[] | undefined;
2464
- humanFriendlyMessage?: string | undefined;
2465
- };
2466
- } | {
2467
- type: "tool-call";
2468
- toolName: "bridge";
2469
- toolCallId: string;
2470
- args: {
2471
- fromAddress: string;
2472
- fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2473
- fromToken: string;
2474
- fromAmount: string;
2475
- protocol: "lifi";
2476
- toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
2477
- toToken?: string | undefined;
2478
- toAddress?: string | undefined;
2479
- toAmount?: string | undefined;
2480
- missingParameters?: string[] | undefined;
2481
- humanFriendlyMessage?: string | undefined;
2482
- };
2483
- } | {
2484
- type: "tool-call";
2485
- toolName: "exchangeRate";
2486
- toolCallId: string;
2487
- args: {
2488
- provider: "coinMarketCap";
2489
- arguments: {
2490
- baseCurrency: string;
2491
- quoteCurrency: string;
2492
- baseAmount?: string | undefined;
2493
- quoteAmount?: string | undefined;
2494
- }[];
2495
- missingParameters?: string[] | undefined;
2496
- humanFriendlyMessage?: string | undefined;
2497
- };
2498
- } | {
2499
- type: "tool-call";
2500
- toolName: "getWalletBalance";
2501
- toolCallId: string;
2502
- args: {
2503
- address: string;
2504
- provider: "moralis";
2505
- missingParameters?: string[] | undefined;
2506
- humanFriendlyMessage?: string | undefined;
2507
- token?: string | undefined;
2508
- chain?: string | undefined;
2509
- };
2510
- } | {
2511
- type: "tool-call";
2512
- toolName: "defiFetchListings";
2513
- toolCallId: string;
2514
- args: {
2515
- protocol: "aave";
2516
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2517
- missingParameters?: string[] | undefined;
2518
- humanFriendlyMessage?: string | undefined;
2519
- tokens?: string[] | undefined;
2520
- criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
2521
- limit?: number | undefined;
2522
- };
2523
- } | {
2524
- type: "tool-call";
2525
- toolName: "defiSupply";
2526
- toolCallId: string;
2527
- args: {
2528
- protocol: "aave";
2529
- amount: string;
2530
- token: string;
2531
- chain: string;
2532
- userAddress: string;
2533
- missingParameters?: string[] | undefined;
2534
- humanFriendlyMessage?: string | undefined;
2535
- };
2536
- } | {
2537
- type: "tool-call";
2538
- toolName: "defiWithdraw";
2539
- toolCallId: string;
2540
- args: {
2541
- protocol: "aave";
2542
- amount: string;
2543
- token: string;
2544
- chain: string;
2545
- userAddress: string;
2546
- missingParameters?: string[] | undefined;
2547
- humanFriendlyMessage?: string | undefined;
2548
- };
2549
- } | {
2550
- type: "tool-call";
2551
- toolName: "defiPositions";
2552
- toolCallId: string;
2553
- args: {
2554
- protocol: "aave";
2555
- chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
2556
- userAddress: string;
2557
- missingParameters?: string[] | undefined;
2558
- humanFriendlyMessage?: string | undefined;
2559
- tokens?: string[] | undefined;
2560
- };
2561
- } | {
2562
- type: "tool-result";
2563
- toolName: string;
2564
- toolCallId: string;
2565
- result?: unknown;
2566
- } | {
2567
- type: "tool-incomplete";
2568
- toolName: string;
2569
- toolCallId: string;
2570
- missingParams: string[];
2571
- humanReadableDescription: string;
2572
- args?: unknown;
2573
- } | {
2574
- type: "tool-error";
2575
- toolName: string;
2576
- toolCallId: string;
2577
- error: import("../types/actions/errors.js").ActionError<unknown>;
2578
- })[];
651
+ }[];
2579
652
  } | undefined;
2580
653
  toolResults?: {
2581
- toolName: string;
2582
- toolCallId: string;
654
+ id: string;
655
+ name: string;
2583
656
  result?: unknown;
2584
- error?: 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;
2585
668
  }[] | undefined;
2586
669
  personalityContext?: {
2587
670
  channel: "text" | "voice";
2588
671
  } | undefined;
672
+ requestId?: string | undefined;
2589
673
  }>;
2590
674
  //# sourceMappingURL=chatRequestBody.d.ts.map