@illalabs/interfaces 0.0.0 → 0.1.0-canary.9fc2c20f

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 +337 -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 +324 -0
  76. package/dist/schemas/chatRequestBody.d.ts.map +1 -0
  77. package/dist/schemas/chatRequestBody.js +14 -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 +65 -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,337 @@
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.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">;
167
+ }, "strict", z.ZodTypeAny, {
168
+ role: "user" | "assistant" | "tool" | "system";
169
+ content: ({
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: ({
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
+ languageModel: z.ZodOptional<z.ZodString>;
225
+ }, "messages">, {
226
+ toolsConfig: z.ZodObject<{
227
+ autoRouter: z.ZodOptional<z.ZodObject<{
228
+ defi: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
229
+ lending: z.ZodEnum<["aave"]>;
230
+ supply: z.ZodOptional<z.ZodNever>;
231
+ withdraw: z.ZodOptional<z.ZodNever>;
232
+ }, "strict", z.ZodTypeAny, {
233
+ lending: "aave";
234
+ supply?: undefined;
235
+ withdraw?: undefined;
236
+ }, {
237
+ lending: "aave";
238
+ supply?: undefined;
239
+ withdraw?: undefined;
240
+ }>, z.ZodObject<{
241
+ lending: z.ZodOptional<z.ZodNever>;
242
+ supply: z.ZodEnum<["aave"]>;
243
+ withdraw: z.ZodEnum<["aave"]>;
244
+ }, "strict", z.ZodTypeAny, {
245
+ supply: "aave";
246
+ withdraw: "aave";
247
+ lending?: undefined;
248
+ }, {
249
+ supply: "aave";
250
+ withdraw: "aave";
251
+ lending?: undefined;
252
+ }>]>>;
253
+ swapOrBridge: z.ZodOptional<z.ZodEnum<["lifi"]>>;
254
+ }, "strict", z.ZodTypeAny, {
255
+ swapOrBridge?: "lifi" | undefined;
256
+ defi?: {
257
+ lending: "aave";
258
+ supply?: undefined;
259
+ withdraw?: undefined;
260
+ } | {
261
+ supply: "aave";
262
+ withdraw: "aave";
263
+ lending?: undefined;
264
+ } | undefined;
265
+ }, {
266
+ swapOrBridge?: "lifi" | undefined;
267
+ defi?: {
268
+ lending: "aave";
269
+ supply?: undefined;
270
+ withdraw?: undefined;
271
+ } | {
272
+ supply: "aave";
273
+ withdraw: "aave";
274
+ lending?: undefined;
275
+ } | undefined;
276
+ }>>;
277
+ }, "strict", z.ZodTypeAny, {
278
+ autoRouter?: {
279
+ swapOrBridge?: "lifi" | undefined;
280
+ defi?: {
281
+ lending: "aave";
282
+ supply?: undefined;
283
+ withdraw?: undefined;
284
+ } | {
285
+ supply: "aave";
286
+ withdraw: "aave";
287
+ lending?: undefined;
288
+ } | undefined;
289
+ } | undefined;
290
+ }, {
291
+ autoRouter?: {
292
+ swapOrBridge?: "lifi" | undefined;
293
+ defi?: {
294
+ lending: "aave";
295
+ supply?: undefined;
296
+ withdraw?: undefined;
297
+ } | {
298
+ supply: "aave";
299
+ withdraw: "aave";
300
+ lending?: undefined;
301
+ } | undefined;
302
+ } | undefined;
303
+ }>;
304
+ }>, "strip", z.ZodTypeAny, {
305
+ toolsConfig: {
306
+ autoRouter?: {
307
+ swapOrBridge?: "lifi" | undefined;
308
+ defi?: {
309
+ lending: "aave";
310
+ supply?: undefined;
311
+ withdraw?: undefined;
312
+ } | {
313
+ supply: "aave";
314
+ withdraw: "aave";
315
+ lending?: undefined;
316
+ } | undefined;
317
+ } | undefined;
318
+ };
319
+ messages: import("@ai-sdk/provider-utils").ModelMessage[];
320
+ }, {
321
+ toolsConfig: {
322
+ autoRouter?: {
323
+ swapOrBridge?: "lifi" | undefined;
324
+ defi?: {
325
+ lending: "aave";
326
+ supply?: undefined;
327
+ withdraw?: undefined;
328
+ } | {
329
+ supply: "aave";
330
+ withdraw: "aave";
331
+ lending?: undefined;
332
+ } | undefined;
333
+ } | undefined;
334
+ };
335
+ messages: import("@ai-sdk/provider-utils").ModelMessage[];
336
+ }>;
337
+ //# 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,324 @@
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.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">;
167
+ }, "strict", z.ZodTypeAny, {
168
+ role: "user" | "assistant" | "tool" | "system";
169
+ content: ({
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: ({
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
+ languageModel: z.ZodOptional<z.ZodString>;
225
+ }, "strict", z.ZodTypeAny, {
226
+ toolsConfig: {
227
+ autoRouter?: {
228
+ swapOrBridge?: "lifi" | undefined;
229
+ defi?: {
230
+ lending: "aave";
231
+ supply?: undefined;
232
+ withdraw?: undefined;
233
+ } | {
234
+ supply: "aave";
235
+ withdraw: "aave";
236
+ lending?: undefined;
237
+ } | undefined;
238
+ } | undefined;
239
+ };
240
+ messages: import("@ai-sdk/provider-utils").ModelMessage[];
241
+ userContext: {
242
+ address: `0x${string}`;
243
+ };
244
+ prompt: {
245
+ role: "user" | "assistant" | "tool" | "system";
246
+ content: ({
247
+ toolCallId: string;
248
+ toolName: string;
249
+ type: "tool-incomplete";
250
+ missingParams: string[];
251
+ humanReadableDescription: string;
252
+ args?: unknown;
253
+ } | {
254
+ toolCallId: string;
255
+ toolName: string;
256
+ type: "tool-error";
257
+ error?: unknown;
258
+ } | {
259
+ type: "text";
260
+ text: string;
261
+ } | {
262
+ toolCallId: string;
263
+ toolName: string;
264
+ type: "tool-call";
265
+ args?: unknown;
266
+ } | {
267
+ toolCallId: string;
268
+ toolName: string;
269
+ type: "tool-result";
270
+ result?: unknown;
271
+ })[];
272
+ };
273
+ languageModel?: string | undefined;
274
+ }, {
275
+ toolsConfig: {
276
+ autoRouter?: {
277
+ swapOrBridge?: "lifi" | undefined;
278
+ defi?: {
279
+ lending: "aave";
280
+ supply?: undefined;
281
+ withdraw?: undefined;
282
+ } | {
283
+ supply: "aave";
284
+ withdraw: "aave";
285
+ lending?: undefined;
286
+ } | undefined;
287
+ } | undefined;
288
+ };
289
+ messages: import("@ai-sdk/provider-utils").ModelMessage[];
290
+ userContext: {
291
+ address: string;
292
+ };
293
+ prompt: {
294
+ role: "user" | "assistant" | "tool" | "system";
295
+ content: ({
296
+ toolCallId: string;
297
+ toolName: string;
298
+ type: "tool-incomplete";
299
+ missingParams: string[];
300
+ humanReadableDescription: string;
301
+ args?: unknown;
302
+ } | {
303
+ toolCallId: string;
304
+ toolName: string;
305
+ type: "tool-error";
306
+ error?: unknown;
307
+ } | {
308
+ type: "text";
309
+ text: string;
310
+ } | {
311
+ toolCallId: string;
312
+ toolName: string;
313
+ type: "tool-call";
314
+ args?: unknown;
315
+ } | {
316
+ toolCallId: string;
317
+ toolName: string;
318
+ type: "tool-result";
319
+ result?: unknown;
320
+ })[];
321
+ };
322
+ languageModel?: string | undefined;
323
+ }>;
324
+ //# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQ5B,CAAC"}
@@ -0,0 +1,14 @@
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
+ languageModel: z.string().optional(),
12
+ })
13
+ .strict();
14
+ //# 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;IACzB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC;KACD,MAAM,EAAE,CAAC"}