@illalabs/interfaces 0.0.0 → 0.1.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 (117) hide show
  1. package/LICENSE +17 -2
  2. package/README.md +98 -1
  3. package/dist/errors/endpoints/chat/ChatBaseError.d.ts +8 -0
  4. package/dist/errors/endpoints/chat/ChatBaseError.d.ts.map +1 -0
  5. package/dist/errors/endpoints/chat/ChatBaseError.js +2 -0
  6. package/dist/errors/endpoints/chat/ChatBaseError.js.map +1 -0
  7. package/dist/errors/endpoints/chat/index.d.ts +6 -0
  8. package/dist/errors/endpoints/chat/index.d.ts.map +1 -0
  9. package/dist/errors/endpoints/chat/index.js +2 -0
  10. package/dist/errors/endpoints/chat/index.js.map +1 -0
  11. package/dist/errors/endpoints/executionChecker/ExecutionCheckerBaseError.d.ts +10 -0
  12. package/dist/errors/endpoints/executionChecker/ExecutionCheckerBaseError.d.ts.map +1 -0
  13. package/dist/errors/endpoints/executionChecker/ExecutionCheckerBaseError.js +2 -0
  14. package/dist/errors/endpoints/executionChecker/ExecutionCheckerBaseError.js.map +1 -0
  15. package/dist/errors/endpoints/executionChecker/index.d.ts +3 -0
  16. package/dist/errors/endpoints/executionChecker/index.d.ts.map +1 -0
  17. package/dist/errors/endpoints/executionChecker/index.js +2 -0
  18. package/dist/errors/endpoints/executionChecker/index.js.map +1 -0
  19. package/dist/errors/index.d.ts +5 -0
  20. package/dist/errors/index.d.ts.map +1 -0
  21. package/dist/errors/index.js +3 -0
  22. package/dist/errors/index.js.map +1 -0
  23. package/dist/external.d.ts +4 -0
  24. package/dist/external.d.ts.map +1 -0
  25. package/dist/external.js +4 -0
  26. package/dist/external.js.map +1 -0
  27. package/dist/index.d.ts +2 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +2 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/interfaces/autoRouter.d.ts +34 -0
  32. package/dist/interfaces/autoRouter.d.ts.map +1 -0
  33. package/dist/interfaces/autoRouter.js +2 -0
  34. package/dist/interfaces/autoRouter.js.map +1 -0
  35. package/dist/interfaces/base.d.ts +15 -0
  36. package/dist/interfaces/base.d.ts.map +1 -0
  37. package/dist/interfaces/base.js +2 -0
  38. package/dist/interfaces/base.js.map +1 -0
  39. package/dist/interfaces/chat/index.d.ts +3 -0
  40. package/dist/interfaces/chat/index.d.ts.map +1 -0
  41. package/dist/interfaces/chat/index.js +3 -0
  42. package/dist/interfaces/chat/index.js.map +1 -0
  43. package/dist/interfaces/chat/request.d.ts +11 -0
  44. package/dist/interfaces/chat/request.d.ts.map +1 -0
  45. package/dist/interfaces/chat/request.js +2 -0
  46. package/dist/interfaces/chat/request.js.map +1 -0
  47. package/dist/interfaces/chat/response.d.ts +22 -0
  48. package/dist/interfaces/chat/response.d.ts.map +1 -0
  49. package/dist/interfaces/chat/response.js +2 -0
  50. package/dist/interfaces/chat/response.js.map +1 -0
  51. package/dist/interfaces/executionChecker/index.d.ts +3 -0
  52. package/dist/interfaces/executionChecker/index.d.ts.map +1 -0
  53. package/dist/interfaces/executionChecker/index.js +3 -0
  54. package/dist/interfaces/executionChecker/index.js.map +1 -0
  55. package/dist/interfaces/executionChecker/request.d.ts +16 -0
  56. package/dist/interfaces/executionChecker/request.d.ts.map +1 -0
  57. package/dist/interfaces/executionChecker/request.js +3 -0
  58. package/dist/interfaces/executionChecker/request.js.map +1 -0
  59. package/dist/interfaces/executionChecker/response.d.ts +32 -0
  60. package/dist/interfaces/executionChecker/response.d.ts.map +1 -0
  61. package/dist/interfaces/executionChecker/response.js +2 -0
  62. package/dist/interfaces/executionChecker/response.js.map +1 -0
  63. package/dist/interfaces/index.d.ts +4 -0
  64. package/dist/interfaces/index.d.ts.map +1 -0
  65. package/dist/interfaces/index.js +4 -0
  66. package/dist/interfaces/index.js.map +1 -0
  67. package/dist/internal.d.ts +5 -0
  68. package/dist/internal.d.ts.map +1 -0
  69. package/dist/internal.js +5 -0
  70. package/dist/internal.js.map +1 -0
  71. package/dist/schemas/chatContext.d.ts +336 -0
  72. package/dist/schemas/chatContext.d.ts.map +1 -0
  73. package/dist/schemas/chatContext.js +7 -0
  74. package/dist/schemas/chatContext.js.map +1 -0
  75. package/dist/schemas/chatRequestBody.d.ts +321 -0
  76. package/dist/schemas/chatRequestBody.d.ts.map +1 -0
  77. package/dist/schemas/chatRequestBody.js +13 -0
  78. package/dist/schemas/chatRequestBody.js.map +1 -0
  79. package/dist/schemas/executionCheckerQueryParams.d.ts +40 -0
  80. package/dist/schemas/executionCheckerQueryParams.d.ts.map +1 -0
  81. package/dist/schemas/executionCheckerQueryParams.js +18 -0
  82. package/dist/schemas/executionCheckerQueryParams.js.map +1 -0
  83. package/dist/schemas/index.d.ts +8 -0
  84. package/dist/schemas/index.d.ts.map +1 -0
  85. package/dist/schemas/index.js +8 -0
  86. package/dist/schemas/index.js.map +1 -0
  87. package/dist/schemas/messages.d.ts +252 -0
  88. package/dist/schemas/messages.d.ts.map +1 -0
  89. package/dist/schemas/messages.js +67 -0
  90. package/dist/schemas/messages.js.map +1 -0
  91. package/dist/schemas/toolAutorouter.d.ts +156 -0
  92. package/dist/schemas/toolAutorouter.d.ts.map +1 -0
  93. package/dist/schemas/toolAutorouter.js +37 -0
  94. package/dist/schemas/toolAutorouter.js.map +1 -0
  95. package/dist/schemas/userContext.d.ts +11 -0
  96. package/dist/schemas/userContext.d.ts.map +1 -0
  97. package/dist/schemas/userContext.js +8 -0
  98. package/dist/schemas/userContext.js.map +1 -0
  99. package/dist/types/index.d.ts +3 -0
  100. package/dist/types/index.d.ts.map +1 -0
  101. package/dist/types/index.js +3 -0
  102. package/dist/types/index.js.map +1 -0
  103. package/dist/types/messages.d.ts +9 -0
  104. package/dist/types/messages.d.ts.map +1 -0
  105. package/dist/types/messages.js +2 -0
  106. package/dist/types/messages.js.map +1 -0
  107. package/dist/types/toolAutorouter.d.ts +7 -0
  108. package/dist/types/toolAutorouter.d.ts.map +1 -0
  109. package/dist/types/toolAutorouter.js +2 -0
  110. package/dist/types/toolAutorouter.js.map +1 -0
  111. package/dist/utils/constants.d.ts +78 -0
  112. package/dist/utils/constants.d.ts.map +1 -0
  113. package/dist/utils/constants.js +57 -0
  114. package/dist/utils/constants.js.map +1 -0
  115. package/package.json +40 -5
  116. package/index.d.ts +0 -1
  117. package/index.js +0 -1
@@ -0,0 +1,336 @@
1
+ import { z } from "zod";
2
+ export declare const ChatContextSchema: z.ZodObject<z.objectUtil.extendShape<Pick<{
3
+ toolsConfig: z.ZodObject<{
4
+ autoRouter: z.ZodOptional<z.ZodObject<{
5
+ defi: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
6
+ lending: z.ZodEnum<["aave"]>;
7
+ supply: z.ZodOptional<z.ZodNever>;
8
+ withdraw: z.ZodOptional<z.ZodNever>;
9
+ }, "strict", z.ZodTypeAny, {
10
+ lending: "aave";
11
+ supply?: undefined;
12
+ withdraw?: undefined;
13
+ }, {
14
+ lending: "aave";
15
+ supply?: undefined;
16
+ withdraw?: undefined;
17
+ }>, z.ZodObject<{
18
+ lending: z.ZodOptional<z.ZodNever>;
19
+ supply: z.ZodEnum<["aave"]>;
20
+ withdraw: z.ZodEnum<["aave"]>;
21
+ }, "strict", z.ZodTypeAny, {
22
+ supply: "aave";
23
+ withdraw: "aave";
24
+ lending?: undefined;
25
+ }, {
26
+ supply: "aave";
27
+ withdraw: "aave";
28
+ lending?: undefined;
29
+ }>]>>;
30
+ swapOrBridge: z.ZodOptional<z.ZodEnum<["lifi"]>>;
31
+ }, "strict", z.ZodTypeAny, {
32
+ swapOrBridge?: "lifi" | undefined;
33
+ defi?: {
34
+ lending: "aave";
35
+ supply?: undefined;
36
+ withdraw?: undefined;
37
+ } | {
38
+ supply: "aave";
39
+ withdraw: "aave";
40
+ lending?: undefined;
41
+ } | undefined;
42
+ }, {
43
+ swapOrBridge?: "lifi" | undefined;
44
+ defi?: {
45
+ lending: "aave";
46
+ supply?: undefined;
47
+ withdraw?: undefined;
48
+ } | {
49
+ supply: "aave";
50
+ withdraw: "aave";
51
+ lending?: undefined;
52
+ } | undefined;
53
+ }>>;
54
+ }, "strict", z.ZodTypeAny, {
55
+ autoRouter?: {
56
+ swapOrBridge?: "lifi" | undefined;
57
+ defi?: {
58
+ lending: "aave";
59
+ supply?: undefined;
60
+ withdraw?: undefined;
61
+ } | {
62
+ supply: "aave";
63
+ withdraw: "aave";
64
+ lending?: undefined;
65
+ } | undefined;
66
+ } | undefined;
67
+ }, {
68
+ autoRouter?: {
69
+ swapOrBridge?: "lifi" | undefined;
70
+ defi?: {
71
+ lending: "aave";
72
+ supply?: undefined;
73
+ withdraw?: undefined;
74
+ } | {
75
+ supply: "aave";
76
+ withdraw: "aave";
77
+ lending?: undefined;
78
+ } | undefined;
79
+ } | undefined;
80
+ }>;
81
+ messages: z.ZodArray<z.ZodType<import("@ai-sdk/provider-utils").ModelMessage, z.ZodTypeDef, import("@ai-sdk/provider-utils").ModelMessage>, "many">;
82
+ userContext: z.ZodObject<{
83
+ address: z.ZodEffects<z.ZodString, `0x${string}`, string>;
84
+ }, "strict", z.ZodTypeAny, {
85
+ address: `0x${string}`;
86
+ }, {
87
+ address: string;
88
+ }>;
89
+ prompt: z.ZodObject<{
90
+ role: z.ZodEnum<["user", "assistant", "tool", "system"]>;
91
+ content: z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
92
+ type: z.ZodLiteral<"text">;
93
+ text: z.ZodString;
94
+ }, "strict", z.ZodTypeAny, {
95
+ type: "text";
96
+ text: string;
97
+ }, {
98
+ type: "text";
99
+ text: string;
100
+ }>, z.ZodObject<{
101
+ type: z.ZodLiteral<"tool-call">;
102
+ toolCallId: z.ZodString;
103
+ toolName: z.ZodString;
104
+ args: z.ZodUnknown;
105
+ }, "strict", z.ZodTypeAny, {
106
+ toolCallId: string;
107
+ toolName: string;
108
+ type: "tool-call";
109
+ args?: unknown;
110
+ }, {
111
+ toolCallId: string;
112
+ toolName: string;
113
+ type: "tool-call";
114
+ args?: unknown;
115
+ }>, z.ZodObject<{
116
+ type: z.ZodLiteral<"tool-result">;
117
+ toolCallId: z.ZodString;
118
+ toolName: z.ZodString;
119
+ result: z.ZodUnknown;
120
+ }, "strict", z.ZodTypeAny, {
121
+ toolCallId: string;
122
+ toolName: string;
123
+ type: "tool-result";
124
+ result?: unknown;
125
+ }, {
126
+ toolCallId: string;
127
+ toolName: string;
128
+ type: "tool-result";
129
+ result?: unknown;
130
+ }>, z.ZodObject<{
131
+ type: z.ZodLiteral<"tool-incomplete">;
132
+ toolCallId: z.ZodString;
133
+ toolName: z.ZodString;
134
+ args: z.ZodUnknown;
135
+ missingParams: z.ZodArray<z.ZodString, "many">;
136
+ humanReadableDescription: z.ZodString;
137
+ }, "strict", z.ZodTypeAny, {
138
+ toolCallId: string;
139
+ toolName: string;
140
+ type: "tool-incomplete";
141
+ missingParams: string[];
142
+ humanReadableDescription: string;
143
+ args?: unknown;
144
+ }, {
145
+ toolCallId: string;
146
+ toolName: string;
147
+ type: "tool-incomplete";
148
+ missingParams: string[];
149
+ humanReadableDescription: string;
150
+ args?: unknown;
151
+ }>, z.ZodObject<{
152
+ type: z.ZodLiteral<"tool-error">;
153
+ toolCallId: z.ZodString;
154
+ toolName: z.ZodString;
155
+ error: z.ZodUnknown;
156
+ }, "strict", z.ZodTypeAny, {
157
+ toolCallId: string;
158
+ toolName: string;
159
+ type: "tool-error";
160
+ error?: unknown;
161
+ }, {
162
+ toolCallId: string;
163
+ toolName: string;
164
+ type: "tool-error";
165
+ error?: unknown;
166
+ }>]>, "many">, z.ZodString]>;
167
+ }, "strict", z.ZodTypeAny, {
168
+ role: "user" | "assistant" | "tool" | "system";
169
+ content: string | ({
170
+ toolCallId: string;
171
+ toolName: string;
172
+ type: "tool-incomplete";
173
+ missingParams: string[];
174
+ humanReadableDescription: string;
175
+ args?: unknown;
176
+ } | {
177
+ toolCallId: string;
178
+ toolName: string;
179
+ type: "tool-error";
180
+ error?: unknown;
181
+ } | {
182
+ type: "text";
183
+ text: string;
184
+ } | {
185
+ toolCallId: string;
186
+ toolName: string;
187
+ type: "tool-call";
188
+ args?: unknown;
189
+ } | {
190
+ toolCallId: string;
191
+ toolName: string;
192
+ type: "tool-result";
193
+ result?: unknown;
194
+ })[];
195
+ }, {
196
+ role: "user" | "assistant" | "tool" | "system";
197
+ content: string | ({
198
+ toolCallId: string;
199
+ toolName: string;
200
+ type: "tool-incomplete";
201
+ missingParams: string[];
202
+ humanReadableDescription: string;
203
+ args?: unknown;
204
+ } | {
205
+ toolCallId: string;
206
+ toolName: string;
207
+ type: "tool-error";
208
+ error?: unknown;
209
+ } | {
210
+ type: "text";
211
+ text: string;
212
+ } | {
213
+ toolCallId: string;
214
+ toolName: string;
215
+ type: "tool-call";
216
+ args?: unknown;
217
+ } | {
218
+ toolCallId: string;
219
+ toolName: string;
220
+ type: "tool-result";
221
+ result?: unknown;
222
+ })[];
223
+ }>;
224
+ }, "messages">, {
225
+ toolsConfig: z.ZodObject<{
226
+ autoRouter: z.ZodOptional<z.ZodObject<{
227
+ defi: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
228
+ lending: z.ZodEnum<["aave"]>;
229
+ supply: z.ZodOptional<z.ZodNever>;
230
+ withdraw: z.ZodOptional<z.ZodNever>;
231
+ }, "strict", z.ZodTypeAny, {
232
+ lending: "aave";
233
+ supply?: undefined;
234
+ withdraw?: undefined;
235
+ }, {
236
+ lending: "aave";
237
+ supply?: undefined;
238
+ withdraw?: undefined;
239
+ }>, z.ZodObject<{
240
+ lending: z.ZodOptional<z.ZodNever>;
241
+ supply: z.ZodEnum<["aave"]>;
242
+ withdraw: z.ZodEnum<["aave"]>;
243
+ }, "strict", z.ZodTypeAny, {
244
+ supply: "aave";
245
+ withdraw: "aave";
246
+ lending?: undefined;
247
+ }, {
248
+ supply: "aave";
249
+ withdraw: "aave";
250
+ lending?: undefined;
251
+ }>]>>;
252
+ swapOrBridge: z.ZodOptional<z.ZodEnum<["lifi"]>>;
253
+ }, "strict", z.ZodTypeAny, {
254
+ swapOrBridge?: "lifi" | undefined;
255
+ defi?: {
256
+ lending: "aave";
257
+ supply?: undefined;
258
+ withdraw?: undefined;
259
+ } | {
260
+ supply: "aave";
261
+ withdraw: "aave";
262
+ lending?: undefined;
263
+ } | undefined;
264
+ }, {
265
+ swapOrBridge?: "lifi" | undefined;
266
+ defi?: {
267
+ lending: "aave";
268
+ supply?: undefined;
269
+ withdraw?: undefined;
270
+ } | {
271
+ supply: "aave";
272
+ withdraw: "aave";
273
+ lending?: undefined;
274
+ } | undefined;
275
+ }>>;
276
+ }, "strict", z.ZodTypeAny, {
277
+ autoRouter?: {
278
+ swapOrBridge?: "lifi" | undefined;
279
+ defi?: {
280
+ lending: "aave";
281
+ supply?: undefined;
282
+ withdraw?: undefined;
283
+ } | {
284
+ supply: "aave";
285
+ withdraw: "aave";
286
+ lending?: undefined;
287
+ } | undefined;
288
+ } | undefined;
289
+ }, {
290
+ autoRouter?: {
291
+ swapOrBridge?: "lifi" | undefined;
292
+ defi?: {
293
+ lending: "aave";
294
+ supply?: undefined;
295
+ withdraw?: undefined;
296
+ } | {
297
+ supply: "aave";
298
+ withdraw: "aave";
299
+ lending?: undefined;
300
+ } | undefined;
301
+ } | undefined;
302
+ }>;
303
+ }>, "strip", z.ZodTypeAny, {
304
+ toolsConfig: {
305
+ autoRouter?: {
306
+ swapOrBridge?: "lifi" | undefined;
307
+ defi?: {
308
+ lending: "aave";
309
+ supply?: undefined;
310
+ withdraw?: undefined;
311
+ } | {
312
+ supply: "aave";
313
+ withdraw: "aave";
314
+ lending?: undefined;
315
+ } | undefined;
316
+ } | undefined;
317
+ };
318
+ messages: import("@ai-sdk/provider-utils").ModelMessage[];
319
+ }, {
320
+ toolsConfig: {
321
+ autoRouter?: {
322
+ swapOrBridge?: "lifi" | undefined;
323
+ defi?: {
324
+ lending: "aave";
325
+ supply?: undefined;
326
+ withdraw?: undefined;
327
+ } | {
328
+ supply: "aave";
329
+ withdraw: "aave";
330
+ lending?: undefined;
331
+ } | undefined;
332
+ } | undefined;
333
+ };
334
+ messages: import("@ai-sdk/provider-utils").ModelMessage[];
335
+ }>;
336
+ //# sourceMappingURL=chatContext.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,7 @@
1
+ import { z } from "zod";
2
+ import { CoreApiChatBodyRequestSchema } from "./chatRequestBody.js";
3
+ import { ToolAutorouterSchema } from "./toolAutorouter.js";
4
+ export const ChatContextSchema = CoreApiChatBodyRequestSchema.pick({ messages: true }).merge(z.object({
5
+ toolsConfig: ToolAutorouterSchema,
6
+ }));
7
+ //# sourceMappingURL=chatContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatContext.js","sourceRoot":"","sources":["../../src/schemas/chatContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,MAAM,CAAC,MAAM,iBAAiB,GAAG,4BAA4B,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CACxF,CAAC,CAAC,MAAM,CAAC;IACL,WAAW,EAAE,oBAAoB;CACpC,CAAC,CACL,CAAC"}
@@ -0,0 +1,321 @@
1
+ import { z } from "zod";
2
+ export declare const CoreApiChatBodyRequestSchema: z.ZodObject<{
3
+ toolsConfig: z.ZodObject<{
4
+ autoRouter: z.ZodOptional<z.ZodObject<{
5
+ defi: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
6
+ lending: z.ZodEnum<["aave"]>;
7
+ supply: z.ZodOptional<z.ZodNever>;
8
+ withdraw: z.ZodOptional<z.ZodNever>;
9
+ }, "strict", z.ZodTypeAny, {
10
+ lending: "aave";
11
+ supply?: undefined;
12
+ withdraw?: undefined;
13
+ }, {
14
+ lending: "aave";
15
+ supply?: undefined;
16
+ withdraw?: undefined;
17
+ }>, z.ZodObject<{
18
+ lending: z.ZodOptional<z.ZodNever>;
19
+ supply: z.ZodEnum<["aave"]>;
20
+ withdraw: z.ZodEnum<["aave"]>;
21
+ }, "strict", z.ZodTypeAny, {
22
+ supply: "aave";
23
+ withdraw: "aave";
24
+ lending?: undefined;
25
+ }, {
26
+ supply: "aave";
27
+ withdraw: "aave";
28
+ lending?: undefined;
29
+ }>]>>;
30
+ swapOrBridge: z.ZodOptional<z.ZodEnum<["lifi"]>>;
31
+ }, "strict", z.ZodTypeAny, {
32
+ swapOrBridge?: "lifi" | undefined;
33
+ defi?: {
34
+ lending: "aave";
35
+ supply?: undefined;
36
+ withdraw?: undefined;
37
+ } | {
38
+ supply: "aave";
39
+ withdraw: "aave";
40
+ lending?: undefined;
41
+ } | undefined;
42
+ }, {
43
+ swapOrBridge?: "lifi" | undefined;
44
+ defi?: {
45
+ lending: "aave";
46
+ supply?: undefined;
47
+ withdraw?: undefined;
48
+ } | {
49
+ supply: "aave";
50
+ withdraw: "aave";
51
+ lending?: undefined;
52
+ } | undefined;
53
+ }>>;
54
+ }, "strict", z.ZodTypeAny, {
55
+ autoRouter?: {
56
+ swapOrBridge?: "lifi" | undefined;
57
+ defi?: {
58
+ lending: "aave";
59
+ supply?: undefined;
60
+ withdraw?: undefined;
61
+ } | {
62
+ supply: "aave";
63
+ withdraw: "aave";
64
+ lending?: undefined;
65
+ } | undefined;
66
+ } | undefined;
67
+ }, {
68
+ autoRouter?: {
69
+ swapOrBridge?: "lifi" | undefined;
70
+ defi?: {
71
+ lending: "aave";
72
+ supply?: undefined;
73
+ withdraw?: undefined;
74
+ } | {
75
+ supply: "aave";
76
+ withdraw: "aave";
77
+ lending?: undefined;
78
+ } | undefined;
79
+ } | undefined;
80
+ }>;
81
+ messages: z.ZodArray<z.ZodType<import("@ai-sdk/provider-utils").ModelMessage, z.ZodTypeDef, import("@ai-sdk/provider-utils").ModelMessage>, "many">;
82
+ userContext: z.ZodObject<{
83
+ address: z.ZodEffects<z.ZodString, `0x${string}`, string>;
84
+ }, "strict", z.ZodTypeAny, {
85
+ address: `0x${string}`;
86
+ }, {
87
+ address: string;
88
+ }>;
89
+ prompt: z.ZodObject<{
90
+ role: z.ZodEnum<["user", "assistant", "tool", "system"]>;
91
+ content: z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
92
+ type: z.ZodLiteral<"text">;
93
+ text: z.ZodString;
94
+ }, "strict", z.ZodTypeAny, {
95
+ type: "text";
96
+ text: string;
97
+ }, {
98
+ type: "text";
99
+ text: string;
100
+ }>, z.ZodObject<{
101
+ type: z.ZodLiteral<"tool-call">;
102
+ toolCallId: z.ZodString;
103
+ toolName: z.ZodString;
104
+ args: z.ZodUnknown;
105
+ }, "strict", z.ZodTypeAny, {
106
+ toolCallId: string;
107
+ toolName: string;
108
+ type: "tool-call";
109
+ args?: unknown;
110
+ }, {
111
+ toolCallId: string;
112
+ toolName: string;
113
+ type: "tool-call";
114
+ args?: unknown;
115
+ }>, z.ZodObject<{
116
+ type: z.ZodLiteral<"tool-result">;
117
+ toolCallId: z.ZodString;
118
+ toolName: z.ZodString;
119
+ result: z.ZodUnknown;
120
+ }, "strict", z.ZodTypeAny, {
121
+ toolCallId: string;
122
+ toolName: string;
123
+ type: "tool-result";
124
+ result?: unknown;
125
+ }, {
126
+ toolCallId: string;
127
+ toolName: string;
128
+ type: "tool-result";
129
+ result?: unknown;
130
+ }>, z.ZodObject<{
131
+ type: z.ZodLiteral<"tool-incomplete">;
132
+ toolCallId: z.ZodString;
133
+ toolName: z.ZodString;
134
+ args: z.ZodUnknown;
135
+ missingParams: z.ZodArray<z.ZodString, "many">;
136
+ humanReadableDescription: z.ZodString;
137
+ }, "strict", z.ZodTypeAny, {
138
+ toolCallId: string;
139
+ toolName: string;
140
+ type: "tool-incomplete";
141
+ missingParams: string[];
142
+ humanReadableDescription: string;
143
+ args?: unknown;
144
+ }, {
145
+ toolCallId: string;
146
+ toolName: string;
147
+ type: "tool-incomplete";
148
+ missingParams: string[];
149
+ humanReadableDescription: string;
150
+ args?: unknown;
151
+ }>, z.ZodObject<{
152
+ type: z.ZodLiteral<"tool-error">;
153
+ toolCallId: z.ZodString;
154
+ toolName: z.ZodString;
155
+ error: z.ZodUnknown;
156
+ }, "strict", z.ZodTypeAny, {
157
+ toolCallId: string;
158
+ toolName: string;
159
+ type: "tool-error";
160
+ error?: unknown;
161
+ }, {
162
+ toolCallId: string;
163
+ toolName: string;
164
+ type: "tool-error";
165
+ error?: unknown;
166
+ }>]>, "many">, z.ZodString]>;
167
+ }, "strict", z.ZodTypeAny, {
168
+ role: "user" | "assistant" | "tool" | "system";
169
+ content: string | ({
170
+ toolCallId: string;
171
+ toolName: string;
172
+ type: "tool-incomplete";
173
+ missingParams: string[];
174
+ humanReadableDescription: string;
175
+ args?: unknown;
176
+ } | {
177
+ toolCallId: string;
178
+ toolName: string;
179
+ type: "tool-error";
180
+ error?: unknown;
181
+ } | {
182
+ type: "text";
183
+ text: string;
184
+ } | {
185
+ toolCallId: string;
186
+ toolName: string;
187
+ type: "tool-call";
188
+ args?: unknown;
189
+ } | {
190
+ toolCallId: string;
191
+ toolName: string;
192
+ type: "tool-result";
193
+ result?: unknown;
194
+ })[];
195
+ }, {
196
+ role: "user" | "assistant" | "tool" | "system";
197
+ content: string | ({
198
+ toolCallId: string;
199
+ toolName: string;
200
+ type: "tool-incomplete";
201
+ missingParams: string[];
202
+ humanReadableDescription: string;
203
+ args?: unknown;
204
+ } | {
205
+ toolCallId: string;
206
+ toolName: string;
207
+ type: "tool-error";
208
+ error?: unknown;
209
+ } | {
210
+ type: "text";
211
+ text: string;
212
+ } | {
213
+ toolCallId: string;
214
+ toolName: string;
215
+ type: "tool-call";
216
+ args?: unknown;
217
+ } | {
218
+ toolCallId: string;
219
+ toolName: string;
220
+ type: "tool-result";
221
+ result?: unknown;
222
+ })[];
223
+ }>;
224
+ }, "strict", z.ZodTypeAny, {
225
+ toolsConfig: {
226
+ autoRouter?: {
227
+ swapOrBridge?: "lifi" | undefined;
228
+ defi?: {
229
+ lending: "aave";
230
+ supply?: undefined;
231
+ withdraw?: undefined;
232
+ } | {
233
+ supply: "aave";
234
+ withdraw: "aave";
235
+ lending?: undefined;
236
+ } | undefined;
237
+ } | undefined;
238
+ };
239
+ messages: import("@ai-sdk/provider-utils").ModelMessage[];
240
+ userContext: {
241
+ address: `0x${string}`;
242
+ };
243
+ prompt: {
244
+ role: "user" | "assistant" | "tool" | "system";
245
+ content: string | ({
246
+ toolCallId: string;
247
+ toolName: string;
248
+ type: "tool-incomplete";
249
+ missingParams: string[];
250
+ humanReadableDescription: string;
251
+ args?: unknown;
252
+ } | {
253
+ toolCallId: string;
254
+ toolName: string;
255
+ type: "tool-error";
256
+ error?: unknown;
257
+ } | {
258
+ type: "text";
259
+ text: string;
260
+ } | {
261
+ toolCallId: string;
262
+ toolName: string;
263
+ type: "tool-call";
264
+ args?: unknown;
265
+ } | {
266
+ toolCallId: string;
267
+ toolName: string;
268
+ type: "tool-result";
269
+ result?: unknown;
270
+ })[];
271
+ };
272
+ }, {
273
+ toolsConfig: {
274
+ autoRouter?: {
275
+ swapOrBridge?: "lifi" | undefined;
276
+ defi?: {
277
+ lending: "aave";
278
+ supply?: undefined;
279
+ withdraw?: undefined;
280
+ } | {
281
+ supply: "aave";
282
+ withdraw: "aave";
283
+ lending?: undefined;
284
+ } | undefined;
285
+ } | undefined;
286
+ };
287
+ messages: import("@ai-sdk/provider-utils").ModelMessage[];
288
+ userContext: {
289
+ address: string;
290
+ };
291
+ prompt: {
292
+ role: "user" | "assistant" | "tool" | "system";
293
+ content: string | ({
294
+ toolCallId: string;
295
+ toolName: string;
296
+ type: "tool-incomplete";
297
+ missingParams: string[];
298
+ humanReadableDescription: string;
299
+ args?: unknown;
300
+ } | {
301
+ toolCallId: string;
302
+ toolName: string;
303
+ type: "tool-error";
304
+ error?: unknown;
305
+ } | {
306
+ type: "text";
307
+ text: string;
308
+ } | {
309
+ toolCallId: string;
310
+ toolName: string;
311
+ type: "tool-call";
312
+ args?: unknown;
313
+ } | {
314
+ toolCallId: string;
315
+ toolName: string;
316
+ type: "tool-result";
317
+ result?: unknown;
318
+ })[];
319
+ };
320
+ }>;
321
+ //# sourceMappingURL=chatRequestBody.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatRequestBody.d.ts","sourceRoot":"","sources":["../../src/schemas/chatRequestBody.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO5B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { z } from "zod";
2
+ import { CoreMessageSchema, HistorySchema } from "./messages.js";
3
+ import { ToolAutorouterSchema } from "./toolAutorouter.js";
4
+ import { UserContextSchema } from "./userContext.js";
5
+ export const CoreApiChatBodyRequestSchema = z
6
+ .object({
7
+ toolsConfig: ToolAutorouterSchema,
8
+ messages: HistorySchema,
9
+ userContext: UserContextSchema,
10
+ prompt: CoreMessageSchema,
11
+ })
12
+ .strict();
13
+ //# sourceMappingURL=chatRequestBody.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatRequestBody.js","sourceRoot":"","sources":["../../src/schemas/chatRequestBody.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC;KACxC,MAAM,CAAC;IACJ,WAAW,EAAE,oBAAoB;IACjC,QAAQ,EAAE,aAAa;IACvB,WAAW,EAAE,iBAAiB;IAC9B,MAAM,EAAE,iBAAiB;CAC5B,CAAC;KACD,MAAM,EAAE,CAAC"}