@usefragments/core 1.10.2 → 2.0.0

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