canicode 0.9.1 → 0.10.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.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { GetFileResponse, Node } from '@figma/rest-api-spec';
3
3
 
4
- var version = "0.9.1";
4
+ var version = "0.10.0";
5
5
 
6
6
  declare const SeveritySchema: z.ZodEnum<{
7
7
  blocking: "blocking";
@@ -376,6 +376,14 @@ interface RuleViolation {
376
376
  message: string;
377
377
  suggestion: string;
378
378
  guide?: string;
379
+ /**
380
+ * Pre-computed name to write to `node.name` in Figma — populated by naming
381
+ * rules whose suggestion is a deterministic function of the node's existing
382
+ * state (`non-standard-naming`, `inconsistent-naming-convention`).
383
+ * Capitalized for direct Plugin-API use; the human-readable `suggestion`
384
+ * string keeps lowercase prose.
385
+ */
386
+ suggestedName?: string;
379
387
  }
380
388
  /**
381
389
  * Rule check function signature
@@ -503,6 +511,198 @@ declare const VisualCompareCliOptionsSchema: z.ZodObject<{
503
511
  }, z.core.$strip>;
504
512
  type VisualCompareCliOptions = z.infer<typeof VisualCompareCliOptionsSchema>;
505
513
 
514
+ /**
515
+ * Zod schema for the MCP analyze tool response body.
516
+ * This is the shape of the JSON returned by `buildResultJson` in scoring.ts.
517
+ */
518
+ declare const McpAnalyzeResponseSchema: z.ZodObject<{
519
+ version: z.ZodString;
520
+ analyzedAt: z.ZodString;
521
+ fileKey: z.ZodOptional<z.ZodString>;
522
+ fileName: z.ZodString;
523
+ nodeCount: z.ZodNumber;
524
+ maxDepth: z.ZodNumber;
525
+ issueCount: z.ZodNumber;
526
+ isReadyForCodeGen: z.ZodBoolean;
527
+ blockingIssueCount: z.ZodNumber;
528
+ scores: z.ZodObject<{
529
+ overall: z.ZodObject<{
530
+ score: z.ZodNumber;
531
+ maxScore: z.ZodNumber;
532
+ percentage: z.ZodNumber;
533
+ grade: z.ZodEnum<{
534
+ S: "S";
535
+ "A+": "A+";
536
+ A: "A";
537
+ "B+": "B+";
538
+ B: "B";
539
+ "C+": "C+";
540
+ C: "C";
541
+ D: "D";
542
+ F: "F";
543
+ }>;
544
+ }, z.core.$strip>;
545
+ categories: z.ZodRecord<z.ZodEnum<{
546
+ "pixel-critical": "pixel-critical";
547
+ "responsive-critical": "responsive-critical";
548
+ "code-quality": "code-quality";
549
+ "token-management": "token-management";
550
+ semantic: "semantic";
551
+ interaction: "interaction";
552
+ }>, z.ZodObject<{
553
+ category: z.ZodEnum<{
554
+ "pixel-critical": "pixel-critical";
555
+ "responsive-critical": "responsive-critical";
556
+ "code-quality": "code-quality";
557
+ "token-management": "token-management";
558
+ semantic: "semantic";
559
+ interaction: "interaction";
560
+ }>;
561
+ score: z.ZodNumber;
562
+ maxScore: z.ZodNumber;
563
+ percentage: z.ZodNumber;
564
+ issueCount: z.ZodNumber;
565
+ uniqueRuleCount: z.ZodNumber;
566
+ weightedIssueCount: z.ZodNumber;
567
+ densityScore: z.ZodNumber;
568
+ diversityScore: z.ZodNumber;
569
+ bySeverity: z.ZodObject<{
570
+ blocking: z.ZodNumber;
571
+ risk: z.ZodNumber;
572
+ "missing-info": z.ZodNumber;
573
+ suggestion: z.ZodNumber;
574
+ }, z.core.$strip>;
575
+ }, z.core.$strip>>;
576
+ }, z.core.$strip>;
577
+ issuesByRule: z.ZodRecord<z.ZodString, z.ZodNumber>;
578
+ issues: z.ZodArray<z.ZodObject<{
579
+ ruleId: z.ZodString;
580
+ subType: z.ZodOptional<z.ZodString>;
581
+ severity: z.ZodEnum<{
582
+ blocking: "blocking";
583
+ risk: "risk";
584
+ "missing-info": "missing-info";
585
+ suggestion: "suggestion";
586
+ }>;
587
+ nodeId: z.ZodString;
588
+ nodePath: z.ZodString;
589
+ message: z.ZodString;
590
+ }, z.core.$strip>>;
591
+ summary: z.ZodString;
592
+ failedRules: z.ZodOptional<z.ZodArray<z.ZodString>>;
593
+ }, z.core.$strip>;
594
+ type McpAnalyzeResponse = z.infer<typeof McpAnalyzeResponseSchema>;
595
+
596
+ declare const InstanceContextSchema: z.ZodObject<{
597
+ parentInstanceNodeId: z.ZodString;
598
+ sourceNodeId: z.ZodString;
599
+ sourceComponentId: z.ZodOptional<z.ZodString>;
600
+ sourceComponentName: z.ZodOptional<z.ZodString>;
601
+ }, z.core.$strip>;
602
+ type InstanceContext = z.infer<typeof InstanceContextSchema>;
603
+ /**
604
+ * Apply-strategy enum surfaced on survey questions and analyze-output issues.
605
+ * Mirrors `RuleApplyStrategy` in `src/core/gotcha/apply-context.ts` —
606
+ * declared as a Zod enum here so MCP responses validate end-to-end.
607
+ */
608
+ declare const RuleApplyStrategySchema: z.ZodEnum<{
609
+ "property-mod": "property-mod";
610
+ "structural-mod": "structural-mod";
611
+ annotation: "annotation";
612
+ "auto-fix": "auto-fix";
613
+ }>;
614
+ type RuleApplyStrategy = z.infer<typeof RuleApplyStrategySchema>;
615
+ /**
616
+ * Mirrors the `AnnotationProperty` interface in `src/core/roundtrip/types.ts`.
617
+ * Declared here per the project's Zod convention (schemas live in contracts/)
618
+ * so MCP responses validate end-to-end.
619
+ */
620
+ declare const AnnotationPropertySchema: z.ZodObject<{
621
+ type: z.ZodString;
622
+ }, z.core.$strip>;
623
+ declare const GotchaSurveyQuestionSchema: z.ZodObject<{
624
+ nodeId: z.ZodString;
625
+ nodeName: z.ZodString;
626
+ ruleId: z.ZodString;
627
+ severity: z.ZodEnum<{
628
+ blocking: "blocking";
629
+ risk: "risk";
630
+ "missing-info": "missing-info";
631
+ suggestion: "suggestion";
632
+ }>;
633
+ question: z.ZodString;
634
+ hint: z.ZodString;
635
+ example: z.ZodString;
636
+ instanceContext: z.ZodOptional<z.ZodObject<{
637
+ parentInstanceNodeId: z.ZodString;
638
+ sourceNodeId: z.ZodString;
639
+ sourceComponentId: z.ZodOptional<z.ZodString>;
640
+ sourceComponentName: z.ZodOptional<z.ZodString>;
641
+ }, z.core.$strip>>;
642
+ applyStrategy: z.ZodEnum<{
643
+ "property-mod": "property-mod";
644
+ "structural-mod": "structural-mod";
645
+ annotation: "annotation";
646
+ "auto-fix": "auto-fix";
647
+ }>;
648
+ targetProperty: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
649
+ annotationProperties: z.ZodOptional<z.ZodArray<z.ZodObject<{
650
+ type: z.ZodString;
651
+ }, z.core.$strip>>>;
652
+ suggestedName: z.ZodOptional<z.ZodString>;
653
+ isInstanceChild: z.ZodBoolean;
654
+ sourceChildId: z.ZodOptional<z.ZodString>;
655
+ }, z.core.$strip>;
656
+ type GotchaSurveyQuestion = z.infer<typeof GotchaSurveyQuestionSchema>;
657
+ declare const GotchaSurveySchema: z.ZodObject<{
658
+ designGrade: z.ZodEnum<{
659
+ S: "S";
660
+ "A+": "A+";
661
+ A: "A";
662
+ "B+": "B+";
663
+ B: "B";
664
+ "C+": "C+";
665
+ C: "C";
666
+ D: "D";
667
+ F: "F";
668
+ }>;
669
+ isReadyForCodeGen: z.ZodBoolean;
670
+ questions: z.ZodArray<z.ZodObject<{
671
+ nodeId: z.ZodString;
672
+ nodeName: z.ZodString;
673
+ ruleId: z.ZodString;
674
+ severity: z.ZodEnum<{
675
+ blocking: "blocking";
676
+ risk: "risk";
677
+ "missing-info": "missing-info";
678
+ suggestion: "suggestion";
679
+ }>;
680
+ question: z.ZodString;
681
+ hint: z.ZodString;
682
+ example: z.ZodString;
683
+ instanceContext: z.ZodOptional<z.ZodObject<{
684
+ parentInstanceNodeId: z.ZodString;
685
+ sourceNodeId: z.ZodString;
686
+ sourceComponentId: z.ZodOptional<z.ZodString>;
687
+ sourceComponentName: z.ZodOptional<z.ZodString>;
688
+ }, z.core.$strip>>;
689
+ applyStrategy: z.ZodEnum<{
690
+ "property-mod": "property-mod";
691
+ "structural-mod": "structural-mod";
692
+ annotation: "annotation";
693
+ "auto-fix": "auto-fix";
694
+ }>;
695
+ targetProperty: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
696
+ annotationProperties: z.ZodOptional<z.ZodArray<z.ZodObject<{
697
+ type: z.ZodString;
698
+ }, z.core.$strip>>>;
699
+ suggestedName: z.ZodOptional<z.ZodString>;
700
+ isInstanceChild: z.ZodBoolean;
701
+ sourceChildId: z.ZodOptional<z.ZodString>;
702
+ }, z.core.$strip>>;
703
+ }, z.core.$strip>;
704
+ type GotchaSurvey = z.infer<typeof GotchaSurveySchema>;
705
+
506
706
  /**
507
707
  * Analysis issue with calculated score and metadata
508
708
  */
@@ -617,6 +817,12 @@ interface ScoreReport {
617
817
  * Grade levels based on percentage
618
818
  */
619
819
  type Grade = "S" | "A+" | "A" | "B+" | "B" | "C+" | "C" | "D" | "F";
820
+ /**
821
+ * Returns true if the design is ready for code generation.
822
+ * S, A+, and A grades (percentage >= 85) indicate the design has minimal blockers
823
+ * and can be implemented accurately by AI or developers.
824
+ */
825
+ declare function isReadyForCodeGen(grade: Grade): boolean;
620
826
  /**
621
827
  * Convert grade to a CSS-safe class name suffix
622
828
  * e.g. "A+" -> "Aplus", "B+" -> "Bplus", "C+" -> "Cplus"
@@ -903,6 +1109,60 @@ declare function stripDeltaToDifficulty(delta: number): Difficulty;
903
1109
  */
904
1110
  declare function tokenDeltaToDifficulty(baselineTokens: number, strippedTokens: number): Difficulty;
905
1111
 
1112
+ /**
1113
+ * Write strategy for a gotcha apply target. Consumers can branch on this enum
1114
+ * without parsing the human-readable `guidance` string.
1115
+ *
1116
+ * - `scene-only`: plain scene node id, no instance handling needed.
1117
+ * - `prefer-definition`: instance-child id + resolved `instanceContext`; layout
1118
+ * and min/max writes should go to the definition node after user confirmation.
1119
+ * - `definition-unknown`: instance-child id but `instanceContext` is missing;
1120
+ * caller must resolve the source component at runtime.
1121
+ */
1122
+ type GotchaApplyStrategy = "scene-only" | "prefer-definition" | "definition-unknown";
1123
+ /**
1124
+ * Resolved targets for applying gotcha fixes in Figma (Plugin API or MCP `use_figma`).
1125
+ *
1126
+ * Survey questions may include `instanceContext` when the violation `nodeId` is an
1127
+ * instance-child id (`I...;...`). Property overrides often fail on those scene nodes;
1128
+ * the definition node id is the usual write target after user confirmation.
1129
+ */
1130
+ type GotchaApplyResolution = {
1131
+ /** Scene node id from the survey (`question.nodeId`). */
1132
+ sceneNodeId: string;
1133
+ /** Source definition node id from `instanceContext.sourceNodeId`, when known. */
1134
+ definitionNodeId: string | undefined;
1135
+ /** Machine-readable write strategy — branch on this from TS consumers. */
1136
+ strategy: GotchaApplyStrategy;
1137
+ /**
1138
+ * Opt-in hints for the caller. Fields in this namespace take effect ONLY
1139
+ * when the caller has enabled `allowDefinitionWrite` on the roundtrip helper.
1140
+ * Under the ADR-012 default (opt-in off), these are informational — the
1141
+ * actual write still routes to scene-then-annotate regardless.
1142
+ *
1143
+ * ADR-012 Q5: future per-rule opt-in fields grow under this namespace.
1144
+ */
1145
+ optIn: {
1146
+ /**
1147
+ * Hint that the definition node is the better write target for layout and
1148
+ * min/max size-constraint writes on this node. Takes effect only when
1149
+ * `allowDefinitionWrite` is enabled — otherwise the helper annotates the
1150
+ * scene and names the source component without propagating.
1151
+ */
1152
+ preferDefinitionForLayoutProps: boolean;
1153
+ };
1154
+ /**
1155
+ * Human-readable note for skills, UI, or logs. Skill-oriented (may reference
1156
+ * Plugin API calls like `getMainComponentAsync`). TS consumers should branch
1157
+ * on `strategy` instead of parsing this string.
1158
+ */
1159
+ guidance: string;
1160
+ };
1161
+ /**
1162
+ * Resolve which node ids and policy apply for a gotcha survey question.
1163
+ */
1164
+ declare function resolveGotchaApplyTarget(nodeId: string, instanceContext: InstanceContext | undefined): GotchaApplyResolution;
1165
+
906
1166
  /**
907
1167
  * Registry for all rules
908
1168
  */
@@ -950,6 +1210,10 @@ declare const ruleRegistry: RuleRegistry;
950
1210
  */
951
1211
  declare function defineRule(rule: Rule): Rule;
952
1212
 
1213
+ interface AnnotationProperty {
1214
+ type: string;
1215
+ }
1216
+
953
1217
  /**
954
1218
  * Maps each rule ID to its category.
955
1219
  * Categories are based on ablation experiment data (PR #149, #150):
@@ -981,6 +1245,26 @@ type Preset = "relaxed" | "dev-friendly" | "ai-ready" | "strict";
981
1245
  * Get rule configs with preset applied
982
1246
  */
983
1247
  declare function getConfigsWithPreset(preset: Preset): Record<RuleId, RuleConfig>;
1248
+ /**
1249
+ * Per-rule annotation `properties` hints surfaced in Dev Mode. Kept as a
1250
+ * sibling map rather than a field on `RuleConfig` so the existing
1251
+ * `RuleConfigSchema` Zod contract and preset helpers stay untouched.
1252
+ *
1253
+ * `bySubType` takes precedence over `default` — mirrors the ruleId+subType
1254
+ * resolution pattern already used for `targetProperty` in apply-context.ts.
1255
+ * The Experiment 09 node-type matrix is enforced at write time by
1256
+ * `upsertCanicodeAnnotation`'s retry path, so hints can be passed
1257
+ * speculatively without server-side filtering.
1258
+ */
1259
+ declare const RULE_ANNOTATION_PROPERTIES: Partial<Record<RuleId, {
1260
+ default?: AnnotationProperty[];
1261
+ bySubType?: Record<string, AnnotationProperty[]>;
1262
+ }>>;
1263
+ /**
1264
+ * Resolve the annotation `properties` hint for a ruleId (+ subType).
1265
+ * Returns `undefined` for rules with no entry.
1266
+ */
1267
+ declare function getAnnotationProperties(ruleId: RuleId, subType?: string): AnnotationProperty[] | undefined;
984
1268
  /**
985
1269
  * Get option value for a rule with type safety
986
1270
  */
@@ -1026,6 +1310,28 @@ declare class FigmaUrlParseError extends Error {
1026
1310
  declare function toCommentableNodeId(nodeId: string): string;
1027
1311
  declare function buildFigmaDeepLink(fileKey: string, nodeId: string): string;
1028
1312
 
1313
+ /**
1314
+ * Parse Figma instance-child node IDs.
1315
+ *
1316
+ * Nodes inside an instance carry an `I`-prefixed id with semicolon-separated
1317
+ * path segments: `I<parentInstanceId>;<sourceNodeId>`. For nested instances
1318
+ * the format chains further, e.g. `I<parentId>;<midId>;<sourceNodeId>` —
1319
+ * each `;` represents one additional level of instance expansion. The LAST
1320
+ * segment is always the id of the node inside the innermost source component,
1321
+ * which is reachable directly via `figma.getNodeById`.
1322
+ *
1323
+ * Siblings: `figma-url-parser.ts#toCommentableNodeId` handles the same id
1324
+ * format for a different purpose (stripping for the Comments API). That
1325
+ * helper is intentionally left alone — this module owns id parsing for the
1326
+ * apply pipeline.
1327
+ */
1328
+ interface InstanceChildIdParts {
1329
+ parentInstanceId: string;
1330
+ sourceNodeId: string;
1331
+ }
1332
+ declare function isInstanceChildNodeId(nodeId: string): boolean;
1333
+ declare function parseInstanceChildNodeId(nodeId: string): InstanceChildIdParts | null;
1334
+
1029
1335
  interface GetFileNodesResponse {
1030
1336
  name: string;
1031
1337
  lastModified: string;
@@ -1543,4 +1849,4 @@ declare class ActivityLogger {
1543
1849
  getLogPath(): string;
1544
1850
  }
1545
1851
 
1546
- export { ALL_STRIP_TYPES, ActivityLogger, type AnalysisAgentInput, type AnalysisAgentOutput, type AnalysisFile, AnalysisFileSchema, type AnalysisIssue, type AnalysisNode, AnalysisNodeSchema, type AnalysisNodeType, AnalysisNodeTypeSchema, type AnalysisResult, CATEGORIES, CATEGORY_LABELS, type CalibrationConfig, type CalibrationConfigInput, CalibrationConfigSchema, type CalibrationRun, type CalibrationStatus, CalibrationStatusSchema, type Category, CategorySchema, type CategoryScore, type CategoryScoreResult, CategoryScoreSchema, type Confidence, ConfidenceSchema, type ConversionRecord, ConversionRecordSchema, DEPTH_WEIGHT_CATEGORIES, DESIGN_TREE_INFO_TYPES, type DesignTreeInfoType, type DesignTreeOptions, type DesignTreeResult, type DesignTreeStripType, type Difficulty, DifficultySchema, type EvaluationAgentInput, type EvaluationAgentOutput, FigmaClient, FigmaClientError, type FigmaClientOptions, FigmaFileLoadError, type FigmaUrlInfo, FigmaUrlInfoSchema, FigmaUrlParseError, type GapAnalyzerOutput, GapAnalyzerOutputSchema, type GapEntry, GapEntrySchema, type GetFileNodesResponse, type Grade, type GridChildAlign, GridChildAlignSchema, type Issue, IssueSchema, type LayoutAlign, LayoutAlignSchema, type LayoutConstraint, LayoutConstraintSchema, type LayoutMode, LayoutModeSchema, type LayoutPositioning, LayoutPositioningSchema, type LayoutWrap, LayoutWrapSchema, type MismatchCase, MismatchCaseSchema, type MismatchType, MismatchTypeSchema, type NewRuleProposal, NewRuleProposalSchema, type NodeIssueDetail, type NodeIssueSummary, NodeIssueSummarySchema, type OverflowDirection, OverflowDirectionSchema, type Preset, RULE_CONFIGS, RULE_ID_CATEGORY, type Report, type ReportMetadata, ReportMetadataSchema, ReportSchema, type Rule, type RuleCheckFn, type RuleConfig, RuleConfigSchema, type RuleContext, type RuleDefinition, RuleDefinitionSchema, RuleEngine, type RuleEngineOptions, type RuleFailure, type RuleId, RuleImpactAssessmentSchema, type RuleRelatedStruggle, RuleRelatedStruggleSchema, type RuleViolation, SEVERITY_LABELS, SEVERITY_WEIGHT, type SamplingStrategy, SamplingStrategySchema, type ScoreAdjustment, ScoreAdjustmentSchema, type ScoreReport, type Severity, SeveritySchema, type StripDeltaForEval, type StripDeltaResult, StripDeltaResultSchema, StripDeltasArraySchema, StripTypeEnum, type TuningAgentInput, type TuningAgentOutput, type UncoveredStruggle, UncoveredStruggleSchema, UncoveredStrugglesInputSchema, version as VERSION, type VisualCompareCliOptions, VisualCompareCliOptionsSchema, absolutePositionInAutoLayout, analyzeFile, buildFigmaDeepLink, buildResultJson, calculateScores, collectComponentIds, collectInteractionDestinationIds, createRuleEngine, deepNesting, defineRule, detachedInstance, extractRuleScores, fixedSizeInAutoLayout, formatScoreSummary, generateCalibrationReport, generateDesignTree, generateDesignTreeWithStats, getAnalysisState, getCategoryLabel, getConfigsWithPreset, getRuleOption, getSeverityLabel, gradeToClassName, inconsistentNamingConvention, irregularSpacing, loadFigmaFileFromJson, missingComponent, missingInteractionState, missingPrototype, missingSizeConstraint, noAutoLayout, nonLayoutContainer, nonSemanticName, nonStandardNaming, parseFigmaJson, parseFigmaUrl, rawValue, resolveComponentDefinitions, resolveInteractionDestinations, ruleRegistry, runAnalysisAgent, runCalibrationAnalyze, runCalibrationEvaluate, runEvaluationAgent, runTuningAgent, stripDeltaToDifficulty, stripDesignTree, supportsDepthWeight, toCommentableNodeId, tokenDeltaToDifficulty, transformComponentMasterNodes, transformFigmaResponse, transformFileNodesResponse, variantStructureMismatch };
1852
+ export { ALL_STRIP_TYPES, ActivityLogger, type AnalysisAgentInput, type AnalysisAgentOutput, type AnalysisFile, AnalysisFileSchema, type AnalysisIssue, type AnalysisNode, AnalysisNodeSchema, type AnalysisNodeType, AnalysisNodeTypeSchema, type AnalysisResult, AnnotationPropertySchema, CATEGORIES, CATEGORY_LABELS, type CalibrationConfig, type CalibrationConfigInput, CalibrationConfigSchema, type CalibrationRun, type CalibrationStatus, CalibrationStatusSchema, type Category, CategorySchema, type CategoryScore, type CategoryScoreResult, CategoryScoreSchema, type Confidence, ConfidenceSchema, type ConversionRecord, ConversionRecordSchema, DEPTH_WEIGHT_CATEGORIES, DESIGN_TREE_INFO_TYPES, type DesignTreeInfoType, type DesignTreeOptions, type DesignTreeResult, type DesignTreeStripType, type Difficulty, DifficultySchema, type EvaluationAgentInput, type EvaluationAgentOutput, FigmaClient, FigmaClientError, type FigmaClientOptions, FigmaFileLoadError, type FigmaUrlInfo, FigmaUrlInfoSchema, FigmaUrlParseError, type GapAnalyzerOutput, GapAnalyzerOutputSchema, type GapEntry, GapEntrySchema, type GetFileNodesResponse, type GotchaApplyResolution, type GotchaApplyStrategy, type GotchaSurvey, type GotchaSurveyQuestion, GotchaSurveyQuestionSchema, GotchaSurveySchema, type Grade, type GridChildAlign, GridChildAlignSchema, type InstanceChildIdParts, type InstanceContext, InstanceContextSchema, type Issue, IssueSchema, type LayoutAlign, LayoutAlignSchema, type LayoutConstraint, LayoutConstraintSchema, type LayoutMode, LayoutModeSchema, type LayoutPositioning, LayoutPositioningSchema, type LayoutWrap, LayoutWrapSchema, type McpAnalyzeResponse, McpAnalyzeResponseSchema, type MismatchCase, MismatchCaseSchema, type MismatchType, MismatchTypeSchema, type NewRuleProposal, NewRuleProposalSchema, type NodeIssueDetail, type NodeIssueSummary, NodeIssueSummarySchema, type OverflowDirection, OverflowDirectionSchema, type Preset, RULE_ANNOTATION_PROPERTIES, RULE_CONFIGS, RULE_ID_CATEGORY, type Report, type ReportMetadata, ReportMetadataSchema, ReportSchema, type Rule, type RuleApplyStrategy, RuleApplyStrategySchema, type RuleCheckFn, type RuleConfig, RuleConfigSchema, type RuleContext, type RuleDefinition, RuleDefinitionSchema, RuleEngine, type RuleEngineOptions, type RuleFailure, type RuleId, RuleImpactAssessmentSchema, type RuleRelatedStruggle, RuleRelatedStruggleSchema, type RuleViolation, SEVERITY_LABELS, SEVERITY_WEIGHT, type SamplingStrategy, SamplingStrategySchema, type ScoreAdjustment, ScoreAdjustmentSchema, type ScoreReport, type Severity, SeveritySchema, type StripDeltaForEval, type StripDeltaResult, StripDeltaResultSchema, StripDeltasArraySchema, StripTypeEnum, type TuningAgentInput, type TuningAgentOutput, type UncoveredStruggle, UncoveredStruggleSchema, UncoveredStrugglesInputSchema, version as VERSION, type VisualCompareCliOptions, VisualCompareCliOptionsSchema, absolutePositionInAutoLayout, analyzeFile, buildFigmaDeepLink, buildResultJson, calculateScores, collectComponentIds, collectInteractionDestinationIds, createRuleEngine, deepNesting, defineRule, detachedInstance, extractRuleScores, fixedSizeInAutoLayout, formatScoreSummary, generateCalibrationReport, generateDesignTree, generateDesignTreeWithStats, getAnalysisState, getAnnotationProperties, getCategoryLabel, getConfigsWithPreset, getRuleOption, getSeverityLabel, gradeToClassName, inconsistentNamingConvention, irregularSpacing, isInstanceChildNodeId, isReadyForCodeGen, loadFigmaFileFromJson, missingComponent, missingInteractionState, missingPrototype, missingSizeConstraint, noAutoLayout, nonLayoutContainer, nonSemanticName, nonStandardNaming, parseFigmaJson, parseFigmaUrl, parseInstanceChildNodeId, rawValue, resolveComponentDefinitions, resolveGotchaApplyTarget, resolveInteractionDestinations, ruleRegistry, runAnalysisAgent, runCalibrationAnalyze, runCalibrationEvaluate, runEvaluationAgent, runTuningAgent, stripDeltaToDifficulty, stripDesignTree, supportsDepthWeight, toCommentableNodeId, tokenDeltaToDifficulty, transformComponentMasterNodes, transformFigmaResponse, transformFileNodesResponse, variantStructureMismatch };