@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,7 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { ComponentType, ReactNode, JSX } from 'react';
3
3
  import { Topology } from './topology/index.js';
4
- import { S as SerializedComponentGraph } from './types-xJ2xyp_G.js';
5
4
 
6
5
  /**
7
6
  * Frontend Contract preimage — the projection that defines what the contract IS.
@@ -30,6 +29,16 @@ import { S as SerializedComponentGraph } from './types-xJ2xyp_G.js';
30
29
  * Runtime-portable by construction: no Node APIs, no Convex imports, no React.
31
30
  */
32
31
 
32
+ /**
33
+ * Positive pick-list of per-component `contract` fields that enter the FCID.
34
+ * Display/guidance fields (`propsSummary`, `canonicalUsage`, `scenarioTags`,
35
+ * story `states`/`variants`, descriptions) are intentionally absent — adapters
36
+ * may still pass them, but {@link projectEnforcementContract} never copies them.
37
+ */
38
+ declare const CONTRACT_ENFORCEMENT_FIELDS: readonly ["a11yRules", "bans", "performanceBudget", "compoundChildren", "composition"];
39
+ type ContractEnforcementField = (typeof CONTRACT_ENFORCEMENT_FIELDS)[number];
40
+ /** Display-only contract keys that must never enter the FCID positive pick-list. */
41
+ declare const CONTRACT_DISPLAY_ONLY_FIELDS: readonly ["propsSummary", "canonicalUsage", "scenarioTags", "states", "variants"];
33
42
  /**
34
43
  * The fixed domain enum. Adding a domain is a spine change (update
35
44
  * `01-architecture.md` first); never rename — deprecate and alias.
@@ -48,11 +57,15 @@ interface ContractComponentInput {
48
57
  /** Prop names the component accepts. */
49
58
  props?: readonly string[];
50
59
  /**
51
- * The per-component enforcement contract as authored (bans, a11y rules,
52
- * required compound children). Passed through whole it is enforcement data
53
- * by definition.
60
+ * The per-component contract as authored. Only {@link CONTRACT_ENFORCEMENT_FIELDS}
61
+ * are projected into the FCIDdisplay/guidance keys are stripped structurally.
54
62
  */
55
63
  contract?: unknown;
64
+ /**
65
+ * Resolved component governance records (`govern:` / `governance`). Editing
66
+ * these changes what CI allows, so they are FCID identity.
67
+ */
68
+ governance?: readonly ComponentGovernanceRecord[];
56
69
  /** Required compound-children names, when the structure is declared. */
57
70
  compoundChildren?: readonly string[];
58
71
  }
@@ -127,6 +140,11 @@ interface ContractCatalogInput {
127
140
  canonicalMappings?: readonly ContractCanonicalMappingInput[];
128
141
  policy?: ContractPolicyInput | null;
129
142
  }
143
+ /** Deterministic runtime refusal for malformed or ambiguous FCID inputs. */
144
+ declare class ContractCatalogValidationError extends TypeError {
145
+ readonly issues: readonly string[];
146
+ constructor(issues: readonly string[]);
147
+ }
130
148
  declare const CONTRACT_PREIMAGE_SCHEMA: "fcid-preimage:v1";
131
149
  /** Request header used by clients that can verify and consume this preimage. */
132
150
  declare const CONTRACT_PREIMAGE_CAPABILITY_HEADER: "X-Fragments-Contract-Preimage";
@@ -158,6 +176,11 @@ interface ContractIdentityPin {
158
176
  * internally inconsistent pin returns `null` and therefore fails closed.
159
177
  */
160
178
  declare function verifiedContractPreimageFromPin(pin: ContractIdentityPin): ContractPreimage | null;
179
+ /**
180
+ * Project only enforcement fields from a per-component `contract` blob.
181
+ * Unknown / display keys are dropped; an all-display contract becomes `undefined`.
182
+ */
183
+ declare function projectEnforcementContract(contract: unknown): unknown;
161
184
  /**
162
185
  * Project a catalog onto the contract preimage: four enforced-only domain
163
186
  * bodies, each hashed independently. `contractHash(projectContractPreimage(x))`
@@ -190,6 +213,18 @@ declare function diffContractDomains(a: ContractPreimage, b: ContractPreimage):
190
213
  */
191
214
  declare function contractPolicyFromGovernanceConfig(config: GovernanceConfig | null | undefined): ContractPolicyInput | null;
192
215
  declare function contractComponentsFromFragments(fragments: readonly unknown[]): ContractComponentInput[];
216
+ /**
217
+ * Derive a preview `artifactId` from modules, states, guidance/render content,
218
+ * and runtime config. Never an FCID — callers must not assign
219
+ * `derivedFromContractHash` into `artifactId` (or the reverse).
220
+ */
221
+ declare function deriveArtifactId(content: {
222
+ modules?: unknown;
223
+ states?: unknown;
224
+ guidance?: unknown;
225
+ render?: unknown;
226
+ runtime?: unknown;
227
+ }): string;
193
228
 
194
229
  interface LocalCanonicalResolveRule {
195
230
  tag: string;
@@ -206,286 +241,6 @@ interface InspectConfig {
206
241
  declare function localCanonicalContractMappings(inspect: InspectConfig | null | undefined): ContractCanonicalMappingInput[];
207
242
  declare function governanceConfigWithLocalCanonical(config: GovernanceConfig | undefined, inspect: InspectConfig | null | undefined): GovernanceConfig | undefined;
208
243
 
209
- /**
210
- * Component metadata
211
- */
212
- interface FragmentMeta$1 {
213
- name: string;
214
- description: string;
215
- category: string;
216
- tags?: string[];
217
- status?: "stable" | "beta" | "deprecated" | "experimental";
218
- since?: string;
219
- dependencies?: Array<{
220
- name: string;
221
- version: string;
222
- reason?: string;
223
- }>;
224
- figma?: string;
225
- figmaProps?: Record<string, unknown>;
226
- }
227
- /**
228
- * Usage guidelines for AI agents and developers
229
- */
230
- interface FragmentUsage$1 {
231
- when: string[];
232
- whenNot: string[];
233
- guidelines?: string[];
234
- accessibility?: string[];
235
- }
236
- /**
237
- * Definition for a single prop
238
- */
239
- interface PropDefinition$1 {
240
- type: string;
241
- values?: readonly string[];
242
- default?: unknown;
243
- description: string;
244
- required?: boolean;
245
- constraints?: string[];
246
- typeDetails?: Record<string, unknown>;
247
- controlType?: string;
248
- controlOptions?: {
249
- min?: number;
250
- max?: number;
251
- step?: number;
252
- presetColors?: string[];
253
- };
254
- }
255
- /**
256
- * Relationship to another component
257
- */
258
- interface ComponentRelation$1 {
259
- component: string;
260
- relationship: string;
261
- note: string;
262
- }
263
- /**
264
- * Agent-optimized contract metadata
265
- */
266
- interface FragmentContract$1 {
267
- propsSummary?: string[];
268
- a11yRules?: string[];
269
- bans?: Array<{
270
- pattern: string;
271
- message: string;
272
- }>;
273
- scenarioTags?: string[];
274
- /** Per-component performance budget override in bytes (gzipped) */
275
- performanceBudget?: number;
276
- /** Sub-component slot metadata for compound components */
277
- compoundChildren?: Record<string, {
278
- required?: boolean;
279
- accepts?: string[];
280
- description?: string;
281
- }>;
282
- /** Canonical JSX usage examples showing how to assemble the component */
283
- canonicalUsage?: string[];
284
- }
285
- /**
286
- * Provenance tracking for generated fragments
287
- */
288
- interface FragmentGenerated$1 {
289
- source: "storybook" | "manual" | "ai" | "extracted" | "merged" | "migrated";
290
- sourceFile?: string;
291
- /** @deprecated Use provenance.verified instead */
292
- confidence?: number;
293
- verified?: boolean;
294
- timestamp?: string;
295
- }
296
- /**
297
- * AI-specific metadata
298
- */
299
- interface AIMetadata$1 {
300
- compositionPattern?: "compound" | "simple" | "controlled" | "wrapper";
301
- subComponents?: string[];
302
- requiredChildren?: string[];
303
- commonPatterns?: string[];
304
- }
305
- /**
306
- * Performance data for a component (from bundle size measurement)
307
- */
308
- /**
309
- * A single import contributing to bundle size
310
- */
311
- interface ImportEntry {
312
- /** Resolved file path (relative to project root) */
313
- path: string;
314
- /** Bytes contributed to the bundle */
315
- bytes: number;
316
- /** Percentage of total bundle size */
317
- percent: number;
318
- }
319
- interface PerformanceData {
320
- /** Gzipped bundle size in bytes */
321
- bundleSize: number;
322
- /** Raw (minified, not gzipped) bundle size in bytes */
323
- rawSize: number;
324
- /** Complexity classification */
325
- complexity: 'lightweight' | 'moderate' | 'heavy';
326
- /** Percentage of budget used (0-100+) */
327
- budgetPercent: number;
328
- /** Whether the component exceeds its budget */
329
- overBudget: boolean;
330
- /** ISO timestamp when measured */
331
- measuredAt: string;
332
- /** Top imports by size (largest first) */
333
- imports?: ImportEntry[];
334
- }
335
- interface ObservedUsageProp {
336
- name: string;
337
- kind: 'static' | 'dynamic' | 'spread' | 'jsx' | 'boolean' | 'null';
338
- value?: string | number | boolean | null;
339
- }
340
- interface ObservedComponentUsage {
341
- /** Source file path relative to the fragments config root */
342
- file: string;
343
- /** 1-indexed source line */
344
- line: number;
345
- /** 0-indexed source column */
346
- column: number;
347
- props: ObservedUsageProp[];
348
- parentElement?: string;
349
- conditional?: boolean;
350
- }
351
- /**
352
- * Compiled fragment data (JSON-serializable for AI consumption)
353
- */
354
- interface CompiledFragment {
355
- filePath: string;
356
- meta: FragmentMeta$1;
357
- /** Canonical v2 guidance. `usage` is retained for compatibility. */
358
- guidance?: FragmentUsage$1;
359
- usage: FragmentUsage$1;
360
- props: Record<string, PropDefinition$1>;
361
- /** Normalized component governance records emitted from *.fragment.ts. */
362
- governance?: ComponentGovernanceRecord[];
363
- relations?: ComponentRelation$1[];
364
- variants: Array<{
365
- name: string;
366
- description: string;
367
- code?: string;
368
- figma?: string;
369
- args?: Record<string, unknown>;
370
- }>;
371
- contract?: FragmentContract$1;
372
- ai?: AIMetadata$1;
373
- /** Framework hint from contract, used by preview adapters and Cloud */
374
- framework?: string;
375
- /** Top-level compact prop summaries for agent first-pass */
376
- propsSummary?: string[];
377
- /** Source file path relative to config root (for contract-sourced fragments) */
378
- sourcePath?: string;
379
- /** Named export for preview adapter resolution */
380
- exportName?: string;
381
- /** Clean provenance tracking (V2) */
382
- provenance?: {
383
- source: string;
384
- verified: boolean;
385
- frameworkSupport?: string;
386
- sourceHash?: string;
387
- extractedAt?: string;
388
- };
389
- /** Component performance data from bundle size measurement */
390
- performance?: PerformanceData;
391
- /** Observed JSX call sites captured during `fragments scan` */
392
- usages?: ObservedComponentUsage[];
393
- _generated?: FragmentGenerated$1;
394
- }
395
- /**
396
- * Compiled block data (JSON-serializable for AI consumption)
397
- */
398
- interface CompiledBlock {
399
- filePath: string;
400
- name: string;
401
- description: string;
402
- category: string;
403
- components: string[];
404
- code: string;
405
- tags?: string[];
406
- }
407
- /**
408
- * A single token entry in the compiled output
409
- */
410
- interface CompiledTokenEntry {
411
- name: string;
412
- value?: string;
413
- description?: string;
414
- }
415
- /**
416
- * Compiled token data stored in fragments.json
417
- */
418
- interface CompiledTokenData {
419
- prefix: string;
420
- total: number;
421
- categories: Record<string, CompiledTokenEntry[]>;
422
- }
423
- /**
424
- * Performance summary across all components
425
- */
426
- interface PerformanceSummary {
427
- /** Preset name used */
428
- preset: string;
429
- /** Budget applied in bytes */
430
- budget: number;
431
- /** Total components measured */
432
- total: number;
433
- /** Number of components over budget */
434
- overBudget: number;
435
- /** Distribution by tier */
436
- tiers: Record<string, number>;
437
- }
438
- /**
439
- * The compiled fragments.json structure
440
- */
441
- interface CompiledFragmentsFile {
442
- version: string;
443
- generatedAt: string;
444
- /** CLI version that produced this file, used for freshness checks */
445
- generatorVersion?: string;
446
- /** Relative source/config inputs used to build this file, used for freshness checks */
447
- buildInputs?: string[];
448
- packageName?: string;
449
- fragments: Record<string, CompiledFragment>;
450
- blocks?: Record<string, CompiledBlock>;
451
- tokens?: CompiledTokenData;
452
- /** Component relationship graph for AI structural queries */
453
- graph?: SerializedComponentGraph;
454
- /** Performance measurement summary */
455
- performanceSummary?: PerformanceSummary;
456
- /** @deprecated Use blocks instead */
457
- recipes?: Record<string, CompiledBlock>;
458
- }
459
- declare class CompiledFragmentsFileValidationError extends Error {
460
- readonly source: string;
461
- readonly issues: string[];
462
- constructor(source: string, issues: string[]);
463
- }
464
- declare function parseCompiledFragmentsFile(input: string | unknown, source?: string): CompiledFragmentsFile;
465
- /**
466
- * Theme identifier
467
- */
468
- type Theme$1 = "light" | "dark";
469
- /**
470
- * Verification result
471
- */
472
- interface VerifyResult$1 {
473
- verdict: "pass" | "fail" | "error";
474
- matches: boolean;
475
- diffPercentage: number;
476
- screenshot: string;
477
- baseline: string;
478
- diffImage?: string;
479
- notes: string[];
480
- error?: string;
481
- timing: {
482
- renderMs: number;
483
- captureMs: number;
484
- diffMs: number;
485
- totalMs: number;
486
- };
487
- }
488
-
489
244
  /**
490
245
  * A React component that can be used in a fragment definition.
491
246
  * This type is intentionally broad to support various React component patterns
@@ -572,6 +327,17 @@ interface FragmentUsage {
572
327
  when: string[];
573
328
  /** When NOT to use this component (with alternatives) */
574
329
  whenNot: string[];
330
+ /** Optional v3 choose-among-alternates guidance carried into the wire document */
331
+ choose?: Record<string, string>;
332
+ /**
333
+ * Serialized v3 anti-pattern guidance. The source API keeps `good` as JSX;
334
+ * the compiled catalog stores its exact checked source span as a string.
335
+ */
336
+ dont?: Array<{
337
+ reason: string;
338
+ bad: string;
339
+ good: string;
340
+ }>;
575
341
  /** Additional usage guidelines and best practices */
576
342
  guidelines?: string[];
577
343
  /** Accessibility considerations */
@@ -713,6 +479,12 @@ interface FragmentVariant {
713
479
  tags?: string[];
714
480
  /** Async loaders to execute before rendering (from Storybook loaders) */
715
481
  loaders?: VariantLoader[];
482
+ /**
483
+ * The adapted Storybook story declared one or more loaders. Their original
484
+ * Storybook context is not available to a Fragment variant, so adapters
485
+ * report presence without attempting to execute them.
486
+ */
487
+ hasUnsupportedStorybookLoaders?: boolean;
716
488
  /** The args/props used to render this variant (for code generation) */
717
489
  args?: Record<string, unknown>;
718
490
  }
@@ -751,7 +523,7 @@ interface FragmentContract {
751
523
  */
752
524
  interface FragmentGenerated {
753
525
  /** Source of this fragment definition */
754
- source: "storybook" | "manual" | "ai" | "extracted" | "merged" | "migrated";
526
+ source: "storybook" | "manual" | "ai" | "scan" | "extracted" | "merged" | "migrated";
755
527
  /** Original source file (e.g., "Button.stories.tsx") */
756
528
  sourceFile?: string;
757
529
  /** @deprecated Use provenance.verified instead — kept for backwards compatibility */
@@ -838,7 +610,7 @@ interface FragmentProvenance {
838
610
  /** @deprecated Use verified instead */
839
611
  confidence?: number;
840
612
  /** Whether the fragment has been verified against source */
841
- verified: boolean;
613
+ verified?: boolean;
842
614
  /** Framework support level */
843
615
  frameworkSupport?: "native" | "manual-only";
844
616
  /** SHA hash of the source file at extraction time */
@@ -882,6 +654,162 @@ interface FragmentDefinitionV2<TProps = unknown> {
882
654
  /** Provenance tracking (v2 name for '_generated', extended) */
883
655
  _provenance?: FragmentProvenance;
884
656
  }
657
+ /**
658
+ * v3 component metadata. `purpose` is the required plain-English line for
659
+ * exec/agent surfaces; intent-search vocabulary lives in `aliases`.
660
+ *
661
+ * @since 3.0
662
+ */
663
+ interface FragmentMetaV3 {
664
+ name: string;
665
+ purpose: string;
666
+ category: string;
667
+ status?: "stable" | "beta" | "deprecated" | "experimental";
668
+ aliases?: string[];
669
+ tags?: string[];
670
+ since?: string;
671
+ dependencies?: Array<{
672
+ name: string;
673
+ version: string;
674
+ reason?: string;
675
+ }>;
676
+ figma?: string;
677
+ figmaProps?: Record<string, FigmaPropMapping>;
678
+ }
679
+ /**
680
+ * A single authored state. Display `code` is extracted from the checked JSX
681
+ * AST by the compiler — authored `code` strings are forbidden in v3.
682
+ *
683
+ * @since 3.0
684
+ */
685
+ interface FragmentStateV3 {
686
+ /** Type-checked JSX (element or render thunk). Never an authored code string. */
687
+ render: Exclude<ReactNode, string | undefined> | ((options?: VariantRenderOptions) => ReactNode);
688
+ note?: string;
689
+ canonical?: boolean;
690
+ /** Forbidden in v3 — display code is extracted from `render`. */
691
+ code?: never;
692
+ }
693
+ /**
694
+ * Negative example with a type-checked `good` replacement.
695
+ *
696
+ * @since 3.0
697
+ */
698
+ interface FragmentDontExampleV3 {
699
+ reason: string;
700
+ /** Anti-pattern shown as a string (intentionally not type-checked). */
701
+ bad: string;
702
+ /** Correct replacement — real JSX bound to the component. */
703
+ good: Exclude<ReactNode, string | undefined> | ((options?: VariantRenderOptions) => ReactNode);
704
+ }
705
+ /**
706
+ * v3 guidance: v2 when/whenNot plus choose/dont.
707
+ *
708
+ * @since 3.0
709
+ */
710
+ interface FragmentGuidanceV3 {
711
+ when: string[];
712
+ whenNot: string[];
713
+ choose?: Record<string, string>;
714
+ dont?: FragmentDontExampleV3[];
715
+ guidelines?: string[];
716
+ accessibility?: string[];
717
+ }
718
+ /**
719
+ * Workshop matrix axes. `"auto"` means extraction fills proven prop enums.
720
+ *
721
+ * @since 3.0
722
+ */
723
+ interface FragmentMatrixV3 {
724
+ axes?: Record<string, "auto" | readonly string[]>;
725
+ forced?: string[];
726
+ worstCase?: Record<string, unknown>;
727
+ }
728
+ /**
729
+ * Preview runtime hints (providers + visual-diff masks).
730
+ *
731
+ * @since 3.0
732
+ */
733
+ interface FragmentPreviewV3 {
734
+ providers?: unknown[];
735
+ dynamicRegions?: string[];
736
+ }
737
+ /**
738
+ * Optional design-tool comparison input.
739
+ *
740
+ * @since 3.0
741
+ */
742
+ interface FragmentDesignV3 {
743
+ figmaNode?: string;
744
+ }
745
+ /**
746
+ * Prop annotations annotate extracted truth — they never redefine `type`,
747
+ * `default`, `values`, or `required`.
748
+ *
749
+ * @since 3.0
750
+ */
751
+ interface PropAnnotation {
752
+ description?: string;
753
+ controlType?: ControlType;
754
+ controlOptions?: Record<string, unknown>;
755
+ visibility?: "public" | "internal" | "hidden";
756
+ constraints?: string[];
757
+ /** Forbidden — derived from component types. */
758
+ type?: never;
759
+ /** Forbidden — derived from component defaults. */
760
+ default?: never;
761
+ values?: never;
762
+ required?: never;
763
+ }
764
+ /**
765
+ * Freeform authoring annotations (docs notes, review markers). Separate from
766
+ * prop annotations, which live under `props`.
767
+ *
768
+ * @since 3.0
769
+ */
770
+ interface FragmentAnnotationsV3 {
771
+ notes?: string[];
772
+ review?: string[];
773
+ [key: string]: unknown;
774
+ }
775
+ type FragmentPropAnnotations<TProps> = [keyof TProps] extends [never] ? Record<string, PropAnnotation> : {
776
+ [K in Extract<keyof TProps, string>]?: PropAnnotation;
777
+ };
778
+ /**
779
+ * v3 definition body — the second argument to
780
+ * `defineFragment(Component, definition)`. The component is bound by arity,
781
+ * not authored inside the body.
782
+ *
783
+ * @since 3.0
784
+ */
785
+ interface FragmentDefinitionV3Body<TProps = unknown> {
786
+ meta: FragmentMetaV3;
787
+ states: Record<string, FragmentStateV3>;
788
+ guidance: FragmentGuidanceV3;
789
+ matrix?: FragmentMatrixV3;
790
+ preview?: FragmentPreviewV3;
791
+ design?: FragmentDesignV3;
792
+ annotations?: FragmentAnnotationsV3;
793
+ /** Annotate-only prop docs keyed by prop name. */
794
+ props?: FragmentPropAnnotations<TProps>;
795
+ relations?: ComponentRelation[];
796
+ composition?: CompositionMetadata;
797
+ contract?: FragmentContract;
798
+ _provenance?: FragmentProvenance;
799
+ /** Optional governance authoring (resolved when present). */
800
+ govern?: (g: ComponentGovernanceBuilder<TProps>) => ComponentGovernanceRecord[];
801
+ governance?: ComponentGovernanceRecord[];
802
+ }
803
+ /**
804
+ * Resolved v3 fragment after `defineFragment(Component, body)` binds the
805
+ * component. Governance is always resolved (empty array when none authored).
806
+ *
807
+ * @since 3.0
808
+ */
809
+ interface FragmentDefinitionV3<TProps = unknown> extends FragmentDefinitionV3Body<TProps> {
810
+ component: FragmentComponent<TProps>;
811
+ governance: ComponentGovernanceRecord[];
812
+ }
885
813
  /**
886
814
  * Registry generation options
887
815
  */
@@ -894,8 +822,48 @@ interface RegistryOptions {
894
822
  categoryDepth?: number;
895
823
  /** Include props in registry (default: false - AI can read TypeScript directly) */
896
824
  includeProps?: boolean;
897
- /** Include full fragment data in registry (default: false - reference fragmentPath instead) */
898
- embedFragments?: boolean;
825
+ }
826
+ /** Prop entry in the lightweight source registry. */
827
+ interface RegistryPropEntry {
828
+ type?: string;
829
+ typeKind?: "string" | "number" | "boolean" | "enum" | "object" | "array" | "function" | "node" | "element" | "union" | "unknown";
830
+ options?: string[];
831
+ default?: unknown;
832
+ required?: boolean;
833
+ description?: string;
834
+ }
835
+ /** Component entry in the lightweight source registry. */
836
+ interface RegistryComponentEntry {
837
+ path: string;
838
+ storyPath?: string;
839
+ category?: string;
840
+ props?: Record<string, RegistryPropEntry>;
841
+ exports?: string[];
842
+ dependencies?: string[];
843
+ }
844
+ /** Minimal component index for quick source navigation. */
845
+ interface FragmentIndex {
846
+ version: string;
847
+ generatedAt: string;
848
+ components: Record<string, string>;
849
+ categories?: Record<string, string[]>;
850
+ }
851
+ /** Source registry with resolved component paths and optional extracted props. */
852
+ interface FragmentRegistry {
853
+ $schema?: string;
854
+ version: string;
855
+ generatedAt: string;
856
+ componentCount: number;
857
+ components: Record<string, RegistryComponentEntry>;
858
+ categories?: Record<string, string[]>;
859
+ }
860
+ /** Context file options for source-registry generation. */
861
+ interface FragmentContextOptions {
862
+ format?: "markdown" | "json";
863
+ compact?: boolean;
864
+ include?: {
865
+ props?: boolean;
866
+ };
899
867
  }
900
868
  /**
901
869
  * Design token configuration
@@ -1001,24 +969,6 @@ interface SnippetPolicyConfig {
1001
969
  /** Allow these external modules for JSX components in snippets/renders. */
1002
970
  allowedExternalModules?: string[];
1003
971
  }
1004
- /**
1005
- * Storybook adapter filtering configuration.
1006
- * Controls which Storybook stories are included when generating fragments.
1007
- */
1008
- interface StorybookFilterConfig {
1009
- /** Glob-style patterns for component names to explicitly exclude */
1010
- exclude?: string[];
1011
- /** Glob-style patterns for component names to force-include (bypasses all heuristic filters) */
1012
- include?: string[];
1013
- /** Exclude stories with "Deprecated" in the title (default: true) */
1014
- excludeDeprecated?: boolean;
1015
- /** Exclude test stories (title ending /test(s) or *.test.stories.* files) (default: true) */
1016
- excludeTests?: boolean;
1017
- /** Exclude SVG icon components (names matching Svg[A-Z]*) (default: true) */
1018
- excludeSvgIcons?: boolean;
1019
- /** Exclude sub-components detected by directory structure (default: true) */
1020
- excludeSubComponents?: boolean;
1021
- }
1022
972
  /**
1023
973
  * Theme seed configuration.
1024
974
  * The 5 root values that derive 120+ CSS custom properties.
@@ -1028,8 +978,6 @@ interface ThemeSeeds {
1028
978
  brand?: string;
1029
979
  /** Neutral palette name */
1030
980
  neutral?: "stone" | "ice" | "earth" | "sand" | "fire" | "fragments";
1031
- /** Spacing density scale */
1032
- density?: "compact" | "default" | "relaxed";
1033
981
  /** Border radius style */
1034
982
  radiusStyle?: "sharp" | "subtle" | "default" | "rounded" | "pill";
1035
983
  /** Danger/error color as hex (e.g., "#ef4444") */
@@ -1093,8 +1041,6 @@ interface FragmentsConfig {
1093
1041
  bundleSize?: number;
1094
1042
  };
1095
1043
  };
1096
- /** Storybook adapter filtering configuration */
1097
- storybook?: StorybookFilterConfig;
1098
1044
  /** Theme seed values for the 5-seed theming system */
1099
1045
  theme?: ThemeSeeds;
1100
1046
  /**
@@ -1332,14 +1278,6 @@ interface BlockDefinition {
1332
1278
  code: string;
1333
1279
  tags?: string[];
1334
1280
  }
1335
- /**
1336
- * @deprecated Use BlockDefinition instead
1337
- */
1338
- type RecipeDefinition = BlockDefinition;
1339
- /**
1340
- * @deprecated Use CompiledBlock instead
1341
- */
1342
- type CompiledRecipe = CompiledBlock;
1343
1281
 
1344
1282
  declare const governanceSeveritySchema: z.ZodEnum<["error", "warn", "info"]>;
1345
1283
  type GovernanceSeverity = z.infer<typeof governanceSeveritySchema>;
@@ -1598,26 +1536,26 @@ declare const globalJsxGovernanceRecordSchema: z.ZodDiscriminatedUnion<"kind", [
1598
1536
  }>]>, "many">>;
1599
1537
  }, "strip", z.ZodTypeAny, {
1600
1538
  kind: "jsx.importPath.prefer";
1539
+ severity: "error" | "info" | "warn";
1601
1540
  from: string;
1602
1541
  to: string;
1603
- severity: "error" | "info" | "warn";
1542
+ because?: string | undefined;
1604
1543
  exclude?: (string | {
1605
1544
  glob: string;
1606
1545
  reason?: string | undefined;
1607
1546
  })[] | undefined;
1608
1547
  imported?: string | undefined;
1609
- because?: string | undefined;
1610
1548
  }, {
1611
1549
  kind: "jsx.importPath.prefer";
1550
+ severity: "error" | "info" | "warn";
1612
1551
  from: string;
1613
1552
  to: string;
1614
- severity: "error" | "info" | "warn";
1553
+ because?: string | undefined;
1615
1554
  exclude?: (string | {
1616
1555
  glob: string;
1617
1556
  reason?: string | undefined;
1618
1557
  })[] | undefined;
1619
1558
  imported?: string | undefined;
1620
- because?: string | undefined;
1621
1559
  }>, z.ZodObject<{
1622
1560
  kind: z.ZodLiteral<"jsx.component.prefer">;
1623
1561
  from: z.ZodString;
@@ -1636,24 +1574,24 @@ declare const globalJsxGovernanceRecordSchema: z.ZodDiscriminatedUnion<"kind", [
1636
1574
  }>]>, "many">>;
1637
1575
  }, "strip", z.ZodTypeAny, {
1638
1576
  kind: "jsx.component.prefer";
1577
+ severity: "error" | "info" | "warn";
1639
1578
  from: string;
1640
1579
  to: string;
1641
- severity: "error" | "info" | "warn";
1580
+ because?: string | undefined;
1642
1581
  exclude?: (string | {
1643
1582
  glob: string;
1644
1583
  reason?: string | undefined;
1645
1584
  })[] | undefined;
1646
- because?: string | undefined;
1647
1585
  }, {
1648
1586
  kind: "jsx.component.prefer";
1587
+ severity: "error" | "info" | "warn";
1649
1588
  from: string;
1650
1589
  to: string;
1651
- severity: "error" | "info" | "warn";
1590
+ because?: string | undefined;
1652
1591
  exclude?: (string | {
1653
1592
  glob: string;
1654
1593
  reason?: string | undefined;
1655
1594
  })[] | undefined;
1656
- because?: string | undefined;
1657
1595
  }>]>;
1658
1596
  declare const globalGovernanceRecordSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1659
1597
  kind: z.ZodDefault<z.ZodLiteral<"scale">>;
@@ -1908,26 +1846,26 @@ declare const globalGovernanceRecordSchema: z.ZodDiscriminatedUnion<"kind", [z.Z
1908
1846
  }>]>, "many">>;
1909
1847
  }, "strip", z.ZodTypeAny, {
1910
1848
  kind: "jsx.importPath.prefer";
1849
+ severity: "error" | "info" | "warn";
1911
1850
  from: string;
1912
1851
  to: string;
1913
- severity: "error" | "info" | "warn";
1852
+ because?: string | undefined;
1914
1853
  exclude?: (string | {
1915
1854
  glob: string;
1916
1855
  reason?: string | undefined;
1917
1856
  })[] | undefined;
1918
1857
  imported?: string | undefined;
1919
- because?: string | undefined;
1920
1858
  }, {
1921
1859
  kind: "jsx.importPath.prefer";
1860
+ severity: "error" | "info" | "warn";
1922
1861
  from: string;
1923
1862
  to: string;
1924
- severity: "error" | "info" | "warn";
1863
+ because?: string | undefined;
1925
1864
  exclude?: (string | {
1926
1865
  glob: string;
1927
1866
  reason?: string | undefined;
1928
1867
  })[] | undefined;
1929
1868
  imported?: string | undefined;
1930
- because?: string | undefined;
1931
1869
  }>, z.ZodObject<{
1932
1870
  kind: z.ZodLiteral<"jsx.component.prefer">;
1933
1871
  from: z.ZodString;
@@ -1946,24 +1884,24 @@ declare const globalGovernanceRecordSchema: z.ZodDiscriminatedUnion<"kind", [z.Z
1946
1884
  }>]>, "many">>;
1947
1885
  }, "strip", z.ZodTypeAny, {
1948
1886
  kind: "jsx.component.prefer";
1887
+ severity: "error" | "info" | "warn";
1949
1888
  from: string;
1950
1889
  to: string;
1951
- severity: "error" | "info" | "warn";
1890
+ because?: string | undefined;
1952
1891
  exclude?: (string | {
1953
1892
  glob: string;
1954
1893
  reason?: string | undefined;
1955
1894
  })[] | undefined;
1956
- because?: string | undefined;
1957
1895
  }, {
1958
1896
  kind: "jsx.component.prefer";
1897
+ severity: "error" | "info" | "warn";
1959
1898
  from: string;
1960
1899
  to: string;
1961
- severity: "error" | "info" | "warn";
1900
+ because?: string | undefined;
1962
1901
  exclude?: (string | {
1963
1902
  glob: string;
1964
1903
  reason?: string | undefined;
1965
1904
  })[] | undefined;
1966
- because?: string | undefined;
1967
1905
  }>]>;
1968
1906
  declare const componentGovernanceRecordSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1969
1907
  kind: z.ZodLiteral<"capability">;
@@ -1977,28 +1915,28 @@ declare const componentGovernanceRecordSchema: z.ZodDiscriminatedUnion<"kind", [
1977
1915
  }>, z.ZodObject<{
1978
1916
  kind: z.ZodLiteral<"prop.value.avoid">;
1979
1917
  prop: z.ZodString;
1980
- value: z.ZodUnknown;
1918
+ value: z.ZodType<unknown, z.ZodTypeDef, unknown>;
1981
1919
  because: z.ZodString;
1982
1920
  suggest: z.ZodOptional<z.ZodString>;
1983
1921
  severity: z.ZodEnum<["error", "warn", "info"]>;
1984
1922
  }, "strip", z.ZodTypeAny, {
1985
1923
  kind: "prop.value.avoid";
1986
- severity: "error" | "info" | "warn";
1987
- because: string;
1988
1924
  prop: string;
1925
+ because: string;
1926
+ severity: "error" | "info" | "warn";
1989
1927
  value?: unknown;
1990
1928
  suggest?: string | undefined;
1991
1929
  }, {
1992
1930
  kind: "prop.value.avoid";
1993
- severity: "error" | "info" | "warn";
1994
- because: string;
1995
1931
  prop: string;
1932
+ because: string;
1933
+ severity: "error" | "info" | "warn";
1996
1934
  value?: unknown;
1997
1935
  suggest?: string | undefined;
1998
1936
  }>, z.ZodObject<{
1999
1937
  kind: z.ZodLiteral<"prop.value.forbid">;
2000
1938
  prop: z.ZodString;
2001
- value: z.ZodUnknown;
1939
+ value: z.ZodType<unknown, z.ZodTypeDef, unknown>;
2002
1940
  when: z.ZodOptional<z.ZodObject<{
2003
1941
  path: z.ZodOptional<z.ZodString>;
2004
1942
  }, "strip", z.ZodTypeAny, {
@@ -2008,7 +1946,7 @@ declare const componentGovernanceRecordSchema: z.ZodDiscriminatedUnion<"kind", [
2008
1946
  }>>;
2009
1947
  because: z.ZodString;
2010
1948
  fix: z.ZodOptional<z.ZodObject<{
2011
- replaceWith: z.ZodUnknown;
1949
+ replaceWith: z.ZodType<unknown, z.ZodTypeDef, unknown>;
2012
1950
  }, "strip", z.ZodTypeAny, {
2013
1951
  replaceWith?: unknown;
2014
1952
  }, {
@@ -2017,9 +1955,9 @@ declare const componentGovernanceRecordSchema: z.ZodDiscriminatedUnion<"kind", [
2017
1955
  severity: z.ZodEnum<["error", "warn", "info"]>;
2018
1956
  }, "strip", z.ZodTypeAny, {
2019
1957
  kind: "prop.value.forbid";
2020
- severity: "error" | "info" | "warn";
2021
- because: string;
2022
1958
  prop: string;
1959
+ because: string;
1960
+ severity: "error" | "info" | "warn";
2023
1961
  value?: unknown;
2024
1962
  when?: {
2025
1963
  path?: string | undefined;
@@ -2029,9 +1967,9 @@ declare const componentGovernanceRecordSchema: z.ZodDiscriminatedUnion<"kind", [
2029
1967
  } | undefined;
2030
1968
  }, {
2031
1969
  kind: "prop.value.forbid";
2032
- severity: "error" | "info" | "warn";
2033
- because: string;
2034
1970
  prop: string;
1971
+ because: string;
1972
+ severity: "error" | "info" | "warn";
2035
1973
  value?: unknown;
2036
1974
  when?: {
2037
1975
  path?: string | undefined;
@@ -2045,12 +1983,12 @@ declare const componentGovernanceRecordSchema: z.ZodDiscriminatedUnion<"kind", [
2045
1983
  severity: z.ZodEnum<["error", "warn", "info"]>;
2046
1984
  }, "strip", z.ZodTypeAny, {
2047
1985
  kind: "a11y.requireName";
2048
- severity: "error" | "info" | "warn";
2049
1986
  because: string;
1987
+ severity: "error" | "info" | "warn";
2050
1988
  }, {
2051
1989
  kind: "a11y.requireName";
2052
- severity: "error" | "info" | "warn";
2053
1990
  because: string;
1991
+ severity: "error" | "info" | "warn";
2054
1992
  }>]>;
2055
1993
  declare const componentGovernanceRecordsSchema: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2056
1994
  kind: z.ZodLiteral<"capability">;
@@ -2064,28 +2002,28 @@ declare const componentGovernanceRecordsSchema: z.ZodArray<z.ZodDiscriminatedUni
2064
2002
  }>, z.ZodObject<{
2065
2003
  kind: z.ZodLiteral<"prop.value.avoid">;
2066
2004
  prop: z.ZodString;
2067
- value: z.ZodUnknown;
2005
+ value: z.ZodType<unknown, z.ZodTypeDef, unknown>;
2068
2006
  because: z.ZodString;
2069
2007
  suggest: z.ZodOptional<z.ZodString>;
2070
2008
  severity: z.ZodEnum<["error", "warn", "info"]>;
2071
2009
  }, "strip", z.ZodTypeAny, {
2072
2010
  kind: "prop.value.avoid";
2073
- severity: "error" | "info" | "warn";
2074
- because: string;
2075
2011
  prop: string;
2012
+ because: string;
2013
+ severity: "error" | "info" | "warn";
2076
2014
  value?: unknown;
2077
2015
  suggest?: string | undefined;
2078
2016
  }, {
2079
2017
  kind: "prop.value.avoid";
2080
- severity: "error" | "info" | "warn";
2081
- because: string;
2082
2018
  prop: string;
2019
+ because: string;
2020
+ severity: "error" | "info" | "warn";
2083
2021
  value?: unknown;
2084
2022
  suggest?: string | undefined;
2085
2023
  }>, z.ZodObject<{
2086
2024
  kind: z.ZodLiteral<"prop.value.forbid">;
2087
2025
  prop: z.ZodString;
2088
- value: z.ZodUnknown;
2026
+ value: z.ZodType<unknown, z.ZodTypeDef, unknown>;
2089
2027
  when: z.ZodOptional<z.ZodObject<{
2090
2028
  path: z.ZodOptional<z.ZodString>;
2091
2029
  }, "strip", z.ZodTypeAny, {
@@ -2095,7 +2033,7 @@ declare const componentGovernanceRecordsSchema: z.ZodArray<z.ZodDiscriminatedUni
2095
2033
  }>>;
2096
2034
  because: z.ZodString;
2097
2035
  fix: z.ZodOptional<z.ZodObject<{
2098
- replaceWith: z.ZodUnknown;
2036
+ replaceWith: z.ZodType<unknown, z.ZodTypeDef, unknown>;
2099
2037
  }, "strip", z.ZodTypeAny, {
2100
2038
  replaceWith?: unknown;
2101
2039
  }, {
@@ -2104,9 +2042,9 @@ declare const componentGovernanceRecordsSchema: z.ZodArray<z.ZodDiscriminatedUni
2104
2042
  severity: z.ZodEnum<["error", "warn", "info"]>;
2105
2043
  }, "strip", z.ZodTypeAny, {
2106
2044
  kind: "prop.value.forbid";
2107
- severity: "error" | "info" | "warn";
2108
- because: string;
2109
2045
  prop: string;
2046
+ because: string;
2047
+ severity: "error" | "info" | "warn";
2110
2048
  value?: unknown;
2111
2049
  when?: {
2112
2050
  path?: string | undefined;
@@ -2116,9 +2054,9 @@ declare const componentGovernanceRecordsSchema: z.ZodArray<z.ZodDiscriminatedUni
2116
2054
  } | undefined;
2117
2055
  }, {
2118
2056
  kind: "prop.value.forbid";
2119
- severity: "error" | "info" | "warn";
2120
- because: string;
2121
2057
  prop: string;
2058
+ because: string;
2059
+ severity: "error" | "info" | "warn";
2122
2060
  value?: unknown;
2123
2061
  when?: {
2124
2062
  path?: string | undefined;
@@ -2132,13 +2070,15 @@ declare const componentGovernanceRecordsSchema: z.ZodArray<z.ZodDiscriminatedUni
2132
2070
  severity: z.ZodEnum<["error", "warn", "info"]>;
2133
2071
  }, "strip", z.ZodTypeAny, {
2134
2072
  kind: "a11y.requireName";
2135
- severity: "error" | "info" | "warn";
2136
2073
  because: string;
2074
+ severity: "error" | "info" | "warn";
2137
2075
  }, {
2138
2076
  kind: "a11y.requireName";
2139
- severity: "error" | "info" | "warn";
2140
2077
  because: string;
2078
+ severity: "error" | "info" | "warn";
2141
2079
  }>]>, "many">;
2080
+ /** Parse portable component policy records; malformed authority is unavailable, never empty. */
2081
+ declare function parseComponentGovernancePolicyJson(policyJson: string): ComponentGovernanceRecord[] | null;
2142
2082
  declare const componentPolicyRecordSchema: z.ZodObject<{
2143
2083
  rules: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2144
2084
  kind: z.ZodLiteral<"capability">;
@@ -2152,28 +2092,28 @@ declare const componentPolicyRecordSchema: z.ZodObject<{
2152
2092
  }>, z.ZodObject<{
2153
2093
  kind: z.ZodLiteral<"prop.value.avoid">;
2154
2094
  prop: z.ZodString;
2155
- value: z.ZodUnknown;
2095
+ value: z.ZodType<unknown, z.ZodTypeDef, unknown>;
2156
2096
  because: z.ZodString;
2157
2097
  suggest: z.ZodOptional<z.ZodString>;
2158
2098
  severity: z.ZodEnum<["error", "warn", "info"]>;
2159
2099
  }, "strip", z.ZodTypeAny, {
2160
2100
  kind: "prop.value.avoid";
2161
- severity: "error" | "info" | "warn";
2162
- because: string;
2163
2101
  prop: string;
2102
+ because: string;
2103
+ severity: "error" | "info" | "warn";
2164
2104
  value?: unknown;
2165
2105
  suggest?: string | undefined;
2166
2106
  }, {
2167
2107
  kind: "prop.value.avoid";
2168
- severity: "error" | "info" | "warn";
2169
- because: string;
2170
2108
  prop: string;
2109
+ because: string;
2110
+ severity: "error" | "info" | "warn";
2171
2111
  value?: unknown;
2172
2112
  suggest?: string | undefined;
2173
2113
  }>, z.ZodObject<{
2174
2114
  kind: z.ZodLiteral<"prop.value.forbid">;
2175
2115
  prop: z.ZodString;
2176
- value: z.ZodUnknown;
2116
+ value: z.ZodType<unknown, z.ZodTypeDef, unknown>;
2177
2117
  when: z.ZodOptional<z.ZodObject<{
2178
2118
  path: z.ZodOptional<z.ZodString>;
2179
2119
  }, "strip", z.ZodTypeAny, {
@@ -2183,7 +2123,7 @@ declare const componentPolicyRecordSchema: z.ZodObject<{
2183
2123
  }>>;
2184
2124
  because: z.ZodString;
2185
2125
  fix: z.ZodOptional<z.ZodObject<{
2186
- replaceWith: z.ZodUnknown;
2126
+ replaceWith: z.ZodType<unknown, z.ZodTypeDef, unknown>;
2187
2127
  }, "strip", z.ZodTypeAny, {
2188
2128
  replaceWith?: unknown;
2189
2129
  }, {
@@ -2192,9 +2132,9 @@ declare const componentPolicyRecordSchema: z.ZodObject<{
2192
2132
  severity: z.ZodEnum<["error", "warn", "info"]>;
2193
2133
  }, "strip", z.ZodTypeAny, {
2194
2134
  kind: "prop.value.forbid";
2195
- severity: "error" | "info" | "warn";
2196
- because: string;
2197
2135
  prop: string;
2136
+ because: string;
2137
+ severity: "error" | "info" | "warn";
2198
2138
  value?: unknown;
2199
2139
  when?: {
2200
2140
  path?: string | undefined;
@@ -2204,9 +2144,9 @@ declare const componentPolicyRecordSchema: z.ZodObject<{
2204
2144
  } | undefined;
2205
2145
  }, {
2206
2146
  kind: "prop.value.forbid";
2207
- severity: "error" | "info" | "warn";
2208
- because: string;
2209
2147
  prop: string;
2148
+ because: string;
2149
+ severity: "error" | "info" | "warn";
2210
2150
  value?: unknown;
2211
2151
  when?: {
2212
2152
  path?: string | undefined;
@@ -2220,12 +2160,12 @@ declare const componentPolicyRecordSchema: z.ZodObject<{
2220
2160
  severity: z.ZodEnum<["error", "warn", "info"]>;
2221
2161
  }, "strip", z.ZodTypeAny, {
2222
2162
  kind: "a11y.requireName";
2223
- severity: "error" | "info" | "warn";
2224
2163
  because: string;
2164
+ severity: "error" | "info" | "warn";
2225
2165
  }, {
2226
2166
  kind: "a11y.requireName";
2227
- severity: "error" | "info" | "warn";
2228
2167
  because: string;
2168
+ severity: "error" | "info" | "warn";
2229
2169
  }>]>, "many">;
2230
2170
  status: z.ZodOptional<z.ZodEnum<["active", "draft", "disabled"]>>;
2231
2171
  }, "strict", z.ZodTypeAny, {
@@ -2234,16 +2174,16 @@ declare const componentPolicyRecordSchema: z.ZodObject<{
2234
2174
  capability: string;
2235
2175
  } | {
2236
2176
  kind: "prop.value.avoid";
2237
- severity: "error" | "info" | "warn";
2238
- because: string;
2239
2177
  prop: string;
2178
+ because: string;
2179
+ severity: "error" | "info" | "warn";
2240
2180
  value?: unknown;
2241
2181
  suggest?: string | undefined;
2242
2182
  } | {
2243
2183
  kind: "prop.value.forbid";
2244
- severity: "error" | "info" | "warn";
2245
- because: string;
2246
2184
  prop: string;
2185
+ because: string;
2186
+ severity: "error" | "info" | "warn";
2247
2187
  value?: unknown;
2248
2188
  when?: {
2249
2189
  path?: string | undefined;
@@ -2253,8 +2193,8 @@ declare const componentPolicyRecordSchema: z.ZodObject<{
2253
2193
  } | undefined;
2254
2194
  } | {
2255
2195
  kind: "a11y.requireName";
2256
- severity: "error" | "info" | "warn";
2257
2196
  because: string;
2197
+ severity: "error" | "info" | "warn";
2258
2198
  })[];
2259
2199
  status?: "active" | "draft" | "disabled" | undefined;
2260
2200
  }, {
@@ -2262,17 +2202,17 @@ declare const componentPolicyRecordSchema: z.ZodObject<{
2262
2202
  kind: "capability";
2263
2203
  capability: string;
2264
2204
  } | {
2265
- kind: "prop.value.avoid";
2266
- severity: "error" | "info" | "warn";
2267
- because: string;
2205
+ kind: "prop.value.avoid";
2268
2206
  prop: string;
2207
+ because: string;
2208
+ severity: "error" | "info" | "warn";
2269
2209
  value?: unknown;
2270
2210
  suggest?: string | undefined;
2271
2211
  } | {
2272
2212
  kind: "prop.value.forbid";
2273
- severity: "error" | "info" | "warn";
2274
- because: string;
2275
2213
  prop: string;
2214
+ because: string;
2215
+ severity: "error" | "info" | "warn";
2276
2216
  value?: unknown;
2277
2217
  when?: {
2278
2218
  path?: string | undefined;
@@ -2282,8 +2222,8 @@ declare const componentPolicyRecordSchema: z.ZodObject<{
2282
2222
  } | undefined;
2283
2223
  } | {
2284
2224
  kind: "a11y.requireName";
2285
- severity: "error" | "info" | "warn";
2286
2225
  because: string;
2226
+ severity: "error" | "info" | "warn";
2287
2227
  })[];
2288
2228
  status?: "active" | "draft" | "disabled" | undefined;
2289
2229
  }>;
@@ -2301,9 +2241,9 @@ declare const componentPolicyOverrideSchema: z.ZodObject<{
2301
2241
  scope: z.ZodOptional<z.ZodEnum<["one", "all"]>>;
2302
2242
  }, "strict", z.ZodTypeAny, {
2303
2243
  path?: string | undefined;
2244
+ name?: string | undefined;
2304
2245
  importPath?: string | undefined;
2305
2246
  componentId?: string | undefined;
2306
- name?: string | undefined;
2307
2247
  componentKey?: string | undefined;
2308
2248
  publicRef?: string | undefined;
2309
2249
  sourcePath?: string | undefined;
@@ -2312,9 +2252,9 @@ declare const componentPolicyOverrideSchema: z.ZodObject<{
2312
2252
  scope?: "one" | "all" | undefined;
2313
2253
  }, {
2314
2254
  path?: string | undefined;
2255
+ name?: string | undefined;
2315
2256
  importPath?: string | undefined;
2316
2257
  componentId?: string | undefined;
2317
- name?: string | undefined;
2318
2258
  componentKey?: string | undefined;
2319
2259
  publicRef?: string | undefined;
2320
2260
  sourcePath?: string | undefined;
@@ -2334,28 +2274,28 @@ declare const componentPolicyOverrideSchema: z.ZodObject<{
2334
2274
  }>, z.ZodObject<{
2335
2275
  kind: z.ZodLiteral<"prop.value.avoid">;
2336
2276
  prop: z.ZodString;
2337
- value: z.ZodUnknown;
2277
+ value: z.ZodType<unknown, z.ZodTypeDef, unknown>;
2338
2278
  because: z.ZodString;
2339
2279
  suggest: z.ZodOptional<z.ZodString>;
2340
2280
  severity: z.ZodEnum<["error", "warn", "info"]>;
2341
2281
  }, "strip", z.ZodTypeAny, {
2342
2282
  kind: "prop.value.avoid";
2343
- severity: "error" | "info" | "warn";
2344
- because: string;
2345
2283
  prop: string;
2284
+ because: string;
2285
+ severity: "error" | "info" | "warn";
2346
2286
  value?: unknown;
2347
2287
  suggest?: string | undefined;
2348
2288
  }, {
2349
2289
  kind: "prop.value.avoid";
2350
- severity: "error" | "info" | "warn";
2351
- because: string;
2352
2290
  prop: string;
2291
+ because: string;
2292
+ severity: "error" | "info" | "warn";
2353
2293
  value?: unknown;
2354
2294
  suggest?: string | undefined;
2355
2295
  }>, z.ZodObject<{
2356
2296
  kind: z.ZodLiteral<"prop.value.forbid">;
2357
2297
  prop: z.ZodString;
2358
- value: z.ZodUnknown;
2298
+ value: z.ZodType<unknown, z.ZodTypeDef, unknown>;
2359
2299
  when: z.ZodOptional<z.ZodObject<{
2360
2300
  path: z.ZodOptional<z.ZodString>;
2361
2301
  }, "strip", z.ZodTypeAny, {
@@ -2365,7 +2305,7 @@ declare const componentPolicyOverrideSchema: z.ZodObject<{
2365
2305
  }>>;
2366
2306
  because: z.ZodString;
2367
2307
  fix: z.ZodOptional<z.ZodObject<{
2368
- replaceWith: z.ZodUnknown;
2308
+ replaceWith: z.ZodType<unknown, z.ZodTypeDef, unknown>;
2369
2309
  }, "strip", z.ZodTypeAny, {
2370
2310
  replaceWith?: unknown;
2371
2311
  }, {
@@ -2374,9 +2314,9 @@ declare const componentPolicyOverrideSchema: z.ZodObject<{
2374
2314
  severity: z.ZodEnum<["error", "warn", "info"]>;
2375
2315
  }, "strip", z.ZodTypeAny, {
2376
2316
  kind: "prop.value.forbid";
2377
- severity: "error" | "info" | "warn";
2378
- because: string;
2379
2317
  prop: string;
2318
+ because: string;
2319
+ severity: "error" | "info" | "warn";
2380
2320
  value?: unknown;
2381
2321
  when?: {
2382
2322
  path?: string | undefined;
@@ -2386,9 +2326,9 @@ declare const componentPolicyOverrideSchema: z.ZodObject<{
2386
2326
  } | undefined;
2387
2327
  }, {
2388
2328
  kind: "prop.value.forbid";
2389
- severity: "error" | "info" | "warn";
2390
- because: string;
2391
2329
  prop: string;
2330
+ because: string;
2331
+ severity: "error" | "info" | "warn";
2392
2332
  value?: unknown;
2393
2333
  when?: {
2394
2334
  path?: string | undefined;
@@ -2402,12 +2342,12 @@ declare const componentPolicyOverrideSchema: z.ZodObject<{
2402
2342
  severity: z.ZodEnum<["error", "warn", "info"]>;
2403
2343
  }, "strip", z.ZodTypeAny, {
2404
2344
  kind: "a11y.requireName";
2405
- severity: "error" | "info" | "warn";
2406
2345
  because: string;
2346
+ severity: "error" | "info" | "warn";
2407
2347
  }, {
2408
2348
  kind: "a11y.requireName";
2409
- severity: "error" | "info" | "warn";
2410
2349
  because: string;
2350
+ severity: "error" | "info" | "warn";
2411
2351
  }>]>, "many">;
2412
2352
  status: z.ZodOptional<z.ZodEnum<["active", "draft", "disabled"]>>;
2413
2353
  }, "strict", z.ZodTypeAny, {
@@ -2416,16 +2356,16 @@ declare const componentPolicyOverrideSchema: z.ZodObject<{
2416
2356
  capability: string;
2417
2357
  } | {
2418
2358
  kind: "prop.value.avoid";
2419
- severity: "error" | "info" | "warn";
2420
- because: string;
2421
2359
  prop: string;
2360
+ because: string;
2361
+ severity: "error" | "info" | "warn";
2422
2362
  value?: unknown;
2423
2363
  suggest?: string | undefined;
2424
2364
  } | {
2425
2365
  kind: "prop.value.forbid";
2426
- severity: "error" | "info" | "warn";
2427
- because: string;
2428
2366
  prop: string;
2367
+ because: string;
2368
+ severity: "error" | "info" | "warn";
2429
2369
  value?: unknown;
2430
2370
  when?: {
2431
2371
  path?: string | undefined;
@@ -2435,14 +2375,14 @@ declare const componentPolicyOverrideSchema: z.ZodObject<{
2435
2375
  } | undefined;
2436
2376
  } | {
2437
2377
  kind: "a11y.requireName";
2438
- severity: "error" | "info" | "warn";
2439
2378
  because: string;
2379
+ severity: "error" | "info" | "warn";
2440
2380
  })[];
2441
2381
  match: {
2442
2382
  path?: string | undefined;
2383
+ name?: string | undefined;
2443
2384
  importPath?: string | undefined;
2444
2385
  componentId?: string | undefined;
2445
- name?: string | undefined;
2446
2386
  componentKey?: string | undefined;
2447
2387
  publicRef?: string | undefined;
2448
2388
  sourcePath?: string | undefined;
@@ -2457,16 +2397,16 @@ declare const componentPolicyOverrideSchema: z.ZodObject<{
2457
2397
  capability: string;
2458
2398
  } | {
2459
2399
  kind: "prop.value.avoid";
2460
- severity: "error" | "info" | "warn";
2461
- because: string;
2462
2400
  prop: string;
2401
+ because: string;
2402
+ severity: "error" | "info" | "warn";
2463
2403
  value?: unknown;
2464
2404
  suggest?: string | undefined;
2465
2405
  } | {
2466
2406
  kind: "prop.value.forbid";
2467
- severity: "error" | "info" | "warn";
2468
- because: string;
2469
2407
  prop: string;
2408
+ because: string;
2409
+ severity: "error" | "info" | "warn";
2470
2410
  value?: unknown;
2471
2411
  when?: {
2472
2412
  path?: string | undefined;
@@ -2476,14 +2416,14 @@ declare const componentPolicyOverrideSchema: z.ZodObject<{
2476
2416
  } | undefined;
2477
2417
  } | {
2478
2418
  kind: "a11y.requireName";
2479
- severity: "error" | "info" | "warn";
2480
2419
  because: string;
2420
+ severity: "error" | "info" | "warn";
2481
2421
  })[];
2482
2422
  match: {
2483
2423
  path?: string | undefined;
2424
+ name?: string | undefined;
2484
2425
  importPath?: string | undefined;
2485
2426
  componentId?: string | undefined;
2486
- name?: string | undefined;
2487
2427
  componentKey?: string | undefined;
2488
2428
  publicRef?: string | undefined;
2489
2429
  sourcePath?: string | undefined;
@@ -2568,14 +2508,14 @@ declare const canonicalSourceSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObjec
2568
2508
  include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2569
2509
  exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2570
2510
  }, "strip", z.ZodTypeAny, {
2571
- specifier: string;
2572
2511
  kind: "npm";
2512
+ specifier: string;
2573
2513
  exclude?: string[] | undefined;
2574
2514
  implementationPath?: string | undefined;
2575
2515
  include?: string[] | undefined;
2576
2516
  }, {
2577
- specifier: string;
2578
2517
  kind: "npm";
2518
+ specifier: string;
2579
2519
  exclude?: string[] | undefined;
2580
2520
  implementationPath?: string | undefined;
2581
2521
  include?: string[] | undefined;
@@ -2609,8 +2549,8 @@ declare const canonicalSourceSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObjec
2609
2549
  registryId: string;
2610
2550
  receiptPath: string;
2611
2551
  installPath: string;
2612
- importPath?: string | undefined;
2613
2552
  severity?: "error" | "info" | "warn" | undefined;
2553
+ importPath?: string | undefined;
2614
2554
  exclude?: string[] | undefined;
2615
2555
  include?: string[] | undefined;
2616
2556
  registryHash?: string | undefined;
@@ -2618,8 +2558,8 @@ declare const canonicalSourceSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObjec
2618
2558
  kind: "registry";
2619
2559
  registryId: string;
2620
2560
  installPath: string;
2621
- importPath?: string | undefined;
2622
2561
  severity?: "error" | "info" | "warn" | undefined;
2562
+ importPath?: string | undefined;
2623
2563
  exclude?: string[] | undefined;
2624
2564
  include?: string[] | undefined;
2625
2565
  registryHash?: string | undefined;
@@ -2645,14 +2585,14 @@ declare const governanceConfigSchema: z.ZodObject<{
2645
2585
  include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2646
2586
  exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2647
2587
  }, "strip", z.ZodTypeAny, {
2648
- specifier: string;
2649
2588
  kind: "npm";
2589
+ specifier: string;
2650
2590
  exclude?: string[] | undefined;
2651
2591
  implementationPath?: string | undefined;
2652
2592
  include?: string[] | undefined;
2653
2593
  }, {
2654
- specifier: string;
2655
2594
  kind: "npm";
2595
+ specifier: string;
2656
2596
  exclude?: string[] | undefined;
2657
2597
  implementationPath?: string | undefined;
2658
2598
  include?: string[] | undefined;
@@ -2686,8 +2626,8 @@ declare const governanceConfigSchema: z.ZodObject<{
2686
2626
  registryId: string;
2687
2627
  receiptPath: string;
2688
2628
  installPath: string;
2689
- importPath?: string | undefined;
2690
2629
  severity?: "error" | "info" | "warn" | undefined;
2630
+ importPath?: string | undefined;
2691
2631
  exclude?: string[] | undefined;
2692
2632
  include?: string[] | undefined;
2693
2633
  registryHash?: string | undefined;
@@ -2695,8 +2635,8 @@ declare const governanceConfigSchema: z.ZodObject<{
2695
2635
  kind: "registry";
2696
2636
  registryId: string;
2697
2637
  installPath: string;
2698
- importPath?: string | undefined;
2699
2638
  severity?: "error" | "info" | "warn" | undefined;
2639
+ importPath?: string | undefined;
2700
2640
  exclude?: string[] | undefined;
2701
2641
  include?: string[] | undefined;
2702
2642
  registryHash?: string | undefined;
@@ -3056,26 +2996,26 @@ declare const governanceConfigSchema: z.ZodObject<{
3056
2996
  }>]>, "many">>;
3057
2997
  }, "strip", z.ZodTypeAny, {
3058
2998
  kind: "jsx.importPath.prefer";
2999
+ severity: "error" | "info" | "warn";
3059
3000
  from: string;
3060
3001
  to: string;
3061
- severity: "error" | "info" | "warn";
3002
+ because?: string | undefined;
3062
3003
  exclude?: (string | {
3063
3004
  glob: string;
3064
3005
  reason?: string | undefined;
3065
3006
  })[] | undefined;
3066
3007
  imported?: string | undefined;
3067
- because?: string | undefined;
3068
3008
  }, {
3069
3009
  kind: "jsx.importPath.prefer";
3010
+ severity: "error" | "info" | "warn";
3070
3011
  from: string;
3071
3012
  to: string;
3072
- severity: "error" | "info" | "warn";
3013
+ because?: string | undefined;
3073
3014
  exclude?: (string | {
3074
3015
  glob: string;
3075
3016
  reason?: string | undefined;
3076
3017
  })[] | undefined;
3077
3018
  imported?: string | undefined;
3078
- because?: string | undefined;
3079
3019
  }>, z.ZodObject<{
3080
3020
  kind: z.ZodLiteral<"jsx.component.prefer">;
3081
3021
  from: z.ZodString;
@@ -3094,24 +3034,24 @@ declare const governanceConfigSchema: z.ZodObject<{
3094
3034
  }>]>, "many">>;
3095
3035
  }, "strip", z.ZodTypeAny, {
3096
3036
  kind: "jsx.component.prefer";
3037
+ severity: "error" | "info" | "warn";
3097
3038
  from: string;
3098
3039
  to: string;
3099
- severity: "error" | "info" | "warn";
3040
+ because?: string | undefined;
3100
3041
  exclude?: (string | {
3101
3042
  glob: string;
3102
3043
  reason?: string | undefined;
3103
3044
  })[] | undefined;
3104
- because?: string | undefined;
3105
3045
  }, {
3106
3046
  kind: "jsx.component.prefer";
3047
+ severity: "error" | "info" | "warn";
3107
3048
  from: string;
3108
3049
  to: string;
3109
- severity: "error" | "info" | "warn";
3050
+ because?: string | undefined;
3110
3051
  exclude?: (string | {
3111
3052
  glob: string;
3112
3053
  reason?: string | undefined;
3113
3054
  })[] | undefined;
3114
- because?: string | undefined;
3115
3055
  }>]>, "many">>;
3116
3056
  tailwind: z.ZodOptional<z.ZodObject<{
3117
3057
  palette: z.ZodOptional<z.ZodObject<{
@@ -3167,28 +3107,28 @@ declare const governanceConfigSchema: z.ZodObject<{
3167
3107
  }>, z.ZodObject<{
3168
3108
  kind: z.ZodLiteral<"prop.value.avoid">;
3169
3109
  prop: z.ZodString;
3170
- value: z.ZodUnknown;
3110
+ value: z.ZodType<unknown, z.ZodTypeDef, unknown>;
3171
3111
  because: z.ZodString;
3172
3112
  suggest: z.ZodOptional<z.ZodString>;
3173
3113
  severity: z.ZodEnum<["error", "warn", "info"]>;
3174
3114
  }, "strip", z.ZodTypeAny, {
3175
3115
  kind: "prop.value.avoid";
3176
- severity: "error" | "info" | "warn";
3177
- because: string;
3178
3116
  prop: string;
3117
+ because: string;
3118
+ severity: "error" | "info" | "warn";
3179
3119
  value?: unknown;
3180
3120
  suggest?: string | undefined;
3181
3121
  }, {
3182
3122
  kind: "prop.value.avoid";
3183
- severity: "error" | "info" | "warn";
3184
- because: string;
3185
3123
  prop: string;
3124
+ because: string;
3125
+ severity: "error" | "info" | "warn";
3186
3126
  value?: unknown;
3187
3127
  suggest?: string | undefined;
3188
3128
  }>, z.ZodObject<{
3189
3129
  kind: z.ZodLiteral<"prop.value.forbid">;
3190
3130
  prop: z.ZodString;
3191
- value: z.ZodUnknown;
3131
+ value: z.ZodType<unknown, z.ZodTypeDef, unknown>;
3192
3132
  when: z.ZodOptional<z.ZodObject<{
3193
3133
  path: z.ZodOptional<z.ZodString>;
3194
3134
  }, "strip", z.ZodTypeAny, {
@@ -3198,7 +3138,7 @@ declare const governanceConfigSchema: z.ZodObject<{
3198
3138
  }>>;
3199
3139
  because: z.ZodString;
3200
3140
  fix: z.ZodOptional<z.ZodObject<{
3201
- replaceWith: z.ZodUnknown;
3141
+ replaceWith: z.ZodType<unknown, z.ZodTypeDef, unknown>;
3202
3142
  }, "strip", z.ZodTypeAny, {
3203
3143
  replaceWith?: unknown;
3204
3144
  }, {
@@ -3207,9 +3147,9 @@ declare const governanceConfigSchema: z.ZodObject<{
3207
3147
  severity: z.ZodEnum<["error", "warn", "info"]>;
3208
3148
  }, "strip", z.ZodTypeAny, {
3209
3149
  kind: "prop.value.forbid";
3210
- severity: "error" | "info" | "warn";
3211
- because: string;
3212
3150
  prop: string;
3151
+ because: string;
3152
+ severity: "error" | "info" | "warn";
3213
3153
  value?: unknown;
3214
3154
  when?: {
3215
3155
  path?: string | undefined;
@@ -3219,9 +3159,9 @@ declare const governanceConfigSchema: z.ZodObject<{
3219
3159
  } | undefined;
3220
3160
  }, {
3221
3161
  kind: "prop.value.forbid";
3222
- severity: "error" | "info" | "warn";
3223
- because: string;
3224
3162
  prop: string;
3163
+ because: string;
3164
+ severity: "error" | "info" | "warn";
3225
3165
  value?: unknown;
3226
3166
  when?: {
3227
3167
  path?: string | undefined;
@@ -3235,12 +3175,12 @@ declare const governanceConfigSchema: z.ZodObject<{
3235
3175
  severity: z.ZodEnum<["error", "warn", "info"]>;
3236
3176
  }, "strip", z.ZodTypeAny, {
3237
3177
  kind: "a11y.requireName";
3238
- severity: "error" | "info" | "warn";
3239
3178
  because: string;
3179
+ severity: "error" | "info" | "warn";
3240
3180
  }, {
3241
3181
  kind: "a11y.requireName";
3242
- severity: "error" | "info" | "warn";
3243
3182
  because: string;
3183
+ severity: "error" | "info" | "warn";
3244
3184
  }>]>, "many">;
3245
3185
  status: z.ZodOptional<z.ZodEnum<["active", "draft", "disabled"]>>;
3246
3186
  }, "strict", z.ZodTypeAny, {
@@ -3249,16 +3189,16 @@ declare const governanceConfigSchema: z.ZodObject<{
3249
3189
  capability: string;
3250
3190
  } | {
3251
3191
  kind: "prop.value.avoid";
3252
- severity: "error" | "info" | "warn";
3253
- because: string;
3254
3192
  prop: string;
3193
+ because: string;
3194
+ severity: "error" | "info" | "warn";
3255
3195
  value?: unknown;
3256
3196
  suggest?: string | undefined;
3257
3197
  } | {
3258
3198
  kind: "prop.value.forbid";
3259
- severity: "error" | "info" | "warn";
3260
- because: string;
3261
3199
  prop: string;
3200
+ because: string;
3201
+ severity: "error" | "info" | "warn";
3262
3202
  value?: unknown;
3263
3203
  when?: {
3264
3204
  path?: string | undefined;
@@ -3268,8 +3208,8 @@ declare const governanceConfigSchema: z.ZodObject<{
3268
3208
  } | undefined;
3269
3209
  } | {
3270
3210
  kind: "a11y.requireName";
3271
- severity: "error" | "info" | "warn";
3272
3211
  because: string;
3212
+ severity: "error" | "info" | "warn";
3273
3213
  })[];
3274
3214
  status?: "active" | "draft" | "disabled" | undefined;
3275
3215
  }, {
@@ -3278,16 +3218,16 @@ declare const governanceConfigSchema: z.ZodObject<{
3278
3218
  capability: string;
3279
3219
  } | {
3280
3220
  kind: "prop.value.avoid";
3281
- severity: "error" | "info" | "warn";
3282
- because: string;
3283
3221
  prop: string;
3222
+ because: string;
3223
+ severity: "error" | "info" | "warn";
3284
3224
  value?: unknown;
3285
3225
  suggest?: string | undefined;
3286
3226
  } | {
3287
3227
  kind: "prop.value.forbid";
3288
- severity: "error" | "info" | "warn";
3289
- because: string;
3290
3228
  prop: string;
3229
+ because: string;
3230
+ severity: "error" | "info" | "warn";
3291
3231
  value?: unknown;
3292
3232
  when?: {
3293
3233
  path?: string | undefined;
@@ -3297,8 +3237,8 @@ declare const governanceConfigSchema: z.ZodObject<{
3297
3237
  } | undefined;
3298
3238
  } | {
3299
3239
  kind: "a11y.requireName";
3300
- severity: "error" | "info" | "warn";
3301
3240
  because: string;
3241
+ severity: "error" | "info" | "warn";
3302
3242
  })[];
3303
3243
  status?: "active" | "draft" | "disabled" | undefined;
3304
3244
  }>>>;
@@ -3316,9 +3256,9 @@ declare const governanceConfigSchema: z.ZodObject<{
3316
3256
  scope: z.ZodOptional<z.ZodEnum<["one", "all"]>>;
3317
3257
  }, "strict", z.ZodTypeAny, {
3318
3258
  path?: string | undefined;
3259
+ name?: string | undefined;
3319
3260
  importPath?: string | undefined;
3320
3261
  componentId?: string | undefined;
3321
- name?: string | undefined;
3322
3262
  componentKey?: string | undefined;
3323
3263
  publicRef?: string | undefined;
3324
3264
  sourcePath?: string | undefined;
@@ -3327,9 +3267,9 @@ declare const governanceConfigSchema: z.ZodObject<{
3327
3267
  scope?: "one" | "all" | undefined;
3328
3268
  }, {
3329
3269
  path?: string | undefined;
3270
+ name?: string | undefined;
3330
3271
  importPath?: string | undefined;
3331
3272
  componentId?: string | undefined;
3332
- name?: string | undefined;
3333
3273
  componentKey?: string | undefined;
3334
3274
  publicRef?: string | undefined;
3335
3275
  sourcePath?: string | undefined;
@@ -3349,28 +3289,28 @@ declare const governanceConfigSchema: z.ZodObject<{
3349
3289
  }>, z.ZodObject<{
3350
3290
  kind: z.ZodLiteral<"prop.value.avoid">;
3351
3291
  prop: z.ZodString;
3352
- value: z.ZodUnknown;
3292
+ value: z.ZodType<unknown, z.ZodTypeDef, unknown>;
3353
3293
  because: z.ZodString;
3354
3294
  suggest: z.ZodOptional<z.ZodString>;
3355
3295
  severity: z.ZodEnum<["error", "warn", "info"]>;
3356
3296
  }, "strip", z.ZodTypeAny, {
3357
3297
  kind: "prop.value.avoid";
3358
- severity: "error" | "info" | "warn";
3359
- because: string;
3360
3298
  prop: string;
3299
+ because: string;
3300
+ severity: "error" | "info" | "warn";
3361
3301
  value?: unknown;
3362
3302
  suggest?: string | undefined;
3363
3303
  }, {
3364
3304
  kind: "prop.value.avoid";
3365
- severity: "error" | "info" | "warn";
3366
- because: string;
3367
3305
  prop: string;
3306
+ because: string;
3307
+ severity: "error" | "info" | "warn";
3368
3308
  value?: unknown;
3369
3309
  suggest?: string | undefined;
3370
3310
  }>, z.ZodObject<{
3371
3311
  kind: z.ZodLiteral<"prop.value.forbid">;
3372
3312
  prop: z.ZodString;
3373
- value: z.ZodUnknown;
3313
+ value: z.ZodType<unknown, z.ZodTypeDef, unknown>;
3374
3314
  when: z.ZodOptional<z.ZodObject<{
3375
3315
  path: z.ZodOptional<z.ZodString>;
3376
3316
  }, "strip", z.ZodTypeAny, {
@@ -3380,7 +3320,7 @@ declare const governanceConfigSchema: z.ZodObject<{
3380
3320
  }>>;
3381
3321
  because: z.ZodString;
3382
3322
  fix: z.ZodOptional<z.ZodObject<{
3383
- replaceWith: z.ZodUnknown;
3323
+ replaceWith: z.ZodType<unknown, z.ZodTypeDef, unknown>;
3384
3324
  }, "strip", z.ZodTypeAny, {
3385
3325
  replaceWith?: unknown;
3386
3326
  }, {
@@ -3389,9 +3329,9 @@ declare const governanceConfigSchema: z.ZodObject<{
3389
3329
  severity: z.ZodEnum<["error", "warn", "info"]>;
3390
3330
  }, "strip", z.ZodTypeAny, {
3391
3331
  kind: "prop.value.forbid";
3392
- severity: "error" | "info" | "warn";
3393
- because: string;
3394
3332
  prop: string;
3333
+ because: string;
3334
+ severity: "error" | "info" | "warn";
3395
3335
  value?: unknown;
3396
3336
  when?: {
3397
3337
  path?: string | undefined;
@@ -3401,9 +3341,9 @@ declare const governanceConfigSchema: z.ZodObject<{
3401
3341
  } | undefined;
3402
3342
  }, {
3403
3343
  kind: "prop.value.forbid";
3404
- severity: "error" | "info" | "warn";
3405
- because: string;
3406
3344
  prop: string;
3345
+ because: string;
3346
+ severity: "error" | "info" | "warn";
3407
3347
  value?: unknown;
3408
3348
  when?: {
3409
3349
  path?: string | undefined;
@@ -3417,12 +3357,12 @@ declare const governanceConfigSchema: z.ZodObject<{
3417
3357
  severity: z.ZodEnum<["error", "warn", "info"]>;
3418
3358
  }, "strip", z.ZodTypeAny, {
3419
3359
  kind: "a11y.requireName";
3420
- severity: "error" | "info" | "warn";
3421
3360
  because: string;
3361
+ severity: "error" | "info" | "warn";
3422
3362
  }, {
3423
3363
  kind: "a11y.requireName";
3424
- severity: "error" | "info" | "warn";
3425
3364
  because: string;
3365
+ severity: "error" | "info" | "warn";
3426
3366
  }>]>, "many">;
3427
3367
  status: z.ZodOptional<z.ZodEnum<["active", "draft", "disabled"]>>;
3428
3368
  }, "strict", z.ZodTypeAny, {
@@ -3431,16 +3371,16 @@ declare const governanceConfigSchema: z.ZodObject<{
3431
3371
  capability: string;
3432
3372
  } | {
3433
3373
  kind: "prop.value.avoid";
3434
- severity: "error" | "info" | "warn";
3435
- because: string;
3436
3374
  prop: string;
3375
+ because: string;
3376
+ severity: "error" | "info" | "warn";
3437
3377
  value?: unknown;
3438
3378
  suggest?: string | undefined;
3439
3379
  } | {
3440
3380
  kind: "prop.value.forbid";
3441
- severity: "error" | "info" | "warn";
3442
- because: string;
3443
3381
  prop: string;
3382
+ because: string;
3383
+ severity: "error" | "info" | "warn";
3444
3384
  value?: unknown;
3445
3385
  when?: {
3446
3386
  path?: string | undefined;
@@ -3450,14 +3390,14 @@ declare const governanceConfigSchema: z.ZodObject<{
3450
3390
  } | undefined;
3451
3391
  } | {
3452
3392
  kind: "a11y.requireName";
3453
- severity: "error" | "info" | "warn";
3454
3393
  because: string;
3394
+ severity: "error" | "info" | "warn";
3455
3395
  })[];
3456
3396
  match: {
3457
3397
  path?: string | undefined;
3398
+ name?: string | undefined;
3458
3399
  importPath?: string | undefined;
3459
3400
  componentId?: string | undefined;
3460
- name?: string | undefined;
3461
3401
  componentKey?: string | undefined;
3462
3402
  publicRef?: string | undefined;
3463
3403
  sourcePath?: string | undefined;
@@ -3472,16 +3412,16 @@ declare const governanceConfigSchema: z.ZodObject<{
3472
3412
  capability: string;
3473
3413
  } | {
3474
3414
  kind: "prop.value.avoid";
3475
- severity: "error" | "info" | "warn";
3476
- because: string;
3477
3415
  prop: string;
3416
+ because: string;
3417
+ severity: "error" | "info" | "warn";
3478
3418
  value?: unknown;
3479
3419
  suggest?: string | undefined;
3480
3420
  } | {
3481
3421
  kind: "prop.value.forbid";
3482
- severity: "error" | "info" | "warn";
3483
- because: string;
3484
3422
  prop: string;
3423
+ because: string;
3424
+ severity: "error" | "info" | "warn";
3485
3425
  value?: unknown;
3486
3426
  when?: {
3487
3427
  path?: string | undefined;
@@ -3491,14 +3431,14 @@ declare const governanceConfigSchema: z.ZodObject<{
3491
3431
  } | undefined;
3492
3432
  } | {
3493
3433
  kind: "a11y.requireName";
3494
- severity: "error" | "info" | "warn";
3495
3434
  because: string;
3435
+ severity: "error" | "info" | "warn";
3496
3436
  })[];
3497
3437
  match: {
3498
3438
  path?: string | undefined;
3439
+ name?: string | undefined;
3499
3440
  importPath?: string | undefined;
3500
3441
  componentId?: string | undefined;
3501
- name?: string | undefined;
3502
3442
  componentKey?: string | undefined;
3503
3443
  publicRef?: string | undefined;
3504
3444
  sourcePath?: string | undefined;
@@ -3528,16 +3468,16 @@ declare const governanceConfigSchema: z.ZodObject<{
3528
3468
  capability: string;
3529
3469
  } | {
3530
3470
  kind: "prop.value.avoid";
3531
- severity: "error" | "info" | "warn";
3532
- because: string;
3533
3471
  prop: string;
3472
+ because: string;
3473
+ severity: "error" | "info" | "warn";
3534
3474
  value?: unknown;
3535
3475
  suggest?: string | undefined;
3536
3476
  } | {
3537
3477
  kind: "prop.value.forbid";
3538
- severity: "error" | "info" | "warn";
3539
- because: string;
3540
3478
  prop: string;
3479
+ because: string;
3480
+ severity: "error" | "info" | "warn";
3541
3481
  value?: unknown;
3542
3482
  when?: {
3543
3483
  path?: string | undefined;
@@ -3547,8 +3487,8 @@ declare const governanceConfigSchema: z.ZodObject<{
3547
3487
  } | undefined;
3548
3488
  } | {
3549
3489
  kind: "a11y.requireName";
3550
- severity: "error" | "info" | "warn";
3551
3490
  because: string;
3491
+ severity: "error" | "info" | "warn";
3552
3492
  })[];
3553
3493
  status?: "active" | "draft" | "disabled" | undefined;
3554
3494
  }> | undefined;
@@ -3622,25 +3562,25 @@ declare const governanceConfigSchema: z.ZodObject<{
3622
3562
  })[] | undefined;
3623
3563
  } | {
3624
3564
  kind: "jsx.importPath.prefer";
3565
+ severity: "error" | "info" | "warn";
3625
3566
  from: string;
3626
3567
  to: string;
3627
- severity: "error" | "info" | "warn";
3568
+ because?: string | undefined;
3628
3569
  exclude?: (string | {
3629
3570
  glob: string;
3630
3571
  reason?: string | undefined;
3631
3572
  })[] | undefined;
3632
3573
  imported?: string | undefined;
3633
- because?: string | undefined;
3634
3574
  } | {
3635
3575
  kind: "jsx.component.prefer";
3576
+ severity: "error" | "info" | "warn";
3636
3577
  from: string;
3637
3578
  to: string;
3638
- severity: "error" | "info" | "warn";
3579
+ because?: string | undefined;
3639
3580
  exclude?: (string | {
3640
3581
  glob: string;
3641
3582
  reason?: string | undefined;
3642
3583
  })[] | undefined;
3643
- because?: string | undefined;
3644
3584
  })[] | undefined;
3645
3585
  tailwind?: z.objectOutputType<{
3646
3586
  palette: z.ZodOptional<z.ZodObject<{
@@ -3660,16 +3600,16 @@ declare const governanceConfigSchema: z.ZodObject<{
3660
3600
  capability: string;
3661
3601
  } | {
3662
3602
  kind: "prop.value.avoid";
3663
- severity: "error" | "info" | "warn";
3664
- because: string;
3665
3603
  prop: string;
3604
+ because: string;
3605
+ severity: "error" | "info" | "warn";
3666
3606
  value?: unknown;
3667
3607
  suggest?: string | undefined;
3668
3608
  } | {
3669
3609
  kind: "prop.value.forbid";
3670
- severity: "error" | "info" | "warn";
3671
- because: string;
3672
3610
  prop: string;
3611
+ because: string;
3612
+ severity: "error" | "info" | "warn";
3673
3613
  value?: unknown;
3674
3614
  when?: {
3675
3615
  path?: string | undefined;
@@ -3679,14 +3619,14 @@ declare const governanceConfigSchema: z.ZodObject<{
3679
3619
  } | undefined;
3680
3620
  } | {
3681
3621
  kind: "a11y.requireName";
3682
- severity: "error" | "info" | "warn";
3683
3622
  because: string;
3623
+ severity: "error" | "info" | "warn";
3684
3624
  })[];
3685
3625
  match: {
3686
3626
  path?: string | undefined;
3627
+ name?: string | undefined;
3687
3628
  importPath?: string | undefined;
3688
3629
  componentId?: string | undefined;
3689
- name?: string | undefined;
3690
3630
  componentKey?: string | undefined;
3691
3631
  publicRef?: string | undefined;
3692
3632
  sourcePath?: string | undefined;
@@ -3703,8 +3643,8 @@ declare const governanceConfigSchema: z.ZodObject<{
3703
3643
  audit?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
3704
3644
  runners?: Record<string, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">> | undefined;
3705
3645
  canonicalSources?: ({
3706
- specifier: string;
3707
3646
  kind: "npm";
3647
+ specifier: string;
3708
3648
  exclude?: string[] | undefined;
3709
3649
  implementationPath?: string | undefined;
3710
3650
  include?: string[] | undefined;
@@ -3718,8 +3658,8 @@ declare const governanceConfigSchema: z.ZodObject<{
3718
3658
  registryId: string;
3719
3659
  receiptPath: string;
3720
3660
  installPath: string;
3721
- importPath?: string | undefined;
3722
3661
  severity?: "error" | "info" | "warn" | undefined;
3662
+ importPath?: string | undefined;
3723
3663
  exclude?: string[] | undefined;
3724
3664
  include?: string[] | undefined;
3725
3665
  registryHash?: string | undefined;
@@ -3756,16 +3696,16 @@ declare const governanceConfigSchema: z.ZodObject<{
3756
3696
  capability: string;
3757
3697
  } | {
3758
3698
  kind: "prop.value.avoid";
3759
- severity: "error" | "info" | "warn";
3760
- because: string;
3761
3699
  prop: string;
3700
+ because: string;
3701
+ severity: "error" | "info" | "warn";
3762
3702
  value?: unknown;
3763
3703
  suggest?: string | undefined;
3764
3704
  } | {
3765
3705
  kind: "prop.value.forbid";
3766
- severity: "error" | "info" | "warn";
3767
- because: string;
3768
3706
  prop: string;
3707
+ because: string;
3708
+ severity: "error" | "info" | "warn";
3769
3709
  value?: unknown;
3770
3710
  when?: {
3771
3711
  path?: string | undefined;
@@ -3775,8 +3715,8 @@ declare const governanceConfigSchema: z.ZodObject<{
3775
3715
  } | undefined;
3776
3716
  } | {
3777
3717
  kind: "a11y.requireName";
3778
- severity: "error" | "info" | "warn";
3779
3718
  because: string;
3719
+ severity: "error" | "info" | "warn";
3780
3720
  })[];
3781
3721
  status?: "active" | "draft" | "disabled" | undefined;
3782
3722
  }> | undefined;
@@ -3850,25 +3790,25 @@ declare const governanceConfigSchema: z.ZodObject<{
3850
3790
  })[] | undefined;
3851
3791
  } | {
3852
3792
  kind: "jsx.importPath.prefer";
3793
+ severity: "error" | "info" | "warn";
3853
3794
  from: string;
3854
3795
  to: string;
3855
- severity: "error" | "info" | "warn";
3796
+ because?: string | undefined;
3856
3797
  exclude?: (string | {
3857
3798
  glob: string;
3858
3799
  reason?: string | undefined;
3859
3800
  })[] | undefined;
3860
3801
  imported?: string | undefined;
3861
- because?: string | undefined;
3862
3802
  } | {
3863
3803
  kind: "jsx.component.prefer";
3804
+ severity: "error" | "info" | "warn";
3864
3805
  from: string;
3865
3806
  to: string;
3866
- severity: "error" | "info" | "warn";
3807
+ because?: string | undefined;
3867
3808
  exclude?: (string | {
3868
3809
  glob: string;
3869
3810
  reason?: string | undefined;
3870
3811
  })[] | undefined;
3871
- because?: string | undefined;
3872
3812
  })[] | undefined;
3873
3813
  tailwind?: z.objectInputType<{
3874
3814
  palette: z.ZodOptional<z.ZodObject<{
@@ -3888,16 +3828,16 @@ declare const governanceConfigSchema: z.ZodObject<{
3888
3828
  capability: string;
3889
3829
  } | {
3890
3830
  kind: "prop.value.avoid";
3891
- severity: "error" | "info" | "warn";
3892
- because: string;
3893
3831
  prop: string;
3832
+ because: string;
3833
+ severity: "error" | "info" | "warn";
3894
3834
  value?: unknown;
3895
3835
  suggest?: string | undefined;
3896
3836
  } | {
3897
3837
  kind: "prop.value.forbid";
3898
- severity: "error" | "info" | "warn";
3899
- because: string;
3900
3838
  prop: string;
3839
+ because: string;
3840
+ severity: "error" | "info" | "warn";
3901
3841
  value?: unknown;
3902
3842
  when?: {
3903
3843
  path?: string | undefined;
@@ -3907,14 +3847,14 @@ declare const governanceConfigSchema: z.ZodObject<{
3907
3847
  } | undefined;
3908
3848
  } | {
3909
3849
  kind: "a11y.requireName";
3910
- severity: "error" | "info" | "warn";
3911
3850
  because: string;
3851
+ severity: "error" | "info" | "warn";
3912
3852
  })[];
3913
3853
  match: {
3914
3854
  path?: string | undefined;
3855
+ name?: string | undefined;
3915
3856
  importPath?: string | undefined;
3916
3857
  componentId?: string | undefined;
3917
- name?: string | undefined;
3918
3858
  componentKey?: string | undefined;
3919
3859
  publicRef?: string | undefined;
3920
3860
  sourcePath?: string | undefined;
@@ -3931,8 +3871,8 @@ declare const governanceConfigSchema: z.ZodObject<{
3931
3871
  audit?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
3932
3872
  runners?: Record<string, z.objectInputType<{}, z.ZodTypeAny, "passthrough">> | undefined;
3933
3873
  canonicalSources?: ({
3934
- specifier: string;
3935
3874
  kind: "npm";
3875
+ specifier: string;
3936
3876
  exclude?: string[] | undefined;
3937
3877
  implementationPath?: string | undefined;
3938
3878
  include?: string[] | undefined;
@@ -3945,8 +3885,8 @@ declare const governanceConfigSchema: z.ZodObject<{
3945
3885
  kind: "registry";
3946
3886
  registryId: string;
3947
3887
  installPath: string;
3948
- importPath?: string | undefined;
3949
3888
  severity?: "error" | "info" | "warn" | undefined;
3889
+ importPath?: string | undefined;
3950
3890
  exclude?: string[] | undefined;
3951
3891
  include?: string[] | undefined;
3952
3892
  registryHash?: string | undefined;
@@ -4118,7 +4058,12 @@ interface ComponentGovernanceBuilder<TProps> {
4118
4058
  prop<TKey extends PropKey<TProps>>(prop: TKey): PropGovernanceBuilder<TProps[TKey]>;
4119
4059
  accessibility(): AccessibilityGovernanceBuilder;
4120
4060
  }
4121
- interface GovernedFragmentDefinition<TProps = unknown, TComponent extends FragmentComponent<TProps> = FragmentComponent<TProps>> {
4061
+ /**
4062
+ * One-argument governed definition. Requires an explicit `govern` function
4063
+ * and/or `governance` records — both optional keys previously let plain v2
4064
+ * definitions satisfy this type (the optional-key type lie).
4065
+ */
4066
+ type GovernedFragmentDefinitionBase<TProps = unknown, TComponent extends FragmentComponent<TProps> = FragmentComponent<TProps>> = {
4122
4067
  component: TComponent;
4123
4068
  meta: FragmentMeta;
4124
4069
  guidance: FragmentGuidance;
@@ -4133,12 +4078,26 @@ interface GovernedFragmentDefinition<TProps = unknown, TComponent extends Fragme
4133
4078
  };
4134
4079
  contract?: FragmentContract;
4135
4080
  _provenance?: FragmentProvenance;
4136
- govern?: (g: ComponentGovernanceBuilder<TProps>) => ComponentGovernanceRecord[];
4081
+ };
4082
+ type GovernedFragmentDefinition<TProps = unknown, TComponent extends FragmentComponent<TProps> = FragmentComponent<TProps>> = GovernedFragmentDefinitionBase<TProps, TComponent> & ({
4083
+ govern: (g: ComponentGovernanceBuilder<TProps>) => ComponentGovernanceRecord[];
4137
4084
  governance?: ComponentGovernanceRecord[];
4138
- }
4085
+ } | {
4086
+ governance: ComponentGovernanceRecord[];
4087
+ govern?: (g: ComponentGovernanceBuilder<TProps>) => ComponentGovernanceRecord[];
4088
+ });
4139
4089
  type ResolvedGovernedFragmentDefinition<TProps = unknown, TComponent extends FragmentComponent<TProps> = FragmentComponent<TProps>> = GovernedFragmentDefinition<TProps, TComponent> & {
4140
4090
  governance: ComponentGovernanceRecord[];
4141
4091
  };
4092
+ declare function resolveComponentGovernance<TProps>(definition: GovernedFragmentDefinition<TProps>): ComponentGovernanceRecord[];
4093
+ /**
4094
+ * Resolve the component governance records that belong in the FCID preimage.
4095
+ *
4096
+ * Prefer an already-resolved `governance` array (Cloud mint / compiled payloads).
4097
+ * Fall back to evaluating `govern` when present. Returns `undefined` when the
4098
+ * fragment carries no governance surface — callers omit the field from identity.
4099
+ */
4100
+ declare function resolveGovernanceRecordsForIdentity(definition: Pick<GovernedFragmentDefinition, "govern" | "governance"> | null | undefined): ComponentGovernanceRecord[] | undefined;
4142
4101
  declare function normalizeGovernanceConfig<TConfig extends {
4143
4102
  govern?: GovernanceConfig;
4144
4103
  }>(config: TConfig): TConfig;
@@ -4189,4 +4148,4 @@ declare const g: {
4189
4148
  component: ComponentGovernanceBuilder<Record<string, unknown>>;
4190
4149
  };
4191
4150
 
4192
- export { type ControlType as $, type AIMetadata as A, type BlockDefinition as B, type CompiledBlock as C, type CanonicalMappingStatus as D, type CompiledFragmentsFile as E, type FragmentDefinition as F, type GovernanceSeverity as G, CompiledFragmentsFileValidationError as H, type CompiledRecipe as I, type CompiledTokenData as J, type CompiledTokenEntry as K, type ComponentGovernanceBuilder as L, type ComponentGovernanceRecord as M, type ComponentRef as N, type ComponentRelation as O, type CompositionMetadata as P, type ContractComponentInput as Q, type ResolvedGovernedFragmentDefinition as R, type StorybookFilterConfig as S, type TokenConfig as T, type ContractIdentityPin as U, type VariantRenderOptions as V, type ContractPolicyInput as W, type ContractPreimage as X, type ContractPropMappingInput as Y, type ContractTokenInput as Z, type ContractWaiverInput as _, type VariantLoader as a, projectContractPreimage as a$, type DesignSystemConfig as a0, type DiffResult as a1, type FigmaPropMapping as a2, type FragmentContract as a3, type FragmentExample as a4, type FragmentGenerated as a5, type FragmentGuidance as a6, type FragmentMeta as a7, type FragmentProvenance as a8, type FragmentUsage as a9, type SnapshotConfig as aA, type SnippetPolicyConfig as aB, type Theme as aC, type ThemeSeeds as aD, type TokenSourceConfig as aE, type TokenSourceFormat as aF, type VerifyRequest as aG, type VerifyResult as aH, type Viewport as aI, canonicalBridgeV1Schema as aJ, componentGovernanceRecordSchema as aK, componentGovernanceRecordsSchema as aL, contractComponentsFromFragments as aM, contractPolicyFromGovernanceConfig as aN, diffContractDomains as aO, g as aP, globalGovernanceRecordSchema as aQ, globalJsxGovernanceRecordSchema as aR, globalStyleGovernanceRecordSchema as aS, governanceConfigSchema as aT, governanceConfigWithLocalCanonical as aU, governanceSeveritySchema as aV, isPresetSourcedRule as aW, localCanonicalContractMappings as aX, markPresetSourcedRules as aY, normalizeGovernanceConfig as aZ, parseCompiledFragmentsFile as a_, type FragmentVariant as aa, type GlobalGovernanceRecord as ab, type GlobalJsxGovernanceRecord as ac, type GlobalStyleGovernanceRecord as ad, type GovernancePropValue as ae, type InspectConfig as af, type LocalCanonicalDeclaration as ag, type LocalCanonicalResolveRule as ah, type Manifest as ai, type ObservedComponentUsage as aj, type ObservedUsageProp as ak, type PlayFunction as al, type PlayFunctionContext as am, type PropDefinition as an, type PropGovernanceBuilder as ao, type PropGovernanceOptions as ap, type PropKey as aq, type PropType as ar, type RecipeDefinition as as, type RegistryOptions as at, type RepoRelativePath as au, type ScaleGovernanceRecord as av, type Screenshot as aw, type ScreenshotConfig as ax, type ScreenshotMetadata as ay, type ServiceConfig as az, type FragmentDefinitionV2 as b, scaleGovernanceRecordSchema as b0, verifiedContractPreimageFromPin as b1, type AIMetadata$1 as b2, type ComponentRelation$1 as b3, type FragmentContract$1 as b4, type FragmentGenerated$1 as b5, type FragmentMeta$1 as b6, type FragmentUsage$1 as b7, type ImportEntry as b8, type PerformanceData as b9, type PerformanceSummary as ba, type PropDefinition$1 as bb, type Theme$1 as bc, type VerifyResult$1 as bd, type CompiledFragment as c, type ContractDomain as d, type ContractCatalogInput as e, type GovernedFragmentDefinition as f, type GovernanceConfig as g, type FragmentsConfig as h, type FragmentComponent as i, type FigmaStringMapping as j, type FigmaBooleanMapping as k, type FigmaEnumMapping as l, type FigmaInstanceMapping as m, type FigmaChildrenMapping as n, type FigmaTextContentMapping as o, type RelationshipType as p, type CanonicalSource as q, type CanonicalBridgeV1 as r, type ContractCanonicalMappingInput as s, type AccessibilityGovernanceBuilder as t, type AppConfig as u, type BaselineInfo as v, type BoundingBox as w, CONTRACT_DOMAINS as x, CONTRACT_PREIMAGE_CAPABILITY_HEADER as y, CONTRACT_PREIMAGE_SCHEMA as z };
4151
+ export { type ContractComponentInput as $, type CanonicalBridgeV1 as A, type BlockDefinition as B, type ComponentGovernanceRecord as C, type ContractCanonicalMappingInput as D, type ContractPreimage as E, type FragmentDefinition as F, type GovernanceSeverity as G, type AIMetadata as H, type AccessibilityGovernanceBuilder as I, type AppConfig as J, type BaselineInfo as K, type BoundingBox as L, CONTRACT_DISPLAY_ONLY_FIELDS as M, CONTRACT_DOMAINS as N, CONTRACT_ENFORCEMENT_FIELDS as O, type PropAnnotation as P, CONTRACT_PREIMAGE_CAPABILITY_HEADER as Q, type ResolvedGovernedFragmentDefinition as R, CONTRACT_PREIMAGE_SCHEMA as S, type TokenConfig as T, type CanonicalMappingStatus as U, type VariantRenderOptions as V, type ComponentGovernanceBuilder as W, type ComponentRef as X, type ComponentRelation as Y, type CompositionMetadata as Z, ContractCatalogValidationError as _, type FragmentDefinitionV2 as a, globalJsxGovernanceRecordSchema as a$, type ContractEnforcementField as a0, type ContractIdentityPin as a1, type ContractPolicyInput as a2, type ContractPropMappingInput as a3, type ContractTokenInput as a4, type ContractWaiverInput as a5, type ControlType as a6, type DesignSystemConfig as a7, type DiffResult as a8, type FigmaPropMapping as a9, type RegistryComponentEntry as aA, type RegistryOptions as aB, type RegistryPropEntry as aC, type RepoRelativePath as aD, type ScaleGovernanceRecord as aE, type Screenshot as aF, type ScreenshotConfig as aG, type ScreenshotMetadata as aH, type ServiceConfig as aI, type SnapshotConfig as aJ, type SnippetPolicyConfig as aK, type Theme as aL, type ThemeSeeds as aM, type TokenSourceConfig as aN, type TokenSourceFormat as aO, type VerifyRequest as aP, type VerifyResult as aQ, type Viewport as aR, canonicalBridgeV1Schema as aS, componentGovernanceRecordSchema as aT, componentGovernanceRecordsSchema as aU, contractComponentsFromFragments as aV, contractPolicyFromGovernanceConfig as aW, deriveArtifactId as aX, diffContractDomains as aY, g as aZ, globalGovernanceRecordSchema as a_, type FragmentContextOptions as aa, type FragmentContract as ab, type FragmentExample as ac, type FragmentGenerated as ad, type FragmentGuidance as ae, type FragmentIndex as af, type FragmentMeta as ag, type FragmentProvenance as ah, type FragmentRegistry as ai, type FragmentUsage as aj, type FragmentVariant as ak, type GlobalGovernanceRecord as al, type GlobalJsxGovernanceRecord as am, type GlobalStyleGovernanceRecord as an, type GovernancePropValue as ao, type InspectConfig as ap, type LocalCanonicalDeclaration as aq, type LocalCanonicalResolveRule as ar, type Manifest as as, type PlayFunction as at, type PlayFunctionContext as au, type PropDefinition as av, type PropGovernanceBuilder as aw, type PropGovernanceOptions as ax, type PropKey as ay, type PropType as az, type VariantLoader as b, globalStyleGovernanceRecordSchema as b0, governanceConfigSchema as b1, governanceConfigWithLocalCanonical as b2, governanceSeveritySchema as b3, isPresetSourcedRule as b4, localCanonicalContractMappings as b5, markPresetSourcedRules as b6, normalizeGovernanceConfig as b7, parseComponentGovernancePolicyJson as b8, projectContractPreimage as b9, projectEnforcementContract as ba, resolveComponentGovernance as bb, resolveGovernanceRecordsForIdentity as bc, scaleGovernanceRecordSchema as bd, verifiedContractPreimageFromPin as be, type ContractDomain as c, type ContractCatalogInput as d, type GovernedFragmentDefinition as e, type GovernanceConfig as f, type FragmentsConfig as g, type FragmentAnnotationsV3 as h, type FragmentDefinitionV3Body as i, type FragmentDefinitionV3 as j, type FragmentDesignV3 as k, type FragmentDontExampleV3 as l, type FragmentGuidanceV3 as m, type FragmentMatrixV3 as n, type FragmentMetaV3 as o, type FragmentPreviewV3 as p, type FragmentStateV3 as q, type FragmentComponent as r, type FigmaStringMapping as s, type FigmaBooleanMapping as t, type FigmaEnumMapping as u, type FigmaInstanceMapping as v, type FigmaChildrenMapping as w, type FigmaTextContentMapping as x, type RelationshipType as y, type CanonicalSource as z };