@sema-agent/settings-schema 1.7.2 → 1.9.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,25 @@
6
6
  > `@sema-agent/registry-core`(更早还曾是 `@sema-ai/registry-core`)。本档 `0.19.0` 以下各节里的
7
7
  > 包名是**历史记录**,如实保留不追改。
8
8
 
9
+ ## 1.9.0 — 2026-09-08 — `mcp.servers[].toolFaces` 覆盖层声明面(core 7.8.0 design/388 片 1 F7;新键=minor)
10
+
11
+ - core 7.8.0 起 `McpServerSpec.toolFaces?: Record<remoteToolName, { family?, pathTarget?: {param, aliases?, access, skillScopeEligible?}, renderHints?, ruleFace? }>`
12
+ 是工具名册的 face 覆盖层。本仓只加**解析透明**的键(`z.unknown().optional()`),与 1.7.2 `source` 同一条规矩:形的校验属 core 摄入侧
13
+ (不合 schema 的工具**不挂**并通告一次 `config.tool_face_invalid`),本仓不复述那张表——这一域 all-or-nothing,任一字段解析拒都会让整套
14
+ mcp 服务器静默消失(S-144 类病)。缺席 = 不铸键。
15
+ - 红先:`test/mcp-tool-faces-1.9.test.ts`(1.8.0 上「带 toolFaces 的 server 键原样到消费方」红)。
16
+ - 消费方:sema-server(MCP 配置面三腿透传,随 7.66.0)、cli(settings 面)。
17
+
18
+ ## 1.8.0 — 2026-09-07 — `ModelRole` 闭集对齐 core:加 `classifier` / `consolidate`(新词=minor)
19
+
20
+ - cli [6554] 真案:core `ModelRole` 早有 `classifier`(auto 权限分类器,FALLBACK classifier→summarize→default、tier 缺省 flash)
21
+ 与 `consolidate`(记忆整理),本闭集没跟上 ⇒ settings 写 `models.roles.classifier` 被 schema 拒,用户想单独钉分类器模型
22
+ 只能连带 summarize(或走 `MODEL_CHEAP_ID` 连带 subagent)。1.8.0 起两词合法;`advisor`(teacher mode)仍刻意排除(无消费方)。
23
+ - **roster 标记族不动**(`ROSTER_CHEAP_ROLES` 仍 subagent/summarize):新角色不派生、走 core 兜底链、只由 settings 显式钉——
24
+ 归 cheap 会让消费方把它钉死到 cheapRef,盖掉 `models.tiers.flash` 档位。反向门改为显式登记三个不派生角色各自理由。
25
+ - 消费方:sema-server 经 `apply-effective` 逐键落 `config.roles`,零改;server 侧加编译期子集钉(schema ⊆ core)。
26
+ - 红先:`test/model-role-1.8.test.ts`(1.7.2 上两格红)+ `resolve-roster.test.ts` 反向门更新。
27
+
9
28
  ## 1.7.2 — 2026-09-06 — `source` 改**解析透明**(`z.unknown()`;patch)
10
29
 
11
30
  - 1.7.1 的 `z.string()` 对 `source: null`(或数字/数组/对象)仍在解析处拒 ⇒ 整域 all-or-nothing 下**一个**非串标签让整套
@@ -1,7 +1,8 @@
1
1
  import { stableHash } from "./hash.js";
2
2
  import { toSkillsManifest } from "./skills-manifest.js";
3
3
  // ── 主/cheap 角色标记语义(0.6.3, E3)────────────────────────────────
4
- // service 现有 ModelRoles 口径:default/team/synthesize→主、subagent/summarize→cheap。`verifier` 刻意
4
+ // service 现有 ModelRoles 口径:default/team/synthesize→主、subagent/summarize→cheap。1.8.0 起 `classifier`/`consolidate`
5
+ // 同 `verifier` 一样**不派生**(归 cheap 会盖掉 models.tiers 档位与 core 兜底链)。`verifier` 刻意
5
6
  // 不派生(unset→core 的 default 兜底链,与 service 语义一致)。常量导出=单一语义源,service 收敛小单与
6
7
  // center 表单同源引用,别第二份。
7
8
  /** primaryModel 标记喂的角色族(§3)。 */
package/dist/types.d.ts CHANGED
@@ -315,7 +315,7 @@ export declare const ModelEntry: z.ZodEffects<z.ZodObject<{
315
315
  notes?: string | undefined;
316
316
  }>;
317
317
  export type ModelEntry = z.infer<typeof ModelEntry>;
318
- export declare const ModelRole: z.ZodEnum<["default", "summarize", "subagent", "team", "synthesize", "verifier"]>;
318
+ export declare const ModelRole: z.ZodEnum<["default", "summarize", "subagent", "team", "synthesize", "verifier", "classifier", "consolidate"]>;
319
319
  export type ModelRole = z.infer<typeof ModelRole>;
320
320
  /** A role resolves either to a model NAME, or by capability/price (core 1.25 `{ select }`). */
321
321
  export declare const RoleTarget: z.ZodUnion<[z.ZodObject<{
@@ -640,7 +640,7 @@ export declare const ModelsConfig: z.ZodEffects<z.ZodObject<{
640
640
  * superRefine);未经 schema 的本地/存量 lane 由消费方 warn 降级(与 activeTierGroup 双层姿势一致)。 */
641
641
  default: z.ZodOptional<z.ZodString>;
642
642
  /** role → target. Unset roles fall back to `default` (core fallback chain). */
643
- roles: z.ZodDefault<z.ZodRecord<z.ZodEnum<["default", "summarize", "subagent", "team", "synthesize", "verifier"]>, z.ZodUnion<[z.ZodObject<{
643
+ roles: z.ZodDefault<z.ZodRecord<z.ZodEnum<["default", "summarize", "subagent", "team", "synthesize", "verifier", "classifier", "consolidate"]>, z.ZodUnion<[z.ZodObject<{
644
644
  model: z.ZodString;
645
645
  }, "strip", z.ZodTypeAny, {
646
646
  model: string;
@@ -755,7 +755,7 @@ export declare const ModelsConfig: z.ZodEffects<z.ZodObject<{
755
755
  extraBody?: Record<string, unknown> | undefined;
756
756
  notes?: string | undefined;
757
757
  }[];
758
- roles: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier", {
758
+ roles: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier" | "classifier" | "consolidate", {
759
759
  model: string;
760
760
  } | {
761
761
  select: {
@@ -812,7 +812,7 @@ export declare const ModelsConfig: z.ZodEffects<z.ZodObject<{
812
812
  enabled?: boolean | undefined;
813
813
  notes?: string | undefined;
814
814
  }[] | undefined;
815
- roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier", {
815
+ roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier" | "classifier" | "consolidate", {
816
816
  model: string;
817
817
  } | {
818
818
  select: {
@@ -867,7 +867,7 @@ export declare const ModelsConfig: z.ZodEffects<z.ZodObject<{
867
867
  extraBody?: Record<string, unknown> | undefined;
868
868
  notes?: string | undefined;
869
869
  }[];
870
- roles: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier", {
870
+ roles: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier" | "classifier" | "consolidate", {
871
871
  model: string;
872
872
  } | {
873
873
  select: {
@@ -924,7 +924,7 @@ export declare const ModelsConfig: z.ZodEffects<z.ZodObject<{
924
924
  enabled?: boolean | undefined;
925
925
  notes?: string | undefined;
926
926
  }[] | undefined;
927
- roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier", {
927
+ roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier" | "classifier" | "consolidate", {
928
928
  model: string;
929
929
  } | {
930
930
  select: {
@@ -955,14 +955,14 @@ export declare const RosterEntry: z.ZodObject<{
955
955
  /**
956
956
  * 主模型角色标记(0.6.3, E3)——catalog model NAME。worker.model 废除后 service 从 roster
957
957
  * 解析 boot 主模型的归宿位:解析语义(resolve-roster)= primary 喂 `default`/`team`/`synthesize` 三角色、
958
- * cheap 喂 `subagent`/`summarize`(service 现有 ModelRoles 口径;`verifier` 不派生——unset→default 兜底链)。
958
+ * cheap 喂 `subagent`/`summarize`(service 现有 ModelRoles 口径;`verifier`/`classifier`/`consolidate` 不派生——unset 走 core 兜底链)。
959
959
  * 显式 `roles` **逐角色**优先于标记派生;标记优先于全局 models.roles。additive:不设=行为与 0.6.2 全等。
960
960
  */
961
961
  primaryModel: z.ZodOptional<z.ZodString>;
962
962
  /** cheap 模型角色标记(同上;worker.model.cheapId 的迁移归宿,§3②)。 */
963
963
  cheapModel: z.ZodOptional<z.ZodString>;
964
964
  /** Role map override; unset roles fall back to marker-derived roles, then the global models.roles. */
965
- roles: z.ZodOptional<z.ZodRecord<z.ZodEnum<["default", "summarize", "subagent", "team", "synthesize", "verifier"]>, z.ZodUnion<[z.ZodObject<{
965
+ roles: z.ZodOptional<z.ZodRecord<z.ZodEnum<["default", "summarize", "subagent", "team", "synthesize", "verifier", "classifier", "consolidate"]>, z.ZodUnion<[z.ZodObject<{
966
966
  model: z.ZodString;
967
967
  }, "strip", z.ZodTypeAny, {
968
968
  model: string;
@@ -1002,7 +1002,7 @@ export declare const RosterEntry: z.ZodObject<{
1002
1002
  name: string;
1003
1003
  models: string[];
1004
1004
  notes?: string | undefined;
1005
- roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier", {
1005
+ roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier" | "classifier" | "consolidate", {
1006
1006
  model: string;
1007
1007
  } | {
1008
1008
  select: {
@@ -1018,7 +1018,7 @@ export declare const RosterEntry: z.ZodObject<{
1018
1018
  name: string;
1019
1019
  notes?: string | undefined;
1020
1020
  models?: string[] | undefined;
1021
- roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier", {
1021
+ roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier" | "classifier" | "consolidate", {
1022
1022
  model: string;
1023
1023
  } | {
1024
1024
  select: {
@@ -1040,14 +1040,14 @@ export declare const RostersConfig: z.ZodEffects<z.ZodObject<{
1040
1040
  /**
1041
1041
  * 主模型角色标记(0.6.3, E3)——catalog model NAME。worker.model 废除后 service 从 roster
1042
1042
  * 解析 boot 主模型的归宿位:解析语义(resolve-roster)= primary 喂 `default`/`team`/`synthesize` 三角色、
1043
- * cheap 喂 `subagent`/`summarize`(service 现有 ModelRoles 口径;`verifier` 不派生——unset→default 兜底链)。
1043
+ * cheap 喂 `subagent`/`summarize`(service 现有 ModelRoles 口径;`verifier`/`classifier`/`consolidate` 不派生——unset 走 core 兜底链)。
1044
1044
  * 显式 `roles` **逐角色**优先于标记派生;标记优先于全局 models.roles。additive:不设=行为与 0.6.2 全等。
1045
1045
  */
1046
1046
  primaryModel: z.ZodOptional<z.ZodString>;
1047
1047
  /** cheap 模型角色标记(同上;worker.model.cheapId 的迁移归宿,§3②)。 */
1048
1048
  cheapModel: z.ZodOptional<z.ZodString>;
1049
1049
  /** Role map override; unset roles fall back to marker-derived roles, then the global models.roles. */
1050
- roles: z.ZodOptional<z.ZodRecord<z.ZodEnum<["default", "summarize", "subagent", "team", "synthesize", "verifier"]>, z.ZodUnion<[z.ZodObject<{
1050
+ roles: z.ZodOptional<z.ZodRecord<z.ZodEnum<["default", "summarize", "subagent", "team", "synthesize", "verifier", "classifier", "consolidate"]>, z.ZodUnion<[z.ZodObject<{
1051
1051
  model: z.ZodString;
1052
1052
  }, "strip", z.ZodTypeAny, {
1053
1053
  model: string;
@@ -1087,7 +1087,7 @@ export declare const RostersConfig: z.ZodEffects<z.ZodObject<{
1087
1087
  name: string;
1088
1088
  models: string[];
1089
1089
  notes?: string | undefined;
1090
- roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier", {
1090
+ roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier" | "classifier" | "consolidate", {
1091
1091
  model: string;
1092
1092
  } | {
1093
1093
  select: {
@@ -1103,7 +1103,7 @@ export declare const RostersConfig: z.ZodEffects<z.ZodObject<{
1103
1103
  name: string;
1104
1104
  notes?: string | undefined;
1105
1105
  models?: string[] | undefined;
1106
- roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier", {
1106
+ roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier" | "classifier" | "consolidate", {
1107
1107
  model: string;
1108
1108
  } | {
1109
1109
  select: {
@@ -1121,7 +1121,7 @@ export declare const RostersConfig: z.ZodEffects<z.ZodObject<{
1121
1121
  name: string;
1122
1122
  models: string[];
1123
1123
  notes?: string | undefined;
1124
- roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier", {
1124
+ roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier" | "classifier" | "consolidate", {
1125
1125
  model: string;
1126
1126
  } | {
1127
1127
  select: {
@@ -1139,7 +1139,7 @@ export declare const RostersConfig: z.ZodEffects<z.ZodObject<{
1139
1139
  name: string;
1140
1140
  notes?: string | undefined;
1141
1141
  models?: string[] | undefined;
1142
- roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier", {
1142
+ roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier" | "classifier" | "consolidate", {
1143
1143
  model: string;
1144
1144
  } | {
1145
1145
  select: {
@@ -1157,7 +1157,7 @@ export declare const RostersConfig: z.ZodEffects<z.ZodObject<{
1157
1157
  name: string;
1158
1158
  models: string[];
1159
1159
  notes?: string | undefined;
1160
- roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier", {
1160
+ roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier" | "classifier" | "consolidate", {
1161
1161
  model: string;
1162
1162
  } | {
1163
1163
  select: {
@@ -1175,7 +1175,7 @@ export declare const RostersConfig: z.ZodEffects<z.ZodObject<{
1175
1175
  name: string;
1176
1176
  notes?: string | undefined;
1177
1177
  models?: string[] | undefined;
1178
- roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier", {
1178
+ roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier" | "classifier" | "consolidate", {
1179
1179
  model: string;
1180
1180
  } | {
1181
1181
  select: {
@@ -7334,6 +7334,12 @@ export declare const McpServerSpec: z.ZodObject<{
7334
7334
  * both legs stripped it (default-strip object); this is the declaration half of the consumer-side fix
7335
7335
  * (ticket B-036 / S-143), the projection half lives in the consumer. */
7336
7336
  source: z.ZodOptional<z.ZodUnknown>;
7337
+ /** 1.9.0 —— core 7.8.0(design/388 片 1 F7)`toolFaces` 覆盖层:按远端工具名 key 的 face 声明
7338
+ * (`{ family?, pathTarget?: {param, aliases?, access, skillScopeEligible?}, renderHints?, ruleFace? }`)。
7339
+ * 与 `source` 同一条规矩:**解析透明**(`z.unknown()`),形的校验属 core 摄入侧(不合 schema 的工具**不挂**并
7340
+ * 通告一次 `config.tool_face_invalid`);本仓不复述那张表 —— 这一域 all-or-nothing,任一字段解析拒都会
7341
+ * 让整套 mcp 服务器静默消失。缺席 = 不铸键。 */
7342
+ toolFaces: z.ZodOptional<z.ZodUnknown>;
7337
7343
  notes: z.ZodOptional<z.ZodString>;
7338
7344
  }, "strip", z.ZodTypeAny, {
7339
7345
  name: string;
@@ -7356,6 +7362,7 @@ export declare const McpServerSpec: z.ZodObject<{
7356
7362
  allowTools?: string[] | undefined;
7357
7363
  contentOrigin?: "local" | "execution" | "external" | undefined;
7358
7364
  source?: unknown;
7365
+ toolFaces?: unknown;
7359
7366
  }, {
7360
7367
  name: string;
7361
7368
  transport: {
@@ -7377,6 +7384,7 @@ export declare const McpServerSpec: z.ZodObject<{
7377
7384
  elicitation?: boolean | undefined;
7378
7385
  contentOrigin?: "local" | "execution" | "external" | undefined;
7379
7386
  source?: unknown;
7387
+ toolFaces?: unknown;
7380
7388
  }>;
7381
7389
  export type McpServerSpec = z.infer<typeof McpServerSpec>;
7382
7390
  export declare const McpConfig: z.ZodEffects<z.ZodObject<{
@@ -7465,6 +7473,12 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
7465
7473
  * both legs stripped it (default-strip object); this is the declaration half of the consumer-side fix
7466
7474
  * (ticket B-036 / S-143), the projection half lives in the consumer. */
7467
7475
  source: z.ZodOptional<z.ZodUnknown>;
7476
+ /** 1.9.0 —— core 7.8.0(design/388 片 1 F7)`toolFaces` 覆盖层:按远端工具名 key 的 face 声明
7477
+ * (`{ family?, pathTarget?: {param, aliases?, access, skillScopeEligible?}, renderHints?, ruleFace? }`)。
7478
+ * 与 `source` 同一条规矩:**解析透明**(`z.unknown()`),形的校验属 core 摄入侧(不合 schema 的工具**不挂**并
7479
+ * 通告一次 `config.tool_face_invalid`);本仓不复述那张表 —— 这一域 all-or-nothing,任一字段解析拒都会
7480
+ * 让整套 mcp 服务器静默消失。缺席 = 不铸键。 */
7481
+ toolFaces: z.ZodOptional<z.ZodUnknown>;
7468
7482
  notes: z.ZodOptional<z.ZodString>;
7469
7483
  }, "strip", z.ZodTypeAny, {
7470
7484
  name: string;
@@ -7487,6 +7501,7 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
7487
7501
  allowTools?: string[] | undefined;
7488
7502
  contentOrigin?: "local" | "execution" | "external" | undefined;
7489
7503
  source?: unknown;
7504
+ toolFaces?: unknown;
7490
7505
  }, {
7491
7506
  name: string;
7492
7507
  transport: {
@@ -7508,6 +7523,7 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
7508
7523
  elicitation?: boolean | undefined;
7509
7524
  contentOrigin?: "local" | "execution" | "external" | undefined;
7510
7525
  source?: unknown;
7526
+ toolFaces?: unknown;
7511
7527
  }>, "many">>;
7512
7528
  }, "strip", z.ZodTypeAny, {
7513
7529
  servers: {
@@ -7531,6 +7547,7 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
7531
7547
  allowTools?: string[] | undefined;
7532
7548
  contentOrigin?: "local" | "execution" | "external" | undefined;
7533
7549
  source?: unknown;
7550
+ toolFaces?: unknown;
7534
7551
  }[];
7535
7552
  }, {
7536
7553
  servers?: {
@@ -7554,6 +7571,7 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
7554
7571
  elicitation?: boolean | undefined;
7555
7572
  contentOrigin?: "local" | "execution" | "external" | undefined;
7556
7573
  source?: unknown;
7574
+ toolFaces?: unknown;
7557
7575
  }[] | undefined;
7558
7576
  }>, {
7559
7577
  servers: {
@@ -7577,6 +7595,7 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
7577
7595
  allowTools?: string[] | undefined;
7578
7596
  contentOrigin?: "local" | "execution" | "external" | undefined;
7579
7597
  source?: unknown;
7598
+ toolFaces?: unknown;
7580
7599
  }[];
7581
7600
  }, {
7582
7601
  servers?: {
@@ -7600,6 +7619,7 @@ export declare const McpConfig: z.ZodEffects<z.ZodObject<{
7600
7619
  elicitation?: boolean | undefined;
7601
7620
  contentOrigin?: "local" | "execution" | "external" | undefined;
7602
7621
  source?: unknown;
7622
+ toolFaces?: unknown;
7603
7623
  }[] | undefined;
7604
7624
  }>;
7605
7625
  export type McpConfig = z.infer<typeof McpConfig>;
@@ -9515,7 +9535,7 @@ export declare const DOMAIN_SCHEMAS: {
9515
9535
  * superRefine);未经 schema 的本地/存量 lane 由消费方 warn 降级(与 activeTierGroup 双层姿势一致)。 */
9516
9536
  default: z.ZodOptional<z.ZodString>;
9517
9537
  /** role → target. Unset roles fall back to `default` (core fallback chain). */
9518
- roles: z.ZodDefault<z.ZodRecord<z.ZodEnum<["default", "summarize", "subagent", "team", "synthesize", "verifier"]>, z.ZodUnion<[z.ZodObject<{
9538
+ roles: z.ZodDefault<z.ZodRecord<z.ZodEnum<["default", "summarize", "subagent", "team", "synthesize", "verifier", "classifier", "consolidate"]>, z.ZodUnion<[z.ZodObject<{
9519
9539
  model: z.ZodString;
9520
9540
  }, "strip", z.ZodTypeAny, {
9521
9541
  model: string;
@@ -9630,7 +9650,7 @@ export declare const DOMAIN_SCHEMAS: {
9630
9650
  extraBody?: Record<string, unknown> | undefined;
9631
9651
  notes?: string | undefined;
9632
9652
  }[];
9633
- roles: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier", {
9653
+ roles: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier" | "classifier" | "consolidate", {
9634
9654
  model: string;
9635
9655
  } | {
9636
9656
  select: {
@@ -9687,7 +9707,7 @@ export declare const DOMAIN_SCHEMAS: {
9687
9707
  enabled?: boolean | undefined;
9688
9708
  notes?: string | undefined;
9689
9709
  }[] | undefined;
9690
- roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier", {
9710
+ roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier" | "classifier" | "consolidate", {
9691
9711
  model: string;
9692
9712
  } | {
9693
9713
  select: {
@@ -9742,7 +9762,7 @@ export declare const DOMAIN_SCHEMAS: {
9742
9762
  extraBody?: Record<string, unknown> | undefined;
9743
9763
  notes?: string | undefined;
9744
9764
  }[];
9745
- roles: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier", {
9765
+ roles: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier" | "classifier" | "consolidate", {
9746
9766
  model: string;
9747
9767
  } | {
9748
9768
  select: {
@@ -9799,7 +9819,7 @@ export declare const DOMAIN_SCHEMAS: {
9799
9819
  enabled?: boolean | undefined;
9800
9820
  notes?: string | undefined;
9801
9821
  }[] | undefined;
9802
- roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier", {
9822
+ roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier" | "classifier" | "consolidate", {
9803
9823
  model: string;
9804
9824
  } | {
9805
9825
  select: {
@@ -9830,14 +9850,14 @@ export declare const DOMAIN_SCHEMAS: {
9830
9850
  /**
9831
9851
  * 主模型角色标记(0.6.3, E3)——catalog model NAME。worker.model 废除后 service 从 roster
9832
9852
  * 解析 boot 主模型的归宿位:解析语义(resolve-roster)= primary 喂 `default`/`team`/`synthesize` 三角色、
9833
- * cheap 喂 `subagent`/`summarize`(service 现有 ModelRoles 口径;`verifier` 不派生——unset→default 兜底链)。
9853
+ * cheap 喂 `subagent`/`summarize`(service 现有 ModelRoles 口径;`verifier`/`classifier`/`consolidate` 不派生——unset 走 core 兜底链)。
9834
9854
  * 显式 `roles` **逐角色**优先于标记派生;标记优先于全局 models.roles。additive:不设=行为与 0.6.2 全等。
9835
9855
  */
9836
9856
  primaryModel: z.ZodOptional<z.ZodString>;
9837
9857
  /** cheap 模型角色标记(同上;worker.model.cheapId 的迁移归宿,§3②)。 */
9838
9858
  cheapModel: z.ZodOptional<z.ZodString>;
9839
9859
  /** Role map override; unset roles fall back to marker-derived roles, then the global models.roles. */
9840
- roles: z.ZodOptional<z.ZodRecord<z.ZodEnum<["default", "summarize", "subagent", "team", "synthesize", "verifier"]>, z.ZodUnion<[z.ZodObject<{
9860
+ roles: z.ZodOptional<z.ZodRecord<z.ZodEnum<["default", "summarize", "subagent", "team", "synthesize", "verifier", "classifier", "consolidate"]>, z.ZodUnion<[z.ZodObject<{
9841
9861
  model: z.ZodString;
9842
9862
  }, "strip", z.ZodTypeAny, {
9843
9863
  model: string;
@@ -9877,7 +9897,7 @@ export declare const DOMAIN_SCHEMAS: {
9877
9897
  name: string;
9878
9898
  models: string[];
9879
9899
  notes?: string | undefined;
9880
- roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier", {
9900
+ roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier" | "classifier" | "consolidate", {
9881
9901
  model: string;
9882
9902
  } | {
9883
9903
  select: {
@@ -9893,7 +9913,7 @@ export declare const DOMAIN_SCHEMAS: {
9893
9913
  name: string;
9894
9914
  notes?: string | undefined;
9895
9915
  models?: string[] | undefined;
9896
- roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier", {
9916
+ roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier" | "classifier" | "consolidate", {
9897
9917
  model: string;
9898
9918
  } | {
9899
9919
  select: {
@@ -9911,7 +9931,7 @@ export declare const DOMAIN_SCHEMAS: {
9911
9931
  name: string;
9912
9932
  models: string[];
9913
9933
  notes?: string | undefined;
9914
- roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier", {
9934
+ roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier" | "classifier" | "consolidate", {
9915
9935
  model: string;
9916
9936
  } | {
9917
9937
  select: {
@@ -9929,7 +9949,7 @@ export declare const DOMAIN_SCHEMAS: {
9929
9949
  name: string;
9930
9950
  notes?: string | undefined;
9931
9951
  models?: string[] | undefined;
9932
- roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier", {
9952
+ roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier" | "classifier" | "consolidate", {
9933
9953
  model: string;
9934
9954
  } | {
9935
9955
  select: {
@@ -9947,7 +9967,7 @@ export declare const DOMAIN_SCHEMAS: {
9947
9967
  name: string;
9948
9968
  models: string[];
9949
9969
  notes?: string | undefined;
9950
- roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier", {
9970
+ roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier" | "classifier" | "consolidate", {
9951
9971
  model: string;
9952
9972
  } | {
9953
9973
  select: {
@@ -9965,7 +9985,7 @@ export declare const DOMAIN_SCHEMAS: {
9965
9985
  name: string;
9966
9986
  notes?: string | undefined;
9967
9987
  models?: string[] | undefined;
9968
- roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier", {
9988
+ roles?: Partial<Record<"default" | "summarize" | "subagent" | "team" | "synthesize" | "verifier" | "classifier" | "consolidate", {
9969
9989
  model: string;
9970
9990
  } | {
9971
9991
  select: {
@@ -10138,6 +10158,12 @@ export declare const DOMAIN_SCHEMAS: {
10138
10158
  * both legs stripped it (default-strip object); this is the declaration half of the consumer-side fix
10139
10159
  * (ticket B-036 / S-143), the projection half lives in the consumer. */
10140
10160
  source: z.ZodOptional<z.ZodUnknown>;
10161
+ /** 1.9.0 —— core 7.8.0(design/388 片 1 F7)`toolFaces` 覆盖层:按远端工具名 key 的 face 声明
10162
+ * (`{ family?, pathTarget?: {param, aliases?, access, skillScopeEligible?}, renderHints?, ruleFace? }`)。
10163
+ * 与 `source` 同一条规矩:**解析透明**(`z.unknown()`),形的校验属 core 摄入侧(不合 schema 的工具**不挂**并
10164
+ * 通告一次 `config.tool_face_invalid`);本仓不复述那张表 —— 这一域 all-or-nothing,任一字段解析拒都会
10165
+ * 让整套 mcp 服务器静默消失。缺席 = 不铸键。 */
10166
+ toolFaces: z.ZodOptional<z.ZodUnknown>;
10141
10167
  notes: z.ZodOptional<z.ZodString>;
10142
10168
  }, "strip", z.ZodTypeAny, {
10143
10169
  name: string;
@@ -10160,6 +10186,7 @@ export declare const DOMAIN_SCHEMAS: {
10160
10186
  allowTools?: string[] | undefined;
10161
10187
  contentOrigin?: "local" | "execution" | "external" | undefined;
10162
10188
  source?: unknown;
10189
+ toolFaces?: unknown;
10163
10190
  }, {
10164
10191
  name: string;
10165
10192
  transport: {
@@ -10181,6 +10208,7 @@ export declare const DOMAIN_SCHEMAS: {
10181
10208
  elicitation?: boolean | undefined;
10182
10209
  contentOrigin?: "local" | "execution" | "external" | undefined;
10183
10210
  source?: unknown;
10211
+ toolFaces?: unknown;
10184
10212
  }>, "many">>;
10185
10213
  }, "strip", z.ZodTypeAny, {
10186
10214
  servers: {
@@ -10204,6 +10232,7 @@ export declare const DOMAIN_SCHEMAS: {
10204
10232
  allowTools?: string[] | undefined;
10205
10233
  contentOrigin?: "local" | "execution" | "external" | undefined;
10206
10234
  source?: unknown;
10235
+ toolFaces?: unknown;
10207
10236
  }[];
10208
10237
  }, {
10209
10238
  servers?: {
@@ -10227,6 +10256,7 @@ export declare const DOMAIN_SCHEMAS: {
10227
10256
  elicitation?: boolean | undefined;
10228
10257
  contentOrigin?: "local" | "execution" | "external" | undefined;
10229
10258
  source?: unknown;
10259
+ toolFaces?: unknown;
10230
10260
  }[] | undefined;
10231
10261
  }>, {
10232
10262
  servers: {
@@ -10250,6 +10280,7 @@ export declare const DOMAIN_SCHEMAS: {
10250
10280
  allowTools?: string[] | undefined;
10251
10281
  contentOrigin?: "local" | "execution" | "external" | undefined;
10252
10282
  source?: unknown;
10283
+ toolFaces?: unknown;
10253
10284
  }[];
10254
10285
  }, {
10255
10286
  servers?: {
@@ -10273,6 +10304,7 @@ export declare const DOMAIN_SCHEMAS: {
10273
10304
  elicitation?: boolean | undefined;
10274
10305
  contentOrigin?: "local" | "execution" | "external" | undefined;
10275
10306
  source?: unknown;
10307
+ toolFaces?: unknown;
10276
10308
  }[] | undefined;
10277
10309
  }>;
10278
10310
  readonly plugins: z.ZodEffects<z.ZodObject<{
package/dist/types.js CHANGED
@@ -368,9 +368,16 @@ export const ModelEntry = z.object({
368
368
  });
369
369
  // `verifier` (2026-06-11, SERVICE-RESPONSE-…-PHASE2): real consumer = core's verification gate
370
370
  // (runWithVerification/resumeWithVerification resolve the verifier sub-task model via this role). Fallback
371
- // semantics per core: a roster that doesn't set `verifier` uses `default`. core also has `advisor` (teacher
372
- // mode) — deliberately NOT added: Service AI evaluated teacher mode and won't consume it (no consumer, no key).
373
- export const ModelRole = z.enum(["default", "summarize", "subagent", "team", "synthesize", "verifier"]);
371
+ // semantics per core: a roster that doesn't set `verifier` uses `default`.
372
+ // 1.8.0(消费方壳侧真案):对齐 core `ModelRole`(9 词)里**有真消费方**的两个缺席角色 ——
373
+ // `classifier` = auto 模式权限分类器(core FALLBACK classifier→summarize→default;tier 缺省 flash);此前 settings
374
+ // 写 `roles.classifier` 被本闭集拒,用户想单独钉分类器模型只能连带 summarize。
375
+ // `consolidate` = 记忆整理(core FALLBACK consolidate→summarize)。
376
+ // 两个词都**不进** roster 标记族(resolve-roster.ts):显式归 cheap 会让 server 把它钉死到 cheapRef,盖掉用户
377
+ // `models.tiers.flash` 的档位与 core 兜底链 —— 新角色「不派生、走 core 兜底、只由 settings 显式钉」。
378
+ // `advisor`(teacher mode)仍 deliberately NOT added: no consumer, no key —— 谁消费谁来加。
379
+ // 子集关系由消费方服务端的型面对账钉(编译期 `satisfies`)钉住(本仓不依赖 core)。
380
+ export const ModelRole = z.enum(["default", "summarize", "subagent", "team", "synthesize", "verifier", "classifier", "consolidate"]);
374
381
  /** A role resolves either to a model NAME, or by capability/price (core 1.25 `{ select }`). */
375
382
  export const RoleTarget = z.union([
376
383
  z.object({ model: z.string().min(1) }),
@@ -474,7 +481,7 @@ export const RosterEntry = z.object({
474
481
  /**
475
482
  * 主模型角色标记(0.6.3, E3)——catalog model NAME。worker.model 废除后 service 从 roster
476
483
  * 解析 boot 主模型的归宿位:解析语义(resolve-roster)= primary 喂 `default`/`team`/`synthesize` 三角色、
477
- * cheap 喂 `subagent`/`summarize`(service 现有 ModelRoles 口径;`verifier` 不派生——unset→default 兜底链)。
484
+ * cheap 喂 `subagent`/`summarize`(service 现有 ModelRoles 口径;`verifier`/`classifier`/`consolidate` 不派生——unset 走 core 兜底链)。
478
485
  * 显式 `roles` **逐角色**优先于标记派生;标记优先于全局 models.roles。additive:不设=行为与 0.6.2 全等。
479
486
  */
480
487
  primaryModel: z.string().min(1).optional(),
@@ -1905,6 +1912,12 @@ export const McpServerSpec = z.object({
1905
1912
  * both legs stripped it (default-strip object); this is the declaration half of the consumer-side fix
1906
1913
  * (ticket B-036 / S-143), the projection half lives in the consumer. */
1907
1914
  source: z.unknown().optional(),
1915
+ /** 1.9.0 —— core 7.8.0(design/388 片 1 F7)`toolFaces` 覆盖层:按远端工具名 key 的 face 声明
1916
+ * (`{ family?, pathTarget?: {param, aliases?, access, skillScopeEligible?}, renderHints?, ruleFace? }`)。
1917
+ * 与 `source` 同一条规矩:**解析透明**(`z.unknown()`),形的校验属 core 摄入侧(不合 schema 的工具**不挂**并
1918
+ * 通告一次 `config.tool_face_invalid`);本仓不复述那张表 —— 这一域 all-or-nothing,任一字段解析拒都会
1919
+ * 让整套 mcp 服务器静默消失。缺席 = 不铸键。 */
1920
+ toolFaces: z.unknown().optional(),
1908
1921
  notes: z.string().optional(),
1909
1922
  });
1910
1923
  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.2",
3
+ "version": "1.9.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",