@sema-agent/settings-schema 1.6.0 → 1.7.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/CHANGELOG.md CHANGED
@@ -6,6 +6,17 @@
6
6
  > `@sema-agent/registry-core`(更早还曾是 `@sema-ai/registry-core`)。本档 `0.19.0` 以下各节里的
7
7
  > 包名是**历史记录**,如实保留不追改。
8
8
 
9
+ ## 1.7.0 — 2026-09-06 — `mcp.servers[].source` 分组标签(sema-server B-036 / S-143 源头修的声明面半场;新键=minor)
10
+
11
+ - **`McpServerSpec.source?: string`**(非空、≤80 字;`.optional()` 无默认):声明方自述的层级标签,1:1 对应引擎
12
+ `McpServerSpec.source`(core ≥7.5.0 在 `wiring_manifest.mcp[].source` 逐字回显、single-line + 80 字封顶)。
13
+ **开集**——`plugin`/`user`/`project`/`local` 是 CC 惯用词不是词表,部署自己的分组词同样合法,故刻意不做闭词表
14
+ (信任轴仍是 `contentOrigin` 的闭表)。空串/超长/非字符串在解析处拒;缺席保持缺席。
15
+ - 病:本包 default-strip 对象没有这个键 ⇒ `config.d/mcp.json` 写的 `source` 在本地腿与 wire 腿都被剥掉,引擎读到缺席
16
+ ——与 1.4.0 前的 `contentOrigin` 同形。消费方 sema-server 的投影半场(请求腿 `normalizeServer` + center 腿
17
+ `resolveMcpServers`)随 server 7.62.0。红先:`test/mcp-source-label.test.ts` 五格(①保留 ②缺席 ③坏形拒 ④本地腿
18
+ round-trip ⑤wire 腿)。
19
+
9
20
  ## 1.6.0 — 2026-09-05 — `settings.json` 跨会话两键 `crossSessionInbound` / `dialogExpiry`(新模块/新导出=minor)
10
21
 
11
22
  成案:跨终端会话设计稿(design/385 §4.4/§8)把这两个 settings 键的属主定在 worker 服务侧,而键的**格式契约**
package/dist/types.d.ts CHANGED
@@ -7317,6 +7317,17 @@ export declare const McpServerSpec: z.ZodObject<{
7317
7317
  * declared `"local"`, the engine read ABSENT. A value outside the table is REJECTED at parse — a mistyped trust
7318
7318
  * word must never be read as a legal one (the consumer's gate is equally severe: no case-folding). */
7319
7319
  contentOrigin: z.ZodOptional<z.ZodEnum<["local", "execution", "external"]>>;
7320
+ /** Declaration-plane GROUPING LABEL for this server — maps 1:1 onto the engine's `McpServerSpec.source`
7321
+ * (core ≥7.5.0 echoes it verbatim on `wiring_manifest.mcp[].source`, single-line + 80-char cap, so a
7322
+ * consumer can group servers by where they were declared). An OPEN set: CC's `plugin` / `user` /
7323
+ * `project` / `local` are conventions, not a vocabulary — a deployment's own word is equally legal, so
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). Empty / over-cap / non-string is
7326
+ * REJECTED at parse: a malformed label must not enter the ledger silently. Display-only: no gate /
7327
+ * policy / trust effect (the trust axis is `contentOrigin` above, which stays a closed table).
7328
+ * Before this key existed both legs stripped it (default-strip object); this is the declaration half of
7329
+ * the consumer-side fix (ticket B-036 / S-143), the projection half lives in the consumer. */
7330
+ source: z.ZodOptional<z.ZodString>;
7320
7331
  notes: z.ZodOptional<z.ZodString>;
7321
7332
  }, "strip", z.ZodTypeAny, {
7322
7333
  name: string;
@@ -7338,6 +7349,7 @@ export declare const McpServerSpec: z.ZodObject<{
7338
7349
  notes?: string | undefined;
7339
7350
  allowTools?: string[] | undefined;
7340
7351
  contentOrigin?: "local" | "execution" | "external" | undefined;
7352
+ source?: string | undefined;
7341
7353
  }, {
7342
7354
  name: string;
7343
7355
  transport: {
@@ -7358,6 +7370,7 @@ export declare const McpServerSpec: z.ZodObject<{
7358
7370
  allowTools?: string[] | undefined;
7359
7371
  elicitation?: boolean | undefined;
7360
7372
  contentOrigin?: "local" | "execution" | "external" | undefined;
7373
+ source?: string | undefined;
7361
7374
  }>;
7362
7375
  export type McpServerSpec = z.infer<typeof McpServerSpec>;
7363
7376
  export declare const McpConfig: z.ZodEffects<z.ZodObject<{
@@ -7429,6 +7442,17 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
7429
7442
  * declared `"local"`, the engine read ABSENT. A value outside the table is REJECTED at parse — a mistyped trust
7430
7443
  * word must never be read as a legal one (the consumer's gate is equally severe: no case-folding). */
7431
7444
  contentOrigin: z.ZodOptional<z.ZodEnum<["local", "execution", "external"]>>;
7445
+ /** Declaration-plane GROUPING LABEL for this server — maps 1:1 onto the engine's `McpServerSpec.source`
7446
+ * (core ≥7.5.0 echoes it verbatim on `wiring_manifest.mcp[].source`, single-line + 80-char cap, so a
7447
+ * consumer can group servers by where they were declared). An OPEN set: CC's `plugin` / `user` /
7448
+ * `project` / `local` are conventions, not a vocabulary — a deployment's own word is equally legal, so
7449
+ * no closed table here (a closed table would reject the operator's grouping word at parse). ABSENT =
7450
+ * no label (`.optional()`, no default — a label has no default tier). Empty / over-cap / non-string is
7451
+ * REJECTED at parse: a malformed label must not enter the ledger silently. Display-only: no gate /
7452
+ * policy / trust effect (the trust axis is `contentOrigin` above, which stays a closed table).
7453
+ * Before this key existed both legs stripped it (default-strip object); this is the declaration half of
7454
+ * the consumer-side fix (ticket B-036 / S-143), the projection half lives in the consumer. */
7455
+ source: z.ZodOptional<z.ZodString>;
7432
7456
  notes: z.ZodOptional<z.ZodString>;
7433
7457
  }, "strip", z.ZodTypeAny, {
7434
7458
  name: string;
@@ -7450,6 +7474,7 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
7450
7474
  notes?: string | undefined;
7451
7475
  allowTools?: string[] | undefined;
7452
7476
  contentOrigin?: "local" | "execution" | "external" | undefined;
7477
+ source?: string | undefined;
7453
7478
  }, {
7454
7479
  name: string;
7455
7480
  transport: {
@@ -7470,6 +7495,7 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
7470
7495
  allowTools?: string[] | undefined;
7471
7496
  elicitation?: boolean | undefined;
7472
7497
  contentOrigin?: "local" | "execution" | "external" | undefined;
7498
+ source?: string | undefined;
7473
7499
  }>, "many">>;
7474
7500
  }, "strip", z.ZodTypeAny, {
7475
7501
  servers: {
@@ -7492,6 +7518,7 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
7492
7518
  notes?: string | undefined;
7493
7519
  allowTools?: string[] | undefined;
7494
7520
  contentOrigin?: "local" | "execution" | "external" | undefined;
7521
+ source?: string | undefined;
7495
7522
  }[];
7496
7523
  }, {
7497
7524
  servers?: {
@@ -7514,6 +7541,7 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
7514
7541
  allowTools?: string[] | undefined;
7515
7542
  elicitation?: boolean | undefined;
7516
7543
  contentOrigin?: "local" | "execution" | "external" | undefined;
7544
+ source?: string | undefined;
7517
7545
  }[] | undefined;
7518
7546
  }>, {
7519
7547
  servers: {
@@ -7536,6 +7564,7 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
7536
7564
  notes?: string | undefined;
7537
7565
  allowTools?: string[] | undefined;
7538
7566
  contentOrigin?: "local" | "execution" | "external" | undefined;
7567
+ source?: string | undefined;
7539
7568
  }[];
7540
7569
  }, {
7541
7570
  servers?: {
@@ -7558,6 +7587,7 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
7558
7587
  allowTools?: string[] | undefined;
7559
7588
  elicitation?: boolean | undefined;
7560
7589
  contentOrigin?: "local" | "execution" | "external" | undefined;
7590
+ source?: string | undefined;
7561
7591
  }[] | undefined;
7562
7592
  }>;
7563
7593
  export type McpConfig = z.infer<typeof McpConfig>;
@@ -10079,6 +10109,17 @@ export declare const DOMAIN_SCHEMAS: {
10079
10109
  * declared `"local"`, the engine read ABSENT. A value outside the table is REJECTED at parse — a mistyped trust
10080
10110
  * word must never be read as a legal one (the consumer's gate is equally severe: no case-folding). */
10081
10111
  contentOrigin: z.ZodOptional<z.ZodEnum<["local", "execution", "external"]>>;
10112
+ /** Declaration-plane GROUPING LABEL for this server — maps 1:1 onto the engine's `McpServerSpec.source`
10113
+ * (core ≥7.5.0 echoes it verbatim on `wiring_manifest.mcp[].source`, single-line + 80-char cap, so a
10114
+ * consumer can group servers by where they were declared). An OPEN set: CC's `plugin` / `user` /
10115
+ * `project` / `local` are conventions, not a vocabulary — a deployment's own word is equally legal, so
10116
+ * no closed table here (a closed table would reject the operator's grouping word at parse). ABSENT =
10117
+ * no label (`.optional()`, no default — a label has no default tier). Empty / over-cap / non-string is
10118
+ * REJECTED at parse: a malformed label must not enter the ledger silently. Display-only: no gate /
10119
+ * policy / trust effect (the trust axis is `contentOrigin` above, which stays a closed table).
10120
+ * Before this key existed both legs stripped it (default-strip object); this is the declaration half of
10121
+ * the consumer-side fix (ticket B-036 / S-143), the projection half lives in the consumer. */
10122
+ source: z.ZodOptional<z.ZodString>;
10082
10123
  notes: z.ZodOptional<z.ZodString>;
10083
10124
  }, "strip", z.ZodTypeAny, {
10084
10125
  name: string;
@@ -10100,6 +10141,7 @@ export declare const DOMAIN_SCHEMAS: {
10100
10141
  notes?: string | undefined;
10101
10142
  allowTools?: string[] | undefined;
10102
10143
  contentOrigin?: "local" | "execution" | "external" | undefined;
10144
+ source?: string | undefined;
10103
10145
  }, {
10104
10146
  name: string;
10105
10147
  transport: {
@@ -10120,6 +10162,7 @@ export declare const DOMAIN_SCHEMAS: {
10120
10162
  allowTools?: string[] | undefined;
10121
10163
  elicitation?: boolean | undefined;
10122
10164
  contentOrigin?: "local" | "execution" | "external" | undefined;
10165
+ source?: string | undefined;
10123
10166
  }>, "many">>;
10124
10167
  }, "strip", z.ZodTypeAny, {
10125
10168
  servers: {
@@ -10142,6 +10185,7 @@ export declare const DOMAIN_SCHEMAS: {
10142
10185
  notes?: string | undefined;
10143
10186
  allowTools?: string[] | undefined;
10144
10187
  contentOrigin?: "local" | "execution" | "external" | undefined;
10188
+ source?: string | undefined;
10145
10189
  }[];
10146
10190
  }, {
10147
10191
  servers?: {
@@ -10164,6 +10208,7 @@ export declare const DOMAIN_SCHEMAS: {
10164
10208
  allowTools?: string[] | undefined;
10165
10209
  elicitation?: boolean | undefined;
10166
10210
  contentOrigin?: "local" | "execution" | "external" | undefined;
10211
+ source?: string | undefined;
10167
10212
  }[] | undefined;
10168
10213
  }>, {
10169
10214
  servers: {
@@ -10186,6 +10231,7 @@ export declare const DOMAIN_SCHEMAS: {
10186
10231
  notes?: string | undefined;
10187
10232
  allowTools?: string[] | undefined;
10188
10233
  contentOrigin?: "local" | "execution" | "external" | undefined;
10234
+ source?: string | undefined;
10189
10235
  }[];
10190
10236
  }, {
10191
10237
  servers?: {
@@ -10208,6 +10254,7 @@ export declare const DOMAIN_SCHEMAS: {
10208
10254
  allowTools?: string[] | undefined;
10209
10255
  elicitation?: boolean | undefined;
10210
10256
  contentOrigin?: "local" | "execution" | "external" | undefined;
10257
+ source?: string | undefined;
10211
10258
  }[] | undefined;
10212
10259
  }>;
10213
10260
  readonly plugins: z.ZodEffects<z.ZodObject<{
package/dist/types.js CHANGED
@@ -1798,7 +1798,7 @@ export const SkillsManifestSchema = z.object({
1798
1798
  });
1799
1799
  // ── Domain: mcp (MCP server 注册表 — docs/MCP-SKILLS.md, Roadmap B1) ────────────
1800
1800
  // sema-registry = an MCP-server REGISTRY: a scenario mounts a subset by `scenarios[]`. Maps onto core's
1801
- // `McpServerSpec = { name, transport: {kind:"stdio",command,args?,env?} | {kind:"http",url,headers?}, allowTools?, contentOrigin? }`.
1801
+ // `McpServerSpec = { name, transport: {kind:"stdio",command,args?,env?} | {kind:"http",url,headers?}, allowTools?, contentOrigin?, source? }`.
1802
1802
  // SECRET BOUNDARY (§3.1, design/15): a transport's env/header VALUES may be secret → the center stores only
1803
1803
  // env-NAME references (`envRefs`/`headerRefs`: target-key → an ENV_NAME in the SERVICE's env). The service's
1804
1804
  // `resolveSpec` reads the real values from its own environment — this DB never holds a credential. Like
@@ -1888,6 +1888,17 @@ export const McpServerSpec = z.object({
1888
1888
  * declared `"local"`, the engine read ABSENT. A value outside the table is REJECTED at parse — a mistyped trust
1889
1889
  * word must never be read as a legal one (the consumer's gate is equally severe: no case-folding). */
1890
1890
  contentOrigin: z.enum(MCP_CONTENT_ORIGINS).optional(),
1891
+ /** Declaration-plane GROUPING LABEL for this server — maps 1:1 onto the engine's `McpServerSpec.source`
1892
+ * (core ≥7.5.0 echoes it verbatim on `wiring_manifest.mcp[].source`, single-line + 80-char cap, so a
1893
+ * consumer can group servers by where they were declared). An OPEN set: CC's `plugin` / `user` /
1894
+ * `project` / `local` are conventions, not a vocabulary — a deployment's own word is equally legal, so
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). Empty / over-cap / non-string is
1897
+ * REJECTED at parse: a malformed label must not enter the ledger silently. Display-only: no gate /
1898
+ * policy / trust effect (the trust axis is `contentOrigin` above, which stays a closed table).
1899
+ * Before this key existed both legs stripped it (default-strip object); this is the declaration half of
1900
+ * the consumer-side fix (ticket B-036 / S-143), the projection half lives in the consumer. */
1901
+ source: z.string().min(1).max(80).optional(),
1891
1902
  notes: z.string().optional(),
1892
1903
  });
1893
1904
  export const McpConfig = z
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sema-agent/settings-schema",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
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",