@illalabs/interfaces 0.3.0-canary.1a98d5f6 → 0.3.0-canary.2c2d50f5

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 (94) 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/tools/bridgeAction.d.ts +1 -1
  49. package/dist/types/actions/tools/bridgeAction.d.ts.map +1 -1
  50. package/dist/types/actions/tools/defiFetchListingsAction.d.ts +1 -2
  51. package/dist/types/actions/tools/defiFetchListingsAction.d.ts.map +1 -1
  52. package/dist/types/actions/tools/defiFetchListingsAction.js +1 -1
  53. package/dist/types/actions/tools/defiFetchListingsAction.js.map +1 -1
  54. package/dist/types/actions/tools/defiPositionsAction.d.ts +1 -2
  55. package/dist/types/actions/tools/defiPositionsAction.d.ts.map +1 -1
  56. package/dist/types/actions/tools/defiPositionsAction.js +1 -1
  57. package/dist/types/actions/tools/defiPositionsAction.js.map +1 -1
  58. package/dist/types/actions/tools/defiSupplyAction.d.ts +1 -2
  59. package/dist/types/actions/tools/defiSupplyAction.d.ts.map +1 -1
  60. package/dist/types/actions/tools/defiSupplyAction.js +1 -1
  61. package/dist/types/actions/tools/defiSupplyAction.js.map +1 -1
  62. package/dist/types/actions/tools/defiWithdrawAction.d.ts +1 -2
  63. package/dist/types/actions/tools/defiWithdrawAction.d.ts.map +1 -1
  64. package/dist/types/actions/tools/defiWithdrawAction.js +1 -1
  65. package/dist/types/actions/tools/defiWithdrawAction.js.map +1 -1
  66. package/dist/types/actions/tools/exchangeRateAction.d.ts +1 -2
  67. package/dist/types/actions/tools/exchangeRateAction.d.ts.map +1 -1
  68. package/dist/types/actions/tools/exchangeRateAction.js +1 -1
  69. package/dist/types/actions/tools/exchangeRateAction.js.map +1 -1
  70. package/dist/types/actions/tools/getWalletBalanceAction.d.ts +2 -2
  71. package/dist/types/actions/tools/getWalletBalanceAction.d.ts.map +1 -1
  72. package/dist/types/actions/tools/getWalletBalanceAction.js +1 -1
  73. package/dist/types/actions/tools/getWalletBalanceAction.js.map +1 -1
  74. package/dist/types/actions/tools/tokenTransferAction.d.ts +1 -2
  75. package/dist/types/actions/tools/tokenTransferAction.d.ts.map +1 -1
  76. package/dist/types/actions/tools/tokenTransferAction.js +1 -1
  77. package/dist/types/actions/tools/tokenTransferAction.js.map +1 -1
  78. package/dist/types/index.d.ts +2 -0
  79. package/dist/types/index.d.ts.map +1 -1
  80. package/dist/types/index.js +2 -0
  81. package/dist/types/index.js.map +1 -1
  82. package/dist/types/messages.d.ts +3 -6
  83. package/dist/types/messages.d.ts.map +1 -1
  84. package/dist/types/messages.js +1 -1
  85. package/dist/types/messages.js.map +1 -1
  86. package/dist/types/streaming.d.ts +81 -0
  87. package/dist/types/streaming.d.ts.map +1 -0
  88. package/dist/types/streaming.js +2 -0
  89. package/dist/types/streaming.js.map +1 -0
  90. package/dist/types/telemetry.d.ts +139 -0
  91. package/dist/types/telemetry.d.ts.map +1 -0
  92. package/dist/types/telemetry.js +7 -0
  93. package/dist/types/telemetry.js.map +1 -0
  94. package/package.json +4 -4
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pick<{
2
+ export declare const ChatContextSchema: z.ZodObject<Pick<{
3
3
  toolsConfig: z.ZodObject<{
4
4
  autoRouter: z.ZodOptional<z.ZodObject<{
5
5
  defi: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
@@ -87,8 +87,8 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
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 ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
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,7 +191,8 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
761
191
  }, {
762
192
  channel: "text" | "voice";
763
193
  }>>>;
764
- }, "messages">, {
194
+ requestId: z.ZodOptional<z.ZodString>;
195
+ }, "messages"> & {
765
196
  toolsConfig: z.ZodObject<{
766
197
  autoRouter: z.ZodOptional<z.ZodObject<{
767
198
  defi: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
@@ -840,7 +271,7 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
840
271
  swapOrBridge?: "lifi" | undefined;
841
272
  } | undefined;
842
273
  }>;
843
- }>, "strip", z.ZodTypeAny, {
274
+ }, "strip", z.ZodTypeAny, {
844
275
  toolsConfig: {
845
276
  autoRouter?: {
846
277
  defi?: {