@sema-agent/settings-schema 7.0.0 → 8.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 (106) hide show
  1. package/CHANGELOG.md +173 -1
  2. package/README.md +47 -5
  3. package/conformance/VERSION +1 -1
  4. package/conformance/cases/c01-entry-salvage-then-typo/expected.json +5 -0
  5. package/conformance/cases/c02-hosts-clamp-stacked/expected.json +5 -0
  6. package/conformance/cases/c03-literal-dotted-top-key/expected.json +41 -0
  7. package/conformance/cases/c04-all-bad-collection-not-salvaged/expected.json +5 -0
  8. package/conformance/cases/c05-gate-domain-bad-entry-throws/expected.json +5 -0
  9. package/conformance/cases/c06-legacy-governance-lift/expected.json +12 -0
  10. package/conformance/cases/c07-hooks-is-not-a-config-domain/expected.json +5 -0
  11. package/conformance/cases/c08-limits-unknown-carried-64/expected.json +77 -0
  12. package/conformance/cases/c09-limits-unknown-carried-65/expected.json +78 -0
  13. package/conformance/cases/c10-record-key-secret-redacted-twice/expected.json +5 -0
  14. package/conformance/cases/c11-unicode-unknown-keys/expected.json +14 -0
  15. package/conformance/cases/c12-prototype-name-top-keys/expected.json +5 -0
  16. package/conformance/cases/c13-models-field-null/expected.json +5 -0
  17. package/conformance/cases/c14-models-field-empty-array/expected.json +16 -0
  18. package/conformance/cases/c15-models-field-number/expected.json +5 -0
  19. package/conformance/cases/c16-deep-nesting-205/expected.json +14 -0
  20. package/conformance/cases/c17-empty-domain-file/expected.json +10 -0
  21. package/conformance/cases/c18-wire-envelope-not-an-object/expected.json +10 -0
  22. package/conformance/cases/c19-wire-envelope-no-version/expected.json +10 -0
  23. package/conformance/cases/c20-governance-absent-lifts/expected.json +12 -0
  24. package/conformance/cases/c21-governance-empty-object-wins/expected.json +13 -0
  25. package/conformance/cases/c22-governance-null-throws/expected.json +5 -0
  26. package/conformance/cases/c23-mixed-validity-models/expected.json +5 -0
  27. package/conformance/cases/c24-valid-entries-with-unknown-keys/expected.json +29 -0
  28. package/conformance/cases/c25-published-roundtrip-zero-warnings/expected.json +33 -0
  29. package/conformance/cases/c26-hosts-array-1024/expected.json +7183 -0
  30. package/conformance/cases/c27-hosts-array-1025/expected.json +5 -0
  31. package/conformance/cases/c28-large-document-over-1mb/expected.json +14 -0
  32. package/conformance/cases/c29-salvage-then-domain-refine-fails/expected.json +5 -0
  33. package/conformance/cases/c30-version-triple-a-first/expected.json +29 -0
  34. package/conformance/cases/c31-version-triple-b-changed/expected.json +29 -0
  35. package/conformance/cases/c32-version-triple-a-restored/expected.json +29 -0
  36. package/conformance/cases/c33-limits-nested-carried-key/expected.json +17 -0
  37. package/conformance/cases/c34-skills-content-vs-manifest/expected.json +23 -0
  38. package/conformance/cases/c35-portable-domain-file-is-null/expected.json +5 -0
  39. package/conformance/cases/c36-skills-entry-without-content/expected.json +23 -0
  40. package/conformance/cases/c37-skills-field-null/expected.json +5 -0
  41. package/conformance/cases/c38-remote-exec-is-a-non-domain-file/expected.json +5 -0
  42. package/conformance/cases/c39-hidden-file-in-config-d/expected.json +5 -0
  43. package/conformance/cases/c40-s712-identity-only-what-reads-out/expected.json +5 -0
  44. package/conformance/cases/c41-s792-encoded-pem-identity/expected.json +5 -0
  45. package/conformance/cases/c42-s792-unknown-key-secret-redacted/expected.json +33 -0
  46. package/conformance/cases/c43-s792-form-and-deep-encoded-pem/expected.json +5 -0
  47. package/conformance/cases/c44-s792-utf8-escape-glued-token/expected.json +5 -0
  48. package/conformance/cases/c45-s792-identity-bounds-and-decode-depth/expected.json +5 -0
  49. package/conformance/cases/c46-s811-host-name-url-userinfo-characterization/expected.json +5 -0
  50. package/conformance/cases/c47-s811-roles-key-url-userinfo-characterization/expected.json +5 -0
  51. package/conformance/cases/c48-s935-model-headers-transported/expected.json +59 -0
  52. package/conformance/cases/c49-s935-model-headers-secret-entry-dropped/expected.json +5 -0
  53. package/conformance/cases/c50-s784-lane-host-legal/expected.json +44 -0
  54. package/conformance/cases/c51-s784-lane-e2b-legal/expected.json +46 -0
  55. package/conformance/cases/c52-s784-lane-k8s-legal/expected.json +48 -0
  56. package/conformance/cases/c53-s784-lane-ssh-legal/expected.json +48 -0
  57. package/conformance/cases/c54-s784-lane-adb-legal/expected.json +44 -0
  58. package/conformance/cases/c55-s784-lane-local-docker-legal/expected.json +45 -0
  59. package/conformance/cases/c56-s784-lane-device-legal/expected.json +51 -0
  60. package/conformance/cases/c57-s784-g1-enabled-no-lane/expected.json +5 -0
  61. package/conformance/cases/c58-s784-g2-multitenant-host/expected.json +5 -0
  62. package/conformance/cases/c59-s784-g3-k8s-missing-image/expected.json +5 -0
  63. package/conformance/cases/c60-s784-g3-e2b-missing-key/expected.json +5 -0
  64. package/conformance/cases/c61-s784-g3-other-lane-key/expected.json +5 -0
  65. package/conformance/cases/c62-s784-g7a-session-tidb/expected.json +5 -0
  66. package/conformance/cases/c63-s784-host-two-replicas/expected.json +5 -0
  67. package/conformance/cases/c64-s784-multitenant-local-store/expected.json +5 -0
  68. package/conformance/cases/c65-s784-pg-without-db/expected.json +5 -0
  69. package/conformance/cases/c66-s784-memory-backend-mismatch/expected.json +5 -0
  70. package/conformance/cases/c67-s784-retired-field-loud/expected.json +5 -0
  71. package/conformance/cases/c67-s784-retired-field-loud/meta.json +1 -1
  72. package/conformance/cases/c68-s784-device-local-store/expected.json +5 -0
  73. package/conformance/cases/cc01-mcp-toolfaces-non-object/expected.json +54 -0
  74. package/conformance/cases/cc02-mcp-source-key-is-transported/expected.json +27 -0
  75. package/conformance/cases/cc03-model-compat-unknown-subkey/expected.json +33 -0
  76. package/conformance/cases/cli01-model-name-nfc-vs-nfd/expected.json +5 -0
  77. package/conformance/cases/cli02-control-and-zero-width-chars/expected.json +5 -0
  78. package/conformance/cases/cli03-credential-pasted-into-unknown-key/expected.json +22 -0
  79. package/conformance/cases/cli04-env-value-with-newline/expected.json +46 -0
  80. package/conformance/cases/cli05-long-and-prefix-colliding-names/expected.json +53 -0
  81. package/conformance/cases/t01-absent-domain-key-not-null/expected.json +5 -0
  82. package/conformance/cases/t02-entry-salvage-vs-whole-domain-refusal/expected.json +5 -0
  83. package/conformance/cases/t03-prototype-name-key-not-swallowed/expected.json +29 -0
  84. package/conformance/cases/t04-secret-literal-never-in-warning-value/expected.json +5 -0
  85. package/conformance/cases/z01-every-domain-empty-object/expected.json +64 -0
  86. package/conformance/cases/z02-every-domain-unknown-key/expected.json +66 -0
  87. package/dist/cli.js +97 -25
  88. package/dist/config-fns.js +7 -1
  89. package/dist/conformance/contract-adapter.d.ts +4 -2
  90. package/dist/conformance/contract-adapter.js +21 -7
  91. package/dist/conformance/corpus.js +12 -7
  92. package/dist/conformance/derive.d.ts +26 -0
  93. package/dist/conformance/derive.js +25 -2
  94. package/dist/conformance/index.d.ts +4 -3
  95. package/dist/conformance/index.js +4 -3
  96. package/dist/conformance/run.d.ts +3 -3
  97. package/dist/conformance/run.js +87 -17
  98. package/dist/conformance/types.d.ts +57 -17
  99. package/dist/conformance/types.js +4 -2
  100. package/dist/execution-lane-index.d.ts +20 -1
  101. package/dist/execution-lane-index.js +24 -1
  102. package/dist/hooks.d.ts +4 -4
  103. package/dist/migrate-workers.d.ts +1 -1
  104. package/dist/migrate-workers.js +3 -7
  105. package/dist/types.js +13 -4
  106. package/package.json +2 -1
@@ -67,6 +67,11 @@
67
67
  "updatedAt": "2026-09-16T00:00:00.000Z"
68
68
  }
69
69
  },
70
+ "strictWrite": {
71
+ "outcome": "rejected",
72
+ "stage": "validate",
73
+ "why": "拒:models 字段是 null,读腿整域降级成默认(domain-defaulted);写入席不把 null 读成空目录存下(与 c14 的合法空数组分开)。"
74
+ },
70
75
  "wire": {
71
76
  "derive": true
72
77
  },
@@ -62,6 +62,22 @@
62
62
  "updatedAt": "2026-09-16T00:00:00.000Z"
63
63
  }
64
64
  },
65
+ "strictWrite": {
66
+ "outcome": "effective",
67
+ "effective": {
68
+ "models": {
69
+ "models": [],
70
+ "roles": {},
71
+ "tierGroups": []
72
+ }
73
+ },
74
+ "warnings": [],
75
+ "metadata": {
76
+ "version": 7,
77
+ "updatedAt": "2026-09-16T00:00:00.000Z"
78
+ },
79
+ "why": "受理:空目录是合法输入,读腿零告警零降级;严写受理同一份文档,受理形等于读腿 models 那一格(与 c13 的 null 分开)。"
80
+ },
65
81
  "wire": {
66
82
  "derive": true
67
83
  },
@@ -67,6 +67,11 @@
67
67
  "updatedAt": "2026-09-16T00:00:00.000Z"
68
68
  }
69
69
  },
70
+ "strictWrite": {
71
+ "outcome": "rejected",
72
+ "stage": "validate",
73
+ "why": "拒:models 字段是数字,读腿整域降级成默认(domain-defaulted);写入席不会把坏文档换成空默认存下。"
74
+ },
70
75
  "wire": {
71
76
  "derive": true
72
77
  },
@@ -72,6 +72,20 @@
72
72
  "updatedAt": "2026-09-16T00:00:00.000Z"
73
73
  }
74
74
  },
75
+ "strictWrite": {
76
+ "outcome": "effective",
77
+ "effective": {
78
+ "scenarios": {
79
+ "scenarios": []
80
+ }
81
+ },
82
+ "warnings": [],
83
+ "metadata": {
84
+ "version": 7,
85
+ "updatedAt": "2026-09-16T00:00:00.000Z"
86
+ },
87
+ "why": "受理:205 层嵌套的未知值被 schema 剥掉(读腿报 unknown-keys-dropped);严写没有内容哈希那一层(本地腿在 hash 层的 200 层硬闸与它无关),受理剥后的 scenarios,告警面为空。"
88
+ },
75
89
  "wire": {
76
90
  "derive": true
77
91
  },
@@ -62,6 +62,16 @@
62
62
  "updatedAt": "2026-09-16T00:00:00.000Z"
63
63
  }
64
64
  },
65
+ "strictWrite": {
66
+ "outcome": "effective",
67
+ "effective": {},
68
+ "warnings": [],
69
+ "metadata": {
70
+ "version": 7,
71
+ "updatedAt": "2026-09-16T00:00:00.000Z"
72
+ },
73
+ "why": "受理空集:本条打的是本地文件层(空文件),提交的域文档集为空;严写受理空集、不补缺席域 ⇒ effective = {}。"
74
+ },
65
75
  "wire": {
66
76
  "derive": true
67
77
  },
@@ -62,6 +62,16 @@
62
62
  "updatedAt": "2026-09-16T00:00:00.000Z"
63
63
  }
64
64
  },
65
+ "strictWrite": {
66
+ "outcome": "effective",
67
+ "effective": {},
68
+ "warnings": [],
69
+ "metadata": {
70
+ "version": 7,
71
+ "updatedAt": "2026-09-16T00:00:00.000Z"
72
+ },
73
+ "why": "受理空集:本条打的是 wire 信封(不是对象),提交的域文档集为空;严写受理空集、不补缺席域 ⇒ effective = {}。"
74
+ },
65
75
  "wire": {
66
76
  "outcome": "rejected",
67
77
  "stage": "envelope",
@@ -62,6 +62,16 @@
62
62
  "updatedAt": "2026-09-16T00:00:00.000Z"
63
63
  }
64
64
  },
65
+ "strictWrite": {
66
+ "outcome": "effective",
67
+ "effective": {},
68
+ "warnings": [],
69
+ "metadata": {
70
+ "version": 7,
71
+ "updatedAt": "2026-09-16T00:00:00.000Z"
72
+ },
73
+ "why": "受理空集:本条打的是 wire 信封(缺 version),提交的域文档集为空;严写受理空集、不补缺席域 ⇒ effective = {}。"
74
+ },
65
75
  "wire": {
66
76
  "outcome": "rejected",
67
77
  "stage": "envelope",
@@ -74,6 +74,18 @@
74
74
  "updatedAt": "2026-09-16T00:00:00.000Z"
75
75
  }
76
76
  },
77
+ "strictWrite": {
78
+ "outcome": "effective",
79
+ "effective": {
80
+ "runtime": {}
81
+ },
82
+ "warnings": [],
83
+ "metadata": {
84
+ "version": 7,
85
+ "updatedAt": "2026-09-16T00:00:00.000Z"
86
+ },
87
+ "why": "🚧 S-1020 特征格(已裁 = 缺陷,源头修排下一版):受理,受理形 = { runtime: {} }。与 c06 同律:读腿从 runtime 旧文档抬升 autonomy(legacy-governance-lifted),写入席不抬升,三闸旧键被 runtime schema 静默剥掉。S-1020 修掉(写侧拒 runtime 上的三闸旧键)时本格翻 rejected{validate}。"
88
+ },
77
89
  "wire": {
78
90
  "derive": true
79
91
  },
@@ -62,6 +62,19 @@
62
62
  "updatedAt": "2026-09-16T00:00:00.000Z"
63
63
  }
64
64
  },
65
+ "strictWrite": {
66
+ "outcome": "effective",
67
+ "effective": {
68
+ "governance": {},
69
+ "runtime": {}
70
+ },
71
+ "warnings": [],
72
+ "metadata": {
73
+ "version": 7,
74
+ "updatedAt": "2026-09-16T00:00:00.000Z"
75
+ },
76
+ "why": "受理:governance 在集里(空对象)⇒ 读写两边都不抬升;runtime 上的 autonomy 旧键被 runtime schema 剥掉(governance 已显式写成空,这里没有被丢的闸)。受理两份,受理形等于读腿两格。"
77
+ },
65
78
  "wire": {
66
79
  "derive": true
67
80
  },
@@ -3,6 +3,11 @@
3
3
  "outcome": "rejected",
4
4
  "stage": "validate"
5
5
  },
6
+ "strictWrite": {
7
+ "outcome": "rejected",
8
+ "stage": "validate",
9
+ "why": "拒:governance 是 gate 域,null 文档读腿本就整域拒;严写同一份文档同样过不了 governance 的 schema。"
10
+ },
6
11
  "wire": {
7
12
  "outcome": "rejected",
8
13
  "stage": "validate",
@@ -99,6 +99,11 @@
99
99
  "updatedAt": "2026-09-16T00:00:00.000Z"
100
100
  }
101
101
  },
102
+ "strictWrite": {
103
+ "outcome": "rejected",
104
+ "stage": "validate",
105
+ "why": "拒:一条好条目 + 一条坏条目(缺 id),读腿逐条抢救(entry-dropped);严写不替运维删条目 ⇒ 整次不受理(严写受理的范例形)。"
106
+ },
102
107
  "wire": {
103
108
  "derive": true
104
109
  },
@@ -90,6 +90,35 @@
90
90
  "updatedAt": "2026-09-16T00:00:00.000Z"
91
91
  }
92
92
  },
93
+ "strictWrite": {
94
+ "outcome": "effective",
95
+ "effective": {
96
+ "models": {
97
+ "models": [
98
+ {
99
+ "api": "openai-completions",
100
+ "apiKeyEnv": "OPENAI_API_KEY",
101
+ "enabled": true,
102
+ "id": "m0-id",
103
+ "name": "m0",
104
+ "provider": "openai",
105
+ "quotaWeight": 1,
106
+ "reasoning": false,
107
+ "tier": "standard",
108
+ "vision": false
109
+ }
110
+ ],
111
+ "roles": {},
112
+ "tierGroups": []
113
+ }
114
+ },
115
+ "warnings": [],
116
+ "metadata": {
117
+ "version": 7,
118
+ "updatedAt": "2026-09-16T00:00:00.000Z"
119
+ },
120
+ "why": "受理:条目有效、只多带未知键(含嵌套),schema 剥掉(读腿报 unknown-keys-dropped);严写同样剥、不铸告警,受理形等于读腿 models 那一格。"
121
+ },
93
122
  "wire": {
94
123
  "derive": true
95
124
  },
@@ -79,6 +79,39 @@
79
79
  "updatedAt": "2026-09-16T00:00:00.000Z"
80
80
  }
81
81
  },
82
+ "strictWrite": {
83
+ "outcome": "effective",
84
+ "effective": {
85
+ "models": {
86
+ "models": [
87
+ {
88
+ "api": "openai-completions",
89
+ "apiKeyEnv": "OPENAI_API_KEY",
90
+ "enabled": true,
91
+ "id": "m0-id",
92
+ "name": "m0",
93
+ "provider": "openai",
94
+ "quotaWeight": 1,
95
+ "reasoning": false,
96
+ "tier": "standard",
97
+ "vision": false
98
+ }
99
+ ],
100
+ "roles": {
101
+ "default": {
102
+ "model": "m0"
103
+ }
104
+ },
105
+ "tierGroups": []
106
+ }
107
+ },
108
+ "warnings": [],
109
+ "metadata": {
110
+ "version": 7,
111
+ "updatedAt": "2026-09-16T00:00:00.000Z"
112
+ },
113
+ "why": "受理:已剥过未知键的发布产物,读腿零告警;严写受理同一份文档,受理形等于读腿 models 那一格。"
114
+ },
82
115
  "wire": {
83
116
  "derive": true
84
117
  },