@illalabs/interfaces 0.1.0-canary.dcf8499b → 0.2.0-canary.eb4a29bf
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.
- package/dist/external.d.ts +3 -0
- package/dist/external.d.ts.map +1 -1
- package/dist/external.js +3 -0
- package/dist/external.js.map +1 -1
- package/dist/interfaces/chat/response.d.ts +2 -2
- package/dist/interfaces/chat/response.d.ts.map +1 -1
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/interfaces/index.js +1 -0
- package/dist/interfaces/index.js.map +1 -1
- package/dist/schemas/chatContext.d.ts +494 -47
- package/dist/schemas/chatContext.d.ts.map +1 -1
- package/dist/schemas/chatRequestBody.d.ts +726 -73
- package/dist/schemas/chatRequestBody.d.ts.map +1 -1
- package/dist/schemas/messages.d.ts +918 -74
- package/dist/schemas/messages.d.ts.map +1 -1
- package/dist/schemas/messages.js +103 -8
- package/dist/schemas/messages.js.map +1 -1
- package/dist/types/actions/errors.d.ts +67 -0
- package/dist/types/actions/errors.d.ts.map +1 -0
- package/dist/types/actions/errors.js +5 -0
- package/dist/types/actions/errors.js.map +1 -0
- package/dist/types/actions/index.d.ts +4 -0
- package/dist/types/actions/index.d.ts.map +1 -0
- package/dist/types/actions/index.js +4 -0
- package/dist/types/actions/index.js.map +1 -0
- package/dist/types/actions/inputs.d.ts +16 -0
- package/dist/types/actions/inputs.d.ts.map +1 -0
- package/dist/types/actions/inputs.js +2 -0
- package/dist/types/actions/inputs.js.map +1 -0
- package/dist/types/actions/outputs.d.ts +40 -0
- package/dist/types/actions/outputs.d.ts.map +1 -0
- package/dist/types/actions/outputs.js +2 -0
- package/dist/types/actions/outputs.js.map +1 -0
- package/dist/types/actions/tools/defiFetchListingsAction.d.ts +14 -0
- package/dist/types/actions/tools/defiFetchListingsAction.d.ts.map +1 -0
- package/dist/types/actions/tools/defiFetchListingsAction.js +2 -0
- package/dist/types/actions/tools/defiFetchListingsAction.js.map +1 -0
- package/dist/types/actions/tools/defiPositionsAction.d.ts +26 -0
- package/dist/types/actions/tools/defiPositionsAction.d.ts.map +1 -0
- package/dist/types/actions/tools/defiPositionsAction.js +2 -0
- package/dist/types/actions/tools/defiPositionsAction.js.map +1 -0
- package/dist/types/actions/tools/defiSupplyAction.d.ts +14 -0
- package/dist/types/actions/tools/defiSupplyAction.d.ts.map +1 -0
- package/dist/types/actions/tools/defiSupplyAction.js +2 -0
- package/dist/types/actions/tools/defiSupplyAction.js.map +1 -0
- package/dist/types/actions/tools/defiWithdrawAction.d.ts +14 -0
- package/dist/types/actions/tools/defiWithdrawAction.d.ts.map +1 -0
- package/dist/types/actions/tools/defiWithdrawAction.js +2 -0
- package/dist/types/actions/tools/defiWithdrawAction.js.map +1 -0
- package/dist/types/actions/tools/exchangeRateAction.d.ts +16 -0
- package/dist/types/actions/tools/exchangeRateAction.d.ts.map +1 -0
- package/dist/types/actions/tools/exchangeRateAction.js +2 -0
- package/dist/types/actions/tools/exchangeRateAction.js.map +1 -0
- package/dist/types/actions/tools/getWalletBalanceAction.d.ts +13 -0
- package/dist/types/actions/tools/getWalletBalanceAction.d.ts.map +1 -0
- package/dist/types/actions/tools/getWalletBalanceAction.js +2 -0
- package/dist/types/actions/tools/getWalletBalanceAction.js.map +1 -0
- package/dist/types/actions/tools/index.d.ts +37 -0
- package/dist/types/actions/tools/index.d.ts.map +1 -0
- package/dist/types/actions/tools/index.js +2 -0
- package/dist/types/actions/tools/index.js.map +1 -0
- package/dist/types/actions/tools/swapBridgeAction.d.ts +17 -0
- package/dist/types/actions/tools/swapBridgeAction.d.ts.map +1 -0
- package/dist/types/actions/tools/swapBridgeAction.js +2 -0
- package/dist/types/actions/tools/swapBridgeAction.js.map +1 -0
- package/dist/types/actions/tools/tokenTransferAction.d.ts +13 -0
- package/dist/types/actions/tools/tokenTransferAction.d.ts.map +1 -0
- package/dist/types/actions/tools/tokenTransferAction.js +2 -0
- package/dist/types/actions/tools/tokenTransferAction.js.map +1 -0
- package/dist/types/messages.d.ts +2 -1
- package/dist/types/messages.d.ts.map +1 -1
- package/dist/types/messages.js +1 -1
- package/dist/types/messages.js.map +1 -1
- package/package.json +1 -1
|
@@ -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.
|
|
104
|
-
args: z.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
+
};
|
|
115
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
|
+
};
|
|
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,73 +393,279 @@ 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.
|
|
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
|
-
|
|
404
|
+
toolName: string;
|
|
405
|
+
toolCallId: string;
|
|
406
|
+
error: import("../types/actions/errors.js").ActionError<unknown>;
|
|
166
407
|
}>]>, "many">;
|
|
167
408
|
}, "strict", z.ZodTypeAny, {
|
|
168
409
|
role: "user" | "assistant" | "tool" | "system";
|
|
169
410
|
content: ({
|
|
411
|
+
type: "text";
|
|
412
|
+
text: string;
|
|
413
|
+
} | {
|
|
414
|
+
type: "tool-call";
|
|
415
|
+
toolName: "tokenTransfer";
|
|
170
416
|
toolCallId: string;
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
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
|
-
|
|
179
|
-
|
|
180
|
-
|
|
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: "
|
|
183
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
}>;
|
|
224
671
|
languageModel: z.ZodOptional<z.ZodString>;
|
|
@@ -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
|
|
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"}
|