@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 ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
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 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
+ };
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
+ };
190
+ }, {
191
+ type: "tool-call";
192
+ toolName: "exchangeRate";
193
+ toolCallId: string;
194
+ args: {
195
+ provider: "coinMarketCap";
196
+ arguments: {
197
+ baseCurrency: string;
198
+ quoteCurrency: string;
199
+ baseAmount?: string | undefined;
200
+ quoteAmount?: string | undefined;
201
+ }[];
202
+ missingParameters?: string[] | undefined;
203
+ humanFriendlyMessage?: string | undefined;
204
+ };
205
+ }>, z.ZodObject<{
206
+ type: z.ZodLiteral<"tool-call">;
207
+ toolCallId: z.ZodString;
208
+ toolName: z.ZodLiteral<"getWalletBalance">;
209
+ args: z.ZodType<import("../external.js").GetWalletBalanceActionInput>;
210
+ }, "strict", z.ZodTypeAny, {
211
+ type: "tool-call";
212
+ toolName: "getWalletBalance";
213
+ toolCallId: string;
214
+ args: {
215
+ address: string;
216
+ provider: "moralis";
217
+ token?: string | undefined;
218
+ chain?: string | undefined;
219
+ missingParameters?: string[] | undefined;
220
+ humanFriendlyMessage?: string | undefined;
221
+ };
110
222
  }, {
223
+ type: "tool-call";
224
+ toolName: "getWalletBalance";
111
225
  toolCallId: string;
112
- toolName: 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, {
113
240
  type: "tool-call";
114
- args?: unknown;
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
+ };
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
+ };
115
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 ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
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 ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pic
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";
198
499
  toolCallId: string;
500
+ args: {
501
+ amount: string;
502
+ token: string;
503
+ chain: string;
504
+ protocol: "aave";
505
+ userAddress: string;
506
+ missingParameters?: string[] | undefined;
507
+ humanFriendlyMessage?: string | undefined;
508
+ };
509
+ } | {
510
+ type: "tool-call";
511
+ toolName: "defiPositions";
512
+ toolCallId: string;
513
+ args: {
514
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
515
+ protocol: "aave";
516
+ userAddress: string;
517
+ missingParameters?: string[] | undefined;
518
+ humanFriendlyMessage?: string | undefined;
519
+ tokens?: string[] | undefined;
520
+ };
521
+ } | {
522
+ type: "tool-result";
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
+ };
217
574
  } | {
575
+ type: "tool-call";
576
+ toolName: "exchangeRate";
218
577
  toolCallId: string;
219
- toolName: string;
578
+ args: {
579
+ provider: "coinMarketCap";
580
+ arguments: {
581
+ baseCurrency: string;
582
+ quoteCurrency: string;
583
+ baseAmount?: string | undefined;
584
+ quoteAmount?: string | undefined;
585
+ }[];
586
+ missingParameters?: string[] | undefined;
587
+ humanFriendlyMessage?: string | undefined;
588
+ };
589
+ } | {
590
+ type: "tool-call";
591
+ toolName: "getWalletBalance";
592
+ toolCallId: string;
593
+ args: {
594
+ address: string;
595
+ provider: "moralis";
596
+ token?: string | undefined;
597
+ chain?: string | undefined;
598
+ missingParameters?: string[] | undefined;
599
+ humanFriendlyMessage?: string | undefined;
600
+ };
601
+ } | {
602
+ type: "tool-call";
603
+ toolName: "defiFetchListings";
604
+ toolCallId: string;
605
+ args: {
606
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
607
+ protocol: "aave";
608
+ missingParameters?: string[] | undefined;
609
+ humanFriendlyMessage?: string | undefined;
610
+ tokens?: string[] | undefined;
611
+ criteria?: "supplyAPY" | "totalLiquidityUSD" | undefined;
612
+ limit?: number | undefined;
613
+ };
614
+ } | {
615
+ type: "tool-call";
616
+ toolName: "defiSupply";
617
+ toolCallId: string;
618
+ args: {
619
+ amount: string;
620
+ token: string;
621
+ chain: string;
622
+ protocol: "aave";
623
+ userAddress: string;
624
+ missingParameters?: string[] | undefined;
625
+ humanFriendlyMessage?: string | undefined;
626
+ };
627
+ } | {
628
+ type: "tool-call";
629
+ toolName: "defiWithdraw";
630
+ toolCallId: string;
631
+ args: {
632
+ amount: string;
633
+ token: string;
634
+ chain: string;
635
+ protocol: "aave";
636
+ userAddress: string;
637
+ missingParameters?: string[] | undefined;
638
+ humanFriendlyMessage?: string | undefined;
639
+ };
640
+ } | {
641
+ type: "tool-call";
642
+ toolName: "defiPositions";
643
+ toolCallId: string;
644
+ args: {
645
+ chain: "Ethereum" | "Polygon" | "Optimism" | "Base" | "Arbitrum" | "Avalanche" | "BSC";
646
+ protocol: "aave";
647
+ userAddress: string;
648
+ missingParameters?: string[] | undefined;
649
+ humanFriendlyMessage?: string | undefined;
650
+ tokens?: string[] | undefined;
651
+ };
652
+ } | {
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
  }, "messages">, {
225
680
  toolsConfig: z.ZodObject<{
226
681
  autoRouter: z.ZodOptional<z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"chatContext.d.ts","sourceRoot":"","sources":["../../src/schemas/chatContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI7B,CAAC"}
1
+ {"version":3,"file":"chatContext.d.ts","sourceRoot":"","sources":["../../src/schemas/chatContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI7B,CAAC"}