@usefragments/core 1.5.0 → 1.5.2

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 (65) hide show
  1. package/dist/{chunk-HXGE3O2F.js → chunk-BAHCOAVG.js} +133 -7
  2. package/dist/chunk-BAHCOAVG.js.map +1 -0
  3. package/dist/{chunk-57QDBEHQ.js → chunk-ZHS52OT4.js} +3 -9
  4. package/dist/chunk-ZHS52OT4.js.map +1 -0
  5. package/dist/codes/index.d.ts +2 -2
  6. package/dist/codes/index.js +2 -2
  7. package/dist/compiled-types/index.d.ts +1 -1
  8. package/dist/generate/index.d.ts +1 -1
  9. package/dist/{governance-BLsyk56o.d.ts → governance-pKrfh517.d.ts} +264 -4
  10. package/dist/{index-h_yWj15D.d.ts → index-DbkPE46t.d.ts} +40 -0
  11. package/dist/index.d.ts +472 -28
  12. package/dist/index.js +561 -39
  13. package/dist/index.js.map +1 -1
  14. package/dist/react-types.d.ts +1 -1
  15. package/dist/schemas/index.d.ts +1 -1
  16. package/dist/schemas/index.js +1 -1
  17. package/dist/test-utils.d.ts +1 -1
  18. package/package.json +1 -1
  19. package/src/agent-format.test.ts +1 -0
  20. package/src/canonical-bridge.ts +46 -0
  21. package/src/canonical-direction.ts +118 -0
  22. package/src/codes/__tests__/codes.test.ts +1 -1
  23. package/src/codes/codes.ts +29 -0
  24. package/src/config.ts +20 -0
  25. package/src/contract/preimage.test.ts +40 -0
  26. package/src/contract/preimage.ts +20 -0
  27. package/src/effective-governance-inputs.test.ts +52 -0
  28. package/src/effective-governance-inputs.ts +106 -0
  29. package/src/facts/builders.ts +25 -1
  30. package/src/facts/compile.ts +20 -2
  31. package/src/facts/fact-index.ts +12 -1
  32. package/src/facts/facts.test.ts +14 -18
  33. package/src/facts/types.ts +25 -6
  34. package/src/governance-integrity.test.ts +127 -0
  35. package/src/governance-integrity.ts +326 -4
  36. package/src/governance.test.ts +87 -1
  37. package/src/governance.ts +121 -0
  38. package/src/index.ts +34 -5
  39. package/src/rules/__tests__/fix-emission-invariant.test.ts +35 -4
  40. package/src/rules/components-prefer-library.test.ts +103 -0
  41. package/src/rules/components-prefer-library.ts +30 -4
  42. package/src/rules/fix-availability.ts +1 -0
  43. package/src/rules/index.ts +7 -0
  44. package/src/rules/jsx-preferred-import-path.ts +45 -9
  45. package/src/rules/rules.test.ts +202 -6
  46. package/src/rules/spacing-resolution.ts +2 -2
  47. package/src/rules/styles-no-raw-color.test.ts +6 -1
  48. package/src/rules/styles-no-raw-color.ts +3 -2
  49. package/src/rules/styles-no-raw-dimensions.ts +5 -7
  50. package/src/rules/styles-no-raw-spacing.test.ts +48 -0
  51. package/src/rules/styles-no-raw-spacing.ts +10 -7
  52. package/src/rules/styles-no-raw-typography.ts +7 -4
  53. package/src/rules/taxonomy.test.ts +3 -0
  54. package/src/rules/tiers.ts +2 -0
  55. package/src/rules/token-candidates.ts +36 -0
  56. package/src/rules/tokens-require-dual-fallback.ts +2 -1
  57. package/src/rules/tokens-upstream-drift.test.ts +111 -0
  58. package/src/rules/tokens-upstream-drift.ts +57 -0
  59. package/src/rules/utils.ts +22 -14
  60. package/src/schema.ts +13 -0
  61. package/src/schemas/index.ts +5 -8
  62. package/src/token-types.ts +71 -1
  63. package/src/types.ts +27 -3
  64. package/dist/chunk-57QDBEHQ.js.map +0 -1
  65. package/dist/chunk-HXGE3O2F.js.map +0 -1
@@ -188,18 +188,12 @@ var agentRunProvenanceSchema = z.object({
188
188
  fcid: z.string().min(1),
189
189
  baselineId: z.string().min(1).optional(),
190
190
  scope: z.object({
191
- method: z.enum([
192
- "three-dot",
193
- "tree-diff",
194
- "status",
195
- "fallback-full",
196
- "explicit",
197
- "full"
198
- ]),
191
+ method: z.enum(["three-dot", "tree-diff", "status", "fallback-full", "explicit", "full"]),
199
192
  gitOk: z.boolean()
200
193
  }),
201
194
  engineVersion: z.string().min(1),
202
195
  scopeHash: z.string().regex(/^[a-f0-9]{64}$/),
196
+ inputsHash: z.string().regex(/^[a-f0-9]{64}$/).optional(),
203
197
  inputFilesHash: z.string().regex(/^[a-f0-9]{64}$/)
204
198
  });
205
199
  var agentRunVerdictSchema = z.object({
@@ -320,4 +314,4 @@ export {
320
314
  normalizeFinding,
321
315
  normalizeViolation
322
316
  };
323
- //# sourceMappingURL=chunk-57QDBEHQ.js.map
317
+ //# sourceMappingURL=chunk-ZHS52OT4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/schemas/index.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport {\n legacySeverityLevelSchema,\n severityFromLevel,\n severityLevel,\n severityLevelSchema,\n severitySchema,\n} from \"../severity.js\";\nimport type { LegacySeverityLevel, Severity } from \"../severity.js\";\nimport type { EvidenceGrade } from \"../evidence.js\";\n\nconst evidenceGradeSchema: z.ZodType<EvidenceGrade> = z.enum([\n \"none\",\n \"runtime_advisory\",\n \"provenance_bound\",\n \"source_backed\",\n \"receipt_backed\",\n]);\n\nexport { legacySeverityLevelSchema, severityLevelSchema, severitySchema };\nexport type { LegacySeverityLevel, Severity, SeverityLevel } from \"../severity.js\";\n\nexport const factLocationSchema = z.object({\n file: z.string(),\n line: z.number().int().nonnegative(),\n column: z.number().int().nonnegative(),\n endLine: z.number().int().nonnegative().optional(),\n endColumn: z.number().int().nonnegative().optional(),\n});\nexport type FactLocation = z.infer<typeof factLocationSchema>;\n\nexport const findingReplacePropValueFixSchema = z.object({\n kind: z.literal(\"replacePropValue\"),\n title: z.string(),\n prop: z.string(),\n value: z.unknown(),\n deterministic: z.boolean().optional(),\n});\n\nexport const findingReplaceStyleValueFixSchema = z.object({\n kind: z.literal(\"replaceStyleValue\"),\n title: z.string(),\n property: z.string(),\n value: z.string(),\n deterministic: z.boolean().optional(),\n});\n\nexport const findingReplaceImportFixSchema = z.object({\n kind: z.literal(\"replaceImport\"),\n title: z.string(),\n from: z.string(),\n to: z.string(),\n deterministic: z.boolean().optional(),\n});\n\nexport const findingReplaceComponentFixSchema = z.object({\n kind: z.literal(\"replaceComponent\"),\n title: z.string(),\n from: z.string(),\n to: z.string(),\n deterministic: z.boolean().optional(),\n});\n\nexport const findingReplaceClassTokenFixSchema = z.object({\n kind: z.literal(\"replaceClassToken\"),\n title: z.string(),\n from: z.string(),\n to: z.string().nullable(),\n utility: z.string(),\n deterministic: z.boolean().optional(),\n});\n\nexport const findingFixSchema = z.discriminatedUnion(\"kind\", [\n findingReplacePropValueFixSchema,\n findingReplaceStyleValueFixSchema,\n findingReplaceImportFixSchema,\n findingReplaceComponentFixSchema,\n findingReplaceClassTokenFixSchema,\n]);\nexport type FindingFix = z.infer<typeof findingFixSchema>;\nexport type FindingReplacePropValueFix = z.infer<typeof findingReplacePropValueFixSchema>;\nexport type FindingReplaceStyleValueFix = z.infer<typeof findingReplaceStyleValueFixSchema>;\nexport type FindingReplaceImportFix = z.infer<typeof findingReplaceImportFixSchema>;\nexport type FindingReplaceComponentFix = z.infer<typeof findingReplaceComponentFixSchema>;\nexport type FindingReplaceClassTokenFix = z.infer<typeof findingReplaceClassTokenFixSchema>;\n\nexport interface FactEvidence {\n factId: string;\n fact: {\n kind: string;\n location?: FactLocation;\n };\n}\n\nexport const factEvidenceSchema: z.ZodType<FactEvidence> = z.object({\n factId: z.string(),\n fact: z\n .object({\n kind: z.string(),\n location: factLocationSchema.optional(),\n })\n .passthrough(),\n});\n\nexport const findingSchema = z.object({\n ruleId: z.string(),\n ruleVersion: z.string(),\n severity: severitySchema,\n level: severityLevelSchema,\n code: z\n .string()\n .regex(/^FUI\\d{4}$/)\n .optional(),\n helpUrl: z.string().url().optional(),\n message: z.string(),\n fingerprint: z.string(),\n location: factLocationSchema,\n evidence: z.array(factEvidenceSchema).min(1),\n evidenceGrade: evidenceGradeSchema.optional(),\n fix: findingFixSchema.optional(),\n attributes: z.record(z.unknown()).optional(),\n /**\n * Product area this finding's file resolved to (topology layer). Optional —\n * absent when the repo has no `topology` config. See `topology/resolve-area`.\n */\n area: z\n .object({\n areaId: z.string(),\n areaName: z.string(),\n criticality: z.enum([\"low\", \"medium\", \"high\", \"revenue\", \"regulated\"]),\n owners: z.array(z.string()),\n matchedGlob: z.string(),\n })\n .optional(),\n});\nexport type Finding = z.infer<typeof findingSchema>;\n\nexport const violationSchema = z.object({\n nodeId: z.string(),\n nodeType: z.string(),\n rule: z.string(),\n severity: severitySchema,\n level: severityLevelSchema.optional(),\n code: z\n .string()\n .regex(/^FUI\\d{4}$/)\n .optional(),\n helpUrl: z.string().url().optional(),\n message: z.string(),\n path: z.string().optional(),\n suggestion: z.string().optional(),\n prop: z.string().optional(),\n filePath: z.string().optional(),\n line: z.number().int().nonnegative().optional(),\n column: z.number().int().nonnegative().optional(),\n rawValue: z.string().optional(),\n extra: z.record(z.unknown()).optional(),\n});\nexport type Violation = z.infer<typeof violationSchema>;\n\nexport const fixSchema = z.object({\n nodeId: z.string(),\n prop: z.string().optional(),\n action: z.enum([\"remove\", \"replace\", \"add\"]),\n value: z.unknown().optional(),\n description: z.string(),\n});\nexport type Fix = z.infer<typeof fixSchema>;\n\nexport const validatorResultSchema = z.object({\n validator: z.string(),\n severity: severitySchema,\n passed: z.boolean(),\n violations: z.array(violationSchema),\n findings: z.array(findingSchema).optional(),\n suggestions: z.array(fixSchema).optional(),\n});\nexport type ValidatorResult = z.infer<typeof validatorResultSchema>;\n\nexport const governanceVerdictMetadataSchema = z.object({\n runner: z.string(),\n policyVersion: z.string().optional(),\n duration: z.number().nonnegative(),\n nodeCount: z.number().int().nonnegative(),\n componentTypes: z.array(z.string()),\n});\nexport type GovernanceVerdictMetadata = z.infer<typeof governanceVerdictMetadataSchema>;\n\nexport const governanceVerdictSchema = z.object({\n verdict: z.enum([\"pass\", \"warn\", \"fail\"]).optional(),\n passed: z.boolean(),\n score: z.number(),\n results: z.array(validatorResultSchema),\n metadata: governanceVerdictMetadataSchema,\n});\nexport type GovernanceVerdict = z.infer<typeof governanceVerdictSchema>;\n\nexport const suppressionDirectiveSchema = z.object({\n ruleId: z.string().optional(),\n reason: z.string().min(1),\n expiresAt: z.string().datetime().optional(),\n expiresOn: z\n .string()\n .regex(/^\\d{4}-\\d{2}-\\d{2}$/)\n .optional(),\n scope: z.enum([\"line\", \"block\", \"file\"]).default(\"line\"),\n code: z\n .string()\n .regex(/^FUI\\d{4}$/)\n .optional(),\n});\nexport type SuppressionDirective = z.infer<typeof suppressionDirectiveSchema>;\n\nexport const agentPlanSchema = z.object({\n tool: z.enum([\n \"design_system/list_primitives\",\n \"design_system/conform\",\n \"design_system/prove_compliant\",\n ]),\n args: z.record(z.unknown()),\n confidence: z.number().min(0).max(1),\n});\n\nexport const agentFindingSchema = z.object({\n code: z\n .string()\n .regex(/^FUI\\d{4}$/)\n .optional(),\n ruleId: z.string(),\n filePath: z.string(),\n line: z.number().int().nonnegative(),\n col: z.number().int().nonnegative(),\n severity: severitySchema,\n level: severityLevelSchema,\n message: z.string(),\n evidenceGrade: evidenceGradeSchema.optional(),\n evidence: z.array(factEvidenceSchema),\n plan: agentPlanSchema,\n});\n\nexport const AGENT_FORMAT_SCHEMA_VERSION = \"typestyle.agent.v2\" as const;\n\nexport const agentIntegritySchema = z.object({\n rulesLoaded: z.number().int().nonnegative(),\n status: z.enum([\"healthy\", \"degraded\", \"inert\"]),\n healthy: z.boolean(),\n inert: z.boolean(),\n reasons: z.array(z.string()),\n});\n\nconst agentRunProvenanceSchema = z.object({\n runId: z.string().regex(/^run_[a-f0-9]{12}$/),\n fcid: z.string().min(1),\n baselineId: z.string().min(1).optional(),\n scope: z.object({\n method: z.enum([\"three-dot\", \"tree-diff\", \"status\", \"fallback-full\", \"explicit\", \"full\"]),\n gitOk: z.boolean(),\n }),\n engineVersion: z.string().min(1),\n scopeHash: z.string().regex(/^[a-f0-9]{64}$/),\n inputsHash: z\n .string()\n .regex(/^[a-f0-9]{64}$/)\n .optional(),\n inputFilesHash: z.string().regex(/^[a-f0-9]{64}$/),\n});\n\nconst agentRunVerdictSchema = z.object({\n exitCode: z.union([z.literal(0), z.literal(1)]),\n reasons: z.array(z.string()),\n gatingFindingCount: z.number().int().nonnegative(),\n});\n\nconst agentFormatBaseSchema = z.object({\n schemaVersion: z.literal(AGENT_FORMAT_SCHEMA_VERSION),\n summary: z.string(),\n integrity: agentIntegritySchema,\n fix_first: z.array(agentFindingSchema),\n remaining: z.array(agentFindingSchema),\n suppression_template: z.object({\n directive: z.string(),\n requiredFields: z.array(z.string()),\n example: z.string(),\n }),\n budget: z.object({\n iteration: z.number().int().nonnegative(),\n maxIterations: z.number().int().positive(),\n scoreDelta: z.number(),\n }),\n findings: z.array(findingSchema).optional(),\n suppressions: z.array(suppressionDirectiveSchema).optional(),\n provenance: agentRunProvenanceSchema.optional(),\n verdict: agentRunVerdictSchema.optional(),\n});\n\nexport const agentFormatSchema = z.union([\n agentFormatBaseSchema.extend({\n passed: z.boolean(),\n score: z.number(),\n status: z.never().optional(),\n reasons: z.never().optional(),\n integrity: agentIntegritySchema.extend({\n rulesLoaded: z.number().int().positive(),\n }),\n }),\n agentFormatBaseSchema.extend({\n passed: z.literal(false),\n score: z.never().optional(),\n status: z.literal(\"indeterminate\"),\n reasons: z.tuple([z.literal(\"zero_rules_loaded\")]),\n integrity: agentIntegritySchema.extend({\n rulesLoaded: z.literal(0),\n }),\n }),\n // A finalized Run can explicitly allow inert governance. Preserve the\n // indeterminate integrity truth while making `passed` match that Run's sole\n // verdict; requiring Run pins prevents generic zero-rule envelopes from\n // accidentally becoming green.\n agentFormatBaseSchema.extend({\n passed: z.literal(true),\n score: z.never().optional(),\n status: z.literal(\"indeterminate\"),\n reasons: z.tuple([z.literal(\"zero_rules_loaded\")]),\n integrity: agentIntegritySchema.extend({\n rulesLoaded: z.literal(0),\n }),\n provenance: agentRunProvenanceSchema,\n verdict: agentRunVerdictSchema.extend({ exitCode: z.literal(0) }),\n }),\n]);\nexport type AgentFormat = z.infer<typeof agentFormatSchema>;\n\nexport const agentErrorEnvelopeSchema = z.object({\n schemaVersion: z.literal(AGENT_FORMAT_SCHEMA_VERSION),\n passed: z.literal(false),\n error: z.object({\n code: z.string().min(1),\n message: z.string().min(1),\n }),\n provenance: agentRunProvenanceSchema.optional(),\n verdict: agentRunVerdictSchema.optional(),\n cloudReport: z.enum([\"reported\", \"failed\", \"skipped\"]).optional(),\n notices: z.array(z.string()).optional(),\n});\nexport type AgentErrorEnvelope = z.infer<typeof agentErrorEnvelopeSchema>;\n\nexport const agentOutputSchema = z.union([agentFormatSchema, agentErrorEnvelopeSchema]);\nexport type AgentOutput = z.infer<typeof agentOutputSchema>;\n\nexport function normalizeSeverity(severity: Severity | LegacySeverityLevel): Severity {\n return severitySchema.safeParse(severity).success\n ? (severity as Severity)\n : severityFromLevel(legacySeverityLevelSchema.parse(severity));\n}\n\nexport function normalizeFinding(\n input: Omit<Finding, \"level\"> & { level?: Finding[\"level\"] }\n): Finding {\n return {\n ...input,\n evidenceGrade: input.evidenceGrade ?? \"source_backed\",\n level: input.level ?? severityLevel(input.severity),\n };\n}\n\nexport function normalizeViolation(\n input: Omit<Violation, \"level\"> & { level?: Violation[\"level\"] }\n): Violation {\n return {\n ...input,\n level: input.level ?? severityLevel(input.severity),\n };\n}\n"],"mappings":";;;;;;;;;AAAA,SAAS,SAAS;AAYlB,IAAM,sBAAgD,EAAE,KAAK;AAAA,EAC3D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAKM,IAAM,qBAAqB,EAAE,OAAO;AAAA,EACzC,MAAM,EAAE,OAAO;AAAA,EACf,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY;AAAA,EACnC,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY;AAAA,EACrC,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS;AAAA,EACjD,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS;AACrD,CAAC;AAGM,IAAM,mCAAmC,EAAE,OAAO;AAAA,EACvD,MAAM,EAAE,QAAQ,kBAAkB;AA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IACH,eAAe,MAAM,iBAAiB;AAAA,IACtC,OAAO,MAAM,SAAS,cAAc,MAAM,QAAQ;AAAA,EACpD;AACF;AAEO,SAAS,mBACd,OACW;AACX,SAAO;AAAA,IACL,GAAG;AAAA,IACH,OAAO,MAAM,SAAS,cAAc,MAAM,QAAQ;AAAA,EACpD;AACF;","names":[]}
@@ -1,5 +1,5 @@
1
1
  import { Severity } from '../severity.js';
2
- import { n as Violation, F as Finding } from '../index-h_yWj15D.js';
2
+ import { n as Violation, F as Finding } from '../index-DbkPE46t.js';
3
3
  import 'zod';
4
4
 
5
5
  declare const EXPLAIN_URL_BASE = "https://usefragments.com/errors/";
@@ -17,7 +17,7 @@ interface FuiCode {
17
17
  fixAvailable: boolean;
18
18
  evidenceRequired: boolean;
19
19
  }
20
- declare const CODES: readonly [FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode];
20
+ declare const CODES: readonly [FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode, FuiCode];
21
21
  declare const byCode: ReadonlyMap<string, FuiCode>;
22
22
  declare const byRuleId: ReadonlyMap<string, FuiCode>;
23
23
  declare function explainUrlForCode(code: string): string;
@@ -6,8 +6,8 @@ import {
6
6
  byCode,
7
7
  byRuleId,
8
8
  explainUrlForCode
9
- } from "../chunk-HXGE3O2F.js";
10
- import "../chunk-57QDBEHQ.js";
9
+ } from "../chunk-BAHCOAVG.js";
10
+ import "../chunk-ZHS52OT4.js";
11
11
  import "../chunk-JNBFJ34I.js";
12
12
  import "../chunk-EIYNNS77.js";
13
13
  import "../chunk-V4VQB57N.js";
@@ -1,5 +1,5 @@
1
1
  import '../types-xJ2xyp_G.js';
2
- export { aY as AIMetadata, C as CompiledBlock, b as CompiledFragment, z as CompiledFragmentsFile, E as CompiledTokenData, H as CompiledTokenEntry, aZ as ComponentRelation, a_ as FragmentContract, a$ as FragmentGenerated, b0 as FragmentMeta, b1 as FragmentUsage, b2 as ImportEntry, ah as ObservedComponentUsage, ai as ObservedUsageProp, b3 as PerformanceData, b4 as PerformanceSummary, b5 as PropDefinition, b6 as Theme, b7 as VerifyResult } from '../governance-BLsyk56o.js';
2
+ export { a_ as AIMetadata, C as CompiledBlock, b as CompiledFragment, E as CompiledFragmentsFile, I as CompiledTokenData, J as CompiledTokenEntry, a$ as ComponentRelation, b0 as FragmentContract, b1 as FragmentGenerated, b2 as FragmentMeta, b3 as FragmentUsage, b4 as ImportEntry, ai as ObservedComponentUsage, aj as ObservedUsageProp, b5 as PerformanceData, b6 as PerformanceSummary, b7 as PropDefinition, b8 as Theme, b9 as VerifyResult } from '../governance-pKrfh517.js';
3
3
  import 'zod';
4
4
  import 'react';
5
5
  import '../topology/index.js';
@@ -1,4 +1,4 @@
1
- import { b as CompiledFragment, C as CompiledBlock } from '../governance-BLsyk56o.js';
1
+ import { b as CompiledFragment, C as CompiledBlock } from '../governance-pKrfh517.js';
2
2
  import 'zod';
3
3
  import 'react';
4
4
  import '../topology/index.js';
@@ -75,6 +75,15 @@ interface ContractCanonicalMappingInput {
75
75
  status: CanonicalMappingStatus;
76
76
  /** Local/offline canonical import target, when the mapping is config-authored. */
77
77
  importPath?: string;
78
+ /** Confirmed package-to-local relation metadata. Absent for legacy mappings. */
79
+ bridge?: {
80
+ underlyingPackageName: string;
81
+ underlyingExportName: string;
82
+ localComponentKey: string;
83
+ localExportName: string;
84
+ implementationFiles: readonly string[];
85
+ decisionSource: "authored" | "migration";
86
+ };
78
87
  /** Explicit raw element or semantic resolutions covered by a local declaration. */
79
88
  resolves?: readonly {
80
89
  tag: string;
@@ -906,7 +915,10 @@ type TokenSourceFormat = "auto" | "css" | "scss" | "dtcg" | "tailwind";
906
915
  interface TokenSourceConfig {
907
916
  /** Repo-root-relative token file or glob. */
908
917
  path: RepoRelativePath;
909
- /** Explicit token format, or "auto" to infer from extension/content. */
918
+ /**
919
+ * Explicit token format, or "auto" to infer from extension/content. Use
920
+ * "auto" for statically analyzable TypeScript and JavaScript token modules.
921
+ */
910
922
  format?: TokenSourceFormat;
911
923
  }
912
924
  interface TokenConfig {
@@ -915,7 +927,10 @@ interface TokenConfig {
915
927
  * e.g., ["src/styles/theme.scss", "src/styles/variables.css"]
916
928
  */
917
929
  include?: string[];
918
- /** Repo-root-relative token source files/globs for monorepos and Cloud setup. */
930
+ /**
931
+ * Repo-root-relative token source files/globs for monorepos and Cloud setup.
932
+ * Set each source to format "auto" for TypeScript or JavaScript token modules.
933
+ */
919
934
  sources?: TokenSourceConfig[];
920
935
  /**
921
936
  * npm package names whose shipped `fragments.json` token vocabulary seeds the
@@ -927,6 +942,14 @@ interface TokenConfig {
927
942
  * no-inference mandate intact.
928
943
  */
929
944
  packages?: string[];
945
+ /** Explicit local-name -> upstream-name mappings for cross-authority drift checks. */
946
+ aliases?: Record<string, string>;
947
+ /** Deterministic pins for upstream token manifests; local scans never fetch them. */
948
+ upstream?: Array<{
949
+ packageName: string;
950
+ version?: string;
951
+ digest?: string;
952
+ }>;
930
953
  /**
931
954
  * Glob patterns to exclude
932
955
  * @example ["node_modules"]
@@ -939,7 +962,10 @@ interface TokenConfig {
939
962
  themeSelectors?: Record<string, string>;
940
963
  /** Enable token comparison in style diffs (default: true) */
941
964
  enabled?: boolean;
942
- /** Token source format detection ('auto' detects from file extension) */
965
+ /**
966
+ * Token source format detection. "auto" infers supported formats from the
967
+ * file extension, including statically analyzable TypeScript/JavaScript modules.
968
+ */
943
969
  format?: TokenSourceFormat;
944
970
  /** Vendor namespace for Fragments extensions in DTCG files (default: 'com.usefragments') */
945
971
  namespace?: string;
@@ -1099,12 +1125,17 @@ interface FragmentsConfig {
1099
1125
  recognizedClassHelpers?: string[];
1100
1126
  /** Local component-identity decisions used when Cloud does not own the key. */
1101
1127
  identity?: {
1128
+ /** Authored sanctions, rejections, and dismissals keyed by portable component identity. */
1102
1129
  decisions?: Array<{
1103
1130
  /** Portable component key (`file#exportName`). */
1104
1131
  component: string;
1132
+ /** The identity disposition recorded for this component. */
1105
1133
  kind: "sanction" | "reject" | "dismiss";
1134
+ /** Optional canonical target (`moduleSpecifier#exportName`) for sanctions. */
1106
1135
  canonicalTarget?: string;
1136
+ /** Human-readable rationale stored with the decision. */
1107
1137
  reason?: string;
1138
+ /** Stable external identifier used to reconcile an existing decision. */
1108
1139
  decisionId?: string;
1109
1140
  }>;
1110
1141
  };
@@ -2132,6 +2163,74 @@ declare const componentPolicyOverrideSchema: z.ZodObject<{
2132
2163
  };
2133
2164
  status?: "active" | "draft" | "disabled" | undefined;
2134
2165
  }>;
2166
+ declare const canonicalBridgeV1Schema: z.ZodObject<{
2167
+ underlying: z.ZodObject<{
2168
+ packageName: z.ZodString;
2169
+ exportName: z.ZodString;
2170
+ }, "strict", z.ZodTypeAny, {
2171
+ exportName: string;
2172
+ packageName: string;
2173
+ }, {
2174
+ exportName: string;
2175
+ packageName: string;
2176
+ }>;
2177
+ local: z.ZodObject<{
2178
+ componentKey: z.ZodString;
2179
+ moduleSpecifier: z.ZodEffects<z.ZodString, string, string>;
2180
+ exportName: z.ZodString;
2181
+ implementationFiles: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
2182
+ }, "strict", z.ZodTypeAny, {
2183
+ componentKey: string;
2184
+ exportName: string;
2185
+ moduleSpecifier: string;
2186
+ implementationFiles: string[];
2187
+ }, {
2188
+ componentKey: string;
2189
+ exportName: string;
2190
+ moduleSpecifier: string;
2191
+ implementationFiles: string[];
2192
+ }>;
2193
+ decision: z.ZodObject<{
2194
+ state: z.ZodLiteral<"confirmed">;
2195
+ source: z.ZodEnum<["authored", "migration"]>;
2196
+ }, "strict", z.ZodTypeAny, {
2197
+ state: "confirmed";
2198
+ source: "authored" | "migration";
2199
+ }, {
2200
+ state: "confirmed";
2201
+ source: "authored" | "migration";
2202
+ }>;
2203
+ }, "strict", z.ZodTypeAny, {
2204
+ underlying: {
2205
+ exportName: string;
2206
+ packageName: string;
2207
+ };
2208
+ local: {
2209
+ componentKey: string;
2210
+ exportName: string;
2211
+ moduleSpecifier: string;
2212
+ implementationFiles: string[];
2213
+ };
2214
+ decision: {
2215
+ state: "confirmed";
2216
+ source: "authored" | "migration";
2217
+ };
2218
+ }, {
2219
+ underlying: {
2220
+ exportName: string;
2221
+ packageName: string;
2222
+ };
2223
+ local: {
2224
+ componentKey: string;
2225
+ exportName: string;
2226
+ moduleSpecifier: string;
2227
+ implementationFiles: string[];
2228
+ };
2229
+ decision: {
2230
+ state: "confirmed";
2231
+ source: "authored" | "migration";
2232
+ };
2233
+ }>;
2135
2234
  declare const canonicalSourceSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2136
2235
  kind: z.ZodLiteral<"npm">;
2137
2236
  specifier: z.ZodString;
@@ -2273,6 +2372,104 @@ declare const governanceConfigSchema: z.ZodObject<{
2273
2372
  registryHash?: string | undefined;
2274
2373
  receiptPath?: string | undefined;
2275
2374
  }>]>, "many">>;
2375
+ canonicalBridges: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
2376
+ underlying: z.ZodObject<{
2377
+ packageName: z.ZodString;
2378
+ exportName: z.ZodString;
2379
+ }, "strict", z.ZodTypeAny, {
2380
+ exportName: string;
2381
+ packageName: string;
2382
+ }, {
2383
+ exportName: string;
2384
+ packageName: string;
2385
+ }>;
2386
+ local: z.ZodObject<{
2387
+ componentKey: z.ZodString;
2388
+ moduleSpecifier: z.ZodEffects<z.ZodString, string, string>;
2389
+ exportName: z.ZodString;
2390
+ implementationFiles: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
2391
+ }, "strict", z.ZodTypeAny, {
2392
+ componentKey: string;
2393
+ exportName: string;
2394
+ moduleSpecifier: string;
2395
+ implementationFiles: string[];
2396
+ }, {
2397
+ componentKey: string;
2398
+ exportName: string;
2399
+ moduleSpecifier: string;
2400
+ implementationFiles: string[];
2401
+ }>;
2402
+ decision: z.ZodObject<{
2403
+ state: z.ZodLiteral<"confirmed">;
2404
+ source: z.ZodEnum<["authored", "migration"]>;
2405
+ }, "strict", z.ZodTypeAny, {
2406
+ state: "confirmed";
2407
+ source: "authored" | "migration";
2408
+ }, {
2409
+ state: "confirmed";
2410
+ source: "authored" | "migration";
2411
+ }>;
2412
+ }, "strict", z.ZodTypeAny, {
2413
+ underlying: {
2414
+ exportName: string;
2415
+ packageName: string;
2416
+ };
2417
+ local: {
2418
+ componentKey: string;
2419
+ exportName: string;
2420
+ moduleSpecifier: string;
2421
+ implementationFiles: string[];
2422
+ };
2423
+ decision: {
2424
+ state: "confirmed";
2425
+ source: "authored" | "migration";
2426
+ };
2427
+ }, {
2428
+ underlying: {
2429
+ exportName: string;
2430
+ packageName: string;
2431
+ };
2432
+ local: {
2433
+ componentKey: string;
2434
+ exportName: string;
2435
+ moduleSpecifier: string;
2436
+ implementationFiles: string[];
2437
+ };
2438
+ decision: {
2439
+ state: "confirmed";
2440
+ source: "authored" | "migration";
2441
+ };
2442
+ }>, "many">, {
2443
+ underlying: {
2444
+ exportName: string;
2445
+ packageName: string;
2446
+ };
2447
+ local: {
2448
+ componentKey: string;
2449
+ exportName: string;
2450
+ moduleSpecifier: string;
2451
+ implementationFiles: string[];
2452
+ };
2453
+ decision: {
2454
+ state: "confirmed";
2455
+ source: "authored" | "migration";
2456
+ };
2457
+ }[], {
2458
+ underlying: {
2459
+ exportName: string;
2460
+ packageName: string;
2461
+ };
2462
+ local: {
2463
+ componentKey: string;
2464
+ exportName: string;
2465
+ moduleSpecifier: string;
2466
+ implementationFiles: string[];
2467
+ };
2468
+ decision: {
2469
+ state: "confirmed";
2470
+ source: "authored" | "migration";
2471
+ };
2472
+ }[]>>;
2276
2473
  presets: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2277
2474
  scales: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2278
2475
  kind: z.ZodDefault<z.ZodLiteral<"scale">>;
@@ -2993,6 +3190,22 @@ declare const governanceConfigSchema: z.ZodObject<{
2993
3190
  exclude?: string[] | undefined;
2994
3191
  registryHash?: string | undefined;
2995
3192
  })[] | undefined;
3193
+ canonicalBridges?: {
3194
+ underlying: {
3195
+ exportName: string;
3196
+ packageName: string;
3197
+ };
3198
+ local: {
3199
+ componentKey: string;
3200
+ exportName: string;
3201
+ moduleSpecifier: string;
3202
+ implementationFiles: string[];
3203
+ };
3204
+ decision: {
3205
+ state: "confirmed";
3206
+ source: "authored" | "migration";
3207
+ };
3208
+ }[] | undefined;
2996
3209
  presets?: string[] | undefined;
2997
3210
  agent?: z.objectOutputType<{
2998
3211
  repairOrder: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -3167,6 +3380,22 @@ declare const governanceConfigSchema: z.ZodObject<{
3167
3380
  registryHash?: string | undefined;
3168
3381
  receiptPath?: string | undefined;
3169
3382
  })[] | undefined;
3383
+ canonicalBridges?: {
3384
+ underlying: {
3385
+ exportName: string;
3386
+ packageName: string;
3387
+ };
3388
+ local: {
3389
+ componentKey: string;
3390
+ exportName: string;
3391
+ moduleSpecifier: string;
3392
+ implementationFiles: string[];
3393
+ };
3394
+ decision: {
3395
+ state: "confirmed";
3396
+ source: "authored" | "migration";
3397
+ };
3398
+ }[] | undefined;
3170
3399
  presets?: string[] | undefined;
3171
3400
  agent?: z.objectInputType<{
3172
3401
  repairOrder: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -3183,20 +3412,47 @@ type ComponentGovernanceRecord = z.infer<typeof componentGovernanceRecordSchema>
3183
3412
  type ComponentPolicyRecord = z.infer<typeof componentPolicyRecordSchema>;
3184
3413
  type ComponentPolicyOverride = z.infer<typeof componentPolicyOverrideSchema>;
3185
3414
  type CanonicalSource = z.infer<typeof canonicalSourceSchema>;
3415
+ type CanonicalBridgeV1 = z.infer<typeof canonicalBridgeV1Schema>;
3186
3416
  interface GovernanceConfig {
3417
+ /** Shared governance config modules to extend before applying this file's declarations. */
3187
3418
  extends?: string[];
3419
+ /** Default severity for governance rules that do not declare their own severity. */
3188
3420
  severity?: GovernanceSeverity;
3421
+ /**
3422
+ * Rule-id keyed enablement and severity overrides. Only fields consumed by the named
3423
+ * rule are valid; unsupported fields are reported as inert config.
3424
+ */
3189
3425
  rules?: Record<string, unknown>;
3426
+ /** Agent-id keyed rule overrides for supported agent-specific governance policies. */
3190
3427
  agents?: Record<string, {
3191
3428
  rules?: Record<string, unknown>;
3192
3429
  }>;
3430
+ /** Reserved audit compatibility object; undeclared child keys are reported as inert. */
3193
3431
  audit?: Record<string, unknown>;
3432
+ /** Reserved runner compatibility map; undeclared child keys are reported as inert. */
3194
3433
  runners?: Record<string, Record<string, unknown>>;
3434
+ /**
3435
+ * Canonical component authorities: npm packages, repository directories, or registry
3436
+ * receipts whose included exports arm canonical-component rules.
3437
+ */
3195
3438
  canonicalSources?: CanonicalSource[];
3439
+ /**
3440
+ * Confirmed mappings from an underlying library export to the approved local wrapper.
3441
+ * The wrapper's implementationFiles scope permits its direct underlying import.
3442
+ */
3443
+ canonicalBridges?: CanonicalBridgeV1[];
3444
+ /** Versioned governance presets to resolve before applying local rule overrides. */
3196
3445
  presets?: string[];
3446
+ /**
3447
+ * Named numeric scales. Spacing rules bind through
3448
+ * style.rawSpacing.mustMatchScale; the built-in spacing policy references `space`.
3449
+ */
3197
3450
  scales?: Record<string, ScaleGovernanceRecord>;
3451
+ /** Legacy typed style-policy records, normalized into the active rule policy. */
3198
3452
  styles?: GlobalStyleGovernanceRecord[];
3453
+ /** Legacy typed JSX-policy records, normalized into the active rule policy. */
3199
3454
  jsx?: GlobalJsxGovernanceRecord[];
3455
+ /** Tailwind palette allow/deny policy used by Tailwind governance rules. */
3200
3456
  tailwind?: {
3201
3457
  palette?: {
3202
3458
  allow?: string[];
@@ -3204,12 +3460,16 @@ interface GovernanceConfig {
3204
3460
  };
3205
3461
  [key: string]: unknown;
3206
3462
  };
3463
+ /** Agent repair-order guidance consumed when presenting deterministic fixes. */
3207
3464
  agent?: {
3208
3465
  repairOrder?: string[];
3209
3466
  [key: string]: unknown;
3210
3467
  };
3468
+ /** Component-keyed governance records for canonical component metadata and prop policy. */
3211
3469
  components?: Record<string, ComponentPolicyRecord>;
3470
+ /** Ordered component-policy overrides selected by component identity fields. */
3212
3471
  overrides?: ComponentPolicyOverride[];
3472
+ /** Governance CI rendering options, including whether warnings fail the CI verdict. */
3213
3473
  ci?: {
3214
3474
  failOnWarnings?: boolean;
3215
3475
  [key: string]: unknown;
@@ -3318,4 +3578,4 @@ declare const g: {
3318
3578
  component: ComponentGovernanceBuilder<Record<string, unknown>>;
3319
3579
  };
3320
3580
 
3321
- export { type DiffResult as $, type AIMetadata as A, type BlockDefinition as B, type CompiledBlock as C, type CompiledRecipe as D, type CompiledTokenData as E, type FragmentDefinition as F, type GovernanceSeverity as G, type CompiledTokenEntry as H, type ComponentGovernanceBuilder as I, type ComponentGovernanceRecord as J, type ComponentRef as K, type ComponentRelation as L, type CompositionMetadata as M, type ContractCanonicalMappingInput as N, type ContractComponentInput as O, type ContractIdentityPin as P, type ContractPolicyInput as Q, type ResolvedGovernedFragmentDefinition as R, type StorybookFilterConfig as S, type TokenConfig as T, type ContractPreimage as U, type VariantRenderOptions as V, type ContractPropMappingInput as W, type ContractTokenInput as X, type ContractWaiverInput as Y, type ControlType as Z, type DesignSystemConfig as _, type FragmentDefinitionV2 as a, type FragmentGenerated$1 as a$, type FigmaPropMapping as a0, type FragmentContract as a1, type FragmentExample as a2, type FragmentGenerated as a3, type FragmentGuidance as a4, type FragmentMeta as a5, type FragmentProvenance as a6, type FragmentUsage as a7, type FragmentVariant as a8, type GlobalGovernanceRecord as a9, type Theme as aA, type ThemeSeeds as aB, type TokenSourceConfig as aC, type TokenSourceFormat as aD, type VerifyRequest as aE, type VerifyResult as aF, type Viewport as aG, componentGovernanceRecordSchema as aH, componentGovernanceRecordsSchema as aI, contractComponentsFromFragments as aJ, contractPolicyFromGovernanceConfig as aK, diffContractDomains as aL, g as aM, globalGovernanceRecordSchema as aN, globalJsxGovernanceRecordSchema as aO, globalStyleGovernanceRecordSchema as aP, governanceConfigSchema as aQ, governanceConfigWithLocalCanonical as aR, governanceSeveritySchema as aS, localCanonicalContractMappings as aT, normalizeGovernanceConfig as aU, projectContractPreimage as aV, scaleGovernanceRecordSchema as aW, verifiedContractPreimageFromPin as aX, type AIMetadata$1 as aY, type ComponentRelation$1 as aZ, type FragmentContract$1 as a_, type GlobalJsxGovernanceRecord as aa, type GlobalStyleGovernanceRecord as ab, type GovernancePropValue as ac, type InspectConfig as ad, type LocalCanonicalDeclaration as ae, type LocalCanonicalResolveRule as af, type Manifest as ag, type ObservedComponentUsage as ah, type ObservedUsageProp as ai, type PlayFunction as aj, type PlayFunctionContext as ak, type PropDefinition as al, type PropGovernanceBuilder as am, type PropGovernanceOptions as an, type PropKey as ao, type PropType as ap, type RecipeDefinition as aq, type RegistryOptions as ar, type RepoRelativePath as as, type ScaleGovernanceRecord as at, type Screenshot as au, type ScreenshotConfig as av, type ScreenshotMetadata as aw, type ServiceConfig as ax, type SnapshotConfig as ay, type SnippetPolicyConfig as az, type CompiledFragment as b, type FragmentMeta$1 as b0, type FragmentUsage$1 as b1, type ImportEntry as b2, type PerformanceData as b3, type PerformanceSummary as b4, type PropDefinition$1 as b5, type Theme$1 as b6, type VerifyResult$1 as b7, type ContractDomain as c, type ContractCatalogInput as d, type GovernedFragmentDefinition as e, type GovernanceConfig as f, type FragmentsConfig as g, type FragmentComponent as h, type FigmaStringMapping as i, type FigmaBooleanMapping as j, type FigmaEnumMapping as k, type FigmaInstanceMapping as l, type FigmaChildrenMapping as m, type FigmaTextContentMapping as n, type RelationshipType as o, type VariantLoader as p, type CanonicalSource as q, type AccessibilityGovernanceBuilder as r, type AppConfig as s, type BaselineInfo as t, type BoundingBox as u, CONTRACT_DOMAINS as v, CONTRACT_PREIMAGE_CAPABILITY_HEADER as w, CONTRACT_PREIMAGE_SCHEMA as x, type CanonicalMappingStatus as y, type CompiledFragmentsFile as z };
3581
+ export { type DesignSystemConfig 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, type CompiledRecipe as H, type CompiledTokenData as I, type CompiledTokenEntry as J, type ComponentGovernanceBuilder as K, type ComponentGovernanceRecord as L, type ComponentRef as M, type ComponentRelation as N, type CompositionMetadata as O, type ContractComponentInput as P, type ContractIdentityPin as Q, type ResolvedGovernedFragmentDefinition as R, type StorybookFilterConfig as S, type TokenConfig as T, type ContractPolicyInput as U, type VariantRenderOptions as V, type ContractPreimage as W, type ContractPropMappingInput as X, type ContractTokenInput as Y, type ContractWaiverInput as Z, type ControlType as _, type FragmentDefinitionV2 as a, type ComponentRelation$1 as a$, type DiffResult as a0, type FigmaPropMapping as a1, type FragmentContract as a2, type FragmentExample as a3, type FragmentGenerated as a4, type FragmentGuidance as a5, type FragmentMeta as a6, type FragmentProvenance as a7, type FragmentUsage as a8, type FragmentVariant as a9, type SnippetPolicyConfig as aA, type Theme as aB, type ThemeSeeds as aC, type TokenSourceConfig as aD, type TokenSourceFormat as aE, type VerifyRequest as aF, type VerifyResult as aG, type Viewport as aH, canonicalBridgeV1Schema as aI, componentGovernanceRecordSchema as aJ, componentGovernanceRecordsSchema as aK, contractComponentsFromFragments as aL, contractPolicyFromGovernanceConfig as aM, diffContractDomains as aN, g as aO, globalGovernanceRecordSchema as aP, globalJsxGovernanceRecordSchema as aQ, globalStyleGovernanceRecordSchema as aR, governanceConfigSchema as aS, governanceConfigWithLocalCanonical as aT, governanceSeveritySchema as aU, localCanonicalContractMappings as aV, normalizeGovernanceConfig as aW, projectContractPreimage as aX, scaleGovernanceRecordSchema as aY, verifiedContractPreimageFromPin as aZ, type AIMetadata$1 as a_, type GlobalGovernanceRecord as aa, type GlobalJsxGovernanceRecord as ab, type GlobalStyleGovernanceRecord as ac, type GovernancePropValue as ad, type InspectConfig as ae, type LocalCanonicalDeclaration as af, type LocalCanonicalResolveRule as ag, type Manifest as ah, type ObservedComponentUsage as ai, type ObservedUsageProp as aj, type PlayFunction as ak, type PlayFunctionContext as al, type PropDefinition as am, type PropGovernanceBuilder as an, type PropGovernanceOptions as ao, type PropKey as ap, type PropType as aq, type RecipeDefinition as ar, type RegistryOptions as as, type RepoRelativePath as at, type ScaleGovernanceRecord as au, type Screenshot as av, type ScreenshotConfig as aw, type ScreenshotMetadata as ax, type ServiceConfig as ay, type SnapshotConfig as az, type CompiledFragment as b, type FragmentContract$1 as b0, type FragmentGenerated$1 as b1, type FragmentMeta$1 as b2, type FragmentUsage$1 as b3, type ImportEntry as b4, type PerformanceData as b5, type PerformanceSummary as b6, type PropDefinition$1 as b7, type Theme$1 as b8, type VerifyResult$1 as b9, type ContractDomain as c, type ContractCatalogInput as d, type GovernedFragmentDefinition as e, type GovernanceConfig as f, type FragmentsConfig as g, type FragmentComponent as h, type FigmaStringMapping as i, type FigmaBooleanMapping as j, type FigmaEnumMapping as k, type FigmaInstanceMapping as l, type FigmaChildrenMapping as m, type FigmaTextContentMapping as n, type RelationshipType as o, type VariantLoader 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 };