@illalabs/interfaces 0.3.0-canary.9f7bb0cd → 0.3.0-canary.b219e329

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 (114) 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 +83 -649
  10. package/dist/schemas/chatContext.d.ts.map +1 -1
  11. package/dist/schemas/chatRequestBody.d.ts +276 -2180
  12. package/dist/schemas/chatRequestBody.d.ts.map +1 -1
  13. package/dist/schemas/chatRequestBody.js +6 -4
  14. package/dist/schemas/chatRequestBody.js.map +1 -1
  15. package/dist/schemas/executionCheckerQueryParams.d.ts +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 +3 -0
  21. package/dist/schemas/index.d.ts.map +1 -1
  22. package/dist/schemas/index.js +3 -0
  23. package/dist/schemas/index.js.map +1 -1
  24. package/dist/schemas/messages.d.ts +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 +23 -0
  29. package/dist/schemas/modelContext.d.ts.map +1 -0
  30. package/dist/schemas/modelContext.js +13 -0
  31. package/dist/schemas/modelContext.js.map +1 -0
  32. package/dist/schemas/telemetryEvents.d.ts +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/schemas/userContext.d.ts +3 -0
  37. package/dist/schemas/userContext.d.ts.map +1 -1
  38. package/dist/schemas/userContext.js +4 -0
  39. package/dist/schemas/userContext.js.map +1 -1
  40. package/dist/tools/IllaToolError.d.ts +117 -0
  41. package/dist/tools/IllaToolError.d.ts.map +1 -0
  42. package/dist/tools/IllaToolError.js +147 -0
  43. package/dist/tools/IllaToolError.js.map +1 -0
  44. package/dist/tools/IllaToolOutcome.d.ts +131 -0
  45. package/dist/tools/IllaToolOutcome.d.ts.map +1 -0
  46. package/dist/tools/IllaToolOutcome.js +191 -0
  47. package/dist/tools/IllaToolOutcome.js.map +1 -0
  48. package/dist/tools/index.d.ts +3 -0
  49. package/dist/tools/index.d.ts.map +1 -0
  50. package/dist/tools/index.js +3 -0
  51. package/dist/tools/index.js.map +1 -0
  52. package/dist/types/actions/inputs.d.ts +4 -2
  53. package/dist/types/actions/inputs.d.ts.map +1 -1
  54. package/dist/types/actions/tools/bridgeAction.d.ts +1 -1
  55. package/dist/types/actions/tools/bridgeAction.d.ts.map +1 -1
  56. package/dist/types/actions/tools/defiFetchListingsAction.d.ts +1 -2
  57. package/dist/types/actions/tools/defiFetchListingsAction.d.ts.map +1 -1
  58. package/dist/types/actions/tools/defiFetchListingsAction.js +1 -1
  59. package/dist/types/actions/tools/defiFetchListingsAction.js.map +1 -1
  60. package/dist/types/actions/tools/defiPositionsAction.d.ts +1 -2
  61. package/dist/types/actions/tools/defiPositionsAction.d.ts.map +1 -1
  62. package/dist/types/actions/tools/defiPositionsAction.js +1 -1
  63. package/dist/types/actions/tools/defiPositionsAction.js.map +1 -1
  64. package/dist/types/actions/tools/defiSupplyAction.d.ts +1 -2
  65. package/dist/types/actions/tools/defiSupplyAction.d.ts.map +1 -1
  66. package/dist/types/actions/tools/defiSupplyAction.js +1 -1
  67. package/dist/types/actions/tools/defiSupplyAction.js.map +1 -1
  68. package/dist/types/actions/tools/defiWithdrawAction.d.ts +1 -2
  69. package/dist/types/actions/tools/defiWithdrawAction.d.ts.map +1 -1
  70. package/dist/types/actions/tools/defiWithdrawAction.js +1 -1
  71. package/dist/types/actions/tools/defiWithdrawAction.js.map +1 -1
  72. package/dist/types/actions/tools/exchangeRateAction.d.ts +1 -2
  73. package/dist/types/actions/tools/exchangeRateAction.d.ts.map +1 -1
  74. package/dist/types/actions/tools/exchangeRateAction.js +1 -1
  75. package/dist/types/actions/tools/exchangeRateAction.js.map +1 -1
  76. package/dist/types/actions/tools/getWalletBalanceAction.d.ts +4 -3
  77. package/dist/types/actions/tools/getWalletBalanceAction.d.ts.map +1 -1
  78. package/dist/types/actions/tools/getWalletBalanceAction.js +1 -1
  79. package/dist/types/actions/tools/getWalletBalanceAction.js.map +1 -1
  80. package/dist/types/actions/tools/index.d.ts +6 -0
  81. package/dist/types/actions/tools/index.d.ts.map +1 -1
  82. package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts +21 -0
  83. package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts.map +1 -0
  84. package/dist/types/actions/tools/predictionMarketsFetchAction.js +2 -0
  85. package/dist/types/actions/tools/predictionMarketsFetchAction.js.map +1 -0
  86. package/dist/types/actions/tools/predictionMarketsPositionsAction.d.ts +25 -0
  87. package/dist/types/actions/tools/predictionMarketsPositionsAction.d.ts.map +1 -0
  88. package/dist/types/actions/tools/predictionMarketsPositionsAction.js +2 -0
  89. package/dist/types/actions/tools/predictionMarketsPositionsAction.js.map +1 -0
  90. package/dist/types/actions/tools/tokenTransferAction.d.ts +1 -2
  91. package/dist/types/actions/tools/tokenTransferAction.d.ts.map +1 -1
  92. package/dist/types/actions/tools/tokenTransferAction.js +1 -1
  93. package/dist/types/actions/tools/tokenTransferAction.js.map +1 -1
  94. package/dist/types/index.d.ts +2 -0
  95. package/dist/types/index.d.ts.map +1 -1
  96. package/dist/types/index.js +2 -0
  97. package/dist/types/index.js.map +1 -1
  98. package/dist/types/messages.d.ts +3 -6
  99. package/dist/types/messages.d.ts.map +1 -1
  100. package/dist/types/messages.js +1 -1
  101. package/dist/types/messages.js.map +1 -1
  102. package/dist/types/streaming.d.ts +81 -0
  103. package/dist/types/streaming.d.ts.map +1 -0
  104. package/dist/types/streaming.js +2 -0
  105. package/dist/types/streaming.js.map +1 -0
  106. package/dist/types/telemetry.d.ts +139 -0
  107. package/dist/types/telemetry.d.ts.map +1 -0
  108. package/dist/types/telemetry.js +7 -0
  109. package/dist/types/telemetry.js.map +1 -0
  110. package/dist/utils/constants.d.ts +6 -4
  111. package/dist/utils/constants.d.ts.map +1 -1
  112. package/dist/utils/constants.js +16 -2
  113. package/dist/utils/constants.js.map +1 -1
  114. 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<{
@@ -81,14 +81,17 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
81
81
  messages: z.ZodArray<z.ZodType<import("@ai-sdk/provider-utils").ModelMessage, z.ZodTypeDef, import("@ai-sdk/provider-utils").ModelMessage>, "many">;
82
82
  userContext: z.ZodObject<{
83
83
  address: z.ZodEffects<z.ZodString, `0x${string}`, string>;
84
+ signerWallet: z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
84
85
  }, "strict", z.ZodTypeAny, {
85
86
  address: `0x${string}`;
87
+ signerWallet?: `0x${string}` | undefined;
86
88
  }, {
87
89
  address: string;
90
+ signerWallet?: string | undefined;
88
91
  }>;
89
92
  prompt: z.ZodOptional<z.ZodObject<{
90
- role: z.ZodEnum<["user", "assistant", "tool", "system"]>;
91
- content: z.ZodArray<z.ZodUnion<[z.ZodObject<{
93
+ role: z.ZodLiteral<"user">;
94
+ content: z.ZodArray<z.ZodObject<{
92
95
  type: z.ZodLiteral<"text">;
93
96
  text: z.ZodString;
94
97
  }, "strict", z.ZodTypeAny, {
@@ -97,663 +100,93 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
97
100
  }, {
98
101
  type: "text";
99
102
  text: string;
100
- }>, z.ZodDiscriminatedUnion<"toolName", [z.ZodObject<{
101
- type: z.ZodLiteral<"tool-call">;
102
- toolCallId: z.ZodString;
103
- toolName: z.ZodLiteral<"tokenTransfer">;
104
- args: z.ZodType<import("../external.js").TokenTransferActionInput>;
105
- }, "strict", z.ZodTypeAny, {
106
- type: "tool-call";
107
- toolName: "tokenTransfer";
108
- toolCallId: string;
109
- args: {
110
- fromAddress: string;
111
- toAddress: string;
112
- amount: string;
113
- token: string;
114
- chain: string;
115
- missingParameters?: string[] | undefined;
116
- humanFriendlyMessage?: string | undefined;
117
- };
118
- }, {
119
- type: "tool-call";
120
- toolName: "tokenTransfer";
121
- toolCallId: string;
122
- args: {
123
- fromAddress: string;
124
- toAddress: string;
125
- amount: string;
126
- token: string;
127
- chain: string;
128
- missingParameters?: string[] | undefined;
129
- humanFriendlyMessage?: string | undefined;
130
- };
131
- }>, z.ZodObject<{
132
- type: z.ZodLiteral<"tool-call">;
133
- toolCallId: z.ZodString;
134
- toolName: z.ZodLiteral<"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">;
103
+ }>, "many">;
445
104
  }, "strict", z.ZodTypeAny, {
446
- role: "user" | "assistant" | "tool" | "system";
447
- content: ({
105
+ role: "user";
106
+ content: {
448
107
  type: "text";
449
108
  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
- })[];
109
+ }[];
592
110
  }, {
593
- role: "user" | "assistant" | "tool" | "system";
594
- content: ({
111
+ role: "user";
112
+ content: {
595
113
  type: "text";
596
114
  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
- })[];
115
+ }[];
739
116
  }>>;
740
117
  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>;
118
+ id: z.ZodString;
119
+ name: z.ZodString;
120
+ result: z.ZodOptional<z.ZodUnknown>;
121
+ error: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
122
+ type: z.ZodLiteral<"input">;
123
+ errors: z.ZodArray<z.ZodObject<{
124
+ path: z.ZodString;
125
+ message: z.ZodString;
126
+ }, "strict", z.ZodTypeAny, {
127
+ path: string;
128
+ message: string;
129
+ }, {
130
+ path: string;
131
+ message: string;
132
+ }>, "many">;
133
+ }, "strict", z.ZodTypeAny, {
134
+ type: "input";
135
+ errors: {
136
+ path: string;
137
+ message: string;
138
+ }[];
139
+ }, {
140
+ type: "input";
141
+ errors: {
142
+ path: string;
143
+ message: string;
144
+ }[];
145
+ }>, z.ZodObject<{
146
+ type: z.ZodLiteral<"execution">;
147
+ message: z.ZodString;
148
+ details: z.ZodOptional<z.ZodUnknown>;
149
+ }, "strict", z.ZodTypeAny, {
150
+ message: string;
151
+ type: "execution";
152
+ details?: unknown;
153
+ }, {
154
+ message: string;
155
+ type: "execution";
156
+ details?: unknown;
157
+ }>]>>;
745
158
  }, "strict", z.ZodTypeAny, {
746
- toolName: string;
747
- toolCallId: string;
159
+ id: string;
160
+ name: string;
748
161
  result?: unknown;
749
- error?: unknown;
162
+ error?: {
163
+ type: "input";
164
+ errors: {
165
+ path: string;
166
+ message: string;
167
+ }[];
168
+ } | {
169
+ message: string;
170
+ type: "execution";
171
+ details?: unknown;
172
+ } | undefined;
750
173
  }, {
751
- toolName: string;
752
- toolCallId: string;
174
+ id: string;
175
+ name: string;
753
176
  result?: unknown;
754
- error?: unknown;
177
+ error?: {
178
+ type: "input";
179
+ errors: {
180
+ path: string;
181
+ message: string;
182
+ }[];
183
+ } | {
184
+ message: string;
185
+ type: "execution";
186
+ details?: unknown;
187
+ } | undefined;
755
188
  }>, "many">>;
756
- languageModel: z.ZodOptional<z.ZodString>;
189
+ languageModel: z.ZodString;
757
190
  personalityContext: z.ZodDefault<z.ZodOptional<z.ZodObject<{
758
191
  channel: z.ZodEnum<["voice", "text"]>;
759
192
  }, "strip", z.ZodTypeAny, {
@@ -761,7 +194,8 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
761
194
  }, {
762
195
  channel: "text" | "voice";
763
196
  }>>>;
764
- }, "messages">, {
197
+ requestId: z.ZodOptional<z.ZodString>;
198
+ }, "messages"> & {
765
199
  toolsConfig: z.ZodObject<{
766
200
  autoRouter: z.ZodOptional<z.ZodObject<{
767
201
  defi: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
@@ -840,7 +274,7 @@ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
840
274
  swapOrBridge?: "lifi" | undefined;
841
275
  } | undefined;
842
276
  }>;
843
- }>, "strip", z.ZodTypeAny, {
277
+ }, "strip", z.ZodTypeAny, {
844
278
  toolsConfig: {
845
279
  autoRouter?: {
846
280
  defi?: {