@sema-agent/settings-schema 13.0.1 → 14.0.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 (136) hide show
  1. package/CHANGELOG.md +90 -0
  2. package/README.md +18 -1
  3. package/conformance/VERSION +1 -1
  4. package/conformance/baseline.json +1 -3
  5. package/conformance/cases/c01-entry-salvage-then-typo/expected.json +1 -3
  6. package/conformance/cases/c02-hosts-clamp-stacked/expected.json +1 -3
  7. package/conformance/cases/c03-literal-dotted-top-key/expected.json +1 -3
  8. package/conformance/cases/c04-all-bad-collection-not-salvaged/expected.json +1 -3
  9. package/conformance/cases/c07-hooks-is-not-a-config-domain/expected.json +1 -3
  10. package/conformance/cases/c08-limits-unknown-carried-64/expected.json +1 -3
  11. package/conformance/cases/c09-limits-unknown-carried-65/expected.json +1 -3
  12. package/conformance/cases/c10-record-key-secret-redacted-twice/expected.json +1 -3
  13. package/conformance/cases/c11-unicode-unknown-keys/expected.json +1 -3
  14. package/conformance/cases/c12-prototype-name-top-keys/expected.json +1 -3
  15. package/conformance/cases/c13-models-field-null/expected.json +1 -3
  16. package/conformance/cases/c14-models-field-empty-array/expected.json +1 -3
  17. package/conformance/cases/c15-models-field-number/expected.json +1 -3
  18. package/conformance/cases/c16-deep-nesting-205/expected.json +1 -3
  19. package/conformance/cases/c17-empty-domain-file/expected.json +1 -3
  20. package/conformance/cases/c18-wire-envelope-not-an-object/expected.json +1 -3
  21. package/conformance/cases/c19-wire-envelope-no-version/expected.json +1 -3
  22. package/conformance/cases/c21-governance-empty-object-wins/expected.json +1 -3
  23. package/conformance/cases/c23-mixed-validity-models/expected.json +1 -3
  24. package/conformance/cases/c24-valid-entries-with-unknown-keys/expected.json +1 -3
  25. package/conformance/cases/c25-published-roundtrip-zero-warnings/expected.json +1 -3
  26. package/conformance/cases/c26-hosts-array-1024/expected.json +1 -3
  27. package/conformance/cases/c27-hosts-array-1025/expected.json +1 -3
  28. package/conformance/cases/c28-large-document-over-1mb/expected.json +1 -3
  29. package/conformance/cases/c29-salvage-then-domain-refine-fails/expected.json +1 -3
  30. package/conformance/cases/c30-version-triple-a-first/expected.json +1 -3
  31. package/conformance/cases/c31-version-triple-b-changed/expected.json +1 -3
  32. package/conformance/cases/c32-version-triple-a-restored/expected.json +1 -3
  33. package/conformance/cases/c33-limits-nested-carried-key/expected.json +1 -3
  34. package/conformance/cases/c34-skills-content-vs-manifest/expected.json +1 -3
  35. package/conformance/cases/c35-portable-domain-file-is-null/expected.json +1 -3
  36. package/conformance/cases/c36-skills-entry-without-content/expected.json +1 -3
  37. package/conformance/cases/c37-skills-field-null/expected.json +1 -3
  38. package/conformance/cases/c38-remote-exec-is-a-non-domain-file/expected.json +1 -3
  39. package/conformance/cases/c39-hidden-file-in-config-d/expected.json +1 -3
  40. package/conformance/cases/c40-s712-identity-only-what-reads-out/expected.json +1 -3
  41. package/conformance/cases/c41-s792-encoded-pem-identity/expected.json +1 -3
  42. package/conformance/cases/c42-s792-unknown-key-secret-redacted/expected.json +1 -3
  43. package/conformance/cases/c43-s792-form-and-deep-encoded-pem/expected.json +1 -3
  44. package/conformance/cases/c44-s792-utf8-escape-glued-token/expected.json +1 -3
  45. package/conformance/cases/c45-s792-identity-bounds-and-decode-depth/expected.json +1 -3
  46. package/conformance/cases/c46-s811-host-name-url-userinfo-withheld/expected.json +1 -3
  47. package/conformance/cases/c47-s811-roles-key-url-userinfo-withheld/expected.json +1 -3
  48. package/conformance/cases/c48-s935-model-headers-transported/expected.json +1 -3
  49. package/conformance/cases/c49-s935-model-headers-secret-entry-dropped/expected.json +1 -3
  50. package/conformance/cases/c50-s784-lane-host-legal/expected.json +1 -3
  51. package/conformance/cases/c51-s784-lane-e2b-legal/expected.json +1 -3
  52. package/conformance/cases/c52-s784-lane-k8s-legal/expected.json +1 -3
  53. package/conformance/cases/c53-s784-lane-ssh-legal/expected.json +1 -3
  54. package/conformance/cases/c54-s784-lane-adb-legal/expected.json +1 -3
  55. package/conformance/cases/c55-s784-lane-local-docker-legal/expected.json +1 -3
  56. package/conformance/cases/c56-s784-lane-device-legal/expected.json +1 -3
  57. package/conformance/cases/c57-s784-g1-enabled-no-lane/expected.json +1 -3
  58. package/conformance/cases/c58-s784-g2-multitenant-host/expected.json +1 -3
  59. package/conformance/cases/c59-s784-g3-k8s-missing-image/expected.json +1 -3
  60. package/conformance/cases/c60-s784-g3-e2b-missing-key/expected.json +1 -3
  61. package/conformance/cases/c61-s784-g3-other-lane-key/expected.json +1 -3
  62. package/conformance/cases/c62-s784-g7a-session-tidb/expected.json +1 -3
  63. package/conformance/cases/c63-s784-host-two-replicas/expected.json +1 -3
  64. package/conformance/cases/c64-s784-multitenant-local-store/expected.json +1 -3
  65. package/conformance/cases/c65-s784-pg-without-db/expected.json +1 -3
  66. package/conformance/cases/c66-s784-memory-backend-mismatch/expected.json +1 -3
  67. package/conformance/cases/c67-s784-retired-field-loud/expected.json +1 -3
  68. package/conformance/cases/c68-s784-device-local-store/expected.json +1 -3
  69. package/conformance/cases/c69-deep-encoded-token-past-every-reading/expected.json +1 -3
  70. package/conformance/cases/c70-rewritten-token-in-front-of-encoded-pem-header/expected.json +1 -3
  71. package/conformance/cases/c71-one-scanner-write-reads-display-forms/expected.json +1 -3
  72. package/conformance/cases/c72-dangling-reference-write-seat-refuses/expected.json +1 -3
  73. package/conformance/cases/c73-projects-extended-registration-reads/expected.json +1 -3
  74. package/conformance/cases/c74-projects-over-bound-refused/expected.json +1 -3
  75. package/conformance/cases/c75-projects-patch-remote-uniqueness/expected.json +1 -3
  76. package/conformance/cases/c76-projects-entry-salvage-nested/expected.json +1 -3
  77. package/conformance/cases/c77-prompts-center-artifact-carried/expected.json +252 -0
  78. package/conformance/cases/c77-prompts-center-artifact-carried/input.json +93 -0
  79. package/conformance/cases/c77-prompts-center-artifact-carried/meta.json +5 -0
  80. package/conformance/cases/c78-prompts-empty-bindings-refused/expected.json +82 -0
  81. package/conformance/cases/c78-prompts-empty-bindings-refused/input.json +11 -0
  82. package/conformance/cases/c78-prompts-empty-bindings-refused/meta.json +5 -0
  83. package/conformance/cases/c79-prompts-bad-worker-artifact-not-salvaged/expected.json +82 -0
  84. package/conformance/cases/c79-prompts-bad-worker-artifact-not-salvaged/input.json +129 -0
  85. package/conformance/cases/c79-prompts-bad-worker-artifact-not-salvaged/meta.json +5 -0
  86. package/conformance/cases/c80-prompts-wire-v2-verbatim/expected.json +195 -0
  87. package/conformance/cases/c80-prompts-wire-v2-verbatim/input.json +65 -0
  88. package/conformance/cases/c80-prompts-wire-v2-verbatim/meta.json +5 -0
  89. package/conformance/cases/c81-prompts-declaration-bindings-refused/expected.json +82 -0
  90. package/conformance/cases/c81-prompts-declaration-bindings-refused/input.json +23 -0
  91. package/conformance/cases/c81-prompts-declaration-bindings-refused/meta.json +5 -0
  92. package/conformance/cases/c82-prompts-v1-catalog-refused/expected.json +82 -0
  93. package/conformance/cases/c82-prompts-v1-catalog-refused/input.json +35 -0
  94. package/conformance/cases/c82-prompts-v1-catalog-refused/meta.json +5 -0
  95. package/conformance/cases/c83-prompts-bad-overlay-not-salvaged/expected.json +82 -0
  96. package/conformance/cases/c83-prompts-bad-overlay-not-salvaged/input.json +56 -0
  97. package/conformance/cases/c83-prompts-bad-overlay-not-salvaged/meta.json +5 -0
  98. package/conformance/cases/cc01-mcp-toolfaces-non-object/expected.json +1 -3
  99. package/conformance/cases/cc02-mcp-source-key-is-transported/expected.json +1 -3
  100. package/conformance/cases/cc03-model-compat-unknown-subkey/expected.json +1 -3
  101. package/conformance/cases/cli01-model-name-nfc-vs-nfd/expected.json +1 -3
  102. package/conformance/cases/cli02-control-and-zero-width-chars/expected.json +1 -3
  103. package/conformance/cases/cli03-credential-pasted-into-unknown-key/expected.json +1 -3
  104. package/conformance/cases/cli04-env-value-with-newline/expected.json +1 -3
  105. package/conformance/cases/cli05-long-and-prefix-colliding-names/expected.json +1 -3
  106. package/conformance/cases/t01-absent-domain-key-not-null/expected.json +1 -3
  107. package/conformance/cases/t03-prototype-name-key-not-swallowed/expected.json +1 -3
  108. package/conformance/cases/t04-secret-literal-never-in-warning-value/expected.json +1 -3
  109. package/conformance/cases/z01-every-domain-empty-object/expected.json +2 -6
  110. package/conformance/cases/z02-every-domain-unknown-key/expected.json +2 -6
  111. package/dist/config-fns.d.ts +7 -3
  112. package/dist/config-fns.js +19 -16
  113. package/dist/conformance/derive.js +2 -2
  114. package/dist/index.d.ts +1 -0
  115. package/dist/index.js +1 -0
  116. package/dist/mcp-request-entry.d.ts +93 -0
  117. package/dist/mcp-request-entry.js +157 -0
  118. package/dist/migration-receipt.d.ts +1 -1
  119. package/dist/migration-receipt.js +1 -1
  120. package/dist/node.d.ts +0 -1
  121. package/dist/node.js +0 -1
  122. package/dist/one-time-migrations.d.ts +1 -1
  123. package/dist/one-time-migrations.js +39 -0
  124. package/dist/safety-merge-spec.d.ts +6 -6
  125. package/dist/types.d.ts +438 -355
  126. package/dist/types.js +161 -136
  127. package/dist/url-shape.d.ts +8 -0
  128. package/dist/url-shape.js +10 -0
  129. package/docs/API-SURFACE.md +41 -27
  130. package/docs/CONFORMANCE.md +1 -1
  131. package/docs/CONSUMER-INTEGRATION.md +3 -2
  132. package/llms-full.txt +14 -11
  133. package/llms.txt +7 -2
  134. package/package.json +2 -2
  135. package/dist/prompts-digest.d.ts +0 -16
  136. package/dist/prompts-digest.js +0 -49
package/CHANGELOG.md CHANGED
@@ -6,6 +6,96 @@
6
6
  > `@sema-agent/registry-core`(更早还曾是 `@sema-ai/registry-core`)。本档 `0.19.0` 以下各节里的
7
7
  > 包名是**历史记录**,如实保留不追改。
8
8
 
9
+ ## 14.0.0 — 2026-10-17 — major:prompts 域单轴(中心 artifact v3 的结构镜像;声明轴与 v1 catalog 轴退役,一次性迁移 SS-M10)· 请求面 MCP 条目判官入包
10
+
11
+ > 档位:**major**。两件事,一条律各一句:
12
+ > **prompts 域只装一种东西 —— 引擎当期 schema 的中心 artifact**:存储存它的身份,每条下发腿只发 `{ schemaVersion: 2, artifact }`,「哪个场景用哪段」只在
13
+ > artifact 里 `when.binding` 一处表达,哪一份给哪台 worker 只有 `promptArtifactFor` 一只读法;本包只镜像 artifact 的**结构与上界**,语义只有引擎 verify 一个判官。
14
+ > **请求面 MCP 条目的每一格只有一只判官**:此前消费方私有、壳够不着;现在住本包,服务端与壳读同一份(判据与原因句逐字搬,零语义变)。
15
+ > 导出面(`docs/API-SURFACE.md`):主 barrel 638 → 654(删 11 · 加 27),`./types` 147 不变(删 11 · 加 11),`./node` 38 → 36(删 2)。一致性语料 87 例 + baseline 机械重录,差只在物化的
16
+ > `prompts`(`{bindings:[]}` → `{}`);新增 7 例(c77 新形承运 · c78 / c81 / c82 三只单形墓碑:空 `bindings` / 13.x 合法的非空声明轴 / 完整 v1 catalog,放宽任一墓碑都有一例红 ·
17
+ > c79 / c83 坏 artifact 整域缺省、不逐条抢救:删掉整台 worker 的那份 / 只丢 artifact 里的一条坏 overlay,两种错法各一例 · c80 wire v2 原样承运),语料 90 → 97。devDependency 的引擎钉 core 7.53.0(带中心 artifact v3 与 binding 两常量):镜像的结构门与 binding 两常量的
18
+ > 逐值门是全量对拍,没有待到货的格(见下「门」)。
19
+
20
+ ### BREAKING 清单(逐条三问 + 下游动作)
21
+
22
+ **B1 · prompts 声明轴与 v1 catalog 轴的型面删除**(零别名、零过渡):`PROMPT_SLOTS` / `PromptSlot` / `PromptTextDeclaration` / `PromptBinding` / `EffectivePrompts` /
23
+ `PromptPackId` / `PROMPT_PACK_ID_PREFIX` / `PromptArtifactSection` / `PromptCatalogSnapshot` / `PromptEpochArtifactPayload` / `PublishedPromptArtifactEnvelope`;
24
+ `./node` 的 `promptsContentDigest` / `sectionContentHash`(整个模块)。`PROMPT_ARTIFACT_LIMITS` 换成引擎当期的七键(`maxOverlays 64 · maxOverlayTextBytes 32000 ·
25
+ maxTotalTextBytes 131072 · maxIntentChars 2000 · maxRefs 32 · maxRefChars 500 · maxSourceRevisionChars 500`),旧五键删。
26
+ **谁需要**:两轴是同一件事的两种表达,消费方各留一只判官(服务端手写的 prompts 判官与本包的 wire 形答同一问)—— 一个事实两个读者;引擎当期只读 v3 artifact。
27
+ **谁受伤**:import 上述任一名字的消费方 tsc 红(web-admin 的卡编译器 / 解析器 / 编辑器、服务端的 slot 表);读 `PROMPT_ARTIFACT_LIMITS` 旧键的(web-admin `checkPromptLimits`)。
28
+ **补偿**:新形见 B2 / B3;卡 → overlay 的编译归中心编辑器(角色卡 = `append core/role.base`,守则 = `add behavior`,场景说明 = `add scenario` 带 `when.binding.anyOf`)。
29
+ **下游**:web-admin 发布腿只出 v3(用引擎 `buildPromptArtifact` 在服务端铸);服务端判官收成「本包 wire 形 → 引擎 verify」一线。
30
+
31
+ **B2 · `PromptsConfig` 存储形 v2 = `{ artifact?, workers? }`**(`artifact` / `workers.<名>` 各是一份 artifact 的身份 `{ payload, artifactDigest }`,键闭合、不带
32
+ `sourceRevision` —— 发布出处由服务席在下发时盖);`bindings` / `catalog` 两键成**墓碑**:在场(哪怕空数组)即拒,拒句
33
+ `prompts.bindings was retired in 14.0.0 — now the center artifact (prompts.artifact for every worker, prompts.workers.<name> for one worker); data stored before 14.0.0: run the one-time migration SS-M10 (…)`。
34
+ 读侧:带墓碑键的文档让 prompts 域整体读不出 ⇒ 缺省 `{}` + `domain-defaulted` 点名 SS-M10 ⇒ 不下发中心层(引擎内置提示词)。物化默认值 `{bindings:[]}` → `{}`。
35
+ `DOMAIN_ENTRY_SALVAGE.prompts`:`salvage` → `none` —— artifact 受 digest 约束,抢救掉一条 overlay 得到的是 digest 不再成立的 artifact(引擎拒的是它所在的整份候选),
36
+ 抢救掉一台 worker 的那份则是悄悄换成 scope 那份的文本(替换,不是收窄);读档仍 `default`。
37
+ **谁需要**:存储 = 本地 `config.d` = 下发,一种形;「发布即物化」在 v3 的意思是保存时由引擎 builder 铸好身份,引擎升级不让同一份存储换 digest。
38
+ **谁受伤**:web-admin 店里 / 本地 `config.d` 里带 `bindings` / `catalog` 的文档(SS-M10 处理,见下);按 13.x 形读 `PromptsConfig` 的消费方(tsc 红)。
39
+ **补偿**:SS-M10 删掉占绝大多数的空 `bindings: []`;非空的经中心编辑器重新发布(意图行在 web-admin)。**下游**:web-admin 跑 SS-M10 + 用卡意图重编;本地运维删掉从未生效的 `bindings`。
40
+
41
+ **B3 · `EffectivePromptsWire` 下发形 v2 = `{ schemaVersion: 2, artifact }`**(键闭合;`artifact` = `PublishedPromptArtifact`)。13.x 的 `{schemaVersion: 1, declarations?, catalog?}`
42
+ 被拒,拒句 `prompts wire schemaVersion: this contract carries {schemaVersion: 2, artifact} only — the declarations / catalog axes were retired in settings-schema 14.0.0; the center serves its center artifact (upgrade the center)`。
43
+ 每条腿(按 worker 的 / 不带 worker 的 / 个人面)只发这一形;闸关 / 没发布 / 选不出 artifact ⇒ 整个 `prompts` 键不出现。读腿 `readEffectiveWire` 照旧按在场性原样承运、不解析。
44
+ **谁需要**:服务端与 web-admin 对 wire 只有一只判官(本形,再交引擎 verify)。**谁受伤**:`EffectivePromptsWire.safeParse` 的入参是 `unknown` —— 仍发 v1 的发布方**不会 tsc 红**,
45
+ 运行期恒败(web-admin 个人面 `safeParse` 那一处:静默不带 prompts 键;服务端:整份候选被拒);不带 worker 的全局拉取若照旧发**存储原文**、不看发布闸,闸关时草稿会被采纳。
46
+ **补偿 / 要求**:发布方三条腿一律「闸开发 v2 形、闸关不带键」;W(web-admin)→ S(服务端)同一维护窗部署,窗内新旧两端互拒整份候选、停在上一份好配置。
47
+
48
+ **B4 · artifact v3 结构镜像(新导出,形与引擎当期 schema 逐键对齐)**:`PromptArtifact`(存储:身份)/ `PublishedPromptArtifact`(下发:身份 + `sourceRevision`)/
49
+ `PromptArtifactPayload`(`schemaVersion` 只收 3;非 3 拒句点名改写:`… rebuild the artifact with the engine's buildPromptArtifact (an overlay's "scope": {"binding": b} becomes "when": {"binding": {"anyOf": [b]}})`)/
50
+ `PromptOverlay`(键闭集 `id / op / target / text / message / when`,没有 `scope`)/ `PromptOverlayWhen`(`traits / host / facts / binding`)/ `PromptBindingCondition`
51
+ (**恰一张表**:`{anyOf}` 或 `{noneOf}`,1–64 个互不重名、非空白、≤ 128 字的 binding)/ `PromptArtifactRequires` / `PromptArtifactEvidence` / `PROMPT_BINDING_MAX_CHARS`(128)/
52
+ `PROMPT_BINDING_LIST_MAX`(64)。引擎词表(op / band / target / trait / fact / host 词 / target kind)**不镜像** —— 传输门宽、语义门准:引擎收的,本包必收。
53
+ 字符界(binding 名 128 / `evidence.intent` 2000 / 每条 ref 500 / `sourceRevision` 500)按 Unicode 码点量,与引擎同一把尺;镜像自带这把尺、不依赖 zod 的 `.max()`
54
+ (zod 4.4.x 的 `.max()` 量 UTF-16 码元、4.5.0 起量码点,而本包声明的区间含 4.4.x —— 用 `.max()` 则非 BMP 字符在 4.4.x 宿主上被镜像拒、引擎却收)。
55
+ 引擎的两句拒句(语义判官的原句,本包不复述):v2 artifact ⇒ `unsupported schemaVersion 2 (this engine reads schemaVersion 3 only; republish under schemaVersion 3 — an overlay's "scope": { "binding": b } becomes "when": { "binding": { "anyOf": [b] } })`;
56
+ 同一目标两条可同真的 `replace` ⇒ `overlays "<p>" and "<q>" both replace "<target>" under one condition that can hold in the same run (write exclusive binding conditions: "noneOf": [x] beside "anyOf": [x])`。
57
+ **下游**:服务端判官 `EffectivePromptsWire.safeParse` → 引擎 `verifyPromptArtifact`;web-admin 出门前的 seam 校验同一份 zod。
58
+
59
+ ### 新导出
60
+
61
+ - `promptArtifactFor(prompts, worker | null)` —— **唯一的选择读法**:worker 有自己的那份 ⇒ 它(整份取代,不叠加);否则 scope 那份;都没有 ⇒ `undefined`。`null` = 没有 worker
62
+ 身份的读者(本地腿、不带 worker 的全局拉取、个人面),恒读 scope 那份;只读自有键。
63
+ - 请求面 MCP 条目判官(`src/mcp-request-entry.ts`,主 barrel):`isUsableWireName` / `describeBadWireName` / `TOOL_WIRE_NAME_MAX_CHARS`(引擎镜像,128)·
64
+ `isContentOriginWord` / `describeBadContentOrigin` · `readMcpIdentityHeaders`(两个身份头:字符串才收,`principalHeader` 胜)· `readRequestMcpTransport`
65
+ (硬坏形 `ok:false` 点名键路径;软坏形读器丢键并记进 `lost`)与它的型 `RequestMcpTransport` / `RequestMcpTransportRead` / `McpEntryKeyIssue` ·
66
+ 值种类描述 `describeValueShape` / `describeNotStringArray` / `describeNotStringRecord` / `isStringArray` / `isStringRecord`。判据与原因句逐字等于消费方请求腿的
67
+ 上一版(同一批夹具同一批期望;导出的五只另以两万余次随机调用对拍原件、零差,传输读器与种类描述件逐行对照原件函数体)。url 的前缀守卫进 `src/url-shape.ts`(`startsWithHttpScheme`):本包判 URL 的正则只在那一个模块;
68
+ 它与形判官 `httpUrlFlaws` 对同一个值可以答得不同(空 host / 带 userinfo 的 url 前缀判收、形判官拒)—— 语义入包时冻结,两份判据收一是已知待收项。
69
+ **谁需要**:壳的发送前预检(今天只能披露「判不准、交服务端」);**谁受伤**:无(服务端行为零变化,删的是副本);**补偿**:无需。
70
+ `mcp.servers[].toolFaces` 的形读器归引擎包根,本包不镜像工具面五张词表;引擎 7.53.0 的包根还没有这只读器(包内零命中),导出名随引擎定、本包不写 ——
71
+ 服务端 / 壳在引擎导出它的那一版 import、删各自私有的那份。
72
+
73
+ ### 一次性迁移 SS-M10(登记表 `ONE_TIME_MIGRATIONS`;步序在 SS-M9 之后)
74
+
75
+ 只认形:空的 `bindings: []` 删掉(`dropped-inert`,它从不下发任何内容);非空 / 非数组的 `bindings` 与 `catalog` 一律 `refused`、原样留着(原因句:声明只有中心的卡编译器编得成
76
+ overlay —— 从 web-admin 编辑器重新发布,本地 `config.d` 的副本引擎从未读过、删键即可;catalog 的 digest 是引擎铸的 —— 重新发布或用引擎 builder 重铸)。重跑恒等;冻结 effective
77
+ (发布快照、回滚整份快照、引擎 last-known-good)走同一组步。窗 = 发布日 + 30 天(发布日 2026-10-17 → 窗关 2026-11-16),删码在窗关之后的下一个 major;墓碑永久。迁移不铸 digest(本包零引擎运行期依赖,
78
+ 在迁移里铸 = 第二个铸点)。
79
+
80
+ ### 门
81
+
82
+ - 上游漂移门:devDependency core 7.47.0 → 7.53.0。② `ModelRole` 三行登记成陈旧豁免、删(零差;7.53.0 复核同)。⑤ 七键逐键同;binding 两常量逐值同(128 / 64,引擎 7.53.0 起包根导出)。
83
+ ⑦(新)artifact 结构镜像:发布形 / payload / requires / targets / evidence / overlay / `when` / binding 条件的键集与引擎双向相等、`schemaVersion` 字面量同为 3、
84
+ 引擎发布形整份可赋给本包的型(编译期);引擎 builder 铸的 artifact(不带 / 带 `when.binding` 两组)本包原样收且不改写任何键;overlay id 长界与 binding 名 /
85
+ `evidence.intent` / ref / `sourceRevision` 字符界(引擎按码点量)界上收、界 + 1 拒的行为探针;引擎两句拒句(v2 artifact · 同目标两条可同真 replace)逐字等于上文 B4 所引;
86
+ 外加一格**发布前提门**:`package.json` 到 14.x 而 devDependency 的引擎 builder 仍铸 v2 ⇒ 红(挡住「配 v2 引擎发 v3 镜像」)。⑧(新)`TOOL_WIRE_NAME_MAX_CHARS` 逐值;
87
+ 请求面传输形与引擎传输形值型双向可赋值 + 两种传输的键集相等。
88
+ - 钉:`test/prompts-domain-14.0.0.test.ts`(存储 v2 / 墓碑 / wire v2 / v3 结构与上界 / `promptArtifactFor` 三态 / salvage none / 本地腿)·
89
+ `test/one-time-migration-ss-m10-14.0.0.test.ts`(四形 + 幂等 + 冻结 effective)· `test/mcp-request-entry-14.0.0.test.ts`(判官逐例)。
90
+
91
+ ### 下游(表态制:认领 + 排期 / 显式拒绝 + 理由 / 申请裁定)
92
+
93
+ - **server**:prompts 判官收成「`EffectivePromptsWire` → 引擎 verify」;本地腿以 `promptArtifactFor(·, null)` 读 `config.d`(今天以 cast 读 `.catalog`,不会 tsc 红,不改即静默丢本地
94
+ prompts);边界归一的存储形臂退役;场景写进 `TaskSpec.promptBinding`;三只判官改 import 本包、删副本。
95
+ - **web-admin**:发布腿只出 v3;不带 worker 的全局拉取改「闸开发 wire 形、闸关不带」;个人面同;跑 SS-M10 + 卡意图重编;`checkPromptLimits` 改读七键。
96
+ - **cli**:请求面判官可直接 import(壳预检 = 服务端受理同答)。**client-core**:本包对它是 devDependency,经包转出判官要加运行期依赖,请选。**sdk**:零引用。
97
+ - **test**:黑盒判据(旧 wire 拒 / v2 artifact 拒 / 新形采纳 / 场景三格 / 同目标冲突拒 / 旧存储三形 / 判官两侧同答 / 闸关不漏草稿 / 本地无 worker 身份)随发布帖给。
98
+
9
99
  ## 13.0.1 — 2026-10-16 — patch:`classifyHooksConfig` 对「未知字段里藏守卫迹象」的拒绝项补 `field`(点名藏迹象的那个键)· 随包文字引用的 `docs/` 与 `llms.txt` / `llms-full.txt` 进 tarball
10
100
 
11
101
  - **行为修复(拒绝项 `field`)**。13.0.0 写了「条目 / 匹配器的坏块另带坏字段名 `field`」,而实码只对「契约字段值写错」一形给了 `field`;「本会被剥掉的未知字段里藏着守卫迹象 ⇒ 拒」这一形
package/README.md CHANGED
@@ -47,6 +47,18 @@ therefore shows only `zod`. Node built-ins only (`node:crypto`, `node:fs`).
47
47
  > zod 3, nested inside every zod-4 host). The move to zod 4 did not change what any schema accepts or produces —
48
48
  > the conformance corpus reads byte-identically on both — only the wording of validation errors (see CHANGELOG 11.0.0).
49
49
 
50
+ ## 升级指引:13.x → 14.0.0(BREAKING:prompts 域单轴 = 中心 artifact;请求面 MCP 条目判官入包)
51
+
52
+ - **prompts**:域里只装引擎当期 schema 的中心 artifact。存储 `PromptsConfig = { artifact?, workers? }`(每份是 artifact 的身份 `{ payload, artifactDigest }`);
53
+ 下发 `EffectivePromptsWire = { schemaVersion: 2, artifact }`(`artifact` 带发布出处 `sourceRevision`,由服务席盖);哪一份给哪台 worker 只问
54
+ `promptArtifactFor(prompts, worker | null)`;场景差异只写在 overlay 的 `when.binding`(`{anyOf}` 或 `{noneOf}`,恰一张表)。本包只判结构与上界,语义交引擎 verify。
55
+ 声明轴(`PromptBinding` / `PromptTextDeclaration` / `EffectivePrompts` …)与 v1 catalog 信封删除,零别名;`bindings` / `catalog` 键是墓碑。
56
+ - **存量**:一次性迁移 SS-M10 删掉空的 `bindings: []`;非空 `bindings` 与 `catalog` 被拒、原样留着 —— 从中心编辑器重新发布(本地 `config.d` 的 `bindings`
57
+ 引擎从未读过,删键即可)。
58
+ - **请求面 MCP 条目**:`isUsableWireName` / `readRequestMcpTransport` / `readMcpIdentityHeaders` / `isContentOriginWord` 住本包(判据与原因句与服务端请求腿逐字同),
59
+ 壳的发送前预检与服务端受理同答。
60
+ - **部署序**:中心(发布方)与服务端同一维护窗升级,中心先;窗内新旧两端互拒整份候选、停在上一份好配置。细节与逐条三问见 CHANGELOG 14.0.0。
61
+
50
62
  ## 升级指引:10.x → 11.0.0 · 持久面:一次性迁移(`./one-time-migrations`)
51
63
 
52
64
  11.0.0 把读路径上为旧数据留的兼容臂全部收掉:旧形只有一种去处 —— **一次性迁移**把它改写成新形(你写回),读写两面遇旧形**响亮拒**,
@@ -179,7 +191,8 @@ therefore shows only `zod`. Node built-ins only (`node:crypto`, `node:fs`).
179
191
  ## What's in it
180
192
 
181
193
  - **The zod contract** (`types.ts`): `DOMAIN_SCHEMAS` (16 domains — 0.10.0 adds `projects`, the project
182
- identity ledger; 0.10.18 adds `prompts`; 0.19.0 adds `limits`, the cost/rate-limit publication slot; 11.0.0 retires
194
+ identity ledger; 0.10.18 adds `prompts` — since 14.0.0 a single axis, the center artifact (`PromptsConfig` / `EffectivePromptsWire` /
195
+ `promptArtifactFor`); 0.19.0 adds `limits`, the cost/rate-limit publication slot; 11.0.0 retires
183
196
  `runtime` — its tombstone is `RETIRED_DOMAINS`, see "One-time migrations" below),
184
197
  `EffectiveConfig`, `EffectiveWire`,
185
198
  `ENV_NAME`/`K8S_QUANTITY` boundaries, every domain's entry/config type.
@@ -448,6 +461,10 @@ therefore shows only `zod`. Node built-ins only (`node:crypto`, `node:fs`).
448
461
  - **MCP server list verdict** (`mcp-server-policy.ts`, 13.0.0): `mcpServerPolicyVerdict` → `McpPolicyBlock{name, list, rule, target,
449
462
  written, sources}` — judged on the expanded target, echoed only as written; the managed layer (whose `allowManagedMcpServersOnly` counts)
450
463
  is the source whose tier in `SETTINGS_SOURCE_CONTRACT` is `managed`.
464
+ - **Request-plane MCP entry judges** (`mcp-request-entry.ts`, 14.0.0): `isUsableWireName` / `describeBadWireName` (the engine's wire-name bound
465
+ `TOOL_WIRE_NAME_MAX_CHARS`, mirrored), `isContentOriginWord` / `describeBadContentOrigin`, `readMcpIdentityHeaders`, `readRequestMcpTransport`
466
+ (hard faults `ok:false` naming the key path; soft faults dropped by the reader and listed in `lost`) and the value-shape describers — one reading for
467
+ the service's request legs and the shell's pre-send check. A `toolFaces` declaration stays parse-transparent here: its shape is the engine ingest side's to judge, and none of the tool-face vocabularies is mirrored in this package.
451
468
  - **UI language** (`ui-language.ts`, 13.0.0): `semaUiLanguage` (`en` / `zh`, category `ui`, user settings) + `readUiLanguage`.
452
469
  - **Cross-session settings** (`cross-session.ts`): the two `settings.json` keys `crossSessionInbound`
453
470
  (wake/next-turn/hold/refuse — the core 7.30.0 vocabulary, `accept` retired in 6.0.0; `default` = unset) and `dialogExpiry` (60s/5m/10m/never), each with a reader that
@@ -1 +1 @@
1
- 13.0.1
1
+ 14.0.0
@@ -36,9 +36,7 @@
36
36
  "projects": {
37
37
  "projects": {}
38
38
  },
39
- "prompts": {
40
- "bindings": []
41
- },
39
+ "prompts": {},
42
40
  "rosters": {
43
41
  "rosters": []
44
42
  },
@@ -50,9 +50,7 @@
50
50
  "projects": {
51
51
  "projects": {}
52
52
  },
53
- "prompts": {
54
- "bindings": []
55
- },
53
+ "prompts": {},
56
54
  "rosters": {
57
55
  "rosters": []
58
56
  },
@@ -47,9 +47,7 @@
47
47
  "projects": {
48
48
  "projects": {}
49
49
  },
50
- "prompts": {
51
- "bindings": []
52
- },
50
+ "prompts": {},
53
51
  "rosters": {
54
52
  "rosters": []
55
53
  },
@@ -60,9 +60,7 @@
60
60
  "projects": {
61
61
  "projects": {}
62
62
  },
63
- "prompts": {
64
- "bindings": []
65
- },
63
+ "prompts": {},
66
64
  "rosters": {
67
65
  "rosters": []
68
66
  },
@@ -39,9 +39,7 @@
39
39
  "projects": {
40
40
  "projects": {}
41
41
  },
42
- "prompts": {
43
- "bindings": []
44
- },
42
+ "prompts": {},
45
43
  "rosters": {
46
44
  "rosters": []
47
45
  },
@@ -39,9 +39,7 @@
39
39
  "projects": {
40
40
  "projects": {}
41
41
  },
42
- "prompts": {
43
- "bindings": []
44
- },
42
+ "prompts": {},
45
43
  "rosters": {
46
44
  "rosters": []
47
45
  },
@@ -104,9 +104,7 @@
104
104
  "projects": {
105
105
  "projects": {}
106
106
  },
107
- "prompts": {
108
- "bindings": []
109
- },
107
+ "prompts": {},
110
108
  "rosters": {
111
109
  "rosters": []
112
110
  },
@@ -105,9 +105,7 @@
105
105
  "projects": {
106
106
  "projects": {}
107
107
  },
108
- "prompts": {
109
- "bindings": []
110
- },
108
+ "prompts": {},
111
109
  "rosters": {
112
110
  "rosters": []
113
111
  },
@@ -54,9 +54,7 @@
54
54
  "projects": {
55
55
  "projects": {}
56
56
  },
57
- "prompts": {
58
- "bindings": []
59
- },
57
+ "prompts": {},
60
58
  "rosters": {
61
59
  "rosters": []
62
60
  },
@@ -39,9 +39,7 @@
39
39
  "projects": {
40
40
  "projects": {}
41
41
  },
42
- "prompts": {
43
- "bindings": []
44
- },
42
+ "prompts": {},
45
43
  "rosters": {
46
44
  "rosters": []
47
45
  },
@@ -39,9 +39,7 @@
39
39
  "projects": {
40
40
  "projects": {}
41
41
  },
42
- "prompts": {
43
- "bindings": []
44
- },
42
+ "prompts": {},
45
43
  "rosters": {
46
44
  "rosters": []
47
45
  },
@@ -39,9 +39,7 @@
39
39
  "projects": {
40
40
  "projects": {}
41
41
  },
42
- "prompts": {
43
- "bindings": []
44
- },
42
+ "prompts": {},
45
43
  "rosters": {
46
44
  "rosters": []
47
45
  },
@@ -39,9 +39,7 @@
39
39
  "projects": {
40
40
  "projects": {}
41
41
  },
42
- "prompts": {
43
- "bindings": []
44
- },
42
+ "prompts": {},
45
43
  "rosters": {
46
44
  "rosters": []
47
45
  },
@@ -39,9 +39,7 @@
39
39
  "projects": {
40
40
  "projects": {}
41
41
  },
42
- "prompts": {
43
- "bindings": []
44
- },
42
+ "prompts": {},
45
43
  "rosters": {
46
44
  "rosters": []
47
45
  },
@@ -39,9 +39,7 @@
39
39
  "projects": {
40
40
  "projects": {}
41
41
  },
42
- "prompts": {
43
- "bindings": []
44
- },
42
+ "prompts": {},
45
43
  "rosters": {
46
44
  "rosters": []
47
45
  },
@@ -39,9 +39,7 @@
39
39
  "projects": {
40
40
  "projects": {}
41
41
  },
42
- "prompts": {
43
- "bindings": []
44
- },
42
+ "prompts": {},
45
43
  "rosters": {
46
44
  "rosters": []
47
45
  },
@@ -39,9 +39,7 @@
39
39
  "projects": {
40
40
  "projects": {}
41
41
  },
42
- "prompts": {
43
- "bindings": []
44
- },
42
+ "prompts": {},
45
43
  "rosters": {
46
44
  "rosters": []
47
45
  },
@@ -39,9 +39,7 @@
39
39
  "projects": {
40
40
  "projects": {}
41
41
  },
42
- "prompts": {
43
- "bindings": []
44
- },
42
+ "prompts": {},
45
43
  "rosters": {
46
44
  "rosters": []
47
45
  },
@@ -39,9 +39,7 @@
39
39
  "projects": {
40
40
  "projects": {}
41
41
  },
42
- "prompts": {
43
- "bindings": []
44
- },
42
+ "prompts": {},
45
43
  "rosters": {
46
44
  "rosters": []
47
45
  },
@@ -60,9 +60,7 @@
60
60
  "projects": {
61
61
  "projects": {}
62
62
  },
63
- "prompts": {
64
- "bindings": []
65
- },
63
+ "prompts": {},
66
64
  "rosters": {
67
65
  "rosters": []
68
66
  },
@@ -50,9 +50,7 @@
50
50
  "projects": {
51
51
  "projects": {}
52
52
  },
53
- "prompts": {
54
- "bindings": []
55
- },
53
+ "prompts": {},
56
54
  "rosters": {
57
55
  "rosters": []
58
56
  },
@@ -54,9 +54,7 @@
54
54
  "projects": {
55
55
  "projects": {}
56
56
  },
57
- "prompts": {
58
- "bindings": []
59
- },
57
+ "prompts": {},
60
58
  "rosters": {
61
59
  "rosters": []
62
60
  },
@@ -7208,9 +7208,7 @@
7208
7208
  "projects": {
7209
7209
  "projects": {}
7210
7210
  },
7211
- "prompts": {
7212
- "bindings": []
7213
- },
7211
+ "prompts": {},
7214
7212
  "rosters": {
7215
7213
  "rosters": []
7216
7214
  },
@@ -39,9 +39,7 @@
39
39
  "projects": {
40
40
  "projects": {}
41
41
  },
42
- "prompts": {
43
- "bindings": []
44
- },
42
+ "prompts": {},
45
43
  "rosters": {
46
44
  "rosters": []
47
45
  },
@@ -39,9 +39,7 @@
39
39
  "projects": {
40
40
  "projects": {}
41
41
  },
42
- "prompts": {
43
- "bindings": []
44
- },
42
+ "prompts": {},
45
43
  "rosters": {
46
44
  "rosters": []
47
45
  },
@@ -39,9 +39,7 @@
39
39
  "projects": {
40
40
  "projects": {}
41
41
  },
42
- "prompts": {
43
- "bindings": []
44
- },
42
+ "prompts": {},
45
43
  "rosters": {
46
44
  "rosters": []
47
45
  },
@@ -50,9 +50,7 @@
50
50
  "projects": {
51
51
  "projects": {}
52
52
  },
53
- "prompts": {
54
- "bindings": []
55
- },
53
+ "prompts": {},
56
54
  "rosters": {
57
55
  "rosters": []
58
56
  },
@@ -50,9 +50,7 @@
50
50
  "projects": {
51
51
  "projects": {}
52
52
  },
53
- "prompts": {
54
- "bindings": []
55
- },
53
+ "prompts": {},
56
54
  "rosters": {
57
55
  "rosters": []
58
56
  },
@@ -50,9 +50,7 @@
50
50
  "projects": {
51
51
  "projects": {}
52
52
  },
53
- "prompts": {
54
- "bindings": []
55
- },
53
+ "prompts": {},
56
54
  "rosters": {
57
55
  "rosters": []
58
56
  },
@@ -44,9 +44,7 @@
44
44
  "projects": {
45
45
  "projects": {}
46
46
  },
47
- "prompts": {
48
- "bindings": []
49
- },
47
+ "prompts": {},
50
48
  "rosters": {
51
49
  "rosters": []
52
50
  },
@@ -39,9 +39,7 @@
39
39
  "projects": {
40
40
  "projects": {}
41
41
  },
42
- "prompts": {
43
- "bindings": []
44
- },
42
+ "prompts": {},
45
43
  "rosters": {
46
44
  "rosters": []
47
45
  },
@@ -39,9 +39,7 @@
39
39
  "projects": {
40
40
  "projects": {}
41
41
  },
42
- "prompts": {
43
- "bindings": []
44
- },
42
+ "prompts": {},
45
43
  "rosters": {
46
44
  "rosters": []
47
45
  },
@@ -39,9 +39,7 @@
39
39
  "projects": {
40
40
  "projects": {}
41
41
  },
42
- "prompts": {
43
- "bindings": []
44
- },
42
+ "prompts": {},
45
43
  "rosters": {
46
44
  "rosters": []
47
45
  },
@@ -39,9 +39,7 @@
39
39
  "projects": {
40
40
  "projects": {}
41
41
  },
42
- "prompts": {
43
- "bindings": []
44
- },
42
+ "prompts": {},
45
43
  "rosters": {
46
44
  "rosters": []
47
45
  },
@@ -39,9 +39,7 @@
39
39
  "projects": {
40
40
  "projects": {}
41
41
  },
42
- "prompts": {
43
- "bindings": []
44
- },
42
+ "prompts": {},
45
43
  "rosters": {
46
44
  "rosters": []
47
45
  },
@@ -39,9 +39,7 @@
39
39
  "projects": {
40
40
  "projects": {}
41
41
  },
42
- "prompts": {
43
- "bindings": []
44
- },
42
+ "prompts": {},
45
43
  "rosters": {
46
44
  "rosters": []
47
45
  },
@@ -54,9 +54,7 @@
54
54
  "projects": {
55
55
  "projects": {}
56
56
  },
57
- "prompts": {
58
- "bindings": []
59
- },
57
+ "prompts": {},
60
58
  "rosters": {
61
59
  "rosters": []
62
60
  },
@@ -54,9 +54,7 @@
54
54
  "projects": {
55
55
  "projects": {}
56
56
  },
57
- "prompts": {
58
- "bindings": []
59
- },
57
+ "prompts": {},
60
58
  "rosters": {
61
59
  "rosters": []
62
60
  },
@@ -53,9 +53,7 @@
53
53
  "projects": {
54
54
  "projects": {}
55
55
  },
56
- "prompts": {
57
- "bindings": []
58
- },
56
+ "prompts": {},
59
57
  "rosters": {
60
58
  "rosters": []
61
59
  },
@@ -54,9 +54,7 @@
54
54
  "projects": {
55
55
  "projects": {}
56
56
  },
57
- "prompts": {
58
- "bindings": []
59
- },
57
+ "prompts": {},
60
58
  "rosters": {
61
59
  "rosters": []
62
60
  },