@dexto/server 1.2.6 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/approval/manual-approval-handler.cjs +23 -15
  2. package/dist/approval/manual-approval-handler.d.ts.map +1 -1
  3. package/dist/approval/manual-approval-handler.js +23 -15
  4. package/dist/events/webhook-subscriber.cjs +1 -1
  5. package/dist/events/webhook-subscriber.d.ts.map +1 -1
  6. package/dist/events/webhook-subscriber.js +1 -1
  7. package/dist/hono/__tests__/test-fixtures.cjs +2 -2
  8. package/dist/hono/__tests__/test-fixtures.d.ts.map +1 -1
  9. package/dist/hono/__tests__/test-fixtures.js +2 -2
  10. package/dist/hono/index.cjs +14 -2
  11. package/dist/hono/index.d.ts +486 -132
  12. package/dist/hono/index.d.ts.map +1 -1
  13. package/dist/hono/index.js +17 -2
  14. package/dist/hono/middleware/error.d.ts.map +1 -1
  15. package/dist/hono/routes/agents.cjs +8 -10
  16. package/dist/hono/routes/agents.d.ts +15 -8
  17. package/dist/hono/routes/agents.d.ts.map +1 -1
  18. package/dist/hono/routes/agents.js +10 -10
  19. package/dist/hono/routes/approvals.cjs +52 -1
  20. package/dist/hono/routes/approvals.d.ts +25 -0
  21. package/dist/hono/routes/approvals.d.ts.map +1 -1
  22. package/dist/hono/routes/approvals.js +52 -1
  23. package/dist/hono/routes/llm.cjs +110 -31
  24. package/dist/hono/routes/llm.d.ts +89 -37
  25. package/dist/hono/routes/llm.d.ts.map +1 -1
  26. package/dist/hono/routes/llm.js +108 -25
  27. package/dist/hono/routes/mcp.cjs +8 -4
  28. package/dist/hono/routes/mcp.d.ts +4 -1
  29. package/dist/hono/routes/mcp.d.ts.map +1 -1
  30. package/dist/hono/routes/mcp.js +9 -5
  31. package/dist/hono/routes/memory.d.ts +1 -1
  32. package/dist/hono/routes/messages.cjs +56 -64
  33. package/dist/hono/routes/messages.d.ts +101 -57
  34. package/dist/hono/routes/messages.d.ts.map +1 -1
  35. package/dist/hono/routes/messages.js +57 -65
  36. package/dist/hono/routes/prompts.cjs +2 -2
  37. package/dist/hono/routes/prompts.d.ts +7 -7
  38. package/dist/hono/routes/prompts.js +2 -2
  39. package/dist/hono/routes/queue.cjs +202 -0
  40. package/dist/hono/routes/queue.d.ts +171 -0
  41. package/dist/hono/routes/queue.d.ts.map +1 -0
  42. package/dist/hono/routes/queue.js +178 -0
  43. package/dist/hono/routes/resources.d.ts +1 -1
  44. package/dist/hono/routes/search.cjs +2 -24
  45. package/dist/hono/routes/search.d.ts +43 -15
  46. package/dist/hono/routes/search.d.ts.map +1 -1
  47. package/dist/hono/routes/search.js +3 -25
  48. package/dist/hono/routes/sessions.cjs +65 -11
  49. package/dist/hono/routes/sessions.d.ts +27 -5
  50. package/dist/hono/routes/sessions.d.ts.map +1 -1
  51. package/dist/hono/routes/sessions.js +65 -11
  52. package/dist/hono/routes/static.cjs +77 -0
  53. package/dist/hono/routes/static.d.ts +41 -0
  54. package/dist/hono/routes/static.d.ts.map +1 -0
  55. package/dist/hono/routes/static.js +52 -0
  56. package/dist/hono/schemas/responses.cjs +67 -25
  57. package/dist/hono/schemas/responses.d.ts +2076 -354
  58. package/dist/hono/schemas/responses.d.ts.map +1 -1
  59. package/dist/hono/schemas/responses.js +69 -35
  60. package/package.json +3 -3
@@ -2,108 +2,252 @@
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 to avoid duplication
6
- * 2. Define new schemas for types that only exist as TypeScript interfaces
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 LLMConfigResponseSchema: z.ZodObject<Omit<{
13
- provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere"]>;
14
- model: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
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
- provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere";
27
- model: string;
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
- provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere";
38
- model: string;
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 LLMConfigSchema: z.ZodObject<{
49
- provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere"]>;
50
- model: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
51
- apiKey: z.ZodEffects<z.ZodString, string, string>;
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
- apiKey: string;
61
- model: string;
62
- provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere";
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
- apiKey: string;
72
- model: string;
73
- provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere";
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 type LLMConfigResponse = z.output<typeof LLMConfigResponseSchema>;
83
- export { AgentCardSchema, type AgentCard } from '@dexto/core';
84
- export { McpServerConfigSchema, StdioServerConfigSchema, SseServerConfigSchema, HttpServerConfigSchema, type McpServerConfig, type ValidatedMcpServerConfig, } from '@dexto/core';
85
- export { ToolConfirmationConfigSchema } from '@dexto/core';
86
- export { InternalResourceConfigSchema } from '@dexto/core';
87
- export declare const SessionMetadataSchema: z.ZodObject<{
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 UIResourcePartSchema: z.ZodObject<{
72
+ type: z.ZodLiteral<"ui-resource">;
73
+ uri: z.ZodString;
74
+ mimeType: z.ZodString;
75
+ content: z.ZodOptional<z.ZodString>;
76
+ blob: z.ZodOptional<z.ZodString>;
77
+ metadata: z.ZodOptional<z.ZodObject<{
78
+ title: z.ZodOptional<z.ZodString>;
79
+ preferredSize: z.ZodOptional<z.ZodObject<{
80
+ width: z.ZodNumber;
81
+ height: z.ZodNumber;
82
+ }, "strict", z.ZodTypeAny, {
83
+ width: number;
84
+ height: number;
85
+ }, {
86
+ width: number;
87
+ height: number;
88
+ }>>;
89
+ }, "strict", z.ZodTypeAny, {
90
+ title?: string | undefined;
91
+ preferredSize?: {
92
+ width: number;
93
+ height: number;
94
+ } | undefined;
95
+ }, {
96
+ title?: string | undefined;
97
+ preferredSize?: {
98
+ width: number;
99
+ height: number;
100
+ } | undefined;
101
+ }>>;
102
+ }, "strict", z.ZodTypeAny, {
103
+ type: "ui-resource";
104
+ mimeType: string;
105
+ uri: string;
106
+ content?: string | undefined;
107
+ blob?: string | undefined;
108
+ metadata?: {
109
+ title?: string | undefined;
110
+ preferredSize?: {
111
+ width: number;
112
+ height: number;
113
+ } | undefined;
114
+ } | undefined;
115
+ }, {
116
+ type: "ui-resource";
117
+ mimeType: string;
118
+ uri: string;
119
+ content?: string | undefined;
120
+ blob?: string | undefined;
121
+ metadata?: {
122
+ title?: string | undefined;
123
+ preferredSize?: {
124
+ width: number;
125
+ height: number;
126
+ } | undefined;
127
+ } | undefined;
128
+ }>;
129
+ export declare const ContentPartSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
130
+ type: z.ZodLiteral<"text">;
131
+ text: z.ZodString;
132
+ }, "strict", z.ZodTypeAny, {
133
+ type: "text";
134
+ text: string;
135
+ }, {
136
+ type: "text";
137
+ text: string;
138
+ }>, z.ZodObject<{
139
+ type: z.ZodLiteral<"image">;
140
+ image: z.ZodString;
141
+ mimeType: z.ZodOptional<z.ZodString>;
142
+ }, "strict", z.ZodTypeAny, {
143
+ type: "image";
144
+ image: string;
145
+ mimeType?: string | undefined;
146
+ }, {
147
+ type: "image";
148
+ image: string;
149
+ mimeType?: string | undefined;
150
+ }>, z.ZodObject<{
151
+ type: z.ZodLiteral<"file">;
152
+ data: z.ZodString;
153
+ mimeType: z.ZodString;
154
+ filename: z.ZodOptional<z.ZodString>;
155
+ }, "strict", z.ZodTypeAny, {
156
+ type: "file";
157
+ mimeType: string;
158
+ data: string;
159
+ filename?: string | undefined;
160
+ }, {
161
+ type: "file";
162
+ mimeType: string;
163
+ data: string;
164
+ filename?: string | undefined;
165
+ }>, z.ZodObject<{
166
+ type: z.ZodLiteral<"ui-resource">;
167
+ uri: z.ZodString;
168
+ mimeType: z.ZodString;
169
+ content: z.ZodOptional<z.ZodString>;
170
+ blob: z.ZodOptional<z.ZodString>;
171
+ metadata: z.ZodOptional<z.ZodObject<{
172
+ title: z.ZodOptional<z.ZodString>;
173
+ preferredSize: z.ZodOptional<z.ZodObject<{
174
+ width: z.ZodNumber;
175
+ height: z.ZodNumber;
176
+ }, "strict", z.ZodTypeAny, {
177
+ width: number;
178
+ height: number;
179
+ }, {
180
+ width: number;
181
+ height: number;
182
+ }>>;
183
+ }, "strict", z.ZodTypeAny, {
184
+ title?: string | undefined;
185
+ preferredSize?: {
186
+ width: number;
187
+ height: number;
188
+ } | undefined;
189
+ }, {
190
+ title?: string | undefined;
191
+ preferredSize?: {
192
+ width: number;
193
+ height: number;
194
+ } | undefined;
195
+ }>>;
196
+ }, "strict", z.ZodTypeAny, {
197
+ type: "ui-resource";
198
+ mimeType: string;
199
+ uri: string;
200
+ content?: string | undefined;
201
+ blob?: string | undefined;
202
+ metadata?: {
203
+ title?: string | undefined;
204
+ preferredSize?: {
205
+ width: number;
206
+ height: number;
207
+ } | undefined;
208
+ } | undefined;
209
+ }, {
210
+ type: "ui-resource";
211
+ mimeType: string;
212
+ uri: string;
213
+ content?: string | undefined;
214
+ blob?: string | undefined;
215
+ metadata?: {
216
+ title?: string | undefined;
217
+ preferredSize?: {
218
+ width: number;
219
+ height: number;
220
+ } | undefined;
221
+ } | undefined;
222
+ }>]>;
223
+ export declare const ToolCallSchema: z.ZodObject<{
88
224
  id: z.ZodString;
89
- createdAt: z.ZodNullable<z.ZodNumber>;
90
- lastActivity: z.ZodNullable<z.ZodNumber>;
91
- messageCount: z.ZodNumber;
92
- title: z.ZodNullable<z.ZodOptional<z.ZodString>>;
225
+ type: z.ZodLiteral<"function">;
226
+ function: z.ZodObject<{
227
+ name: z.ZodString;
228
+ arguments: z.ZodString;
229
+ }, "strict", z.ZodTypeAny, {
230
+ name: string;
231
+ arguments: string;
232
+ }, {
233
+ name: string;
234
+ arguments: string;
235
+ }>;
93
236
  }, "strict", z.ZodTypeAny, {
237
+ function: {
238
+ name: string;
239
+ arguments: string;
240
+ };
241
+ type: "function";
94
242
  id: string;
95
- createdAt: number | null;
96
- lastActivity: number | null;
97
- messageCount: number;
98
- title?: string | null | undefined;
99
243
  }, {
244
+ function: {
245
+ name: string;
246
+ arguments: string;
247
+ };
248
+ type: "function";
100
249
  id: string;
101
- createdAt: number | null;
102
- lastActivity: number | null;
103
- messageCount: number;
104
- title?: string | null | undefined;
105
250
  }>;
106
- export type SessionMetadata = z.output<typeof SessionMetadataSchema>;
107
251
  export declare const TokenUsageSchema: z.ZodObject<{
108
252
  inputTokens: z.ZodOptional<z.ZodNumber>;
109
253
  outputTokens: z.ZodOptional<z.ZodNumber>;
@@ -121,6 +265,7 @@ export declare const TokenUsageSchema: z.ZodObject<{
121
265
  totalTokens?: number | undefined;
122
266
  }>;
123
267
  export declare const InternalMessageSchema: z.ZodObject<{
268
+ id: z.ZodOptional<z.ZodString>;
124
269
  role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
125
270
  timestamp: z.ZodOptional<z.ZodNumber>;
126
271
  content: z.ZodUnion<[z.ZodString, z.ZodNull, z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -134,31 +279,88 @@ export declare const InternalMessageSchema: z.ZodObject<{
134
279
  text: string;
135
280
  }>, z.ZodObject<{
136
281
  type: z.ZodLiteral<"image">;
137
- image: z.ZodType<unknown, z.ZodTypeDef, unknown>;
282
+ image: z.ZodString;
138
283
  mimeType: z.ZodOptional<z.ZodString>;
139
284
  }, "strict", z.ZodTypeAny, {
140
285
  type: "image";
141
- image?: unknown;
286
+ image: string;
142
287
  mimeType?: string | undefined;
143
288
  }, {
144
289
  type: "image";
145
- image?: unknown;
290
+ image: string;
146
291
  mimeType?: string | undefined;
147
292
  }>, z.ZodObject<{
148
293
  type: z.ZodLiteral<"file">;
149
- data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
294
+ data: z.ZodString;
150
295
  mimeType: z.ZodString;
151
296
  filename: z.ZodOptional<z.ZodString>;
152
297
  }, "strict", z.ZodTypeAny, {
153
298
  type: "file";
154
299
  mimeType: string;
155
- data?: unknown;
300
+ data: string;
156
301
  filename?: string | undefined;
157
302
  }, {
158
303
  type: "file";
159
304
  mimeType: string;
160
- data?: unknown;
305
+ data: string;
161
306
  filename?: string | undefined;
307
+ }>, z.ZodObject<{
308
+ type: z.ZodLiteral<"ui-resource">;
309
+ uri: z.ZodString;
310
+ mimeType: z.ZodString;
311
+ content: z.ZodOptional<z.ZodString>;
312
+ blob: z.ZodOptional<z.ZodString>;
313
+ metadata: z.ZodOptional<z.ZodObject<{
314
+ title: z.ZodOptional<z.ZodString>;
315
+ preferredSize: z.ZodOptional<z.ZodObject<{
316
+ width: z.ZodNumber;
317
+ height: z.ZodNumber;
318
+ }, "strict", z.ZodTypeAny, {
319
+ width: number;
320
+ height: number;
321
+ }, {
322
+ width: number;
323
+ height: number;
324
+ }>>;
325
+ }, "strict", z.ZodTypeAny, {
326
+ title?: string | undefined;
327
+ preferredSize?: {
328
+ width: number;
329
+ height: number;
330
+ } | undefined;
331
+ }, {
332
+ title?: string | undefined;
333
+ preferredSize?: {
334
+ width: number;
335
+ height: number;
336
+ } | undefined;
337
+ }>>;
338
+ }, "strict", z.ZodTypeAny, {
339
+ type: "ui-resource";
340
+ mimeType: string;
341
+ uri: string;
342
+ content?: string | undefined;
343
+ blob?: string | undefined;
344
+ metadata?: {
345
+ title?: string | undefined;
346
+ preferredSize?: {
347
+ width: number;
348
+ height: number;
349
+ } | undefined;
350
+ } | undefined;
351
+ }, {
352
+ type: "ui-resource";
353
+ mimeType: string;
354
+ uri: string;
355
+ content?: string | undefined;
356
+ blob?: string | undefined;
357
+ metadata?: {
358
+ title?: string | undefined;
359
+ preferredSize?: {
360
+ width: number;
361
+ height: number;
362
+ } | undefined;
363
+ } | undefined;
162
364
  }>]>, "many">]>;
163
365
  reasoning: z.ZodOptional<z.ZodString>;
164
366
  tokenUsage: z.ZodOptional<z.ZodObject<{
@@ -178,8 +380,7 @@ export declare const InternalMessageSchema: z.ZodObject<{
178
380
  totalTokens?: number | undefined;
179
381
  }>>;
180
382
  model: z.ZodOptional<z.ZodString>;
181
- provider: z.ZodOptional<z.ZodString>;
182
- router: z.ZodOptional<z.ZodString>;
383
+ provider: z.ZodOptional<z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere"]>>;
183
384
  toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
184
385
  id: z.ZodString;
185
386
  type: z.ZodLiteral<"function">;
@@ -210,24 +411,36 @@ export declare const InternalMessageSchema: z.ZodObject<{
210
411
  }>, "many">>;
211
412
  toolCallId: z.ZodOptional<z.ZodString>;
212
413
  name: z.ZodOptional<z.ZodString>;
414
+ success: z.ZodOptional<z.ZodBoolean>;
213
415
  }, "strict", z.ZodTypeAny, {
214
416
  content: string | ({
215
417
  type: "text";
216
418
  text: string;
217
419
  } | {
218
420
  type: "image";
219
- image?: unknown;
421
+ image: string;
220
422
  mimeType?: string | undefined;
221
423
  } | {
222
424
  type: "file";
223
425
  mimeType: string;
224
- data?: unknown;
426
+ data: string;
225
427
  filename?: string | undefined;
428
+ } | {
429
+ type: "ui-resource";
430
+ mimeType: string;
431
+ uri: string;
432
+ content?: string | undefined;
433
+ blob?: string | undefined;
434
+ metadata?: {
435
+ title?: string | undefined;
436
+ preferredSize?: {
437
+ width: number;
438
+ height: number;
439
+ } | undefined;
440
+ } | undefined;
226
441
  })[] | null;
227
442
  role: "system" | "user" | "assistant" | "tool";
228
- provider?: string | undefined;
229
- model?: string | undefined;
230
- router?: string | undefined;
443
+ id?: string | undefined;
231
444
  name?: string | undefined;
232
445
  timestamp?: number | undefined;
233
446
  reasoning?: string | undefined;
@@ -237,6 +450,8 @@ export declare const InternalMessageSchema: z.ZodObject<{
237
450
  reasoningTokens?: number | undefined;
238
451
  totalTokens?: number | undefined;
239
452
  } | undefined;
453
+ model?: string | undefined;
454
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
240
455
  toolCalls?: {
241
456
  function: {
242
457
  name: string;
@@ -246,24 +461,36 @@ export declare const InternalMessageSchema: z.ZodObject<{
246
461
  id: string;
247
462
  }[] | undefined;
248
463
  toolCallId?: string | undefined;
464
+ success?: boolean | undefined;
249
465
  }, {
250
466
  content: string | ({
251
467
  type: "text";
252
468
  text: string;
253
469
  } | {
254
470
  type: "image";
255
- image?: unknown;
471
+ image: string;
256
472
  mimeType?: string | undefined;
257
473
  } | {
258
474
  type: "file";
259
475
  mimeType: string;
260
- data?: unknown;
476
+ data: string;
261
477
  filename?: string | undefined;
478
+ } | {
479
+ type: "ui-resource";
480
+ mimeType: string;
481
+ uri: string;
482
+ content?: string | undefined;
483
+ blob?: string | undefined;
484
+ metadata?: {
485
+ title?: string | undefined;
486
+ preferredSize?: {
487
+ width: number;
488
+ height: number;
489
+ } | undefined;
490
+ } | undefined;
262
491
  })[] | null;
263
492
  role: "system" | "user" | "assistant" | "tool";
264
- provider?: string | undefined;
265
- model?: string | undefined;
266
- router?: string | undefined;
493
+ id?: string | undefined;
267
494
  name?: string | undefined;
268
495
  timestamp?: number | undefined;
269
496
  reasoning?: string | undefined;
@@ -273,6 +500,8 @@ export declare const InternalMessageSchema: z.ZodObject<{
273
500
  reasoningTokens?: number | undefined;
274
501
  totalTokens?: number | undefined;
275
502
  } | undefined;
503
+ model?: string | undefined;
504
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
276
505
  toolCalls?: {
277
506
  function: {
278
507
  name: string;
@@ -282,118 +511,283 @@ export declare const InternalMessageSchema: z.ZodObject<{
282
511
  id: string;
283
512
  }[] | undefined;
284
513
  toolCallId?: string | undefined;
514
+ success?: boolean | undefined;
285
515
  }>;
516
+ export type TextPart = z.output<typeof TextPartSchema>;
517
+ export type ImagePart = z.output<typeof ImagePartSchema>;
518
+ export type FilePart = z.output<typeof FilePartSchema>;
519
+ export type ContentPart = z.output<typeof ContentPartSchema>;
520
+ export type ToolCall = z.output<typeof ToolCallSchema>;
521
+ export type TokenUsage = z.output<typeof TokenUsageSchema>;
286
522
  export type InternalMessage = z.output<typeof InternalMessageSchema>;
287
- export declare const SearchResultSchema: z.ZodObject<{
288
- sessionId: z.ZodString;
289
- message: z.ZodObject<{
290
- role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
291
- timestamp: z.ZodOptional<z.ZodNumber>;
292
- content: z.ZodUnion<[z.ZodString, z.ZodNull, z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
293
- type: z.ZodLiteral<"text">;
294
- text: z.ZodString;
295
- }, "strict", z.ZodTypeAny, {
296
- type: "text";
297
- text: string;
298
- }, {
299
- type: "text";
300
- text: string;
301
- }>, z.ZodObject<{
302
- type: z.ZodLiteral<"image">;
303
- image: z.ZodType<unknown, z.ZodTypeDef, unknown>;
304
- mimeType: z.ZodOptional<z.ZodString>;
305
- }, "strict", z.ZodTypeAny, {
306
- type: "image";
307
- image?: unknown;
308
- mimeType?: string | undefined;
309
- }, {
310
- type: "image";
311
- image?: unknown;
312
- mimeType?: string | undefined;
313
- }>, z.ZodObject<{
314
- type: z.ZodLiteral<"file">;
315
- data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
316
- mimeType: z.ZodString;
317
- filename: z.ZodOptional<z.ZodString>;
318
- }, "strict", z.ZodTypeAny, {
319
- type: "file";
320
- mimeType: string;
321
- data?: unknown;
322
- filename?: string | undefined;
323
- }, {
324
- type: "file";
325
- mimeType: string;
326
- data?: unknown;
327
- filename?: string | undefined;
328
- }>]>, "many">]>;
329
- reasoning: z.ZodOptional<z.ZodString>;
330
- tokenUsage: z.ZodOptional<z.ZodObject<{
331
- inputTokens: z.ZodOptional<z.ZodNumber>;
332
- outputTokens: z.ZodOptional<z.ZodNumber>;
333
- reasoningTokens: z.ZodOptional<z.ZodNumber>;
334
- totalTokens: z.ZodOptional<z.ZodNumber>;
335
- }, "strict", z.ZodTypeAny, {
336
- inputTokens?: number | undefined;
337
- outputTokens?: number | undefined;
338
- reasoningTokens?: number | undefined;
339
- totalTokens?: number | undefined;
340
- }, {
341
- inputTokens?: number | undefined;
342
- outputTokens?: number | undefined;
343
- reasoningTokens?: number | undefined;
344
- totalTokens?: number | undefined;
345
- }>>;
346
- model: z.ZodOptional<z.ZodString>;
347
- provider: z.ZodOptional<z.ZodString>;
348
- router: z.ZodOptional<z.ZodString>;
349
- toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
350
- id: z.ZodString;
351
- type: z.ZodLiteral<"function">;
352
- function: z.ZodObject<{
353
- name: z.ZodString;
354
- arguments: z.ZodString;
355
- }, "strict", z.ZodTypeAny, {
356
- name: string;
357
- arguments: string;
358
- }, {
359
- name: string;
360
- arguments: string;
361
- }>;
362
- }, "strict", z.ZodTypeAny, {
363
- function: {
364
- name: string;
365
- arguments: string;
366
- };
367
- type: "function";
368
- id: string;
369
- }, {
370
- function: {
371
- name: string;
372
- arguments: string;
373
- };
374
- type: "function";
375
- id: string;
523
+ export declare const LLMConfigResponseSchema: z.ZodObject<Omit<{
524
+ provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere"]>;
525
+ model: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
526
+ apiKey: z.ZodEffects<z.ZodString, string, string>;
527
+ maxIterations: z.ZodDefault<z.ZodNumber>;
528
+ baseURL: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string | undefined, string>>;
529
+ maxInputTokens: z.ZodOptional<z.ZodNumber>;
530
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
531
+ temperature: z.ZodOptional<z.ZodNumber>;
532
+ allowedMediaTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
533
+ }, "apiKey"> & {
534
+ hasApiKey: z.ZodOptional<z.ZodBoolean>;
535
+ }, "strict", z.ZodTypeAny, {
536
+ model: string;
537
+ provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere";
538
+ maxIterations: number;
539
+ baseURL?: string | undefined;
540
+ maxInputTokens?: number | undefined;
541
+ maxOutputTokens?: number | undefined;
542
+ temperature?: number | undefined;
543
+ allowedMediaTypes?: string[] | undefined;
544
+ hasApiKey?: boolean | undefined;
545
+ }, {
546
+ model: string;
547
+ provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere";
548
+ maxIterations?: number | undefined;
549
+ baseURL?: string | undefined;
550
+ maxInputTokens?: number | undefined;
551
+ maxOutputTokens?: number | undefined;
552
+ temperature?: number | undefined;
553
+ allowedMediaTypes?: string[] | undefined;
554
+ hasApiKey?: boolean | undefined;
555
+ }>;
556
+ export declare const LLMConfigSchema: z.ZodObject<{
557
+ provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere"]>;
558
+ model: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
559
+ apiKey: z.ZodEffects<z.ZodString, string, string>;
560
+ maxIterations: z.ZodDefault<z.ZodNumber>;
561
+ baseURL: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string | undefined, string>>;
562
+ maxInputTokens: z.ZodOptional<z.ZodNumber>;
563
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
564
+ temperature: z.ZodOptional<z.ZodNumber>;
565
+ allowedMediaTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
566
+ }, "strict", z.ZodTypeAny, {
567
+ model: string;
568
+ provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere";
569
+ apiKey: string;
570
+ maxIterations: number;
571
+ baseURL?: string | undefined;
572
+ maxInputTokens?: number | undefined;
573
+ maxOutputTokens?: number | undefined;
574
+ temperature?: number | undefined;
575
+ allowedMediaTypes?: string[] | undefined;
576
+ }, {
577
+ model: string;
578
+ provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere";
579
+ apiKey: string;
580
+ maxIterations?: number | undefined;
581
+ baseURL?: string | undefined;
582
+ maxInputTokens?: number | undefined;
583
+ maxOutputTokens?: number | undefined;
584
+ temperature?: number | undefined;
585
+ allowedMediaTypes?: string[] | undefined;
586
+ }>;
587
+ export type LLMConfigResponse = z.output<typeof LLMConfigResponseSchema>;
588
+ export { AgentCardSchema, type AgentCard } from '@dexto/core';
589
+ export { McpServerConfigSchema, StdioServerConfigSchema, SseServerConfigSchema, HttpServerConfigSchema, type McpServerConfig, type ValidatedMcpServerConfig, } from '@dexto/core';
590
+ export { ToolConfirmationConfigSchema } from '@dexto/core';
591
+ export { InternalResourceConfigSchema } from '@dexto/core';
592
+ export declare const SessionMetadataSchema: z.ZodObject<{
593
+ id: z.ZodString;
594
+ createdAt: z.ZodNullable<z.ZodNumber>;
595
+ lastActivity: z.ZodNullable<z.ZodNumber>;
596
+ messageCount: z.ZodNumber;
597
+ title: z.ZodNullable<z.ZodOptional<z.ZodString>>;
598
+ }, "strict", z.ZodTypeAny, {
599
+ id: string;
600
+ createdAt: number | null;
601
+ lastActivity: number | null;
602
+ messageCount: number;
603
+ title?: string | null | undefined;
604
+ }, {
605
+ id: string;
606
+ createdAt: number | null;
607
+ lastActivity: number | null;
608
+ messageCount: number;
609
+ title?: string | null | undefined;
610
+ }>;
611
+ export type SessionMetadata = z.output<typeof SessionMetadataSchema>;
612
+ export declare const SearchResultSchema: z.ZodObject<{
613
+ sessionId: z.ZodString;
614
+ message: z.ZodObject<{
615
+ id: z.ZodOptional<z.ZodString>;
616
+ role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
617
+ timestamp: z.ZodOptional<z.ZodNumber>;
618
+ content: z.ZodUnion<[z.ZodString, z.ZodNull, z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
619
+ type: z.ZodLiteral<"text">;
620
+ text: z.ZodString;
621
+ }, "strict", z.ZodTypeAny, {
622
+ type: "text";
623
+ text: string;
624
+ }, {
625
+ type: "text";
626
+ text: string;
627
+ }>, z.ZodObject<{
628
+ type: z.ZodLiteral<"image">;
629
+ image: z.ZodString;
630
+ mimeType: z.ZodOptional<z.ZodString>;
631
+ }, "strict", z.ZodTypeAny, {
632
+ type: "image";
633
+ image: string;
634
+ mimeType?: string | undefined;
635
+ }, {
636
+ type: "image";
637
+ image: string;
638
+ mimeType?: string | undefined;
639
+ }>, z.ZodObject<{
640
+ type: z.ZodLiteral<"file">;
641
+ data: z.ZodString;
642
+ mimeType: z.ZodString;
643
+ filename: z.ZodOptional<z.ZodString>;
644
+ }, "strict", z.ZodTypeAny, {
645
+ type: "file";
646
+ mimeType: string;
647
+ data: string;
648
+ filename?: string | undefined;
649
+ }, {
650
+ type: "file";
651
+ mimeType: string;
652
+ data: string;
653
+ filename?: string | undefined;
654
+ }>, z.ZodObject<{
655
+ type: z.ZodLiteral<"ui-resource">;
656
+ uri: z.ZodString;
657
+ mimeType: z.ZodString;
658
+ content: z.ZodOptional<z.ZodString>;
659
+ blob: z.ZodOptional<z.ZodString>;
660
+ metadata: z.ZodOptional<z.ZodObject<{
661
+ title: z.ZodOptional<z.ZodString>;
662
+ preferredSize: z.ZodOptional<z.ZodObject<{
663
+ width: z.ZodNumber;
664
+ height: z.ZodNumber;
665
+ }, "strict", z.ZodTypeAny, {
666
+ width: number;
667
+ height: number;
668
+ }, {
669
+ width: number;
670
+ height: number;
671
+ }>>;
672
+ }, "strict", z.ZodTypeAny, {
673
+ title?: string | undefined;
674
+ preferredSize?: {
675
+ width: number;
676
+ height: number;
677
+ } | undefined;
678
+ }, {
679
+ title?: string | undefined;
680
+ preferredSize?: {
681
+ width: number;
682
+ height: number;
683
+ } | undefined;
684
+ }>>;
685
+ }, "strict", z.ZodTypeAny, {
686
+ type: "ui-resource";
687
+ mimeType: string;
688
+ uri: string;
689
+ content?: string | undefined;
690
+ blob?: string | undefined;
691
+ metadata?: {
692
+ title?: string | undefined;
693
+ preferredSize?: {
694
+ width: number;
695
+ height: number;
696
+ } | undefined;
697
+ } | undefined;
698
+ }, {
699
+ type: "ui-resource";
700
+ mimeType: string;
701
+ uri: string;
702
+ content?: string | undefined;
703
+ blob?: string | undefined;
704
+ metadata?: {
705
+ title?: string | undefined;
706
+ preferredSize?: {
707
+ width: number;
708
+ height: number;
709
+ } | undefined;
710
+ } | undefined;
711
+ }>]>, "many">]>;
712
+ reasoning: z.ZodOptional<z.ZodString>;
713
+ tokenUsage: z.ZodOptional<z.ZodObject<{
714
+ inputTokens: z.ZodOptional<z.ZodNumber>;
715
+ outputTokens: z.ZodOptional<z.ZodNumber>;
716
+ reasoningTokens: z.ZodOptional<z.ZodNumber>;
717
+ totalTokens: z.ZodOptional<z.ZodNumber>;
718
+ }, "strict", z.ZodTypeAny, {
719
+ inputTokens?: number | undefined;
720
+ outputTokens?: number | undefined;
721
+ reasoningTokens?: number | undefined;
722
+ totalTokens?: number | undefined;
723
+ }, {
724
+ inputTokens?: number | undefined;
725
+ outputTokens?: number | undefined;
726
+ reasoningTokens?: number | undefined;
727
+ totalTokens?: number | undefined;
728
+ }>>;
729
+ model: z.ZodOptional<z.ZodString>;
730
+ provider: z.ZodOptional<z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere"]>>;
731
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
732
+ id: z.ZodString;
733
+ type: z.ZodLiteral<"function">;
734
+ function: z.ZodObject<{
735
+ name: z.ZodString;
736
+ arguments: z.ZodString;
737
+ }, "strict", z.ZodTypeAny, {
738
+ name: string;
739
+ arguments: string;
740
+ }, {
741
+ name: string;
742
+ arguments: string;
743
+ }>;
744
+ }, "strict", z.ZodTypeAny, {
745
+ function: {
746
+ name: string;
747
+ arguments: string;
748
+ };
749
+ type: "function";
750
+ id: string;
751
+ }, {
752
+ function: {
753
+ name: string;
754
+ arguments: string;
755
+ };
756
+ type: "function";
757
+ id: string;
376
758
  }>, "many">>;
377
759
  toolCallId: z.ZodOptional<z.ZodString>;
378
760
  name: z.ZodOptional<z.ZodString>;
761
+ success: z.ZodOptional<z.ZodBoolean>;
379
762
  }, "strict", z.ZodTypeAny, {
380
763
  content: string | ({
381
764
  type: "text";
382
765
  text: string;
383
766
  } | {
384
767
  type: "image";
385
- image?: unknown;
768
+ image: string;
386
769
  mimeType?: string | undefined;
387
770
  } | {
388
771
  type: "file";
389
772
  mimeType: string;
390
- data?: unknown;
773
+ data: string;
391
774
  filename?: string | undefined;
775
+ } | {
776
+ type: "ui-resource";
777
+ mimeType: string;
778
+ uri: string;
779
+ content?: string | undefined;
780
+ blob?: string | undefined;
781
+ metadata?: {
782
+ title?: string | undefined;
783
+ preferredSize?: {
784
+ width: number;
785
+ height: number;
786
+ } | undefined;
787
+ } | undefined;
392
788
  })[] | null;
393
789
  role: "system" | "user" | "assistant" | "tool";
394
- provider?: string | undefined;
395
- model?: string | undefined;
396
- router?: string | undefined;
790
+ id?: string | undefined;
397
791
  name?: string | undefined;
398
792
  timestamp?: number | undefined;
399
793
  reasoning?: string | undefined;
@@ -403,6 +797,8 @@ export declare const SearchResultSchema: z.ZodObject<{
403
797
  reasoningTokens?: number | undefined;
404
798
  totalTokens?: number | undefined;
405
799
  } | undefined;
800
+ model?: string | undefined;
801
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
406
802
  toolCalls?: {
407
803
  function: {
408
804
  name: string;
@@ -412,24 +808,36 @@ export declare const SearchResultSchema: z.ZodObject<{
412
808
  id: string;
413
809
  }[] | undefined;
414
810
  toolCallId?: string | undefined;
811
+ success?: boolean | undefined;
415
812
  }, {
416
813
  content: string | ({
417
814
  type: "text";
418
815
  text: string;
419
816
  } | {
420
817
  type: "image";
421
- image?: unknown;
818
+ image: string;
422
819
  mimeType?: string | undefined;
423
820
  } | {
424
821
  type: "file";
425
822
  mimeType: string;
426
- data?: unknown;
823
+ data: string;
427
824
  filename?: string | undefined;
825
+ } | {
826
+ type: "ui-resource";
827
+ mimeType: string;
828
+ uri: string;
829
+ content?: string | undefined;
830
+ blob?: string | undefined;
831
+ metadata?: {
832
+ title?: string | undefined;
833
+ preferredSize?: {
834
+ width: number;
835
+ height: number;
836
+ } | undefined;
837
+ } | undefined;
428
838
  })[] | null;
429
839
  role: "system" | "user" | "assistant" | "tool";
430
- provider?: string | undefined;
431
- model?: string | undefined;
432
- router?: string | undefined;
840
+ id?: string | undefined;
433
841
  name?: string | undefined;
434
842
  timestamp?: number | undefined;
435
843
  reasoning?: string | undefined;
@@ -439,6 +847,8 @@ export declare const SearchResultSchema: z.ZodObject<{
439
847
  reasoningTokens?: number | undefined;
440
848
  totalTokens?: number | undefined;
441
849
  } | undefined;
850
+ model?: string | undefined;
851
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
442
852
  toolCalls?: {
443
853
  function: {
444
854
  name: string;
@@ -448,6 +858,7 @@ export declare const SearchResultSchema: z.ZodObject<{
448
858
  id: string;
449
859
  }[] | undefined;
450
860
  toolCallId?: string | undefined;
861
+ success?: boolean | undefined;
451
862
  }>;
452
863
  matchedText: z.ZodString;
453
864
  context: z.ZodString;
@@ -459,18 +870,85 @@ export declare const SearchResultSchema: z.ZodObject<{
459
870
  text: string;
460
871
  } | {
461
872
  type: "image";
462
- image?: unknown;
873
+ image: string;
463
874
  mimeType?: string | undefined;
464
875
  } | {
465
876
  type: "file";
466
877
  mimeType: string;
467
- data?: unknown;
878
+ data: string;
468
879
  filename?: string | undefined;
880
+ } | {
881
+ type: "ui-resource";
882
+ mimeType: string;
883
+ uri: string;
884
+ content?: string | undefined;
885
+ blob?: string | undefined;
886
+ metadata?: {
887
+ title?: string | undefined;
888
+ preferredSize?: {
889
+ width: number;
890
+ height: number;
891
+ } | undefined;
892
+ } | undefined;
469
893
  })[] | null;
470
894
  role: "system" | "user" | "assistant" | "tool";
471
- provider?: string | undefined;
895
+ id?: string | undefined;
896
+ name?: string | undefined;
897
+ timestamp?: number | undefined;
898
+ reasoning?: string | undefined;
899
+ tokenUsage?: {
900
+ inputTokens?: number | undefined;
901
+ outputTokens?: number | undefined;
902
+ reasoningTokens?: number | undefined;
903
+ totalTokens?: number | undefined;
904
+ } | undefined;
472
905
  model?: string | undefined;
473
- router?: string | undefined;
906
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
907
+ toolCalls?: {
908
+ function: {
909
+ name: string;
910
+ arguments: string;
911
+ };
912
+ type: "function";
913
+ id: string;
914
+ }[] | undefined;
915
+ toolCallId?: string | undefined;
916
+ success?: boolean | undefined;
917
+ };
918
+ sessionId: string;
919
+ matchedText: string;
920
+ context: string;
921
+ messageIndex: number;
922
+ }, {
923
+ message: {
924
+ content: string | ({
925
+ type: "text";
926
+ text: string;
927
+ } | {
928
+ type: "image";
929
+ image: string;
930
+ mimeType?: string | undefined;
931
+ } | {
932
+ type: "file";
933
+ mimeType: string;
934
+ data: string;
935
+ filename?: string | undefined;
936
+ } | {
937
+ type: "ui-resource";
938
+ mimeType: string;
939
+ uri: string;
940
+ content?: string | undefined;
941
+ blob?: string | undefined;
942
+ metadata?: {
943
+ title?: string | undefined;
944
+ preferredSize?: {
945
+ width: number;
946
+ height: number;
947
+ } | undefined;
948
+ } | undefined;
949
+ })[] | null;
950
+ role: "system" | "user" | "assistant" | "tool";
951
+ id?: string | undefined;
474
952
  name?: string | undefined;
475
953
  timestamp?: number | undefined;
476
954
  reasoning?: string | undefined;
@@ -480,6 +958,8 @@ export declare const SearchResultSchema: z.ZodObject<{
480
958
  reasoningTokens?: number | undefined;
481
959
  totalTokens?: number | undefined;
482
960
  } | undefined;
961
+ model?: string | undefined;
962
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
483
963
  toolCalls?: {
484
964
  function: {
485
965
  name: string;
@@ -489,61 +969,534 @@ export declare const SearchResultSchema: z.ZodObject<{
489
969
  id: string;
490
970
  }[] | undefined;
491
971
  toolCallId?: string | undefined;
972
+ success?: boolean | undefined;
973
+ };
974
+ sessionId: string;
975
+ matchedText: string;
976
+ context: string;
977
+ messageIndex: number;
978
+ }>;
979
+ export type SearchResult = z.output<typeof SearchResultSchema>;
980
+ export declare const SessionSearchResultSchema: z.ZodObject<{
981
+ sessionId: z.ZodString;
982
+ matchCount: z.ZodNumber;
983
+ firstMatch: z.ZodObject<{
984
+ sessionId: z.ZodString;
985
+ message: z.ZodObject<{
986
+ id: z.ZodOptional<z.ZodString>;
987
+ role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
988
+ timestamp: z.ZodOptional<z.ZodNumber>;
989
+ content: z.ZodUnion<[z.ZodString, z.ZodNull, z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
990
+ type: z.ZodLiteral<"text">;
991
+ text: z.ZodString;
992
+ }, "strict", z.ZodTypeAny, {
993
+ type: "text";
994
+ text: string;
995
+ }, {
996
+ type: "text";
997
+ text: string;
998
+ }>, z.ZodObject<{
999
+ type: z.ZodLiteral<"image">;
1000
+ image: z.ZodString;
1001
+ mimeType: z.ZodOptional<z.ZodString>;
1002
+ }, "strict", z.ZodTypeAny, {
1003
+ type: "image";
1004
+ image: string;
1005
+ mimeType?: string | undefined;
1006
+ }, {
1007
+ type: "image";
1008
+ image: string;
1009
+ mimeType?: string | undefined;
1010
+ }>, z.ZodObject<{
1011
+ type: z.ZodLiteral<"file">;
1012
+ data: z.ZodString;
1013
+ mimeType: z.ZodString;
1014
+ filename: z.ZodOptional<z.ZodString>;
1015
+ }, "strict", z.ZodTypeAny, {
1016
+ type: "file";
1017
+ mimeType: string;
1018
+ data: string;
1019
+ filename?: string | undefined;
1020
+ }, {
1021
+ type: "file";
1022
+ mimeType: string;
1023
+ data: string;
1024
+ filename?: string | undefined;
1025
+ }>, z.ZodObject<{
1026
+ type: z.ZodLiteral<"ui-resource">;
1027
+ uri: z.ZodString;
1028
+ mimeType: z.ZodString;
1029
+ content: z.ZodOptional<z.ZodString>;
1030
+ blob: z.ZodOptional<z.ZodString>;
1031
+ metadata: z.ZodOptional<z.ZodObject<{
1032
+ title: z.ZodOptional<z.ZodString>;
1033
+ preferredSize: z.ZodOptional<z.ZodObject<{
1034
+ width: z.ZodNumber;
1035
+ height: z.ZodNumber;
1036
+ }, "strict", z.ZodTypeAny, {
1037
+ width: number;
1038
+ height: number;
1039
+ }, {
1040
+ width: number;
1041
+ height: number;
1042
+ }>>;
1043
+ }, "strict", z.ZodTypeAny, {
1044
+ title?: string | undefined;
1045
+ preferredSize?: {
1046
+ width: number;
1047
+ height: number;
1048
+ } | undefined;
1049
+ }, {
1050
+ title?: string | undefined;
1051
+ preferredSize?: {
1052
+ width: number;
1053
+ height: number;
1054
+ } | undefined;
1055
+ }>>;
1056
+ }, "strict", z.ZodTypeAny, {
1057
+ type: "ui-resource";
1058
+ mimeType: string;
1059
+ uri: string;
1060
+ content?: string | undefined;
1061
+ blob?: string | undefined;
1062
+ metadata?: {
1063
+ title?: string | undefined;
1064
+ preferredSize?: {
1065
+ width: number;
1066
+ height: number;
1067
+ } | undefined;
1068
+ } | undefined;
1069
+ }, {
1070
+ type: "ui-resource";
1071
+ mimeType: string;
1072
+ uri: string;
1073
+ content?: string | undefined;
1074
+ blob?: string | undefined;
1075
+ metadata?: {
1076
+ title?: string | undefined;
1077
+ preferredSize?: {
1078
+ width: number;
1079
+ height: number;
1080
+ } | undefined;
1081
+ } | undefined;
1082
+ }>]>, "many">]>;
1083
+ reasoning: z.ZodOptional<z.ZodString>;
1084
+ tokenUsage: z.ZodOptional<z.ZodObject<{
1085
+ inputTokens: z.ZodOptional<z.ZodNumber>;
1086
+ outputTokens: z.ZodOptional<z.ZodNumber>;
1087
+ reasoningTokens: z.ZodOptional<z.ZodNumber>;
1088
+ totalTokens: z.ZodOptional<z.ZodNumber>;
1089
+ }, "strict", z.ZodTypeAny, {
1090
+ inputTokens?: number | undefined;
1091
+ outputTokens?: number | undefined;
1092
+ reasoningTokens?: number | undefined;
1093
+ totalTokens?: number | undefined;
1094
+ }, {
1095
+ inputTokens?: number | undefined;
1096
+ outputTokens?: number | undefined;
1097
+ reasoningTokens?: number | undefined;
1098
+ totalTokens?: number | undefined;
1099
+ }>>;
1100
+ model: z.ZodOptional<z.ZodString>;
1101
+ provider: z.ZodOptional<z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere"]>>;
1102
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
1103
+ id: z.ZodString;
1104
+ type: z.ZodLiteral<"function">;
1105
+ function: z.ZodObject<{
1106
+ name: z.ZodString;
1107
+ arguments: z.ZodString;
1108
+ }, "strict", z.ZodTypeAny, {
1109
+ name: string;
1110
+ arguments: string;
1111
+ }, {
1112
+ name: string;
1113
+ arguments: string;
1114
+ }>;
1115
+ }, "strict", z.ZodTypeAny, {
1116
+ function: {
1117
+ name: string;
1118
+ arguments: string;
1119
+ };
1120
+ type: "function";
1121
+ id: string;
1122
+ }, {
1123
+ function: {
1124
+ name: string;
1125
+ arguments: string;
1126
+ };
1127
+ type: "function";
1128
+ id: string;
1129
+ }>, "many">>;
1130
+ toolCallId: z.ZodOptional<z.ZodString>;
1131
+ name: z.ZodOptional<z.ZodString>;
1132
+ success: z.ZodOptional<z.ZodBoolean>;
1133
+ }, "strict", z.ZodTypeAny, {
1134
+ content: string | ({
1135
+ type: "text";
1136
+ text: string;
1137
+ } | {
1138
+ type: "image";
1139
+ image: string;
1140
+ mimeType?: string | undefined;
1141
+ } | {
1142
+ type: "file";
1143
+ mimeType: string;
1144
+ data: string;
1145
+ filename?: string | undefined;
1146
+ } | {
1147
+ type: "ui-resource";
1148
+ mimeType: string;
1149
+ uri: string;
1150
+ content?: string | undefined;
1151
+ blob?: string | undefined;
1152
+ metadata?: {
1153
+ title?: string | undefined;
1154
+ preferredSize?: {
1155
+ width: number;
1156
+ height: number;
1157
+ } | undefined;
1158
+ } | undefined;
1159
+ })[] | null;
1160
+ role: "system" | "user" | "assistant" | "tool";
1161
+ id?: string | undefined;
1162
+ name?: string | undefined;
1163
+ timestamp?: number | undefined;
1164
+ reasoning?: string | undefined;
1165
+ tokenUsage?: {
1166
+ inputTokens?: number | undefined;
1167
+ outputTokens?: number | undefined;
1168
+ reasoningTokens?: number | undefined;
1169
+ totalTokens?: number | undefined;
1170
+ } | undefined;
1171
+ model?: string | undefined;
1172
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
1173
+ toolCalls?: {
1174
+ function: {
1175
+ name: string;
1176
+ arguments: string;
1177
+ };
1178
+ type: "function";
1179
+ id: string;
1180
+ }[] | undefined;
1181
+ toolCallId?: string | undefined;
1182
+ success?: boolean | undefined;
1183
+ }, {
1184
+ content: string | ({
1185
+ type: "text";
1186
+ text: string;
1187
+ } | {
1188
+ type: "image";
1189
+ image: string;
1190
+ mimeType?: string | undefined;
1191
+ } | {
1192
+ type: "file";
1193
+ mimeType: string;
1194
+ data: string;
1195
+ filename?: string | undefined;
1196
+ } | {
1197
+ type: "ui-resource";
1198
+ mimeType: string;
1199
+ uri: string;
1200
+ content?: string | undefined;
1201
+ blob?: string | undefined;
1202
+ metadata?: {
1203
+ title?: string | undefined;
1204
+ preferredSize?: {
1205
+ width: number;
1206
+ height: number;
1207
+ } | undefined;
1208
+ } | undefined;
1209
+ })[] | null;
1210
+ role: "system" | "user" | "assistant" | "tool";
1211
+ id?: string | undefined;
1212
+ name?: string | undefined;
1213
+ timestamp?: number | undefined;
1214
+ reasoning?: string | undefined;
1215
+ tokenUsage?: {
1216
+ inputTokens?: number | undefined;
1217
+ outputTokens?: number | undefined;
1218
+ reasoningTokens?: number | undefined;
1219
+ totalTokens?: number | undefined;
1220
+ } | undefined;
1221
+ model?: string | undefined;
1222
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
1223
+ toolCalls?: {
1224
+ function: {
1225
+ name: string;
1226
+ arguments: string;
1227
+ };
1228
+ type: "function";
1229
+ id: string;
1230
+ }[] | undefined;
1231
+ toolCallId?: string | undefined;
1232
+ success?: boolean | undefined;
1233
+ }>;
1234
+ matchedText: z.ZodString;
1235
+ context: z.ZodString;
1236
+ messageIndex: z.ZodNumber;
1237
+ }, "strict", z.ZodTypeAny, {
1238
+ message: {
1239
+ content: string | ({
1240
+ type: "text";
1241
+ text: string;
1242
+ } | {
1243
+ type: "image";
1244
+ image: string;
1245
+ mimeType?: string | undefined;
1246
+ } | {
1247
+ type: "file";
1248
+ mimeType: string;
1249
+ data: string;
1250
+ filename?: string | undefined;
1251
+ } | {
1252
+ type: "ui-resource";
1253
+ mimeType: string;
1254
+ uri: string;
1255
+ content?: string | undefined;
1256
+ blob?: string | undefined;
1257
+ metadata?: {
1258
+ title?: string | undefined;
1259
+ preferredSize?: {
1260
+ width: number;
1261
+ height: number;
1262
+ } | undefined;
1263
+ } | undefined;
1264
+ })[] | null;
1265
+ role: "system" | "user" | "assistant" | "tool";
1266
+ id?: string | undefined;
1267
+ name?: string | undefined;
1268
+ timestamp?: number | undefined;
1269
+ reasoning?: string | undefined;
1270
+ tokenUsage?: {
1271
+ inputTokens?: number | undefined;
1272
+ outputTokens?: number | undefined;
1273
+ reasoningTokens?: number | undefined;
1274
+ totalTokens?: number | undefined;
1275
+ } | undefined;
1276
+ model?: string | undefined;
1277
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
1278
+ toolCalls?: {
1279
+ function: {
1280
+ name: string;
1281
+ arguments: string;
1282
+ };
1283
+ type: "function";
1284
+ id: string;
1285
+ }[] | undefined;
1286
+ toolCallId?: string | undefined;
1287
+ success?: boolean | undefined;
1288
+ };
1289
+ sessionId: string;
1290
+ matchedText: string;
1291
+ context: string;
1292
+ messageIndex: number;
1293
+ }, {
1294
+ message: {
1295
+ content: string | ({
1296
+ type: "text";
1297
+ text: string;
1298
+ } | {
1299
+ type: "image";
1300
+ image: string;
1301
+ mimeType?: string | undefined;
1302
+ } | {
1303
+ type: "file";
1304
+ mimeType: string;
1305
+ data: string;
1306
+ filename?: string | undefined;
1307
+ } | {
1308
+ type: "ui-resource";
1309
+ mimeType: string;
1310
+ uri: string;
1311
+ content?: string | undefined;
1312
+ blob?: string | undefined;
1313
+ metadata?: {
1314
+ title?: string | undefined;
1315
+ preferredSize?: {
1316
+ width: number;
1317
+ height: number;
1318
+ } | undefined;
1319
+ } | undefined;
1320
+ })[] | null;
1321
+ role: "system" | "user" | "assistant" | "tool";
1322
+ id?: string | undefined;
1323
+ name?: string | undefined;
1324
+ timestamp?: number | undefined;
1325
+ reasoning?: string | undefined;
1326
+ tokenUsage?: {
1327
+ inputTokens?: number | undefined;
1328
+ outputTokens?: number | undefined;
1329
+ reasoningTokens?: number | undefined;
1330
+ totalTokens?: number | undefined;
1331
+ } | undefined;
1332
+ model?: string | undefined;
1333
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
1334
+ toolCalls?: {
1335
+ function: {
1336
+ name: string;
1337
+ arguments: string;
1338
+ };
1339
+ type: "function";
1340
+ id: string;
1341
+ }[] | undefined;
1342
+ toolCallId?: string | undefined;
1343
+ success?: boolean | undefined;
1344
+ };
1345
+ sessionId: string;
1346
+ matchedText: string;
1347
+ context: string;
1348
+ messageIndex: number;
1349
+ }>;
1350
+ metadata: z.ZodObject<{
1351
+ createdAt: z.ZodNumber;
1352
+ lastActivity: z.ZodNumber;
1353
+ messageCount: z.ZodNumber;
1354
+ }, "strict", z.ZodTypeAny, {
1355
+ createdAt: number;
1356
+ lastActivity: number;
1357
+ messageCount: number;
1358
+ }, {
1359
+ createdAt: number;
1360
+ lastActivity: number;
1361
+ messageCount: number;
1362
+ }>;
1363
+ }, "strict", z.ZodTypeAny, {
1364
+ sessionId: string;
1365
+ metadata: {
1366
+ createdAt: number;
1367
+ lastActivity: number;
1368
+ messageCount: number;
1369
+ };
1370
+ matchCount: number;
1371
+ firstMatch: {
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
+ } | {
1386
+ type: "ui-resource";
1387
+ mimeType: string;
1388
+ uri: string;
1389
+ content?: string | undefined;
1390
+ blob?: string | undefined;
1391
+ metadata?: {
1392
+ title?: string | undefined;
1393
+ preferredSize?: {
1394
+ width: number;
1395
+ height: number;
1396
+ } | undefined;
1397
+ } | undefined;
1398
+ })[] | null;
1399
+ role: "system" | "user" | "assistant" | "tool";
1400
+ id?: string | undefined;
1401
+ name?: string | undefined;
1402
+ timestamp?: number | undefined;
1403
+ reasoning?: string | undefined;
1404
+ tokenUsage?: {
1405
+ inputTokens?: number | undefined;
1406
+ outputTokens?: number | undefined;
1407
+ reasoningTokens?: number | undefined;
1408
+ totalTokens?: number | undefined;
1409
+ } | undefined;
1410
+ model?: string | undefined;
1411
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
1412
+ toolCalls?: {
1413
+ function: {
1414
+ name: string;
1415
+ arguments: string;
1416
+ };
1417
+ type: "function";
1418
+ id: string;
1419
+ }[] | undefined;
1420
+ toolCallId?: string | undefined;
1421
+ success?: boolean | undefined;
1422
+ };
1423
+ sessionId: string;
1424
+ matchedText: string;
1425
+ context: string;
1426
+ messageIndex: number;
492
1427
  };
493
- sessionId: string;
494
- matchedText: string;
495
- context: string;
496
- messageIndex: number;
497
1428
  }, {
498
- message: {
499
- content: string | ({
500
- type: "text";
501
- text: string;
502
- } | {
503
- type: "image";
504
- image?: unknown;
505
- mimeType?: string | undefined;
506
- } | {
507
- type: "file";
508
- mimeType: string;
509
- data?: unknown;
510
- filename?: string | undefined;
511
- })[] | null;
512
- role: "system" | "user" | "assistant" | "tool";
513
- provider?: string | undefined;
514
- model?: string | undefined;
515
- router?: string | undefined;
516
- name?: string | undefined;
517
- timestamp?: number | undefined;
518
- reasoning?: string | undefined;
519
- tokenUsage?: {
520
- inputTokens?: number | undefined;
521
- outputTokens?: number | undefined;
522
- reasoningTokens?: number | undefined;
523
- totalTokens?: number | undefined;
524
- } | undefined;
525
- toolCalls?: {
526
- function: {
527
- name: string;
528
- arguments: string;
529
- };
530
- type: "function";
531
- id: string;
532
- }[] | undefined;
533
- toolCallId?: string | undefined;
534
- };
535
1429
  sessionId: string;
536
- matchedText: string;
537
- context: string;
538
- messageIndex: number;
1430
+ metadata: {
1431
+ createdAt: number;
1432
+ lastActivity: number;
1433
+ messageCount: number;
1434
+ };
1435
+ matchCount: number;
1436
+ firstMatch: {
1437
+ message: {
1438
+ content: string | ({
1439
+ type: "text";
1440
+ text: string;
1441
+ } | {
1442
+ type: "image";
1443
+ image: string;
1444
+ mimeType?: string | undefined;
1445
+ } | {
1446
+ type: "file";
1447
+ mimeType: string;
1448
+ data: string;
1449
+ filename?: string | undefined;
1450
+ } | {
1451
+ type: "ui-resource";
1452
+ mimeType: string;
1453
+ uri: string;
1454
+ content?: string | undefined;
1455
+ blob?: string | undefined;
1456
+ metadata?: {
1457
+ title?: string | undefined;
1458
+ preferredSize?: {
1459
+ width: number;
1460
+ height: number;
1461
+ } | undefined;
1462
+ } | undefined;
1463
+ })[] | null;
1464
+ role: "system" | "user" | "assistant" | "tool";
1465
+ id?: string | undefined;
1466
+ name?: string | undefined;
1467
+ timestamp?: number | undefined;
1468
+ reasoning?: string | undefined;
1469
+ tokenUsage?: {
1470
+ inputTokens?: number | undefined;
1471
+ outputTokens?: number | undefined;
1472
+ reasoningTokens?: number | undefined;
1473
+ totalTokens?: number | undefined;
1474
+ } | undefined;
1475
+ model?: string | undefined;
1476
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
1477
+ toolCalls?: {
1478
+ function: {
1479
+ name: string;
1480
+ arguments: string;
1481
+ };
1482
+ type: "function";
1483
+ id: string;
1484
+ }[] | undefined;
1485
+ toolCallId?: string | undefined;
1486
+ success?: boolean | undefined;
1487
+ };
1488
+ sessionId: string;
1489
+ matchedText: string;
1490
+ context: string;
1491
+ messageIndex: number;
1492
+ };
539
1493
  }>;
540
- export type SearchResult = z.output<typeof SearchResultSchema>;
541
- export declare const SessionSearchResultSchema: z.ZodObject<{
542
- sessionId: z.ZodString;
543
- matchCount: z.ZodNumber;
544
- firstMatch: z.ZodObject<{
1494
+ export type SessionSearchResult = z.output<typeof SessionSearchResultSchema>;
1495
+ export declare const MessageSearchResponseSchema: z.ZodObject<{
1496
+ results: z.ZodArray<z.ZodObject<{
545
1497
  sessionId: z.ZodString;
546
1498
  message: z.ZodObject<{
1499
+ id: z.ZodOptional<z.ZodString>;
547
1500
  role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
548
1501
  timestamp: z.ZodOptional<z.ZodNumber>;
549
1502
  content: z.ZodUnion<[z.ZodString, z.ZodNull, z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -557,31 +1510,88 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
557
1510
  text: string;
558
1511
  }>, z.ZodObject<{
559
1512
  type: z.ZodLiteral<"image">;
560
- image: z.ZodType<unknown, z.ZodTypeDef, unknown>;
1513
+ image: z.ZodString;
561
1514
  mimeType: z.ZodOptional<z.ZodString>;
562
1515
  }, "strict", z.ZodTypeAny, {
563
1516
  type: "image";
564
- image?: unknown;
1517
+ image: string;
565
1518
  mimeType?: string | undefined;
566
1519
  }, {
567
1520
  type: "image";
568
- image?: unknown;
1521
+ image: string;
569
1522
  mimeType?: string | undefined;
570
1523
  }>, z.ZodObject<{
571
1524
  type: z.ZodLiteral<"file">;
572
- data: z.ZodType<unknown, z.ZodTypeDef, unknown>;
1525
+ data: z.ZodString;
573
1526
  mimeType: z.ZodString;
574
1527
  filename: z.ZodOptional<z.ZodString>;
575
1528
  }, "strict", z.ZodTypeAny, {
576
1529
  type: "file";
577
1530
  mimeType: string;
578
- data?: unknown;
1531
+ data: string;
579
1532
  filename?: string | undefined;
580
1533
  }, {
581
1534
  type: "file";
582
1535
  mimeType: string;
583
- data?: unknown;
1536
+ data: string;
584
1537
  filename?: string | undefined;
1538
+ }>, z.ZodObject<{
1539
+ type: z.ZodLiteral<"ui-resource">;
1540
+ uri: z.ZodString;
1541
+ mimeType: z.ZodString;
1542
+ content: z.ZodOptional<z.ZodString>;
1543
+ blob: z.ZodOptional<z.ZodString>;
1544
+ metadata: z.ZodOptional<z.ZodObject<{
1545
+ title: z.ZodOptional<z.ZodString>;
1546
+ preferredSize: z.ZodOptional<z.ZodObject<{
1547
+ width: z.ZodNumber;
1548
+ height: z.ZodNumber;
1549
+ }, "strict", z.ZodTypeAny, {
1550
+ width: number;
1551
+ height: number;
1552
+ }, {
1553
+ width: number;
1554
+ height: number;
1555
+ }>>;
1556
+ }, "strict", z.ZodTypeAny, {
1557
+ title?: string | undefined;
1558
+ preferredSize?: {
1559
+ width: number;
1560
+ height: number;
1561
+ } | undefined;
1562
+ }, {
1563
+ title?: string | undefined;
1564
+ preferredSize?: {
1565
+ width: number;
1566
+ height: number;
1567
+ } | undefined;
1568
+ }>>;
1569
+ }, "strict", z.ZodTypeAny, {
1570
+ type: "ui-resource";
1571
+ mimeType: string;
1572
+ uri: string;
1573
+ content?: string | undefined;
1574
+ blob?: string | undefined;
1575
+ metadata?: {
1576
+ title?: string | undefined;
1577
+ preferredSize?: {
1578
+ width: number;
1579
+ height: number;
1580
+ } | undefined;
1581
+ } | undefined;
1582
+ }, {
1583
+ type: "ui-resource";
1584
+ mimeType: string;
1585
+ uri: string;
1586
+ content?: string | undefined;
1587
+ blob?: string | undefined;
1588
+ metadata?: {
1589
+ title?: string | undefined;
1590
+ preferredSize?: {
1591
+ width: number;
1592
+ height: number;
1593
+ } | undefined;
1594
+ } | undefined;
585
1595
  }>]>, "many">]>;
586
1596
  reasoning: z.ZodOptional<z.ZodString>;
587
1597
  tokenUsage: z.ZodOptional<z.ZodObject<{
@@ -601,8 +1611,7 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
601
1611
  totalTokens?: number | undefined;
602
1612
  }>>;
603
1613
  model: z.ZodOptional<z.ZodString>;
604
- provider: z.ZodOptional<z.ZodString>;
605
- router: z.ZodOptional<z.ZodString>;
1614
+ provider: z.ZodOptional<z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere"]>>;
606
1615
  toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
607
1616
  id: z.ZodString;
608
1617
  type: z.ZodLiteral<"function">;
@@ -633,24 +1642,36 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
633
1642
  }>, "many">>;
634
1643
  toolCallId: z.ZodOptional<z.ZodString>;
635
1644
  name: z.ZodOptional<z.ZodString>;
1645
+ success: z.ZodOptional<z.ZodBoolean>;
636
1646
  }, "strict", z.ZodTypeAny, {
637
1647
  content: string | ({
638
1648
  type: "text";
639
1649
  text: string;
640
1650
  } | {
641
1651
  type: "image";
642
- image?: unknown;
1652
+ image: string;
643
1653
  mimeType?: string | undefined;
644
1654
  } | {
645
1655
  type: "file";
646
1656
  mimeType: string;
647
- data?: unknown;
1657
+ data: string;
648
1658
  filename?: string | undefined;
1659
+ } | {
1660
+ type: "ui-resource";
1661
+ mimeType: string;
1662
+ uri: string;
1663
+ content?: string | undefined;
1664
+ blob?: string | undefined;
1665
+ metadata?: {
1666
+ title?: string | undefined;
1667
+ preferredSize?: {
1668
+ width: number;
1669
+ height: number;
1670
+ } | undefined;
1671
+ } | undefined;
649
1672
  })[] | null;
650
1673
  role: "system" | "user" | "assistant" | "tool";
651
- provider?: string | undefined;
652
- model?: string | undefined;
653
- router?: string | undefined;
1674
+ id?: string | undefined;
654
1675
  name?: string | undefined;
655
1676
  timestamp?: number | undefined;
656
1677
  reasoning?: string | undefined;
@@ -660,6 +1681,8 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
660
1681
  reasoningTokens?: number | undefined;
661
1682
  totalTokens?: number | undefined;
662
1683
  } | undefined;
1684
+ model?: string | undefined;
1685
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
663
1686
  toolCalls?: {
664
1687
  function: {
665
1688
  name: string;
@@ -669,24 +1692,36 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
669
1692
  id: string;
670
1693
  }[] | undefined;
671
1694
  toolCallId?: string | undefined;
1695
+ success?: boolean | undefined;
672
1696
  }, {
673
1697
  content: string | ({
674
1698
  type: "text";
675
1699
  text: string;
676
1700
  } | {
677
1701
  type: "image";
678
- image?: unknown;
1702
+ image: string;
679
1703
  mimeType?: string | undefined;
680
1704
  } | {
681
1705
  type: "file";
682
1706
  mimeType: string;
683
- data?: unknown;
1707
+ data: string;
684
1708
  filename?: string | undefined;
1709
+ } | {
1710
+ type: "ui-resource";
1711
+ mimeType: string;
1712
+ uri: string;
1713
+ content?: string | undefined;
1714
+ blob?: string | undefined;
1715
+ metadata?: {
1716
+ title?: string | undefined;
1717
+ preferredSize?: {
1718
+ width: number;
1719
+ height: number;
1720
+ } | undefined;
1721
+ } | undefined;
685
1722
  })[] | null;
686
1723
  role: "system" | "user" | "assistant" | "tool";
687
- provider?: string | undefined;
688
- model?: string | undefined;
689
- router?: string | undefined;
1724
+ id?: string | undefined;
690
1725
  name?: string | undefined;
691
1726
  timestamp?: number | undefined;
692
1727
  reasoning?: string | undefined;
@@ -696,6 +1731,8 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
696
1731
  reasoningTokens?: number | undefined;
697
1732
  totalTokens?: number | undefined;
698
1733
  } | undefined;
1734
+ model?: string | undefined;
1735
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
699
1736
  toolCalls?: {
700
1737
  function: {
701
1738
  name: string;
@@ -705,6 +1742,7 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
705
1742
  id: string;
706
1743
  }[] | undefined;
707
1744
  toolCallId?: string | undefined;
1745
+ success?: boolean | undefined;
708
1746
  }>;
709
1747
  matchedText: z.ZodString;
710
1748
  context: z.ZodString;
@@ -716,18 +1754,29 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
716
1754
  text: string;
717
1755
  } | {
718
1756
  type: "image";
719
- image?: unknown;
1757
+ image: string;
720
1758
  mimeType?: string | undefined;
721
1759
  } | {
722
1760
  type: "file";
723
1761
  mimeType: string;
724
- data?: unknown;
1762
+ data: string;
725
1763
  filename?: string | undefined;
1764
+ } | {
1765
+ type: "ui-resource";
1766
+ mimeType: string;
1767
+ uri: string;
1768
+ content?: string | undefined;
1769
+ blob?: string | undefined;
1770
+ metadata?: {
1771
+ title?: string | undefined;
1772
+ preferredSize?: {
1773
+ width: number;
1774
+ height: number;
1775
+ } | undefined;
1776
+ } | undefined;
726
1777
  })[] | null;
727
1778
  role: "system" | "user" | "assistant" | "tool";
728
- provider?: string | undefined;
729
- model?: string | undefined;
730
- router?: string | undefined;
1779
+ id?: string | undefined;
731
1780
  name?: string | undefined;
732
1781
  timestamp?: number | undefined;
733
1782
  reasoning?: string | undefined;
@@ -737,6 +1786,8 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
737
1786
  reasoningTokens?: number | undefined;
738
1787
  totalTokens?: number | undefined;
739
1788
  } | undefined;
1789
+ model?: string | undefined;
1790
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
740
1791
  toolCalls?: {
741
1792
  function: {
742
1793
  name: string;
@@ -746,6 +1797,7 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
746
1797
  id: string;
747
1798
  }[] | undefined;
748
1799
  toolCallId?: string | undefined;
1800
+ success?: boolean | undefined;
749
1801
  };
750
1802
  sessionId: string;
751
1803
  matchedText: string;
@@ -758,18 +1810,29 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
758
1810
  text: string;
759
1811
  } | {
760
1812
  type: "image";
761
- image?: unknown;
1813
+ image: string;
762
1814
  mimeType?: string | undefined;
763
1815
  } | {
764
1816
  type: "file";
765
1817
  mimeType: string;
766
- data?: unknown;
1818
+ data: string;
767
1819
  filename?: string | undefined;
1820
+ } | {
1821
+ type: "ui-resource";
1822
+ mimeType: string;
1823
+ uri: string;
1824
+ content?: string | undefined;
1825
+ blob?: string | undefined;
1826
+ metadata?: {
1827
+ title?: string | undefined;
1828
+ preferredSize?: {
1829
+ width: number;
1830
+ height: number;
1831
+ } | undefined;
1832
+ } | undefined;
768
1833
  })[] | null;
769
1834
  role: "system" | "user" | "assistant" | "tool";
770
- provider?: string | undefined;
771
- model?: string | undefined;
772
- router?: string | undefined;
1835
+ id?: string | undefined;
773
1836
  name?: string | undefined;
774
1837
  timestamp?: number | undefined;
775
1838
  reasoning?: string | undefined;
@@ -779,6 +1842,8 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
779
1842
  reasoningTokens?: number | undefined;
780
1843
  totalTokens?: number | undefined;
781
1844
  } | undefined;
1845
+ model?: string | undefined;
1846
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
782
1847
  toolCalls?: {
783
1848
  function: {
784
1849
  name: string;
@@ -788,47 +1853,48 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
788
1853
  id: string;
789
1854
  }[] | undefined;
790
1855
  toolCallId?: string | undefined;
1856
+ success?: boolean | undefined;
791
1857
  };
792
1858
  sessionId: string;
793
1859
  matchedText: string;
794
1860
  context: string;
795
1861
  messageIndex: number;
796
- }>;
797
- metadata: z.ZodObject<{
798
- createdAt: z.ZodNumber;
799
- lastActivity: z.ZodNumber;
800
- messageCount: z.ZodNumber;
801
- }, "strict", z.ZodTypeAny, {
802
- createdAt: number;
803
- lastActivity: number;
804
- messageCount: number;
805
- }, {
806
- createdAt: number;
807
- lastActivity: number;
808
- messageCount: number;
809
- }>;
1862
+ }>, "many">;
1863
+ total: z.ZodNumber;
1864
+ hasMore: z.ZodBoolean;
1865
+ query: z.ZodString;
810
1866
  }, "strict", z.ZodTypeAny, {
811
- sessionId: string;
812
- matchCount: number;
813
- firstMatch: {
1867
+ query: string;
1868
+ results: {
814
1869
  message: {
815
1870
  content: string | ({
816
1871
  type: "text";
817
1872
  text: string;
818
1873
  } | {
819
1874
  type: "image";
820
- image?: unknown;
1875
+ image: string;
821
1876
  mimeType?: string | undefined;
822
1877
  } | {
823
1878
  type: "file";
824
1879
  mimeType: string;
825
- data?: unknown;
1880
+ data: string;
826
1881
  filename?: string | undefined;
1882
+ } | {
1883
+ type: "ui-resource";
1884
+ mimeType: string;
1885
+ uri: string;
1886
+ content?: string | undefined;
1887
+ blob?: string | undefined;
1888
+ metadata?: {
1889
+ title?: string | undefined;
1890
+ preferredSize?: {
1891
+ width: number;
1892
+ height: number;
1893
+ } | undefined;
1894
+ } | undefined;
827
1895
  })[] | null;
828
1896
  role: "system" | "user" | "assistant" | "tool";
829
- provider?: string | undefined;
830
- model?: string | undefined;
831
- router?: string | undefined;
1897
+ id?: string | undefined;
832
1898
  name?: string | undefined;
833
1899
  timestamp?: number | undefined;
834
1900
  reasoning?: string | undefined;
@@ -838,6 +1904,8 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
838
1904
  reasoningTokens?: number | undefined;
839
1905
  totalTokens?: number | undefined;
840
1906
  } | undefined;
1907
+ model?: string | undefined;
1908
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
841
1909
  toolCalls?: {
842
1910
  function: {
843
1911
  name: string;
@@ -847,39 +1915,47 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
847
1915
  id: string;
848
1916
  }[] | undefined;
849
1917
  toolCallId?: string | undefined;
1918
+ success?: boolean | undefined;
850
1919
  };
851
1920
  sessionId: string;
852
1921
  matchedText: string;
853
1922
  context: string;
854
1923
  messageIndex: number;
855
- };
856
- metadata: {
857
- createdAt: number;
858
- lastActivity: number;
859
- messageCount: number;
860
- };
1924
+ }[];
1925
+ total: number;
1926
+ hasMore: boolean;
861
1927
  }, {
862
- sessionId: string;
863
- matchCount: number;
864
- firstMatch: {
1928
+ query: string;
1929
+ results: {
865
1930
  message: {
866
1931
  content: string | ({
867
1932
  type: "text";
868
1933
  text: string;
869
1934
  } | {
870
1935
  type: "image";
871
- image?: unknown;
1936
+ image: string;
872
1937
  mimeType?: string | undefined;
873
1938
  } | {
874
1939
  type: "file";
875
1940
  mimeType: string;
876
- data?: unknown;
1941
+ data: string;
877
1942
  filename?: string | undefined;
1943
+ } | {
1944
+ type: "ui-resource";
1945
+ mimeType: string;
1946
+ uri: string;
1947
+ content?: string | undefined;
1948
+ blob?: string | undefined;
1949
+ metadata?: {
1950
+ title?: string | undefined;
1951
+ preferredSize?: {
1952
+ width: number;
1953
+ height: number;
1954
+ } | undefined;
1955
+ } | undefined;
878
1956
  })[] | null;
879
1957
  role: "system" | "user" | "assistant" | "tool";
880
- provider?: string | undefined;
881
- model?: string | undefined;
882
- router?: string | undefined;
1958
+ id?: string | undefined;
883
1959
  name?: string | undefined;
884
1960
  timestamp?: number | undefined;
885
1961
  reasoning?: string | undefined;
@@ -889,6 +1965,8 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
889
1965
  reasoningTokens?: number | undefined;
890
1966
  totalTokens?: number | undefined;
891
1967
  } | undefined;
1968
+ model?: string | undefined;
1969
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
892
1970
  toolCalls?: {
893
1971
  function: {
894
1972
  name: string;
@@ -898,19 +1976,677 @@ export declare const SessionSearchResultSchema: z.ZodObject<{
898
1976
  id: string;
899
1977
  }[] | undefined;
900
1978
  toolCallId?: string | undefined;
1979
+ success?: boolean | undefined;
901
1980
  };
902
1981
  sessionId: string;
903
1982
  matchedText: string;
904
1983
  context: string;
905
1984
  messageIndex: number;
906
- };
907
- metadata: {
908
- createdAt: number;
909
- lastActivity: number;
910
- messageCount: number;
911
- };
1985
+ }[];
1986
+ total: number;
1987
+ hasMore: boolean;
912
1988
  }>;
913
- export type SessionSearchResult = z.output<typeof SessionSearchResultSchema>;
1989
+ export type MessageSearchResponse = z.output<typeof MessageSearchResponseSchema>;
1990
+ export declare const SessionSearchResponseSchema: z.ZodObject<{
1991
+ results: z.ZodArray<z.ZodObject<{
1992
+ sessionId: z.ZodString;
1993
+ matchCount: z.ZodNumber;
1994
+ firstMatch: z.ZodObject<{
1995
+ sessionId: z.ZodString;
1996
+ message: z.ZodObject<{
1997
+ id: z.ZodOptional<z.ZodString>;
1998
+ role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
1999
+ timestamp: z.ZodOptional<z.ZodNumber>;
2000
+ content: z.ZodUnion<[z.ZodString, z.ZodNull, z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2001
+ type: z.ZodLiteral<"text">;
2002
+ text: z.ZodString;
2003
+ }, "strict", z.ZodTypeAny, {
2004
+ type: "text";
2005
+ text: string;
2006
+ }, {
2007
+ type: "text";
2008
+ text: string;
2009
+ }>, z.ZodObject<{
2010
+ type: z.ZodLiteral<"image">;
2011
+ image: z.ZodString;
2012
+ mimeType: z.ZodOptional<z.ZodString>;
2013
+ }, "strict", z.ZodTypeAny, {
2014
+ type: "image";
2015
+ image: string;
2016
+ mimeType?: string | undefined;
2017
+ }, {
2018
+ type: "image";
2019
+ image: string;
2020
+ mimeType?: string | undefined;
2021
+ }>, z.ZodObject<{
2022
+ type: z.ZodLiteral<"file">;
2023
+ data: z.ZodString;
2024
+ mimeType: z.ZodString;
2025
+ filename: z.ZodOptional<z.ZodString>;
2026
+ }, "strict", z.ZodTypeAny, {
2027
+ type: "file";
2028
+ mimeType: string;
2029
+ data: string;
2030
+ filename?: string | undefined;
2031
+ }, {
2032
+ type: "file";
2033
+ mimeType: string;
2034
+ data: string;
2035
+ filename?: string | undefined;
2036
+ }>, z.ZodObject<{
2037
+ type: z.ZodLiteral<"ui-resource">;
2038
+ uri: z.ZodString;
2039
+ mimeType: z.ZodString;
2040
+ content: z.ZodOptional<z.ZodString>;
2041
+ blob: z.ZodOptional<z.ZodString>;
2042
+ metadata: z.ZodOptional<z.ZodObject<{
2043
+ title: z.ZodOptional<z.ZodString>;
2044
+ preferredSize: z.ZodOptional<z.ZodObject<{
2045
+ width: z.ZodNumber;
2046
+ height: z.ZodNumber;
2047
+ }, "strict", z.ZodTypeAny, {
2048
+ width: number;
2049
+ height: number;
2050
+ }, {
2051
+ width: number;
2052
+ height: number;
2053
+ }>>;
2054
+ }, "strict", z.ZodTypeAny, {
2055
+ title?: string | undefined;
2056
+ preferredSize?: {
2057
+ width: number;
2058
+ height: number;
2059
+ } | undefined;
2060
+ }, {
2061
+ title?: string | undefined;
2062
+ preferredSize?: {
2063
+ width: number;
2064
+ height: number;
2065
+ } | undefined;
2066
+ }>>;
2067
+ }, "strict", z.ZodTypeAny, {
2068
+ type: "ui-resource";
2069
+ mimeType: string;
2070
+ uri: string;
2071
+ content?: string | undefined;
2072
+ blob?: string | undefined;
2073
+ metadata?: {
2074
+ title?: string | undefined;
2075
+ preferredSize?: {
2076
+ width: number;
2077
+ height: number;
2078
+ } | undefined;
2079
+ } | undefined;
2080
+ }, {
2081
+ type: "ui-resource";
2082
+ mimeType: string;
2083
+ uri: string;
2084
+ content?: string | undefined;
2085
+ blob?: string | undefined;
2086
+ metadata?: {
2087
+ title?: string | undefined;
2088
+ preferredSize?: {
2089
+ width: number;
2090
+ height: number;
2091
+ } | undefined;
2092
+ } | undefined;
2093
+ }>]>, "many">]>;
2094
+ reasoning: z.ZodOptional<z.ZodString>;
2095
+ tokenUsage: z.ZodOptional<z.ZodObject<{
2096
+ inputTokens: z.ZodOptional<z.ZodNumber>;
2097
+ outputTokens: z.ZodOptional<z.ZodNumber>;
2098
+ reasoningTokens: z.ZodOptional<z.ZodNumber>;
2099
+ totalTokens: z.ZodOptional<z.ZodNumber>;
2100
+ }, "strict", z.ZodTypeAny, {
2101
+ inputTokens?: number | undefined;
2102
+ outputTokens?: number | undefined;
2103
+ reasoningTokens?: number | undefined;
2104
+ totalTokens?: number | undefined;
2105
+ }, {
2106
+ inputTokens?: number | undefined;
2107
+ outputTokens?: number | undefined;
2108
+ reasoningTokens?: number | undefined;
2109
+ totalTokens?: number | undefined;
2110
+ }>>;
2111
+ model: z.ZodOptional<z.ZodString>;
2112
+ provider: z.ZodOptional<z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere"]>>;
2113
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
2114
+ id: z.ZodString;
2115
+ type: z.ZodLiteral<"function">;
2116
+ function: z.ZodObject<{
2117
+ name: z.ZodString;
2118
+ arguments: z.ZodString;
2119
+ }, "strict", z.ZodTypeAny, {
2120
+ name: string;
2121
+ arguments: string;
2122
+ }, {
2123
+ name: string;
2124
+ arguments: string;
2125
+ }>;
2126
+ }, "strict", z.ZodTypeAny, {
2127
+ function: {
2128
+ name: string;
2129
+ arguments: string;
2130
+ };
2131
+ type: "function";
2132
+ id: string;
2133
+ }, {
2134
+ function: {
2135
+ name: string;
2136
+ arguments: string;
2137
+ };
2138
+ type: "function";
2139
+ id: string;
2140
+ }>, "many">>;
2141
+ toolCallId: z.ZodOptional<z.ZodString>;
2142
+ name: z.ZodOptional<z.ZodString>;
2143
+ success: z.ZodOptional<z.ZodBoolean>;
2144
+ }, "strict", z.ZodTypeAny, {
2145
+ content: string | ({
2146
+ type: "text";
2147
+ text: string;
2148
+ } | {
2149
+ type: "image";
2150
+ image: string;
2151
+ mimeType?: string | undefined;
2152
+ } | {
2153
+ type: "file";
2154
+ mimeType: string;
2155
+ data: string;
2156
+ filename?: string | undefined;
2157
+ } | {
2158
+ type: "ui-resource";
2159
+ mimeType: string;
2160
+ uri: string;
2161
+ content?: string | undefined;
2162
+ blob?: string | undefined;
2163
+ metadata?: {
2164
+ title?: string | undefined;
2165
+ preferredSize?: {
2166
+ width: number;
2167
+ height: number;
2168
+ } | undefined;
2169
+ } | undefined;
2170
+ })[] | null;
2171
+ role: "system" | "user" | "assistant" | "tool";
2172
+ id?: string | undefined;
2173
+ name?: string | undefined;
2174
+ timestamp?: number | undefined;
2175
+ reasoning?: string | undefined;
2176
+ tokenUsage?: {
2177
+ inputTokens?: number | undefined;
2178
+ outputTokens?: number | undefined;
2179
+ reasoningTokens?: number | undefined;
2180
+ totalTokens?: number | undefined;
2181
+ } | undefined;
2182
+ model?: string | undefined;
2183
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
2184
+ toolCalls?: {
2185
+ function: {
2186
+ name: string;
2187
+ arguments: string;
2188
+ };
2189
+ type: "function";
2190
+ id: string;
2191
+ }[] | undefined;
2192
+ toolCallId?: string | undefined;
2193
+ success?: boolean | undefined;
2194
+ }, {
2195
+ content: string | ({
2196
+ type: "text";
2197
+ text: string;
2198
+ } | {
2199
+ type: "image";
2200
+ image: string;
2201
+ mimeType?: string | undefined;
2202
+ } | {
2203
+ type: "file";
2204
+ mimeType: string;
2205
+ data: string;
2206
+ filename?: string | undefined;
2207
+ } | {
2208
+ type: "ui-resource";
2209
+ mimeType: string;
2210
+ uri: string;
2211
+ content?: string | undefined;
2212
+ blob?: string | undefined;
2213
+ metadata?: {
2214
+ title?: string | undefined;
2215
+ preferredSize?: {
2216
+ width: number;
2217
+ height: number;
2218
+ } | undefined;
2219
+ } | undefined;
2220
+ })[] | null;
2221
+ role: "system" | "user" | "assistant" | "tool";
2222
+ id?: string | undefined;
2223
+ name?: string | undefined;
2224
+ timestamp?: number | undefined;
2225
+ reasoning?: string | undefined;
2226
+ tokenUsage?: {
2227
+ inputTokens?: number | undefined;
2228
+ outputTokens?: number | undefined;
2229
+ reasoningTokens?: number | undefined;
2230
+ totalTokens?: number | undefined;
2231
+ } | undefined;
2232
+ model?: string | undefined;
2233
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
2234
+ toolCalls?: {
2235
+ function: {
2236
+ name: string;
2237
+ arguments: string;
2238
+ };
2239
+ type: "function";
2240
+ id: string;
2241
+ }[] | undefined;
2242
+ toolCallId?: string | undefined;
2243
+ success?: boolean | undefined;
2244
+ }>;
2245
+ matchedText: z.ZodString;
2246
+ context: z.ZodString;
2247
+ messageIndex: z.ZodNumber;
2248
+ }, "strict", z.ZodTypeAny, {
2249
+ message: {
2250
+ content: string | ({
2251
+ type: "text";
2252
+ text: string;
2253
+ } | {
2254
+ type: "image";
2255
+ image: string;
2256
+ mimeType?: string | undefined;
2257
+ } | {
2258
+ type: "file";
2259
+ mimeType: string;
2260
+ data: string;
2261
+ filename?: string | undefined;
2262
+ } | {
2263
+ type: "ui-resource";
2264
+ mimeType: string;
2265
+ uri: string;
2266
+ content?: string | undefined;
2267
+ blob?: string | undefined;
2268
+ metadata?: {
2269
+ title?: string | undefined;
2270
+ preferredSize?: {
2271
+ width: number;
2272
+ height: number;
2273
+ } | undefined;
2274
+ } | undefined;
2275
+ })[] | null;
2276
+ role: "system" | "user" | "assistant" | "tool";
2277
+ id?: string | undefined;
2278
+ name?: string | undefined;
2279
+ timestamp?: number | undefined;
2280
+ reasoning?: string | undefined;
2281
+ tokenUsage?: {
2282
+ inputTokens?: number | undefined;
2283
+ outputTokens?: number | undefined;
2284
+ reasoningTokens?: number | undefined;
2285
+ totalTokens?: number | undefined;
2286
+ } | undefined;
2287
+ model?: string | undefined;
2288
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
2289
+ toolCalls?: {
2290
+ function: {
2291
+ name: string;
2292
+ arguments: string;
2293
+ };
2294
+ type: "function";
2295
+ id: string;
2296
+ }[] | undefined;
2297
+ toolCallId?: string | undefined;
2298
+ success?: boolean | undefined;
2299
+ };
2300
+ sessionId: string;
2301
+ matchedText: string;
2302
+ context: string;
2303
+ messageIndex: number;
2304
+ }, {
2305
+ message: {
2306
+ content: string | ({
2307
+ type: "text";
2308
+ text: string;
2309
+ } | {
2310
+ type: "image";
2311
+ image: string;
2312
+ mimeType?: string | undefined;
2313
+ } | {
2314
+ type: "file";
2315
+ mimeType: string;
2316
+ data: string;
2317
+ filename?: string | undefined;
2318
+ } | {
2319
+ type: "ui-resource";
2320
+ mimeType: string;
2321
+ uri: string;
2322
+ content?: string | undefined;
2323
+ blob?: string | undefined;
2324
+ metadata?: {
2325
+ title?: string | undefined;
2326
+ preferredSize?: {
2327
+ width: number;
2328
+ height: number;
2329
+ } | undefined;
2330
+ } | undefined;
2331
+ })[] | null;
2332
+ role: "system" | "user" | "assistant" | "tool";
2333
+ id?: string | undefined;
2334
+ name?: string | undefined;
2335
+ timestamp?: number | undefined;
2336
+ reasoning?: string | undefined;
2337
+ tokenUsage?: {
2338
+ inputTokens?: number | undefined;
2339
+ outputTokens?: number | undefined;
2340
+ reasoningTokens?: number | undefined;
2341
+ totalTokens?: number | undefined;
2342
+ } | undefined;
2343
+ model?: string | undefined;
2344
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
2345
+ toolCalls?: {
2346
+ function: {
2347
+ name: string;
2348
+ arguments: string;
2349
+ };
2350
+ type: "function";
2351
+ id: string;
2352
+ }[] | undefined;
2353
+ toolCallId?: string | undefined;
2354
+ success?: boolean | undefined;
2355
+ };
2356
+ sessionId: string;
2357
+ matchedText: string;
2358
+ context: string;
2359
+ messageIndex: number;
2360
+ }>;
2361
+ metadata: z.ZodObject<{
2362
+ createdAt: z.ZodNumber;
2363
+ lastActivity: z.ZodNumber;
2364
+ messageCount: z.ZodNumber;
2365
+ }, "strict", z.ZodTypeAny, {
2366
+ createdAt: number;
2367
+ lastActivity: number;
2368
+ messageCount: number;
2369
+ }, {
2370
+ createdAt: number;
2371
+ lastActivity: number;
2372
+ messageCount: number;
2373
+ }>;
2374
+ }, "strict", z.ZodTypeAny, {
2375
+ sessionId: string;
2376
+ metadata: {
2377
+ createdAt: number;
2378
+ lastActivity: number;
2379
+ messageCount: number;
2380
+ };
2381
+ matchCount: number;
2382
+ firstMatch: {
2383
+ message: {
2384
+ content: string | ({
2385
+ type: "text";
2386
+ text: string;
2387
+ } | {
2388
+ type: "image";
2389
+ image: string;
2390
+ mimeType?: string | undefined;
2391
+ } | {
2392
+ type: "file";
2393
+ mimeType: string;
2394
+ data: string;
2395
+ filename?: string | undefined;
2396
+ } | {
2397
+ type: "ui-resource";
2398
+ mimeType: string;
2399
+ uri: string;
2400
+ content?: string | undefined;
2401
+ blob?: string | undefined;
2402
+ metadata?: {
2403
+ title?: string | undefined;
2404
+ preferredSize?: {
2405
+ width: number;
2406
+ height: number;
2407
+ } | undefined;
2408
+ } | undefined;
2409
+ })[] | null;
2410
+ role: "system" | "user" | "assistant" | "tool";
2411
+ id?: string | undefined;
2412
+ name?: string | undefined;
2413
+ timestamp?: number | undefined;
2414
+ reasoning?: string | undefined;
2415
+ tokenUsage?: {
2416
+ inputTokens?: number | undefined;
2417
+ outputTokens?: number | undefined;
2418
+ reasoningTokens?: number | undefined;
2419
+ totalTokens?: number | undefined;
2420
+ } | undefined;
2421
+ model?: string | undefined;
2422
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
2423
+ toolCalls?: {
2424
+ function: {
2425
+ name: string;
2426
+ arguments: string;
2427
+ };
2428
+ type: "function";
2429
+ id: string;
2430
+ }[] | undefined;
2431
+ toolCallId?: string | undefined;
2432
+ success?: boolean | undefined;
2433
+ };
2434
+ sessionId: string;
2435
+ matchedText: string;
2436
+ context: string;
2437
+ messageIndex: number;
2438
+ };
2439
+ }, {
2440
+ sessionId: string;
2441
+ metadata: {
2442
+ createdAt: number;
2443
+ lastActivity: number;
2444
+ messageCount: number;
2445
+ };
2446
+ matchCount: number;
2447
+ firstMatch: {
2448
+ message: {
2449
+ content: string | ({
2450
+ type: "text";
2451
+ text: string;
2452
+ } | {
2453
+ type: "image";
2454
+ image: string;
2455
+ mimeType?: string | undefined;
2456
+ } | {
2457
+ type: "file";
2458
+ mimeType: string;
2459
+ data: string;
2460
+ filename?: string | undefined;
2461
+ } | {
2462
+ type: "ui-resource";
2463
+ mimeType: string;
2464
+ uri: string;
2465
+ content?: string | undefined;
2466
+ blob?: string | undefined;
2467
+ metadata?: {
2468
+ title?: string | undefined;
2469
+ preferredSize?: {
2470
+ width: number;
2471
+ height: number;
2472
+ } | undefined;
2473
+ } | undefined;
2474
+ })[] | null;
2475
+ role: "system" | "user" | "assistant" | "tool";
2476
+ id?: string | undefined;
2477
+ name?: string | undefined;
2478
+ timestamp?: number | undefined;
2479
+ reasoning?: string | undefined;
2480
+ tokenUsage?: {
2481
+ inputTokens?: number | undefined;
2482
+ outputTokens?: number | undefined;
2483
+ reasoningTokens?: number | undefined;
2484
+ totalTokens?: number | undefined;
2485
+ } | undefined;
2486
+ model?: string | undefined;
2487
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
2488
+ toolCalls?: {
2489
+ function: {
2490
+ name: string;
2491
+ arguments: string;
2492
+ };
2493
+ type: "function";
2494
+ id: string;
2495
+ }[] | undefined;
2496
+ toolCallId?: string | undefined;
2497
+ success?: boolean | undefined;
2498
+ };
2499
+ sessionId: string;
2500
+ matchedText: string;
2501
+ context: string;
2502
+ messageIndex: number;
2503
+ };
2504
+ }>, "many">;
2505
+ total: z.ZodNumber;
2506
+ hasMore: z.ZodBoolean;
2507
+ query: z.ZodString;
2508
+ }, "strict", z.ZodTypeAny, {
2509
+ query: string;
2510
+ results: {
2511
+ sessionId: string;
2512
+ metadata: {
2513
+ createdAt: number;
2514
+ lastActivity: number;
2515
+ messageCount: number;
2516
+ };
2517
+ matchCount: number;
2518
+ firstMatch: {
2519
+ message: {
2520
+ content: string | ({
2521
+ type: "text";
2522
+ text: string;
2523
+ } | {
2524
+ type: "image";
2525
+ image: string;
2526
+ mimeType?: string | undefined;
2527
+ } | {
2528
+ type: "file";
2529
+ mimeType: string;
2530
+ data: string;
2531
+ filename?: string | undefined;
2532
+ } | {
2533
+ type: "ui-resource";
2534
+ mimeType: string;
2535
+ uri: string;
2536
+ content?: string | undefined;
2537
+ blob?: string | undefined;
2538
+ metadata?: {
2539
+ title?: string | undefined;
2540
+ preferredSize?: {
2541
+ width: number;
2542
+ height: number;
2543
+ } | undefined;
2544
+ } | undefined;
2545
+ })[] | null;
2546
+ role: "system" | "user" | "assistant" | "tool";
2547
+ id?: string | undefined;
2548
+ name?: string | undefined;
2549
+ timestamp?: number | undefined;
2550
+ reasoning?: string | undefined;
2551
+ tokenUsage?: {
2552
+ inputTokens?: number | undefined;
2553
+ outputTokens?: number | undefined;
2554
+ reasoningTokens?: number | undefined;
2555
+ totalTokens?: number | undefined;
2556
+ } | undefined;
2557
+ model?: string | undefined;
2558
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
2559
+ toolCalls?: {
2560
+ function: {
2561
+ name: string;
2562
+ arguments: string;
2563
+ };
2564
+ type: "function";
2565
+ id: string;
2566
+ }[] | undefined;
2567
+ toolCallId?: string | undefined;
2568
+ success?: boolean | undefined;
2569
+ };
2570
+ sessionId: string;
2571
+ matchedText: string;
2572
+ context: string;
2573
+ messageIndex: number;
2574
+ };
2575
+ }[];
2576
+ total: number;
2577
+ hasMore: boolean;
2578
+ }, {
2579
+ query: string;
2580
+ results: {
2581
+ sessionId: string;
2582
+ metadata: {
2583
+ createdAt: number;
2584
+ lastActivity: number;
2585
+ messageCount: number;
2586
+ };
2587
+ matchCount: number;
2588
+ firstMatch: {
2589
+ message: {
2590
+ content: string | ({
2591
+ type: "text";
2592
+ text: string;
2593
+ } | {
2594
+ type: "image";
2595
+ image: string;
2596
+ mimeType?: string | undefined;
2597
+ } | {
2598
+ type: "file";
2599
+ mimeType: string;
2600
+ data: string;
2601
+ filename?: string | undefined;
2602
+ } | {
2603
+ type: "ui-resource";
2604
+ mimeType: string;
2605
+ uri: string;
2606
+ content?: string | undefined;
2607
+ blob?: string | undefined;
2608
+ metadata?: {
2609
+ title?: string | undefined;
2610
+ preferredSize?: {
2611
+ width: number;
2612
+ height: number;
2613
+ } | undefined;
2614
+ } | undefined;
2615
+ })[] | null;
2616
+ role: "system" | "user" | "assistant" | "tool";
2617
+ id?: string | undefined;
2618
+ name?: string | undefined;
2619
+ timestamp?: number | undefined;
2620
+ reasoning?: string | undefined;
2621
+ tokenUsage?: {
2622
+ inputTokens?: number | undefined;
2623
+ outputTokens?: number | undefined;
2624
+ reasoningTokens?: number | undefined;
2625
+ totalTokens?: number | undefined;
2626
+ } | undefined;
2627
+ model?: string | undefined;
2628
+ provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | undefined;
2629
+ toolCalls?: {
2630
+ function: {
2631
+ name: string;
2632
+ arguments: string;
2633
+ };
2634
+ type: "function";
2635
+ id: string;
2636
+ }[] | undefined;
2637
+ toolCallId?: string | undefined;
2638
+ success?: boolean | undefined;
2639
+ };
2640
+ sessionId: string;
2641
+ matchedText: string;
2642
+ context: string;
2643
+ messageIndex: number;
2644
+ };
2645
+ }[];
2646
+ total: number;
2647
+ hasMore: boolean;
2648
+ }>;
2649
+ export type SessionSearchResponse = z.output<typeof SessionSearchResponseSchema>;
914
2650
  export declare const WebhookSchema: z.ZodObject<{
915
2651
  id: z.ZodString;
916
2652
  url: z.ZodString;
@@ -933,7 +2669,6 @@ export declare const CatalogModelInfoSchema: z.ZodObject<{
933
2669
  maxInputTokens: z.ZodNumber;
934
2670
  default: z.ZodOptional<z.ZodBoolean>;
935
2671
  supportedFileTypes: z.ZodArray<z.ZodEnum<["audio", "pdf", "image"]>, "many">;
936
- supportedRouters: z.ZodOptional<z.ZodArray<z.ZodEnum<["vercel", "in-built"]>, "many">>;
937
2672
  displayName: z.ZodOptional<z.ZodString>;
938
2673
  pricing: z.ZodOptional<z.ZodObject<{
939
2674
  inputPerM: z.ZodNumber;
@@ -958,11 +2693,10 @@ export declare const CatalogModelInfoSchema: z.ZodObject<{
958
2693
  unit?: "per_million_tokens" | undefined;
959
2694
  }>>;
960
2695
  }, "strict", z.ZodTypeAny, {
961
- maxInputTokens: number;
962
2696
  name: string;
2697
+ maxInputTokens: number;
963
2698
  supportedFileTypes: ("image" | "audio" | "pdf")[];
964
2699
  default?: boolean | undefined;
965
- supportedRouters?: ("vercel" | "in-built")[] | undefined;
966
2700
  displayName?: string | undefined;
967
2701
  pricing?: {
968
2702
  inputPerM: number;
@@ -973,11 +2707,10 @@ export declare const CatalogModelInfoSchema: z.ZodObject<{
973
2707
  unit?: "per_million_tokens" | undefined;
974
2708
  } | undefined;
975
2709
  }, {
976
- maxInputTokens: number;
977
2710
  name: string;
2711
+ maxInputTokens: number;
978
2712
  supportedFileTypes: ("image" | "audio" | "pdf")[];
979
2713
  default?: boolean | undefined;
980
- supportedRouters?: ("vercel" | "in-built")[] | undefined;
981
2714
  displayName?: string | undefined;
982
2715
  pricing?: {
983
2716
  inputPerM: number;
@@ -993,14 +2726,12 @@ export declare const ProviderCatalogSchema: z.ZodObject<{
993
2726
  name: z.ZodString;
994
2727
  hasApiKey: z.ZodBoolean;
995
2728
  primaryEnvVar: z.ZodString;
996
- supportedRouters: z.ZodArray<z.ZodEnum<["vercel", "in-built"]>, "many">;
997
2729
  supportsBaseURL: z.ZodBoolean;
998
2730
  models: z.ZodArray<z.ZodObject<{
999
2731
  name: z.ZodString;
1000
2732
  maxInputTokens: z.ZodNumber;
1001
2733
  default: z.ZodOptional<z.ZodBoolean>;
1002
2734
  supportedFileTypes: z.ZodArray<z.ZodEnum<["audio", "pdf", "image"]>, "many">;
1003
- supportedRouters: z.ZodOptional<z.ZodArray<z.ZodEnum<["vercel", "in-built"]>, "many">>;
1004
2735
  displayName: z.ZodOptional<z.ZodString>;
1005
2736
  pricing: z.ZodOptional<z.ZodObject<{
1006
2737
  inputPerM: z.ZodNumber;
@@ -1025,11 +2756,10 @@ export declare const ProviderCatalogSchema: z.ZodObject<{
1025
2756
  unit?: "per_million_tokens" | undefined;
1026
2757
  }>>;
1027
2758
  }, "strict", z.ZodTypeAny, {
1028
- maxInputTokens: number;
1029
2759
  name: string;
2760
+ maxInputTokens: number;
1030
2761
  supportedFileTypes: ("image" | "audio" | "pdf")[];
1031
2762
  default?: boolean | undefined;
1032
- supportedRouters?: ("vercel" | "in-built")[] | undefined;
1033
2763
  displayName?: string | undefined;
1034
2764
  pricing?: {
1035
2765
  inputPerM: number;
@@ -1040,11 +2770,10 @@ export declare const ProviderCatalogSchema: z.ZodObject<{
1040
2770
  unit?: "per_million_tokens" | undefined;
1041
2771
  } | undefined;
1042
2772
  }, {
1043
- maxInputTokens: number;
1044
2773
  name: string;
2774
+ maxInputTokens: number;
1045
2775
  supportedFileTypes: ("image" | "audio" | "pdf")[];
1046
2776
  default?: boolean | undefined;
1047
- supportedRouters?: ("vercel" | "in-built")[] | undefined;
1048
2777
  displayName?: string | undefined;
1049
2778
  pricing?: {
1050
2779
  inputPerM: number;
@@ -1057,18 +2786,16 @@ export declare const ProviderCatalogSchema: z.ZodObject<{
1057
2786
  }>, "many">;
1058
2787
  supportedFileTypes: z.ZodArray<z.ZodEnum<["audio", "pdf", "image"]>, "many">;
1059
2788
  }, "strict", z.ZodTypeAny, {
1060
- hasApiKey: boolean;
1061
2789
  name: string;
2790
+ hasApiKey: boolean;
1062
2791
  supportedFileTypes: ("image" | "audio" | "pdf")[];
1063
- supportedRouters: ("vercel" | "in-built")[];
1064
2792
  primaryEnvVar: string;
1065
2793
  supportsBaseURL: boolean;
1066
2794
  models: {
1067
- maxInputTokens: number;
1068
2795
  name: string;
2796
+ maxInputTokens: number;
1069
2797
  supportedFileTypes: ("image" | "audio" | "pdf")[];
1070
2798
  default?: boolean | undefined;
1071
- supportedRouters?: ("vercel" | "in-built")[] | undefined;
1072
2799
  displayName?: string | undefined;
1073
2800
  pricing?: {
1074
2801
  inputPerM: number;
@@ -1080,18 +2807,16 @@ export declare const ProviderCatalogSchema: z.ZodObject<{
1080
2807
  } | undefined;
1081
2808
  }[];
1082
2809
  }, {
1083
- hasApiKey: boolean;
1084
2810
  name: string;
2811
+ hasApiKey: boolean;
1085
2812
  supportedFileTypes: ("image" | "audio" | "pdf")[];
1086
- supportedRouters: ("vercel" | "in-built")[];
1087
2813
  primaryEnvVar: string;
1088
2814
  supportsBaseURL: boolean;
1089
2815
  models: {
1090
- maxInputTokens: number;
1091
2816
  name: string;
2817
+ maxInputTokens: number;
1092
2818
  supportedFileTypes: ("image" | "audio" | "pdf")[];
1093
2819
  default?: boolean | undefined;
1094
- supportedRouters?: ("vercel" | "in-built")[] | undefined;
1095
2820
  displayName?: string | undefined;
1096
2821
  pricing?: {
1097
2822
  inputPerM: number;
@@ -1109,7 +2834,6 @@ export declare const ModelFlatSchema: z.ZodObject<{
1109
2834
  maxInputTokens: z.ZodNumber;
1110
2835
  default: z.ZodOptional<z.ZodBoolean>;
1111
2836
  supportedFileTypes: z.ZodArray<z.ZodEnum<["audio", "pdf", "image"]>, "many">;
1112
- supportedRouters: z.ZodOptional<z.ZodArray<z.ZodEnum<["vercel", "in-built"]>, "many">>;
1113
2837
  displayName: z.ZodOptional<z.ZodString>;
1114
2838
  pricing: z.ZodOptional<z.ZodObject<{
1115
2839
  inputPerM: z.ZodNumber;
@@ -1136,12 +2860,11 @@ export declare const ModelFlatSchema: z.ZodObject<{
1136
2860
  } & {
1137
2861
  provider: z.ZodString;
1138
2862
  }, "strict", z.ZodTypeAny, {
2863
+ name: string;
1139
2864
  provider: string;
1140
2865
  maxInputTokens: number;
1141
- name: string;
1142
2866
  supportedFileTypes: ("image" | "audio" | "pdf")[];
1143
2867
  default?: boolean | undefined;
1144
- supportedRouters?: ("vercel" | "in-built")[] | undefined;
1145
2868
  displayName?: string | undefined;
1146
2869
  pricing?: {
1147
2870
  inputPerM: number;
@@ -1152,12 +2875,11 @@ export declare const ModelFlatSchema: z.ZodObject<{
1152
2875
  unit?: "per_million_tokens" | undefined;
1153
2876
  } | undefined;
1154
2877
  }, {
2878
+ name: string;
1155
2879
  provider: string;
1156
2880
  maxInputTokens: number;
1157
- name: string;
1158
2881
  supportedFileTypes: ("image" | "audio" | "pdf")[];
1159
2882
  default?: boolean | undefined;
1160
- supportedRouters?: ("vercel" | "in-built")[] | undefined;
1161
2883
  displayName?: string | undefined;
1162
2884
  pricing?: {
1163
2885
  inputPerM: number;
@@ -1207,8 +2929,8 @@ export declare const ResourceSchema: z.ZodObject<{
1207
2929
  source: "mcp" | "internal";
1208
2930
  description?: string | undefined;
1209
2931
  mimeType?: string | undefined;
1210
- name?: string | undefined;
1211
2932
  metadata?: Record<string, unknown> | undefined;
2933
+ name?: string | undefined;
1212
2934
  serverName?: string | undefined;
1213
2935
  size?: number | undefined;
1214
2936
  lastModified?: string | undefined;
@@ -1217,8 +2939,8 @@ export declare const ResourceSchema: z.ZodObject<{
1217
2939
  source: "mcp" | "internal";
1218
2940
  description?: string | undefined;
1219
2941
  mimeType?: string | undefined;
1220
- name?: string | undefined;
1221
2942
  metadata?: Record<string, unknown> | undefined;
2943
+ name?: string | undefined;
1222
2944
  serverName?: string | undefined;
1223
2945
  size?: number | undefined;
1224
2946
  lastModified?: string | undefined;
@@ -1313,23 +3035,23 @@ export declare const PromptInfoSchema: z.ZodObject<{
1313
3035
  source: "config" | "custom" | "mcp";
1314
3036
  description?: string | undefined;
1315
3037
  title?: string | undefined;
3038
+ metadata?: Record<string, unknown> | undefined;
1316
3039
  arguments?: {
1317
3040
  name: string;
1318
3041
  description?: string | undefined;
1319
3042
  required?: boolean | undefined;
1320
3043
  }[] | undefined;
1321
- metadata?: Record<string, unknown> | undefined;
1322
3044
  }, {
1323
3045
  name: string;
1324
3046
  source: "config" | "custom" | "mcp";
1325
3047
  description?: string | undefined;
1326
3048
  title?: string | undefined;
3049
+ metadata?: Record<string, unknown> | undefined;
1327
3050
  arguments?: {
1328
3051
  name: string;
1329
3052
  description?: string | undefined;
1330
3053
  required?: boolean | undefined;
1331
3054
  }[] | undefined;
1332
- metadata?: Record<string, unknown> | undefined;
1333
3055
  }>;
1334
3056
  export type PromptInfo = z.output<typeof PromptInfoSchema>;
1335
3057
  export declare const PromptSchema: z.ZodObject<{