@usefragments/core 1.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 (228) hide show
  1. package/LICENSE +21 -0
  2. package/dist/chunk-243QYRUF.js +2145 -0
  3. package/dist/chunk-243QYRUF.js.map +1 -0
  4. package/dist/chunk-3LLRNCPX.js +111 -0
  5. package/dist/chunk-3LLRNCPX.js.map +1 -0
  6. package/dist/chunk-EIYNNS77.js +48 -0
  7. package/dist/chunk-EIYNNS77.js.map +1 -0
  8. package/dist/chunk-JNBFJ34I.js +326 -0
  9. package/dist/chunk-JNBFJ34I.js.map +1 -0
  10. package/dist/chunk-R3X7UBHU.js +228 -0
  11. package/dist/chunk-R3X7UBHU.js.map +1 -0
  12. package/dist/chunk-SH4KPIYH.js +393 -0
  13. package/dist/chunk-SH4KPIYH.js.map +1 -0
  14. package/dist/chunk-V4VQB57N.js +56 -0
  15. package/dist/chunk-V4VQB57N.js.map +1 -0
  16. package/dist/chunk-X34IA4LR.js +319 -0
  17. package/dist/chunk-X34IA4LR.js.map +1 -0
  18. package/dist/chunk-YF65VYRY.js +493 -0
  19. package/dist/chunk-YF65VYRY.js.map +1 -0
  20. package/dist/codes/index.d.ts +40 -0
  21. package/dist/codes/index.js +23 -0
  22. package/dist/codes/index.js.map +1 -0
  23. package/dist/compiled-types/index.d.ts +5 -0
  24. package/dist/compiled-types/index.js +1 -0
  25. package/dist/compiled-types/index.js.map +1 -0
  26. package/dist/generate/index.d.ts +47 -0
  27. package/dist/generate/index.js +11 -0
  28. package/dist/generate/index.js.map +1 -0
  29. package/dist/governance-BOa3KyiJ.d.ts +3279 -0
  30. package/dist/graph/index.d.ts +66 -0
  31. package/dist/graph/index.js +17 -0
  32. package/dist/graph/index.js.map +1 -0
  33. package/dist/index.d.ts +11388 -0
  34. package/dist/index.js +8711 -0
  35. package/dist/index.js.map +1 -0
  36. package/dist/package-identity.d.ts +42 -0
  37. package/dist/package-identity.js +23 -0
  38. package/dist/package-identity.js.map +1 -0
  39. package/dist/preview/index.d.ts +484 -0
  40. package/dist/preview/index.js +1129 -0
  41. package/dist/preview/index.js.map +1 -0
  42. package/dist/react-types.d.ts +22 -0
  43. package/dist/react-types.js +1 -0
  44. package/dist/react-types.js.map +1 -0
  45. package/dist/registry.d.ts +2367 -0
  46. package/dist/registry.js +62 -0
  47. package/dist/registry.js.map +1 -0
  48. package/dist/schemas/index.d.ts +2584 -0
  49. package/dist/schemas/index.js +55 -0
  50. package/dist/schemas/index.js.map +1 -0
  51. package/dist/severity.d.ts +18 -0
  52. package/dist/severity.js +27 -0
  53. package/dist/severity.js.map +1 -0
  54. package/dist/test-utils.d.ts +14 -0
  55. package/dist/test-utils.js +63 -0
  56. package/dist/test-utils.js.map +1 -0
  57. package/dist/topology/index.d.ts +48 -0
  58. package/dist/topology/index.js +7 -0
  59. package/dist/topology/index.js.map +1 -0
  60. package/dist/types-xJ2xyp_G.d.ts +119 -0
  61. package/package.json +120 -0
  62. package/src/__tests__/contract-parser.test.ts +614 -0
  63. package/src/__tests__/dtcg-generators.test.ts +439 -0
  64. package/src/__tests__/dtcg-parser.test.ts +884 -0
  65. package/src/__tests__/preview-runtime.test.tsx +111 -0
  66. package/src/__tests__/schema.test.ts +31 -0
  67. package/src/__tests__/severity.test.ts +34 -0
  68. package/src/__tests__/style-comparison.test.ts +662 -0
  69. package/src/__tests__/tokens-compat.test.ts +51 -0
  70. package/src/agent-format.test.ts +105 -0
  71. package/src/agent-format.ts +141 -0
  72. package/src/bundle.ts +149 -0
  73. package/src/codes/__tests__/codes.test.ts +73 -0
  74. package/src/codes/codes.ts +463 -0
  75. package/src/codes/index.ts +7 -0
  76. package/src/codes/source-finding-bridge.ts +113 -0
  77. package/src/compiled-types/index.ts +293 -0
  78. package/src/component-contract.ts +231 -0
  79. package/src/component-discovery.ts +80 -0
  80. package/src/composition.test.ts +262 -0
  81. package/src/composition.ts +318 -0
  82. package/src/config-paths.test.ts +78 -0
  83. package/src/config-paths.ts +47 -0
  84. package/src/config.ts +18 -0
  85. package/src/conform-prove.test.ts +274 -0
  86. package/src/conform-prove.ts +326 -0
  87. package/src/conform.ts +160 -0
  88. package/src/constants.ts +114 -0
  89. package/src/context.ts +2 -0
  90. package/src/contract/fixture.ts +110 -0
  91. package/src/contract/hash.test.ts +86 -0
  92. package/src/contract/hash.ts +195 -0
  93. package/src/contract/index.ts +43 -0
  94. package/src/contract/preimage.test.ts +254 -0
  95. package/src/contract/preimage.ts +365 -0
  96. package/src/contract/stamp.test.ts +100 -0
  97. package/src/contract/stamp.ts +105 -0
  98. package/src/contract-parser.ts +141 -0
  99. package/src/defineFragment.test.ts +257 -0
  100. package/src/defineFragment.ts +293 -0
  101. package/src/dtcg-generators.ts +324 -0
  102. package/src/dtcg-parser.ts +1 -0
  103. package/src/dtcg.ts +237 -0
  104. package/src/facts/__snapshots__/facts.test.ts.snap +124 -0
  105. package/src/facts/builders.ts +835 -0
  106. package/src/facts/compile.ts +422 -0
  107. package/src/facts/fact-index.ts +394 -0
  108. package/src/facts/facts.test.ts +494 -0
  109. package/src/facts/ids.ts +125 -0
  110. package/src/facts/index.ts +119 -0
  111. package/src/facts/types.ts +614 -0
  112. package/src/figma.ts +263 -0
  113. package/src/fragment-types.ts +214 -0
  114. package/src/generate/generate.test.ts +594 -0
  115. package/src/generate/index.ts +438 -0
  116. package/src/governance-integrity.test.ts +186 -0
  117. package/src/governance-integrity.ts +282 -0
  118. package/src/governance.test.ts +300 -0
  119. package/src/governance.ts +605 -0
  120. package/src/governance.type-test.ts +75 -0
  121. package/src/graph/engine.ts +446 -0
  122. package/src/graph/graph.test.ts +746 -0
  123. package/src/graph/index.ts +32 -0
  124. package/src/graph/serialization.ts +55 -0
  125. package/src/graph/types.ts +178 -0
  126. package/src/index.ts +891 -0
  127. package/src/local-canonical.ts +102 -0
  128. package/src/mcp-snapshot.ts +222 -0
  129. package/src/package-identity-match.ts +33 -0
  130. package/src/package-identity.generated.ts +233 -0
  131. package/src/package-identity.test.ts +99 -0
  132. package/src/package-identity.ts +157 -0
  133. package/src/performance-presets.ts +142 -0
  134. package/src/preview/comparison-artifact.test.ts +228 -0
  135. package/src/preview/comparison-artifact.ts +181 -0
  136. package/src/preview/comparison-context.ts +93 -0
  137. package/src/preview/comparison-evidence.ts +112 -0
  138. package/src/preview/comparison-format.ts +21 -0
  139. package/src/preview/comparison-presentation.ts +187 -0
  140. package/src/preview/comparison-references.test.ts +430 -0
  141. package/src/preview/comparison-references.ts +72 -0
  142. package/src/preview/comparison-score.ts +59 -0
  143. package/src/preview/comparison-styles.ts +197 -0
  144. package/src/preview/comparison.test.ts +559 -0
  145. package/src/preview/comparison.ts +488 -0
  146. package/src/preview/index.ts +10 -0
  147. package/src/preview/types.ts +309 -0
  148. package/src/preview/validation.test.ts +290 -0
  149. package/src/preview/validation.ts +356 -0
  150. package/src/preview-runtime.tsx +144 -0
  151. package/src/raw-html-canonical.test.ts +41 -0
  152. package/src/raw-html-canonical.ts +179 -0
  153. package/src/react-types.ts +21 -0
  154. package/src/registry-install-plan.ts +344 -0
  155. package/src/registry.test.ts +245 -0
  156. package/src/registry.ts +369 -0
  157. package/src/rules/a11y-required-accessible-name.ts +93 -0
  158. package/src/rules/color-math.test.ts +72 -0
  159. package/src/rules/color-math.ts +192 -0
  160. package/src/rules/components-forbidden-prop-value.ts +108 -0
  161. package/src/rules/components-prefer-library.ts +943 -0
  162. package/src/rules/components-unknown-prop.ts +94 -0
  163. package/src/rules/composition-pattern-schema.ts +125 -0
  164. package/src/rules/composition-pattern.test.ts +320 -0
  165. package/src/rules/composition-pattern.ts +271 -0
  166. package/src/rules/emit-gate.test.ts +42 -0
  167. package/src/rules/emit-gate.ts +60 -0
  168. package/src/rules/finding.ts +54 -0
  169. package/src/rules/index.ts +235 -0
  170. package/src/rules/jsx-preferred-component.ts +68 -0
  171. package/src/rules/jsx-preferred-import-path.ts +67 -0
  172. package/src/rules/presets.ts +57 -0
  173. package/src/rules/props-invalid-value.ts +115 -0
  174. package/src/rules/rules.test.ts +3636 -0
  175. package/src/rules/spacing-resolution.ts +184 -0
  176. package/src/rules/styles-no-raw-color.ts +329 -0
  177. package/src/rules/styles-no-raw-dimensions.ts +357 -0
  178. package/src/rules/styles-no-raw-spacing.ts +236 -0
  179. package/src/rules/styles-no-raw-typography.ts +237 -0
  180. package/src/rules/tailwind-arbitrary-color.test.ts +128 -0
  181. package/src/rules/tailwind-arbitrary-color.ts +93 -0
  182. package/src/rules/tailwind-arbitrary-spacing.test.ts +157 -0
  183. package/src/rules/tailwind-arbitrary-spacing.ts +120 -0
  184. package/src/rules/tailwind-forbidden-palette.test.ts +116 -0
  185. package/src/rules/tailwind-forbidden-palette.ts +107 -0
  186. package/src/rules/tailwind-off-scale-spacing-token.test.ts +100 -0
  187. package/src/rules/tailwind-off-scale-spacing-token.ts +108 -0
  188. package/src/rules/tailwind-raw-color-via-token.test.ts +108 -0
  189. package/src/rules/tailwind-raw-color-via-token.ts +82 -0
  190. package/src/rules/tailwind-rule-utils.ts +106 -0
  191. package/src/rules/tailwind-unknown-class.test.ts +157 -0
  192. package/src/rules/tailwind-unknown-class.ts +121 -0
  193. package/src/rules/taxonomy.test.ts +238 -0
  194. package/src/rules/theme-no-theme-coupled-literal.ts +132 -0
  195. package/src/rules/tiers.ts +111 -0
  196. package/src/rules/tokens-css-vars-must-be-defined.test.ts +244 -0
  197. package/src/rules/tokens-css-vars-must-be-defined.ts +156 -0
  198. package/src/rules/tokens-require-dual-fallback.ts +78 -0
  199. package/src/rules/types.ts +27 -0
  200. package/src/rules/utils.test.ts +110 -0
  201. package/src/rules/utils.ts +599 -0
  202. package/src/schema.ts +427 -0
  203. package/src/schemas/index.ts +275 -0
  204. package/src/schemas/schemas.test.ts +124 -0
  205. package/src/severity.ts +54 -0
  206. package/src/storyAdapter.test.ts +571 -0
  207. package/src/storyAdapter.ts +761 -0
  208. package/src/storyFilters.test.ts +350 -0
  209. package/src/storyFilters.ts +253 -0
  210. package/src/storybook-csf.ts +11 -0
  211. package/src/style-comparison.ts +423 -0
  212. package/src/test-utils.ts +68 -0
  213. package/src/token-parser.ts +2 -0
  214. package/src/token-types.ts +287 -0
  215. package/src/tokens/categories.ts +131 -0
  216. package/src/tokens/color.ts +193 -0
  217. package/src/tokens/design-token-parser.test.ts +159 -0
  218. package/src/tokens/design-token-parser.ts +402 -0
  219. package/src/tokens/dtcg.ts +428 -0
  220. package/src/tokens/index.ts +130 -0
  221. package/src/tokens/lookup.ts +19 -0
  222. package/src/tokens/scss.ts +171 -0
  223. package/src/tokens/tailwind-v4.ts +187 -0
  224. package/src/tokens/types.ts +43 -0
  225. package/src/topology/index.ts +9 -0
  226. package/src/topology/resolve-area.test.ts +174 -0
  227. package/src/topology/resolve-area.ts +215 -0
  228. package/src/types.ts +1057 -0
@@ -0,0 +1,2584 @@
1
+ import { z } from 'zod';
2
+ import { Severity, LegacySeverityLevel } from '../severity.js';
3
+ export { SeverityLevel, legacySeverityLevelSchema, severityLevelSchema, severitySchema } from '../severity.js';
4
+
5
+ declare const factLocationSchema: z.ZodObject<{
6
+ file: z.ZodString;
7
+ line: z.ZodNumber;
8
+ column: z.ZodNumber;
9
+ endLine: z.ZodOptional<z.ZodNumber>;
10
+ endColumn: z.ZodOptional<z.ZodNumber>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ file: string;
13
+ line: number;
14
+ column: number;
15
+ endLine?: number | undefined;
16
+ endColumn?: number | undefined;
17
+ }, {
18
+ file: string;
19
+ line: number;
20
+ column: number;
21
+ endLine?: number | undefined;
22
+ endColumn?: number | undefined;
23
+ }>;
24
+ type FactLocation = z.infer<typeof factLocationSchema>;
25
+ declare const findingReplacePropValueFixSchema: z.ZodObject<{
26
+ kind: z.ZodLiteral<"replacePropValue">;
27
+ title: z.ZodString;
28
+ prop: z.ZodString;
29
+ value: z.ZodUnknown;
30
+ deterministic: z.ZodOptional<z.ZodBoolean>;
31
+ }, "strip", z.ZodTypeAny, {
32
+ kind: "replacePropValue";
33
+ title: string;
34
+ prop: string;
35
+ deterministic?: boolean | undefined;
36
+ value?: unknown;
37
+ }, {
38
+ kind: "replacePropValue";
39
+ title: string;
40
+ prop: string;
41
+ deterministic?: boolean | undefined;
42
+ value?: unknown;
43
+ }>;
44
+ declare const findingReplaceStyleValueFixSchema: z.ZodObject<{
45
+ kind: z.ZodLiteral<"replaceStyleValue">;
46
+ title: z.ZodString;
47
+ property: z.ZodString;
48
+ value: z.ZodString;
49
+ deterministic: z.ZodOptional<z.ZodBoolean>;
50
+ }, "strip", z.ZodTypeAny, {
51
+ value: string;
52
+ kind: "replaceStyleValue";
53
+ title: string;
54
+ property: string;
55
+ deterministic?: boolean | undefined;
56
+ }, {
57
+ value: string;
58
+ kind: "replaceStyleValue";
59
+ title: string;
60
+ property: string;
61
+ deterministic?: boolean | undefined;
62
+ }>;
63
+ declare const findingReplaceImportFixSchema: z.ZodObject<{
64
+ kind: z.ZodLiteral<"replaceImport">;
65
+ title: z.ZodString;
66
+ from: z.ZodString;
67
+ to: z.ZodString;
68
+ deterministic: z.ZodOptional<z.ZodBoolean>;
69
+ }, "strip", z.ZodTypeAny, {
70
+ kind: "replaceImport";
71
+ title: string;
72
+ from: string;
73
+ to: string;
74
+ deterministic?: boolean | undefined;
75
+ }, {
76
+ kind: "replaceImport";
77
+ title: string;
78
+ from: string;
79
+ to: string;
80
+ deterministic?: boolean | undefined;
81
+ }>;
82
+ declare const findingReplaceComponentFixSchema: z.ZodObject<{
83
+ kind: z.ZodLiteral<"replaceComponent">;
84
+ title: z.ZodString;
85
+ from: z.ZodString;
86
+ to: z.ZodString;
87
+ deterministic: z.ZodOptional<z.ZodBoolean>;
88
+ }, "strip", z.ZodTypeAny, {
89
+ kind: "replaceComponent";
90
+ title: string;
91
+ from: string;
92
+ to: string;
93
+ deterministic?: boolean | undefined;
94
+ }, {
95
+ kind: "replaceComponent";
96
+ title: string;
97
+ from: string;
98
+ to: string;
99
+ deterministic?: boolean | undefined;
100
+ }>;
101
+ declare const findingReplaceClassTokenFixSchema: z.ZodObject<{
102
+ kind: z.ZodLiteral<"replaceClassToken">;
103
+ title: z.ZodString;
104
+ from: z.ZodString;
105
+ to: z.ZodNullable<z.ZodString>;
106
+ utility: z.ZodString;
107
+ deterministic: z.ZodOptional<z.ZodBoolean>;
108
+ }, "strip", z.ZodTypeAny, {
109
+ kind: "replaceClassToken";
110
+ title: string;
111
+ from: string;
112
+ to: string | null;
113
+ utility: string;
114
+ deterministic?: boolean | undefined;
115
+ }, {
116
+ kind: "replaceClassToken";
117
+ title: string;
118
+ from: string;
119
+ to: string | null;
120
+ utility: string;
121
+ deterministic?: boolean | undefined;
122
+ }>;
123
+ declare const findingFixSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
124
+ kind: z.ZodLiteral<"replacePropValue">;
125
+ title: z.ZodString;
126
+ prop: z.ZodString;
127
+ value: z.ZodUnknown;
128
+ deterministic: z.ZodOptional<z.ZodBoolean>;
129
+ }, "strip", z.ZodTypeAny, {
130
+ kind: "replacePropValue";
131
+ title: string;
132
+ prop: string;
133
+ deterministic?: boolean | undefined;
134
+ value?: unknown;
135
+ }, {
136
+ kind: "replacePropValue";
137
+ title: string;
138
+ prop: string;
139
+ deterministic?: boolean | undefined;
140
+ value?: unknown;
141
+ }>, z.ZodObject<{
142
+ kind: z.ZodLiteral<"replaceStyleValue">;
143
+ title: z.ZodString;
144
+ property: z.ZodString;
145
+ value: z.ZodString;
146
+ deterministic: z.ZodOptional<z.ZodBoolean>;
147
+ }, "strip", z.ZodTypeAny, {
148
+ value: string;
149
+ kind: "replaceStyleValue";
150
+ title: string;
151
+ property: string;
152
+ deterministic?: boolean | undefined;
153
+ }, {
154
+ value: string;
155
+ kind: "replaceStyleValue";
156
+ title: string;
157
+ property: string;
158
+ deterministic?: boolean | undefined;
159
+ }>, z.ZodObject<{
160
+ kind: z.ZodLiteral<"replaceImport">;
161
+ title: z.ZodString;
162
+ from: z.ZodString;
163
+ to: z.ZodString;
164
+ deterministic: z.ZodOptional<z.ZodBoolean>;
165
+ }, "strip", z.ZodTypeAny, {
166
+ kind: "replaceImport";
167
+ title: string;
168
+ from: string;
169
+ to: string;
170
+ deterministic?: boolean | undefined;
171
+ }, {
172
+ kind: "replaceImport";
173
+ title: string;
174
+ from: string;
175
+ to: string;
176
+ deterministic?: boolean | undefined;
177
+ }>, z.ZodObject<{
178
+ kind: z.ZodLiteral<"replaceComponent">;
179
+ title: z.ZodString;
180
+ from: z.ZodString;
181
+ to: z.ZodString;
182
+ deterministic: z.ZodOptional<z.ZodBoolean>;
183
+ }, "strip", z.ZodTypeAny, {
184
+ kind: "replaceComponent";
185
+ title: string;
186
+ from: string;
187
+ to: string;
188
+ deterministic?: boolean | undefined;
189
+ }, {
190
+ kind: "replaceComponent";
191
+ title: string;
192
+ from: string;
193
+ to: string;
194
+ deterministic?: boolean | undefined;
195
+ }>, z.ZodObject<{
196
+ kind: z.ZodLiteral<"replaceClassToken">;
197
+ title: z.ZodString;
198
+ from: z.ZodString;
199
+ to: z.ZodNullable<z.ZodString>;
200
+ utility: z.ZodString;
201
+ deterministic: z.ZodOptional<z.ZodBoolean>;
202
+ }, "strip", z.ZodTypeAny, {
203
+ kind: "replaceClassToken";
204
+ title: string;
205
+ from: string;
206
+ to: string | null;
207
+ utility: string;
208
+ deterministic?: boolean | undefined;
209
+ }, {
210
+ kind: "replaceClassToken";
211
+ title: string;
212
+ from: string;
213
+ to: string | null;
214
+ utility: string;
215
+ deterministic?: boolean | undefined;
216
+ }>]>;
217
+ type FindingFix = z.infer<typeof findingFixSchema>;
218
+ type FindingReplacePropValueFix = z.infer<typeof findingReplacePropValueFixSchema>;
219
+ type FindingReplaceStyleValueFix = z.infer<typeof findingReplaceStyleValueFixSchema>;
220
+ type FindingReplaceImportFix = z.infer<typeof findingReplaceImportFixSchema>;
221
+ type FindingReplaceComponentFix = z.infer<typeof findingReplaceComponentFixSchema>;
222
+ type FindingReplaceClassTokenFix = z.infer<typeof findingReplaceClassTokenFixSchema>;
223
+ interface FactEvidence {
224
+ factId: string;
225
+ fact: {
226
+ kind: string;
227
+ location?: FactLocation;
228
+ };
229
+ }
230
+ declare const factEvidenceSchema: z.ZodType<FactEvidence>;
231
+ declare const findingSchema: z.ZodObject<{
232
+ ruleId: z.ZodString;
233
+ ruleVersion: z.ZodString;
234
+ severity: z.ZodEnum<["critical", "serious", "moderate", "minor"]>;
235
+ level: z.ZodEnum<["error", "warn"]>;
236
+ code: z.ZodOptional<z.ZodString>;
237
+ helpUrl: z.ZodOptional<z.ZodString>;
238
+ message: z.ZodString;
239
+ fingerprint: z.ZodString;
240
+ location: z.ZodObject<{
241
+ file: z.ZodString;
242
+ line: z.ZodNumber;
243
+ column: z.ZodNumber;
244
+ endLine: z.ZodOptional<z.ZodNumber>;
245
+ endColumn: z.ZodOptional<z.ZodNumber>;
246
+ }, "strip", z.ZodTypeAny, {
247
+ file: string;
248
+ line: number;
249
+ column: number;
250
+ endLine?: number | undefined;
251
+ endColumn?: number | undefined;
252
+ }, {
253
+ file: string;
254
+ line: number;
255
+ column: number;
256
+ endLine?: number | undefined;
257
+ endColumn?: number | undefined;
258
+ }>;
259
+ evidence: z.ZodArray<z.ZodType<FactEvidence, z.ZodTypeDef, FactEvidence>, "many">;
260
+ fix: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
261
+ kind: z.ZodLiteral<"replacePropValue">;
262
+ title: z.ZodString;
263
+ prop: z.ZodString;
264
+ value: z.ZodUnknown;
265
+ deterministic: z.ZodOptional<z.ZodBoolean>;
266
+ }, "strip", z.ZodTypeAny, {
267
+ kind: "replacePropValue";
268
+ title: string;
269
+ prop: string;
270
+ deterministic?: boolean | undefined;
271
+ value?: unknown;
272
+ }, {
273
+ kind: "replacePropValue";
274
+ title: string;
275
+ prop: string;
276
+ deterministic?: boolean | undefined;
277
+ value?: unknown;
278
+ }>, z.ZodObject<{
279
+ kind: z.ZodLiteral<"replaceStyleValue">;
280
+ title: z.ZodString;
281
+ property: z.ZodString;
282
+ value: z.ZodString;
283
+ deterministic: z.ZodOptional<z.ZodBoolean>;
284
+ }, "strip", z.ZodTypeAny, {
285
+ value: string;
286
+ kind: "replaceStyleValue";
287
+ title: string;
288
+ property: string;
289
+ deterministic?: boolean | undefined;
290
+ }, {
291
+ value: string;
292
+ kind: "replaceStyleValue";
293
+ title: string;
294
+ property: string;
295
+ deterministic?: boolean | undefined;
296
+ }>, z.ZodObject<{
297
+ kind: z.ZodLiteral<"replaceImport">;
298
+ title: z.ZodString;
299
+ from: z.ZodString;
300
+ to: z.ZodString;
301
+ deterministic: z.ZodOptional<z.ZodBoolean>;
302
+ }, "strip", z.ZodTypeAny, {
303
+ kind: "replaceImport";
304
+ title: string;
305
+ from: string;
306
+ to: string;
307
+ deterministic?: boolean | undefined;
308
+ }, {
309
+ kind: "replaceImport";
310
+ title: string;
311
+ from: string;
312
+ to: string;
313
+ deterministic?: boolean | undefined;
314
+ }>, z.ZodObject<{
315
+ kind: z.ZodLiteral<"replaceComponent">;
316
+ title: z.ZodString;
317
+ from: z.ZodString;
318
+ to: z.ZodString;
319
+ deterministic: z.ZodOptional<z.ZodBoolean>;
320
+ }, "strip", z.ZodTypeAny, {
321
+ kind: "replaceComponent";
322
+ title: string;
323
+ from: string;
324
+ to: string;
325
+ deterministic?: boolean | undefined;
326
+ }, {
327
+ kind: "replaceComponent";
328
+ title: string;
329
+ from: string;
330
+ to: string;
331
+ deterministic?: boolean | undefined;
332
+ }>, z.ZodObject<{
333
+ kind: z.ZodLiteral<"replaceClassToken">;
334
+ title: z.ZodString;
335
+ from: z.ZodString;
336
+ to: z.ZodNullable<z.ZodString>;
337
+ utility: z.ZodString;
338
+ deterministic: z.ZodOptional<z.ZodBoolean>;
339
+ }, "strip", z.ZodTypeAny, {
340
+ kind: "replaceClassToken";
341
+ title: string;
342
+ from: string;
343
+ to: string | null;
344
+ utility: string;
345
+ deterministic?: boolean | undefined;
346
+ }, {
347
+ kind: "replaceClassToken";
348
+ title: string;
349
+ from: string;
350
+ to: string | null;
351
+ utility: string;
352
+ deterministic?: boolean | undefined;
353
+ }>]>>;
354
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
355
+ /**
356
+ * Product area this finding's file resolved to (topology layer). Optional —
357
+ * absent when the repo has no `topology` config. See `topology/resolve-area`.
358
+ */
359
+ area: z.ZodOptional<z.ZodObject<{
360
+ areaId: z.ZodString;
361
+ areaName: z.ZodString;
362
+ criticality: z.ZodEnum<["low", "medium", "high", "revenue", "regulated"]>;
363
+ owners: z.ZodArray<z.ZodString, "many">;
364
+ matchedGlob: z.ZodString;
365
+ }, "strip", z.ZodTypeAny, {
366
+ areaId: string;
367
+ areaName: string;
368
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
369
+ owners: string[];
370
+ matchedGlob: string;
371
+ }, {
372
+ areaId: string;
373
+ areaName: string;
374
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
375
+ owners: string[];
376
+ matchedGlob: string;
377
+ }>>;
378
+ }, "strip", z.ZodTypeAny, {
379
+ message: string;
380
+ location: {
381
+ file: string;
382
+ line: number;
383
+ column: number;
384
+ endLine?: number | undefined;
385
+ endColumn?: number | undefined;
386
+ };
387
+ ruleId: string;
388
+ ruleVersion: string;
389
+ severity: "critical" | "serious" | "moderate" | "minor";
390
+ level: "error" | "warn";
391
+ fingerprint: string;
392
+ evidence: FactEvidence[];
393
+ code?: string | undefined;
394
+ helpUrl?: string | undefined;
395
+ fix?: {
396
+ kind: "replacePropValue";
397
+ title: string;
398
+ prop: string;
399
+ deterministic?: boolean | undefined;
400
+ value?: unknown;
401
+ } | {
402
+ value: string;
403
+ kind: "replaceStyleValue";
404
+ title: string;
405
+ property: string;
406
+ deterministic?: boolean | undefined;
407
+ } | {
408
+ kind: "replaceImport";
409
+ title: string;
410
+ from: string;
411
+ to: string;
412
+ deterministic?: boolean | undefined;
413
+ } | {
414
+ kind: "replaceComponent";
415
+ title: string;
416
+ from: string;
417
+ to: string;
418
+ deterministic?: boolean | undefined;
419
+ } | {
420
+ kind: "replaceClassToken";
421
+ title: string;
422
+ from: string;
423
+ to: string | null;
424
+ utility: string;
425
+ deterministic?: boolean | undefined;
426
+ } | undefined;
427
+ attributes?: Record<string, unknown> | undefined;
428
+ area?: {
429
+ areaId: string;
430
+ areaName: string;
431
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
432
+ owners: string[];
433
+ matchedGlob: string;
434
+ } | undefined;
435
+ }, {
436
+ message: string;
437
+ location: {
438
+ file: string;
439
+ line: number;
440
+ column: number;
441
+ endLine?: number | undefined;
442
+ endColumn?: number | undefined;
443
+ };
444
+ ruleId: string;
445
+ ruleVersion: string;
446
+ severity: "critical" | "serious" | "moderate" | "minor";
447
+ level: "error" | "warn";
448
+ fingerprint: string;
449
+ evidence: FactEvidence[];
450
+ code?: string | undefined;
451
+ helpUrl?: string | undefined;
452
+ fix?: {
453
+ kind: "replacePropValue";
454
+ title: string;
455
+ prop: string;
456
+ deterministic?: boolean | undefined;
457
+ value?: unknown;
458
+ } | {
459
+ value: string;
460
+ kind: "replaceStyleValue";
461
+ title: string;
462
+ property: string;
463
+ deterministic?: boolean | undefined;
464
+ } | {
465
+ kind: "replaceImport";
466
+ title: string;
467
+ from: string;
468
+ to: string;
469
+ deterministic?: boolean | undefined;
470
+ } | {
471
+ kind: "replaceComponent";
472
+ title: string;
473
+ from: string;
474
+ to: string;
475
+ deterministic?: boolean | undefined;
476
+ } | {
477
+ kind: "replaceClassToken";
478
+ title: string;
479
+ from: string;
480
+ to: string | null;
481
+ utility: string;
482
+ deterministic?: boolean | undefined;
483
+ } | undefined;
484
+ attributes?: Record<string, unknown> | undefined;
485
+ area?: {
486
+ areaId: string;
487
+ areaName: string;
488
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
489
+ owners: string[];
490
+ matchedGlob: string;
491
+ } | undefined;
492
+ }>;
493
+ type Finding = z.infer<typeof findingSchema>;
494
+ declare const violationSchema: z.ZodObject<{
495
+ nodeId: z.ZodString;
496
+ nodeType: z.ZodString;
497
+ rule: z.ZodString;
498
+ severity: z.ZodEnum<["critical", "serious", "moderate", "minor"]>;
499
+ level: z.ZodOptional<z.ZodEnum<["error", "warn"]>>;
500
+ code: z.ZodOptional<z.ZodString>;
501
+ helpUrl: z.ZodOptional<z.ZodString>;
502
+ message: z.ZodString;
503
+ path: z.ZodOptional<z.ZodString>;
504
+ suggestion: z.ZodOptional<z.ZodString>;
505
+ prop: z.ZodOptional<z.ZodString>;
506
+ filePath: z.ZodOptional<z.ZodString>;
507
+ line: z.ZodOptional<z.ZodNumber>;
508
+ column: z.ZodOptional<z.ZodNumber>;
509
+ rawValue: z.ZodOptional<z.ZodString>;
510
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
511
+ }, "strip", z.ZodTypeAny, {
512
+ message: string;
513
+ severity: "critical" | "serious" | "moderate" | "minor";
514
+ nodeId: string;
515
+ nodeType: string;
516
+ rule: string;
517
+ code?: string | undefined;
518
+ path?: string | undefined;
519
+ line?: number | undefined;
520
+ column?: number | undefined;
521
+ prop?: string | undefined;
522
+ level?: "error" | "warn" | undefined;
523
+ helpUrl?: string | undefined;
524
+ suggestion?: string | undefined;
525
+ filePath?: string | undefined;
526
+ rawValue?: string | undefined;
527
+ extra?: Record<string, unknown> | undefined;
528
+ }, {
529
+ message: string;
530
+ severity: "critical" | "serious" | "moderate" | "minor";
531
+ nodeId: string;
532
+ nodeType: string;
533
+ rule: string;
534
+ code?: string | undefined;
535
+ path?: string | undefined;
536
+ line?: number | undefined;
537
+ column?: number | undefined;
538
+ prop?: string | undefined;
539
+ level?: "error" | "warn" | undefined;
540
+ helpUrl?: string | undefined;
541
+ suggestion?: string | undefined;
542
+ filePath?: string | undefined;
543
+ rawValue?: string | undefined;
544
+ extra?: Record<string, unknown> | undefined;
545
+ }>;
546
+ type Violation = z.infer<typeof violationSchema>;
547
+ declare const fixSchema: z.ZodObject<{
548
+ nodeId: z.ZodString;
549
+ prop: z.ZodOptional<z.ZodString>;
550
+ action: z.ZodEnum<["remove", "replace", "add"]>;
551
+ value: z.ZodOptional<z.ZodUnknown>;
552
+ description: z.ZodString;
553
+ }, "strip", z.ZodTypeAny, {
554
+ nodeId: string;
555
+ action: "remove" | "replace" | "add";
556
+ description: string;
557
+ value?: unknown;
558
+ prop?: string | undefined;
559
+ }, {
560
+ nodeId: string;
561
+ action: "remove" | "replace" | "add";
562
+ description: string;
563
+ value?: unknown;
564
+ prop?: string | undefined;
565
+ }>;
566
+ type Fix = z.infer<typeof fixSchema>;
567
+ declare const validatorResultSchema: z.ZodObject<{
568
+ validator: z.ZodString;
569
+ severity: z.ZodEnum<["critical", "serious", "moderate", "minor"]>;
570
+ passed: z.ZodBoolean;
571
+ violations: z.ZodArray<z.ZodObject<{
572
+ nodeId: z.ZodString;
573
+ nodeType: z.ZodString;
574
+ rule: z.ZodString;
575
+ severity: z.ZodEnum<["critical", "serious", "moderate", "minor"]>;
576
+ level: z.ZodOptional<z.ZodEnum<["error", "warn"]>>;
577
+ code: z.ZodOptional<z.ZodString>;
578
+ helpUrl: z.ZodOptional<z.ZodString>;
579
+ message: z.ZodString;
580
+ path: z.ZodOptional<z.ZodString>;
581
+ suggestion: z.ZodOptional<z.ZodString>;
582
+ prop: z.ZodOptional<z.ZodString>;
583
+ filePath: z.ZodOptional<z.ZodString>;
584
+ line: z.ZodOptional<z.ZodNumber>;
585
+ column: z.ZodOptional<z.ZodNumber>;
586
+ rawValue: z.ZodOptional<z.ZodString>;
587
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
588
+ }, "strip", z.ZodTypeAny, {
589
+ message: string;
590
+ severity: "critical" | "serious" | "moderate" | "minor";
591
+ nodeId: string;
592
+ nodeType: string;
593
+ rule: string;
594
+ code?: string | undefined;
595
+ path?: string | undefined;
596
+ line?: number | undefined;
597
+ column?: number | undefined;
598
+ prop?: string | undefined;
599
+ level?: "error" | "warn" | undefined;
600
+ helpUrl?: string | undefined;
601
+ suggestion?: string | undefined;
602
+ filePath?: string | undefined;
603
+ rawValue?: string | undefined;
604
+ extra?: Record<string, unknown> | undefined;
605
+ }, {
606
+ message: string;
607
+ severity: "critical" | "serious" | "moderate" | "minor";
608
+ nodeId: string;
609
+ nodeType: string;
610
+ rule: string;
611
+ code?: string | undefined;
612
+ path?: string | undefined;
613
+ line?: number | undefined;
614
+ column?: number | undefined;
615
+ prop?: string | undefined;
616
+ level?: "error" | "warn" | undefined;
617
+ helpUrl?: string | undefined;
618
+ suggestion?: string | undefined;
619
+ filePath?: string | undefined;
620
+ rawValue?: string | undefined;
621
+ extra?: Record<string, unknown> | undefined;
622
+ }>, "many">;
623
+ findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
624
+ ruleId: z.ZodString;
625
+ ruleVersion: z.ZodString;
626
+ severity: z.ZodEnum<["critical", "serious", "moderate", "minor"]>;
627
+ level: z.ZodEnum<["error", "warn"]>;
628
+ code: z.ZodOptional<z.ZodString>;
629
+ helpUrl: z.ZodOptional<z.ZodString>;
630
+ message: z.ZodString;
631
+ fingerprint: z.ZodString;
632
+ location: z.ZodObject<{
633
+ file: z.ZodString;
634
+ line: z.ZodNumber;
635
+ column: z.ZodNumber;
636
+ endLine: z.ZodOptional<z.ZodNumber>;
637
+ endColumn: z.ZodOptional<z.ZodNumber>;
638
+ }, "strip", z.ZodTypeAny, {
639
+ file: string;
640
+ line: number;
641
+ column: number;
642
+ endLine?: number | undefined;
643
+ endColumn?: number | undefined;
644
+ }, {
645
+ file: string;
646
+ line: number;
647
+ column: number;
648
+ endLine?: number | undefined;
649
+ endColumn?: number | undefined;
650
+ }>;
651
+ evidence: z.ZodArray<z.ZodType<FactEvidence, z.ZodTypeDef, FactEvidence>, "many">;
652
+ fix: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
653
+ kind: z.ZodLiteral<"replacePropValue">;
654
+ title: z.ZodString;
655
+ prop: z.ZodString;
656
+ value: z.ZodUnknown;
657
+ deterministic: z.ZodOptional<z.ZodBoolean>;
658
+ }, "strip", z.ZodTypeAny, {
659
+ kind: "replacePropValue";
660
+ title: string;
661
+ prop: string;
662
+ deterministic?: boolean | undefined;
663
+ value?: unknown;
664
+ }, {
665
+ kind: "replacePropValue";
666
+ title: string;
667
+ prop: string;
668
+ deterministic?: boolean | undefined;
669
+ value?: unknown;
670
+ }>, z.ZodObject<{
671
+ kind: z.ZodLiteral<"replaceStyleValue">;
672
+ title: z.ZodString;
673
+ property: z.ZodString;
674
+ value: z.ZodString;
675
+ deterministic: z.ZodOptional<z.ZodBoolean>;
676
+ }, "strip", z.ZodTypeAny, {
677
+ value: string;
678
+ kind: "replaceStyleValue";
679
+ title: string;
680
+ property: string;
681
+ deterministic?: boolean | undefined;
682
+ }, {
683
+ value: string;
684
+ kind: "replaceStyleValue";
685
+ title: string;
686
+ property: string;
687
+ deterministic?: boolean | undefined;
688
+ }>, z.ZodObject<{
689
+ kind: z.ZodLiteral<"replaceImport">;
690
+ title: z.ZodString;
691
+ from: z.ZodString;
692
+ to: z.ZodString;
693
+ deterministic: z.ZodOptional<z.ZodBoolean>;
694
+ }, "strip", z.ZodTypeAny, {
695
+ kind: "replaceImport";
696
+ title: string;
697
+ from: string;
698
+ to: string;
699
+ deterministic?: boolean | undefined;
700
+ }, {
701
+ kind: "replaceImport";
702
+ title: string;
703
+ from: string;
704
+ to: string;
705
+ deterministic?: boolean | undefined;
706
+ }>, z.ZodObject<{
707
+ kind: z.ZodLiteral<"replaceComponent">;
708
+ title: z.ZodString;
709
+ from: z.ZodString;
710
+ to: z.ZodString;
711
+ deterministic: z.ZodOptional<z.ZodBoolean>;
712
+ }, "strip", z.ZodTypeAny, {
713
+ kind: "replaceComponent";
714
+ title: string;
715
+ from: string;
716
+ to: string;
717
+ deterministic?: boolean | undefined;
718
+ }, {
719
+ kind: "replaceComponent";
720
+ title: string;
721
+ from: string;
722
+ to: string;
723
+ deterministic?: boolean | undefined;
724
+ }>, z.ZodObject<{
725
+ kind: z.ZodLiteral<"replaceClassToken">;
726
+ title: z.ZodString;
727
+ from: z.ZodString;
728
+ to: z.ZodNullable<z.ZodString>;
729
+ utility: z.ZodString;
730
+ deterministic: z.ZodOptional<z.ZodBoolean>;
731
+ }, "strip", z.ZodTypeAny, {
732
+ kind: "replaceClassToken";
733
+ title: string;
734
+ from: string;
735
+ to: string | null;
736
+ utility: string;
737
+ deterministic?: boolean | undefined;
738
+ }, {
739
+ kind: "replaceClassToken";
740
+ title: string;
741
+ from: string;
742
+ to: string | null;
743
+ utility: string;
744
+ deterministic?: boolean | undefined;
745
+ }>]>>;
746
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
747
+ /**
748
+ * Product area this finding's file resolved to (topology layer). Optional —
749
+ * absent when the repo has no `topology` config. See `topology/resolve-area`.
750
+ */
751
+ area: z.ZodOptional<z.ZodObject<{
752
+ areaId: z.ZodString;
753
+ areaName: z.ZodString;
754
+ criticality: z.ZodEnum<["low", "medium", "high", "revenue", "regulated"]>;
755
+ owners: z.ZodArray<z.ZodString, "many">;
756
+ matchedGlob: z.ZodString;
757
+ }, "strip", z.ZodTypeAny, {
758
+ areaId: string;
759
+ areaName: string;
760
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
761
+ owners: string[];
762
+ matchedGlob: string;
763
+ }, {
764
+ areaId: string;
765
+ areaName: string;
766
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
767
+ owners: string[];
768
+ matchedGlob: string;
769
+ }>>;
770
+ }, "strip", z.ZodTypeAny, {
771
+ message: string;
772
+ location: {
773
+ file: string;
774
+ line: number;
775
+ column: number;
776
+ endLine?: number | undefined;
777
+ endColumn?: number | undefined;
778
+ };
779
+ ruleId: string;
780
+ ruleVersion: string;
781
+ severity: "critical" | "serious" | "moderate" | "minor";
782
+ level: "error" | "warn";
783
+ fingerprint: string;
784
+ evidence: FactEvidence[];
785
+ code?: string | undefined;
786
+ helpUrl?: string | undefined;
787
+ fix?: {
788
+ kind: "replacePropValue";
789
+ title: string;
790
+ prop: string;
791
+ deterministic?: boolean | undefined;
792
+ value?: unknown;
793
+ } | {
794
+ value: string;
795
+ kind: "replaceStyleValue";
796
+ title: string;
797
+ property: string;
798
+ deterministic?: boolean | undefined;
799
+ } | {
800
+ kind: "replaceImport";
801
+ title: string;
802
+ from: string;
803
+ to: string;
804
+ deterministic?: boolean | undefined;
805
+ } | {
806
+ kind: "replaceComponent";
807
+ title: string;
808
+ from: string;
809
+ to: string;
810
+ deterministic?: boolean | undefined;
811
+ } | {
812
+ kind: "replaceClassToken";
813
+ title: string;
814
+ from: string;
815
+ to: string | null;
816
+ utility: string;
817
+ deterministic?: boolean | undefined;
818
+ } | undefined;
819
+ attributes?: Record<string, unknown> | undefined;
820
+ area?: {
821
+ areaId: string;
822
+ areaName: string;
823
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
824
+ owners: string[];
825
+ matchedGlob: string;
826
+ } | undefined;
827
+ }, {
828
+ message: string;
829
+ location: {
830
+ file: string;
831
+ line: number;
832
+ column: number;
833
+ endLine?: number | undefined;
834
+ endColumn?: number | undefined;
835
+ };
836
+ ruleId: string;
837
+ ruleVersion: string;
838
+ severity: "critical" | "serious" | "moderate" | "minor";
839
+ level: "error" | "warn";
840
+ fingerprint: string;
841
+ evidence: FactEvidence[];
842
+ code?: string | undefined;
843
+ helpUrl?: string | undefined;
844
+ fix?: {
845
+ kind: "replacePropValue";
846
+ title: string;
847
+ prop: string;
848
+ deterministic?: boolean | undefined;
849
+ value?: unknown;
850
+ } | {
851
+ value: string;
852
+ kind: "replaceStyleValue";
853
+ title: string;
854
+ property: string;
855
+ deterministic?: boolean | undefined;
856
+ } | {
857
+ kind: "replaceImport";
858
+ title: string;
859
+ from: string;
860
+ to: string;
861
+ deterministic?: boolean | undefined;
862
+ } | {
863
+ kind: "replaceComponent";
864
+ title: string;
865
+ from: string;
866
+ to: string;
867
+ deterministic?: boolean | undefined;
868
+ } | {
869
+ kind: "replaceClassToken";
870
+ title: string;
871
+ from: string;
872
+ to: string | null;
873
+ utility: string;
874
+ deterministic?: boolean | undefined;
875
+ } | undefined;
876
+ attributes?: Record<string, unknown> | undefined;
877
+ area?: {
878
+ areaId: string;
879
+ areaName: string;
880
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
881
+ owners: string[];
882
+ matchedGlob: string;
883
+ } | undefined;
884
+ }>, "many">>;
885
+ suggestions: z.ZodOptional<z.ZodArray<z.ZodObject<{
886
+ nodeId: z.ZodString;
887
+ prop: z.ZodOptional<z.ZodString>;
888
+ action: z.ZodEnum<["remove", "replace", "add"]>;
889
+ value: z.ZodOptional<z.ZodUnknown>;
890
+ description: z.ZodString;
891
+ }, "strip", z.ZodTypeAny, {
892
+ nodeId: string;
893
+ action: "remove" | "replace" | "add";
894
+ description: string;
895
+ value?: unknown;
896
+ prop?: string | undefined;
897
+ }, {
898
+ nodeId: string;
899
+ action: "remove" | "replace" | "add";
900
+ description: string;
901
+ value?: unknown;
902
+ prop?: string | undefined;
903
+ }>, "many">>;
904
+ }, "strip", z.ZodTypeAny, {
905
+ severity: "critical" | "serious" | "moderate" | "minor";
906
+ validator: string;
907
+ passed: boolean;
908
+ violations: {
909
+ message: string;
910
+ severity: "critical" | "serious" | "moderate" | "minor";
911
+ nodeId: string;
912
+ nodeType: string;
913
+ rule: string;
914
+ code?: string | undefined;
915
+ path?: string | undefined;
916
+ line?: number | undefined;
917
+ column?: number | undefined;
918
+ prop?: string | undefined;
919
+ level?: "error" | "warn" | undefined;
920
+ helpUrl?: string | undefined;
921
+ suggestion?: string | undefined;
922
+ filePath?: string | undefined;
923
+ rawValue?: string | undefined;
924
+ extra?: Record<string, unknown> | undefined;
925
+ }[];
926
+ findings?: {
927
+ message: string;
928
+ location: {
929
+ file: string;
930
+ line: number;
931
+ column: number;
932
+ endLine?: number | undefined;
933
+ endColumn?: number | undefined;
934
+ };
935
+ ruleId: string;
936
+ ruleVersion: string;
937
+ severity: "critical" | "serious" | "moderate" | "minor";
938
+ level: "error" | "warn";
939
+ fingerprint: string;
940
+ evidence: FactEvidence[];
941
+ code?: string | undefined;
942
+ helpUrl?: string | undefined;
943
+ fix?: {
944
+ kind: "replacePropValue";
945
+ title: string;
946
+ prop: string;
947
+ deterministic?: boolean | undefined;
948
+ value?: unknown;
949
+ } | {
950
+ value: string;
951
+ kind: "replaceStyleValue";
952
+ title: string;
953
+ property: string;
954
+ deterministic?: boolean | undefined;
955
+ } | {
956
+ kind: "replaceImport";
957
+ title: string;
958
+ from: string;
959
+ to: string;
960
+ deterministic?: boolean | undefined;
961
+ } | {
962
+ kind: "replaceComponent";
963
+ title: string;
964
+ from: string;
965
+ to: string;
966
+ deterministic?: boolean | undefined;
967
+ } | {
968
+ kind: "replaceClassToken";
969
+ title: string;
970
+ from: string;
971
+ to: string | null;
972
+ utility: string;
973
+ deterministic?: boolean | undefined;
974
+ } | undefined;
975
+ attributes?: Record<string, unknown> | undefined;
976
+ area?: {
977
+ areaId: string;
978
+ areaName: string;
979
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
980
+ owners: string[];
981
+ matchedGlob: string;
982
+ } | undefined;
983
+ }[] | undefined;
984
+ suggestions?: {
985
+ nodeId: string;
986
+ action: "remove" | "replace" | "add";
987
+ description: string;
988
+ value?: unknown;
989
+ prop?: string | undefined;
990
+ }[] | undefined;
991
+ }, {
992
+ severity: "critical" | "serious" | "moderate" | "minor";
993
+ validator: string;
994
+ passed: boolean;
995
+ violations: {
996
+ message: string;
997
+ severity: "critical" | "serious" | "moderate" | "minor";
998
+ nodeId: string;
999
+ nodeType: string;
1000
+ rule: string;
1001
+ code?: string | undefined;
1002
+ path?: string | undefined;
1003
+ line?: number | undefined;
1004
+ column?: number | undefined;
1005
+ prop?: string | undefined;
1006
+ level?: "error" | "warn" | undefined;
1007
+ helpUrl?: string | undefined;
1008
+ suggestion?: string | undefined;
1009
+ filePath?: string | undefined;
1010
+ rawValue?: string | undefined;
1011
+ extra?: Record<string, unknown> | undefined;
1012
+ }[];
1013
+ findings?: {
1014
+ message: string;
1015
+ location: {
1016
+ file: string;
1017
+ line: number;
1018
+ column: number;
1019
+ endLine?: number | undefined;
1020
+ endColumn?: number | undefined;
1021
+ };
1022
+ ruleId: string;
1023
+ ruleVersion: string;
1024
+ severity: "critical" | "serious" | "moderate" | "minor";
1025
+ level: "error" | "warn";
1026
+ fingerprint: string;
1027
+ evidence: FactEvidence[];
1028
+ code?: string | undefined;
1029
+ helpUrl?: string | undefined;
1030
+ fix?: {
1031
+ kind: "replacePropValue";
1032
+ title: string;
1033
+ prop: string;
1034
+ deterministic?: boolean | undefined;
1035
+ value?: unknown;
1036
+ } | {
1037
+ value: string;
1038
+ kind: "replaceStyleValue";
1039
+ title: string;
1040
+ property: string;
1041
+ deterministic?: boolean | undefined;
1042
+ } | {
1043
+ kind: "replaceImport";
1044
+ title: string;
1045
+ from: string;
1046
+ to: string;
1047
+ deterministic?: boolean | undefined;
1048
+ } | {
1049
+ kind: "replaceComponent";
1050
+ title: string;
1051
+ from: string;
1052
+ to: string;
1053
+ deterministic?: boolean | undefined;
1054
+ } | {
1055
+ kind: "replaceClassToken";
1056
+ title: string;
1057
+ from: string;
1058
+ to: string | null;
1059
+ utility: string;
1060
+ deterministic?: boolean | undefined;
1061
+ } | undefined;
1062
+ attributes?: Record<string, unknown> | undefined;
1063
+ area?: {
1064
+ areaId: string;
1065
+ areaName: string;
1066
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
1067
+ owners: string[];
1068
+ matchedGlob: string;
1069
+ } | undefined;
1070
+ }[] | undefined;
1071
+ suggestions?: {
1072
+ nodeId: string;
1073
+ action: "remove" | "replace" | "add";
1074
+ description: string;
1075
+ value?: unknown;
1076
+ prop?: string | undefined;
1077
+ }[] | undefined;
1078
+ }>;
1079
+ type ValidatorResult = z.infer<typeof validatorResultSchema>;
1080
+ declare const governanceVerdictMetadataSchema: z.ZodObject<{
1081
+ runner: z.ZodString;
1082
+ policyVersion: z.ZodOptional<z.ZodString>;
1083
+ duration: z.ZodNumber;
1084
+ nodeCount: z.ZodNumber;
1085
+ componentTypes: z.ZodArray<z.ZodString, "many">;
1086
+ }, "strip", z.ZodTypeAny, {
1087
+ runner: string;
1088
+ duration: number;
1089
+ nodeCount: number;
1090
+ componentTypes: string[];
1091
+ policyVersion?: string | undefined;
1092
+ }, {
1093
+ runner: string;
1094
+ duration: number;
1095
+ nodeCount: number;
1096
+ componentTypes: string[];
1097
+ policyVersion?: string | undefined;
1098
+ }>;
1099
+ type GovernanceVerdictMetadata = z.infer<typeof governanceVerdictMetadataSchema>;
1100
+ declare const governanceVerdictSchema: z.ZodObject<{
1101
+ verdict: z.ZodOptional<z.ZodEnum<["pass", "warn", "fail"]>>;
1102
+ passed: z.ZodBoolean;
1103
+ score: z.ZodNumber;
1104
+ results: z.ZodArray<z.ZodObject<{
1105
+ validator: z.ZodString;
1106
+ severity: z.ZodEnum<["critical", "serious", "moderate", "minor"]>;
1107
+ passed: z.ZodBoolean;
1108
+ violations: z.ZodArray<z.ZodObject<{
1109
+ nodeId: z.ZodString;
1110
+ nodeType: z.ZodString;
1111
+ rule: z.ZodString;
1112
+ severity: z.ZodEnum<["critical", "serious", "moderate", "minor"]>;
1113
+ level: z.ZodOptional<z.ZodEnum<["error", "warn"]>>;
1114
+ code: z.ZodOptional<z.ZodString>;
1115
+ helpUrl: z.ZodOptional<z.ZodString>;
1116
+ message: z.ZodString;
1117
+ path: z.ZodOptional<z.ZodString>;
1118
+ suggestion: z.ZodOptional<z.ZodString>;
1119
+ prop: z.ZodOptional<z.ZodString>;
1120
+ filePath: z.ZodOptional<z.ZodString>;
1121
+ line: z.ZodOptional<z.ZodNumber>;
1122
+ column: z.ZodOptional<z.ZodNumber>;
1123
+ rawValue: z.ZodOptional<z.ZodString>;
1124
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1125
+ }, "strip", z.ZodTypeAny, {
1126
+ message: string;
1127
+ severity: "critical" | "serious" | "moderate" | "minor";
1128
+ nodeId: string;
1129
+ nodeType: string;
1130
+ rule: string;
1131
+ code?: string | undefined;
1132
+ path?: string | undefined;
1133
+ line?: number | undefined;
1134
+ column?: number | undefined;
1135
+ prop?: string | undefined;
1136
+ level?: "error" | "warn" | undefined;
1137
+ helpUrl?: string | undefined;
1138
+ suggestion?: string | undefined;
1139
+ filePath?: string | undefined;
1140
+ rawValue?: string | undefined;
1141
+ extra?: Record<string, unknown> | undefined;
1142
+ }, {
1143
+ message: string;
1144
+ severity: "critical" | "serious" | "moderate" | "minor";
1145
+ nodeId: string;
1146
+ nodeType: string;
1147
+ rule: string;
1148
+ code?: string | undefined;
1149
+ path?: string | undefined;
1150
+ line?: number | undefined;
1151
+ column?: number | undefined;
1152
+ prop?: string | undefined;
1153
+ level?: "error" | "warn" | undefined;
1154
+ helpUrl?: string | undefined;
1155
+ suggestion?: string | undefined;
1156
+ filePath?: string | undefined;
1157
+ rawValue?: string | undefined;
1158
+ extra?: Record<string, unknown> | undefined;
1159
+ }>, "many">;
1160
+ findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
1161
+ ruleId: z.ZodString;
1162
+ ruleVersion: z.ZodString;
1163
+ severity: z.ZodEnum<["critical", "serious", "moderate", "minor"]>;
1164
+ level: z.ZodEnum<["error", "warn"]>;
1165
+ code: z.ZodOptional<z.ZodString>;
1166
+ helpUrl: z.ZodOptional<z.ZodString>;
1167
+ message: z.ZodString;
1168
+ fingerprint: z.ZodString;
1169
+ location: z.ZodObject<{
1170
+ file: z.ZodString;
1171
+ line: z.ZodNumber;
1172
+ column: z.ZodNumber;
1173
+ endLine: z.ZodOptional<z.ZodNumber>;
1174
+ endColumn: z.ZodOptional<z.ZodNumber>;
1175
+ }, "strip", z.ZodTypeAny, {
1176
+ file: string;
1177
+ line: number;
1178
+ column: number;
1179
+ endLine?: number | undefined;
1180
+ endColumn?: number | undefined;
1181
+ }, {
1182
+ file: string;
1183
+ line: number;
1184
+ column: number;
1185
+ endLine?: number | undefined;
1186
+ endColumn?: number | undefined;
1187
+ }>;
1188
+ evidence: z.ZodArray<z.ZodType<FactEvidence, z.ZodTypeDef, FactEvidence>, "many">;
1189
+ fix: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1190
+ kind: z.ZodLiteral<"replacePropValue">;
1191
+ title: z.ZodString;
1192
+ prop: z.ZodString;
1193
+ value: z.ZodUnknown;
1194
+ deterministic: z.ZodOptional<z.ZodBoolean>;
1195
+ }, "strip", z.ZodTypeAny, {
1196
+ kind: "replacePropValue";
1197
+ title: string;
1198
+ prop: string;
1199
+ deterministic?: boolean | undefined;
1200
+ value?: unknown;
1201
+ }, {
1202
+ kind: "replacePropValue";
1203
+ title: string;
1204
+ prop: string;
1205
+ deterministic?: boolean | undefined;
1206
+ value?: unknown;
1207
+ }>, z.ZodObject<{
1208
+ kind: z.ZodLiteral<"replaceStyleValue">;
1209
+ title: z.ZodString;
1210
+ property: z.ZodString;
1211
+ value: z.ZodString;
1212
+ deterministic: z.ZodOptional<z.ZodBoolean>;
1213
+ }, "strip", z.ZodTypeAny, {
1214
+ value: string;
1215
+ kind: "replaceStyleValue";
1216
+ title: string;
1217
+ property: string;
1218
+ deterministic?: boolean | undefined;
1219
+ }, {
1220
+ value: string;
1221
+ kind: "replaceStyleValue";
1222
+ title: string;
1223
+ property: string;
1224
+ deterministic?: boolean | undefined;
1225
+ }>, z.ZodObject<{
1226
+ kind: z.ZodLiteral<"replaceImport">;
1227
+ title: z.ZodString;
1228
+ from: z.ZodString;
1229
+ to: z.ZodString;
1230
+ deterministic: z.ZodOptional<z.ZodBoolean>;
1231
+ }, "strip", z.ZodTypeAny, {
1232
+ kind: "replaceImport";
1233
+ title: string;
1234
+ from: string;
1235
+ to: string;
1236
+ deterministic?: boolean | undefined;
1237
+ }, {
1238
+ kind: "replaceImport";
1239
+ title: string;
1240
+ from: string;
1241
+ to: string;
1242
+ deterministic?: boolean | undefined;
1243
+ }>, z.ZodObject<{
1244
+ kind: z.ZodLiteral<"replaceComponent">;
1245
+ title: z.ZodString;
1246
+ from: z.ZodString;
1247
+ to: z.ZodString;
1248
+ deterministic: z.ZodOptional<z.ZodBoolean>;
1249
+ }, "strip", z.ZodTypeAny, {
1250
+ kind: "replaceComponent";
1251
+ title: string;
1252
+ from: string;
1253
+ to: string;
1254
+ deterministic?: boolean | undefined;
1255
+ }, {
1256
+ kind: "replaceComponent";
1257
+ title: string;
1258
+ from: string;
1259
+ to: string;
1260
+ deterministic?: boolean | undefined;
1261
+ }>, z.ZodObject<{
1262
+ kind: z.ZodLiteral<"replaceClassToken">;
1263
+ title: z.ZodString;
1264
+ from: z.ZodString;
1265
+ to: z.ZodNullable<z.ZodString>;
1266
+ utility: z.ZodString;
1267
+ deterministic: z.ZodOptional<z.ZodBoolean>;
1268
+ }, "strip", z.ZodTypeAny, {
1269
+ kind: "replaceClassToken";
1270
+ title: string;
1271
+ from: string;
1272
+ to: string | null;
1273
+ utility: string;
1274
+ deterministic?: boolean | undefined;
1275
+ }, {
1276
+ kind: "replaceClassToken";
1277
+ title: string;
1278
+ from: string;
1279
+ to: string | null;
1280
+ utility: string;
1281
+ deterministic?: boolean | undefined;
1282
+ }>]>>;
1283
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1284
+ /**
1285
+ * Product area this finding's file resolved to (topology layer). Optional —
1286
+ * absent when the repo has no `topology` config. See `topology/resolve-area`.
1287
+ */
1288
+ area: z.ZodOptional<z.ZodObject<{
1289
+ areaId: z.ZodString;
1290
+ areaName: z.ZodString;
1291
+ criticality: z.ZodEnum<["low", "medium", "high", "revenue", "regulated"]>;
1292
+ owners: z.ZodArray<z.ZodString, "many">;
1293
+ matchedGlob: z.ZodString;
1294
+ }, "strip", z.ZodTypeAny, {
1295
+ areaId: string;
1296
+ areaName: string;
1297
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
1298
+ owners: string[];
1299
+ matchedGlob: string;
1300
+ }, {
1301
+ areaId: string;
1302
+ areaName: string;
1303
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
1304
+ owners: string[];
1305
+ matchedGlob: string;
1306
+ }>>;
1307
+ }, "strip", z.ZodTypeAny, {
1308
+ message: string;
1309
+ location: {
1310
+ file: string;
1311
+ line: number;
1312
+ column: number;
1313
+ endLine?: number | undefined;
1314
+ endColumn?: number | undefined;
1315
+ };
1316
+ ruleId: string;
1317
+ ruleVersion: string;
1318
+ severity: "critical" | "serious" | "moderate" | "minor";
1319
+ level: "error" | "warn";
1320
+ fingerprint: string;
1321
+ evidence: FactEvidence[];
1322
+ code?: string | undefined;
1323
+ helpUrl?: string | undefined;
1324
+ fix?: {
1325
+ kind: "replacePropValue";
1326
+ title: string;
1327
+ prop: string;
1328
+ deterministic?: boolean | undefined;
1329
+ value?: unknown;
1330
+ } | {
1331
+ value: string;
1332
+ kind: "replaceStyleValue";
1333
+ title: string;
1334
+ property: string;
1335
+ deterministic?: boolean | undefined;
1336
+ } | {
1337
+ kind: "replaceImport";
1338
+ title: string;
1339
+ from: string;
1340
+ to: string;
1341
+ deterministic?: boolean | undefined;
1342
+ } | {
1343
+ kind: "replaceComponent";
1344
+ title: string;
1345
+ from: string;
1346
+ to: string;
1347
+ deterministic?: boolean | undefined;
1348
+ } | {
1349
+ kind: "replaceClassToken";
1350
+ title: string;
1351
+ from: string;
1352
+ to: string | null;
1353
+ utility: string;
1354
+ deterministic?: boolean | undefined;
1355
+ } | undefined;
1356
+ attributes?: Record<string, unknown> | undefined;
1357
+ area?: {
1358
+ areaId: string;
1359
+ areaName: string;
1360
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
1361
+ owners: string[];
1362
+ matchedGlob: string;
1363
+ } | undefined;
1364
+ }, {
1365
+ message: string;
1366
+ location: {
1367
+ file: string;
1368
+ line: number;
1369
+ column: number;
1370
+ endLine?: number | undefined;
1371
+ endColumn?: number | undefined;
1372
+ };
1373
+ ruleId: string;
1374
+ ruleVersion: string;
1375
+ severity: "critical" | "serious" | "moderate" | "minor";
1376
+ level: "error" | "warn";
1377
+ fingerprint: string;
1378
+ evidence: FactEvidence[];
1379
+ code?: string | undefined;
1380
+ helpUrl?: string | undefined;
1381
+ fix?: {
1382
+ kind: "replacePropValue";
1383
+ title: string;
1384
+ prop: string;
1385
+ deterministic?: boolean | undefined;
1386
+ value?: unknown;
1387
+ } | {
1388
+ value: string;
1389
+ kind: "replaceStyleValue";
1390
+ title: string;
1391
+ property: string;
1392
+ deterministic?: boolean | undefined;
1393
+ } | {
1394
+ kind: "replaceImport";
1395
+ title: string;
1396
+ from: string;
1397
+ to: string;
1398
+ deterministic?: boolean | undefined;
1399
+ } | {
1400
+ kind: "replaceComponent";
1401
+ title: string;
1402
+ from: string;
1403
+ to: string;
1404
+ deterministic?: boolean | undefined;
1405
+ } | {
1406
+ kind: "replaceClassToken";
1407
+ title: string;
1408
+ from: string;
1409
+ to: string | null;
1410
+ utility: string;
1411
+ deterministic?: boolean | undefined;
1412
+ } | undefined;
1413
+ attributes?: Record<string, unknown> | undefined;
1414
+ area?: {
1415
+ areaId: string;
1416
+ areaName: string;
1417
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
1418
+ owners: string[];
1419
+ matchedGlob: string;
1420
+ } | undefined;
1421
+ }>, "many">>;
1422
+ suggestions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1423
+ nodeId: z.ZodString;
1424
+ prop: z.ZodOptional<z.ZodString>;
1425
+ action: z.ZodEnum<["remove", "replace", "add"]>;
1426
+ value: z.ZodOptional<z.ZodUnknown>;
1427
+ description: z.ZodString;
1428
+ }, "strip", z.ZodTypeAny, {
1429
+ nodeId: string;
1430
+ action: "remove" | "replace" | "add";
1431
+ description: string;
1432
+ value?: unknown;
1433
+ prop?: string | undefined;
1434
+ }, {
1435
+ nodeId: string;
1436
+ action: "remove" | "replace" | "add";
1437
+ description: string;
1438
+ value?: unknown;
1439
+ prop?: string | undefined;
1440
+ }>, "many">>;
1441
+ }, "strip", z.ZodTypeAny, {
1442
+ severity: "critical" | "serious" | "moderate" | "minor";
1443
+ validator: string;
1444
+ passed: boolean;
1445
+ violations: {
1446
+ message: string;
1447
+ severity: "critical" | "serious" | "moderate" | "minor";
1448
+ nodeId: string;
1449
+ nodeType: string;
1450
+ rule: string;
1451
+ code?: string | undefined;
1452
+ path?: string | undefined;
1453
+ line?: number | undefined;
1454
+ column?: number | undefined;
1455
+ prop?: string | undefined;
1456
+ level?: "error" | "warn" | undefined;
1457
+ helpUrl?: string | undefined;
1458
+ suggestion?: string | undefined;
1459
+ filePath?: string | undefined;
1460
+ rawValue?: string | undefined;
1461
+ extra?: Record<string, unknown> | undefined;
1462
+ }[];
1463
+ findings?: {
1464
+ message: string;
1465
+ location: {
1466
+ file: string;
1467
+ line: number;
1468
+ column: number;
1469
+ endLine?: number | undefined;
1470
+ endColumn?: number | undefined;
1471
+ };
1472
+ ruleId: string;
1473
+ ruleVersion: string;
1474
+ severity: "critical" | "serious" | "moderate" | "minor";
1475
+ level: "error" | "warn";
1476
+ fingerprint: string;
1477
+ evidence: FactEvidence[];
1478
+ code?: string | undefined;
1479
+ helpUrl?: string | undefined;
1480
+ fix?: {
1481
+ kind: "replacePropValue";
1482
+ title: string;
1483
+ prop: string;
1484
+ deterministic?: boolean | undefined;
1485
+ value?: unknown;
1486
+ } | {
1487
+ value: string;
1488
+ kind: "replaceStyleValue";
1489
+ title: string;
1490
+ property: string;
1491
+ deterministic?: boolean | undefined;
1492
+ } | {
1493
+ kind: "replaceImport";
1494
+ title: string;
1495
+ from: string;
1496
+ to: string;
1497
+ deterministic?: boolean | undefined;
1498
+ } | {
1499
+ kind: "replaceComponent";
1500
+ title: string;
1501
+ from: string;
1502
+ to: string;
1503
+ deterministic?: boolean | undefined;
1504
+ } | {
1505
+ kind: "replaceClassToken";
1506
+ title: string;
1507
+ from: string;
1508
+ to: string | null;
1509
+ utility: string;
1510
+ deterministic?: boolean | undefined;
1511
+ } | undefined;
1512
+ attributes?: Record<string, unknown> | undefined;
1513
+ area?: {
1514
+ areaId: string;
1515
+ areaName: string;
1516
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
1517
+ owners: string[];
1518
+ matchedGlob: string;
1519
+ } | undefined;
1520
+ }[] | undefined;
1521
+ suggestions?: {
1522
+ nodeId: string;
1523
+ action: "remove" | "replace" | "add";
1524
+ description: string;
1525
+ value?: unknown;
1526
+ prop?: string | undefined;
1527
+ }[] | undefined;
1528
+ }, {
1529
+ severity: "critical" | "serious" | "moderate" | "minor";
1530
+ validator: string;
1531
+ passed: boolean;
1532
+ violations: {
1533
+ message: string;
1534
+ severity: "critical" | "serious" | "moderate" | "minor";
1535
+ nodeId: string;
1536
+ nodeType: string;
1537
+ rule: string;
1538
+ code?: string | undefined;
1539
+ path?: string | undefined;
1540
+ line?: number | undefined;
1541
+ column?: number | undefined;
1542
+ prop?: string | undefined;
1543
+ level?: "error" | "warn" | undefined;
1544
+ helpUrl?: string | undefined;
1545
+ suggestion?: string | undefined;
1546
+ filePath?: string | undefined;
1547
+ rawValue?: string | undefined;
1548
+ extra?: Record<string, unknown> | undefined;
1549
+ }[];
1550
+ findings?: {
1551
+ message: string;
1552
+ location: {
1553
+ file: string;
1554
+ line: number;
1555
+ column: number;
1556
+ endLine?: number | undefined;
1557
+ endColumn?: number | undefined;
1558
+ };
1559
+ ruleId: string;
1560
+ ruleVersion: string;
1561
+ severity: "critical" | "serious" | "moderate" | "minor";
1562
+ level: "error" | "warn";
1563
+ fingerprint: string;
1564
+ evidence: FactEvidence[];
1565
+ code?: string | undefined;
1566
+ helpUrl?: string | undefined;
1567
+ fix?: {
1568
+ kind: "replacePropValue";
1569
+ title: string;
1570
+ prop: string;
1571
+ deterministic?: boolean | undefined;
1572
+ value?: unknown;
1573
+ } | {
1574
+ value: string;
1575
+ kind: "replaceStyleValue";
1576
+ title: string;
1577
+ property: string;
1578
+ deterministic?: boolean | undefined;
1579
+ } | {
1580
+ kind: "replaceImport";
1581
+ title: string;
1582
+ from: string;
1583
+ to: string;
1584
+ deterministic?: boolean | undefined;
1585
+ } | {
1586
+ kind: "replaceComponent";
1587
+ title: string;
1588
+ from: string;
1589
+ to: string;
1590
+ deterministic?: boolean | undefined;
1591
+ } | {
1592
+ kind: "replaceClassToken";
1593
+ title: string;
1594
+ from: string;
1595
+ to: string | null;
1596
+ utility: string;
1597
+ deterministic?: boolean | undefined;
1598
+ } | undefined;
1599
+ attributes?: Record<string, unknown> | undefined;
1600
+ area?: {
1601
+ areaId: string;
1602
+ areaName: string;
1603
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
1604
+ owners: string[];
1605
+ matchedGlob: string;
1606
+ } | undefined;
1607
+ }[] | undefined;
1608
+ suggestions?: {
1609
+ nodeId: string;
1610
+ action: "remove" | "replace" | "add";
1611
+ description: string;
1612
+ value?: unknown;
1613
+ prop?: string | undefined;
1614
+ }[] | undefined;
1615
+ }>, "many">;
1616
+ metadata: z.ZodObject<{
1617
+ runner: z.ZodString;
1618
+ policyVersion: z.ZodOptional<z.ZodString>;
1619
+ duration: z.ZodNumber;
1620
+ nodeCount: z.ZodNumber;
1621
+ componentTypes: z.ZodArray<z.ZodString, "many">;
1622
+ }, "strip", z.ZodTypeAny, {
1623
+ runner: string;
1624
+ duration: number;
1625
+ nodeCount: number;
1626
+ componentTypes: string[];
1627
+ policyVersion?: string | undefined;
1628
+ }, {
1629
+ runner: string;
1630
+ duration: number;
1631
+ nodeCount: number;
1632
+ componentTypes: string[];
1633
+ policyVersion?: string | undefined;
1634
+ }>;
1635
+ }, "strip", z.ZodTypeAny, {
1636
+ passed: boolean;
1637
+ score: number;
1638
+ results: {
1639
+ severity: "critical" | "serious" | "moderate" | "minor";
1640
+ validator: string;
1641
+ passed: boolean;
1642
+ violations: {
1643
+ message: string;
1644
+ severity: "critical" | "serious" | "moderate" | "minor";
1645
+ nodeId: string;
1646
+ nodeType: string;
1647
+ rule: string;
1648
+ code?: string | undefined;
1649
+ path?: string | undefined;
1650
+ line?: number | undefined;
1651
+ column?: number | undefined;
1652
+ prop?: string | undefined;
1653
+ level?: "error" | "warn" | undefined;
1654
+ helpUrl?: string | undefined;
1655
+ suggestion?: string | undefined;
1656
+ filePath?: string | undefined;
1657
+ rawValue?: string | undefined;
1658
+ extra?: Record<string, unknown> | undefined;
1659
+ }[];
1660
+ findings?: {
1661
+ message: string;
1662
+ location: {
1663
+ file: string;
1664
+ line: number;
1665
+ column: number;
1666
+ endLine?: number | undefined;
1667
+ endColumn?: number | undefined;
1668
+ };
1669
+ ruleId: string;
1670
+ ruleVersion: string;
1671
+ severity: "critical" | "serious" | "moderate" | "minor";
1672
+ level: "error" | "warn";
1673
+ fingerprint: string;
1674
+ evidence: FactEvidence[];
1675
+ code?: string | undefined;
1676
+ helpUrl?: string | undefined;
1677
+ fix?: {
1678
+ kind: "replacePropValue";
1679
+ title: string;
1680
+ prop: string;
1681
+ deterministic?: boolean | undefined;
1682
+ value?: unknown;
1683
+ } | {
1684
+ value: string;
1685
+ kind: "replaceStyleValue";
1686
+ title: string;
1687
+ property: string;
1688
+ deterministic?: boolean | undefined;
1689
+ } | {
1690
+ kind: "replaceImport";
1691
+ title: string;
1692
+ from: string;
1693
+ to: string;
1694
+ deterministic?: boolean | undefined;
1695
+ } | {
1696
+ kind: "replaceComponent";
1697
+ title: string;
1698
+ from: string;
1699
+ to: string;
1700
+ deterministic?: boolean | undefined;
1701
+ } | {
1702
+ kind: "replaceClassToken";
1703
+ title: string;
1704
+ from: string;
1705
+ to: string | null;
1706
+ utility: string;
1707
+ deterministic?: boolean | undefined;
1708
+ } | undefined;
1709
+ attributes?: Record<string, unknown> | undefined;
1710
+ area?: {
1711
+ areaId: string;
1712
+ areaName: string;
1713
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
1714
+ owners: string[];
1715
+ matchedGlob: string;
1716
+ } | undefined;
1717
+ }[] | undefined;
1718
+ suggestions?: {
1719
+ nodeId: string;
1720
+ action: "remove" | "replace" | "add";
1721
+ description: string;
1722
+ value?: unknown;
1723
+ prop?: string | undefined;
1724
+ }[] | undefined;
1725
+ }[];
1726
+ metadata: {
1727
+ runner: string;
1728
+ duration: number;
1729
+ nodeCount: number;
1730
+ componentTypes: string[];
1731
+ policyVersion?: string | undefined;
1732
+ };
1733
+ verdict?: "pass" | "fail" | "warn" | undefined;
1734
+ }, {
1735
+ passed: boolean;
1736
+ score: number;
1737
+ results: {
1738
+ severity: "critical" | "serious" | "moderate" | "minor";
1739
+ validator: string;
1740
+ passed: boolean;
1741
+ violations: {
1742
+ message: string;
1743
+ severity: "critical" | "serious" | "moderate" | "minor";
1744
+ nodeId: string;
1745
+ nodeType: string;
1746
+ rule: string;
1747
+ code?: string | undefined;
1748
+ path?: string | undefined;
1749
+ line?: number | undefined;
1750
+ column?: number | undefined;
1751
+ prop?: string | undefined;
1752
+ level?: "error" | "warn" | undefined;
1753
+ helpUrl?: string | undefined;
1754
+ suggestion?: string | undefined;
1755
+ filePath?: string | undefined;
1756
+ rawValue?: string | undefined;
1757
+ extra?: Record<string, unknown> | undefined;
1758
+ }[];
1759
+ findings?: {
1760
+ message: string;
1761
+ location: {
1762
+ file: string;
1763
+ line: number;
1764
+ column: number;
1765
+ endLine?: number | undefined;
1766
+ endColumn?: number | undefined;
1767
+ };
1768
+ ruleId: string;
1769
+ ruleVersion: string;
1770
+ severity: "critical" | "serious" | "moderate" | "minor";
1771
+ level: "error" | "warn";
1772
+ fingerprint: string;
1773
+ evidence: FactEvidence[];
1774
+ code?: string | undefined;
1775
+ helpUrl?: string | undefined;
1776
+ fix?: {
1777
+ kind: "replacePropValue";
1778
+ title: string;
1779
+ prop: string;
1780
+ deterministic?: boolean | undefined;
1781
+ value?: unknown;
1782
+ } | {
1783
+ value: string;
1784
+ kind: "replaceStyleValue";
1785
+ title: string;
1786
+ property: string;
1787
+ deterministic?: boolean | undefined;
1788
+ } | {
1789
+ kind: "replaceImport";
1790
+ title: string;
1791
+ from: string;
1792
+ to: string;
1793
+ deterministic?: boolean | undefined;
1794
+ } | {
1795
+ kind: "replaceComponent";
1796
+ title: string;
1797
+ from: string;
1798
+ to: string;
1799
+ deterministic?: boolean | undefined;
1800
+ } | {
1801
+ kind: "replaceClassToken";
1802
+ title: string;
1803
+ from: string;
1804
+ to: string | null;
1805
+ utility: string;
1806
+ deterministic?: boolean | undefined;
1807
+ } | undefined;
1808
+ attributes?: Record<string, unknown> | undefined;
1809
+ area?: {
1810
+ areaId: string;
1811
+ areaName: string;
1812
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
1813
+ owners: string[];
1814
+ matchedGlob: string;
1815
+ } | undefined;
1816
+ }[] | undefined;
1817
+ suggestions?: {
1818
+ nodeId: string;
1819
+ action: "remove" | "replace" | "add";
1820
+ description: string;
1821
+ value?: unknown;
1822
+ prop?: string | undefined;
1823
+ }[] | undefined;
1824
+ }[];
1825
+ metadata: {
1826
+ runner: string;
1827
+ duration: number;
1828
+ nodeCount: number;
1829
+ componentTypes: string[];
1830
+ policyVersion?: string | undefined;
1831
+ };
1832
+ verdict?: "pass" | "fail" | "warn" | undefined;
1833
+ }>;
1834
+ type GovernanceVerdict = z.infer<typeof governanceVerdictSchema>;
1835
+ declare const suppressionDirectiveSchema: z.ZodObject<{
1836
+ ruleId: z.ZodOptional<z.ZodString>;
1837
+ reason: z.ZodString;
1838
+ expiresAt: z.ZodOptional<z.ZodString>;
1839
+ expiresOn: z.ZodOptional<z.ZodString>;
1840
+ scope: z.ZodDefault<z.ZodEnum<["line", "block", "file"]>>;
1841
+ code: z.ZodOptional<z.ZodString>;
1842
+ }, "strip", z.ZodTypeAny, {
1843
+ reason: string;
1844
+ scope: "file" | "line" | "block";
1845
+ code?: string | undefined;
1846
+ ruleId?: string | undefined;
1847
+ expiresAt?: string | undefined;
1848
+ expiresOn?: string | undefined;
1849
+ }, {
1850
+ reason: string;
1851
+ code?: string | undefined;
1852
+ ruleId?: string | undefined;
1853
+ expiresAt?: string | undefined;
1854
+ expiresOn?: string | undefined;
1855
+ scope?: "file" | "line" | "block" | undefined;
1856
+ }>;
1857
+ type SuppressionDirective = z.infer<typeof suppressionDirectiveSchema>;
1858
+ declare const agentPlanSchema: z.ZodObject<{
1859
+ tool: z.ZodEnum<["design_system/list_primitives", "design_system/conform", "design_system/prove_compliant"]>;
1860
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1861
+ confidence: z.ZodNumber;
1862
+ }, "strip", z.ZodTypeAny, {
1863
+ tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
1864
+ args: Record<string, unknown>;
1865
+ confidence: number;
1866
+ }, {
1867
+ tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
1868
+ args: Record<string, unknown>;
1869
+ confidence: number;
1870
+ }>;
1871
+ declare const agentFindingSchema: z.ZodObject<{
1872
+ code: z.ZodOptional<z.ZodString>;
1873
+ ruleId: z.ZodString;
1874
+ filePath: z.ZodString;
1875
+ line: z.ZodNumber;
1876
+ col: z.ZodNumber;
1877
+ severity: z.ZodEnum<["critical", "serious", "moderate", "minor"]>;
1878
+ level: z.ZodEnum<["error", "warn"]>;
1879
+ message: z.ZodString;
1880
+ evidence: z.ZodArray<z.ZodType<FactEvidence, z.ZodTypeDef, FactEvidence>, "many">;
1881
+ plan: z.ZodObject<{
1882
+ tool: z.ZodEnum<["design_system/list_primitives", "design_system/conform", "design_system/prove_compliant"]>;
1883
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1884
+ confidence: z.ZodNumber;
1885
+ }, "strip", z.ZodTypeAny, {
1886
+ tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
1887
+ args: Record<string, unknown>;
1888
+ confidence: number;
1889
+ }, {
1890
+ tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
1891
+ args: Record<string, unknown>;
1892
+ confidence: number;
1893
+ }>;
1894
+ }, "strip", z.ZodTypeAny, {
1895
+ message: string;
1896
+ line: number;
1897
+ ruleId: string;
1898
+ severity: "critical" | "serious" | "moderate" | "minor";
1899
+ level: "error" | "warn";
1900
+ evidence: FactEvidence[];
1901
+ filePath: string;
1902
+ col: number;
1903
+ plan: {
1904
+ tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
1905
+ args: Record<string, unknown>;
1906
+ confidence: number;
1907
+ };
1908
+ code?: string | undefined;
1909
+ }, {
1910
+ message: string;
1911
+ line: number;
1912
+ ruleId: string;
1913
+ severity: "critical" | "serious" | "moderate" | "minor";
1914
+ level: "error" | "warn";
1915
+ evidence: FactEvidence[];
1916
+ filePath: string;
1917
+ col: number;
1918
+ plan: {
1919
+ tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
1920
+ args: Record<string, unknown>;
1921
+ confidence: number;
1922
+ };
1923
+ code?: string | undefined;
1924
+ }>;
1925
+ declare const agentFormatSchema: z.ZodObject<{
1926
+ schemaVersion: z.ZodLiteral<"typestyle.agent.v1">;
1927
+ passed: z.ZodBoolean;
1928
+ score: z.ZodNumber;
1929
+ summary: z.ZodString;
1930
+ fix_first: z.ZodArray<z.ZodObject<{
1931
+ code: z.ZodOptional<z.ZodString>;
1932
+ ruleId: z.ZodString;
1933
+ filePath: z.ZodString;
1934
+ line: z.ZodNumber;
1935
+ col: z.ZodNumber;
1936
+ severity: z.ZodEnum<["critical", "serious", "moderate", "minor"]>;
1937
+ level: z.ZodEnum<["error", "warn"]>;
1938
+ message: z.ZodString;
1939
+ evidence: z.ZodArray<z.ZodType<FactEvidence, z.ZodTypeDef, FactEvidence>, "many">;
1940
+ plan: z.ZodObject<{
1941
+ tool: z.ZodEnum<["design_system/list_primitives", "design_system/conform", "design_system/prove_compliant"]>;
1942
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1943
+ confidence: z.ZodNumber;
1944
+ }, "strip", z.ZodTypeAny, {
1945
+ tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
1946
+ args: Record<string, unknown>;
1947
+ confidence: number;
1948
+ }, {
1949
+ tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
1950
+ args: Record<string, unknown>;
1951
+ confidence: number;
1952
+ }>;
1953
+ }, "strip", z.ZodTypeAny, {
1954
+ message: string;
1955
+ line: number;
1956
+ ruleId: string;
1957
+ severity: "critical" | "serious" | "moderate" | "minor";
1958
+ level: "error" | "warn";
1959
+ evidence: FactEvidence[];
1960
+ filePath: string;
1961
+ col: number;
1962
+ plan: {
1963
+ tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
1964
+ args: Record<string, unknown>;
1965
+ confidence: number;
1966
+ };
1967
+ code?: string | undefined;
1968
+ }, {
1969
+ message: string;
1970
+ line: number;
1971
+ ruleId: string;
1972
+ severity: "critical" | "serious" | "moderate" | "minor";
1973
+ level: "error" | "warn";
1974
+ evidence: FactEvidence[];
1975
+ filePath: string;
1976
+ col: number;
1977
+ plan: {
1978
+ tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
1979
+ args: Record<string, unknown>;
1980
+ confidence: number;
1981
+ };
1982
+ code?: string | undefined;
1983
+ }>, "many">;
1984
+ remaining: z.ZodArray<z.ZodObject<{
1985
+ code: z.ZodOptional<z.ZodString>;
1986
+ ruleId: z.ZodString;
1987
+ filePath: z.ZodString;
1988
+ line: z.ZodNumber;
1989
+ col: z.ZodNumber;
1990
+ severity: z.ZodEnum<["critical", "serious", "moderate", "minor"]>;
1991
+ level: z.ZodEnum<["error", "warn"]>;
1992
+ message: z.ZodString;
1993
+ evidence: z.ZodArray<z.ZodType<FactEvidence, z.ZodTypeDef, FactEvidence>, "many">;
1994
+ plan: z.ZodObject<{
1995
+ tool: z.ZodEnum<["design_system/list_primitives", "design_system/conform", "design_system/prove_compliant"]>;
1996
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1997
+ confidence: z.ZodNumber;
1998
+ }, "strip", z.ZodTypeAny, {
1999
+ tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2000
+ args: Record<string, unknown>;
2001
+ confidence: number;
2002
+ }, {
2003
+ tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2004
+ args: Record<string, unknown>;
2005
+ confidence: number;
2006
+ }>;
2007
+ }, "strip", z.ZodTypeAny, {
2008
+ message: string;
2009
+ line: number;
2010
+ ruleId: string;
2011
+ severity: "critical" | "serious" | "moderate" | "minor";
2012
+ level: "error" | "warn";
2013
+ evidence: FactEvidence[];
2014
+ filePath: string;
2015
+ col: number;
2016
+ plan: {
2017
+ tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2018
+ args: Record<string, unknown>;
2019
+ confidence: number;
2020
+ };
2021
+ code?: string | undefined;
2022
+ }, {
2023
+ message: string;
2024
+ line: number;
2025
+ ruleId: string;
2026
+ severity: "critical" | "serious" | "moderate" | "minor";
2027
+ level: "error" | "warn";
2028
+ evidence: FactEvidence[];
2029
+ filePath: string;
2030
+ col: number;
2031
+ plan: {
2032
+ tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2033
+ args: Record<string, unknown>;
2034
+ confidence: number;
2035
+ };
2036
+ code?: string | undefined;
2037
+ }>, "many">;
2038
+ suppression_template: z.ZodObject<{
2039
+ directive: z.ZodString;
2040
+ requiredFields: z.ZodArray<z.ZodString, "many">;
2041
+ example: z.ZodString;
2042
+ }, "strip", z.ZodTypeAny, {
2043
+ directive: string;
2044
+ requiredFields: string[];
2045
+ example: string;
2046
+ }, {
2047
+ directive: string;
2048
+ requiredFields: string[];
2049
+ example: string;
2050
+ }>;
2051
+ budget: z.ZodObject<{
2052
+ iteration: z.ZodNumber;
2053
+ maxIterations: z.ZodNumber;
2054
+ scoreDelta: z.ZodNumber;
2055
+ }, "strip", z.ZodTypeAny, {
2056
+ iteration: number;
2057
+ maxIterations: number;
2058
+ scoreDelta: number;
2059
+ }, {
2060
+ iteration: number;
2061
+ maxIterations: number;
2062
+ scoreDelta: number;
2063
+ }>;
2064
+ findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
2065
+ ruleId: z.ZodString;
2066
+ ruleVersion: z.ZodString;
2067
+ severity: z.ZodEnum<["critical", "serious", "moderate", "minor"]>;
2068
+ level: z.ZodEnum<["error", "warn"]>;
2069
+ code: z.ZodOptional<z.ZodString>;
2070
+ helpUrl: z.ZodOptional<z.ZodString>;
2071
+ message: z.ZodString;
2072
+ fingerprint: z.ZodString;
2073
+ location: z.ZodObject<{
2074
+ file: z.ZodString;
2075
+ line: z.ZodNumber;
2076
+ column: z.ZodNumber;
2077
+ endLine: z.ZodOptional<z.ZodNumber>;
2078
+ endColumn: z.ZodOptional<z.ZodNumber>;
2079
+ }, "strip", z.ZodTypeAny, {
2080
+ file: string;
2081
+ line: number;
2082
+ column: number;
2083
+ endLine?: number | undefined;
2084
+ endColumn?: number | undefined;
2085
+ }, {
2086
+ file: string;
2087
+ line: number;
2088
+ column: number;
2089
+ endLine?: number | undefined;
2090
+ endColumn?: number | undefined;
2091
+ }>;
2092
+ evidence: z.ZodArray<z.ZodType<FactEvidence, z.ZodTypeDef, FactEvidence>, "many">;
2093
+ fix: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2094
+ kind: z.ZodLiteral<"replacePropValue">;
2095
+ title: z.ZodString;
2096
+ prop: z.ZodString;
2097
+ value: z.ZodUnknown;
2098
+ deterministic: z.ZodOptional<z.ZodBoolean>;
2099
+ }, "strip", z.ZodTypeAny, {
2100
+ kind: "replacePropValue";
2101
+ title: string;
2102
+ prop: string;
2103
+ deterministic?: boolean | undefined;
2104
+ value?: unknown;
2105
+ }, {
2106
+ kind: "replacePropValue";
2107
+ title: string;
2108
+ prop: string;
2109
+ deterministic?: boolean | undefined;
2110
+ value?: unknown;
2111
+ }>, z.ZodObject<{
2112
+ kind: z.ZodLiteral<"replaceStyleValue">;
2113
+ title: z.ZodString;
2114
+ property: z.ZodString;
2115
+ value: z.ZodString;
2116
+ deterministic: z.ZodOptional<z.ZodBoolean>;
2117
+ }, "strip", z.ZodTypeAny, {
2118
+ value: string;
2119
+ kind: "replaceStyleValue";
2120
+ title: string;
2121
+ property: string;
2122
+ deterministic?: boolean | undefined;
2123
+ }, {
2124
+ value: string;
2125
+ kind: "replaceStyleValue";
2126
+ title: string;
2127
+ property: string;
2128
+ deterministic?: boolean | undefined;
2129
+ }>, z.ZodObject<{
2130
+ kind: z.ZodLiteral<"replaceImport">;
2131
+ title: z.ZodString;
2132
+ from: z.ZodString;
2133
+ to: z.ZodString;
2134
+ deterministic: z.ZodOptional<z.ZodBoolean>;
2135
+ }, "strip", z.ZodTypeAny, {
2136
+ kind: "replaceImport";
2137
+ title: string;
2138
+ from: string;
2139
+ to: string;
2140
+ deterministic?: boolean | undefined;
2141
+ }, {
2142
+ kind: "replaceImport";
2143
+ title: string;
2144
+ from: string;
2145
+ to: string;
2146
+ deterministic?: boolean | undefined;
2147
+ }>, z.ZodObject<{
2148
+ kind: z.ZodLiteral<"replaceComponent">;
2149
+ title: z.ZodString;
2150
+ from: z.ZodString;
2151
+ to: z.ZodString;
2152
+ deterministic: z.ZodOptional<z.ZodBoolean>;
2153
+ }, "strip", z.ZodTypeAny, {
2154
+ kind: "replaceComponent";
2155
+ title: string;
2156
+ from: string;
2157
+ to: string;
2158
+ deterministic?: boolean | undefined;
2159
+ }, {
2160
+ kind: "replaceComponent";
2161
+ title: string;
2162
+ from: string;
2163
+ to: string;
2164
+ deterministic?: boolean | undefined;
2165
+ }>, z.ZodObject<{
2166
+ kind: z.ZodLiteral<"replaceClassToken">;
2167
+ title: z.ZodString;
2168
+ from: z.ZodString;
2169
+ to: z.ZodNullable<z.ZodString>;
2170
+ utility: z.ZodString;
2171
+ deterministic: z.ZodOptional<z.ZodBoolean>;
2172
+ }, "strip", z.ZodTypeAny, {
2173
+ kind: "replaceClassToken";
2174
+ title: string;
2175
+ from: string;
2176
+ to: string | null;
2177
+ utility: string;
2178
+ deterministic?: boolean | undefined;
2179
+ }, {
2180
+ kind: "replaceClassToken";
2181
+ title: string;
2182
+ from: string;
2183
+ to: string | null;
2184
+ utility: string;
2185
+ deterministic?: boolean | undefined;
2186
+ }>]>>;
2187
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2188
+ /**
2189
+ * Product area this finding's file resolved to (topology layer). Optional —
2190
+ * absent when the repo has no `topology` config. See `topology/resolve-area`.
2191
+ */
2192
+ area: z.ZodOptional<z.ZodObject<{
2193
+ areaId: z.ZodString;
2194
+ areaName: z.ZodString;
2195
+ criticality: z.ZodEnum<["low", "medium", "high", "revenue", "regulated"]>;
2196
+ owners: z.ZodArray<z.ZodString, "many">;
2197
+ matchedGlob: z.ZodString;
2198
+ }, "strip", z.ZodTypeAny, {
2199
+ areaId: string;
2200
+ areaName: string;
2201
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
2202
+ owners: string[];
2203
+ matchedGlob: string;
2204
+ }, {
2205
+ areaId: string;
2206
+ areaName: string;
2207
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
2208
+ owners: string[];
2209
+ matchedGlob: string;
2210
+ }>>;
2211
+ }, "strip", z.ZodTypeAny, {
2212
+ message: string;
2213
+ location: {
2214
+ file: string;
2215
+ line: number;
2216
+ column: number;
2217
+ endLine?: number | undefined;
2218
+ endColumn?: number | undefined;
2219
+ };
2220
+ ruleId: string;
2221
+ ruleVersion: string;
2222
+ severity: "critical" | "serious" | "moderate" | "minor";
2223
+ level: "error" | "warn";
2224
+ fingerprint: string;
2225
+ evidence: FactEvidence[];
2226
+ code?: string | undefined;
2227
+ helpUrl?: string | undefined;
2228
+ fix?: {
2229
+ kind: "replacePropValue";
2230
+ title: string;
2231
+ prop: string;
2232
+ deterministic?: boolean | undefined;
2233
+ value?: unknown;
2234
+ } | {
2235
+ value: string;
2236
+ kind: "replaceStyleValue";
2237
+ title: string;
2238
+ property: string;
2239
+ deterministic?: boolean | undefined;
2240
+ } | {
2241
+ kind: "replaceImport";
2242
+ title: string;
2243
+ from: string;
2244
+ to: string;
2245
+ deterministic?: boolean | undefined;
2246
+ } | {
2247
+ kind: "replaceComponent";
2248
+ title: string;
2249
+ from: string;
2250
+ to: string;
2251
+ deterministic?: boolean | undefined;
2252
+ } | {
2253
+ kind: "replaceClassToken";
2254
+ title: string;
2255
+ from: string;
2256
+ to: string | null;
2257
+ utility: string;
2258
+ deterministic?: boolean | undefined;
2259
+ } | undefined;
2260
+ attributes?: Record<string, unknown> | undefined;
2261
+ area?: {
2262
+ areaId: string;
2263
+ areaName: string;
2264
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
2265
+ owners: string[];
2266
+ matchedGlob: string;
2267
+ } | undefined;
2268
+ }, {
2269
+ message: string;
2270
+ location: {
2271
+ file: string;
2272
+ line: number;
2273
+ column: number;
2274
+ endLine?: number | undefined;
2275
+ endColumn?: number | undefined;
2276
+ };
2277
+ ruleId: string;
2278
+ ruleVersion: string;
2279
+ severity: "critical" | "serious" | "moderate" | "minor";
2280
+ level: "error" | "warn";
2281
+ fingerprint: string;
2282
+ evidence: FactEvidence[];
2283
+ code?: string | undefined;
2284
+ helpUrl?: string | undefined;
2285
+ fix?: {
2286
+ kind: "replacePropValue";
2287
+ title: string;
2288
+ prop: string;
2289
+ deterministic?: boolean | undefined;
2290
+ value?: unknown;
2291
+ } | {
2292
+ value: string;
2293
+ kind: "replaceStyleValue";
2294
+ title: string;
2295
+ property: string;
2296
+ deterministic?: boolean | undefined;
2297
+ } | {
2298
+ kind: "replaceImport";
2299
+ title: string;
2300
+ from: string;
2301
+ to: string;
2302
+ deterministic?: boolean | undefined;
2303
+ } | {
2304
+ kind: "replaceComponent";
2305
+ title: string;
2306
+ from: string;
2307
+ to: string;
2308
+ deterministic?: boolean | undefined;
2309
+ } | {
2310
+ kind: "replaceClassToken";
2311
+ title: string;
2312
+ from: string;
2313
+ to: string | null;
2314
+ utility: string;
2315
+ deterministic?: boolean | undefined;
2316
+ } | undefined;
2317
+ attributes?: Record<string, unknown> | undefined;
2318
+ area?: {
2319
+ areaId: string;
2320
+ areaName: string;
2321
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
2322
+ owners: string[];
2323
+ matchedGlob: string;
2324
+ } | undefined;
2325
+ }>, "many">>;
2326
+ suppressions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2327
+ ruleId: z.ZodOptional<z.ZodString>;
2328
+ reason: z.ZodString;
2329
+ expiresAt: z.ZodOptional<z.ZodString>;
2330
+ expiresOn: z.ZodOptional<z.ZodString>;
2331
+ scope: z.ZodDefault<z.ZodEnum<["line", "block", "file"]>>;
2332
+ code: z.ZodOptional<z.ZodString>;
2333
+ }, "strip", z.ZodTypeAny, {
2334
+ reason: string;
2335
+ scope: "file" | "line" | "block";
2336
+ code?: string | undefined;
2337
+ ruleId?: string | undefined;
2338
+ expiresAt?: string | undefined;
2339
+ expiresOn?: string | undefined;
2340
+ }, {
2341
+ reason: string;
2342
+ code?: string | undefined;
2343
+ ruleId?: string | undefined;
2344
+ expiresAt?: string | undefined;
2345
+ expiresOn?: string | undefined;
2346
+ scope?: "file" | "line" | "block" | undefined;
2347
+ }>, "many">>;
2348
+ }, "strip", z.ZodTypeAny, {
2349
+ passed: boolean;
2350
+ score: number;
2351
+ schemaVersion: "typestyle.agent.v1";
2352
+ summary: string;
2353
+ fix_first: {
2354
+ message: string;
2355
+ line: number;
2356
+ ruleId: string;
2357
+ severity: "critical" | "serious" | "moderate" | "minor";
2358
+ level: "error" | "warn";
2359
+ evidence: FactEvidence[];
2360
+ filePath: string;
2361
+ col: number;
2362
+ plan: {
2363
+ tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2364
+ args: Record<string, unknown>;
2365
+ confidence: number;
2366
+ };
2367
+ code?: string | undefined;
2368
+ }[];
2369
+ remaining: {
2370
+ message: string;
2371
+ line: number;
2372
+ ruleId: string;
2373
+ severity: "critical" | "serious" | "moderate" | "minor";
2374
+ level: "error" | "warn";
2375
+ evidence: FactEvidence[];
2376
+ filePath: string;
2377
+ col: number;
2378
+ plan: {
2379
+ tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2380
+ args: Record<string, unknown>;
2381
+ confidence: number;
2382
+ };
2383
+ code?: string | undefined;
2384
+ }[];
2385
+ suppression_template: {
2386
+ directive: string;
2387
+ requiredFields: string[];
2388
+ example: string;
2389
+ };
2390
+ budget: {
2391
+ iteration: number;
2392
+ maxIterations: number;
2393
+ scoreDelta: number;
2394
+ };
2395
+ findings?: {
2396
+ message: string;
2397
+ location: {
2398
+ file: string;
2399
+ line: number;
2400
+ column: number;
2401
+ endLine?: number | undefined;
2402
+ endColumn?: number | undefined;
2403
+ };
2404
+ ruleId: string;
2405
+ ruleVersion: string;
2406
+ severity: "critical" | "serious" | "moderate" | "minor";
2407
+ level: "error" | "warn";
2408
+ fingerprint: string;
2409
+ evidence: FactEvidence[];
2410
+ code?: string | undefined;
2411
+ helpUrl?: string | undefined;
2412
+ fix?: {
2413
+ kind: "replacePropValue";
2414
+ title: string;
2415
+ prop: string;
2416
+ deterministic?: boolean | undefined;
2417
+ value?: unknown;
2418
+ } | {
2419
+ value: string;
2420
+ kind: "replaceStyleValue";
2421
+ title: string;
2422
+ property: string;
2423
+ deterministic?: boolean | undefined;
2424
+ } | {
2425
+ kind: "replaceImport";
2426
+ title: string;
2427
+ from: string;
2428
+ to: string;
2429
+ deterministic?: boolean | undefined;
2430
+ } | {
2431
+ kind: "replaceComponent";
2432
+ title: string;
2433
+ from: string;
2434
+ to: string;
2435
+ deterministic?: boolean | undefined;
2436
+ } | {
2437
+ kind: "replaceClassToken";
2438
+ title: string;
2439
+ from: string;
2440
+ to: string | null;
2441
+ utility: string;
2442
+ deterministic?: boolean | undefined;
2443
+ } | undefined;
2444
+ attributes?: Record<string, unknown> | undefined;
2445
+ area?: {
2446
+ areaId: string;
2447
+ areaName: string;
2448
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
2449
+ owners: string[];
2450
+ matchedGlob: string;
2451
+ } | undefined;
2452
+ }[] | undefined;
2453
+ suppressions?: {
2454
+ reason: string;
2455
+ scope: "file" | "line" | "block";
2456
+ code?: string | undefined;
2457
+ ruleId?: string | undefined;
2458
+ expiresAt?: string | undefined;
2459
+ expiresOn?: string | undefined;
2460
+ }[] | undefined;
2461
+ }, {
2462
+ passed: boolean;
2463
+ score: number;
2464
+ schemaVersion: "typestyle.agent.v1";
2465
+ summary: string;
2466
+ fix_first: {
2467
+ message: string;
2468
+ line: number;
2469
+ ruleId: string;
2470
+ severity: "critical" | "serious" | "moderate" | "minor";
2471
+ level: "error" | "warn";
2472
+ evidence: FactEvidence[];
2473
+ filePath: string;
2474
+ col: number;
2475
+ plan: {
2476
+ tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2477
+ args: Record<string, unknown>;
2478
+ confidence: number;
2479
+ };
2480
+ code?: string | undefined;
2481
+ }[];
2482
+ remaining: {
2483
+ message: string;
2484
+ line: number;
2485
+ ruleId: string;
2486
+ severity: "critical" | "serious" | "moderate" | "minor";
2487
+ level: "error" | "warn";
2488
+ evidence: FactEvidence[];
2489
+ filePath: string;
2490
+ col: number;
2491
+ plan: {
2492
+ tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2493
+ args: Record<string, unknown>;
2494
+ confidence: number;
2495
+ };
2496
+ code?: string | undefined;
2497
+ }[];
2498
+ suppression_template: {
2499
+ directive: string;
2500
+ requiredFields: string[];
2501
+ example: string;
2502
+ };
2503
+ budget: {
2504
+ iteration: number;
2505
+ maxIterations: number;
2506
+ scoreDelta: number;
2507
+ };
2508
+ findings?: {
2509
+ message: string;
2510
+ location: {
2511
+ file: string;
2512
+ line: number;
2513
+ column: number;
2514
+ endLine?: number | undefined;
2515
+ endColumn?: number | undefined;
2516
+ };
2517
+ ruleId: string;
2518
+ ruleVersion: string;
2519
+ severity: "critical" | "serious" | "moderate" | "minor";
2520
+ level: "error" | "warn";
2521
+ fingerprint: string;
2522
+ evidence: FactEvidence[];
2523
+ code?: string | undefined;
2524
+ helpUrl?: string | undefined;
2525
+ fix?: {
2526
+ kind: "replacePropValue";
2527
+ title: string;
2528
+ prop: string;
2529
+ deterministic?: boolean | undefined;
2530
+ value?: unknown;
2531
+ } | {
2532
+ value: string;
2533
+ kind: "replaceStyleValue";
2534
+ title: string;
2535
+ property: string;
2536
+ deterministic?: boolean | undefined;
2537
+ } | {
2538
+ kind: "replaceImport";
2539
+ title: string;
2540
+ from: string;
2541
+ to: string;
2542
+ deterministic?: boolean | undefined;
2543
+ } | {
2544
+ kind: "replaceComponent";
2545
+ title: string;
2546
+ from: string;
2547
+ to: string;
2548
+ deterministic?: boolean | undefined;
2549
+ } | {
2550
+ kind: "replaceClassToken";
2551
+ title: string;
2552
+ from: string;
2553
+ to: string | null;
2554
+ utility: string;
2555
+ deterministic?: boolean | undefined;
2556
+ } | undefined;
2557
+ attributes?: Record<string, unknown> | undefined;
2558
+ area?: {
2559
+ areaId: string;
2560
+ areaName: string;
2561
+ criticality: "high" | "medium" | "low" | "revenue" | "regulated";
2562
+ owners: string[];
2563
+ matchedGlob: string;
2564
+ } | undefined;
2565
+ }[] | undefined;
2566
+ suppressions?: {
2567
+ reason: string;
2568
+ code?: string | undefined;
2569
+ ruleId?: string | undefined;
2570
+ expiresAt?: string | undefined;
2571
+ expiresOn?: string | undefined;
2572
+ scope?: "file" | "line" | "block" | undefined;
2573
+ }[] | undefined;
2574
+ }>;
2575
+ type AgentFormat = z.infer<typeof agentFormatSchema>;
2576
+ declare function normalizeSeverity(severity: Severity | LegacySeverityLevel): Severity;
2577
+ declare function normalizeFinding(input: Omit<Finding, "level"> & {
2578
+ level?: Finding["level"];
2579
+ }): Finding;
2580
+ declare function normalizeViolation(input: Omit<Violation, "level"> & {
2581
+ level?: Violation["level"];
2582
+ }): Violation;
2583
+
2584
+ export { type AgentFormat, type FactEvidence, type FactLocation, type Finding, type FindingFix, type FindingReplaceClassTokenFix, type FindingReplaceComponentFix, type FindingReplaceImportFix, type FindingReplacePropValueFix, type FindingReplaceStyleValueFix, type Fix, type GovernanceVerdict, type GovernanceVerdictMetadata, LegacySeverityLevel, Severity, type SuppressionDirective, type ValidatorResult, type Violation, agentFindingSchema, agentFormatSchema, agentPlanSchema, factEvidenceSchema, factLocationSchema, findingFixSchema, findingReplaceClassTokenFixSchema, findingReplaceComponentFixSchema, findingReplaceImportFixSchema, findingReplacePropValueFixSchema, findingReplaceStyleValueFixSchema, findingSchema, fixSchema, governanceVerdictMetadataSchema, governanceVerdictSchema, normalizeFinding, normalizeSeverity, normalizeViolation, suppressionDirectiveSchema, validatorResultSchema, violationSchema };