@usefragments/core 1.2.0 → 1.3.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 (43) hide show
  1. package/dist/{chunk-BQQTMGLA.js → chunk-57QDBEHQ.js} +79 -6
  2. package/dist/chunk-57QDBEHQ.js.map +1 -0
  3. package/dist/{chunk-DBVTSUMT.js → chunk-MLRDNSSA.js} +20 -6
  4. package/dist/chunk-MLRDNSSA.js.map +1 -0
  5. package/dist/codes/index.d.ts +1 -1
  6. package/dist/codes/index.js +2 -2
  7. package/dist/index-h_yWj15D.d.ts +6981 -0
  8. package/dist/index.d.ts +106 -92
  9. package/dist/index.js +235 -98
  10. package/dist/index.js.map +1 -1
  11. package/dist/registry.d.ts +36 -36
  12. package/dist/schemas/index.d.ts +3 -3377
  13. package/dist/schemas/index.js +1 -1
  14. package/package.json +1 -1
  15. package/src/agent-format.test.ts +75 -3
  16. package/src/agent-format.ts +28 -6
  17. package/src/evidence.ts +27 -0
  18. package/src/facts/builders.ts +2 -0
  19. package/src/facts/fact-index.ts +22 -2
  20. package/src/facts/facts.test.ts +1 -1
  21. package/src/facts/types.ts +2 -0
  22. package/src/index.ts +4 -0
  23. package/src/rules/__tests__/fix-emission-invariant.test.ts +174 -0
  24. package/src/rules/__tests__/tokens-require-dual-fallback.test.ts +90 -0
  25. package/src/rules/emit-gate.test.ts +16 -0
  26. package/src/rules/emit-gate.ts +6 -3
  27. package/src/rules/finding.ts +3 -0
  28. package/src/rules/rules.test.ts +2 -1
  29. package/src/rules/spacing-resolution.ts +5 -8
  30. package/src/rules/styles-no-raw-color.ts +32 -23
  31. package/src/rules/styles-no-raw-dimensions.ts +31 -12
  32. package/src/rules/styles-no-raw-spacing.ts +33 -11
  33. package/src/rules/styles-no-raw-typography.ts +37 -15
  34. package/src/rules/taxonomy.test.ts +13 -0
  35. package/src/rules/tokens-require-dual-fallback.ts +54 -17
  36. package/src/rules/utils.ts +51 -0
  37. package/src/schemas/index.ts +81 -3
  38. package/src/token-types.ts +6 -0
  39. package/src/tokens/__tests__/source-names.test.ts +42 -0
  40. package/src/tokens/design-token-parser.test.ts +24 -5
  41. package/src/tokens/design-token-parser.ts +40 -8
  42. package/dist/chunk-BQQTMGLA.js.map +0 -1
  43. package/dist/chunk-DBVTSUMT.js.map +0 -1
@@ -1,3377 +1,3 @@
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 AGENT_FORMAT_SCHEMA_VERSION: "typestyle.agent.v2";
1926
- declare const agentIntegritySchema: z.ZodObject<{
1927
- rulesLoaded: z.ZodNumber;
1928
- status: z.ZodEnum<["healthy", "degraded", "inert"]>;
1929
- healthy: z.ZodBoolean;
1930
- inert: z.ZodBoolean;
1931
- reasons: z.ZodArray<z.ZodString, "many">;
1932
- }, "strip", z.ZodTypeAny, {
1933
- status: "healthy" | "degraded" | "inert";
1934
- rulesLoaded: number;
1935
- healthy: boolean;
1936
- inert: boolean;
1937
- reasons: string[];
1938
- }, {
1939
- status: "healthy" | "degraded" | "inert";
1940
- rulesLoaded: number;
1941
- healthy: boolean;
1942
- inert: boolean;
1943
- reasons: string[];
1944
- }>;
1945
- declare const agentFormatSchema: z.ZodObject<{
1946
- schemaVersion: z.ZodLiteral<"typestyle.agent.v2">;
1947
- passed: z.ZodBoolean;
1948
- score: z.ZodNumber;
1949
- summary: z.ZodString;
1950
- integrity: z.ZodObject<{
1951
- rulesLoaded: z.ZodNumber;
1952
- status: z.ZodEnum<["healthy", "degraded", "inert"]>;
1953
- healthy: z.ZodBoolean;
1954
- inert: z.ZodBoolean;
1955
- reasons: z.ZodArray<z.ZodString, "many">;
1956
- }, "strip", z.ZodTypeAny, {
1957
- status: "healthy" | "degraded" | "inert";
1958
- rulesLoaded: number;
1959
- healthy: boolean;
1960
- inert: boolean;
1961
- reasons: string[];
1962
- }, {
1963
- status: "healthy" | "degraded" | "inert";
1964
- rulesLoaded: number;
1965
- healthy: boolean;
1966
- inert: boolean;
1967
- reasons: string[];
1968
- }>;
1969
- fix_first: z.ZodArray<z.ZodObject<{
1970
- code: z.ZodOptional<z.ZodString>;
1971
- ruleId: z.ZodString;
1972
- filePath: z.ZodString;
1973
- line: z.ZodNumber;
1974
- col: z.ZodNumber;
1975
- severity: z.ZodEnum<["critical", "serious", "moderate", "minor"]>;
1976
- level: z.ZodEnum<["error", "warn"]>;
1977
- message: z.ZodString;
1978
- evidence: z.ZodArray<z.ZodType<FactEvidence, z.ZodTypeDef, FactEvidence>, "many">;
1979
- plan: z.ZodObject<{
1980
- tool: z.ZodEnum<["design_system/list_primitives", "design_system/conform", "design_system/prove_compliant"]>;
1981
- args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1982
- confidence: z.ZodNumber;
1983
- }, "strip", z.ZodTypeAny, {
1984
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
1985
- args: Record<string, unknown>;
1986
- confidence: number;
1987
- }, {
1988
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
1989
- args: Record<string, unknown>;
1990
- confidence: number;
1991
- }>;
1992
- }, "strip", z.ZodTypeAny, {
1993
- message: string;
1994
- line: number;
1995
- ruleId: string;
1996
- severity: "critical" | "serious" | "moderate" | "minor";
1997
- level: "error" | "warn";
1998
- evidence: FactEvidence[];
1999
- filePath: string;
2000
- col: number;
2001
- plan: {
2002
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2003
- args: Record<string, unknown>;
2004
- confidence: number;
2005
- };
2006
- code?: string | undefined;
2007
- }, {
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
- }>, "many">;
2023
- remaining: z.ZodArray<z.ZodObject<{
2024
- code: z.ZodOptional<z.ZodString>;
2025
- ruleId: z.ZodString;
2026
- filePath: z.ZodString;
2027
- line: z.ZodNumber;
2028
- col: z.ZodNumber;
2029
- severity: z.ZodEnum<["critical", "serious", "moderate", "minor"]>;
2030
- level: z.ZodEnum<["error", "warn"]>;
2031
- message: z.ZodString;
2032
- evidence: z.ZodArray<z.ZodType<FactEvidence, z.ZodTypeDef, FactEvidence>, "many">;
2033
- plan: z.ZodObject<{
2034
- tool: z.ZodEnum<["design_system/list_primitives", "design_system/conform", "design_system/prove_compliant"]>;
2035
- args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2036
- confidence: z.ZodNumber;
2037
- }, "strip", z.ZodTypeAny, {
2038
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2039
- args: Record<string, unknown>;
2040
- confidence: number;
2041
- }, {
2042
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2043
- args: Record<string, unknown>;
2044
- confidence: number;
2045
- }>;
2046
- }, "strip", z.ZodTypeAny, {
2047
- message: string;
2048
- line: number;
2049
- ruleId: string;
2050
- severity: "critical" | "serious" | "moderate" | "minor";
2051
- level: "error" | "warn";
2052
- evidence: FactEvidence[];
2053
- filePath: string;
2054
- col: number;
2055
- plan: {
2056
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2057
- args: Record<string, unknown>;
2058
- confidence: number;
2059
- };
2060
- code?: string | undefined;
2061
- }, {
2062
- message: string;
2063
- line: number;
2064
- ruleId: string;
2065
- severity: "critical" | "serious" | "moderate" | "minor";
2066
- level: "error" | "warn";
2067
- evidence: FactEvidence[];
2068
- filePath: string;
2069
- col: number;
2070
- plan: {
2071
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2072
- args: Record<string, unknown>;
2073
- confidence: number;
2074
- };
2075
- code?: string | undefined;
2076
- }>, "many">;
2077
- suppression_template: z.ZodObject<{
2078
- directive: z.ZodString;
2079
- requiredFields: z.ZodArray<z.ZodString, "many">;
2080
- example: z.ZodString;
2081
- }, "strip", z.ZodTypeAny, {
2082
- directive: string;
2083
- requiredFields: string[];
2084
- example: string;
2085
- }, {
2086
- directive: string;
2087
- requiredFields: string[];
2088
- example: string;
2089
- }>;
2090
- budget: z.ZodObject<{
2091
- iteration: z.ZodNumber;
2092
- maxIterations: z.ZodNumber;
2093
- scoreDelta: z.ZodNumber;
2094
- }, "strip", z.ZodTypeAny, {
2095
- iteration: number;
2096
- maxIterations: number;
2097
- scoreDelta: number;
2098
- }, {
2099
- iteration: number;
2100
- maxIterations: number;
2101
- scoreDelta: number;
2102
- }>;
2103
- findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
2104
- ruleId: z.ZodString;
2105
- ruleVersion: z.ZodString;
2106
- severity: z.ZodEnum<["critical", "serious", "moderate", "minor"]>;
2107
- level: z.ZodEnum<["error", "warn"]>;
2108
- code: z.ZodOptional<z.ZodString>;
2109
- helpUrl: z.ZodOptional<z.ZodString>;
2110
- message: z.ZodString;
2111
- fingerprint: z.ZodString;
2112
- location: z.ZodObject<{
2113
- file: z.ZodString;
2114
- line: z.ZodNumber;
2115
- column: z.ZodNumber;
2116
- endLine: z.ZodOptional<z.ZodNumber>;
2117
- endColumn: z.ZodOptional<z.ZodNumber>;
2118
- }, "strip", z.ZodTypeAny, {
2119
- file: string;
2120
- line: number;
2121
- column: number;
2122
- endLine?: number | undefined;
2123
- endColumn?: number | undefined;
2124
- }, {
2125
- file: string;
2126
- line: number;
2127
- column: number;
2128
- endLine?: number | undefined;
2129
- endColumn?: number | undefined;
2130
- }>;
2131
- evidence: z.ZodArray<z.ZodType<FactEvidence, z.ZodTypeDef, FactEvidence>, "many">;
2132
- fix: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2133
- kind: z.ZodLiteral<"replacePropValue">;
2134
- title: z.ZodString;
2135
- prop: z.ZodString;
2136
- value: z.ZodUnknown;
2137
- deterministic: z.ZodOptional<z.ZodBoolean>;
2138
- }, "strip", z.ZodTypeAny, {
2139
- kind: "replacePropValue";
2140
- title: string;
2141
- prop: string;
2142
- deterministic?: boolean | undefined;
2143
- value?: unknown;
2144
- }, {
2145
- kind: "replacePropValue";
2146
- title: string;
2147
- prop: string;
2148
- deterministic?: boolean | undefined;
2149
- value?: unknown;
2150
- }>, z.ZodObject<{
2151
- kind: z.ZodLiteral<"replaceStyleValue">;
2152
- title: z.ZodString;
2153
- property: z.ZodString;
2154
- value: z.ZodString;
2155
- deterministic: z.ZodOptional<z.ZodBoolean>;
2156
- }, "strip", z.ZodTypeAny, {
2157
- value: string;
2158
- kind: "replaceStyleValue";
2159
- title: string;
2160
- property: string;
2161
- deterministic?: boolean | undefined;
2162
- }, {
2163
- value: string;
2164
- kind: "replaceStyleValue";
2165
- title: string;
2166
- property: string;
2167
- deterministic?: boolean | undefined;
2168
- }>, z.ZodObject<{
2169
- kind: z.ZodLiteral<"replaceImport">;
2170
- title: z.ZodString;
2171
- from: z.ZodString;
2172
- to: z.ZodString;
2173
- deterministic: z.ZodOptional<z.ZodBoolean>;
2174
- }, "strip", z.ZodTypeAny, {
2175
- kind: "replaceImport";
2176
- title: string;
2177
- from: string;
2178
- to: string;
2179
- deterministic?: boolean | undefined;
2180
- }, {
2181
- kind: "replaceImport";
2182
- title: string;
2183
- from: string;
2184
- to: string;
2185
- deterministic?: boolean | undefined;
2186
- }>, z.ZodObject<{
2187
- kind: z.ZodLiteral<"replaceComponent">;
2188
- title: z.ZodString;
2189
- from: z.ZodString;
2190
- to: z.ZodString;
2191
- deterministic: z.ZodOptional<z.ZodBoolean>;
2192
- }, "strip", z.ZodTypeAny, {
2193
- kind: "replaceComponent";
2194
- title: string;
2195
- from: string;
2196
- to: string;
2197
- deterministic?: boolean | undefined;
2198
- }, {
2199
- kind: "replaceComponent";
2200
- title: string;
2201
- from: string;
2202
- to: string;
2203
- deterministic?: boolean | undefined;
2204
- }>, z.ZodObject<{
2205
- kind: z.ZodLiteral<"replaceClassToken">;
2206
- title: z.ZodString;
2207
- from: z.ZodString;
2208
- to: z.ZodNullable<z.ZodString>;
2209
- utility: z.ZodString;
2210
- deterministic: z.ZodOptional<z.ZodBoolean>;
2211
- }, "strip", z.ZodTypeAny, {
2212
- kind: "replaceClassToken";
2213
- title: string;
2214
- from: string;
2215
- to: string | null;
2216
- utility: string;
2217
- deterministic?: boolean | undefined;
2218
- }, {
2219
- kind: "replaceClassToken";
2220
- title: string;
2221
- from: string;
2222
- to: string | null;
2223
- utility: string;
2224
- deterministic?: boolean | undefined;
2225
- }>]>>;
2226
- attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2227
- /**
2228
- * Product area this finding's file resolved to (topology layer). Optional —
2229
- * absent when the repo has no `topology` config. See `topology/resolve-area`.
2230
- */
2231
- area: z.ZodOptional<z.ZodObject<{
2232
- areaId: z.ZodString;
2233
- areaName: z.ZodString;
2234
- criticality: z.ZodEnum<["low", "medium", "high", "revenue", "regulated"]>;
2235
- owners: z.ZodArray<z.ZodString, "many">;
2236
- matchedGlob: z.ZodString;
2237
- }, "strip", z.ZodTypeAny, {
2238
- areaId: string;
2239
- areaName: string;
2240
- criticality: "high" | "medium" | "low" | "revenue" | "regulated";
2241
- owners: string[];
2242
- matchedGlob: string;
2243
- }, {
2244
- areaId: string;
2245
- areaName: string;
2246
- criticality: "high" | "medium" | "low" | "revenue" | "regulated";
2247
- owners: string[];
2248
- matchedGlob: string;
2249
- }>>;
2250
- }, "strip", z.ZodTypeAny, {
2251
- message: string;
2252
- location: {
2253
- file: string;
2254
- line: number;
2255
- column: number;
2256
- endLine?: number | undefined;
2257
- endColumn?: number | undefined;
2258
- };
2259
- ruleId: string;
2260
- ruleVersion: string;
2261
- severity: "critical" | "serious" | "moderate" | "minor";
2262
- level: "error" | "warn";
2263
- fingerprint: string;
2264
- evidence: FactEvidence[];
2265
- code?: string | undefined;
2266
- helpUrl?: string | undefined;
2267
- fix?: {
2268
- kind: "replacePropValue";
2269
- title: string;
2270
- prop: string;
2271
- deterministic?: boolean | undefined;
2272
- value?: unknown;
2273
- } | {
2274
- value: string;
2275
- kind: "replaceStyleValue";
2276
- title: string;
2277
- property: string;
2278
- deterministic?: boolean | undefined;
2279
- } | {
2280
- kind: "replaceImport";
2281
- title: string;
2282
- from: string;
2283
- to: string;
2284
- deterministic?: boolean | undefined;
2285
- } | {
2286
- kind: "replaceComponent";
2287
- title: string;
2288
- from: string;
2289
- to: string;
2290
- deterministic?: boolean | undefined;
2291
- } | {
2292
- kind: "replaceClassToken";
2293
- title: string;
2294
- from: string;
2295
- to: string | null;
2296
- utility: string;
2297
- deterministic?: boolean | undefined;
2298
- } | undefined;
2299
- attributes?: Record<string, unknown> | undefined;
2300
- area?: {
2301
- areaId: string;
2302
- areaName: string;
2303
- criticality: "high" | "medium" | "low" | "revenue" | "regulated";
2304
- owners: string[];
2305
- matchedGlob: string;
2306
- } | undefined;
2307
- }, {
2308
- message: string;
2309
- location: {
2310
- file: string;
2311
- line: number;
2312
- column: number;
2313
- endLine?: number | undefined;
2314
- endColumn?: number | undefined;
2315
- };
2316
- ruleId: string;
2317
- ruleVersion: string;
2318
- severity: "critical" | "serious" | "moderate" | "minor";
2319
- level: "error" | "warn";
2320
- fingerprint: string;
2321
- evidence: FactEvidence[];
2322
- code?: string | undefined;
2323
- helpUrl?: string | undefined;
2324
- fix?: {
2325
- kind: "replacePropValue";
2326
- title: string;
2327
- prop: string;
2328
- deterministic?: boolean | undefined;
2329
- value?: unknown;
2330
- } | {
2331
- value: string;
2332
- kind: "replaceStyleValue";
2333
- title: string;
2334
- property: string;
2335
- deterministic?: boolean | undefined;
2336
- } | {
2337
- kind: "replaceImport";
2338
- title: string;
2339
- from: string;
2340
- to: string;
2341
- deterministic?: boolean | undefined;
2342
- } | {
2343
- kind: "replaceComponent";
2344
- title: string;
2345
- from: string;
2346
- to: string;
2347
- deterministic?: boolean | undefined;
2348
- } | {
2349
- kind: "replaceClassToken";
2350
- title: string;
2351
- from: string;
2352
- to: string | null;
2353
- utility: string;
2354
- deterministic?: boolean | undefined;
2355
- } | undefined;
2356
- attributes?: Record<string, unknown> | undefined;
2357
- area?: {
2358
- areaId: string;
2359
- areaName: string;
2360
- criticality: "high" | "medium" | "low" | "revenue" | "regulated";
2361
- owners: string[];
2362
- matchedGlob: string;
2363
- } | undefined;
2364
- }>, "many">>;
2365
- suppressions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2366
- ruleId: z.ZodOptional<z.ZodString>;
2367
- reason: z.ZodString;
2368
- expiresAt: z.ZodOptional<z.ZodString>;
2369
- expiresOn: z.ZodOptional<z.ZodString>;
2370
- scope: z.ZodDefault<z.ZodEnum<["line", "block", "file"]>>;
2371
- code: z.ZodOptional<z.ZodString>;
2372
- }, "strip", z.ZodTypeAny, {
2373
- reason: string;
2374
- scope: "file" | "line" | "block";
2375
- code?: string | undefined;
2376
- ruleId?: string | undefined;
2377
- expiresAt?: string | undefined;
2378
- expiresOn?: string | undefined;
2379
- }, {
2380
- reason: string;
2381
- code?: string | undefined;
2382
- ruleId?: string | undefined;
2383
- expiresAt?: string | undefined;
2384
- expiresOn?: string | undefined;
2385
- scope?: "file" | "line" | "block" | undefined;
2386
- }>, "many">>;
2387
- }, "strip", z.ZodTypeAny, {
2388
- passed: boolean;
2389
- score: number;
2390
- schemaVersion: "typestyle.agent.v2";
2391
- summary: string;
2392
- integrity: {
2393
- status: "healthy" | "degraded" | "inert";
2394
- rulesLoaded: number;
2395
- healthy: boolean;
2396
- inert: boolean;
2397
- reasons: string[];
2398
- };
2399
- fix_first: {
2400
- message: string;
2401
- line: number;
2402
- ruleId: string;
2403
- severity: "critical" | "serious" | "moderate" | "minor";
2404
- level: "error" | "warn";
2405
- evidence: FactEvidence[];
2406
- filePath: string;
2407
- col: number;
2408
- plan: {
2409
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2410
- args: Record<string, unknown>;
2411
- confidence: number;
2412
- };
2413
- code?: string | undefined;
2414
- }[];
2415
- remaining: {
2416
- message: string;
2417
- line: number;
2418
- ruleId: string;
2419
- severity: "critical" | "serious" | "moderate" | "minor";
2420
- level: "error" | "warn";
2421
- evidence: FactEvidence[];
2422
- filePath: string;
2423
- col: number;
2424
- plan: {
2425
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2426
- args: Record<string, unknown>;
2427
- confidence: number;
2428
- };
2429
- code?: string | undefined;
2430
- }[];
2431
- suppression_template: {
2432
- directive: string;
2433
- requiredFields: string[];
2434
- example: string;
2435
- };
2436
- budget: {
2437
- iteration: number;
2438
- maxIterations: number;
2439
- scoreDelta: number;
2440
- };
2441
- findings?: {
2442
- message: string;
2443
- location: {
2444
- file: string;
2445
- line: number;
2446
- column: number;
2447
- endLine?: number | undefined;
2448
- endColumn?: number | undefined;
2449
- };
2450
- ruleId: string;
2451
- ruleVersion: string;
2452
- severity: "critical" | "serious" | "moderate" | "minor";
2453
- level: "error" | "warn";
2454
- fingerprint: string;
2455
- evidence: FactEvidence[];
2456
- code?: string | undefined;
2457
- helpUrl?: string | undefined;
2458
- fix?: {
2459
- kind: "replacePropValue";
2460
- title: string;
2461
- prop: string;
2462
- deterministic?: boolean | undefined;
2463
- value?: unknown;
2464
- } | {
2465
- value: string;
2466
- kind: "replaceStyleValue";
2467
- title: string;
2468
- property: string;
2469
- deterministic?: boolean | undefined;
2470
- } | {
2471
- kind: "replaceImport";
2472
- title: string;
2473
- from: string;
2474
- to: string;
2475
- deterministic?: boolean | undefined;
2476
- } | {
2477
- kind: "replaceComponent";
2478
- title: string;
2479
- from: string;
2480
- to: string;
2481
- deterministic?: boolean | undefined;
2482
- } | {
2483
- kind: "replaceClassToken";
2484
- title: string;
2485
- from: string;
2486
- to: string | null;
2487
- utility: string;
2488
- deterministic?: boolean | undefined;
2489
- } | undefined;
2490
- attributes?: Record<string, unknown> | undefined;
2491
- area?: {
2492
- areaId: string;
2493
- areaName: string;
2494
- criticality: "high" | "medium" | "low" | "revenue" | "regulated";
2495
- owners: string[];
2496
- matchedGlob: string;
2497
- } | undefined;
2498
- }[] | undefined;
2499
- suppressions?: {
2500
- reason: string;
2501
- scope: "file" | "line" | "block";
2502
- code?: string | undefined;
2503
- ruleId?: string | undefined;
2504
- expiresAt?: string | undefined;
2505
- expiresOn?: string | undefined;
2506
- }[] | undefined;
2507
- }, {
2508
- passed: boolean;
2509
- score: number;
2510
- schemaVersion: "typestyle.agent.v2";
2511
- summary: string;
2512
- integrity: {
2513
- status: "healthy" | "degraded" | "inert";
2514
- rulesLoaded: number;
2515
- healthy: boolean;
2516
- inert: boolean;
2517
- reasons: string[];
2518
- };
2519
- fix_first: {
2520
- message: string;
2521
- line: number;
2522
- ruleId: string;
2523
- severity: "critical" | "serious" | "moderate" | "minor";
2524
- level: "error" | "warn";
2525
- evidence: FactEvidence[];
2526
- filePath: string;
2527
- col: number;
2528
- plan: {
2529
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2530
- args: Record<string, unknown>;
2531
- confidence: number;
2532
- };
2533
- code?: string | undefined;
2534
- }[];
2535
- remaining: {
2536
- message: string;
2537
- line: number;
2538
- ruleId: string;
2539
- severity: "critical" | "serious" | "moderate" | "minor";
2540
- level: "error" | "warn";
2541
- evidence: FactEvidence[];
2542
- filePath: string;
2543
- col: number;
2544
- plan: {
2545
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2546
- args: Record<string, unknown>;
2547
- confidence: number;
2548
- };
2549
- code?: string | undefined;
2550
- }[];
2551
- suppression_template: {
2552
- directive: string;
2553
- requiredFields: string[];
2554
- example: string;
2555
- };
2556
- budget: {
2557
- iteration: number;
2558
- maxIterations: number;
2559
- scoreDelta: number;
2560
- };
2561
- findings?: {
2562
- message: string;
2563
- location: {
2564
- file: string;
2565
- line: number;
2566
- column: number;
2567
- endLine?: number | undefined;
2568
- endColumn?: number | undefined;
2569
- };
2570
- ruleId: string;
2571
- ruleVersion: string;
2572
- severity: "critical" | "serious" | "moderate" | "minor";
2573
- level: "error" | "warn";
2574
- fingerprint: string;
2575
- evidence: FactEvidence[];
2576
- code?: string | undefined;
2577
- helpUrl?: string | undefined;
2578
- fix?: {
2579
- kind: "replacePropValue";
2580
- title: string;
2581
- prop: string;
2582
- deterministic?: boolean | undefined;
2583
- value?: unknown;
2584
- } | {
2585
- value: string;
2586
- kind: "replaceStyleValue";
2587
- title: string;
2588
- property: string;
2589
- deterministic?: boolean | undefined;
2590
- } | {
2591
- kind: "replaceImport";
2592
- title: string;
2593
- from: string;
2594
- to: string;
2595
- deterministic?: boolean | undefined;
2596
- } | {
2597
- kind: "replaceComponent";
2598
- title: string;
2599
- from: string;
2600
- to: string;
2601
- deterministic?: boolean | undefined;
2602
- } | {
2603
- kind: "replaceClassToken";
2604
- title: string;
2605
- from: string;
2606
- to: string | null;
2607
- utility: string;
2608
- deterministic?: boolean | undefined;
2609
- } | undefined;
2610
- attributes?: Record<string, unknown> | undefined;
2611
- area?: {
2612
- areaId: string;
2613
- areaName: string;
2614
- criticality: "high" | "medium" | "low" | "revenue" | "regulated";
2615
- owners: string[];
2616
- matchedGlob: string;
2617
- } | undefined;
2618
- }[] | undefined;
2619
- suppressions?: {
2620
- reason: string;
2621
- code?: string | undefined;
2622
- ruleId?: string | undefined;
2623
- expiresAt?: string | undefined;
2624
- expiresOn?: string | undefined;
2625
- scope?: "file" | "line" | "block" | undefined;
2626
- }[] | undefined;
2627
- }>;
2628
- type AgentFormat = z.infer<typeof agentFormatSchema>;
2629
- declare const agentErrorEnvelopeSchema: z.ZodObject<{
2630
- schemaVersion: z.ZodLiteral<"typestyle.agent.v2">;
2631
- passed: z.ZodLiteral<false>;
2632
- error: z.ZodObject<{
2633
- code: z.ZodString;
2634
- message: z.ZodString;
2635
- }, "strip", z.ZodTypeAny, {
2636
- code: string;
2637
- message: string;
2638
- }, {
2639
- code: string;
2640
- message: string;
2641
- }>;
2642
- }, "strip", z.ZodTypeAny, {
2643
- error: {
2644
- code: string;
2645
- message: string;
2646
- };
2647
- passed: false;
2648
- schemaVersion: "typestyle.agent.v2";
2649
- }, {
2650
- error: {
2651
- code: string;
2652
- message: string;
2653
- };
2654
- passed: false;
2655
- schemaVersion: "typestyle.agent.v2";
2656
- }>;
2657
- type AgentErrorEnvelope = z.infer<typeof agentErrorEnvelopeSchema>;
2658
- declare const agentOutputSchema: z.ZodUnion<[z.ZodObject<{
2659
- schemaVersion: z.ZodLiteral<"typestyle.agent.v2">;
2660
- passed: z.ZodBoolean;
2661
- score: z.ZodNumber;
2662
- summary: z.ZodString;
2663
- integrity: z.ZodObject<{
2664
- rulesLoaded: z.ZodNumber;
2665
- status: z.ZodEnum<["healthy", "degraded", "inert"]>;
2666
- healthy: z.ZodBoolean;
2667
- inert: z.ZodBoolean;
2668
- reasons: z.ZodArray<z.ZodString, "many">;
2669
- }, "strip", z.ZodTypeAny, {
2670
- status: "healthy" | "degraded" | "inert";
2671
- rulesLoaded: number;
2672
- healthy: boolean;
2673
- inert: boolean;
2674
- reasons: string[];
2675
- }, {
2676
- status: "healthy" | "degraded" | "inert";
2677
- rulesLoaded: number;
2678
- healthy: boolean;
2679
- inert: boolean;
2680
- reasons: string[];
2681
- }>;
2682
- fix_first: z.ZodArray<z.ZodObject<{
2683
- code: z.ZodOptional<z.ZodString>;
2684
- ruleId: z.ZodString;
2685
- filePath: z.ZodString;
2686
- line: z.ZodNumber;
2687
- col: z.ZodNumber;
2688
- severity: z.ZodEnum<["critical", "serious", "moderate", "minor"]>;
2689
- level: z.ZodEnum<["error", "warn"]>;
2690
- message: z.ZodString;
2691
- evidence: z.ZodArray<z.ZodType<FactEvidence, z.ZodTypeDef, FactEvidence>, "many">;
2692
- plan: z.ZodObject<{
2693
- tool: z.ZodEnum<["design_system/list_primitives", "design_system/conform", "design_system/prove_compliant"]>;
2694
- args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2695
- confidence: z.ZodNumber;
2696
- }, "strip", z.ZodTypeAny, {
2697
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2698
- args: Record<string, unknown>;
2699
- confidence: number;
2700
- }, {
2701
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2702
- args: Record<string, unknown>;
2703
- confidence: number;
2704
- }>;
2705
- }, "strip", z.ZodTypeAny, {
2706
- message: string;
2707
- line: number;
2708
- ruleId: string;
2709
- severity: "critical" | "serious" | "moderate" | "minor";
2710
- level: "error" | "warn";
2711
- evidence: FactEvidence[];
2712
- filePath: string;
2713
- col: number;
2714
- plan: {
2715
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2716
- args: Record<string, unknown>;
2717
- confidence: number;
2718
- };
2719
- code?: string | undefined;
2720
- }, {
2721
- message: string;
2722
- line: number;
2723
- ruleId: string;
2724
- severity: "critical" | "serious" | "moderate" | "minor";
2725
- level: "error" | "warn";
2726
- evidence: FactEvidence[];
2727
- filePath: string;
2728
- col: number;
2729
- plan: {
2730
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2731
- args: Record<string, unknown>;
2732
- confidence: number;
2733
- };
2734
- code?: string | undefined;
2735
- }>, "many">;
2736
- remaining: z.ZodArray<z.ZodObject<{
2737
- code: z.ZodOptional<z.ZodString>;
2738
- ruleId: z.ZodString;
2739
- filePath: z.ZodString;
2740
- line: z.ZodNumber;
2741
- col: z.ZodNumber;
2742
- severity: z.ZodEnum<["critical", "serious", "moderate", "minor"]>;
2743
- level: z.ZodEnum<["error", "warn"]>;
2744
- message: z.ZodString;
2745
- evidence: z.ZodArray<z.ZodType<FactEvidence, z.ZodTypeDef, FactEvidence>, "many">;
2746
- plan: z.ZodObject<{
2747
- tool: z.ZodEnum<["design_system/list_primitives", "design_system/conform", "design_system/prove_compliant"]>;
2748
- args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2749
- confidence: z.ZodNumber;
2750
- }, "strip", z.ZodTypeAny, {
2751
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2752
- args: Record<string, unknown>;
2753
- confidence: number;
2754
- }, {
2755
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2756
- args: Record<string, unknown>;
2757
- confidence: number;
2758
- }>;
2759
- }, "strip", z.ZodTypeAny, {
2760
- message: string;
2761
- line: number;
2762
- ruleId: string;
2763
- severity: "critical" | "serious" | "moderate" | "minor";
2764
- level: "error" | "warn";
2765
- evidence: FactEvidence[];
2766
- filePath: string;
2767
- col: number;
2768
- plan: {
2769
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2770
- args: Record<string, unknown>;
2771
- confidence: number;
2772
- };
2773
- code?: string | undefined;
2774
- }, {
2775
- message: string;
2776
- line: number;
2777
- ruleId: string;
2778
- severity: "critical" | "serious" | "moderate" | "minor";
2779
- level: "error" | "warn";
2780
- evidence: FactEvidence[];
2781
- filePath: string;
2782
- col: number;
2783
- plan: {
2784
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
2785
- args: Record<string, unknown>;
2786
- confidence: number;
2787
- };
2788
- code?: string | undefined;
2789
- }>, "many">;
2790
- suppression_template: z.ZodObject<{
2791
- directive: z.ZodString;
2792
- requiredFields: z.ZodArray<z.ZodString, "many">;
2793
- example: z.ZodString;
2794
- }, "strip", z.ZodTypeAny, {
2795
- directive: string;
2796
- requiredFields: string[];
2797
- example: string;
2798
- }, {
2799
- directive: string;
2800
- requiredFields: string[];
2801
- example: string;
2802
- }>;
2803
- budget: z.ZodObject<{
2804
- iteration: z.ZodNumber;
2805
- maxIterations: z.ZodNumber;
2806
- scoreDelta: z.ZodNumber;
2807
- }, "strip", z.ZodTypeAny, {
2808
- iteration: number;
2809
- maxIterations: number;
2810
- scoreDelta: number;
2811
- }, {
2812
- iteration: number;
2813
- maxIterations: number;
2814
- scoreDelta: number;
2815
- }>;
2816
- findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
2817
- ruleId: z.ZodString;
2818
- ruleVersion: z.ZodString;
2819
- severity: z.ZodEnum<["critical", "serious", "moderate", "minor"]>;
2820
- level: z.ZodEnum<["error", "warn"]>;
2821
- code: z.ZodOptional<z.ZodString>;
2822
- helpUrl: z.ZodOptional<z.ZodString>;
2823
- message: z.ZodString;
2824
- fingerprint: z.ZodString;
2825
- location: z.ZodObject<{
2826
- file: z.ZodString;
2827
- line: z.ZodNumber;
2828
- column: z.ZodNumber;
2829
- endLine: z.ZodOptional<z.ZodNumber>;
2830
- endColumn: z.ZodOptional<z.ZodNumber>;
2831
- }, "strip", z.ZodTypeAny, {
2832
- file: string;
2833
- line: number;
2834
- column: number;
2835
- endLine?: number | undefined;
2836
- endColumn?: number | undefined;
2837
- }, {
2838
- file: string;
2839
- line: number;
2840
- column: number;
2841
- endLine?: number | undefined;
2842
- endColumn?: number | undefined;
2843
- }>;
2844
- evidence: z.ZodArray<z.ZodType<FactEvidence, z.ZodTypeDef, FactEvidence>, "many">;
2845
- fix: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2846
- kind: z.ZodLiteral<"replacePropValue">;
2847
- title: z.ZodString;
2848
- prop: z.ZodString;
2849
- value: z.ZodUnknown;
2850
- deterministic: z.ZodOptional<z.ZodBoolean>;
2851
- }, "strip", z.ZodTypeAny, {
2852
- kind: "replacePropValue";
2853
- title: string;
2854
- prop: string;
2855
- deterministic?: boolean | undefined;
2856
- value?: unknown;
2857
- }, {
2858
- kind: "replacePropValue";
2859
- title: string;
2860
- prop: string;
2861
- deterministic?: boolean | undefined;
2862
- value?: unknown;
2863
- }>, z.ZodObject<{
2864
- kind: z.ZodLiteral<"replaceStyleValue">;
2865
- title: z.ZodString;
2866
- property: z.ZodString;
2867
- value: z.ZodString;
2868
- deterministic: z.ZodOptional<z.ZodBoolean>;
2869
- }, "strip", z.ZodTypeAny, {
2870
- value: string;
2871
- kind: "replaceStyleValue";
2872
- title: string;
2873
- property: string;
2874
- deterministic?: boolean | undefined;
2875
- }, {
2876
- value: string;
2877
- kind: "replaceStyleValue";
2878
- title: string;
2879
- property: string;
2880
- deterministic?: boolean | undefined;
2881
- }>, z.ZodObject<{
2882
- kind: z.ZodLiteral<"replaceImport">;
2883
- title: z.ZodString;
2884
- from: z.ZodString;
2885
- to: z.ZodString;
2886
- deterministic: z.ZodOptional<z.ZodBoolean>;
2887
- }, "strip", z.ZodTypeAny, {
2888
- kind: "replaceImport";
2889
- title: string;
2890
- from: string;
2891
- to: string;
2892
- deterministic?: boolean | undefined;
2893
- }, {
2894
- kind: "replaceImport";
2895
- title: string;
2896
- from: string;
2897
- to: string;
2898
- deterministic?: boolean | undefined;
2899
- }>, z.ZodObject<{
2900
- kind: z.ZodLiteral<"replaceComponent">;
2901
- title: z.ZodString;
2902
- from: z.ZodString;
2903
- to: z.ZodString;
2904
- deterministic: z.ZodOptional<z.ZodBoolean>;
2905
- }, "strip", z.ZodTypeAny, {
2906
- kind: "replaceComponent";
2907
- title: string;
2908
- from: string;
2909
- to: string;
2910
- deterministic?: boolean | undefined;
2911
- }, {
2912
- kind: "replaceComponent";
2913
- title: string;
2914
- from: string;
2915
- to: string;
2916
- deterministic?: boolean | undefined;
2917
- }>, z.ZodObject<{
2918
- kind: z.ZodLiteral<"replaceClassToken">;
2919
- title: z.ZodString;
2920
- from: z.ZodString;
2921
- to: z.ZodNullable<z.ZodString>;
2922
- utility: z.ZodString;
2923
- deterministic: z.ZodOptional<z.ZodBoolean>;
2924
- }, "strip", z.ZodTypeAny, {
2925
- kind: "replaceClassToken";
2926
- title: string;
2927
- from: string;
2928
- to: string | null;
2929
- utility: string;
2930
- deterministic?: boolean | undefined;
2931
- }, {
2932
- kind: "replaceClassToken";
2933
- title: string;
2934
- from: string;
2935
- to: string | null;
2936
- utility: string;
2937
- deterministic?: boolean | undefined;
2938
- }>]>>;
2939
- attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2940
- /**
2941
- * Product area this finding's file resolved to (topology layer). Optional —
2942
- * absent when the repo has no `topology` config. See `topology/resolve-area`.
2943
- */
2944
- area: z.ZodOptional<z.ZodObject<{
2945
- areaId: z.ZodString;
2946
- areaName: z.ZodString;
2947
- criticality: z.ZodEnum<["low", "medium", "high", "revenue", "regulated"]>;
2948
- owners: z.ZodArray<z.ZodString, "many">;
2949
- matchedGlob: z.ZodString;
2950
- }, "strip", z.ZodTypeAny, {
2951
- areaId: string;
2952
- areaName: string;
2953
- criticality: "high" | "medium" | "low" | "revenue" | "regulated";
2954
- owners: string[];
2955
- matchedGlob: string;
2956
- }, {
2957
- areaId: string;
2958
- areaName: string;
2959
- criticality: "high" | "medium" | "low" | "revenue" | "regulated";
2960
- owners: string[];
2961
- matchedGlob: string;
2962
- }>>;
2963
- }, "strip", z.ZodTypeAny, {
2964
- message: string;
2965
- location: {
2966
- file: string;
2967
- line: number;
2968
- column: number;
2969
- endLine?: number | undefined;
2970
- endColumn?: number | undefined;
2971
- };
2972
- ruleId: string;
2973
- ruleVersion: string;
2974
- severity: "critical" | "serious" | "moderate" | "minor";
2975
- level: "error" | "warn";
2976
- fingerprint: string;
2977
- evidence: FactEvidence[];
2978
- code?: string | undefined;
2979
- helpUrl?: string | undefined;
2980
- fix?: {
2981
- kind: "replacePropValue";
2982
- title: string;
2983
- prop: string;
2984
- deterministic?: boolean | undefined;
2985
- value?: unknown;
2986
- } | {
2987
- value: string;
2988
- kind: "replaceStyleValue";
2989
- title: string;
2990
- property: string;
2991
- deterministic?: boolean | undefined;
2992
- } | {
2993
- kind: "replaceImport";
2994
- title: string;
2995
- from: string;
2996
- to: string;
2997
- deterministic?: boolean | undefined;
2998
- } | {
2999
- kind: "replaceComponent";
3000
- title: string;
3001
- from: string;
3002
- to: string;
3003
- deterministic?: boolean | undefined;
3004
- } | {
3005
- kind: "replaceClassToken";
3006
- title: string;
3007
- from: string;
3008
- to: string | null;
3009
- utility: string;
3010
- deterministic?: boolean | undefined;
3011
- } | undefined;
3012
- attributes?: Record<string, unknown> | undefined;
3013
- area?: {
3014
- areaId: string;
3015
- areaName: string;
3016
- criticality: "high" | "medium" | "low" | "revenue" | "regulated";
3017
- owners: string[];
3018
- matchedGlob: string;
3019
- } | undefined;
3020
- }, {
3021
- message: string;
3022
- location: {
3023
- file: string;
3024
- line: number;
3025
- column: number;
3026
- endLine?: number | undefined;
3027
- endColumn?: number | undefined;
3028
- };
3029
- ruleId: string;
3030
- ruleVersion: string;
3031
- severity: "critical" | "serious" | "moderate" | "minor";
3032
- level: "error" | "warn";
3033
- fingerprint: string;
3034
- evidence: FactEvidence[];
3035
- code?: string | undefined;
3036
- helpUrl?: string | undefined;
3037
- fix?: {
3038
- kind: "replacePropValue";
3039
- title: string;
3040
- prop: string;
3041
- deterministic?: boolean | undefined;
3042
- value?: unknown;
3043
- } | {
3044
- value: string;
3045
- kind: "replaceStyleValue";
3046
- title: string;
3047
- property: string;
3048
- deterministic?: boolean | undefined;
3049
- } | {
3050
- kind: "replaceImport";
3051
- title: string;
3052
- from: string;
3053
- to: string;
3054
- deterministic?: boolean | undefined;
3055
- } | {
3056
- kind: "replaceComponent";
3057
- title: string;
3058
- from: string;
3059
- to: string;
3060
- deterministic?: boolean | undefined;
3061
- } | {
3062
- kind: "replaceClassToken";
3063
- title: string;
3064
- from: string;
3065
- to: string | null;
3066
- utility: string;
3067
- deterministic?: boolean | undefined;
3068
- } | undefined;
3069
- attributes?: Record<string, unknown> | undefined;
3070
- area?: {
3071
- areaId: string;
3072
- areaName: string;
3073
- criticality: "high" | "medium" | "low" | "revenue" | "regulated";
3074
- owners: string[];
3075
- matchedGlob: string;
3076
- } | undefined;
3077
- }>, "many">>;
3078
- suppressions: z.ZodOptional<z.ZodArray<z.ZodObject<{
3079
- ruleId: z.ZodOptional<z.ZodString>;
3080
- reason: z.ZodString;
3081
- expiresAt: z.ZodOptional<z.ZodString>;
3082
- expiresOn: z.ZodOptional<z.ZodString>;
3083
- scope: z.ZodDefault<z.ZodEnum<["line", "block", "file"]>>;
3084
- code: z.ZodOptional<z.ZodString>;
3085
- }, "strip", z.ZodTypeAny, {
3086
- reason: string;
3087
- scope: "file" | "line" | "block";
3088
- code?: string | undefined;
3089
- ruleId?: string | undefined;
3090
- expiresAt?: string | undefined;
3091
- expiresOn?: string | undefined;
3092
- }, {
3093
- reason: string;
3094
- code?: string | undefined;
3095
- ruleId?: string | undefined;
3096
- expiresAt?: string | undefined;
3097
- expiresOn?: string | undefined;
3098
- scope?: "file" | "line" | "block" | undefined;
3099
- }>, "many">>;
3100
- }, "strip", z.ZodTypeAny, {
3101
- passed: boolean;
3102
- score: number;
3103
- schemaVersion: "typestyle.agent.v2";
3104
- summary: string;
3105
- integrity: {
3106
- status: "healthy" | "degraded" | "inert";
3107
- rulesLoaded: number;
3108
- healthy: boolean;
3109
- inert: boolean;
3110
- reasons: string[];
3111
- };
3112
- fix_first: {
3113
- message: string;
3114
- line: number;
3115
- ruleId: string;
3116
- severity: "critical" | "serious" | "moderate" | "minor";
3117
- level: "error" | "warn";
3118
- evidence: FactEvidence[];
3119
- filePath: string;
3120
- col: number;
3121
- plan: {
3122
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
3123
- args: Record<string, unknown>;
3124
- confidence: number;
3125
- };
3126
- code?: string | undefined;
3127
- }[];
3128
- remaining: {
3129
- message: string;
3130
- line: number;
3131
- ruleId: string;
3132
- severity: "critical" | "serious" | "moderate" | "minor";
3133
- level: "error" | "warn";
3134
- evidence: FactEvidence[];
3135
- filePath: string;
3136
- col: number;
3137
- plan: {
3138
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
3139
- args: Record<string, unknown>;
3140
- confidence: number;
3141
- };
3142
- code?: string | undefined;
3143
- }[];
3144
- suppression_template: {
3145
- directive: string;
3146
- requiredFields: string[];
3147
- example: string;
3148
- };
3149
- budget: {
3150
- iteration: number;
3151
- maxIterations: number;
3152
- scoreDelta: number;
3153
- };
3154
- findings?: {
3155
- message: string;
3156
- location: {
3157
- file: string;
3158
- line: number;
3159
- column: number;
3160
- endLine?: number | undefined;
3161
- endColumn?: number | undefined;
3162
- };
3163
- ruleId: string;
3164
- ruleVersion: string;
3165
- severity: "critical" | "serious" | "moderate" | "minor";
3166
- level: "error" | "warn";
3167
- fingerprint: string;
3168
- evidence: FactEvidence[];
3169
- code?: string | undefined;
3170
- helpUrl?: string | undefined;
3171
- fix?: {
3172
- kind: "replacePropValue";
3173
- title: string;
3174
- prop: string;
3175
- deterministic?: boolean | undefined;
3176
- value?: unknown;
3177
- } | {
3178
- value: string;
3179
- kind: "replaceStyleValue";
3180
- title: string;
3181
- property: string;
3182
- deterministic?: boolean | undefined;
3183
- } | {
3184
- kind: "replaceImport";
3185
- title: string;
3186
- from: string;
3187
- to: string;
3188
- deterministic?: boolean | undefined;
3189
- } | {
3190
- kind: "replaceComponent";
3191
- title: string;
3192
- from: string;
3193
- to: string;
3194
- deterministic?: boolean | undefined;
3195
- } | {
3196
- kind: "replaceClassToken";
3197
- title: string;
3198
- from: string;
3199
- to: string | null;
3200
- utility: string;
3201
- deterministic?: boolean | undefined;
3202
- } | undefined;
3203
- attributes?: Record<string, unknown> | undefined;
3204
- area?: {
3205
- areaId: string;
3206
- areaName: string;
3207
- criticality: "high" | "medium" | "low" | "revenue" | "regulated";
3208
- owners: string[];
3209
- matchedGlob: string;
3210
- } | undefined;
3211
- }[] | undefined;
3212
- suppressions?: {
3213
- reason: string;
3214
- scope: "file" | "line" | "block";
3215
- code?: string | undefined;
3216
- ruleId?: string | undefined;
3217
- expiresAt?: string | undefined;
3218
- expiresOn?: string | undefined;
3219
- }[] | undefined;
3220
- }, {
3221
- passed: boolean;
3222
- score: number;
3223
- schemaVersion: "typestyle.agent.v2";
3224
- summary: string;
3225
- integrity: {
3226
- status: "healthy" | "degraded" | "inert";
3227
- rulesLoaded: number;
3228
- healthy: boolean;
3229
- inert: boolean;
3230
- reasons: string[];
3231
- };
3232
- fix_first: {
3233
- message: string;
3234
- line: number;
3235
- ruleId: string;
3236
- severity: "critical" | "serious" | "moderate" | "minor";
3237
- level: "error" | "warn";
3238
- evidence: FactEvidence[];
3239
- filePath: string;
3240
- col: number;
3241
- plan: {
3242
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
3243
- args: Record<string, unknown>;
3244
- confidence: number;
3245
- };
3246
- code?: string | undefined;
3247
- }[];
3248
- remaining: {
3249
- message: string;
3250
- line: number;
3251
- ruleId: string;
3252
- severity: "critical" | "serious" | "moderate" | "minor";
3253
- level: "error" | "warn";
3254
- evidence: FactEvidence[];
3255
- filePath: string;
3256
- col: number;
3257
- plan: {
3258
- tool: "design_system/list_primitives" | "design_system/conform" | "design_system/prove_compliant";
3259
- args: Record<string, unknown>;
3260
- confidence: number;
3261
- };
3262
- code?: string | undefined;
3263
- }[];
3264
- suppression_template: {
3265
- directive: string;
3266
- requiredFields: string[];
3267
- example: string;
3268
- };
3269
- budget: {
3270
- iteration: number;
3271
- maxIterations: number;
3272
- scoreDelta: number;
3273
- };
3274
- findings?: {
3275
- message: string;
3276
- location: {
3277
- file: string;
3278
- line: number;
3279
- column: number;
3280
- endLine?: number | undefined;
3281
- endColumn?: number | undefined;
3282
- };
3283
- ruleId: string;
3284
- ruleVersion: string;
3285
- severity: "critical" | "serious" | "moderate" | "minor";
3286
- level: "error" | "warn";
3287
- fingerprint: string;
3288
- evidence: FactEvidence[];
3289
- code?: string | undefined;
3290
- helpUrl?: string | undefined;
3291
- fix?: {
3292
- kind: "replacePropValue";
3293
- title: string;
3294
- prop: string;
3295
- deterministic?: boolean | undefined;
3296
- value?: unknown;
3297
- } | {
3298
- value: string;
3299
- kind: "replaceStyleValue";
3300
- title: string;
3301
- property: string;
3302
- deterministic?: boolean | undefined;
3303
- } | {
3304
- kind: "replaceImport";
3305
- title: string;
3306
- from: string;
3307
- to: string;
3308
- deterministic?: boolean | undefined;
3309
- } | {
3310
- kind: "replaceComponent";
3311
- title: string;
3312
- from: string;
3313
- to: string;
3314
- deterministic?: boolean | undefined;
3315
- } | {
3316
- kind: "replaceClassToken";
3317
- title: string;
3318
- from: string;
3319
- to: string | null;
3320
- utility: string;
3321
- deterministic?: boolean | undefined;
3322
- } | undefined;
3323
- attributes?: Record<string, unknown> | undefined;
3324
- area?: {
3325
- areaId: string;
3326
- areaName: string;
3327
- criticality: "high" | "medium" | "low" | "revenue" | "regulated";
3328
- owners: string[];
3329
- matchedGlob: string;
3330
- } | undefined;
3331
- }[] | undefined;
3332
- suppressions?: {
3333
- reason: string;
3334
- code?: string | undefined;
3335
- ruleId?: string | undefined;
3336
- expiresAt?: string | undefined;
3337
- expiresOn?: string | undefined;
3338
- scope?: "file" | "line" | "block" | undefined;
3339
- }[] | undefined;
3340
- }>, z.ZodObject<{
3341
- schemaVersion: z.ZodLiteral<"typestyle.agent.v2">;
3342
- passed: z.ZodLiteral<false>;
3343
- error: z.ZodObject<{
3344
- code: z.ZodString;
3345
- message: z.ZodString;
3346
- }, "strip", z.ZodTypeAny, {
3347
- code: string;
3348
- message: string;
3349
- }, {
3350
- code: string;
3351
- message: string;
3352
- }>;
3353
- }, "strip", z.ZodTypeAny, {
3354
- error: {
3355
- code: string;
3356
- message: string;
3357
- };
3358
- passed: false;
3359
- schemaVersion: "typestyle.agent.v2";
3360
- }, {
3361
- error: {
3362
- code: string;
3363
- message: string;
3364
- };
3365
- passed: false;
3366
- schemaVersion: "typestyle.agent.v2";
3367
- }>]>;
3368
- type AgentOutput = z.infer<typeof agentOutputSchema>;
3369
- declare function normalizeSeverity(severity: Severity | LegacySeverityLevel): Severity;
3370
- declare function normalizeFinding(input: Omit<Finding, "level"> & {
3371
- level?: Finding["level"];
3372
- }): Finding;
3373
- declare function normalizeViolation(input: Omit<Violation, "level"> & {
3374
- level?: Violation["level"];
3375
- }): Violation;
3376
-
3377
- export { AGENT_FORMAT_SCHEMA_VERSION, type AgentErrorEnvelope, type AgentFormat, type AgentOutput, 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, agentErrorEnvelopeSchema, agentFindingSchema, agentFormatSchema, agentIntegritySchema, agentOutputSchema, agentPlanSchema, factEvidenceSchema, factLocationSchema, findingFixSchema, findingReplaceClassTokenFixSchema, findingReplaceComponentFixSchema, findingReplaceImportFixSchema, findingReplacePropValueFixSchema, findingReplaceStyleValueFixSchema, findingSchema, fixSchema, governanceVerdictMetadataSchema, governanceVerdictSchema, normalizeFinding, normalizeSeverity, normalizeViolation, suppressionDirectiveSchema, validatorResultSchema, violationSchema };
1
+ import 'zod';
2
+ export { LegacySeverityLevel, Severity, SeverityLevel, legacySeverityLevelSchema, severityLevelSchema, severitySchema } from '../severity.js';
3
+ export { b as AGENT_FORMAT_SCHEMA_VERSION, c as AgentErrorEnvelope, A as AgentFormat, d as AgentOutput, Q as FactEvidence, R as FactLocation, F as Finding, a as FindingFix, f as FindingReplaceClassTokenFix, g as FindingReplaceComponentFix, h as FindingReplaceImportFix, i as FindingReplacePropValueFix, j as FindingReplaceStyleValueFix, k as Fix, G as GovernanceVerdict, l as GovernanceVerdictMetadata, S as SuppressionDirective, V as ValidatorResult, n as Violation, o as agentErrorEnvelopeSchema, T as agentFindingSchema, p as agentFormatSchema, q as agentIntegritySchema, r as agentOutputSchema, U as agentPlanSchema, t as factEvidenceSchema, u as factLocationSchema, v as findingFixSchema, w as findingReplaceClassTokenFixSchema, x as findingReplaceComponentFixSchema, y as findingReplaceImportFixSchema, z as findingReplacePropValueFixSchema, B as findingReplaceStyleValueFixSchema, C as findingSchema, D as fixSchema, H as governanceVerdictMetadataSchema, J as governanceVerdictSchema, K as normalizeFinding, L as normalizeSeverity, M as normalizeViolation, N as suppressionDirectiveSchema, O as validatorResultSchema, P as violationSchema } from '../index-h_yWj15D.js';