@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
@@ -0,0 +1,259 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * A plugin entry in `.gateforge.yml`. Unlike a run-manifest plugin
4
+ * registration, a config entry also declares HOW to launch the plugin:
5
+ * `subprocess` plugins get `command` (argv, run without network);
6
+ * `in-process` plugins get `module` (a TS module specifier).
7
+ */
8
+ export declare const ConfigPluginSchema: z.ZodObject<{
9
+ id: z.ZodString;
10
+ version: z.ZodString;
11
+ transport: z.ZodEnum<{
12
+ subprocess: "subprocess";
13
+ "in-process": "in-process";
14
+ }>;
15
+ command: z.ZodOptional<z.ZodArray<z.ZodString>>;
16
+ module: z.ZodOptional<z.ZodString>;
17
+ }, z.core.$strict>;
18
+ /** Inferred config-plugin shape. */
19
+ export type ConfigPlugin = z.infer<typeof ConfigPluginSchema>;
20
+ /**
21
+ * Enforcement-mode configuration (plan 2026-09-13 §3.4/§3.3, ADR 0005
22
+ * D1/D4). OPTIONAL and off by default — enabling strict E2E is an
23
+ * explicit, tracked owner decision.
24
+ */
25
+ export declare const EnforcementConfigSchema: z.ZodObject<{
26
+ mode: z.ZodDefault<z.ZodEnum<{
27
+ standard: "standard";
28
+ managed: "managed";
29
+ }>>;
30
+ strictE2E: z.ZodDefault<z.ZodBoolean>;
31
+ approvedPolicyDigest: z.ZodOptional<z.ZodString>;
32
+ }, z.core.$strict>;
33
+ /** Inferred enforcement-section shape (fields defaulted when the section is present). */
34
+ export type EnforcementConfig = z.infer<typeof EnforcementConfigSchema>;
35
+ /**
36
+ * One configured diagnostic suite (plan 2026-09-13 §3.5, phase 2 item
37
+ * 8): an EXISTING suite the owner registers for the advisory "red means
38
+ * inspect this" alarm. Gateforge never discovers suites on its own — no
39
+ * directory scans, no executing commands found on disk; everything comes
40
+ * from this explicit, tracked configuration.
41
+ *
42
+ * Only `pytest` is accepted today: other runners stay explicitly
43
+ * unsupported until an adapter exists (plan phase 2 item 6) — a typo'd
44
+ * or aspirational runner name must fail the config load, not silently
45
+ * disable a suite.
46
+ */
47
+ export declare const DiagnosticSuiteSchema: z.ZodObject<{
48
+ name: z.ZodString;
49
+ runner: z.ZodEnum<{
50
+ pytest: "pytest";
51
+ }>;
52
+ cwd: z.ZodString;
53
+ argv: z.ZodArray<z.ZodString>;
54
+ testPaths: z.ZodArray<z.ZodString>;
55
+ timeoutMs: z.ZodNumber;
56
+ }, z.core.$strict>;
57
+ /** Inferred diagnostic-suite shape. */
58
+ export type DiagnosticSuite = z.infer<typeof DiagnosticSuiteSchema>;
59
+ /**
60
+ * The `diagnostics` config section (plan §3.5): registered diagnostic
61
+ * suites. ABSENT = no diagnostic suites (the default; the alarm is
62
+ * opt-in and never a commit blocker by itself).
63
+ */
64
+ export declare const DiagnosticsConfigSchema: z.ZodObject<{
65
+ suites: z.ZodArray<z.ZodObject<{
66
+ name: z.ZodString;
67
+ runner: z.ZodEnum<{
68
+ pytest: "pytest";
69
+ }>;
70
+ cwd: z.ZodString;
71
+ argv: z.ZodArray<z.ZodString>;
72
+ testPaths: z.ZodArray<z.ZodString>;
73
+ timeoutMs: z.ZodNumber;
74
+ }, z.core.$strict>>;
75
+ }, z.core.$strict>;
76
+ /** Inferred diagnostics-section shape. */
77
+ export type DiagnosticsConfig = z.infer<typeof DiagnosticsConfigSchema>;
78
+ /**
79
+ * The `.gateforge.yml` document schema (pin #6). All paths are
80
+ * repo-root-relative. Unknown keys are rejected — a typo must fail the
81
+ * config load, not silently disable a subsystem.
82
+ */
83
+ export declare const GateforgeConfigSchema: z.ZodObject<{
84
+ schemaVersion: z.ZodLiteral<1>;
85
+ project: z.ZodObject<{
86
+ languages: z.ZodArray<z.ZodString>;
87
+ paths: z.ZodObject<{
88
+ include: z.ZodArray<z.ZodString>;
89
+ exclude: z.ZodArray<z.ZodString>;
90
+ }, z.core.$strict>;
91
+ }, z.core.$strict>;
92
+ plugins: z.ZodArray<z.ZodObject<{
93
+ id: z.ZodString;
94
+ version: z.ZodString;
95
+ transport: z.ZodEnum<{
96
+ subprocess: "subprocess";
97
+ "in-process": "in-process";
98
+ }>;
99
+ command: z.ZodOptional<z.ZodArray<z.ZodString>>;
100
+ module: z.ZodOptional<z.ZodString>;
101
+ }, z.core.$strict>>;
102
+ policies: z.ZodString;
103
+ classificationPolicy: z.ZodString;
104
+ adapters: z.ZodString;
105
+ waivers: z.ZodString;
106
+ baselines: z.ZodString;
107
+ changed: z.ZodObject<{
108
+ provider: z.ZodEnum<{
109
+ "local-staged": "local-staged";
110
+ "github-pr": "github-pr";
111
+ "gitlab-mr": "gitlab-mr";
112
+ auto: "auto";
113
+ }>;
114
+ }, z.core.$strict>;
115
+ witness: z.ZodObject<{
116
+ maxDurationSeconds: z.ZodNumber;
117
+ }, z.core.$strict>;
118
+ clock: z.ZodObject<{
119
+ mode: z.ZodEnum<{
120
+ system: "system";
121
+ fixed: "fixed";
122
+ }>;
123
+ fixedAt: z.ZodOptional<z.ZodISODateTime>;
124
+ }, z.core.$strict>;
125
+ enforcement: z.ZodOptional<z.ZodObject<{
126
+ mode: z.ZodDefault<z.ZodEnum<{
127
+ standard: "standard";
128
+ managed: "managed";
129
+ }>>;
130
+ strictE2E: z.ZodDefault<z.ZodBoolean>;
131
+ approvedPolicyDigest: z.ZodOptional<z.ZodString>;
132
+ }, z.core.$strict>>;
133
+ coveragePolicy: z.ZodOptional<z.ZodObject<{
134
+ tables: z.ZodArray<z.ZodObject<{
135
+ name: z.ZodString;
136
+ requiredOperations: z.ZodArray<z.ZodEnum<{
137
+ create: "create";
138
+ read: "read";
139
+ update: "update";
140
+ delete: "delete";
141
+ }>>;
142
+ disposition: z.ZodOptional<z.ZodObject<{
143
+ kind: z.ZodEnum<{
144
+ "read-only-surface": "read-only-surface";
145
+ "admin-plane-unreachable": "admin-plane-unreachable";
146
+ "not-user-facing": "not-user-facing";
147
+ other: "other";
148
+ }>;
149
+ note: z.ZodOptional<z.ZodString>;
150
+ }, z.core.$strict>>;
151
+ }, z.core.$strict>>;
152
+ }, z.core.$strict>>;
153
+ diagnostics: z.ZodOptional<z.ZodObject<{
154
+ suites: z.ZodArray<z.ZodObject<{
155
+ name: z.ZodString;
156
+ runner: z.ZodEnum<{
157
+ pytest: "pytest";
158
+ }>;
159
+ cwd: z.ZodString;
160
+ argv: z.ZodArray<z.ZodString>;
161
+ testPaths: z.ZodArray<z.ZodString>;
162
+ timeoutMs: z.ZodNumber;
163
+ }, z.core.$strict>>;
164
+ }, z.core.$strict>>;
165
+ }, z.core.$strict>;
166
+ /** Inferred `.gateforge.yml` shape. */
167
+ export type GateforgeConfig = z.infer<typeof GateforgeConfigSchema>;
168
+ /**
169
+ * One actionable config diagnostic: where, what, and expected-vs-got.
170
+ */
171
+ export interface ConfigDiagnostic {
172
+ /** File the diagnostic came from ('<inline>' for direct parse calls). */
173
+ file: string;
174
+ /** JSON path into the document, e.g. `$.plugins[0].transport`. */
175
+ jsonPath: string;
176
+ /** What is wrong. */
177
+ message: string;
178
+ /** What the schema expected, when known. */
179
+ expected?: string;
180
+ /** What was found, rendered compactly. */
181
+ got?: string;
182
+ }
183
+ /** Error raised for any fail-closed config problem. */
184
+ export declare class GateforgeConfigError extends Error {
185
+ /** All collected diagnostics (first is the primary cause). */
186
+ readonly diagnostics: ConfigDiagnostic[];
187
+ /**
188
+ * Builds the error from diagnostics.
189
+ *
190
+ * Args:
191
+ * diagnostics: nonempty list of actionable diagnostics.
192
+ */
193
+ constructor(diagnostics: ConfigDiagnostic[]);
194
+ }
195
+ /**
196
+ * Converts a zod issue path to a JSONPath-style string (`$.a.b[0]`).
197
+ *
198
+ * Args:
199
+ * path: zod issue path segments.
200
+ *
201
+ * Returns:
202
+ * string: JSON path with a leading `$`.
203
+ */
204
+ export declare function jsonPathFor(path: PropertyKey[]): string;
205
+ /**
206
+ * Converts zod issues into actionable config diagnostics.
207
+ *
208
+ * Args:
209
+ * error: failed zod result error.
210
+ * file: file name to attach to every diagnostic.
211
+ * input: the original parsed document, used to recover got-values.
212
+ *
213
+ * Returns:
214
+ * ConfigDiagnostic[]: one diagnostic per issue, same order.
215
+ */
216
+ export declare function diagnosticsFromZodError(error: z.ZodError, file: string, input?: unknown): ConfigDiagnostic[];
217
+ /**
218
+ * Formats diagnostics into the multi-line message users see.
219
+ *
220
+ * Args:
221
+ * diagnostics: diagnostics to render.
222
+ *
223
+ * Returns:
224
+ * string: human-readable, single-cause-first listing.
225
+ */
226
+ export declare function formatDiagnostics(diagnostics: ConfigDiagnostic[]): string;
227
+ /**
228
+ * Validates an already-parsed config document against the schema.
229
+ *
230
+ * Args:
231
+ * input: parsed YAML/JSON document (an unknown value).
232
+ * file: source file name for diagnostics (default '<inline>').
233
+ *
234
+ * Returns:
235
+ * GateforgeConfig: the validated config.
236
+ *
237
+ * Raises:
238
+ * GateforgeConfigError: on any schema violation, including unknown
239
+ * schemaVersion (never migrated) and unknown keys (typos fail loud).
240
+ */
241
+ export declare function parseConfig(input: unknown, { file }?: {
242
+ file?: string;
243
+ }): GateforgeConfig;
244
+ /**
245
+ * Loads and validates `.gateforge.yml` from disk. Fail-closed: a missing
246
+ * file, unparsable YAML, or schema violations all raise
247
+ * {@link GateforgeConfigError} with actionable diagnostics.
248
+ *
249
+ * Args:
250
+ * path: config file path (default '.gateforge.yml').
251
+ *
252
+ * Returns:
253
+ * GateforgeConfig: the validated config.
254
+ *
255
+ * Raises:
256
+ * GateforgeConfigError: for missing/unreadable/unparsable/invalid config.
257
+ */
258
+ export declare function loadConfig(path?: string): GateforgeConfig;
259
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;kBA2D3B,CAAC;AAEL,oCAAoC;AACpC,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;;;;kBAuCzB,CAAC;AAEZ,yFAAyF;AACzF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAu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