@sema-agent/settings-schema 29.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 +101 -0
- package/README.md +13 -2
- package/conformance/VERSION +1 -1
- package/conformance/cases/c01-entry-salvage-then-typo/expected.json +1 -1
- package/conformance/cases/c57-s784-g1-enabled-no-lane/expected.json +2 -2
- package/conformance/cases/c58-s784-g2-multitenant-host/expected.json +2 -2
- package/conformance/cases/c59-s784-g3-k8s-missing-image/expected.json +2 -2
- package/conformance/cases/c60-s784-g3-e2b-missing-key/expected.json +2 -2
- package/conformance/cases/c61-s784-g3-other-lane-key/expected.json +2 -2
- package/conformance/cases/c62-s784-g7a-session-tidb/expected.json +2 -2
- package/conformance/cases/c63-s784-host-two-replicas/expected.json +2 -2
- package/conformance/cases/c64-s784-multitenant-local-store/expected.json +2 -2
- package/conformance/cases/c65-s784-pg-without-db/expected.json +2 -2
- package/conformance/cases/c66-s784-memory-backend-mismatch/expected.json +2 -2
- package/conformance/cases/c67-s784-retired-field-loud/expected.json +2 -2
- package/conformance/cases/c68-s784-device-local-store/expected.json +2 -2
- package/conformance/cases/c76-projects-entry-salvage-nested/expected.json +1 -1
- package/conformance/cases/c78-prompts-empty-bindings-refused/expected.json +1 -1
- package/conformance/cases/c78-prompts-empty-bindings-refused/meta.json +1 -1
- package/conformance/cases/c81-prompts-declaration-bindings-refused/expected.json +1 -1
- package/conformance/cases/c82-prompts-v1-catalog-refused/expected.json +1 -1
- package/conformance/cases/cli04-env-value-with-newline/meta.json +1 -1
- package/conformance/cases/t01-absent-domain-key-not-null/meta.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/meta.json +1 -1
- package/dist/config-fns.d.ts +4 -2
- package/dist/config-fns.js +1 -1
- package/dist/conformance/derive.d.ts +1 -1
- package/dist/conformance/derive.js +4 -4
- package/dist/file-store.js +3 -2
- package/dist/migration-receipt.d.ts +2 -2
- package/dist/migration-receipt.js +2 -2
- package/dist/one-time-migrations.d.ts +2 -2
- package/dist/one-time-migrations.js +0 -40
- package/dist/types.js +7 -5
- package/docs/CONFORMANCE.md +1 -1
- package/docs/CONSUMER-INTEGRATION.md +43 -5
- package/llms-full.txt +2 -2
- package/llms.txt +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,107 @@
|
|
|
8
8
|
|
|
9
9
|
## Unreleased
|
|
10
10
|
|
|
11
|
+
## 30.0.0 — 2026-11-17 — major:到期删码一次性迁移 SS-M10(prompts 两轴 `bindings` / `catalog`;窗 2026-11-16 已关)—— 闭集 `ONE_TIME_MIGRATION_IDS` / `OneTimeMigrationId` 收窄、迁移步删、存量旧形写面拒且读面整域缺省并点名(不再有迁移替它改写)· 读腿告警 `unread-config-file` 的原因词 `non-portable-domain` 改名 `not-a-local-read-domain`(闭集里一员的字面换了)
|
|
12
|
+
|
|
13
|
+
> 本节三条。
|
|
14
|
+
|
|
15
|
+
### 到期删码 SS-M10(prompts 两轴 `bindings` / `catalog`;窗 2026-11-16 已关)—— BREAKING:闭集收窄 · 删迁移步 · 存量旧形的答法
|
|
16
|
+
|
|
17
|
+
> 档位(按发版纪律):**major** —— ① 发版纪律「删除导出与键」:闭集 `ONE_TIME_MIGRATION_IDS` / `OneTimeMigrationId`(`./one-time-migrations`)删成员 `"SS-M10"`,对它写穷举的读者编译红一次(删一臂);② 「凡是能……让同一份配置解析出不同结果的改动」:四个迁移入口(`migrateStoredDocuments` / `migrateEffectiveSnapshot` / `migrateConfigDocuments` / 命令行 `migrate`)对 prompts 文档里的 `bindings` / `catalog` 此前改写(空 `bindings: []` 删掉并出收据)或 `refused`(出拒收据、命令行 rc 1),自此一律原样、零收据、命令行答 `noop`;窗内没清理的存量照旧被拒 / 缺省(拒句换了说法,见下表)。导出名集不增不删;登记表里窗未到的 SS-M11 / SS-M12 / SS-M13 一行不动。
|
|
18
|
+
|
|
19
|
+
**删了什么**:登记表 `ONE_TIME_MIGRATIONS` 的 SS-M10 整行(墓碑是 schema 里的字段、不是登记表的行 —— 与 SS-M8 同一条律);改写步(`prompts` 文档:空 `bindings: []` 删并出 `dropped-inert` 收据;非空 / 不是数组的 `bindings` 与 `catalog` 出 `refused` 收据、原样留着)及它在四个迁移入口里的调用;闭集 `ONE_TIME_MIGRATION_IDS` 里的 `"SS-M10"`(`OneTimeMigrationId` 随之收窄,是 `"SS-M11" | "SS-M12" | "SS-M13"`);墓碑 `prompts.bindings` / `prompts.catalog` 的 `migration` 格(墓碑只在迁移还在时点名它)。**留下的**:两只墓碑字段(退役于 14.0.0)与它们的写面拒、读面整域缺省并点名(读面只有接了告警通道才出声)—— 拒句的迁移指路(`data stored before 14.0.0: run the one-time migration SS-M10 (…)`)去掉,止于今天的位与出路。
|
|
20
|
+
|
|
21
|
+
**存量旧形现在答什么**(读实、逐面钉;**没有一种去处把旧键读成值**:写面拒、读面整域缺省并点名、冻结 effective 的线上形由消费方的判官拒;迁移入口与命令行 `migrate` 不替它改写、也不再对它出收据):
|
|
22
|
+
|
|
23
|
+
| 旧形(prompts 存储文档) | 写面:`parseDomain` / `PromptsConfig` / `validateDomain` / `writeDomainFile` | 读面:`buildEffective` / `FileConfigStore.read()` | 四个迁移入口与命令行 `migrate` |
|
|
24
|
+
|---|---|---|---|
|
|
25
|
+
| 空 `bindings: []`(13.x 每份文档恒物化) | 整域拒(此前:迁移删掉它之后读得进) | `prompts` 整域缺省 `{}`(不下发任何中心层)+ 一条 `domain-defaulted`(此前同) | 零收据、文档同一引用;命令行 `noop`、文件一字不动(此前:删键、出 `dropped-inert`、写盘) |
|
|
26
|
+
| 非空 `bindings` / `bindings` 不是数组 | 整域拒 | 同上 | 同上(此前:`refused` 收据、命令行 rc 1 一字不写) |
|
|
27
|
+
| `catalog`(v1 信封) | 整域拒 | 同上 | 同上(此前同 `refused`) |
|
|
28
|
+
| 旧键旁边的新形(`artifact` / `workers`) | 整域拒 —— 新形不被「删掉旧键、留下新形」半读 | `prompts` 整域缺省,新形一并读不进(这份原文档此前也是整域缺省;此前读得进的是先过迁移、被删掉空键之后的那一份,见右列) | 零收据、同一引用。**此前(≤ 29.x)**:`{ bindings: [], artifact }` 经迁移删掉空键、出一张 `dropped-inert` 收据(命令行 `migrate` 写盘,`--check` 答 `pending`、rc 3),新形随后读得进,中心层照常下发 `artifact`;自此不删、不写、目录里只有这份文档时 `--check` 答 `noop`(rc 0),读面整域缺省,这份 `artifact` 不再下发。带非空 `bindings` / `catalog` 的同形:**迁移面的结局变了** —— 此前是 `refused`(命令行 rc 1、一字不写),自此同上(零收据、`noop`、rc 0);新形此前就读不进(旧键还在、读面整域缺省),这一点不变 |
|
|
29
|
+
| 冻结 effective(发布快照 / 回滚整份快照 / 引擎 last-known-good)里的 `prompts: { bindings: [] }` | —— | 线上读口 `readEffectiveWire` 把 `prompts` 原样承运(它的线上形由消费方判):此前先过 `migrateEffectiveSnapshot` 会读成 `prompts: {}`,自此是 `{ bindings: [] }`,消费方的 `EffectivePromptsWire` 判官响亮拒(缺 `schemaVersion: 2`) | `migrateEffectiveSnapshot` 零收据、同一引用 |
|
|
30
|
+
|
|
31
|
+
写面拒句(整域拒,任何一把旧键都点名;两键同在则两句都在):`prompts.bindings was retired in 14.0.0 — now the center artifact (prompts.artifact for every worker, prompts.workers.<name> for one worker) — delete the key from the stored document (the old declarations and the v1 catalog cannot be converted: republish the prompts from the center's editor)`(`catalog` 同形)。读面的整域缺省经**告警通道**出声 —— `buildEffective` 的 `onWarning`、`FileConfigStore.read()` 交成数据的 `warnings`(`domain-defaulted`,`error` 带同一句);不接告警通道的调用方拿到缺省的 `prompts`、没有信号(与所有整域缺省同一律;删码前读面也是这样 —— 读路径从不靠迁移,所以不是这次删码新开的口)。线上读口 `readEffectiveWire` 不按存储形读 `prompts`(线上形是发布形,由消费方判),所以它不出这条告警。
|
|
32
|
+
|
|
33
|
+
**已知限制**(删码把「迁移那一面的拒」拿走了,披露不补):① 命令行 `migrate` / `--check` 与 `migrateConfigDocuments` 对只带非空 `bindings` / `catalog` 的 prompts 文档此前出 `refused`(命令行 rc 1),自此答 `noop`(rc 0);只带空 `bindings: []` 的,命令行此前真跑删键写盘、`--check` 答 `pending`(rc 3),自此答 `noop`(rc 0)、文件一字不动 —— 靠 `--check` 的退出码 3 当闸的运维脚本,升级后这类目录改为过闸。自此迁移不替运维删这两把键(`bindings` / `catalog`),拒的信号只在读写两面;目录里同时有别的可迁文档时,命令行照迁那几份、不报这份 prompts 文档。要在升级前发现它,看上一版的 `--check`(见下「出路与升级前自查」),升级后用 `validateDomain("prompts", …)`。② 读面的缺省只有接了告警通道才出声。① 与 ② 同时成立的情形:没接告警通道、只靠迁移命令(`migrate` / `--check`)判「存量清干净了没有」的部署,升级后对旧键迁移面和读面都不出声(命令行 `noop`、rc 0,读面缺省没有信号;写面只在有人写这份文档时才拒)—— 这样的部署只剩两道:升级前用上一版自查、升级后对每份 prompts 存储文档跑 `validateDomain`。③ 升级前没清掉旧键的文档,连同旁边的新形整域读不进(上表第四行):`{ bindings: [], artifact }` 此前经迁移清掉空键之后新形读得进、中心层下发 `artifact`,自此整域缺省、不再下发,不是「删掉旧键、留下新形」。
|
|
34
|
+
|
|
35
|
+
**程序造的 prompts 文档:三个迁移入口的答由抛变成原样交回**(只有嵌入方直接调函数、传程序造的对象时才碰得到;从 JSON 读出来的存量碰不到):`bindings` / `catalog` 这两把键不可枚举、是访问器、或读取时抛(`getOwnPropertyDescriptor` 陷阱抛、`bindings` 数组的 `length` 读时抛),此前 `migrateStoredDocuments` / `migrateEffectiveSnapshot` / `migrateConfigDocuments` 都抛 —— 前三种是包自己那一句 `TypeError`(`a value that is not plain data …` / `an object that could not be inspected …`),`length` 陷阱抛的是嵌入方自己抛的那个对象 —— 自此原样交回同一引用、零收据(`migrateConfigDocuments` 答 `noop`):迁移面不再读这两把键。翻面钉:`test/read-answers-table-14.7.0.test.ts` 的四格(30.0.0 翻面,标题写明上一版的答)。
|
|
36
|
+
|
|
37
|
+
**出路与升级前自查**:
|
|
38
|
+
- 存储文档里的 `bindings` / `catalog` 键删掉(空 `bindings: []` 直接删;非空 `bindings` 与 `catalog` 在本包里转不成 artifact —— 声明要经中心的卡编译器才编成 overlay、catalog 的 digest 是引擎铸的 —— 要中心层就从中心的编辑器重新发布;本地 `config.d/prompts.json` 里的 `bindings` 引擎从未读过,删键即可)。
|
|
39
|
+
- **升级前**用上一版(≤ 29.x)自查并顺手清理:`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 —— 用法错、读写环境错、目录里有坏文件〔坏 JSON 等〕、目录里有条目却没有一个是域文档 —— 时标准输出为空,错误句在标准错误);看它 `wouldApply` 与 `refused` 两个数组里 `document` 为 `"prompts"` 的项(每项四个键:`migration`〔SS-M10 的项是 `"SS-M10"`;这份 prompts 文档整域判的拒是 `null`〕· `document` · `path` · `appliedAs`,`refused` 项另带 `reason`)。29.0.0 上实测的一行(目录里只有 `prompts.json = {"bindings":[]}`):`{"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` / 退出码)分:① `outcome=pending`(rc 3)且 `wouldApply` 里有 `path` 是 `"bindings"`、`appliedAs` 是 `"dropped-inert"` 的项 = 还有空 `bindings: []`、这份目录里没有被拒的项,去掉 `--check` 再跑一次即删;② `outcome=refused`(rc 1)= **真跑也一字不写**,`refused` 里的每一项都要先手修、再重跑 `--check`:`migration` 是 `"SS-M10"` 的项(`path` 是 `"bindings"` / `"catalog"`)= 有要手清的旧键,`migration` 是 `null` 的项 = 同一份 prompts 文档整域判的拒(`path` 指向它里面坏形的键,例如旁边的 `artifact` / `workers`,`reason` 是校验器的原句),目录里别的文档被拒(例如 `mcp.json` 里另一把退役键)同样让整次一字不写;这时 `wouldApply` 里也可能同时出现 `dropped-inert` 项,**它不会被写**,不是「再跑一次即删」;③ 两个数组里都没有 `document` 为 `"prompts"` 的项 = 这份目录里没有旧键。草稿 / 发布快照 / 回滚历史行里的存量:逐份调上一版的 `migrateStoredDocuments`(草稿、回滚历史里的单域行)/ `migrateEffectiveSnapshot`(整份快照),改过的写回 —— **要在依赖还停在 29.x 的环境里调**:依赖已抬到 30 的项目里 import 到的是 30 的函数,对 prompts 旧形零收据、原样交回,什么都不改。
|
|
40
|
+
- **升级后**自查(不依赖上一版):对每份 prompts 存储文档跑 `validateDomain("prompts", 文档)` —— 答 `ok: false` 且句子是上面那一句 = 还带着旧键(`parseDomainLoud` 对同一份文档抛同一句,不答 `ok`)。
|
|
41
|
+
|
|
42
|
+
**闭集随删码收窄**:`ONE_TIME_MIGRATION_IDS` / `OneTimeMigrationId` 删 `"SS-M10"`;对 `Record<OneTimeMigrationId, …>` / 带 `never` 兜底的 `switch` 写穷举的读者编译红一次(删一臂);收据 `MigrationReceipt.migration` 不再出现 `"SS-M10"`;`MIGRATION_APPLIED_AS` 不变(`dropped-inert` 还有 SS-M12 / SS-M13 铸)。导出名集不因此增删,`docs/API-SURFACE.md` 不变。
|
|
43
|
+
|
|
44
|
+
**三问**:
|
|
45
|
+
- **谁需要**:窗(30 天)按登记表那一行关了;一步只在窗内有用的改写不删,就长成了长命双读(读路径之外又一条「旧形怎么办」的去处)。SS-M10 的输入形 —— 13.x 恒物化的 `bindings: []` —— 只存在于 14.0.0(2026-10-17)之前写下的文档里。
|
|
46
|
+
- **谁受伤**:① 窗内一直没跑迁移、存储文档里还带 `bindings` / `catalog` 的部署与存储层 —— 本地 `config.d/prompts.json`、中心的草稿 / 发布快照 / 回滚历史行:此前由迁移删掉空 `bindings: []`(非空的被拒收据点名),自此读写两面拒、读面该域缺省(不下发中心层,引擎用内置提示词);② 拿冻结 effective 回滚 / 重放的消费方:此前经 `migrateEffectiveSnapshot` 读成 `prompts: {}`,自此线上读口承运原样的 `prompts: { bindings: [] }`、被消费方自己的线上形判官拒;③ 靠四个迁移入口的收据判「这份存量要不要处理」的调用方(命令行 `migrate` 的 `--check`;只带空 `bindings: []` 的目录由 `pending`〔rc 3〕变 `noop`〔rc 0〕,目录里另有待迁 / 被拒项时退出码由那些项定):对 prompts 旧形不再出收据;④ 对 `OneTimeMigrationId` 穷举的代码:编译红一次。
|
|
47
|
+
- **补偿**:具体旋钮见「出路与升级前自查」—— 升级前用上一版跑一次迁移(清空 `bindings: []`、列出要手清的键),或删键 / 重新发布;升级后 `validateDomain("prompts", …)` 自查。读面缺省的 `prompts` 不是安全轴放权(不下发中心层 = 引擎内置提示词,更少的内容而不是更多的权限)。
|
|
48
|
+
|
|
49
|
+
**各消费方**:
|
|
50
|
+
|
|
51
|
+
| 消费方 | 读点 | 动作 |
|
|
52
|
+
|---|---|---|
|
|
53
|
+
| server | 本地配置腿读 `config.d`(`FileConfigStore`)· 配置根上的 SS-M11 迁移(`migrateEnvModelsDecision`) | 零代码改动:集成树的 src / test 里没有对 `OneTimeMigrationId` / `ONE_TIME_MIGRATION_IDS` 穷举、也没有点名 SS-M10 的地方(它读 SS-M11 收据的 `migration` 字段的那一处不受影响);本地 `config.d/prompts.json` 带旧键的部署按「出路」清一次 |
|
|
54
|
+
| cli | 壳经 `migrateConfigDocuments` / `migrateStoredDocuments` 只对 `models` 文档调迁移链(本地模型池) | 零代码改动(SS-M10 只认 prompts 域形,对 models 文档恒等);src / test 里没有读收据 id 闭集的地方 |
|
|
55
|
+
| client-core | 无迁移入口的调用点(src / test 里 grep 零命中) | 零代码改动 |
|
|
56
|
+
| web-admin | ① 模块加载时读登记表 SS-M10 那一行的 `introducedIn` 当「prompts wire v2 的起始大版本」(找不到那一行 ⇒ 响亮一行,并对所有拉取方都不下发 `prompts`)· ② 类型为 `OneTimeMigrationId` 的常量 `"SS-M10"`(认旧文档的那一处)· ③ 草稿 / 发布快照 / 回滚历史的存储层调 `migrateStoredDocuments` / `migrateEffectiveSnapshot` 的地方〔以上取自本机 web-admin 工作树的 grep,未跑;③ 是推断〕 | 请托的读法(管理面的排期,本包不验证管理面行为):① 起始大版本是历史事实(14),写成管理面自己的常量,不再从登记表现读 —— 不改则删码后 `prompts` 对所有拉取方都不下发(fail-closed 方向);② 删常量与点名 SS-M10 的分支(tsc 红即通知);③ 升级前用上一版把各层存量清一次;靠 SS-M10 收据判「要不要写回」的路径自此对 prompts 旧形不出收据 |
|
|
57
|
+
| sdk | 契约套件(读本包符合性语料) | 语料随包同版:c78 / c81 / c82 的金样不动(拒仍在),散文随改 |
|
|
58
|
+
| test | 黑盒判据 | 见下「黑盒判据」 |
|
|
59
|
+
|
|
60
|
+
**黑盒判据**(从包的导出面可执行,不引用内部实现):
|
|
61
|
+
- **SS-M10 删后 ①**:`ONE_TIME_MIGRATION_IDS` 深等于 `["SS-M11","SS-M12","SS-M13"]` 且冻结;`ONE_TIME_MIGRATIONS.map((w) => w.id)` 同序同值,没有一行的文字点名 `SS-M10`。
|
|
62
|
+
- **② 迁移入口**:`migrateStoredDocuments({ prompts: { bindings: [] } })` 零收据、`docs.prompts` 与入参是同一引用(此前:一张 `dropped-inert` 收据、`docs.prompts` 是 `{}`);`{ bindings: [<非空>] }` 与 `{ catalog: <v1 信封> }` 同答(此前:`refused` 收据);`migrateConfigDocuments({ prompts: … }, { documents: ["prompts"] })` 答 `kind: "noop"`;命令行 `migrate` 对只有 `prompts.json = {"bindings":[]}` 的目录答 `outcome=noop written=false`、rc 0、文件字节不动。
|
|
63
|
+
- **③ 写面**:`parseDomain("prompts", { bindings: [] })` 抛,句子含 `prompts.bindings was retired in 14.0.0` 与 `delete the key from the stored document`,不含 `SS-M10` / `one-time migration` / `npx`;`validateDomain` 答 `ok: false` 带同一句;`writeDomainFile(root, "prompts", { bindings: [] })` 抛同一句、`config.d/prompts.json` 不被创建。
|
|
64
|
+
- **④ 读面**:`buildEffective` 以 `{ bindings: [] }`(或 `{ bindings: [], artifact: <合法 artifact> }`)为 prompts 文档 ⇒ `effective.prompts` 深等于 `{}`,告警恰一条 `domain-defaulted`(`domain: "prompts"`),`error` 的句子同上;`FileConfigStore.read()` 读 `config.d/prompts.json = {"bindings":[]}` ⇒ `effective` 且 `warnings` 里有同一条。
|
|
65
|
+
- **⑤ 冻结 effective**:`readEffectiveWire(migrateEffectiveSnapshot({ version: 1, updatedAt: "…", prompts: { bindings: [] } }).effective).prompts` 深等于 `{ bindings: [] }`(此前:`{}`),`EffectivePromptsWire.safeParse` 对它失败、句子点名 `schemaVersion`。
|
|
66
|
+
|
|
67
|
+
**钉**:`test/one-time-migration-ss-m10-14.0.0.test.ts`(15 格,改写成窗关之后的答法:登记表与闭集 · 墓碑不带 `migration` 格 · 四个迁移入口零收据同一引用 · 写面〔`PromptsConfig` / `parseDomain` / `validateDomain` / `writeDomainFile`〕· 读面〔`buildEffective` · 新形不被半读 · 冻结 effective 走线上读口 · `FileConfigStore.read()`〕· 命令行 `noop` · 已知限制一格〔目录里同时有别的可迁文档时命令行照迁、不报带旧键的 prompts 文档〕;车基〔删码前〕前 14 格里 13 红 1 绿〔实测〕,那一格绿的是「旧键旁边的新形不被半读」—— 删码前后同答;第 15 格删码前命令行答 `refused` rc 1,红〔按构造,未在车基上单跑〕)、`test/one-time-migration-window-gate.test.ts`(新 2 格:系统日期拨到 UTC 2026-11-17 〔窗关后第一天〕到期门读真表答绿 · 把 SS-M10 行加回登记表 ⇒ 2026-11-17 红并点名它的 `removal`、窗关当天不红;车基 2 红)。随表改的既有钉:迁移夹具原用 SS-M10 当「改了文档」的样本的各文件改用还在的 SS-M13(mcp 条目上无读者的 `authForm`)与 SS-M12(workers 15.x 单车道行);读 prompts 文档固定键 `bindings` 的几格(描述符律 / 自有键读 / 嵌入方陷阱 / 污染表)改落在 SS-M13 读的 `mcp.servers` 上;`config-documents-migration` 与 `cli-vs-function-corpus` 对一致性语料的结局分布补两个合成 case(语料里已没有任何一个 case 被迁移步改写或拒:c78 / c81 / c82 自此是 `noop`);`atomic-salvage` 登记三行拒句文字之差(c78 / c81 / c82);语料散文(c78 的 `claim`、三条的严写金样旁的 `why`)不再点名 SS-M10,金样不动。
|
|
68
|
+
|
|
69
|
+
### 读腿告警 `unread-config-file` 的原因词改名 —— BREAKING:`non-portable-domain` → `not-a-local-read-domain`
|
|
70
|
+
|
|
71
|
+
> 档位(按发版纪律):**major** —— 闭集成员改名:`EffectiveReadWarning` 里 `kind: "unread-config-file"` 那一臂的 `why` 闭集由 `"not-a-domain" | "non-portable-domain"` 变成 `"not-a-domain" | "not-a-local-read-domain"`;同一份 `config.d/` 读出的告警 `why` 随之换字面,旧词在导出型上不可赋,对 `why` 穷举或按字面比较旧词的读者编译红 / 判断落空一次。含义与触发条件一字不变;导出名集不增不删;**零别名、零双读**(旧词不再被铸,型里没有它)。
|
|
72
|
+
|
|
73
|
+
**改了什么**:原因词 `non-portable-domain` → `not-a-local-read-domain`。铸点两处:`FileConfigStore` 的「没人读的文件」扫描(`getEffective` 的 `onWarning`、`read()` 的 `warnings`、`loadLocalConfig` 的 `warnings` 同一只铸点)与一致性套件本地腿的派生期望(`deriveLocalExpectation`,变换 `T3-non-local-read-domains`);型 `EffectiveReadWarning`(`./config-fns`;`WarningProjection` 从它逐臂派生,随之换);符合性语料 c57 – c68 十二条本地腿金样里的 `why` 一字;导出值 `DERIVATION_TRANSFORMS`(`./conformance`)T3 那一行的 `what` 说明串(`unread-config-file{non-portable-domain}` → `{not-a-local-read-domain}`;`id` / `legs` 不变,按字面比较这条说明串的读者要换字面);`docs/CONFORMANCE.md` 的 T3 一行与源码注释。触发条件不变:`config.d/` 里的 `<名>.json`,名字是域、但不在本地读取域集 `LOCAL_READ_DOMAINS` 里(今天是 `workers` / `hosts` / `systems` / `entitlement`;`projects` 在读取集里、被读,不报)。名字不是域的仍是 `not-a-domain`,一字不动。
|
|
74
|
+
|
|
75
|
+
**为什么改**:29.0.0 把本地读取域集 `LOCAL_READ_DOMAINS`(便携域集 + `projects`)与便携域集 `PORTABLE_DOMAINS` 拆成两只常量之后,这条告警的判据早已是「文件名是域、但不在本地读取集里」,可原因词还说「不便携」—— `projects` 不便携(不随 bundle 搬运)却被读,词与判据各说各的,读到 `workers` 报「不便携」的人会推出「不便携的域就不读」这条错规则(`projects` 就是反例)。那一版没动它,是因为它是已发的闭集词;一个说错判据的词不该一直留着,在 major 里改成它真正的判据,并与同一闭集里的 `not-a-domain` 平行(一个说「名字不是域」,一个说「是域、但不是本地读取域」)。搬运义的名字不动:`NON_PORTABLE_DOMAIN_REASONS` 答的是「为什么这个域不随 bundle 搬运」,词义与判据一致。
|
|
76
|
+
|
|
77
|
+
**持久面**:无。这条告警是读口的返回值与 `onWarning` 的实参,本包不把它写进任何存储文档、迁移收据或拒单(它们都不带 `why`);落盘的只有随包语料的金样(c57 – c68),随本版换字。调用方若把告警写进自己的审计 / 日志流(例如日志行里的 `why` 字段),那条流里的存量行是旧词、新写的行是新词:按 `why` 字面聚合、或按它设告警规则的,两个字面都要认一段时间(本包不提供别名,存量怎么答由流的属主定)。
|
|
78
|
+
|
|
79
|
+
**升级法**:**换字面** —— 对 `why` 穷举(`switch` / `Record<…>`)或按字面比较(`=== "non-portable-domain"`)的代码,把旧词换成 `not-a-local-read-domain`;自带一份 `why` 联合型拷贝的,联合里的旧词换字,tsc 即对上。只显示 `why`、不判它的代码零动作。
|
|
80
|
+
|
|
81
|
+
**三问**:
|
|
82
|
+
- **谁需要**:读这条告警的原因词做分流 / 显示的消费方 —— 旧词把「在不在本地读取集」这个问题说成了「便携性」,新词与判据同名,两员(`not-a-domain` / `not-a-local-read-domain`)各说一件事。
|
|
83
|
+
- **谁受伤**:① 对 `EffectiveReadWarning` 的 `why` 穷举或按字面比较旧词的代码:编译红 / 判断落空一次(换字面);② 按 `why` 字面聚合 / 设告警规则的日志与审计流:存量行旧词、新写行新词(见「持久面」);③ 读本包语料、自己铸这条告警的读腿(契约套件的适配器):本地腿金样 c57 – c68 的 `why` 换字,仍铸旧字面的读腿会在这十二条上红 —— 语料随包同版。
|
|
84
|
+
- **补偿**:换字面(一处替换);语料随包同版;旧词不再被铸、也不留别名(别名与新词并存 = 同一事实两个词)。
|
|
85
|
+
|
|
86
|
+
**各消费方**〔以下取自本机各仓工作树的 grep,未跑;web-admin 的一行只是它自己语料里的文字〕:
|
|
87
|
+
|
|
88
|
+
| 消费方 | 读点 | 动作 |
|
|
89
|
+
|---|---|---|
|
|
90
|
+
| server | web-admin 客户端折叠读腿告警的那一处:自带一份 `why` 的联合型(拷贝了旧词)、把 `why` 原样写进 `config_unread_file` 日志行;两只测试夹具里的旧词字面 | 换字面:联合型与夹具里的旧词换新词(型拷贝换字后 tsc 即对上);日志行的 `why` 字段自此是新词,按旧字面设告警规则的同换 |
|
|
91
|
+
| web-admin | 一条自有语料 case 的 `meta.json` 散文里点名 `unread-config-file{non-portable-domain}`(文字,不参与比对) | 改文字(换成 `not-a-local-read-domain`);该 case 若挂本包语料的本地腿比对,金样随包更新 |
|
|
92
|
+
| cli | 零读点(src / test grep 零命中) | 零代码改动 |
|
|
93
|
+
| client-core | 零读点 | 零代码改动 |
|
|
94
|
+
| sdk | 契约套件读本包符合性语料(c57 – c68 的本地腿金样换字);源码 grep 零命中 | 语料随包同版;套件里若有自己铸这条告警的适配器,同换字面 |
|
|
95
|
+
| test | 黑盒判据 | 见下「黑盒判据」 |
|
|
96
|
+
|
|
97
|
+
**黑盒判据**(从包的导出面可执行,不引用内部实现):
|
|
98
|
+
- 本地 `config.d/` 放一只不在本地读取域集的域文件(如 `workers.json` = `{"workers":[]}`):`loadLocalConfig(root)` 的 `warnings`、`FileConfigStore.read()` 的 `warnings`、`new FileConfigStore(root, { onWarning })` 的回调里,有恰一条这份文件的告警 —— `kind: "unread-config-file"`、`file: "workers.json"`、`domain: "workers"`、`why: "not-a-local-read-domain"`(此前:`why: "non-portable-domain"`);`effective.workers` 取 schema 默认。
|
|
99
|
+
- 同一棵 `config.d/` 里放一份合法的 `projects.json`:没有它的 `unread-config-file`(被读);放一只名字不是域的 `nosuchdomain.json`:告警 `why: "not-a-domain"`,一字不动。
|
|
100
|
+
- 任何一条这个 `kind` 的告警,`why` 都不是 `"non-portable-domain"`;语料 c57 – c68 的本地腿期望里,那条告警的 `why` 是 `"not-a-local-read-domain"`。
|
|
101
|
+
|
|
102
|
+
**钉**:`test/unread-why-word-30.0.0.test.ts`(23 格:① 铸点〔`getEffective` 的 `onWarning` · `read()` · `loadLocalConfig`;四个非本地读取域 + 一个不是域的名字 + 被读的 `projects`〕② 型的字面联合〔从 AST 读源码〕与编译期反向钉〔旧词不可赋;由整树 tsc 读,vitest 只跑到运行期〕③ 一致性套件本地腿的派生期望 ④ 语料金样〔全部 case 的 `why` 只有两员;c57 – c68 十二条换字〕⑤ 旧词零命中〔`src` · `conformance` · 现行文书;README 与消费接入档只在讲这次改名的两处出现,且那两处里点名旧词的行同时点名新词〕⑥ 文书〔本块 · 升级指引 · 消费接入档第 36 节 · 黑盒判据 · T3 一行〕;车基〔改名前〕上 20 红 3 绿,那 3 格绿的是编译期反向钉〔vitest 不做类型检查,在整树 tsc 上才红〕与两格不变量护栏〔搬运义的名字仍在 · 已发各节不动〕)。随表改的既有钉:`local-read-domains-29.0.0`(铸点与派生期望的期望字面,四格)、`silent-drop-gate-0.19`(一格,另改一个测试标题里的「不便携」为「不在本地读取集」)、`conformance-coverage`(按词判变换覆盖的一行)。
|
|
103
|
+
|
|
104
|
+
### 订正:符合性语料里几处人写的说明改真 —— 金样的值不变
|
|
105
|
+
|
|
106
|
+
> 档位(按发版纪律):**无独立档位** —— 只改语料里人写的散文字段(`claim` / `note` / `why`),随上面那个 major 的同一发布窗一并发出,语料只动一次;期望值、告警对象、case id、文件名一个字没动,导出名集不增不删。
|
|
107
|
+
|
|
108
|
+
**订正了什么**:① `z01-every-domain-empty-object` 的 claim 写着 local-root 腿「对五个非便携域各报一条 `unread-config-file`」—— 29.0.0 起 `projects` 被读、不报,实数是**四条**(workers / hosts / systems / entitlement;`deriveLocalExpectation` 与真 `loadLocalConfig` 对这份入参读出的都是这四条),改成「每个不在本地读取集的域各报一条」并点名今天的四个;② c57 – c68 十二份 `expected.json` 的 `localRoot.why`、`cli04-env-value-with-newline` 的 claim、`t01-absent-domain-key-not-null` 的 note 把「本机腿不读」归因于「非便携域」—— 判据其实是「不在本地读取集」(`projects` 不便携却被读),改成与新词 `not-a-local-read-domain` 同词的说法。③ 复审时对着期望亲核出的三处同类(散文条数 / 因果与期望对不上):`c01` 的 `strictWrite.why`(说读腿丢一条并出 `entry-dropped`,22.0.0 起期望是两条都坏 ⇒ 整域缺省、只发一条 `domain-defaulted`)、`c76` 的 `strictWrite.why`(读腿丢「两条」,期望里是三条 `entry-dropped`)、`t04` 的 note(正控「两条告警坐标」,期望里只有一条无坐标的 `domain-defaulted`;note 末追加 22.0.0 起的说明,原叙述不删)。c57 – c68 告警 `why` 字面的换字属上一条改名,不在这一条里。
|
|
109
|
+
|
|
110
|
+
**谁受影响**:逐字比对语料散文(`claim` / `note` / `why`)的消费方(语料随包同版,取新的一份);按值比对的读腿零影响。
|
|
111
|
+
|
|
11
112
|
## 29.0.0 — 2026-11-15 — major:本地文件店自此读 `config.d/projects.json`(本地读取域集 `LOCAL_READ_DOMAINS` = 便携域集 + `projects`,与便携域集拆成两只常量)· 内容版本对同一组文件换一次数 · 拒单文档名 `ConfigDocumentName` 多一员;同批加性:带条件的域文件写器 `writeDomainFileIf`(摘要按盘上字节)· 内容摘要唯一铸点 `contentDigest` · `NON_LOCAL_READ_DOMAINS` · 用户生命周期事件的 wire 型(新模块 `api/lifecycle-events`,十三个新导出)· 请求面「名 → 串」记录的带坐标读口 `readRequestStringRecord`;同批到期删码:一次性迁移 SS-M8(退役角色词,窗 2026-11-11 已关);删 `NON_PORTABLE_DOMAINS`;同批收紧:语料派生积木件 `deriveWireExpectation` 自守「skills 表示变换只许恒等」的护栏(直接调用由照派生变拒)· 调度店首写建的目录精确 0o700(此前随进程 umask);同批破坏:MCP http 条目的凭据引用 `transport.credentials`(只准入断言引用,`audience` = 连接器 id `ConnectorId`)· `transport.assertionHeader` 退役(墓碑 + 一次性迁移 SS-M13)· `authForm` / `entryKind` 删除 · `readMcpIdentityHeaders` 删除、请求面读器点名拒两把键 · 托管连接器授权地址的拼装与判官 · 运行时依赖加 `@sema-agent/primitives`;同批两件:钩子环境置空原因闭集 `HOOK_ENV_BLANK_REASONS` 加 `unset`(闭集增长)· 配置根读口每种坏法一个结局成文、`getVersion()` 与 `read()` 同一个版本(文件层被拒的树由抛变答数)
|
|
12
113
|
|
|
13
114
|
> 档位(按发版纪律):**major** —— 发版纪律「删除导出与键」(`readMcpIdentityHeaders`、`NON_PORTABLE_DOMAINS` 两只导出,`transport.assertionHeader` / `authForm` / `entryKind` 三把键)与「凡是能……让同一份配置解析出不同结果的改动」:盘上已有的 `config.d/projects.json` 此前被文件店忽略(只报一条 `unread-config-file`),自此被读 —— 同一份配置的 `effective.projects` 变了,读不进的文件自此拒(严读 / `loadLocalConfig` / 宽容读抛,`read()` 在文件层坏形时列进拒单);内容版本(`getVersion()` / `getEffective().version` / `read().version`)对同一组文件变一次;拒单里 `document` 的类型 `ConfigDocumentName` 联合多一员 `"projects"`;符合性语料的本地腿金样随改(`conformance/VERSION` 抬到本版);`getVersion()` 对文件层被拒的树由抛变答 `read()` 交的那个数;闭集 `HOOK_ENV_BLANK_REASONS` 加词 `unset`(对穷举消费方是破坏);包声明的 Node 下限 `engines.node` 由 `>=20.3.0` 抬到 `>=20.18.1`(新运行时依赖 `@sema-agent/primitives` 声明的下限,锁文件里的 7.68.3 即此值;低于它的 Node 在严格引擎检查 —— npm 的 `engine-strict` —— 下装不上本包)。
|
package/README.md
CHANGED
|
@@ -49,6 +49,15 @@ only (`node:crypto`, `node:fs`). The machine gate is `test/runtime-dependencies-
|
|
|
49
49
|
> zod 3, nested inside every zod-4 host). The move to zod 4 did not change what any schema accepts or produces —
|
|
50
50
|
> the conformance corpus reads byte-identically on both — only the wording of validation errors (see CHANGELOG 11.0.0).
|
|
51
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
|
+
|
|
52
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`)
|
|
53
62
|
|
|
54
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。
|
|
@@ -445,8 +454,10 @@ settings 单元读不进的成员**不是缺席**(`loosen` 可丢且要响,`tigh
|
|
|
445
454
|
下发 `EffectivePromptsWire = { schemaVersion: 2, artifact }`(`artifact` 带发布出处 `sourceRevision`,由服务席盖);哪一份给哪台 worker 只问
|
|
446
455
|
`promptArtifactFor(prompts, worker | null)`;场景差异只写在 overlay 的 `when.binding`(`{anyOf}` 或 `{noneOf}`,恰一张表)。本包只判结构与上界,语义交引擎 verify。
|
|
447
456
|
声明轴(`PromptBinding` / `PromptTextDeclaration` / `EffectivePrompts` …)与 v1 catalog 信封删除,零别名;`bindings` / `catalog` 键是墓碑。
|
|
448
|
-
-
|
|
449
|
-
|
|
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`)。
|
|
450
461
|
- **请求面 MCP 条目**:`isUsableWireName` / `readRequestMcpTransport` / `isContentOriginWord` 住本包(判据与原因句与服务端请求腿逐字同;29.0.0 起读器点名拒 `transport.assertionHeader` 与 `transport.credentials`,`issue.refusal` ∈ `MCP_REQUEST_KEY_REFUSALS`,`readMcpIdentityHeaders` 删除),
|
|
451
462
|
壳的发送前预检与服务端受理同答。申报名判官 `isUsableWireName` 另判首尾空白(坏名;不 trim、不规范化,内部空白照旧合法);`readRequestMcpTransport` 的 `env` / `headers`
|
|
452
463
|
只收纯数据的「名 → 串」记录(`Map` / `Set` / 类实例 / 自有 `__proto__` 成员不收,交出的是副本,`lost` 条目带 `member` / `fault` 机读位);两只回显描述器剥控制与双向字符、截 64 字,与服务端回显同口径。
|
package/conformance/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
30.0.0
|
|
@@ -73,7 +73,7 @@
|
|
|
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
|
|
@@ -79,13 +79,13 @@
|
|
|
79
79
|
"domain": "workers",
|
|
80
80
|
"file": "workers.json",
|
|
81
81
|
"kind": "unread-config-file",
|
|
82
|
-
"why": "
|
|
82
|
+
"why": "not-a-local-read-domain"
|
|
83
83
|
}
|
|
84
84
|
],
|
|
85
85
|
"metadata": {
|
|
86
86
|
"version": 3780573944953703,
|
|
87
87
|
"updatedAt": "1970-01-01T00:00:00.000Z"
|
|
88
88
|
},
|
|
89
|
-
"why": "workers
|
|
89
|
+
"why": "workers 不在本地读取集(not-a-local-read-domain):本机腿不读 config.d/workers.json(只报 unread-config-file),写闸判据只在 domains / wire 两腿上可观察"
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -79,13 +79,13 @@
|
|
|
79
79
|
"domain": "workers",
|
|
80
80
|
"file": "workers.json",
|
|
81
81
|
"kind": "unread-config-file",
|
|
82
|
-
"why": "
|
|
82
|
+
"why": "not-a-local-read-domain"
|
|
83
83
|
}
|
|
84
84
|
],
|
|
85
85
|
"metadata": {
|
|
86
86
|
"version": 3780573944953703,
|
|
87
87
|
"updatedAt": "1970-01-01T00:00:00.000Z"
|
|
88
88
|
},
|
|
89
|
-
"why": "workers
|
|
89
|
+
"why": "workers 不在本地读取集(not-a-local-read-domain):本机腿不读 config.d/workers.json(只报 unread-config-file),写闸判据只在 domains / wire 两腿上可观察"
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -79,13 +79,13 @@
|
|
|
79
79
|
"domain": "workers",
|
|
80
80
|
"file": "workers.json",
|
|
81
81
|
"kind": "unread-config-file",
|
|
82
|
-
"why": "
|
|
82
|
+
"why": "not-a-local-read-domain"
|
|
83
83
|
}
|
|
84
84
|
],
|
|
85
85
|
"metadata": {
|
|
86
86
|
"version": 3780573944953703,
|
|
87
87
|
"updatedAt": "1970-01-01T00:00:00.000Z"
|
|
88
88
|
},
|
|
89
|
-
"why": "workers
|
|
89
|
+
"why": "workers 不在本地读取集(not-a-local-read-domain):本机腿不读 config.d/workers.json(只报 unread-config-file),写闸判据只在 domains / wire 两腿上可观察"
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -79,13 +79,13 @@
|
|
|
79
79
|
"domain": "workers",
|
|
80
80
|
"file": "workers.json",
|
|
81
81
|
"kind": "unread-config-file",
|
|
82
|
-
"why": "
|
|
82
|
+
"why": "not-a-local-read-domain"
|
|
83
83
|
}
|
|
84
84
|
],
|
|
85
85
|
"metadata": {
|
|
86
86
|
"version": 3780573944953703,
|
|
87
87
|
"updatedAt": "1970-01-01T00:00:00.000Z"
|
|
88
88
|
},
|
|
89
|
-
"why": "workers
|
|
89
|
+
"why": "workers 不在本地读取集(not-a-local-read-domain):本机腿不读 config.d/workers.json(只报 unread-config-file),写闸判据只在 domains / wire 两腿上可观察"
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -79,13 +79,13 @@
|
|
|
79
79
|
"domain": "workers",
|
|
80
80
|
"file": "workers.json",
|
|
81
81
|
"kind": "unread-config-file",
|
|
82
|
-
"why": "
|
|
82
|
+
"why": "not-a-local-read-domain"
|
|
83
83
|
}
|
|
84
84
|
],
|
|
85
85
|
"metadata": {
|
|
86
86
|
"version": 3780573944953703,
|
|
87
87
|
"updatedAt": "1970-01-01T00:00:00.000Z"
|
|
88
88
|
},
|
|
89
|
-
"why": "workers
|
|
89
|
+
"why": "workers 不在本地读取集(not-a-local-read-domain):本机腿不读 config.d/workers.json(只报 unread-config-file),写闸判据只在 domains / wire 两腿上可观察"
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -79,13 +79,13 @@
|
|
|
79
79
|
"domain": "workers",
|
|
80
80
|
"file": "workers.json",
|
|
81
81
|
"kind": "unread-config-file",
|
|
82
|
-
"why": "
|
|
82
|
+
"why": "not-a-local-read-domain"
|
|
83
83
|
}
|
|
84
84
|
],
|
|
85
85
|
"metadata": {
|
|
86
86
|
"version": 3780573944953703,
|
|
87
87
|
"updatedAt": "1970-01-01T00:00:00.000Z"
|
|
88
88
|
},
|
|
89
|
-
"why": "workers
|
|
89
|
+
"why": "workers 不在本地读取集(not-a-local-read-domain):本机腿不读 config.d/workers.json(只报 unread-config-file),写闸判据只在 domains / wire 两腿上可观察"
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -79,13 +79,13 @@
|
|
|
79
79
|
"domain": "workers",
|
|
80
80
|
"file": "workers.json",
|
|
81
81
|
"kind": "unread-config-file",
|
|
82
|
-
"why": "
|
|
82
|
+
"why": "not-a-local-read-domain"
|
|
83
83
|
}
|
|
84
84
|
],
|
|
85
85
|
"metadata": {
|
|
86
86
|
"version": 3780573944953703,
|
|
87
87
|
"updatedAt": "1970-01-01T00:00:00.000Z"
|
|
88
88
|
},
|
|
89
|
-
"why": "workers
|
|
89
|
+
"why": "workers 不在本地读取集(not-a-local-read-domain):本机腿不读 config.d/workers.json(只报 unread-config-file),写闸判据只在 domains / wire 两腿上可观察"
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -79,13 +79,13 @@
|
|
|
79
79
|
"domain": "workers",
|
|
80
80
|
"file": "workers.json",
|
|
81
81
|
"kind": "unread-config-file",
|
|
82
|
-
"why": "
|
|
82
|
+
"why": "not-a-local-read-domain"
|
|
83
83
|
}
|
|
84
84
|
],
|
|
85
85
|
"metadata": {
|
|
86
86
|
"version": 3780573944953703,
|
|
87
87
|
"updatedAt": "1970-01-01T00:00:00.000Z"
|
|
88
88
|
},
|
|
89
|
-
"why": "workers
|
|
89
|
+
"why": "workers 不在本地读取集(not-a-local-read-domain):本机腿不读 config.d/workers.json(只报 unread-config-file),写闸判据只在 domains / wire 两腿上可观察"
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -79,13 +79,13 @@
|
|
|
79
79
|
"domain": "workers",
|
|
80
80
|
"file": "workers.json",
|
|
81
81
|
"kind": "unread-config-file",
|
|
82
|
-
"why": "
|
|
82
|
+
"why": "not-a-local-read-domain"
|
|
83
83
|
}
|
|
84
84
|
],
|
|
85
85
|
"metadata": {
|
|
86
86
|
"version": 3780573944953703,
|
|
87
87
|
"updatedAt": "1970-01-01T00:00:00.000Z"
|
|
88
88
|
},
|
|
89
|
-
"why": "workers
|
|
89
|
+
"why": "workers 不在本地读取集(not-a-local-read-domain):本机腿不读 config.d/workers.json(只报 unread-config-file),写闸判据只在 domains / wire 两腿上可观察"
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -79,13 +79,13 @@
|
|
|
79
79
|
"domain": "workers",
|
|
80
80
|
"file": "workers.json",
|
|
81
81
|
"kind": "unread-config-file",
|
|
82
|
-
"why": "
|
|
82
|
+
"why": "not-a-local-read-domain"
|
|
83
83
|
}
|
|
84
84
|
],
|
|
85
85
|
"metadata": {
|
|
86
86
|
"version": 3780573944953703,
|
|
87
87
|
"updatedAt": "1970-01-01T00:00:00.000Z"
|
|
88
88
|
},
|
|
89
|
-
"why": "workers
|
|
89
|
+
"why": "workers 不在本地读取集(not-a-local-read-domain):本机腿不读 config.d/workers.json(只报 unread-config-file),写闸判据只在 domains / wire 两腿上可观察"
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -79,13 +79,13 @@
|
|
|
79
79
|
"domain": "workers",
|
|
80
80
|
"file": "workers.json",
|
|
81
81
|
"kind": "unread-config-file",
|
|
82
|
-
"why": "
|
|
82
|
+
"why": "not-a-local-read-domain"
|
|
83
83
|
}
|
|
84
84
|
],
|
|
85
85
|
"metadata": {
|
|
86
86
|
"version": 3780573944953703,
|
|
87
87
|
"updatedAt": "1970-01-01T00:00:00.000Z"
|
|
88
88
|
},
|
|
89
|
-
"why": "workers
|
|
89
|
+
"why": "workers 不在本地读取集(not-a-local-read-domain):本机腿不读 config.d/workers.json(只报 unread-config-file),写闸判据只在 domains / wire 两腿上可观察"
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -79,13 +79,13 @@
|
|
|
79
79
|
"domain": "workers",
|
|
80
80
|
"file": "workers.json",
|
|
81
81
|
"kind": "unread-config-file",
|
|
82
|
-
"why": "
|
|
82
|
+
"why": "not-a-local-read-domain"
|
|
83
83
|
}
|
|
84
84
|
],
|
|
85
85
|
"metadata": {
|
|
86
86
|
"version": 3780573944953703,
|
|
87
87
|
"updatedAt": "1970-01-01T00:00:00.000Z"
|
|
88
88
|
},
|
|
89
|
-
"why": "workers
|
|
89
|
+
"why": "workers 不在本地读取集(not-a-local-read-domain):本机腿不读 config.d/workers.json(只报 unread-config-file),写闸判据只在 domains / wire 两腿上可观察"
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"contributor": "contract",
|
|
3
|
-
"claim": "13.x 每份 prompts 文档恒物化的空 `bindings: []`(占存量绝大多数)单独在场也是墓碑:读侧整域缺省 `{}` + 一条 domain-defaulted(
|
|
3
|
+
"claim": "13.x 每份 prompts 文档恒物化的空 `bindings: []`(占存量绝大多数)单独在场也是墓碑:读侧整域缺省 `{}` + 一条 domain-defaulted(错误句点名该键、退役版本与删键的出路),严写拒。把空表当合法缺省读进的消费方,会让一份没清理的旧文档悄悄读成「什么都没有」而不出声 —— 删掉它是存量文档持有方的活(没有任何一步替他改写),不是读者的。",
|
|
4
4
|
"firstRedOn": []
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"contributor": "cli",
|
|
3
|
-
"claim": "壳视角④:worker 的 env 值里有换行 / 回车 ⇒ 读侧**原样承运**(不折叠、不截断、不静默改写)。壳的 `/config show`
|
|
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`(
|
|
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
|
|
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
|
}
|
package/dist/config-fns.d.ts
CHANGED
|
@@ -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`),或是域但不在本地读取集里(`
|
|
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" | "
|
|
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 里,
|
package/dist/config-fns.js
CHANGED
|
@@ -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
|
|
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{
|
|
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:"
|
|
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{
|
|
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{
|
|
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: "
|
|
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)) {
|
package/dist/file-store.js
CHANGED
|
@@ -82,7 +82,8 @@ export class FileConfigStore {
|
|
|
82
82
|
* 闭集 —— 文件在、进程跑、限额还是 env 老值,**零告警**(「域缺席」与「文件不存在」在下游逐字同形)。
|
|
83
83
|
* 修法方向是**响亮,不是收紧**:未登记文件照旧不读(拒收会让一个无害的散落文件打死整个部署),但必须
|
|
84
84
|
* 说出来。两类分开报,因为处置不同:`not-a-domain` = 名字打错 / 消费方开了本包还不认识的域(要来本包
|
|
85
|
-
* 登记);`
|
|
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: "
|
|
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;
|
|
@@ -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-
|
|
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` — 删掉;今天的读法本就不让它生效(
|
|
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-
|
|
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` — 删掉;今天的读法本就不让它生效(
|
|
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-
|
|
36
|
-
*
|
|
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
|
-
}
|
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
|
|
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
|
-
|
|
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 两轴的键是墓碑
|
|
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。
|
package/docs/CONFORMANCE.md
CHANGED
|
@@ -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{
|
|
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` |
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
> **27.2.0** 的条目拒因码闭集尾插一只泛词 `config.model_route_refused`(服务端把一条目录条目算作可服务之前交引擎的线路判官、引擎拒了;加性,持穷举表的消费方编译红一次)在 §28。
|
|
27
27
|
> **28.0.0** 的闭集导出深冻结(对它们的原地改写由静默成功变抛 `TypeError`)与十五个导出的类型收窄成只读在 §29。
|
|
28
28
|
> **29.0.0** 的本地读取域集 `LOCAL_READ_DOMAINS`(便携域集 + `projects`,与便携域集拆成两只常量;文件店自此读 `config.d/projects.json`)、带条件的域文件写器 `writeDomainFileIf`、内容摘要铸点 `contentDigest` 与 `NON_PORTABLE_DOMAINS` 的删除在 §30;同版的用户生命周期事件 wire 型在 §31;请求面记录带坐标读口 `readRequestStringRecord`、派生积木件 `deriveWireExpectation` 自守护栏与调度店首写目录 0o700 在 §32;MCP http 条目的凭据引用(`transport.assertionHeader` 退役)在 §33;钩子环境置空原因 `unset` 与配置根读口的结局表(`getVersion()` 与 `read()` 同一个版本)在 §34。
|
|
29
|
+
> **30.0.0** 的一次性迁移 SS-M10 到期删码(闭集 `OneTimeMigrationId` 收窄、迁移步删、存量旧形写面拒读面缺省并点名)在 §35;同版读腿告警 `unread-config-file` 的原因词改名(`why` 的第二员换字面,含义不变)在 §36。
|
|
29
30
|
|
|
30
31
|
---
|
|
31
32
|
|
|
@@ -126,10 +127,10 @@
|
|
|
126
127
|
- 目录形:`npx @sema-agent/settings-schema migrate <config.d directory> [--check]`(同一只函数,目录当一个 scope;有 refused 一字不写、退出 1;
|
|
127
128
|
`--check` 有改动退出 3;目录里有条目却没有一份域文档 —— 填成了上一层 / 只有非域文件 —— 退出 2、stdout 空、stderr 点名目录;目录真空(零条目或只有 `.` 开头的条目)= noop 退出 0;
|
|
128
129
|
stdout 两行:结论行 `outcome=… written=…` + JSON 报告 `event: "stored_documents_migrated"`)。
|
|
129
|
-
- **登记表**(`ONE_TIME_MIGRATIONS` 是窗的唯一属主,各条的 `rewrites` / `removal` / `afterRemoval` 写在那里)
|
|
130
|
-
SS-
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
- **登记表**(`ONE_TIME_MIGRATIONS` 是窗的唯一属主,各条的 `rewrites` / `removal` / `afterRemoval` 写在那里)。今天还在的三条:
|
|
131
|
+
SS-M11 env 模型表决定 · SS-M12 workers 15.x 执行体行 · SS-M13 mcp 条目的两只惰性键与退役的断言头。(26.0.0 剩四条,29.0.0 窗关删了 SS-M8 退役角色词 —— 曾删 `roles.team` / `roles.synthesize`;
|
|
132
|
+
存量里还带这两个键的文档读写拒并点名,出路是手删或升级前用上一版跑一次迁移,见 §30。SS-M10 prompts 两轴 —— 曾删空的 `bindings: []`、对非空 `bindings` 与 `catalog` 出拒收据 ——
|
|
133
|
+
窗 2026-11-16 关后的第一个 major(30.0.0)删了:存量里还带这些键的 prompts 文档读写拒并点名,出路是手删键、从中心编辑器重新发布,或升级前用上一版跑一次迁移,见 §35。)
|
|
133
134
|
**26.0.0 窗关删码的八步**(存量旧形此后只剩各自的既有拒,拒句止于今天的位;出路是手写过去,或升级前用上一版跑一次迁移;调度店一步例外,见下):退役 runtime 域(带事实 ⇒
|
|
134
135
|
`RetiredDomainError`)· hosts 超界(名 > 63 ⇒ 条目丢;数组 > 1024 ⇒ `hosts` 整域缺省)· workers 6.x 行(写拒、读扣行)· 钥匙双设(条目丢)·
|
|
135
136
|
`atModelAllowlist`(`models` 整域缺省 / `rosters` 读不出)· URL fragment(每一席拒)· `models.default`(`models` 整域缺省)·
|
|
@@ -972,7 +973,7 @@ fleet 成员对中心公告的可达地址(`FLEET_ADVERTISE_ADDRESS`,中心往
|
|
|
972
973
|
|
|
973
974
|
## 30. 本地读取域集 `LOCAL_READ_DOMAINS` · 带条件的域文件写器 `writeDomainFileIf` · 内容摘要铸点 `contentDigest`(29.0.0 起,major)—— server、web-admin、cli、client-core、sdk、test 各自的读法
|
|
974
975
|
|
|
975
|
-
**两只常量,两个问题**:`PORTABLE_DOMAINS`(便携域集)答「哪些域随 bundle / 导出信封搬运」,`exportBundle` / `readBundle` / `writeBundle` 的默认集与运行期闸读它,值与含义一字不变;`LOCAL_READ_DOMAINS`(`./node`,本地读取域集)答「本地文件店读 `config.d/` 里的哪些域」,= 便携域集原序 + `projects`。此前两个问题共用一只常量:`projects` 是租户身份数据(不可搬运),却是单机部署自己的登记簿(该被本地读)。`FileConfigStore`(经 `loadLocalConfig`)里按「读」枚举的各处 —— 没人读的文件扫描 · 内容版本 · `updatedAt` · 严读与宽容读 · `read()` 的文档集 —— 读本地读取域集;`getDomain` 是逐域单读、不枚举。`workers` / `hosts` / `systems` / `entitlement` 仍不在其中:文件被 `unread-config-file{why:"
|
|
976
|
+
**两只常量,两个问题**:`PORTABLE_DOMAINS`(便携域集)答「哪些域随 bundle / 导出信封搬运」,`exportBundle` / `readBundle` / `writeBundle` 的默认集与运行期闸读它,值与含义一字不变;`LOCAL_READ_DOMAINS`(`./node`,本地读取域集)答「本地文件店读 `config.d/` 里的哪些域」,= 便携域集原序 + `projects`。此前两个问题共用一只常量:`projects` 是租户身份数据(不可搬运),却是单机部署自己的登记簿(该被本地读)。`FileConfigStore`(经 `loadLocalConfig`)里按「读」枚举的各处 —— 没人读的文件扫描 · 内容版本 · `updatedAt` · 严读与宽容读 · `read()` 的文档集 —— 读本地读取域集;`getDomain` 是逐域单读、不枚举。`workers` / `hosts` / `systems` / `entitlement` 仍不在其中:文件被 `unread-config-file{why:"not-a-local-read-domain"}` 点名(这只原因词在 29.0.x 里叫另一个名字,30.0.0 改名,见 §36),域取 schema 默认。
|
|
976
977
|
**读数变**(四处,档位句与 CHANGELOG 29.0.0 同写):① 盘上已有的 `config.d/projects.json` 自此被读 —— 合法的装进 `effective.projects`;读不进的自此拒:严读与 `loadLocalConfig` 抛、宽容读同抛(`projects` 是整域读不进即抛的域)—— 文件层坏形(空 / 纯空白 / 坏 JSON / 不是对象 / 读不出 / 过深)与登记簿判不过都是;`read()` 只把文件层坏形列进拒单(`document: "projects"`),登记簿判不过的照严读抛、不在拒单里;② 内容版本对同一组文件换一次数;③ `ConfigDocumentName` 联合多 `"projects"`;④ 符合性语料的本地腿金样随改(T3 改名 `T3-non-local-read-domains`,新导出 `NON_LOCAL_READ_DOMAINS`)。
|
|
977
978
|
**带条件的写器**:`writeDomainFileIf(root, domain, value, expected)` —— `expected` 是调用方读到时文件**盘上字节**的摘要(`contentDigest(Buffer)` 铸,`sha256:<64 位小写十六进制>`;每个字节都算,不经 UTF-8 解码)或 `null`(读到时文件不在);在锁文件(真正被写的文件旁的 `.<文件名>.lock`:普通域文件即 `config.d/.<域>.json.lock`,域文件是符号链接时在链接的真目标旁、指向同一真文件的两个根共用一把;独占创建,内容是持锁者的 pid)之下重读,相符才写。读文件时**读一次 `Buffer`**、对这一份字节算摘要并解析 `buffer.toString("utf8")` —— 摘要与解析来自同一份文本,不读第二遍(第二遍读会让「摘要对的是 A、解析的是 B」)。合法 UTF-8 的文件,文本的摘要与字节的摘要是同一个数;文件里有非法 UTF-8 字节时文本已不是那些字节,按文本算的预期摘要会答 `stale`(失败方向是多答 `stale`,不是漏判)。结果 `ConditionalWriteResult` 三态:`written`(`value` = 写进去的、`digest` = 新文件字节的摘要)· `stale`(不符:不写、字节不动;`current` = 现在的摘要,`null` = 文件已不在)· `locked`(`lock` = 锁路径:不写、不读文件;陈旧的锁不自动抢)。清锁失败从不顶替结果:写已落盘而锁删不掉时仍答 `written`,带 `lockLeft`(锁路径),此后每次调用答 `locked` 直到它被删。判不过的内容、非域的名字、拼法不对的 `expected`(`TypeError`)都先于锁拒。它只协调条件写者之间的并发 —— `writeDomainFile` / `writeBundle` / 目录迁移 / 手改不取锁。
|
|
978
979
|
**到期删码 SS-M8**(退役角色词;窗 2026-11-11 已关;只删这一步):登记表一行、改写步与闭集 `ONE_TIME_MIGRATION_IDS` 里的 `"SS-M8"` 删(`OneTimeMigrationId` 收窄),四个迁移入口不再改写 `models.roles` / `rosters[].roles` 里的 `team` / `synthesize`。存量旧形写面**整域拒**、读面**丢弃 / 缺省并点名**,不被读成角色:写面整域拒,句子止于 `role word team was retired in 12.0.0 — now no role reads it (core 7.49.0 removed the role and refuses the word) — delete the key from the stored document`;读面 —— 别的角色在 ⇒ 丢那一条(`entry-dropped`,坐标 `roles.team`),只剩旧词 ⇒ `models` 整域缺省(`domain-defaulted`),`rosters` 带旧词 ⇒ 该域读不出(抛);读面的告警经 `onWarning` / `FileConfigStore.read().warnings` 出声(不接告警通道的调用方没有信号,删码前也是这样);迁移与命令行 `migrate` 对它们零改动(`noop`)。出路:手删那两个键,或升级前用上一版(≤ 28.x)跑一次迁移。
|
|
@@ -1069,3 +1070,40 @@ fleet 成员对中心公告的可达地址(`FLEET_ADVERTISE_ADDRESS`,中心往
|
|
|
1069
1070
|
| cli / 桌面宿主 | http 钩子(若改调本导出)· 调 `getVersion()` 的地方 | 原因穷举补一臂;靠 `getVersion()` 抛来发现坏目录的,改读 `read()` 的 `kind` |
|
|
1070
1071
|
| web-admin / client-core / sdk | —— | 无读点〔推断〕 |
|
|
1071
1072
|
| test | 黑盒判据 | 见 `CHANGELOG.md` 29.0.0「同批两件」G18 / G19 |
|
|
1073
|
+
|
|
1074
|
+
## 35. 到期删码一次性迁移 SS-M10(prompts 两轴 `bindings` / `catalog`;窗 2026-11-16 已关,30.0.0 起,major)—— server、web-admin、cli、client-core、sdk、test 各自的读法
|
|
1075
|
+
|
|
1076
|
+
**删了什么**:登记表 `ONE_TIME_MIGRATIONS` 的 SS-M10 一行、改写步与闭集 `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)留下,拒句的迁移指路去掉,止于今天的位与出路。
|
|
1077
|
+
**存量旧形现在答什么**:不被读成值 —— 写面拒、读面整域缺省并点名;迁移入口与命令行不再替它改写,也不再对它出拒收据(`migrate` / `--check` 与 `migrateConfigDocuments` 对只带这些键的文档答 `noop`、命令行 rc 0;此前非空 `bindings` / `catalog` 答 `refused`、rc 1,只带空 `bindings: []` 的 `--check` 答 `pending`、rc 3 且真跑删键写盘;目录里同时有别的可迁文档时,命令行照迁那几份、不报这份 prompts 文档)。写面(`parseDomain` / `PromptsConfig` / `validateDomain` / `writeDomainFile`)整域拒,句子止于 `prompts.bindings was retired in 14.0.0 — now the center artifact (prompts.artifact for every worker, prompts.workers.<name> for one worker) — delete the key from the stored document (the old declarations and the v1 catalog cannot be converted: republish the prompts from the center's editor)`(`catalog` 同形;不再带 `data stored before 14.0.0: run the one-time migration SS-M10 …`);读面(`buildEffective` / `FileConfigStore.read()`)`prompts` 整域缺省 `{}`(不下发中心层 = 引擎内置提示词)+ 一条 `domain-defaulted`,句子同上;旧键旁边的新形(`artifact` / `workers`)不被半读 —— 升级前没清掉旧键的文档连同新形整域读不进(此前:`{ bindings: [], artifact }` 经迁移删掉空键之后新形读得进、中心层下发 `artifact`;自此整域缺省、不再下发)。读面的告警经 `onWarning` / `read().warnings` 出声 —— 不接告警通道的调用方拿到缺省的 `prompts`、没有信号(与所有整域缺省同一律;删码前读面也是这样);没接告警通道、只靠迁移命令判就绪的部署,升级后对旧键迁移面和读面都不出声(写面只在有人写这份文档时才拒)。冻结 effective(发布快照 / 回滚整份快照 / 引擎 last-known-good 文件)里的 `prompts: { bindings: [] }`:此前先过 `migrateEffectiveSnapshot` 会被删成 `{}`,自此原样;线上读口 `readEffectiveWire` 把 `prompts` 原样承运(它的线上形由消费方判),消费方的 `EffectivePromptsWire` 判官响亮拒(缺 `schemaVersion: 2`)。
|
|
1078
|
+
**升级前后的自查**:升级前用上一版(≤ 29.x)`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` 指向它里面坏形的键),目录里别的文档被拒(例如 `mcp.json` 里另一把退役键)同样让整次一字不写;这时 `wouldApply` 里也可能同时出现 `dropped-inert` 项,**它不会被写**;没有 `document` 为 `"prompts"` 的项 = 目录里没有旧键;存储层的草稿 / 快照 / 回滚行逐份调上一版的 `migrateStoredDocuments` / `migrateEffectiveSnapshot`,改过的写回 —— **要在依赖还停在 29.x 的环境里调**:依赖已抬到 30 的项目里 import 到的是 30 的函数,对 prompts 旧形零收据、原样交回,什么都不改。升级后对每份 prompts 存储文档跑 `validateDomain("prompts", 文档)` —— 答 `ok: false` 带上面那句 = 还带着旧键(`parseDomainLoud` 对同一份文档抛同一句,不答 `ok`)。出路:删键;非空 `bindings` 与 `catalog` 在本包里转不成 artifact(声明要经中心的卡编译器编成 overlay,catalog 的 digest 是引擎铸的),要中心层就从中心的编辑器重新发布(本地 `config.d/prompts.json` 里的 `bindings` 引擎从未读过,删键即可)。
|
|
1079
|
+
**档位依据**:发版纪律「删除导出与键」(闭集成员 `"SS-M10"` 删除,对它穷举的读者编译红)与「凡是能……让同一份配置解析出不同结果的改动」(迁移入口对 prompts 旧形由改写 / `refused` 变原样零收据)= major;导出名集不变。
|
|
1080
|
+
|
|
1081
|
+
**谁受伤**:窗内没清理、存储文档里还带 `bindings` / `catalog` 的部署与存储层(本地 `config.d/prompts.json`、中心的草稿 / 发布快照 / 回滚历史行):读写拒、读面该域缺省;拿冻结 effective 回滚 / 重放的消费方(见上);靠迁移入口的收据判「这份存量要不要处理」的调用方(对 prompts 旧形不再出收据);对 `OneTimeMigrationId` 穷举的代码(删一臂)。**补偿**:升级前用上一版跑一次迁移;或删键 / 重新发布;升级后 `validateDomain("prompts", …)` 自查。
|
|
1082
|
+
|
|
1083
|
+
| 消费方 | 读点 | 动作 |
|
|
1084
|
+
|---|---|---|
|
|
1085
|
+
| server | 本地配置腿读 `config.d`(`FileConfigStore`)· 配置根上的 SS-M11 迁移(`migrateEnvModelsDecision`) | 零代码改动:集成树的 src / test 里没有对 `OneTimeMigrationId` / `ONE_TIME_MIGRATION_IDS` 穷举、也没有点名 SS-M10 的地方(它读 SS-M11 收据的 `migration` 字段的那一处不受影响);本地 `config.d/prompts.json` 带旧键的部署按「升级前后的自查」清一次 |
|
|
1086
|
+
| web-admin | ① 模块加载时读登记表 SS-M10 那一行的 `introducedIn` 当「prompts wire v2 的起始大版本」(找不到那一行 ⇒ 响亮一行,并对所有拉取方都不下发 `prompts`)· ② 类型为 `OneTimeMigrationId` 的常量 `"SS-M10"`(认旧文档的那一处)· ③ 草稿 / 发布快照 / 回滚历史的存储层调 `migrateStoredDocuments` / `migrateEffectiveSnapshot` 的地方〔以上取自本机 web-admin 工作树的 grep,未跑;③ 是推断〕 | 请托的读法(管理面的排期,本包不验证管理面行为):① 起始大版本是历史事实(14),写成管理面自己的常量,不再从登记表现读 —— 不改则删码后 `prompts` 对所有拉取方都不下发(fail-closed 方向);② 删常量与点名 SS-M10 的分支(tsc 红即通知);③ 升级前用上一版把各层存量清一次;靠 SS-M10 收据判「要不要写回」的路径自此对 prompts 旧形不出收据 |
|
|
1087
|
+
| cli | 壳经 `migrateConfigDocuments` / `migrateStoredDocuments` 只对 `models` 文档调迁移链(本地模型池) | 零代码改动(SS-M10 只认 prompts 域形,对 models 文档恒等) |
|
|
1088
|
+
| client-core | —— | 无读点(src / test grep 零命中) |
|
|
1089
|
+
| sdk | 契约套件(读本包符合性语料) | 语料随包同版:c78 / c81 / c82 的金样不动(拒仍在),散文随改 |
|
|
1090
|
+
| test | 黑盒判据 | 见 `CHANGELOG.md` 30.0.0「黑盒判据」 |
|
|
1091
|
+
|
|
1092
|
+
## 36. 读腿告警 `unread-config-file` 的原因词改名(`non-portable-domain` → `not-a-local-read-domain`;30.0.0 起,major)—— server、web-admin、cli、client-core、sdk、test 各自的读法
|
|
1093
|
+
|
|
1094
|
+
**改了什么**:告警 `{ kind: "unread-config-file"; file; domain?; why }` 的 `why` 闭集由 `"not-a-domain" | "non-portable-domain"` 变成 `"not-a-domain" | "not-a-local-read-domain"`。只换第二员的字面,含义与触发条件一字不变:`config.d/` 里的 `<名>.json`,名字是域、但不在本地读取域集 `LOCAL_READ_DOMAINS` 里(今天是 `workers` / `hosts` / `systems` / `entitlement`;`projects` 在读取集里、被读,不报)。名字不是域的仍是 `not-a-domain`。铸点是 `FileConfigStore` 的「没人读的文件」扫描(`getEffective` 的 `onWarning` · `read()` 的 `warnings` · `loadLocalConfig` 的 `warnings` 同一只)与一致性套件本地腿的派生期望;符合性语料 c57 – c68 的本地腿金样随改。零别名、零双读:旧词不再被铸,型里没有它。
|
|
1095
|
+
**为什么改**:29.0.0 拆出本地读取域集之后,判据是「不在本地读取集」,旧词却说「不便携」(`projects` 不便携、却被读)。搬运义的名字不动(`PORTABLE_DOMAINS` / `NON_PORTABLE_DOMAIN_REASONS`:为什么这个域不随 bundle 搬运,词义与判据一致)。
|
|
1096
|
+
**持久面**:无 —— 告警是读口的返回值与 `onWarning` 的实参,本包不把它写进存储文档、迁移收据或拒单;落盘的只有随包语料的金样。消费方把它写进自己的审计 / 日志流时,那条流里的存量行是旧词、新写的行是新词(按 `why` 字面聚合或设告警规则的,两个字面都认一段时间;本包不提供别名)。
|
|
1097
|
+
**档位依据**:发版纪律「闭集成员改名 / 删除」:`EffectiveReadWarning` 的 `unread-config-file` 臂上,旧词不可赋、对 `why` 穷举或按字面比较它的读者编译红 / 判断落空 = major;导出名集不变。
|
|
1098
|
+
**升级法**:**换字面** —— 旧词换成 `not-a-local-read-domain`(穷举、字面比较、自带一份 `why` 联合型拷贝的都一样);只显示 `why`、不判它的代码零动作。
|
|
1099
|
+
|
|
1100
|
+
**谁受伤**:对 `why` 穷举或按字面比较旧词的代码(编译红 / 判断落空一次);按 `why` 字面聚合、设告警规则的日志与审计流(存量行旧词、新写行新词);读本包语料、自己铸这条告警的读腿(c57 – c68 的本地腿金样换字)。**补偿**:换字面;语料随包同版。
|
|
1101
|
+
|
|
1102
|
+
| 消费方 | 读点 | 动作 |
|
|
1103
|
+
|---|---|---|
|
|
1104
|
+
| server | web-admin 客户端折叠读腿告警的那一处:自带一份 `why` 的联合型(拷贝了旧词)、把 `why` 原样写进 `config_unread_file` 日志行;两只测试夹具里的旧词字面〔取自本机集成树的 grep,未跑〕 | 换字面:联合型与夹具里的旧词换新词(型拷贝换字后 tsc 即对上);日志行的 `why` 自此是新词,按旧字面设告警规则的同换 |
|
|
1105
|
+
| web-admin | 一条自有语料 case 的 `meta.json` 散文里点名 `unread-config-file{non-portable-domain}`(文字,不参与比对)〔取自本机工作树的 grep,未跑〕 | 改文字(换成 `not-a-local-read-domain`);该 case 若挂本包语料的本地腿比对,金样随包更新 |
|
|
1106
|
+
| cli | 零读点(src / test grep 零命中) | 零代码改动 |
|
|
1107
|
+
| client-core | 零读点 | 零代码改动 |
|
|
1108
|
+
| sdk | 契约套件读本包符合性语料(c57 – c68 的本地腿金样换字);源码 grep 零命中 | 语料随包同版;套件里若有自己铸这条告警的适配器,同换字面 |
|
|
1109
|
+
| test | 黑盒判据 | 见 `CHANGELOG.md` 30.0.0「黑盒判据」 |
|
package/llms-full.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
llms-full.txt — 自包含全文 · 消费方(使用者)视角 · @sema-agent/settings-schema
|
|
3
|
-
重写日期: 2026-11-
|
|
3
|
+
重写日期: 2026-11-17 | 包版本: 30.0.0
|
|
4
4
|
生成方式: 无生成脚本——按当前树 src/*.ts 导出面 + package.json + README/CHANGELOG 手写事实版。
|
|
5
5
|
证据约定: 每条"它怎么工作"的断言附 (文件: 符号) 坐标,刻意不用行号(行号逐版腐烂;符号名由
|
|
6
6
|
typecheck 与 test/package-surface.test.ts、test/docs-hygiene.test.ts 等常驻门钉住)。无证据推断显式标【推断】。
|
|
@@ -148,7 +148,7 @@ registry:公网 npmjs,无需私有 registry 配置。
|
|
|
148
148
|
· projects:项目身份登记簿(`ProjectRegistration`,`PROJECT_ID_REGEX` 宽读严写;租户身份数据,不随 bundle 搬运;29.0.0 起本地文件店读 `config.d/projects.json`〔`LOCAL_READ_DOMAINS`〕)。25.1.0 起登记多一个可选键 `contentAttestedAt`(RFC 3339 时刻,与 `archivedAt` 同一只判官;
|
|
149
149
|
中心写口在判过 `goal` / `notes` / `contextItems` 的写之后盖的「内容证明」章,读方只问在不在,缺席 = 旧登记 / 没经过带章写口;写角色 publisher;PATCH 形不收;(src/types.ts: ProjectRegistration, ProjectRegistrationPatch))。
|
|
150
150
|
· prompts(14.0.0 单轴):只装引擎当期 schema 的中心 artifact。存储 `PromptsConfig = { artifact?, workers? }`(artifact 的身份
|
|
151
|
-
`{payload, artifactDigest}`,`workers.<名>` 整份取代 scope 那份;`bindings` / `catalog`
|
|
151
|
+
`{payload, artifactDigest}`,`workers.<名>` 整份取代 scope 那份;`bindings` / `catalog` 是墓碑,存量旧键写面拒、读面整域缺省并点名、没有迁移替它改写〔SS-M10 窗关删码;出路:删键,或从中心编辑器重新发布〕);下发 `EffectivePromptsWire =
|
|
152
152
|
{ schemaVersion: 2, artifact }`;唯一选择读法 `promptArtifactFor(prompts, worker | null)`。v3 结构镜像 `PromptArtifact` / `PublishedPromptArtifact` /
|
|
153
153
|
`PromptArtifactPayload`(schemaVersion 3)/ `PromptOverlay`(无 `scope`)/ `PromptOverlayWhen` / `PromptBindingCondition`(`{anyOf}` 或 `{noneOf}` 恰一表)/
|
|
154
154
|
`PromptArtifactRequires` / `PromptArtifactEvidence`;上界镜像 `PROMPT_ARTIFACT_LIMITS`(引擎七键)、`PROMPT_BINDING_MAX_CHARS` / `PROMPT_BINDING_LIST_MAX`。
|
package/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
llms.txt — 消费方(使用者)视角索引 · @sema-agent/settings-schema
|
|
3
|
-
重写日期: 2026-11-
|
|
3
|
+
重写日期: 2026-11-17 | 包版本: 30.0.0
|
|
4
4
|
生成方式: 无生成脚本——按当前树的 src/*.ts 导出面 + package.json + README/CHANGELOG 手写事实版;
|
|
5
5
|
每条断言附证据坐标(文件:符号),刻意不用行号(行号随每版腐烂,符号名由 typecheck/test 钉住)。
|
|
6
6
|
刷新触发: package.json 版号变更(test/docs-hygiene.test.ts D 组钉「包版本:」与 package.json 相等、
|
|
@@ -147,7 +147,7 @@ llms.txt — 消费方(使用者)视角索引 · @sema-agent/settings-schema
|
|
|
147
147
|
`stripControlAndBidi(text)` · `hasControlOrBidi(text)`;外来串落成一行(拒句 / 告警 / 日志 / 屏上)前剥的唯一一份,C1 与 U+2028 / U+2029 不在集里;
|
|
148
148
|
是本包的回显策略(不是引擎双向码点表的镜像),请求面描述器与消费方都读它,禁自存字符类。
|
|
149
149
|
- **prompts 域单轴**(14.0.0):只装中心 artifact(存储 `PromptsConfig = { artifact?, workers? }` / 下发 `EffectivePromptsWire = { schemaVersion: 2, artifact }` /
|
|
150
|
-
唯一选择读法 `promptArtifactFor`);本包镜像 artifact v3 的结构与上界,语义交引擎 verify;13.x
|
|
150
|
+
唯一选择读法 `promptArtifactFor`);本包镜像 artifact v3 的结构与上界,语义交引擎 verify;13.x 两轴是墓碑,存量旧键写面拒、读面整域缺省并点名、没有迁移替它改写(SS-M10 窗关删码;出路:删键,或从中心编辑器重新发布)。
|
|
151
151
|
- **界面语言设置片段**(13.0.0):`UI_LANGUAGE_SETTING`(`semaUiLanguage`,`en` / `zh`,类 `ui`,用户设置)+ `readUiLanguage`(词表外 `ok:false`,不猜)。
|
|
152
152
|
(src/ui-language.ts)
|
|
153
153
|
- **fleet 契约**(drain / 实例发现 / 派发策略 / 配额租约 / 用量上报;6.1.0 起重启信号 `RestartSignal` 定义一次,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/settings-schema",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "30.0.0",
|
|
4
4
|
"description": "Sema settings schema — pure config contract (zod domains + effective-config + roster resolution + ref-integrity + remoteExec) shared by sema-web-admin, sema-server, and the TOC desktop/CLI. One source of truth. (Renamed at 1.0.0 from @sema-agent/registry-core — name and docs only, no behavior change; note the range moves 0.19.0 -> 1.0.0, so a dependency must become ^1.0.0. The old names @sema-agent/registry-core <=0.19.0 and @sema-ai/registry-core remain published, frozen, for migration.)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "BUSL-1.1",
|