@sema-agent/settings-schema 28.0.0 → 30.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.
- package/CHANGELOG.md +431 -0
- package/README.md +94 -14
- package/conformance/VERSION +1 -1
- package/conformance/cases/c01-entry-salvage-then-typo/expected.json +2 -2
- package/conformance/cases/c02-hosts-clamp-stacked/expected.json +1 -1
- package/conformance/cases/c03-literal-dotted-top-key/expected.json +1 -1
- package/conformance/cases/c04-all-bad-collection-not-salvaged/expected.json +1 -1
- package/conformance/cases/c07-hooks-is-not-a-config-domain/expected.json +1 -1
- package/conformance/cases/c08-limits-unknown-carried-64/expected.json +1 -1
- package/conformance/cases/c09-limits-unknown-carried-65/expected.json +1 -1
- package/conformance/cases/c10-record-key-secret-redacted-twice/expected.json +1 -1
- package/conformance/cases/c11-unicode-unknown-keys/expected.json +1 -1
- package/conformance/cases/c12-prototype-name-top-keys/expected.json +1 -1
- package/conformance/cases/c13-models-field-null/expected.json +1 -1
- package/conformance/cases/c14-models-field-empty-array/expected.json +1 -1
- package/conformance/cases/c15-models-field-number/expected.json +1 -1
- package/conformance/cases/c18-wire-envelope-not-an-object/expected.json +1 -1
- package/conformance/cases/c19-wire-envelope-no-version/expected.json +1 -1
- package/conformance/cases/c21-governance-empty-object-wins/expected.json +1 -1
- package/conformance/cases/c23-mixed-validity-models/expected.json +1 -1
- package/conformance/cases/c24-valid-entries-with-unknown-keys/expected.json +1 -1
- package/conformance/cases/c25-published-roundtrip-zero-warnings/expected.json +1 -1
- package/conformance/cases/c26-hosts-array-1024/expected.json +1 -1
- package/conformance/cases/c27-hosts-array-1025/expected.json +1 -1
- package/conformance/cases/c28-large-document-over-1mb/expected.json +1 -1
- package/conformance/cases/c29-salvage-then-domain-refine-fails/expected.json +1 -1
- package/conformance/cases/c30-version-triple-a-first/expected.json +1 -1
- package/conformance/cases/c31-version-triple-b-changed/expected.json +1 -1
- package/conformance/cases/c32-version-triple-a-restored/expected.json +1 -1
- package/conformance/cases/c33-limits-nested-carried-key/expected.json +1 -1
- package/conformance/cases/c34-skills-content-vs-manifest/expected.json +1 -1
- package/conformance/cases/c36-skills-entry-without-content/expected.json +1 -1
- package/conformance/cases/c38-remote-exec-is-a-non-domain-file/expected.json +1 -1
- package/conformance/cases/c39-hidden-file-in-config-d/expected.json +1 -1
- package/conformance/cases/c40-s712-identity-only-what-reads-out/expected.json +1 -1
- package/conformance/cases/c41-s792-encoded-pem-identity/expected.json +1 -1
- package/conformance/cases/c42-s792-unknown-key-secret-redacted/expected.json +1 -1
- package/conformance/cases/c43-s792-form-and-deep-encoded-pem/expected.json +1 -1
- package/conformance/cases/c44-s792-utf8-escape-glued-token/expected.json +1 -1
- package/conformance/cases/c45-s792-identity-bounds-and-decode-depth/expected.json +1 -1
- package/conformance/cases/c46-s811-host-name-url-userinfo-withheld/expected.json +1 -1
- package/conformance/cases/c47-s811-roles-key-url-userinfo-withheld/expected.json +1 -1
- package/conformance/cases/c48-s935-model-headers-transported/expected.json +1 -1
- package/conformance/cases/c49-s935-model-headers-secret-entry-dropped/expected.json +1 -1
- package/conformance/cases/c50-s784-lane-host-legal/expected.json +1 -1
- package/conformance/cases/c51-s784-lane-e2b-legal/expected.json +1 -1
- package/conformance/cases/c52-s784-lane-k8s-legal/expected.json +1 -1
- package/conformance/cases/c53-s784-lane-ssh-legal/expected.json +1 -1
- package/conformance/cases/c54-s784-lane-adb-legal/expected.json +1 -1
- package/conformance/cases/c55-s784-lane-local-docker-legal/expected.json +1 -1
- package/conformance/cases/c56-s784-lane-device-legal/expected.json +1 -1
- package/conformance/cases/c57-s784-g1-enabled-no-lane/expected.json +3 -3
- package/conformance/cases/c58-s784-g2-multitenant-host/expected.json +3 -3
- package/conformance/cases/c59-s784-g3-k8s-missing-image/expected.json +3 -3
- package/conformance/cases/c60-s784-g3-e2b-missing-key/expected.json +3 -3
- package/conformance/cases/c61-s784-g3-other-lane-key/expected.json +3 -3
- package/conformance/cases/c62-s784-g7a-session-tidb/expected.json +3 -3
- package/conformance/cases/c63-s784-host-two-replicas/expected.json +3 -3
- package/conformance/cases/c64-s784-multitenant-local-store/expected.json +3 -3
- package/conformance/cases/c65-s784-pg-without-db/expected.json +3 -3
- package/conformance/cases/c66-s784-memory-backend-mismatch/expected.json +3 -3
- package/conformance/cases/c67-s784-retired-field-loud/expected.json +3 -3
- package/conformance/cases/c68-s784-device-local-store/expected.json +3 -3
- package/conformance/cases/c69-deep-encoded-token-past-every-reading/expected.json +1 -1
- package/conformance/cases/c70-rewritten-token-in-front-of-encoded-pem-header/expected.json +1 -1
- package/conformance/cases/c71-one-scanner-write-reads-display-forms/expected.json +1 -1
- package/conformance/cases/c72-dangling-reference-write-seat-refuses/expected.json +1 -1
- package/conformance/cases/c73-projects-extended-registration-reads/expected.json +1 -1
- package/conformance/cases/c74-projects-over-bound-refused/expected.json +3 -72
- package/conformance/cases/c75-projects-patch-remote-uniqueness/expected.json +3 -72
- package/conformance/cases/c76-projects-entry-salvage-nested/expected.json +2 -2
- package/conformance/cases/c77-prompts-center-artifact-carried/expected.json +1 -1
- package/conformance/cases/c78-prompts-empty-bindings-refused/expected.json +2 -2
- package/conformance/cases/c78-prompts-empty-bindings-refused/meta.json +1 -1
- package/conformance/cases/c79-prompts-bad-worker-artifact-not-salvaged/expected.json +1 -1
- package/conformance/cases/c80-prompts-wire-v2-verbatim/expected.json +1 -1
- package/conformance/cases/c81-prompts-declaration-bindings-refused/expected.json +2 -2
- package/conformance/cases/c82-prompts-v1-catalog-refused/expected.json +2 -2
- package/conformance/cases/c83-prompts-bad-overlay-not-salvaged/expected.json +1 -1
- package/conformance/cases/c84-sandbox-git-block-carried-verbatim/expected.json +1 -1
- package/conformance/cases/c85-sandbox-git-refused-block-still-carried/expected.json +1 -1
- package/conformance/cases/c86-a2a-peers-legal/expected.json +1 -1
- package/conformance/cases/c87-a2a-credential-refs-not-partially-salvaged/expected.json +1 -1
- package/conformance/cases/c88-projects-content-attestation-carried/expected.json +1 -1
- package/conformance/cases/c89-projects-content-attestation-malformed/expected.json +1 -1
- package/conformance/cases/c90-mcp-assertion-credential-carried/expected.json +143 -0
- package/conformance/cases/c90-mcp-assertion-credential-carried/input.json +30 -0
- package/conformance/cases/c90-mcp-assertion-credential-carried/meta.json +6 -0
- package/conformance/cases/c91-mcp-assertion-header-retired-entry-dropped/expected.json +105 -0
- package/conformance/cases/c91-mcp-assertion-header-retired-entry-dropped/input.json +27 -0
- package/conformance/cases/c91-mcp-assertion-header-retired-entry-dropped/meta.json +6 -0
- package/conformance/cases/c92-mcp-principal-header-with-assertion-dropped/expected.json +105 -0
- package/conformance/cases/c92-mcp-principal-header-with-assertion-dropped/input.json +31 -0
- package/conformance/cases/c92-mcp-principal-header-with-assertion-dropped/meta.json +6 -0
- package/conformance/cases/c93-mcp-header-refs-with-credentials-dropped/expected.json +105 -0
- package/conformance/cases/c93-mcp-header-refs-with-credentials-dropped/input.json +33 -0
- package/conformance/cases/c93-mcp-header-refs-with-credentials-dropped/meta.json +6 -0
- package/conformance/cases/c94-mcp-credentials-env-kind-dropped/expected.json +105 -0
- package/conformance/cases/c94-mcp-credentials-env-kind-dropped/input.json +32 -0
- package/conformance/cases/c94-mcp-credentials-env-kind-dropped/meta.json +6 -0
- package/conformance/cases/c95-mcp-credentials-audience-not-connector-id-dropped/expected.json +105 -0
- package/conformance/cases/c95-mcp-credentials-audience-not-connector-id-dropped/input.json +30 -0
- package/conformance/cases/c95-mcp-credentials-audience-not-connector-id-dropped/meta.json +6 -0
- package/conformance/cases/c96-mcp-credentials-extra-member-dropped/expected.json +105 -0
- package/conformance/cases/c96-mcp-credentials-extra-member-dropped/input.json +31 -0
- package/conformance/cases/c96-mcp-credentials-extra-member-dropped/meta.json +6 -0
- package/conformance/cases/cc01-mcp-toolfaces-non-object/expected.json +1 -1
- package/conformance/cases/cc02-mcp-source-key-is-transported/expected.json +1 -1
- package/conformance/cases/cc03-model-compat-unknown-subkey/expected.json +1 -1
- package/conformance/cases/cli01-model-name-nfc-vs-nfd/expected.json +1 -1
- package/conformance/cases/cli02-control-and-zero-width-chars/expected.json +1 -1
- package/conformance/cases/cli03-credential-pasted-into-unknown-key/expected.json +1 -1
- package/conformance/cases/cli04-env-value-with-newline/expected.json +1 -1
- package/conformance/cases/cli04-env-value-with-newline/meta.json +1 -1
- package/conformance/cases/cli05-long-and-prefix-colliding-names/expected.json +1 -1
- package/conformance/cases/t01-absent-domain-key-not-null/expected.json +1 -1
- package/conformance/cases/t01-absent-domain-key-not-null/meta.json +1 -1
- package/conformance/cases/t03-prototype-name-key-not-swallowed/expected.json +1 -1
- package/conformance/cases/t04-secret-literal-never-in-warning-value/expected.json +1 -1
- package/conformance/cases/t04-secret-literal-never-in-warning-value/meta.json +1 -1
- package/conformance/cases/z01-every-domain-empty-object/expected.json +1 -1
- package/conformance/cases/z01-every-domain-empty-object/meta.json +1 -1
- package/conformance/cases/z02-every-domain-unknown-key/expected.json +1 -1
- package/dist/api/credentials.js +5 -7
- package/dist/api/lifecycle-events.d.ts +266 -0
- package/dist/api/lifecycle-events.js +169 -0
- package/dist/api/wire-scalars.d.ts +13 -0
- package/dist/api/wire-scalars.js +15 -0
- package/dist/atomic-write.d.ts +4 -0
- package/dist/atomic-write.js +26 -3
- package/dist/config-d-file.d.ts +1 -1
- package/dist/config-document-refusal.d.ts +4 -4
- package/dist/config-fns.d.ts +4 -2
- package/dist/config-fns.js +1 -1
- package/dist/config-root-documents.d.ts +1 -1
- package/dist/config-root-node.js +2 -1
- package/dist/conformance/corpus.d.ts +1 -1
- package/dist/conformance/derive.d.ts +13 -5
- package/dist/conformance/derive.js +37 -21
- package/dist/conformance/index.d.ts +1 -1
- package/dist/conformance/index.js +1 -1
- package/dist/conformance/run.js +8 -9
- package/dist/connector-authorize-url.d.ts +23 -0
- package/dist/connector-authorize-url.js +129 -0
- package/dist/connector-id.d.ts +23 -0
- package/dist/connector-id.js +27 -0
- package/dist/file-edit.d.ts +44 -0
- package/dist/file-edit.js +70 -1
- package/dist/file-store.d.ts +12 -7
- package/dist/file-store.js +72 -59
- package/dist/hooks.d.ts +15 -5
- package/dist/hooks.js +13 -3
- package/dist/index.d.ts +4 -0
- package/dist/index.js +5 -1
- package/dist/mcp-entry-credential.d.ts +47 -0
- package/dist/mcp-entry-credential.js +73 -0
- package/dist/mcp-request-entry.d.ts +32 -13
- package/dist/mcp-request-entry.js +104 -58
- package/dist/migration-receipt.d.ts +2 -2
- package/dist/migration-receipt.js +2 -2
- package/dist/one-time-migrations.d.ts +1 -1
- package/dist/one-time-migrations.js +68 -91
- package/dist/portable-domains.d.ts +18 -12
- package/dist/portable-domains.js +17 -12
- package/dist/retired-role-words.d.ts +1 -1
- package/dist/retired-role-words.js +4 -6
- package/dist/scheduler-store-node.d.ts +5 -2
- package/dist/scheduler-store-node.js +8 -5
- package/dist/sha256.d.ts +5 -0
- package/dist/sha256.js +7 -0
- package/dist/skills-manifest.js +2 -2
- package/dist/types.d.ts +80 -10
- package/dist/types.js +37 -44
- package/docs/API-SURFACE.md +47 -7
- package/docs/CONFORMANCE.md +6 -4
- package/docs/CONSUMER-INTEGRATION.md +147 -4
- package/llms-full.txt +45 -24
- package/llms.txt +27 -14
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -34,9 +34,11 @@ server (the workers), and the client (desktop/CLI) seams. No two copies of the s
|
|
|
34
34
|
- **npm**: published as `@sema-agent/settings-schema` on the public npm registry
|
|
35
35
|
(≤`0.19.0` 发在旧名 `@sema-agent/registry-core` 下,冻结)。
|
|
36
36
|
|
|
37
|
-
The package is **pure**: zero `next`/`react`/server imports, zero DB drivers.
|
|
38
|
-
`zod` (a `dependency` pinned `^4.4.0`, also declared as a `peerDependency` with the same range)
|
|
39
|
-
|
|
37
|
+
The package is **pure**: zero `next`/`react`/server imports, zero DB drivers. It has two runtime dependencies (29.0.0):
|
|
38
|
+
`zod` (a `dependency` pinned `^4.4.0`, also declared as a `peerDependency` with the same range) and `@sema-agent/primitives`
|
|
39
|
+
(`^7.67.3`, the engine's zero-dependency, browser-safe primitives package — a credential reference is judged by its one reader
|
|
40
|
+
`readCredentialRef`, so this package carries no second reading of its own). `npm ls --prod` therefore shows those two. Node built-ins
|
|
41
|
+
only (`node:crypto`, `node:fs`). The machine gate is `test/runtime-dependencies-29.0.0.test.ts`.
|
|
40
42
|
|
|
41
43
|
> **One zod instance in a zod-4 host** (11.0.0). The range is `^4.4.0` for both the dependency and the peer, so a host on
|
|
42
44
|
> zod 4 (`sema-server`, the CLI, the client core, the SDK) dedups this package's zod with its own: one instance, and schema objects
|
|
@@ -47,6 +49,54 @@ therefore shows only `zod`. Node built-ins only (`node:crypto`, `node:fs`).
|
|
|
47
49
|
> zod 3, nested inside every zod-4 host). The move to zod 4 did not change what any schema accepts or produces —
|
|
48
50
|
> the conformance corpus reads byte-identically on both — only the wording of validation errors (see CHANGELOG 11.0.0).
|
|
49
51
|
|
|
52
|
+
## 升级指引:29.0.x → 30.0.0(BREAKING:一次性迁移 SS-M10〔prompts 两轴 `bindings` / `catalog`〕窗关删码 · 闭集 `ONE_TIME_MIGRATION_IDS` / `OneTimeMigrationId` 收窄 · 读腿告警 `unread-config-file` 的原因词 `non-portable-domain` 改名 `not-a-local-read-domain`)
|
|
53
|
+
|
|
54
|
+
存储文档里没有 `prompts.bindings` / `prompts.catalog`、代码里也不引用 id `"SS-M10"`(闭集收窄:引用它的代码编译红,第 4 条)、也不按字面比较或穷举读腿告警 `unread-config-file` 的 `why`(第 5 条)的部署,零动作可升(读数详情、三问、各消费方表与黑盒判据见 CHANGELOG 30.0.0 与 `docs/CONSUMER-INTEGRATION.md` §35 / §36)。
|
|
55
|
+
1. **删了什么**:登记表 `ONE_TIME_MIGRATIONS` 的 SS-M10 一行(窗 2026-11-16 已关)、改写步与闭集 `ONE_TIME_MIGRATION_IDS` 里的 `"SS-M10"` 删(`OneTimeMigrationId` 收窄为 `"SS-M11" | "SS-M12" | "SS-M13"`:对它穷举的代码编译红一次,删一臂);`migrateStoredDocuments` / `migrateEffectiveSnapshot` / `migrateConfigDocuments` / 命令行 `migrate` 不再改写、也不再对 prompts 文档出收据 —— 此前被删掉的空 `bindings: []` 与被 `refused` 的非空 `bindings` / `catalog`,自此原样、零收据(命令行答 `noop`)。墓碑字段 `prompts.bindings` / `prompts.catalog`(退役于 14.0.0)留下。
|
|
56
|
+
2. **存量旧形现在答什么**:不被读成值 —— 写面拒、读面整域缺省并点名;迁移入口与命令行不再替它改写,也不再对它出拒收据(`migrate` / `--check` 对只带这些键的目录答 `noop`、rc 0;此前非空 `bindings` / `catalog` 答 `refused`、rc 1,只带空 `bindings: []` 的 `--check` 答 `pending`、rc 3,真跑删键写盘)。写面(`parseDomain` / `PromptsConfig` / `validateDomain` / `writeDomainFile`)整域拒,句子止于 `prompts.bindings was retired in 14.0.0 — now the center artifact (…) — delete the key from the stored document (…)`(不再带迁移指路);读面(`buildEffective` / `FileConfigStore.read()`)`prompts` 整域缺省 `{}`(不下发中心层)并点名,旧键旁边的新形(`artifact` / `workers`)不被半读 —— 升级前没清掉旧键的文档连同新形整域读不进(此前:`{ bindings: [], artifact }` 经迁移删掉空键之后新形读得进、中心层下发 `artifact`;自此整域缺省、不再下发);读面的告警经 `onWarning` / `read().warnings` 出声,不接告警通道的调用方没有信号 —— 没接告警通道、只靠迁移命令判就绪的部署,升级后对旧键迁移面和读面都不出声(写面只在有人写这份文档时才拒)。冻结 effective(快照 / 回滚行 / last-known-good)里的 `prompts: { bindings: [] }` 此前经 `migrateEffectiveSnapshot` 读成 `{}`,自此原样承运、被消费方自己的 `EffectivePromptsWire` 判官拒。
|
|
57
|
+
3. **动作**:升级前用上一版(≤ 29.x)对本地 `config.d` 跑 `npx @sema-agent/settings-schema@29 migrate <config.d directory> --check`(**要显式带 `@29`**:不带版本时 npx 用项目里已装的那一版、没装就取 `latest`,依赖已抬到 30 的项目〔以及发版后没装过 ≤ 29 的机器〕跑到的是 30,对 prompts 旧键零收据、看不出任何旧键:目录里没有别的待迁 / 被拒项时整次答 `outcome=noop`、rc 0,有别的待迁项时答 `pending`、rc 3,有别的被拒项时答 `refused`、rc 1)。退出码 0 / 1 / 3 时输出两行,第 2 行是 JSON 报告(退出码 2 时标准输出为空),看它 `wouldApply` / `refused` 里 `document` 为 `"prompts"` 的项(四个键 `migration`〔SS-M10 的项是 `"SS-M10"`,这份 prompts 文档整域判的拒是 `null`〕/ `document` / `path` / `appliedAs`,`refused` 项另带 `reason`;29.0.0 实测的一行:`{"event":"stored_documents_migrated","outcome":"pending","written":false,"dir":"<config.d directory>","wouldApply":[{"migration":"SS-M10","document":"prompts","path":"bindings","appliedAs":"dropped-inert"}],"refused":[]}`):`outcome=pending`(rc 3)且 `wouldApply` 里有 `appliedAs` 为 `"dropped-inert"`、`path` 为 `"bindings"` 的项 ⇒ 还有空 `bindings: []`、目录里没有被拒的项,去掉 `--check` 再跑一次即删;`outcome=refused`(rc 1)⇒ **真跑也一字不写**,`refused` 里的每一项都要先手修、再重跑 `--check`:`migration` 为 `"SS-M10"` 的项(`path` 为 `"bindings"` / `"catalog"`)⇒ 要手清的旧键,`migration` 为 `null` 的项 ⇒ 同一份 prompts 文档整域判的拒(`path` 指向它里面坏形的键),目录里别的文档被拒同样让整次一字不写;这时 `wouldApply` 里也可能同时出现 `dropped-inert` 项,**它不会被写**;没有 `document` 为 `"prompts"` 的项 ⇒ 目录里没有旧键。存储层的草稿 / 快照 / 回滚行逐份调上一版的 `migrateStoredDocuments` / `migrateEffectiveSnapshot`(**要在依赖还停在 29.x 的环境里调**:依赖已抬到 30 的项目里 import 到的是 30 的函数,对 prompts 旧形零收据、原样交回);或升级后对每份 prompts 存储文档跑 `validateDomain("prompts", 文档)`(`ok: false` 带上面那句 = 还带着旧键)并手删键。非空 `bindings` 与 `catalog` 在本包里转不成 artifact(声明要经中心的卡编译器,catalog 的 digest 是引擎铸的):要中心层就从中心编辑器重新发布。
|
|
58
|
+
4. **编译红**:对 `OneTimeMigrationId` / `ONE_TIME_MIGRATION_IDS` 写穷举(`Record<OneTimeMigrationId, …>` / 带 `never` 兜底的 `switch`)的地方删 SS-M10 一臂;导出名集不变。
|
|
59
|
+
5. **读腿告警的原因词改名**:`unread-config-file` 告警的 `why` 闭集由 `"not-a-domain" | "non-portable-domain"` 变成 `"not-a-domain" | "not-a-local-read-domain"` —— 只换第二员的字面,含义与触发条件一字不变(文件名是域、但不在本地读取域集 `LOCAL_READ_DOMAINS` 里:今天是 `workers` / `hosts` / `systems` / `entitlement`;`projects` 在读取集里、被读,不报)。旧词说「不便携」,而判据自 29.0.0 拆出本地读取域集起就是「不在本地读取集」(`projects` 不便携、却被读),词与判据对不上,所以换成与 `not-a-domain` 平行的说法。零别名、零双读:旧词不再被铸,型里没有它。**换字面**即可:对 `why` 穷举(`switch` / `Record<…>`)或按字面比较(`=== "non-portable-domain"`)的代码,把旧词换成 `not-a-local-read-domain`(旧词在 `EffectiveReadWarning` 的 `unread-config-file` 臂上不可赋,tsc 红即通知);只显示 `why`、不判它的代码零动作。符合性语料 c57 – c68 的本地腿金样随改(语料随包同版),读本包语料、自己铸这条告警的读腿同换字面。搬运义的名字(`PORTABLE_DOMAINS` / `NON_PORTABLE_DOMAIN_REASONS`)不动。
|
|
60
|
+
|
|
61
|
+
## 升级指引:28.0.x → 29.0.0(BREAKING:本地文件店读 `config.d/projects.json`〔本地读取域集 `LOCAL_READ_DOMAINS` = 便携域集 + `projects`〕· 内容版本对同一组文件换一次数 · 拒单文档名 `ConfigDocumentName` 多一员 · 语料本地腿金样随改 · 一次性迁移 SS-M8(退役角色词)窗关删码 · 派生积木件 `deriveWireExpectation` 自守护栏 · 调度店首写目录 0o700 · MCP http 条目的凭据引用 `transport.credentials`(`transport.assertionHeader` 退役、`authForm` / `entryKind` 与 `readMcpIdentityHeaders` 删除)· 钩子环境置空原因加 `unset` · `getVersion()` 与 `read()` 同一个版本;加性:`writeDomainFileIf` · `contentDigest` · `NON_LOCAL_READ_DOMAINS` · `readRequestStringRecord` · 用户生命周期事件的 wire 型 · 连接器 id 与授权地址一族;删 `NON_PORTABLE_DOMAINS`)
|
|
62
|
+
|
|
63
|
+
便携域集 `PORTABLE_DOMAINS` 与 bundle / 导出信封(`exportBundle` / `readBundle` / `writeBundle`)的默认集与运行期闸一字不动;不放 `config.d/projects.json` 的部署,读数的差是:内容版本的数、`ConfigDocumentName` 多一员(第 3 条第 ②、③ 项),以及迁移入口对带 `roles.team` / `roles.synthesize` 的存量文档不再改写(第 6 条)。读数详情、三问、各消费方表见 CHANGELOG 29.0.0 与 `docs/CONSUMER-INTEGRATION.md` §30。
|
|
64
|
+
1. **本地读取域集 `LOCAL_READ_DOMAINS`**(`./node`,深冻结,型 `LocalReadDomain`)= 便携域集原序 + `projects`:回答「本地文件店读 `config.d/` 里的哪些域」;便携域集回答的是「哪些域随 bundle 搬运」。此前两个问题共用一只常量(`PORTABLE_DOMAINS`),所以 `projects`(租户身份数据:不可搬运,却是单机部署自己的登记簿)要么被 bundle 带走、要么文件店读不到。`FileConfigStore` 里按「读」枚举的各处(没人读的文件扫描 · 内容版本 · `updatedAt` · 严读与宽容读 · `read()` 的文档集)现在读它;bundle 仍读便携域集。
|
|
65
|
+
2. **带条件的域文件写器 `writeDomainFileIf(root, domain, value, expected)`**(`./node`,在 `writeDomainFile` 旁):`expected` = 读到时文件**盘上字节**的摘要(`contentDigest(Buffer)` 铸,`sha256:<64 位小写十六进制>`;每个字节都算,不经 UTF-8 解码)或 `null`(读到时文件不在);在锁文件(真正被写的文件旁的 `.<文件名>.lock`,普通域文件即 `config.d/.<域>.json.lock`;域文件是符号链接时落在链接的真目标旁)之下重读,相符才写。结果 `ConditionalWriteResult`:`written`(带写进去的值与新摘要,可直接当下一次的 `expected`)· `stale`(不符:不写、字节不动,带当前摘要)· `locked`(锁在:不写,带锁路径;陈旧的锁不自动抢,要人删)。写已落盘而锁删不掉时仍答 `written`,带 `lockLeft`(锁路径),此后每次调用答 `locked` 直到它被删。判不过的内容照旧拒、先于锁。它只协调条件写者之间的并发:整份写器、`writeBundle`、手改都不取锁。读文件时读一次 `Buffer`、对这一份字节算摘要并解析 `buffer.toString("utf8")`,不读第二遍(合法 UTF-8 的文件,文本的摘要与字节的摘要是同一个数;文件里有非法 UTF-8 字节时文本已不是那些字节,按文本算的预期摘要会答 `stale`,要写得进就对 `Buffer` 算)。
|
|
66
|
+
```ts
|
|
67
|
+
import { readFile } from "node:fs/promises";
|
|
68
|
+
import { contentDigest } from "@sema-agent/settings-schema/sha256";
|
|
69
|
+
import { domainFilePath, writeDomainFileIf } from "@sema-agent/settings-schema/node";
|
|
70
|
+
|
|
71
|
+
const bytes = await readFile(domainFilePath(root, "projects")).catch((e: NodeJS.ErrnoException) => {
|
|
72
|
+
if (e.code === "ENOENT") return undefined; // 缺席;别的读不出照抛
|
|
73
|
+
throw e;
|
|
74
|
+
}); // 只读这一次
|
|
75
|
+
const next = edit(bytes === undefined ? {} : JSON.parse(bytes.toString("utf8"))); // 你的改动
|
|
76
|
+
const r = await writeDomainFileIf(root, "projects", next, bytes === undefined ? null : contentDigest(bytes));
|
|
77
|
+
switch (r.status) {
|
|
78
|
+
case "written": /* r.value 是写进去的、r.digest 是新文件字节的摘要 */ break;
|
|
79
|
+
case "stale": /* 读到之后别人改过:r.current 是现在的摘要(null = 已不在)—— 重读、在新内容上重做 */ break;
|
|
80
|
+
case "locked": /* r.lock 被占:稍后重试;长期不松 = 崩溃留下的陈旧锁,确认没有写者后删掉这个文件 */ break;
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
3. **读数变化(四处)**:
|
|
84
|
+
- ① **盘上已有的 `config.d/projects.json` 自此被读**(此前被忽略、只报一条 `unread-config-file`):合法的文件装进 `effective.projects`、那条告警消失;**读不进的文件自此拒** —— 严读 `getEffective()` 与 `loadLocalConfig` 抛,宽容读同抛(`projects` 是整域读不进即抛的域,不默认化):文件层坏形(空 / 纯空白 / 坏 JSON / 不是 JSON 对象 / 读不出 / 过深)与登记簿判不过都是;`read()` 只把文件层坏形列进拒单(`document: "projects"`),读得出却过不了登记簿判形的照严读抛、不在拒单里。其余非本地读取域(`workers` / `hosts` / `systems` / `entitlement`)照旧不读、照旧点名。
|
|
85
|
+
- ② **内容版本换一次数**:`getVersion()` / `getEffective().version` / `read().version` 对同一组文件变一次(哈希的入参多了 `projects` 这一格,没有该文件的根也换数);按版本号「没变就不重放」的消费方在升级后重放一次(同一份配置)。
|
|
86
|
+
- ③ **拒单文档名的类型多一员**:`ConfigDocumentName`(`ConfigDocumentRefusal["document"]`)联合多 `"projects"`;对它写穷举(`Record<ConfigDocumentName, …>` / 带 `never` 兜底的 `switch`)的地方编译红一次:补一臂 / 一行。
|
|
87
|
+
- ④ **符合性语料的本地腿金样随改**(`conformance/VERSION` 抬到本版):变换 `T3-non-portable-domains` 改名 `T3-non-local-read-domains`(新导出 `NON_LOCAL_READ_DOMAINS`),c74 / c75 的本地腿金样由「projects 不被读」改为拒,本地内容版本随 ② 换数。
|
|
88
|
+
4. **动作**:升级前对盘上的 `config.d/projects.json` 跑 `validateDomain("projects", 文档)`(或 `parseDomainLoud`),不合格的改对,或删掉(缺席 = 空登记簿);不想被读没有开关 —— 读不进的登记簿拒、不默认化。
|
|
89
|
+
5. **删除**:`NON_PORTABLE_DOMAINS`(`./conformance`)—— T3 改读 `NON_LOCAL_READ_DOMAINS` 之后包内没有读者,删掉(此前 = 域全集 \ 便携域集;要它的代码用 `DOMAINS` 与 `PORTABLE_DOMAINS` 自己算)。
|
|
90
|
+
6. **到期删码 SS-M8**(退役角色词;窗 2026-11-11 已关;只删这一步,SS-M10 / SS-M11 / SS-M12 一行不动):`ONE_TIME_MIGRATIONS` 的 SS-M8 一行、改写步与闭集 `ONE_TIME_MIGRATION_IDS` 里的 `"SS-M8"` 删(`OneTimeMigrationId` 收窄:对它穷举的代码编译红一次,删一臂),`migrateStoredDocuments` / `migrateEffectiveSnapshot` / `migrateConfigDocuments` / 命令行 `migrate` 不再改写 `roles.team` / `roles.synthesize`。**存量里还带这两个键的 `models` / `rosters` 文档写面整域拒、读面丢弃 / 缺省并点名**(读面的告警经 `onWarning` / `FileConfigStore.read().warnings` 出声,不接告警通道的调用方没有信号):写面整域拒,句子止于 `role word team was retired in 12.0.0 — now no role reads it (…) — delete the key from the stored document`(不再带迁移指路);读面 —— 别的角色在 ⇒ 丢那一条、`entry-dropped`(坐标 `roles.team`),只剩旧词 ⇒ `models` 整域 `domain-defaulted`,`rosters` 带旧词 ⇒ 该域读不出(抛);迁移与命令行 `migrate` 对它们零改动(`noop`)。出路:手工删掉那两个键,或升级前用上一版跑一次迁移。
|
|
91
|
+
7. **请求面「名 → 串」记录的带坐标读口 `readRequestStringRecord(path, raw)`**(包根,加性):传输读器读 `transport.env` / `transport.headers` 的那一只读法改名导出,`path` 由调用方给 —— 读自己的「名 → 串」记录(A2A 对端的 `headers` 一类)的消费方调它,诊断与 MCP 传输同形同句(`{ record, issues }`:缺席 ⇒ 零条;记录不交 ⇒ 一条、`path` = 坐标;保留名 ⇒ 每个一条、`path` = `<坐标>.<名>`),不另拼原因句。传输读器的读数逐位不变。
|
|
92
|
+
8. **语料派生积木件 `deriveWireExpectation` 自守护栏**(`./conformance`,收紧):期望里的 skills 上表示变换(`content` → `contentHash`)不是恒等 ⇒ 抛(此前只有语料跑器拒,直接调用照派生、域形条目自带的字面 `contentHash` 还被覆盖);跑器的拒句 = case 坐标 + 积木件的那一句。出路:那条 wire 腿写显式期望(`npm run conformance:bless`)。
|
|
93
|
+
9. **调度店首写建的目录精确 0o700**(`./node`,收紧):`saveSchedulerStore` / `mutateSchedulerStore` / `createFileSchedulerStore().save` 建缺的父目录时每一级恰 0o700、不经进程 umask(此前 `mkdir -p` 随 umask:002 ⇒ 0o775 组可写、0o277 ⇒ 建出来写不进);已在的目录一位不动(POSIX 权限位;Windows 上模式只映到只读属性)。建法与原子写器的临时文件路径都按内核解(不做词法归一),店路径里的 `<链接>/..` 不再让目录、临时文件与落点分在两处。受影响的只有「店目录还不存在、首写由本包建、别的用户要穿过它读其他文件」的部署 —— 出路:首写之前自己建好目录、设好模式。
|
|
94
|
+
10. **用户生命周期事件的 wire 型**(包根,加性;十三个导出):事件、页、拒词与对账请求 / 应答的形,见 CHANGELOG 29.0.0「同批加性」与 `docs/CONSUMER-INTEGRATION.md` §31。
|
|
95
|
+
11. **MCP http 条目的凭据引用**(破坏):托管连接器条目的形只有一个 —— `transport.credentials = { "kind": "assertion", "audience": "<连接器 id>" }`(`McpEntryCredential`,`audience` 过 `isConnectorId`)。**消费方硬义务(铸断言的一方)**:条目的 `url` 与断言的 `audience`(连接器 id)在本包里**不绑定**、本包不提供带登记绑定的判官 —— 铸之前必须核这条条目的 `url` 属于部署登记册里这台连接器的端点,核不上 ⇒ 不铸、响亮拒;不核 ⇒ 能写这份配置的一方(`mcp` 域的写权)可以让任一连接器的断言发往任意地址。**升级后,中心或本地配置里还带 `transport.assertionHeader` 的那台 MCP 服务器从工具列表里消失**(条目整条被丢并点名);先跑 `npx @sema-agent/settings-schema migrate <config.d directory>`(或 `migrateStoredDocuments`)拿 `refused` 清单,逐条手写 `credentials`(连接器 id 取部署的登记册)并删掉 `assertionHeader`;`authForm` / `entryKind` 由一次性迁移 SS-M13 删掉(SS-M13 读条目的固定键与 workers 行步同一条律:自有访问器 / 不可枚举的自有键 ⇒ `migrateStoredDocuments` 抛「a stored document could not be read」,失败即关 —— v28.0.0 对 `transport` 是访问器的条目原样返回;只在程序造的文档上可见,`JSON.parse` 出来的不受影响)。请求面读器对 `transport.assertionHeader` / `transport.credentials` 点名拒(`issue.refusal` ∈ `MCP_REQUEST_KEY_REFUSALS`);`readMcpIdentityHeaders` 删除(改读 `readRequestMcpTransport` 交出的 `transport.principalHeader`);授权地址改调 `connectorAuthorizeUrlOf`。运行时依赖多 `@sema-agent/primitives`。详见 CHANGELOG 29.0.0「同批破坏」与 `docs/CONSUMER-INTEGRATION.md` §33。
|
|
96
|
+
12. **钩子环境置空原因多一词 `unset`**(闭集增长):`interpolateHookEnvVars` 的 `blanked` 列出每一处因为没有放行的值而展开成空串的引用 —— 原因闭集 `HOOK_ENV_BLANK_REASONS` = `not-allowed` / `credential` / `unset`(型 `HookEnvBlankReason`);名单内而 `env` 里没有值的引用自此进清单(`unset`),`env` 值是空串仍算有值。发出去的头字节不变。对原因写穷举的地方补一臂。
|
|
97
|
+
13. **配置根读口:每种坏法一个结局,两只口一个版本**:`FileConfigStore` 的 `read()` 与 `getVersion()` 读同一份文件层读数 —— `getVersion()` 对文件层被拒的树自此答 `read()` 交的那个数(此前抛;坏文档以它的指纹入算,绝不与缺席同数)。结局表见 CHANGELOG 29.0.0「同批两件」乙与 `docs/CONSUMER-INTEGRATION.md` §34。判「在服的是不是我配的这一份」照三句:① 同一 major 的本包对同样的文件内容算出同一个数,读取集或算法一变就是 major(跨 major 不可比);② 版本的输入只有 `config.d` 里契约读的那几份文档(`.env` 从不读);③ `contentDigest` 是写方「比较后写」的令牌,不是在服身份。
|
|
98
|
+
14. **Node 下限 `>=20.18.1`**(破坏,安装面):本包的 `engines.node` 由 `>=20.3.0` 抬到 `>=20.18.1` —— 新运行时依赖 `@sema-agent/primitives` 声明的下限。Node 低于 20.18.1 的部署在严格引擎检查(npm `engine-strict`)下装不上本包(`EBADENGINE`);升级本包之前先升 Node。
|
|
99
|
+
|
|
50
100
|
## 升级指引:27.2.x → 28.0.0(BREAKING:包的每一个闭集导出在定义处深冻结 —— 对它们的原地改写由静默成功变抛 `TypeError` · 十五个导出的类型收窄成只读)
|
|
51
101
|
|
|
52
102
|
不改闭集的消费方零动作可升(读法的答案逐位不变;逐名清单、三问、各消费方表见 CHANGELOG 28.0.0 与 `docs/CONSUMER-INTEGRATION.md` §29)。
|
|
@@ -404,11 +454,14 @@ settings 单元读不进的成员**不是缺席**(`loosen` 可丢且要响,`tigh
|
|
|
404
454
|
下发 `EffectivePromptsWire = { schemaVersion: 2, artifact }`(`artifact` 带发布出处 `sourceRevision`,由服务席盖);哪一份给哪台 worker 只问
|
|
405
455
|
`promptArtifactFor(prompts, worker | null)`;场景差异只写在 overlay 的 `when.binding`(`{anyOf}` 或 `{noneOf}`,恰一张表)。本包只判结构与上界,语义交引擎 verify。
|
|
406
456
|
声明轴(`PromptBinding` / `PromptTextDeclaration` / `EffectivePrompts` …)与 v1 catalog 信封删除,零别名;`bindings` / `catalog` 键是墓碑。
|
|
407
|
-
-
|
|
408
|
-
|
|
409
|
-
|
|
457
|
+
- **存量**:`bindings` / `catalog` 键(含 13.x 每份文档恒物化的空 `bindings: []`)在存储文档里在场 ⇒ 没有任何一步替运维改写它
|
|
458
|
+
(一次性迁移 SS-M10 随窗到期删了,窗 2026-11-16 已关):写面整域拒,读面 `prompts` 整域缺省(不下发中心层)并点名该键与出路〔告警经 `onWarning` /
|
|
459
|
+
`FileConfigStore.read().warnings` 出声;不接告警通道则无信号〕。出路:把键从存储文档里删掉;要中心层就从中心编辑器重新发布(本地 `config.d` 的 `bindings` 引擎从未读过,删键即可)。
|
|
460
|
+
升级前用上一版(≤ 29.x)跑一次迁移也行(它删空的 `bindings: []`,非空的与 `catalog` 列进 `refused`)。
|
|
461
|
+
- **请求面 MCP 条目**:`isUsableWireName` / `readRequestMcpTransport` / `isContentOriginWord` 住本包(判据与原因句与服务端请求腿逐字同;29.0.0 起读器点名拒 `transport.assertionHeader` 与 `transport.credentials`,`issue.refusal` ∈ `MCP_REQUEST_KEY_REFUSALS`,`readMcpIdentityHeaders` 删除),
|
|
410
462
|
壳的发送前预检与服务端受理同答。申报名判官 `isUsableWireName` 另判首尾空白(坏名;不 trim、不规范化,内部空白照旧合法);`readRequestMcpTransport` 的 `env` / `headers`
|
|
411
463
|
只收纯数据的「名 → 串」记录(`Map` / `Set` / 类实例 / 自有 `__proto__` 成员不收,交出的是副本,`lost` 条目带 `member` / `fault` 机读位);两只回显描述器剥控制与双向字符、截 64 字,与服务端回显同口径。
|
|
464
|
+
这两键的读法就是公开的带坐标读口 `readRequestStringRecord(path, raw)`(29.0.0)以 `transport.env` / `transport.headers` 为坐标的读数;读自己的「名 → 串」记录(A2A 对端的 `headers` 一类)要同形同句诊断的消费方调同一只。
|
|
412
465
|
- **部署序**:中心(发布方)与服务端同一维护窗升级,中心先;窗内新旧两端互拒整份候选、停在上一份好配置。细节与逐条三问见 CHANGELOG 14.0.0。
|
|
413
466
|
|
|
414
467
|
## 升级指引:10.x → 11.0.0 · 持久面:一次性迁移(`./one-time-migrations`)
|
|
@@ -720,6 +773,25 @@ settings 单元读不进的成员**不是缺席**(`loosen` 可丢且要响,`tigh
|
|
|
720
773
|
and the answer arms' reason domains derive from it), `SANDBOX_GIT_REFUSALS` (10 refusal words → HTTP statuses + `permanence`;
|
|
721
774
|
`SANDBOX_GIT_REFUSAL_ERRORS` derives from it), `SANDBOX_GIT_PERMANENCE` (`terminal` / `transient`). Both sides' reading is in
|
|
722
775
|
`docs/CONSUMER-INTEGRATION.md` §12.
|
|
776
|
+
- **User lifecycle events** (29.0.0; `api/lifecycle-events.ts`, main barrel only — no subpath): the wire shapes of "this principal was deleted /
|
|
777
|
+
demoted / removed from a space" — the producer (web-admin) emits sequenced events, the consumer (the execution plane) pulls them in pages, dedups by
|
|
778
|
+
`seq`, and reconciles principals' standing at start-up and when its cursor stops being valid. Shapes and word tables only, no IO; unknown KEYS are stripped
|
|
779
|
+
(the same rule as the credential wire above — new keys are always additive), but an unknown `kind` VALUE is refused loudly and the whole page with it
|
|
780
|
+
(the sentence names the word; the path carries the event's index) — silently dropping a lifecycle event the consumer does not recognise would be a silent
|
|
781
|
+
pass on the security axis. `PRINCIPAL_LIFECYCLE_EVENT_KINDS` (type `PrincipalLifecycleEventKind`) is the closed five-word set
|
|
782
|
+
`principal.deleted` · `principal.pending` · `principal.role_lowered` · `membership.removed` · `membership.role_lowered`; `PrincipalLifecycleEvent` is
|
|
783
|
+
discriminated by `kind` — the three `principal.*` arms carry no `scope`, the two `membership.*` arms REQUIRE one (`ScopeId`) — over the members
|
|
784
|
+
`eventId` (non-empty) · `seq` (a safe integer ≥ 1) · `principal` (≤ `PRINCIPAL_MAX_LENGTH`) · `principalInc?` (`PrincipalIncarnation`) · `at` (a non-negative
|
|
785
|
+
safe integer, epoch ms). `PrincipalLifecycleEventPage` = `{ events, head, next }` (all three required; `head` / `next` are non-negative safe-integer
|
|
786
|
+
cursors, an empty `events` is a legal page). `LIFECYCLE_PAGE_REFUSALS` is the one table of the four cursor / paging refusal words and their one status
|
|
787
|
+
each, and a `permanence` that is `terminal` for all four (the same request resent unchanged does not succeed; the word set is the credential wire's) —
|
|
788
|
+
`cursor_invalid` / `limit_invalid` (400) · `cursor_expired` / `cursor_unknown` (410); `LIFECYCLE_PAGE_REFUSAL_ERRORS` (its keys) and the type `LifecyclePageRefusalError`
|
|
789
|
+
derive from it — and `LifecyclePageRefusal` is the body, the same shape as the credential wire's refusal (code + permanence): `{ error, permanence, message }`
|
|
790
|
+
for a 400 word, `{ error, permanence, message, head }` for a 410 word (whether `head` is carried is read off the table's status, not written twice; a
|
|
791
|
+
`permanence` that differs from the table's row is refused); authorization refusals are not in this table. The reconcile pair: `PrincipalReconcileRequest` = `{ principals: [PrincipalReconcileItem] }` with `PrincipalReconcileItem` = `{ principal, principalInc? }`, 1 –
|
|
792
|
+
`PRINCIPAL_RECONCILE_MAX_ITEMS` (500) items; `PrincipalReconcileAnswer` = `{ principals: [PrincipalStanding] }`, each item echoing the identity tuple and
|
|
793
|
+
discriminated by `standing` — `live` (optional `since`, only on this arm) or `gone`. Purely additive. Both sides' reading is in
|
|
794
|
+
`docs/CONSUMER-INTEGRATION.md` §31.
|
|
723
795
|
- **Path-base judge and the fleet advertise address** (14.7.0; `url-shape.ts` main barrel, and `fleet.ts` main barrel + `./fleet`): a seat whose value is a
|
|
724
796
|
"base that other code appends request paths to" — the center base URLs, the address a fleet member advertises to the control plane, the web link base of
|
|
725
797
|
`webAdminSessionUrl` — has one rule: no credential, no query, no fragment; a path prefix is fine. `PATH_BASE_URL_FORBIDDEN_PARTS` is the ONE closed, frozen,
|
|
@@ -786,14 +858,17 @@ settings 单元读不进的成员**不是缺席**(`loosen` 可丢且要响,`tigh
|
|
|
786
858
|
`FEEDBACK_TRANSCRIPT_MAX_JSON_CHARS`; `principal` is never a body field — it is the token subject), `FeedbackWire` (one
|
|
787
859
|
report row, server-stamped `createdAt`) and `FeedbackListResponse`.
|
|
788
860
|
- **Content digest form** (`sha256.ts`): `Sha256Digest` / `SHA256_DIGEST_RE` — the one `sha256:<64 lowercase hex>` spelling every
|
|
789
|
-
digest-bearing seat in this package uses.
|
|
861
|
+
digest-bearing seat in this package uses; `contentDigest(content)` (29.0.0; a string as its UTF-8 bytes, or the bytes themselves) is its one mint.
|
|
790
862
|
- **Local file source** (`file-store.ts`, `file-edit.ts`): `FileConfigStore` reads `config.d/*.json` →
|
|
791
|
-
`EffectiveConfig
|
|
792
|
-
|
|
863
|
+
`EffectiveConfig` (the domains it reads are `LOCAL_READ_DOMAINS` — the portable set plus `projects`; the portable set
|
|
864
|
+
`PORTABLE_DOMAINS` answers a different question, which domains travel in a bundle); `validateDomain` / `writeDomainFile` /
|
|
865
|
+
`writeDomainFileIf` (29.0.0: write only if the file still holds the text whose digest you pass, under a lock file) /
|
|
866
|
+
`listRequiredEnvNames` are the TOC's read/write/validate helpers. `getEffective({tolerant:true})` (0.10.12) isolates a malformed
|
|
793
867
|
catalog-domain file (that domain falls to its schema default, the error is listed in `domainErrors`)
|
|
794
868
|
instead of failing the whole read; gate domains (governance/rosters/entitlement/execution/runtime/
|
|
795
869
|
limits/workers) stay fail-loud even in tolerant mode. 0.19.0 adds a FAIL-LOUD sweep on the same read:
|
|
796
|
-
a `config.d/*.json` the local set will never read (a name that is not a domain, or a
|
|
870
|
+
a `config.d/*.json` the local set will never read (a name that is not a domain, or a domain outside `LOCAL_READ_DOMAINS`:
|
|
871
|
+
`workers` / `hosts` / `systems` / `entitlement`)
|
|
797
872
|
and any top-level key a domain schema strips are both NAMED through `onWarning`
|
|
798
873
|
(`unread-config-file` / `unknown-keys-dropped`) instead of vanishing silently (**6.3.0**: every warning coordinate —
|
|
799
874
|
unknown keys included — leaves through `redactSecrets`, so a secret-shaped key segment reads `[redacted-secret]`;
|
|
@@ -865,7 +940,8 @@ settings 单元读不进的成员**不是缺席**(`loosen` 可丢且要响,`tigh
|
|
|
865
940
|
`HooksConfig` / `HookMatcherEntry` / `HookEntry` (the `settings.json` `hooks` shape — event names a CLOSED set) are its zod
|
|
866
941
|
projections (accepted ⇔ it loads all of it; the parsed value is what loaded),
|
|
867
942
|
stop attribution (`StoppedBy` / `stopAttributionText`), and the one reading of `$VAR` / `${VAR}` in an `http` hook's header values
|
|
868
|
-
(`interpolateHookEnvVars` — allow-listed names expand, everything else is blanked
|
|
943
|
+
(`interpolateHookEnvVars` — allow-listed names expand, everything else is blanked, credential variables are never released, CR / LF / NUL stripped;
|
|
944
|
+
every reference that expands to empty for want of a released value is reported with its reason, closed set `HOOK_ENV_BLANK_REASONS` = `not-allowed` / `credential` / `unset`).
|
|
869
945
|
- **URL-list pattern judge** (`url-pattern.ts`, 13.0.0): the ONE way an administrator's URL-list pattern is matched —
|
|
870
946
|
`urlAllowPatternMatches` (⊆ CC `g9`, four upstream holes closed) / `urlDenyPatternMatches` (⊇ `g9` ∪ whole-string glob);
|
|
871
947
|
divergences in `docs/CC-DIVERGENCE.md`.
|
|
@@ -877,8 +953,8 @@ settings 单元读不进的成员**不是缺席**(`loosen` 可丢且要响,`tigh
|
|
|
877
953
|
is the source whose tier in `SETTINGS_SOURCE_CONTRACT` is `managed`; a tighten-only source contributes its deny list only (allow lists
|
|
878
954
|
concatenate across layers, so reading its allow list would widen the others').
|
|
879
955
|
- **Request-plane MCP entry judges** (`mcp-request-entry.ts`, 14.0.0): `isUsableWireName` / `describeBadWireName` (the engine's wire-name bound
|
|
880
|
-
`TOOL_WIRE_NAME_MAX_CHARS`, mirrored; a name with leading or trailing whitespace is a bad name too — never trimmed, never normalised; inner whitespace stays legal), `isUsableMcpServerName` / `describeBadMcpServerName` (14.8.0; the request plane's judge of an MCP server's name: the wire-name judge plus one arm — the `remote-` prefix, `REMOTE_MCP_SERVER_NAME_PREFIX`, is reserved for the remote MCP servers a device executor offers; the config plane's `McpServerSpec.name` accepts it — refusing would be a validation tightening, which the release discipline files under a major; A2A peer names keep `isUsableWireName`), `isContentOriginWord` / `describeBadContentOrigin`, `
|
|
881
|
-
(hard faults `ok:false` naming the key path; soft faults dropped by the reader and listed in `lost`; `env` / `headers` are read as plain-data string records — a `Map`, a class instance or an own `__proto__` member is not one, the delivered record is a copy, and a `lost` entry for a record carries machine-readable `member` / `fault
|
|
956
|
+
`TOOL_WIRE_NAME_MAX_CHARS`, mirrored; a name with leading or trailing whitespace is a bad name too — never trimmed, never normalised; inner whitespace stays legal), `isUsableMcpServerName` / `describeBadMcpServerName` (14.8.0; the request plane's judge of an MCP server's name: the wire-name judge plus one arm — the `remote-` prefix, `REMOTE_MCP_SERVER_NAME_PREFIX`, is reserved for the remote MCP servers a device executor offers; the config plane's `McpServerSpec.name` accepts it — refusing would be a validation tightening, which the release discipline files under a major; A2A peer names keep `isUsableWireName`), `isContentOriginWord` / `describeBadContentOrigin`, `readRequestMcpTransport` (29.0.0: the keys it refuses by name, `MCP_REQUEST_KEY_REFUSALS`; `readMcpIdentityHeaders` removed)
|
|
957
|
+
(hard faults `ok:false` naming the key path; soft faults dropped by the reader and listed in `lost`; `env` / `headers` are read as plain-data string records — a `Map`, a class instance or an own `__proto__` member is not one, the delivered record is a copy, and a `lost` entry for a record carries machine-readable `member` / `fault` — 29.0.0: that reading is the public `readRequestStringRecord(path, raw)` taken at `transport.env` / `transport.headers`, so a consumer reading its own name → string record (an A2A peer's `headers`) gets the same diagnostics at its own path; the two describers strip control and bidi characters and cut at 64 characters, the service's echo form) and the value-shape describers — one reading for
|
|
882
958
|
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.
|
|
883
959
|
- **One-line echo strip set** (`control-and-bidi.ts`, main barrel): `CONTROL_AND_BIDI_CHARS` (C0 + DEL + the 12 `Bidi_Control=Yes` code points,
|
|
884
960
|
as regex character-class source text), `stripControlAndBidi(text)` and `hasControlOrBidi(text)` — the one set a caller- or repository-written string loses
|
|
@@ -891,6 +967,10 @@ settings 单元读不进的成员**不是缺席**(`loosen` 可丢且要响,`tigh
|
|
|
891
967
|
- **Scheduler store contract** (`scheduler-store.ts`, subpath `./scheduler-store`; the fs binding is in
|
|
892
968
|
`./node`): the durable self-wake record shape + `parseSchedulerStore` / `serializeSchedulerStore`
|
|
893
969
|
(forward-compatible: unknown fields survive a round-trip, malformed records are dropped one by one).
|
|
970
|
+
The `./node` writers (`saveSchedulerStore` / `mutateSchedulerStore` / `createFileSchedulerStore().save`) write the store file 0o600 through the
|
|
971
|
+
process umask (a stricter umask only makes it stricter) and, since 29.0.0, create a missing parent directory exactly 0o700 at every level, whatever
|
|
972
|
+
the process umask (an existing directory keeps its mode; POSIX permission bits — on Windows the mode maps only to the read-only attribute, no
|
|
973
|
+
owner-only ACL). The path is resolved the kernel's way everywhere on that write (no lexical normalisation: `<link>/..` is the link target's parent).
|
|
894
974
|
- **Fleet contract** (`fleet.ts`, subpath `./fleet`): drain protocol, instance discovery, dispatch policy,
|
|
895
975
|
quota lease, usage report, quota-reset event. **6.1.0** adds the restart signal, defined ONCE:
|
|
896
976
|
`RestartSignal` (`{ reasons: string[] (≥1, non-empty words), version: number (the web-admin config version that
|
|
@@ -957,7 +1037,7 @@ settings 单元读不进的成员**不是缺席**(`loosen` 可丢且要响,`tigh
|
|
|
957
1037
|
- **Declared-but-unvalidated keys** (`PARSE_TRANSPARENT_KEYS`, 2.0.0): the ONE web-admin of keys this package
|
|
958
1038
|
carries verbatim WITHOUT checking their shape, each row naming who does check it (the engine's ingest side or
|
|
959
1039
|
a consumer's enforcement point). Today: `models[].compat` (1.10.0), `mcp.servers[].source` (1.7.2), `mcp.servers[].toolFaces`
|
|
960
|
-
(1.9.0), `mcp.servers[].toolAxes`
|
|
1040
|
+
(1.9.0), `mcp.servers[].toolAxes` (12.2.0; a connector-entry declaration — exactly one shape judge, the engine's root export `readMcpToolAxes`; its 12.2.0 siblings `authForm` / `entryKind` were removed in 29.0.0), `mcp.servers[].sessionMetaKey` (14.8.0; the `_meta` key the engine sends the leg's session id under — one judge, the engine's root export `judgeSessionMetaKey`), `mcp.servers[].startupTimeoutMs` (one server's own startup bound — one judge, the engine's root export `mcpStartupTimeoutMs`),
|
|
961
1041
|
and an entitlement override's `value`. The free-form OBJECT keys `models[].extraBody` and (26.0.0; listed above from
|
|
962
1042
|
6.4.0 to 25.x) `models[].headers` are NOT among them — one shared container gate (a plain JSON object); what they leave
|
|
963
1043
|
open is the key vocabulary inside (provider request params / header names — the header-name allowlist × lane × value
|
package/conformance/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
30.0.0
|
|
@@ -73,13 +73,13 @@
|
|
|
73
73
|
"strictWrite": {
|
|
74
74
|
"outcome": "rejected",
|
|
75
75
|
"stage": "validate",
|
|
76
|
-
"why": "
|
|
76
|
+
"why": "拒:读腿 22.0.0 起两条都坏(缺 provider / id 的一条、带拼错键 typo 的一条)⇒ 零幸存者 ⇒ models 整域缺省,只发 domain-defaulted;写入席不替运维删条目 —— 同一份文档里有坏条目,整次不受理。"
|
|
77
77
|
},
|
|
78
78
|
"wire": {
|
|
79
79
|
"derive": true
|
|
80
80
|
},
|
|
81
81
|
"localRoot": {
|
|
82
82
|
"derive": true,
|
|
83
|
-
"localVersion":
|
|
83
|
+
"localVersion": 4142189425420713
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -14422,6 +14422,6 @@
|
|
|
14422
14422
|
},
|
|
14423
14423
|
"localRoot": {
|
|
14424
14424
|
"derive": true,
|
|
14425
|
-
"localVersion":
|
|
14425
|
+
"localVersion": 3780573944953703
|
|
14426
14426
|
}
|
|
14427
14427
|
}
|