@sema-agent/settings-schema 28.0.0 → 30.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/CHANGELOG.md +431 -0
  2. package/README.md +94 -14
  3. package/conformance/VERSION +1 -1
  4. package/conformance/cases/c01-entry-salvage-then-typo/expected.json +2 -2
  5. package/conformance/cases/c02-hosts-clamp-stacked/expected.json +1 -1
  6. package/conformance/cases/c03-literal-dotted-top-key/expected.json +1 -1
  7. package/conformance/cases/c04-all-bad-collection-not-salvaged/expected.json +1 -1
  8. package/conformance/cases/c07-hooks-is-not-a-config-domain/expected.json +1 -1
  9. package/conformance/cases/c08-limits-unknown-carried-64/expected.json +1 -1
  10. package/conformance/cases/c09-limits-unknown-carried-65/expected.json +1 -1
  11. package/conformance/cases/c10-record-key-secret-redacted-twice/expected.json +1 -1
  12. package/conformance/cases/c11-unicode-unknown-keys/expected.json +1 -1
  13. package/conformance/cases/c12-prototype-name-top-keys/expected.json +1 -1
  14. package/conformance/cases/c13-models-field-null/expected.json +1 -1
  15. package/conformance/cases/c14-models-field-empty-array/expected.json +1 -1
  16. package/conformance/cases/c15-models-field-number/expected.json +1 -1
  17. package/conformance/cases/c18-wire-envelope-not-an-object/expected.json +1 -1
  18. package/conformance/cases/c19-wire-envelope-no-version/expected.json +1 -1
  19. package/conformance/cases/c21-governance-empty-object-wins/expected.json +1 -1
  20. package/conformance/cases/c23-mixed-validity-models/expected.json +1 -1
  21. package/conformance/cases/c24-valid-entries-with-unknown-keys/expected.json +1 -1
  22. package/conformance/cases/c25-published-roundtrip-zero-warnings/expected.json +1 -1
  23. package/conformance/cases/c26-hosts-array-1024/expected.json +1 -1
  24. package/conformance/cases/c27-hosts-array-1025/expected.json +1 -1
  25. package/conformance/cases/c28-large-document-over-1mb/expected.json +1 -1
  26. package/conformance/cases/c29-salvage-then-domain-refine-fails/expected.json +1 -1
  27. package/conformance/cases/c30-version-triple-a-first/expected.json +1 -1
  28. package/conformance/cases/c31-version-triple-b-changed/expected.json +1 -1
  29. package/conformance/cases/c32-version-triple-a-restored/expected.json +1 -1
  30. package/conformance/cases/c33-limits-nested-carried-key/expected.json +1 -1
  31. package/conformance/cases/c34-skills-content-vs-manifest/expected.json +1 -1
  32. package/conformance/cases/c36-skills-entry-without-content/expected.json +1 -1
  33. package/conformance/cases/c38-remote-exec-is-a-non-domain-file/expected.json +1 -1
  34. package/conformance/cases/c39-hidden-file-in-config-d/expected.json +1 -1
  35. package/conformance/cases/c40-s712-identity-only-what-reads-out/expected.json +1 -1
  36. package/conformance/cases/c41-s792-encoded-pem-identity/expected.json +1 -1
  37. package/conformance/cases/c42-s792-unknown-key-secret-redacted/expected.json +1 -1
  38. package/conformance/cases/c43-s792-form-and-deep-encoded-pem/expected.json +1 -1
  39. package/conformance/cases/c44-s792-utf8-escape-glued-token/expected.json +1 -1
  40. package/conformance/cases/c45-s792-identity-bounds-and-decode-depth/expected.json +1 -1
  41. package/conformance/cases/c46-s811-host-name-url-userinfo-withheld/expected.json +1 -1
  42. package/conformance/cases/c47-s811-roles-key-url-userinfo-withheld/expected.json +1 -1
  43. package/conformance/cases/c48-s935-model-headers-transported/expected.json +1 -1
  44. package/conformance/cases/c49-s935-model-headers-secret-entry-dropped/expected.json +1 -1
  45. package/conformance/cases/c50-s784-lane-host-legal/expected.json +1 -1
  46. package/conformance/cases/c51-s784-lane-e2b-legal/expected.json +1 -1
  47. package/conformance/cases/c52-s784-lane-k8s-legal/expected.json +1 -1
  48. package/conformance/cases/c53-s784-lane-ssh-legal/expected.json +1 -1
  49. package/conformance/cases/c54-s784-lane-adb-legal/expected.json +1 -1
  50. package/conformance/cases/c55-s784-lane-local-docker-legal/expected.json +1 -1
  51. package/conformance/cases/c56-s784-lane-device-legal/expected.json +1 -1
  52. package/conformance/cases/c57-s784-g1-enabled-no-lane/expected.json +3 -3
  53. package/conformance/cases/c58-s784-g2-multitenant-host/expected.json +3 -3
  54. package/conformance/cases/c59-s784-g3-k8s-missing-image/expected.json +3 -3
  55. package/conformance/cases/c60-s784-g3-e2b-missing-key/expected.json +3 -3
  56. package/conformance/cases/c61-s784-g3-other-lane-key/expected.json +3 -3
  57. package/conformance/cases/c62-s784-g7a-session-tidb/expected.json +3 -3
  58. package/conformance/cases/c63-s784-host-two-replicas/expected.json +3 -3
  59. package/conformance/cases/c64-s784-multitenant-local-store/expected.json +3 -3
  60. package/conformance/cases/c65-s784-pg-without-db/expected.json +3 -3
  61. package/conformance/cases/c66-s784-memory-backend-mismatch/expected.json +3 -3
  62. package/conformance/cases/c67-s784-retired-field-loud/expected.json +3 -3
  63. package/conformance/cases/c68-s784-device-local-store/expected.json +3 -3
  64. package/conformance/cases/c69-deep-encoded-token-past-every-reading/expected.json +1 -1
  65. package/conformance/cases/c70-rewritten-token-in-front-of-encoded-pem-header/expected.json +1 -1
  66. package/conformance/cases/c71-one-scanner-write-reads-display-forms/expected.json +1 -1
  67. package/conformance/cases/c72-dangling-reference-write-seat-refuses/expected.json +1 -1
  68. package/conformance/cases/c73-projects-extended-registration-reads/expected.json +1 -1
  69. package/conformance/cases/c74-projects-over-bound-refused/expected.json +3 -72
  70. package/conformance/cases/c75-projects-patch-remote-uniqueness/expected.json +3 -72
  71. package/conformance/cases/c76-projects-entry-salvage-nested/expected.json +2 -2
  72. package/conformance/cases/c77-prompts-center-artifact-carried/expected.json +1 -1
  73. package/conformance/cases/c78-prompts-empty-bindings-refused/expected.json +2 -2
  74. package/conformance/cases/c78-prompts-empty-bindings-refused/meta.json +1 -1
  75. package/conformance/cases/c79-prompts-bad-worker-artifact-not-salvaged/expected.json +1 -1
  76. package/conformance/cases/c80-prompts-wire-v2-verbatim/expected.json +1 -1
  77. package/conformance/cases/c81-prompts-declaration-bindings-refused/expected.json +2 -2
  78. package/conformance/cases/c82-prompts-v1-catalog-refused/expected.json +2 -2
  79. package/conformance/cases/c83-prompts-bad-overlay-not-salvaged/expected.json +1 -1
  80. package/conformance/cases/c84-sandbox-git-block-carried-verbatim/expected.json +1 -1
  81. package/conformance/cases/c85-sandbox-git-refused-block-still-carried/expected.json +1 -1
  82. package/conformance/cases/c86-a2a-peers-legal/expected.json +1 -1
  83. package/conformance/cases/c87-a2a-credential-refs-not-partially-salvaged/expected.json +1 -1
  84. package/conformance/cases/c88-projects-content-attestation-carried/expected.json +1 -1
  85. package/conformance/cases/c89-projects-content-attestation-malformed/expected.json +1 -1
  86. package/conformance/cases/c90-mcp-assertion-credential-carried/expected.json +143 -0
  87. package/conformance/cases/c90-mcp-assertion-credential-carried/input.json +30 -0
  88. package/conformance/cases/c90-mcp-assertion-credential-carried/meta.json +6 -0
  89. package/conformance/cases/c91-mcp-assertion-header-retired-entry-dropped/expected.json +105 -0
  90. package/conformance/cases/c91-mcp-assertion-header-retired-entry-dropped/input.json +27 -0
  91. package/conformance/cases/c91-mcp-assertion-header-retired-entry-dropped/meta.json +6 -0
  92. package/conformance/cases/c92-mcp-principal-header-with-assertion-dropped/expected.json +105 -0
  93. package/conformance/cases/c92-mcp-principal-header-with-assertion-dropped/input.json +31 -0
  94. package/conformance/cases/c92-mcp-principal-header-with-assertion-dropped/meta.json +6 -0
  95. package/conformance/cases/c93-mcp-header-refs-with-credentials-dropped/expected.json +105 -0
  96. package/conformance/cases/c93-mcp-header-refs-with-credentials-dropped/input.json +33 -0
  97. package/conformance/cases/c93-mcp-header-refs-with-credentials-dropped/meta.json +6 -0
  98. package/conformance/cases/c94-mcp-credentials-env-kind-dropped/expected.json +105 -0
  99. package/conformance/cases/c94-mcp-credentials-env-kind-dropped/input.json +32 -0
  100. package/conformance/cases/c94-mcp-credentials-env-kind-dropped/meta.json +6 -0
  101. package/conformance/cases/c95-mcp-credentials-audience-not-connector-id-dropped/expected.json +105 -0
  102. package/conformance/cases/c95-mcp-credentials-audience-not-connector-id-dropped/input.json +30 -0
  103. package/conformance/cases/c95-mcp-credentials-audience-not-connector-id-dropped/meta.json +6 -0
  104. package/conformance/cases/c96-mcp-credentials-extra-member-dropped/expected.json +105 -0
  105. package/conformance/cases/c96-mcp-credentials-extra-member-dropped/input.json +31 -0
  106. package/conformance/cases/c96-mcp-credentials-extra-member-dropped/meta.json +6 -0
  107. package/conformance/cases/cc01-mcp-toolfaces-non-object/expected.json +1 -1
  108. package/conformance/cases/cc02-mcp-source-key-is-transported/expected.json +1 -1
  109. package/conformance/cases/cc03-model-compat-unknown-subkey/expected.json +1 -1
  110. package/conformance/cases/cli01-model-name-nfc-vs-nfd/expected.json +1 -1
  111. package/conformance/cases/cli02-control-and-zero-width-chars/expected.json +1 -1
  112. package/conformance/cases/cli03-credential-pasted-into-unknown-key/expected.json +1 -1
  113. package/conformance/cases/cli04-env-value-with-newline/expected.json +1 -1
  114. package/conformance/cases/cli04-env-value-with-newline/meta.json +1 -1
  115. package/conformance/cases/cli05-long-and-prefix-colliding-names/expected.json +1 -1
  116. package/conformance/cases/t01-absent-domain-key-not-null/expected.json +1 -1
  117. package/conformance/cases/t01-absent-domain-key-not-null/meta.json +1 -1
  118. package/conformance/cases/t03-prototype-name-key-not-swallowed/expected.json +1 -1
  119. package/conformance/cases/t04-secret-literal-never-in-warning-value/expected.json +1 -1
  120. package/conformance/cases/t04-secret-literal-never-in-warning-value/meta.json +1 -1
  121. package/conformance/cases/z01-every-domain-empty-object/expected.json +1 -1
  122. package/conformance/cases/z01-every-domain-empty-object/meta.json +1 -1
  123. package/conformance/cases/z02-every-domain-unknown-key/expected.json +1 -1
  124. package/dist/api/credentials.js +5 -7
  125. package/dist/api/lifecycle-events.d.ts +266 -0
  126. package/dist/api/lifecycle-events.js +169 -0
  127. package/dist/api/wire-scalars.d.ts +13 -0
  128. package/dist/api/wire-scalars.js +15 -0
  129. package/dist/atomic-write.d.ts +4 -0
  130. package/dist/atomic-write.js +26 -3
  131. package/dist/config-d-file.d.ts +1 -1
  132. package/dist/config-document-refusal.d.ts +4 -4
  133. package/dist/config-fns.d.ts +4 -2
  134. package/dist/config-fns.js +1 -1
  135. package/dist/config-root-documents.d.ts +1 -1
  136. package/dist/config-root-node.js +2 -1
  137. package/dist/conformance/corpus.d.ts +1 -1
  138. package/dist/conformance/derive.d.ts +13 -5
  139. package/dist/conformance/derive.js +37 -21
  140. package/dist/conformance/index.d.ts +1 -1
  141. package/dist/conformance/index.js +1 -1
  142. package/dist/conformance/run.js +8 -9
  143. package/dist/connector-authorize-url.d.ts +23 -0
  144. package/dist/connector-authorize-url.js +129 -0
  145. package/dist/connector-id.d.ts +23 -0
  146. package/dist/connector-id.js +27 -0
  147. package/dist/file-edit.d.ts +44 -0
  148. package/dist/file-edit.js +70 -1
  149. package/dist/file-store.d.ts +12 -7
  150. package/dist/file-store.js +72 -59
  151. package/dist/hooks.d.ts +15 -5
  152. package/dist/hooks.js +13 -3
  153. package/dist/index.d.ts +4 -0
  154. package/dist/index.js +5 -1
  155. package/dist/mcp-entry-credential.d.ts +47 -0
  156. package/dist/mcp-entry-credential.js +73 -0
  157. package/dist/mcp-request-entry.d.ts +32 -13
  158. package/dist/mcp-request-entry.js +104 -58
  159. package/dist/migration-receipt.d.ts +2 -2
  160. package/dist/migration-receipt.js +2 -2
  161. package/dist/one-time-migrations.d.ts +1 -1
  162. package/dist/one-time-migrations.js +68 -91
  163. package/dist/portable-domains.d.ts +18 -12
  164. package/dist/portable-domains.js +17 -12
  165. package/dist/retired-role-words.d.ts +1 -1
  166. package/dist/retired-role-words.js +4 -6
  167. package/dist/scheduler-store-node.d.ts +5 -2
  168. package/dist/scheduler-store-node.js +8 -5
  169. package/dist/sha256.d.ts +5 -0
  170. package/dist/sha256.js +7 -0
  171. package/dist/skills-manifest.js +2 -2
  172. package/dist/types.d.ts +80 -10
  173. package/dist/types.js +37 -44
  174. package/docs/API-SURFACE.md +47 -7
  175. package/docs/CONFORMANCE.md +6 -4
  176. package/docs/CONSUMER-INTEGRATION.md +147 -4
  177. package/llms-full.txt +45 -24
  178. package/llms.txt +27 -14
  179. package/package.json +3 -2
@@ -0,0 +1,105 @@
1
+ {
2
+ "domains": {
3
+ "outcome": "effective",
4
+ "effective": {
5
+ "a2a": {
6
+ "peers": []
7
+ },
8
+ "collab": {
9
+ "templates": []
10
+ },
11
+ "entitlement": {
12
+ "budgetGroups": [],
13
+ "groupBindings": [],
14
+ "subjects": [],
15
+ "tiers": []
16
+ },
17
+ "execution": {
18
+ "allowedLanes": [
19
+ "host"
20
+ ],
21
+ "required": false
22
+ },
23
+ "governance": {},
24
+ "hosts": {
25
+ "hosts": []
26
+ },
27
+ "limits": {},
28
+ "mcp": {
29
+ "servers": [
30
+ {
31
+ "elicitation": false,
32
+ "enabled": true,
33
+ "name": "plain",
34
+ "rosters": [],
35
+ "scenarios": [],
36
+ "transport": {
37
+ "kind": "http",
38
+ "url": "https://mcp.example.com/plain"
39
+ }
40
+ }
41
+ ]
42
+ },
43
+ "models": {
44
+ "atMention": {
45
+ "mode": "all"
46
+ },
47
+ "models": [],
48
+ "roles": {},
49
+ "tierGroups": []
50
+ },
51
+ "plugins": {
52
+ "plugins": []
53
+ },
54
+ "projects": {
55
+ "projects": {}
56
+ },
57
+ "prompts": {},
58
+ "rosters": {
59
+ "rosters": []
60
+ },
61
+ "scenarios": {
62
+ "scenarios": []
63
+ },
64
+ "skills": {
65
+ "skills": []
66
+ },
67
+ "systems": {
68
+ "systems": []
69
+ },
70
+ "workers": {
71
+ "workers": []
72
+ }
73
+ },
74
+ "warnings": [
75
+ {
76
+ "domain": "mcp",
77
+ "identity": {
78
+ "name": "envref"
79
+ },
80
+ "kind": "entry-dropped",
81
+ "path": [
82
+ "servers",
83
+ 0
84
+ ],
85
+ "reasonCode": "entry-schema-invalid"
86
+ }
87
+ ],
88
+ "metadata": {
89
+ "version": 29,
90
+ "updatedAt": "2026-11-15T00:00:00.000Z"
91
+ }
92
+ },
93
+ "strictWrite": {
94
+ "outcome": "rejected",
95
+ "stage": "validate",
96
+ "why": "拒:种类不在 MCP_ENTRY_CREDENTIAL_KINDS 里(只准入 assertion)。"
97
+ },
98
+ "wire": {
99
+ "derive": true
100
+ },
101
+ "localRoot": {
102
+ "derive": true,
103
+ "localVersion": 2895092336973004
104
+ }
105
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "meta": {
3
+ "version": 29,
4
+ "updatedAt": "2026-11-15T00:00:00.000Z"
5
+ },
6
+ "domains": {
7
+ "mcp": {
8
+ "servers": [
9
+ {
10
+ "name": "envref",
11
+ "transport": {
12
+ "kind": "http",
13
+ "url": "https://mcp.example.com/connector",
14
+ "credentials": {
15
+ "kind": "env",
16
+ "headers": {
17
+ "Authorization": "MCP_TOKEN"
18
+ }
19
+ }
20
+ }
21
+ },
22
+ {
23
+ "name": "plain",
24
+ "transport": {
25
+ "kind": "http",
26
+ "url": "https://mcp.example.com/plain"
27
+ }
28
+ }
29
+ ]
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "contributor": "contract",
3
+ "claim": "原语包读得出、但准入闭集只有 `assertion` 的种类(这里是 `env`)⇒ 拒(拒句点名种类与准入词):读腿整条丢、兄弟存活;严写整份拒。打的是:读者只判「是一只凭据引用」就收下(env 引用在配置面会读服务进程的任何变量)。",
4
+ "firstRedOn": [],
5
+ "note": "firstRedOn 为空:historical 阶梯不覆盖 29.0.0 的新键;对 28.0.0 这一条的读数不同(`transport.credentials` 在那一版不是条目的键 / `assertionHeader` 在那一版受理),那一版不在入库的真跑证据里。"
6
+ }
@@ -0,0 +1,105 @@
1
+ {
2
+ "domains": {
3
+ "outcome": "effective",
4
+ "effective": {
5
+ "a2a": {
6
+ "peers": []
7
+ },
8
+ "collab": {
9
+ "templates": []
10
+ },
11
+ "entitlement": {
12
+ "budgetGroups": [],
13
+ "groupBindings": [],
14
+ "subjects": [],
15
+ "tiers": []
16
+ },
17
+ "execution": {
18
+ "allowedLanes": [
19
+ "host"
20
+ ],
21
+ "required": false
22
+ },
23
+ "governance": {},
24
+ "hosts": {
25
+ "hosts": []
26
+ },
27
+ "limits": {},
28
+ "mcp": {
29
+ "servers": [
30
+ {
31
+ "elicitation": false,
32
+ "enabled": true,
33
+ "name": "plain",
34
+ "rosters": [],
35
+ "scenarios": [],
36
+ "transport": {
37
+ "kind": "http",
38
+ "url": "https://mcp.example.com/plain"
39
+ }
40
+ }
41
+ ]
42
+ },
43
+ "models": {
44
+ "atMention": {
45
+ "mode": "all"
46
+ },
47
+ "models": [],
48
+ "roles": {},
49
+ "tierGroups": []
50
+ },
51
+ "plugins": {
52
+ "plugins": []
53
+ },
54
+ "projects": {
55
+ "projects": {}
56
+ },
57
+ "prompts": {},
58
+ "rosters": {
59
+ "rosters": []
60
+ },
61
+ "scenarios": {
62
+ "scenarios": []
63
+ },
64
+ "skills": {
65
+ "skills": []
66
+ },
67
+ "systems": {
68
+ "systems": []
69
+ },
70
+ "workers": {
71
+ "workers": []
72
+ }
73
+ },
74
+ "warnings": [
75
+ {
76
+ "domain": "mcp",
77
+ "identity": {
78
+ "name": "dotted"
79
+ },
80
+ "kind": "entry-dropped",
81
+ "path": [
82
+ "servers",
83
+ 0
84
+ ],
85
+ "reasonCode": "entry-schema-invalid"
86
+ }
87
+ ],
88
+ "metadata": {
89
+ "version": 29,
90
+ "updatedAt": "2026-11-15T00:00:00.000Z"
91
+ }
92
+ },
93
+ "strictWrite": {
94
+ "outcome": "rejected",
95
+ "stage": "validate",
96
+ "why": "拒:audience 过连接器 id 判官(1–63 个小写字母 / 数字 / -,首尾字母或数字)。"
97
+ },
98
+ "wire": {
99
+ "derive": true
100
+ },
101
+ "localRoot": {
102
+ "derive": true,
103
+ "localVersion": 655412274511892
104
+ }
105
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "meta": {
3
+ "version": 29,
4
+ "updatedAt": "2026-11-15T00:00:00.000Z"
5
+ },
6
+ "domains": {
7
+ "mcp": {
8
+ "servers": [
9
+ {
10
+ "name": "dotted",
11
+ "transport": {
12
+ "kind": "http",
13
+ "url": "https://mcp.example.com/connector",
14
+ "credentials": {
15
+ "kind": "assertion",
16
+ "audience": "a.b"
17
+ }
18
+ }
19
+ },
20
+ {
21
+ "name": "plain",
22
+ "transport": {
23
+ "kind": "http",
24
+ "url": "https://mcp.example.com/plain"
25
+ }
26
+ }
27
+ ]
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "contributor": "contract",
3
+ "claim": "断言臂的 `audience` 不是连接器 id(`a.b`:DNS label 不收点)⇒ 拒:读腿整条丢、兄弟存活;严写整份拒。打的是:读者只判 audience 是非空串(拼错的 id 让断言发往一个不存在的受众,调用时才失败)。",
4
+ "firstRedOn": [],
5
+ "note": "firstRedOn 为空:historical 阶梯不覆盖 29.0.0 的新键;对 28.0.0 这一条的读数不同(`transport.credentials` 在那一版不是条目的键 / `assertionHeader` 在那一版受理),那一版不在入库的真跑证据里。"
6
+ }
@@ -0,0 +1,105 @@
1
+ {
2
+ "domains": {
3
+ "outcome": "effective",
4
+ "effective": {
5
+ "a2a": {
6
+ "peers": []
7
+ },
8
+ "collab": {
9
+ "templates": []
10
+ },
11
+ "entitlement": {
12
+ "budgetGroups": [],
13
+ "groupBindings": [],
14
+ "subjects": [],
15
+ "tiers": []
16
+ },
17
+ "execution": {
18
+ "allowedLanes": [
19
+ "host"
20
+ ],
21
+ "required": false
22
+ },
23
+ "governance": {},
24
+ "hosts": {
25
+ "hosts": []
26
+ },
27
+ "limits": {},
28
+ "mcp": {
29
+ "servers": [
30
+ {
31
+ "elicitation": false,
32
+ "enabled": true,
33
+ "name": "plain",
34
+ "rosters": [],
35
+ "scenarios": [],
36
+ "transport": {
37
+ "kind": "http",
38
+ "url": "https://mcp.example.com/plain"
39
+ }
40
+ }
41
+ ]
42
+ },
43
+ "models": {
44
+ "atMention": {
45
+ "mode": "all"
46
+ },
47
+ "models": [],
48
+ "roles": {},
49
+ "tierGroups": []
50
+ },
51
+ "plugins": {
52
+ "plugins": []
53
+ },
54
+ "projects": {
55
+ "projects": {}
56
+ },
57
+ "prompts": {},
58
+ "rosters": {
59
+ "rosters": []
60
+ },
61
+ "scenarios": {
62
+ "scenarios": []
63
+ },
64
+ "skills": {
65
+ "skills": []
66
+ },
67
+ "systems": {
68
+ "systems": []
69
+ },
70
+ "workers": {
71
+ "workers": []
72
+ }
73
+ },
74
+ "warnings": [
75
+ {
76
+ "domain": "mcp",
77
+ "identity": {
78
+ "name": "extra"
79
+ },
80
+ "kind": "entry-dropped",
81
+ "path": [
82
+ "servers",
83
+ 0
84
+ ],
85
+ "reasonCode": "entry-schema-invalid"
86
+ }
87
+ ],
88
+ "metadata": {
89
+ "version": 29,
90
+ "updatedAt": "2026-11-15T00:00:00.000Z"
91
+ }
92
+ },
93
+ "strictWrite": {
94
+ "outcome": "rejected",
95
+ "stage": "validate",
96
+ "why": "拒:引用的读法只经原语包 readCredentialRef,多余成员是它的 extra_field。"
97
+ },
98
+ "wire": {
99
+ "derive": true
100
+ },
101
+ "localRoot": {
102
+ "derive": true,
103
+ "localVersion": 1984804257573732
104
+ }
105
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "meta": {
3
+ "version": 29,
4
+ "updatedAt": "2026-11-15T00:00:00.000Z"
5
+ },
6
+ "domains": {
7
+ "mcp": {
8
+ "servers": [
9
+ {
10
+ "name": "extra",
11
+ "transport": {
12
+ "kind": "http",
13
+ "url": "https://mcp.example.com/connector",
14
+ "credentials": {
15
+ "kind": "assertion",
16
+ "audience": "gitea",
17
+ "header": "x-assertion"
18
+ }
19
+ }
20
+ },
21
+ {
22
+ "name": "plain",
23
+ "transport": {
24
+ "kind": "http",
25
+ "url": "https://mcp.example.com/plain"
26
+ }
27
+ }
28
+ ]
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "contributor": "contract",
3
+ "claim": "断言臂带一只它没有的成员(`header`)⇒ 原语包的问题理由(多余成员)拒:读腿整条丢、兄弟存活;严写整份拒。打的是:读者自带一份宽读法(只看 kind 与 audience),多余成员被静默剥掉 —— 写进去的头名不生效且无声。",
4
+ "firstRedOn": [],
5
+ "note": "firstRedOn 为空:historical 阶梯不覆盖 29.0.0 的新键;对 28.0.0 这一条的读数不同(`transport.credentials` 在那一版不是条目的键 / `assertionHeader` 在那一版受理),那一版不在入库的真跑证据里。"
6
+ }
@@ -164,6 +164,6 @@
164
164
  },
165
165
  "localRoot": {
166
166
  "derive": true,
167
- "localVersion": 3253988119103129
167
+ "localVersion": 4267660658714555
168
168
  }
169
169
  }
@@ -110,6 +110,6 @@
110
110
  },
111
111
  "localRoot": {
112
112
  "derive": true,
113
- "localVersion": 3591318400132154
113
+ "localVersion": 1200408595634124
114
114
  }
115
115
  }
@@ -119,6 +119,6 @@
119
119
  },
120
120
  "localRoot": {
121
121
  "derive": true,
122
- "localVersion": 1663867526020649
122
+ "localVersion": 4466775970461005
123
123
  }
124
124
  }
@@ -115,6 +115,6 @@
115
115
  },
116
116
  "localRoot": {
117
117
  "derive": true,
118
- "localVersion": 2654544430240950
118
+ "localVersion": 3664693981791291
119
119
  }
120
120
  }
@@ -128,6 +128,6 @@
128
128
  },
129
129
  "localRoot": {
130
130
  "derive": true,
131
- "localVersion": 3769852229872529
131
+ "localVersion": 3285496553040059
132
132
  }
133
133
  }
@@ -109,6 +109,6 @@
109
109
  },
110
110
  "localRoot": {
111
111
  "derive": true,
112
- "localVersion": 1531100058823047
112
+ "localVersion": 3780573944953703
113
113
  }
114
114
  }
@@ -152,6 +152,6 @@
152
152
  },
153
153
  "localRoot": {
154
154
  "derive": true,
155
- "localVersion": 1531100058823047
155
+ "localVersion": 3780573944953703
156
156
  }
157
157
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "contributor": "cli",
3
- "claim": "壳视角④:worker 的 env 值里有换行 / 回车 ⇒ 读侧**原样承运**(不折叠、不截断、不静默改写)。壳的 `/config show` 单行渲染会断行,那是显示面的事;读侧一改,配置就与运维写下的不是同一份。注意这一域是非便携域: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 值的承运,与车道无关,所以按新形写明车道,不是放宽读侧。)",
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
  }
@@ -151,6 +151,6 @@
151
151
  },
152
152
  "localRoot": {
153
153
  "derive": true,
154
- "localVersion": 3555569200054848
154
+ "localVersion": 432549882094985
155
155
  }
156
156
  }
@@ -94,6 +94,6 @@
94
94
  },
95
95
  "localRoot": {
96
96
  "derive": true,
97
- "localVersion": 1409565868890479
97
+ "localVersion": 2196375952326078
98
98
  }
99
99
  }
@@ -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`(非便携域 ⇒ **带** `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)在本条上全绿 ⇒ 护栏,不是回归凭证。"
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
  }
@@ -127,6 +127,6 @@
127
127
  },
128
128
  "localRoot": {
129
129
  "derive": true,
130
- "localVersion": 3557208461559525
130
+ "localVersion": 2374461280151333
131
131
  }
132
132
  }
@@ -80,6 +80,6 @@
80
80
  },
81
81
  "localRoot": {
82
82
  "derive": true,
83
- "localVersion": 3944259292559843
83
+ "localVersion": 1993028062000773
84
84
  }
85
85
  }
@@ -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
  }
@@ -134,6 +134,6 @@
134
134
  },
135
135
  "localRoot": {
136
136
  "derive": true,
137
- "localVersion": 3006809479574243
137
+ "localVersion": 1465296500197193
138
138
  }
139
139
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "contributor": "contract",
3
- "claim": "十六个域各给一份**合法空文档** `{}` ⇒ 零告警、每域落 schema 默认。覆盖律的第一份:每个域至少被两条 case 摸过。它同时钉住「设了空」这一形在三腿上的读数,以及 local-root 腿对五个非便携域各报一条 unread-config-file。",
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
  }
@@ -428,6 +428,6 @@
428
428
  },
429
429
  "localRoot": {
430
430
  "derive": true,
431
- "localVersion": 1287865876181806
431
+ "localVersion": 2724380248522476
432
432
  }
433
433
  }
@@ -21,10 +21,10 @@
21
21
  * 解析出的值里不会带着谁多塞的秘密。`secret` 是应答里唯一的秘密位;`credentialId` / `version` / `auditId` 是不带值的审计位。
22
22
  */
23
23
  import { z } from "zod";
24
- import { INTEGER } from "../integer.js";
25
24
  import { buildQuotedIssue } from "../quoted-issue.js";
26
25
  import { SANDBOX_GIT_MAX_ORIGINS, SandboxGitOrigin, SandboxGitOriginList } from "../sandbox-git.js";
27
- import { PRINCIPAL_MAX_LENGTH, PrincipalIncarnation } from "./auth-bridge.js";
26
+ import { PrincipalIncarnation } from "./auth-bridge.js";
27
+ import { NonEmptyString, PrincipalString, SafeCount } from "./wire-scalars.js";
28
28
  import { deepFreeze } from "../deep-freeze.js";
29
29
  // ── 逐 origin 判定序表 ─────────────────────────────────────────────────────────────────────────────────────────────
30
30
  /**
@@ -54,15 +54,13 @@ function reasonsOf(state) {
54
54
  return SANDBOX_GIT_ORIGIN_VERDICTS.flatMap((v) => (v.state === state && "reason" in v ? [v.reason] : []));
55
55
  }
56
56
  // ── 公共字段 ───────────────────────────────────────────────────────────────────────────────────────────────────────
57
- /** 本模块里每个数值位(毫秒时刻、凭据行版本)的形:非负安全整数 —— 包内的整数判据 + 安全整数上界;浮点、负数、超出安全整数的都不是。 */
58
- const SafeCount = INTEGER.nonnegative().max(Number.MAX_SAFE_INTEGER);
59
- const NonEmptyString = z.string().min(1);
57
+ // 本模块里的数值位(毫秒时刻、凭据行版本)、非空串与主体名的形来自包内私有叶子 `./wire-scalars`(与 `api/lifecycle-events` 共用一份,不各抄一遍)。
60
58
  /**
61
- * 请求与应答都带的「这是谁的 run」字段:主体(长度界同令牌 `sub` 的界,{@link PRINCIPAL_MAX_LENGTH})、化身号({@link PrincipalIncarnation},与令牌 `sub_inc` 同一只 schema)、
59
+ * 请求与应答都带的「这是谁的 run」字段:主体(长度界同令牌 `sub` 的界,`PRINCIPAL_MAX_LENGTH`,见 `./api/auth-bridge`)、化身号({@link PrincipalIncarnation},与令牌 `sub_inc` 同一只 schema)、
62
60
  * scope(非空串 —— 与 `readTokenScope` 读 token 声明的规则同一条,不另立 slug 规则)。应答里这三键是**回显**,等不等于请求由收方核。
63
61
  */
64
62
  const RunIdentity = {
65
- principal: z.string().min(1).max(PRINCIPAL_MAX_LENGTH),
63
+ principal: PrincipalString,
66
64
  principalInc: PrincipalIncarnation,
67
65
  scope: NonEmptyString,
68
66
  };