@usefragments/core 1.10.2 → 1.11.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 (126) hide show
  1. package/dist/{chunk-MZ4SW3TP.js → chunk-3IOWHECM.js} +8 -1
  2. package/dist/{chunk-MZ4SW3TP.js.map → chunk-3IOWHECM.js.map} +1 -1
  3. package/dist/chunk-7ULGH74M.js +66 -0
  4. package/dist/chunk-7ULGH74M.js.map +1 -0
  5. package/dist/{chunk-YF65VYRY.js → chunk-ML5S6QNU.js} +191 -169
  6. package/dist/chunk-ML5S6QNU.js.map +1 -0
  7. package/dist/chunk-PWIJMOI4.js +202 -0
  8. package/dist/chunk-PWIJMOI4.js.map +1 -0
  9. package/dist/{chunk-XN3LSDPY.js → chunk-RPSEABY3.js} +622 -344
  10. package/dist/chunk-RPSEABY3.js.map +1 -0
  11. package/dist/chunk-RYFULE43.js +578 -0
  12. package/dist/chunk-RYFULE43.js.map +1 -0
  13. package/dist/codes/index.d.ts +2 -2
  14. package/dist/codes/index.js +3 -2
  15. package/dist/compiled-types/index.d.ts +327 -2
  16. package/dist/compiled-types/index.js +1 -1
  17. package/dist/generate/index.d.ts +3 -2
  18. package/dist/{governance-CLk_wkP9.d.ts → governance-BAsy1k2H.d.ts} +472 -513
  19. package/dist/governance-telemetry.d.ts +6 -0
  20. package/dist/governance-telemetry.js +1 -1
  21. package/dist/{index-_sxhUNqx.d.ts → index-C8bcXVav.d.ts} +448 -448
  22. package/dist/index.d.ts +9165 -1297
  23. package/dist/index.js +3041 -350
  24. package/dist/index.js.map +1 -1
  25. package/dist/manifest.d.ts +228 -0
  26. package/dist/manifest.js +24 -0
  27. package/dist/manifest.js.map +1 -0
  28. package/dist/preview/index.js +45 -1
  29. package/dist/preview/index.js.map +1 -1
  30. package/dist/preview-runtime.d.ts +1 -2
  31. package/dist/preview-runtime.js +150 -14
  32. package/dist/preview-runtime.js.map +1 -1
  33. package/dist/react-types.d.ts +1 -2
  34. package/dist/registry.d.ts +1412 -203
  35. package/dist/registry.js +30 -3
  36. package/dist/schemas/index.d.ts +1 -1
  37. package/dist/schemas/index.js +3 -2
  38. package/dist/storyAdapter.d.ts +1 -2
  39. package/dist/storyAdapter.js +11 -49
  40. package/dist/storyAdapter.js.map +1 -1
  41. package/dist/test-utils.d.ts +3 -2
  42. package/package.json +8 -2
  43. package/src/__tests__/contract-parser.test.ts +318 -277
  44. package/src/__tests__/preview-runtime-hook.test.tsx +315 -0
  45. package/src/__tests__/preview-runtime.test.tsx +30 -8
  46. package/src/__tests__/schema.test.ts +191 -14
  47. package/src/analysis-plan/analysis-plan-v1.test.ts +320 -0
  48. package/src/analysis-plan/coverage.ts +181 -0
  49. package/src/analysis-plan/digest.ts +141 -0
  50. package/src/analysis-plan/index.ts +34 -0
  51. package/src/analysis-plan/types.ts +207 -0
  52. package/src/codes/__tests__/codes.test.ts +9 -0
  53. package/src/codes/codes.ts +30 -0
  54. package/src/compiled-types/index.ts +640 -39
  55. package/src/compiled-types/parse.test.ts +145 -4
  56. package/src/component-contract.ts +95 -53
  57. package/src/composition.ts +7 -13
  58. package/src/constants.ts +3 -6
  59. package/src/contract/hash.test.ts +20 -0
  60. package/src/contract/hash.ts +66 -9
  61. package/src/contract/index.ts +24 -1
  62. package/src/contract/manifest.test.ts +94 -0
  63. package/src/contract/manifest.ts +68 -0
  64. package/src/contract/preimage.test.ts +219 -1
  65. package/src/contract/preimage.ts +326 -6
  66. package/src/contract/stamp.test.ts +3 -0
  67. package/src/contract/stamp.ts +1 -1
  68. package/src/contract-parser.ts +54 -30
  69. package/src/defineFragment.test.ts +476 -91
  70. package/src/defineFragment.ts +204 -114
  71. package/src/domain-ids.test.ts +52 -0
  72. package/src/domain-ids.ts +106 -0
  73. package/src/evaluation/evaluate.test.ts +522 -0
  74. package/src/evaluation/evaluate.ts +680 -0
  75. package/src/evaluation/evaluation-v2-receipt-v1.test.ts +760 -0
  76. package/src/evaluation/index.ts +58 -0
  77. package/src/evaluation/receipt.ts +753 -0
  78. package/src/evaluation/types.ts +406 -0
  79. package/src/facts/builders.ts +2 -0
  80. package/src/facts/compile.ts +29 -6
  81. package/src/facts/fact-index.ts +13 -3
  82. package/src/facts/fact-integrity-v1.test.ts +172 -0
  83. package/src/facts/facts.test.ts +15 -0
  84. package/src/facts/ids.ts +46 -3
  85. package/src/facts/index.ts +14 -1
  86. package/src/facts/integrity.ts +134 -0
  87. package/src/facts/types.ts +36 -0
  88. package/src/feature-plan/digest.ts +217 -0
  89. package/src/feature-plan/feature-plan-v1.test.ts +529 -0
  90. package/src/feature-plan/index.ts +65 -0
  91. package/src/feature-plan/types.ts +628 -0
  92. package/src/governance-integrity.test.ts +1 -0
  93. package/src/governance-integrity.ts +5 -3
  94. package/src/governance-telemetry.ts +8 -0
  95. package/src/governance.ts +52 -8
  96. package/src/index.ts +299 -37
  97. package/src/preview/validation.test.ts +62 -0
  98. package/src/preview/validation.ts +48 -2
  99. package/src/preview-runtime.tsx +227 -20
  100. package/src/registry-install-plan.ts +200 -109
  101. package/src/registry-shards.test.ts +263 -0
  102. package/src/registry.ts +237 -0
  103. package/src/repository-binding.test.ts +50 -0
  104. package/src/repository-binding.ts +96 -0
  105. package/src/rules/families.test.ts +36 -0
  106. package/src/rules/finding.ts +7 -2
  107. package/src/rules/index.ts +17 -1
  108. package/src/rules/rule-config.test.ts +66 -0
  109. package/src/rules/rule-config.ts +73 -0
  110. package/src/rules/rules.test.ts +26 -0
  111. package/src/rules/tokens-css-vars-must-be-defined.test.ts +51 -2
  112. package/src/rules/tokens-css-vars-must-be-defined.ts +34 -1
  113. package/src/schema.ts +293 -113
  114. package/src/schemas/index.ts +1 -1
  115. package/src/storyAdapter.test.ts +68 -12
  116. package/src/storyAdapter.ts +44 -75
  117. package/src/types.ts +258 -37
  118. package/dist/chunk-RANPUC6C.js +0 -72
  119. package/dist/chunk-RANPUC6C.js.map +0 -1
  120. package/dist/chunk-XN3LSDPY.js.map +0 -1
  121. package/dist/chunk-YF65VYRY.js.map +0 -1
  122. package/src/fragment-types.ts +0 -214
  123. package/src/react-create-element.test.ts +0 -22
  124. package/src/react-create-element.ts +0 -12
  125. package/src/storyFilters.test.ts +0 -350
  126. package/src/storyFilters.ts +0 -253
@@ -1,3 +1,9 @@
1
+ import {
2
+ portableRepoPathError
3
+ } from "./chunk-EIYNNS77.js";
4
+ import {
5
+ compareCanonicalStrings
6
+ } from "./chunk-PWIJMOI4.js";
1
7
  import {
2
8
  authorOwnedImport,
3
9
  canonicalizeOwnedComponentId,
@@ -6,9 +12,6 @@ import {
6
12
  projectV1OwnedComponentId,
7
13
  projectV1OwnedImportIdentity
8
14
  } from "./chunk-JNBFJ34I.js";
9
- import {
10
- portableRepoPathError
11
- } from "./chunk-EIYNNS77.js";
12
15
  import {
13
16
  legacySeverityLevelSchema,
14
17
  severityFromLevel,
@@ -285,6 +288,16 @@ var CODES = [
285
288
  lifecycle: "experimental",
286
289
  evidenceRequired: true
287
290
  }),
291
+ code({
292
+ code: "FUI2018",
293
+ ruleId: "config/empty-token-vocabulary",
294
+ category: "system",
295
+ defaultSeverity: "serious",
296
+ title: "Token sources resolved to 0 tokens",
297
+ lifecycle: "experimental",
298
+ fixAvailable: false,
299
+ evidenceRequired: true
300
+ }),
288
301
  ruleCode({
289
302
  code: "FUI3001",
290
303
  ruleId: "a11y/required-accessible-name",
@@ -538,6 +551,26 @@ var CODES = [
538
551
  lifecycle: "experimental",
539
552
  fixAvailable: false,
540
553
  evidenceRequired: false
554
+ }),
555
+ code({
556
+ code: "FUI9010",
557
+ ruleId: "fragment/invalid-definition",
558
+ category: "system",
559
+ defaultSeverity: "critical",
560
+ title: "Fragment definition is not valid",
561
+ lifecycle: "experimental",
562
+ fixAvailable: false,
563
+ evidenceRequired: false
564
+ }),
565
+ code({
566
+ code: "FUI9011",
567
+ ruleId: "fragment/source-drift",
568
+ category: "system",
569
+ defaultSeverity: "critical",
570
+ title: "Fragment definition drifted from its component source",
571
+ lifecycle: "experimental",
572
+ fixAvailable: false,
573
+ evidenceRequired: false
541
574
  })
542
575
  ];
543
576
  var byCode = new Map(
@@ -550,15 +583,203 @@ function explainUrlForCode(code2) {
550
583
  return `${EXPLAIN_URL_BASE}${code2}`;
551
584
  }
552
585
 
586
+ // src/facts/integrity.ts
587
+ import { z as z2 } from "zod";
588
+
589
+ // src/domain-ids.ts
590
+ import { z } from "zod";
591
+ var FULL_DIGEST_PATTERN = /^[0-9a-f]{64}$/u;
592
+ var WORKFLOW_ENTROPY_PATTERN = /^[0-9a-f]{32}$/u;
593
+ var digestHexStringSchema = z.string().regex(FULL_DIGEST_PATTERN, "Expected 64 lowercase hexadecimal characters");
594
+ var digestHexSchema = digestHexStringSchema;
595
+ var analysisPlanIdStringSchema = z.string().regex(/^apl_[0-9a-f]{64}$/u, "Invalid analysis plan ID");
596
+ var analysisPlanIdSchema = analysisPlanIdStringSchema.transform(
597
+ (value) => value
598
+ );
599
+ var evaluationReceiptIdSchema = z.string().regex(/^evr_[0-9a-f]{64}$/u, "Invalid evaluation receipt ID").transform((value) => value);
600
+ var evaluationReceiptIdStringSchema = z.string().regex(/^evr_[0-9a-f]{64}$/u, "Invalid evaluation receipt ID");
601
+ var featurePlanIdStringSchema = z.string().regex(/^fpl_[0-9a-f]{32}$/u, "Invalid feature plan ID");
602
+ var featurePlanIdSchema = featurePlanIdStringSchema.transform(
603
+ (value) => value
604
+ );
605
+ var featureRevisionIdStringSchema = z.string().regex(/^fpr_[0-9a-f]{64}$/u, "Invalid feature revision ID");
606
+ var featureRevisionIdSchema = featureRevisionIdStringSchema.transform(
607
+ (value) => value
608
+ );
609
+ function parseDigestHex(value) {
610
+ return digestHexSchema.parse(value);
611
+ }
612
+ function analysisPlanIdFromDigest(digest) {
613
+ return analysisPlanIdSchema.parse(`apl_${parseDigestHex(digest)}`);
614
+ }
615
+ function evaluationReceiptIdFromDigest(digest) {
616
+ return evaluationReceiptIdSchema.parse(`evr_${parseDigestHex(digest)}`);
617
+ }
618
+ function mintEvaluationReceiptId(resultDigest) {
619
+ return evaluationReceiptIdFromDigest(resultDigest);
620
+ }
621
+ function featureRevisionIdFromDigest(digest) {
622
+ return featureRevisionIdSchema.parse(`fpr_${parseDigestHex(digest)}`);
623
+ }
624
+ function featurePlanIdFromEntropy(entropyHex) {
625
+ if (!WORKFLOW_ENTROPY_PATTERN.test(entropyHex)) {
626
+ throw new TypeError("Feature plan entropy must be exactly 128-bit lowercase hexadecimal");
627
+ }
628
+ return featurePlanIdSchema.parse(`fpl_${entropyHex}`);
629
+ }
630
+ function parseAnalysisPlanId(value) {
631
+ return analysisPlanIdSchema.parse(value);
632
+ }
633
+ function parseEvaluationReceiptId(value) {
634
+ return evaluationReceiptIdSchema.parse(value);
635
+ }
636
+ function parseFeaturePlanId(value) {
637
+ return featurePlanIdSchema.parse(value);
638
+ }
639
+ function parseFeatureRevisionId(value) {
640
+ return featureRevisionIdSchema.parse(value);
641
+ }
642
+
643
+ // src/facts/integrity.ts
644
+ var CANONICAL_FACT_MAX_CONFLICTS_V1 = 1e3;
645
+ var CANONICAL_FACT_MAX_VALUES_PER_CONFLICT_V1 = 64;
646
+ var CANONICAL_FACT_MAX_PROVENANCE_PER_VALUE_V1 = 1e3;
647
+ var boundedString = z2.string().min(1).max(4096);
648
+ var unique = (values) => new Set(values).size === values.length;
649
+ var provenance = z2.array(boundedString).min(1).max(CANONICAL_FACT_MAX_PROVENANCE_PER_VALUE_V1).refine(unique, "provenance values must be unique");
650
+ var canonicalFactConflictValueV1Schema = z2.object({
651
+ valueDigest: digestHexStringSchema,
652
+ factIds: provenance,
653
+ totalFactIdCount: z2.number().int().positive().optional(),
654
+ analyzerIds: provenance,
655
+ totalAnalyzerIdCount: z2.number().int().positive().optional(),
656
+ evidenceRefs: provenance,
657
+ totalEvidenceRefCount: z2.number().int().positive().optional()
658
+ }).strict().superRefine((value, context) => {
659
+ for (const [path, total, retained] of [
660
+ ["totalFactIdCount", value.totalFactIdCount, value.factIds.length],
661
+ ["totalAnalyzerIdCount", value.totalAnalyzerIdCount, value.analyzerIds.length],
662
+ ["totalEvidenceRefCount", value.totalEvidenceRefCount, value.evidenceRefs.length]
663
+ ]) {
664
+ if (total !== void 0 && total < retained) {
665
+ context.addIssue({
666
+ code: z2.ZodIssueCode.custom,
667
+ path: [path],
668
+ message: `${path} cannot be smaller than retained provenance`
669
+ });
670
+ }
671
+ }
672
+ });
673
+ var canonicalFactConflictV1Schema = z2.object({
674
+ canonicalKey: boundedString,
675
+ factKind: boundedString,
676
+ state: z2.literal("conflict"),
677
+ values: z2.array(canonicalFactConflictValueV1Schema).min(2).max(CANONICAL_FACT_MAX_VALUES_PER_CONFLICT_V1).refine(
678
+ (values) => new Set(values.map((value) => value.valueDigest)).size === values.length,
679
+ "conflict values must have distinct material digests"
680
+ ),
681
+ totalValueCount: z2.number().int().min(2).optional()
682
+ }).strict().superRefine((value, context) => {
683
+ if (value.totalValueCount !== void 0 && value.totalValueCount < value.values.length) {
684
+ context.addIssue({
685
+ code: z2.ZodIssueCode.custom,
686
+ path: ["totalValueCount"],
687
+ message: "totalValueCount cannot be smaller than retained values"
688
+ });
689
+ }
690
+ });
691
+ var canonicalFactIntegrityV1Schema = z2.union([
692
+ z2.object({
693
+ state: z2.literal("healthy"),
694
+ coalescedDuplicateCount: z2.number().int().nonnegative()
695
+ }).strict(),
696
+ z2.object({
697
+ state: z2.literal("conflict"),
698
+ coalescedDuplicateCount: z2.number().int().nonnegative(),
699
+ conflicts: z2.array(canonicalFactConflictV1Schema).min(1).max(CANONICAL_FACT_MAX_CONFLICTS_V1).refine(
700
+ (conflicts) => new Set(conflicts.map((conflict) => conflict.canonicalKey)).size === conflicts.length,
701
+ "canonical conflict keys must be unique"
702
+ ),
703
+ totalConflictCount: z2.number().int().positive().optional()
704
+ }).strict().superRefine((value, context) => {
705
+ if (value.totalConflictCount !== void 0 && value.totalConflictCount < value.conflicts.length) {
706
+ context.addIssue({
707
+ code: z2.ZodIssueCode.custom,
708
+ path: ["totalConflictCount"],
709
+ message: "totalConflictCount cannot be smaller than retained conflicts"
710
+ });
711
+ }
712
+ })
713
+ ]);
714
+ var sorted = (values) => [...values].sort();
715
+ function normalizeCanonicalFactIntegrityV1(value) {
716
+ const parsed = canonicalFactIntegrityV1Schema.parse(value);
717
+ if (parsed.state === "healthy") return parsed;
718
+ return {
719
+ ...parsed,
720
+ totalConflictCount: parsed.totalConflictCount ?? parsed.conflicts.length,
721
+ conflicts: parsed.conflicts.map((conflict) => ({
722
+ ...conflict,
723
+ totalValueCount: conflict.totalValueCount ?? conflict.values.length,
724
+ values: conflict.values.map((entry) => ({
725
+ ...entry,
726
+ factIds: sorted(entry.factIds),
727
+ totalFactIdCount: entry.totalFactIdCount ?? entry.factIds.length,
728
+ analyzerIds: sorted(entry.analyzerIds),
729
+ totalAnalyzerIdCount: entry.totalAnalyzerIdCount ?? entry.analyzerIds.length,
730
+ evidenceRefs: sorted(entry.evidenceRefs),
731
+ totalEvidenceRefCount: entry.totalEvidenceRefCount ?? entry.evidenceRefs.length
732
+ })).sort((left, right) => compareCanonicalStrings(left.valueDigest, right.valueDigest))
733
+ })).sort((left, right) => compareCanonicalStrings(left.canonicalKey, right.canonicalKey))
734
+ };
735
+ }
736
+
553
737
  // src/facts/ids.ts
554
738
  function canonicalJson(value) {
739
+ return canonicalJsonValue(value, /* @__PURE__ */ new Set(), "(root)");
740
+ }
741
+ function canonicalJsonValue(value, ancestors, path) {
555
742
  if (value === void 0) return "null";
556
- if (value === null || typeof value !== "object") return JSON.stringify(value);
743
+ if (value === null || typeof value === "string" || typeof value === "boolean") {
744
+ return JSON.stringify(value);
745
+ }
746
+ if (typeof value === "number") {
747
+ if (!Number.isFinite(value)) {
748
+ throw new TypeError(`Unsupported fact identity value at ${path}: non-finite number`);
749
+ }
750
+ const serialized = JSON.stringify(value);
751
+ if (serialized === void 0) {
752
+ throw new TypeError(`Unsupported fact identity value at ${path}: number`);
753
+ }
754
+ return serialized;
755
+ }
756
+ if (typeof value !== "object") {
757
+ throw new TypeError(`Unsupported fact identity value at ${path}: ${typeof value}`);
758
+ }
557
759
  if (Array.isArray(value)) {
558
- return `[${value.map(canonicalJson).join(",")}]`;
760
+ if (ancestors.has(value)) throw new TypeError(`Circular fact identity value at ${path}`);
761
+ ancestors.add(value);
762
+ try {
763
+ return `[${value.map((entry, index) => canonicalJsonValue(entry, ancestors, `${path}[${index}]`)).join(",")}]`;
764
+ } finally {
765
+ ancestors.delete(value);
766
+ }
767
+ }
768
+ const prototype = Object.getPrototypeOf(value);
769
+ if (prototype !== Object.prototype && prototype !== null) {
770
+ const objectType = prototype?.constructor?.name ?? "unknown";
771
+ throw new TypeError(`Unsupported fact identity object at ${path}: ${objectType}`);
559
772
  }
773
+ if (ancestors.has(value)) throw new TypeError(`Circular fact identity value at ${path}`);
774
+ ancestors.add(value);
560
775
  const entries = Object.entries(value).filter(([, v]) => v !== void 0).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
561
- return `{${entries.map(([k, v]) => `${JSON.stringify(k)}:${canonicalJson(v)}`).join(",")}}`;
776
+ try {
777
+ return `{${entries.map(
778
+ ([key, entry]) => `${JSON.stringify(key)}:${canonicalJsonValue(entry, ancestors, `${path}.${key}`)}`
779
+ ).join(",")}}`;
780
+ } finally {
781
+ ancestors.delete(value);
782
+ }
562
783
  }
563
784
  var FNV_PRIME = 16777619;
564
785
  var FNV_SEED_A = 2166136261;
@@ -854,6 +1075,7 @@ function makeStyleCssVarsMustBeDefinedFact(input) {
854
1075
  id: factId("style_css_vars_must_be_defined", {}),
855
1076
  kind: "style_css_vars_must_be_defined",
856
1077
  severity: input.severity,
1078
+ ...input.configPath ? { configPath: input.configPath } : {},
857
1079
  ...policyExcludeField(input.exclude)
858
1080
  };
859
1081
  }
@@ -1267,11 +1489,14 @@ var FactIndex = class {
1267
1489
  }
1268
1490
  const existing = this.facts.get(fact.id);
1269
1491
  if (existing) {
1270
- if (canonicalJson(logicalFactForComparison(existing)) !== canonicalJson(logicalFactForComparison(fact))) {
1492
+ const differs = canonicalJson(logicalFactForComparison(existing)) !== canonicalJson(logicalFactForComparison(fact));
1493
+ if (differs) {
1271
1494
  this.options.onConflict?.(
1272
1495
  `FactIndex: conflicting facts for id ${fact.id} \u2014 keeping ${describeFactForConflict(existing)}, skipping ${describeFactForConflict(fact)}`,
1273
1496
  { kept: existing, skipped: fact }
1274
1497
  );
1498
+ } else {
1499
+ this.options.onDuplicate?.({ kept: existing, duplicate: fact });
1275
1500
  }
1276
1501
  return;
1277
1502
  }
@@ -1490,16 +1715,16 @@ function describeFactForConflict(fact) {
1490
1715
  }
1491
1716
 
1492
1717
  // src/governance.ts
1493
- import { z as z2 } from "zod";
1718
+ import { z as z4 } from "zod";
1494
1719
 
1495
1720
  // src/policy-exclude.ts
1496
- import { z } from "zod";
1497
- var policyExcludeSchema = z.array(
1498
- z.union([
1499
- z.string().min(1),
1500
- z.object({
1501
- glob: z.string().min(1),
1502
- reason: z.string().min(1).optional()
1721
+ import { z as z3 } from "zod";
1722
+ var policyExcludeSchema = z3.array(
1723
+ z3.union([
1724
+ z3.string().min(1),
1725
+ z3.object({
1726
+ glob: z3.string().min(1),
1727
+ reason: z3.string().min(1).optional()
1503
1728
  })
1504
1729
  ])
1505
1730
  );
@@ -1543,90 +1768,90 @@ function describePolicyExclude(scope, exclude) {
1543
1768
  }
1544
1769
 
1545
1770
  // src/governance.ts
1546
- var governanceSeveritySchema = z2.enum(["error", "warn", "info"]);
1771
+ var governanceSeveritySchema = z4.enum(["error", "warn", "info"]);
1547
1772
  var recordExcludeSchema = policyExcludeSchema.optional();
1548
- var scaleGovernanceRecordSchema = z2.object({
1549
- kind: z2.literal("scale").default("scale"),
1550
- name: z2.string().min(1).optional(),
1551
- unit: z2.enum(["px", "rem"]),
1552
- values: z2.array(z2.number()),
1553
- rootFontSizePx: z2.number().positive().optional(),
1554
- emBasePx: z2.number().positive().optional()
1773
+ var scaleGovernanceRecordSchema = z4.object({
1774
+ kind: z4.literal("scale").default("scale"),
1775
+ name: z4.string().min(1).optional(),
1776
+ unit: z4.enum(["px", "rem"]),
1777
+ values: z4.array(z4.number()),
1778
+ rootFontSizePx: z4.number().positive().optional(),
1779
+ emBasePx: z4.number().positive().optional()
1555
1780
  });
1556
- var styleRawColorsForbidRecordSchema = z2.object({
1557
- kind: z2.literal("style.rawColors.forbid"),
1558
- except: z2.array(z2.string()),
1559
- prefer: z2.enum(["token", "css-variable"]),
1781
+ var styleRawColorsForbidRecordSchema = z4.object({
1782
+ kind: z4.literal("style.rawColors.forbid"),
1783
+ except: z4.array(z4.string()),
1784
+ prefer: z4.enum(["token", "css-variable"]),
1560
1785
  severity: governanceSeveritySchema,
1561
1786
  exclude: recordExcludeSchema
1562
1787
  });
1563
- var styleRawDimensionsForbidRecordSchema = z2.object({
1564
- kind: z2.literal("style.rawDimensions.forbid"),
1565
- appliesTo: z2.array(z2.string().min(1)),
1566
- prefer: z2.enum(["token", "css-variable"]),
1788
+ var styleRawDimensionsForbidRecordSchema = z4.object({
1789
+ kind: z4.literal("style.rawDimensions.forbid"),
1790
+ appliesTo: z4.array(z4.string().min(1)),
1791
+ prefer: z4.enum(["token", "css-variable"]),
1567
1792
  severity: governanceSeveritySchema,
1568
1793
  exclude: recordExcludeSchema
1569
1794
  });
1570
- var styleRawSpacingMustMatchScaleRecordSchema = z2.object({
1571
- kind: z2.literal("style.rawSpacing.mustMatchScale"),
1572
- scale: z2.string().min(1),
1573
- appliesTo: z2.array(z2.string().min(1)),
1795
+ var styleRawSpacingMustMatchScaleRecordSchema = z4.object({
1796
+ kind: z4.literal("style.rawSpacing.mustMatchScale"),
1797
+ scale: z4.string().min(1),
1798
+ appliesTo: z4.array(z4.string().min(1)),
1574
1799
  severity: governanceSeveritySchema,
1575
1800
  exclude: recordExcludeSchema
1576
1801
  });
1577
- var styleFontSizeMustMatchScaleRecordSchema = z2.object({
1578
- kind: z2.literal("style.fontSize.mustMatchScale"),
1579
- scale: z2.string().min(1),
1802
+ var styleFontSizeMustMatchScaleRecordSchema = z4.object({
1803
+ kind: z4.literal("style.fontSize.mustMatchScale"),
1804
+ scale: z4.string().min(1),
1580
1805
  severity: governanceSeveritySchema,
1581
1806
  exclude: recordExcludeSchema
1582
1807
  });
1583
- var styleCssVarsMustBeDefinedRecordSchema = z2.object({
1584
- kind: z2.literal("style.cssVars.mustBeDefined"),
1808
+ var styleCssVarsMustBeDefinedRecordSchema = z4.object({
1809
+ kind: z4.literal("style.cssVars.mustBeDefined"),
1585
1810
  severity: governanceSeveritySchema,
1586
1811
  exclude: recordExcludeSchema
1587
1812
  });
1588
- var globalStyleGovernanceRecordSchema = z2.discriminatedUnion("kind", [
1813
+ var globalStyleGovernanceRecordSchema = z4.discriminatedUnion("kind", [
1589
1814
  styleRawColorsForbidRecordSchema,
1590
1815
  styleRawDimensionsForbidRecordSchema,
1591
1816
  styleRawSpacingMustMatchScaleRecordSchema,
1592
1817
  styleFontSizeMustMatchScaleRecordSchema,
1593
1818
  styleCssVarsMustBeDefinedRecordSchema
1594
1819
  ]);
1595
- var jsxUnknownPropsForbidRecordSchema = z2.object({
1596
- kind: z2.literal("jsx.unknownProps.forbid"),
1820
+ var jsxUnknownPropsForbidRecordSchema = z4.object({
1821
+ kind: z4.literal("jsx.unknownProps.forbid"),
1597
1822
  severity: governanceSeveritySchema,
1598
1823
  exclude: recordExcludeSchema
1599
1824
  });
1600
- var jsxInlineStyleForbidRawRecordSchema = z2.object({
1601
- kind: z2.literal("jsx.inlineStyle.forbidRaw"),
1602
- properties: z2.array(z2.string().min(1)),
1825
+ var jsxInlineStyleForbidRawRecordSchema = z4.object({
1826
+ kind: z4.literal("jsx.inlineStyle.forbidRaw"),
1827
+ properties: z4.array(z4.string().min(1)),
1603
1828
  severity: governanceSeveritySchema,
1604
1829
  exclude: recordExcludeSchema
1605
1830
  });
1606
- var jsxImportPathPreferRecordSchema = z2.object({
1607
- kind: z2.literal("jsx.importPath.prefer"),
1608
- from: z2.string().min(1),
1609
- to: z2.string().min(1),
1610
- imported: z2.string().min(1).optional(),
1611
- because: z2.string().optional(),
1831
+ var jsxImportPathPreferRecordSchema = z4.object({
1832
+ kind: z4.literal("jsx.importPath.prefer"),
1833
+ from: z4.string().min(1),
1834
+ to: z4.string().min(1),
1835
+ imported: z4.string().min(1).optional(),
1836
+ because: z4.string().optional(),
1612
1837
  severity: governanceSeveritySchema,
1613
1838
  exclude: recordExcludeSchema
1614
1839
  });
1615
- var jsxComponentPreferRecordSchema = z2.object({
1616
- kind: z2.literal("jsx.component.prefer"),
1617
- from: z2.string().min(1),
1618
- to: z2.string().min(1),
1619
- because: z2.string().optional(),
1840
+ var jsxComponentPreferRecordSchema = z4.object({
1841
+ kind: z4.literal("jsx.component.prefer"),
1842
+ from: z4.string().min(1),
1843
+ to: z4.string().min(1),
1844
+ because: z4.string().optional(),
1620
1845
  severity: governanceSeveritySchema,
1621
1846
  exclude: recordExcludeSchema
1622
1847
  });
1623
- var globalJsxGovernanceRecordSchema = z2.discriminatedUnion("kind", [
1848
+ var globalJsxGovernanceRecordSchema = z4.discriminatedUnion("kind", [
1624
1849
  jsxUnknownPropsForbidRecordSchema,
1625
1850
  jsxInlineStyleForbidRawRecordSchema,
1626
1851
  jsxImportPathPreferRecordSchema,
1627
1852
  jsxComponentPreferRecordSchema
1628
1853
  ]);
1629
- var globalGovernanceRecordSchema = z2.discriminatedUnion("kind", [
1854
+ var globalGovernanceRecordSchema = z4.discriminatedUnion("kind", [
1630
1855
  scaleGovernanceRecordSchema,
1631
1856
  styleRawColorsForbidRecordSchema,
1632
1857
  styleRawDimensionsForbidRecordSchema,
@@ -1638,99 +1863,103 @@ var globalGovernanceRecordSchema = z2.discriminatedUnion("kind", [
1638
1863
  jsxImportPathPreferRecordSchema,
1639
1864
  jsxComponentPreferRecordSchema
1640
1865
  ]);
1641
- var componentCapabilityRecordSchema = z2.object({
1642
- kind: z2.literal("capability"),
1643
- capability: z2.string().min(1)
1866
+ var componentCapabilityRecordSchema = z4.object({
1867
+ kind: z4.literal("capability"),
1868
+ capability: z4.string().min(1)
1644
1869
  });
1645
- var propValueAvoidRecordSchema = z2.object({
1646
- kind: z2.literal("prop.value.avoid"),
1647
- prop: z2.string().min(1),
1648
- value: z2.unknown(),
1649
- because: z2.string(),
1650
- suggest: z2.string().optional(),
1870
+ var requiredComponentGovernanceValueSchema = z4.custom(
1871
+ (value) => value !== void 0,
1872
+ "Expected an explicitly present governance value"
1873
+ );
1874
+ var propValueAvoidRecordSchema = z4.object({
1875
+ kind: z4.literal("prop.value.avoid"),
1876
+ prop: z4.string().min(1),
1877
+ value: requiredComponentGovernanceValueSchema,
1878
+ because: z4.string(),
1879
+ suggest: z4.string().optional(),
1651
1880
  severity: governanceSeveritySchema
1652
1881
  });
1653
- var propValueForbidRecordSchema = z2.object({
1654
- kind: z2.literal("prop.value.forbid"),
1655
- prop: z2.string().min(1),
1656
- value: z2.unknown(),
1657
- when: z2.object({ path: z2.string().min(1).optional() }).optional(),
1658
- because: z2.string(),
1659
- fix: z2.object({ replaceWith: z2.unknown() }).optional(),
1882
+ var propValueForbidRecordSchema = z4.object({
1883
+ kind: z4.literal("prop.value.forbid"),
1884
+ prop: z4.string().min(1),
1885
+ value: requiredComponentGovernanceValueSchema,
1886
+ when: z4.object({ path: z4.string().min(1).optional() }).optional(),
1887
+ because: z4.string(),
1888
+ fix: z4.object({ replaceWith: requiredComponentGovernanceValueSchema }).optional(),
1660
1889
  severity: governanceSeveritySchema
1661
1890
  });
1662
- var a11yRequireNameRecordSchema = z2.object({
1663
- kind: z2.literal("a11y.requireName"),
1664
- because: z2.string(),
1891
+ var a11yRequireNameRecordSchema = z4.object({
1892
+ kind: z4.literal("a11y.requireName"),
1893
+ because: z4.string(),
1665
1894
  severity: governanceSeveritySchema
1666
1895
  });
1667
- var componentGovernanceRecordSchema = z2.discriminatedUnion("kind", [
1896
+ var componentGovernanceRecordSchema = z4.discriminatedUnion("kind", [
1668
1897
  componentCapabilityRecordSchema,
1669
1898
  propValueAvoidRecordSchema,
1670
1899
  propValueForbidRecordSchema,
1671
1900
  a11yRequireNameRecordSchema
1672
1901
  ]);
1673
- var componentGovernanceRecordsSchema = z2.array(componentGovernanceRecordSchema);
1674
- var componentPolicyMatchSchema = z2.object({
1675
- componentKey: z2.string().min(1).optional(),
1676
- componentId: z2.string().min(1).optional(),
1677
- publicRef: z2.string().min(1).optional(),
1678
- importPath: z2.string().min(1).optional(),
1679
- sourcePath: z2.string().min(1).optional(),
1680
- path: z2.string().min(1).optional(),
1681
- exportName: z2.string().min(1).optional(),
1682
- export: z2.string().min(1).optional(),
1683
- name: z2.string().min(1).optional(),
1684
- scope: z2.enum(["one", "all"]).optional()
1902
+ var componentGovernanceRecordsSchema = z4.array(componentGovernanceRecordSchema);
1903
+ var componentPolicyMatchSchema = z4.object({
1904
+ componentKey: z4.string().min(1).optional(),
1905
+ componentId: z4.string().min(1).optional(),
1906
+ publicRef: z4.string().min(1).optional(),
1907
+ importPath: z4.string().min(1).optional(),
1908
+ sourcePath: z4.string().min(1).optional(),
1909
+ path: z4.string().min(1).optional(),
1910
+ exportName: z4.string().min(1).optional(),
1911
+ export: z4.string().min(1).optional(),
1912
+ name: z4.string().min(1).optional(),
1913
+ scope: z4.enum(["one", "all"]).optional()
1685
1914
  }).strict();
1686
- var componentPolicyRecordSchema = z2.object({
1915
+ var componentPolicyRecordSchema = z4.object({
1687
1916
  rules: componentGovernanceRecordsSchema,
1688
- status: z2.enum(["active", "draft", "disabled"]).optional()
1917
+ status: z4.enum(["active", "draft", "disabled"]).optional()
1689
1918
  }).strict();
1690
- var componentPolicyOverrideSchema = z2.object({
1919
+ var componentPolicyOverrideSchema = z4.object({
1691
1920
  match: componentPolicyMatchSchema,
1692
1921
  rules: componentGovernanceRecordsSchema,
1693
- status: z2.enum(["active", "draft", "disabled"]).optional()
1922
+ status: z4.enum(["active", "draft", "disabled"]).optional()
1694
1923
  }).strict();
1695
- var canonicalSourcePathSchema = z2.string().min(1).superRefine((value, ctx) => {
1924
+ var canonicalSourcePathSchema = z4.string().min(1).superRefine((value, ctx) => {
1696
1925
  const error = portableRepoPathError(value);
1697
1926
  if (error) {
1698
- ctx.addIssue({ code: z2.ZodIssueCode.custom, message: error });
1927
+ ctx.addIssue({ code: z4.ZodIssueCode.custom, message: error });
1699
1928
  }
1700
1929
  });
1701
- var canonicalSourceRegistryHashSchema = z2.string().regex(/^[0-9a-f]{64}$/);
1702
- var canonicalBridgeModuleSpecifierSchema = z2.string().min(1).superRefine((value, ctx) => {
1930
+ var canonicalSourceRegistryHashSchema = z4.string().regex(/^[0-9a-f]{64}$/);
1931
+ var canonicalBridgeModuleSpecifierSchema = z4.string().min(1).superRefine((value, ctx) => {
1703
1932
  const normalized = value.replace(/\\/gu, "/");
1704
1933
  if (normalized.startsWith("/") || /^[A-Za-z]:\//u.test(normalized)) {
1705
1934
  ctx.addIssue({
1706
- code: z2.ZodIssueCode.custom,
1935
+ code: z4.ZodIssueCode.custom,
1707
1936
  message: "Canonical bridge moduleSpecifier must be a portable import specifier"
1708
1937
  });
1709
1938
  }
1710
1939
  if (normalized.split("/").includes("..")) {
1711
1940
  ctx.addIssue({
1712
- code: z2.ZodIssueCode.custom,
1941
+ code: z4.ZodIssueCode.custom,
1713
1942
  message: "Canonical bridge moduleSpecifier must not traverse outside the project"
1714
1943
  });
1715
1944
  }
1716
1945
  });
1717
- var canonicalBridgeV1Schema = z2.object({
1718
- underlying: z2.object({
1719
- packageName: z2.string().min(1),
1720
- exportName: z2.string().min(1)
1946
+ var canonicalBridgeV1Schema = z4.object({
1947
+ underlying: z4.object({
1948
+ packageName: z4.string().min(1),
1949
+ exportName: z4.string().min(1)
1721
1950
  }).strict(),
1722
- local: z2.object({
1723
- componentKey: z2.string().min(1),
1951
+ local: z4.object({
1952
+ componentKey: z4.string().min(1),
1724
1953
  moduleSpecifier: canonicalBridgeModuleSpecifierSchema,
1725
- exportName: z2.string().min(1),
1726
- implementationFiles: z2.array(canonicalSourcePathSchema).min(1)
1954
+ exportName: z4.string().min(1),
1955
+ implementationFiles: z4.array(canonicalSourcePathSchema).min(1)
1727
1956
  }).strict(),
1728
- decision: z2.object({
1729
- state: z2.literal("confirmed"),
1730
- source: z2.enum(["authored", "migration"])
1957
+ decision: z4.object({
1958
+ state: z4.literal("confirmed"),
1959
+ source: z4.enum(["authored", "migration"])
1731
1960
  }).strict()
1732
1961
  }).strict();
1733
- var canonicalBridgesV1Schema = z2.array(canonicalBridgeV1Schema).superRefine((bridges, ctx) => {
1962
+ var canonicalBridgesV1Schema = z4.array(canonicalBridgeV1Schema).superRefine((bridges, ctx) => {
1734
1963
  const underlying = /* @__PURE__ */ new Map();
1735
1964
  const componentKeys = /* @__PURE__ */ new Map();
1736
1965
  for (const [index, bridge] of bridges.entries()) {
@@ -1738,7 +1967,7 @@ var canonicalBridgesV1Schema = z2.array(canonicalBridgeV1Schema).superRefine((br
1738
1967
  const previousUnderlying = underlying.get(underlyingKey);
1739
1968
  if (previousUnderlying !== void 0) {
1740
1969
  ctx.addIssue({
1741
- code: z2.ZodIssueCode.custom,
1970
+ code: z4.ZodIssueCode.custom,
1742
1971
  message: `Duplicate confirmed bridge target for ${bridge.underlying.packageName}#${bridge.underlying.exportName} (also at canonicalBridges.${previousUnderlying})`,
1743
1972
  path: [index, "underlying"]
1744
1973
  });
@@ -1748,7 +1977,7 @@ var canonicalBridgesV1Schema = z2.array(canonicalBridgeV1Schema).superRefine((br
1748
1977
  const previousComponent = componentKeys.get(bridge.local.componentKey);
1749
1978
  if (previousComponent !== void 0) {
1750
1979
  ctx.addIssue({
1751
- code: z2.ZodIssueCode.custom,
1980
+ code: z4.ZodIssueCode.custom,
1752
1981
  message: `Local component key overlaps canonicalBridges.${previousComponent}`,
1753
1982
  path: [index, "local", "componentKey"]
1754
1983
  });
@@ -1757,65 +1986,65 @@ var canonicalBridgesV1Schema = z2.array(canonicalBridgeV1Schema).superRefine((br
1757
1986
  }
1758
1987
  }
1759
1988
  });
1760
- var canonicalSourceSchema = z2.discriminatedUnion("kind", [
1761
- z2.object({
1762
- kind: z2.literal("npm"),
1763
- specifier: z2.string().min(1),
1764
- implementationPath: z2.string().min(1).optional(),
1765
- include: z2.array(z2.string().min(1)).optional(),
1766
- exclude: z2.array(z2.string().min(1)).optional()
1989
+ var canonicalSourceSchema = z4.discriminatedUnion("kind", [
1990
+ z4.object({
1991
+ kind: z4.literal("npm"),
1992
+ specifier: z4.string().min(1),
1993
+ implementationPath: z4.string().min(1).optional(),
1994
+ include: z4.array(z4.string().min(1)).optional(),
1995
+ exclude: z4.array(z4.string().min(1)).optional()
1767
1996
  }),
1768
- z2.object({
1769
- kind: z2.literal("directory"),
1770
- path: z2.string().min(1),
1771
- include: z2.array(z2.string().min(1)).optional(),
1772
- exclude: z2.array(z2.string().min(1)).optional()
1997
+ z4.object({
1998
+ kind: z4.literal("directory"),
1999
+ path: z4.string().min(1),
2000
+ include: z4.array(z4.string().min(1)).optional(),
2001
+ exclude: z4.array(z4.string().min(1)).optional()
1773
2002
  }),
1774
- z2.object({
1775
- kind: z2.literal("registry"),
1776
- registryId: z2.string().min(1),
2003
+ z4.object({
2004
+ kind: z4.literal("registry"),
2005
+ registryId: z4.string().min(1),
1777
2006
  registryHash: canonicalSourceRegistryHashSchema.optional(),
1778
2007
  receiptPath: canonicalSourcePathSchema.default(".fragments/registry-lock.json"),
1779
2008
  installPath: canonicalSourcePathSchema,
1780
- importPath: z2.string().min(1).optional(),
1781
- include: z2.array(z2.string().min(1)).optional(),
1782
- exclude: z2.array(z2.string().min(1)).optional(),
2009
+ importPath: z4.string().min(1).optional(),
2010
+ include: z4.array(z4.string().min(1)).optional(),
2011
+ exclude: z4.array(z4.string().min(1)).optional(),
1783
2012
  severity: governanceSeveritySchema.optional()
1784
2013
  })
1785
2014
  ]);
1786
- var governanceConfigSchema = z2.object({
1787
- extends: z2.array(z2.string()).optional(),
2015
+ var governanceConfigSchema = z4.object({
2016
+ extends: z4.array(z4.string()).optional(),
1788
2017
  severity: governanceSeveritySchema.optional(),
1789
- rules: z2.record(z2.string(), z2.unknown()).optional(),
1790
- agents: z2.record(
1791
- z2.string(),
1792
- z2.object({
1793
- rules: z2.record(z2.string(), z2.unknown()).optional()
2018
+ rules: z4.record(z4.string(), z4.unknown()).optional(),
2019
+ agents: z4.record(
2020
+ z4.string(),
2021
+ z4.object({
2022
+ rules: z4.record(z4.string(), z4.unknown()).optional()
1794
2023
  }).passthrough()
1795
2024
  ).optional(),
1796
- audit: z2.object({}).passthrough().optional(),
1797
- runners: z2.record(z2.string(), z2.object({}).passthrough()).optional(),
1798
- canonicalSources: z2.array(canonicalSourceSchema).optional(),
2025
+ audit: z4.object({}).passthrough().optional(),
2026
+ runners: z4.record(z4.string(), z4.object({}).passthrough()).optional(),
2027
+ canonicalSources: z4.array(canonicalSourceSchema).optional(),
1799
2028
  canonicalBridges: canonicalBridgesV1Schema.optional(),
1800
- presets: z2.array(z2.string()).optional(),
1801
- scales: z2.record(z2.string(), scaleGovernanceRecordSchema).optional(),
1802
- styles: z2.array(globalStyleGovernanceRecordSchema).optional(),
1803
- jsx: z2.array(globalJsxGovernanceRecordSchema).optional(),
1804
- tailwind: z2.object({
1805
- palette: z2.object({
1806
- allow: z2.array(z2.string().min(1)).optional(),
1807
- deny: z2.array(z2.string().min(1)).optional()
2029
+ presets: z4.array(z4.string()).optional(),
2030
+ scales: z4.record(z4.string(), scaleGovernanceRecordSchema).optional(),
2031
+ styles: z4.array(globalStyleGovernanceRecordSchema).optional(),
2032
+ jsx: z4.array(globalJsxGovernanceRecordSchema).optional(),
2033
+ tailwind: z4.object({
2034
+ palette: z4.object({
2035
+ allow: z4.array(z4.string().min(1)).optional(),
2036
+ deny: z4.array(z4.string().min(1)).optional()
1808
2037
  }).optional()
1809
2038
  }).passthrough().optional(),
1810
- agent: z2.object({
1811
- repairOrder: z2.array(z2.string().min(1)).optional()
2039
+ agent: z4.object({
2040
+ repairOrder: z4.array(z4.string().min(1)).optional()
1812
2041
  }).passthrough().optional(),
1813
- components: z2.record(componentPolicyRecordSchema).optional(),
1814
- overrides: z2.array(componentPolicyOverrideSchema).optional(),
1815
- ci: z2.object({
1816
- failOnWarnings: z2.boolean().optional(),
1817
- failOnInert: z2.boolean().optional(),
1818
- failOnAdoptionRegression: z2.boolean().optional()
2042
+ components: z4.record(componentPolicyRecordSchema).optional(),
2043
+ overrides: z4.array(componentPolicyOverrideSchema).optional(),
2044
+ ci: z4.object({
2045
+ failOnWarnings: z4.boolean().optional(),
2046
+ failOnInert: z4.boolean().optional(),
2047
+ failOnAdoptionRegression: z4.boolean().optional()
1819
2048
  }).passthrough().optional()
1820
2049
  }).strict();
1821
2050
  var PRESET_SOURCED_RULE = /* @__PURE__ */ Symbol.for("@usefragments/core:preset-sourced-rule");
@@ -1881,6 +2110,17 @@ function resolveComponentGovernance(definition) {
1881
2110
  const records = definition.govern ? definition.govern(builder) : definition.governance ?? [];
1882
2111
  return componentGovernanceRecordsSchema.parse(records);
1883
2112
  }
2113
+ function resolveGovernanceRecordsForIdentity(definition) {
2114
+ if (!definition) return void 0;
2115
+ if (Array.isArray(definition.governance)) {
2116
+ return componentGovernanceRecordsSchema.parse(definition.governance);
2117
+ }
2118
+ if (typeof definition.govern === "function") {
2119
+ const builder = createComponentGovernanceBuilder();
2120
+ return componentGovernanceRecordsSchema.parse(definition.govern(builder));
2121
+ }
2122
+ return void 0;
2123
+ }
1884
2124
  function normalizeGovernanceConfig(config) {
1885
2125
  if (!config.govern?.scales) {
1886
2126
  return config;
@@ -2040,6 +2280,10 @@ function recordExclude(record) {
2040
2280
  const exclude = normalizePolicyExcludes(record.exclude);
2041
2281
  return exclude ? { exclude } : {};
2042
2282
  }
2283
+ function cssVarsConfigPathField(style) {
2284
+ const value = style.configPath;
2285
+ return typeof value === "string" && value.length > 0 ? { configPath: value } : {};
2286
+ }
2043
2287
  function unionExcludesBySharedFactId(facts) {
2044
2288
  const byId = /* @__PURE__ */ new Map();
2045
2289
  for (const fact of facts) {
@@ -2126,7 +2370,8 @@ function compileGlobalGovernanceFacts(govern) {
2126
2370
  out.push(
2127
2371
  makeStyleCssVarsMustBeDefinedFact({
2128
2372
  severity: style.severity,
2129
- ...recordExclude(style)
2373
+ ...recordExclude(style),
2374
+ ...cssVarsConfigPathField(style)
2130
2375
  })
2131
2376
  );
2132
2377
  break;
@@ -2265,14 +2510,19 @@ function compileRuleConfigFacts(govern) {
2265
2510
  const rules = govern.rules;
2266
2511
  if (!rules && !govern.canonicalSources?.length) return [];
2267
2512
  const configs = /* @__PURE__ */ new Map();
2513
+ for (const [ruleId, value] of Object.entries(rules ?? {})) {
2514
+ configs.set(ruleId, ruleConfigFromValue(value, govern.severity ?? "warn"));
2515
+ }
2268
2516
  for (const [ruleId, value] of Object.entries(rules ?? {})) {
2269
2517
  const family = RULE_FAMILY_MEMBERS[ruleId];
2270
2518
  if (!family) continue;
2519
+ const aggregateIsPreset = isPresetSourcedRule(value);
2271
2520
  const config = ruleConfigFromValue(value, govern.severity ?? "warn");
2272
- for (const memberRuleId of family) configs.set(memberRuleId, config);
2273
- }
2274
- for (const [ruleId, value] of Object.entries(rules ?? {})) {
2275
- configs.set(ruleId, ruleConfigFromValue(value, govern.severity ?? "warn"));
2521
+ for (const memberRuleId of family) {
2522
+ const member = rules?.[memberRuleId];
2523
+ if (member !== void 0 && (aggregateIsPreset || !isPresetSourcedRule(member))) continue;
2524
+ configs.set(memberRuleId, config);
2525
+ }
2276
2526
  }
2277
2527
  if (govern.canonicalSources?.length) {
2278
2528
  for (const ruleId of ["components/prefer-library", "components/shadow-component"]) {
@@ -2424,244 +2674,244 @@ function compileComponentGovernanceRecord(componentId2, record) {
2424
2674
  }
2425
2675
 
2426
2676
  // src/schemas/index.ts
2427
- import { z as z3 } from "zod";
2428
- var evidenceGradeSchema = z3.enum([
2677
+ import { z as z5 } from "zod";
2678
+ var evidenceGradeSchema = z5.enum([
2429
2679
  "none",
2430
2680
  "runtime_advisory",
2431
2681
  "provenance_bound",
2432
2682
  "source_backed",
2433
2683
  "receipt_backed"
2434
2684
  ]);
2435
- var factLocationSchema = z3.object({
2436
- file: z3.string(),
2437
- line: z3.number().int().nonnegative(),
2438
- column: z3.number().int().nonnegative(),
2439
- endLine: z3.number().int().nonnegative().optional(),
2440
- endColumn: z3.number().int().nonnegative().optional()
2685
+ var factLocationSchema = z5.object({
2686
+ file: z5.string(),
2687
+ line: z5.number().int().nonnegative(),
2688
+ column: z5.number().int().nonnegative(),
2689
+ endLine: z5.number().int().nonnegative().optional(),
2690
+ endColumn: z5.number().int().nonnegative().optional()
2441
2691
  });
2442
- var findingReplacePropValueFixSchema = z3.object({
2443
- kind: z3.literal("replacePropValue"),
2444
- title: z3.string(),
2445
- prop: z3.string(),
2446
- value: z3.unknown(),
2447
- deterministic: z3.boolean().optional()
2692
+ var findingReplacePropValueFixSchema = z5.object({
2693
+ kind: z5.literal("replacePropValue"),
2694
+ title: z5.string(),
2695
+ prop: z5.string(),
2696
+ value: z5.unknown(),
2697
+ deterministic: z5.boolean().optional()
2448
2698
  });
2449
- var findingReplaceStyleValueFixSchema = z3.object({
2450
- kind: z3.literal("replaceStyleValue"),
2451
- title: z3.string(),
2452
- property: z3.string(),
2453
- value: z3.string(),
2454
- deterministic: z3.boolean().optional()
2699
+ var findingReplaceStyleValueFixSchema = z5.object({
2700
+ kind: z5.literal("replaceStyleValue"),
2701
+ title: z5.string(),
2702
+ property: z5.string(),
2703
+ value: z5.string(),
2704
+ deterministic: z5.boolean().optional()
2455
2705
  });
2456
- var findingReplaceImportFixSchema = z3.object({
2457
- kind: z3.literal("replaceImport"),
2458
- title: z3.string(),
2459
- from: z3.string(),
2460
- to: z3.string(),
2461
- deterministic: z3.boolean().optional()
2706
+ var findingReplaceImportFixSchema = z5.object({
2707
+ kind: z5.literal("replaceImport"),
2708
+ title: z5.string(),
2709
+ from: z5.string(),
2710
+ to: z5.string(),
2711
+ deterministic: z5.boolean().optional()
2462
2712
  });
2463
- var findingReplaceComponentFixSchema = z3.object({
2464
- kind: z3.literal("replaceComponent"),
2465
- title: z3.string(),
2466
- from: z3.string(),
2467
- to: z3.string(),
2468
- deterministic: z3.boolean().optional()
2713
+ var findingReplaceComponentFixSchema = z5.object({
2714
+ kind: z5.literal("replaceComponent"),
2715
+ title: z5.string(),
2716
+ from: z5.string(),
2717
+ to: z5.string(),
2718
+ deterministic: z5.boolean().optional()
2469
2719
  });
2470
- var findingReplaceClassTokenFixSchema = z3.object({
2471
- kind: z3.literal("replaceClassToken"),
2472
- title: z3.string(),
2473
- from: z3.string(),
2474
- to: z3.string().nullable(),
2475
- utility: z3.string(),
2476
- deterministic: z3.boolean().optional()
2720
+ var findingReplaceClassTokenFixSchema = z5.object({
2721
+ kind: z5.literal("replaceClassToken"),
2722
+ title: z5.string(),
2723
+ from: z5.string(),
2724
+ to: z5.string().nullable(),
2725
+ utility: z5.string(),
2726
+ deterministic: z5.boolean().optional()
2477
2727
  });
2478
- var findingFixSchema = z3.discriminatedUnion("kind", [
2728
+ var findingFixSchema = z5.discriminatedUnion("kind", [
2479
2729
  findingReplacePropValueFixSchema,
2480
2730
  findingReplaceStyleValueFixSchema,
2481
2731
  findingReplaceImportFixSchema,
2482
2732
  findingReplaceComponentFixSchema,
2483
2733
  findingReplaceClassTokenFixSchema
2484
2734
  ]);
2485
- var factEvidenceSchema = z3.object({
2486
- factId: z3.string(),
2487
- fact: z3.object({
2488
- kind: z3.string(),
2735
+ var factEvidenceSchema = z5.object({
2736
+ factId: z5.string(),
2737
+ fact: z5.object({
2738
+ kind: z5.string(),
2489
2739
  location: factLocationSchema.optional()
2490
2740
  }).passthrough()
2491
2741
  });
2492
- var findingSchema = z3.object({
2493
- ruleId: z3.string(),
2494
- ruleVersion: z3.string(),
2742
+ var findingSchema = z5.object({
2743
+ ruleId: z5.string(),
2744
+ ruleVersion: z5.string(),
2495
2745
  severity: severitySchema,
2496
2746
  level: severityLevelSchema,
2497
- code: z3.string().regex(/^FUI\d{4}$/).optional(),
2498
- helpUrl: z3.string().url().optional(),
2499
- message: z3.string(),
2500
- fingerprint: z3.string(),
2747
+ code: z5.string().regex(/^FUI\d{4}$/).optional(),
2748
+ helpUrl: z5.string().url().optional(),
2749
+ message: z5.string(),
2750
+ fingerprint: z5.string(),
2501
2751
  /**
2502
2752
  * Fingerprint this finding carried before a fingerprint-identity migration.
2503
2753
  * Emitted only by migrated rules during the grace window so baseline
2504
2754
  * records keyed on the legacy hash keep matching instead of churning.
2505
2755
  */
2506
- previousFingerprint: z3.string().optional(),
2756
+ previousFingerprint: z5.string().optional(),
2507
2757
  location: factLocationSchema,
2508
- evidence: z3.array(factEvidenceSchema).min(1),
2758
+ evidence: z5.array(factEvidenceSchema).min(1),
2509
2759
  evidenceGrade: evidenceGradeSchema.optional(),
2510
2760
  fix: findingFixSchema.optional(),
2511
- attributes: z3.record(z3.unknown()).optional(),
2761
+ attributes: z5.record(z5.unknown()).optional(),
2512
2762
  /**
2513
2763
  * Product area this finding's file resolved to (topology layer). Optional —
2514
2764
  * absent when the repo has no `topology` config. See `topology/resolve-area`.
2515
2765
  */
2516
- area: z3.object({
2517
- areaId: z3.string(),
2518
- areaName: z3.string(),
2519
- criticality: z3.enum(["low", "medium", "high", "revenue", "regulated"]),
2520
- owners: z3.array(z3.string()),
2521
- matchedGlob: z3.string()
2766
+ area: z5.object({
2767
+ areaId: z5.string(),
2768
+ areaName: z5.string(),
2769
+ criticality: z5.enum(["low", "medium", "high", "revenue", "regulated"]),
2770
+ owners: z5.array(z5.string()),
2771
+ matchedGlob: z5.string()
2522
2772
  }).optional()
2523
2773
  });
2524
- var violationSchema = z3.object({
2525
- nodeId: z3.string(),
2526
- nodeType: z3.string(),
2527
- rule: z3.string(),
2774
+ var violationSchema = z5.object({
2775
+ nodeId: z5.string(),
2776
+ nodeType: z5.string(),
2777
+ rule: z5.string(),
2528
2778
  severity: severitySchema,
2529
2779
  level: severityLevelSchema.optional(),
2530
- code: z3.string().regex(/^FUI\d{4}$/).optional(),
2531
- helpUrl: z3.string().url().optional(),
2532
- message: z3.string(),
2533
- path: z3.string().optional(),
2534
- suggestion: z3.string().optional(),
2535
- prop: z3.string().optional(),
2536
- filePath: z3.string().optional(),
2537
- line: z3.number().int().nonnegative().optional(),
2538
- column: z3.number().int().nonnegative().optional(),
2539
- rawValue: z3.string().optional(),
2540
- extra: z3.record(z3.unknown()).optional()
2780
+ code: z5.string().regex(/^FUI\d{4}$/).optional(),
2781
+ helpUrl: z5.string().url().optional(),
2782
+ message: z5.string(),
2783
+ path: z5.string().optional(),
2784
+ suggestion: z5.string().optional(),
2785
+ prop: z5.string().optional(),
2786
+ filePath: z5.string().optional(),
2787
+ line: z5.number().int().nonnegative().optional(),
2788
+ column: z5.number().int().nonnegative().optional(),
2789
+ rawValue: z5.string().optional(),
2790
+ extra: z5.record(z5.unknown()).optional()
2541
2791
  });
2542
- var fixSchema = z3.object({
2543
- nodeId: z3.string(),
2544
- prop: z3.string().optional(),
2545
- action: z3.enum(["remove", "replace", "add"]),
2546
- value: z3.unknown().optional(),
2547
- description: z3.string()
2792
+ var fixSchema = z5.object({
2793
+ nodeId: z5.string(),
2794
+ prop: z5.string().optional(),
2795
+ action: z5.enum(["remove", "replace", "add"]),
2796
+ value: z5.unknown().optional(),
2797
+ description: z5.string()
2548
2798
  });
2549
- var validatorResultSchema = z3.object({
2550
- validator: z3.string(),
2799
+ var validatorResultSchema = z5.object({
2800
+ validator: z5.string(),
2551
2801
  severity: severitySchema,
2552
- passed: z3.boolean(),
2553
- violations: z3.array(violationSchema),
2554
- findings: z3.array(findingSchema).optional(),
2555
- suggestions: z3.array(fixSchema).optional()
2802
+ passed: z5.boolean(),
2803
+ violations: z5.array(violationSchema),
2804
+ findings: z5.array(findingSchema).optional(),
2805
+ suggestions: z5.array(fixSchema).optional()
2556
2806
  });
2557
- var governanceVerdictMetadataSchema = z3.object({
2558
- runner: z3.string(),
2559
- policyVersion: z3.string().optional(),
2560
- duration: z3.number().nonnegative(),
2561
- nodeCount: z3.number().int().nonnegative(),
2562
- componentTypes: z3.array(z3.string())
2807
+ var governanceVerdictMetadataSchema = z5.object({
2808
+ runner: z5.string(),
2809
+ policyVersion: z5.string().optional(),
2810
+ duration: z5.number().nonnegative(),
2811
+ nodeCount: z5.number().int().nonnegative(),
2812
+ componentTypes: z5.array(z5.string())
2563
2813
  });
2564
- var governanceVerdictSchema = z3.object({
2565
- verdict: z3.enum(["pass", "warn", "fail"]).optional(),
2566
- passed: z3.boolean(),
2567
- score: z3.number(),
2568
- results: z3.array(validatorResultSchema),
2814
+ var governanceVerdictSchema = z5.object({
2815
+ verdict: z5.enum(["pass", "warn", "fail"]).optional(),
2816
+ passed: z5.boolean(),
2817
+ score: z5.number(),
2818
+ results: z5.array(validatorResultSchema),
2569
2819
  metadata: governanceVerdictMetadataSchema
2570
2820
  });
2571
- var suppressionDirectiveSchema = z3.object({
2572
- ruleId: z3.string().optional(),
2573
- reason: z3.string().min(1),
2574
- expiresAt: z3.string().datetime().optional(),
2575
- expiresOn: z3.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),
2576
- scope: z3.enum(["line", "block", "file"]).default("line"),
2577
- code: z3.string().regex(/^FUI\d{4}$/).optional()
2821
+ var suppressionDirectiveSchema = z5.object({
2822
+ ruleId: z5.string().optional(),
2823
+ reason: z5.string().min(1),
2824
+ expiresAt: z5.string().datetime().optional(),
2825
+ expiresOn: z5.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),
2826
+ scope: z5.enum(["line", "block", "file"]).default("line"),
2827
+ code: z5.string().regex(/^FUI\d{4}$/).optional()
2578
2828
  });
2579
- var agentPlanSchema = z3.object({
2580
- tool: z3.enum([
2829
+ var agentPlanSchema = z5.object({
2830
+ tool: z5.enum([
2581
2831
  "design_system/list_primitives",
2582
2832
  "design_system/conform",
2583
2833
  "design_system/prove_compliant"
2584
2834
  ]),
2585
- args: z3.record(z3.unknown()),
2586
- confidence: z3.number().min(0).max(1)
2835
+ args: z5.record(z5.unknown()),
2836
+ confidence: z5.number().min(0).max(1)
2587
2837
  });
2588
- var agentFindingSchema = z3.object({
2589
- code: z3.string().regex(/^FUI\d{4}$/).optional(),
2590
- ruleId: z3.string(),
2591
- filePath: z3.string(),
2592
- line: z3.number().int().nonnegative(),
2593
- col: z3.number().int().nonnegative(),
2838
+ var agentFindingSchema = z5.object({
2839
+ code: z5.string().regex(/^FUI\d{4}$/).optional(),
2840
+ ruleId: z5.string(),
2841
+ filePath: z5.string(),
2842
+ line: z5.number().int().nonnegative(),
2843
+ col: z5.number().int().nonnegative(),
2594
2844
  severity: severitySchema,
2595
2845
  level: severityLevelSchema,
2596
- message: z3.string(),
2846
+ message: z5.string(),
2597
2847
  evidenceGrade: evidenceGradeSchema.optional(),
2598
- evidence: z3.array(factEvidenceSchema),
2848
+ evidence: z5.array(factEvidenceSchema),
2599
2849
  plan: agentPlanSchema
2600
2850
  });
2601
2851
  var AGENT_FORMAT_SCHEMA_VERSION = "typestyle.agent.v2";
2602
- var agentIntegritySchema = z3.object({
2603
- rulesLoaded: z3.number().int().nonnegative(),
2604
- status: z3.enum(["healthy", "degraded", "inert"]),
2605
- healthy: z3.boolean(),
2606
- inert: z3.boolean(),
2607
- reasons: z3.array(z3.string())
2852
+ var agentIntegritySchema = z5.object({
2853
+ rulesLoaded: z5.number().int().nonnegative(),
2854
+ status: z5.enum(["healthy", "degraded", "inert"]),
2855
+ healthy: z5.boolean(),
2856
+ inert: z5.boolean(),
2857
+ reasons: z5.array(z5.string())
2608
2858
  });
2609
- var agentRunProvenanceSchema = z3.object({
2610
- runId: z3.string().regex(/^run_[a-f0-9]{12}$/),
2611
- fcid: z3.string().min(1),
2612
- baselineId: z3.string().min(1).optional(),
2613
- scope: z3.object({
2614
- method: z3.enum(["three-dot", "tree-diff", "status", "fallback-full", "explicit", "full"]),
2615
- gitOk: z3.boolean()
2859
+ var agentRunProvenanceSchema = z5.object({
2860
+ runId: z5.string().regex(/^run_[a-f0-9]{12}$/),
2861
+ fcid: z5.string().min(1),
2862
+ baselineId: z5.string().min(1).optional(),
2863
+ scope: z5.object({
2864
+ method: z5.enum(["three-dot", "tree-diff", "status", "fallback-full", "explicit", "full"]),
2865
+ gitOk: z5.boolean()
2616
2866
  }),
2617
- engineVersion: z3.string().min(1),
2618
- scopeHash: z3.string().regex(/^[a-f0-9]{64}$/),
2619
- inputsHash: z3.string().regex(/^[a-f0-9]{64}$/).optional(),
2620
- inputFilesHash: z3.string().regex(/^[a-f0-9]{64}$/)
2867
+ engineVersion: z5.string().min(1),
2868
+ scopeHash: z5.string().regex(/^[a-f0-9]{64}$/),
2869
+ inputsHash: z5.string().regex(/^[a-f0-9]{64}$/).optional(),
2870
+ inputFilesHash: z5.string().regex(/^[a-f0-9]{64}$/)
2621
2871
  });
2622
- var agentRunVerdictSchema = z3.object({
2623
- exitCode: z3.union([z3.literal(0), z3.literal(1)]),
2624
- reasons: z3.array(z3.string()),
2625
- gatingFindingCount: z3.number().int().nonnegative()
2872
+ var agentRunVerdictSchema = z5.object({
2873
+ exitCode: z5.union([z5.literal(0), z5.literal(1)]),
2874
+ reasons: z5.array(z5.string()),
2875
+ gatingFindingCount: z5.number().int().nonnegative()
2626
2876
  });
2627
- var agentFormatBaseSchema = z3.object({
2628
- schemaVersion: z3.literal(AGENT_FORMAT_SCHEMA_VERSION),
2629
- summary: z3.string(),
2877
+ var agentFormatBaseSchema = z5.object({
2878
+ schemaVersion: z5.literal(AGENT_FORMAT_SCHEMA_VERSION),
2879
+ summary: z5.string(),
2630
2880
  integrity: agentIntegritySchema,
2631
- fix_first: z3.array(agentFindingSchema),
2632
- remaining: z3.array(agentFindingSchema),
2633
- suppression_template: z3.object({
2634
- directive: z3.string(),
2635
- requiredFields: z3.array(z3.string()),
2636
- example: z3.string()
2881
+ fix_first: z5.array(agentFindingSchema),
2882
+ remaining: z5.array(agentFindingSchema),
2883
+ suppression_template: z5.object({
2884
+ directive: z5.string(),
2885
+ requiredFields: z5.array(z5.string()),
2886
+ example: z5.string()
2637
2887
  }),
2638
- budget: z3.object({
2639
- iteration: z3.number().int().nonnegative(),
2640
- maxIterations: z3.number().int().positive(),
2641
- scoreDelta: z3.number()
2888
+ budget: z5.object({
2889
+ iteration: z5.number().int().nonnegative(),
2890
+ maxIterations: z5.number().int().positive(),
2891
+ scoreDelta: z5.number()
2642
2892
  }),
2643
- findings: z3.array(findingSchema).optional(),
2644
- suppressions: z3.array(suppressionDirectiveSchema).optional(),
2893
+ findings: z5.array(findingSchema).optional(),
2894
+ suppressions: z5.array(suppressionDirectiveSchema).optional(),
2645
2895
  provenance: agentRunProvenanceSchema.optional(),
2646
2896
  verdict: agentRunVerdictSchema.optional()
2647
2897
  });
2648
- var agentFormatSchema = z3.union([
2898
+ var agentFormatSchema = z5.union([
2649
2899
  agentFormatBaseSchema.extend({
2650
- passed: z3.boolean(),
2651
- score: z3.number(),
2652
- status: z3.never().optional(),
2653
- reasons: z3.never().optional(),
2900
+ passed: z5.boolean(),
2901
+ score: z5.number(),
2902
+ status: z5.never().optional(),
2903
+ reasons: z5.never().optional(),
2654
2904
  integrity: agentIntegritySchema.extend({
2655
- rulesLoaded: z3.number().int().positive()
2905
+ rulesLoaded: z5.number().int().positive()
2656
2906
  })
2657
2907
  }),
2658
2908
  agentFormatBaseSchema.extend({
2659
- passed: z3.literal(false),
2660
- score: z3.never().optional(),
2661
- status: z3.literal("indeterminate"),
2662
- reasons: z3.tuple([z3.literal("zero_rules_loaded")]),
2909
+ passed: z5.literal(false),
2910
+ score: z5.never().optional(),
2911
+ status: z5.literal("indeterminate"),
2912
+ reasons: z5.tuple([z5.literal("zero_rules_loaded")]),
2663
2913
  integrity: agentIntegritySchema.extend({
2664
- rulesLoaded: z3.literal(0)
2914
+ rulesLoaded: z5.literal(0)
2665
2915
  })
2666
2916
  }),
2667
2917
  // A finalized Run can explicitly allow inert governance. Preserve the
@@ -2669,30 +2919,30 @@ var agentFormatSchema = z3.union([
2669
2919
  // verdict; requiring Run pins prevents generic zero-rule envelopes from
2670
2920
  // accidentally becoming green.
2671
2921
  agentFormatBaseSchema.extend({
2672
- passed: z3.literal(true),
2673
- score: z3.never().optional(),
2674
- status: z3.literal("indeterminate"),
2675
- reasons: z3.tuple([z3.literal("zero_rules_loaded")]),
2922
+ passed: z5.literal(true),
2923
+ score: z5.never().optional(),
2924
+ status: z5.literal("indeterminate"),
2925
+ reasons: z5.tuple([z5.literal("zero_rules_loaded")]),
2676
2926
  integrity: agentIntegritySchema.extend({
2677
- rulesLoaded: z3.literal(0)
2927
+ rulesLoaded: z5.literal(0)
2678
2928
  }),
2679
2929
  provenance: agentRunProvenanceSchema,
2680
- verdict: agentRunVerdictSchema.extend({ exitCode: z3.literal(0) })
2930
+ verdict: agentRunVerdictSchema.extend({ exitCode: z5.literal(0) })
2681
2931
  })
2682
2932
  ]);
2683
- var agentErrorEnvelopeSchema = z3.object({
2684
- schemaVersion: z3.literal(AGENT_FORMAT_SCHEMA_VERSION),
2685
- passed: z3.literal(false),
2686
- error: z3.object({
2687
- code: z3.string().min(1),
2688
- message: z3.string().min(1)
2933
+ var agentErrorEnvelopeSchema = z5.object({
2934
+ schemaVersion: z5.literal(AGENT_FORMAT_SCHEMA_VERSION),
2935
+ passed: z5.literal(false),
2936
+ error: z5.object({
2937
+ code: z5.string().min(1),
2938
+ message: z5.string().min(1)
2689
2939
  }),
2690
2940
  provenance: agentRunProvenanceSchema.optional(),
2691
2941
  verdict: agentRunVerdictSchema.optional(),
2692
- cloudReport: z3.enum(["reported", "failed", "skipped"]).optional(),
2693
- notices: z3.array(z3.string()).optional()
2942
+ cloudReport: z5.enum(["accepted", "reported", "failed", "skipped"]).optional(),
2943
+ notices: z5.array(z5.string()).optional()
2694
2944
  });
2695
- var agentOutputSchema = z3.union([agentFormatSchema, agentErrorEnvelopeSchema]);
2945
+ var agentOutputSchema = z5.union([agentFormatSchema, agentErrorEnvelopeSchema]);
2696
2946
  function normalizeSeverity(severity) {
2697
2947
  return severitySchema.safeParse(severity).success ? severity : severityFromLevel(legacySeverityLevelSchema.parse(severity));
2698
2948
  }
@@ -2805,6 +3055,33 @@ export {
2805
3055
  byCode,
2806
3056
  byRuleId,
2807
3057
  explainUrlForCode,
3058
+ digestHexStringSchema,
3059
+ digestHexSchema,
3060
+ analysisPlanIdStringSchema,
3061
+ analysisPlanIdSchema,
3062
+ evaluationReceiptIdSchema,
3063
+ evaluationReceiptIdStringSchema,
3064
+ featurePlanIdStringSchema,
3065
+ featurePlanIdSchema,
3066
+ featureRevisionIdStringSchema,
3067
+ featureRevisionIdSchema,
3068
+ parseDigestHex,
3069
+ analysisPlanIdFromDigest,
3070
+ evaluationReceiptIdFromDigest,
3071
+ mintEvaluationReceiptId,
3072
+ featureRevisionIdFromDigest,
3073
+ featurePlanIdFromEntropy,
3074
+ parseAnalysisPlanId,
3075
+ parseEvaluationReceiptId,
3076
+ parseFeaturePlanId,
3077
+ parseFeatureRevisionId,
3078
+ CANONICAL_FACT_MAX_CONFLICTS_V1,
3079
+ CANONICAL_FACT_MAX_VALUES_PER_CONFLICT_V1,
3080
+ CANONICAL_FACT_MAX_PROVENANCE_PER_VALUE_V1,
3081
+ canonicalFactConflictValueV1Schema,
3082
+ canonicalFactConflictV1Schema,
3083
+ canonicalFactIntegrityV1Schema,
3084
+ normalizeCanonicalFactIntegrityV1,
2808
3085
  canonicalJson,
2809
3086
  hash64Hex,
2810
3087
  componentId,
@@ -2875,6 +3152,7 @@ export {
2875
3152
  markPresetSourcedRules,
2876
3153
  isPresetSourcedRule,
2877
3154
  resolveComponentGovernance,
3155
+ resolveGovernanceRecordsForIdentity,
2878
3156
  normalizeGovernanceConfig,
2879
3157
  g,
2880
3158
  RULE_FAMILY_MEMBERS,
@@ -2912,4 +3190,4 @@ export {
2912
3190
  normalizeFinding,
2913
3191
  normalizeViolation
2914
3192
  };
2915
- //# sourceMappingURL=chunk-XN3LSDPY.js.map
3193
+ //# sourceMappingURL=chunk-RPSEABY3.js.map