@gate-forge/core 0.1.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 (242) hide show
  1. package/LICENSE +202 -0
  2. package/dist/baselines/adoption.d.ts +76 -0
  3. package/dist/baselines/adoption.d.ts.map +1 -0
  4. package/dist/baselines/adoption.js +163 -0
  5. package/dist/baselines/adoption.js.map +1 -0
  6. package/dist/baselines/index.d.ts +102 -0
  7. package/dist/baselines/index.d.ts.map +1 -0
  8. package/dist/baselines/index.js +186 -0
  9. package/dist/baselines/index.js.map +1 -0
  10. package/dist/canonical-json.d.ts +51 -0
  11. package/dist/canonical-json.d.ts.map +1 -0
  12. package/dist/canonical-json.js +112 -0
  13. package/dist/canonical-json.js.map +1 -0
  14. package/dist/classifier/bind.d.ts +64 -0
  15. package/dist/classifier/bind.d.ts.map +1 -0
  16. package/dist/classifier/bind.js +188 -0
  17. package/dist/classifier/bind.js.map +1 -0
  18. package/dist/classifier/classify.d.ts +154 -0
  19. package/dist/classifier/classify.d.ts.map +1 -0
  20. package/dist/classifier/classify.js +1207 -0
  21. package/dist/classifier/classify.js.map +1 -0
  22. package/dist/classifier/glob.d.ts +48 -0
  23. package/dist/classifier/glob.d.ts.map +1 -0
  24. package/dist/classifier/glob.js +104 -0
  25. package/dist/classifier/glob.js.map +1 -0
  26. package/dist/classifier/index.d.ts +10 -0
  27. package/dist/classifier/index.d.ts.map +1 -0
  28. package/dist/classifier/index.js +21 -0
  29. package/dist/classifier/index.js.map +1 -0
  30. package/dist/classifier/schema.d.ts +150 -0
  31. package/dist/classifier/schema.d.ts.map +1 -0
  32. package/dist/classifier/schema.js +139 -0
  33. package/dist/classifier/schema.js.map +1 -0
  34. package/dist/config/index.d.ts +259 -0
  35. package/dist/config/index.d.ts.map +1 -0
  36. package/dist/config/index.js +523 -0
  37. package/dist/config/index.js.map +1 -0
  38. package/dist/fingerprints.d.ts +56 -0
  39. package/dist/fingerprints.d.ts.map +1 -0
  40. package/dist/fingerprints.js +59 -0
  41. package/dist/fingerprints.js.map +1 -0
  42. package/dist/graph/build.d.ts +16 -0
  43. package/dist/graph/build.d.ts.map +1 -0
  44. package/dist/graph/build.js +423 -0
  45. package/dist/graph/build.js.map +1 -0
  46. package/dist/graph/index.d.ts +12 -0
  47. package/dist/graph/index.d.ts.map +1 -0
  48. package/dist/graph/index.js +10 -0
  49. package/dist/graph/index.js.map +1 -0
  50. package/dist/graph/schema.d.ts +448 -0
  51. package/dist/graph/schema.d.ts.map +1 -0
  52. package/dist/graph/schema.js +237 -0
  53. package/dist/graph/schema.js.map +1 -0
  54. package/dist/graph/symbols.d.ts +129 -0
  55. package/dist/graph/symbols.d.ts.map +1 -0
  56. package/dist/graph/symbols.js +177 -0
  57. package/dist/graph/symbols.js.map +1 -0
  58. package/dist/graph/util.d.ts +40 -0
  59. package/dist/graph/util.d.ts.map +1 -0
  60. package/dist/graph/util.js +41 -0
  61. package/dist/graph/util.js.map +1 -0
  62. package/dist/index.d.ts +683 -0
  63. package/dist/index.d.ts.map +1 -0
  64. package/dist/index.js +563 -0
  65. package/dist/index.js.map +1 -0
  66. package/dist/mapping/resolve.d.ts +177 -0
  67. package/dist/mapping/resolve.d.ts.map +1 -0
  68. package/dist/mapping/resolve.js +523 -0
  69. package/dist/mapping/resolve.js.map +1 -0
  70. package/dist/policy/coverage.d.ts +79 -0
  71. package/dist/policy/coverage.d.ts.map +1 -0
  72. package/dist/policy/coverage.js +119 -0
  73. package/dist/policy/coverage.js.map +1 -0
  74. package/dist/policy/evaluate.d.ts +275 -0
  75. package/dist/policy/evaluate.d.ts.map +1 -0
  76. package/dist/policy/evaluate.js +382 -0
  77. package/dist/policy/evaluate.js.map +1 -0
  78. package/dist/policy/index.d.ts +15 -0
  79. package/dist/policy/index.d.ts.map +1 -0
  80. package/dist/policy/index.js +14 -0
  81. package/dist/policy/index.js.map +1 -0
  82. package/dist/policy/trusted.d.ts +59 -0
  83. package/dist/policy/trusted.d.ts.map +1 -0
  84. package/dist/policy/trusted.js +96 -0
  85. package/dist/policy/trusted.js.map +1 -0
  86. package/dist/provenance.d.ts +170 -0
  87. package/dist/provenance.d.ts.map +1 -0
  88. package/dist/provenance.js +306 -0
  89. package/dist/provenance.js.map +1 -0
  90. package/dist/receipt/index.d.ts +74 -0
  91. package/dist/receipt/index.d.ts.map +1 -0
  92. package/dist/receipt/index.js +154 -0
  93. package/dist/receipt/index.js.map +1 -0
  94. package/dist/report/index.d.ts +100 -0
  95. package/dist/report/index.d.ts.map +1 -0
  96. package/dist/report/index.js +355 -0
  97. package/dist/report/index.js.map +1 -0
  98. package/dist/schemas/adoption.d.ts +40 -0
  99. package/dist/schemas/adoption.d.ts.map +1 -0
  100. package/dist/schemas/adoption.js +87 -0
  101. package/dist/schemas/adoption.js.map +1 -0
  102. package/dist/schemas/baseline.d.ts +19 -0
  103. package/dist/schemas/baseline.d.ts.map +1 -0
  104. package/dist/schemas/baseline.js +45 -0
  105. package/dist/schemas/baseline.js.map +1 -0
  106. package/dist/schemas/claim.d.ts +32 -0
  107. package/dist/schemas/claim.d.ts.map +1 -0
  108. package/dist/schemas/claim.js +34 -0
  109. package/dist/schemas/claim.js.map +1 -0
  110. package/dist/schemas/classification-policy.d.ts +84 -0
  111. package/dist/schemas/classification-policy.d.ts.map +1 -0
  112. package/dist/schemas/classification-policy.js +130 -0
  113. package/dist/schemas/classification-policy.js.map +1 -0
  114. package/dist/schemas/classification-signal.d.ts +125 -0
  115. package/dist/schemas/classification-signal.d.ts.map +1 -0
  116. package/dist/schemas/classification-signal.js +126 -0
  117. package/dist/schemas/classification-signal.js.map +1 -0
  118. package/dist/schemas/classification.d.ts +120 -0
  119. package/dist/schemas/classification.d.ts.map +1 -0
  120. package/dist/schemas/classification.js +154 -0
  121. package/dist/schemas/classification.js.map +1 -0
  122. package/dist/schemas/common.d.ts +73 -0
  123. package/dist/schemas/common.d.ts.map +1 -0
  124. package/dist/schemas/common.js +60 -0
  125. package/dist/schemas/common.js.map +1 -0
  126. package/dist/schemas/coverage-policy.d.ts +89 -0
  127. package/dist/schemas/coverage-policy.d.ts.map +1 -0
  128. package/dist/schemas/coverage-policy.js +81 -0
  129. package/dist/schemas/coverage-policy.js.map +1 -0
  130. package/dist/schemas/evidence.d.ts +65 -0
  131. package/dist/schemas/evidence.d.ts.map +1 -0
  132. package/dist/schemas/evidence.js +64 -0
  133. package/dist/schemas/evidence.js.map +1 -0
  134. package/dist/schemas/execution-result.d.ts +214 -0
  135. package/dist/schemas/execution-result.d.ts.map +1 -0
  136. package/dist/schemas/execution-result.js +240 -0
  137. package/dist/schemas/execution-result.js.map +1 -0
  138. package/dist/schemas/gate-receipt.d.ts +86 -0
  139. package/dist/schemas/gate-receipt.d.ts.map +1 -0
  140. package/dist/schemas/gate-receipt.js +193 -0
  141. package/dist/schemas/gate-receipt.js.map +1 -0
  142. package/dist/schemas/index.d.ts +22 -0
  143. package/dist/schemas/index.d.ts.map +1 -0
  144. package/dist/schemas/index.js +22 -0
  145. package/dist/schemas/index.js.map +1 -0
  146. package/dist/schemas/obligation.d.ts +37 -0
  147. package/dist/schemas/obligation.d.ts.map +1 -0
  148. package/dist/schemas/obligation.js +46 -0
  149. package/dist/schemas/obligation.js.map +1 -0
  150. package/dist/schemas/plugin.d.ts +19 -0
  151. package/dist/schemas/plugin.d.ts.map +1 -0
  152. package/dist/schemas/plugin.js +20 -0
  153. package/dist/schemas/plugin.js.map +1 -0
  154. package/dist/schemas/policy.d.ts +73 -0
  155. package/dist/schemas/policy.d.ts.map +1 -0
  156. package/dist/schemas/policy.js +46 -0
  157. package/dist/schemas/policy.js.map +1 -0
  158. package/dist/schemas/resource.d.ts +26 -0
  159. package/dist/schemas/resource.d.ts.map +1 -0
  160. package/dist/schemas/resource.js +29 -0
  161. package/dist/schemas/resource.js.map +1 -0
  162. package/dist/schemas/run-manifest.d.ts +72 -0
  163. package/dist/schemas/run-manifest.d.ts.map +1 -0
  164. package/dist/schemas/run-manifest.js +125 -0
  165. package/dist/schemas/run-manifest.js.map +1 -0
  166. package/dist/schemas/runner-adapter.d.ts +169 -0
  167. package/dist/schemas/runner-adapter.d.ts.map +1 -0
  168. package/dist/schemas/runner-adapter.js +2 -0
  169. package/dist/schemas/runner-adapter.js.map +1 -0
  170. package/dist/schemas/test-catalog.d.ts +472 -0
  171. package/dist/schemas/test-catalog.d.ts.map +1 -0
  172. package/dist/schemas/test-catalog.js +311 -0
  173. package/dist/schemas/test-catalog.js.map +1 -0
  174. package/dist/schemas/test-map.d.ts +99 -0
  175. package/dist/schemas/test-map.d.ts.map +1 -0
  176. package/dist/schemas/test-map.js +103 -0
  177. package/dist/schemas/test-map.js.map +1 -0
  178. package/dist/schemas/verdict.d.ts +73 -0
  179. package/dist/schemas/verdict.d.ts.map +1 -0
  180. package/dist/schemas/verdict.js +92 -0
  181. package/dist/schemas/verdict.js.map +1 -0
  182. package/dist/schemas/waiver.d.ts +36 -0
  183. package/dist/schemas/waiver.d.ts.map +1 -0
  184. package/dist/schemas/waiver.js +42 -0
  185. package/dist/schemas/waiver.js.map +1 -0
  186. package/dist/supervision/index.d.ts +170 -0
  187. package/dist/supervision/index.d.ts.map +1 -0
  188. package/dist/supervision/index.js +354 -0
  189. package/dist/supervision/index.js.map +1 -0
  190. package/dist/testing/clock.d.ts +50 -0
  191. package/dist/testing/clock.d.ts.map +1 -0
  192. package/dist/testing/clock.js +75 -0
  193. package/dist/testing/clock.js.map +1 -0
  194. package/dist/testing/env.d.ts +66 -0
  195. package/dist/testing/env.d.ts.map +1 -0
  196. package/dist/testing/env.js +106 -0
  197. package/dist/testing/env.js.map +1 -0
  198. package/dist/testing/gate-runner.d.ts +141 -0
  199. package/dist/testing/gate-runner.d.ts.map +1 -0
  200. package/dist/testing/gate-runner.js +173 -0
  201. package/dist/testing/gate-runner.js.map +1 -0
  202. package/dist/testing/gf19.d.ts +106 -0
  203. package/dist/testing/gf19.d.ts.map +1 -0
  204. package/dist/testing/gf19.js +282 -0
  205. package/dist/testing/gf19.js.map +1 -0
  206. package/dist/testing/index.d.ts +20 -0
  207. package/dist/testing/index.d.ts.map +1 -0
  208. package/dist/testing/index.js +14 -0
  209. package/dist/testing/index.js.map +1 -0
  210. package/dist/testing/red-probe.d.ts +138 -0
  211. package/dist/testing/red-probe.d.ts.map +1 -0
  212. package/dist/testing/red-probe.js +251 -0
  213. package/dist/testing/red-probe.js.map +1 -0
  214. package/dist/testing/temp-repo.d.ts +126 -0
  215. package/dist/testing/temp-repo.d.ts.map +1 -0
  216. package/dist/testing/temp-repo.js +214 -0
  217. package/dist/testing/temp-repo.js.map +1 -0
  218. package/dist/verdict/cause.d.ts +99 -0
  219. package/dist/verdict/cause.d.ts.map +1 -0
  220. package/dist/verdict/cause.js +206 -0
  221. package/dist/verdict/cause.js.map +1 -0
  222. package/dist/verdict/evaluate.d.ts +135 -0
  223. package/dist/verdict/evaluate.d.ts.map +1 -0
  224. package/dist/verdict/evaluate.js +1513 -0
  225. package/dist/verdict/evaluate.js.map +1 -0
  226. package/dist/verdict/index.d.ts +21 -0
  227. package/dist/verdict/index.d.ts.map +1 -0
  228. package/dist/verdict/index.js +20 -0
  229. package/dist/verdict/index.js.map +1 -0
  230. package/dist/verdict/pack-verifiers.d.ts +97 -0
  231. package/dist/verdict/pack-verifiers.d.ts.map +1 -0
  232. package/dist/verdict/pack-verifiers.js +763 -0
  233. package/dist/verdict/pack-verifiers.js.map +1 -0
  234. package/dist/verdict/registry.d.ts +180 -0
  235. package/dist/verdict/registry.d.ts.map +1 -0
  236. package/dist/verdict/registry.js +67 -0
  237. package/dist/verdict/registry.js.map +1 -0
  238. package/dist/waivers/index.d.ts +103 -0
  239. package/dist/waivers/index.d.ts.map +1 -0
  240. package/dist/waivers/index.js +192 -0
  241. package/dist/waivers/index.js.map +1 -0
  242. package/package.json +40 -0
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2026 UKD
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,76 @@
1
+ import { type AdoptionRecord } from '../schemas/adoption.js';
2
+ /** The adoption record's fixed file name, beside the baseline document. */
3
+ export declare const ADOPTION_RECORD_FILENAME = "adoption.json";
4
+ /**
5
+ * Loads the adoption record for a repo.
6
+ *
7
+ * Args:
8
+ * path: adoption-record file path (`.gateforge/baselines/adoption.json`).
9
+ *
10
+ * Returns:
11
+ * AdoptionRecord | null: the validated record, or null when absent
12
+ * (pre-adoption repo).
13
+ *
14
+ * Throws:
15
+ * GateforgeBaselineError: when the file exists but is unparsable or
16
+ * fails schema validation (fail closed — never silently unsanctioned).
17
+ */
18
+ export declare function loadAdoptionRecord(path: string): AdoptionRecord | null;
19
+ /**
20
+ * Writes an adoption record to disk, creating parent directories as
21
+ * needed. Serialized sorted 2-space JSON with a trailing newline
22
+ * (reviewable in diffs, like the baseline document).
23
+ *
24
+ * Args:
25
+ * path: destination file path.
26
+ * record: the validated adoption record.
27
+ *
28
+ * Throws:
29
+ * GateforgeBaselineError: when the file cannot be written.
30
+ */
31
+ export declare function writeAdoptionRecord(path: string, record: AdoptionRecord): void;
32
+ /**
33
+ * The classification layer of the sanctioned bulk-add (two-layer
34
+ * adoption): normalizes the classification-blocked resource ids captured
35
+ * at adoption time into the receipt's canonical form — sorted, duplicate-
36
+ * free, schema-validated. Input order is irrelevant; duplicates are
37
+ * collapsed (the ids are collected from blocking entries, so exact
38
+ * duplicates are expected to be absent, not an error).
39
+ *
40
+ * Args:
41
+ * resourceIds: the classification-blocked resource ids captured at
42
+ * adoption time (entries with kind 'classification' and a derived id).
43
+ *
44
+ * Returns:
45
+ * string[]: the validated, sorted, unique id list for the receipt.
46
+ *
47
+ * Throws:
48
+ * GateforgeBaselineError: when any id fails schema validation.
49
+ */
50
+ export declare function adoptClassificationBlocked(resourceIds: readonly string[]): string[];
51
+ /**
52
+ * The classification set's ONLY mutation after adoption (the shrink path,
53
+ * mirroring `updateBaseline`'s GF-07/08 semantics): replaces the receipt's
54
+ * `classificationBlocked` with the given ids, which must be a STRICT
55
+ * SUBSET of the current set — every id kept must exist today AND at least
56
+ * one id must be removed. A resource leaves the set only when it gained a
57
+ * real classification; adding or re-listing ids fails closed (the adopted
58
+ * set can never grow, so new classification debt can never be laundered
59
+ * into the sanctioned starting point).
60
+ *
61
+ * Args:
62
+ * current: the adopted record on disk (its effective classification set,
63
+ * [] when the field is absent).
64
+ * resourceIds: the ids to keep (duplicates are an error, as in
65
+ * `updateBaseline`).
66
+ *
67
+ * Returns:
68
+ * AdoptionRecord: the next record — identical to `current` except for
69
+ * the (always-present, possibly empty) shrunk `classificationBlocked`.
70
+ *
71
+ * Throws:
72
+ * GateforgeBaselineError: on duplicate input, schema-invalid ids, or a
73
+ * non-strict-subset update (naming the added ids).
74
+ */
75
+ export declare function shrinkClassificationBlocked(current: AdoptionRecord, resourceIds: readonly string[]): AdoptionRecord;
76
+ //# sourceMappingURL=adoption.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adoption.d.ts","sourceRoot":"","sources":["../../src/baselines/adoption.ts"],"names":[],"mappings":"AAgBA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAC;AAEhC,2EAA2E;AAC3E,eAAO,MAAM,wBAAwB,kBAAkB,CAAC;AAExD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAkBtE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,IAAI,CAS9E;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAmBnF;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,cAAc,EACvB,WAAW,EAAE,SAAS,MAAM,EAAE,GAC7B,cAAc,CA8BhB"}
@@ -0,0 +1,163 @@
1
+ /**
2
+ * Adoption record persistence (phase 8 workstream C): load/write
3
+ * `.gateforge/baselines/adoption.json` — the one-time, loud record that
4
+ * sanctions the baseline's initial bulk-add (see schemas/adoption.ts for
5
+ * the sibling-file decision). Loading and writing are synchronous,
6
+ * matching `loadBaseline`'s convention.
7
+ *
8
+ * Trust semantics (fail closed): a MISSING record is the legitimate
9
+ * pre-adoption state and loads as `null`; a PRESENT but unparsable or
10
+ * schema-violating record throws — the gate must never guess whether an
11
+ * unreadable adoption record does or does not sanction the baseline.
12
+ */
13
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
14
+ import { dirname } from 'node:path';
15
+ import { compareStrings } from '../graph/util.js';
16
+ import { GateforgeBaselineError } from './index.js';
17
+ import { AdoptionRecordSchema, ClassificationBlockedIdsSchema, } from '../schemas/adoption.js';
18
+ /** The adoption record's fixed file name, beside the baseline document. */
19
+ export const ADOPTION_RECORD_FILENAME = 'adoption.json';
20
+ /**
21
+ * Loads the adoption record for a repo.
22
+ *
23
+ * Args:
24
+ * path: adoption-record file path (`.gateforge/baselines/adoption.json`).
25
+ *
26
+ * Returns:
27
+ * AdoptionRecord | null: the validated record, or null when absent
28
+ * (pre-adoption repo).
29
+ *
30
+ * Throws:
31
+ * GateforgeBaselineError: when the file exists but is unparsable or
32
+ * fails schema validation (fail closed — never silently unsanctioned).
33
+ */
34
+ export function loadAdoptionRecord(path) {
35
+ if (!existsSync(path))
36
+ return null;
37
+ let document;
38
+ try {
39
+ document = JSON.parse(readFileSync(path, 'utf8'));
40
+ }
41
+ catch (error) {
42
+ throw new GateforgeBaselineError(`adoption record '${path}' could not be loaded: ${error instanceof Error ? error.message : String(error)}`);
43
+ }
44
+ const result = AdoptionRecordSchema.safeParse(document);
45
+ if (!result.success) {
46
+ const issues = result.error.issues
47
+ .map((issue) => `${issue.path.join('.') || '<adoption>'}: ${issue.message}`)
48
+ .join('; ');
49
+ throw new GateforgeBaselineError(`adoption record '${path}' failed validation: ${issues}`);
50
+ }
51
+ return result.data;
52
+ }
53
+ /**
54
+ * Writes an adoption record to disk, creating parent directories as
55
+ * needed. Serialized sorted 2-space JSON with a trailing newline
56
+ * (reviewable in diffs, like the baseline document).
57
+ *
58
+ * Args:
59
+ * path: destination file path.
60
+ * record: the validated adoption record.
61
+ *
62
+ * Throws:
63
+ * GateforgeBaselineError: when the file cannot be written.
64
+ */
65
+ export function writeAdoptionRecord(path, record) {
66
+ try {
67
+ mkdirSync(dirname(path), { recursive: true });
68
+ writeFileSync(path, `${JSON.stringify(record, null, 2)}\n`, 'utf8');
69
+ }
70
+ catch (error) {
71
+ throw new GateforgeBaselineError(`adoption record '${path}' could not be written: ${error instanceof Error ? error.message : String(error)}`);
72
+ }
73
+ }
74
+ /**
75
+ * The classification layer of the sanctioned bulk-add (two-layer
76
+ * adoption): normalizes the classification-blocked resource ids captured
77
+ * at adoption time into the receipt's canonical form — sorted, duplicate-
78
+ * free, schema-validated. Input order is irrelevant; duplicates are
79
+ * collapsed (the ids are collected from blocking entries, so exact
80
+ * duplicates are expected to be absent, not an error).
81
+ *
82
+ * Args:
83
+ * resourceIds: the classification-blocked resource ids captured at
84
+ * adoption time (entries with kind 'classification' and a derived id).
85
+ *
86
+ * Returns:
87
+ * string[]: the validated, sorted, unique id list for the receipt.
88
+ *
89
+ * Throws:
90
+ * GateforgeBaselineError: when any id fails schema validation.
91
+ */
92
+ export function adoptClassificationBlocked(resourceIds) {
93
+ const seen = {};
94
+ const unique = [];
95
+ for (const id of resourceIds) {
96
+ if (id in seen)
97
+ continue;
98
+ seen[id] = true;
99
+ unique.push(id);
100
+ }
101
+ unique.sort(compareStrings);
102
+ const result = ClassificationBlockedIdsSchema.safeParse(unique);
103
+ if (!result.success) {
104
+ const issues = result.error.issues
105
+ .map((issue) => `${issue.path.join('.') || '<classificationBlocked>'}: ${issue.message}`)
106
+ .join('; ');
107
+ throw new GateforgeBaselineError(`adoption classification set failed validation: ${issues}`);
108
+ }
109
+ return result.data;
110
+ }
111
+ /**
112
+ * The classification set's ONLY mutation after adoption (the shrink path,
113
+ * mirroring `updateBaseline`'s GF-07/08 semantics): replaces the receipt's
114
+ * `classificationBlocked` with the given ids, which must be a STRICT
115
+ * SUBSET of the current set — every id kept must exist today AND at least
116
+ * one id must be removed. A resource leaves the set only when it gained a
117
+ * real classification; adding or re-listing ids fails closed (the adopted
118
+ * set can never grow, so new classification debt can never be laundered
119
+ * into the sanctioned starting point).
120
+ *
121
+ * Args:
122
+ * current: the adopted record on disk (its effective classification set,
123
+ * [] when the field is absent).
124
+ * resourceIds: the ids to keep (duplicates are an error, as in
125
+ * `updateBaseline`).
126
+ *
127
+ * Returns:
128
+ * AdoptionRecord: the next record — identical to `current` except for
129
+ * the (always-present, possibly empty) shrunk `classificationBlocked`.
130
+ *
131
+ * Throws:
132
+ * GateforgeBaselineError: on duplicate input, schema-invalid ids, or a
133
+ * non-strict-subset update (naming the added ids).
134
+ */
135
+ export function shrinkClassificationBlocked(current, resourceIds) {
136
+ const seen = {};
137
+ const unique = [];
138
+ for (const id of resourceIds) {
139
+ if (id in seen)
140
+ continue;
141
+ seen[id] = true;
142
+ unique.push(id);
143
+ }
144
+ if (unique.length !== resourceIds.length) {
145
+ throw new GateforgeBaselineError('classification shrink input contains duplicate resource ids');
146
+ }
147
+ const currentSet = current.classificationBlocked ?? [];
148
+ const known = {};
149
+ for (const id of currentSet)
150
+ known[id] = true;
151
+ const unknown = unique.filter((id) => !(id in known));
152
+ if (unique.length >= currentSet.length || unknown.length > 0) {
153
+ throw new GateforgeBaselineError(`classification shrink rejected: not a strict subset of the adopted set ` +
154
+ `(the adopted classification set is shrink-only) — unknown or added id(s): ` +
155
+ `${(unknown.length > 0 ? unknown : unique).join(', ') || '<none>'}`);
156
+ }
157
+ const validated = adoptClassificationBlocked(unique);
158
+ const next = validated.length > 0
159
+ ? { ...current, classificationBlocked: validated }
160
+ : { ...current, classificationBlocked: [] };
161
+ return AdoptionRecordSchema.parse(next);
162
+ }
163
+ //# sourceMappingURL=adoption.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adoption.js","sourceRoot":"","sources":["../../src/baselines/adoption.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,102 @@
1
+ import { type Baseline } from '../schemas/baseline.js';
2
+ /**
3
+ * Error raised for any fail-closed baseline problem: missing file,
4
+ * unparsable JSON, schema violation, or a non-strict-subset update
5
+ * (GF-07's count-preserving debt laundering).
6
+ */
7
+ export declare class GateforgeBaselineError extends Error {
8
+ constructor(message: string);
9
+ }
10
+ /**
11
+ * Loads and validates a baseline document. Fail-closed: a missing,
12
+ * unparsable, or schema-violating file throws — callers decide whether
13
+ * that means "no baseline yet" for their flow.
14
+ *
15
+ * Args:
16
+ * path: baseline file path (default `.gateforge/baselines/obligations.json`).
17
+ *
18
+ * Returns:
19
+ * Baseline: the validated document (sorted, duplicate-free fingerprints).
20
+ *
21
+ * Throws:
22
+ * GateforgeBaselineError: on any load or validation failure.
23
+ */
24
+ export declare function loadBaseline(path: string): Baseline;
25
+ /**
26
+ * Whether a baseline update is a strict subset (invariant 4): every
27
+ * fingerprint in `next` exists in `current` AND at least one fingerprint
28
+ * is removed. `[A, B] → [A, B]` is not an update (nothing was resolved)
29
+ * and `[A, B] → [A, NEW]` fails (GF-07); `[A, B] → [A]` passes (GF-08).
30
+ *
31
+ * Args:
32
+ * current: the baseline on disk.
33
+ * next: the proposed replacement.
34
+ *
35
+ * Returns:
36
+ * boolean: true only for a non-empty proper subset.
37
+ */
38
+ export declare function canUpdate(current: Baseline, next: Baseline): boolean;
39
+ /**
40
+ * THE ONE SANCTIONED BULK-ADD (phase 8 workstream C, `gateforge adopt`):
41
+ * builds the adoption baseline from every currently-unresolved
42
+ * fingerprint, WITHOUT the strict-subset check. This is the controlled
43
+ * escape GF-07/08's anti-laundering invariant demands: adoption is a
44
+ * dated, count-annotated, loudly-printed event recorded in
45
+ * `adoption.json` (see baselines/adoption.ts), and it happens at most
46
+ * once per repo — the adopt command refuses a second bulk-add and sends
47
+ * subsequent debt to `updateBaseline` (shrink-only) or the gate itself.
48
+ * The companion record gates enforcement: `check` honors a baseline only
49
+ * when its adoption record exists, so this function's output can never
50
+ * forgive silently. Input order is irrelevant; duplicates are collapsed
51
+ * (the red set is collected from disjoint sources — verdicts and
52
+ * blocking entries — so duplicates are expected to be absent, not an
53
+ * error like in `updateBaseline`).
54
+ *
55
+ * Args:
56
+ * fingerprints: the unresolved fingerprints captured at adoption time.
57
+ *
58
+ * Returns:
59
+ * Baseline: the validated initial baseline document (sorted, unique).
60
+ */
61
+ export declare function adoptBaseline(fingerprints: readonly string[]): Baseline;
62
+ /**
63
+ * Builds the next baseline from raw fingerprints, enforcing the strict-
64
+ * subset rule (invariant 4) against `current`. Input order is irrelevant:
65
+ * the result is sorted; duplicates in the input are an error.
66
+ *
67
+ * Args:
68
+ * current: the baseline on disk.
69
+ * fingerprints: the resolved fingerprints to keep.
70
+ *
71
+ * Returns:
72
+ * Baseline: the validated next document.
73
+ *
74
+ * Throws:
75
+ * GateforgeBaselineError: on duplicates or a non-strict-subset update
76
+ * (naming the added fingerprints — GF-07's laundering attempt).
77
+ */
78
+ export declare function updateBaseline(current: Baseline, fingerprints: readonly string[]): Baseline;
79
+ /**
80
+ * Serializes a baseline for on-disk storage: sorted 2-space JSON with a
81
+ * trailing newline (reviewable in diffs; canonical hashing is a separate
82
+ * pin-#1 concern and does not apply to this file's formatting).
83
+ *
84
+ * Args:
85
+ * baseline: the document to serialize.
86
+ *
87
+ * Returns:
88
+ * string: the file content.
89
+ */
90
+ export declare function serializeBaseline(baseline: Baseline): string;
91
+ /**
92
+ * Writes a baseline to disk, creating parent directories as needed.
93
+ *
94
+ * Args:
95
+ * path: destination file path.
96
+ * baseline: the document to write.
97
+ *
98
+ * Throws:
99
+ * GateforgeBaselineError: when the file cannot be written.
100
+ */
101
+ export declare function writeBaseline(path: string, baseline: Baseline): void;
102
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/baselines/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvE;;;;GAIG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;gBACnC,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAiBnD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAKpE;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,aAAa,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,QAAQ,CAUvE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,QAAQ,CA0B3F;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAE5D;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CASpE"}