@sema-agent/settings-schema 25.0.0 → 26.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/CHANGELOG.md +359 -0
  2. package/README.md +46 -31
  3. package/conformance/VERSION +1 -1
  4. package/conformance/cases/c27-hosts-array-1025/meta.json +1 -1
  5. package/conformance/cases/c48-s935-model-headers-transported/expected.json +18 -68
  6. package/conformance/cases/c48-s935-model-headers-transported/meta.json +1 -1
  7. package/conformance/cases/c67-s784-retired-field-loud/meta.json +1 -1
  8. package/conformance/cases/c77-prompts-center-artifact-carried/expected.json +5 -5
  9. package/conformance/cases/c77-prompts-center-artifact-carried/input.json +2 -2
  10. package/conformance/cases/c79-prompts-bad-worker-artifact-not-salvaged/expected.json +1 -1
  11. package/conformance/cases/c79-prompts-bad-worker-artifact-not-salvaged/input.json +3 -3
  12. package/conformance/cases/c80-prompts-wire-v2-verbatim/expected.json +1 -1
  13. package/conformance/cases/c80-prompts-wire-v2-verbatim/input.json +1 -1
  14. package/conformance/cases/c82-prompts-v1-catalog-refused/expected.json +1 -1
  15. package/conformance/cases/c82-prompts-v1-catalog-refused/input.json +1 -1
  16. package/conformance/cases/c83-prompts-bad-overlay-not-salvaged/expected.json +1 -1
  17. package/conformance/cases/c83-prompts-bad-overlay-not-salvaged/input.json +1 -1
  18. package/conformance/cases/c88-projects-content-attestation-carried/expected.json +185 -0
  19. package/conformance/cases/c88-projects-content-attestation-carried/input.json +59 -0
  20. package/conformance/cases/c88-projects-content-attestation-carried/meta.json +6 -0
  21. package/conformance/cases/c89-projects-content-attestation-malformed/expected.json +104 -0
  22. package/conformance/cases/c89-projects-content-attestation-malformed/input.json +38 -0
  23. package/conformance/cases/c89-projects-content-attestation-malformed/meta.json +6 -0
  24. package/dist/cli.d.ts +7 -7
  25. package/dist/cli.js +11 -19
  26. package/dist/config-dir-io.js +3 -14
  27. package/dist/config-dir-migration.d.ts +1 -4
  28. package/dist/config-dir-migration.js +16 -22
  29. package/dist/config-document-refusal.d.ts +2 -3
  30. package/dist/config-fns.d.ts +3 -4
  31. package/dist/config-fns.js +9 -7
  32. package/dist/conformance/run.js +89 -29
  33. package/dist/conformance/types.d.ts +65 -39
  34. package/dist/execution-lane-index.d.ts +8 -19
  35. package/dist/execution-lane-index.js +6 -27
  36. package/dist/file-store.js +2 -3
  37. package/dist/fleet.d.ts +10 -47
  38. package/dist/fleet.js +13 -40
  39. package/dist/fs-failure.d.ts +5 -10
  40. package/dist/fs-failure.js +4 -8
  41. package/dist/hooks.d.ts +8 -6
  42. package/dist/hooks.js +7 -4
  43. package/dist/migration-receipt.d.ts +12 -14
  44. package/dist/migration-receipt.js +5 -7
  45. package/dist/node.js +1 -1
  46. package/dist/one-time-migrations.d.ts +9 -24
  47. package/dist/one-time-migrations.js +30 -796
  48. package/dist/remote-exec.js +2 -3
  49. package/dist/retired-envs.js +2 -0
  50. package/dist/retired-form.d.ts +12 -11
  51. package/dist/retired-form.js +12 -8
  52. package/dist/sandbox-git.d.ts +1 -1
  53. package/dist/sandbox-git.js +3 -3
  54. package/dist/scheduler-lifetime.d.ts +1 -1
  55. package/dist/scheduler-lifetime.js +1 -1
  56. package/dist/scheduler-store.d.ts +4 -29
  57. package/dist/scheduler-store.js +21 -14
  58. package/dist/types.d.ts +18 -21
  59. package/dist/types.js +81 -112
  60. package/dist/web-admin-credential.d.ts +2 -2
  61. package/dist/web-admin-credential.js +4 -4
  62. package/dist/worker-row-verdict.d.ts +1 -1
  63. package/dist/worker-row-verdict.js +1 -1
  64. package/dist/workers-rows.d.ts +2 -2
  65. package/dist/workers-rows.js +2 -2
  66. package/dist/zod-unwrap.d.ts +1 -1
  67. package/dist/zod-unwrap.js +1 -1
  68. package/docs/API-SURFACE.md +4 -11
  69. package/docs/CONFORMANCE.md +25 -13
  70. package/docs/CONSUMER-INTEGRATION.md +78 -24
  71. package/llms-full.txt +25 -24
  72. package/llms.txt +19 -13
  73. package/package.json +1 -1
  74. package/dist/runtime-lift-targets.d.ts +0 -7
  75. package/dist/runtime-lift-targets.js +0 -7
  76. package/dist/scheduler-store-migration.d.ts +0 -14
  77. package/dist/scheduler-store-migration.js +0 -14
@@ -0,0 +1,38 @@
1
+ {
2
+ "meta": {
3
+ "version": 18,
4
+ "updatedAt": "2026-11-09T00:00:00.000Z"
5
+ },
6
+ "domains": {
7
+ "projects": {
8
+ "projects": {
9
+ "01890a5d-ac96-774b-bcce-b302099a8101": {
10
+ "displayName": "stamped",
11
+ "gitRemotes": [
12
+ "example.com/acme/stamped"
13
+ ],
14
+ "defaultScopes": [
15
+ "proj"
16
+ ],
17
+ "registeredBy": "alice",
18
+ "registeredAt": "2026-10-01T00:00:00.000Z",
19
+ "goal": "ship the project object",
20
+ "contentAttestedAt": "2026-11-09T01:02:03Z"
21
+ },
22
+ "01890a5d-ac96-774b-bcce-b302099a8102": {
23
+ "displayName": "bad-stamp",
24
+ "gitRemotes": [
25
+ "example.com/acme/bad"
26
+ ],
27
+ "defaultScopes": [
28
+ "proj"
29
+ ],
30
+ "registeredBy": "alice",
31
+ "registeredAt": "2026-10-01T00:00:00.000Z",
32
+ "goal": "stamp is not a time",
33
+ "contentAttestedAt": "yesterday"
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "contributor": "contract",
3
+ "claim": "内容证明键形坏(\"yesterday\",不是 RFC 3339 date-time)的登记:读腿把那一条丢掉(entry-dropped,路径点到该登记),带合法章的那条照常在;严写腿整份拒。打的是两种读法分歧:章按 registeredAt 的「非空串」形收下(\"yesterday\" 读成「在场」,下游把没经过写口的内容当已证明)/ 坏章被静默剥掉而登记还在(读方看见一条「没有章」的登记,分不出是存量还是坏写)。",
4
+ "firstRedOn": [],
5
+ "note": "firstRedOn 为空:historical 阶梯(≤ 2.1.0)不覆盖 25.1.0 的新键;对 25.0.0 这一条读腿同样会丢这条登记(未知键),但原因不同,那一版不在入库的真跑证据里。"
6
+ }
package/dist/cli.d.ts CHANGED
@@ -1,21 +1,21 @@
1
1
  /**
2
2
  * `settings-schema` 命令行的核心(11.0.0)—— 子命令只有一个:`migrate <config.d 目录> [--check]`,即一次性迁移
3
3
  * `migrateStoredDocuments`(`./one-time-migrations`)的目录形(本地 config.d / 离线文件用;web-admin 在它起服时直接调同一只函数)。
4
- * 目录形的语义(读目录 → 迁 → 整域终判 → 原子写 → 删 retired 域文件)只有一处实现:`migrateConfigDirectory`(`./config-dir-migration`,`./node` 导出,引擎起服调同一只);
4
+ * 目录形的语义(读目录 → 迁 → 整域终判 → 原子写)只有一处实现:`migrateConfigDirectory`(`./config-dir-migration`,`./node` 导出,引擎起服调同一只);
5
5
  * 本模块是它的**渲染器**:把它的结果闭集渲染成退出码、报告行与 stderr 句子。命令行的覆盖面是全部配置域、retired 域与 `remote-exec.json`。
6
- * 目录被当作**一个 scope 的全集**(`coverage: "scope"`):目录里没有的域文件就是从未设过。
6
+ * 目录里没有的域文件不读、不建(26.0.0 起没有一步新建文档)。
7
7
  *
8
8
  * 本模块不碰 `node:fs`:读写文件由入口 `bin/settings-schema.mjs` 注入(真绑定是 `./config-dir-io` 的 `nodeConfigDirectoryIo`,写盘用的是 `./atomic-write` 那一只原子写器 —— 写法与文件模式在那里一处定),所以测试可以直接驱动它。
9
9
  * 不进主桶 —— 它是 bin 的实现,不是契约面。
10
10
  *
11
11
  * 读哪些文件:目录里 `<名>.json`,名是配置域或 retired 域(`runtime`)—— 便携与否不论(离线的 `workers.json` 一样迁)—— 以及 `remote-exec.json`
12
- * (一次性迁移 SS-M7 的座位走查也走它的两个端点);别的文件(隐藏文件、不认识的名、非 `.json`)不读不动。
12
+ * (`config.d` 能放的文档,照收照判);别的文件(隐藏文件、不认识的名、非 `.json`)不读不动。
13
13
  *
14
14
  * 零域文档分两形:**有条目却没有域文档**(任何非 `.` 开头的条目 —— 子目录、说明文件、不认识的名)⇒ 退出 2;**目录真空**(零条目,或只有以 `.` 开头的条目)⇒ 照常走判定,
15
15
  * 零收据 = noop 退出 0 —— 新部署的空 `config.d` 是合法态,「没有东西可迁」不是「指错目录」(搬空之后再跑同一目录也因此幂等)。
16
16
  *
17
17
  * 退出码:0 = 已写回 / 无事可做(目录里有域文档只是没有要改的,或目录真空);1 = 有迁不了的坐标(收据 `refused`)**或**要写回的域文档整域读不进(整域终判,见 `migrateConfigDirectory`),**一字不写**;
18
- * 2 = 用法错,或**环境错**(读目录 / 读文件 / 写盘 / 删文件的 I/O 错:权限、磁盘、悬空符号链接 …;stdout 空、stderr 一行点名路径与 errno,不打栈;句子按落点分句、
18
+ * 2 = 用法错,或**环境错**(读目录 / 读文件 / 写盘的 I/O 错:权限、磁盘、悬空符号链接 …;stdout 空、stderr 一行点名路径与 errno,不打栈;句子按落点分句、
19
19
  * 一律出自文件系统失败句的唯一铸点 `./fs-failure` —— 例:目录建不出文件 ⇒ 点名目录、目标换不掉 ⇒ 点名文件,句尾是对应出路)——
20
20
  * rc 1 是「拒迁」的约定码,不许被一个权限错冒充),或覆盖面内某份文档(域文档或 `remote-exec.json`)是坏文件(空 / 纯空白 / 坏 JSON / 不是 JSON 对象 —— 与 `FileConfigStore` / `loadRemoteExec` 同一只判、同一句),**或目录里有条目却没有一个是域文档**
21
21
  * (多半是填错了目录:要的是 `config.d` 目录本身;`<目录>/config.d` 在场时句子直接点它)(此时 stdout 为空);3 = `--check` 且会有改动、整域判得过(不写)。`--check` 与真跑过同一只判定,只在
@@ -25,8 +25,8 @@
25
25
  * 退出码 0 / 1 / 3 时 stdout 恰两行:第 1 行 = **唯一结论行** `outcome=<refused|applied|noop|pending> written=<true|false>`;第 2 行 = JSON 报告
26
26
  * (`event: "stored_documents_migrated"`,逐条收据只点名坐标与处置、不带值),同带 `outcome` / `written`。`written` 由 `outcome` 派生
27
27
  * (只有 `applied` 写盘)。**键名带时态**:`written=true` 才有 `applied`;没写(refused / noop / pending)时是 `wouldApply`。
28
- * 结论行在**写盘成功之后**才出(写盘抛错 ⇒ 没有 `outcome=applied`)。写盘次序:先写改过 / 新建的文件,最后删被移除的 retired 域文件 ——
29
- * 中途断掉再跑一次,迁移照样恒等收尾(已搬过去的值在新位上,旧文件里同名键按「新位赢」丢弃)。
28
+ * 结论行在**写盘成功之后**才出(写盘抛错 ⇒ 没有 `outcome=applied`)。只写改过的文件,从不删文件 ——
29
+ * 中途断掉再跑一次,迁移照样恒等收尾(写过的文件已是新形,再迁零改动)。
30
30
  */
31
31
  import { type ConfigDirectoryIo } from "./config-dir-migration.js";
32
32
  /** 入口注入的 I/O(核心不碰 node:fs):目录迁移的四个口加 stdout / stderr。入口注入的写盘是 `./atomic-write` 的那一只(经 `./config-dir-io`)。 */
@@ -35,5 +35,5 @@ export interface SettingsSchemaCliIo extends ConfigDirectoryIo {
35
35
  stderr(text: string): void;
36
36
  }
37
37
  /** 命令行的覆盖面:全部配置域、retired 域(便携与否不论 —— 离线的 `workers.json` 一样迁)与 `remote-exec.json`。 */
38
- export declare const COVERED_DOCUMENTS: ("remote-exec" | "models" | "rosters" | "scenarios" | "skills" | "execution" | "plugins" | "systems" | "limits" | "runtime" | "workers" | "hosts" | "projects" | "mcp" | "collab" | "governance" | "entitlement" | "prompts" | "a2a")[];
38
+ export declare const COVERED_DOCUMENTS: ("models" | "rosters" | "scenarios" | "skills" | "execution" | "plugins" | "systems" | "limits" | "runtime" | "workers" | "hosts" | "projects" | "mcp" | "collab" | "governance" | "entitlement" | "prompts" | "a2a" | "remote-exec")[];
39
39
  export declare function runSettingsSchemaCli(argv: readonly string[], io: SettingsSchemaCliIo): Promise<number>;
package/dist/cli.js CHANGED
@@ -1,21 +1,21 @@
1
1
  /**
2
2
  * `settings-schema` 命令行的核心(11.0.0)—— 子命令只有一个:`migrate <config.d 目录> [--check]`,即一次性迁移
3
3
  * `migrateStoredDocuments`(`./one-time-migrations`)的目录形(本地 config.d / 离线文件用;web-admin 在它起服时直接调同一只函数)。
4
- * 目录形的语义(读目录 → 迁 → 整域终判 → 原子写 → 删 retired 域文件)只有一处实现:`migrateConfigDirectory`(`./config-dir-migration`,`./node` 导出,引擎起服调同一只);
4
+ * 目录形的语义(读目录 → 迁 → 整域终判 → 原子写)只有一处实现:`migrateConfigDirectory`(`./config-dir-migration`,`./node` 导出,引擎起服调同一只);
5
5
  * 本模块是它的**渲染器**:把它的结果闭集渲染成退出码、报告行与 stderr 句子。命令行的覆盖面是全部配置域、retired 域与 `remote-exec.json`。
6
- * 目录被当作**一个 scope 的全集**(`coverage: "scope"`):目录里没有的域文件就是从未设过。
6
+ * 目录里没有的域文件不读、不建(26.0.0 起没有一步新建文档)。
7
7
  *
8
8
  * 本模块不碰 `node:fs`:读写文件由入口 `bin/settings-schema.mjs` 注入(真绑定是 `./config-dir-io` 的 `nodeConfigDirectoryIo`,写盘用的是 `./atomic-write` 那一只原子写器 —— 写法与文件模式在那里一处定),所以测试可以直接驱动它。
9
9
  * 不进主桶 —— 它是 bin 的实现,不是契约面。
10
10
  *
11
11
  * 读哪些文件:目录里 `<名>.json`,名是配置域或 retired 域(`runtime`)—— 便携与否不论(离线的 `workers.json` 一样迁)—— 以及 `remote-exec.json`
12
- * (一次性迁移 SS-M7 的座位走查也走它的两个端点);别的文件(隐藏文件、不认识的名、非 `.json`)不读不动。
12
+ * (`config.d` 能放的文档,照收照判);别的文件(隐藏文件、不认识的名、非 `.json`)不读不动。
13
13
  *
14
14
  * 零域文档分两形:**有条目却没有域文档**(任何非 `.` 开头的条目 —— 子目录、说明文件、不认识的名)⇒ 退出 2;**目录真空**(零条目,或只有以 `.` 开头的条目)⇒ 照常走判定,
15
15
  * 零收据 = noop 退出 0 —— 新部署的空 `config.d` 是合法态,「没有东西可迁」不是「指错目录」(搬空之后再跑同一目录也因此幂等)。
16
16
  *
17
17
  * 退出码:0 = 已写回 / 无事可做(目录里有域文档只是没有要改的,或目录真空);1 = 有迁不了的坐标(收据 `refused`)**或**要写回的域文档整域读不进(整域终判,见 `migrateConfigDirectory`),**一字不写**;
18
- * 2 = 用法错,或**环境错**(读目录 / 读文件 / 写盘 / 删文件的 I/O 错:权限、磁盘、悬空符号链接 …;stdout 空、stderr 一行点名路径与 errno,不打栈;句子按落点分句、
18
+ * 2 = 用法错,或**环境错**(读目录 / 读文件 / 写盘的 I/O 错:权限、磁盘、悬空符号链接 …;stdout 空、stderr 一行点名路径与 errno,不打栈;句子按落点分句、
19
19
  * 一律出自文件系统失败句的唯一铸点 `./fs-failure` —— 例:目录建不出文件 ⇒ 点名目录、目标换不掉 ⇒ 点名文件,句尾是对应出路)——
20
20
  * rc 1 是「拒迁」的约定码,不许被一个权限错冒充),或覆盖面内某份文档(域文档或 `remote-exec.json`)是坏文件(空 / 纯空白 / 坏 JSON / 不是 JSON 对象 —— 与 `FileConfigStore` / `loadRemoteExec` 同一只判、同一句),**或目录里有条目却没有一个是域文档**
21
21
  * (多半是填错了目录:要的是 `config.d` 目录本身;`<目录>/config.d` 在场时句子直接点它)(此时 stdout 为空);3 = `--check` 且会有改动、整域判得过(不写)。`--check` 与真跑过同一只判定,只在
@@ -25,8 +25,8 @@
25
25
  * 退出码 0 / 1 / 3 时 stdout 恰两行:第 1 行 = **唯一结论行** `outcome=<refused|applied|noop|pending> written=<true|false>`;第 2 行 = JSON 报告
26
26
  * (`event: "stored_documents_migrated"`,逐条收据只点名坐标与处置、不带值),同带 `outcome` / `written`。`written` 由 `outcome` 派生
27
27
  * (只有 `applied` 写盘)。**键名带时态**:`written=true` 才有 `applied`;没写(refused / noop / pending)时是 `wouldApply`。
28
- * 结论行在**写盘成功之后**才出(写盘抛错 ⇒ 没有 `outcome=applied`)。写盘次序:先写改过 / 新建的文件,最后删被移除的 retired 域文件 ——
29
- * 中途断掉再跑一次,迁移照样恒等收尾(已搬过去的值在新位上,旧文件里同名键按「新位赢」丢弃)。
28
+ * 结论行在**写盘成功之后**才出(写盘抛错 ⇒ 没有 `outcome=applied`)。只写改过的文件,从不删文件 ——
29
+ * 中途断掉再跑一次,迁移照样恒等收尾(写过的文件已是新形,再迁零改动)。
30
30
  */
31
31
  import { reportReceipt, joinDirPath, migrateConfigDirectory } from "./config-dir-migration.js";
32
32
  import { MIGRATE_COMMAND_TEMPLATE, migrateCommandFor } from "./retired-form.js";
@@ -38,10 +38,10 @@ export const COVERED_DOCUMENTS = [...DOMAINS, ...Object.keys(RETIRED_DOMAINS), R
38
38
  const USAGE = [
39
39
  `usage: ${MIGRATE_COMMAND_TEMPLATE} [--check]`,
40
40
  " Runs the one-time migrations (@sema-agent/settings-schema/one-time-migrations) over every <domain>.json (and remote-exec.json) in the directory, read as one",
41
- " scope (a missing domain file = never set): writes the rewritten files in place and removes retired-domain files (runtime.json) only when",
42
- " nothing is refused and every document it would write reads as a whole domain; --check runs the same verdict and only reports (exit 3",
41
+ " scope (a missing domain file = never set): writes the rewritten files in place only when nothing is refused and every document it",
42
+ " would write reads as a whole domain; it never deletes a file; --check runs the same verdict and only reports (exit 3",
43
43
  " if something would change). The argument is the config.d directory itself; a directory that has entries but no <domain>.json among them is",
44
- " refused (exit 2); an empty directory has nothing to migrate (exit 0). An I/O failure (reading, writing or removing a file) exits 2 with",
44
+ " refused (exit 2); an empty directory has nothing to migrate (exit 0). An I/O failure (reading or writing a file) exits 2 with",
45
45
  " one line on stderr naming the path and the error.",
46
46
  " stdout (exit 0 / 1 / 3): line 1 = outcome=<refused|applied|noop|pending> written=<true|false>, line 2 = the JSON report",
47
47
  " (applied only when written=true; otherwise wouldApply).",
@@ -74,11 +74,11 @@ function reportOf(outcome, dir, applied, refused) {
74
74
  });
75
75
  return `outcome=${outcome} written=${written}\n${json}\n`;
76
76
  }
77
- /** 写回阶段(写盘 / 删文件)的一次 I/O 失败 —— 环境错一臂(rc 2)。只由 {@link withEnvironmentArm} 包的两个写口铸;别的抛错(包内守卫、误用)不是它,照旧抛。 */
77
+ /** 写回阶段(写盘)的一次 I/O 失败 —— 环境错一臂(rc 2)。只由 {@link withEnvironmentArm} 包的写口铸;别的抛错(包内守卫、误用)不是它,照旧抛。 */
78
78
  class EnvironmentFailure extends Error {
79
79
  }
80
80
  const oneLine = (text) => text.replace(/\s*\n\s*/g, " ");
81
- /** 把注入的写口包一层:写盘 / 删文件抛 ⇒ {@link EnvironmentFailure},句子由铸点出(`fsFailureMessage`):本包的原子写器抛的是按失败那一步分好的句子
81
+ /** 把注入的写口包一层:写盘抛 ⇒ {@link EnvironmentFailure},句子由铸点出(`fsFailureMessage`):本包的原子写器抛的是按失败那一步分好的句子
82
82
  * (目录建不出文件 ⇒ 点名目录,目标换不掉 ⇒ 点名文件,句尾是对应出路)—— 原样用;别的写口(注入的替身)抛的错步骤看不见 ⇒ 点名**要写的那份文件**与原错误句。
83
83
  * 读口不包:读目录 / 读文件错由 `migrateConfigDirectory` 自己收成 `unreadable`(同为 rc 2,句子同出铸点)。 */
84
84
  function withEnvironmentArm(io) {
@@ -93,14 +93,6 @@ function withEnvironmentArm(io) {
93
93
  throw new EnvironmentFailure(fsFailureMessage({ landing: "write", path }, err), { cause: err });
94
94
  }
95
95
  },
96
- removeFile: async (path) => {
97
- try {
98
- await io.removeFile(path);
99
- }
100
- catch (err) {
101
- throw new EnvironmentFailure(fsFailureMessage({ landing: "remove", path }, err), { cause: err });
102
- }
103
- },
104
96
  };
105
97
  }
106
98
  /** 「有条目却没有域文档」的拒句:点名这个目录、说要的是 `config.d` 目录本身;`<dir>/config.d` 在场(探一次)就直接点它 —— 最常见的错是填了它的上一层。指路的命令里路径过 shell 引用,可直接粘贴。 */
@@ -1,24 +1,13 @@
1
1
  /**
2
- * `migrateConfigDirectory`(`./config-dir-migration`)的**真 I/O 绑定**(Node 专用):读目录 / 读文件 / 删文件走 `node:fs/promises`,写盘走本包唯一的原子写器
2
+ * `migrateConfigDirectory`(`./config-dir-migration`)的**真 I/O 绑定**(Node 专用):读目录 / 读文件走 `node:fs/promises`,写盘走本包唯一的原子写器
3
3
  * `./atomic-write`(同目录临时文件 → rename;`config-document` 类的模式规则:新建 0o644 经 umask、已有的沿用原模式;目标是符号链接则写到它指向的真文件)。
4
4
  * 读目录 / 读文件先过写器同一只链接判法 `resolveSymlinkTarget`:链接读它指向的真文件 / 真目录,**悬空链接**抛与写器同一句(改前读阶段先撞 ENOENT,句子不提链接)。
5
5
  * 命令行入口与引擎起服的目录迁移注入同一份,写法与文件模式因此只在原子写器那一处定。
6
6
  */
7
- import { readdir, readFile, unlink } from "node:fs/promises";
8
- import { dirname } from "node:path";
9
- import { directoryAdmitsWrite, resolveSymlinkTarget, writeFileAtomic } from "./atomic-write.js";
10
- import { FsFailure } from "./fs-failure.js";
7
+ import { readdir, readFile } from "node:fs/promises";
8
+ import { resolveSymlinkTarget, writeFileAtomic } from "./atomic-write.js";
11
9
  export const nodeConfigDirectoryIo = {
12
10
  readDir: async (path) => readdir(resolveSymlinkTarget(path)),
13
11
  readFile: async (path) => readFile(resolveSymlinkTarget(path), "utf8"),
14
12
  writeFileAtomic: async (path, text) => writeFileAtomic(path, text, "config-document"), // the files this migration writes are config.d domain documents
15
- // a failed removal is minted here, where the directory's mode can be read (`./fs-failure` is pure): the same `FsFailure` the atomic writer throws, so the command line prints it as is
16
- removeFile: async (file) => {
17
- try {
18
- await unlink(file);
19
- }
20
- catch (e) {
21
- throw new FsFailure({ landing: "remove", path: file, directoryWritable: directoryAdmitsWrite(dirname(file)) }, e);
22
- }
23
- },
24
13
  };
@@ -5,7 +5,6 @@ export interface ConfigDirectoryIo {
5
5
  readDir(path: string): Promise<string[]>;
6
6
  readFile(path: string): Promise<string>;
7
7
  writeFileAtomic(path: string, text: string): Promise<void>;
8
- removeFile(path: string): Promise<void>;
9
8
  }
10
9
  /** 一条拒绝 —— 迁移步的拒(收据 `refused`)与整域终判的拒**同一套形**:`migration`(整域终判拒为 `null`)/ `document` / `path`(相对该域文档,出门形)/ `appliedAs: "refused"` / `reason`。
11
10
  * 句子来自本包唯一的脱敏器,坐标段与句子都是出门形、不带值。 */
@@ -40,7 +39,6 @@ export type ConfigDirectoryMigration = {
40
39
  readonly read: readonly string[];
41
40
  readonly applied: readonly MigrationReceipt[];
42
41
  readonly written: readonly string[];
43
- readonly removed: readonly string[];
44
42
  };
45
43
  export interface MigrateConfigDirectoryOptions {
46
44
  /** 覆盖面:调用方读的文档名集(配置域、retired 域,或 `remote-exec`)。拼错的名字 ⇒ 抛 `TypeError`,不让它悄悄变成「什么都没覆盖」。 */
@@ -60,7 +58,7 @@ export interface MigrateConfigDocumentsOptions {
60
58
  * · `refused` —— 迁移步拒(收据 `refused`)**或**改过的文档整域读不进(整域终判)。`docs` 仍交回迁移后的那一份(迁得动的坐标改新形、迁不动的原样 ——
61
59
  * 写手要的是这一份;落不落盘、引擎认不认是 `kind` 的事:`refused` ⇒ 引擎同样不写回、整域落缺省;反向不成立 —— 引擎对整个目录一判,别的文档被拒也会让整目录不写)。
62
60
  * · `noop` —— 零改动:`docs` 里每份文档都是入参里的**同一引用**;没改的文档不终判(读不读得进是读者的事,与目录形同一律)。
63
- * · `migrated` —— 有改动、整域判得过:`docs` 是迁移后的覆盖面内文档全集,`changed` = 改过 / 新建的文档名,`removed` = 被移除的(retired 域),`applied` = 逐条收据。
61
+ * · `migrated` —— 有改动、整域判得过:`docs` 是迁移后的覆盖面内文档全集,`changed` = 改过的文档名,`applied` = 逐条收据。
64
62
  * `read` = 覆盖面内在场的文档名(升序)。入参从不被改;重跑 `docs` ⇒ `noop`。
65
63
  */
66
64
  export type ConfigDocumentsMigration = {
@@ -86,7 +84,6 @@ export type ConfigDocumentsMigration = {
86
84
  readonly docs: Readonly<Record<string, unknown>>;
87
85
  readonly applied: readonly MigrationReceipt[];
88
86
  readonly changed: readonly string[];
89
- readonly removed: readonly string[];
90
87
  };
91
88
  /** 目录迁移能读写的文档名:配置域、retired 域、`remote-exec`(`config.d/remote-exec.json`)—— 就是 `config.d` 里能放的文档名。 */
92
89
  export type ConfigDirectoryDocument = ConfigDDocumentName;
@@ -1,13 +1,12 @@
1
1
  /**
2
- * **一个 `config.d` 目录的一次性迁移** —— 「读目录 → 迁 → 整域终判 → 原子写 → 删 retired 域文件」这一条语义的唯一实现。命令行(`migrate <config.d 目录> [--check]`,
2
+ * **一个 `config.d` 目录的一次性迁移** —— 「读目录 → 迁 → 整域终判 → 原子写」这一条语义的唯一实现(26.0.0 起没有一步删文档,删文件那一段随之删)。命令行(`migrate <config.d 目录> [--check]`,
3
3
  * 见 `./cli`)是它的渲染器(退出码 + 报告行);引擎起服时对本地 `config.d` 的迁移调同一只函数,不按同语义自写一份。
4
4
  *
5
5
  * **覆盖面 = 调用方读的文档名集**({@link MigrateConfigDirectoryOptions.documents}:配置域、retired 域,还可以是 `remote-exec` ——
6
- * `config.d/remote-exec.json`,一次性迁移 SS-M7 的座位走查也读它;它与域文档同一条路:读 → 迁 → 改过的整文档终判 → 同一只写器写回):覆盖面内没有的域文件就是从未设过(一次性迁移的 `coverage: "scope"`);
7
- * 覆盖面外的文件不读、不判、不写、不删 —— 本调用方没有资格改写它从不消费的数据,它们是坏文件也挡不住覆盖面内的迁移。命令行的覆盖面是全部配置域加 retired 域;
8
- * 引擎的覆盖面是它本地读腿会读的那几份。**迁移不许越过覆盖面去写**:retired 的 `runtime` 域迁出时要写 `governance` 与 `limits`(`RUNTIME_LIFT_TARGETS`),
9
- * 覆盖面没把这两个域一并包进来时,目录算不上「一个 scope 的全集」—— 迁移按 `coverage: "partial"` 走(`runtime` 在那一支上以收据 `refused` 拒迁、一字不写),
10
- * 不会把覆盖面外已有的 `governance.json` / `limits.json` 当作「从未设过」覆盖掉;日后若别的迁移步新建覆盖面外的文档,函数响亮抛(守卫),不静默写。
6
+ * `config.d/remote-exec.json`;它与域文档同一条路:读 → 迁 → 改过的整文档终判 → 同一只写器写回)。
7
+ * 覆盖面外的文件不读、不判、不写 —— 本调用方没有资格改写它从不消费的数据,它们是坏文件也挡不住覆盖面内的迁移。命令行的覆盖面是全部配置域加 retired 域;
8
+ * 引擎的覆盖面是它本地读腿会读的那几份。**迁移不改文档集**:今天没有一步新建或移除文档(26.0.0 起,唯一做过这两件事的退役 `runtime` 域那一步到期删了);
9
+ * 日后若某一步新建覆盖面外的文档、或把一份文档从结果里移除,函数响亮抛(守卫),不静默写、不静默留下一份没人删的旧文件。
11
10
  *
12
11
  * 本模块不碰 `node:fs`:读写由注入的 {@link ConfigDirectoryIo} 做(真绑定是 `./config-dir-io` 的 `nodeConfigDirectoryIo`,写盘用 `./atomic-write` 那一只原子写器与它的模式表),
13
12
  * 所以测试可以直接喂内存实现。
@@ -18,14 +17,14 @@
18
17
  * · `refused` —— 迁移步拒(收据 `refused`:要猜才改得动的形)**或**要写回的文档整域读不进(整域终判:名字 / 路由唯一这类跨行规则只有整域判得出)。一字不写。
19
18
  * · `noop` —— 读到了文档、没有要改的。
20
19
  * · `pending` —— `check: true` 且有改动、整域判得过:一字不写。
21
- * · `applied` —— 已写回:先写改过 / 新建的文档,最后删被移除的 retired 域文件 —— 中途断掉再跑一次,迁移照样恒等收尾(已搬过去的值在新位上,旧文件里同名键按「新位赢」丢弃)。
20
+ * · `applied` —— 已写回改过的文档 —— 中途断掉再跑一次,迁移照样恒等收尾(写过的文档已是新形,再迁零改动)。
22
21
  * 写盘阶段的 I/O 错误**原样抛出**(不吞、不改写):已写完的文档留在新位上,再跑一次幂等收尾。
23
22
  *
24
23
  * ## 同步口 {@link migrateConfigDocuments}(14.5.0)
25
24
  * 「迁 → 整域终判」那一段就是一只同步函数:入参是调用方手里**已有**的存量文档原文(域名 → 文档),出参是同一个闭集的无 io 形 —— 迁移后的文档、逐条收据、
26
25
  * 整域终判的拒。目录形读完目录后调的就是它的内核(语义只此一处);不经目录的调用方(例:命令行壳按层读 `settings` 文档)调它,不再自己把
27
26
  * `migrateStoredDocuments`(纯改写)与 `parseDomain`(整域终判)按「迁移步拒 → 无改动 ⇒ noop → 改过的文档整域终判」的序再组装一遍。
28
- * 覆盖面、`coverage` 的判、「没改的文档不判」「迁移不许越过覆盖面去写」与目录形逐字同;层的合并(层序 / 覆盖 / 托管锁)不在这里 —— 一层一次调用。
27
+ * 覆盖面、「没改的文档不判」「迁移不许越过覆盖面去写」与目录形逐字同;层的合并(层序 / 覆盖 / 托管锁)不在这里 —— 一层一次调用。
29
28
  */
30
29
  import { z } from "zod";
31
30
  import { formatConfigPath, parseDomain } from "./config-fns.js";
@@ -34,10 +33,9 @@ import { fsFailureMessage } from "./fs-failure.js";
34
33
  import { isPlainJsonObject } from "./plain-json-object.js";
35
34
  import { migrateStoredDocuments } from "./one-time-migrations.js";
36
35
  import { REMOTE_EXEC_DOCUMENT } from "./remote-exec.js";
37
- import { RUNTIME_LIFT_TARGETS } from "./runtime-lift-targets.js";
38
36
  import { isDomainName, isRetiredDomainName } from "./types.js";
39
37
  const isConfigDirectoryDocument = (name) => isDomainName(name) || isRetiredDomainName(name) || name === REMOTE_EXEC_DOCUMENT;
40
- /** 改过的文档的整文档终判:域过读侧那一只 `parseDomain`,`remote-exec` 过 `loadRemoteExec` 那一只 `parseRemoteExecDocument`;retired 域不终判(它只会被删)。 */
38
+ /** 改过的文档的整文档终判:域过读侧那一只 `parseDomain`,`remote-exec` 过 `loadRemoteExec` 那一只 `parseRemoteExecDocument`;retired 域不终判(没有一步改它,读侧墓碑判它)。 */
41
39
  function judgeWholeDocument(name, doc) {
42
40
  if (isDomainName(name))
43
41
  parseDomain(name, doc);
@@ -54,7 +52,6 @@ export function reportReceipt(r) {
54
52
  case "refused":
55
53
  return { ...base, reason: r.reason };
56
54
  case "rewritten":
57
- case "dropped-shadowed":
58
55
  case "dropped-inert":
59
56
  case "minted":
60
57
  return base;
@@ -119,14 +116,17 @@ function migrateCovered(caller, docs, covered) {
119
116
  const read = Object.keys(docs);
120
117
  if (read.length === 0)
121
118
  return { kind: "no-documents" };
122
- // 目录/文档集是不是「一个 scope 的全集」只看一件事:SS-M1 要写的目标域是不是都在覆盖面里(见文件头);不是 ⇒ partial,runtime 的迁移被它自己拒掉。
123
- const coverage = RUNTIME_LIFT_TARGETS.every((target) => covered.has(target)) ? "scope" : "partial";
124
- const m = migrateStoredDocuments(docs, { coverage });
119
+ const m = migrateStoredDocuments(docs);
125
120
  const outside = Object.keys(m.docs).filter((name) => !Object.prototype.hasOwnProperty.call(docs, name) && !covered.has(name));
126
121
  if (outside.length > 0) {
127
122
  // 守卫:迁移新建了覆盖面外的文档。那份文档调用方没读过,「从未设过」只对覆盖面内成立 —— 写下去会覆盖它。今天不会发生(见文件头);发生了就是迁移步的写入域变了,这里先红。
128
123
  throw new Error(`${caller}: the migration produced document(s) outside the coverage (${outside.join(", ")}) — refusing to write files the caller did not read`);
129
124
  }
125
+ const dropped = read.filter((name) => !Object.prototype.hasOwnProperty.call(m.docs, name));
126
+ if (dropped.length > 0) {
127
+ // 守卫:迁移把一份文档从结果里移除了。本模块没有删文件的口(26.0.0 起没有一步移除文档);发生了就是迁移步的写入域变了 —— 先红,不写剩下的、不留一份没人删的旧文件。
128
+ throw new Error(`${caller}: the migration removed document(s) (${dropped.join(", ")}) — this migration never deletes a file; refusing to write`);
129
+ }
130
130
  const applied = m.receipts.filter((r) => r.appliedAs !== "refused");
131
131
  const verdict = verdictOf(docs, m.docs, m.receipts);
132
132
  switch (verdict.kind) {
@@ -144,8 +144,7 @@ function migrateCovered(caller, docs, covered) {
144
144
  const changed = Object.entries(m.docs)
145
145
  .filter(([name, doc]) => !(Object.prototype.hasOwnProperty.call(docs, name) && docs[name] === doc))
146
146
  .map(([name]) => name);
147
- const removed = Object.keys(docs).filter((name) => !Object.prototype.hasOwnProperty.call(m.docs, name));
148
- return { kind: "migrated", read, docs: m.docs, applied, changed, removed };
147
+ return { kind: "migrated", read, docs: m.docs, applied, changed };
149
148
  }
150
149
  /**
151
150
  * 对一组**已有的**存量文档(`docs`:文档名 → 文档,例:一层 `settings` 里的 `models` 域原文)跑一次一次性迁移 + 整域终判 —— 同步、无 io;语义与结果见文件头「同步口」与 {@link ConfigDocumentsMigration}。
@@ -222,14 +221,9 @@ export async function migrateConfigDirectory(dir, opts) {
222
221
  if (opts.check === true)
223
222
  return { kind: "pending", read: m.read, applied: m.applied };
224
223
  const written = [];
225
- const removed = [];
226
224
  for (const name of m.changed) {
227
225
  await io.writeFileAtomic(joinDirPath(dir, `${name}.json`), configDDocumentText(m.docs[name])); // the one config.d document text (writeDomainFile / writeRemoteExec write the same)
228
226
  written.push(`${name}.json`);
229
227
  }
230
- for (const name of m.removed) {
231
- await io.removeFile(joinDirPath(dir, `${name}.json`));
232
- removed.push(`${name}.json`);
233
- }
234
- return { kind: "applied", read: m.read, applied: m.applied, written, removed };
228
+ return { kind: "applied", read: m.read, applied: m.applied, written };
235
229
  }
@@ -16,7 +16,7 @@
16
16
  * 此前它在算版本那一步抛,已经收集的拒一并丢掉);第六个 `retired_domain` 是墓碑(retired 域文档带事实);
17
17
  * · `error`:契约的整句,与旧出口抛出来的那一句逐字同(`empty` / `invalid_json` / `not_object` / `too_deep` 的句子点名文件的真实路径与形,从不回显文件原文;`io` 是 fs 错误的原话 ——
18
18
  * 有的带真实路径(如 EACCES 的 `open '<路径>'`)、有的不带(EISDIR),要认是哪份文档读 `document`;调用方把 `error` 送出进程前自己脱敏);
19
- * · 墓碑拒另带 `migration`(一次性迁移的编号,与 `RetiredDomainError.migration` 同值)。
19
+ * · 墓碑拒的 `document` 恒是 retired 域名(26.0.0 起不再另带 `migration`:改写存量的一次性迁移到期删了,那一格没有来源)。
20
20
  * 词表是闭集:消费方用 `switch (refusal.reason)` 穷举,加词 ⇒ 它们编译红(这是通知)。
21
21
  */
22
22
  import type { PortableDomain } from "./portable-domains.js";
@@ -26,7 +26,7 @@ export declare const CONFIG_DOCUMENT_REFUSAL_REASONS: readonly ["empty", "invali
26
26
  export type ConfigDocumentRefusalReason = (typeof CONFIG_DOCUMENT_REFUSAL_REASONS)[number];
27
27
  /** 能被拒的 `config.d` 文档:便携域的文档,或retired 域的文档(读它只为墓碑)。 */
28
28
  export type ConfigDocumentName = PortableDomain | RetiredDomainName;
29
- /** 被拒的一份文档(按 `reason` 判别):文件层的拒 `{ document, reason, error }`;墓碑拒另带 `migration`,文档名恒是 retired 域名。 */
29
+ /** 被拒的一份文档(按 `reason` 判别):`{ document, reason, error }`;墓碑拒的文档名恒是 retired 域名。 */
30
30
  export type ConfigDocumentRefusal = {
31
31
  readonly document: ConfigDocumentName;
32
32
  readonly reason: Exclude<ConfigDocumentRefusalReason, "retired_domain">;
@@ -35,5 +35,4 @@ export type ConfigDocumentRefusal = {
35
35
  readonly document: RetiredDomainName;
36
36
  readonly reason: "retired_domain";
37
37
  readonly error: string;
38
- readonly migration: string;
39
38
  };
@@ -171,13 +171,12 @@ export interface PublishedSnapshot {
171
171
  export declare function emptyEffective(): EffectiveConfig;
172
172
  /**
173
173
  * 一个**retired 域**的文档带着事实 —— 读存储文档的每个读者同一只拒(`parseDomain` 写、`buildEffective` 向店要、`readEffectiveWire` 看 wire、
174
- * `FileConfigStore` 与 `readBundle` 读 `config.d/`)。`message` 是墓碑表那一行的整句(点名retired版本、事实今天住哪、改写存量的一次性迁移);
175
- * `code` 是机读码,`domain` / `migration` 是那一行的两格。墓碑是拒,不是读法:它从不把旧文档读成任何值。
174
+ * `FileConfigStore` 与 `readBundle` 读 `config.d/`)。`message` 是墓碑表那一行的整句(点名retired版本与事实今天住哪);`code` 是机读码,`domain` 是那一行的名。
175
+ * 墓碑是拒,不是读法:它从不把旧文档读成任何值。(26.0.0 起不再带 `migration`:改写存量 `runtime` 的一次性迁移到期删了,它是那一格唯一的来源。)
176
176
  */
177
177
  export declare class RetiredDomainError extends Error {
178
178
  readonly domain: RetiredDomainName;
179
179
  readonly code: "retired_domain";
180
- readonly migration: string;
181
180
  constructor(domain: RetiredDomainName);
182
181
  }
183
182
  /** 墓碑判一次:`raw` 是retired 域 `domain` 的文档,带事实 ⇒ 抛 {@link RetiredDomainError}。 */
@@ -731,7 +730,7 @@ export type StoredDocumentReader = (d: DomainName | RetiredDomainName) => unknow
731
730
  * which made `emptyEffective`/the memory store non-deterministic). Every caller now supplies it explicitly.
732
731
  *
733
732
  * 11.0.0:`getRaw` 也会被问到墓碑表里的retired 域(今天只有 `runtime`)。店里还留着一份**带事实**的retired 域文档 ⇒ 整份 effective 抛
734
- * {@link RetiredDomainError}(拒句点名改写它的一次性迁移);缺席或 `{}` ⇒ 不理会。读写两面同一只 schema:读路径上不再有任何抬升臂。
733
+ * {@link RetiredDomainError}(拒句点名事实今天住哪);缺席或 `{}` ⇒ 不理会。读写两面同一只 schema:读路径上不再有任何抬升臂。
735
734
  */
736
735
  export declare function buildEffective(version: number, getRaw: StoredDocumentReader, updatedAt: string, onWarning?: (w: EffectiveReadWarning) => void): EffectiveConfig;
737
736
  /** READ-side tolerant judgment for a GET /effective **wire payload**(the {@link EffectiveWire} contract)at
@@ -211,7 +211,10 @@ export const DOMAIN_WRITE_ROLE = {
211
211
  * to the agent — `goal` and `notes` ride into the system prompt, `contextItems` carries folder / file entries the task's workspace and
212
212
  * attachments are built from — the same injection surface as `prompts`, so they need `publisher`. `registeredBy` / `registeredAt` are stamped
213
213
  * by the write port on registration; whether a caller may rewrite them is that port's rule, not a role (raising them would also block an
214
- * editor from registering a project at all).
214
+ * editor from registering a project at all). `contentAttestedAt` is the stamp of the opposite kind: the port puts it on a registration after a
215
+ * write it judged with {@link writeRoleFor}, as proof that the content fields passed that judgement. A caller who could set, change or tear it
216
+ * could forge the proof or hide the lack of one, so it needs `publisher` — the same as the fields it vouches for; an editor registers a project
217
+ * (no content, no stamp) and renames it without touching the stamp.
215
218
  */
216
219
  const PROJECT_FIELD_WRITE_ROLE = {
217
220
  displayName: "editor",
@@ -223,6 +226,7 @@ const PROJECT_FIELD_WRITE_ROLE = {
223
226
  goal: "publisher",
224
227
  contextItems: "publisher",
225
228
  archivedAt: "editor",
229
+ contentAttestedAt: "publisher",
226
230
  icon: "editor",
227
231
  color: "editor",
228
232
  };
@@ -314,18 +318,16 @@ export function emptyEffective() {
314
318
  }
315
319
  /**
316
320
  * 一个**retired 域**的文档带着事实 —— 读存储文档的每个读者同一只拒(`parseDomain` 写、`buildEffective` 向店要、`readEffectiveWire` 看 wire、
317
- * `FileConfigStore` 与 `readBundle` 读 `config.d/`)。`message` 是墓碑表那一行的整句(点名retired版本、事实今天住哪、改写存量的一次性迁移);
318
- * `code` 是机读码,`domain` / `migration` 是那一行的两格。墓碑是拒,不是读法:它从不把旧文档读成任何值。
321
+ * `FileConfigStore` 与 `readBundle` 读 `config.d/`)。`message` 是墓碑表那一行的整句(点名retired版本与事实今天住哪);`code` 是机读码,`domain` 是那一行的名。
322
+ * 墓碑是拒,不是读法:它从不把旧文档读成任何值。(26.0.0 起不再带 `migration`:改写存量 `runtime` 的一次性迁移到期删了,它是那一格唯一的来源。)
319
323
  */
320
324
  export class RetiredDomainError extends Error {
321
325
  domain;
322
326
  code = "retired_domain";
323
- migration;
324
327
  constructor(domain) {
325
328
  super(retiredDomainSentence(domain));
326
329
  this.domain = domain;
327
330
  this.name = "RetiredDomainError";
328
- this.migration = RETIRED_DOMAINS[domain].migration;
329
331
  }
330
332
  }
331
333
  /** 一份retired 域文档**带不带事实**:缺席与 `{}` 不带(没有可丢的东西,读者不理会);其余一切(含 `null` / 非对象 / 有键的对象)都带 ⇒ 拒。 */
@@ -1462,7 +1464,7 @@ export const DOMAIN_ENTRY_SALVAGE = {
1462
1464
  * which made `emptyEffective`/the memory store non-deterministic). Every caller now supplies it explicitly.
1463
1465
  *
1464
1466
  * 11.0.0:`getRaw` 也会被问到墓碑表里的retired 域(今天只有 `runtime`)。店里还留着一份**带事实**的retired 域文档 ⇒ 整份 effective 抛
1465
- * {@link RetiredDomainError}(拒句点名改写它的一次性迁移);缺席或 `{}` ⇒ 不理会。读写两面同一只 schema:读路径上不再有任何抬升臂。
1467
+ * {@link RetiredDomainError}(拒句点名事实今天住哪);缺席或 `{}` ⇒ 不理会。读写两面同一只 schema:读路径上不再有任何抬升臂。
1466
1468
  */
1467
1469
  export function buildEffective(version, getRaw, updatedAt, onWarning) {
1468
1470
  // 墓碑先判:一份没迁的retired 域文档意味着这个 scope 的存量还没过一次性迁移 —— 拿剩下的域拼一份 effective 等于静默丢掉它的事实。
@@ -1487,7 +1489,7 @@ export function buildEffective(version, getRaw, updatedAt, onWarning) {
1487
1489
  workers: parseOr("workers", getRaw("workers")),
1488
1490
  hosts: parseOr("hosts", getRaw("hosts")),
1489
1491
  // governance TRUTH = the domain itself (11.0.0: the read-side lift from a 0.5-era runtime document is gone — the
1490
- // runtime tombstone above refuses such a document, and the one-time migration SS-M1 moves its trio here).
1492
+ // runtime tombstone above refuses such a document; its sentence names this domain and limits).
1491
1493
  governance: parseOr("governance", getRaw("governance")),
1492
1494
  entitlement: parseOr("entitlement", getRaw("entitlement")),
1493
1495
  // execution (0.8.0, S3): plain scope-level parse — MIRRORS governance (no overlay/merge invented here).