@mcpolyglot/config 0.0.2 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/schema.d.ts CHANGED
@@ -1,1088 +1,274 @@
1
1
  import { z } from 'zod';
2
2
  declare const SqlSourceSchema: z.ZodObject<{
3
3
  id: z.ZodString;
4
- kind: z.ZodEnum<["postgres", "mysql", "mariadb", "sqlite"]>;
4
+ kind: z.ZodEnum<{
5
+ postgres: "postgres";
6
+ mysql: "mysql";
7
+ mariadb: "mariadb";
8
+ sqlite: "sqlite";
9
+ }>;
5
10
  url: z.ZodString;
6
- scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<["schema:read", "tables:read", "tables:write", "query:raw", "http:call"]>, "many">>;
11
+ scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
12
+ "schema:read": "schema:read";
13
+ "tables:read": "tables:read";
14
+ "tables:write": "tables:write";
15
+ "query:raw": "query:raw";
16
+ "http:call": "http:call";
17
+ }>>>;
7
18
  perEntityTools: z.ZodDefault<z.ZodObject<{
8
19
  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
+ include: z.ZodOptional<z.ZodArray<z.ZodString>>;
21
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
22
+ }, z.core.$strip>>;
20
23
  limits: z.ZodDefault<z.ZodObject<{
21
24
  rowCap: z.ZodDefault<z.ZodNumber>;
22
25
  timeoutMs: z.ZodDefault<z.ZodNumber>;
23
26
  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
- }>>;
27
+ }, z.core.$strip>>;
33
28
  redact: z.ZodDefault<z.ZodObject<{
34
- columns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
29
+ columns: z.ZodDefault<z.ZodArray<z.ZodString>>;
35
30
  patterns: z.ZodDefault<z.ZodArray<z.ZodObject<{
36
31
  name: z.ZodString;
37
32
  regex: z.ZodString;
38
33
  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
- }>;
34
+ }, z.core.$strip>>>;
35
+ }, z.core.$strip>>;
36
+ }, z.core.$strip>;
110
37
  declare const MongoSourceSchema: z.ZodObject<{
111
38
  id: z.ZodString;
112
39
  kind: z.ZodLiteral<"mongo">;
113
40
  url: z.ZodString;
114
41
  database: z.ZodOptional<z.ZodString>;
115
- scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<["schema:read", "tables:read", "tables:write", "query:raw", "http:call"]>, "many">>;
42
+ scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
43
+ "schema:read": "schema:read";
44
+ "tables:read": "tables:read";
45
+ "tables:write": "tables:write";
46
+ "query:raw": "query:raw";
47
+ "http:call": "http:call";
48
+ }>>>;
116
49
  limits: z.ZodDefault<z.ZodObject<{
117
50
  rowCap: z.ZodDefault<z.ZodNumber>;
118
51
  timeoutMs: z.ZodDefault<z.ZodNumber>;
119
52
  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
- }>>;
53
+ }, z.core.$strip>>;
129
54
  redact: z.ZodDefault<z.ZodObject<{
130
- columns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
55
+ columns: z.ZodDefault<z.ZodArray<z.ZodString>>;
131
56
  patterns: z.ZodDefault<z.ZodArray<z.ZodObject<{
132
57
  name: z.ZodString;
133
58
  regex: z.ZodString;
134
59
  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
- }>;
60
+ }, z.core.$strip>>>;
61
+ }, z.core.$strip>>;
62
+ }, z.core.$strip>;
198
63
  declare const OpenApiSourceSchema: z.ZodObject<{
199
64
  id: z.ZodString;
200
65
  kind: z.ZodLiteral<"openapi">;
201
66
  spec: z.ZodString;
202
67
  baseUrl: z.ZodString;
203
- auth: z.ZodDefault<z.ZodUnion<[z.ZodObject<{
68
+ auth: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
204
69
  type: z.ZodLiteral<"none">;
205
- }, "strip", z.ZodTypeAny, {
206
- type: "none";
207
- }, {
208
- type: "none";
209
- }>, z.ZodObject<{
70
+ }, z.core.$strip>, z.ZodObject<{
210
71
  type: z.ZodLiteral<"bearer">;
211
72
  token: z.ZodString;
212
- }, "strip", z.ZodTypeAny, {
213
- type: "bearer";
214
- token: string;
215
- }, {
216
- type: "bearer";
217
- token: string;
218
- }>, z.ZodObject<{
73
+ }, z.core.$strip>, z.ZodObject<{
219
74
  type: z.ZodLiteral<"apiKey">;
220
75
  header: z.ZodString;
221
76
  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<{
77
+ }, z.core.$strip>, z.ZodObject<{
231
78
  type: z.ZodLiteral<"basic">;
232
79
  username: z.ZodString;
233
80
  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">>;
81
+ }, z.core.$strip>]>>;
82
+ allowMethods: z.ZodDefault<z.ZodArray<z.ZodEnum<{
83
+ GET: "GET";
84
+ HEAD: "HEAD";
85
+ OPTIONS: "OPTIONS";
86
+ POST: "POST";
87
+ PUT: "PUT";
88
+ PATCH: "PATCH";
89
+ DELETE: "DELETE";
90
+ }>>>;
91
+ scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
92
+ "schema:read": "schema:read";
93
+ "tables:read": "tables:read";
94
+ "tables:write": "tables:write";
95
+ "query:raw": "query:raw";
96
+ "http:call": "http:call";
97
+ }>>>;
245
98
  limits: z.ZodDefault<z.ZodObject<{
246
99
  rowCap: z.ZodDefault<z.ZodNumber>;
247
100
  timeoutMs: z.ZodDefault<z.ZodNumber>;
248
101
  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
- }>>;
102
+ }, z.core.$strip>>;
258
103
  redact: z.ZodDefault<z.ZodObject<{
259
- columns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
104
+ columns: z.ZodDefault<z.ZodArray<z.ZodString>>;
260
105
  patterns: z.ZodDefault<z.ZodArray<z.ZodObject<{
261
106
  name: z.ZodString;
262
107
  regex: z.ZodString;
263
108
  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<{
109
+ }, z.core.$strip>>>;
110
+ }, z.core.$strip>>;
111
+ }, z.core.$strip>;
112
+ declare const TransportSchema: z.ZodUnion<readonly [z.ZodObject<{
358
113
  kind: z.ZodLiteral<"stdio">;
359
- }, "strip", z.ZodTypeAny, {
360
- kind: "stdio";
361
- }, {
362
- kind: "stdio";
363
- }>, z.ZodObject<{
114
+ }, z.core.$strip>, z.ZodObject<{
364
115
  kind: z.ZodLiteral<"http">;
365
116
  host: z.ZodDefault<z.ZodString>;
366
117
  port: z.ZodDefault<z.ZodNumber>;
367
- auth: z.ZodDefault<z.ZodUnion<[z.ZodObject<{
118
+ auth: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
368
119
  type: z.ZodLiteral<"bearer">;
369
120
  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<{
121
+ }, z.core.$strip>, z.ZodObject<{
377
122
  type: z.ZodLiteral<"oauth">;
378
123
  issuer: z.ZodString;
379
124
  audience: z.ZodString;
380
125
  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
- }>]>;
126
+ }, z.core.$strip>]>>;
127
+ }, z.core.$strip>]>;
419
128
  export declare const ConfigSchema: z.ZodObject<{
420
129
  server: z.ZodDefault<z.ZodObject<{
421
130
  name: z.ZodDefault<z.ZodString>;
422
131
  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<{
132
+ }, z.core.$strip>>;
133
+ transport: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
431
134
  kind: z.ZodLiteral<"stdio">;
432
- }, "strip", z.ZodTypeAny, {
433
- kind: "stdio";
434
- }, {
435
- kind: "stdio";
436
- }>, z.ZodObject<{
135
+ }, z.core.$strip>, z.ZodObject<{
437
136
  kind: z.ZodLiteral<"http">;
438
137
  host: z.ZodDefault<z.ZodString>;
439
138
  port: z.ZodDefault<z.ZodNumber>;
440
- auth: z.ZodDefault<z.ZodUnion<[z.ZodObject<{
139
+ auth: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
441
140
  type: z.ZodLiteral<"bearer">;
442
141
  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<{
142
+ }, z.core.$strip>, z.ZodObject<{
450
143
  type: z.ZodLiteral<"oauth">;
451
144
  issuer: z.ZodString;
452
145
  audience: z.ZodString;
453
146
  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<{
147
+ }, z.core.$strip>]>>;
148
+ }, z.core.$strip>]>>;
149
+ sources: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
493
150
  id: z.ZodString;
494
- kind: z.ZodEnum<["postgres", "mysql", "mariadb", "sqlite"]>;
151
+ kind: z.ZodEnum<{
152
+ postgres: "postgres";
153
+ mysql: "mysql";
154
+ mariadb: "mariadb";
155
+ sqlite: "sqlite";
156
+ }>;
495
157
  url: z.ZodString;
496
- scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<["schema:read", "tables:read", "tables:write", "query:raw", "http:call"]>, "many">>;
158
+ scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
159
+ "schema:read": "schema:read";
160
+ "tables:read": "tables:read";
161
+ "tables:write": "tables:write";
162
+ "query:raw": "query:raw";
163
+ "http:call": "http:call";
164
+ }>>>;
497
165
  perEntityTools: z.ZodDefault<z.ZodObject<{
498
166
  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
- }>>;
167
+ include: z.ZodOptional<z.ZodArray<z.ZodString>>;
168
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
169
+ }, z.core.$strip>>;
510
170
  limits: z.ZodDefault<z.ZodObject<{
511
171
  rowCap: z.ZodDefault<z.ZodNumber>;
512
172
  timeoutMs: z.ZodDefault<z.ZodNumber>;
513
173
  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
- }>>;
174
+ }, z.core.$strip>>;
523
175
  redact: z.ZodDefault<z.ZodObject<{
524
- columns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
176
+ columns: z.ZodDefault<z.ZodArray<z.ZodString>>;
525
177
  patterns: z.ZodDefault<z.ZodArray<z.ZodObject<{
526
178
  name: z.ZodString;
527
179
  regex: z.ZodString;
528
180
  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<{
181
+ }, z.core.$strip>>>;
182
+ }, z.core.$strip>>;
183
+ }, z.core.$strip>, z.ZodObject<{
600
184
  id: z.ZodString;
601
185
  kind: z.ZodLiteral<"mongo">;
602
186
  url: z.ZodString;
603
187
  database: z.ZodOptional<z.ZodString>;
604
- scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<["schema:read", "tables:read", "tables:write", "query:raw", "http:call"]>, "many">>;
188
+ scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
189
+ "schema:read": "schema:read";
190
+ "tables:read": "tables:read";
191
+ "tables:write": "tables:write";
192
+ "query:raw": "query:raw";
193
+ "http:call": "http:call";
194
+ }>>>;
605
195
  limits: z.ZodDefault<z.ZodObject<{
606
196
  rowCap: z.ZodDefault<z.ZodNumber>;
607
197
  timeoutMs: z.ZodDefault<z.ZodNumber>;
608
198
  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
- }>>;
199
+ }, z.core.$strip>>;
618
200
  redact: z.ZodDefault<z.ZodObject<{
619
- columns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
201
+ columns: z.ZodDefault<z.ZodArray<z.ZodString>>;
620
202
  patterns: z.ZodDefault<z.ZodArray<z.ZodObject<{
621
203
  name: z.ZodString;
622
204
  regex: z.ZodString;
623
205
  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<{
206
+ }, z.core.$strip>>>;
207
+ }, z.core.$strip>>;
208
+ }, z.core.$strip>, z.ZodObject<{
687
209
  id: z.ZodString;
688
210
  kind: z.ZodLiteral<"openapi">;
689
211
  spec: z.ZodString;
690
212
  baseUrl: z.ZodString;
691
- auth: z.ZodDefault<z.ZodUnion<[z.ZodObject<{
213
+ auth: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
692
214
  type: z.ZodLiteral<"none">;
693
- }, "strip", z.ZodTypeAny, {
694
- type: "none";
695
- }, {
696
- type: "none";
697
- }>, z.ZodObject<{
215
+ }, z.core.$strip>, z.ZodObject<{
698
216
  type: z.ZodLiteral<"bearer">;
699
217
  token: z.ZodString;
700
- }, "strip", z.ZodTypeAny, {
701
- type: "bearer";
702
- token: string;
703
- }, {
704
- type: "bearer";
705
- token: string;
706
- }>, z.ZodObject<{
218
+ }, z.core.$strip>, z.ZodObject<{
707
219
  type: z.ZodLiteral<"apiKey">;
708
220
  header: z.ZodString;
709
221
  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<{
222
+ }, z.core.$strip>, z.ZodObject<{
719
223
  type: z.ZodLiteral<"basic">;
720
224
  username: z.ZodString;
721
225
  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">>;
226
+ }, z.core.$strip>]>>;
227
+ allowMethods: z.ZodDefault<z.ZodArray<z.ZodEnum<{
228
+ GET: "GET";
229
+ HEAD: "HEAD";
230
+ OPTIONS: "OPTIONS";
231
+ POST: "POST";
232
+ PUT: "PUT";
233
+ PATCH: "PATCH";
234
+ DELETE: "DELETE";
235
+ }>>>;
236
+ scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
237
+ "schema:read": "schema:read";
238
+ "tables:read": "tables:read";
239
+ "tables:write": "tables:write";
240
+ "query:raw": "query:raw";
241
+ "http:call": "http:call";
242
+ }>>>;
733
243
  limits: z.ZodDefault<z.ZodObject<{
734
244
  rowCap: z.ZodDefault<z.ZodNumber>;
735
245
  timeoutMs: z.ZodDefault<z.ZodNumber>;
736
246
  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
- }>>;
247
+ }, z.core.$strip>>;
746
248
  redact: z.ZodDefault<z.ZodObject<{
747
- columns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
249
+ columns: z.ZodDefault<z.ZodArray<z.ZodString>>;
748
250
  patterns: z.ZodDefault<z.ZodArray<z.ZodObject<{
749
251
  name: z.ZodString;
750
252
  regex: z.ZodString;
751
253
  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">;
254
+ }, z.core.$strip>>>;
255
+ }, z.core.$strip>>;
256
+ }, z.core.$strip>]>>;
845
257
  audit: z.ZodDefault<z.ZodObject<{
846
258
  path: z.ZodDefault<z.ZodString>;
847
- }, "strip", z.ZodTypeAny, {
848
- path: string;
849
- }, {
850
- path?: string | undefined;
851
- }>>;
259
+ }, z.core.$strip>>;
852
260
  rateLimit: z.ZodDefault<z.ZodObject<{
853
261
  defaultPerMinute: z.ZodDefault<z.ZodNumber>;
854
262
  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
- }>>;
263
+ }, z.core.$strip>>;
862
264
  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
- }>;
265
+ wrapMode: z.ZodDefault<z.ZodEnum<{
266
+ strict: "strict";
267
+ minimal: "minimal";
268
+ off: "off";
269
+ }>>;
270
+ }, z.core.$strip>>;
271
+ }, z.core.$strip>;
1086
272
  export type McpolyglotConfig = z.infer<typeof ConfigSchema>;
1087
273
  export type SqlSourceConfig = z.infer<typeof SqlSourceSchema>;
1088
274
  export type MongoSourceConfig = z.infer<typeof MongoSourceSchema>;