@sema-agent/settings-schema 29.0.0 → 30.1.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +201 -0
  2. package/README.md +31 -2
  3. package/conformance/VERSION +1 -1
  4. package/conformance/cases/c01-entry-salvage-then-typo/expected.json +1 -1
  5. package/conformance/cases/c57-s784-g1-enabled-no-lane/expected.json +2 -2
  6. package/conformance/cases/c58-s784-g2-multitenant-host/expected.json +2 -2
  7. package/conformance/cases/c59-s784-g3-k8s-missing-image/expected.json +2 -2
  8. package/conformance/cases/c60-s784-g3-e2b-missing-key/expected.json +2 -2
  9. package/conformance/cases/c61-s784-g3-other-lane-key/expected.json +2 -2
  10. package/conformance/cases/c62-s784-g7a-session-tidb/expected.json +2 -2
  11. package/conformance/cases/c63-s784-host-two-replicas/expected.json +2 -2
  12. package/conformance/cases/c64-s784-multitenant-local-store/expected.json +2 -2
  13. package/conformance/cases/c65-s784-pg-without-db/expected.json +2 -2
  14. package/conformance/cases/c66-s784-memory-backend-mismatch/expected.json +2 -2
  15. package/conformance/cases/c67-s784-retired-field-loud/expected.json +2 -2
  16. package/conformance/cases/c68-s784-device-local-store/expected.json +2 -2
  17. package/conformance/cases/c76-projects-entry-salvage-nested/expected.json +1 -1
  18. package/conformance/cases/c78-prompts-empty-bindings-refused/expected.json +1 -1
  19. package/conformance/cases/c78-prompts-empty-bindings-refused/meta.json +1 -1
  20. package/conformance/cases/c81-prompts-declaration-bindings-refused/expected.json +1 -1
  21. package/conformance/cases/c82-prompts-v1-catalog-refused/expected.json +1 -1
  22. package/conformance/cases/cli04-env-value-with-newline/meta.json +1 -1
  23. package/conformance/cases/t01-absent-domain-key-not-null/meta.json +1 -1
  24. package/conformance/cases/t04-secret-literal-never-in-warning-value/meta.json +1 -1
  25. package/conformance/cases/z01-every-domain-empty-object/meta.json +1 -1
  26. package/dist/config-fns.d.ts +4 -2
  27. package/dist/config-fns.js +1 -1
  28. package/dist/conformance/derive.d.ts +1 -1
  29. package/dist/conformance/derive.js +4 -4
  30. package/dist/file-store.js +3 -2
  31. package/dist/index.d.ts +1 -0
  32. package/dist/index.js +1 -0
  33. package/dist/migration-receipt.d.ts +2 -2
  34. package/dist/migration-receipt.js +2 -2
  35. package/dist/one-time-migrations.d.ts +2 -2
  36. package/dist/one-time-migrations.js +0 -40
  37. package/dist/safety-merge-spec.d.ts +14 -3
  38. package/dist/safety-merge-spec.js +24 -3
  39. package/dist/settings-units.js +4 -0
  40. package/dist/types.js +7 -5
  41. package/dist/web-search-section.d.ts +3 -0
  42. package/dist/web-search-section.js +17 -0
  43. package/docs/API-SURFACE.md +4 -2
  44. package/docs/CONFORMANCE.md +1 -1
  45. package/docs/CONSUMER-INTEGRATION.md +74 -5
  46. package/llms-full.txt +7 -2
  47. package/llms.txt +3 -2
  48. package/package.json +1 -1
@@ -73,7 +73,7 @@
73
73
  "strictWrite": {
74
74
  "outcome": "rejected",
75
75
  "stage": "validate",
76
- "why": "拒:`bindings` 墓碑在场(非空声明轴;SS-M10 对它是 refused,原样留着等重新发布)。"
76
+ "why": "拒:`bindings` 墓碑在场(非空声明轴;没有一步替运维改写它,出路是删键后从中心编辑器重新发布)。"
77
77
  },
78
78
  "wire": {
79
79
  "derive": true
@@ -73,7 +73,7 @@
73
73
  "strictWrite": {
74
74
  "outcome": "rejected",
75
75
  "stage": "validate",
76
- "why": "拒:`catalog` 墓碑在场(完整合法的 v1 信封;SS-M10 对它是 refused)。"
76
+ "why": "拒:`catalog` 墓碑在场(完整合法的 v1 信封;没有一步替运维转它,出路是删键后从中心编辑器重新发布)。"
77
77
  },
78
78
  "wire": {
79
79
  "derive": true
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "contributor": "cli",
3
- "claim": "壳视角④:worker 的 env 值里有换行 / 回车 ⇒ 读侧**原样承运**(不折叠、不截断、不静默改写)。壳的 `/config show` 单行渲染会断行,那是显示面的事;读侧一改,配置就与运维写下的不是同一份。注意这一域是非便携域:local-root 腿看不到它,只报 unread-config-file —— 三腿三样,壳要知道自己问的是哪一腿。 (7.0.0:输入的 worker 改成 7.0.0 形 —— 显式声明 `runtime.execution {lane: host}` + `runtime.store {backend: local}`。6.x 原输入是 enabled 且无车道的 `runtime: {}`,正是 WA-49 病例,一次性迁移对它是 refused,迁不出可读形;本条要打的是 env 值的承运,与车道无关,所以按新形写明车道,不是放宽读侧。)",
3
+ "claim": "壳视角④:worker 的 env 值里有换行 / 回车 ⇒ 读侧**原样承运**(不折叠、不截断、不静默改写)。壳的 `/config show` 单行渲染会断行,那是显示面的事;读侧一改,配置就与运维写下的不是同一份。注意这一域不在本地读取集(not-a-local-read-domain):local-root 腿不读它,只报 unread-config-file —— 三腿三样,壳要知道自己问的是哪一腿。 (7.0.0:输入的 worker 改成 7.0.0 形 —— 显式声明 `runtime.execution {lane: host}` + `runtime.store {backend: local}`。6.x 原输入是 enabled 且无车道的 `runtime: {}`,正是 WA-49 病例,一次性迁移对它是 refused,迁不出可读形;本条要打的是 env 值的承运,与车道无关,所以按新形写明车道,不是放宽读侧。)",
4
4
  "firstRedOn": []
5
5
  }
@@ -2,5 +2,5 @@
2
2
  "contributor": "test",
3
3
  "claim": "告警对象上 `domain` **缺席**(不是 `null`、不是空串)时,三腿必须原样传成缺席。消费方普遍写 `{domain: w.domain, …}` 这种投影(web-admin 实测 `unread-config-file` 无必填 `domain`),谁把缺席折成 `null` 或 `\"\"`,谁就让下游多红一处而自己看不见。",
4
4
  "firstRedOn": [],
5
- "note": "一条输入里同时放两条 `unread-config-file`:`hosts.json`(非便携域 ⇒ **带** `domain`)与 `web-admin-ui.json`(非域名 ⇒ **不带** `domain`)。两种形并排,所以「把缺席一律折成 null」与「把 domain 整个丢掉」两种错法都会红,而不是只挡住其中一种。诚实边界:`unread-config-file` 是 `config.d/` 扫描**独有**的 kind(闭集里唯一 `domain` 可选的那条),所以「缺席传成缺席」这件事**结构上只在 local-root 腿上可观察**;domains / wire 两腿在本条上是零告警的正控(它们不该凭空造出这条告警)。firstRedOn 空是**实跑**出来的:五个历史版本(1.0.0/1.5.0/1.10.0/2.0.0/2.1.0)在本条上全绿 ⇒ 护栏,不是回归凭证。"
5
+ "note": "一条输入里同时放两条 `unread-config-file`:`hosts.json`(是域名、但不在本地读取集 ⇒ **带** `domain`)与 `web-admin-ui.json`(非域名 ⇒ **不带** `domain`)。两种形并排,所以「把缺席一律折成 null」与「把 domain 整个丢掉」两种错法都会红,而不是只挡住其中一种。诚实边界:`unread-config-file` 是 `config.d/` 扫描**独有**的 kind(闭集里唯一 `domain` 可选的那条),所以「缺席传成缺席」这件事**结构上只在 local-root 腿上可观察**;domains / wire 两腿在本条上是零告警的正控(它们不该凭空造出这条告警)。firstRedOn 空是**实跑**出来的:五个历史版本(1.0.0/1.5.0/1.10.0/2.0.0/2.1.0)在本条上全绿 ⇒ 护栏,不是回归凭证。"
6
6
  }
@@ -10,5 +10,5 @@
10
10
  "sk-FAKE-CORPUS-0000000000000000",
11
11
  "ghp_FAKE-CORPUS-1111111111111111"
12
12
  ],
13
- "note": "两条秘密走**两条不同的告警路径**,所以「值不上线」在两条路上分别被判:①`sk-` 那把是**存活条目**上一个未知键的值 ⇒ 只该出现在 `unknown-keys-dropped` 的键坐标里(键名 `apiKeyInline` 上线、值不上线);②`ghp_` 那把是**被丢条目**上一个 enum 字段的值 ⇒ zod 的 `invalid_enum_value` 会把 `received` 原样回显,只有 `sanitizeZodError`/`redactSecrets` 挡着 ⇒ 它落在 `entry-dropped.error` 的文案面上,而 `findSecretLeaks` 恰恰扫这一面。正控(判据到达性)由 expected 的两条告警坐标承担:`[\"models\",0,\"apiKeyInline\"]` 与 `[\"models\",1]` 必须在场,证明剥键扫描与抢救路径都真跑到了。扫描器自身的判别力由 verify.mjs 的 decoy 臂钉住(把一个**非**秘密形的 enum 值当秘密登记 ⇒ findSecretLeaks 必须命中),否则「零命中」与「扫描器恒返回空」同形。语料里的两把是**假串**,不是任何真凭据。⚠️ firstRedOn 里的三个旧版**不是在秘密轴上红的**:逐版直读 `findSecretLeaks`(1.0.0/1.5.0/1.10.0/2.0.0/2.1.0)**五版全零命中**;那三版红是因为 1.11.0 才有的逐条容错还不存在,整个 `models` 域退默认(只报一条 `domain-defaulted`),于是 effective 与告警多重集都对不上。⇒ 在**秘密轴**上这条同样是护栏;把「这条 case 在旧版上红」读成「旧版泄过秘密」是从读数推到结论的那一类错,读数见 _historical-readout.json#t04SecretAxis。"
13
+ "note": "两条秘密走**两条不同的告警路径**,所以「值不上线」在两条路上分别被判:①`sk-` 那把是**存活条目**上一个未知键的值 ⇒ 只该出现在 `unknown-keys-dropped` 的键坐标里(键名 `apiKeyInline` 上线、值不上线);②`ghp_` 那把是**被丢条目**上一个 enum 字段的值 ⇒ zod 的 `invalid_enum_value` 会把 `received` 原样回显,只有 `sanitizeZodError`/`redactSecrets` 挡着 ⇒ 它落在 `entry-dropped.error` 的文案面上,而 `findSecretLeaks` 恰恰扫这一面。正控(判据到达性)由 expected 的两条告警坐标承担:`[\"models\",0,\"apiKeyInline\"]` 与 `[\"models\",1]` 必须在场,证明剥键扫描与抢救路径都真跑到了。扫描器自身的判别力由 verify.mjs 的 decoy 臂钉住(把一个**非**秘密形的 enum 值当秘密登记 ⇒ findSecretLeaks 必须命中),否则「零命中」与「扫描器恒返回空」同形。语料里的两把是**假串**,不是任何真凭据。⚠️ firstRedOn 里的三个旧版**不是在秘密轴上红的**:逐版直读 `findSecretLeaks`(1.0.0/1.5.0/1.10.0/2.0.0/2.1.0)**五版全零命中**;那三版红是因为 1.11.0 才有的逐条容错还不存在,整个 `models` 域退默认(只报一条 `domain-defaulted`),于是 effective 与告警多重集都对不上。⇒ 在**秘密轴**上这条同样是护栏;把「这条 case 在旧版上红」读成「旧版泄过秘密」是从读数推到结论的那一类错,读数见 _historical-readout.json#t04SecretAxis。 22.0.0 起上面的 ①② 与「两条告警坐标」读不到了:第 1 条(带未知键 apiKeyInline)也是坏条目 ⇒ 零幸存者 ⇒ models 整域缺省,expected 里只剩一条无坐标的 `domain-defaulted`(见 claim 末句);①② 与「正控由两条告警坐标承担」是 21.x 读法下的叙述。"
14
14
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "contributor": "contract",
3
- "claim": "十六个域各给一份**合法空文档** `{}` ⇒ 零告警、每域落 schema 默认。覆盖律的第一份:每个域至少被两条 case 摸过。它同时钉住「设了空」这一形在三腿上的读数,以及 local-root 腿对五个非便携域各报一条 unread-config-file。",
3
+ "claim": "十六个域各给一份**合法空文档** `{}` ⇒ 零告警、每域落 schema 默认。覆盖律的第一份:每个域至少被两条 case 摸过。它同时钉住「设了空」这一形在三腿上的读数,以及 local-root 腿对每个不在本地读取集的域各报一条 unread-config-file(`why: not-a-local-read-domain`;这个集合由变换 T3 从 `LOCAL_READ_DOMAINS` 派生,今天是四个:workers / hosts / systems / entitlement,`projects` 在读取集里、被读、不报)。",
4
4
  "firstRedOn": []
5
5
  }
@@ -447,12 +447,14 @@ export type EffectiveReadWarning = {
447
447
  identity?: DroppedEntryIdentity;
448
448
  reasonCode?: DroppedEntryReasonCode;
449
449
  }
450
- /** `config.d/` 里存在、但本地读取集(`LOCAL_READ_DOMAINS`)**永远不会读**的文件:名字不是域(`not-a-domain`),或是域但不在本地读取集里(`non-portable-domain`:已发的闭集词,今天说的是 workers / hosts / systems / entitlement;`projects` 29.0.0 起在读取集里,被读)。 */
450
+ /** `config.d/` 里存在、但本地读取集(`LOCAL_READ_DOMAINS`)**永远不会读**的文件:名字不是域(`not-a-domain`),或是域但不在本地读取集里(`not-a-local-read-domain`:今天说的是 workers / hosts / systems / entitlement;`projects` 29.0.0 起在读取集里,被读)。
451
+ * `why` 说的是判据:文件名「是不是域」、再「在不在本地读取集」,判据与这个域能不能随 bundle 搬运(`PORTABLE_DOMAINS`)无关;
452
+ * 本地不读的成文理由目前借用搬运义的 `NON_PORTABLE_DOMAIN_REASONS`(键集含 `projects`、与这里的四个不同)—— 借用,不是这个词的理由表。 */
451
453
  | {
452
454
  kind: "unread-config-file";
453
455
  file: string;
454
456
  domain?: DomainName;
455
- why: "not-a-domain" | "non-portable-domain";
457
+ why: "not-a-domain" | "not-a-local-read-domain";
456
458
  };
457
459
  /** {@link EffectiveReadWarning} 的 `kind` **闭集**(运行期值)。一致性 kit 的覆盖律按它计数,消费方要遍历
458
460
  * 「所有告警种类」也用它 —— 属主在告警联合自己的模块里,`./conformance` 只再导出(4.0.0 前它住在 kit 里,
@@ -1371,7 +1371,7 @@ export const DOMAIN_READ_FALLBACK = deepFreeze({
1371
1371
  execution: "throw",
1372
1372
  projects: "throw",
1373
1373
  // prompts:内容域 ——坏形→空默认 `{}`(=「不管提示词」:不下发中心层,引擎用内置);fail-closed 由 PUBLISH_MODE
1374
- // 发布闸承担,default 不扩权。14.0.0 起墓碑键(`bindings` / `catalog`)也走这一档(读不出 ⇒ 缺省 + domain-defaulted 点名 SS-M10)。
1374
+ // 发布闸承担,default 不扩权。14.0.0 起墓碑键(`bindings` / `catalog`)也走这一档(读不出 ⇒ 缺省 + domain-defaulted 点名该键与出路)。
1375
1375
  prompts: "default",
1376
1376
  // limits(0.19.0):THROW —— 本域是成本 / 限流天花板的唯一发布位(11.0.0 起 runtime 域retired)。坏形
1377
1377
  // 降级成空域 = 中央发布的成本/限流天花板整片蒸发,消费方回自己的 env 底(可能宽得多)= 预算轴放权。
@@ -35,7 +35,7 @@ export declare const LEG_EXPECTATION: {
35
35
  readonly why: "T3 / T4 / T5 / T6";
36
36
  };
37
37
  };
38
- /** 非本地读取域(T3 的集合)—— 由 {@link LOCAL_READ_DOMAINS} 派生,零手抄:本地读腿(`loadLocalConfig`)不读它们的文件(报 `unread-config-file{non-portable-domain}`),域取 schema 默认。 */
38
+ /** 非本地读取域(T3 的集合)—— 由 {@link LOCAL_READ_DOMAINS} 派生,零手抄:本地读腿(`loadLocalConfig`)不读它们的文件(报 `unread-config-file{not-a-local-read-domain}`),域取 schema 默认。 */
39
39
  export declare const NON_LOCAL_READ_DOMAINS: readonly DomainName[];
40
40
  /** 一份 `domains` 文档集里,**不是域名**的那些顶层键(T4 的触发面)。 */
41
41
  export declare const foreignKeysOf: (docs: Readonly<Record<string, unknown>>) => string[];
@@ -13,7 +13,7 @@
13
13
  * · **T2 skills 表示**(wire):域形带 `content`,wire 形带 `contentHash`(manifest)。判据 schema 随表示走;读法不随(24.0.0 起清单与域文档同一只读法、
14
14
  * 同两张表,剥键扫描与告警同读 —— 此前清单不走剥键扫描,派生要把 skills 的剥键告警从 wire 期望里滤掉)。
15
15
  * · **T3 非本地读取域**(local-root):`config.d/` 只读 {@link LOCAL_READ_DOMAINS}(便携域集 + `projects`);其余域(workers / hosts / systems / entitlement)的文件在场则报
16
- * `unread-config-file{why:"non-portable-domain"}`(词是已发的闭集词,不随这里改名),域本身取 schema 默认。**由 `LOCAL_READ_DOMAINS` 派生,
16
+ * `unread-config-file{why:"not-a-local-read-domain"}`,域本身取 schema 默认。**由 `LOCAL_READ_DOMAINS` 派生,
17
17
  * 不手抄域名** —— 设计稿只点了 `hosts` 一个实例,类是「本地读取集之外的域」。29.0.0 以前这一格读的是便携域集(搬运义),`projects` 因此被算作「本地不读」;两个义拆开之后本格只问本地读取义。
18
18
  * · **T4 未知顶层键**(wire + local-root):wire 是 open-world,不认识的顶层键**逐字承运**;`domains` 腿
19
19
  * 只按域名取文档,多出来的键根本不会被问到(无声);local-root 报
@@ -44,7 +44,7 @@ import { deepFreeze } from "../deep-freeze.js";
44
44
  export const DERIVATION_TRANSFORMS = deepFreeze([
45
45
  { id: "T1-wire-carried-domains", legs: ["wire"], what: "buildEffective 恒物化每个域;wire 对 WIRE_CARRIED_DOMAINS(prompts / a2a)按在场性挂回(缺席进缺席出;在场时 prompts 是原文档、a2a 是域腿读数)" },
46
46
  { id: "T2-skills-representation", legs: ["wire"], what: "域形 content ↔ wire 形 contentHash(manifest),判据 schema 随表示走;读法与告警同一只" },
47
- { id: "T3-non-local-read-domains", legs: ["localRoot"], what: "config.d/ 只读 LOCAL_READ_DOMAINS;其余域取默认 + unread-config-file{non-portable-domain}" },
47
+ { id: "T3-non-local-read-domains", legs: ["localRoot"], what: "config.d/ 只读 LOCAL_READ_DOMAINS;其余域取默认 + unread-config-file{not-a-local-read-domain}" },
48
48
  { id: "T4-unknown-top-level-key", legs: ["wire", "localRoot"], what: "wire open-world 逐字承运;domains 腿按域名取文档故无声;local 报 unread-config-file{not-a-domain}" },
49
49
  { id: "T5-file-layer-first", legs: ["localRoot"], what: "config.d/<域>.json 必须是 JSON 对象(空/null/数组/标量 throw),这一层在域解析之前" },
50
50
  { id: "T6-file-name-classification", legs: ["localRoot"], what: "config.d/ 的文件分三类:域文件 / NON_DOMAIN_CONFIG_FILES(remote-exec.json 自带读取与校验路径)/ 隐藏文件与非 .json(忽略);只有剩下的才报 not-a-domain" },
@@ -66,7 +66,7 @@ export const LEG_EXPECTATION = deepFreeze({
66
66
  wire: { source: "derivable", why: "T1 / T2 / T4" },
67
67
  localRoot: { source: "derivable", why: "T3 / T4 / T5 / T6" },
68
68
  });
69
- /** 非本地读取域(T3 的集合)—— 由 {@link LOCAL_READ_DOMAINS} 派生,零手抄:本地读腿(`loadLocalConfig`)不读它们的文件(报 `unread-config-file{non-portable-domain}`),域取 schema 默认。 */
69
+ /** 非本地读取域(T3 的集合)—— 由 {@link LOCAL_READ_DOMAINS} 派生,零手抄:本地读腿(`loadLocalConfig`)不读它们的文件(报 `unread-config-file{not-a-local-read-domain}`),域取 schema 默认。 */
70
70
  export const NON_LOCAL_READ_DOMAINS = deepFreeze(DOMAINS.filter((d) => !LOCAL_READ_DOMAINS.includes(d)));
71
71
  /** 一份 `domains` 文档集里,**不是域名**的那些顶层键(T4 的触发面)。 */
72
72
  export const foreignKeysOf = (docs) => Object.keys(docs).filter((k) => !isDomainName(k));
@@ -158,7 +158,7 @@ export function deriveLocalExpectation(source, docs, baseline, localVersion) {
158
158
  const warnings = source.warnings.filter((w) => !("domain" in w && w.domain !== undefined && NON_LOCAL_READ_DOMAINS.includes(w.domain)));
159
159
  for (const d of NON_LOCAL_READ_DOMAINS) {
160
160
  if (Object.prototype.hasOwnProperty.call(docs, d))
161
- warnings.push({ kind: "unread-config-file", file: `${d}.json`, domain: d, why: "non-portable-domain" });
161
+ warnings.push({ kind: "unread-config-file", file: `${d}.json`, domain: d, why: "not-a-local-read-domain" });
162
162
  }
163
163
  // T6:只有**既不是专用文件、也不是隐藏文件**的那些才报 not-a-domain(分类表从 file-store 派生,零手抄)。
164
164
  for (const k of foreignKeysOf(docs)) {
@@ -82,7 +82,8 @@ export class FileConfigStore {
82
82
  * 闭集 —— 文件在、进程跑、限额还是 env 老值,**零告警**(「域缺席」与「文件不存在」在下游逐字同形)。
83
83
  * 修法方向是**响亮,不是收紧**:未登记文件照旧不读(拒收会让一个无害的散落文件打死整个部署),但必须
84
84
  * 说出来。两类分开报,因为处置不同:`not-a-domain` = 名字打错 / 消费方开了本包还不认识的域(要来本包
85
- * 登记);`non-portable-domain` = 域认识但本地读取集({@link LOCAL_READ_DOMAINS})刻意不含它(workers / hosts / systems / entitlement;理由见 {@link NON_PORTABLE_DOMAIN_REASONS};`projects` 不在此列 —— 它在本地读取集里,被读)。
85
+ * 登记);`not-a-local-read-domain` = 域认识但本地读取集({@link LOCAL_READ_DOMAINS})刻意不含它(workers / hosts / systems / entitlement;`projects` 不在此列 —— 它在本地读取集里,被读)。
86
+ * 这四个域为什么不读,没有自己的理由表,借用搬运义的 {@link NON_PORTABLE_DOMAIN_REASONS}(它答的是「为什么不随 bundle 搬运」,键集含 `projects`、与本地读取集排除的四个不同)—— 借用,不是这个词的理由表。
86
87
  *
87
88
  * 只在挂了 `onWarning` 时才 readdir —— 没接通道的调用方不该为一条没人听的警告付 IO(诚实登记:
88
89
  * 因此本门的响亮程度取决于消费方接不接这个座)。忽略:隐藏文件(含 file-edit 原子写的 `.<域>.json.*.tmp`
@@ -116,7 +117,7 @@ export class FileConfigStore {
116
117
  if (isRetiredDomainName(base))
117
118
  continue; // retired 域:由墓碑判(带事实 ⇒ getEffective 抛),不是「没人读的文件」
118
119
  out.push(isDomainName(base)
119
- ? { kind: "unread-config-file", file: name, domain: base, why: "non-portable-domain" }
120
+ ? { kind: "unread-config-file", file: name, domain: base, why: "not-a-local-read-domain" }
120
121
  : { kind: "unread-config-file", file: name, why: "not-a-domain" });
121
122
  }
122
123
  return out;
package/dist/index.d.ts CHANGED
@@ -45,6 +45,7 @@ export * from "./settings-sources.js";
45
45
  export * from "./url-pattern.js";
46
46
  export * from "./http-hook-allowlists.js";
47
47
  export * from "./mcp-server-policy.js";
48
+ export * from "./web-search-section.js";
48
49
  export * from "./ui-language.js";
49
50
  export * from "./control-and-bidi.js";
50
51
  export * from "./mcp-request-entry.js";
package/dist/index.js CHANGED
@@ -45,6 +45,7 @@ export * from "./settings-sources.js"; // settings SOURCES (merge order) + SETTI
45
45
  export * from "./url-pattern.js"; // 13.0.0 (S-1597): THE URL-list pattern judge, two exits — urlAllowPatternMatches (⊆ upstream g9, four holes closed) / urlDenyPatternMatches (⊇ upstream ∪ whole-string glob), pure/browser-safe
46
46
  export * from "./http-hook-allowlists.js"; // 13.0.0 (U3): allowedHttpHookUrls / httpHookAllowedEnvVars — one layer reader + httpHookUrlVerdict / httpHookEnvVarsAllowed (admitted layers INTERSECT; SAFETY_MERGE_SPEC.httpHookAllowlists), pure/browser-safe
47
47
  export * from "./mcp-server-policy.js"; // 13.0.0 (U6): mcpServerPolicyVerdict → McpPolicyBlock{name, list, rule, target, written, sources} (structure, no sentence; target judged expanded, echoed only as written), pure/browser-safe
48
+ export * from "./web-search-section.js"; // 30.1.0: WEB_SEARCH_SECTION_KEYS — the web search section's settings-document key (each key is also its category's name: SAFETY_MERGE_SPEC.webSearch), pure/browser-safe
48
49
  export * from "./ui-language.js"; // 13.0.0 (S-1592): the UI-language settings fragment (semaUiLanguage, en | zh, category ui, user settings) + readUiLanguage, pure/browser-safe
49
50
  export * from "./control-and-bidi.js"; // the one-line echo strip set (C0 + DEL + the 12 Bidi_Control code points) — CONTROL_AND_BIDI_CHARS (the class, as regex source text) + stripControlAndBidi / hasControlOrBidi, pure/browser-safe
50
51
  export * from "./mcp-request-entry.js"; // 14.0.0: the request-plane MCP entry judges (isUsableWireName / isContentOriginWord / readRequestMcpTransport + the value-shape describers; 29.0.0: the request keys it refuses by name, MCP_REQUEST_KEY_REFUSALS) — one reading for the service legs and the shell pre-check, pure/browser-safe
@@ -6,13 +6,13 @@
6
6
  import type { ENV_MODELS_DOCUMENT } from "./config-root-documents.js";
7
7
  import type { DomainName } from "./types.js";
8
8
  /** 本版登记的一次性迁移 id(闭集;每个 id 在 `ONE_TIME_MIGRATIONS` 登记表里恰一行)。收据只许这些 id。 */
9
- export declare const ONE_TIME_MIGRATION_IDS: readonly ["SS-M10", "SS-M11", "SS-M12", "SS-M13"];
9
+ export declare const ONE_TIME_MIGRATION_IDS: readonly ["SS-M11", "SS-M12", "SS-M13"];
10
10
  export type OneTimeMigrationId = (typeof ONE_TIME_MIGRATION_IDS)[number];
11
11
  /**
12
12
  * 一条收据说迁移**对一个坐标做了什么**(闭集,每词一义):
13
13
  * - `moved` — 值搬到新位(`to`),义不变;
14
14
  * - `rewritten` — 同一坐标上的值换成今天的生效读法(例:15.x worker 行的记忆方言词 `tidb` ⇒ `mysql`);
15
- * - `dropped-inert` — 删掉;今天的读法本就不让它生效(例:空的 `bindings: []`、不声明那条车道的行上的车道键);
15
+ * - `dropped-inert` — 删掉;今天的读法本就不让它生效(例:不声明那条车道的行上的车道键、mcp 条目上从没有读者的 `authForm` / `entryKind`);
16
16
  * - `refused` — 不改:要改就得替运维猜(或旧文档今天本就读不进);原样留着,读侧照旧响亮拒,`reason` 说为什么;
17
17
  * - `minted` — 在**缺席处**写下一份新事实(一份部署决定),不改任何已有的值 —— 只有 SS-M11 铸(配置根的 `config.env-models.json`:
18
18
  * 升级前「管模型面的目录整表顶替 env 模型」的读法,写成 `replaced`;不存在才建)。
@@ -1,11 +1,11 @@
1
1
  import { deepFreeze } from "./deep-freeze.js";
2
2
  /** 本版登记的一次性迁移 id(闭集;每个 id 在 `ONE_TIME_MIGRATIONS` 登记表里恰一行)。收据只许这些 id。 */
3
- export const ONE_TIME_MIGRATION_IDS = deepFreeze(["SS-M10", "SS-M11", "SS-M12", "SS-M13"]);
3
+ export const ONE_TIME_MIGRATION_IDS = deepFreeze(["SS-M11", "SS-M12", "SS-M13"]);
4
4
  /**
5
5
  * 一条收据说迁移**对一个坐标做了什么**(闭集,每词一义):
6
6
  * - `moved` — 值搬到新位(`to`),义不变;
7
7
  * - `rewritten` — 同一坐标上的值换成今天的生效读法(例:15.x worker 行的记忆方言词 `tidb` ⇒ `mysql`);
8
- * - `dropped-inert` — 删掉;今天的读法本就不让它生效(例:空的 `bindings: []`、不声明那条车道的行上的车道键);
8
+ * - `dropped-inert` — 删掉;今天的读法本就不让它生效(例:不声明那条车道的行上的车道键、mcp 条目上从没有读者的 `authForm` / `entryKind`);
9
9
  * - `refused` — 不改:要改就得替运维猜(或旧文档今天本就读不进);原样留着,读侧照旧响亮拒,`reason` 说为什么;
10
10
  * - `minted` — 在**缺席处**写下一份新事实(一份部署决定),不改任何已有的值 —— 只有 SS-M11 铸(配置根的 `config.env-models.json`:
11
11
  * 升级前「管模型面的目录整表顶替 env 模型」的读法,写成 `replaced`;不存在才建)。
@@ -32,8 +32,8 @@ export type StoredDocuments = Readonly<Partial<Record<DomainName | RetiredDomain
32
32
  export interface StoredDocumentsMigration {
33
33
  /** 迁移后的文档集:没改的文档是**同一引用**;被移除的不在、新建的在(26.0.0 起没有一步移除或新建文档)。 */
34
34
  readonly docs: Readonly<Record<string, unknown>>;
35
- /** 逐条收据(步序 SS-M10 → workers 行步〔SS-M12 改写 → 一次终判〕:纯改写步在前,用新 schema 终判的 workers 行步最后;步内按坐标)。
36
- * SS-M13(mcp 条目)排在 SS-M10 之后、workers 行步之前。只有 `refused` 的收据 = 什么都没改。 */
35
+ /** 逐条收据(步序 SS-M13〔mcp 条目〕→ workers 行步〔SS-M12 改写 → 一次终判〕:纯改写步在前,用新 schema 终判的 workers 行步最后;步内按坐标)。
36
+ * 只有 `refused` 的收据 = 什么都没改。 */
37
37
  readonly receipts: readonly MigrationReceipt[];
38
38
  }
39
39
  /**
@@ -43,19 +43,6 @@ import { deepFreeze } from "./deep-freeze.js";
43
43
  export { MIGRATION_APPLIED_AS, ONE_TIME_MIGRATION_IDS } from "./migration-receipt.js";
44
44
  /** 一次性迁移登记表 —— 本族各条窗的**唯一属主**。别处只写「窗见 `ONE_TIME_MIGRATIONS` 登记表」。 */
45
45
  export const ONE_TIME_MIGRATIONS = deepFreeze([
46
- {
47
- id: "SS-M10",
48
- oldForm: "refused",
49
- introducedIn: "14.0.0",
50
- releasedOn: "2026-10-17",
51
- removableAfter: "2026-11-16",
52
- rewrites: "prompts: an empty `bindings` array (the default every document carried before 14.0.0 — it served nothing) is removed; a non-empty " +
53
- "`bindings` and a `catalog` are refused and kept verbatim — declarations compile to center overlays only through the center's card " +
54
- "compiler (republish), and a catalog's digest is the engine's (rebuild it with the engine's buildPromptArtifact)",
55
- removal: "the next major after the window: delete the SS-M10 step; the prompts `bindings` / `catalog` tombstone fields stay — their SS-M10 clause goes",
56
- afterRemoval: "the prompts `bindings` / `catalog` tombstone fields (permanent): a residual key is refused on read and write (the prompts domain degrades " +
57
- "to its default — no center layer is served)",
58
- },
59
46
  {
60
47
  id: "SS-M11",
61
48
  oldForm: "read-as-default",
@@ -146,7 +133,6 @@ export function migrateStoredDocuments(docs) {
146
133
  const receipts = [];
147
134
  // 步序的律:纯改写步在前,拿新 schema 终判改写结果的 workers 行步最后 —— 它判的是**全部**改写之后的行(否则一跑 refused、二跑才过:既不是一次完成,也不幂等)。
148
135
  try {
149
- stepPromptsAxes(out, receipts);
150
136
  stepMcpServers(out, receipts);
151
137
  stepWorkersRows(out, receipts);
152
138
  }
@@ -415,29 +401,3 @@ function stepMcpServers(out, receipts) {
415
401
  if (next !== undefined)
416
402
  out.mcp = { ...doc, servers: next };
417
403
  }
418
- // ── SS-M10:prompts 两轴退役 ───────────────────────────────────────────────────────────────────────────
419
- /** 14.0.0 的 prompts 域只装中心 artifact;13.x 的两轴键是墓碑。迁移只做只认形的那一件:空的 `bindings: []`(13.x 每份文档恒物化的默认值,
420
- * 从不下发任何内容)删掉。非空 `bindings` / 不是数组的 `bindings` / `catalog` 一律 refused、原样留着 —— 声明要经中心的卡编译器才编得成
421
- * overlay,catalog 的 digest 是引擎铸的,替运维机械转就是第二个编译器 / 第二个铸点。`prompts` 不是对象 ⇒ 不动(判形是读者的事)。 */
422
- function stepPromptsAxes(out, receipts) {
423
- const doc = ownOrThrow(out, "prompts");
424
- if (!isPlainJsonObject(doc))
425
- return;
426
- let next = doc;
427
- const bindings = has(doc, "bindings") ? ownOrThrow(doc, "bindings") : undefined;
428
- if (bindings !== undefined) {
429
- if (isJsonArray(bindings) && bindings.length === 0) {
430
- next = without(next, "bindings");
431
- receipts.push(receipt("SS-M10", "prompts", ["bindings"], "dropped-inert"));
432
- }
433
- else {
434
- receipts.push(refused("SS-M10", "prompts", ["bindings"], "declaration bindings compile to center overlays only through the center's card compiler — republish the prompts from the web-admin editor " +
435
- "(a local config.d copy was never read by the engine: delete the key)"));
436
- }
437
- }
438
- if (has(doc, "catalog") && ownOrThrow(doc, "catalog") !== undefined) {
439
- receipts.push(refused("SS-M10", "prompts", ["catalog"], "a v1 catalog cannot be converted (its digest is the engine's) — republish from the web-admin, or rebuild with the engine's buildPromptArtifact"));
440
- }
441
- if (next !== doc)
442
- out.prompts = next;
443
- }
@@ -7,9 +7,10 @@
7
7
  * import). The settings-document UNIT table — which keys of a settings file carry a merge contract, where each sits,
8
8
  * which category below it maps into, and how its raw value reads — is published by this package too, as
9
9
  * `SETTINGS_UNITS` (`./settings-units.ts`, 14.6.0): a consumer reads it instead of keeping a key→category map of its
10
- * own for those ten units (the http-hook allowlist keys are the one exception: `./http-hook-allowlists` keys and reads them
11
- * itself, with its own malformed-value reading — see the `./settings-units` header). THIS file is the category spec every unit
12
- * cites — no second copy of the law.
10
+ * own for those ten units. Not every row here has a unit: for example the http-hook allowlist keys (`./http-hook-allowlists` keys and
11
+ * reads them itself, with its own malformed-value reading) and the `webSearch` section (30.1.0; its key is published by
12
+ * `./web-search-section` as `WEB_SEARCH_SECTION_KEYS`, and this package has no reading of its shape) — see the `./settings-units`
13
+ * header. THIS file is the category spec every unit cites — no second copy of the law.
13
14
  *
14
15
  * Per-category behavior is fully determined by `mergeShape` + `minTrust` + `tighten` + `enforcement` + `fail` — and,
15
16
  * for a MEMBERIZED category (one that declares `members`, 1.1.0), by its member rows: each member's own floor and
@@ -649,6 +650,16 @@ export declare const SAFETY_MERGE_SPEC: {
649
650
  };
650
651
  };
651
652
  };
653
+ readonly webSearch: {
654
+ readonly mergeShape: "replace";
655
+ readonly minTrust: "project";
656
+ readonly tighten: {
657
+ readonly rule: "none";
658
+ };
659
+ readonly enforcement: "resolver";
660
+ readonly fail: "closed";
661
+ readonly seam: "settings.webSearch (one section, taken whole from one layer) → request settings.webSearch";
662
+ };
652
663
  };
653
664
  export type SafetyMergeCategory = keyof typeof SAFETY_MERGE_SPEC;
654
665
  /** The members a category declares, as a CLOSED SET TYPE: `"allow" | "deny" | "ask"` for `permissions`, `never` for
@@ -7,9 +7,10 @@
7
7
  * import). The settings-document UNIT table — which keys of a settings file carry a merge contract, where each sits,
8
8
  * which category below it maps into, and how its raw value reads — is published by this package too, as
9
9
  * `SETTINGS_UNITS` (`./settings-units.ts`, 14.6.0): a consumer reads it instead of keeping a key→category map of its
10
- * own for those ten units (the http-hook allowlist keys are the one exception: `./http-hook-allowlists` keys and reads them
11
- * itself, with its own malformed-value reading — see the `./settings-units` header). THIS file is the category spec every unit
12
- * cites — no second copy of the law.
10
+ * own for those ten units. Not every row here has a unit: for example the http-hook allowlist keys (`./http-hook-allowlists` keys and
11
+ * reads them itself, with its own malformed-value reading) and the `webSearch` section (30.1.0; its key is published by
12
+ * `./web-search-section` as `WEB_SEARCH_SECTION_KEYS`, and this package has no reading of its shape) — see the `./settings-units`
13
+ * header. THIS file is the category spec every unit cites — no second copy of the law.
13
14
  *
14
15
  * Per-category behavior is fully determined by `mergeShape` + `minTrust` + `tighten` + `enforcement` + `fail` — and,
15
16
  * for a MEMBERIZED category (one that declares `members`, 1.1.0), by its member rows: each member's own floor and
@@ -69,6 +70,7 @@ import { MAX_HASH_DEPTH, stableStringify } from "./hash.js";
69
70
  import { captureStringArray, dataDescriptor, isAccessorDescriptor, isolatedObject } from "./own-key-read.js";
70
71
  import { jsonShapeOf } from "./plain-json-object.js";
71
72
  import { deepFreeze } from "./deep-freeze.js";
73
+ import { WEB_SEARCH_SECTION_KEYS } from "./web-search-section.js";
72
74
  /** How values from different layers/principals combine for a category. */
73
75
  export const MergeShape = z.enum(["denyFirst", "replace", "runAll", "overrideByName", "concat"]);
74
76
  /** The trust-tier VOCABULARY as a RUNTIME VALUE — the ONE source of the ladder's words, in the same form as
@@ -460,6 +462,25 @@ export const SAFETY_MERGE_SPEC = deepFreeze({
460
462
  disableAutoMode: { direction: "tighten", minTrust: "global", boolPole: { strict: true, minTrust: "local" } },
461
463
  },
462
464
  },
465
+ // 30.1.0 — the web search section `webSearch` (provider / endpoint / key reference / result count / instance parameters). It points
466
+ // searches somewhere else, the same kind of key as `mcpServers` (server addresses) and `hooks` (http hook URLs), so it is admitted the same
467
+ // way: a WHOLE-KEY category at the project floor — no members, no direction (its merge shape and fail mode are its own, below; theirs
468
+ // differ from each other too). What `layerAdmission` answers follows from the existing law
469
+ // with no new code: a repository layer (project / local) in a workspace that is not `accepted` ⇒ `trust_withheld` (the whole section does
470
+ // not take part; accepting the workspace admits it); accepted ⇒ `admitted`; user / flag / policy ⇒ `admitted`; another tool's project files
471
+ // ⇒ `tighten_only`. `replace`: one layer's section is taken whole, never assembled from two layers (the endpoint and the key reference written
472
+ // in it come from that one layer; where a host then looks the key up is that host's contract, not this row's). `fail: "closed"`: the section
473
+ // carries a key reference (the header above limits fail-open to non-secret keys).
474
+ // DELIBERATELY not per-key (a harmless key such as the result count admitted from an untrusted layer): an untrusted repository layer's one
475
+ // admission outlet is `direction: "tighten"`, a result count is not a tightening, and a member row has no numeric value class.
476
+ // No `coreAxis` (the value domain is not the engine's). Not in `SETTINGS_UNITS` (see that file's "NOT in this table"); the section's
477
+ // settings-document key is `WEB_SEARCH_SECTION_KEYS` (`./web-search-section`), and the seam reads it from there. The seam says only what
478
+ // this package holds — where the section comes from and where it lands; what a consumer of the request then does with it is that
479
+ // consumer's contract, documented on its side.
480
+ webSearch: {
481
+ mergeShape: "replace", minTrust: "project", tighten: { rule: "none" }, enforcement: "resolver", fail: "closed",
482
+ seam: `settings.${WEB_SEARCH_SECTION_KEYS[0]} (one section, taken whole from one layer) → request settings.${WEB_SEARCH_SECTION_KEYS[0]}`,
483
+ },
463
484
  });
464
485
  /** Own-property table lookup. The category union is compile-time only; a JavaScript or deserialized caller can
465
486
  * hand in `"__proto__"` / `"constructor"` / `"toString"`, which a bare index resolves through Object.prototype
@@ -11,6 +11,10 @@
11
11
  * `malformed` mark (the failure direction is "no hook may run"), while a unit reading answers `unreadable`. Folding the two tables
12
12
  * into one is a design question (which reading is right), not a drive-by — until it is settled a consumer that wants the allowlist
13
13
  * layers reads that module, not this table.
14
+ * Nor the web search section (30.1.0, the `webSearch` category of {@link SAFETY_MERGE_SPEC}): a unit row needs a reading word, and this
15
+ * package has no reading of the section's shape — taking one in is a design question of its own, not a drive-by. Its key is published by
16
+ * `./web-search-section` (`WEB_SEARCH_SECTION_KEYS`); a consumer that wants the section's key reads that constant, not this table, and asks
17
+ * admission about the section whole, by that key — it is also the category name (`layerAdmission(source, workspace, "webSearch")`).
14
18
  *
15
19
  * How a unit is addressed (`reads`):
16
20
  * · `whole` — the unit's value is one value under its category: compared by the category's `tighten`
package/dist/types.js CHANGED
@@ -2822,7 +2822,7 @@ export const PluginsConfig = z
2822
2822
  // 由服务席盖);「哪个场景用哪段」只在 artifact 里 `when.binding` 一处表达;哪一份给哪台 worker 只有 {@link promptArtifactFor} 一只读法。
2823
2823
  // 本包对 artifact 只镜像**结构与上界**(键闭集、类型、上界、`when.binding` 文法),不镜像任何引擎词表(op / band / target / trait / fact / host 词 /
2824
2824
  // target kind)—— 语义只有引擎的 verify 一个判官(传输门宽、语义门准:引擎收的,本包必收;对拍门 = 上游漂移门 ⑤ ⑦)。
2825
- // 13.x 的两轴(声明轴 `bindings` 与 catalog 轴 v1 信封)在 14.0.0 硬退役:型面删除,存量键是墓碑,一次性迁移 SS-M10 只删空的 `bindings: []`。
2825
+ // 13.x 的两轴(声明轴 `bindings` 与 catalog 轴 v1 信封)在 14.0.0 硬退役:型面删除,存量键是墓碑(写面整域拒;读面 `prompts` 整域缺省并经告警通道点名一条 `domain-defaulted`,不接告警通道则无声;一次性迁移 SS-M10 窗关删码后,拒句止于今天的位与出路,没有迁移指路)。
2826
2826
  /** 引擎 `ARTIFACT_LIMITS` 的镜像常量(本包不带引擎运行期依赖 ⇒ 镜像)。对表钉在**镜像的属主**这里:上游漂移门 ⑤ 逐键 === devDependency 钉住的那只引擎的导出。
2827
2827
  * `maxOverlayTextBytes` / `maxTotalTextBytes` 引擎按 UTF-8 字节量;本包的 zod 按字符(UTF-16 码元)量 —— 码元数恒 ≤ UTF-8 字节数,所以本包的门恒宽于引擎、方向对。
2828
2828
  * `maxIntentChars` / `maxRefChars` / `maxSourceRevisionChars` 引擎按 Unicode 码点量;本包用 `withinCodePoints` 同一把尺(不用 zod 的 `.max()`,它的单位随 zod 版本变)。 */
@@ -2950,11 +2950,13 @@ export const PublishedPromptArtifact = z
2950
2950
  .refine(withinCodePoints(PROMPT_ARTIFACT_LIMITS.maxSourceRevisionChars), buildQuotedIssue `sourceRevision is at most ${fixed(String(PROMPT_ARTIFACT_LIMITS.maxSourceRevisionChars))} characters (code points)`),
2951
2951
  })
2952
2952
  .strict();
2953
- /** 13.x 两轴的墓碑(14.0.0):`bindings` / `catalog` 同一行。 */
2953
+ /** 13.x 两轴的墓碑(14.0.0):`bindings` / `catalog` 同一行。14.0.0 之前存下来的旧形没有哪一步替运维改写(一次性迁移 SS-M10 随窗到期删了),
2954
+ * 拒句止于今天的位与出路:键从存储文档里删掉;旧声明与 v1 catalog 在本包里转不成 artifact(声明要经中心的卡编译器,catalog 的 digest 是引擎铸的),
2955
+ * 要中心层就从中心的编辑器重新发布。 */
2954
2956
  const PROMPTS_AXES_RETIRED = {
2955
2957
  retiredIn: "14.0.0",
2956
- now: "the center artifact (prompts.artifact for every worker, prompts.workers.<name> for one worker)",
2957
- migration: "SS-M10",
2958
+ now: "the center artifact (prompts.artifact for every worker, prompts.workers.<name> for one worker) — delete the key from the stored document " +
2959
+ "(the old declarations and the v1 catalog cannot be converted: republish the prompts from the center's editor)",
2958
2960
  };
2959
2961
  /** prompts 域存储形 v2:中心层的身份。web-admin 店(草稿 / 发布快照 / 回滚史)与本地 `config.d/prompts.json` 同形。 */
2960
2962
  export const PromptsConfig = z.object({
@@ -2998,7 +3000,7 @@ export const DOMAIN_SCHEMAS = deepFreeze({
2998
3000
  entitlement: EntitlementConfig,
2999
3001
  execution: ExecutionPolicy, // 0.8.0: S3 execution-lane policy (scope 级; client-advisory until service gate)
3000
3002
  projects: ProjectsConfig, // 0.10.0: 142-S3 project identity ledger + 无仓铸造权威 (scope=tenant 轴; NOT portable — 租户身份数据)
3001
- prompts: PromptsConfig, // 0.10.18 起;14.0.0 单轴:中心 artifact 的身份(`{ artifact?, workers? }`);13.x 两轴的键是墓碑(SS-M10)
3003
+ prompts: PromptsConfig, // 0.10.18 起;14.0.0 单轴:中心 artifact 的身份(`{ artifact?, workers? }`);13.x 两轴的键是墓碑
3002
3004
  limits: LimitsConfig, // 0.19.0: cost/限流族热更新发布位(消费方 #322 批1;本地腿闭集缺口的源头修复)
3003
3005
  a2a: A2aConfig, // 18.0.0: 常驻出站 A2A 对端名册(便携;本地腿 config.d/a2a.json 与中心腿 /effective.a2a 同一个声明座;线上按在场性承运,见 WIRE_CARRIED_DOMAINS)
3004
3006
  // integrations + access: DELETED in 0.6.0 (EXPERT-REDESIGN §9) — parseDomain/effective/路由随之 404。
@@ -0,0 +1,3 @@
1
+ /** The section's key in a settings document (closed set, top level; each key is also its category's name in `SAFETY_MERGE_SPEC`). */
2
+ export declare const WEB_SEARCH_SECTION_KEYS: readonly ["webSearch"];
3
+ export type WebSearchSectionKey = (typeof WEB_SEARCH_SECTION_KEYS)[number];
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The web search section (30.1.0) — the settings-document key of the section that picks where searches go (provider, endpoint, key
3
+ * reference, result count, …). Pure data, browser-safe.
4
+ *
5
+ * Its merge law and admission floor are one row, `SAFETY_MERGE_SPEC.webSearch` (`./safety-merge-spec`); this module publishes the
6
+ * section's KEY, the way `HTTP_HOOK_ALLOWLIST_KEYS` (`./http-hook-allowlists`) and `MCP_SERVER_LIST_KEYS` (`./mcp-server-policy`) publish
7
+ * the keys of the other contracts that are not `SETTINGS_UNITS` rows. A consumer that labels each settings key with what this package says
8
+ * about it reads the unit table plus these key constants — the section's key is not spelled out anywhere else in this package (the row's
9
+ * `seam` reads it from here).
10
+ *
11
+ * Every key here is also the name of the category that governs it, so a reader asks admission with the key itself:
12
+ * `layerAdmission(source, workspace, key)` — the section whole, never one of its members (the category has none).
13
+ * Not here: the section's own keys and shape. This package has no reading of them.
14
+ */
15
+ import { deepFreeze } from "./deep-freeze.js";
16
+ /** The section's key in a settings document (closed set, top level; each key is also its category's name in `SAFETY_MERGE_SPEC`). */
17
+ export const WEB_SEARCH_SECTION_KEYS = deepFreeze(["webSearch"]);
@@ -4,9 +4,9 @@
4
4
  > 每次全量重算并逐名比对 —— 加 / 删 / 改形一个导出而不重生成本档 ⇒ 红。导出面的每次变动因此以本档的 diff 出现在评审里。
5
5
  > 形:`value` = 运行期拿得到的值;`type` = 只在类型层;`value+type` = 同名的值与类型(zod schema 与它推出的类型)。
6
6
 
7
- 子路径 24 条(资产出口 `./package.json` / `./fleet-paths.json` 不是模块,不列),导出名合计 1562 个(同名在多条子路径上各计一次)。
7
+ 子路径 24 条(资产出口 `./package.json` / `./fleet-paths.json` 不是模块,不列),导出名合计 1564 个(同名在多条子路径上各计一次)。
8
8
 
9
- ## `.`(831)
9
+ ## `.`(833)
10
10
 
11
11
  - `A2aConfig` — value+type
12
12
  - `A2aPeerSpec` — value+type
@@ -626,6 +626,7 @@
626
626
  - `WEB_ADMIN_CREDENTIAL_ENVELOPE_KIND` — value
627
627
  - `WEB_ADMIN_ENV` — value
628
628
  - `WEB_ADMIN_JWKS_PATH` — value
629
+ - `WEB_SEARCH_SECTION_KEYS` — value
629
630
  - `WIRE_CARRIED_DOMAINS` — value
630
631
  - `WORKER_NAME` — value
631
632
  - `WORKER_PULL_TOKEN` — value
@@ -642,6 +643,7 @@
642
643
  - `WebAdminJwk` — value+type
643
644
  - `WebAdminJwks` — value+type
644
645
  - `WebAdminSessionTarget` — type
646
+ - `WebSearchSectionKey` — type
645
647
  - `WireCarriedDomain` — type
646
648
  - `WorkerCondition` — value+type
647
649
  - `WorkerLifecycle` — value+type
@@ -220,7 +220,7 @@ sema-test 的读数,是本仓自己重跑 `node scripts/conformance-historical.m
220
220
  |---|---|---|
221
221
  | `T1-wire-carried-domains` | wire | `buildEffective` 恒物化每个域;wire 对承运表 `WIRE_CARRIED_DOMAINS`(`prompts`、`a2a`)按**在场性**挂回 —— 线上读口不编造生产方没发的域:缺席进缺席出;在场时 `prompts` 是**未解析的原文档**,`a2a` 是域腿读数。**由常量派生,不手抄域名**;覆盖律要求表里每个域都有语料让两腿在它上面真的分开 |
222
222
  | `T2-skills-representation` | wire | 域形带 `content`,wire 形带 `contentHash`(manifest);判据 schema 随表示走,读法不随 —— 24.0.0 起清单与域文档同一只读法、同两张表(`skills` 不逐条丢、读档 throw),剥键告警两腿同读(此前 wire 腿没有 skills 的剥键告警,派生把它们滤掉) |
223
- | `T3-non-local-read-domains` | local-root | `config.d/` 只读 `LOCAL_READ_DOMAINS`(便携域集 + `projects`);其余域(workers / hosts / systems / entitlement,即 `NON_LOCAL_READ_DOMAINS`)取 schema 默认 + `unread-config-file{non-portable-domain}`(词是已发的闭集词)。**由常量派生,不手抄域名**;29.0.0 前这一格读便携域集,`projects` 因此被当作本地不读 |
223
+ | `T3-non-local-read-domains` | local-root | `config.d/` 只读 `LOCAL_READ_DOMAINS`(便携域集 + `projects`);其余域(workers / hosts / systems / entitlement,即 `NON_LOCAL_READ_DOMAINS`)取 schema 默认 + `unread-config-file{not-a-local-read-domain}`(30.0.0 前这只原因词叫另一个名字,见 CHANGELOG 30.0.0)。**由常量派生,不手抄域名**;29.0.0 前这一格读便携域集,`projects` 因此被当作本地不读 |
224
224
  | `T4-unknown-top-level-key` | wire + local-root | wire 是 open-world,不认识的顶层键**逐字承运**;`domains` 腿按域名取文档故无声;local-root 报 `unread-config-file{not-a-domain}` |
225
225
  | `T5-file-layer-first` | local-root | `config.d/<域>.json` 必须是 JSON **对象**(空文件 / `null` / 数组 / 标量一律 fail-closed),这一层在域解析**之前** |
226
226
  | `T6-file-name-classification` | local-root | `config.d/` 的文件分三类:域文件(读)/ `NON_DOMAIN_CONFIG_FILES`(`remote-exec.json` —— 有自己的读取与校验路径,**不**报未知文件)/ 隐藏文件与非 `.json`(扫描忽略);只有剩下的才报 `not-a-domain` |