@itphx/synth-shared 0.6.0 → 0.7.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.
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +14 -0
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/defaults.test.js +12 -0
- package/dist/config/defaults.test.js.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +5 -1
- package/dist/config/loader.js.map +1 -1
- package/dist/config/loader.test.d.ts +2 -0
- package/dist/config/loader.test.d.ts.map +1 -0
- package/dist/config/loader.test.js +43 -0
- package/dist/config/loader.test.js.map +1 -0
- package/dist/config/types.d.ts +273 -81
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js +42 -3
- package/dist/config/types.js.map +1 -1
- package/dist/config/types.test.d.ts +2 -0
- package/dist/config/types.test.d.ts.map +1 -0
- package/dist/config/types.test.js +63 -0
- package/dist/config/types.test.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/schemas/index.d.ts +147 -17
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +65 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/types/index.d.ts +418 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +104 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/permission.d.ts +9 -0
- package/dist/types/permission.d.ts.map +1 -1
- package/dist/types/tools.d.ts +10 -0
- package/dist/types/tools.d.ts.map +1 -1
- package/dist/utils/index.d.ts +13 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +33 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/config/types.d.ts
CHANGED
|
@@ -115,16 +115,20 @@ export declare const llmConfigSchema: z.ZodObject<{
|
|
|
115
115
|
defaultModel: z.ZodDefault<z.ZodString>;
|
|
116
116
|
maxRetries: z.ZodDefault<z.ZodNumber>;
|
|
117
117
|
timeout: z.ZodDefault<z.ZodNumber>;
|
|
118
|
+
/** AD-070 §2.2: политика prompt-cache — auto (ставить маркеры) | none (отключить). */
|
|
119
|
+
cache: z.ZodDefault<z.ZodEnum<["auto", "none"]>>;
|
|
118
120
|
}, "strip", z.ZodTypeAny, {
|
|
119
121
|
defaultProvider: string;
|
|
120
122
|
defaultModel: string;
|
|
121
123
|
maxRetries: number;
|
|
122
124
|
timeout: number;
|
|
125
|
+
cache: "none" | "auto";
|
|
123
126
|
}, {
|
|
124
127
|
defaultProvider?: string | undefined;
|
|
125
128
|
defaultModel?: string | undefined;
|
|
126
129
|
maxRetries?: number | undefined;
|
|
127
130
|
timeout?: number | undefined;
|
|
131
|
+
cache?: "none" | "auto" | undefined;
|
|
128
132
|
}>;
|
|
129
133
|
export declare const coreConfigSchema: z.ZodObject<{
|
|
130
134
|
port: z.ZodDefault<z.ZodNumber>;
|
|
@@ -250,7 +254,9 @@ export declare const summarizationConfigSchema: z.ZodObject<{
|
|
|
250
254
|
promptFile?: string | undefined;
|
|
251
255
|
}>;
|
|
252
256
|
export declare const mcpServerConfigSchema: z.ZodObject<{
|
|
253
|
-
type: z.ZodEnum<["stdio", "sse"]>;
|
|
257
|
+
type: z.ZodEnum<["stdio", "sse", "http"]>;
|
|
258
|
+
/** AD-071 §2.2: человекочитаемое описание сервера (попадает в блок `mcp.servers`). */
|
|
259
|
+
description: z.ZodOptional<z.ZodString>;
|
|
254
260
|
command: z.ZodOptional<z.ZodString>;
|
|
255
261
|
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
256
262
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -261,31 +267,49 @@ export declare const mcpServerConfigSchema: z.ZodObject<{
|
|
|
261
267
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
262
268
|
connectTimeout: z.ZodOptional<z.ZodNumber>;
|
|
263
269
|
}, "strip", z.ZodTypeAny, {
|
|
264
|
-
type: "stdio" | "sse";
|
|
270
|
+
type: "stdio" | "sse" | "http";
|
|
271
|
+
description?: string | undefined;
|
|
272
|
+
enabled?: boolean | undefined;
|
|
265
273
|
url?: string | undefined;
|
|
274
|
+
timeout?: number | undefined;
|
|
266
275
|
command?: string | undefined;
|
|
267
276
|
args?: string[] | undefined;
|
|
268
|
-
enabled?: boolean | undefined;
|
|
269
|
-
timeout?: number | undefined;
|
|
270
277
|
env?: Record<string, string> | undefined;
|
|
271
278
|
headers?: Record<string, string> | undefined;
|
|
272
279
|
enabledByDefault?: boolean | undefined;
|
|
273
280
|
connectTimeout?: number | undefined;
|
|
274
281
|
}, {
|
|
275
|
-
type: "stdio" | "sse";
|
|
282
|
+
type: "stdio" | "sse" | "http";
|
|
283
|
+
description?: string | undefined;
|
|
284
|
+
enabled?: boolean | undefined;
|
|
276
285
|
url?: string | undefined;
|
|
286
|
+
timeout?: number | undefined;
|
|
277
287
|
command?: string | undefined;
|
|
278
288
|
args?: string[] | undefined;
|
|
279
|
-
enabled?: boolean | undefined;
|
|
280
|
-
timeout?: number | undefined;
|
|
281
289
|
env?: Record<string, string> | undefined;
|
|
282
290
|
headers?: Record<string, string> | undefined;
|
|
283
291
|
enabledByDefault?: boolean | undefined;
|
|
284
292
|
connectTimeout?: number | undefined;
|
|
285
293
|
}>;
|
|
294
|
+
/**
|
|
295
|
+
* AD-071 §2.3.1: политика сетевого доступа пользовательских HTTP MCP-серверов.
|
|
296
|
+
* Дефолт — `deny` приватных/служебных диапазонов (SSRF/egress).
|
|
297
|
+
*/
|
|
298
|
+
export declare const mcpNetworkPolicySchema: z.ZodObject<{
|
|
299
|
+
mode: z.ZodDefault<z.ZodEnum<["allow", "deny"]>>;
|
|
300
|
+
list: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
301
|
+
}, "strip", z.ZodTypeAny, {
|
|
302
|
+
mode: "allow" | "deny";
|
|
303
|
+
list: string[];
|
|
304
|
+
}, {
|
|
305
|
+
mode?: "allow" | "deny" | undefined;
|
|
306
|
+
list?: string[] | undefined;
|
|
307
|
+
}>;
|
|
286
308
|
export declare const mcpConfigSchema: z.ZodObject<{
|
|
287
309
|
servers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
288
|
-
type: z.ZodEnum<["stdio", "sse"]>;
|
|
310
|
+
type: z.ZodEnum<["stdio", "sse", "http"]>;
|
|
311
|
+
/** AD-071 §2.2: человекочитаемое описание сервера (попадает в блок `mcp.servers`). */
|
|
312
|
+
description: z.ZodOptional<z.ZodString>;
|
|
289
313
|
command: z.ZodOptional<z.ZodString>;
|
|
290
314
|
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
291
315
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -296,54 +320,130 @@ export declare const mcpConfigSchema: z.ZodObject<{
|
|
|
296
320
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
297
321
|
connectTimeout: z.ZodOptional<z.ZodNumber>;
|
|
298
322
|
}, "strip", z.ZodTypeAny, {
|
|
299
|
-
type: "stdio" | "sse";
|
|
323
|
+
type: "stdio" | "sse" | "http";
|
|
324
|
+
description?: string | undefined;
|
|
325
|
+
enabled?: boolean | undefined;
|
|
300
326
|
url?: string | undefined;
|
|
327
|
+
timeout?: number | undefined;
|
|
301
328
|
command?: string | undefined;
|
|
302
329
|
args?: string[] | undefined;
|
|
303
|
-
enabled?: boolean | undefined;
|
|
304
|
-
timeout?: number | undefined;
|
|
305
330
|
env?: Record<string, string> | undefined;
|
|
306
331
|
headers?: Record<string, string> | undefined;
|
|
307
332
|
enabledByDefault?: boolean | undefined;
|
|
308
333
|
connectTimeout?: number | undefined;
|
|
309
334
|
}, {
|
|
310
|
-
type: "stdio" | "sse";
|
|
335
|
+
type: "stdio" | "sse" | "http";
|
|
336
|
+
description?: string | undefined;
|
|
337
|
+
enabled?: boolean | undefined;
|
|
311
338
|
url?: string | undefined;
|
|
339
|
+
timeout?: number | undefined;
|
|
312
340
|
command?: string | undefined;
|
|
313
341
|
args?: string[] | undefined;
|
|
314
|
-
enabled?: boolean | undefined;
|
|
315
|
-
timeout?: number | undefined;
|
|
316
342
|
env?: Record<string, string> | undefined;
|
|
317
343
|
headers?: Record<string, string> | undefined;
|
|
318
344
|
enabledByDefault?: boolean | undefined;
|
|
319
345
|
connectTimeout?: number | undefined;
|
|
320
346
|
}>>>;
|
|
347
|
+
networkPolicy: z.ZodDefault<z.ZodObject<{
|
|
348
|
+
mode: z.ZodDefault<z.ZodEnum<["allow", "deny"]>>;
|
|
349
|
+
list: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
350
|
+
}, "strip", z.ZodTypeAny, {
|
|
351
|
+
mode: "allow" | "deny";
|
|
352
|
+
list: string[];
|
|
353
|
+
}, {
|
|
354
|
+
mode?: "allow" | "deny" | undefined;
|
|
355
|
+
list?: string[] | undefined;
|
|
356
|
+
}>>;
|
|
357
|
+
/**
|
|
358
|
+
* AD-071 §2.3: глобальная админская политика включения **MCP**-инструментов.
|
|
359
|
+
* Независима от `tools.policy` (только встроенные). Per-session override —
|
|
360
|
+
* `SessionSettings.mcpPolicy`.
|
|
361
|
+
*/
|
|
362
|
+
policy: z.ZodDefault<z.ZodEnum<["consistency", "available", "auto"]>>;
|
|
321
363
|
}, "strip", z.ZodTypeAny, {
|
|
322
364
|
servers: Record<string, {
|
|
323
|
-
type: "stdio" | "sse";
|
|
365
|
+
type: "stdio" | "sse" | "http";
|
|
366
|
+
description?: string | undefined;
|
|
367
|
+
enabled?: boolean | undefined;
|
|
324
368
|
url?: string | undefined;
|
|
369
|
+
timeout?: number | undefined;
|
|
325
370
|
command?: string | undefined;
|
|
326
371
|
args?: string[] | undefined;
|
|
327
|
-
enabled?: boolean | undefined;
|
|
328
|
-
timeout?: number | undefined;
|
|
329
372
|
env?: Record<string, string> | undefined;
|
|
330
373
|
headers?: Record<string, string> | undefined;
|
|
331
374
|
enabledByDefault?: boolean | undefined;
|
|
332
375
|
connectTimeout?: number | undefined;
|
|
333
376
|
}>;
|
|
377
|
+
networkPolicy: {
|
|
378
|
+
mode: "allow" | "deny";
|
|
379
|
+
list: string[];
|
|
380
|
+
};
|
|
381
|
+
policy: "auto" | "consistency" | "available";
|
|
334
382
|
}, {
|
|
335
383
|
servers?: Record<string, {
|
|
336
|
-
type: "stdio" | "sse";
|
|
384
|
+
type: "stdio" | "sse" | "http";
|
|
385
|
+
description?: string | undefined;
|
|
386
|
+
enabled?: boolean | undefined;
|
|
337
387
|
url?: string | undefined;
|
|
388
|
+
timeout?: number | undefined;
|
|
338
389
|
command?: string | undefined;
|
|
339
390
|
args?: string[] | undefined;
|
|
340
|
-
enabled?: boolean | undefined;
|
|
341
|
-
timeout?: number | undefined;
|
|
342
391
|
env?: Record<string, string> | undefined;
|
|
343
392
|
headers?: Record<string, string> | undefined;
|
|
344
393
|
enabledByDefault?: boolean | undefined;
|
|
345
394
|
connectTimeout?: number | undefined;
|
|
346
395
|
}> | undefined;
|
|
396
|
+
networkPolicy?: {
|
|
397
|
+
mode?: "allow" | "deny" | undefined;
|
|
398
|
+
list?: string[] | undefined;
|
|
399
|
+
} | undefined;
|
|
400
|
+
policy?: "auto" | "consistency" | "available" | undefined;
|
|
401
|
+
}>;
|
|
402
|
+
/**
|
|
403
|
+
* AD-071 §2.6: instance-wide жёсткое отключение инструментов администратором.
|
|
404
|
+
* Отключённые тулы не попадают в запрос независимо от `tools.policy`.
|
|
405
|
+
* `runtime`-capability неотключаема (ядро сессии).
|
|
406
|
+
*/
|
|
407
|
+
export declare const toolsDisabledConfigSchema: z.ZodObject<{
|
|
408
|
+
capabilities: z.ZodDefault<z.ZodArray<z.ZodEnum<[string, ...string[]]>, "many">> | z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
409
|
+
tools: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
410
|
+
}, "strip", z.ZodTypeAny, {
|
|
411
|
+
capabilities: string[];
|
|
412
|
+
tools: string[];
|
|
413
|
+
}, {
|
|
414
|
+
capabilities?: string[] | undefined;
|
|
415
|
+
tools?: string[] | undefined;
|
|
416
|
+
}>;
|
|
417
|
+
/**
|
|
418
|
+
* AD-071 §2.3: глобальная админская политика включения **встроенных**
|
|
419
|
+
* инструментов (MCP — отдельная `mcp.policy`). Per-session override —
|
|
420
|
+
* `SessionSettings.toolsPolicy`.
|
|
421
|
+
*/
|
|
422
|
+
export declare const toolsConfigSchema: z.ZodObject<{
|
|
423
|
+
policy: z.ZodDefault<z.ZodEnum<["consistency", "available", "auto"]>>;
|
|
424
|
+
/** AD-071 §2.6: instance-wide отключение инструментов (admin). */
|
|
425
|
+
disabled: z.ZodDefault<z.ZodObject<{
|
|
426
|
+
capabilities: z.ZodDefault<z.ZodArray<z.ZodEnum<[string, ...string[]]>, "many">> | z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
427
|
+
tools: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
428
|
+
}, "strip", z.ZodTypeAny, {
|
|
429
|
+
capabilities: string[];
|
|
430
|
+
tools: string[];
|
|
431
|
+
}, {
|
|
432
|
+
capabilities?: string[] | undefined;
|
|
433
|
+
tools?: string[] | undefined;
|
|
434
|
+
}>>;
|
|
435
|
+
}, "strip", z.ZodTypeAny, {
|
|
436
|
+
policy: "auto" | "consistency" | "available";
|
|
437
|
+
disabled: {
|
|
438
|
+
capabilities: string[];
|
|
439
|
+
tools: string[];
|
|
440
|
+
};
|
|
441
|
+
}, {
|
|
442
|
+
policy?: "auto" | "consistency" | "available" | undefined;
|
|
443
|
+
disabled?: {
|
|
444
|
+
capabilities?: string[] | undefined;
|
|
445
|
+
tools?: string[] | undefined;
|
|
446
|
+
} | undefined;
|
|
347
447
|
}>;
|
|
348
448
|
export declare const promptInjectionConfigSchema: z.ZodObject<{
|
|
349
449
|
/** Глобальный выключатель защиты от Indirect Prompt Injection. */
|
|
@@ -754,11 +854,7 @@ export declare const routerConfigSchema: z.ZodObject<{
|
|
|
754
854
|
enabled?: boolean | undefined;
|
|
755
855
|
}>>;
|
|
756
856
|
}, "strip", z.ZodTypeAny, {
|
|
757
|
-
|
|
758
|
-
provider: string;
|
|
759
|
-
model: string;
|
|
760
|
-
enabled: boolean;
|
|
761
|
-
};
|
|
857
|
+
enabled: boolean;
|
|
762
858
|
content: {
|
|
763
859
|
coding: {
|
|
764
860
|
provider: string;
|
|
@@ -781,7 +877,6 @@ export declare const routerConfigSchema: z.ZodObject<{
|
|
|
781
877
|
expensiveModel: string;
|
|
782
878
|
maxCheapTokens: number;
|
|
783
879
|
};
|
|
784
|
-
enabled: boolean;
|
|
785
880
|
strategy: "auto" | "content" | "cost" | "content+cost";
|
|
786
881
|
escalation: {
|
|
787
882
|
enabled: boolean;
|
|
@@ -791,12 +886,13 @@ export declare const routerConfigSchema: z.ZodObject<{
|
|
|
791
886
|
fallbackModel: string;
|
|
792
887
|
checks: ("min_length" | "constraint" | "self_check")[];
|
|
793
888
|
};
|
|
889
|
+
subagent: {
|
|
890
|
+
provider: string;
|
|
891
|
+
model: string;
|
|
892
|
+
enabled: boolean;
|
|
893
|
+
};
|
|
794
894
|
}, {
|
|
795
|
-
|
|
796
|
-
provider?: string | undefined;
|
|
797
|
-
model?: string | undefined;
|
|
798
|
-
enabled?: boolean | undefined;
|
|
799
|
-
} | undefined;
|
|
895
|
+
enabled?: boolean | undefined;
|
|
800
896
|
content?: {
|
|
801
897
|
coding?: {
|
|
802
898
|
provider?: string | undefined;
|
|
@@ -819,7 +915,6 @@ export declare const routerConfigSchema: z.ZodObject<{
|
|
|
819
915
|
expensiveModel?: string | undefined;
|
|
820
916
|
maxCheapTokens?: number | undefined;
|
|
821
917
|
} | undefined;
|
|
822
|
-
enabled?: boolean | undefined;
|
|
823
918
|
strategy?: "auto" | "content" | "cost" | "content+cost" | undefined;
|
|
824
919
|
escalation?: {
|
|
825
920
|
enabled?: boolean | undefined;
|
|
@@ -829,6 +924,11 @@ export declare const routerConfigSchema: z.ZodObject<{
|
|
|
829
924
|
fallbackModel?: string | undefined;
|
|
830
925
|
checks?: ("min_length" | "constraint" | "self_check")[] | undefined;
|
|
831
926
|
} | undefined;
|
|
927
|
+
subagent?: {
|
|
928
|
+
provider?: string | undefined;
|
|
929
|
+
model?: string | undefined;
|
|
930
|
+
enabled?: boolean | undefined;
|
|
931
|
+
} | undefined;
|
|
832
932
|
}>;
|
|
833
933
|
export declare const remoteConfigSchema: z.ZodObject<{
|
|
834
934
|
/** Включён ли гибридный режим: локальный core подключается к удалённому backend. */
|
|
@@ -877,7 +977,7 @@ export declare const remoteConfigSchema: z.ZodObject<{
|
|
|
877
977
|
issuer: string;
|
|
878
978
|
clientId: string;
|
|
879
979
|
};
|
|
880
|
-
llm: "
|
|
980
|
+
llm: "server" | "local";
|
|
881
981
|
worlds: {
|
|
882
982
|
local: boolean;
|
|
883
983
|
remote: boolean;
|
|
@@ -893,7 +993,7 @@ export declare const remoteConfigSchema: z.ZodObject<{
|
|
|
893
993
|
issuer?: string | undefined;
|
|
894
994
|
clientId?: string | undefined;
|
|
895
995
|
} | undefined;
|
|
896
|
-
llm?: "
|
|
996
|
+
llm?: "server" | "local" | undefined;
|
|
897
997
|
worlds?: {
|
|
898
998
|
local?: boolean | undefined;
|
|
899
999
|
remote?: boolean | undefined;
|
|
@@ -1017,16 +1117,20 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1017
1117
|
defaultModel: z.ZodDefault<z.ZodString>;
|
|
1018
1118
|
maxRetries: z.ZodDefault<z.ZodNumber>;
|
|
1019
1119
|
timeout: z.ZodDefault<z.ZodNumber>;
|
|
1120
|
+
/** AD-070 §2.2: политика prompt-cache — auto (ставить маркеры) | none (отключить). */
|
|
1121
|
+
cache: z.ZodDefault<z.ZodEnum<["auto", "none"]>>;
|
|
1020
1122
|
}, "strip", z.ZodTypeAny, {
|
|
1021
1123
|
defaultProvider: string;
|
|
1022
1124
|
defaultModel: string;
|
|
1023
1125
|
maxRetries: number;
|
|
1024
1126
|
timeout: number;
|
|
1127
|
+
cache: "none" | "auto";
|
|
1025
1128
|
}, {
|
|
1026
1129
|
defaultProvider?: string | undefined;
|
|
1027
1130
|
defaultModel?: string | undefined;
|
|
1028
1131
|
maxRetries?: number | undefined;
|
|
1029
1132
|
timeout?: number | undefined;
|
|
1133
|
+
cache?: "none" | "auto" | undefined;
|
|
1030
1134
|
}>>;
|
|
1031
1135
|
core: z.ZodDefault<z.ZodObject<{
|
|
1032
1136
|
port: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1153,7 +1257,9 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1153
1257
|
}>>;
|
|
1154
1258
|
mcp: z.ZodDefault<z.ZodObject<{
|
|
1155
1259
|
servers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1156
|
-
type: z.ZodEnum<["stdio", "sse"]>;
|
|
1260
|
+
type: z.ZodEnum<["stdio", "sse", "http"]>;
|
|
1261
|
+
/** AD-071 §2.2: человекочитаемое описание сервера (попадает в блок `mcp.servers`). */
|
|
1262
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1157
1263
|
command: z.ZodOptional<z.ZodString>;
|
|
1158
1264
|
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1159
1265
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -1164,54 +1270,110 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1164
1270
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
1165
1271
|
connectTimeout: z.ZodOptional<z.ZodNumber>;
|
|
1166
1272
|
}, "strip", z.ZodTypeAny, {
|
|
1167
|
-
type: "stdio" | "sse";
|
|
1273
|
+
type: "stdio" | "sse" | "http";
|
|
1274
|
+
description?: string | undefined;
|
|
1275
|
+
enabled?: boolean | undefined;
|
|
1168
1276
|
url?: string | undefined;
|
|
1277
|
+
timeout?: number | undefined;
|
|
1169
1278
|
command?: string | undefined;
|
|
1170
1279
|
args?: string[] | undefined;
|
|
1171
|
-
enabled?: boolean | undefined;
|
|
1172
|
-
timeout?: number | undefined;
|
|
1173
1280
|
env?: Record<string, string> | undefined;
|
|
1174
1281
|
headers?: Record<string, string> | undefined;
|
|
1175
1282
|
enabledByDefault?: boolean | undefined;
|
|
1176
1283
|
connectTimeout?: number | undefined;
|
|
1177
1284
|
}, {
|
|
1178
|
-
type: "stdio" | "sse";
|
|
1285
|
+
type: "stdio" | "sse" | "http";
|
|
1286
|
+
description?: string | undefined;
|
|
1287
|
+
enabled?: boolean | undefined;
|
|
1179
1288
|
url?: string | undefined;
|
|
1289
|
+
timeout?: number | undefined;
|
|
1180
1290
|
command?: string | undefined;
|
|
1181
1291
|
args?: string[] | undefined;
|
|
1182
|
-
enabled?: boolean | undefined;
|
|
1183
|
-
timeout?: number | undefined;
|
|
1184
1292
|
env?: Record<string, string> | undefined;
|
|
1185
1293
|
headers?: Record<string, string> | undefined;
|
|
1186
1294
|
enabledByDefault?: boolean | undefined;
|
|
1187
1295
|
connectTimeout?: number | undefined;
|
|
1188
1296
|
}>>>;
|
|
1297
|
+
networkPolicy: z.ZodDefault<z.ZodObject<{
|
|
1298
|
+
mode: z.ZodDefault<z.ZodEnum<["allow", "deny"]>>;
|
|
1299
|
+
list: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1300
|
+
}, "strip", z.ZodTypeAny, {
|
|
1301
|
+
mode: "allow" | "deny";
|
|
1302
|
+
list: string[];
|
|
1303
|
+
}, {
|
|
1304
|
+
mode?: "allow" | "deny" | undefined;
|
|
1305
|
+
list?: string[] | undefined;
|
|
1306
|
+
}>>;
|
|
1307
|
+
/**
|
|
1308
|
+
* AD-071 §2.3: глобальная админская политика включения **MCP**-инструментов.
|
|
1309
|
+
* Независима от `tools.policy` (только встроенные). Per-session override —
|
|
1310
|
+
* `SessionSettings.mcpPolicy`.
|
|
1311
|
+
*/
|
|
1312
|
+
policy: z.ZodDefault<z.ZodEnum<["consistency", "available", "auto"]>>;
|
|
1189
1313
|
}, "strip", z.ZodTypeAny, {
|
|
1190
1314
|
servers: Record<string, {
|
|
1191
|
-
type: "stdio" | "sse";
|
|
1315
|
+
type: "stdio" | "sse" | "http";
|
|
1316
|
+
description?: string | undefined;
|
|
1317
|
+
enabled?: boolean | undefined;
|
|
1192
1318
|
url?: string | undefined;
|
|
1319
|
+
timeout?: number | undefined;
|
|
1193
1320
|
command?: string | undefined;
|
|
1194
1321
|
args?: string[] | undefined;
|
|
1195
|
-
enabled?: boolean | undefined;
|
|
1196
|
-
timeout?: number | undefined;
|
|
1197
1322
|
env?: Record<string, string> | undefined;
|
|
1198
1323
|
headers?: Record<string, string> | undefined;
|
|
1199
1324
|
enabledByDefault?: boolean | undefined;
|
|
1200
1325
|
connectTimeout?: number | undefined;
|
|
1201
1326
|
}>;
|
|
1327
|
+
networkPolicy: {
|
|
1328
|
+
mode: "allow" | "deny";
|
|
1329
|
+
list: string[];
|
|
1330
|
+
};
|
|
1331
|
+
policy: "auto" | "consistency" | "available";
|
|
1202
1332
|
}, {
|
|
1203
1333
|
servers?: Record<string, {
|
|
1204
|
-
type: "stdio" | "sse";
|
|
1334
|
+
type: "stdio" | "sse" | "http";
|
|
1335
|
+
description?: string | undefined;
|
|
1336
|
+
enabled?: boolean | undefined;
|
|
1205
1337
|
url?: string | undefined;
|
|
1338
|
+
timeout?: number | undefined;
|
|
1206
1339
|
command?: string | undefined;
|
|
1207
1340
|
args?: string[] | undefined;
|
|
1208
|
-
enabled?: boolean | undefined;
|
|
1209
|
-
timeout?: number | undefined;
|
|
1210
1341
|
env?: Record<string, string> | undefined;
|
|
1211
1342
|
headers?: Record<string, string> | undefined;
|
|
1212
1343
|
enabledByDefault?: boolean | undefined;
|
|
1213
1344
|
connectTimeout?: number | undefined;
|
|
1214
1345
|
}> | undefined;
|
|
1346
|
+
networkPolicy?: {
|
|
1347
|
+
mode?: "allow" | "deny" | undefined;
|
|
1348
|
+
list?: string[] | undefined;
|
|
1349
|
+
} | undefined;
|
|
1350
|
+
policy?: "auto" | "consistency" | "available" | undefined;
|
|
1351
|
+
}>>;
|
|
1352
|
+
tools: z.ZodDefault<z.ZodObject<{
|
|
1353
|
+
policy: z.ZodDefault<z.ZodEnum<["consistency", "available", "auto"]>>;
|
|
1354
|
+
/** AD-071 §2.6: instance-wide отключение инструментов (admin). */
|
|
1355
|
+
disabled: z.ZodDefault<z.ZodObject<{
|
|
1356
|
+
capabilities: z.ZodDefault<z.ZodArray<z.ZodEnum<[string, ...string[]]>, "many">> | z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1357
|
+
tools: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1358
|
+
}, "strip", z.ZodTypeAny, {
|
|
1359
|
+
capabilities: string[];
|
|
1360
|
+
tools: string[];
|
|
1361
|
+
}, {
|
|
1362
|
+
capabilities?: string[] | undefined;
|
|
1363
|
+
tools?: string[] | undefined;
|
|
1364
|
+
}>>;
|
|
1365
|
+
}, "strip", z.ZodTypeAny, {
|
|
1366
|
+
policy: "auto" | "consistency" | "available";
|
|
1367
|
+
disabled: {
|
|
1368
|
+
capabilities: string[];
|
|
1369
|
+
tools: string[];
|
|
1370
|
+
};
|
|
1371
|
+
}, {
|
|
1372
|
+
policy?: "auto" | "consistency" | "available" | undefined;
|
|
1373
|
+
disabled?: {
|
|
1374
|
+
capabilities?: string[] | undefined;
|
|
1375
|
+
tools?: string[] | undefined;
|
|
1376
|
+
} | undefined;
|
|
1215
1377
|
}>>;
|
|
1216
1378
|
router: z.ZodDefault<z.ZodObject<{
|
|
1217
1379
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -1332,11 +1494,7 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1332
1494
|
enabled?: boolean | undefined;
|
|
1333
1495
|
}>>;
|
|
1334
1496
|
}, "strip", z.ZodTypeAny, {
|
|
1335
|
-
|
|
1336
|
-
provider: string;
|
|
1337
|
-
model: string;
|
|
1338
|
-
enabled: boolean;
|
|
1339
|
-
};
|
|
1497
|
+
enabled: boolean;
|
|
1340
1498
|
content: {
|
|
1341
1499
|
coding: {
|
|
1342
1500
|
provider: string;
|
|
@@ -1359,7 +1517,6 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1359
1517
|
expensiveModel: string;
|
|
1360
1518
|
maxCheapTokens: number;
|
|
1361
1519
|
};
|
|
1362
|
-
enabled: boolean;
|
|
1363
1520
|
strategy: "auto" | "content" | "cost" | "content+cost";
|
|
1364
1521
|
escalation: {
|
|
1365
1522
|
enabled: boolean;
|
|
@@ -1369,12 +1526,13 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1369
1526
|
fallbackModel: string;
|
|
1370
1527
|
checks: ("min_length" | "constraint" | "self_check")[];
|
|
1371
1528
|
};
|
|
1529
|
+
subagent: {
|
|
1530
|
+
provider: string;
|
|
1531
|
+
model: string;
|
|
1532
|
+
enabled: boolean;
|
|
1533
|
+
};
|
|
1372
1534
|
}, {
|
|
1373
|
-
|
|
1374
|
-
provider?: string | undefined;
|
|
1375
|
-
model?: string | undefined;
|
|
1376
|
-
enabled?: boolean | undefined;
|
|
1377
|
-
} | undefined;
|
|
1535
|
+
enabled?: boolean | undefined;
|
|
1378
1536
|
content?: {
|
|
1379
1537
|
coding?: {
|
|
1380
1538
|
provider?: string | undefined;
|
|
@@ -1397,7 +1555,6 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1397
1555
|
expensiveModel?: string | undefined;
|
|
1398
1556
|
maxCheapTokens?: number | undefined;
|
|
1399
1557
|
} | undefined;
|
|
1400
|
-
enabled?: boolean | undefined;
|
|
1401
1558
|
strategy?: "auto" | "content" | "cost" | "content+cost" | undefined;
|
|
1402
1559
|
escalation?: {
|
|
1403
1560
|
enabled?: boolean | undefined;
|
|
@@ -1407,6 +1564,11 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1407
1564
|
fallbackModel?: string | undefined;
|
|
1408
1565
|
checks?: ("min_length" | "constraint" | "self_check")[] | undefined;
|
|
1409
1566
|
} | undefined;
|
|
1567
|
+
subagent?: {
|
|
1568
|
+
provider?: string | undefined;
|
|
1569
|
+
model?: string | undefined;
|
|
1570
|
+
enabled?: boolean | undefined;
|
|
1571
|
+
} | undefined;
|
|
1410
1572
|
}>>;
|
|
1411
1573
|
remote: z.ZodDefault<z.ZodObject<{
|
|
1412
1574
|
/** Включён ли гибридный режим: локальный core подключается к удалённому backend. */
|
|
@@ -1455,7 +1617,7 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1455
1617
|
issuer: string;
|
|
1456
1618
|
clientId: string;
|
|
1457
1619
|
};
|
|
1458
|
-
llm: "
|
|
1620
|
+
llm: "server" | "local";
|
|
1459
1621
|
worlds: {
|
|
1460
1622
|
local: boolean;
|
|
1461
1623
|
remote: boolean;
|
|
@@ -1471,7 +1633,7 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1471
1633
|
issuer?: string | undefined;
|
|
1472
1634
|
clientId?: string | undefined;
|
|
1473
1635
|
} | undefined;
|
|
1474
|
-
llm?: "
|
|
1636
|
+
llm?: "server" | "local" | undefined;
|
|
1475
1637
|
worlds?: {
|
|
1476
1638
|
local?: boolean | undefined;
|
|
1477
1639
|
remote?: boolean | undefined;
|
|
@@ -1623,17 +1785,23 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1623
1785
|
}, "strip", z.ZodTypeAny, {
|
|
1624
1786
|
mcp: {
|
|
1625
1787
|
servers: Record<string, {
|
|
1626
|
-
type: "stdio" | "sse";
|
|
1788
|
+
type: "stdio" | "sse" | "http";
|
|
1789
|
+
description?: string | undefined;
|
|
1790
|
+
enabled?: boolean | undefined;
|
|
1627
1791
|
url?: string | undefined;
|
|
1792
|
+
timeout?: number | undefined;
|
|
1628
1793
|
command?: string | undefined;
|
|
1629
1794
|
args?: string[] | undefined;
|
|
1630
|
-
enabled?: boolean | undefined;
|
|
1631
|
-
timeout?: number | undefined;
|
|
1632
1795
|
env?: Record<string, string> | undefined;
|
|
1633
1796
|
headers?: Record<string, string> | undefined;
|
|
1634
1797
|
enabledByDefault?: boolean | undefined;
|
|
1635
1798
|
connectTimeout?: number | undefined;
|
|
1636
1799
|
}>;
|
|
1800
|
+
networkPolicy: {
|
|
1801
|
+
mode: "allow" | "deny";
|
|
1802
|
+
list: string[];
|
|
1803
|
+
};
|
|
1804
|
+
policy: "auto" | "consistency" | "available";
|
|
1637
1805
|
};
|
|
1638
1806
|
summarization: {
|
|
1639
1807
|
provider: string;
|
|
@@ -1641,6 +1809,13 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1641
1809
|
temperature: number;
|
|
1642
1810
|
promptFile: string;
|
|
1643
1811
|
};
|
|
1812
|
+
tools: {
|
|
1813
|
+
policy: "auto" | "consistency" | "available";
|
|
1814
|
+
disabled: {
|
|
1815
|
+
capabilities: string[];
|
|
1816
|
+
tools: string[];
|
|
1817
|
+
};
|
|
1818
|
+
};
|
|
1644
1819
|
auth: {
|
|
1645
1820
|
debugMode: boolean;
|
|
1646
1821
|
sessionMaxAgeMinutes: number;
|
|
@@ -1671,6 +1846,7 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1671
1846
|
defaultModel: string;
|
|
1672
1847
|
maxRetries: number;
|
|
1673
1848
|
timeout: number;
|
|
1849
|
+
cache: "none" | "auto";
|
|
1674
1850
|
};
|
|
1675
1851
|
remote: {
|
|
1676
1852
|
enabled: boolean;
|
|
@@ -1681,7 +1857,7 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1681
1857
|
issuer: string;
|
|
1682
1858
|
clientId: string;
|
|
1683
1859
|
};
|
|
1684
|
-
llm: "
|
|
1860
|
+
llm: "server" | "local";
|
|
1685
1861
|
worlds: {
|
|
1686
1862
|
local: boolean;
|
|
1687
1863
|
remote: boolean;
|
|
@@ -1733,11 +1909,7 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1733
1909
|
enabledFiles: string[];
|
|
1734
1910
|
};
|
|
1735
1911
|
router: {
|
|
1736
|
-
|
|
1737
|
-
provider: string;
|
|
1738
|
-
model: string;
|
|
1739
|
-
enabled: boolean;
|
|
1740
|
-
};
|
|
1912
|
+
enabled: boolean;
|
|
1741
1913
|
content: {
|
|
1742
1914
|
coding: {
|
|
1743
1915
|
provider: string;
|
|
@@ -1760,7 +1932,6 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1760
1932
|
expensiveModel: string;
|
|
1761
1933
|
maxCheapTokens: number;
|
|
1762
1934
|
};
|
|
1763
|
-
enabled: boolean;
|
|
1764
1935
|
strategy: "auto" | "content" | "cost" | "content+cost";
|
|
1765
1936
|
escalation: {
|
|
1766
1937
|
enabled: boolean;
|
|
@@ -1770,6 +1941,11 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1770
1941
|
fallbackModel: string;
|
|
1771
1942
|
checks: ("min_length" | "constraint" | "self_check")[];
|
|
1772
1943
|
};
|
|
1944
|
+
subagent: {
|
|
1945
|
+
provider: string;
|
|
1946
|
+
model: string;
|
|
1947
|
+
enabled: boolean;
|
|
1948
|
+
};
|
|
1773
1949
|
};
|
|
1774
1950
|
microFirst: {
|
|
1775
1951
|
enabled: boolean;
|
|
@@ -1813,17 +1989,23 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1813
1989
|
}, {
|
|
1814
1990
|
mcp?: {
|
|
1815
1991
|
servers?: Record<string, {
|
|
1816
|
-
type: "stdio" | "sse";
|
|
1992
|
+
type: "stdio" | "sse" | "http";
|
|
1993
|
+
description?: string | undefined;
|
|
1994
|
+
enabled?: boolean | undefined;
|
|
1817
1995
|
url?: string | undefined;
|
|
1996
|
+
timeout?: number | undefined;
|
|
1818
1997
|
command?: string | undefined;
|
|
1819
1998
|
args?: string[] | undefined;
|
|
1820
|
-
enabled?: boolean | undefined;
|
|
1821
|
-
timeout?: number | undefined;
|
|
1822
1999
|
env?: Record<string, string> | undefined;
|
|
1823
2000
|
headers?: Record<string, string> | undefined;
|
|
1824
2001
|
enabledByDefault?: boolean | undefined;
|
|
1825
2002
|
connectTimeout?: number | undefined;
|
|
1826
2003
|
}> | undefined;
|
|
2004
|
+
networkPolicy?: {
|
|
2005
|
+
mode?: "allow" | "deny" | undefined;
|
|
2006
|
+
list?: string[] | undefined;
|
|
2007
|
+
} | undefined;
|
|
2008
|
+
policy?: "auto" | "consistency" | "available" | undefined;
|
|
1827
2009
|
} | undefined;
|
|
1828
2010
|
summarization?: {
|
|
1829
2011
|
provider?: string | undefined;
|
|
@@ -1831,6 +2013,13 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1831
2013
|
temperature?: number | undefined;
|
|
1832
2014
|
promptFile?: string | undefined;
|
|
1833
2015
|
} | undefined;
|
|
2016
|
+
tools?: {
|
|
2017
|
+
policy?: "auto" | "consistency" | "available" | undefined;
|
|
2018
|
+
disabled?: {
|
|
2019
|
+
capabilities?: string[] | undefined;
|
|
2020
|
+
tools?: string[] | undefined;
|
|
2021
|
+
} | undefined;
|
|
2022
|
+
} | undefined;
|
|
1834
2023
|
auth?: {
|
|
1835
2024
|
apiKey?: string | undefined;
|
|
1836
2025
|
debugMode?: boolean | undefined;
|
|
@@ -1861,6 +2050,7 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1861
2050
|
defaultModel?: string | undefined;
|
|
1862
2051
|
maxRetries?: number | undefined;
|
|
1863
2052
|
timeout?: number | undefined;
|
|
2053
|
+
cache?: "none" | "auto" | undefined;
|
|
1864
2054
|
} | undefined;
|
|
1865
2055
|
remote?: {
|
|
1866
2056
|
enabled?: boolean | undefined;
|
|
@@ -1871,7 +2061,7 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1871
2061
|
issuer?: string | undefined;
|
|
1872
2062
|
clientId?: string | undefined;
|
|
1873
2063
|
} | undefined;
|
|
1874
|
-
llm?: "
|
|
2064
|
+
llm?: "server" | "local" | undefined;
|
|
1875
2065
|
worlds?: {
|
|
1876
2066
|
local?: boolean | undefined;
|
|
1877
2067
|
remote?: boolean | undefined;
|
|
@@ -1923,11 +2113,7 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1923
2113
|
enabledFiles?: string[] | undefined;
|
|
1924
2114
|
} | undefined;
|
|
1925
2115
|
router?: {
|
|
1926
|
-
|
|
1927
|
-
provider?: string | undefined;
|
|
1928
|
-
model?: string | undefined;
|
|
1929
|
-
enabled?: boolean | undefined;
|
|
1930
|
-
} | undefined;
|
|
2116
|
+
enabled?: boolean | undefined;
|
|
1931
2117
|
content?: {
|
|
1932
2118
|
coding?: {
|
|
1933
2119
|
provider?: string | undefined;
|
|
@@ -1950,7 +2136,6 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1950
2136
|
expensiveModel?: string | undefined;
|
|
1951
2137
|
maxCheapTokens?: number | undefined;
|
|
1952
2138
|
} | undefined;
|
|
1953
|
-
enabled?: boolean | undefined;
|
|
1954
2139
|
strategy?: "auto" | "content" | "cost" | "content+cost" | undefined;
|
|
1955
2140
|
escalation?: {
|
|
1956
2141
|
enabled?: boolean | undefined;
|
|
@@ -1960,6 +2145,11 @@ export declare const synthConfigSchema: z.ZodObject<{
|
|
|
1960
2145
|
fallbackModel?: string | undefined;
|
|
1961
2146
|
checks?: ("min_length" | "constraint" | "self_check")[] | undefined;
|
|
1962
2147
|
} | undefined;
|
|
2148
|
+
subagent?: {
|
|
2149
|
+
provider?: string | undefined;
|
|
2150
|
+
model?: string | undefined;
|
|
2151
|
+
enabled?: boolean | undefined;
|
|
2152
|
+
} | undefined;
|
|
1963
2153
|
} | undefined;
|
|
1964
2154
|
microFirst?: {
|
|
1965
2155
|
enabled?: boolean | undefined;
|
|
@@ -2016,6 +2206,8 @@ export type ContextConfigSchema = z.infer<typeof contextConfigSchema>;
|
|
|
2016
2206
|
export type SummarizationConfig = z.infer<typeof summarizationConfigSchema>;
|
|
2017
2207
|
export type McpServerConfig = z.infer<typeof mcpServerConfigSchema>;
|
|
2018
2208
|
export type McpConfig = z.infer<typeof mcpConfigSchema>;
|
|
2209
|
+
export type ToolsConfig = z.infer<typeof toolsConfigSchema>;
|
|
2210
|
+
export type ToolsDisabledConfig = z.infer<typeof toolsDisabledConfigSchema>;
|
|
2019
2211
|
export type RouterContentConfig = z.infer<typeof routerContentConfigSchema>;
|
|
2020
2212
|
export type RouterEscalationConfig = z.infer<typeof routerEscalationConfigSchema>;
|
|
2021
2213
|
export type RouterCostConfig = z.infer<typeof routerCostConfigSchema>;
|