canicode 0.11.5 → 0.12.1

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,13 +1,14 @@
1
1
  import { z } from 'zod';
2
2
  import { GetFileResponse, Node } from '@figma/rest-api-spec';
3
3
 
4
- var version = "0.11.5";
4
+ var version = "0.12.1";
5
5
 
6
6
  declare const SeveritySchema: z.ZodEnum<{
7
7
  blocking: "blocking";
8
8
  risk: "risk";
9
9
  "missing-info": "missing-info";
10
10
  suggestion: "suggestion";
11
+ note: "note";
11
12
  }>;
12
13
  type Severity = z.infer<typeof SeveritySchema>;
13
14
  declare const SEVERITY_WEIGHT: Record<Severity, number>;
@@ -376,6 +377,35 @@ type Category = z.infer<typeof CategorySchema>;
376
377
  declare const CATEGORIES: ("pixel-critical" | "responsive-critical" | "code-quality" | "token-management" | "semantic" | "interaction")[];
377
378
  declare const CATEGORY_LABELS: Record<Category, string>;
378
379
 
380
+ declare const AcknowledgmentSchema: z.ZodObject<{
381
+ nodeId: z.ZodString;
382
+ ruleId: z.ZodString;
383
+ intent: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDiscriminatedUnion<[z.ZodObject<{
384
+ kind: z.ZodDefault<z.ZodLiteral<"property">>;
385
+ field: z.ZodString;
386
+ value: z.ZodUnknown;
387
+ scope: z.ZodEnum<{
388
+ instance: "instance";
389
+ definition: "definition";
390
+ }>;
391
+ }, z.core.$strip>, z.ZodObject<{
392
+ kind: z.ZodLiteral<"rule-opt-out">;
393
+ ruleId: z.ZodString;
394
+ }, z.core.$strict>], "kind">>>;
395
+ sceneWriteOutcome: z.ZodOptional<z.ZodObject<{
396
+ result: z.ZodEnum<{
397
+ unknown: "unknown";
398
+ succeeded: "succeeded";
399
+ "silent-ignored": "silent-ignored";
400
+ "api-rejected": "api-rejected";
401
+ "user-declined-propagation": "user-declined-propagation";
402
+ }>;
403
+ reason: z.ZodOptional<z.ZodString>;
404
+ }, z.core.$strip>>;
405
+ codegenDirective: z.ZodOptional<z.ZodString>;
406
+ }, z.core.$strip>;
407
+ type Acknowledgment = z.infer<typeof AcknowledgmentSchema>;
408
+
379
409
  /**
380
410
  * Rule definition - static metadata (does not change)
381
411
  */
@@ -404,6 +434,7 @@ declare const RuleConfigSchema: z.ZodObject<{
404
434
  risk: "risk";
405
435
  "missing-info": "missing-info";
406
436
  suggestion: "suggestion";
437
+ note: "note";
407
438
  }>;
408
439
  score: z.ZodNumber;
409
440
  depthWeight: z.ZodOptional<z.ZodNumber>;
@@ -449,6 +480,20 @@ interface RuleContext {
449
480
  * sync with `AnalysisNode.type` without a translation layer.
450
481
  */
451
482
  rootNodeType: string;
483
+ /**
484
+ * ADR-022: lookup canicode-authored acknowledgments by `(nodeId, ruleId)`.
485
+ * The rule engine builds this from `RuleEngineOptions.acknowledgments` and
486
+ * exposes it to every rule so individual rules can short-circuit (suppress
487
+ * emission) when an acknowledgment carries a rule-opt-out intent. The
488
+ * existing density-half-weight semantic (#371) is unchanged — that path
489
+ * still flags `acknowledged: true` post-emit and is independent of this
490
+ * helper.
491
+ *
492
+ * Returns the matching acknowledgment, or `undefined` when there is no
493
+ * acknowledgment for the pair. Node ids are normalised by the engine, so
494
+ * callers can pass URL-style or Plugin-API-style ids interchangeably.
495
+ */
496
+ findAcknowledgment: (nodeId: string, ruleId: string) => Acknowledgment | undefined;
452
497
  }
453
498
  /**
454
499
  * Get or initialize per-analysis state for a rule.
@@ -489,7 +534,7 @@ interface Rule {
489
534
  /**
490
535
  * Rule ID type for type safety
491
536
  */
492
- type RuleId = "no-auto-layout" | "absolute-position-in-auto-layout" | "non-layout-container" | "fixed-size-in-auto-layout" | "missing-size-constraint" | "missing-component" | "detached-instance" | "variant-structure-mismatch" | "deep-nesting" | "raw-value" | "irregular-spacing" | "missing-interaction-state" | "missing-prototype" | "non-standard-naming" | "non-semantic-name" | "inconsistent-naming-convention";
537
+ type RuleId = "no-auto-layout" | "absolute-position-in-auto-layout" | "non-layout-container" | "fixed-size-in-auto-layout" | "missing-size-constraint" | "missing-component" | "detached-instance" | "variant-structure-mismatch" | "deep-nesting" | "unmapped-component" | "raw-value" | "irregular-spacing" | "missing-interaction-state" | "missing-prototype" | "non-standard-naming" | "non-semantic-name" | "inconsistent-naming-convention";
493
538
  /**
494
539
  * Categories that support depthWeight
495
540
  */
@@ -510,6 +555,7 @@ declare const IssueSchema: z.ZodObject<{
510
555
  risk: "risk";
511
556
  "missing-info": "missing-info";
512
557
  suggestion: "suggestion";
558
+ note: "note";
513
559
  }>;
514
560
  }, z.core.$strip>;
515
561
  type Issue = z.infer<typeof IssueSchema>;
@@ -576,6 +622,7 @@ declare const ReportSchema: z.ZodObject<{
576
622
  risk: "risk";
577
623
  "missing-info": "missing-info";
578
624
  suggestion: "suggestion";
625
+ note: "note";
579
626
  }>;
580
627
  }, z.core.$strip>>;
581
628
  summary: z.ZodObject<{
@@ -665,6 +712,7 @@ declare const McpAnalyzeResponseSchema: z.ZodObject<{
665
712
  risk: z.ZodNumber;
666
713
  "missing-info": z.ZodNumber;
667
714
  suggestion: z.ZodNumber;
715
+ note: z.ZodNumber;
668
716
  }, z.core.$strip>;
669
717
  }, z.core.$strip>>;
670
718
  }, z.core.$strip>;
@@ -688,6 +736,7 @@ declare const McpAnalyzeResponseSchema: z.ZodObject<{
688
736
  risk: "risk";
689
737
  "missing-info": "missing-info";
690
738
  suggestion: "suggestion";
739
+ note: "note";
691
740
  }>;
692
741
  nodeId: z.ZodString;
693
742
  nodePath: z.ZodString;
@@ -695,6 +744,10 @@ declare const McpAnalyzeResponseSchema: z.ZodObject<{
695
744
  }, z.core.$strip>>;
696
745
  summary: z.ZodString;
697
746
  failedRules: z.ZodOptional<z.ZodArray<z.ZodString>>;
747
+ codeConnectCoverage: z.ZodOptional<z.ZodObject<{
748
+ mapped: z.ZodNumber;
749
+ total: z.ZodNumber;
750
+ }, z.core.$strip>>;
698
751
  }, z.core.$strip>;
699
752
  type McpAnalyzeResponse = z.infer<typeof McpAnalyzeResponseSchema>;
700
753
 
@@ -757,6 +810,7 @@ declare const GotchaSurveyQuestionSchema: z.ZodObject<{
757
810
  risk: "risk";
758
811
  "missing-info": "missing-info";
759
812
  suggestion: "suggestion";
813
+ note: "note";
760
814
  }>;
761
815
  question: z.ZodString;
762
816
  hint: z.ZodString;
@@ -823,6 +877,7 @@ declare const SurveyQuestionBatchSchema: z.ZodObject<{
823
877
  risk: "risk";
824
878
  "missing-info": "missing-info";
825
879
  suggestion: "suggestion";
880
+ note: "note";
826
881
  }>;
827
882
  question: z.ZodString;
828
883
  hint: z.ZodString;
@@ -886,6 +941,7 @@ declare const SurveyQuestionGroupSchema: z.ZodObject<{
886
941
  risk: "risk";
887
942
  "missing-info": "missing-info";
888
943
  suggestion: "suggestion";
944
+ note: "note";
889
945
  }>;
890
946
  question: z.ZodString;
891
947
  hint: z.ZodString;
@@ -951,6 +1007,7 @@ declare const GroupedSurveySchema: z.ZodObject<{
951
1007
  risk: "risk";
952
1008
  "missing-info": "missing-info";
953
1009
  suggestion: "suggestion";
1010
+ note: "note";
954
1011
  }>;
955
1012
  question: z.ZodString;
956
1013
  hint: z.ZodString;
@@ -1015,6 +1072,7 @@ declare const GotchaSurveySchema: z.ZodObject<{
1015
1072
  risk: "risk";
1016
1073
  "missing-info": "missing-info";
1017
1074
  suggestion: "suggestion";
1075
+ note: "note";
1018
1076
  }>;
1019
1077
  question: z.ZodString;
1020
1078
  hint: z.ZodString;
@@ -1076,6 +1134,7 @@ declare const GotchaSurveySchema: z.ZodObject<{
1076
1134
  risk: "risk";
1077
1135
  "missing-info": "missing-info";
1078
1136
  suggestion: "suggestion";
1137
+ note: "note";
1079
1138
  }>;
1080
1139
  question: z.ZodString;
1081
1140
  hint: z.ZodString;
@@ -1111,31 +1170,6 @@ declare const GotchaSurveySchema: z.ZodObject<{
1111
1170
  }, z.core.$strip>;
1112
1171
  type GotchaSurvey = z.infer<typeof GotchaSurveySchema>;
1113
1172
 
1114
- declare const AcknowledgmentSchema: z.ZodObject<{
1115
- nodeId: z.ZodString;
1116
- ruleId: z.ZodString;
1117
- intent: z.ZodOptional<z.ZodObject<{
1118
- field: z.ZodString;
1119
- value: z.ZodUnknown;
1120
- scope: z.ZodEnum<{
1121
- instance: "instance";
1122
- definition: "definition";
1123
- }>;
1124
- }, z.core.$strip>>;
1125
- sceneWriteOutcome: z.ZodOptional<z.ZodObject<{
1126
- result: z.ZodEnum<{
1127
- unknown: "unknown";
1128
- succeeded: "succeeded";
1129
- "silent-ignored": "silent-ignored";
1130
- "api-rejected": "api-rejected";
1131
- "user-declined-propagation": "user-declined-propagation";
1132
- }>;
1133
- reason: z.ZodOptional<z.ZodString>;
1134
- }, z.core.$strip>>;
1135
- codegenDirective: z.ZodOptional<z.ZodString>;
1136
- }, z.core.$strip>;
1137
- type Acknowledgment = z.infer<typeof AcknowledgmentSchema>;
1138
-
1139
1173
  /**
1140
1174
  * Analysis issue with calculated score and metadata.
1141
1175
  *
@@ -1222,6 +1256,7 @@ declare class RuleEngine {
1222
1256
  private excludeNamePattern;
1223
1257
  private excludeNodeTypes;
1224
1258
  private acknowledgments;
1259
+ private acknowledgmentsByKey;
1225
1260
  private scopeOverride;
1226
1261
  constructor(options?: RuleEngineOptions);
1227
1262
  /**
@@ -1278,6 +1313,7 @@ interface ScoreReport {
1278
1313
  risk: number;
1279
1314
  missingInfo: number;
1280
1315
  suggestion: number;
1316
+ note: number;
1281
1317
  nodeCount: number;
1282
1318
  /**
1283
1319
  * Number of issues marked `acknowledged` by an upstream
@@ -1342,6 +1378,50 @@ declare function getCategoryLabel(category: Category): string;
1342
1378
  * Get severity label for display
1343
1379
  */
1344
1380
  declare function getSeverityLabel(severity: Severity): string;
1381
+ /**
1382
+ * Code Connect mapping coverage metric (#526 sub-task 3). Surfaces how many of
1383
+ * the file's components are already wired to a code path via a `figma.connect`
1384
+ * declaration. Optional — only computed when the consuming repo has Code
1385
+ * Connect set up (figma.config.json present).
1386
+ */
1387
+ interface CodeConnectCoverage {
1388
+ /** Number of components in this file that have a Code Connect mapping. */
1389
+ mapped: number;
1390
+ /** Total components in this file (numerator + unmapped). */
1391
+ total: number;
1392
+ }
1393
+ /**
1394
+ * Format the coverage line that ships in the analyze summary. Kept exported
1395
+ * so consumers (HTML report, MCP wrapper) render the same wording.
1396
+ */
1397
+ declare function formatCodeConnectCoverageLine(coverage: CodeConnectCoverage): string;
1398
+ /**
1399
+ * ADR-022 / #526 sub-task 2: standalone analyze hint.
1400
+ *
1401
+ * `canicode analyze` and the MCP `analyze` tool cannot read Figma annotations
1402
+ * directly — the REST `annotations` field is private beta. When the
1403
+ * `unmapped-component` rule fires AND the caller did not supply an
1404
+ * acknowledgments list, surface a one-line hint telling the user that any
1405
+ * roundtrip-recorded opt-outs are invisible to standalone analyze and that
1406
+ * `/canicode-roundtrip` will apply them.
1407
+ *
1408
+ * Returns `null` when:
1409
+ * - no `unmapped-component` issue fired (nothing to explain), or
1410
+ * - acknowledgments were supplied (roundtrip mode — opt-outs already applied
1411
+ * and any remaining issues are real). `acknowledgmentsProvided` MUST track
1412
+ * whether the caller passed an ack channel at all, NOT whether the array
1413
+ * was non-empty: a roundtrip on a clean file legitimately passes `[]` and
1414
+ * the hint would be misleading there.
1415
+ *
1416
+ * The hint is informational; it never moves the score, never bumps severity,
1417
+ * and is independent of the count of `unmapped-component` issues.
1418
+ */
1419
+ declare const ROUNDTRIP_OPT_OUT_HINT = "Some components may carry roundtrip-recorded opt-outs that this standalone analyze cannot see (Figma REST annotations field is in private beta). Run /canicode-roundtrip to apply opt-outs.";
1420
+ declare function formatRoundtripOptOutHintLine(issues: ReadonlyArray<{
1421
+ violation: {
1422
+ ruleId: string;
1423
+ };
1424
+ }>, acknowledgmentsProvided: boolean): string | null;
1345
1425
  /**
1346
1426
  * Build a JSON-serializable analysis result summary.
1347
1427
  * Shared by CLI (--json) and MCP server (analyze tool response).
@@ -1350,6 +1430,16 @@ declare function buildResultJson(fileName: string, result: AnalysisResult, score
1350
1430
  fileKey?: string;
1351
1431
  designKey?: string;
1352
1432
  codegenReadyMinGrade?: Grade;
1433
+ codeConnectCoverage?: CodeConnectCoverage;
1434
+ /**
1435
+ * ADR-022 / #526 sub-task 2: when true, the engine was called WITHOUT
1436
+ * an `acknowledgments` channel (standalone CLI / MCP `analyze`) and
1437
+ * `unmapped-component` opt-outs recorded via roundtrip cannot be seen.
1438
+ * Surfaces a `roundtripOptOutHint` field on the JSON response and
1439
+ * appends a hint line to `summary` when at least one
1440
+ * `unmapped-component` issue fired.
1441
+ */
1442
+ roundtripOptOutHintEligible?: boolean;
1353
1443
  }): Record<string, unknown>;
1354
1444
 
1355
1445
  /**
@@ -1806,6 +1896,7 @@ declare const irregularSpacing: Rule;
1806
1896
  declare const missingComponent: Rule;
1807
1897
  declare const detachedInstance: Rule;
1808
1898
  declare const variantStructureMismatch: Rule;
1899
+ declare const unmappedComponent: Rule;
1809
1900
 
1810
1901
  declare const nonSemanticName: Rule;
1811
1902
  declare const inconsistentNamingConvention: Rule;
@@ -1890,6 +1981,21 @@ declare class FigmaClient {
1890
1981
  * Download an image URL and return as base64
1891
1982
  */
1892
1983
  fetchImageAsBase64(imageUrl: string): Promise<string>;
1984
+ /**
1985
+ * Get the components a file has published to a team library.
1986
+ *
1987
+ * `GET /v1/files/:file_key/components` returns only components that have
1988
+ * been pushed via the Publish Library action — local-but-unpublished
1989
+ * components are absent. This is the authoritative way to detect whether
1990
+ * a Figma component is mappable via Code Connect (#532): `add_code_connect_map`
1991
+ * requires a published component and otherwise fails with "Published
1992
+ * component not found."
1993
+ */
1994
+ getPublishedComponents(fileKey: string): Promise<Array<{
1995
+ key: string;
1996
+ node_id: string;
1997
+ name: string;
1998
+ }>>;
1893
1999
  getFileNodes(fileKey: string, nodeIds: string[]): Promise<GetFileNodesResponse>;
1894
2000
  }
1895
2001
  declare class FigmaClientError extends Error {
@@ -2045,6 +2151,7 @@ declare const MismatchCaseSchema: z.ZodObject<{
2045
2151
  risk: "risk";
2046
2152
  "missing-info": "missing-info";
2047
2153
  suggestion: "suggestion";
2154
+ note: "note";
2048
2155
  }>>;
2049
2156
  actualDifficulty: z.ZodEnum<{
2050
2157
  easy: "easy";
@@ -2154,12 +2261,14 @@ declare const ScoreAdjustmentSchema: z.ZodObject<{
2154
2261
  risk: "risk";
2155
2262
  "missing-info": "missing-info";
2156
2263
  suggestion: "suggestion";
2264
+ note: "note";
2157
2265
  }>;
2158
2266
  proposedSeverity: z.ZodOptional<z.ZodEnum<{
2159
2267
  blocking: "blocking";
2160
2268
  risk: "risk";
2161
2269
  "missing-info": "missing-info";
2162
2270
  suggestion: "suggestion";
2271
+ note: "note";
2163
2272
  }>>;
2164
2273
  reasoning: z.ZodString;
2165
2274
  confidence: z.ZodEnum<{
@@ -2180,6 +2289,7 @@ declare const NewRuleProposalSchema: z.ZodObject<{
2180
2289
  risk: "risk";
2181
2290
  "missing-info": "missing-info";
2182
2291
  suggestion: "suggestion";
2292
+ note: "note";
2183
2293
  }>;
2184
2294
  suggestedScore: z.ZodNumber;
2185
2295
  reasoning: z.ZodString;
@@ -2376,4 +2486,4 @@ declare class ActivityLogger {
2376
2486
  getLogPath(): string;
2377
2487
  }
2378
2488
 
2379
- export { ALL_STRIP_TYPES, ActivityLogger, type AnalysisAgentInput, type AnalysisAgentOutput, type AnalysisFile, AnalysisFileSchema, type AnalysisIssue, type AnalysisNode, AnalysisNodeSchema, type AnalysisNodeType, AnalysisNodeTypeSchema, type AnalysisResult, type AnalysisScope, AnalysisScopeSchema, 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, DEFAULT_CODEGEN_READY_MIN_GRADE, DEPTH_WEIGHT_CATEGORIES, DESIGN_TREE_INFO_TYPES, type DesignTreeInfoType, type DesignTreeOptions, type DesignTreeResult, type DesignTreeStripType, type Detection, DetectionSchema, type Difficulty, DifficultySchema, type EvaluationAgentInput, type EvaluationAgentOutput, FigmaClient, FigmaClientError, type FigmaClientOptions, FigmaFileLoadError, type FigmaUrlInfo, FigmaUrlInfoSchema, FigmaUrlParseError, GRADE_ORDER, type GapAnalyzerOutput, GapAnalyzerOutputSchema, type GapEntry, GapEntrySchema, type GetFileNodesResponse, type GotchaApplyResolution, type GotchaApplyStrategy, GotchaDetectionSchema, GotchaOutputChannelSchema, GotchaPersistenceIntentSchema, type GotchaSurvey, type GotchaSurveyQuestion, GotchaSurveyQuestionSchema, GotchaSurveySchema, type Grade, type GridChildAlign, GridChildAlignSchema, type GroupedSurvey, GroupedSurveySchema, 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 OutputChannel, OutputChannelSchema, type OverflowDirection, OverflowDirectionSchema, type PersistenceIntent, PersistenceIntentSchema, type Preset, RULE_ANNOTATION_PROPERTIES, RULE_CONFIGS, RULE_ID_CATEGORY, RULE_PURPOSE, 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 RulePurpose, RulePurposeSchema, 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 SurveyQuestionBatch, SurveyQuestionBatchSchema, type SurveyQuestionGroup, SurveyQuestionGroupSchema, 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, detectAnalysisScope, extractRuleScores, fixedSizeInAutoLayout, formatScoreSummary, generateCalibrationReport, generateDesignTree, generateDesignTreeWithStats, getAnalysisState, getAnnotationProperties, getCategoryLabel, getConfigsWithPreset, getRuleOption, getRulePurpose, 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 };
2489
+ export { ALL_STRIP_TYPES, ActivityLogger, type AnalysisAgentInput, type AnalysisAgentOutput, type AnalysisFile, AnalysisFileSchema, type AnalysisIssue, type AnalysisNode, AnalysisNodeSchema, type AnalysisNodeType, AnalysisNodeTypeSchema, type AnalysisResult, type AnalysisScope, AnalysisScopeSchema, AnnotationPropertySchema, CATEGORIES, CATEGORY_LABELS, type CalibrationConfig, type CalibrationConfigInput, CalibrationConfigSchema, type CalibrationRun, type CalibrationStatus, CalibrationStatusSchema, type Category, CategorySchema, type CategoryScore, type CategoryScoreResult, CategoryScoreSchema, type CodeConnectCoverage, type Confidence, ConfidenceSchema, type ConversionRecord, ConversionRecordSchema, DEFAULT_CODEGEN_READY_MIN_GRADE, DEPTH_WEIGHT_CATEGORIES, DESIGN_TREE_INFO_TYPES, type DesignTreeInfoType, type DesignTreeOptions, type DesignTreeResult, type DesignTreeStripType, type Detection, DetectionSchema, type Difficulty, DifficultySchema, type EvaluationAgentInput, type EvaluationAgentOutput, FigmaClient, FigmaClientError, type FigmaClientOptions, FigmaFileLoadError, type FigmaUrlInfo, FigmaUrlInfoSchema, FigmaUrlParseError, GRADE_ORDER, type GapAnalyzerOutput, GapAnalyzerOutputSchema, type GapEntry, GapEntrySchema, type GetFileNodesResponse, type GotchaApplyResolution, type GotchaApplyStrategy, GotchaDetectionSchema, GotchaOutputChannelSchema, GotchaPersistenceIntentSchema, type GotchaSurvey, type GotchaSurveyQuestion, GotchaSurveyQuestionSchema, GotchaSurveySchema, type Grade, type GridChildAlign, GridChildAlignSchema, type GroupedSurvey, GroupedSurveySchema, 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 OutputChannel, OutputChannelSchema, type OverflowDirection, OverflowDirectionSchema, type PersistenceIntent, PersistenceIntentSchema, type Preset, ROUNDTRIP_OPT_OUT_HINT, RULE_ANNOTATION_PROPERTIES, RULE_CONFIGS, RULE_ID_CATEGORY, RULE_PURPOSE, 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 RulePurpose, RulePurposeSchema, 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 SurveyQuestionBatch, SurveyQuestionBatchSchema, type SurveyQuestionGroup, SurveyQuestionGroupSchema, 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, detectAnalysisScope, extractRuleScores, fixedSizeInAutoLayout, formatCodeConnectCoverageLine, formatRoundtripOptOutHintLine, formatScoreSummary, generateCalibrationReport, generateDesignTree, generateDesignTreeWithStats, getAnalysisState, getAnnotationProperties, getCategoryLabel, getConfigsWithPreset, getRuleOption, getRulePurpose, 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, unmappedComponent, variantStructureMismatch };