@mcpolyglot/config 0.0.2

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,1124 @@
1
+ import { z } from 'zod';
2
+ declare const SqlSourceSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ kind: z.ZodEnum<["postgres", "mysql", "mariadb", "sqlite"]>;
5
+ url: z.ZodString;
6
+ scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<["schema:read", "tables:read", "tables:write", "query:raw", "http:call"]>, "many">>;
7
+ perEntityTools: z.ZodDefault<z.ZodObject<{
8
+ enabled: z.ZodDefault<z.ZodBoolean>;
9
+ include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ enabled: boolean;
13
+ include?: string[] | undefined;
14
+ exclude?: string[] | undefined;
15
+ }, {
16
+ enabled?: boolean | undefined;
17
+ include?: string[] | undefined;
18
+ exclude?: string[] | undefined;
19
+ }>>;
20
+ limits: z.ZodDefault<z.ZodObject<{
21
+ rowCap: z.ZodDefault<z.ZodNumber>;
22
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
23
+ maxBytes: z.ZodDefault<z.ZodNumber>;
24
+ }, "strip", z.ZodTypeAny, {
25
+ rowCap: number;
26
+ timeoutMs: number;
27
+ maxBytes: number;
28
+ }, {
29
+ rowCap?: number | undefined;
30
+ timeoutMs?: number | undefined;
31
+ maxBytes?: number | undefined;
32
+ }>>;
33
+ redact: z.ZodDefault<z.ZodObject<{
34
+ columns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
35
+ patterns: z.ZodDefault<z.ZodArray<z.ZodObject<{
36
+ name: z.ZodString;
37
+ regex: z.ZodString;
38
+ replacement: z.ZodOptional<z.ZodString>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ name: string;
41
+ regex: string;
42
+ replacement?: string | undefined;
43
+ }, {
44
+ name: string;
45
+ regex: string;
46
+ replacement?: string | undefined;
47
+ }>, "many">>;
48
+ }, "strip", z.ZodTypeAny, {
49
+ columns: string[];
50
+ patterns: {
51
+ name: string;
52
+ regex: string;
53
+ replacement?: string | undefined;
54
+ }[];
55
+ }, {
56
+ columns?: string[] | undefined;
57
+ patterns?: {
58
+ name: string;
59
+ regex: string;
60
+ replacement?: string | undefined;
61
+ }[] | undefined;
62
+ }>>;
63
+ }, "strip", z.ZodTypeAny, {
64
+ id: string;
65
+ kind: "postgres" | "mysql" | "mariadb" | "sqlite";
66
+ url: string;
67
+ scopes: ("schema:read" | "tables:read" | "tables:write" | "query:raw" | "http:call")[];
68
+ perEntityTools: {
69
+ enabled: boolean;
70
+ include?: string[] | undefined;
71
+ exclude?: string[] | undefined;
72
+ };
73
+ limits: {
74
+ rowCap: number;
75
+ timeoutMs: number;
76
+ maxBytes: number;
77
+ };
78
+ redact: {
79
+ columns: string[];
80
+ patterns: {
81
+ name: string;
82
+ regex: string;
83
+ replacement?: string | undefined;
84
+ }[];
85
+ };
86
+ }, {
87
+ id: string;
88
+ kind: "postgres" | "mysql" | "mariadb" | "sqlite";
89
+ url: string;
90
+ scopes?: ("schema:read" | "tables:read" | "tables:write" | "query:raw" | "http:call")[] | undefined;
91
+ perEntityTools?: {
92
+ enabled?: boolean | undefined;
93
+ include?: string[] | undefined;
94
+ exclude?: string[] | undefined;
95
+ } | undefined;
96
+ limits?: {
97
+ rowCap?: number | undefined;
98
+ timeoutMs?: number | undefined;
99
+ maxBytes?: number | undefined;
100
+ } | undefined;
101
+ redact?: {
102
+ columns?: string[] | undefined;
103
+ patterns?: {
104
+ name: string;
105
+ regex: string;
106
+ replacement?: string | undefined;
107
+ }[] | undefined;
108
+ } | undefined;
109
+ }>;
110
+ declare const MongoSourceSchema: z.ZodObject<{
111
+ id: z.ZodString;
112
+ kind: z.ZodLiteral<"mongo">;
113
+ url: z.ZodString;
114
+ database: z.ZodOptional<z.ZodString>;
115
+ scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<["schema:read", "tables:read", "tables:write", "query:raw", "http:call"]>, "many">>;
116
+ limits: z.ZodDefault<z.ZodObject<{
117
+ rowCap: z.ZodDefault<z.ZodNumber>;
118
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
119
+ maxBytes: z.ZodDefault<z.ZodNumber>;
120
+ }, "strip", z.ZodTypeAny, {
121
+ rowCap: number;
122
+ timeoutMs: number;
123
+ maxBytes: number;
124
+ }, {
125
+ rowCap?: number | undefined;
126
+ timeoutMs?: number | undefined;
127
+ maxBytes?: number | undefined;
128
+ }>>;
129
+ redact: z.ZodDefault<z.ZodObject<{
130
+ columns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
131
+ patterns: z.ZodDefault<z.ZodArray<z.ZodObject<{
132
+ name: z.ZodString;
133
+ regex: z.ZodString;
134
+ replacement: z.ZodOptional<z.ZodString>;
135
+ }, "strip", z.ZodTypeAny, {
136
+ name: string;
137
+ regex: string;
138
+ replacement?: string | undefined;
139
+ }, {
140
+ name: string;
141
+ regex: string;
142
+ replacement?: string | undefined;
143
+ }>, "many">>;
144
+ }, "strip", z.ZodTypeAny, {
145
+ columns: string[];
146
+ patterns: {
147
+ name: string;
148
+ regex: string;
149
+ replacement?: string | undefined;
150
+ }[];
151
+ }, {
152
+ columns?: string[] | undefined;
153
+ patterns?: {
154
+ name: string;
155
+ regex: string;
156
+ replacement?: string | undefined;
157
+ }[] | undefined;
158
+ }>>;
159
+ }, "strip", z.ZodTypeAny, {
160
+ id: string;
161
+ kind: "mongo";
162
+ url: string;
163
+ scopes: ("schema:read" | "tables:read" | "tables:write" | "query:raw" | "http:call")[];
164
+ limits: {
165
+ rowCap: number;
166
+ timeoutMs: number;
167
+ maxBytes: number;
168
+ };
169
+ redact: {
170
+ columns: string[];
171
+ patterns: {
172
+ name: string;
173
+ regex: string;
174
+ replacement?: string | undefined;
175
+ }[];
176
+ };
177
+ database?: string | undefined;
178
+ }, {
179
+ id: string;
180
+ kind: "mongo";
181
+ url: string;
182
+ scopes?: ("schema:read" | "tables:read" | "tables:write" | "query:raw" | "http:call")[] | undefined;
183
+ limits?: {
184
+ rowCap?: number | undefined;
185
+ timeoutMs?: number | undefined;
186
+ maxBytes?: number | undefined;
187
+ } | undefined;
188
+ redact?: {
189
+ columns?: string[] | undefined;
190
+ patterns?: {
191
+ name: string;
192
+ regex: string;
193
+ replacement?: string | undefined;
194
+ }[] | undefined;
195
+ } | undefined;
196
+ database?: string | undefined;
197
+ }>;
198
+ declare const OpenApiSourceSchema: z.ZodObject<{
199
+ id: z.ZodString;
200
+ kind: z.ZodLiteral<"openapi">;
201
+ spec: z.ZodString;
202
+ baseUrl: z.ZodString;
203
+ auth: z.ZodDefault<z.ZodUnion<[z.ZodObject<{
204
+ type: z.ZodLiteral<"none">;
205
+ }, "strip", z.ZodTypeAny, {
206
+ type: "none";
207
+ }, {
208
+ type: "none";
209
+ }>, z.ZodObject<{
210
+ type: z.ZodLiteral<"bearer">;
211
+ token: z.ZodString;
212
+ }, "strip", z.ZodTypeAny, {
213
+ type: "bearer";
214
+ token: string;
215
+ }, {
216
+ type: "bearer";
217
+ token: string;
218
+ }>, z.ZodObject<{
219
+ type: z.ZodLiteral<"apiKey">;
220
+ header: z.ZodString;
221
+ value: z.ZodString;
222
+ }, "strip", z.ZodTypeAny, {
223
+ value: string;
224
+ type: "apiKey";
225
+ header: string;
226
+ }, {
227
+ value: string;
228
+ type: "apiKey";
229
+ header: string;
230
+ }>, z.ZodObject<{
231
+ type: z.ZodLiteral<"basic">;
232
+ username: z.ZodString;
233
+ password: z.ZodString;
234
+ }, "strip", z.ZodTypeAny, {
235
+ type: "basic";
236
+ username: string;
237
+ password: string;
238
+ }, {
239
+ type: "basic";
240
+ username: string;
241
+ password: string;
242
+ }>]>>;
243
+ allowMethods: z.ZodDefault<z.ZodArray<z.ZodEnum<["GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH", "DELETE"]>, "many">>;
244
+ scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<["schema:read", "tables:read", "tables:write", "query:raw", "http:call"]>, "many">>;
245
+ limits: z.ZodDefault<z.ZodObject<{
246
+ rowCap: z.ZodDefault<z.ZodNumber>;
247
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
248
+ maxBytes: z.ZodDefault<z.ZodNumber>;
249
+ }, "strip", z.ZodTypeAny, {
250
+ rowCap: number;
251
+ timeoutMs: number;
252
+ maxBytes: number;
253
+ }, {
254
+ rowCap?: number | undefined;
255
+ timeoutMs?: number | undefined;
256
+ maxBytes?: number | undefined;
257
+ }>>;
258
+ redact: z.ZodDefault<z.ZodObject<{
259
+ columns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
260
+ patterns: z.ZodDefault<z.ZodArray<z.ZodObject<{
261
+ name: z.ZodString;
262
+ regex: z.ZodString;
263
+ replacement: z.ZodOptional<z.ZodString>;
264
+ }, "strip", z.ZodTypeAny, {
265
+ name: string;
266
+ regex: string;
267
+ replacement?: string | undefined;
268
+ }, {
269
+ name: string;
270
+ regex: string;
271
+ replacement?: string | undefined;
272
+ }>, "many">>;
273
+ }, "strip", z.ZodTypeAny, {
274
+ columns: string[];
275
+ patterns: {
276
+ name: string;
277
+ regex: string;
278
+ replacement?: string | undefined;
279
+ }[];
280
+ }, {
281
+ columns?: string[] | undefined;
282
+ patterns?: {
283
+ name: string;
284
+ regex: string;
285
+ replacement?: string | undefined;
286
+ }[] | undefined;
287
+ }>>;
288
+ }, "strip", z.ZodTypeAny, {
289
+ id: string;
290
+ kind: "openapi";
291
+ scopes: ("schema:read" | "tables:read" | "tables:write" | "query:raw" | "http:call")[];
292
+ limits: {
293
+ rowCap: number;
294
+ timeoutMs: number;
295
+ maxBytes: number;
296
+ };
297
+ redact: {
298
+ columns: string[];
299
+ patterns: {
300
+ name: string;
301
+ regex: string;
302
+ replacement?: string | undefined;
303
+ }[];
304
+ };
305
+ spec: string;
306
+ baseUrl: string;
307
+ auth: {
308
+ type: "none";
309
+ } | {
310
+ type: "bearer";
311
+ token: string;
312
+ } | {
313
+ value: string;
314
+ type: "apiKey";
315
+ header: string;
316
+ } | {
317
+ type: "basic";
318
+ username: string;
319
+ password: string;
320
+ };
321
+ allowMethods: ("GET" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH" | "DELETE")[];
322
+ }, {
323
+ id: string;
324
+ kind: "openapi";
325
+ spec: string;
326
+ baseUrl: string;
327
+ scopes?: ("schema:read" | "tables:read" | "tables:write" | "query:raw" | "http:call")[] | undefined;
328
+ limits?: {
329
+ rowCap?: number | undefined;
330
+ timeoutMs?: number | undefined;
331
+ maxBytes?: number | undefined;
332
+ } | undefined;
333
+ redact?: {
334
+ columns?: string[] | undefined;
335
+ patterns?: {
336
+ name: string;
337
+ regex: string;
338
+ replacement?: string | undefined;
339
+ }[] | undefined;
340
+ } | undefined;
341
+ auth?: {
342
+ type: "none";
343
+ } | {
344
+ type: "bearer";
345
+ token: string;
346
+ } | {
347
+ value: string;
348
+ type: "apiKey";
349
+ header: string;
350
+ } | {
351
+ type: "basic";
352
+ username: string;
353
+ password: string;
354
+ } | undefined;
355
+ allowMethods?: ("GET" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH" | "DELETE")[] | undefined;
356
+ }>;
357
+ declare const TransportSchema: z.ZodUnion<[z.ZodObject<{
358
+ kind: z.ZodLiteral<"stdio">;
359
+ }, "strip", z.ZodTypeAny, {
360
+ kind: "stdio";
361
+ }, {
362
+ kind: "stdio";
363
+ }>, z.ZodObject<{
364
+ kind: z.ZodLiteral<"http">;
365
+ host: z.ZodDefault<z.ZodString>;
366
+ port: z.ZodDefault<z.ZodNumber>;
367
+ auth: z.ZodDefault<z.ZodUnion<[z.ZodObject<{
368
+ type: z.ZodLiteral<"bearer">;
369
+ token: z.ZodOptional<z.ZodString>;
370
+ }, "strip", z.ZodTypeAny, {
371
+ type: "bearer";
372
+ token?: string | undefined;
373
+ }, {
374
+ type: "bearer";
375
+ token?: string | undefined;
376
+ }>, z.ZodObject<{
377
+ type: z.ZodLiteral<"oauth">;
378
+ issuer: z.ZodString;
379
+ audience: z.ZodString;
380
+ jwksUri: z.ZodOptional<z.ZodString>;
381
+ }, "strip", z.ZodTypeAny, {
382
+ type: "oauth";
383
+ issuer: string;
384
+ audience: string;
385
+ jwksUri?: string | undefined;
386
+ }, {
387
+ type: "oauth";
388
+ issuer: string;
389
+ audience: string;
390
+ jwksUri?: string | undefined;
391
+ }>]>>;
392
+ }, "strip", z.ZodTypeAny, {
393
+ kind: "http";
394
+ auth: {
395
+ type: "bearer";
396
+ token?: string | undefined;
397
+ } | {
398
+ type: "oauth";
399
+ issuer: string;
400
+ audience: string;
401
+ jwksUri?: string | undefined;
402
+ };
403
+ host: string;
404
+ port: number;
405
+ }, {
406
+ kind: "http";
407
+ auth?: {
408
+ type: "bearer";
409
+ token?: string | undefined;
410
+ } | {
411
+ type: "oauth";
412
+ issuer: string;
413
+ audience: string;
414
+ jwksUri?: string | undefined;
415
+ } | undefined;
416
+ host?: string | undefined;
417
+ port?: number | undefined;
418
+ }>]>;
419
+ export declare const ConfigSchema: z.ZodObject<{
420
+ server: z.ZodDefault<z.ZodObject<{
421
+ name: z.ZodDefault<z.ZodString>;
422
+ version: z.ZodDefault<z.ZodString>;
423
+ }, "strip", z.ZodTypeAny, {
424
+ name: string;
425
+ version: string;
426
+ }, {
427
+ name?: string | undefined;
428
+ version?: string | undefined;
429
+ }>>;
430
+ transport: z.ZodDefault<z.ZodUnion<[z.ZodObject<{
431
+ kind: z.ZodLiteral<"stdio">;
432
+ }, "strip", z.ZodTypeAny, {
433
+ kind: "stdio";
434
+ }, {
435
+ kind: "stdio";
436
+ }>, z.ZodObject<{
437
+ kind: z.ZodLiteral<"http">;
438
+ host: z.ZodDefault<z.ZodString>;
439
+ port: z.ZodDefault<z.ZodNumber>;
440
+ auth: z.ZodDefault<z.ZodUnion<[z.ZodObject<{
441
+ type: z.ZodLiteral<"bearer">;
442
+ token: z.ZodOptional<z.ZodString>;
443
+ }, "strip", z.ZodTypeAny, {
444
+ type: "bearer";
445
+ token?: string | undefined;
446
+ }, {
447
+ type: "bearer";
448
+ token?: string | undefined;
449
+ }>, z.ZodObject<{
450
+ type: z.ZodLiteral<"oauth">;
451
+ issuer: z.ZodString;
452
+ audience: z.ZodString;
453
+ jwksUri: z.ZodOptional<z.ZodString>;
454
+ }, "strip", z.ZodTypeAny, {
455
+ type: "oauth";
456
+ issuer: string;
457
+ audience: string;
458
+ jwksUri?: string | undefined;
459
+ }, {
460
+ type: "oauth";
461
+ issuer: string;
462
+ audience: string;
463
+ jwksUri?: string | undefined;
464
+ }>]>>;
465
+ }, "strip", z.ZodTypeAny, {
466
+ kind: "http";
467
+ auth: {
468
+ type: "bearer";
469
+ token?: string | undefined;
470
+ } | {
471
+ type: "oauth";
472
+ issuer: string;
473
+ audience: string;
474
+ jwksUri?: string | undefined;
475
+ };
476
+ host: string;
477
+ port: number;
478
+ }, {
479
+ kind: "http";
480
+ auth?: {
481
+ type: "bearer";
482
+ token?: string | undefined;
483
+ } | {
484
+ type: "oauth";
485
+ issuer: string;
486
+ audience: string;
487
+ jwksUri?: string | undefined;
488
+ } | undefined;
489
+ host?: string | undefined;
490
+ port?: number | undefined;
491
+ }>]>>;
492
+ sources: z.ZodArray<z.ZodUnion<[z.ZodObject<{
493
+ id: z.ZodString;
494
+ kind: z.ZodEnum<["postgres", "mysql", "mariadb", "sqlite"]>;
495
+ url: z.ZodString;
496
+ scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<["schema:read", "tables:read", "tables:write", "query:raw", "http:call"]>, "many">>;
497
+ perEntityTools: z.ZodDefault<z.ZodObject<{
498
+ enabled: z.ZodDefault<z.ZodBoolean>;
499
+ include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
500
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
501
+ }, "strip", z.ZodTypeAny, {
502
+ enabled: boolean;
503
+ include?: string[] | undefined;
504
+ exclude?: string[] | undefined;
505
+ }, {
506
+ enabled?: boolean | undefined;
507
+ include?: string[] | undefined;
508
+ exclude?: string[] | undefined;
509
+ }>>;
510
+ limits: z.ZodDefault<z.ZodObject<{
511
+ rowCap: z.ZodDefault<z.ZodNumber>;
512
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
513
+ maxBytes: z.ZodDefault<z.ZodNumber>;
514
+ }, "strip", z.ZodTypeAny, {
515
+ rowCap: number;
516
+ timeoutMs: number;
517
+ maxBytes: number;
518
+ }, {
519
+ rowCap?: number | undefined;
520
+ timeoutMs?: number | undefined;
521
+ maxBytes?: number | undefined;
522
+ }>>;
523
+ redact: z.ZodDefault<z.ZodObject<{
524
+ columns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
525
+ patterns: z.ZodDefault<z.ZodArray<z.ZodObject<{
526
+ name: z.ZodString;
527
+ regex: z.ZodString;
528
+ replacement: z.ZodOptional<z.ZodString>;
529
+ }, "strip", z.ZodTypeAny, {
530
+ name: string;
531
+ regex: string;
532
+ replacement?: string | undefined;
533
+ }, {
534
+ name: string;
535
+ regex: string;
536
+ replacement?: string | undefined;
537
+ }>, "many">>;
538
+ }, "strip", z.ZodTypeAny, {
539
+ columns: string[];
540
+ patterns: {
541
+ name: string;
542
+ regex: string;
543
+ replacement?: string | undefined;
544
+ }[];
545
+ }, {
546
+ columns?: string[] | undefined;
547
+ patterns?: {
548
+ name: string;
549
+ regex: string;
550
+ replacement?: string | undefined;
551
+ }[] | undefined;
552
+ }>>;
553
+ }, "strip", z.ZodTypeAny, {
554
+ id: string;
555
+ kind: "postgres" | "mysql" | "mariadb" | "sqlite";
556
+ url: string;
557
+ scopes: ("schema:read" | "tables:read" | "tables:write" | "query:raw" | "http:call")[];
558
+ perEntityTools: {
559
+ enabled: boolean;
560
+ include?: string[] | undefined;
561
+ exclude?: string[] | undefined;
562
+ };
563
+ limits: {
564
+ rowCap: number;
565
+ timeoutMs: number;
566
+ maxBytes: number;
567
+ };
568
+ redact: {
569
+ columns: string[];
570
+ patterns: {
571
+ name: string;
572
+ regex: string;
573
+ replacement?: string | undefined;
574
+ }[];
575
+ };
576
+ }, {
577
+ id: string;
578
+ kind: "postgres" | "mysql" | "mariadb" | "sqlite";
579
+ url: string;
580
+ scopes?: ("schema:read" | "tables:read" | "tables:write" | "query:raw" | "http:call")[] | undefined;
581
+ perEntityTools?: {
582
+ enabled?: boolean | undefined;
583
+ include?: string[] | undefined;
584
+ exclude?: string[] | undefined;
585
+ } | undefined;
586
+ limits?: {
587
+ rowCap?: number | undefined;
588
+ timeoutMs?: number | undefined;
589
+ maxBytes?: number | undefined;
590
+ } | undefined;
591
+ redact?: {
592
+ columns?: string[] | undefined;
593
+ patterns?: {
594
+ name: string;
595
+ regex: string;
596
+ replacement?: string | undefined;
597
+ }[] | undefined;
598
+ } | undefined;
599
+ }>, z.ZodObject<{
600
+ id: z.ZodString;
601
+ kind: z.ZodLiteral<"mongo">;
602
+ url: z.ZodString;
603
+ database: z.ZodOptional<z.ZodString>;
604
+ scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<["schema:read", "tables:read", "tables:write", "query:raw", "http:call"]>, "many">>;
605
+ limits: z.ZodDefault<z.ZodObject<{
606
+ rowCap: z.ZodDefault<z.ZodNumber>;
607
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
608
+ maxBytes: z.ZodDefault<z.ZodNumber>;
609
+ }, "strip", z.ZodTypeAny, {
610
+ rowCap: number;
611
+ timeoutMs: number;
612
+ maxBytes: number;
613
+ }, {
614
+ rowCap?: number | undefined;
615
+ timeoutMs?: number | undefined;
616
+ maxBytes?: number | undefined;
617
+ }>>;
618
+ redact: z.ZodDefault<z.ZodObject<{
619
+ columns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
620
+ patterns: z.ZodDefault<z.ZodArray<z.ZodObject<{
621
+ name: z.ZodString;
622
+ regex: z.ZodString;
623
+ replacement: z.ZodOptional<z.ZodString>;
624
+ }, "strip", z.ZodTypeAny, {
625
+ name: string;
626
+ regex: string;
627
+ replacement?: string | undefined;
628
+ }, {
629
+ name: string;
630
+ regex: string;
631
+ replacement?: string | undefined;
632
+ }>, "many">>;
633
+ }, "strip", z.ZodTypeAny, {
634
+ columns: string[];
635
+ patterns: {
636
+ name: string;
637
+ regex: string;
638
+ replacement?: string | undefined;
639
+ }[];
640
+ }, {
641
+ columns?: string[] | undefined;
642
+ patterns?: {
643
+ name: string;
644
+ regex: string;
645
+ replacement?: string | undefined;
646
+ }[] | undefined;
647
+ }>>;
648
+ }, "strip", z.ZodTypeAny, {
649
+ id: string;
650
+ kind: "mongo";
651
+ url: string;
652
+ scopes: ("schema:read" | "tables:read" | "tables:write" | "query:raw" | "http:call")[];
653
+ limits: {
654
+ rowCap: number;
655
+ timeoutMs: number;
656
+ maxBytes: number;
657
+ };
658
+ redact: {
659
+ columns: string[];
660
+ patterns: {
661
+ name: string;
662
+ regex: string;
663
+ replacement?: string | undefined;
664
+ }[];
665
+ };
666
+ database?: string | undefined;
667
+ }, {
668
+ id: string;
669
+ kind: "mongo";
670
+ url: string;
671
+ scopes?: ("schema:read" | "tables:read" | "tables:write" | "query:raw" | "http:call")[] | undefined;
672
+ limits?: {
673
+ rowCap?: number | undefined;
674
+ timeoutMs?: number | undefined;
675
+ maxBytes?: number | undefined;
676
+ } | undefined;
677
+ redact?: {
678
+ columns?: string[] | undefined;
679
+ patterns?: {
680
+ name: string;
681
+ regex: string;
682
+ replacement?: string | undefined;
683
+ }[] | undefined;
684
+ } | undefined;
685
+ database?: string | undefined;
686
+ }>, z.ZodObject<{
687
+ id: z.ZodString;
688
+ kind: z.ZodLiteral<"openapi">;
689
+ spec: z.ZodString;
690
+ baseUrl: z.ZodString;
691
+ auth: z.ZodDefault<z.ZodUnion<[z.ZodObject<{
692
+ type: z.ZodLiteral<"none">;
693
+ }, "strip", z.ZodTypeAny, {
694
+ type: "none";
695
+ }, {
696
+ type: "none";
697
+ }>, z.ZodObject<{
698
+ type: z.ZodLiteral<"bearer">;
699
+ token: z.ZodString;
700
+ }, "strip", z.ZodTypeAny, {
701
+ type: "bearer";
702
+ token: string;
703
+ }, {
704
+ type: "bearer";
705
+ token: string;
706
+ }>, z.ZodObject<{
707
+ type: z.ZodLiteral<"apiKey">;
708
+ header: z.ZodString;
709
+ value: z.ZodString;
710
+ }, "strip", z.ZodTypeAny, {
711
+ value: string;
712
+ type: "apiKey";
713
+ header: string;
714
+ }, {
715
+ value: string;
716
+ type: "apiKey";
717
+ header: string;
718
+ }>, z.ZodObject<{
719
+ type: z.ZodLiteral<"basic">;
720
+ username: z.ZodString;
721
+ password: z.ZodString;
722
+ }, "strip", z.ZodTypeAny, {
723
+ type: "basic";
724
+ username: string;
725
+ password: string;
726
+ }, {
727
+ type: "basic";
728
+ username: string;
729
+ password: string;
730
+ }>]>>;
731
+ allowMethods: z.ZodDefault<z.ZodArray<z.ZodEnum<["GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH", "DELETE"]>, "many">>;
732
+ scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<["schema:read", "tables:read", "tables:write", "query:raw", "http:call"]>, "many">>;
733
+ limits: z.ZodDefault<z.ZodObject<{
734
+ rowCap: z.ZodDefault<z.ZodNumber>;
735
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
736
+ maxBytes: z.ZodDefault<z.ZodNumber>;
737
+ }, "strip", z.ZodTypeAny, {
738
+ rowCap: number;
739
+ timeoutMs: number;
740
+ maxBytes: number;
741
+ }, {
742
+ rowCap?: number | undefined;
743
+ timeoutMs?: number | undefined;
744
+ maxBytes?: number | undefined;
745
+ }>>;
746
+ redact: z.ZodDefault<z.ZodObject<{
747
+ columns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
748
+ patterns: z.ZodDefault<z.ZodArray<z.ZodObject<{
749
+ name: z.ZodString;
750
+ regex: z.ZodString;
751
+ replacement: z.ZodOptional<z.ZodString>;
752
+ }, "strip", z.ZodTypeAny, {
753
+ name: string;
754
+ regex: string;
755
+ replacement?: string | undefined;
756
+ }, {
757
+ name: string;
758
+ regex: string;
759
+ replacement?: string | undefined;
760
+ }>, "many">>;
761
+ }, "strip", z.ZodTypeAny, {
762
+ columns: string[];
763
+ patterns: {
764
+ name: string;
765
+ regex: string;
766
+ replacement?: string | undefined;
767
+ }[];
768
+ }, {
769
+ columns?: string[] | undefined;
770
+ patterns?: {
771
+ name: string;
772
+ regex: string;
773
+ replacement?: string | undefined;
774
+ }[] | undefined;
775
+ }>>;
776
+ }, "strip", z.ZodTypeAny, {
777
+ id: string;
778
+ kind: "openapi";
779
+ scopes: ("schema:read" | "tables:read" | "tables:write" | "query:raw" | "http:call")[];
780
+ limits: {
781
+ rowCap: number;
782
+ timeoutMs: number;
783
+ maxBytes: number;
784
+ };
785
+ redact: {
786
+ columns: string[];
787
+ patterns: {
788
+ name: string;
789
+ regex: string;
790
+ replacement?: string | undefined;
791
+ }[];
792
+ };
793
+ spec: string;
794
+ baseUrl: string;
795
+ auth: {
796
+ type: "none";
797
+ } | {
798
+ type: "bearer";
799
+ token: string;
800
+ } | {
801
+ value: string;
802
+ type: "apiKey";
803
+ header: string;
804
+ } | {
805
+ type: "basic";
806
+ username: string;
807
+ password: string;
808
+ };
809
+ allowMethods: ("GET" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH" | "DELETE")[];
810
+ }, {
811
+ id: string;
812
+ kind: "openapi";
813
+ spec: string;
814
+ baseUrl: string;
815
+ scopes?: ("schema:read" | "tables:read" | "tables:write" | "query:raw" | "http:call")[] | undefined;
816
+ limits?: {
817
+ rowCap?: number | undefined;
818
+ timeoutMs?: number | undefined;
819
+ maxBytes?: number | undefined;
820
+ } | undefined;
821
+ redact?: {
822
+ columns?: string[] | undefined;
823
+ patterns?: {
824
+ name: string;
825
+ regex: string;
826
+ replacement?: string | undefined;
827
+ }[] | undefined;
828
+ } | undefined;
829
+ auth?: {
830
+ type: "none";
831
+ } | {
832
+ type: "bearer";
833
+ token: string;
834
+ } | {
835
+ value: string;
836
+ type: "apiKey";
837
+ header: string;
838
+ } | {
839
+ type: "basic";
840
+ username: string;
841
+ password: string;
842
+ } | undefined;
843
+ allowMethods?: ("GET" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH" | "DELETE")[] | undefined;
844
+ }>]>, "many">;
845
+ audit: z.ZodDefault<z.ZodObject<{
846
+ path: z.ZodDefault<z.ZodString>;
847
+ }, "strip", z.ZodTypeAny, {
848
+ path: string;
849
+ }, {
850
+ path?: string | undefined;
851
+ }>>;
852
+ rateLimit: z.ZodDefault<z.ZodObject<{
853
+ defaultPerMinute: z.ZodDefault<z.ZodNumber>;
854
+ maxConcurrent: z.ZodDefault<z.ZodNumber>;
855
+ }, "strip", z.ZodTypeAny, {
856
+ defaultPerMinute: number;
857
+ maxConcurrent: number;
858
+ }, {
859
+ defaultPerMinute?: number | undefined;
860
+ maxConcurrent?: number | undefined;
861
+ }>>;
862
+ security: z.ZodDefault<z.ZodObject<{
863
+ wrapMode: z.ZodDefault<z.ZodEnum<["strict", "minimal", "off"]>>;
864
+ }, "strip", z.ZodTypeAny, {
865
+ wrapMode: "strict" | "minimal" | "off";
866
+ }, {
867
+ wrapMode?: "strict" | "minimal" | "off" | undefined;
868
+ }>>;
869
+ }, "strip", z.ZodTypeAny, {
870
+ server: {
871
+ name: string;
872
+ version: string;
873
+ };
874
+ transport: {
875
+ kind: "stdio";
876
+ } | {
877
+ kind: "http";
878
+ auth: {
879
+ type: "bearer";
880
+ token?: string | undefined;
881
+ } | {
882
+ type: "oauth";
883
+ issuer: string;
884
+ audience: string;
885
+ jwksUri?: string | undefined;
886
+ };
887
+ host: string;
888
+ port: number;
889
+ };
890
+ sources: ({
891
+ id: string;
892
+ kind: "postgres" | "mysql" | "mariadb" | "sqlite";
893
+ url: string;
894
+ scopes: ("schema:read" | "tables:read" | "tables:write" | "query:raw" | "http:call")[];
895
+ perEntityTools: {
896
+ enabled: boolean;
897
+ include?: string[] | undefined;
898
+ exclude?: string[] | undefined;
899
+ };
900
+ limits: {
901
+ rowCap: number;
902
+ timeoutMs: number;
903
+ maxBytes: number;
904
+ };
905
+ redact: {
906
+ columns: string[];
907
+ patterns: {
908
+ name: string;
909
+ regex: string;
910
+ replacement?: string | undefined;
911
+ }[];
912
+ };
913
+ } | {
914
+ id: string;
915
+ kind: "mongo";
916
+ url: string;
917
+ scopes: ("schema:read" | "tables:read" | "tables:write" | "query:raw" | "http:call")[];
918
+ limits: {
919
+ rowCap: number;
920
+ timeoutMs: number;
921
+ maxBytes: number;
922
+ };
923
+ redact: {
924
+ columns: string[];
925
+ patterns: {
926
+ name: string;
927
+ regex: string;
928
+ replacement?: string | undefined;
929
+ }[];
930
+ };
931
+ database?: string | undefined;
932
+ } | {
933
+ id: string;
934
+ kind: "openapi";
935
+ scopes: ("schema:read" | "tables:read" | "tables:write" | "query:raw" | "http:call")[];
936
+ limits: {
937
+ rowCap: number;
938
+ timeoutMs: number;
939
+ maxBytes: number;
940
+ };
941
+ redact: {
942
+ columns: string[];
943
+ patterns: {
944
+ name: string;
945
+ regex: string;
946
+ replacement?: string | undefined;
947
+ }[];
948
+ };
949
+ spec: string;
950
+ baseUrl: string;
951
+ auth: {
952
+ type: "none";
953
+ } | {
954
+ type: "bearer";
955
+ token: string;
956
+ } | {
957
+ value: string;
958
+ type: "apiKey";
959
+ header: string;
960
+ } | {
961
+ type: "basic";
962
+ username: string;
963
+ password: string;
964
+ };
965
+ allowMethods: ("GET" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH" | "DELETE")[];
966
+ })[];
967
+ audit: {
968
+ path: string;
969
+ };
970
+ rateLimit: {
971
+ defaultPerMinute: number;
972
+ maxConcurrent: number;
973
+ };
974
+ security: {
975
+ wrapMode: "strict" | "minimal" | "off";
976
+ };
977
+ }, {
978
+ sources: ({
979
+ id: string;
980
+ kind: "postgres" | "mysql" | "mariadb" | "sqlite";
981
+ url: string;
982
+ scopes?: ("schema:read" | "tables:read" | "tables:write" | "query:raw" | "http:call")[] | undefined;
983
+ perEntityTools?: {
984
+ enabled?: boolean | undefined;
985
+ include?: string[] | undefined;
986
+ exclude?: string[] | undefined;
987
+ } | undefined;
988
+ limits?: {
989
+ rowCap?: number | undefined;
990
+ timeoutMs?: number | undefined;
991
+ maxBytes?: number | undefined;
992
+ } | undefined;
993
+ redact?: {
994
+ columns?: string[] | undefined;
995
+ patterns?: {
996
+ name: string;
997
+ regex: string;
998
+ replacement?: string | undefined;
999
+ }[] | undefined;
1000
+ } | undefined;
1001
+ } | {
1002
+ id: string;
1003
+ kind: "mongo";
1004
+ url: string;
1005
+ scopes?: ("schema:read" | "tables:read" | "tables:write" | "query:raw" | "http:call")[] | undefined;
1006
+ limits?: {
1007
+ rowCap?: number | undefined;
1008
+ timeoutMs?: number | undefined;
1009
+ maxBytes?: number | undefined;
1010
+ } | undefined;
1011
+ redact?: {
1012
+ columns?: string[] | undefined;
1013
+ patterns?: {
1014
+ name: string;
1015
+ regex: string;
1016
+ replacement?: string | undefined;
1017
+ }[] | undefined;
1018
+ } | undefined;
1019
+ database?: string | undefined;
1020
+ } | {
1021
+ id: string;
1022
+ kind: "openapi";
1023
+ spec: string;
1024
+ baseUrl: string;
1025
+ scopes?: ("schema:read" | "tables:read" | "tables:write" | "query:raw" | "http:call")[] | undefined;
1026
+ limits?: {
1027
+ rowCap?: number | undefined;
1028
+ timeoutMs?: number | undefined;
1029
+ maxBytes?: number | undefined;
1030
+ } | undefined;
1031
+ redact?: {
1032
+ columns?: string[] | undefined;
1033
+ patterns?: {
1034
+ name: string;
1035
+ regex: string;
1036
+ replacement?: string | undefined;
1037
+ }[] | undefined;
1038
+ } | undefined;
1039
+ auth?: {
1040
+ type: "none";
1041
+ } | {
1042
+ type: "bearer";
1043
+ token: string;
1044
+ } | {
1045
+ value: string;
1046
+ type: "apiKey";
1047
+ header: string;
1048
+ } | {
1049
+ type: "basic";
1050
+ username: string;
1051
+ password: string;
1052
+ } | undefined;
1053
+ allowMethods?: ("GET" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH" | "DELETE")[] | undefined;
1054
+ })[];
1055
+ server?: {
1056
+ name?: string | undefined;
1057
+ version?: string | undefined;
1058
+ } | undefined;
1059
+ transport?: {
1060
+ kind: "stdio";
1061
+ } | {
1062
+ kind: "http";
1063
+ auth?: {
1064
+ type: "bearer";
1065
+ token?: string | undefined;
1066
+ } | {
1067
+ type: "oauth";
1068
+ issuer: string;
1069
+ audience: string;
1070
+ jwksUri?: string | undefined;
1071
+ } | undefined;
1072
+ host?: string | undefined;
1073
+ port?: number | undefined;
1074
+ } | undefined;
1075
+ audit?: {
1076
+ path?: string | undefined;
1077
+ } | undefined;
1078
+ rateLimit?: {
1079
+ defaultPerMinute?: number | undefined;
1080
+ maxConcurrent?: number | undefined;
1081
+ } | undefined;
1082
+ security?: {
1083
+ wrapMode?: "strict" | "minimal" | "off" | undefined;
1084
+ } | undefined;
1085
+ }>;
1086
+ export type McpolyglotConfig = z.infer<typeof ConfigSchema>;
1087
+ export type SqlSourceConfig = z.infer<typeof SqlSourceSchema>;
1088
+ export type MongoSourceConfig = z.infer<typeof MongoSourceSchema>;
1089
+ export type OpenApiSourceConfig = z.infer<typeof OpenApiSourceSchema>;
1090
+ export type SourceConfig = SqlSourceConfig | MongoSourceConfig | OpenApiSourceConfig;
1091
+ export type TransportConfig = z.infer<typeof TransportSchema>;
1092
+ /**
1093
+ * Identity helper for type-safe `mcpolyglot.config.ts` files. Wraps the config so editors
1094
+ * give you autocomplete and Zod's validation runs at load time rather than crashing later.
1095
+ *
1096
+ * @example
1097
+ * ```ts
1098
+ * import { defineConfig } from '@mcpolyglot/config';
1099
+ *
1100
+ * export default defineConfig({
1101
+ * transport: { kind: 'stdio' },
1102
+ * sources: [{
1103
+ * id: 'pg.main',
1104
+ * kind: 'postgres',
1105
+ * url: '${env:DATABASE_URL}',
1106
+ * scopes: ['schema:read', 'tables:read', 'query:raw'],
1107
+ * perEntityTools: { enabled: false },
1108
+ * limits: { rowCap: 200, timeoutMs: 10_000, maxBytes: 262144 },
1109
+ * redact: { columns: ['public.users.password_hash'], patterns: [] },
1110
+ * }],
1111
+ * });
1112
+ * ```
1113
+ */
1114
+ export declare function defineConfig(cfg: McpolyglotConfig | (() => McpolyglotConfig)): McpolyglotConfig;
1115
+ /**
1116
+ * Load and validate a config file. Supports `.ts`, `.mts`, `.js`, `.mjs`, `.cjs`,
1117
+ * `.json`, `.yaml`, and `.yml`. TS files require the `tsx` loader (the CLI registers it).
1118
+ *
1119
+ * @throws {ConfigError} when the file is missing, has an unsupported extension,
1120
+ * or fails Zod validation.
1121
+ */
1122
+ export declare function loadConfig(path: string): Promise<McpolyglotConfig>;
1123
+ export {};
1124
+ //# sourceMappingURL=schema.d.ts.map