@mcpolyglot/config 0.0.2 → 0.2.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,1093 +1,330 @@
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
+ policy: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
37
+ pool: z.ZodOptional<z.ZodObject<{
38
+ max: z.ZodOptional<z.ZodNumber>;
39
+ idleTimeoutMs: z.ZodOptional<z.ZodNumber>;
40
+ }, z.core.$strict>>;
41
+ maxConcurrentQueries: z.ZodOptional<z.ZodNumber>;
42
+ }, z.core.$strip>;
110
43
  declare const MongoSourceSchema: z.ZodObject<{
111
44
  id: z.ZodString;
112
45
  kind: z.ZodLiteral<"mongo">;
113
46
  url: z.ZodString;
114
47
  database: z.ZodOptional<z.ZodString>;
115
- scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<["schema:read", "tables:read", "tables:write", "query:raw", "http:call"]>, "many">>;
48
+ scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
49
+ "schema:read": "schema:read";
50
+ "tables:read": "tables:read";
51
+ "tables:write": "tables:write";
52
+ "query:raw": "query:raw";
53
+ "http:call": "http:call";
54
+ }>>>;
116
55
  limits: z.ZodDefault<z.ZodObject<{
117
56
  rowCap: z.ZodDefault<z.ZodNumber>;
118
57
  timeoutMs: z.ZodDefault<z.ZodNumber>;
119
58
  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
- }>>;
59
+ }, z.core.$strip>>;
129
60
  redact: z.ZodDefault<z.ZodObject<{
130
- columns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
61
+ columns: z.ZodDefault<z.ZodArray<z.ZodString>>;
131
62
  patterns: z.ZodDefault<z.ZodArray<z.ZodObject<{
132
63
  name: z.ZodString;
133
64
  regex: z.ZodString;
134
65
  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
- }>;
66
+ }, z.core.$strip>>>;
67
+ }, z.core.$strip>>;
68
+ }, z.core.$strip>;
198
69
  declare const OpenApiSourceSchema: z.ZodObject<{
199
70
  id: z.ZodString;
200
71
  kind: z.ZodLiteral<"openapi">;
201
72
  spec: z.ZodString;
202
73
  baseUrl: z.ZodString;
203
- auth: z.ZodDefault<z.ZodUnion<[z.ZodObject<{
74
+ auth: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
204
75
  type: z.ZodLiteral<"none">;
205
- }, "strip", z.ZodTypeAny, {
206
- type: "none";
207
- }, {
208
- type: "none";
209
- }>, z.ZodObject<{
76
+ }, z.core.$strip>, z.ZodObject<{
210
77
  type: z.ZodLiteral<"bearer">;
211
78
  token: z.ZodString;
212
- }, "strip", z.ZodTypeAny, {
213
- type: "bearer";
214
- token: string;
215
- }, {
216
- type: "bearer";
217
- token: string;
218
- }>, z.ZodObject<{
79
+ }, z.core.$strip>, z.ZodObject<{
219
80
  type: z.ZodLiteral<"apiKey">;
220
81
  header: z.ZodString;
221
82
  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<{
83
+ }, z.core.$strip>, z.ZodObject<{
231
84
  type: z.ZodLiteral<"basic">;
232
85
  username: z.ZodString;
233
86
  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">>;
87
+ }, z.core.$strip>]>>;
88
+ allowMethods: z.ZodDefault<z.ZodArray<z.ZodEnum<{
89
+ GET: "GET";
90
+ HEAD: "HEAD";
91
+ OPTIONS: "OPTIONS";
92
+ POST: "POST";
93
+ PUT: "PUT";
94
+ PATCH: "PATCH";
95
+ DELETE: "DELETE";
96
+ }>>>;
97
+ scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
98
+ "schema:read": "schema:read";
99
+ "tables:read": "tables:read";
100
+ "tables:write": "tables:write";
101
+ "query:raw": "query:raw";
102
+ "http:call": "http:call";
103
+ }>>>;
245
104
  limits: z.ZodDefault<z.ZodObject<{
246
105
  rowCap: z.ZodDefault<z.ZodNumber>;
247
106
  timeoutMs: z.ZodDefault<z.ZodNumber>;
248
107
  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
- }>>;
108
+ }, z.core.$strip>>;
258
109
  redact: z.ZodDefault<z.ZodObject<{
259
- columns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
110
+ columns: z.ZodDefault<z.ZodArray<z.ZodString>>;
260
111
  patterns: z.ZodDefault<z.ZodArray<z.ZodObject<{
261
112
  name: z.ZodString;
262
113
  regex: z.ZodString;
263
114
  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<{
115
+ }, z.core.$strip>>>;
116
+ }, z.core.$strip>>;
117
+ }, z.core.$strip>;
118
+ declare const TransportSchema: z.ZodUnion<readonly [z.ZodObject<{
358
119
  kind: z.ZodLiteral<"stdio">;
359
- }, "strip", z.ZodTypeAny, {
360
- kind: "stdio";
361
- }, {
362
- kind: "stdio";
363
- }>, z.ZodObject<{
120
+ }, z.core.$strip>, z.ZodObject<{
364
121
  kind: z.ZodLiteral<"http">;
365
122
  host: z.ZodDefault<z.ZodString>;
366
123
  port: z.ZodDefault<z.ZodNumber>;
367
- auth: z.ZodDefault<z.ZodUnion<[z.ZodObject<{
124
+ auth: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
368
125
  type: z.ZodLiteral<"bearer">;
369
126
  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<{
127
+ }, z.core.$strip>, z.ZodObject<{
377
128
  type: z.ZodLiteral<"oauth">;
378
129
  issuer: z.ZodString;
379
130
  audience: z.ZodString;
380
131
  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
- }>]>;
132
+ }, z.core.$strip>]>>;
133
+ }, z.core.$strip>]>;
134
+ declare const AgentSchema: z.ZodObject<{
135
+ id: z.ZodString;
136
+ tokens: z.ZodArray<z.ZodObject<{
137
+ hash: z.ZodString;
138
+ label: z.ZodOptional<z.ZodString>;
139
+ revoked: z.ZodDefault<z.ZodBoolean>;
140
+ }, z.core.$strip>>;
141
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
142
+ "schema:read": "schema:read";
143
+ "tables:read": "tables:read";
144
+ "tables:write": "tables:write";
145
+ "query:raw": "query:raw";
146
+ "http:call": "http:call";
147
+ }>>>;
148
+ sources: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
149
+ policy: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
150
+ }, z.core.$strip>>>;
151
+ }, z.core.$strip>;
419
152
  export declare const ConfigSchema: z.ZodObject<{
420
153
  server: z.ZodDefault<z.ZodObject<{
421
154
  name: z.ZodDefault<z.ZodString>;
422
155
  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<{
156
+ }, z.core.$strip>>;
157
+ transport: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
431
158
  kind: z.ZodLiteral<"stdio">;
432
- }, "strip", z.ZodTypeAny, {
433
- kind: "stdio";
434
- }, {
435
- kind: "stdio";
436
- }>, z.ZodObject<{
159
+ }, z.core.$strip>, z.ZodObject<{
437
160
  kind: z.ZodLiteral<"http">;
438
161
  host: z.ZodDefault<z.ZodString>;
439
162
  port: z.ZodDefault<z.ZodNumber>;
440
- auth: z.ZodDefault<z.ZodUnion<[z.ZodObject<{
163
+ auth: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
441
164
  type: z.ZodLiteral<"bearer">;
442
165
  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<{
166
+ }, z.core.$strip>, z.ZodObject<{
450
167
  type: z.ZodLiteral<"oauth">;
451
168
  issuer: z.ZodString;
452
169
  audience: z.ZodString;
453
170
  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<{
171
+ }, z.core.$strip>]>>;
172
+ }, z.core.$strip>]>>;
173
+ sources: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
493
174
  id: z.ZodString;
494
- kind: z.ZodEnum<["postgres", "mysql", "mariadb", "sqlite"]>;
175
+ kind: z.ZodEnum<{
176
+ postgres: "postgres";
177
+ mysql: "mysql";
178
+ mariadb: "mariadb";
179
+ sqlite: "sqlite";
180
+ }>;
495
181
  url: z.ZodString;
496
- scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<["schema:read", "tables:read", "tables:write", "query:raw", "http:call"]>, "many">>;
182
+ scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
183
+ "schema:read": "schema:read";
184
+ "tables:read": "tables:read";
185
+ "tables:write": "tables:write";
186
+ "query:raw": "query:raw";
187
+ "http:call": "http:call";
188
+ }>>>;
497
189
  perEntityTools: z.ZodDefault<z.ZodObject<{
498
190
  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
- }>>;
191
+ include: z.ZodOptional<z.ZodArray<z.ZodString>>;
192
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
193
+ }, z.core.$strip>>;
510
194
  limits: z.ZodDefault<z.ZodObject<{
511
195
  rowCap: z.ZodDefault<z.ZodNumber>;
512
196
  timeoutMs: z.ZodDefault<z.ZodNumber>;
513
197
  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
- }>>;
198
+ }, z.core.$strip>>;
523
199
  redact: z.ZodDefault<z.ZodObject<{
524
- columns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
200
+ columns: z.ZodDefault<z.ZodArray<z.ZodString>>;
525
201
  patterns: z.ZodDefault<z.ZodArray<z.ZodObject<{
526
202
  name: z.ZodString;
527
203
  regex: z.ZodString;
528
204
  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<{
205
+ }, z.core.$strip>>>;
206
+ }, z.core.$strip>>;
207
+ policy: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
208
+ pool: z.ZodOptional<z.ZodObject<{
209
+ max: z.ZodOptional<z.ZodNumber>;
210
+ idleTimeoutMs: z.ZodOptional<z.ZodNumber>;
211
+ }, z.core.$strict>>;
212
+ maxConcurrentQueries: z.ZodOptional<z.ZodNumber>;
213
+ }, z.core.$strip>, z.ZodObject<{
600
214
  id: z.ZodString;
601
215
  kind: z.ZodLiteral<"mongo">;
602
216
  url: z.ZodString;
603
217
  database: z.ZodOptional<z.ZodString>;
604
- scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<["schema:read", "tables:read", "tables:write", "query:raw", "http:call"]>, "many">>;
218
+ scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
219
+ "schema:read": "schema:read";
220
+ "tables:read": "tables:read";
221
+ "tables:write": "tables:write";
222
+ "query:raw": "query:raw";
223
+ "http:call": "http:call";
224
+ }>>>;
605
225
  limits: z.ZodDefault<z.ZodObject<{
606
226
  rowCap: z.ZodDefault<z.ZodNumber>;
607
227
  timeoutMs: z.ZodDefault<z.ZodNumber>;
608
228
  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
- }>>;
229
+ }, z.core.$strip>>;
618
230
  redact: z.ZodDefault<z.ZodObject<{
619
- columns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
231
+ columns: z.ZodDefault<z.ZodArray<z.ZodString>>;
620
232
  patterns: z.ZodDefault<z.ZodArray<z.ZodObject<{
621
233
  name: z.ZodString;
622
234
  regex: z.ZodString;
623
235
  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<{
236
+ }, z.core.$strip>>>;
237
+ }, z.core.$strip>>;
238
+ }, z.core.$strip>, z.ZodObject<{
687
239
  id: z.ZodString;
688
240
  kind: z.ZodLiteral<"openapi">;
689
241
  spec: z.ZodString;
690
242
  baseUrl: z.ZodString;
691
- auth: z.ZodDefault<z.ZodUnion<[z.ZodObject<{
243
+ auth: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
692
244
  type: z.ZodLiteral<"none">;
693
- }, "strip", z.ZodTypeAny, {
694
- type: "none";
695
- }, {
696
- type: "none";
697
- }>, z.ZodObject<{
245
+ }, z.core.$strip>, z.ZodObject<{
698
246
  type: z.ZodLiteral<"bearer">;
699
247
  token: z.ZodString;
700
- }, "strip", z.ZodTypeAny, {
701
- type: "bearer";
702
- token: string;
703
- }, {
704
- type: "bearer";
705
- token: string;
706
- }>, z.ZodObject<{
248
+ }, z.core.$strip>, z.ZodObject<{
707
249
  type: z.ZodLiteral<"apiKey">;
708
250
  header: z.ZodString;
709
251
  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<{
252
+ }, z.core.$strip>, z.ZodObject<{
719
253
  type: z.ZodLiteral<"basic">;
720
254
  username: z.ZodString;
721
255
  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">>;
256
+ }, z.core.$strip>]>>;
257
+ allowMethods: z.ZodDefault<z.ZodArray<z.ZodEnum<{
258
+ GET: "GET";
259
+ HEAD: "HEAD";
260
+ OPTIONS: "OPTIONS";
261
+ POST: "POST";
262
+ PUT: "PUT";
263
+ PATCH: "PATCH";
264
+ DELETE: "DELETE";
265
+ }>>>;
266
+ scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
267
+ "schema:read": "schema:read";
268
+ "tables:read": "tables:read";
269
+ "tables:write": "tables:write";
270
+ "query:raw": "query:raw";
271
+ "http:call": "http:call";
272
+ }>>>;
733
273
  limits: z.ZodDefault<z.ZodObject<{
734
274
  rowCap: z.ZodDefault<z.ZodNumber>;
735
275
  timeoutMs: z.ZodDefault<z.ZodNumber>;
736
276
  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
- }>>;
277
+ }, z.core.$strip>>;
746
278
  redact: z.ZodDefault<z.ZodObject<{
747
- columns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
279
+ columns: z.ZodDefault<z.ZodArray<z.ZodString>>;
748
280
  patterns: z.ZodDefault<z.ZodArray<z.ZodObject<{
749
281
  name: z.ZodString;
750
282
  regex: z.ZodString;
751
283
  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">;
284
+ }, z.core.$strip>>>;
285
+ }, z.core.$strip>>;
286
+ }, z.core.$strip>]>>;
845
287
  audit: z.ZodDefault<z.ZodObject<{
846
- path: z.ZodDefault<z.ZodString>;
847
- }, "strip", z.ZodTypeAny, {
848
- path: string;
849
- }, {
850
- path?: string | undefined;
851
- }>>;
288
+ console: z.ZodDefault<z.ZodBoolean>;
289
+ path: z.ZodOptional<z.ZodString>;
290
+ webhookUrl: z.ZodOptional<z.ZodString>;
291
+ }, z.core.$strip>>;
852
292
  rateLimit: z.ZodDefault<z.ZodObject<{
853
293
  defaultPerMinute: z.ZodDefault<z.ZodNumber>;
854
294
  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
- }>>;
295
+ }, z.core.$strip>>;
862
296
  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
- }>;
297
+ wrapMode: z.ZodDefault<z.ZodEnum<{
298
+ strict: "strict";
299
+ minimal: "minimal";
300
+ off: "off";
301
+ }>>;
302
+ }, z.core.$strip>>;
303
+ agents: z.ZodOptional<z.ZodArray<z.ZodObject<{
304
+ id: z.ZodString;
305
+ tokens: z.ZodArray<z.ZodObject<{
306
+ hash: z.ZodString;
307
+ label: z.ZodOptional<z.ZodString>;
308
+ revoked: z.ZodDefault<z.ZodBoolean>;
309
+ }, z.core.$strip>>;
310
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
311
+ "schema:read": "schema:read";
312
+ "tables:read": "tables:read";
313
+ "tables:write": "tables:write";
314
+ "query:raw": "query:raw";
315
+ "http:call": "http:call";
316
+ }>>>;
317
+ sources: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
318
+ policy: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
319
+ }, z.core.$strip>>>;
320
+ }, z.core.$strip>>>;
321
+ }, z.core.$strip>;
1086
322
  export type McpolyglotConfig = z.infer<typeof ConfigSchema>;
1087
323
  export type SqlSourceConfig = z.infer<typeof SqlSourceSchema>;
1088
324
  export type MongoSourceConfig = z.infer<typeof MongoSourceSchema>;
1089
325
  export type OpenApiSourceConfig = z.infer<typeof OpenApiSourceSchema>;
1090
326
  export type SourceConfig = SqlSourceConfig | MongoSourceConfig | OpenApiSourceConfig;
327
+ export type AgentConfig = z.infer<typeof AgentSchema>;
1091
328
  export type TransportConfig = z.infer<typeof TransportSchema>;
1092
329
  /**
1093
330
  * Identity helper for type-safe `mcpolyglot.config.ts` files. Wraps the config so editors