@dexto/server 1.2.5 → 1.3.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.
- package/dist/hono/index.cjs +8 -1
- package/dist/hono/index.d.ts +80 -68
- package/dist/hono/index.d.ts.map +1 -1
- package/dist/hono/index.js +11 -1
- package/dist/hono/routes/agents.d.ts +18 -15
- package/dist/hono/routes/agents.d.ts.map +1 -1
- package/dist/hono/routes/llm.d.ts +19 -19
- package/dist/hono/routes/memory.d.ts +1 -1
- package/dist/hono/routes/messages.cjs +10 -10
- package/dist/hono/routes/messages.d.ts +15 -15
- package/dist/hono/routes/messages.d.ts.map +1 -1
- package/dist/hono/routes/messages.js +10 -10
- package/dist/hono/routes/prompts.cjs +2 -2
- package/dist/hono/routes/prompts.d.ts +3 -3
- package/dist/hono/routes/prompts.js +2 -2
- package/dist/hono/routes/search.cjs +2 -24
- package/dist/hono/routes/search.d.ts +12 -10
- package/dist/hono/routes/search.d.ts.map +1 -1
- package/dist/hono/routes/search.js +3 -25
- package/dist/hono/routes/sessions.d.ts +6 -5
- package/dist/hono/routes/sessions.d.ts.map +1 -1
- package/dist/hono/routes/static.cjs +77 -0
- package/dist/hono/routes/static.d.ts +41 -0
- package/dist/hono/routes/static.d.ts.map +1 -0
- package/dist/hono/routes/static.js +52 -0
- package/dist/hono/schemas/responses.cjs +45 -22
- package/dist/hono/schemas/responses.d.ts +1205 -201
- package/dist/hono/schemas/responses.d.ts.map +1 -1
- package/dist/hono/schemas/responses.js +52 -32
- package/package.json +3 -3
|
@@ -2,108 +2,137 @@
|
|
|
2
2
|
* Response schemas for OpenAPI documentation
|
|
3
3
|
*
|
|
4
4
|
* This file defines Zod schemas for all API response types, following these principles:
|
|
5
|
-
* 1. Import reusable schemas from @dexto/core
|
|
6
|
-
* 2. Define
|
|
5
|
+
* 1. Import reusable schemas from @dexto/core where available
|
|
6
|
+
* 2. Define message/context schemas HERE (not in core) - see note below
|
|
7
7
|
* 3. All schemas follow Zod best practices from CLAUDE.md (strict, describe, etc.)
|
|
8
|
+
*
|
|
9
|
+
* TYPE BOUNDARY: Core vs Server Schemas
|
|
10
|
+
* -------------------------------------
|
|
11
|
+
* Core's TypeScript interfaces use rich union types for binary data:
|
|
12
|
+
* `image: string | Uint8Array | Buffer | ArrayBuffer | URL`
|
|
13
|
+
*
|
|
14
|
+
* This allows internal code to work with various binary formats before serialization.
|
|
15
|
+
* However, JSON API responses can only contain strings (base64-encoded).
|
|
16
|
+
*
|
|
17
|
+
* Server schemas use `z.string()` for these fields because:
|
|
18
|
+
* 1. JSON serialization converts all binary data to base64 strings
|
|
19
|
+
* 2. Hono client type inference works correctly with concrete types
|
|
20
|
+
* 3. WebUI receives properly typed `string` instead of `JSONValue`
|
|
21
|
+
*
|
|
22
|
+
* CONSEQUENCE: Route handlers that return core types (e.g., `InternalMessage[]`)
|
|
23
|
+
* need type casts when passing to `ctx.json()` because TypeScript sees the union
|
|
24
|
+
* type from core but the schema expects just `string`. At runtime the data IS
|
|
25
|
+
* already strings - the cast just bridges the static type mismatch.
|
|
26
|
+
*
|
|
27
|
+
* See routes/sessions.ts, routes/search.ts for examples with TODO comments.
|
|
8
28
|
*/
|
|
9
29
|
import { z } from 'zod';
|
|
10
30
|
export { MemorySchema } from '@dexto/core';
|
|
11
31
|
export { LLMConfigBaseSchema, type ValidatedLLMConfig } from '@dexto/core';
|
|
12
|
-
export declare const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
apiKey: z.ZodEffects<z.ZodString, string, string>;
|
|
16
|
-
maxIterations: z.ZodDefault<z.ZodNumber>;
|
|
17
|
-
router: z.ZodDefault<z.ZodEnum<["vercel", "in-built"]>>;
|
|
18
|
-
baseURL: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string | undefined, string>>;
|
|
19
|
-
maxInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
20
|
-
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
21
|
-
temperature: z.ZodOptional<z.ZodNumber>;
|
|
22
|
-
allowedMediaTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
23
|
-
}, "apiKey"> & {
|
|
24
|
-
hasApiKey: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
export declare const TextPartSchema: z.ZodObject<{
|
|
33
|
+
type: z.ZodLiteral<"text">;
|
|
34
|
+
text: z.ZodString;
|
|
25
35
|
}, "strict", z.ZodTypeAny, {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
maxIterations: number;
|
|
29
|
-
router: "vercel" | "in-built";
|
|
30
|
-
baseURL?: string | undefined;
|
|
31
|
-
maxInputTokens?: number | undefined;
|
|
32
|
-
maxOutputTokens?: number | undefined;
|
|
33
|
-
temperature?: number | undefined;
|
|
34
|
-
allowedMediaTypes?: string[] | undefined;
|
|
35
|
-
hasApiKey?: boolean | undefined;
|
|
36
|
+
type: "text";
|
|
37
|
+
text: string;
|
|
36
38
|
}, {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
maxIterations?: number | undefined;
|
|
40
|
-
router?: "vercel" | "in-built" | undefined;
|
|
41
|
-
baseURL?: string | undefined;
|
|
42
|
-
maxInputTokens?: number | undefined;
|
|
43
|
-
maxOutputTokens?: number | undefined;
|
|
44
|
-
temperature?: number | undefined;
|
|
45
|
-
allowedMediaTypes?: string[] | undefined;
|
|
46
|
-
hasApiKey?: boolean | undefined;
|
|
39
|
+
type: "text";
|
|
40
|
+
text: string;
|
|
47
41
|
}>;
|
|
48
|
-
export declare const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
maxIterations: z.ZodDefault<z.ZodNumber>;
|
|
53
|
-
router: z.ZodDefault<z.ZodEnum<["vercel", "in-built"]>>;
|
|
54
|
-
baseURL: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string | undefined, string>>;
|
|
55
|
-
maxInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
56
|
-
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
57
|
-
temperature: z.ZodOptional<z.ZodNumber>;
|
|
58
|
-
allowedMediaTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
42
|
+
export declare const ImagePartSchema: z.ZodObject<{
|
|
43
|
+
type: z.ZodLiteral<"image">;
|
|
44
|
+
image: z.ZodString;
|
|
45
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
59
46
|
}, "strict", z.ZodTypeAny, {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
router: "vercel" | "in-built";
|
|
64
|
-
maxIterations: number;
|
|
65
|
-
baseURL?: string | undefined;
|
|
66
|
-
maxInputTokens?: number | undefined;
|
|
67
|
-
maxOutputTokens?: number | undefined;
|
|
68
|
-
temperature?: number | undefined;
|
|
69
|
-
allowedMediaTypes?: string[] | undefined;
|
|
47
|
+
type: "image";
|
|
48
|
+
image: string;
|
|
49
|
+
mimeType?: string | undefined;
|
|
70
50
|
}, {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
router?: "vercel" | "in-built" | undefined;
|
|
75
|
-
maxIterations?: number | undefined;
|
|
76
|
-
baseURL?: string | undefined;
|
|
77
|
-
maxInputTokens?: number | undefined;
|
|
78
|
-
maxOutputTokens?: number | undefined;
|
|
79
|
-
temperature?: number | undefined;
|
|
80
|
-
allowedMediaTypes?: string[] | undefined;
|
|
51
|
+
type: "image";
|
|
52
|
+
image: string;
|
|
53
|
+
mimeType?: string | undefined;
|
|
81
54
|
}>;
|
|
82
|
-
export
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
55
|
+
export declare const FilePartSchema: z.ZodObject<{
|
|
56
|
+
type: z.ZodLiteral<"file">;
|
|
57
|
+
data: z.ZodString;
|
|
58
|
+
mimeType: z.ZodString;
|
|
59
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, "strict", z.ZodTypeAny, {
|
|
61
|
+
type: "file";
|
|
62
|
+
mimeType: string;
|
|
63
|
+
data: string;
|
|
64
|
+
filename?: string | undefined;
|
|
65
|
+
}, {
|
|
66
|
+
type: "file";
|
|
67
|
+
mimeType: string;
|
|
68
|
+
data: string;
|
|
69
|
+
filename?: string | undefined;
|
|
70
|
+
}>;
|
|
71
|
+
export declare const ContentPartSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
72
|
+
type: z.ZodLiteral<"text">;
|
|
73
|
+
text: z.ZodString;
|
|
74
|
+
}, "strict", z.ZodTypeAny, {
|
|
75
|
+
type: "text";
|
|
76
|
+
text: string;
|
|
77
|
+
}, {
|
|
78
|
+
type: "text";
|
|
79
|
+
text: string;
|
|
80
|
+
}>, z.ZodObject<{
|
|
81
|
+
type: z.ZodLiteral<"image">;
|
|
82
|
+
image: z.ZodString;
|
|
83
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
84
|
+
}, "strict", z.ZodTypeAny, {
|
|
85
|
+
type: "image";
|
|
86
|
+
image: string;
|
|
87
|
+
mimeType?: string | undefined;
|
|
88
|
+
}, {
|
|
89
|
+
type: "image";
|
|
90
|
+
image: string;
|
|
91
|
+
mimeType?: string | undefined;
|
|
92
|
+
}>, z.ZodObject<{
|
|
93
|
+
type: z.ZodLiteral<"file">;
|
|
94
|
+
data: z.ZodString;
|
|
95
|
+
mimeType: z.ZodString;
|
|
96
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
97
|
+
}, "strict", z.ZodTypeAny, {
|
|
98
|
+
type: "file";
|
|
99
|
+
mimeType: string;
|
|
100
|
+
data: string;
|
|
101
|
+
filename?: string | undefined;
|
|
102
|
+
}, {
|
|
103
|
+
type: "file";
|
|
104
|
+
mimeType: string;
|
|
105
|
+
data: string;
|
|
106
|
+
filename?: string | undefined;
|
|
107
|
+
}>]>;
|
|
108
|
+
export declare const ToolCallSchema: z.ZodObject<{
|
|
88
109
|
id: z.ZodString;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
110
|
+
type: z.ZodLiteral<"function">;
|
|
111
|
+
function: z.ZodObject<{
|
|
112
|
+
name: z.ZodString;
|
|
113
|
+
arguments: z.ZodString;
|
|
114
|
+
}, "strict", z.ZodTypeAny, {
|
|
115
|
+
name: string;
|
|
116
|
+
arguments: string;
|
|
117
|
+
}, {
|
|
118
|
+
name: string;
|
|
119
|
+
arguments: string;
|
|
120
|
+
}>;
|
|
93
121
|
}, "strict", z.ZodTypeAny, {
|
|
122
|
+
function: {
|
|
123
|
+
name: string;
|
|
124
|
+
arguments: string;
|
|
125
|
+
};
|
|
126
|
+
type: "function";
|
|
94
127
|
id: string;
|
|
95
|
-
createdAt: number | null;
|
|
96
|
-
lastActivity: number | null;
|
|
97
|
-
messageCount: number;
|
|
98
|
-
title?: string | null | undefined;
|
|
99
128
|
}, {
|
|
129
|
+
function: {
|
|
130
|
+
name: string;
|
|
131
|
+
arguments: string;
|
|
132
|
+
};
|
|
133
|
+
type: "function";
|
|
100
134
|
id: string;
|
|
101
|
-
createdAt: number | null;
|
|
102
|
-
lastActivity: number | null;
|
|
103
|
-
messageCount: number;
|
|
104
|
-
title?: string | null | undefined;
|
|
105
135
|
}>;
|
|
106
|
-
export type SessionMetadata = z.output<typeof SessionMetadataSchema>;
|
|
107
136
|
export declare const TokenUsageSchema: z.ZodObject<{
|
|
108
137
|
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
109
138
|
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -121,6 +150,7 @@ export declare const TokenUsageSchema: z.ZodObject<{
|
|
|
121
150
|
totalTokens?: number | undefined;
|
|
122
151
|
}>;
|
|
123
152
|
export declare const InternalMessageSchema: z.ZodObject<{
|
|
153
|
+
id: z.ZodOptional<z.ZodString>;
|
|
124
154
|
role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
|
|
125
155
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
126
156
|
content: z.ZodUnion<[z.ZodString, z.ZodNull, z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
@@ -134,30 +164,30 @@ export declare const InternalMessageSchema: z.ZodObject<{
|
|
|
134
164
|
text: string;
|
|
135
165
|
}>, z.ZodObject<{
|
|
136
166
|
type: z.ZodLiteral<"image">;
|
|
137
|
-
image: z.
|
|
167
|
+
image: z.ZodString;
|
|
138
168
|
mimeType: z.ZodOptional<z.ZodString>;
|
|
139
169
|
}, "strict", z.ZodTypeAny, {
|
|
140
170
|
type: "image";
|
|
141
|
-
image
|
|
171
|
+
image: string;
|
|
142
172
|
mimeType?: string | undefined;
|
|
143
173
|
}, {
|
|
144
174
|
type: "image";
|
|
145
|
-
image
|
|
175
|
+
image: string;
|
|
146
176
|
mimeType?: string | undefined;
|
|
147
177
|
}>, z.ZodObject<{
|
|
148
178
|
type: z.ZodLiteral<"file">;
|
|
149
|
-
data: z.
|
|
179
|
+
data: z.ZodString;
|
|
150
180
|
mimeType: z.ZodString;
|
|
151
181
|
filename: z.ZodOptional<z.ZodString>;
|
|
152
182
|
}, "strict", z.ZodTypeAny, {
|
|
153
183
|
type: "file";
|
|
154
184
|
mimeType: string;
|
|
155
|
-
data
|
|
185
|
+
data: string;
|
|
156
186
|
filename?: string | undefined;
|
|
157
187
|
}, {
|
|
158
188
|
type: "file";
|
|
159
189
|
mimeType: string;
|
|
160
|
-
data
|
|
190
|
+
data: string;
|
|
161
191
|
filename?: string | undefined;
|
|
162
192
|
}>]>, "many">]>;
|
|
163
193
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
@@ -178,8 +208,8 @@ export declare const InternalMessageSchema: z.ZodObject<{
|
|
|
178
208
|
totalTokens?: number | undefined;
|
|
179
209
|
}>>;
|
|
180
210
|
model: z.ZodOptional<z.ZodString>;
|
|
181
|
-
provider: z.ZodOptional<z.
|
|
182
|
-
router: z.ZodOptional<z.
|
|
211
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere"]>>;
|
|
212
|
+
router: z.ZodOptional<z.ZodEnum<["vercel", "in-built"]>>;
|
|
183
213
|
toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
184
214
|
id: z.ZodString;
|
|
185
215
|
type: z.ZodLiteral<"function">;
|
|
@@ -216,18 +246,16 @@ export declare const InternalMessageSchema: z.ZodObject<{
|
|
|
216
246
|
text: string;
|
|
217
247
|
} | {
|
|
218
248
|
type: "image";
|
|
219
|
-
image
|
|
249
|
+
image: string;
|
|
220
250
|
mimeType?: string | undefined;
|
|
221
251
|
} | {
|
|
222
252
|
type: "file";
|
|
223
253
|
mimeType: string;
|
|
224
|
-
data
|
|
254
|
+
data: string;
|
|
225
255
|
filename?: string | undefined;
|
|
226
256
|
})[] | null;
|
|
227
257
|
role: "system" | "user" | "assistant" | "tool";
|
|
228
|
-
|
|
229
|
-
model?: string | undefined;
|
|
230
|
-
router?: string | undefined;
|
|
258
|
+
id?: string | undefined;
|
|
231
259
|
name?: string | undefined;
|
|
232
260
|
timestamp?: number | undefined;
|
|
233
261
|
reasoning?: string | undefined;
|
|
@@ -237,6 +265,9 @@ export declare const InternalMessageSchema: z.ZodObject<{
|
|
|
237
265
|
reasoningTokens?: number | undefined;
|
|
238
266
|
totalTokens?: number | undefined;
|
|
239
267
|
} | undefined;
|
|
268
|
+
model?: string | undefined;
|
|
269
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
270
|
+
router?: "vercel" | "in-built" | undefined;
|
|
240
271
|
toolCalls?: {
|
|
241
272
|
function: {
|
|
242
273
|
name: string;
|
|
@@ -252,18 +283,16 @@ export declare const InternalMessageSchema: z.ZodObject<{
|
|
|
252
283
|
text: string;
|
|
253
284
|
} | {
|
|
254
285
|
type: "image";
|
|
255
|
-
image
|
|
286
|
+
image: string;
|
|
256
287
|
mimeType?: string | undefined;
|
|
257
288
|
} | {
|
|
258
289
|
type: "file";
|
|
259
290
|
mimeType: string;
|
|
260
|
-
data
|
|
291
|
+
data: string;
|
|
261
292
|
filename?: string | undefined;
|
|
262
293
|
})[] | null;
|
|
263
294
|
role: "system" | "user" | "assistant" | "tool";
|
|
264
|
-
|
|
265
|
-
model?: string | undefined;
|
|
266
|
-
router?: string | undefined;
|
|
295
|
+
id?: string | undefined;
|
|
267
296
|
name?: string | undefined;
|
|
268
297
|
timestamp?: number | undefined;
|
|
269
298
|
reasoning?: string | undefined;
|
|
@@ -273,6 +302,9 @@ export declare const InternalMessageSchema: z.ZodObject<{
|
|
|
273
302
|
reasoningTokens?: number | undefined;
|
|
274
303
|
totalTokens?: number | undefined;
|
|
275
304
|
} | undefined;
|
|
305
|
+
model?: string | undefined;
|
|
306
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
307
|
+
router?: "vercel" | "in-built" | undefined;
|
|
276
308
|
toolCalls?: {
|
|
277
309
|
function: {
|
|
278
310
|
name: string;
|
|
@@ -283,10 +315,112 @@ export declare const InternalMessageSchema: z.ZodObject<{
|
|
|
283
315
|
}[] | undefined;
|
|
284
316
|
toolCallId?: string | undefined;
|
|
285
317
|
}>;
|
|
318
|
+
export type TextPart = z.output<typeof TextPartSchema>;
|
|
319
|
+
export type ImagePart = z.output<typeof ImagePartSchema>;
|
|
320
|
+
export type FilePart = z.output<typeof FilePartSchema>;
|
|
321
|
+
export type ContentPart = z.output<typeof ContentPartSchema>;
|
|
322
|
+
export type ToolCall = z.output<typeof ToolCallSchema>;
|
|
323
|
+
export type TokenUsage = z.output<typeof TokenUsageSchema>;
|
|
286
324
|
export type InternalMessage = z.output<typeof InternalMessageSchema>;
|
|
325
|
+
export declare const LLMConfigResponseSchema: z.ZodObject<Omit<{
|
|
326
|
+
provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere"]>;
|
|
327
|
+
model: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
328
|
+
apiKey: z.ZodEffects<z.ZodString, string, string>;
|
|
329
|
+
maxIterations: z.ZodDefault<z.ZodNumber>;
|
|
330
|
+
router: z.ZodDefault<z.ZodEnum<["vercel", "in-built"]>>;
|
|
331
|
+
baseURL: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string | undefined, string>>;
|
|
332
|
+
maxInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
333
|
+
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
334
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
335
|
+
allowedMediaTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
336
|
+
}, "apiKey"> & {
|
|
337
|
+
hasApiKey: z.ZodOptional<z.ZodBoolean>;
|
|
338
|
+
}, "strict", z.ZodTypeAny, {
|
|
339
|
+
model: string;
|
|
340
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere";
|
|
341
|
+
router: "vercel" | "in-built";
|
|
342
|
+
maxIterations: number;
|
|
343
|
+
baseURL?: string | undefined;
|
|
344
|
+
maxInputTokens?: number | undefined;
|
|
345
|
+
maxOutputTokens?: number | undefined;
|
|
346
|
+
temperature?: number | undefined;
|
|
347
|
+
allowedMediaTypes?: string[] | undefined;
|
|
348
|
+
hasApiKey?: boolean | undefined;
|
|
349
|
+
}, {
|
|
350
|
+
model: string;
|
|
351
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere";
|
|
352
|
+
router?: "vercel" | "in-built" | undefined;
|
|
353
|
+
maxIterations?: number | undefined;
|
|
354
|
+
baseURL?: string | undefined;
|
|
355
|
+
maxInputTokens?: number | undefined;
|
|
356
|
+
maxOutputTokens?: number | undefined;
|
|
357
|
+
temperature?: number | undefined;
|
|
358
|
+
allowedMediaTypes?: string[] | undefined;
|
|
359
|
+
hasApiKey?: boolean | undefined;
|
|
360
|
+
}>;
|
|
361
|
+
export declare const LLMConfigSchema: z.ZodObject<{
|
|
362
|
+
provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere"]>;
|
|
363
|
+
model: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
364
|
+
apiKey: z.ZodEffects<z.ZodString, string, string>;
|
|
365
|
+
maxIterations: z.ZodDefault<z.ZodNumber>;
|
|
366
|
+
router: z.ZodDefault<z.ZodEnum<["vercel", "in-built"]>>;
|
|
367
|
+
baseURL: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string | undefined, string>>;
|
|
368
|
+
maxInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
369
|
+
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
370
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
371
|
+
allowedMediaTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
372
|
+
}, "strict", z.ZodTypeAny, {
|
|
373
|
+
apiKey: string;
|
|
374
|
+
model: string;
|
|
375
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere";
|
|
376
|
+
router: "vercel" | "in-built";
|
|
377
|
+
maxIterations: number;
|
|
378
|
+
baseURL?: string | undefined;
|
|
379
|
+
maxInputTokens?: number | undefined;
|
|
380
|
+
maxOutputTokens?: number | undefined;
|
|
381
|
+
temperature?: number | undefined;
|
|
382
|
+
allowedMediaTypes?: string[] | undefined;
|
|
383
|
+
}, {
|
|
384
|
+
apiKey: string;
|
|
385
|
+
model: string;
|
|
386
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere";
|
|
387
|
+
router?: "vercel" | "in-built" | undefined;
|
|
388
|
+
maxIterations?: number | undefined;
|
|
389
|
+
baseURL?: string | undefined;
|
|
390
|
+
maxInputTokens?: number | undefined;
|
|
391
|
+
maxOutputTokens?: number | undefined;
|
|
392
|
+
temperature?: number | undefined;
|
|
393
|
+
allowedMediaTypes?: string[] | undefined;
|
|
394
|
+
}>;
|
|
395
|
+
export type LLMConfigResponse = z.output<typeof LLMConfigResponseSchema>;
|
|
396
|
+
export { AgentCardSchema, type AgentCard } from '@dexto/core';
|
|
397
|
+
export { McpServerConfigSchema, StdioServerConfigSchema, SseServerConfigSchema, HttpServerConfigSchema, type McpServerConfig, type ValidatedMcpServerConfig, } from '@dexto/core';
|
|
398
|
+
export { ToolConfirmationConfigSchema } from '@dexto/core';
|
|
399
|
+
export { InternalResourceConfigSchema } from '@dexto/core';
|
|
400
|
+
export declare const SessionMetadataSchema: z.ZodObject<{
|
|
401
|
+
id: z.ZodString;
|
|
402
|
+
createdAt: z.ZodNullable<z.ZodNumber>;
|
|
403
|
+
lastActivity: z.ZodNullable<z.ZodNumber>;
|
|
404
|
+
messageCount: z.ZodNumber;
|
|
405
|
+
title: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
406
|
+
}, "strict", z.ZodTypeAny, {
|
|
407
|
+
id: string;
|
|
408
|
+
createdAt: number | null;
|
|
409
|
+
lastActivity: number | null;
|
|
410
|
+
messageCount: number;
|
|
411
|
+
title?: string | null | undefined;
|
|
412
|
+
}, {
|
|
413
|
+
id: string;
|
|
414
|
+
createdAt: number | null;
|
|
415
|
+
lastActivity: number | null;
|
|
416
|
+
messageCount: number;
|
|
417
|
+
title?: string | null | undefined;
|
|
418
|
+
}>;
|
|
419
|
+
export type SessionMetadata = z.output<typeof SessionMetadataSchema>;
|
|
287
420
|
export declare const SearchResultSchema: z.ZodObject<{
|
|
288
421
|
sessionId: z.ZodString;
|
|
289
422
|
message: z.ZodObject<{
|
|
423
|
+
id: z.ZodOptional<z.ZodString>;
|
|
290
424
|
role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
|
|
291
425
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
292
426
|
content: z.ZodUnion<[z.ZodString, z.ZodNull, z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
@@ -300,30 +434,30 @@ export declare const SearchResultSchema: z.ZodObject<{
|
|
|
300
434
|
text: string;
|
|
301
435
|
}>, z.ZodObject<{
|
|
302
436
|
type: z.ZodLiteral<"image">;
|
|
303
|
-
image: z.
|
|
437
|
+
image: z.ZodString;
|
|
304
438
|
mimeType: z.ZodOptional<z.ZodString>;
|
|
305
439
|
}, "strict", z.ZodTypeAny, {
|
|
306
440
|
type: "image";
|
|
307
|
-
image
|
|
441
|
+
image: string;
|
|
308
442
|
mimeType?: string | undefined;
|
|
309
443
|
}, {
|
|
310
444
|
type: "image";
|
|
311
|
-
image
|
|
445
|
+
image: string;
|
|
312
446
|
mimeType?: string | undefined;
|
|
313
447
|
}>, z.ZodObject<{
|
|
314
448
|
type: z.ZodLiteral<"file">;
|
|
315
|
-
data: z.
|
|
449
|
+
data: z.ZodString;
|
|
316
450
|
mimeType: z.ZodString;
|
|
317
451
|
filename: z.ZodOptional<z.ZodString>;
|
|
318
452
|
}, "strict", z.ZodTypeAny, {
|
|
319
453
|
type: "file";
|
|
320
454
|
mimeType: string;
|
|
321
|
-
data
|
|
455
|
+
data: string;
|
|
322
456
|
filename?: string | undefined;
|
|
323
457
|
}, {
|
|
324
458
|
type: "file";
|
|
325
459
|
mimeType: string;
|
|
326
|
-
data
|
|
460
|
+
data: string;
|
|
327
461
|
filename?: string | undefined;
|
|
328
462
|
}>]>, "many">]>;
|
|
329
463
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
@@ -344,8 +478,8 @@ export declare const SearchResultSchema: z.ZodObject<{
|
|
|
344
478
|
totalTokens?: number | undefined;
|
|
345
479
|
}>>;
|
|
346
480
|
model: z.ZodOptional<z.ZodString>;
|
|
347
|
-
provider: z.ZodOptional<z.
|
|
348
|
-
router: z.ZodOptional<z.
|
|
481
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere"]>>;
|
|
482
|
+
router: z.ZodOptional<z.ZodEnum<["vercel", "in-built"]>>;
|
|
349
483
|
toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
350
484
|
id: z.ZodString;
|
|
351
485
|
type: z.ZodLiteral<"function">;
|
|
@@ -382,18 +516,16 @@ export declare const SearchResultSchema: z.ZodObject<{
|
|
|
382
516
|
text: string;
|
|
383
517
|
} | {
|
|
384
518
|
type: "image";
|
|
385
|
-
image
|
|
519
|
+
image: string;
|
|
386
520
|
mimeType?: string | undefined;
|
|
387
521
|
} | {
|
|
388
522
|
type: "file";
|
|
389
523
|
mimeType: string;
|
|
390
|
-
data
|
|
524
|
+
data: string;
|
|
391
525
|
filename?: string | undefined;
|
|
392
526
|
})[] | null;
|
|
393
527
|
role: "system" | "user" | "assistant" | "tool";
|
|
394
|
-
|
|
395
|
-
model?: string | undefined;
|
|
396
|
-
router?: string | undefined;
|
|
528
|
+
id?: string | undefined;
|
|
397
529
|
name?: string | undefined;
|
|
398
530
|
timestamp?: number | undefined;
|
|
399
531
|
reasoning?: string | undefined;
|
|
@@ -403,6 +535,9 @@ export declare const SearchResultSchema: z.ZodObject<{
|
|
|
403
535
|
reasoningTokens?: number | undefined;
|
|
404
536
|
totalTokens?: number | undefined;
|
|
405
537
|
} | undefined;
|
|
538
|
+
model?: string | undefined;
|
|
539
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
540
|
+
router?: "vercel" | "in-built" | undefined;
|
|
406
541
|
toolCalls?: {
|
|
407
542
|
function: {
|
|
408
543
|
name: string;
|
|
@@ -418,18 +553,16 @@ export declare const SearchResultSchema: z.ZodObject<{
|
|
|
418
553
|
text: string;
|
|
419
554
|
} | {
|
|
420
555
|
type: "image";
|
|
421
|
-
image
|
|
556
|
+
image: string;
|
|
422
557
|
mimeType?: string | undefined;
|
|
423
558
|
} | {
|
|
424
559
|
type: "file";
|
|
425
560
|
mimeType: string;
|
|
426
|
-
data
|
|
561
|
+
data: string;
|
|
427
562
|
filename?: string | undefined;
|
|
428
563
|
})[] | null;
|
|
429
564
|
role: "system" | "user" | "assistant" | "tool";
|
|
430
|
-
|
|
431
|
-
model?: string | undefined;
|
|
432
|
-
router?: string | undefined;
|
|
565
|
+
id?: string | undefined;
|
|
433
566
|
name?: string | undefined;
|
|
434
567
|
timestamp?: number | undefined;
|
|
435
568
|
reasoning?: string | undefined;
|
|
@@ -439,6 +572,9 @@ export declare const SearchResultSchema: z.ZodObject<{
|
|
|
439
572
|
reasoningTokens?: number | undefined;
|
|
440
573
|
totalTokens?: number | undefined;
|
|
441
574
|
} | undefined;
|
|
575
|
+
model?: string | undefined;
|
|
576
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
577
|
+
router?: "vercel" | "in-built" | undefined;
|
|
442
578
|
toolCalls?: {
|
|
443
579
|
function: {
|
|
444
580
|
name: string;
|
|
@@ -459,18 +595,16 @@ export declare const SearchResultSchema: z.ZodObject<{
|
|
|
459
595
|
text: string;
|
|
460
596
|
} | {
|
|
461
597
|
type: "image";
|
|
462
|
-
image
|
|
598
|
+
image: string;
|
|
463
599
|
mimeType?: string | undefined;
|
|
464
600
|
} | {
|
|
465
601
|
type: "file";
|
|
466
602
|
mimeType: string;
|
|
467
|
-
data
|
|
603
|
+
data: string;
|
|
468
604
|
filename?: string | undefined;
|
|
469
605
|
})[] | null;
|
|
470
606
|
role: "system" | "user" | "assistant" | "tool";
|
|
471
|
-
|
|
472
|
-
model?: string | undefined;
|
|
473
|
-
router?: string | undefined;
|
|
607
|
+
id?: string | undefined;
|
|
474
608
|
name?: string | undefined;
|
|
475
609
|
timestamp?: number | undefined;
|
|
476
610
|
reasoning?: string | undefined;
|
|
@@ -480,6 +614,9 @@ export declare const SearchResultSchema: z.ZodObject<{
|
|
|
480
614
|
reasoningTokens?: number | undefined;
|
|
481
615
|
totalTokens?: number | undefined;
|
|
482
616
|
} | undefined;
|
|
617
|
+
model?: string | undefined;
|
|
618
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
619
|
+
router?: "vercel" | "in-built" | undefined;
|
|
483
620
|
toolCalls?: {
|
|
484
621
|
function: {
|
|
485
622
|
name: string;
|
|
@@ -501,18 +638,16 @@ export declare const SearchResultSchema: z.ZodObject<{
|
|
|
501
638
|
text: string;
|
|
502
639
|
} | {
|
|
503
640
|
type: "image";
|
|
504
|
-
image
|
|
641
|
+
image: string;
|
|
505
642
|
mimeType?: string | undefined;
|
|
506
643
|
} | {
|
|
507
644
|
type: "file";
|
|
508
645
|
mimeType: string;
|
|
509
|
-
data
|
|
646
|
+
data: string;
|
|
510
647
|
filename?: string | undefined;
|
|
511
648
|
})[] | null;
|
|
512
649
|
role: "system" | "user" | "assistant" | "tool";
|
|
513
|
-
|
|
514
|
-
model?: string | undefined;
|
|
515
|
-
router?: string | undefined;
|
|
650
|
+
id?: string | undefined;
|
|
516
651
|
name?: string | undefined;
|
|
517
652
|
timestamp?: number | undefined;
|
|
518
653
|
reasoning?: string | undefined;
|
|
@@ -522,6 +657,9 @@ export declare const SearchResultSchema: z.ZodObject<{
|
|
|
522
657
|
reasoningTokens?: number | undefined;
|
|
523
658
|
totalTokens?: number | undefined;
|
|
524
659
|
} | undefined;
|
|
660
|
+
model?: string | undefined;
|
|
661
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
662
|
+
router?: "vercel" | "in-built" | undefined;
|
|
525
663
|
toolCalls?: {
|
|
526
664
|
function: {
|
|
527
665
|
name: string;
|
|
@@ -544,6 +682,7 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
|
|
|
544
682
|
firstMatch: z.ZodObject<{
|
|
545
683
|
sessionId: z.ZodString;
|
|
546
684
|
message: z.ZodObject<{
|
|
685
|
+
id: z.ZodOptional<z.ZodString>;
|
|
547
686
|
role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
|
|
548
687
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
549
688
|
content: z.ZodUnion<[z.ZodString, z.ZodNull, z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
@@ -557,30 +696,30 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
|
|
|
557
696
|
text: string;
|
|
558
697
|
}>, z.ZodObject<{
|
|
559
698
|
type: z.ZodLiteral<"image">;
|
|
560
|
-
image: z.
|
|
699
|
+
image: z.ZodString;
|
|
561
700
|
mimeType: z.ZodOptional<z.ZodString>;
|
|
562
701
|
}, "strict", z.ZodTypeAny, {
|
|
563
702
|
type: "image";
|
|
564
|
-
image
|
|
703
|
+
image: string;
|
|
565
704
|
mimeType?: string | undefined;
|
|
566
705
|
}, {
|
|
567
706
|
type: "image";
|
|
568
|
-
image
|
|
707
|
+
image: string;
|
|
569
708
|
mimeType?: string | undefined;
|
|
570
709
|
}>, z.ZodObject<{
|
|
571
710
|
type: z.ZodLiteral<"file">;
|
|
572
|
-
data: z.
|
|
711
|
+
data: z.ZodString;
|
|
573
712
|
mimeType: z.ZodString;
|
|
574
713
|
filename: z.ZodOptional<z.ZodString>;
|
|
575
714
|
}, "strict", z.ZodTypeAny, {
|
|
576
715
|
type: "file";
|
|
577
716
|
mimeType: string;
|
|
578
|
-
data
|
|
717
|
+
data: string;
|
|
579
718
|
filename?: string | undefined;
|
|
580
719
|
}, {
|
|
581
720
|
type: "file";
|
|
582
721
|
mimeType: string;
|
|
583
|
-
data
|
|
722
|
+
data: string;
|
|
584
723
|
filename?: string | undefined;
|
|
585
724
|
}>]>, "many">]>;
|
|
586
725
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
@@ -601,8 +740,8 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
|
|
|
601
740
|
totalTokens?: number | undefined;
|
|
602
741
|
}>>;
|
|
603
742
|
model: z.ZodOptional<z.ZodString>;
|
|
604
|
-
provider: z.ZodOptional<z.
|
|
605
|
-
router: z.ZodOptional<z.
|
|
743
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere"]>>;
|
|
744
|
+
router: z.ZodOptional<z.ZodEnum<["vercel", "in-built"]>>;
|
|
606
745
|
toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
607
746
|
id: z.ZodString;
|
|
608
747
|
type: z.ZodLiteral<"function">;
|
|
@@ -639,18 +778,16 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
|
|
|
639
778
|
text: string;
|
|
640
779
|
} | {
|
|
641
780
|
type: "image";
|
|
642
|
-
image
|
|
781
|
+
image: string;
|
|
643
782
|
mimeType?: string | undefined;
|
|
644
783
|
} | {
|
|
645
784
|
type: "file";
|
|
646
785
|
mimeType: string;
|
|
647
|
-
data
|
|
786
|
+
data: string;
|
|
648
787
|
filename?: string | undefined;
|
|
649
788
|
})[] | null;
|
|
650
789
|
role: "system" | "user" | "assistant" | "tool";
|
|
651
|
-
|
|
652
|
-
model?: string | undefined;
|
|
653
|
-
router?: string | undefined;
|
|
790
|
+
id?: string | undefined;
|
|
654
791
|
name?: string | undefined;
|
|
655
792
|
timestamp?: number | undefined;
|
|
656
793
|
reasoning?: string | undefined;
|
|
@@ -660,6 +797,9 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
|
|
|
660
797
|
reasoningTokens?: number | undefined;
|
|
661
798
|
totalTokens?: number | undefined;
|
|
662
799
|
} | undefined;
|
|
800
|
+
model?: string | undefined;
|
|
801
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
802
|
+
router?: "vercel" | "in-built" | undefined;
|
|
663
803
|
toolCalls?: {
|
|
664
804
|
function: {
|
|
665
805
|
name: string;
|
|
@@ -675,18 +815,16 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
|
|
|
675
815
|
text: string;
|
|
676
816
|
} | {
|
|
677
817
|
type: "image";
|
|
678
|
-
image
|
|
818
|
+
image: string;
|
|
679
819
|
mimeType?: string | undefined;
|
|
680
820
|
} | {
|
|
681
821
|
type: "file";
|
|
682
822
|
mimeType: string;
|
|
683
|
-
data
|
|
823
|
+
data: string;
|
|
684
824
|
filename?: string | undefined;
|
|
685
825
|
})[] | null;
|
|
686
826
|
role: "system" | "user" | "assistant" | "tool";
|
|
687
|
-
|
|
688
|
-
model?: string | undefined;
|
|
689
|
-
router?: string | undefined;
|
|
827
|
+
id?: string | undefined;
|
|
690
828
|
name?: string | undefined;
|
|
691
829
|
timestamp?: number | undefined;
|
|
692
830
|
reasoning?: string | undefined;
|
|
@@ -696,6 +834,9 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
|
|
|
696
834
|
reasoningTokens?: number | undefined;
|
|
697
835
|
totalTokens?: number | undefined;
|
|
698
836
|
} | undefined;
|
|
837
|
+
model?: string | undefined;
|
|
838
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
839
|
+
router?: "vercel" | "in-built" | undefined;
|
|
699
840
|
toolCalls?: {
|
|
700
841
|
function: {
|
|
701
842
|
name: string;
|
|
@@ -716,18 +857,16 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
|
|
|
716
857
|
text: string;
|
|
717
858
|
} | {
|
|
718
859
|
type: "image";
|
|
719
|
-
image
|
|
860
|
+
image: string;
|
|
720
861
|
mimeType?: string | undefined;
|
|
721
862
|
} | {
|
|
722
863
|
type: "file";
|
|
723
864
|
mimeType: string;
|
|
724
|
-
data
|
|
865
|
+
data: string;
|
|
725
866
|
filename?: string | undefined;
|
|
726
867
|
})[] | null;
|
|
727
868
|
role: "system" | "user" | "assistant" | "tool";
|
|
728
|
-
|
|
729
|
-
model?: string | undefined;
|
|
730
|
-
router?: string | undefined;
|
|
869
|
+
id?: string | undefined;
|
|
731
870
|
name?: string | undefined;
|
|
732
871
|
timestamp?: number | undefined;
|
|
733
872
|
reasoning?: string | undefined;
|
|
@@ -737,6 +876,9 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
|
|
|
737
876
|
reasoningTokens?: number | undefined;
|
|
738
877
|
totalTokens?: number | undefined;
|
|
739
878
|
} | undefined;
|
|
879
|
+
model?: string | undefined;
|
|
880
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
881
|
+
router?: "vercel" | "in-built" | undefined;
|
|
740
882
|
toolCalls?: {
|
|
741
883
|
function: {
|
|
742
884
|
name: string;
|
|
@@ -758,18 +900,16 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
|
|
|
758
900
|
text: string;
|
|
759
901
|
} | {
|
|
760
902
|
type: "image";
|
|
761
|
-
image
|
|
903
|
+
image: string;
|
|
762
904
|
mimeType?: string | undefined;
|
|
763
905
|
} | {
|
|
764
906
|
type: "file";
|
|
765
907
|
mimeType: string;
|
|
766
|
-
data
|
|
908
|
+
data: string;
|
|
767
909
|
filename?: string | undefined;
|
|
768
910
|
})[] | null;
|
|
769
911
|
role: "system" | "user" | "assistant" | "tool";
|
|
770
|
-
|
|
771
|
-
model?: string | undefined;
|
|
772
|
-
router?: string | undefined;
|
|
912
|
+
id?: string | undefined;
|
|
773
913
|
name?: string | undefined;
|
|
774
914
|
timestamp?: number | undefined;
|
|
775
915
|
reasoning?: string | undefined;
|
|
@@ -779,6 +919,9 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
|
|
|
779
919
|
reasoningTokens?: number | undefined;
|
|
780
920
|
totalTokens?: number | undefined;
|
|
781
921
|
} | undefined;
|
|
922
|
+
model?: string | undefined;
|
|
923
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
924
|
+
router?: "vercel" | "in-built" | undefined;
|
|
782
925
|
toolCalls?: {
|
|
783
926
|
function: {
|
|
784
927
|
name: string;
|
|
@@ -817,18 +960,16 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
|
|
|
817
960
|
text: string;
|
|
818
961
|
} | {
|
|
819
962
|
type: "image";
|
|
820
|
-
image
|
|
963
|
+
image: string;
|
|
821
964
|
mimeType?: string | undefined;
|
|
822
965
|
} | {
|
|
823
966
|
type: "file";
|
|
824
967
|
mimeType: string;
|
|
825
|
-
data
|
|
968
|
+
data: string;
|
|
826
969
|
filename?: string | undefined;
|
|
827
970
|
})[] | null;
|
|
828
971
|
role: "system" | "user" | "assistant" | "tool";
|
|
829
|
-
|
|
830
|
-
model?: string | undefined;
|
|
831
|
-
router?: string | undefined;
|
|
972
|
+
id?: string | undefined;
|
|
832
973
|
name?: string | undefined;
|
|
833
974
|
timestamp?: number | undefined;
|
|
834
975
|
reasoning?: string | undefined;
|
|
@@ -838,6 +979,9 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
|
|
|
838
979
|
reasoningTokens?: number | undefined;
|
|
839
980
|
totalTokens?: number | undefined;
|
|
840
981
|
} | undefined;
|
|
982
|
+
model?: string | undefined;
|
|
983
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
984
|
+
router?: "vercel" | "in-built" | undefined;
|
|
841
985
|
toolCalls?: {
|
|
842
986
|
function: {
|
|
843
987
|
name: string;
|
|
@@ -868,18 +1012,16 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
|
|
|
868
1012
|
text: string;
|
|
869
1013
|
} | {
|
|
870
1014
|
type: "image";
|
|
871
|
-
image
|
|
1015
|
+
image: string;
|
|
872
1016
|
mimeType?: string | undefined;
|
|
873
1017
|
} | {
|
|
874
1018
|
type: "file";
|
|
875
1019
|
mimeType: string;
|
|
876
|
-
data
|
|
1020
|
+
data: string;
|
|
877
1021
|
filename?: string | undefined;
|
|
878
1022
|
})[] | null;
|
|
879
1023
|
role: "system" | "user" | "assistant" | "tool";
|
|
880
|
-
|
|
881
|
-
model?: string | undefined;
|
|
882
|
-
router?: string | undefined;
|
|
1024
|
+
id?: string | undefined;
|
|
883
1025
|
name?: string | undefined;
|
|
884
1026
|
timestamp?: number | undefined;
|
|
885
1027
|
reasoning?: string | undefined;
|
|
@@ -889,6 +1031,9 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
|
|
|
889
1031
|
reasoningTokens?: number | undefined;
|
|
890
1032
|
totalTokens?: number | undefined;
|
|
891
1033
|
} | undefined;
|
|
1034
|
+
model?: string | undefined;
|
|
1035
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
1036
|
+
router?: "vercel" | "in-built" | undefined;
|
|
892
1037
|
toolCalls?: {
|
|
893
1038
|
function: {
|
|
894
1039
|
name: string;
|
|
@@ -911,25 +1056,884 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
|
|
|
911
1056
|
};
|
|
912
1057
|
}>;
|
|
913
1058
|
export type SessionSearchResult = z.output<typeof SessionSearchResultSchema>;
|
|
914
|
-
export declare const
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
}, {
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
1059
|
+
export declare const MessageSearchResponseSchema: z.ZodObject<{
|
|
1060
|
+
results: z.ZodArray<z.ZodObject<{
|
|
1061
|
+
sessionId: z.ZodString;
|
|
1062
|
+
message: z.ZodObject<{
|
|
1063
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1064
|
+
role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
|
|
1065
|
+
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1066
|
+
content: z.ZodUnion<[z.ZodString, z.ZodNull, z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1067
|
+
type: z.ZodLiteral<"text">;
|
|
1068
|
+
text: z.ZodString;
|
|
1069
|
+
}, "strict", z.ZodTypeAny, {
|
|
1070
|
+
type: "text";
|
|
1071
|
+
text: string;
|
|
1072
|
+
}, {
|
|
1073
|
+
type: "text";
|
|
1074
|
+
text: string;
|
|
1075
|
+
}>, z.ZodObject<{
|
|
1076
|
+
type: z.ZodLiteral<"image">;
|
|
1077
|
+
image: z.ZodString;
|
|
1078
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
1079
|
+
}, "strict", z.ZodTypeAny, {
|
|
1080
|
+
type: "image";
|
|
1081
|
+
image: string;
|
|
1082
|
+
mimeType?: string | undefined;
|
|
1083
|
+
}, {
|
|
1084
|
+
type: "image";
|
|
1085
|
+
image: string;
|
|
1086
|
+
mimeType?: string | undefined;
|
|
1087
|
+
}>, z.ZodObject<{
|
|
1088
|
+
type: z.ZodLiteral<"file">;
|
|
1089
|
+
data: z.ZodString;
|
|
1090
|
+
mimeType: z.ZodString;
|
|
1091
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
1092
|
+
}, "strict", z.ZodTypeAny, {
|
|
1093
|
+
type: "file";
|
|
1094
|
+
mimeType: string;
|
|
1095
|
+
data: string;
|
|
1096
|
+
filename?: string | undefined;
|
|
1097
|
+
}, {
|
|
1098
|
+
type: "file";
|
|
1099
|
+
mimeType: string;
|
|
1100
|
+
data: string;
|
|
1101
|
+
filename?: string | undefined;
|
|
1102
|
+
}>]>, "many">]>;
|
|
1103
|
+
reasoning: z.ZodOptional<z.ZodString>;
|
|
1104
|
+
tokenUsage: z.ZodOptional<z.ZodObject<{
|
|
1105
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
1106
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
1107
|
+
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
1108
|
+
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
1109
|
+
}, "strict", z.ZodTypeAny, {
|
|
1110
|
+
inputTokens?: number | undefined;
|
|
1111
|
+
outputTokens?: number | undefined;
|
|
1112
|
+
reasoningTokens?: number | undefined;
|
|
1113
|
+
totalTokens?: number | undefined;
|
|
1114
|
+
}, {
|
|
1115
|
+
inputTokens?: number | undefined;
|
|
1116
|
+
outputTokens?: number | undefined;
|
|
1117
|
+
reasoningTokens?: number | undefined;
|
|
1118
|
+
totalTokens?: number | undefined;
|
|
1119
|
+
}>>;
|
|
1120
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1121
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere"]>>;
|
|
1122
|
+
router: z.ZodOptional<z.ZodEnum<["vercel", "in-built"]>>;
|
|
1123
|
+
toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1124
|
+
id: z.ZodString;
|
|
1125
|
+
type: z.ZodLiteral<"function">;
|
|
1126
|
+
function: z.ZodObject<{
|
|
1127
|
+
name: z.ZodString;
|
|
1128
|
+
arguments: z.ZodString;
|
|
1129
|
+
}, "strict", z.ZodTypeAny, {
|
|
1130
|
+
name: string;
|
|
1131
|
+
arguments: string;
|
|
1132
|
+
}, {
|
|
1133
|
+
name: string;
|
|
1134
|
+
arguments: string;
|
|
1135
|
+
}>;
|
|
1136
|
+
}, "strict", z.ZodTypeAny, {
|
|
1137
|
+
function: {
|
|
1138
|
+
name: string;
|
|
1139
|
+
arguments: string;
|
|
1140
|
+
};
|
|
1141
|
+
type: "function";
|
|
1142
|
+
id: string;
|
|
1143
|
+
}, {
|
|
1144
|
+
function: {
|
|
1145
|
+
name: string;
|
|
1146
|
+
arguments: string;
|
|
1147
|
+
};
|
|
1148
|
+
type: "function";
|
|
1149
|
+
id: string;
|
|
1150
|
+
}>, "many">>;
|
|
1151
|
+
toolCallId: z.ZodOptional<z.ZodString>;
|
|
1152
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1153
|
+
}, "strict", z.ZodTypeAny, {
|
|
1154
|
+
content: string | ({
|
|
1155
|
+
type: "text";
|
|
1156
|
+
text: string;
|
|
1157
|
+
} | {
|
|
1158
|
+
type: "image";
|
|
1159
|
+
image: string;
|
|
1160
|
+
mimeType?: string | undefined;
|
|
1161
|
+
} | {
|
|
1162
|
+
type: "file";
|
|
1163
|
+
mimeType: string;
|
|
1164
|
+
data: string;
|
|
1165
|
+
filename?: string | undefined;
|
|
1166
|
+
})[] | null;
|
|
1167
|
+
role: "system" | "user" | "assistant" | "tool";
|
|
1168
|
+
id?: string | undefined;
|
|
1169
|
+
name?: string | undefined;
|
|
1170
|
+
timestamp?: number | undefined;
|
|
1171
|
+
reasoning?: string | undefined;
|
|
1172
|
+
tokenUsage?: {
|
|
1173
|
+
inputTokens?: number | undefined;
|
|
1174
|
+
outputTokens?: number | undefined;
|
|
1175
|
+
reasoningTokens?: number | undefined;
|
|
1176
|
+
totalTokens?: number | undefined;
|
|
1177
|
+
} | undefined;
|
|
1178
|
+
model?: string | undefined;
|
|
1179
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
1180
|
+
router?: "vercel" | "in-built" | undefined;
|
|
1181
|
+
toolCalls?: {
|
|
1182
|
+
function: {
|
|
1183
|
+
name: string;
|
|
1184
|
+
arguments: string;
|
|
1185
|
+
};
|
|
1186
|
+
type: "function";
|
|
1187
|
+
id: string;
|
|
1188
|
+
}[] | undefined;
|
|
1189
|
+
toolCallId?: string | undefined;
|
|
1190
|
+
}, {
|
|
1191
|
+
content: string | ({
|
|
1192
|
+
type: "text";
|
|
1193
|
+
text: string;
|
|
1194
|
+
} | {
|
|
1195
|
+
type: "image";
|
|
1196
|
+
image: string;
|
|
1197
|
+
mimeType?: string | undefined;
|
|
1198
|
+
} | {
|
|
1199
|
+
type: "file";
|
|
1200
|
+
mimeType: string;
|
|
1201
|
+
data: string;
|
|
1202
|
+
filename?: string | undefined;
|
|
1203
|
+
})[] | null;
|
|
1204
|
+
role: "system" | "user" | "assistant" | "tool";
|
|
1205
|
+
id?: string | undefined;
|
|
1206
|
+
name?: string | undefined;
|
|
1207
|
+
timestamp?: number | undefined;
|
|
1208
|
+
reasoning?: string | undefined;
|
|
1209
|
+
tokenUsage?: {
|
|
1210
|
+
inputTokens?: number | undefined;
|
|
1211
|
+
outputTokens?: number | undefined;
|
|
1212
|
+
reasoningTokens?: number | undefined;
|
|
1213
|
+
totalTokens?: number | undefined;
|
|
1214
|
+
} | undefined;
|
|
1215
|
+
model?: string | undefined;
|
|
1216
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
1217
|
+
router?: "vercel" | "in-built" | undefined;
|
|
1218
|
+
toolCalls?: {
|
|
1219
|
+
function: {
|
|
1220
|
+
name: string;
|
|
1221
|
+
arguments: string;
|
|
1222
|
+
};
|
|
1223
|
+
type: "function";
|
|
1224
|
+
id: string;
|
|
1225
|
+
}[] | undefined;
|
|
1226
|
+
toolCallId?: string | undefined;
|
|
1227
|
+
}>;
|
|
1228
|
+
matchedText: z.ZodString;
|
|
1229
|
+
context: z.ZodString;
|
|
1230
|
+
messageIndex: z.ZodNumber;
|
|
1231
|
+
}, "strict", z.ZodTypeAny, {
|
|
1232
|
+
message: {
|
|
1233
|
+
content: string | ({
|
|
1234
|
+
type: "text";
|
|
1235
|
+
text: string;
|
|
1236
|
+
} | {
|
|
1237
|
+
type: "image";
|
|
1238
|
+
image: string;
|
|
1239
|
+
mimeType?: string | undefined;
|
|
1240
|
+
} | {
|
|
1241
|
+
type: "file";
|
|
1242
|
+
mimeType: string;
|
|
1243
|
+
data: string;
|
|
1244
|
+
filename?: string | undefined;
|
|
1245
|
+
})[] | null;
|
|
1246
|
+
role: "system" | "user" | "assistant" | "tool";
|
|
1247
|
+
id?: string | undefined;
|
|
1248
|
+
name?: string | undefined;
|
|
1249
|
+
timestamp?: number | undefined;
|
|
1250
|
+
reasoning?: string | undefined;
|
|
1251
|
+
tokenUsage?: {
|
|
1252
|
+
inputTokens?: number | undefined;
|
|
1253
|
+
outputTokens?: number | undefined;
|
|
1254
|
+
reasoningTokens?: number | undefined;
|
|
1255
|
+
totalTokens?: number | undefined;
|
|
1256
|
+
} | undefined;
|
|
1257
|
+
model?: string | undefined;
|
|
1258
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
1259
|
+
router?: "vercel" | "in-built" | undefined;
|
|
1260
|
+
toolCalls?: {
|
|
1261
|
+
function: {
|
|
1262
|
+
name: string;
|
|
1263
|
+
arguments: string;
|
|
1264
|
+
};
|
|
1265
|
+
type: "function";
|
|
1266
|
+
id: string;
|
|
1267
|
+
}[] | undefined;
|
|
1268
|
+
toolCallId?: string | undefined;
|
|
1269
|
+
};
|
|
1270
|
+
sessionId: string;
|
|
1271
|
+
matchedText: string;
|
|
1272
|
+
context: string;
|
|
1273
|
+
messageIndex: number;
|
|
1274
|
+
}, {
|
|
1275
|
+
message: {
|
|
1276
|
+
content: string | ({
|
|
1277
|
+
type: "text";
|
|
1278
|
+
text: string;
|
|
1279
|
+
} | {
|
|
1280
|
+
type: "image";
|
|
1281
|
+
image: string;
|
|
1282
|
+
mimeType?: string | undefined;
|
|
1283
|
+
} | {
|
|
1284
|
+
type: "file";
|
|
1285
|
+
mimeType: string;
|
|
1286
|
+
data: string;
|
|
1287
|
+
filename?: string | undefined;
|
|
1288
|
+
})[] | null;
|
|
1289
|
+
role: "system" | "user" | "assistant" | "tool";
|
|
1290
|
+
id?: string | undefined;
|
|
1291
|
+
name?: string | undefined;
|
|
1292
|
+
timestamp?: number | undefined;
|
|
1293
|
+
reasoning?: string | undefined;
|
|
1294
|
+
tokenUsage?: {
|
|
1295
|
+
inputTokens?: number | undefined;
|
|
1296
|
+
outputTokens?: number | undefined;
|
|
1297
|
+
reasoningTokens?: number | undefined;
|
|
1298
|
+
totalTokens?: number | undefined;
|
|
1299
|
+
} | undefined;
|
|
1300
|
+
model?: string | undefined;
|
|
1301
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
1302
|
+
router?: "vercel" | "in-built" | undefined;
|
|
1303
|
+
toolCalls?: {
|
|
1304
|
+
function: {
|
|
1305
|
+
name: string;
|
|
1306
|
+
arguments: string;
|
|
1307
|
+
};
|
|
1308
|
+
type: "function";
|
|
1309
|
+
id: string;
|
|
1310
|
+
}[] | undefined;
|
|
1311
|
+
toolCallId?: string | undefined;
|
|
1312
|
+
};
|
|
1313
|
+
sessionId: string;
|
|
1314
|
+
matchedText: string;
|
|
1315
|
+
context: string;
|
|
1316
|
+
messageIndex: number;
|
|
1317
|
+
}>, "many">;
|
|
1318
|
+
total: z.ZodNumber;
|
|
1319
|
+
hasMore: z.ZodBoolean;
|
|
1320
|
+
query: z.ZodString;
|
|
1321
|
+
}, "strict", z.ZodTypeAny, {
|
|
1322
|
+
query: string;
|
|
1323
|
+
results: {
|
|
1324
|
+
message: {
|
|
1325
|
+
content: string | ({
|
|
1326
|
+
type: "text";
|
|
1327
|
+
text: string;
|
|
1328
|
+
} | {
|
|
1329
|
+
type: "image";
|
|
1330
|
+
image: string;
|
|
1331
|
+
mimeType?: string | undefined;
|
|
1332
|
+
} | {
|
|
1333
|
+
type: "file";
|
|
1334
|
+
mimeType: string;
|
|
1335
|
+
data: string;
|
|
1336
|
+
filename?: string | undefined;
|
|
1337
|
+
})[] | null;
|
|
1338
|
+
role: "system" | "user" | "assistant" | "tool";
|
|
1339
|
+
id?: string | undefined;
|
|
1340
|
+
name?: string | undefined;
|
|
1341
|
+
timestamp?: number | undefined;
|
|
1342
|
+
reasoning?: string | undefined;
|
|
1343
|
+
tokenUsage?: {
|
|
1344
|
+
inputTokens?: number | undefined;
|
|
1345
|
+
outputTokens?: number | undefined;
|
|
1346
|
+
reasoningTokens?: number | undefined;
|
|
1347
|
+
totalTokens?: number | undefined;
|
|
1348
|
+
} | undefined;
|
|
1349
|
+
model?: string | undefined;
|
|
1350
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
1351
|
+
router?: "vercel" | "in-built" | undefined;
|
|
1352
|
+
toolCalls?: {
|
|
1353
|
+
function: {
|
|
1354
|
+
name: string;
|
|
1355
|
+
arguments: string;
|
|
1356
|
+
};
|
|
1357
|
+
type: "function";
|
|
1358
|
+
id: string;
|
|
1359
|
+
}[] | undefined;
|
|
1360
|
+
toolCallId?: string | undefined;
|
|
1361
|
+
};
|
|
1362
|
+
sessionId: string;
|
|
1363
|
+
matchedText: string;
|
|
1364
|
+
context: string;
|
|
1365
|
+
messageIndex: number;
|
|
1366
|
+
}[];
|
|
1367
|
+
total: number;
|
|
1368
|
+
hasMore: boolean;
|
|
1369
|
+
}, {
|
|
1370
|
+
query: string;
|
|
1371
|
+
results: {
|
|
1372
|
+
message: {
|
|
1373
|
+
content: string | ({
|
|
1374
|
+
type: "text";
|
|
1375
|
+
text: string;
|
|
1376
|
+
} | {
|
|
1377
|
+
type: "image";
|
|
1378
|
+
image: string;
|
|
1379
|
+
mimeType?: string | undefined;
|
|
1380
|
+
} | {
|
|
1381
|
+
type: "file";
|
|
1382
|
+
mimeType: string;
|
|
1383
|
+
data: string;
|
|
1384
|
+
filename?: string | undefined;
|
|
1385
|
+
})[] | null;
|
|
1386
|
+
role: "system" | "user" | "assistant" | "tool";
|
|
1387
|
+
id?: string | undefined;
|
|
1388
|
+
name?: string | undefined;
|
|
1389
|
+
timestamp?: number | undefined;
|
|
1390
|
+
reasoning?: string | undefined;
|
|
1391
|
+
tokenUsage?: {
|
|
1392
|
+
inputTokens?: number | undefined;
|
|
1393
|
+
outputTokens?: number | undefined;
|
|
1394
|
+
reasoningTokens?: number | undefined;
|
|
1395
|
+
totalTokens?: number | undefined;
|
|
1396
|
+
} | undefined;
|
|
1397
|
+
model?: string | undefined;
|
|
1398
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
1399
|
+
router?: "vercel" | "in-built" | undefined;
|
|
1400
|
+
toolCalls?: {
|
|
1401
|
+
function: {
|
|
1402
|
+
name: string;
|
|
1403
|
+
arguments: string;
|
|
1404
|
+
};
|
|
1405
|
+
type: "function";
|
|
1406
|
+
id: string;
|
|
1407
|
+
}[] | undefined;
|
|
1408
|
+
toolCallId?: string | undefined;
|
|
1409
|
+
};
|
|
1410
|
+
sessionId: string;
|
|
1411
|
+
matchedText: string;
|
|
1412
|
+
context: string;
|
|
1413
|
+
messageIndex: number;
|
|
1414
|
+
}[];
|
|
1415
|
+
total: number;
|
|
1416
|
+
hasMore: boolean;
|
|
1417
|
+
}>;
|
|
1418
|
+
export type MessageSearchResponse = z.output<typeof MessageSearchResponseSchema>;
|
|
1419
|
+
export declare const SessionSearchResponseSchema: z.ZodObject<{
|
|
1420
|
+
results: z.ZodArray<z.ZodObject<{
|
|
1421
|
+
sessionId: z.ZodString;
|
|
1422
|
+
matchCount: z.ZodNumber;
|
|
1423
|
+
firstMatch: z.ZodObject<{
|
|
1424
|
+
sessionId: z.ZodString;
|
|
1425
|
+
message: z.ZodObject<{
|
|
1426
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1427
|
+
role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
|
|
1428
|
+
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
1429
|
+
content: z.ZodUnion<[z.ZodString, z.ZodNull, z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1430
|
+
type: z.ZodLiteral<"text">;
|
|
1431
|
+
text: z.ZodString;
|
|
1432
|
+
}, "strict", z.ZodTypeAny, {
|
|
1433
|
+
type: "text";
|
|
1434
|
+
text: string;
|
|
1435
|
+
}, {
|
|
1436
|
+
type: "text";
|
|
1437
|
+
text: string;
|
|
1438
|
+
}>, z.ZodObject<{
|
|
1439
|
+
type: z.ZodLiteral<"image">;
|
|
1440
|
+
image: z.ZodString;
|
|
1441
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
1442
|
+
}, "strict", z.ZodTypeAny, {
|
|
1443
|
+
type: "image";
|
|
1444
|
+
image: string;
|
|
1445
|
+
mimeType?: string | undefined;
|
|
1446
|
+
}, {
|
|
1447
|
+
type: "image";
|
|
1448
|
+
image: string;
|
|
1449
|
+
mimeType?: string | undefined;
|
|
1450
|
+
}>, z.ZodObject<{
|
|
1451
|
+
type: z.ZodLiteral<"file">;
|
|
1452
|
+
data: z.ZodString;
|
|
1453
|
+
mimeType: z.ZodString;
|
|
1454
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
1455
|
+
}, "strict", z.ZodTypeAny, {
|
|
1456
|
+
type: "file";
|
|
1457
|
+
mimeType: string;
|
|
1458
|
+
data: string;
|
|
1459
|
+
filename?: string | undefined;
|
|
1460
|
+
}, {
|
|
1461
|
+
type: "file";
|
|
1462
|
+
mimeType: string;
|
|
1463
|
+
data: string;
|
|
1464
|
+
filename?: string | undefined;
|
|
1465
|
+
}>]>, "many">]>;
|
|
1466
|
+
reasoning: z.ZodOptional<z.ZodString>;
|
|
1467
|
+
tokenUsage: z.ZodOptional<z.ZodObject<{
|
|
1468
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
1469
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
1470
|
+
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
1471
|
+
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
1472
|
+
}, "strict", z.ZodTypeAny, {
|
|
1473
|
+
inputTokens?: number | undefined;
|
|
1474
|
+
outputTokens?: number | undefined;
|
|
1475
|
+
reasoningTokens?: number | undefined;
|
|
1476
|
+
totalTokens?: number | undefined;
|
|
1477
|
+
}, {
|
|
1478
|
+
inputTokens?: number | undefined;
|
|
1479
|
+
outputTokens?: number | undefined;
|
|
1480
|
+
reasoningTokens?: number | undefined;
|
|
1481
|
+
totalTokens?: number | undefined;
|
|
1482
|
+
}>>;
|
|
1483
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1484
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere"]>>;
|
|
1485
|
+
router: z.ZodOptional<z.ZodEnum<["vercel", "in-built"]>>;
|
|
1486
|
+
toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1487
|
+
id: z.ZodString;
|
|
1488
|
+
type: z.ZodLiteral<"function">;
|
|
1489
|
+
function: z.ZodObject<{
|
|
1490
|
+
name: z.ZodString;
|
|
1491
|
+
arguments: z.ZodString;
|
|
1492
|
+
}, "strict", z.ZodTypeAny, {
|
|
1493
|
+
name: string;
|
|
1494
|
+
arguments: string;
|
|
1495
|
+
}, {
|
|
1496
|
+
name: string;
|
|
1497
|
+
arguments: string;
|
|
1498
|
+
}>;
|
|
1499
|
+
}, "strict", z.ZodTypeAny, {
|
|
1500
|
+
function: {
|
|
1501
|
+
name: string;
|
|
1502
|
+
arguments: string;
|
|
1503
|
+
};
|
|
1504
|
+
type: "function";
|
|
1505
|
+
id: string;
|
|
1506
|
+
}, {
|
|
1507
|
+
function: {
|
|
1508
|
+
name: string;
|
|
1509
|
+
arguments: string;
|
|
1510
|
+
};
|
|
1511
|
+
type: "function";
|
|
1512
|
+
id: string;
|
|
1513
|
+
}>, "many">>;
|
|
1514
|
+
toolCallId: z.ZodOptional<z.ZodString>;
|
|
1515
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1516
|
+
}, "strict", z.ZodTypeAny, {
|
|
1517
|
+
content: string | ({
|
|
1518
|
+
type: "text";
|
|
1519
|
+
text: string;
|
|
1520
|
+
} | {
|
|
1521
|
+
type: "image";
|
|
1522
|
+
image: string;
|
|
1523
|
+
mimeType?: string | undefined;
|
|
1524
|
+
} | {
|
|
1525
|
+
type: "file";
|
|
1526
|
+
mimeType: string;
|
|
1527
|
+
data: string;
|
|
1528
|
+
filename?: string | undefined;
|
|
1529
|
+
})[] | null;
|
|
1530
|
+
role: "system" | "user" | "assistant" | "tool";
|
|
1531
|
+
id?: string | undefined;
|
|
1532
|
+
name?: string | undefined;
|
|
1533
|
+
timestamp?: number | undefined;
|
|
1534
|
+
reasoning?: string | undefined;
|
|
1535
|
+
tokenUsage?: {
|
|
1536
|
+
inputTokens?: number | undefined;
|
|
1537
|
+
outputTokens?: number | undefined;
|
|
1538
|
+
reasoningTokens?: number | undefined;
|
|
1539
|
+
totalTokens?: number | undefined;
|
|
1540
|
+
} | undefined;
|
|
1541
|
+
model?: string | undefined;
|
|
1542
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
1543
|
+
router?: "vercel" | "in-built" | undefined;
|
|
1544
|
+
toolCalls?: {
|
|
1545
|
+
function: {
|
|
1546
|
+
name: string;
|
|
1547
|
+
arguments: string;
|
|
1548
|
+
};
|
|
1549
|
+
type: "function";
|
|
1550
|
+
id: string;
|
|
1551
|
+
}[] | undefined;
|
|
1552
|
+
toolCallId?: string | undefined;
|
|
1553
|
+
}, {
|
|
1554
|
+
content: string | ({
|
|
1555
|
+
type: "text";
|
|
1556
|
+
text: string;
|
|
1557
|
+
} | {
|
|
1558
|
+
type: "image";
|
|
1559
|
+
image: string;
|
|
1560
|
+
mimeType?: string | undefined;
|
|
1561
|
+
} | {
|
|
1562
|
+
type: "file";
|
|
1563
|
+
mimeType: string;
|
|
1564
|
+
data: string;
|
|
1565
|
+
filename?: string | undefined;
|
|
1566
|
+
})[] | null;
|
|
1567
|
+
role: "system" | "user" | "assistant" | "tool";
|
|
1568
|
+
id?: string | undefined;
|
|
1569
|
+
name?: string | undefined;
|
|
1570
|
+
timestamp?: number | undefined;
|
|
1571
|
+
reasoning?: string | undefined;
|
|
1572
|
+
tokenUsage?: {
|
|
1573
|
+
inputTokens?: number | undefined;
|
|
1574
|
+
outputTokens?: number | undefined;
|
|
1575
|
+
reasoningTokens?: number | undefined;
|
|
1576
|
+
totalTokens?: number | undefined;
|
|
1577
|
+
} | undefined;
|
|
1578
|
+
model?: string | undefined;
|
|
1579
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
1580
|
+
router?: "vercel" | "in-built" | undefined;
|
|
1581
|
+
toolCalls?: {
|
|
1582
|
+
function: {
|
|
1583
|
+
name: string;
|
|
1584
|
+
arguments: string;
|
|
1585
|
+
};
|
|
1586
|
+
type: "function";
|
|
1587
|
+
id: string;
|
|
1588
|
+
}[] | undefined;
|
|
1589
|
+
toolCallId?: string | undefined;
|
|
1590
|
+
}>;
|
|
1591
|
+
matchedText: z.ZodString;
|
|
1592
|
+
context: z.ZodString;
|
|
1593
|
+
messageIndex: z.ZodNumber;
|
|
1594
|
+
}, "strict", z.ZodTypeAny, {
|
|
1595
|
+
message: {
|
|
1596
|
+
content: string | ({
|
|
1597
|
+
type: "text";
|
|
1598
|
+
text: string;
|
|
1599
|
+
} | {
|
|
1600
|
+
type: "image";
|
|
1601
|
+
image: string;
|
|
1602
|
+
mimeType?: string | undefined;
|
|
1603
|
+
} | {
|
|
1604
|
+
type: "file";
|
|
1605
|
+
mimeType: string;
|
|
1606
|
+
data: string;
|
|
1607
|
+
filename?: string | undefined;
|
|
1608
|
+
})[] | null;
|
|
1609
|
+
role: "system" | "user" | "assistant" | "tool";
|
|
1610
|
+
id?: string | undefined;
|
|
1611
|
+
name?: string | undefined;
|
|
1612
|
+
timestamp?: number | undefined;
|
|
1613
|
+
reasoning?: string | undefined;
|
|
1614
|
+
tokenUsage?: {
|
|
1615
|
+
inputTokens?: number | undefined;
|
|
1616
|
+
outputTokens?: number | undefined;
|
|
1617
|
+
reasoningTokens?: number | undefined;
|
|
1618
|
+
totalTokens?: number | undefined;
|
|
1619
|
+
} | undefined;
|
|
1620
|
+
model?: string | undefined;
|
|
1621
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
1622
|
+
router?: "vercel" | "in-built" | undefined;
|
|
1623
|
+
toolCalls?: {
|
|
1624
|
+
function: {
|
|
1625
|
+
name: string;
|
|
1626
|
+
arguments: string;
|
|
1627
|
+
};
|
|
1628
|
+
type: "function";
|
|
1629
|
+
id: string;
|
|
1630
|
+
}[] | undefined;
|
|
1631
|
+
toolCallId?: string | undefined;
|
|
1632
|
+
};
|
|
1633
|
+
sessionId: string;
|
|
1634
|
+
matchedText: string;
|
|
1635
|
+
context: string;
|
|
1636
|
+
messageIndex: number;
|
|
1637
|
+
}, {
|
|
1638
|
+
message: {
|
|
1639
|
+
content: string | ({
|
|
1640
|
+
type: "text";
|
|
1641
|
+
text: string;
|
|
1642
|
+
} | {
|
|
1643
|
+
type: "image";
|
|
1644
|
+
image: string;
|
|
1645
|
+
mimeType?: string | undefined;
|
|
1646
|
+
} | {
|
|
1647
|
+
type: "file";
|
|
1648
|
+
mimeType: string;
|
|
1649
|
+
data: string;
|
|
1650
|
+
filename?: string | undefined;
|
|
1651
|
+
})[] | null;
|
|
1652
|
+
role: "system" | "user" | "assistant" | "tool";
|
|
1653
|
+
id?: string | undefined;
|
|
1654
|
+
name?: string | undefined;
|
|
1655
|
+
timestamp?: number | undefined;
|
|
1656
|
+
reasoning?: string | undefined;
|
|
1657
|
+
tokenUsage?: {
|
|
1658
|
+
inputTokens?: number | undefined;
|
|
1659
|
+
outputTokens?: number | undefined;
|
|
1660
|
+
reasoningTokens?: number | undefined;
|
|
1661
|
+
totalTokens?: number | undefined;
|
|
1662
|
+
} | undefined;
|
|
1663
|
+
model?: string | undefined;
|
|
1664
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
1665
|
+
router?: "vercel" | "in-built" | undefined;
|
|
1666
|
+
toolCalls?: {
|
|
1667
|
+
function: {
|
|
1668
|
+
name: string;
|
|
1669
|
+
arguments: string;
|
|
1670
|
+
};
|
|
1671
|
+
type: "function";
|
|
1672
|
+
id: string;
|
|
1673
|
+
}[] | undefined;
|
|
1674
|
+
toolCallId?: string | undefined;
|
|
1675
|
+
};
|
|
1676
|
+
sessionId: string;
|
|
1677
|
+
matchedText: string;
|
|
1678
|
+
context: string;
|
|
1679
|
+
messageIndex: number;
|
|
1680
|
+
}>;
|
|
1681
|
+
metadata: z.ZodObject<{
|
|
1682
|
+
createdAt: z.ZodNumber;
|
|
1683
|
+
lastActivity: z.ZodNumber;
|
|
1684
|
+
messageCount: z.ZodNumber;
|
|
1685
|
+
}, "strict", z.ZodTypeAny, {
|
|
1686
|
+
createdAt: number;
|
|
1687
|
+
lastActivity: number;
|
|
1688
|
+
messageCount: number;
|
|
1689
|
+
}, {
|
|
1690
|
+
createdAt: number;
|
|
1691
|
+
lastActivity: number;
|
|
1692
|
+
messageCount: number;
|
|
1693
|
+
}>;
|
|
1694
|
+
}, "strict", z.ZodTypeAny, {
|
|
1695
|
+
sessionId: string;
|
|
1696
|
+
matchCount: number;
|
|
1697
|
+
firstMatch: {
|
|
1698
|
+
message: {
|
|
1699
|
+
content: string | ({
|
|
1700
|
+
type: "text";
|
|
1701
|
+
text: string;
|
|
1702
|
+
} | {
|
|
1703
|
+
type: "image";
|
|
1704
|
+
image: string;
|
|
1705
|
+
mimeType?: string | undefined;
|
|
1706
|
+
} | {
|
|
1707
|
+
type: "file";
|
|
1708
|
+
mimeType: string;
|
|
1709
|
+
data: string;
|
|
1710
|
+
filename?: string | undefined;
|
|
1711
|
+
})[] | null;
|
|
1712
|
+
role: "system" | "user" | "assistant" | "tool";
|
|
1713
|
+
id?: string | undefined;
|
|
1714
|
+
name?: string | undefined;
|
|
1715
|
+
timestamp?: number | undefined;
|
|
1716
|
+
reasoning?: string | undefined;
|
|
1717
|
+
tokenUsage?: {
|
|
1718
|
+
inputTokens?: number | undefined;
|
|
1719
|
+
outputTokens?: number | undefined;
|
|
1720
|
+
reasoningTokens?: number | undefined;
|
|
1721
|
+
totalTokens?: number | undefined;
|
|
1722
|
+
} | undefined;
|
|
1723
|
+
model?: string | undefined;
|
|
1724
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
1725
|
+
router?: "vercel" | "in-built" | undefined;
|
|
1726
|
+
toolCalls?: {
|
|
1727
|
+
function: {
|
|
1728
|
+
name: string;
|
|
1729
|
+
arguments: string;
|
|
1730
|
+
};
|
|
1731
|
+
type: "function";
|
|
1732
|
+
id: string;
|
|
1733
|
+
}[] | undefined;
|
|
1734
|
+
toolCallId?: string | undefined;
|
|
1735
|
+
};
|
|
1736
|
+
sessionId: string;
|
|
1737
|
+
matchedText: string;
|
|
1738
|
+
context: string;
|
|
1739
|
+
messageIndex: number;
|
|
1740
|
+
};
|
|
1741
|
+
metadata: {
|
|
1742
|
+
createdAt: number;
|
|
1743
|
+
lastActivity: number;
|
|
1744
|
+
messageCount: number;
|
|
1745
|
+
};
|
|
1746
|
+
}, {
|
|
1747
|
+
sessionId: string;
|
|
1748
|
+
matchCount: number;
|
|
1749
|
+
firstMatch: {
|
|
1750
|
+
message: {
|
|
1751
|
+
content: string | ({
|
|
1752
|
+
type: "text";
|
|
1753
|
+
text: string;
|
|
1754
|
+
} | {
|
|
1755
|
+
type: "image";
|
|
1756
|
+
image: string;
|
|
1757
|
+
mimeType?: string | undefined;
|
|
1758
|
+
} | {
|
|
1759
|
+
type: "file";
|
|
1760
|
+
mimeType: string;
|
|
1761
|
+
data: string;
|
|
1762
|
+
filename?: string | undefined;
|
|
1763
|
+
})[] | null;
|
|
1764
|
+
role: "system" | "user" | "assistant" | "tool";
|
|
1765
|
+
id?: string | undefined;
|
|
1766
|
+
name?: string | undefined;
|
|
1767
|
+
timestamp?: number | undefined;
|
|
1768
|
+
reasoning?: string | undefined;
|
|
1769
|
+
tokenUsage?: {
|
|
1770
|
+
inputTokens?: number | undefined;
|
|
1771
|
+
outputTokens?: number | undefined;
|
|
1772
|
+
reasoningTokens?: number | undefined;
|
|
1773
|
+
totalTokens?: number | undefined;
|
|
1774
|
+
} | undefined;
|
|
1775
|
+
model?: string | undefined;
|
|
1776
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
1777
|
+
router?: "vercel" | "in-built" | undefined;
|
|
1778
|
+
toolCalls?: {
|
|
1779
|
+
function: {
|
|
1780
|
+
name: string;
|
|
1781
|
+
arguments: string;
|
|
1782
|
+
};
|
|
1783
|
+
type: "function";
|
|
1784
|
+
id: string;
|
|
1785
|
+
}[] | undefined;
|
|
1786
|
+
toolCallId?: string | undefined;
|
|
1787
|
+
};
|
|
1788
|
+
sessionId: string;
|
|
1789
|
+
matchedText: string;
|
|
1790
|
+
context: string;
|
|
1791
|
+
messageIndex: number;
|
|
1792
|
+
};
|
|
1793
|
+
metadata: {
|
|
1794
|
+
createdAt: number;
|
|
1795
|
+
lastActivity: number;
|
|
1796
|
+
messageCount: number;
|
|
1797
|
+
};
|
|
1798
|
+
}>, "many">;
|
|
1799
|
+
total: z.ZodNumber;
|
|
1800
|
+
hasMore: z.ZodBoolean;
|
|
1801
|
+
query: z.ZodString;
|
|
1802
|
+
}, "strict", z.ZodTypeAny, {
|
|
1803
|
+
query: string;
|
|
1804
|
+
results: {
|
|
1805
|
+
sessionId: string;
|
|
1806
|
+
matchCount: number;
|
|
1807
|
+
firstMatch: {
|
|
1808
|
+
message: {
|
|
1809
|
+
content: string | ({
|
|
1810
|
+
type: "text";
|
|
1811
|
+
text: string;
|
|
1812
|
+
} | {
|
|
1813
|
+
type: "image";
|
|
1814
|
+
image: string;
|
|
1815
|
+
mimeType?: string | undefined;
|
|
1816
|
+
} | {
|
|
1817
|
+
type: "file";
|
|
1818
|
+
mimeType: string;
|
|
1819
|
+
data: string;
|
|
1820
|
+
filename?: string | undefined;
|
|
1821
|
+
})[] | null;
|
|
1822
|
+
role: "system" | "user" | "assistant" | "tool";
|
|
1823
|
+
id?: string | undefined;
|
|
1824
|
+
name?: string | undefined;
|
|
1825
|
+
timestamp?: number | undefined;
|
|
1826
|
+
reasoning?: string | undefined;
|
|
1827
|
+
tokenUsage?: {
|
|
1828
|
+
inputTokens?: number | undefined;
|
|
1829
|
+
outputTokens?: number | undefined;
|
|
1830
|
+
reasoningTokens?: number | undefined;
|
|
1831
|
+
totalTokens?: number | undefined;
|
|
1832
|
+
} | undefined;
|
|
1833
|
+
model?: string | undefined;
|
|
1834
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
1835
|
+
router?: "vercel" | "in-built" | undefined;
|
|
1836
|
+
toolCalls?: {
|
|
1837
|
+
function: {
|
|
1838
|
+
name: string;
|
|
1839
|
+
arguments: string;
|
|
1840
|
+
};
|
|
1841
|
+
type: "function";
|
|
1842
|
+
id: string;
|
|
1843
|
+
}[] | undefined;
|
|
1844
|
+
toolCallId?: string | undefined;
|
|
1845
|
+
};
|
|
1846
|
+
sessionId: string;
|
|
1847
|
+
matchedText: string;
|
|
1848
|
+
context: string;
|
|
1849
|
+
messageIndex: number;
|
|
1850
|
+
};
|
|
1851
|
+
metadata: {
|
|
1852
|
+
createdAt: number;
|
|
1853
|
+
lastActivity: number;
|
|
1854
|
+
messageCount: number;
|
|
1855
|
+
};
|
|
1856
|
+
}[];
|
|
1857
|
+
total: number;
|
|
1858
|
+
hasMore: boolean;
|
|
1859
|
+
}, {
|
|
1860
|
+
query: string;
|
|
1861
|
+
results: {
|
|
1862
|
+
sessionId: string;
|
|
1863
|
+
matchCount: number;
|
|
1864
|
+
firstMatch: {
|
|
1865
|
+
message: {
|
|
1866
|
+
content: string | ({
|
|
1867
|
+
type: "text";
|
|
1868
|
+
text: string;
|
|
1869
|
+
} | {
|
|
1870
|
+
type: "image";
|
|
1871
|
+
image: string;
|
|
1872
|
+
mimeType?: string | undefined;
|
|
1873
|
+
} | {
|
|
1874
|
+
type: "file";
|
|
1875
|
+
mimeType: string;
|
|
1876
|
+
data: string;
|
|
1877
|
+
filename?: string | undefined;
|
|
1878
|
+
})[] | null;
|
|
1879
|
+
role: "system" | "user" | "assistant" | "tool";
|
|
1880
|
+
id?: string | undefined;
|
|
1881
|
+
name?: string | undefined;
|
|
1882
|
+
timestamp?: number | undefined;
|
|
1883
|
+
reasoning?: string | undefined;
|
|
1884
|
+
tokenUsage?: {
|
|
1885
|
+
inputTokens?: number | undefined;
|
|
1886
|
+
outputTokens?: number | undefined;
|
|
1887
|
+
reasoningTokens?: number | undefined;
|
|
1888
|
+
totalTokens?: number | undefined;
|
|
1889
|
+
} | undefined;
|
|
1890
|
+
model?: string | undefined;
|
|
1891
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
|
|
1892
|
+
router?: "vercel" | "in-built" | undefined;
|
|
1893
|
+
toolCalls?: {
|
|
1894
|
+
function: {
|
|
1895
|
+
name: string;
|
|
1896
|
+
arguments: string;
|
|
1897
|
+
};
|
|
1898
|
+
type: "function";
|
|
1899
|
+
id: string;
|
|
1900
|
+
}[] | undefined;
|
|
1901
|
+
toolCallId?: string | undefined;
|
|
1902
|
+
};
|
|
1903
|
+
sessionId: string;
|
|
1904
|
+
matchedText: string;
|
|
1905
|
+
context: string;
|
|
1906
|
+
messageIndex: number;
|
|
1907
|
+
};
|
|
1908
|
+
metadata: {
|
|
1909
|
+
createdAt: number;
|
|
1910
|
+
lastActivity: number;
|
|
1911
|
+
messageCount: number;
|
|
1912
|
+
};
|
|
1913
|
+
}[];
|
|
1914
|
+
total: number;
|
|
1915
|
+
hasMore: boolean;
|
|
1916
|
+
}>;
|
|
1917
|
+
export type SessionSearchResponse = z.output<typeof SessionSearchResponseSchema>;
|
|
1918
|
+
export declare const WebhookSchema: z.ZodObject<{
|
|
1919
|
+
id: z.ZodString;
|
|
1920
|
+
url: z.ZodString;
|
|
1921
|
+
events: z.ZodArray<z.ZodString, "many">;
|
|
1922
|
+
createdAt: z.ZodNumber;
|
|
1923
|
+
}, "strict", z.ZodTypeAny, {
|
|
1924
|
+
id: string;
|
|
1925
|
+
createdAt: number;
|
|
1926
|
+
url: string;
|
|
1927
|
+
events: string[];
|
|
1928
|
+
}, {
|
|
1929
|
+
id: string;
|
|
1930
|
+
createdAt: number;
|
|
1931
|
+
url: string;
|
|
1932
|
+
events: string[];
|
|
1933
|
+
}>;
|
|
1934
|
+
export type Webhook = z.output<typeof WebhookSchema>;
|
|
1935
|
+
export declare const CatalogModelInfoSchema: z.ZodObject<{
|
|
1936
|
+
name: z.ZodString;
|
|
933
1937
|
maxInputTokens: z.ZodNumber;
|
|
934
1938
|
default: z.ZodOptional<z.ZodBoolean>;
|
|
935
1939
|
supportedFileTypes: z.ZodArray<z.ZodEnum<["audio", "pdf", "image"]>, "many">;
|
|
@@ -958,8 +1962,8 @@ export declare const CatalogModelInfoSchema: z.ZodObject<{
|
|
|
958
1962
|
unit?: "per_million_tokens" | undefined;
|
|
959
1963
|
}>>;
|
|
960
1964
|
}, "strict", z.ZodTypeAny, {
|
|
961
|
-
maxInputTokens: number;
|
|
962
1965
|
name: string;
|
|
1966
|
+
maxInputTokens: number;
|
|
963
1967
|
supportedFileTypes: ("image" | "audio" | "pdf")[];
|
|
964
1968
|
default?: boolean | undefined;
|
|
965
1969
|
supportedRouters?: ("vercel" | "in-built")[] | undefined;
|
|
@@ -973,8 +1977,8 @@ export declare const CatalogModelInfoSchema: z.ZodObject<{
|
|
|
973
1977
|
unit?: "per_million_tokens" | undefined;
|
|
974
1978
|
} | undefined;
|
|
975
1979
|
}, {
|
|
976
|
-
maxInputTokens: number;
|
|
977
1980
|
name: string;
|
|
1981
|
+
maxInputTokens: number;
|
|
978
1982
|
supportedFileTypes: ("image" | "audio" | "pdf")[];
|
|
979
1983
|
default?: boolean | undefined;
|
|
980
1984
|
supportedRouters?: ("vercel" | "in-built")[] | undefined;
|
|
@@ -1025,8 +2029,8 @@ export declare const ProviderCatalogSchema: z.ZodObject<{
|
|
|
1025
2029
|
unit?: "per_million_tokens" | undefined;
|
|
1026
2030
|
}>>;
|
|
1027
2031
|
}, "strict", z.ZodTypeAny, {
|
|
1028
|
-
maxInputTokens: number;
|
|
1029
2032
|
name: string;
|
|
2033
|
+
maxInputTokens: number;
|
|
1030
2034
|
supportedFileTypes: ("image" | "audio" | "pdf")[];
|
|
1031
2035
|
default?: boolean | undefined;
|
|
1032
2036
|
supportedRouters?: ("vercel" | "in-built")[] | undefined;
|
|
@@ -1040,8 +2044,8 @@ export declare const ProviderCatalogSchema: z.ZodObject<{
|
|
|
1040
2044
|
unit?: "per_million_tokens" | undefined;
|
|
1041
2045
|
} | undefined;
|
|
1042
2046
|
}, {
|
|
1043
|
-
maxInputTokens: number;
|
|
1044
2047
|
name: string;
|
|
2048
|
+
maxInputTokens: number;
|
|
1045
2049
|
supportedFileTypes: ("image" | "audio" | "pdf")[];
|
|
1046
2050
|
default?: boolean | undefined;
|
|
1047
2051
|
supportedRouters?: ("vercel" | "in-built")[] | undefined;
|
|
@@ -1057,15 +2061,15 @@ export declare const ProviderCatalogSchema: z.ZodObject<{
|
|
|
1057
2061
|
}>, "many">;
|
|
1058
2062
|
supportedFileTypes: z.ZodArray<z.ZodEnum<["audio", "pdf", "image"]>, "many">;
|
|
1059
2063
|
}, "strict", z.ZodTypeAny, {
|
|
1060
|
-
hasApiKey: boolean;
|
|
1061
2064
|
name: string;
|
|
2065
|
+
hasApiKey: boolean;
|
|
1062
2066
|
supportedFileTypes: ("image" | "audio" | "pdf")[];
|
|
1063
2067
|
supportedRouters: ("vercel" | "in-built")[];
|
|
1064
2068
|
primaryEnvVar: string;
|
|
1065
2069
|
supportsBaseURL: boolean;
|
|
1066
2070
|
models: {
|
|
1067
|
-
maxInputTokens: number;
|
|
1068
2071
|
name: string;
|
|
2072
|
+
maxInputTokens: number;
|
|
1069
2073
|
supportedFileTypes: ("image" | "audio" | "pdf")[];
|
|
1070
2074
|
default?: boolean | undefined;
|
|
1071
2075
|
supportedRouters?: ("vercel" | "in-built")[] | undefined;
|
|
@@ -1080,15 +2084,15 @@ export declare const ProviderCatalogSchema: z.ZodObject<{
|
|
|
1080
2084
|
} | undefined;
|
|
1081
2085
|
}[];
|
|
1082
2086
|
}, {
|
|
1083
|
-
hasApiKey: boolean;
|
|
1084
2087
|
name: string;
|
|
2088
|
+
hasApiKey: boolean;
|
|
1085
2089
|
supportedFileTypes: ("image" | "audio" | "pdf")[];
|
|
1086
2090
|
supportedRouters: ("vercel" | "in-built")[];
|
|
1087
2091
|
primaryEnvVar: string;
|
|
1088
2092
|
supportsBaseURL: boolean;
|
|
1089
2093
|
models: {
|
|
1090
|
-
maxInputTokens: number;
|
|
1091
2094
|
name: string;
|
|
2095
|
+
maxInputTokens: number;
|
|
1092
2096
|
supportedFileTypes: ("image" | "audio" | "pdf")[];
|
|
1093
2097
|
default?: boolean | undefined;
|
|
1094
2098
|
supportedRouters?: ("vercel" | "in-built")[] | undefined;
|
|
@@ -1136,9 +2140,9 @@ export declare const ModelFlatSchema: z.ZodObject<{
|
|
|
1136
2140
|
} & {
|
|
1137
2141
|
provider: z.ZodString;
|
|
1138
2142
|
}, "strict", z.ZodTypeAny, {
|
|
2143
|
+
name: string;
|
|
1139
2144
|
provider: string;
|
|
1140
2145
|
maxInputTokens: number;
|
|
1141
|
-
name: string;
|
|
1142
2146
|
supportedFileTypes: ("image" | "audio" | "pdf")[];
|
|
1143
2147
|
default?: boolean | undefined;
|
|
1144
2148
|
supportedRouters?: ("vercel" | "in-built")[] | undefined;
|
|
@@ -1152,9 +2156,9 @@ export declare const ModelFlatSchema: z.ZodObject<{
|
|
|
1152
2156
|
unit?: "per_million_tokens" | undefined;
|
|
1153
2157
|
} | undefined;
|
|
1154
2158
|
}, {
|
|
2159
|
+
name: string;
|
|
1155
2160
|
provider: string;
|
|
1156
2161
|
maxInputTokens: number;
|
|
1157
|
-
name: string;
|
|
1158
2162
|
supportedFileTypes: ("image" | "audio" | "pdf")[];
|
|
1159
2163
|
default?: boolean | undefined;
|
|
1160
2164
|
supportedRouters?: ("vercel" | "in-built")[] | undefined;
|
|
@@ -1306,11 +2310,11 @@ export declare const PromptInfoSchema: z.ZodObject<{
|
|
|
1306
2310
|
description?: string | undefined;
|
|
1307
2311
|
required?: boolean | undefined;
|
|
1308
2312
|
}>, "many">>;
|
|
1309
|
-
source: z.ZodEnum<["mcp", "
|
|
2313
|
+
source: z.ZodEnum<["mcp", "config", "custom"]>;
|
|
1310
2314
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1311
2315
|
}, "strict", z.ZodTypeAny, {
|
|
1312
2316
|
name: string;
|
|
1313
|
-
source: "
|
|
2317
|
+
source: "config" | "custom" | "mcp";
|
|
1314
2318
|
description?: string | undefined;
|
|
1315
2319
|
title?: string | undefined;
|
|
1316
2320
|
arguments?: {
|
|
@@ -1321,7 +2325,7 @@ export declare const PromptInfoSchema: z.ZodObject<{
|
|
|
1321
2325
|
metadata?: Record<string, unknown> | undefined;
|
|
1322
2326
|
}, {
|
|
1323
2327
|
name: string;
|
|
1324
|
-
source: "
|
|
2328
|
+
source: "config" | "custom" | "mcp";
|
|
1325
2329
|
description?: string | undefined;
|
|
1326
2330
|
title?: string | undefined;
|
|
1327
2331
|
arguments?: {
|