@illalabs/interfaces 0.1.0 → 0.2.0

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 (87) hide show
  1. package/dist/external.d.ts +3 -0
  2. package/dist/external.d.ts.map +1 -1
  3. package/dist/external.js +3 -0
  4. package/dist/external.js.map +1 -1
  5. package/dist/interfaces/base.d.ts +1 -1
  6. package/dist/interfaces/base.d.ts.map +1 -1
  7. package/dist/interfaces/chat/response.d.ts +2 -2
  8. package/dist/interfaces/chat/response.d.ts.map +1 -1
  9. package/dist/interfaces/index.d.ts +1 -0
  10. package/dist/interfaces/index.d.ts.map +1 -1
  11. package/dist/interfaces/index.js +1 -0
  12. package/dist/interfaces/index.js.map +1 -1
  13. package/dist/schemas/chatContext.d.ts +505 -50
  14. package/dist/schemas/chatContext.d.ts.map +1 -1
  15. package/dist/schemas/chatRequestBody.d.ts +747 -78
  16. package/dist/schemas/chatRequestBody.d.ts.map +1 -1
  17. package/dist/schemas/chatRequestBody.js +3 -0
  18. package/dist/schemas/chatRequestBody.js.map +1 -1
  19. package/dist/schemas/index.d.ts +1 -0
  20. package/dist/schemas/index.d.ts.map +1 -1
  21. package/dist/schemas/index.js +1 -0
  22. package/dist/schemas/index.js.map +1 -1
  23. package/dist/schemas/messages.d.ts +921 -77
  24. package/dist/schemas/messages.d.ts.map +1 -1
  25. package/dist/schemas/messages.js +105 -12
  26. package/dist/schemas/messages.js.map +1 -1
  27. package/dist/schemas/personalityContext.d.ts +12 -0
  28. package/dist/schemas/personalityContext.d.ts.map +1 -0
  29. package/dist/schemas/personalityContext.js +9 -0
  30. package/dist/schemas/personalityContext.js.map +1 -0
  31. package/dist/types/actions/errors.d.ts +67 -0
  32. package/dist/types/actions/errors.d.ts.map +1 -0
  33. package/dist/types/actions/errors.js +5 -0
  34. package/dist/types/actions/errors.js.map +1 -0
  35. package/dist/types/actions/index.d.ts +4 -0
  36. package/dist/types/actions/index.d.ts.map +1 -0
  37. package/dist/types/actions/index.js +4 -0
  38. package/dist/types/actions/index.js.map +1 -0
  39. package/dist/types/actions/inputs.d.ts +16 -0
  40. package/dist/types/actions/inputs.d.ts.map +1 -0
  41. package/dist/types/actions/inputs.js +2 -0
  42. package/dist/types/actions/inputs.js.map +1 -0
  43. package/dist/types/actions/outputs.d.ts +40 -0
  44. package/dist/types/actions/outputs.d.ts.map +1 -0
  45. package/dist/types/actions/outputs.js +2 -0
  46. package/dist/types/actions/outputs.js.map +1 -0
  47. package/dist/types/actions/tools/defiFetchListingsAction.d.ts +14 -0
  48. package/dist/types/actions/tools/defiFetchListingsAction.d.ts.map +1 -0
  49. package/dist/types/actions/tools/defiFetchListingsAction.js +2 -0
  50. package/dist/types/actions/tools/defiFetchListingsAction.js.map +1 -0
  51. package/dist/types/actions/tools/defiPositionsAction.d.ts +26 -0
  52. package/dist/types/actions/tools/defiPositionsAction.d.ts.map +1 -0
  53. package/dist/types/actions/tools/defiPositionsAction.js +2 -0
  54. package/dist/types/actions/tools/defiPositionsAction.js.map +1 -0
  55. package/dist/types/actions/tools/defiSupplyAction.d.ts +14 -0
  56. package/dist/types/actions/tools/defiSupplyAction.d.ts.map +1 -0
  57. package/dist/types/actions/tools/defiSupplyAction.js +2 -0
  58. package/dist/types/actions/tools/defiSupplyAction.js.map +1 -0
  59. package/dist/types/actions/tools/defiWithdrawAction.d.ts +14 -0
  60. package/dist/types/actions/tools/defiWithdrawAction.d.ts.map +1 -0
  61. package/dist/types/actions/tools/defiWithdrawAction.js +2 -0
  62. package/dist/types/actions/tools/defiWithdrawAction.js.map +1 -0
  63. package/dist/types/actions/tools/exchangeRateAction.d.ts +16 -0
  64. package/dist/types/actions/tools/exchangeRateAction.d.ts.map +1 -0
  65. package/dist/types/actions/tools/exchangeRateAction.js +2 -0
  66. package/dist/types/actions/tools/exchangeRateAction.js.map +1 -0
  67. package/dist/types/actions/tools/getWalletBalanceAction.d.ts +13 -0
  68. package/dist/types/actions/tools/getWalletBalanceAction.d.ts.map +1 -0
  69. package/dist/types/actions/tools/getWalletBalanceAction.js +2 -0
  70. package/dist/types/actions/tools/getWalletBalanceAction.js.map +1 -0
  71. package/dist/types/actions/tools/index.d.ts +37 -0
  72. package/dist/types/actions/tools/index.d.ts.map +1 -0
  73. package/dist/types/actions/tools/index.js +2 -0
  74. package/dist/types/actions/tools/index.js.map +1 -0
  75. package/dist/types/actions/tools/swapBridgeAction.d.ts +17 -0
  76. package/dist/types/actions/tools/swapBridgeAction.d.ts.map +1 -0
  77. package/dist/types/actions/tools/swapBridgeAction.js +2 -0
  78. package/dist/types/actions/tools/swapBridgeAction.js.map +1 -0
  79. package/dist/types/actions/tools/tokenTransferAction.d.ts +13 -0
  80. package/dist/types/actions/tools/tokenTransferAction.d.ts.map +1 -0
  81. package/dist/types/actions/tools/tokenTransferAction.js +2 -0
  82. package/dist/types/actions/tools/tokenTransferAction.js.map +1 -0
  83. package/dist/types/messages.d.ts +2 -1
  84. package/dist/types/messages.d.ts.map +1 -1
  85. package/dist/types/messages.js +1 -1
  86. package/dist/types/messages.js.map +1 -1
  87. package/package.json +1 -1
@@ -88,7 +88,7 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
88
88
  }>;
89
89
  prompt: z.ZodObject<{
90
90
  role: z.ZodEnum<["user", "assistant", "tool", "system"]>;
91
- content: z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
91
+ content: z.ZodArray<z.ZodUnion<[z.ZodObject<{
92
92
  type: z.ZodLiteral<"text">;
93
93
  text: z.ZodString;
94
94
  }, "strict", z.ZodTypeAny, {
@@ -97,35 +97,276 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
97
97
  }, {
98
98
  type: "text";
99
99
  text: string;
100
+ }>, z.ZodDiscriminatedUnion<"toolName", [z.ZodObject<{
101
+ type: z.ZodLiteral<"tool-call">;
102
+ toolCallId: z.ZodString;
103
+ toolName: z.ZodLiteral<"tokenTransfer">;
104
+ args: z.ZodType<import("../external.js").TokenTransferActionInput>;
105
+ }, "strict", z.ZodTypeAny, {
106
+ type: "tool-call";
107
+ toolName: "tokenTransfer";
108
+ toolCallId: string;
109
+ args: {
110
+ fromAddress: string;
111
+ toAddress: string;
112
+ amount: string;
113
+ token: string;
114
+ chain: string;
115
+ missingParameters?: string[] | undefined;
116
+ humanFriendlyMessage?: string | undefined;
117
+ };
118
+ }, {
119
+ type: "tool-call";
120
+ toolName: "tokenTransfer";
121
+ toolCallId: string;
122
+ args: {
123
+ fromAddress: string;
124
+ toAddress: string;
125
+ amount: string;
126
+ token: string;
127
+ chain: string;
128
+ missingParameters?: string[] | undefined;
129
+ humanFriendlyMessage?: string | undefined;
130
+ };
100
131
  }>, z.ZodObject<{
101
132
  type: z.ZodLiteral<"tool-call">;
102
133
  toolCallId: z.ZodString;
103
- toolName: z.ZodString;
104
- args: z.ZodUnknown;
134
+ toolName: z.ZodLiteral<"swapOrBridge">;
135
+ args: z.ZodType<import("../external.js").SwapBridgeActionInput>;
105
136
  }, "strict", z.ZodTypeAny, {
137
+ type: "tool-call";
138
+ toolName: "swapOrBridge";
106
139
  toolCallId: string;
107
- toolName: string;
140
+ args: {
141
+ fromAddress: string;
142
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
143
+ fromToken: string;
144
+ fromAmount: string;
145
+ protocol: "lifi";
146
+ toAddress?: string | undefined;
147
+ missingParameters?: string[] | undefined;
148
+ humanFriendlyMessage?: string | undefined;
149
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
150
+ toToken?: string | undefined;
151
+ toAmount?: string | undefined;
152
+ };
153
+ }, {
108
154
  type: "tool-call";
109
- args?: unknown;
155
+ toolName: "swapOrBridge";
156
+ toolCallId: string;
157
+ args: {
158
+ fromAddress: string;
159
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
160
+ fromToken: string;
161
+ fromAmount: string;
162
+ protocol: "lifi";
163
+ toAddress?: string | undefined;
164
+ missingParameters?: string[] | undefined;
165
+ humanFriendlyMessage?: string | undefined;
166
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
167
+ toToken?: string | undefined;
168
+ toAmount?: string | undefined;
169
+ };
170
+ }>, z.ZodObject<{
171
+ type: z.ZodLiteral<"tool-call">;
172
+ toolCallId: z.ZodString;
173
+ toolName: z.ZodLiteral<"exchangeRate">;
174
+ args: z.ZodType<import("../external.js").ExchangeRateActionInput>;
175
+ }, "strict", z.ZodTypeAny, {
176
+ type: "tool-call";
177
+ toolName: "exchangeRate";
178
+ toolCallId: string;
179
+ args: {
180
+ provider: "coinMarketCap";
181
+ arguments: {
182
+ baseCurrency: string;
183
+ quoteCurrency: string;
184
+ baseAmount?: string | undefined;
185
+ quoteAmount?: string | undefined;
186
+ }[];
187
+ missingParameters?: string[] | undefined;
188
+ humanFriendlyMessage?: string | undefined;
189
+ };
110
190
  }, {
191
+ type: "tool-call";
192
+ toolName: "exchangeRate";
111
193
  toolCallId: string;
112
- toolName: string;
194
+ args: {
195
+ provider: "coinMarketCap";
196
+ arguments: {
197
+ baseCurrency: string;
198
+ quoteCurrency: string;
199
+ baseAmount?: string | undefined;
200
+ quoteAmount?: string | undefined;
201
+ }[];
202
+ missingParameters?: string[] | undefined;
203
+ humanFriendlyMessage?: string | undefined;
204
+ };
205
+ }>, z.ZodObject<{
206
+ type: z.ZodLiteral<"tool-call">;
207
+ toolCallId: z.ZodString;
208
+ toolName: z.ZodLiteral<"getWalletBalance">;
209
+ args: z.ZodType<import("../external.js").GetWalletBalanceActionInput>;
210
+ }, "strict", z.ZodTypeAny, {
113
211
  type: "tool-call";
114
- args?: unknown;
212
+ toolName: "getWalletBalance";
213
+ toolCallId: string;
214
+ args: {
215
+ address: string;
216
+ provider: "moralis";
217
+ token?: string | undefined;
218
+ chain?: string | undefined;
219
+ missingParameters?: string[] | undefined;
220
+ humanFriendlyMessage?: string | undefined;
221
+ };
222
+ }, {
223
+ type: "tool-call";
224
+ toolName: "getWalletBalance";
225
+ toolCallId: string;
226
+ args: {
227
+ address: string;
228
+ provider: "moralis";
229
+ token?: string | undefined;
230
+ chain?: string | undefined;
231
+ missingParameters?: string[] | undefined;
232
+ humanFriendlyMessage?: string | undefined;
233
+ };
234
+ }>, z.ZodObject<{
235
+ type: z.ZodLiteral<"tool-call">;
236
+ toolCallId: z.ZodString;
237
+ toolName: z.ZodLiteral<"defiFetchListings">;
238
+ args: z.ZodType<import("../external.js").DefiFetchListingsActionInput>;
239
+ }, "strict", z.ZodTypeAny, {
240
+ type: "tool-call";
241
+ toolName: "defiFetchListings";
242
+ toolCallId: string;
243
+ args: {
244
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
245
+ protocol: "aave";
246
+ missingParameters?: string[] | undefined;
247
+ humanFriendlyMessage?: string | undefined;
248
+ tokens?: string[] | undefined;
249
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
250
+ limit?: number | undefined;
251
+ };
252
+ }, {
253
+ type: "tool-call";
254
+ toolName: "defiFetchListings";
255
+ toolCallId: string;
256
+ args: {
257
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
258
+ protocol: "aave";
259
+ missingParameters?: string[] | undefined;
260
+ humanFriendlyMessage?: string | undefined;
261
+ tokens?: string[] | undefined;
262
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
263
+ limit?: number | undefined;
264
+ };
265
+ }>, z.ZodObject<{
266
+ type: z.ZodLiteral<"tool-call">;
267
+ toolCallId: z.ZodString;
268
+ toolName: z.ZodLiteral<"defiSupply">;
269
+ args: z.ZodType<import("../external.js").DefiSupplyActionInput>;
270
+ }, "strict", z.ZodTypeAny, {
271
+ type: "tool-call";
272
+ toolName: "defiSupply";
273
+ toolCallId: string;
274
+ args: {
275
+ amount: string;
276
+ token: string;
277
+ chain: string;
278
+ protocol: "aave";
279
+ userAddress: string;
280
+ missingParameters?: string[] | undefined;
281
+ humanFriendlyMessage?: string | undefined;
282
+ };
283
+ }, {
284
+ type: "tool-call";
285
+ toolName: "defiSupply";
286
+ toolCallId: string;
287
+ args: {
288
+ amount: string;
289
+ token: string;
290
+ chain: string;
291
+ protocol: "aave";
292
+ userAddress: string;
293
+ missingParameters?: string[] | undefined;
294
+ humanFriendlyMessage?: string | undefined;
295
+ };
115
296
  }>, z.ZodObject<{
297
+ type: z.ZodLiteral<"tool-call">;
298
+ toolCallId: z.ZodString;
299
+ toolName: z.ZodLiteral<"defiWithdraw">;
300
+ args: z.ZodType<import("../external.js").DefiWithdrawActionInput>;
301
+ }, "strict", z.ZodTypeAny, {
302
+ type: "tool-call";
303
+ toolName: "defiWithdraw";
304
+ toolCallId: string;
305
+ args: {
306
+ amount: string;
307
+ token: string;
308
+ chain: string;
309
+ protocol: "aave";
310
+ userAddress: string;
311
+ missingParameters?: string[] | undefined;
312
+ humanFriendlyMessage?: string | undefined;
313
+ };
314
+ }, {
315
+ type: "tool-call";
316
+ toolName: "defiWithdraw";
317
+ toolCallId: string;
318
+ args: {
319
+ amount: string;
320
+ token: string;
321
+ chain: string;
322
+ protocol: "aave";
323
+ userAddress: string;
324
+ missingParameters?: string[] | undefined;
325
+ humanFriendlyMessage?: string | undefined;
326
+ };
327
+ }>, z.ZodObject<{
328
+ type: z.ZodLiteral<"tool-call">;
329
+ toolCallId: z.ZodString;
330
+ toolName: z.ZodLiteral<"defiPositions">;
331
+ args: z.ZodType<import("../external.js").DefiPositionsActionInput>;
332
+ }, "strict", z.ZodTypeAny, {
333
+ type: "tool-call";
334
+ toolName: "defiPositions";
335
+ toolCallId: string;
336
+ args: {
337
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
338
+ protocol: "aave";
339
+ userAddress: string;
340
+ missingParameters?: string[] | undefined;
341
+ humanFriendlyMessage?: string | undefined;
342
+ tokens?: string[] | undefined;
343
+ };
344
+ }, {
345
+ type: "tool-call";
346
+ toolName: "defiPositions";
347
+ toolCallId: string;
348
+ args: {
349
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
350
+ protocol: "aave";
351
+ userAddress: string;
352
+ missingParameters?: string[] | undefined;
353
+ humanFriendlyMessage?: string | undefined;
354
+ tokens?: string[] | undefined;
355
+ };
356
+ }>]>, z.ZodObject<{
116
357
  type: z.ZodLiteral<"tool-result">;
117
358
  toolCallId: z.ZodString;
118
359
  toolName: z.ZodString;
119
360
  result: z.ZodUnknown;
120
361
  }, "strict", z.ZodTypeAny, {
121
- toolCallId: string;
122
- toolName: string;
123
362
  type: "tool-result";
363
+ toolName: string;
364
+ toolCallId: string;
124
365
  result?: unknown;
125
366
  }, {
126
- toolCallId: string;
127
- toolName: string;
128
367
  type: "tool-result";
368
+ toolName: string;
369
+ toolCallId: string;
129
370
  result?: unknown;
130
371
  }>, z.ZodObject<{
131
372
  type: z.ZodLiteral<"tool-incomplete">;
@@ -135,16 +376,16 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
135
376
  missingParams: z.ZodArray<z.ZodString, "many">;
136
377
  humanReadableDescription: z.ZodString;
137
378
  }, "strict", z.ZodTypeAny, {
138
- toolCallId: string;
139
- toolName: string;
140
379
  type: "tool-incomplete";
380
+ toolName: string;
381
+ toolCallId: string;
141
382
  missingParams: string[];
142
383
  humanReadableDescription: string;
143
384
  args?: unknown;
144
385
  }, {
145
- toolCallId: string;
146
- toolName: string;
147
386
  type: "tool-incomplete";
387
+ toolName: string;
388
+ toolCallId: string;
148
389
  missingParams: string[];
149
390
  humanReadableDescription: string;
150
391
  args?: unknown;
@@ -152,75 +393,289 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
152
393
  type: z.ZodLiteral<"tool-error">;
153
394
  toolCallId: z.ZodString;
154
395
  toolName: z.ZodString;
155
- error: z.ZodUnknown;
396
+ error: z.ZodType<import("../types/actions/errors.js").ActionError<unknown>>;
156
397
  }, "strict", z.ZodTypeAny, {
157
- toolCallId: string;
158
- toolName: string;
159
398
  type: "tool-error";
160
- error?: unknown;
161
- }, {
162
- toolCallId: string;
163
399
  toolName: string;
400
+ toolCallId: string;
401
+ error: import("../types/actions/errors.js").ActionError<unknown>;
402
+ }, {
164
403
  type: "tool-error";
165
- error?: unknown;
166
- }>]>, "many">, z.ZodString]>;
404
+ toolName: string;
405
+ toolCallId: string;
406
+ error: import("../types/actions/errors.js").ActionError<unknown>;
407
+ }>]>, "many">;
167
408
  }, "strict", z.ZodTypeAny, {
168
409
  role: "user" | "assistant" | "tool" | "system";
169
- content: string | ({
410
+ content: ({
411
+ type: "text";
412
+ text: string;
413
+ } | {
414
+ type: "tool-call";
415
+ toolName: "tokenTransfer";
170
416
  toolCallId: string;
171
- toolName: string;
172
- type: "tool-incomplete";
173
- missingParams: string[];
174
- humanReadableDescription: string;
175
- args?: unknown;
417
+ args: {
418
+ fromAddress: string;
419
+ toAddress: string;
420
+ amount: string;
421
+ token: string;
422
+ chain: string;
423
+ missingParameters?: string[] | undefined;
424
+ humanFriendlyMessage?: string | undefined;
425
+ };
176
426
  } | {
427
+ type: "tool-call";
428
+ toolName: "swapOrBridge";
177
429
  toolCallId: string;
178
- toolName: string;
179
- type: "tool-error";
180
- error?: unknown;
430
+ args: {
431
+ fromAddress: string;
432
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
433
+ fromToken: string;
434
+ fromAmount: string;
435
+ protocol: "lifi";
436
+ toAddress?: string | undefined;
437
+ missingParameters?: string[] | undefined;
438
+ humanFriendlyMessage?: string | undefined;
439
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
440
+ toToken?: string | undefined;
441
+ toAmount?: string | undefined;
442
+ };
181
443
  } | {
182
- type: "text";
183
- text: string;
444
+ type: "tool-call";
445
+ toolName: "exchangeRate";
446
+ toolCallId: string;
447
+ args: {
448
+ provider: "coinMarketCap";
449
+ arguments: {
450
+ baseCurrency: string;
451
+ quoteCurrency: string;
452
+ baseAmount?: string | undefined;
453
+ quoteAmount?: string | undefined;
454
+ }[];
455
+ missingParameters?: string[] | undefined;
456
+ humanFriendlyMessage?: string | undefined;
457
+ };
184
458
  } | {
459
+ type: "tool-call";
460
+ toolName: "getWalletBalance";
185
461
  toolCallId: string;
186
- toolName: string;
462
+ args: {
463
+ address: string;
464
+ provider: "moralis";
465
+ token?: string | undefined;
466
+ chain?: string | undefined;
467
+ missingParameters?: string[] | undefined;
468
+ humanFriendlyMessage?: string | undefined;
469
+ };
470
+ } | {
187
471
  type: "tool-call";
188
- args?: unknown;
472
+ toolName: "defiFetchListings";
473
+ toolCallId: string;
474
+ args: {
475
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
476
+ protocol: "aave";
477
+ missingParameters?: string[] | undefined;
478
+ humanFriendlyMessage?: string | undefined;
479
+ tokens?: string[] | undefined;
480
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
481
+ limit?: number | undefined;
482
+ };
189
483
  } | {
484
+ type: "tool-call";
485
+ toolName: "defiSupply";
190
486
  toolCallId: string;
191
- toolName: string;
192
- type: "tool-result";
193
- result?: unknown;
194
- })[];
195
- }, {
196
- role: "user" | "assistant" | "tool" | "system";
197
- content: string | ({
487
+ args: {
488
+ amount: string;
489
+ token: string;
490
+ chain: string;
491
+ protocol: "aave";
492
+ userAddress: string;
493
+ missingParameters?: string[] | undefined;
494
+ humanFriendlyMessage?: string | undefined;
495
+ };
496
+ } | {
497
+ type: "tool-call";
498
+ toolName: "defiWithdraw";
499
+ toolCallId: string;
500
+ args: {
501
+ amount: string;
502
+ token: string;
503
+ chain: string;
504
+ protocol: "aave";
505
+ userAddress: string;
506
+ missingParameters?: string[] | undefined;
507
+ humanFriendlyMessage?: string | undefined;
508
+ };
509
+ } | {
510
+ type: "tool-call";
511
+ toolName: "defiPositions";
198
512
  toolCallId: string;
513
+ args: {
514
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
515
+ protocol: "aave";
516
+ userAddress: string;
517
+ missingParameters?: string[] | undefined;
518
+ humanFriendlyMessage?: string | undefined;
519
+ tokens?: string[] | undefined;
520
+ };
521
+ } | {
522
+ type: "tool-result";
199
523
  toolName: string;
524
+ toolCallId: string;
525
+ result?: unknown;
526
+ } | {
200
527
  type: "tool-incomplete";
528
+ toolName: string;
529
+ toolCallId: string;
201
530
  missingParams: string[];
202
531
  humanReadableDescription: string;
203
532
  args?: unknown;
204
533
  } | {
205
- toolCallId: string;
206
- toolName: string;
207
534
  type: "tool-error";
208
- error?: unknown;
209
- } | {
535
+ toolName: string;
536
+ toolCallId: string;
537
+ error: import("../types/actions/errors.js").ActionError<unknown>;
538
+ })[];
539
+ }, {
540
+ role: "user" | "assistant" | "tool" | "system";
541
+ content: ({
210
542
  type: "text";
211
543
  text: string;
212
544
  } | {
545
+ type: "tool-call";
546
+ toolName: "tokenTransfer";
213
547
  toolCallId: string;
214
- toolName: string;
548
+ args: {
549
+ fromAddress: string;
550
+ toAddress: string;
551
+ amount: string;
552
+ token: string;
553
+ chain: string;
554
+ missingParameters?: string[] | undefined;
555
+ humanFriendlyMessage?: string | undefined;
556
+ };
557
+ } | {
215
558
  type: "tool-call";
216
- args?: unknown;
559
+ toolName: "swapOrBridge";
560
+ toolCallId: string;
561
+ args: {
562
+ fromAddress: string;
563
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
564
+ fromToken: string;
565
+ fromAmount: string;
566
+ protocol: "lifi";
567
+ toAddress?: string | undefined;
568
+ missingParameters?: string[] | undefined;
569
+ humanFriendlyMessage?: string | undefined;
570
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
571
+ toToken?: string | undefined;
572
+ toAmount?: string | undefined;
573
+ };
574
+ } | {
575
+ type: "tool-call";
576
+ toolName: "exchangeRate";
577
+ toolCallId: string;
578
+ args: {
579
+ provider: "coinMarketCap";
580
+ arguments: {
581
+ baseCurrency: string;
582
+ quoteCurrency: string;
583
+ baseAmount?: string | undefined;
584
+ quoteAmount?: string | undefined;
585
+ }[];
586
+ missingParameters?: string[] | undefined;
587
+ humanFriendlyMessage?: string | undefined;
588
+ };
217
589
  } | {
590
+ type: "tool-call";
591
+ toolName: "getWalletBalance";
218
592
  toolCallId: string;
219
- toolName: string;
593
+ args: {
594
+ address: string;
595
+ provider: "moralis";
596
+ token?: string | undefined;
597
+ chain?: string | undefined;
598
+ missingParameters?: string[] | undefined;
599
+ humanFriendlyMessage?: string | undefined;
600
+ };
601
+ } | {
602
+ type: "tool-call";
603
+ toolName: "defiFetchListings";
604
+ toolCallId: string;
605
+ args: {
606
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
607
+ protocol: "aave";
608
+ missingParameters?: string[] | undefined;
609
+ humanFriendlyMessage?: string | undefined;
610
+ tokens?: string[] | undefined;
611
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
612
+ limit?: number | undefined;
613
+ };
614
+ } | {
615
+ type: "tool-call";
616
+ toolName: "defiSupply";
617
+ toolCallId: string;
618
+ args: {
619
+ amount: string;
620
+ token: string;
621
+ chain: string;
622
+ protocol: "aave";
623
+ userAddress: string;
624
+ missingParameters?: string[] | undefined;
625
+ humanFriendlyMessage?: string | undefined;
626
+ };
627
+ } | {
628
+ type: "tool-call";
629
+ toolName: "defiWithdraw";
630
+ toolCallId: string;
631
+ args: {
632
+ amount: string;
633
+ token: string;
634
+ chain: string;
635
+ protocol: "aave";
636
+ userAddress: string;
637
+ missingParameters?: string[] | undefined;
638
+ humanFriendlyMessage?: string | undefined;
639
+ };
640
+ } | {
641
+ type: "tool-call";
642
+ toolName: "defiPositions";
643
+ toolCallId: string;
644
+ args: {
645
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
646
+ protocol: "aave";
647
+ userAddress: string;
648
+ missingParameters?: string[] | undefined;
649
+ humanFriendlyMessage?: string | undefined;
650
+ tokens?: string[] | undefined;
651
+ };
652
+ } | {
220
653
  type: "tool-result";
654
+ toolName: string;
655
+ toolCallId: string;
221
656
  result?: unknown;
657
+ } | {
658
+ type: "tool-incomplete";
659
+ toolName: string;
660
+ toolCallId: string;
661
+ missingParams: string[];
662
+ humanReadableDescription: string;
663
+ args?: unknown;
664
+ } | {
665
+ type: "tool-error";
666
+ toolName: string;
667
+ toolCallId: string;
668
+ error: import("../types/actions/errors.js").ActionError<unknown>;
222
669
  })[];
223
670
  }>;
671
+ languageModel: z.ZodOptional<z.ZodString>;
672
+ personalityContext: z.ZodDefault<z.ZodOptional<z.ZodObject<{
673
+ channel: z.ZodEnum<["voice", "text"]>;
674
+ }, "strip", z.ZodTypeAny, {
675
+ channel: "text" | "voice";
676
+ }, {
677
+ channel: "text" | "voice";
678
+ }>>>;
224
679
  }, "strict", z.ZodTypeAny, {
225
680
  toolsConfig: {
226
681
  autoRouter?: {
@@ -242,33 +697,140 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
242
697
  };
243
698
  prompt: {
244
699
  role: "user" | "assistant" | "tool" | "system";
245
- content: string | ({
700
+ content: ({
701
+ type: "text";
702
+ text: string;
703
+ } | {
704
+ type: "tool-call";
705
+ toolName: "tokenTransfer";
246
706
  toolCallId: string;
247
- toolName: string;
248
- type: "tool-incomplete";
249
- missingParams: string[];
250
- humanReadableDescription: string;
251
- args?: unknown;
707
+ args: {
708
+ fromAddress: string;
709
+ toAddress: string;
710
+ amount: string;
711
+ token: string;
712
+ chain: string;
713
+ missingParameters?: string[] | undefined;
714
+ humanFriendlyMessage?: string | undefined;
715
+ };
252
716
  } | {
717
+ type: "tool-call";
718
+ toolName: "swapOrBridge";
253
719
  toolCallId: string;
254
- toolName: string;
255
- type: "tool-error";
256
- error?: unknown;
720
+ args: {
721
+ fromAddress: string;
722
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
723
+ fromToken: string;
724
+ fromAmount: string;
725
+ protocol: "lifi";
726
+ toAddress?: string | undefined;
727
+ missingParameters?: string[] | undefined;
728
+ humanFriendlyMessage?: string | undefined;
729
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
730
+ toToken?: string | undefined;
731
+ toAmount?: string | undefined;
732
+ };
257
733
  } | {
258
- type: "text";
259
- text: string;
734
+ type: "tool-call";
735
+ toolName: "exchangeRate";
736
+ toolCallId: string;
737
+ args: {
738
+ provider: "coinMarketCap";
739
+ arguments: {
740
+ baseCurrency: string;
741
+ quoteCurrency: string;
742
+ baseAmount?: string | undefined;
743
+ quoteAmount?: string | undefined;
744
+ }[];
745
+ missingParameters?: string[] | undefined;
746
+ humanFriendlyMessage?: string | undefined;
747
+ };
260
748
  } | {
749
+ type: "tool-call";
750
+ toolName: "getWalletBalance";
261
751
  toolCallId: string;
262
- toolName: string;
752
+ args: {
753
+ address: string;
754
+ provider: "moralis";
755
+ token?: string | undefined;
756
+ chain?: string | undefined;
757
+ missingParameters?: string[] | undefined;
758
+ humanFriendlyMessage?: string | undefined;
759
+ };
760
+ } | {
263
761
  type: "tool-call";
264
- args?: unknown;
762
+ toolName: "defiFetchListings";
763
+ toolCallId: string;
764
+ args: {
765
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
766
+ protocol: "aave";
767
+ missingParameters?: string[] | undefined;
768
+ humanFriendlyMessage?: string | undefined;
769
+ tokens?: string[] | undefined;
770
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
771
+ limit?: number | undefined;
772
+ };
265
773
  } | {
774
+ type: "tool-call";
775
+ toolName: "defiSupply";
266
776
  toolCallId: string;
267
- toolName: string;
777
+ args: {
778
+ amount: string;
779
+ token: string;
780
+ chain: string;
781
+ protocol: "aave";
782
+ userAddress: string;
783
+ missingParameters?: string[] | undefined;
784
+ humanFriendlyMessage?: string | undefined;
785
+ };
786
+ } | {
787
+ type: "tool-call";
788
+ toolName: "defiWithdraw";
789
+ toolCallId: string;
790
+ args: {
791
+ amount: string;
792
+ token: string;
793
+ chain: string;
794
+ protocol: "aave";
795
+ userAddress: string;
796
+ missingParameters?: string[] | undefined;
797
+ humanFriendlyMessage?: string | undefined;
798
+ };
799
+ } | {
800
+ type: "tool-call";
801
+ toolName: "defiPositions";
802
+ toolCallId: string;
803
+ args: {
804
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
805
+ protocol: "aave";
806
+ userAddress: string;
807
+ missingParameters?: string[] | undefined;
808
+ humanFriendlyMessage?: string | undefined;
809
+ tokens?: string[] | undefined;
810
+ };
811
+ } | {
268
812
  type: "tool-result";
813
+ toolName: string;
814
+ toolCallId: string;
269
815
  result?: unknown;
816
+ } | {
817
+ type: "tool-incomplete";
818
+ toolName: string;
819
+ toolCallId: string;
820
+ missingParams: string[];
821
+ humanReadableDescription: string;
822
+ args?: unknown;
823
+ } | {
824
+ type: "tool-error";
825
+ toolName: string;
826
+ toolCallId: string;
827
+ error: import("../types/actions/errors.js").ActionError<unknown>;
270
828
  })[];
271
829
  };
830
+ personalityContext: {
831
+ channel: "text" | "voice";
832
+ };
833
+ languageModel?: string | undefined;
272
834
  }, {
273
835
  toolsConfig: {
274
836
  autoRouter?: {
@@ -290,32 +852,139 @@ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
290
852
  };
291
853
  prompt: {
292
854
  role: "user" | "assistant" | "tool" | "system";
293
- content: string | ({
855
+ content: ({
856
+ type: "text";
857
+ text: string;
858
+ } | {
859
+ type: "tool-call";
860
+ toolName: "tokenTransfer";
294
861
  toolCallId: string;
295
- toolName: string;
296
- type: "tool-incomplete";
297
- missingParams: string[];
298
- humanReadableDescription: string;
299
- args?: unknown;
862
+ args: {
863
+ fromAddress: string;
864
+ toAddress: string;
865
+ amount: string;
866
+ token: string;
867
+ chain: string;
868
+ missingParameters?: string[] | undefined;
869
+ humanFriendlyMessage?: string | undefined;
870
+ };
300
871
  } | {
872
+ type: "tool-call";
873
+ toolName: "swapOrBridge";
301
874
  toolCallId: string;
302
- toolName: string;
303
- type: "tool-error";
304
- error?: unknown;
875
+ args: {
876
+ fromAddress: string;
877
+ fromChain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
878
+ fromToken: string;
879
+ fromAmount: string;
880
+ protocol: "lifi";
881
+ toAddress?: string | undefined;
882
+ missingParameters?: string[] | undefined;
883
+ humanFriendlyMessage?: string | undefined;
884
+ toChain?: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC" | undefined;
885
+ toToken?: string | undefined;
886
+ toAmount?: string | undefined;
887
+ };
305
888
  } | {
306
- type: "text";
307
- text: string;
889
+ type: "tool-call";
890
+ toolName: "exchangeRate";
891
+ toolCallId: string;
892
+ args: {
893
+ provider: "coinMarketCap";
894
+ arguments: {
895
+ baseCurrency: string;
896
+ quoteCurrency: string;
897
+ baseAmount?: string | undefined;
898
+ quoteAmount?: string | undefined;
899
+ }[];
900
+ missingParameters?: string[] | undefined;
901
+ humanFriendlyMessage?: string | undefined;
902
+ };
308
903
  } | {
904
+ type: "tool-call";
905
+ toolName: "getWalletBalance";
309
906
  toolCallId: string;
310
- toolName: string;
907
+ args: {
908
+ address: string;
909
+ provider: "moralis";
910
+ token?: string | undefined;
911
+ chain?: string | undefined;
912
+ missingParameters?: string[] | undefined;
913
+ humanFriendlyMessage?: string | undefined;
914
+ };
915
+ } | {
311
916
  type: "tool-call";
312
- args?: unknown;
917
+ toolName: "defiFetchListings";
918
+ toolCallId: string;
919
+ args: {
920
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
921
+ protocol: "aave";
922
+ missingParameters?: string[] | undefined;
923
+ humanFriendlyMessage?: string | undefined;
924
+ tokens?: string[] | undefined;
925
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
926
+ limit?: number | undefined;
927
+ };
313
928
  } | {
929
+ type: "tool-call";
930
+ toolName: "defiSupply";
314
931
  toolCallId: string;
315
- toolName: string;
932
+ args: {
933
+ amount: string;
934
+ token: string;
935
+ chain: string;
936
+ protocol: "aave";
937
+ userAddress: string;
938
+ missingParameters?: string[] | undefined;
939
+ humanFriendlyMessage?: string | undefined;
940
+ };
941
+ } | {
942
+ type: "tool-call";
943
+ toolName: "defiWithdraw";
944
+ toolCallId: string;
945
+ args: {
946
+ amount: string;
947
+ token: string;
948
+ chain: string;
949
+ protocol: "aave";
950
+ userAddress: string;
951
+ missingParameters?: string[] | undefined;
952
+ humanFriendlyMessage?: string | undefined;
953
+ };
954
+ } | {
955
+ type: "tool-call";
956
+ toolName: "defiPositions";
957
+ toolCallId: string;
958
+ args: {
959
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
960
+ protocol: "aave";
961
+ userAddress: string;
962
+ missingParameters?: string[] | undefined;
963
+ humanFriendlyMessage?: string | undefined;
964
+ tokens?: string[] | undefined;
965
+ };
966
+ } | {
316
967
  type: "tool-result";
968
+ toolName: string;
969
+ toolCallId: string;
317
970
  result?: unknown;
971
+ } | {
972
+ type: "tool-incomplete";
973
+ toolName: string;
974
+ toolCallId: string;
975
+ missingParams: string[];
976
+ humanReadableDescription: string;
977
+ args?: unknown;
978
+ } | {
979
+ type: "tool-error";
980
+ toolName: string;
981
+ toolCallId: string;
982
+ error: import("../types/actions/errors.js").ActionError<unknown>;
318
983
  })[];
319
984
  };
985
+ languageModel?: string | undefined;
986
+ personalityContext?: {
987
+ channel: "text" | "voice";
988
+ } | undefined;
320
989
  }>;
321
990
  //# sourceMappingURL=chatRequestBody.d.ts.map