@sema-agent/settings-schema 1.7.1 → 1.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/CHANGELOG.md +9 -0
- package/dist/types.d.ts +41 -35
- package/dist/types.js +9 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,15 @@
|
|
|
6
6
|
> `@sema-agent/registry-core`(更早还曾是 `@sema-ai/registry-core`)。本档 `0.19.0` 以下各节里的
|
|
7
7
|
> 包名是**历史记录**,如实保留不追改。
|
|
8
8
|
|
|
9
|
+
## 1.7.2 — 2026-09-06 — `source` 改**解析透明**(`z.unknown()`;patch)
|
|
10
|
+
|
|
11
|
+
- 1.7.1 的 `z.string()` 对 `source: null`(或数字/数组/对象)仍在解析处拒 ⇒ 整域 all-or-nothing 下**一个**非串标签让整套
|
|
12
|
+
`mcp.servers` 默认为空——而 1.6.0 之前该键被 default-strip 剥掉、无害,故这是 1.7.x 引入的**升级回归**(消费方 codex
|
|
13
|
+
对抗复审 [high],`buildEffective` 与 `readEffectiveWire` 两腿复现)。1.7.2 起 `source: z.unknown().optional()`:
|
|
14
|
+
任何 JSON 值原样到消费方,规则(非空 ≤80 字符串)与坏形处置(丢键留 server + 留痕)**只**在消费方一处。
|
|
15
|
+
- 红先:`test/mcp-source-label.test.ts` ③ 改「七形全过、原样」+ ③b「坏标签兄弟不拖累好 server」。
|
|
16
|
+
- 类病(任一字段解析拒 ⇒ 整域默认)仍归消费方 S-144 另车。
|
|
17
|
+
|
|
9
18
|
## 1.7.1 — 2026-09-06 — `source` 改**只管类型**(撤回 1.7.0 的 min/max 解析拒;patch)
|
|
10
19
|
|
|
11
20
|
- 1.7.0 把标签规则(非空 ≤80)写进 zod ⇒ 本域整域 all-or-nothing 解析下,**一个**空/超长标签让整套 `mcp.servers`
|
package/dist/types.d.ts
CHANGED
|
@@ -7322,16 +7322,18 @@ export declare const McpServerSpec: z.ZodObject<{
|
|
|
7322
7322
|
* consumer can group servers by where they were declared). An OPEN set: CC's `plugin` / `user` /
|
|
7323
7323
|
* `project` / `local` are conventions, not a vocabulary — a deployment's own word is equally legal, so
|
|
7324
7324
|
* no closed table here (a closed table would reject the operator's grouping word at parse). ABSENT =
|
|
7325
|
-
* no label (`.optional()`, no default — a label has no default tier). 🔴
|
|
7326
|
-
* the label RULE (non-empty, ≤80 chars) lives in ONE place — the consumer's projection helper,
|
|
7327
|
-
* drops a malformed label's KEY, keeps the server and records the drop.
|
|
7328
|
-
*
|
|
7329
|
-
* default the ENTIRE mcp domain
|
|
7330
|
-
*
|
|
7325
|
+
* no label (`.optional()`, no default — a label has no default tier). 🔴 ZERO rules here (`z.unknown()`):
|
|
7326
|
+
* the label RULE (string, non-empty, ≤80 chars) lives in ONE place — the consumer's projection helper,
|
|
7327
|
+
* which drops a malformed label's KEY, keeps the server and records the drop. Nothing may live here:
|
|
7328
|
+
* this domain parses all-or-nothing, so ANY rejection at parse (1.7.0 `min/max`, 1.7.1 `z.string()`
|
|
7329
|
+
* against a `null`) lets one bad label default the ENTIRE mcp domain — every server gone, silently when
|
|
7330
|
+
* no onWarning is wired — a blast radius a display label must never have. 1.7.2 makes the key
|
|
7331
|
+
* parse-transparent: whatever JSON value the file carries reaches the consumer verbatim. Display-only:
|
|
7332
|
+
* no gate / policy / trust
|
|
7331
7333
|
* effect (the trust axis is `contentOrigin` above, which stays a closed table). Before this key existed
|
|
7332
7334
|
* both legs stripped it (default-strip object); this is the declaration half of the consumer-side fix
|
|
7333
7335
|
* (ticket B-036 / S-143), the projection half lives in the consumer. */
|
|
7334
|
-
source: z.ZodOptional<z.
|
|
7336
|
+
source: z.ZodOptional<z.ZodUnknown>;
|
|
7335
7337
|
notes: z.ZodOptional<z.ZodString>;
|
|
7336
7338
|
}, "strip", z.ZodTypeAny, {
|
|
7337
7339
|
name: string;
|
|
@@ -7353,7 +7355,7 @@ export declare const McpServerSpec: z.ZodObject<{
|
|
|
7353
7355
|
notes?: string | undefined;
|
|
7354
7356
|
allowTools?: string[] | undefined;
|
|
7355
7357
|
contentOrigin?: "local" | "execution" | "external" | undefined;
|
|
7356
|
-
source?:
|
|
7358
|
+
source?: unknown;
|
|
7357
7359
|
}, {
|
|
7358
7360
|
name: string;
|
|
7359
7361
|
transport: {
|
|
@@ -7374,7 +7376,7 @@ export declare const McpServerSpec: z.ZodObject<{
|
|
|
7374
7376
|
allowTools?: string[] | undefined;
|
|
7375
7377
|
elicitation?: boolean | undefined;
|
|
7376
7378
|
contentOrigin?: "local" | "execution" | "external" | undefined;
|
|
7377
|
-
source?:
|
|
7379
|
+
source?: unknown;
|
|
7378
7380
|
}>;
|
|
7379
7381
|
export type McpServerSpec = z.infer<typeof McpServerSpec>;
|
|
7380
7382
|
export declare const McpConfig: z.ZodEffects<z.ZodObject<{
|
|
@@ -7451,16 +7453,18 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
|
|
|
7451
7453
|
* consumer can group servers by where they were declared). An OPEN set: CC's `plugin` / `user` /
|
|
7452
7454
|
* `project` / `local` are conventions, not a vocabulary — a deployment's own word is equally legal, so
|
|
7453
7455
|
* no closed table here (a closed table would reject the operator's grouping word at parse). ABSENT =
|
|
7454
|
-
* no label (`.optional()`, no default — a label has no default tier). 🔴
|
|
7455
|
-
* the label RULE (non-empty, ≤80 chars) lives in ONE place — the consumer's projection helper,
|
|
7456
|
-
* drops a malformed label's KEY, keeps the server and records the drop.
|
|
7457
|
-
*
|
|
7458
|
-
* default the ENTIRE mcp domain
|
|
7459
|
-
*
|
|
7456
|
+
* no label (`.optional()`, no default — a label has no default tier). 🔴 ZERO rules here (`z.unknown()`):
|
|
7457
|
+
* the label RULE (string, non-empty, ≤80 chars) lives in ONE place — the consumer's projection helper,
|
|
7458
|
+
* which drops a malformed label's KEY, keeps the server and records the drop. Nothing may live here:
|
|
7459
|
+
* this domain parses all-or-nothing, so ANY rejection at parse (1.7.0 `min/max`, 1.7.1 `z.string()`
|
|
7460
|
+
* against a `null`) lets one bad label default the ENTIRE mcp domain — every server gone, silently when
|
|
7461
|
+
* no onWarning is wired — a blast radius a display label must never have. 1.7.2 makes the key
|
|
7462
|
+
* parse-transparent: whatever JSON value the file carries reaches the consumer verbatim. Display-only:
|
|
7463
|
+
* no gate / policy / trust
|
|
7460
7464
|
* effect (the trust axis is `contentOrigin` above, which stays a closed table). Before this key existed
|
|
7461
7465
|
* both legs stripped it (default-strip object); this is the declaration half of the consumer-side fix
|
|
7462
7466
|
* (ticket B-036 / S-143), the projection half lives in the consumer. */
|
|
7463
|
-
source: z.ZodOptional<z.
|
|
7467
|
+
source: z.ZodOptional<z.ZodUnknown>;
|
|
7464
7468
|
notes: z.ZodOptional<z.ZodString>;
|
|
7465
7469
|
}, "strip", z.ZodTypeAny, {
|
|
7466
7470
|
name: string;
|
|
@@ -7482,7 +7486,7 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
|
|
|
7482
7486
|
notes?: string | undefined;
|
|
7483
7487
|
allowTools?: string[] | undefined;
|
|
7484
7488
|
contentOrigin?: "local" | "execution" | "external" | undefined;
|
|
7485
|
-
source?:
|
|
7489
|
+
source?: unknown;
|
|
7486
7490
|
}, {
|
|
7487
7491
|
name: string;
|
|
7488
7492
|
transport: {
|
|
@@ -7503,7 +7507,7 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
|
|
|
7503
7507
|
allowTools?: string[] | undefined;
|
|
7504
7508
|
elicitation?: boolean | undefined;
|
|
7505
7509
|
contentOrigin?: "local" | "execution" | "external" | undefined;
|
|
7506
|
-
source?:
|
|
7510
|
+
source?: unknown;
|
|
7507
7511
|
}>, "many">>;
|
|
7508
7512
|
}, "strip", z.ZodTypeAny, {
|
|
7509
7513
|
servers: {
|
|
@@ -7526,7 +7530,7 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
|
|
|
7526
7530
|
notes?: string | undefined;
|
|
7527
7531
|
allowTools?: string[] | undefined;
|
|
7528
7532
|
contentOrigin?: "local" | "execution" | "external" | undefined;
|
|
7529
|
-
source?:
|
|
7533
|
+
source?: unknown;
|
|
7530
7534
|
}[];
|
|
7531
7535
|
}, {
|
|
7532
7536
|
servers?: {
|
|
@@ -7549,7 +7553,7 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
|
|
|
7549
7553
|
allowTools?: string[] | undefined;
|
|
7550
7554
|
elicitation?: boolean | undefined;
|
|
7551
7555
|
contentOrigin?: "local" | "execution" | "external" | undefined;
|
|
7552
|
-
source?:
|
|
7556
|
+
source?: unknown;
|
|
7553
7557
|
}[] | undefined;
|
|
7554
7558
|
}>, {
|
|
7555
7559
|
servers: {
|
|
@@ -7572,7 +7576,7 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
|
|
|
7572
7576
|
notes?: string | undefined;
|
|
7573
7577
|
allowTools?: string[] | undefined;
|
|
7574
7578
|
contentOrigin?: "local" | "execution" | "external" | undefined;
|
|
7575
|
-
source?:
|
|
7579
|
+
source?: unknown;
|
|
7576
7580
|
}[];
|
|
7577
7581
|
}, {
|
|
7578
7582
|
servers?: {
|
|
@@ -7595,7 +7599,7 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
|
|
|
7595
7599
|
allowTools?: string[] | undefined;
|
|
7596
7600
|
elicitation?: boolean | undefined;
|
|
7597
7601
|
contentOrigin?: "local" | "execution" | "external" | undefined;
|
|
7598
|
-
source?:
|
|
7602
|
+
source?: unknown;
|
|
7599
7603
|
}[] | undefined;
|
|
7600
7604
|
}>;
|
|
7601
7605
|
export type McpConfig = z.infer<typeof McpConfig>;
|
|
@@ -10122,16 +10126,18 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
10122
10126
|
* consumer can group servers by where they were declared). An OPEN set: CC's `plugin` / `user` /
|
|
10123
10127
|
* `project` / `local` are conventions, not a vocabulary — a deployment's own word is equally legal, so
|
|
10124
10128
|
* no closed table here (a closed table would reject the operator's grouping word at parse). ABSENT =
|
|
10125
|
-
* no label (`.optional()`, no default — a label has no default tier). 🔴
|
|
10126
|
-
* the label RULE (non-empty, ≤80 chars) lives in ONE place — the consumer's projection helper,
|
|
10127
|
-
* drops a malformed label's KEY, keeps the server and records the drop.
|
|
10128
|
-
*
|
|
10129
|
-
* default the ENTIRE mcp domain
|
|
10130
|
-
*
|
|
10129
|
+
* no label (`.optional()`, no default — a label has no default tier). 🔴 ZERO rules here (`z.unknown()`):
|
|
10130
|
+
* the label RULE (string, non-empty, ≤80 chars) lives in ONE place — the consumer's projection helper,
|
|
10131
|
+
* which drops a malformed label's KEY, keeps the server and records the drop. Nothing may live here:
|
|
10132
|
+
* this domain parses all-or-nothing, so ANY rejection at parse (1.7.0 `min/max`, 1.7.1 `z.string()`
|
|
10133
|
+
* against a `null`) lets one bad label default the ENTIRE mcp domain — every server gone, silently when
|
|
10134
|
+
* no onWarning is wired — a blast radius a display label must never have. 1.7.2 makes the key
|
|
10135
|
+
* parse-transparent: whatever JSON value the file carries reaches the consumer verbatim. Display-only:
|
|
10136
|
+
* no gate / policy / trust
|
|
10131
10137
|
* effect (the trust axis is `contentOrigin` above, which stays a closed table). Before this key existed
|
|
10132
10138
|
* both legs stripped it (default-strip object); this is the declaration half of the consumer-side fix
|
|
10133
10139
|
* (ticket B-036 / S-143), the projection half lives in the consumer. */
|
|
10134
|
-
source: z.ZodOptional<z.
|
|
10140
|
+
source: z.ZodOptional<z.ZodUnknown>;
|
|
10135
10141
|
notes: z.ZodOptional<z.ZodString>;
|
|
10136
10142
|
}, "strip", z.ZodTypeAny, {
|
|
10137
10143
|
name: string;
|
|
@@ -10153,7 +10159,7 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
10153
10159
|
notes?: string | undefined;
|
|
10154
10160
|
allowTools?: string[] | undefined;
|
|
10155
10161
|
contentOrigin?: "local" | "execution" | "external" | undefined;
|
|
10156
|
-
source?:
|
|
10162
|
+
source?: unknown;
|
|
10157
10163
|
}, {
|
|
10158
10164
|
name: string;
|
|
10159
10165
|
transport: {
|
|
@@ -10174,7 +10180,7 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
10174
10180
|
allowTools?: string[] | undefined;
|
|
10175
10181
|
elicitation?: boolean | undefined;
|
|
10176
10182
|
contentOrigin?: "local" | "execution" | "external" | undefined;
|
|
10177
|
-
source?:
|
|
10183
|
+
source?: unknown;
|
|
10178
10184
|
}>, "many">>;
|
|
10179
10185
|
}, "strip", z.ZodTypeAny, {
|
|
10180
10186
|
servers: {
|
|
@@ -10197,7 +10203,7 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
10197
10203
|
notes?: string | undefined;
|
|
10198
10204
|
allowTools?: string[] | undefined;
|
|
10199
10205
|
contentOrigin?: "local" | "execution" | "external" | undefined;
|
|
10200
|
-
source?:
|
|
10206
|
+
source?: unknown;
|
|
10201
10207
|
}[];
|
|
10202
10208
|
}, {
|
|
10203
10209
|
servers?: {
|
|
@@ -10220,7 +10226,7 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
10220
10226
|
allowTools?: string[] | undefined;
|
|
10221
10227
|
elicitation?: boolean | undefined;
|
|
10222
10228
|
contentOrigin?: "local" | "execution" | "external" | undefined;
|
|
10223
|
-
source?:
|
|
10229
|
+
source?: unknown;
|
|
10224
10230
|
}[] | undefined;
|
|
10225
10231
|
}>, {
|
|
10226
10232
|
servers: {
|
|
@@ -10243,7 +10249,7 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
10243
10249
|
notes?: string | undefined;
|
|
10244
10250
|
allowTools?: string[] | undefined;
|
|
10245
10251
|
contentOrigin?: "local" | "execution" | "external" | undefined;
|
|
10246
|
-
source?:
|
|
10252
|
+
source?: unknown;
|
|
10247
10253
|
}[];
|
|
10248
10254
|
}, {
|
|
10249
10255
|
servers?: {
|
|
@@ -10266,7 +10272,7 @@ export declare const DOMAIN_SCHEMAS: {
|
|
|
10266
10272
|
allowTools?: string[] | undefined;
|
|
10267
10273
|
elicitation?: boolean | undefined;
|
|
10268
10274
|
contentOrigin?: "local" | "execution" | "external" | undefined;
|
|
10269
|
-
source?:
|
|
10275
|
+
source?: unknown;
|
|
10270
10276
|
}[] | undefined;
|
|
10271
10277
|
}>;
|
|
10272
10278
|
readonly plugins: z.ZodEffects<z.ZodObject<{
|
package/dist/types.js
CHANGED
|
@@ -1893,16 +1893,18 @@ export const McpServerSpec = z.object({
|
|
|
1893
1893
|
* consumer can group servers by where they were declared). An OPEN set: CC's `plugin` / `user` /
|
|
1894
1894
|
* `project` / `local` are conventions, not a vocabulary — a deployment's own word is equally legal, so
|
|
1895
1895
|
* no closed table here (a closed table would reject the operator's grouping word at parse). ABSENT =
|
|
1896
|
-
* no label (`.optional()`, no default — a label has no default tier). 🔴
|
|
1897
|
-
* the label RULE (non-empty, ≤80 chars) lives in ONE place — the consumer's projection helper,
|
|
1898
|
-
* drops a malformed label's KEY, keeps the server and records the drop.
|
|
1899
|
-
*
|
|
1900
|
-
* default the ENTIRE mcp domain
|
|
1901
|
-
*
|
|
1896
|
+
* no label (`.optional()`, no default — a label has no default tier). 🔴 ZERO rules here (`z.unknown()`):
|
|
1897
|
+
* the label RULE (string, non-empty, ≤80 chars) lives in ONE place — the consumer's projection helper,
|
|
1898
|
+
* which drops a malformed label's KEY, keeps the server and records the drop. Nothing may live here:
|
|
1899
|
+
* this domain parses all-or-nothing, so ANY rejection at parse (1.7.0 `min/max`, 1.7.1 `z.string()`
|
|
1900
|
+
* against a `null`) lets one bad label default the ENTIRE mcp domain — every server gone, silently when
|
|
1901
|
+
* no onWarning is wired — a blast radius a display label must never have. 1.7.2 makes the key
|
|
1902
|
+
* parse-transparent: whatever JSON value the file carries reaches the consumer verbatim. Display-only:
|
|
1903
|
+
* no gate / policy / trust
|
|
1902
1904
|
* effect (the trust axis is `contentOrigin` above, which stays a closed table). Before this key existed
|
|
1903
1905
|
* both legs stripped it (default-strip object); this is the declaration half of the consumer-side fix
|
|
1904
1906
|
* (ticket B-036 / S-143), the projection half lives in the consumer. */
|
|
1905
|
-
source: z.
|
|
1907
|
+
source: z.unknown().optional(),
|
|
1906
1908
|
notes: z.string().optional(),
|
|
1907
1909
|
});
|
|
1908
1910
|
export const McpConfig = z
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/settings-schema",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "Sema settings schema — pure config contract (zod domains + effective-config + roster resolution + ref-integrity + remoteExec) shared by sema-registry, sema-server, and the TOC desktop/CLI. One source of truth. (Renamed at 1.0.0 from @sema-agent/registry-core — name and docs only, no behavior change; note the range moves 0.19.0 -> 1.0.0, so a dependency must become ^1.0.0. The old names @sema-agent/registry-core <=0.19.0 and @sema-ai/registry-core remain published, frozen, for migration.)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "BUSL-1.1",
|