@sema-agent/settings-schema 3.0.0 → 3.0.1

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 (31) hide show
  1. package/CHANGELOG.md +24 -1
  2. package/README.md +10 -6
  3. package/conformance/VERSION +1 -1
  4. package/conformance/cases/t01-absent-domain-key-not-null/expected.json +93 -0
  5. package/conformance/cases/t01-absent-domain-key-not-null/input.json +29 -0
  6. package/conformance/cases/t01-absent-domain-key-not-null/meta.json +6 -0
  7. package/conformance/cases/t02-entry-salvage-vs-whole-domain-refusal/expected.json +16 -0
  8. package/conformance/cases/t02-entry-salvage-vs-whole-domain-refusal/input.json +32 -0
  9. package/conformance/cases/t02-entry-salvage-vs-whole-domain-refusal/meta.json +6 -0
  10. package/conformance/cases/t03-prototype-name-key-not-swallowed/expected.json +107 -0
  11. package/conformance/cases/t03-prototype-name-key-not-swallowed/input.json +25 -0
  12. package/conformance/cases/t03-prototype-name-key-not-swallowed/meta.json +6 -0
  13. package/conformance/cases/t04-secret-literal-never-in-warning-value/expected.json +105 -0
  14. package/conformance/cases/t04-secret-literal-never-in-warning-value/input.json +25 -0
  15. package/conformance/cases/t04-secret-literal-never-in-warning-value/meta.json +14 -0
  16. package/conformance/historical/settings-schema@1.0.0.json +84 -3
  17. package/conformance/historical/settings-schema@1.10.0.json +84 -3
  18. package/conformance/historical/settings-schema@1.5.0.json +84 -3
  19. package/conformance/historical/settings-schema@2.0.0.json +83 -2
  20. package/conformance/historical/settings-schema@2.1.0.json +83 -2
  21. package/dist/config-fns.d.ts +4 -4
  22. package/dist/config-fns.js +5 -5
  23. package/dist/cross-domain.d.ts +1 -1
  24. package/dist/cross-domain.js +1 -1
  25. package/dist/hooks.d.ts +2 -2
  26. package/dist/hooks.js +2 -2
  27. package/dist/scheduler-store.d.ts +1 -1
  28. package/dist/scheduler-store.js +1 -1
  29. package/dist/types.d.ts +2 -2
  30. package/dist/types.js +3 -3
  31. package/package.json +1 -1
@@ -8,9 +8,10 @@
8
8
  "why": "旧版坐标是点号串、今天是段数组;归一 = 按 `.` 拼串,这正是 3.0.0 要消掉的有损编码(`[\"a.b\"]` 与 `[\"a\",\"b\"]` 归一后同串)"
9
9
  },
10
10
  "summary": {
11
- "pass": 111,
12
- "diff": 24,
13
- "expected-rejected": 12,
11
+ "pass": 117,
12
+ "diff": 27,
13
+ "diff-ledgered": 0,
14
+ "expected-rejected": 15,
14
15
  "harness-error": 0,
15
16
  "skipped": 0
16
17
  },
@@ -955,6 +956,86 @@
955
956
  }
956
957
  }
957
958
  },
959
+ "t01-absent-domain-key-not-null": {
960
+ "firstRed": false,
961
+ "legs": {
962
+ "domains": {
963
+ "status": "pass",
964
+ "behaviour": false,
965
+ "detail": "effective, warnings and metadata all match"
966
+ },
967
+ "wire": {
968
+ "status": "pass",
969
+ "behaviour": false,
970
+ "detail": "effective, warnings and metadata all match"
971
+ },
972
+ "localRoot": {
973
+ "status": "pass",
974
+ "behaviour": false,
975
+ "detail": "effective, warnings and metadata all match"
976
+ }
977
+ }
978
+ },
979
+ "t02-entry-salvage-vs-whole-domain-refusal": {
980
+ "firstRed": false,
981
+ "legs": {
982
+ "domains": {
983
+ "status": "expected-rejected",
984
+ "behaviour": false,
985
+ "detail": "rejected at `validate` as expected"
986
+ },
987
+ "wire": {
988
+ "status": "expected-rejected",
989
+ "behaviour": false,
990
+ "detail": "rejected at `validate` as expected"
991
+ },
992
+ "localRoot": {
993
+ "status": "expected-rejected",
994
+ "behaviour": false,
995
+ "detail": "rejected at `validate` as expected"
996
+ }
997
+ }
998
+ },
999
+ "t03-prototype-name-key-not-swallowed": {
1000
+ "firstRed": false,
1001
+ "legs": {
1002
+ "domains": {
1003
+ "status": "pass",
1004
+ "behaviour": false,
1005
+ "detail": "effective, warnings and metadata all match"
1006
+ },
1007
+ "wire": {
1008
+ "status": "pass",
1009
+ "behaviour": false,
1010
+ "detail": "effective, warnings and metadata all match"
1011
+ },
1012
+ "localRoot": {
1013
+ "status": "pass",
1014
+ "behaviour": false,
1015
+ "detail": "effective, warnings and metadata all match"
1016
+ }
1017
+ }
1018
+ },
1019
+ "t04-secret-literal-never-in-warning-value": {
1020
+ "firstRed": true,
1021
+ "legs": {
1022
+ "domains": {
1023
+ "status": "diff",
1024
+ "behaviour": true,
1025
+ "detail": "1 effective diff(s), 2 missing / 1 extra warning(s), 0 metadata diff(s)"
1026
+ },
1027
+ "wire": {
1028
+ "status": "diff",
1029
+ "behaviour": true,
1030
+ "detail": "1 effective diff(s), 2 missing / 1 extra warning(s), 0 metadata diff(s)"
1031
+ },
1032
+ "localRoot": {
1033
+ "status": "diff",
1034
+ "behaviour": true,
1035
+ "detail": "1 effective diff(s), 2 missing / 1 extra warning(s), 0 metadata diff(s)"
1036
+ }
1037
+ }
1038
+ },
958
1039
  "z01-every-domain-empty-object": {
959
1040
  "firstRed": false,
960
1041
  "legs": {
@@ -8,9 +8,10 @@
8
8
  "why": "旧版坐标是点号串、今天是段数组;归一 = 按 `.` 拼串,这正是 3.0.0 要消掉的有损编码(`[\"a.b\"]` 与 `[\"a\",\"b\"]` 归一后同串)"
9
9
  },
10
10
  "summary": {
11
- "pass": 102,
12
- "diff": 33,
13
- "expected-rejected": 12,
11
+ "pass": 108,
12
+ "diff": 36,
13
+ "diff-ledgered": 0,
14
+ "expected-rejected": 15,
14
15
  "harness-error": 0,
15
16
  "skipped": 0
16
17
  },
@@ -955,6 +956,86 @@
955
956
  }
956
957
  }
957
958
  },
959
+ "t01-absent-domain-key-not-null": {
960
+ "firstRed": false,
961
+ "legs": {
962
+ "domains": {
963
+ "status": "pass",
964
+ "behaviour": false,
965
+ "detail": "effective, warnings and metadata all match"
966
+ },
967
+ "wire": {
968
+ "status": "pass",
969
+ "behaviour": false,
970
+ "detail": "effective, warnings and metadata all match"
971
+ },
972
+ "localRoot": {
973
+ "status": "pass",
974
+ "behaviour": false,
975
+ "detail": "effective, warnings and metadata all match"
976
+ }
977
+ }
978
+ },
979
+ "t02-entry-salvage-vs-whole-domain-refusal": {
980
+ "firstRed": false,
981
+ "legs": {
982
+ "domains": {
983
+ "status": "expected-rejected",
984
+ "behaviour": false,
985
+ "detail": "rejected at `validate` as expected"
986
+ },
987
+ "wire": {
988
+ "status": "expected-rejected",
989
+ "behaviour": false,
990
+ "detail": "rejected at `validate` as expected"
991
+ },
992
+ "localRoot": {
993
+ "status": "expected-rejected",
994
+ "behaviour": false,
995
+ "detail": "rejected at `validate` as expected"
996
+ }
997
+ }
998
+ },
999
+ "t03-prototype-name-key-not-swallowed": {
1000
+ "firstRed": false,
1001
+ "legs": {
1002
+ "domains": {
1003
+ "status": "pass",
1004
+ "behaviour": false,
1005
+ "detail": "effective, warnings and metadata all match"
1006
+ },
1007
+ "wire": {
1008
+ "status": "pass",
1009
+ "behaviour": false,
1010
+ "detail": "effective, warnings and metadata all match"
1011
+ },
1012
+ "localRoot": {
1013
+ "status": "pass",
1014
+ "behaviour": false,
1015
+ "detail": "effective, warnings and metadata all match"
1016
+ }
1017
+ }
1018
+ },
1019
+ "t04-secret-literal-never-in-warning-value": {
1020
+ "firstRed": true,
1021
+ "legs": {
1022
+ "domains": {
1023
+ "status": "diff",
1024
+ "behaviour": true,
1025
+ "detail": "1 effective diff(s), 2 missing / 1 extra warning(s), 0 metadata diff(s)"
1026
+ },
1027
+ "wire": {
1028
+ "status": "diff",
1029
+ "behaviour": true,
1030
+ "detail": "1 effective diff(s), 2 missing / 1 extra warning(s), 0 metadata diff(s)"
1031
+ },
1032
+ "localRoot": {
1033
+ "status": "diff",
1034
+ "behaviour": true,
1035
+ "detail": "1 effective diff(s), 2 missing / 1 extra warning(s), 0 metadata diff(s)"
1036
+ }
1037
+ }
1038
+ },
958
1039
  "z01-every-domain-empty-object": {
959
1040
  "firstRed": false,
960
1041
  "legs": {
@@ -8,9 +8,10 @@
8
8
  "why": "旧版坐标是点号串、今天是段数组;归一 = 按 `.` 拼串,这正是 3.0.0 要消掉的有损编码(`[\"a.b\"]` 与 `[\"a\",\"b\"]` 归一后同串)"
9
9
  },
10
10
  "summary": {
11
- "pass": 129,
11
+ "pass": 138,
12
12
  "diff": 6,
13
- "expected-rejected": 12,
13
+ "diff-ledgered": 0,
14
+ "expected-rejected": 15,
14
15
  "harness-error": 0,
15
16
  "skipped": 0
16
17
  },
@@ -955,6 +956,86 @@
955
956
  }
956
957
  }
957
958
  },
959
+ "t01-absent-domain-key-not-null": {
960
+ "firstRed": false,
961
+ "legs": {
962
+ "domains": {
963
+ "status": "pass",
964
+ "behaviour": false,
965
+ "detail": "effective, warnings and metadata all match"
966
+ },
967
+ "wire": {
968
+ "status": "pass",
969
+ "behaviour": false,
970
+ "detail": "effective, warnings and metadata all match"
971
+ },
972
+ "localRoot": {
973
+ "status": "pass",
974
+ "behaviour": false,
975
+ "detail": "effective, warnings and metadata all match"
976
+ }
977
+ }
978
+ },
979
+ "t02-entry-salvage-vs-whole-domain-refusal": {
980
+ "firstRed": false,
981
+ "legs": {
982
+ "domains": {
983
+ "status": "expected-rejected",
984
+ "behaviour": false,
985
+ "detail": "rejected at `validate` as expected"
986
+ },
987
+ "wire": {
988
+ "status": "expected-rejected",
989
+ "behaviour": false,
990
+ "detail": "rejected at `validate` as expected"
991
+ },
992
+ "localRoot": {
993
+ "status": "expected-rejected",
994
+ "behaviour": false,
995
+ "detail": "rejected at `validate` as expected"
996
+ }
997
+ }
998
+ },
999
+ "t03-prototype-name-key-not-swallowed": {
1000
+ "firstRed": false,
1001
+ "legs": {
1002
+ "domains": {
1003
+ "status": "pass",
1004
+ "behaviour": false,
1005
+ "detail": "effective, warnings and metadata all match"
1006
+ },
1007
+ "wire": {
1008
+ "status": "pass",
1009
+ "behaviour": false,
1010
+ "detail": "effective, warnings and metadata all match"
1011
+ },
1012
+ "localRoot": {
1013
+ "status": "pass",
1014
+ "behaviour": false,
1015
+ "detail": "effective, warnings and metadata all match"
1016
+ }
1017
+ }
1018
+ },
1019
+ "t04-secret-literal-never-in-warning-value": {
1020
+ "firstRed": false,
1021
+ "legs": {
1022
+ "domains": {
1023
+ "status": "pass",
1024
+ "behaviour": false,
1025
+ "detail": "effective, warnings and metadata all match"
1026
+ },
1027
+ "wire": {
1028
+ "status": "pass",
1029
+ "behaviour": false,
1030
+ "detail": "effective, warnings and metadata all match"
1031
+ },
1032
+ "localRoot": {
1033
+ "status": "pass",
1034
+ "behaviour": false,
1035
+ "detail": "effective, warnings and metadata all match"
1036
+ }
1037
+ }
1038
+ },
958
1039
  "z01-every-domain-empty-object": {
959
1040
  "firstRed": false,
960
1041
  "legs": {
@@ -8,9 +8,10 @@
8
8
  "why": "旧版坐标是点号串、今天是段数组;归一 = 按 `.` 拼串,这正是 3.0.0 要消掉的有损编码(`[\"a.b\"]` 与 `[\"a\",\"b\"]` 归一后同串)"
9
9
  },
10
10
  "summary": {
11
- "pass": 134,
11
+ "pass": 143,
12
12
  "diff": 1,
13
- "expected-rejected": 12,
13
+ "diff-ledgered": 0,
14
+ "expected-rejected": 15,
14
15
  "harness-error": 0,
15
16
  "skipped": 0
16
17
  },
@@ -955,6 +956,86 @@
955
956
  }
956
957
  }
957
958
  },
959
+ "t01-absent-domain-key-not-null": {
960
+ "firstRed": false,
961
+ "legs": {
962
+ "domains": {
963
+ "status": "pass",
964
+ "behaviour": false,
965
+ "detail": "effective, warnings and metadata all match"
966
+ },
967
+ "wire": {
968
+ "status": "pass",
969
+ "behaviour": false,
970
+ "detail": "effective, warnings and metadata all match"
971
+ },
972
+ "localRoot": {
973
+ "status": "pass",
974
+ "behaviour": false,
975
+ "detail": "effective, warnings and metadata all match"
976
+ }
977
+ }
978
+ },
979
+ "t02-entry-salvage-vs-whole-domain-refusal": {
980
+ "firstRed": false,
981
+ "legs": {
982
+ "domains": {
983
+ "status": "expected-rejected",
984
+ "behaviour": false,
985
+ "detail": "rejected at `validate` as expected"
986
+ },
987
+ "wire": {
988
+ "status": "expected-rejected",
989
+ "behaviour": false,
990
+ "detail": "rejected at `validate` as expected"
991
+ },
992
+ "localRoot": {
993
+ "status": "expected-rejected",
994
+ "behaviour": false,
995
+ "detail": "rejected at `validate` as expected"
996
+ }
997
+ }
998
+ },
999
+ "t03-prototype-name-key-not-swallowed": {
1000
+ "firstRed": false,
1001
+ "legs": {
1002
+ "domains": {
1003
+ "status": "pass",
1004
+ "behaviour": false,
1005
+ "detail": "effective, warnings and metadata all match"
1006
+ },
1007
+ "wire": {
1008
+ "status": "pass",
1009
+ "behaviour": false,
1010
+ "detail": "effective, warnings and metadata all match"
1011
+ },
1012
+ "localRoot": {
1013
+ "status": "pass",
1014
+ "behaviour": false,
1015
+ "detail": "effective, warnings and metadata all match"
1016
+ }
1017
+ }
1018
+ },
1019
+ "t04-secret-literal-never-in-warning-value": {
1020
+ "firstRed": false,
1021
+ "legs": {
1022
+ "domains": {
1023
+ "status": "pass",
1024
+ "behaviour": false,
1025
+ "detail": "effective, warnings and metadata all match"
1026
+ },
1027
+ "wire": {
1028
+ "status": "pass",
1029
+ "behaviour": false,
1030
+ "detail": "effective, warnings and metadata all match"
1031
+ },
1032
+ "localRoot": {
1033
+ "status": "pass",
1034
+ "behaviour": false,
1035
+ "detail": "effective, warnings and metadata all match"
1036
+ }
1037
+ }
1038
+ },
958
1039
  "z01-every-domain-empty-object": {
959
1040
  "firstRed": false,
960
1041
  "legs": {
@@ -227,7 +227,7 @@ export declare function statusRowsToPrune(rows: {
227
227
  * store upgrades with zero data migration and zero gate loss. An explicitly-set governance domain WINS
228
228
  * (its absence-of-a-key then means "center not managing", never "fall back to legacy runtime").
229
229
  *
230
- * SUNSET (1.11.0): removal is a **persistent-data** break — a store still carrying the 0.5 shape would lose
230
+ * SUNSET (2.0.0): removal is a **persistent-data** break — a store still carrying the 0.5 shape would lose
231
231
  * its guardrails silently, so this arm cannot simply be deleted at a minor. It goes at the next MAJOR, with
232
232
  * the standard persistent-data treatment (a loud refusal naming the domain + a one-time migration on the
233
233
  * writer side), and the closing condition is observable rather than a promise: `buildEffective` now emits
@@ -273,7 +273,7 @@ export type EffectiveReadWarning = {
273
273
  }
274
274
  /** 0.5 期的 runtime 文档里还带着治理三闸,而 governance 域从未被设过 —— 读侧抬升腿真生效了。
275
275
  * `keys` = 这次抬起来的那几个键。**照旧生效,只是不再无声**:兼容窗要能关掉,前提是有人知道它还开着。
276
- * 1.11.0 起。 */
276
+ * 2.0.0 起。 */
277
277
  | {
278
278
  domain: "governance";
279
279
  kind: "legacy-governance-lifted";
@@ -282,7 +282,7 @@ export type EffectiveReadWarning = {
282
282
  /** 一条**条目**没通过它自己的 entry schema,被单独丢掉了(域内其余条目照常生效)。`path` = 段坐标
283
283
  * (`["models",3]` / `["roles","summarize"]`),与 `unknown-keys-dropped` 的坐标形同一套。逐条一发 —— 载荷是
284
284
  * O(域里的条目数),与被读文档同阶,不放大,故不设条数上限(有上限的是**单条**告警里的键列表)。
285
- * 1.11.0 起;只可能来自 {@link DOMAIN_READ_FALLBACK} 判 `"default"` 的域,gate 域坏形仍然 throw。 */
285
+ * 2.0.0 起;只可能来自 {@link DOMAIN_READ_FALLBACK} 判 `"default"` 的域,gate 域坏形仍然 throw。 */
286
286
  | {
287
287
  domain: DomainName;
288
288
  kind: "entry-dropped";
@@ -459,7 +459,7 @@ export interface GrandfatherHostsReadResult {
459
459
  * everything else (regex, types, duplicates) is left for parseDomain — this is a targeted grandfather, not a
460
460
  * lenient parser. PURE + idempotent; returns the ORIGINAL reference when nothing exceeds the bounds.
461
461
  *
462
- * SUNSET (1.11.0): same persistent-data class as the governance lift — it goes at the next MAJOR. This one was
462
+ * SUNSET (2.0.0): same persistent-data class as the governance lift — it goes at the next MAJOR. This one was
463
463
  * never silent (`hosts-grandfathered` fires whenever it clamps), so the closing condition is already
464
464
  * observable: a deployment that has not seen that warning across a full read cycle no longer needs the arm. */
465
465
  export declare function grandfatherHostsRead(raw: unknown): GrandfatherHostsReadResult;
@@ -123,7 +123,7 @@ export function parseDomain(domain, raw) {
123
123
  return r.data;
124
124
  throw sanitizeZodError(r.error); // recursive redaction (message/received/unionErrors) — no secret echo. R13/R14.
125
125
  }
126
- // ── 逐条容错律(1.11.0,S-144 按类修)───────────────────────────────────────────────────────────────
126
+ // ── 逐条容错律(2.0.0,S-144 按类修)───────────────────────────────────────────────────────────────
127
127
  //
128
128
  // 病:域解析整域 all-or-nothing —— 13 个模型里坏一条,整张目录退成 schema 默认 = 一条都不剩。缓解一直
129
129
  // 是**逐键**打补丁(把新键改成 `z.unknown()` 让它别拒),那是给每个新键加特判,规则只会越来越多;
@@ -306,7 +306,7 @@ export function statusRowsToPrune(rows, opts) {
306
306
  * store upgrades with zero data migration and zero gate loss. An explicitly-set governance domain WINS
307
307
  * (its absence-of-a-key then means "center not managing", never "fall back to legacy runtime").
308
308
  *
309
- * SUNSET (1.11.0): removal is a **persistent-data** break — a store still carrying the 0.5 shape would lose
309
+ * SUNSET (2.0.0): removal is a **persistent-data** break — a store still carrying the 0.5 shape would lose
310
310
  * its guardrails silently, so this arm cannot simply be deleted at a minor. It goes at the next MAJOR, with
311
311
  * the standard persistent-data treatment (a loud refusal naming the domain + a one-time migration on the
312
312
  * writer side), and the closing condition is observable rather than a promise: `buildEffective` now emits
@@ -637,7 +637,7 @@ export const DOMAIN_READ_FALLBACK = {
637
637
  * everything else (regex, types, duplicates) is left for parseDomain — this is a targeted grandfather, not a
638
638
  * lenient parser. PURE + idempotent; returns the ORIGINAL reference when nothing exceeds the bounds.
639
639
  *
640
- * SUNSET (1.11.0): same persistent-data class as the governance lift — it goes at the next MAJOR. This one was
640
+ * SUNSET (2.0.0): same persistent-data class as the governance lift — it goes at the next MAJOR. This one was
641
641
  * never silent (`hosts-grandfathered` fires whenever it clamps), so the closing condition is already
642
642
  * observable: a deployment that has not seen that warning across a full read cycle no longer needs the arm. */
643
643
  export function grandfatherHostsRead(raw) {
@@ -697,7 +697,7 @@ export function buildEffective(version, getRaw, updatedAt, onWarning) {
697
697
  catch (e) {
698
698
  if (DOMAIN_READ_FALLBACK[domain] === "throw")
699
699
  throw e;
700
- // 逐条容错(1.11.0)在整域降级**之前**试一次:只丢掉真正坏掉的那几条条目,同域好兄弟活下来。
700
+ // 逐条容错(2.0.0)在整域降级**之前**试一次:只丢掉真正坏掉的那几条条目,同域好兄弟活下来。
701
701
  // 告警先缓存再决定 —— 一个域只给一个结论:救活了就逐条报 `entry-dropped`,没救活就只报
702
702
  // `domain-defaulted`(那一域的条目反正一条都不剩,再讲「丢了第 3 条」只会误导)。
703
703
  const salvage = salvageEntries(DOMAIN_SCHEMAS[domain], raw);
@@ -728,7 +728,7 @@ export function buildEffective(version, getRaw, updatedAt, onWarning) {
728
728
  let governanceSource = governanceRaw;
729
729
  if (governanceRaw === undefined) {
730
730
  const lifted = legacyGovernanceFromRuntime(getRaw("runtime"));
731
- // 兼容臂真生效时出声(1.11.0):行为一字不变,但窗要能关就得有人看得见它还开着。
731
+ // 兼容臂真生效时出声(2.0.0):行为一字不变,但窗要能关就得有人看得见它还开着。
732
732
  if (lifted !== undefined)
733
733
  onWarning?.({ domain: "governance", kind: "legacy-governance-lifted", keys: Object.keys(lifted).map((k) => [k]) });
734
734
  governanceSource = lifted;
@@ -23,7 +23,7 @@ export type SiblingResolver = <K extends keyof DomainConfig>(domain: K) => Promi
23
23
  * Widened from the fat ConfigStore to the narrow {@link ConfigReader} (it only calls `getDomain`) so a TOC
24
24
  * file source can use it without the full store.
25
25
  *
26
- * 1.11.0 renamed this from `siblingResolver` (BREAKING, zero aliases): the naming law is `build*` returns
26
+ * 2.0.0 renamed this from `siblingResolver` (BREAKING, zero aliases): the naming law is `build*` returns
27
27
  * plain DATA and `create*` returns a LIVE object — this returns a closure, so it was on the wrong side of
28
28
  * the line and carried neither prefix. A consumer's compile error IS the notice; the fix is the new name. */
29
29
  export declare function createSiblingResolver(store: ConfigReader, pending?: Partial<{
@@ -2,7 +2,7 @@
2
2
  * Widened from the fat ConfigStore to the narrow {@link ConfigReader} (it only calls `getDomain`) so a TOC
3
3
  * file source can use it without the full store.
4
4
  *
5
- * 1.11.0 renamed this from `siblingResolver` (BREAKING, zero aliases): the naming law is `build*` returns
5
+ * 2.0.0 renamed this from `siblingResolver` (BREAKING, zero aliases): the naming law is `build*` returns
6
6
  * plain DATA and `create*` returns a LIVE object — this returns a closure, so it was on the wrong side of
7
7
  * the line and carried neither prefix. A consumer's compile error IS the notice; the fix is the new name. */
8
8
  export function createSiblingResolver(store, pending) {
package/dist/hooks.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  * DRIFT: this package OWNS the hooks contract, so it owns noticing that CC moved. `test/upstream-drift.test.ts`
11
11
  * compares {@link HOOK_EVENTS} against a CC anchor snapshot that `scripts/extract-cc-hook-events.mjs` extracts
12
12
  * from the CLI bundle — a word CC has and this set does not is a RED test naming it, instead of a consumer
13
- * discovering it the hard way (the 1.3.0 / 1.6.0 / 1.8.0 / 1.11.0 pattern).
13
+ * discovering it the hard way (the 1.3.0 / 1.6.0 / 1.8.0 / 2.0.0 pattern).
14
14
  *
15
15
  * CONSUMERS
16
16
  * - service (the worker server): `TaskRequest.settings.hooks` wire face = `HooksConfig` below; the worker-side
@@ -35,7 +35,7 @@ export declare const CC_198_HOOK_EVENTS: readonly ["PreToolUse", "PostToolUse",
35
35
  * Post-CC-2.1.198 additions (sema superset; CC added them after 198).
36
36
  * APPEND-ONLY: new members go at the tail (1.3.0 `DirectoryAdded`, CC 2.1.219 — CC's own tuple places it
37
37
  * between FileChanged and MessageDisplay; the declaration order here is not normative, the enum is a set).
38
- * 1.11.0 appends the model-switch pair (`PreModelSwitch` / `PostModelSwitch`, CC 2.1.259 — absent from the
38
+ * 2.0.0 appends the model-switch pair (`PreModelSwitch` / `PostModelSwitch`, CC 2.1.259 — absent from the
39
39
  * 2.1.250 corpus, so 250→259 is when they landed upstream).
40
40
  *
41
41
  * 🔴 This list is no longer maintained by hand-reading a CLI bundle: `test/upstream-drift.test.ts` fails
package/dist/hooks.js CHANGED
@@ -10,7 +10,7 @@
10
10
  * DRIFT: this package OWNS the hooks contract, so it owns noticing that CC moved. `test/upstream-drift.test.ts`
11
11
  * compares {@link HOOK_EVENTS} against a CC anchor snapshot that `scripts/extract-cc-hook-events.mjs` extracts
12
12
  * from the CLI bundle — a word CC has and this set does not is a RED test naming it, instead of a consumer
13
- * discovering it the hard way (the 1.3.0 / 1.6.0 / 1.8.0 / 1.11.0 pattern).
13
+ * discovering it the hard way (the 1.3.0 / 1.6.0 / 1.8.0 / 2.0.0 pattern).
14
14
  *
15
15
  * CONSUMERS
16
16
  * - service (the worker server): `TaskRequest.settings.hooks` wire face = `HooksConfig` below; the worker-side
@@ -64,7 +64,7 @@ export const CC_198_HOOK_EVENTS = [
64
64
  * Post-CC-2.1.198 additions (sema superset; CC added them after 198).
65
65
  * APPEND-ONLY: new members go at the tail (1.3.0 `DirectoryAdded`, CC 2.1.219 — CC's own tuple places it
66
66
  * between FileChanged and MessageDisplay; the declaration order here is not normative, the enum is a set).
67
- * 1.11.0 appends the model-switch pair (`PreModelSwitch` / `PostModelSwitch`, CC 2.1.259 — absent from the
67
+ * 2.0.0 appends the model-switch pair (`PreModelSwitch` / `PostModelSwitch`, CC 2.1.259 — absent from the
68
68
  * 2.1.250 corpus, so 250→259 is when they landed upstream).
69
69
  *
70
70
  * 🔴 This list is no longer maintained by hand-reading a CLI bundle: `test/upstream-drift.test.ts` fails
@@ -60,7 +60,7 @@ export declare function isSchedulerRecord(v: unknown): v is SchedulerRecord;
60
60
  * `switch` gains an arm to write).
61
61
  * - `malformed-record` — the record failed {@link isSchedulerRecord} and was dropped; `record` = the
62
62
  * raw (unvalidated) value, for diagnostics.
63
- * - `durable-scope-rekeyed` — the durable-scope compat arm rewrote this row's `scope` (1.11.0; before that
63
+ * - `durable-scope-rekeyed` — the durable-scope compat arm rewrote this row's `scope` (2.0.0; before that
64
64
  * the rewrite happened silently every parse). */
65
65
  export type SchedulerParseWarning = {
66
66
  index: number;
@@ -56,7 +56,7 @@ export function isSchedulerRecord(v) {
56
56
  * 窄读判据:`lifetime` 不在本契约的显式键上(server 写侧作为 forward-compat 字段随行),按未知
57
57
  * 字段窄读——`"session"` 行是会话链键,零触碰;其余(缺席=durable 默认)按 durable 归一。
58
58
  *
59
- * 落日(1.11.0):删除它 = **持久数据**面的破坏(仍按旧键存着的 durable 行会就此找不回),所以不能在
59
+ * 落日(2.0.0):删除它 = **持久数据**面的破坏(仍按旧键存着的 durable 行会就此找不回),所以不能在
60
60
  * minor 上一删了事 —— 归下一个 MAJOR,按持久数据的规矩办(响亮拒收 + 一次性迁移)。在那之前,本版把
61
61
  * 这次重写从**静默**改成**出声**(`durable-scope-rekeyed`,带改写前后):关窗的前提是有人能证明它
62
62
  * 已经不再触发,而不是有人记得它还在。
package/dist/types.d.ts CHANGED
@@ -125,7 +125,7 @@ export interface ParseTransparentKey {
125
125
  * 五行同义散文 ×3,没有任何一处能回答「一共有几个这样的键、分别归谁校验」。那正是「修法给每个新键加一条
126
126
  * 特判」的形。这张表把那段理由收成一处:键在这里登记,JSDoc 只留一行指过来。
127
127
  *
128
- * 1.11.0 起整域 all-or-nothing 已按类改成逐条容错(坏条目逐条丢、同域其余条目存活),所以「设形判据
128
+ * 2.0.0 起整域 all-or-nothing 已按类改成逐条容错(坏条目逐条丢、同域其余条目存活),所以「设形判据
129
129
  * 会抹掉整域」这条**理由本身已经弱化** —— 但登记表要回答的问题没变:这些键的形归谁校验。新键要不要
130
130
  * 解析透明,按「本包是不是那张形表的属主」判,不再按「怕连坐」判。
131
131
  *
@@ -4812,7 +4812,7 @@ export type ExecutionPolicy = z.infer<typeof ExecutionPolicy>;
4812
4812
  * center mint 端点)统一产 **uuidv7**。36 字符,天然满足 design/142 §1.2 段编码 64 上限。
4813
4813
  * SINGLE-SOURCE 纪律:本常量是引擎那条正则的**自持镜像**(本仓不带引擎运行时依赖轴),对拍走 dev-only
4814
4814
  * conformance(never a runtime import,EffectiveKey/coreTypes 先例)。
4815
- * 1.11.0:drift-lock 已建(`test/upstream-drift.test.ts` ③)—— pattern 必须与引擎逐字相同,唯一成文的差是
4815
+ * 2.0.0:drift-lock 已建(`test/upstream-drift.test.ts` ③)—— pattern 必须与引擎逐字相同,唯一成文的差是
4816
4816
  * flags:本常量刻意**不带** `i`,因为它是登记簿 Record 的**键**,大小写不同的同一个 UUID 会变成两条登记行
4817
4817
  * (同一 project 双注册);引擎侧是识别语义(读 marker / 找回身份),放宽合理。 */
4818
4818
  export declare const PROJECT_ID_REGEX: RegExp;
package/dist/types.js CHANGED
@@ -301,7 +301,7 @@ export const SealedApiKey = z.object({
301
301
  * 五行同义散文 ×3,没有任何一处能回答「一共有几个这样的键、分别归谁校验」。那正是「修法给每个新键加一条
302
302
  * 特判」的形。这张表把那段理由收成一处:键在这里登记,JSDoc 只留一行指过来。
303
303
  *
304
- * 1.11.0 起整域 all-or-nothing 已按类改成逐条容错(坏条目逐条丢、同域其余条目存活),所以「设形判据
304
+ * 2.0.0 起整域 all-or-nothing 已按类改成逐条容错(坏条目逐条丢、同域其余条目存活),所以「设形判据
305
305
  * 会抹掉整域」这条**理由本身已经弱化** —— 但登记表要回答的问题没变:这些键的形归谁校验。新键要不要
306
306
  * 解析透明,按「本包是不是那张形表的属主」判,不再按「怕连坐」判。
307
307
  *
@@ -634,7 +634,7 @@ export const ScenarioEntry = z.object({
634
634
  // registry field would become an ambiguous precedence channel」):配置域 prompt 单入口=center
635
635
  // prompts binding(scenario 维度);引擎 API 层 TaskSpec.systemPrompt 保留(不同层,勿混)。
636
636
  // 现网无用户直删;z.object 非 strict ⇒ 存量数据带 prompt 被 strip,parse 不炸。
637
- // 落日(1.11.0):本条是**纯墓碑**(零代码,靠 strip 生效),没有要删的兼容码;它留在这里的唯一作用
637
+ // 落日(2.0.0):本条是**纯墓碑**(零代码,靠 strip 生效),没有要删的兼容码;它留在这里的唯一作用
638
638
  // 是让下一个读到这段 schema 的人知道 `prompt` 这个名字曾经在这里、别再铸回来。0.19.0 起存量文档带
639
639
  // 它会被 `unknown-keys-dropped` 点名,所以「还有人在写它」是可观察的,不靠记忆。
640
640
  enabled: z.boolean().default(true),
@@ -1336,7 +1336,7 @@ export const ExecutionPolicy = z.object({
1336
1336
  * center mint 端点)统一产 **uuidv7**。36 字符,天然满足 design/142 §1.2 段编码 64 上限。
1337
1337
  * SINGLE-SOURCE 纪律:本常量是引擎那条正则的**自持镜像**(本仓不带引擎运行时依赖轴),对拍走 dev-only
1338
1338
  * conformance(never a runtime import,EffectiveKey/coreTypes 先例)。
1339
- * 1.11.0:drift-lock 已建(`test/upstream-drift.test.ts` ③)—— pattern 必须与引擎逐字相同,唯一成文的差是
1339
+ * 2.0.0:drift-lock 已建(`test/upstream-drift.test.ts` ③)—— pattern 必须与引擎逐字相同,唯一成文的差是
1340
1340
  * flags:本常量刻意**不带** `i`,因为它是登记簿 Record 的**键**,大小写不同的同一个 UUID 会变成两条登记行
1341
1341
  * (同一 project 双注册);引擎侧是识别语义(读 marker / 找回身份),放宽合理。 */
1342
1342
  export const PROJECT_ID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sema-agent/settings-schema",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Sema settings schema — pure config contract (zod domains + effective-config + roster resolution + ref-integrity + remoteExec) shared by sema-registry, 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",