@brainpilot/protocol 0.0.1

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.
@@ -0,0 +1,756 @@
1
+ /**
2
+ * Domain object schemas + types. Ported from
3
+ * `packages/web/src/contracts/backend.ts`. These model the camelCase
4
+ * application shape (post-normalization), which is what backend.ts exposes to
5
+ * consumers. The wire is snake_case; normalization lives in the web package.
6
+ */
7
+ import { z } from "zod";
8
+ export declare const SessionSchema: z.ZodObject<{
9
+ id: z.ZodString;
10
+ title: z.ZodString;
11
+ createdAt: z.ZodString;
12
+ updatedAt: z.ZodString;
13
+ }, "strip", z.ZodTypeAny, {
14
+ id: string;
15
+ title: string;
16
+ createdAt: string;
17
+ updatedAt: string;
18
+ }, {
19
+ id: string;
20
+ title: string;
21
+ createdAt: string;
22
+ updatedAt: string;
23
+ }>;
24
+ export type Session = z.infer<typeof SessionSchema>;
25
+ /** §10 state authority enum. */
26
+ export declare const AgentStatusEnumSchema: z.ZodEnum<["idle", "running", "error", "stopped"]>;
27
+ export type AgentStatusEnum = z.infer<typeof AgentStatusEnumSchema>;
28
+ /**
29
+ * AgentStatus as exposed in SessionStateSnapshot.agents (backend.ts). `status`
30
+ * is kept open (string) for forward-compat with runtime values beyond the
31
+ * enum, but the canonical set is AgentStatusEnum.
32
+ */
33
+ export declare const AgentStatusSchema: z.ZodObject<{
34
+ name: z.ZodString;
35
+ status: z.ZodString;
36
+ task: z.ZodString;
37
+ updatedAt: z.ZodOptional<z.ZodString>;
38
+ alive: z.ZodOptional<z.ZodBoolean>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ status: string;
41
+ name: string;
42
+ task: string;
43
+ updatedAt?: string | undefined;
44
+ alive?: boolean | undefined;
45
+ }, {
46
+ status: string;
47
+ name: string;
48
+ task: string;
49
+ updatedAt?: string | undefined;
50
+ alive?: boolean | undefined;
51
+ }>;
52
+ export type AgentStatus = z.infer<typeof AgentStatusSchema>;
53
+ /**
54
+ * §10 `AgentState` — the Runtime-internal authoritative state shape (camelCase).
55
+ */
56
+ export declare const AgentStateSchema: z.ZodObject<{
57
+ name: z.ZodString;
58
+ status: z.ZodEnum<["idle", "running", "error", "stopped"]>;
59
+ activeRunId: z.ZodOptional<z.ZodString>;
60
+ activeToolExecutions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
61
+ lastError: z.ZodOptional<z.ZodObject<{
62
+ message: z.ZodString;
63
+ timestamp: z.ZodString;
64
+ consecutiveCount: z.ZodNumber;
65
+ }, "strip", z.ZodTypeAny, {
66
+ message: string;
67
+ timestamp: string;
68
+ consecutiveCount: number;
69
+ }, {
70
+ message: string;
71
+ timestamp: string;
72
+ consecutiveCount: number;
73
+ }>>;
74
+ }, "strip", z.ZodTypeAny, {
75
+ status: "idle" | "running" | "error" | "stopped";
76
+ name: string;
77
+ activeRunId?: string | undefined;
78
+ activeToolExecutions?: string[] | undefined;
79
+ lastError?: {
80
+ message: string;
81
+ timestamp: string;
82
+ consecutiveCount: number;
83
+ } | undefined;
84
+ }, {
85
+ status: "idle" | "running" | "error" | "stopped";
86
+ name: string;
87
+ activeRunId?: string | undefined;
88
+ activeToolExecutions?: string[] | undefined;
89
+ lastError?: {
90
+ message: string;
91
+ timestamp: string;
92
+ consecutiveCount: number;
93
+ } | undefined;
94
+ }>;
95
+ export type AgentState = z.infer<typeof AgentStateSchema>;
96
+ /**
97
+ * Authoritative live session state. Identical shape across SSE first frame
98
+ * (`CUSTOM:session_state`), push events, and `GET /sessions/:id/state`.
99
+ */
100
+ export declare const SessionStateSnapshotSchema: z.ZodObject<{
101
+ runState: z.ZodObject<{
102
+ active: z.ZodBoolean;
103
+ runId: z.ZodNullable<z.ZodString>;
104
+ }, "strip", z.ZodTypeAny, {
105
+ active: boolean;
106
+ runId: string | null;
107
+ }, {
108
+ active: boolean;
109
+ runId: string | null;
110
+ }>;
111
+ agents: z.ZodArray<z.ZodObject<{
112
+ name: z.ZodString;
113
+ status: z.ZodString;
114
+ task: z.ZodString;
115
+ updatedAt: z.ZodOptional<z.ZodString>;
116
+ alive: z.ZodOptional<z.ZodBoolean>;
117
+ }, "strip", z.ZodTypeAny, {
118
+ status: string;
119
+ name: string;
120
+ task: string;
121
+ updatedAt?: string | undefined;
122
+ alive?: boolean | undefined;
123
+ }, {
124
+ status: string;
125
+ name: string;
126
+ task: string;
127
+ updatedAt?: string | undefined;
128
+ alive?: boolean | undefined;
129
+ }>, "many">;
130
+ lastActivityTs: z.ZodString;
131
+ }, "strip", z.ZodTypeAny, {
132
+ runState: {
133
+ active: boolean;
134
+ runId: string | null;
135
+ };
136
+ agents: {
137
+ status: string;
138
+ name: string;
139
+ task: string;
140
+ updatedAt?: string | undefined;
141
+ alive?: boolean | undefined;
142
+ }[];
143
+ lastActivityTs: string;
144
+ }, {
145
+ runState: {
146
+ active: boolean;
147
+ runId: string | null;
148
+ };
149
+ agents: {
150
+ status: string;
151
+ name: string;
152
+ task: string;
153
+ updatedAt?: string | undefined;
154
+ alive?: boolean | undefined;
155
+ }[];
156
+ lastActivityTs: string;
157
+ }>;
158
+ export type SessionStateSnapshot = z.infer<typeof SessionStateSnapshotSchema>;
159
+ export declare const TraceNodeStatusSchema: z.ZodUnion<[z.ZodEnum<["pending", "running", "completed", "error"]>, z.ZodString]>;
160
+ export type TraceNodeStatus = z.infer<typeof TraceNodeStatusSchema>;
161
+ export declare const TraceParentSchema: z.ZodObject<{
162
+ id: z.ZodString;
163
+ relation: z.ZodOptional<z.ZodString>;
164
+ explanation: z.ZodOptional<z.ZodString>;
165
+ edgeType: z.ZodOptional<z.ZodString>;
166
+ }, "strip", z.ZodTypeAny, {
167
+ id: string;
168
+ relation?: string | undefined;
169
+ explanation?: string | undefined;
170
+ edgeType?: string | undefined;
171
+ }, {
172
+ id: string;
173
+ relation?: string | undefined;
174
+ explanation?: string | undefined;
175
+ edgeType?: string | undefined;
176
+ }>;
177
+ export type TraceParent = z.infer<typeof TraceParentSchema>;
178
+ export declare const TraceArtifactSchema: z.ZodObject<{
179
+ path: z.ZodString;
180
+ type: z.ZodOptional<z.ZodString>;
181
+ }, "strip", z.ZodTypeAny, {
182
+ path: string;
183
+ type?: string | undefined;
184
+ }, {
185
+ path: string;
186
+ type?: string | undefined;
187
+ }>;
188
+ export type TraceArtifact = z.infer<typeof TraceArtifactSchema>;
189
+ export declare const TraceTimestampSchema: z.ZodObject<{
190
+ createdAt: z.ZodOptional<z.ZodString>;
191
+ startedAt: z.ZodOptional<z.ZodString>;
192
+ completedAt: z.ZodOptional<z.ZodString>;
193
+ }, "strip", z.ZodTypeAny, {
194
+ createdAt?: string | undefined;
195
+ startedAt?: string | undefined;
196
+ completedAt?: string | undefined;
197
+ }, {
198
+ createdAt?: string | undefined;
199
+ startedAt?: string | undefined;
200
+ completedAt?: string | undefined;
201
+ }>;
202
+ export type TraceTimestamp = z.infer<typeof TraceTimestampSchema>;
203
+ export declare const TraceNodeSchema: z.ZodObject<{
204
+ id: z.ZodString;
205
+ title: z.ZodString;
206
+ type: z.ZodString;
207
+ nodeType: z.ZodOptional<z.ZodString>;
208
+ status: z.ZodUnion<[z.ZodEnum<["pending", "running", "completed", "error"]>, z.ZodString]>;
209
+ agent: z.ZodOptional<z.ZodString>;
210
+ description: z.ZodOptional<z.ZodString>;
211
+ summary: z.ZodOptional<z.ZodString>;
212
+ content: z.ZodOptional<z.ZodString>;
213
+ reason: z.ZodOptional<z.ZodString>;
214
+ context: z.ZodOptional<z.ZodString>;
215
+ parents: z.ZodArray<z.ZodObject<{
216
+ id: z.ZodString;
217
+ relation: z.ZodOptional<z.ZodString>;
218
+ explanation: z.ZodOptional<z.ZodString>;
219
+ edgeType: z.ZodOptional<z.ZodString>;
220
+ }, "strip", z.ZodTypeAny, {
221
+ id: string;
222
+ relation?: string | undefined;
223
+ explanation?: string | undefined;
224
+ edgeType?: string | undefined;
225
+ }, {
226
+ id: string;
227
+ relation?: string | undefined;
228
+ explanation?: string | undefined;
229
+ edgeType?: string | undefined;
230
+ }>, "many">;
231
+ artifacts: z.ZodArray<z.ZodObject<{
232
+ path: z.ZodString;
233
+ type: z.ZodOptional<z.ZodString>;
234
+ }, "strip", z.ZodTypeAny, {
235
+ path: string;
236
+ type?: string | undefined;
237
+ }, {
238
+ path: string;
239
+ type?: string | undefined;
240
+ }>, "many">;
241
+ parentIds: z.ZodArray<z.ZodString, "many">;
242
+ childIds: z.ZodArray<z.ZodString, "many">;
243
+ createdAt: z.ZodOptional<z.ZodString>;
244
+ updatedAt: z.ZodOptional<z.ZodString>;
245
+ timestamp: z.ZodOptional<z.ZodObject<{
246
+ createdAt: z.ZodOptional<z.ZodString>;
247
+ startedAt: z.ZodOptional<z.ZodString>;
248
+ completedAt: z.ZodOptional<z.ZodString>;
249
+ }, "strip", z.ZodTypeAny, {
250
+ createdAt?: string | undefined;
251
+ startedAt?: string | undefined;
252
+ completedAt?: string | undefined;
253
+ }, {
254
+ createdAt?: string | undefined;
255
+ startedAt?: string | undefined;
256
+ completedAt?: string | undefined;
257
+ }>>;
258
+ durationMs: z.ZodOptional<z.ZodNumber>;
259
+ errorMessage: z.ZodOptional<z.ZodString>;
260
+ toolCalls: z.ZodArray<z.ZodString, "many">;
261
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
262
+ }, "strip", z.ZodTypeAny, {
263
+ id: string;
264
+ title: string;
265
+ type: string;
266
+ status: string;
267
+ parents: {
268
+ id: string;
269
+ relation?: string | undefined;
270
+ explanation?: string | undefined;
271
+ edgeType?: string | undefined;
272
+ }[];
273
+ artifacts: {
274
+ path: string;
275
+ type?: string | undefined;
276
+ }[];
277
+ parentIds: string[];
278
+ childIds: string[];
279
+ toolCalls: string[];
280
+ createdAt?: string | undefined;
281
+ updatedAt?: string | undefined;
282
+ timestamp?: {
283
+ createdAt?: string | undefined;
284
+ startedAt?: string | undefined;
285
+ completedAt?: string | undefined;
286
+ } | undefined;
287
+ nodeType?: string | undefined;
288
+ agent?: string | undefined;
289
+ description?: string | undefined;
290
+ summary?: string | undefined;
291
+ content?: string | undefined;
292
+ reason?: string | undefined;
293
+ context?: string | undefined;
294
+ durationMs?: number | undefined;
295
+ errorMessage?: string | undefined;
296
+ metadata?: Record<string, unknown> | undefined;
297
+ }, {
298
+ id: string;
299
+ title: string;
300
+ type: string;
301
+ status: string;
302
+ parents: {
303
+ id: string;
304
+ relation?: string | undefined;
305
+ explanation?: string | undefined;
306
+ edgeType?: string | undefined;
307
+ }[];
308
+ artifacts: {
309
+ path: string;
310
+ type?: string | undefined;
311
+ }[];
312
+ parentIds: string[];
313
+ childIds: string[];
314
+ toolCalls: string[];
315
+ createdAt?: string | undefined;
316
+ updatedAt?: string | undefined;
317
+ timestamp?: {
318
+ createdAt?: string | undefined;
319
+ startedAt?: string | undefined;
320
+ completedAt?: string | undefined;
321
+ } | undefined;
322
+ nodeType?: string | undefined;
323
+ agent?: string | undefined;
324
+ description?: string | undefined;
325
+ summary?: string | undefined;
326
+ content?: string | undefined;
327
+ reason?: string | undefined;
328
+ context?: string | undefined;
329
+ durationMs?: number | undefined;
330
+ errorMessage?: string | undefined;
331
+ metadata?: Record<string, unknown> | undefined;
332
+ }>;
333
+ export type TraceNode = z.infer<typeof TraceNodeSchema>;
334
+ export declare const TraceGraphSchema: z.ZodObject<{
335
+ meta: z.ZodObject<{
336
+ sessionId: z.ZodString;
337
+ userId: z.ZodOptional<z.ZodString>;
338
+ projectName: z.ZodOptional<z.ZodString>;
339
+ currentFocus: z.ZodOptional<z.ZodString>;
340
+ createdAt: z.ZodOptional<z.ZodString>;
341
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
342
+ sessionId: z.ZodString;
343
+ userId: z.ZodOptional<z.ZodString>;
344
+ projectName: z.ZodOptional<z.ZodString>;
345
+ currentFocus: z.ZodOptional<z.ZodString>;
346
+ createdAt: z.ZodOptional<z.ZodString>;
347
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
348
+ sessionId: z.ZodString;
349
+ userId: z.ZodOptional<z.ZodString>;
350
+ projectName: z.ZodOptional<z.ZodString>;
351
+ currentFocus: z.ZodOptional<z.ZodString>;
352
+ createdAt: z.ZodOptional<z.ZodString>;
353
+ }, z.ZodTypeAny, "passthrough">>;
354
+ nodes: z.ZodArray<z.ZodObject<{
355
+ id: z.ZodString;
356
+ title: z.ZodString;
357
+ type: z.ZodString;
358
+ nodeType: z.ZodOptional<z.ZodString>;
359
+ status: z.ZodUnion<[z.ZodEnum<["pending", "running", "completed", "error"]>, z.ZodString]>;
360
+ agent: z.ZodOptional<z.ZodString>;
361
+ description: z.ZodOptional<z.ZodString>;
362
+ summary: z.ZodOptional<z.ZodString>;
363
+ content: z.ZodOptional<z.ZodString>;
364
+ reason: z.ZodOptional<z.ZodString>;
365
+ context: z.ZodOptional<z.ZodString>;
366
+ parents: z.ZodArray<z.ZodObject<{
367
+ id: z.ZodString;
368
+ relation: z.ZodOptional<z.ZodString>;
369
+ explanation: z.ZodOptional<z.ZodString>;
370
+ edgeType: z.ZodOptional<z.ZodString>;
371
+ }, "strip", z.ZodTypeAny, {
372
+ id: string;
373
+ relation?: string | undefined;
374
+ explanation?: string | undefined;
375
+ edgeType?: string | undefined;
376
+ }, {
377
+ id: string;
378
+ relation?: string | undefined;
379
+ explanation?: string | undefined;
380
+ edgeType?: string | undefined;
381
+ }>, "many">;
382
+ artifacts: z.ZodArray<z.ZodObject<{
383
+ path: z.ZodString;
384
+ type: z.ZodOptional<z.ZodString>;
385
+ }, "strip", z.ZodTypeAny, {
386
+ path: string;
387
+ type?: string | undefined;
388
+ }, {
389
+ path: string;
390
+ type?: string | undefined;
391
+ }>, "many">;
392
+ parentIds: z.ZodArray<z.ZodString, "many">;
393
+ childIds: z.ZodArray<z.ZodString, "many">;
394
+ createdAt: z.ZodOptional<z.ZodString>;
395
+ updatedAt: z.ZodOptional<z.ZodString>;
396
+ timestamp: z.ZodOptional<z.ZodObject<{
397
+ createdAt: z.ZodOptional<z.ZodString>;
398
+ startedAt: z.ZodOptional<z.ZodString>;
399
+ completedAt: z.ZodOptional<z.ZodString>;
400
+ }, "strip", z.ZodTypeAny, {
401
+ createdAt?: string | undefined;
402
+ startedAt?: string | undefined;
403
+ completedAt?: string | undefined;
404
+ }, {
405
+ createdAt?: string | undefined;
406
+ startedAt?: string | undefined;
407
+ completedAt?: string | undefined;
408
+ }>>;
409
+ durationMs: z.ZodOptional<z.ZodNumber>;
410
+ errorMessage: z.ZodOptional<z.ZodString>;
411
+ toolCalls: z.ZodArray<z.ZodString, "many">;
412
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
413
+ }, "strip", z.ZodTypeAny, {
414
+ id: string;
415
+ title: string;
416
+ type: string;
417
+ status: string;
418
+ parents: {
419
+ id: string;
420
+ relation?: string | undefined;
421
+ explanation?: string | undefined;
422
+ edgeType?: string | undefined;
423
+ }[];
424
+ artifacts: {
425
+ path: string;
426
+ type?: string | undefined;
427
+ }[];
428
+ parentIds: string[];
429
+ childIds: string[];
430
+ toolCalls: string[];
431
+ createdAt?: string | undefined;
432
+ updatedAt?: string | undefined;
433
+ timestamp?: {
434
+ createdAt?: string | undefined;
435
+ startedAt?: string | undefined;
436
+ completedAt?: string | undefined;
437
+ } | undefined;
438
+ nodeType?: string | undefined;
439
+ agent?: string | undefined;
440
+ description?: string | undefined;
441
+ summary?: string | undefined;
442
+ content?: string | undefined;
443
+ reason?: string | undefined;
444
+ context?: string | undefined;
445
+ durationMs?: number | undefined;
446
+ errorMessage?: string | undefined;
447
+ metadata?: Record<string, unknown> | undefined;
448
+ }, {
449
+ id: string;
450
+ title: string;
451
+ type: string;
452
+ status: string;
453
+ parents: {
454
+ id: string;
455
+ relation?: string | undefined;
456
+ explanation?: string | undefined;
457
+ edgeType?: string | undefined;
458
+ }[];
459
+ artifacts: {
460
+ path: string;
461
+ type?: string | undefined;
462
+ }[];
463
+ parentIds: string[];
464
+ childIds: string[];
465
+ toolCalls: string[];
466
+ createdAt?: string | undefined;
467
+ updatedAt?: string | undefined;
468
+ timestamp?: {
469
+ createdAt?: string | undefined;
470
+ startedAt?: string | undefined;
471
+ completedAt?: string | undefined;
472
+ } | undefined;
473
+ nodeType?: string | undefined;
474
+ agent?: string | undefined;
475
+ description?: string | undefined;
476
+ summary?: string | undefined;
477
+ content?: string | undefined;
478
+ reason?: string | undefined;
479
+ context?: string | undefined;
480
+ durationMs?: number | undefined;
481
+ errorMessage?: string | undefined;
482
+ metadata?: Record<string, unknown> | undefined;
483
+ }>, "many">;
484
+ }, "strip", z.ZodTypeAny, {
485
+ meta: {
486
+ sessionId: string;
487
+ createdAt?: string | undefined;
488
+ userId?: string | undefined;
489
+ projectName?: string | undefined;
490
+ currentFocus?: string | undefined;
491
+ } & {
492
+ [k: string]: unknown;
493
+ };
494
+ nodes: {
495
+ id: string;
496
+ title: string;
497
+ type: string;
498
+ status: string;
499
+ parents: {
500
+ id: string;
501
+ relation?: string | undefined;
502
+ explanation?: string | undefined;
503
+ edgeType?: string | undefined;
504
+ }[];
505
+ artifacts: {
506
+ path: string;
507
+ type?: string | undefined;
508
+ }[];
509
+ parentIds: string[];
510
+ childIds: string[];
511
+ toolCalls: string[];
512
+ createdAt?: string | undefined;
513
+ updatedAt?: string | undefined;
514
+ timestamp?: {
515
+ createdAt?: string | undefined;
516
+ startedAt?: string | undefined;
517
+ completedAt?: string | undefined;
518
+ } | undefined;
519
+ nodeType?: string | undefined;
520
+ agent?: string | undefined;
521
+ description?: string | undefined;
522
+ summary?: string | undefined;
523
+ content?: string | undefined;
524
+ reason?: string | undefined;
525
+ context?: string | undefined;
526
+ durationMs?: number | undefined;
527
+ errorMessage?: string | undefined;
528
+ metadata?: Record<string, unknown> | undefined;
529
+ }[];
530
+ }, {
531
+ meta: {
532
+ sessionId: string;
533
+ createdAt?: string | undefined;
534
+ userId?: string | undefined;
535
+ projectName?: string | undefined;
536
+ currentFocus?: string | undefined;
537
+ } & {
538
+ [k: string]: unknown;
539
+ };
540
+ nodes: {
541
+ id: string;
542
+ title: string;
543
+ type: string;
544
+ status: string;
545
+ parents: {
546
+ id: string;
547
+ relation?: string | undefined;
548
+ explanation?: string | undefined;
549
+ edgeType?: string | undefined;
550
+ }[];
551
+ artifacts: {
552
+ path: string;
553
+ type?: string | undefined;
554
+ }[];
555
+ parentIds: string[];
556
+ childIds: string[];
557
+ toolCalls: string[];
558
+ createdAt?: string | undefined;
559
+ updatedAt?: string | undefined;
560
+ timestamp?: {
561
+ createdAt?: string | undefined;
562
+ startedAt?: string | undefined;
563
+ completedAt?: string | undefined;
564
+ } | undefined;
565
+ nodeType?: string | undefined;
566
+ agent?: string | undefined;
567
+ description?: string | undefined;
568
+ summary?: string | undefined;
569
+ content?: string | undefined;
570
+ reason?: string | undefined;
571
+ context?: string | undefined;
572
+ durationMs?: number | undefined;
573
+ errorMessage?: string | undefined;
574
+ metadata?: Record<string, unknown> | undefined;
575
+ }[];
576
+ }>;
577
+ export type TraceGraph = z.infer<typeof TraceGraphSchema>;
578
+ export declare const SettingsDataSchema: z.ZodObject<{
579
+ model: z.ZodString;
580
+ apiKey: z.ZodString;
581
+ baseUrl: z.ZodString;
582
+ }, "strip", z.ZodTypeAny, {
583
+ model: string;
584
+ apiKey: string;
585
+ baseUrl: string;
586
+ }, {
587
+ model: string;
588
+ apiKey: string;
589
+ baseUrl: string;
590
+ }>;
591
+ export type SettingsData = z.infer<typeof SettingsDataSchema>;
592
+ export declare const McpServerEntrySchema: z.ZodObject<{
593
+ name: z.ZodString;
594
+ type: z.ZodEnum<["stdio", "http", "sse"]>;
595
+ command: z.ZodOptional<z.ZodString>;
596
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
597
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
598
+ url: z.ZodOptional<z.ZodString>;
599
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
600
+ timeout: z.ZodOptional<z.ZodNumber>;
601
+ }, "strip", z.ZodTypeAny, {
602
+ type: "stdio" | "http" | "sse";
603
+ name: string;
604
+ command?: string | undefined;
605
+ args?: string[] | undefined;
606
+ url?: string | undefined;
607
+ env?: Record<string, string> | undefined;
608
+ headers?: Record<string, string> | undefined;
609
+ timeout?: number | undefined;
610
+ }, {
611
+ type: "stdio" | "http" | "sse";
612
+ name: string;
613
+ command?: string | undefined;
614
+ args?: string[] | undefined;
615
+ url?: string | undefined;
616
+ env?: Record<string, string> | undefined;
617
+ headers?: Record<string, string> | undefined;
618
+ timeout?: number | undefined;
619
+ }>;
620
+ export type McpServerEntry = z.infer<typeof McpServerEntrySchema>;
621
+ export declare const HealthStatusSchema: z.ZodEnum<["healthy", "degraded", "unavailable", "unknown"]>;
622
+ export type HealthStatus = z.infer<typeof HealthStatusSchema>;
623
+ export declare const ModelHealthSchema: z.ZodObject<{
624
+ model: z.ZodString;
625
+ status: z.ZodEnum<["healthy", "degraded", "unavailable", "unknown"]>;
626
+ latencyMs: z.ZodOptional<z.ZodNumber>;
627
+ checkedAt: z.ZodOptional<z.ZodNumber>;
628
+ error: z.ZodOptional<z.ZodString>;
629
+ }, "strip", z.ZodTypeAny, {
630
+ status: "unknown" | "healthy" | "degraded" | "unavailable";
631
+ model: string;
632
+ error?: string | undefined;
633
+ latencyMs?: number | undefined;
634
+ checkedAt?: number | undefined;
635
+ }, {
636
+ status: "unknown" | "healthy" | "degraded" | "unavailable";
637
+ model: string;
638
+ error?: string | undefined;
639
+ latencyMs?: number | undefined;
640
+ checkedAt?: number | undefined;
641
+ }>;
642
+ export type ModelHealth = z.infer<typeof ModelHealthSchema>;
643
+ export declare const ProviderProfileSchema: z.ZodObject<{
644
+ id: z.ZodString;
645
+ name: z.ZodString;
646
+ baseUrl: z.ZodString;
647
+ models: z.ZodArray<z.ZodString, "many">;
648
+ icon: z.ZodString;
649
+ iconColor: z.ZodString;
650
+ notes: z.ZodString;
651
+ isActive: z.ZodBoolean;
652
+ apiKeyMasked: z.ZodString;
653
+ createdAt: z.ZodNumber;
654
+ updatedAt: z.ZodNumber;
655
+ healthStatus: z.ZodEnum<["healthy", "degraded", "unavailable", "unknown"]>;
656
+ healthCheckedAt: z.ZodOptional<z.ZodNumber>;
657
+ modelHealth: z.ZodArray<z.ZodObject<{
658
+ model: z.ZodString;
659
+ status: z.ZodEnum<["healthy", "degraded", "unavailable", "unknown"]>;
660
+ latencyMs: z.ZodOptional<z.ZodNumber>;
661
+ checkedAt: z.ZodOptional<z.ZodNumber>;
662
+ error: z.ZodOptional<z.ZodString>;
663
+ }, "strip", z.ZodTypeAny, {
664
+ status: "unknown" | "healthy" | "degraded" | "unavailable";
665
+ model: string;
666
+ error?: string | undefined;
667
+ latencyMs?: number | undefined;
668
+ checkedAt?: number | undefined;
669
+ }, {
670
+ status: "unknown" | "healthy" | "degraded" | "unavailable";
671
+ model: string;
672
+ error?: string | undefined;
673
+ latencyMs?: number | undefined;
674
+ checkedAt?: number | undefined;
675
+ }>, "many">;
676
+ }, "strip", z.ZodTypeAny, {
677
+ id: string;
678
+ createdAt: number;
679
+ updatedAt: number;
680
+ name: string;
681
+ baseUrl: string;
682
+ models: string[];
683
+ icon: string;
684
+ iconColor: string;
685
+ notes: string;
686
+ isActive: boolean;
687
+ apiKeyMasked: string;
688
+ healthStatus: "unknown" | "healthy" | "degraded" | "unavailable";
689
+ modelHealth: {
690
+ status: "unknown" | "healthy" | "degraded" | "unavailable";
691
+ model: string;
692
+ error?: string | undefined;
693
+ latencyMs?: number | undefined;
694
+ checkedAt?: number | undefined;
695
+ }[];
696
+ healthCheckedAt?: number | undefined;
697
+ }, {
698
+ id: string;
699
+ createdAt: number;
700
+ updatedAt: number;
701
+ name: string;
702
+ baseUrl: string;
703
+ models: string[];
704
+ icon: string;
705
+ iconColor: string;
706
+ notes: string;
707
+ isActive: boolean;
708
+ apiKeyMasked: string;
709
+ healthStatus: "unknown" | "healthy" | "degraded" | "unavailable";
710
+ modelHealth: {
711
+ status: "unknown" | "healthy" | "degraded" | "unavailable";
712
+ model: string;
713
+ error?: string | undefined;
714
+ latencyMs?: number | undefined;
715
+ checkedAt?: number | undefined;
716
+ }[];
717
+ healthCheckedAt?: number | undefined;
718
+ }>;
719
+ export type ProviderProfile = z.infer<typeof ProviderProfileSchema>;
720
+ export declare const FileEntrySchema: z.ZodObject<{
721
+ name: z.ZodString;
722
+ type: z.ZodEnum<["file", "folder", "symlink"]>;
723
+ size: z.ZodNumber;
724
+ modified: z.ZodNumber;
725
+ permissions: z.ZodString;
726
+ }, "strip", z.ZodTypeAny, {
727
+ type: "file" | "folder" | "symlink";
728
+ name: string;
729
+ size: number;
730
+ modified: number;
731
+ permissions: string;
732
+ }, {
733
+ type: "file" | "folder" | "symlink";
734
+ name: string;
735
+ size: number;
736
+ modified: number;
737
+ permissions: string;
738
+ }>;
739
+ export type FileEntry = z.infer<typeof FileEntrySchema>;
740
+ export declare const FileContentSchema: z.ZodObject<{
741
+ path: z.ZodString;
742
+ content: z.ZodString;
743
+ size: z.ZodNumber;
744
+ }, "strip", z.ZodTypeAny, {
745
+ path: string;
746
+ content: string;
747
+ size: number;
748
+ }, {
749
+ path: string;
750
+ content: string;
751
+ size: number;
752
+ }>;
753
+ export type FileContent = z.infer<typeof FileContentSchema>;
754
+ export declare const UserRoleSchema: z.ZodEnum<["admin", "user"]>;
755
+ export type UserRole = z.infer<typeof UserRoleSchema>;
756
+ //# sourceMappingURL=domain.d.ts.map