foundry-design-protocol 0.2.0-beta.20 → 0.2.0-beta.21

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,5 +1,7 @@
1
1
  import { z } from 'zod';
2
- export declare const PROTOCOL_VERSION: "1.2.0";
2
+ export { verificationValueMatches } from './verification-value.js';
3
+ export declare const PROTOCOL_VERSION: "1.3.0";
4
+ export declare const PREVIOUS_PROTOCOL_VERSION: "1.2.0";
3
5
  export declare const LEGACY_PROTOCOL_VERSION: "1.0.0";
4
6
  export declare const APPLY_RUN_PROTOCOL_VERSION: "1.1.0";
5
7
  export declare const platformSchema: z.ZodEnum<{
@@ -56,6 +58,7 @@ export declare const sessionContextSchema: z.ZodObject<{
56
58
  "react-native": "react-native";
57
59
  }>;
58
60
  targetUrl: z.ZodOptional<z.ZodString>;
61
+ previewOrigin: z.ZodOptional<z.ZodString>;
59
62
  targetName: z.ZodOptional<z.ZodString>;
60
63
  device: z.ZodOptional<z.ZodString>;
61
64
  viewport: z.ZodOptional<z.ZodObject<{
@@ -71,6 +74,16 @@ export declare const sessionContextSchema: z.ZodObject<{
71
74
  breakpoint: z.ZodDefault<z.ZodString>;
72
75
  state: z.ZodDefault<z.ZodString>;
73
76
  }, z.core.$strip>;
77
+ export declare const changeContextSchema: z.ZodObject<{
78
+ breakpoint: z.ZodDefault<z.ZodString>;
79
+ theme: z.ZodDefault<z.ZodString>;
80
+ state: z.ZodDefault<z.ZodString>;
81
+ }, z.core.$strip>;
82
+ export declare const contextSetSchema: z.ZodObject<{
83
+ breakpoints: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
84
+ themes: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
85
+ states: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
86
+ }, z.core.$strip>;
74
87
  export declare const targetRefSchema: z.ZodObject<{
75
88
  id: z.ZodString;
76
89
  platform: z.ZodEnum<{
@@ -126,10 +139,10 @@ export declare const controlDescriptorSchema: z.ZodObject<{
126
139
  string: "string";
127
140
  number: "number";
128
141
  boolean: "boolean";
142
+ length: "length";
129
143
  color: "color";
130
144
  asset: "asset";
131
145
  motion: "motion";
132
- length: "length";
133
146
  select: "select";
134
147
  }>;
135
148
  value: z.ZodUnknown;
@@ -392,6 +405,13 @@ export declare const themeDefinitionSchema: z.ZodObject<{
392
405
  column: z.ZodOptional<z.ZodNumber>;
393
406
  symbol: z.ZodOptional<z.ZodString>;
394
407
  }, z.core.$strip>>;
408
+ confidence: z.ZodDefault<z.ZodEnum<{
409
+ measured: "measured";
410
+ instrumented: "instrumented";
411
+ inferred: "inferred";
412
+ unresolved: "unresolved";
413
+ }>>;
414
+ evidence: z.ZodDefault<z.ZodArray<z.ZodString>>;
395
415
  }, z.core.$strip>;
396
416
  export declare const motionPresetSchema: z.ZodObject<{
397
417
  id: z.ZodString;
@@ -481,8 +501,8 @@ export declare const designSystemFindingSchema: z.ZodObject<{
481
501
  }, z.core.$strip>>;
482
502
  evidence: z.ZodDefault<z.ZodArray<z.ZodString>>;
483
503
  }, z.core.$strip>;
484
- export declare const projectDesignGraphSchema: z.ZodObject<{
485
- protocolVersion: z.ZodLiteral<"1.2.0">;
504
+ export declare const projectDesignGraphSchema: z.ZodPipe<z.ZodObject<{
505
+ protocolVersion: z.ZodUnion<readonly [z.ZodLiteral<"1.3.0">, z.ZodLiteral<"1.2.0">]>;
486
506
  projectRoot: z.ZodString;
487
507
  revision: z.ZodOptional<z.ZodString>;
488
508
  tokens: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -623,6 +643,13 @@ export declare const projectDesignGraphSchema: z.ZodObject<{
623
643
  column: z.ZodOptional<z.ZodNumber>;
624
644
  symbol: z.ZodOptional<z.ZodString>;
625
645
  }, z.core.$strip>>;
646
+ confidence: z.ZodDefault<z.ZodEnum<{
647
+ measured: "measured";
648
+ instrumented: "instrumented";
649
+ inferred: "inferred";
650
+ unresolved: "unresolved";
651
+ }>>;
652
+ evidence: z.ZodDefault<z.ZodArray<z.ZodString>>;
626
653
  }, z.core.$strip>>>;
627
654
  states: z.ZodDefault<z.ZodArray<z.ZodObject<{
628
655
  id: z.ZodString;
@@ -777,7 +804,415 @@ export declare const projectDesignGraphSchema: z.ZodObject<{
777
804
  evidence: z.ZodDefault<z.ZodArray<z.ZodString>>;
778
805
  }, z.core.$strip>>>;
779
806
  indexedAt: z.ZodString;
780
- }, z.core.$strip>;
807
+ }, z.core.$strip>, z.ZodTransform<{
808
+ protocolVersion: "1.3.0";
809
+ projectRoot: string;
810
+ tokens: {
811
+ id: string;
812
+ name: string;
813
+ value: string;
814
+ category: "spacing" | "typography" | "color" | "motion" | "size" | "radius" | "shadow" | "other";
815
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
816
+ evidence: string[];
817
+ cssVariable?: string | undefined;
818
+ aliasOfTokenId?: string | undefined;
819
+ aliasOfTokenName?: string | undefined;
820
+ resolvedValue?: string | undefined;
821
+ aliasChain?: string[] | undefined;
822
+ aliasStatus?: "direct" | "resolved" | "broken" | "circular" | undefined;
823
+ source?: {
824
+ file: string;
825
+ line?: number | undefined;
826
+ column?: number | undefined;
827
+ symbol?: string | undefined;
828
+ } | undefined;
829
+ }[];
830
+ components: {
831
+ id: string;
832
+ name: string;
833
+ instances: number;
834
+ variants: {
835
+ id: string;
836
+ label: string;
837
+ property: string;
838
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
839
+ props: Record<string, string | number | boolean | unknown[] | Record<string, unknown> | null>;
840
+ source?: {
841
+ file: string;
842
+ line?: number | undefined;
843
+ column?: number | undefined;
844
+ symbol?: string | undefined;
845
+ } | undefined;
846
+ adapter?: "storybook" | "cva" | "typescript" | "configured" | undefined;
847
+ sourceProperty?: string | undefined;
848
+ }[];
849
+ variantAxes: {
850
+ id: string;
851
+ label: string;
852
+ property: string;
853
+ values: (string | number | boolean | unknown[] | Record<string, unknown> | null)[];
854
+ adapter: "storybook" | "cva" | "typescript" | "configured";
855
+ source: {
856
+ file: string;
857
+ line?: number | undefined;
858
+ column?: number | undefined;
859
+ symbol?: string | undefined;
860
+ };
861
+ sourceProperty: string;
862
+ canCreate: boolean;
863
+ evidence: string[];
864
+ }[];
865
+ evidence: string[];
866
+ source?: {
867
+ file: string;
868
+ line?: number | undefined;
869
+ column?: number | undefined;
870
+ symbol?: string | undefined;
871
+ } | undefined;
872
+ selector?: string | undefined;
873
+ }[];
874
+ breakpoints: {
875
+ id: string;
876
+ label: string;
877
+ width: number;
878
+ height: number;
879
+ mediaQuery?: string | undefined;
880
+ source?: {
881
+ file: string;
882
+ line?: number | undefined;
883
+ column?: number | undefined;
884
+ symbol?: string | undefined;
885
+ } | undefined;
886
+ }[];
887
+ themes: {
888
+ id: string;
889
+ label: string;
890
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
891
+ evidence: string[];
892
+ selector?: string | undefined;
893
+ attribute?: string | undefined;
894
+ value?: string | undefined;
895
+ source?: {
896
+ file: string;
897
+ line?: number | undefined;
898
+ column?: number | undefined;
899
+ symbol?: string | undefined;
900
+ } | undefined;
901
+ }[];
902
+ states: {
903
+ id: string;
904
+ label: string;
905
+ pseudoStates: ("hover" | "focus" | "active" | "disabled")[];
906
+ query: Record<string, string>;
907
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
908
+ evidence: string[];
909
+ viewport?: {
910
+ width: number;
911
+ height: number;
912
+ } | undefined;
913
+ theme?: string | undefined;
914
+ variant?: Record<string, string | number | boolean | unknown[] | Record<string, unknown> | null> | undefined;
915
+ reducedMotion?: boolean | undefined;
916
+ }[];
917
+ motionPresets: {
918
+ id: string;
919
+ label: string;
920
+ configuration: Record<string, unknown>;
921
+ evidence: string[];
922
+ duration?: number | undefined;
923
+ easing?: string | undefined;
924
+ delay?: number | undefined;
925
+ adapter?: "motion" | "css" | "gsap" | "react-spring" | undefined;
926
+ sourceProperty?: string | undefined;
927
+ source?: {
928
+ file: string;
929
+ line?: number | undefined;
930
+ column?: number | undefined;
931
+ symbol?: string | undefined;
932
+ } | undefined;
933
+ }[];
934
+ tokenUsages: {
935
+ id: string;
936
+ tokenId: string;
937
+ tokenName: string;
938
+ value: string;
939
+ category: "spacing" | "typography" | "color" | "motion" | "size" | "radius" | "shadow" | "other";
940
+ kind: "literal" | "reference" | "alias";
941
+ source: {
942
+ file: string;
943
+ line?: number | undefined;
944
+ column?: number | undefined;
945
+ symbol?: string | undefined;
946
+ };
947
+ evidence: string[];
948
+ property?: string | undefined;
949
+ componentId?: string | undefined;
950
+ }[];
951
+ designSystemFindings: {
952
+ id: string;
953
+ kind: "near-duplicate" | "literal-drift" | "unused-token" | "component-drift";
954
+ severity: "info" | "warning";
955
+ title: string;
956
+ detail: string;
957
+ tokenIds: string[];
958
+ usageIds: string[];
959
+ componentIds: string[];
960
+ evidence: string[];
961
+ category?: "spacing" | "typography" | "color" | "motion" | "size" | "radius" | "shadow" | "other" | undefined;
962
+ suggestedTokenId?: string | undefined;
963
+ source?: {
964
+ file: string;
965
+ line?: number | undefined;
966
+ column?: number | undefined;
967
+ symbol?: string | undefined;
968
+ } | undefined;
969
+ }[];
970
+ indexedAt: string;
971
+ revision?: string | undefined;
972
+ containerQueries?: {
973
+ id: string;
974
+ label: string;
975
+ condition: string;
976
+ axis: "size" | "inline-size" | "block-size";
977
+ source: {
978
+ file: string;
979
+ line?: number | undefined;
980
+ column?: number | undefined;
981
+ symbol?: string | undefined;
982
+ };
983
+ evidence: string[];
984
+ name?: string | undefined;
985
+ minWidth?: number | undefined;
986
+ maxWidth?: number | undefined;
987
+ }[] | undefined;
988
+ tokenPromotions?: {
989
+ id: string;
990
+ value: string;
991
+ category: "spacing" | "typography" | "color" | "motion" | "size" | "radius" | "shadow" | "other";
992
+ property: string;
993
+ occurrenceCount: number;
994
+ sources: {
995
+ file: string;
996
+ line?: number | undefined;
997
+ column?: number | undefined;
998
+ symbol?: string | undefined;
999
+ }[];
1000
+ componentIds: string[];
1001
+ recommendation: "use-existing" | "create-token";
1002
+ relation: "exact" | "near" | "new";
1003
+ suggestedTokenName: string;
1004
+ suggestedValue: string;
1005
+ aliasChain: string[];
1006
+ canStage: boolean;
1007
+ blockers: string[];
1008
+ evidence: string[];
1009
+ suggestedTokenId?: string | undefined;
1010
+ }[] | undefined;
1011
+ }, {
1012
+ protocolVersion: "1.3.0" | "1.2.0";
1013
+ projectRoot: string;
1014
+ tokens: {
1015
+ id: string;
1016
+ name: string;
1017
+ value: string;
1018
+ category: "spacing" | "typography" | "color" | "motion" | "size" | "radius" | "shadow" | "other";
1019
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
1020
+ evidence: string[];
1021
+ cssVariable?: string | undefined;
1022
+ aliasOfTokenId?: string | undefined;
1023
+ aliasOfTokenName?: string | undefined;
1024
+ resolvedValue?: string | undefined;
1025
+ aliasChain?: string[] | undefined;
1026
+ aliasStatus?: "direct" | "resolved" | "broken" | "circular" | undefined;
1027
+ source?: {
1028
+ file: string;
1029
+ line?: number | undefined;
1030
+ column?: number | undefined;
1031
+ symbol?: string | undefined;
1032
+ } | undefined;
1033
+ }[];
1034
+ components: {
1035
+ id: string;
1036
+ name: string;
1037
+ instances: number;
1038
+ variants: {
1039
+ id: string;
1040
+ label: string;
1041
+ property: string;
1042
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
1043
+ props: Record<string, string | number | boolean | unknown[] | Record<string, unknown> | null>;
1044
+ source?: {
1045
+ file: string;
1046
+ line?: number | undefined;
1047
+ column?: number | undefined;
1048
+ symbol?: string | undefined;
1049
+ } | undefined;
1050
+ adapter?: "storybook" | "cva" | "typescript" | "configured" | undefined;
1051
+ sourceProperty?: string | undefined;
1052
+ }[];
1053
+ variantAxes: {
1054
+ id: string;
1055
+ label: string;
1056
+ property: string;
1057
+ values: (string | number | boolean | unknown[] | Record<string, unknown> | null)[];
1058
+ adapter: "storybook" | "cva" | "typescript" | "configured";
1059
+ source: {
1060
+ file: string;
1061
+ line?: number | undefined;
1062
+ column?: number | undefined;
1063
+ symbol?: string | undefined;
1064
+ };
1065
+ sourceProperty: string;
1066
+ canCreate: boolean;
1067
+ evidence: string[];
1068
+ }[];
1069
+ evidence: string[];
1070
+ source?: {
1071
+ file: string;
1072
+ line?: number | undefined;
1073
+ column?: number | undefined;
1074
+ symbol?: string | undefined;
1075
+ } | undefined;
1076
+ selector?: string | undefined;
1077
+ }[];
1078
+ breakpoints: {
1079
+ id: string;
1080
+ label: string;
1081
+ width: number;
1082
+ height: number;
1083
+ mediaQuery?: string | undefined;
1084
+ source?: {
1085
+ file: string;
1086
+ line?: number | undefined;
1087
+ column?: number | undefined;
1088
+ symbol?: string | undefined;
1089
+ } | undefined;
1090
+ }[];
1091
+ themes: {
1092
+ id: string;
1093
+ label: string;
1094
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
1095
+ evidence: string[];
1096
+ selector?: string | undefined;
1097
+ attribute?: string | undefined;
1098
+ value?: string | undefined;
1099
+ source?: {
1100
+ file: string;
1101
+ line?: number | undefined;
1102
+ column?: number | undefined;
1103
+ symbol?: string | undefined;
1104
+ } | undefined;
1105
+ }[];
1106
+ states: {
1107
+ id: string;
1108
+ label: string;
1109
+ pseudoStates: ("hover" | "focus" | "active" | "disabled")[];
1110
+ query: Record<string, string>;
1111
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
1112
+ evidence: string[];
1113
+ viewport?: {
1114
+ width: number;
1115
+ height: number;
1116
+ } | undefined;
1117
+ theme?: string | undefined;
1118
+ variant?: Record<string, string | number | boolean | unknown[] | Record<string, unknown> | null> | undefined;
1119
+ reducedMotion?: boolean | undefined;
1120
+ }[];
1121
+ motionPresets: {
1122
+ id: string;
1123
+ label: string;
1124
+ configuration: Record<string, unknown>;
1125
+ evidence: string[];
1126
+ duration?: number | undefined;
1127
+ easing?: string | undefined;
1128
+ delay?: number | undefined;
1129
+ adapter?: "motion" | "css" | "gsap" | "react-spring" | undefined;
1130
+ sourceProperty?: string | undefined;
1131
+ source?: {
1132
+ file: string;
1133
+ line?: number | undefined;
1134
+ column?: number | undefined;
1135
+ symbol?: string | undefined;
1136
+ } | undefined;
1137
+ }[];
1138
+ tokenUsages: {
1139
+ id: string;
1140
+ tokenId: string;
1141
+ tokenName: string;
1142
+ value: string;
1143
+ category: "spacing" | "typography" | "color" | "motion" | "size" | "radius" | "shadow" | "other";
1144
+ kind: "literal" | "reference" | "alias";
1145
+ source: {
1146
+ file: string;
1147
+ line?: number | undefined;
1148
+ column?: number | undefined;
1149
+ symbol?: string | undefined;
1150
+ };
1151
+ evidence: string[];
1152
+ property?: string | undefined;
1153
+ componentId?: string | undefined;
1154
+ }[];
1155
+ designSystemFindings: {
1156
+ id: string;
1157
+ kind: "near-duplicate" | "literal-drift" | "unused-token" | "component-drift";
1158
+ severity: "info" | "warning";
1159
+ title: string;
1160
+ detail: string;
1161
+ tokenIds: string[];
1162
+ usageIds: string[];
1163
+ componentIds: string[];
1164
+ evidence: string[];
1165
+ category?: "spacing" | "typography" | "color" | "motion" | "size" | "radius" | "shadow" | "other" | undefined;
1166
+ suggestedTokenId?: string | undefined;
1167
+ source?: {
1168
+ file: string;
1169
+ line?: number | undefined;
1170
+ column?: number | undefined;
1171
+ symbol?: string | undefined;
1172
+ } | undefined;
1173
+ }[];
1174
+ indexedAt: string;
1175
+ revision?: string | undefined;
1176
+ containerQueries?: {
1177
+ id: string;
1178
+ label: string;
1179
+ condition: string;
1180
+ axis: "size" | "inline-size" | "block-size";
1181
+ source: {
1182
+ file: string;
1183
+ line?: number | undefined;
1184
+ column?: number | undefined;
1185
+ symbol?: string | undefined;
1186
+ };
1187
+ evidence: string[];
1188
+ name?: string | undefined;
1189
+ minWidth?: number | undefined;
1190
+ maxWidth?: number | undefined;
1191
+ }[] | undefined;
1192
+ tokenPromotions?: {
1193
+ id: string;
1194
+ value: string;
1195
+ category: "spacing" | "typography" | "color" | "motion" | "size" | "radius" | "shadow" | "other";
1196
+ property: string;
1197
+ occurrenceCount: number;
1198
+ sources: {
1199
+ file: string;
1200
+ line?: number | undefined;
1201
+ column?: number | undefined;
1202
+ symbol?: string | undefined;
1203
+ }[];
1204
+ componentIds: string[];
1205
+ recommendation: "use-existing" | "create-token";
1206
+ relation: "exact" | "near" | "new";
1207
+ suggestedTokenName: string;
1208
+ suggestedValue: string;
1209
+ aliasChain: string[];
1210
+ canStage: boolean;
1211
+ blockers: string[];
1212
+ evidence: string[];
1213
+ suggestedTokenId?: string | undefined;
1214
+ }[] | undefined;
1215
+ }>>;
781
1216
  export declare const sourceMappingCandidateSchema: z.ZodObject<{
782
1217
  id: z.ZodString;
783
1218
  label: z.ZodString;
@@ -883,7 +1318,7 @@ export declare const designOperationSchema: z.ZodObject<{
883
1318
  createdAt: z.ZodString;
884
1319
  updatedAt: z.ZodString;
885
1320
  }, z.core.$strip>;
886
- export declare const designChangeSchema: z.ZodObject<{
1321
+ export declare const designChangeSchema: z.ZodPipe<z.ZodObject<{
887
1322
  id: z.ZodString;
888
1323
  target: z.ZodObject<{
889
1324
  id: z.ZodString;
@@ -989,6 +1424,11 @@ export declare const designChangeSchema: z.ZodObject<{
989
1424
  theme: z.ZodDefault<z.ZodString>;
990
1425
  state: z.ZodDefault<z.ZodString>;
991
1426
  }, z.core.$strip>;
1427
+ contextSet: z.ZodOptional<z.ZodObject<{
1428
+ breakpoints: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
1429
+ themes: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
1430
+ states: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
1431
+ }, z.core.$strip>>;
992
1432
  confidence: z.ZodEnum<{
993
1433
  measured: "measured";
994
1434
  instrumented: "instrumented";
@@ -1005,9 +1445,150 @@ export declare const designChangeSchema: z.ZodObject<{
1005
1445
  applied: "applied";
1006
1446
  rejected: "rejected";
1007
1447
  }>>;
1008
- }, z.core.$strip>;
1009
- export declare const changeSetSchema: z.ZodObject<{
1010
- protocolVersion: z.ZodLiteral<"1.2.0">;
1448
+ }, z.core.$strip>, z.ZodTransform<{
1449
+ contextSet: {
1450
+ breakpoints: string[];
1451
+ themes: string[];
1452
+ states: string[];
1453
+ };
1454
+ id: string;
1455
+ target: {
1456
+ id: string;
1457
+ platform: "web" | "swiftui" | "react-native";
1458
+ semanticRole: string;
1459
+ label: string;
1460
+ componentPath: string[];
1461
+ geometry: {
1462
+ x: number;
1463
+ y: number;
1464
+ width: number;
1465
+ height: number;
1466
+ scale: number;
1467
+ };
1468
+ locator: Record<string, unknown>;
1469
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
1470
+ evidence: string[];
1471
+ source?: {
1472
+ file: string;
1473
+ line?: number | undefined;
1474
+ column?: number | undefined;
1475
+ symbol?: string | undefined;
1476
+ } | undefined;
1477
+ };
1478
+ category: "layout" | "spacing" | "typography" | "color" | "border" | "effect" | "content" | "asset" | "visibility" | "accessibility" | "responsive" | "state" | "motion";
1479
+ property: string;
1480
+ before: string | number | boolean | unknown[] | Record<string, unknown> | null;
1481
+ after: string | number | boolean | unknown[] | Record<string, unknown> | null;
1482
+ stateIds: string[];
1483
+ mappingCandidates: {
1484
+ id: string;
1485
+ label: string;
1486
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
1487
+ property: string;
1488
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
1489
+ scope: "instance" | "variant" | "component";
1490
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
1491
+ evidence: string[];
1492
+ blastRadius: number;
1493
+ targetId?: string | undefined;
1494
+ source?: {
1495
+ file: string;
1496
+ line?: number | undefined;
1497
+ column?: number | undefined;
1498
+ symbol?: string | undefined;
1499
+ } | undefined;
1500
+ }[];
1501
+ scope: "instance" | "variant" | "component";
1502
+ context: {
1503
+ breakpoint: string;
1504
+ theme: string;
1505
+ state: string;
1506
+ };
1507
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
1508
+ evidence: string[];
1509
+ createdAt: string;
1510
+ updatedAt: string;
1511
+ status: "unresolved" | "draft" | "approved" | "applied" | "rejected";
1512
+ unit?: string | undefined;
1513
+ token?: string | undefined;
1514
+ operationId?: string | undefined;
1515
+ selectedMappingId?: string | undefined;
1516
+ }, {
1517
+ id: string;
1518
+ target: {
1519
+ id: string;
1520
+ platform: "web" | "swiftui" | "react-native";
1521
+ semanticRole: string;
1522
+ label: string;
1523
+ componentPath: string[];
1524
+ geometry: {
1525
+ x: number;
1526
+ y: number;
1527
+ width: number;
1528
+ height: number;
1529
+ scale: number;
1530
+ };
1531
+ locator: Record<string, unknown>;
1532
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
1533
+ evidence: string[];
1534
+ source?: {
1535
+ file: string;
1536
+ line?: number | undefined;
1537
+ column?: number | undefined;
1538
+ symbol?: string | undefined;
1539
+ } | undefined;
1540
+ };
1541
+ category: "layout" | "spacing" | "typography" | "color" | "border" | "effect" | "content" | "asset" | "visibility" | "accessibility" | "responsive" | "state" | "motion";
1542
+ property: string;
1543
+ before: string | number | boolean | unknown[] | Record<string, unknown> | null;
1544
+ after: string | number | boolean | unknown[] | Record<string, unknown> | null;
1545
+ stateIds: string[];
1546
+ mappingCandidates: {
1547
+ id: string;
1548
+ label: string;
1549
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
1550
+ property: string;
1551
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
1552
+ scope: "instance" | "variant" | "component";
1553
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
1554
+ evidence: string[];
1555
+ blastRadius: number;
1556
+ targetId?: string | undefined;
1557
+ source?: {
1558
+ file: string;
1559
+ line?: number | undefined;
1560
+ column?: number | undefined;
1561
+ symbol?: string | undefined;
1562
+ } | undefined;
1563
+ }[];
1564
+ scope: "instance" | "variant" | "component";
1565
+ context: {
1566
+ breakpoint: string;
1567
+ theme: string;
1568
+ state: string;
1569
+ };
1570
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
1571
+ evidence: string[];
1572
+ createdAt: string;
1573
+ updatedAt: string;
1574
+ status: "unresolved" | "draft" | "approved" | "applied" | "rejected";
1575
+ unit?: string | undefined;
1576
+ token?: string | undefined;
1577
+ operationId?: string | undefined;
1578
+ selectedMappingId?: string | undefined;
1579
+ contextSet?: {
1580
+ breakpoints: string[];
1581
+ themes: string[];
1582
+ states: string[];
1583
+ } | undefined;
1584
+ }>>;
1585
+ export declare const changeSetSchema: z.ZodPipe<z.ZodObject<{
1586
+ protocolVersion: z.ZodEnum<{
1587
+ "1.3.0": "1.3.0";
1588
+ "1.2.0": "1.2.0";
1589
+ "1.0.0": "1.0.0";
1590
+ "1.1.0": "1.1.0";
1591
+ }>;
1011
1592
  sessionId: z.ZodString;
1012
1593
  context: z.ZodObject<{
1013
1594
  projectRoot: z.ZodString;
@@ -1019,6 +1600,7 @@ export declare const changeSetSchema: z.ZodObject<{
1019
1600
  "react-native": "react-native";
1020
1601
  }>;
1021
1602
  targetUrl: z.ZodOptional<z.ZodString>;
1603
+ previewOrigin: z.ZodOptional<z.ZodString>;
1022
1604
  targetName: z.ZodOptional<z.ZodString>;
1023
1605
  device: z.ZodOptional<z.ZodString>;
1024
1606
  viewport: z.ZodOptional<z.ZodObject<{
@@ -1034,7 +1616,7 @@ export declare const changeSetSchema: z.ZodObject<{
1034
1616
  breakpoint: z.ZodDefault<z.ZodString>;
1035
1617
  state: z.ZodDefault<z.ZodString>;
1036
1618
  }, z.core.$strip>;
1037
- changes: z.ZodArray<z.ZodObject<{
1619
+ changes: z.ZodArray<z.ZodPipe<z.ZodObject<{
1038
1620
  id: z.ZodString;
1039
1621
  target: z.ZodObject<{
1040
1622
  id: z.ZodString;
@@ -1140,6 +1722,11 @@ export declare const changeSetSchema: z.ZodObject<{
1140
1722
  theme: z.ZodDefault<z.ZodString>;
1141
1723
  state: z.ZodDefault<z.ZodString>;
1142
1724
  }, z.core.$strip>;
1725
+ contextSet: z.ZodOptional<z.ZodObject<{
1726
+ breakpoints: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
1727
+ themes: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
1728
+ states: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
1729
+ }, z.core.$strip>>;
1143
1730
  confidence: z.ZodEnum<{
1144
1731
  measured: "measured";
1145
1732
  instrumented: "instrumented";
@@ -1156,7 +1743,143 @@ export declare const changeSetSchema: z.ZodObject<{
1156
1743
  applied: "applied";
1157
1744
  rejected: "rejected";
1158
1745
  }>>;
1159
- }, z.core.$strip>>;
1746
+ }, z.core.$strip>, z.ZodTransform<{
1747
+ contextSet: {
1748
+ breakpoints: string[];
1749
+ themes: string[];
1750
+ states: string[];
1751
+ };
1752
+ id: string;
1753
+ target: {
1754
+ id: string;
1755
+ platform: "web" | "swiftui" | "react-native";
1756
+ semanticRole: string;
1757
+ label: string;
1758
+ componentPath: string[];
1759
+ geometry: {
1760
+ x: number;
1761
+ y: number;
1762
+ width: number;
1763
+ height: number;
1764
+ scale: number;
1765
+ };
1766
+ locator: Record<string, unknown>;
1767
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
1768
+ evidence: string[];
1769
+ source?: {
1770
+ file: string;
1771
+ line?: number | undefined;
1772
+ column?: number | undefined;
1773
+ symbol?: string | undefined;
1774
+ } | undefined;
1775
+ };
1776
+ category: "layout" | "spacing" | "typography" | "color" | "border" | "effect" | "content" | "asset" | "visibility" | "accessibility" | "responsive" | "state" | "motion";
1777
+ property: string;
1778
+ before: string | number | boolean | unknown[] | Record<string, unknown> | null;
1779
+ after: string | number | boolean | unknown[] | Record<string, unknown> | null;
1780
+ stateIds: string[];
1781
+ mappingCandidates: {
1782
+ id: string;
1783
+ label: string;
1784
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
1785
+ property: string;
1786
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
1787
+ scope: "instance" | "variant" | "component";
1788
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
1789
+ evidence: string[];
1790
+ blastRadius: number;
1791
+ targetId?: string | undefined;
1792
+ source?: {
1793
+ file: string;
1794
+ line?: number | undefined;
1795
+ column?: number | undefined;
1796
+ symbol?: string | undefined;
1797
+ } | undefined;
1798
+ }[];
1799
+ scope: "instance" | "variant" | "component";
1800
+ context: {
1801
+ breakpoint: string;
1802
+ theme: string;
1803
+ state: string;
1804
+ };
1805
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
1806
+ evidence: string[];
1807
+ createdAt: string;
1808
+ updatedAt: string;
1809
+ status: "unresolved" | "draft" | "approved" | "applied" | "rejected";
1810
+ unit?: string | undefined;
1811
+ token?: string | undefined;
1812
+ operationId?: string | undefined;
1813
+ selectedMappingId?: string | undefined;
1814
+ }, {
1815
+ id: string;
1816
+ target: {
1817
+ id: string;
1818
+ platform: "web" | "swiftui" | "react-native";
1819
+ semanticRole: string;
1820
+ label: string;
1821
+ componentPath: string[];
1822
+ geometry: {
1823
+ x: number;
1824
+ y: number;
1825
+ width: number;
1826
+ height: number;
1827
+ scale: number;
1828
+ };
1829
+ locator: Record<string, unknown>;
1830
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
1831
+ evidence: string[];
1832
+ source?: {
1833
+ file: string;
1834
+ line?: number | undefined;
1835
+ column?: number | undefined;
1836
+ symbol?: string | undefined;
1837
+ } | undefined;
1838
+ };
1839
+ category: "layout" | "spacing" | "typography" | "color" | "border" | "effect" | "content" | "asset" | "visibility" | "accessibility" | "responsive" | "state" | "motion";
1840
+ property: string;
1841
+ before: string | number | boolean | unknown[] | Record<string, unknown> | null;
1842
+ after: string | number | boolean | unknown[] | Record<string, unknown> | null;
1843
+ stateIds: string[];
1844
+ mappingCandidates: {
1845
+ id: string;
1846
+ label: string;
1847
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
1848
+ property: string;
1849
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
1850
+ scope: "instance" | "variant" | "component";
1851
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
1852
+ evidence: string[];
1853
+ blastRadius: number;
1854
+ targetId?: string | undefined;
1855
+ source?: {
1856
+ file: string;
1857
+ line?: number | undefined;
1858
+ column?: number | undefined;
1859
+ symbol?: string | undefined;
1860
+ } | undefined;
1861
+ }[];
1862
+ scope: "instance" | "variant" | "component";
1863
+ context: {
1864
+ breakpoint: string;
1865
+ theme: string;
1866
+ state: string;
1867
+ };
1868
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
1869
+ evidence: string[];
1870
+ createdAt: string;
1871
+ updatedAt: string;
1872
+ status: "unresolved" | "draft" | "approved" | "applied" | "rejected";
1873
+ unit?: string | undefined;
1874
+ token?: string | undefined;
1875
+ operationId?: string | undefined;
1876
+ selectedMappingId?: string | undefined;
1877
+ contextSet?: {
1878
+ breakpoints: string[];
1879
+ themes: string[];
1880
+ states: string[];
1881
+ } | undefined;
1882
+ }>>>;
1160
1883
  operations: z.ZodDefault<z.ZodArray<z.ZodObject<{
1161
1884
  id: z.ZodString;
1162
1885
  kind: z.ZodEnum<{
@@ -1231,7 +1954,261 @@ export declare const changeSetSchema: z.ZodObject<{
1231
1954
  }, z.core.$strip>>>;
1232
1955
  createdAt: z.ZodString;
1233
1956
  updatedAt: z.ZodString;
1234
- }, z.core.$strip>;
1957
+ }, z.core.$strip>, z.ZodTransform<{
1958
+ protocolVersion: "1.3.0";
1959
+ sessionId: string;
1960
+ context: {
1961
+ projectRoot: string;
1962
+ platform: "web" | "swiftui" | "react-native";
1963
+ theme: "light" | "dark" | "system" | "custom";
1964
+ breakpoint: string;
1965
+ state: string;
1966
+ revision?: string | undefined;
1967
+ designGraphRevision?: string | undefined;
1968
+ targetUrl?: string | undefined;
1969
+ previewOrigin?: string | undefined;
1970
+ targetName?: string | undefined;
1971
+ device?: string | undefined;
1972
+ viewport?: {
1973
+ width: number;
1974
+ height: number;
1975
+ } | undefined;
1976
+ };
1977
+ changes: {
1978
+ contextSet: {
1979
+ breakpoints: string[];
1980
+ themes: string[];
1981
+ states: string[];
1982
+ };
1983
+ id: string;
1984
+ target: {
1985
+ id: string;
1986
+ platform: "web" | "swiftui" | "react-native";
1987
+ semanticRole: string;
1988
+ label: string;
1989
+ componentPath: string[];
1990
+ geometry: {
1991
+ x: number;
1992
+ y: number;
1993
+ width: number;
1994
+ height: number;
1995
+ scale: number;
1996
+ };
1997
+ locator: Record<string, unknown>;
1998
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
1999
+ evidence: string[];
2000
+ source?: {
2001
+ file: string;
2002
+ line?: number | undefined;
2003
+ column?: number | undefined;
2004
+ symbol?: string | undefined;
2005
+ } | undefined;
2006
+ };
2007
+ category: "layout" | "spacing" | "typography" | "color" | "border" | "effect" | "content" | "asset" | "visibility" | "accessibility" | "responsive" | "state" | "motion";
2008
+ property: string;
2009
+ before: string | number | boolean | unknown[] | Record<string, unknown> | null;
2010
+ after: string | number | boolean | unknown[] | Record<string, unknown> | null;
2011
+ stateIds: string[];
2012
+ mappingCandidates: {
2013
+ id: string;
2014
+ label: string;
2015
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
2016
+ property: string;
2017
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
2018
+ scope: "instance" | "variant" | "component";
2019
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
2020
+ evidence: string[];
2021
+ blastRadius: number;
2022
+ targetId?: string | undefined;
2023
+ source?: {
2024
+ file: string;
2025
+ line?: number | undefined;
2026
+ column?: number | undefined;
2027
+ symbol?: string | undefined;
2028
+ } | undefined;
2029
+ }[];
2030
+ scope: "instance" | "variant" | "component";
2031
+ context: {
2032
+ breakpoint: string;
2033
+ theme: string;
2034
+ state: string;
2035
+ };
2036
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
2037
+ evidence: string[];
2038
+ createdAt: string;
2039
+ updatedAt: string;
2040
+ status: "unresolved" | "draft" | "approved" | "applied" | "rejected";
2041
+ unit?: string | undefined;
2042
+ token?: string | undefined;
2043
+ operationId?: string | undefined;
2044
+ selectedMappingId?: string | undefined;
2045
+ }[];
2046
+ operations: {
2047
+ id: string;
2048
+ kind: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "style" | "component-variant" | "token-refactor";
2049
+ label: string;
2050
+ targetIds: string[];
2051
+ changeIds: string[];
2052
+ stateIds: string[];
2053
+ mappingCandidates: {
2054
+ id: string;
2055
+ label: string;
2056
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
2057
+ property: string;
2058
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
2059
+ scope: "instance" | "variant" | "component";
2060
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
2061
+ evidence: string[];
2062
+ blastRadius: number;
2063
+ targetId?: string | undefined;
2064
+ source?: {
2065
+ file: string;
2066
+ line?: number | undefined;
2067
+ column?: number | undefined;
2068
+ symbol?: string | undefined;
2069
+ } | undefined;
2070
+ }[];
2071
+ status: "unresolved" | "resolved" | "preview";
2072
+ createdAt: string;
2073
+ updatedAt: string;
2074
+ selectedMappingId?: string | undefined;
2075
+ }[];
2076
+ screenshots: {
2077
+ label: string;
2078
+ path: string;
2079
+ createdAt: string;
2080
+ }[];
2081
+ createdAt: string;
2082
+ updatedAt: string;
2083
+ designGraphRevision?: string | undefined;
2084
+ }, {
2085
+ protocolVersion: "1.3.0" | "1.2.0" | "1.0.0" | "1.1.0";
2086
+ sessionId: string;
2087
+ context: {
2088
+ projectRoot: string;
2089
+ platform: "web" | "swiftui" | "react-native";
2090
+ theme: "light" | "dark" | "system" | "custom";
2091
+ breakpoint: string;
2092
+ state: string;
2093
+ revision?: string | undefined;
2094
+ designGraphRevision?: string | undefined;
2095
+ targetUrl?: string | undefined;
2096
+ previewOrigin?: string | undefined;
2097
+ targetName?: string | undefined;
2098
+ device?: string | undefined;
2099
+ viewport?: {
2100
+ width: number;
2101
+ height: number;
2102
+ } | undefined;
2103
+ };
2104
+ changes: {
2105
+ contextSet: {
2106
+ breakpoints: string[];
2107
+ themes: string[];
2108
+ states: string[];
2109
+ };
2110
+ id: string;
2111
+ target: {
2112
+ id: string;
2113
+ platform: "web" | "swiftui" | "react-native";
2114
+ semanticRole: string;
2115
+ label: string;
2116
+ componentPath: string[];
2117
+ geometry: {
2118
+ x: number;
2119
+ y: number;
2120
+ width: number;
2121
+ height: number;
2122
+ scale: number;
2123
+ };
2124
+ locator: Record<string, unknown>;
2125
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
2126
+ evidence: string[];
2127
+ source?: {
2128
+ file: string;
2129
+ line?: number | undefined;
2130
+ column?: number | undefined;
2131
+ symbol?: string | undefined;
2132
+ } | undefined;
2133
+ };
2134
+ category: "layout" | "spacing" | "typography" | "color" | "border" | "effect" | "content" | "asset" | "visibility" | "accessibility" | "responsive" | "state" | "motion";
2135
+ property: string;
2136
+ before: string | number | boolean | unknown[] | Record<string, unknown> | null;
2137
+ after: string | number | boolean | unknown[] | Record<string, unknown> | null;
2138
+ stateIds: string[];
2139
+ mappingCandidates: {
2140
+ id: string;
2141
+ label: string;
2142
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
2143
+ property: string;
2144
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
2145
+ scope: "instance" | "variant" | "component";
2146
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
2147
+ evidence: string[];
2148
+ blastRadius: number;
2149
+ targetId?: string | undefined;
2150
+ source?: {
2151
+ file: string;
2152
+ line?: number | undefined;
2153
+ column?: number | undefined;
2154
+ symbol?: string | undefined;
2155
+ } | undefined;
2156
+ }[];
2157
+ scope: "instance" | "variant" | "component";
2158
+ context: {
2159
+ breakpoint: string;
2160
+ theme: string;
2161
+ state: string;
2162
+ };
2163
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
2164
+ evidence: string[];
2165
+ createdAt: string;
2166
+ updatedAt: string;
2167
+ status: "unresolved" | "draft" | "approved" | "applied" | "rejected";
2168
+ unit?: string | undefined;
2169
+ token?: string | undefined;
2170
+ operationId?: string | undefined;
2171
+ selectedMappingId?: string | undefined;
2172
+ }[];
2173
+ operations: {
2174
+ id: string;
2175
+ kind: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "style" | "component-variant" | "token-refactor";
2176
+ label: string;
2177
+ targetIds: string[];
2178
+ changeIds: string[];
2179
+ stateIds: string[];
2180
+ mappingCandidates: {
2181
+ id: string;
2182
+ label: string;
2183
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
2184
+ property: string;
2185
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
2186
+ scope: "instance" | "variant" | "component";
2187
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
2188
+ evidence: string[];
2189
+ blastRadius: number;
2190
+ targetId?: string | undefined;
2191
+ source?: {
2192
+ file: string;
2193
+ line?: number | undefined;
2194
+ column?: number | undefined;
2195
+ symbol?: string | undefined;
2196
+ } | undefined;
2197
+ }[];
2198
+ status: "unresolved" | "resolved" | "preview";
2199
+ createdAt: string;
2200
+ updatedAt: string;
2201
+ selectedMappingId?: string | undefined;
2202
+ }[];
2203
+ screenshots: {
2204
+ label: string;
2205
+ path: string;
2206
+ createdAt: string;
2207
+ }[];
2208
+ createdAt: string;
2209
+ updatedAt: string;
2210
+ designGraphRevision?: string | undefined;
2211
+ }>>;
1235
2212
  export declare const designBranchSchema: z.ZodObject<{
1236
2213
  id: z.ZodString;
1237
2214
  name: z.ZodString;
@@ -1242,7 +2219,7 @@ export declare const designBranchSchema: z.ZodObject<{
1242
2219
  archived: "archived";
1243
2220
  }>>;
1244
2221
  originBranchId: z.ZodOptional<z.ZodString>;
1245
- changes: z.ZodDefault<z.ZodArray<z.ZodObject<{
2222
+ changes: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
1246
2223
  id: z.ZodString;
1247
2224
  target: z.ZodObject<{
1248
2225
  id: z.ZodString;
@@ -1348,6 +2325,11 @@ export declare const designBranchSchema: z.ZodObject<{
1348
2325
  theme: z.ZodDefault<z.ZodString>;
1349
2326
  state: z.ZodDefault<z.ZodString>;
1350
2327
  }, z.core.$strip>;
2328
+ contextSet: z.ZodOptional<z.ZodObject<{
2329
+ breakpoints: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
2330
+ themes: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
2331
+ states: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
2332
+ }, z.core.$strip>>;
1351
2333
  confidence: z.ZodEnum<{
1352
2334
  measured: "measured";
1353
2335
  instrumented: "instrumented";
@@ -1364,7 +2346,143 @@ export declare const designBranchSchema: z.ZodObject<{
1364
2346
  applied: "applied";
1365
2347
  rejected: "rejected";
1366
2348
  }>>;
1367
- }, z.core.$strip>>>;
2349
+ }, z.core.$strip>, z.ZodTransform<{
2350
+ contextSet: {
2351
+ breakpoints: string[];
2352
+ themes: string[];
2353
+ states: string[];
2354
+ };
2355
+ id: string;
2356
+ target: {
2357
+ id: string;
2358
+ platform: "web" | "swiftui" | "react-native";
2359
+ semanticRole: string;
2360
+ label: string;
2361
+ componentPath: string[];
2362
+ geometry: {
2363
+ x: number;
2364
+ y: number;
2365
+ width: number;
2366
+ height: number;
2367
+ scale: number;
2368
+ };
2369
+ locator: Record<string, unknown>;
2370
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
2371
+ evidence: string[];
2372
+ source?: {
2373
+ file: string;
2374
+ line?: number | undefined;
2375
+ column?: number | undefined;
2376
+ symbol?: string | undefined;
2377
+ } | undefined;
2378
+ };
2379
+ category: "layout" | "spacing" | "typography" | "color" | "border" | "effect" | "content" | "asset" | "visibility" | "accessibility" | "responsive" | "state" | "motion";
2380
+ property: string;
2381
+ before: string | number | boolean | unknown[] | Record<string, unknown> | null;
2382
+ after: string | number | boolean | unknown[] | Record<string, unknown> | null;
2383
+ stateIds: string[];
2384
+ mappingCandidates: {
2385
+ id: string;
2386
+ label: string;
2387
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
2388
+ property: string;
2389
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
2390
+ scope: "instance" | "variant" | "component";
2391
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
2392
+ evidence: string[];
2393
+ blastRadius: number;
2394
+ targetId?: string | undefined;
2395
+ source?: {
2396
+ file: string;
2397
+ line?: number | undefined;
2398
+ column?: number | undefined;
2399
+ symbol?: string | undefined;
2400
+ } | undefined;
2401
+ }[];
2402
+ scope: "instance" | "variant" | "component";
2403
+ context: {
2404
+ breakpoint: string;
2405
+ theme: string;
2406
+ state: string;
2407
+ };
2408
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
2409
+ evidence: string[];
2410
+ createdAt: string;
2411
+ updatedAt: string;
2412
+ status: "unresolved" | "draft" | "approved" | "applied" | "rejected";
2413
+ unit?: string | undefined;
2414
+ token?: string | undefined;
2415
+ operationId?: string | undefined;
2416
+ selectedMappingId?: string | undefined;
2417
+ }, {
2418
+ id: string;
2419
+ target: {
2420
+ id: string;
2421
+ platform: "web" | "swiftui" | "react-native";
2422
+ semanticRole: string;
2423
+ label: string;
2424
+ componentPath: string[];
2425
+ geometry: {
2426
+ x: number;
2427
+ y: number;
2428
+ width: number;
2429
+ height: number;
2430
+ scale: number;
2431
+ };
2432
+ locator: Record<string, unknown>;
2433
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
2434
+ evidence: string[];
2435
+ source?: {
2436
+ file: string;
2437
+ line?: number | undefined;
2438
+ column?: number | undefined;
2439
+ symbol?: string | undefined;
2440
+ } | undefined;
2441
+ };
2442
+ category: "layout" | "spacing" | "typography" | "color" | "border" | "effect" | "content" | "asset" | "visibility" | "accessibility" | "responsive" | "state" | "motion";
2443
+ property: string;
2444
+ before: string | number | boolean | unknown[] | Record<string, unknown> | null;
2445
+ after: string | number | boolean | unknown[] | Record<string, unknown> | null;
2446
+ stateIds: string[];
2447
+ mappingCandidates: {
2448
+ id: string;
2449
+ label: string;
2450
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
2451
+ property: string;
2452
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
2453
+ scope: "instance" | "variant" | "component";
2454
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
2455
+ evidence: string[];
2456
+ blastRadius: number;
2457
+ targetId?: string | undefined;
2458
+ source?: {
2459
+ file: string;
2460
+ line?: number | undefined;
2461
+ column?: number | undefined;
2462
+ symbol?: string | undefined;
2463
+ } | undefined;
2464
+ }[];
2465
+ scope: "instance" | "variant" | "component";
2466
+ context: {
2467
+ breakpoint: string;
2468
+ theme: string;
2469
+ state: string;
2470
+ };
2471
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
2472
+ evidence: string[];
2473
+ createdAt: string;
2474
+ updatedAt: string;
2475
+ status: "unresolved" | "draft" | "approved" | "applied" | "rejected";
2476
+ unit?: string | undefined;
2477
+ token?: string | undefined;
2478
+ operationId?: string | undefined;
2479
+ selectedMappingId?: string | undefined;
2480
+ contextSet?: {
2481
+ breakpoints: string[];
2482
+ themes: string[];
2483
+ states: string[];
2484
+ } | undefined;
2485
+ }>>>>;
1368
2486
  operations: z.ZodDefault<z.ZodArray<z.ZodObject<{
1369
2487
  id: z.ZodString;
1370
2488
  kind: z.ZodEnum<{
@@ -1467,6 +2585,7 @@ export declare const designBranchRecordSchema: z.ZodObject<{
1467
2585
  "react-native": "react-native";
1468
2586
  }>;
1469
2587
  targetUrl: z.ZodOptional<z.ZodString>;
2588
+ previewOrigin: z.ZodOptional<z.ZodString>;
1470
2589
  targetName: z.ZodOptional<z.ZodString>;
1471
2590
  device: z.ZodOptional<z.ZodString>;
1472
2591
  viewport: z.ZodOptional<z.ZodObject<{
@@ -1482,7 +2601,7 @@ export declare const designBranchRecordSchema: z.ZodObject<{
1482
2601
  breakpoint: z.ZodDefault<z.ZodString>;
1483
2602
  state: z.ZodDefault<z.ZodString>;
1484
2603
  }, z.core.$strip>;
1485
- changes: z.ZodDefault<z.ZodArray<z.ZodObject<{
2604
+ changes: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
1486
2605
  id: z.ZodString;
1487
2606
  target: z.ZodObject<{
1488
2607
  id: z.ZodString;
@@ -1588,6 +2707,11 @@ export declare const designBranchRecordSchema: z.ZodObject<{
1588
2707
  theme: z.ZodDefault<z.ZodString>;
1589
2708
  state: z.ZodDefault<z.ZodString>;
1590
2709
  }, z.core.$strip>;
2710
+ contextSet: z.ZodOptional<z.ZodObject<{
2711
+ breakpoints: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
2712
+ themes: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
2713
+ states: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
2714
+ }, z.core.$strip>>;
1591
2715
  confidence: z.ZodEnum<{
1592
2716
  measured: "measured";
1593
2717
  instrumented: "instrumented";
@@ -1604,7 +2728,143 @@ export declare const designBranchRecordSchema: z.ZodObject<{
1604
2728
  applied: "applied";
1605
2729
  rejected: "rejected";
1606
2730
  }>>;
1607
- }, z.core.$strip>>>;
2731
+ }, z.core.$strip>, z.ZodTransform<{
2732
+ contextSet: {
2733
+ breakpoints: string[];
2734
+ themes: string[];
2735
+ states: string[];
2736
+ };
2737
+ id: string;
2738
+ target: {
2739
+ id: string;
2740
+ platform: "web" | "swiftui" | "react-native";
2741
+ semanticRole: string;
2742
+ label: string;
2743
+ componentPath: string[];
2744
+ geometry: {
2745
+ x: number;
2746
+ y: number;
2747
+ width: number;
2748
+ height: number;
2749
+ scale: number;
2750
+ };
2751
+ locator: Record<string, unknown>;
2752
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
2753
+ evidence: string[];
2754
+ source?: {
2755
+ file: string;
2756
+ line?: number | undefined;
2757
+ column?: number | undefined;
2758
+ symbol?: string | undefined;
2759
+ } | undefined;
2760
+ };
2761
+ category: "layout" | "spacing" | "typography" | "color" | "border" | "effect" | "content" | "asset" | "visibility" | "accessibility" | "responsive" | "state" | "motion";
2762
+ property: string;
2763
+ before: string | number | boolean | unknown[] | Record<string, unknown> | null;
2764
+ after: string | number | boolean | unknown[] | Record<string, unknown> | null;
2765
+ stateIds: string[];
2766
+ mappingCandidates: {
2767
+ id: string;
2768
+ label: string;
2769
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
2770
+ property: string;
2771
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
2772
+ scope: "instance" | "variant" | "component";
2773
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
2774
+ evidence: string[];
2775
+ blastRadius: number;
2776
+ targetId?: string | undefined;
2777
+ source?: {
2778
+ file: string;
2779
+ line?: number | undefined;
2780
+ column?: number | undefined;
2781
+ symbol?: string | undefined;
2782
+ } | undefined;
2783
+ }[];
2784
+ scope: "instance" | "variant" | "component";
2785
+ context: {
2786
+ breakpoint: string;
2787
+ theme: string;
2788
+ state: string;
2789
+ };
2790
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
2791
+ evidence: string[];
2792
+ createdAt: string;
2793
+ updatedAt: string;
2794
+ status: "unresolved" | "draft" | "approved" | "applied" | "rejected";
2795
+ unit?: string | undefined;
2796
+ token?: string | undefined;
2797
+ operationId?: string | undefined;
2798
+ selectedMappingId?: string | undefined;
2799
+ }, {
2800
+ id: string;
2801
+ target: {
2802
+ id: string;
2803
+ platform: "web" | "swiftui" | "react-native";
2804
+ semanticRole: string;
2805
+ label: string;
2806
+ componentPath: string[];
2807
+ geometry: {
2808
+ x: number;
2809
+ y: number;
2810
+ width: number;
2811
+ height: number;
2812
+ scale: number;
2813
+ };
2814
+ locator: Record<string, unknown>;
2815
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
2816
+ evidence: string[];
2817
+ source?: {
2818
+ file: string;
2819
+ line?: number | undefined;
2820
+ column?: number | undefined;
2821
+ symbol?: string | undefined;
2822
+ } | undefined;
2823
+ };
2824
+ category: "layout" | "spacing" | "typography" | "color" | "border" | "effect" | "content" | "asset" | "visibility" | "accessibility" | "responsive" | "state" | "motion";
2825
+ property: string;
2826
+ before: string | number | boolean | unknown[] | Record<string, unknown> | null;
2827
+ after: string | number | boolean | unknown[] | Record<string, unknown> | null;
2828
+ stateIds: string[];
2829
+ mappingCandidates: {
2830
+ id: string;
2831
+ label: string;
2832
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
2833
+ property: string;
2834
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
2835
+ scope: "instance" | "variant" | "component";
2836
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
2837
+ evidence: string[];
2838
+ blastRadius: number;
2839
+ targetId?: string | undefined;
2840
+ source?: {
2841
+ file: string;
2842
+ line?: number | undefined;
2843
+ column?: number | undefined;
2844
+ symbol?: string | undefined;
2845
+ } | undefined;
2846
+ }[];
2847
+ scope: "instance" | "variant" | "component";
2848
+ context: {
2849
+ breakpoint: string;
2850
+ theme: string;
2851
+ state: string;
2852
+ };
2853
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
2854
+ evidence: string[];
2855
+ createdAt: string;
2856
+ updatedAt: string;
2857
+ status: "unresolved" | "draft" | "approved" | "applied" | "rejected";
2858
+ unit?: string | undefined;
2859
+ token?: string | undefined;
2860
+ operationId?: string | undefined;
2861
+ selectedMappingId?: string | undefined;
2862
+ contextSet?: {
2863
+ breakpoints: string[];
2864
+ themes: string[];
2865
+ states: string[];
2866
+ } | undefined;
2867
+ }>>>>;
1608
2868
  operations: z.ZodDefault<z.ZodArray<z.ZodObject<{
1609
2869
  id: z.ZodString;
1610
2870
  kind: z.ZodEnum<{
@@ -1722,6 +2982,7 @@ export declare const designBranchRecordBundleSchema: z.ZodObject<{
1722
2982
  "react-native": "react-native";
1723
2983
  }>;
1724
2984
  targetUrl: z.ZodOptional<z.ZodString>;
2985
+ previewOrigin: z.ZodOptional<z.ZodString>;
1725
2986
  targetName: z.ZodOptional<z.ZodString>;
1726
2987
  device: z.ZodOptional<z.ZodString>;
1727
2988
  viewport: z.ZodOptional<z.ZodObject<{
@@ -1737,7 +2998,7 @@ export declare const designBranchRecordBundleSchema: z.ZodObject<{
1737
2998
  breakpoint: z.ZodDefault<z.ZodString>;
1738
2999
  state: z.ZodDefault<z.ZodString>;
1739
3000
  }, z.core.$strip>;
1740
- changes: z.ZodDefault<z.ZodArray<z.ZodObject<{
3001
+ changes: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
1741
3002
  id: z.ZodString;
1742
3003
  target: z.ZodObject<{
1743
3004
  id: z.ZodString;
@@ -1843,6 +3104,11 @@ export declare const designBranchRecordBundleSchema: z.ZodObject<{
1843
3104
  theme: z.ZodDefault<z.ZodString>;
1844
3105
  state: z.ZodDefault<z.ZodString>;
1845
3106
  }, z.core.$strip>;
3107
+ contextSet: z.ZodOptional<z.ZodObject<{
3108
+ breakpoints: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
3109
+ themes: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
3110
+ states: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
3111
+ }, z.core.$strip>>;
1846
3112
  confidence: z.ZodEnum<{
1847
3113
  measured: "measured";
1848
3114
  instrumented: "instrumented";
@@ -1859,7 +3125,143 @@ export declare const designBranchRecordBundleSchema: z.ZodObject<{
1859
3125
  applied: "applied";
1860
3126
  rejected: "rejected";
1861
3127
  }>>;
1862
- }, z.core.$strip>>>;
3128
+ }, z.core.$strip>, z.ZodTransform<{
3129
+ contextSet: {
3130
+ breakpoints: string[];
3131
+ themes: string[];
3132
+ states: string[];
3133
+ };
3134
+ id: string;
3135
+ target: {
3136
+ id: string;
3137
+ platform: "web" | "swiftui" | "react-native";
3138
+ semanticRole: string;
3139
+ label: string;
3140
+ componentPath: string[];
3141
+ geometry: {
3142
+ x: number;
3143
+ y: number;
3144
+ width: number;
3145
+ height: number;
3146
+ scale: number;
3147
+ };
3148
+ locator: Record<string, unknown>;
3149
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
3150
+ evidence: string[];
3151
+ source?: {
3152
+ file: string;
3153
+ line?: number | undefined;
3154
+ column?: number | undefined;
3155
+ symbol?: string | undefined;
3156
+ } | undefined;
3157
+ };
3158
+ category: "layout" | "spacing" | "typography" | "color" | "border" | "effect" | "content" | "asset" | "visibility" | "accessibility" | "responsive" | "state" | "motion";
3159
+ property: string;
3160
+ before: string | number | boolean | unknown[] | Record<string, unknown> | null;
3161
+ after: string | number | boolean | unknown[] | Record<string, unknown> | null;
3162
+ stateIds: string[];
3163
+ mappingCandidates: {
3164
+ id: string;
3165
+ label: string;
3166
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
3167
+ property: string;
3168
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
3169
+ scope: "instance" | "variant" | "component";
3170
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
3171
+ evidence: string[];
3172
+ blastRadius: number;
3173
+ targetId?: string | undefined;
3174
+ source?: {
3175
+ file: string;
3176
+ line?: number | undefined;
3177
+ column?: number | undefined;
3178
+ symbol?: string | undefined;
3179
+ } | undefined;
3180
+ }[];
3181
+ scope: "instance" | "variant" | "component";
3182
+ context: {
3183
+ breakpoint: string;
3184
+ theme: string;
3185
+ state: string;
3186
+ };
3187
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
3188
+ evidence: string[];
3189
+ createdAt: string;
3190
+ updatedAt: string;
3191
+ status: "unresolved" | "draft" | "approved" | "applied" | "rejected";
3192
+ unit?: string | undefined;
3193
+ token?: string | undefined;
3194
+ operationId?: string | undefined;
3195
+ selectedMappingId?: string | undefined;
3196
+ }, {
3197
+ id: string;
3198
+ target: {
3199
+ id: string;
3200
+ platform: "web" | "swiftui" | "react-native";
3201
+ semanticRole: string;
3202
+ label: string;
3203
+ componentPath: string[];
3204
+ geometry: {
3205
+ x: number;
3206
+ y: number;
3207
+ width: number;
3208
+ height: number;
3209
+ scale: number;
3210
+ };
3211
+ locator: Record<string, unknown>;
3212
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
3213
+ evidence: string[];
3214
+ source?: {
3215
+ file: string;
3216
+ line?: number | undefined;
3217
+ column?: number | undefined;
3218
+ symbol?: string | undefined;
3219
+ } | undefined;
3220
+ };
3221
+ category: "layout" | "spacing" | "typography" | "color" | "border" | "effect" | "content" | "asset" | "visibility" | "accessibility" | "responsive" | "state" | "motion";
3222
+ property: string;
3223
+ before: string | number | boolean | unknown[] | Record<string, unknown> | null;
3224
+ after: string | number | boolean | unknown[] | Record<string, unknown> | null;
3225
+ stateIds: string[];
3226
+ mappingCandidates: {
3227
+ id: string;
3228
+ label: string;
3229
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
3230
+ property: string;
3231
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
3232
+ scope: "instance" | "variant" | "component";
3233
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
3234
+ evidence: string[];
3235
+ blastRadius: number;
3236
+ targetId?: string | undefined;
3237
+ source?: {
3238
+ file: string;
3239
+ line?: number | undefined;
3240
+ column?: number | undefined;
3241
+ symbol?: string | undefined;
3242
+ } | undefined;
3243
+ }[];
3244
+ scope: "instance" | "variant" | "component";
3245
+ context: {
3246
+ breakpoint: string;
3247
+ theme: string;
3248
+ state: string;
3249
+ };
3250
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
3251
+ evidence: string[];
3252
+ createdAt: string;
3253
+ updatedAt: string;
3254
+ status: "unresolved" | "draft" | "approved" | "applied" | "rejected";
3255
+ unit?: string | undefined;
3256
+ token?: string | undefined;
3257
+ operationId?: string | undefined;
3258
+ selectedMappingId?: string | undefined;
3259
+ contextSet?: {
3260
+ breakpoints: string[];
3261
+ themes: string[];
3262
+ states: string[];
3263
+ } | undefined;
3264
+ }>>>>;
1863
3265
  operations: z.ZodDefault<z.ZodArray<z.ZodObject<{
1864
3266
  id: z.ZodString;
1865
3267
  kind: z.ZodEnum<{
@@ -1959,6 +3361,13 @@ export declare const verificationResultSchema: z.ZodObject<{
1959
3361
  property: z.ZodString;
1960
3362
  requested: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
1961
3363
  rendered: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
3364
+ context: z.ZodOptional<z.ZodObject<{
3365
+ breakpoint: z.ZodDefault<z.ZodString>;
3366
+ theme: z.ZodDefault<z.ZodString>;
3367
+ state: z.ZodDefault<z.ZodString>;
3368
+ }, z.core.$strip>>;
3369
+ applyRunId: z.ZodOptional<z.ZodString>;
3370
+ claimAttemptId: z.ZodOptional<z.ZodString>;
1962
3371
  passed: z.ZodBoolean;
1963
3372
  reason: z.ZodOptional<z.ZodString>;
1964
3373
  geometry: z.ZodOptional<z.ZodObject<{
@@ -1968,6 +3377,7 @@ export declare const verificationResultSchema: z.ZodObject<{
1968
3377
  height: z.ZodNumber;
1969
3378
  scale: z.ZodDefault<z.ZodNumber>;
1970
3379
  }, z.core.$strip>>;
3380
+ evidence: z.ZodDefault<z.ZodArray<z.ZodString>>;
1971
3381
  screenshotPath: z.ZodOptional<z.ZodString>;
1972
3382
  verifiedAt: z.ZodString;
1973
3383
  }, z.core.$strip>;
@@ -2003,11 +3413,660 @@ export declare const validationResultSchema: z.ZodObject<{
2003
3413
  name: z.ZodString;
2004
3414
  passed: z.ZodBoolean;
2005
3415
  summary: z.ZodOptional<z.ZodString>;
3416
+ applyRunId: z.ZodOptional<z.ZodString>;
3417
+ claimAttemptId: z.ZodOptional<z.ZodString>;
3418
+ validatedRevision: z.ZodOptional<z.ZodString>;
3419
+ validatedAt: z.ZodOptional<z.ZodString>;
3420
+ }, z.core.$strip>;
3421
+ export declare const sourceLineAnchorSchema: z.ZodObject<{
3422
+ line: z.ZodNumber;
3423
+ endLine: z.ZodOptional<z.ZodNumber>;
3424
+ symbol: z.ZodOptional<z.ZodString>;
3425
+ sha256: z.ZodString;
3426
+ }, z.core.$strip>;
3427
+ export declare const sourceFileSnapshotSchema: z.ZodObject<{
3428
+ path: z.ZodString;
3429
+ exists: z.ZodBoolean;
3430
+ sha256: z.ZodNullable<z.ZodString>;
3431
+ lineAnchors: z.ZodOptional<z.ZodArray<z.ZodObject<{
3432
+ line: z.ZodNumber;
3433
+ endLine: z.ZodOptional<z.ZodNumber>;
3434
+ symbol: z.ZodOptional<z.ZodString>;
3435
+ sha256: z.ZodString;
3436
+ }, z.core.$strip>>>;
2006
3437
  }, z.core.$strip>;
2007
3438
  export declare const applyRunSchema: z.ZodObject<{
2008
3439
  id: z.ZodString;
2009
3440
  sessionId: z.ZodString;
2010
3441
  changeIds: z.ZodArray<z.ZodString>;
3442
+ reviewedChangeSet: z.ZodOptional<z.ZodPipe<z.ZodObject<{
3443
+ protocolVersion: z.ZodEnum<{
3444
+ "1.3.0": "1.3.0";
3445
+ "1.2.0": "1.2.0";
3446
+ "1.0.0": "1.0.0";
3447
+ "1.1.0": "1.1.0";
3448
+ }>;
3449
+ sessionId: z.ZodString;
3450
+ context: z.ZodObject<{
3451
+ projectRoot: z.ZodString;
3452
+ revision: z.ZodOptional<z.ZodString>;
3453
+ designGraphRevision: z.ZodOptional<z.ZodString>;
3454
+ platform: z.ZodEnum<{
3455
+ web: "web";
3456
+ swiftui: "swiftui";
3457
+ "react-native": "react-native";
3458
+ }>;
3459
+ targetUrl: z.ZodOptional<z.ZodString>;
3460
+ previewOrigin: z.ZodOptional<z.ZodString>;
3461
+ targetName: z.ZodOptional<z.ZodString>;
3462
+ device: z.ZodOptional<z.ZodString>;
3463
+ viewport: z.ZodOptional<z.ZodObject<{
3464
+ width: z.ZodNumber;
3465
+ height: z.ZodNumber;
3466
+ }, z.core.$strip>>;
3467
+ theme: z.ZodDefault<z.ZodEnum<{
3468
+ light: "light";
3469
+ dark: "dark";
3470
+ system: "system";
3471
+ custom: "custom";
3472
+ }>>;
3473
+ breakpoint: z.ZodDefault<z.ZodString>;
3474
+ state: z.ZodDefault<z.ZodString>;
3475
+ }, z.core.$strip>;
3476
+ changes: z.ZodArray<z.ZodPipe<z.ZodObject<{
3477
+ id: z.ZodString;
3478
+ target: z.ZodObject<{
3479
+ id: z.ZodString;
3480
+ platform: z.ZodEnum<{
3481
+ web: "web";
3482
+ swiftui: "swiftui";
3483
+ "react-native": "react-native";
3484
+ }>;
3485
+ semanticRole: z.ZodDefault<z.ZodString>;
3486
+ label: z.ZodDefault<z.ZodString>;
3487
+ componentPath: z.ZodDefault<z.ZodArray<z.ZodString>>;
3488
+ source: z.ZodOptional<z.ZodObject<{
3489
+ file: z.ZodString;
3490
+ line: z.ZodOptional<z.ZodNumber>;
3491
+ column: z.ZodOptional<z.ZodNumber>;
3492
+ symbol: z.ZodOptional<z.ZodString>;
3493
+ }, z.core.$strip>>;
3494
+ geometry: z.ZodObject<{
3495
+ x: z.ZodNumber;
3496
+ y: z.ZodNumber;
3497
+ width: z.ZodNumber;
3498
+ height: z.ZodNumber;
3499
+ scale: z.ZodDefault<z.ZodNumber>;
3500
+ }, z.core.$strip>;
3501
+ locator: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3502
+ confidence: z.ZodEnum<{
3503
+ measured: "measured";
3504
+ instrumented: "instrumented";
3505
+ inferred: "inferred";
3506
+ unresolved: "unresolved";
3507
+ }>;
3508
+ evidence: z.ZodDefault<z.ZodArray<z.ZodString>>;
3509
+ }, z.core.$strip>;
3510
+ category: z.ZodEnum<{
3511
+ layout: "layout";
3512
+ spacing: "spacing";
3513
+ typography: "typography";
3514
+ color: "color";
3515
+ border: "border";
3516
+ effect: "effect";
3517
+ content: "content";
3518
+ asset: "asset";
3519
+ visibility: "visibility";
3520
+ accessibility: "accessibility";
3521
+ responsive: "responsive";
3522
+ state: "state";
3523
+ motion: "motion";
3524
+ }>;
3525
+ property: z.ZodString;
3526
+ before: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
3527
+ after: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
3528
+ unit: z.ZodOptional<z.ZodString>;
3529
+ token: z.ZodOptional<z.ZodString>;
3530
+ operationId: z.ZodOptional<z.ZodString>;
3531
+ stateIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
3532
+ mappingCandidates: z.ZodDefault<z.ZodArray<z.ZodObject<{
3533
+ id: z.ZodString;
3534
+ label: z.ZodString;
3535
+ intent: z.ZodEnum<{
3536
+ spacing: "spacing";
3537
+ content: "content";
3538
+ state: "state";
3539
+ motion: "motion";
3540
+ resize: "resize";
3541
+ align: "align";
3542
+ distribute: "distribute";
3543
+ position: "position";
3544
+ style: "style";
3545
+ "component-variant": "component-variant";
3546
+ "token-refactor": "token-refactor";
3547
+ }>;
3548
+ property: z.ZodString;
3549
+ targetId: z.ZodOptional<z.ZodString>;
3550
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
3551
+ source: z.ZodOptional<z.ZodObject<{
3552
+ file: z.ZodString;
3553
+ line: z.ZodOptional<z.ZodNumber>;
3554
+ column: z.ZodOptional<z.ZodNumber>;
3555
+ symbol: z.ZodOptional<z.ZodString>;
3556
+ }, z.core.$strip>>;
3557
+ scope: z.ZodDefault<z.ZodEnum<{
3558
+ instance: "instance";
3559
+ variant: "variant";
3560
+ component: "component";
3561
+ }>>;
3562
+ confidence: z.ZodEnum<{
3563
+ measured: "measured";
3564
+ instrumented: "instrumented";
3565
+ inferred: "inferred";
3566
+ unresolved: "unresolved";
3567
+ }>;
3568
+ evidence: z.ZodDefault<z.ZodArray<z.ZodString>>;
3569
+ blastRadius: z.ZodDefault<z.ZodNumber>;
3570
+ }, z.core.$strip>>>;
3571
+ selectedMappingId: z.ZodOptional<z.ZodString>;
3572
+ scope: z.ZodDefault<z.ZodEnum<{
3573
+ instance: "instance";
3574
+ variant: "variant";
3575
+ component: "component";
3576
+ }>>;
3577
+ context: z.ZodObject<{
3578
+ breakpoint: z.ZodDefault<z.ZodString>;
3579
+ theme: z.ZodDefault<z.ZodString>;
3580
+ state: z.ZodDefault<z.ZodString>;
3581
+ }, z.core.$strip>;
3582
+ contextSet: z.ZodOptional<z.ZodObject<{
3583
+ breakpoints: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
3584
+ themes: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
3585
+ states: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
3586
+ }, z.core.$strip>>;
3587
+ confidence: z.ZodEnum<{
3588
+ measured: "measured";
3589
+ instrumented: "instrumented";
3590
+ inferred: "inferred";
3591
+ unresolved: "unresolved";
3592
+ }>;
3593
+ evidence: z.ZodDefault<z.ZodArray<z.ZodString>>;
3594
+ createdAt: z.ZodString;
3595
+ updatedAt: z.ZodString;
3596
+ status: z.ZodDefault<z.ZodEnum<{
3597
+ unresolved: "unresolved";
3598
+ draft: "draft";
3599
+ approved: "approved";
3600
+ applied: "applied";
3601
+ rejected: "rejected";
3602
+ }>>;
3603
+ }, z.core.$strip>, z.ZodTransform<{
3604
+ contextSet: {
3605
+ breakpoints: string[];
3606
+ themes: string[];
3607
+ states: string[];
3608
+ };
3609
+ id: string;
3610
+ target: {
3611
+ id: string;
3612
+ platform: "web" | "swiftui" | "react-native";
3613
+ semanticRole: string;
3614
+ label: string;
3615
+ componentPath: string[];
3616
+ geometry: {
3617
+ x: number;
3618
+ y: number;
3619
+ width: number;
3620
+ height: number;
3621
+ scale: number;
3622
+ };
3623
+ locator: Record<string, unknown>;
3624
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
3625
+ evidence: string[];
3626
+ source?: {
3627
+ file: string;
3628
+ line?: number | undefined;
3629
+ column?: number | undefined;
3630
+ symbol?: string | undefined;
3631
+ } | undefined;
3632
+ };
3633
+ category: "layout" | "spacing" | "typography" | "color" | "border" | "effect" | "content" | "asset" | "visibility" | "accessibility" | "responsive" | "state" | "motion";
3634
+ property: string;
3635
+ before: string | number | boolean | unknown[] | Record<string, unknown> | null;
3636
+ after: string | number | boolean | unknown[] | Record<string, unknown> | null;
3637
+ stateIds: string[];
3638
+ mappingCandidates: {
3639
+ id: string;
3640
+ label: string;
3641
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
3642
+ property: string;
3643
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
3644
+ scope: "instance" | "variant" | "component";
3645
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
3646
+ evidence: string[];
3647
+ blastRadius: number;
3648
+ targetId?: string | undefined;
3649
+ source?: {
3650
+ file: string;
3651
+ line?: number | undefined;
3652
+ column?: number | undefined;
3653
+ symbol?: string | undefined;
3654
+ } | undefined;
3655
+ }[];
3656
+ scope: "instance" | "variant" | "component";
3657
+ context: {
3658
+ breakpoint: string;
3659
+ theme: string;
3660
+ state: string;
3661
+ };
3662
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
3663
+ evidence: string[];
3664
+ createdAt: string;
3665
+ updatedAt: string;
3666
+ status: "unresolved" | "draft" | "approved" | "applied" | "rejected";
3667
+ unit?: string | undefined;
3668
+ token?: string | undefined;
3669
+ operationId?: string | undefined;
3670
+ selectedMappingId?: string | undefined;
3671
+ }, {
3672
+ id: string;
3673
+ target: {
3674
+ id: string;
3675
+ platform: "web" | "swiftui" | "react-native";
3676
+ semanticRole: string;
3677
+ label: string;
3678
+ componentPath: string[];
3679
+ geometry: {
3680
+ x: number;
3681
+ y: number;
3682
+ width: number;
3683
+ height: number;
3684
+ scale: number;
3685
+ };
3686
+ locator: Record<string, unknown>;
3687
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
3688
+ evidence: string[];
3689
+ source?: {
3690
+ file: string;
3691
+ line?: number | undefined;
3692
+ column?: number | undefined;
3693
+ symbol?: string | undefined;
3694
+ } | undefined;
3695
+ };
3696
+ category: "layout" | "spacing" | "typography" | "color" | "border" | "effect" | "content" | "asset" | "visibility" | "accessibility" | "responsive" | "state" | "motion";
3697
+ property: string;
3698
+ before: string | number | boolean | unknown[] | Record<string, unknown> | null;
3699
+ after: string | number | boolean | unknown[] | Record<string, unknown> | null;
3700
+ stateIds: string[];
3701
+ mappingCandidates: {
3702
+ id: string;
3703
+ label: string;
3704
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
3705
+ property: string;
3706
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
3707
+ scope: "instance" | "variant" | "component";
3708
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
3709
+ evidence: string[];
3710
+ blastRadius: number;
3711
+ targetId?: string | undefined;
3712
+ source?: {
3713
+ file: string;
3714
+ line?: number | undefined;
3715
+ column?: number | undefined;
3716
+ symbol?: string | undefined;
3717
+ } | undefined;
3718
+ }[];
3719
+ scope: "instance" | "variant" | "component";
3720
+ context: {
3721
+ breakpoint: string;
3722
+ theme: string;
3723
+ state: string;
3724
+ };
3725
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
3726
+ evidence: string[];
3727
+ createdAt: string;
3728
+ updatedAt: string;
3729
+ status: "unresolved" | "draft" | "approved" | "applied" | "rejected";
3730
+ unit?: string | undefined;
3731
+ token?: string | undefined;
3732
+ operationId?: string | undefined;
3733
+ selectedMappingId?: string | undefined;
3734
+ contextSet?: {
3735
+ breakpoints: string[];
3736
+ themes: string[];
3737
+ states: string[];
3738
+ } | undefined;
3739
+ }>>>;
3740
+ operations: z.ZodDefault<z.ZodArray<z.ZodObject<{
3741
+ id: z.ZodString;
3742
+ kind: z.ZodEnum<{
3743
+ spacing: "spacing";
3744
+ content: "content";
3745
+ state: "state";
3746
+ motion: "motion";
3747
+ resize: "resize";
3748
+ align: "align";
3749
+ distribute: "distribute";
3750
+ style: "style";
3751
+ "component-variant": "component-variant";
3752
+ "token-refactor": "token-refactor";
3753
+ }>;
3754
+ label: z.ZodString;
3755
+ targetIds: z.ZodArray<z.ZodString>;
3756
+ changeIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
3757
+ stateIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
3758
+ mappingCandidates: z.ZodDefault<z.ZodArray<z.ZodObject<{
3759
+ id: z.ZodString;
3760
+ label: z.ZodString;
3761
+ intent: z.ZodEnum<{
3762
+ spacing: "spacing";
3763
+ content: "content";
3764
+ state: "state";
3765
+ motion: "motion";
3766
+ resize: "resize";
3767
+ align: "align";
3768
+ distribute: "distribute";
3769
+ position: "position";
3770
+ style: "style";
3771
+ "component-variant": "component-variant";
3772
+ "token-refactor": "token-refactor";
3773
+ }>;
3774
+ property: z.ZodString;
3775
+ targetId: z.ZodOptional<z.ZodString>;
3776
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
3777
+ source: z.ZodOptional<z.ZodObject<{
3778
+ file: z.ZodString;
3779
+ line: z.ZodOptional<z.ZodNumber>;
3780
+ column: z.ZodOptional<z.ZodNumber>;
3781
+ symbol: z.ZodOptional<z.ZodString>;
3782
+ }, z.core.$strip>>;
3783
+ scope: z.ZodDefault<z.ZodEnum<{
3784
+ instance: "instance";
3785
+ variant: "variant";
3786
+ component: "component";
3787
+ }>>;
3788
+ confidence: z.ZodEnum<{
3789
+ measured: "measured";
3790
+ instrumented: "instrumented";
3791
+ inferred: "inferred";
3792
+ unresolved: "unresolved";
3793
+ }>;
3794
+ evidence: z.ZodDefault<z.ZodArray<z.ZodString>>;
3795
+ blastRadius: z.ZodDefault<z.ZodNumber>;
3796
+ }, z.core.$strip>>>;
3797
+ selectedMappingId: z.ZodOptional<z.ZodString>;
3798
+ status: z.ZodDefault<z.ZodEnum<{
3799
+ unresolved: "unresolved";
3800
+ resolved: "resolved";
3801
+ preview: "preview";
3802
+ }>>;
3803
+ createdAt: z.ZodString;
3804
+ updatedAt: z.ZodString;
3805
+ }, z.core.$strip>>>;
3806
+ designGraphRevision: z.ZodOptional<z.ZodString>;
3807
+ screenshots: z.ZodDefault<z.ZodArray<z.ZodObject<{
3808
+ label: z.ZodString;
3809
+ path: z.ZodString;
3810
+ createdAt: z.ZodString;
3811
+ }, z.core.$strip>>>;
3812
+ createdAt: z.ZodString;
3813
+ updatedAt: z.ZodString;
3814
+ }, z.core.$strip>, z.ZodTransform<{
3815
+ protocolVersion: "1.3.0";
3816
+ sessionId: string;
3817
+ context: {
3818
+ projectRoot: string;
3819
+ platform: "web" | "swiftui" | "react-native";
3820
+ theme: "light" | "dark" | "system" | "custom";
3821
+ breakpoint: string;
3822
+ state: string;
3823
+ revision?: string | undefined;
3824
+ designGraphRevision?: string | undefined;
3825
+ targetUrl?: string | undefined;
3826
+ previewOrigin?: string | undefined;
3827
+ targetName?: string | undefined;
3828
+ device?: string | undefined;
3829
+ viewport?: {
3830
+ width: number;
3831
+ height: number;
3832
+ } | undefined;
3833
+ };
3834
+ changes: {
3835
+ contextSet: {
3836
+ breakpoints: string[];
3837
+ themes: string[];
3838
+ states: string[];
3839
+ };
3840
+ id: string;
3841
+ target: {
3842
+ id: string;
3843
+ platform: "web" | "swiftui" | "react-native";
3844
+ semanticRole: string;
3845
+ label: string;
3846
+ componentPath: string[];
3847
+ geometry: {
3848
+ x: number;
3849
+ y: number;
3850
+ width: number;
3851
+ height: number;
3852
+ scale: number;
3853
+ };
3854
+ locator: Record<string, unknown>;
3855
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
3856
+ evidence: string[];
3857
+ source?: {
3858
+ file: string;
3859
+ line?: number | undefined;
3860
+ column?: number | undefined;
3861
+ symbol?: string | undefined;
3862
+ } | undefined;
3863
+ };
3864
+ category: "layout" | "spacing" | "typography" | "color" | "border" | "effect" | "content" | "asset" | "visibility" | "accessibility" | "responsive" | "state" | "motion";
3865
+ property: string;
3866
+ before: string | number | boolean | unknown[] | Record<string, unknown> | null;
3867
+ after: string | number | boolean | unknown[] | Record<string, unknown> | null;
3868
+ stateIds: string[];
3869
+ mappingCandidates: {
3870
+ id: string;
3871
+ label: string;
3872
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
3873
+ property: string;
3874
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
3875
+ scope: "instance" | "variant" | "component";
3876
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
3877
+ evidence: string[];
3878
+ blastRadius: number;
3879
+ targetId?: string | undefined;
3880
+ source?: {
3881
+ file: string;
3882
+ line?: number | undefined;
3883
+ column?: number | undefined;
3884
+ symbol?: string | undefined;
3885
+ } | undefined;
3886
+ }[];
3887
+ scope: "instance" | "variant" | "component";
3888
+ context: {
3889
+ breakpoint: string;
3890
+ theme: string;
3891
+ state: string;
3892
+ };
3893
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
3894
+ evidence: string[];
3895
+ createdAt: string;
3896
+ updatedAt: string;
3897
+ status: "unresolved" | "draft" | "approved" | "applied" | "rejected";
3898
+ unit?: string | undefined;
3899
+ token?: string | undefined;
3900
+ operationId?: string | undefined;
3901
+ selectedMappingId?: string | undefined;
3902
+ }[];
3903
+ operations: {
3904
+ id: string;
3905
+ kind: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "style" | "component-variant" | "token-refactor";
3906
+ label: string;
3907
+ targetIds: string[];
3908
+ changeIds: string[];
3909
+ stateIds: string[];
3910
+ mappingCandidates: {
3911
+ id: string;
3912
+ label: string;
3913
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
3914
+ property: string;
3915
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
3916
+ scope: "instance" | "variant" | "component";
3917
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
3918
+ evidence: string[];
3919
+ blastRadius: number;
3920
+ targetId?: string | undefined;
3921
+ source?: {
3922
+ file: string;
3923
+ line?: number | undefined;
3924
+ column?: number | undefined;
3925
+ symbol?: string | undefined;
3926
+ } | undefined;
3927
+ }[];
3928
+ status: "unresolved" | "resolved" | "preview";
3929
+ createdAt: string;
3930
+ updatedAt: string;
3931
+ selectedMappingId?: string | undefined;
3932
+ }[];
3933
+ screenshots: {
3934
+ label: string;
3935
+ path: string;
3936
+ createdAt: string;
3937
+ }[];
3938
+ createdAt: string;
3939
+ updatedAt: string;
3940
+ designGraphRevision?: string | undefined;
3941
+ }, {
3942
+ protocolVersion: "1.3.0" | "1.2.0" | "1.0.0" | "1.1.0";
3943
+ sessionId: string;
3944
+ context: {
3945
+ projectRoot: string;
3946
+ platform: "web" | "swiftui" | "react-native";
3947
+ theme: "light" | "dark" | "system" | "custom";
3948
+ breakpoint: string;
3949
+ state: string;
3950
+ revision?: string | undefined;
3951
+ designGraphRevision?: string | undefined;
3952
+ targetUrl?: string | undefined;
3953
+ previewOrigin?: string | undefined;
3954
+ targetName?: string | undefined;
3955
+ device?: string | undefined;
3956
+ viewport?: {
3957
+ width: number;
3958
+ height: number;
3959
+ } | undefined;
3960
+ };
3961
+ changes: {
3962
+ contextSet: {
3963
+ breakpoints: string[];
3964
+ themes: string[];
3965
+ states: string[];
3966
+ };
3967
+ id: string;
3968
+ target: {
3969
+ id: string;
3970
+ platform: "web" | "swiftui" | "react-native";
3971
+ semanticRole: string;
3972
+ label: string;
3973
+ componentPath: string[];
3974
+ geometry: {
3975
+ x: number;
3976
+ y: number;
3977
+ width: number;
3978
+ height: number;
3979
+ scale: number;
3980
+ };
3981
+ locator: Record<string, unknown>;
3982
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
3983
+ evidence: string[];
3984
+ source?: {
3985
+ file: string;
3986
+ line?: number | undefined;
3987
+ column?: number | undefined;
3988
+ symbol?: string | undefined;
3989
+ } | undefined;
3990
+ };
3991
+ category: "layout" | "spacing" | "typography" | "color" | "border" | "effect" | "content" | "asset" | "visibility" | "accessibility" | "responsive" | "state" | "motion";
3992
+ property: string;
3993
+ before: string | number | boolean | unknown[] | Record<string, unknown> | null;
3994
+ after: string | number | boolean | unknown[] | Record<string, unknown> | null;
3995
+ stateIds: string[];
3996
+ mappingCandidates: {
3997
+ id: string;
3998
+ label: string;
3999
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
4000
+ property: string;
4001
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
4002
+ scope: "instance" | "variant" | "component";
4003
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
4004
+ evidence: string[];
4005
+ blastRadius: number;
4006
+ targetId?: string | undefined;
4007
+ source?: {
4008
+ file: string;
4009
+ line?: number | undefined;
4010
+ column?: number | undefined;
4011
+ symbol?: string | undefined;
4012
+ } | undefined;
4013
+ }[];
4014
+ scope: "instance" | "variant" | "component";
4015
+ context: {
4016
+ breakpoint: string;
4017
+ theme: string;
4018
+ state: string;
4019
+ };
4020
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
4021
+ evidence: string[];
4022
+ createdAt: string;
4023
+ updatedAt: string;
4024
+ status: "unresolved" | "draft" | "approved" | "applied" | "rejected";
4025
+ unit?: string | undefined;
4026
+ token?: string | undefined;
4027
+ operationId?: string | undefined;
4028
+ selectedMappingId?: string | undefined;
4029
+ }[];
4030
+ operations: {
4031
+ id: string;
4032
+ kind: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "style" | "component-variant" | "token-refactor";
4033
+ label: string;
4034
+ targetIds: string[];
4035
+ changeIds: string[];
4036
+ stateIds: string[];
4037
+ mappingCandidates: {
4038
+ id: string;
4039
+ label: string;
4040
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
4041
+ property: string;
4042
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
4043
+ scope: "instance" | "variant" | "component";
4044
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
4045
+ evidence: string[];
4046
+ blastRadius: number;
4047
+ targetId?: string | undefined;
4048
+ source?: {
4049
+ file: string;
4050
+ line?: number | undefined;
4051
+ column?: number | undefined;
4052
+ symbol?: string | undefined;
4053
+ } | undefined;
4054
+ }[];
4055
+ status: "unresolved" | "resolved" | "preview";
4056
+ createdAt: string;
4057
+ updatedAt: string;
4058
+ selectedMappingId?: string | undefined;
4059
+ }[];
4060
+ screenshots: {
4061
+ label: string;
4062
+ path: string;
4063
+ createdAt: string;
4064
+ }[];
4065
+ createdAt: string;
4066
+ updatedAt: string;
4067
+ designGraphRevision?: string | undefined;
4068
+ }>>>;
4069
+ legacyApplyCompatibility: z.ZodOptional<z.ZodBoolean>;
2011
4070
  revision: z.ZodOptional<z.ZodString>;
2012
4071
  designGraphRevision: z.ZodOptional<z.ZodString>;
2013
4072
  state: z.ZodEnum<{
@@ -2048,12 +4107,23 @@ export declare const applyRunSchema: z.ZodObject<{
2048
4107
  name: z.ZodString;
2049
4108
  passed: z.ZodBoolean;
2050
4109
  summary: z.ZodOptional<z.ZodString>;
4110
+ applyRunId: z.ZodOptional<z.ZodString>;
4111
+ claimAttemptId: z.ZodOptional<z.ZodString>;
4112
+ validatedRevision: z.ZodOptional<z.ZodString>;
4113
+ validatedAt: z.ZodOptional<z.ZodString>;
2051
4114
  }, z.core.$strip>>>;
2052
4115
  verificationResults: z.ZodDefault<z.ZodArray<z.ZodObject<{
2053
4116
  changeId: z.ZodString;
2054
4117
  property: z.ZodString;
2055
4118
  requested: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
2056
4119
  rendered: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
4120
+ context: z.ZodOptional<z.ZodObject<{
4121
+ breakpoint: z.ZodDefault<z.ZodString>;
4122
+ theme: z.ZodDefault<z.ZodString>;
4123
+ state: z.ZodDefault<z.ZodString>;
4124
+ }, z.core.$strip>>;
4125
+ applyRunId: z.ZodOptional<z.ZodString>;
4126
+ claimAttemptId: z.ZodOptional<z.ZodString>;
2057
4127
  passed: z.ZodBoolean;
2058
4128
  reason: z.ZodOptional<z.ZodString>;
2059
4129
  geometry: z.ZodOptional<z.ZodObject<{
@@ -2063,11 +4133,44 @@ export declare const applyRunSchema: z.ZodObject<{
2063
4133
  height: z.ZodNumber;
2064
4134
  scale: z.ZodDefault<z.ZodNumber>;
2065
4135
  }, z.core.$strip>>;
4136
+ evidence: z.ZodDefault<z.ZodArray<z.ZodString>>;
2066
4137
  screenshotPath: z.ZodOptional<z.ZodString>;
2067
4138
  verifiedAt: z.ZodString;
2068
4139
  }, z.core.$strip>>>;
4140
+ applyResultAcknowledgedAt: z.ZodOptional<z.ZodString>;
4141
+ applyResultClaimAttemptId: z.ZodOptional<z.ZodString>;
4142
+ sourceProofScope: z.ZodOptional<z.ZodEnum<{
4143
+ git: "git";
4144
+ "mapped-files": "mapped-files";
4145
+ }>>;
4146
+ sourceHeadRevision: z.ZodOptional<z.ZodString>;
4147
+ baselineSourceFiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
4148
+ path: z.ZodString;
4149
+ exists: z.ZodBoolean;
4150
+ sha256: z.ZodNullable<z.ZodString>;
4151
+ lineAnchors: z.ZodOptional<z.ZodArray<z.ZodObject<{
4152
+ line: z.ZodNumber;
4153
+ endLine: z.ZodOptional<z.ZodNumber>;
4154
+ symbol: z.ZodOptional<z.ZodString>;
4155
+ sha256: z.ZodString;
4156
+ }, z.core.$strip>>>;
4157
+ }, z.core.$strip>>>;
4158
+ appliedRevision: z.ZodOptional<z.ZodString>;
4159
+ appliedChangedFiles: z.ZodDefault<z.ZodArray<z.ZodString>>;
4160
+ appliedSourceFiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
4161
+ path: z.ZodString;
4162
+ exists: z.ZodBoolean;
4163
+ sha256: z.ZodNullable<z.ZodString>;
4164
+ lineAnchors: z.ZodOptional<z.ZodArray<z.ZodObject<{
4165
+ line: z.ZodNumber;
4166
+ endLine: z.ZodOptional<z.ZodNumber>;
4167
+ symbol: z.ZodOptional<z.ZodString>;
4168
+ sha256: z.ZodString;
4169
+ }, z.core.$strip>>>;
4170
+ }, z.core.$strip>>>;
2069
4171
  attempts: z.ZodDefault<z.ZodNumber>;
2070
4172
  claimAttemptId: z.ZodOptional<z.ZodString>;
4173
+ claimCapabilityHash: z.ZodOptional<z.ZodString>;
2071
4174
  claimExpiresAt: z.ZodOptional<z.ZodString>;
2072
4175
  claimHeartbeatAt: z.ZodOptional<z.ZodString>;
2073
4176
  requeueCount: z.ZodDefault<z.ZodNumber>;
@@ -2153,12 +4256,23 @@ export declare const deliveryRecordSchema: z.ZodObject<{
2153
4256
  name: z.ZodString;
2154
4257
  passed: z.ZodBoolean;
2155
4258
  summary: z.ZodOptional<z.ZodString>;
4259
+ applyRunId: z.ZodOptional<z.ZodString>;
4260
+ claimAttemptId: z.ZodOptional<z.ZodString>;
4261
+ validatedRevision: z.ZodOptional<z.ZodString>;
4262
+ validatedAt: z.ZodOptional<z.ZodString>;
2156
4263
  }, z.core.$strip>>>;
2157
4264
  verificationResults: z.ZodDefault<z.ZodArray<z.ZodObject<{
2158
4265
  changeId: z.ZodString;
2159
4266
  property: z.ZodString;
2160
4267
  requested: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
2161
4268
  rendered: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
4269
+ context: z.ZodOptional<z.ZodObject<{
4270
+ breakpoint: z.ZodDefault<z.ZodString>;
4271
+ theme: z.ZodDefault<z.ZodString>;
4272
+ state: z.ZodDefault<z.ZodString>;
4273
+ }, z.core.$strip>>;
4274
+ applyRunId: z.ZodOptional<z.ZodString>;
4275
+ claimAttemptId: z.ZodOptional<z.ZodString>;
2162
4276
  passed: z.ZodBoolean;
2163
4277
  reason: z.ZodOptional<z.ZodString>;
2164
4278
  geometry: z.ZodOptional<z.ZodObject<{
@@ -2168,6 +4282,7 @@ export declare const deliveryRecordSchema: z.ZodObject<{
2168
4282
  height: z.ZodNumber;
2169
4283
  scale: z.ZodDefault<z.ZodNumber>;
2170
4284
  }, z.core.$strip>>;
4285
+ evidence: z.ZodDefault<z.ZodArray<z.ZodString>>;
2171
4286
  screenshotPath: z.ZodOptional<z.ZodString>;
2172
4287
  verifiedAt: z.ZodString;
2173
4288
  }, z.core.$strip>>>;
@@ -2177,6 +4292,8 @@ export declare const deliveryRecordSchema: z.ZodObject<{
2177
4292
  createdAt: z.ZodString;
2178
4293
  }, z.core.$strip>>>;
2179
4294
  revision: z.ZodOptional<z.ZodString>;
4295
+ baselineRevision: z.ZodOptional<z.ZodString>;
4296
+ appliedRevision: z.ZodOptional<z.ZodString>;
2180
4297
  designGraphRevision: z.ZodOptional<z.ZodString>;
2181
4298
  createdAt: z.ZodString;
2182
4299
  updatedAt: z.ZodString;
@@ -2235,12 +4352,23 @@ export declare const designHistoryEntrySchema: z.ZodObject<{
2235
4352
  name: z.ZodString;
2236
4353
  passed: z.ZodBoolean;
2237
4354
  summary: z.ZodOptional<z.ZodString>;
4355
+ applyRunId: z.ZodOptional<z.ZodString>;
4356
+ claimAttemptId: z.ZodOptional<z.ZodString>;
4357
+ validatedRevision: z.ZodOptional<z.ZodString>;
4358
+ validatedAt: z.ZodOptional<z.ZodString>;
2238
4359
  }, z.core.$strip>>>;
2239
4360
  verificationResults: z.ZodDefault<z.ZodArray<z.ZodObject<{
2240
4361
  changeId: z.ZodString;
2241
4362
  property: z.ZodString;
2242
4363
  requested: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
2243
4364
  rendered: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
4365
+ context: z.ZodOptional<z.ZodObject<{
4366
+ breakpoint: z.ZodDefault<z.ZodString>;
4367
+ theme: z.ZodDefault<z.ZodString>;
4368
+ state: z.ZodDefault<z.ZodString>;
4369
+ }, z.core.$strip>>;
4370
+ applyRunId: z.ZodOptional<z.ZodString>;
4371
+ claimAttemptId: z.ZodOptional<z.ZodString>;
2244
4372
  passed: z.ZodBoolean;
2245
4373
  reason: z.ZodOptional<z.ZodString>;
2246
4374
  geometry: z.ZodOptional<z.ZodObject<{
@@ -2250,10 +4378,13 @@ export declare const designHistoryEntrySchema: z.ZodObject<{
2250
4378
  height: z.ZodNumber;
2251
4379
  scale: z.ZodDefault<z.ZodNumber>;
2252
4380
  }, z.core.$strip>>;
4381
+ evidence: z.ZodDefault<z.ZodArray<z.ZodString>>;
2253
4382
  screenshotPath: z.ZodOptional<z.ZodString>;
2254
4383
  verifiedAt: z.ZodString;
2255
4384
  }, z.core.$strip>>>;
2256
4385
  revision: z.ZodOptional<z.ZodString>;
4386
+ baselineRevision: z.ZodOptional<z.ZodString>;
4387
+ appliedRevision: z.ZodOptional<z.ZodString>;
2257
4388
  createdAt: z.ZodString;
2258
4389
  }, z.core.$strip>;
2259
4390
  export declare const deliveryMilestoneSchema: z.ZodObject<{
@@ -2394,7 +4525,7 @@ export declare const visualAgentProposalSchema: z.ZodObject<{
2394
4525
  sourceLocations: z.ZodDefault<z.ZodArray<z.ZodString>>;
2395
4526
  responsiveImpact: z.ZodString;
2396
4527
  verificationPlan: z.ZodDefault<z.ZodArray<z.ZodString>>;
2397
- changes: z.ZodDefault<z.ZodArray<z.ZodObject<{
4528
+ changes: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
2398
4529
  id: z.ZodString;
2399
4530
  target: z.ZodObject<{
2400
4531
  id: z.ZodString;
@@ -2500,6 +4631,11 @@ export declare const visualAgentProposalSchema: z.ZodObject<{
2500
4631
  theme: z.ZodDefault<z.ZodString>;
2501
4632
  state: z.ZodDefault<z.ZodString>;
2502
4633
  }, z.core.$strip>;
4634
+ contextSet: z.ZodOptional<z.ZodObject<{
4635
+ breakpoints: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
4636
+ themes: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
4637
+ states: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
4638
+ }, z.core.$strip>>;
2503
4639
  confidence: z.ZodEnum<{
2504
4640
  measured: "measured";
2505
4641
  instrumented: "instrumented";
@@ -2516,7 +4652,143 @@ export declare const visualAgentProposalSchema: z.ZodObject<{
2516
4652
  applied: "applied";
2517
4653
  rejected: "rejected";
2518
4654
  }>>;
2519
- }, z.core.$strip>>>;
4655
+ }, z.core.$strip>, z.ZodTransform<{
4656
+ contextSet: {
4657
+ breakpoints: string[];
4658
+ themes: string[];
4659
+ states: string[];
4660
+ };
4661
+ id: string;
4662
+ target: {
4663
+ id: string;
4664
+ platform: "web" | "swiftui" | "react-native";
4665
+ semanticRole: string;
4666
+ label: string;
4667
+ componentPath: string[];
4668
+ geometry: {
4669
+ x: number;
4670
+ y: number;
4671
+ width: number;
4672
+ height: number;
4673
+ scale: number;
4674
+ };
4675
+ locator: Record<string, unknown>;
4676
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
4677
+ evidence: string[];
4678
+ source?: {
4679
+ file: string;
4680
+ line?: number | undefined;
4681
+ column?: number | undefined;
4682
+ symbol?: string | undefined;
4683
+ } | undefined;
4684
+ };
4685
+ category: "layout" | "spacing" | "typography" | "color" | "border" | "effect" | "content" | "asset" | "visibility" | "accessibility" | "responsive" | "state" | "motion";
4686
+ property: string;
4687
+ before: string | number | boolean | unknown[] | Record<string, unknown> | null;
4688
+ after: string | number | boolean | unknown[] | Record<string, unknown> | null;
4689
+ stateIds: string[];
4690
+ mappingCandidates: {
4691
+ id: string;
4692
+ label: string;
4693
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
4694
+ property: string;
4695
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
4696
+ scope: "instance" | "variant" | "component";
4697
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
4698
+ evidence: string[];
4699
+ blastRadius: number;
4700
+ targetId?: string | undefined;
4701
+ source?: {
4702
+ file: string;
4703
+ line?: number | undefined;
4704
+ column?: number | undefined;
4705
+ symbol?: string | undefined;
4706
+ } | undefined;
4707
+ }[];
4708
+ scope: "instance" | "variant" | "component";
4709
+ context: {
4710
+ breakpoint: string;
4711
+ theme: string;
4712
+ state: string;
4713
+ };
4714
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
4715
+ evidence: string[];
4716
+ createdAt: string;
4717
+ updatedAt: string;
4718
+ status: "unresolved" | "draft" | "approved" | "applied" | "rejected";
4719
+ unit?: string | undefined;
4720
+ token?: string | undefined;
4721
+ operationId?: string | undefined;
4722
+ selectedMappingId?: string | undefined;
4723
+ }, {
4724
+ id: string;
4725
+ target: {
4726
+ id: string;
4727
+ platform: "web" | "swiftui" | "react-native";
4728
+ semanticRole: string;
4729
+ label: string;
4730
+ componentPath: string[];
4731
+ geometry: {
4732
+ x: number;
4733
+ y: number;
4734
+ width: number;
4735
+ height: number;
4736
+ scale: number;
4737
+ };
4738
+ locator: Record<string, unknown>;
4739
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
4740
+ evidence: string[];
4741
+ source?: {
4742
+ file: string;
4743
+ line?: number | undefined;
4744
+ column?: number | undefined;
4745
+ symbol?: string | undefined;
4746
+ } | undefined;
4747
+ };
4748
+ category: "layout" | "spacing" | "typography" | "color" | "border" | "effect" | "content" | "asset" | "visibility" | "accessibility" | "responsive" | "state" | "motion";
4749
+ property: string;
4750
+ before: string | number | boolean | unknown[] | Record<string, unknown> | null;
4751
+ after: string | number | boolean | unknown[] | Record<string, unknown> | null;
4752
+ stateIds: string[];
4753
+ mappingCandidates: {
4754
+ id: string;
4755
+ label: string;
4756
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
4757
+ property: string;
4758
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
4759
+ scope: "instance" | "variant" | "component";
4760
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
4761
+ evidence: string[];
4762
+ blastRadius: number;
4763
+ targetId?: string | undefined;
4764
+ source?: {
4765
+ file: string;
4766
+ line?: number | undefined;
4767
+ column?: number | undefined;
4768
+ symbol?: string | undefined;
4769
+ } | undefined;
4770
+ }[];
4771
+ scope: "instance" | "variant" | "component";
4772
+ context: {
4773
+ breakpoint: string;
4774
+ theme: string;
4775
+ state: string;
4776
+ };
4777
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
4778
+ evidence: string[];
4779
+ createdAt: string;
4780
+ updatedAt: string;
4781
+ status: "unresolved" | "draft" | "approved" | "applied" | "rejected";
4782
+ unit?: string | undefined;
4783
+ token?: string | undefined;
4784
+ operationId?: string | undefined;
4785
+ selectedMappingId?: string | undefined;
4786
+ contextSet?: {
4787
+ breakpoints: string[];
4788
+ themes: string[];
4789
+ states: string[];
4790
+ } | undefined;
4791
+ }>>>>;
2520
4792
  branchId: z.ZodOptional<z.ZodString>;
2521
4793
  status: z.ZodDefault<z.ZodEnum<{
2522
4794
  rejected: "rejected";
@@ -2654,7 +4926,7 @@ export declare const visualAgentRequestSchema: z.ZodObject<{
2654
4926
  sourceLocations: z.ZodDefault<z.ZodArray<z.ZodString>>;
2655
4927
  responsiveImpact: z.ZodString;
2656
4928
  verificationPlan: z.ZodDefault<z.ZodArray<z.ZodString>>;
2657
- changes: z.ZodDefault<z.ZodArray<z.ZodObject<{
4929
+ changes: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
2658
4930
  id: z.ZodString;
2659
4931
  target: z.ZodObject<{
2660
4932
  id: z.ZodString;
@@ -2760,6 +5032,11 @@ export declare const visualAgentRequestSchema: z.ZodObject<{
2760
5032
  theme: z.ZodDefault<z.ZodString>;
2761
5033
  state: z.ZodDefault<z.ZodString>;
2762
5034
  }, z.core.$strip>;
5035
+ contextSet: z.ZodOptional<z.ZodObject<{
5036
+ breakpoints: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
5037
+ themes: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
5038
+ states: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
5039
+ }, z.core.$strip>>;
2763
5040
  confidence: z.ZodEnum<{
2764
5041
  measured: "measured";
2765
5042
  instrumented: "instrumented";
@@ -2776,7 +5053,143 @@ export declare const visualAgentRequestSchema: z.ZodObject<{
2776
5053
  applied: "applied";
2777
5054
  rejected: "rejected";
2778
5055
  }>>;
2779
- }, z.core.$strip>>>;
5056
+ }, z.core.$strip>, z.ZodTransform<{
5057
+ contextSet: {
5058
+ breakpoints: string[];
5059
+ themes: string[];
5060
+ states: string[];
5061
+ };
5062
+ id: string;
5063
+ target: {
5064
+ id: string;
5065
+ platform: "web" | "swiftui" | "react-native";
5066
+ semanticRole: string;
5067
+ label: string;
5068
+ componentPath: string[];
5069
+ geometry: {
5070
+ x: number;
5071
+ y: number;
5072
+ width: number;
5073
+ height: number;
5074
+ scale: number;
5075
+ };
5076
+ locator: Record<string, unknown>;
5077
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
5078
+ evidence: string[];
5079
+ source?: {
5080
+ file: string;
5081
+ line?: number | undefined;
5082
+ column?: number | undefined;
5083
+ symbol?: string | undefined;
5084
+ } | undefined;
5085
+ };
5086
+ category: "layout" | "spacing" | "typography" | "color" | "border" | "effect" | "content" | "asset" | "visibility" | "accessibility" | "responsive" | "state" | "motion";
5087
+ property: string;
5088
+ before: string | number | boolean | unknown[] | Record<string, unknown> | null;
5089
+ after: string | number | boolean | unknown[] | Record<string, unknown> | null;
5090
+ stateIds: string[];
5091
+ mappingCandidates: {
5092
+ id: string;
5093
+ label: string;
5094
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
5095
+ property: string;
5096
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
5097
+ scope: "instance" | "variant" | "component";
5098
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
5099
+ evidence: string[];
5100
+ blastRadius: number;
5101
+ targetId?: string | undefined;
5102
+ source?: {
5103
+ file: string;
5104
+ line?: number | undefined;
5105
+ column?: number | undefined;
5106
+ symbol?: string | undefined;
5107
+ } | undefined;
5108
+ }[];
5109
+ scope: "instance" | "variant" | "component";
5110
+ context: {
5111
+ breakpoint: string;
5112
+ theme: string;
5113
+ state: string;
5114
+ };
5115
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
5116
+ evidence: string[];
5117
+ createdAt: string;
5118
+ updatedAt: string;
5119
+ status: "unresolved" | "draft" | "approved" | "applied" | "rejected";
5120
+ unit?: string | undefined;
5121
+ token?: string | undefined;
5122
+ operationId?: string | undefined;
5123
+ selectedMappingId?: string | undefined;
5124
+ }, {
5125
+ id: string;
5126
+ target: {
5127
+ id: string;
5128
+ platform: "web" | "swiftui" | "react-native";
5129
+ semanticRole: string;
5130
+ label: string;
5131
+ componentPath: string[];
5132
+ geometry: {
5133
+ x: number;
5134
+ y: number;
5135
+ width: number;
5136
+ height: number;
5137
+ scale: number;
5138
+ };
5139
+ locator: Record<string, unknown>;
5140
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
5141
+ evidence: string[];
5142
+ source?: {
5143
+ file: string;
5144
+ line?: number | undefined;
5145
+ column?: number | undefined;
5146
+ symbol?: string | undefined;
5147
+ } | undefined;
5148
+ };
5149
+ category: "layout" | "spacing" | "typography" | "color" | "border" | "effect" | "content" | "asset" | "visibility" | "accessibility" | "responsive" | "state" | "motion";
5150
+ property: string;
5151
+ before: string | number | boolean | unknown[] | Record<string, unknown> | null;
5152
+ after: string | number | boolean | unknown[] | Record<string, unknown> | null;
5153
+ stateIds: string[];
5154
+ mappingCandidates: {
5155
+ id: string;
5156
+ label: string;
5157
+ intent: "spacing" | "content" | "state" | "motion" | "resize" | "align" | "distribute" | "position" | "style" | "component-variant" | "token-refactor";
5158
+ property: string;
5159
+ value: string | number | boolean | unknown[] | Record<string, unknown> | null;
5160
+ scope: "instance" | "variant" | "component";
5161
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
5162
+ evidence: string[];
5163
+ blastRadius: number;
5164
+ targetId?: string | undefined;
5165
+ source?: {
5166
+ file: string;
5167
+ line?: number | undefined;
5168
+ column?: number | undefined;
5169
+ symbol?: string | undefined;
5170
+ } | undefined;
5171
+ }[];
5172
+ scope: "instance" | "variant" | "component";
5173
+ context: {
5174
+ breakpoint: string;
5175
+ theme: string;
5176
+ state: string;
5177
+ };
5178
+ confidence: "measured" | "instrumented" | "inferred" | "unresolved";
5179
+ evidence: string[];
5180
+ createdAt: string;
5181
+ updatedAt: string;
5182
+ status: "unresolved" | "draft" | "approved" | "applied" | "rejected";
5183
+ unit?: string | undefined;
5184
+ token?: string | undefined;
5185
+ operationId?: string | undefined;
5186
+ selectedMappingId?: string | undefined;
5187
+ contextSet?: {
5188
+ breakpoints: string[];
5189
+ themes: string[];
5190
+ states: string[];
5191
+ } | undefined;
5192
+ }>>>>;
2780
5193
  branchId: z.ZodOptional<z.ZodString>;
2781
5194
  status: z.ZodDefault<z.ZodEnum<{
2782
5195
  rejected: "rejected";
@@ -2793,6 +5206,7 @@ export declare const visualAgentRequestSchema: z.ZodObject<{
2793
5206
  taskId: z.ZodOptional<z.ZodString>;
2794
5207
  }, z.core.$strip>>;
2795
5208
  claimAttemptId: z.ZodOptional<z.ZodString>;
5209
+ claimCapabilityHash: z.ZodOptional<z.ZodString>;
2796
5210
  claimExpiresAt: z.ZodOptional<z.ZodString>;
2797
5211
  error: z.ZodOptional<z.ZodString>;
2798
5212
  createdAt: z.ZodString;
@@ -2904,10 +5318,10 @@ export declare const surfaceSnapshotSchema: z.ZodObject<{
2904
5318
  string: "string";
2905
5319
  number: "number";
2906
5320
  boolean: "boolean";
5321
+ length: "length";
2907
5322
  color: "color";
2908
5323
  asset: "asset";
2909
5324
  motion: "motion";
2910
- length: "length";
2911
5325
  select: "select";
2912
5326
  }>;
2913
5327
  value: z.ZodUnknown;
@@ -2929,6 +5343,255 @@ export declare const surfaceSnapshotSchema: z.ZodObject<{
2929
5343
  }, z.core.$strip>>>>;
2930
5344
  updatedAt: z.ZodString;
2931
5345
  }, z.core.$strip>;
5346
+ export declare const previewContextSchema: z.ZodObject<{
5347
+ version: z.ZodLiteral<1>;
5348
+ requestRevision: z.ZodNumber;
5349
+ viewport: z.ZodObject<{
5350
+ id: z.ZodString;
5351
+ width: z.ZodOptional<z.ZodNumber>;
5352
+ height: z.ZodOptional<z.ZodNumber>;
5353
+ }, z.core.$strip>;
5354
+ theme: z.ZodString;
5355
+ state: z.ZodString;
5356
+ motionPreference: z.ZodEnum<{
5357
+ system: "system";
5358
+ reduce: "reduce";
5359
+ "no-preference": "no-preference";
5360
+ }>;
5361
+ selectedTarget: z.ZodOptional<z.ZodObject<{
5362
+ id: z.ZodString;
5363
+ selector: z.ZodString;
5364
+ }, z.core.$strip>>;
5365
+ }, z.core.$strip>;
5366
+ export declare const previewAxisResultSchema: z.ZodObject<{
5367
+ status: z.ZodEnum<{
5368
+ current: "current";
5369
+ applied: "applied";
5370
+ unsupported: "unsupported";
5371
+ }>;
5372
+ method: z.ZodString;
5373
+ evidence: z.ZodDefault<z.ZodArray<z.ZodString>>;
5374
+ failureReason: z.ZodOptional<z.ZodString>;
5375
+ }, z.core.$strip>;
5376
+ export declare const previewContextResultSchema: z.ZodObject<{
5377
+ version: z.ZodLiteral<1>;
5378
+ requestRevision: z.ZodNumber;
5379
+ applied: z.ZodBoolean;
5380
+ reloadQuery: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5381
+ failureReason: z.ZodOptional<z.ZodString>;
5382
+ context: z.ZodObject<{
5383
+ version: z.ZodLiteral<1>;
5384
+ requestRevision: z.ZodNumber;
5385
+ viewport: z.ZodObject<{
5386
+ id: z.ZodString;
5387
+ width: z.ZodOptional<z.ZodNumber>;
5388
+ height: z.ZodOptional<z.ZodNumber>;
5389
+ }, z.core.$strip>;
5390
+ theme: z.ZodString;
5391
+ state: z.ZodString;
5392
+ motionPreference: z.ZodEnum<{
5393
+ system: "system";
5394
+ reduce: "reduce";
5395
+ "no-preference": "no-preference";
5396
+ }>;
5397
+ selectedTarget: z.ZodOptional<z.ZodObject<{
5398
+ id: z.ZodString;
5399
+ selector: z.ZodString;
5400
+ }, z.core.$strip>>;
5401
+ }, z.core.$strip>;
5402
+ axes: z.ZodObject<{
5403
+ viewport: z.ZodObject<{
5404
+ status: z.ZodEnum<{
5405
+ current: "current";
5406
+ applied: "applied";
5407
+ unsupported: "unsupported";
5408
+ }>;
5409
+ method: z.ZodString;
5410
+ evidence: z.ZodDefault<z.ZodArray<z.ZodString>>;
5411
+ failureReason: z.ZodOptional<z.ZodString>;
5412
+ }, z.core.$strip>;
5413
+ theme: z.ZodObject<{
5414
+ status: z.ZodEnum<{
5415
+ current: "current";
5416
+ applied: "applied";
5417
+ unsupported: "unsupported";
5418
+ }>;
5419
+ method: z.ZodString;
5420
+ evidence: z.ZodDefault<z.ZodArray<z.ZodString>>;
5421
+ failureReason: z.ZodOptional<z.ZodString>;
5422
+ }, z.core.$strip>;
5423
+ state: z.ZodObject<{
5424
+ status: z.ZodEnum<{
5425
+ current: "current";
5426
+ applied: "applied";
5427
+ unsupported: "unsupported";
5428
+ }>;
5429
+ method: z.ZodString;
5430
+ evidence: z.ZodDefault<z.ZodArray<z.ZodString>>;
5431
+ failureReason: z.ZodOptional<z.ZodString>;
5432
+ }, z.core.$strip>;
5433
+ motion: z.ZodObject<{
5434
+ status: z.ZodEnum<{
5435
+ current: "current";
5436
+ applied: "applied";
5437
+ unsupported: "unsupported";
5438
+ }>;
5439
+ method: z.ZodString;
5440
+ evidence: z.ZodDefault<z.ZodArray<z.ZodString>>;
5441
+ failureReason: z.ZodOptional<z.ZodString>;
5442
+ }, z.core.$strip>;
5443
+ }, z.core.$strip>;
5444
+ }, z.core.$strip>;
5445
+ export declare const previewCapabilitiesSchema: z.ZodObject<{
5446
+ version: z.ZodLiteral<1>;
5447
+ viewports: z.ZodArray<z.ZodObject<{
5448
+ id: z.ZodString;
5449
+ width: z.ZodOptional<z.ZodNumber>;
5450
+ height: z.ZodOptional<z.ZodNumber>;
5451
+ }, z.core.$strip>>;
5452
+ themes: z.ZodArray<z.ZodObject<{
5453
+ id: z.ZodString;
5454
+ selector: z.ZodOptional<z.ZodString>;
5455
+ attribute: z.ZodOptional<z.ZodString>;
5456
+ value: z.ZodOptional<z.ZodString>;
5457
+ }, z.core.$strip>>;
5458
+ states: z.ZodArray<z.ZodObject<{
5459
+ id: z.ZodString;
5460
+ methods: z.ZodDefault<z.ZodArray<z.ZodEnum<{
5461
+ variant: "variant";
5462
+ query: "query";
5463
+ "reduced-motion": "reduced-motion";
5464
+ pseudo: "pseudo";
5465
+ native: "native";
5466
+ }>>>;
5467
+ }, z.core.$strip>>;
5468
+ motionPreferences: z.ZodDefault<z.ZodArray<z.ZodEnum<{
5469
+ system: "system";
5470
+ reduce: "reduce";
5471
+ "no-preference": "no-preference";
5472
+ }>>>;
5473
+ }, z.core.$strip>;
5474
+ export declare const workspaceSnapshotSchema: z.ZodObject<{
5475
+ version: z.ZodLiteral<1>;
5476
+ capabilities: z.ZodObject<{
5477
+ version: z.ZodLiteral<1>;
5478
+ viewports: z.ZodArray<z.ZodObject<{
5479
+ id: z.ZodString;
5480
+ width: z.ZodOptional<z.ZodNumber>;
5481
+ height: z.ZodOptional<z.ZodNumber>;
5482
+ }, z.core.$strip>>;
5483
+ themes: z.ZodArray<z.ZodObject<{
5484
+ id: z.ZodString;
5485
+ selector: z.ZodOptional<z.ZodString>;
5486
+ attribute: z.ZodOptional<z.ZodString>;
5487
+ value: z.ZodOptional<z.ZodString>;
5488
+ }, z.core.$strip>>;
5489
+ states: z.ZodArray<z.ZodObject<{
5490
+ id: z.ZodString;
5491
+ methods: z.ZodDefault<z.ZodArray<z.ZodEnum<{
5492
+ variant: "variant";
5493
+ query: "query";
5494
+ "reduced-motion": "reduced-motion";
5495
+ pseudo: "pseudo";
5496
+ native: "native";
5497
+ }>>>;
5498
+ }, z.core.$strip>>;
5499
+ motionPreferences: z.ZodDefault<z.ZodArray<z.ZodEnum<{
5500
+ system: "system";
5501
+ reduce: "reduce";
5502
+ "no-preference": "no-preference";
5503
+ }>>>;
5504
+ }, z.core.$strip>;
5505
+ currentPreviewContext: z.ZodDefault<z.ZodNullable<z.ZodObject<{
5506
+ version: z.ZodLiteral<1>;
5507
+ requestRevision: z.ZodNumber;
5508
+ viewport: z.ZodObject<{
5509
+ id: z.ZodString;
5510
+ width: z.ZodOptional<z.ZodNumber>;
5511
+ height: z.ZodOptional<z.ZodNumber>;
5512
+ }, z.core.$strip>;
5513
+ theme: z.ZodString;
5514
+ state: z.ZodString;
5515
+ motionPreference: z.ZodEnum<{
5516
+ system: "system";
5517
+ reduce: "reduce";
5518
+ "no-preference": "no-preference";
5519
+ }>;
5520
+ selectedTarget: z.ZodOptional<z.ZodObject<{
5521
+ id: z.ZodString;
5522
+ selector: z.ZodString;
5523
+ }, z.core.$strip>>;
5524
+ }, z.core.$strip>>>;
5525
+ lastPreviewApplication: z.ZodDefault<z.ZodNullable<z.ZodObject<{
5526
+ version: z.ZodLiteral<1>;
5527
+ requestRevision: z.ZodNumber;
5528
+ applied: z.ZodBoolean;
5529
+ reloadQuery: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5530
+ failureReason: z.ZodOptional<z.ZodString>;
5531
+ context: z.ZodObject<{
5532
+ version: z.ZodLiteral<1>;
5533
+ requestRevision: z.ZodNumber;
5534
+ viewport: z.ZodObject<{
5535
+ id: z.ZodString;
5536
+ width: z.ZodOptional<z.ZodNumber>;
5537
+ height: z.ZodOptional<z.ZodNumber>;
5538
+ }, z.core.$strip>;
5539
+ theme: z.ZodString;
5540
+ state: z.ZodString;
5541
+ motionPreference: z.ZodEnum<{
5542
+ system: "system";
5543
+ reduce: "reduce";
5544
+ "no-preference": "no-preference";
5545
+ }>;
5546
+ selectedTarget: z.ZodOptional<z.ZodObject<{
5547
+ id: z.ZodString;
5548
+ selector: z.ZodString;
5549
+ }, z.core.$strip>>;
5550
+ }, z.core.$strip>;
5551
+ axes: z.ZodObject<{
5552
+ viewport: z.ZodObject<{
5553
+ status: z.ZodEnum<{
5554
+ current: "current";
5555
+ applied: "applied";
5556
+ unsupported: "unsupported";
5557
+ }>;
5558
+ method: z.ZodString;
5559
+ evidence: z.ZodDefault<z.ZodArray<z.ZodString>>;
5560
+ failureReason: z.ZodOptional<z.ZodString>;
5561
+ }, z.core.$strip>;
5562
+ theme: z.ZodObject<{
5563
+ status: z.ZodEnum<{
5564
+ current: "current";
5565
+ applied: "applied";
5566
+ unsupported: "unsupported";
5567
+ }>;
5568
+ method: z.ZodString;
5569
+ evidence: z.ZodDefault<z.ZodArray<z.ZodString>>;
5570
+ failureReason: z.ZodOptional<z.ZodString>;
5571
+ }, z.core.$strip>;
5572
+ state: z.ZodObject<{
5573
+ status: z.ZodEnum<{
5574
+ current: "current";
5575
+ applied: "applied";
5576
+ unsupported: "unsupported";
5577
+ }>;
5578
+ method: z.ZodString;
5579
+ evidence: z.ZodDefault<z.ZodArray<z.ZodString>>;
5580
+ failureReason: z.ZodOptional<z.ZodString>;
5581
+ }, z.core.$strip>;
5582
+ motion: z.ZodObject<{
5583
+ status: z.ZodEnum<{
5584
+ current: "current";
5585
+ applied: "applied";
5586
+ unsupported: "unsupported";
5587
+ }>;
5588
+ method: z.ZodString;
5589
+ evidence: z.ZodDefault<z.ZodArray<z.ZodString>>;
5590
+ failureReason: z.ZodOptional<z.ZodString>;
5591
+ }, z.core.$strip>;
5592
+ }, z.core.$strip>;
5593
+ }, z.core.$strip>>>;
5594
+ }, z.core.$strip>;
2932
5595
  export declare const previewCommandSchema: z.ZodObject<{
2933
5596
  id: z.ZodString;
2934
5597
  targetId: z.ZodString;
@@ -2941,6 +5604,8 @@ export type Platform = z.infer<typeof platformSchema>;
2941
5604
  export type ChangeCategory = z.infer<typeof changeCategorySchema>;
2942
5605
  export type SourceRef = z.infer<typeof sourceRefSchema>;
2943
5606
  export type SessionContext = z.infer<typeof sessionContextSchema>;
5607
+ export type ChangeContext = z.infer<typeof changeContextSchema>;
5608
+ export type ContextSet = z.infer<typeof contextSetSchema>;
2944
5609
  export type TargetRef = z.infer<typeof targetRefSchema>;
2945
5610
  export type ControlDescriptor = z.infer<typeof controlDescriptorSchema>;
2946
5611
  export type DesignChange = z.infer<typeof designChangeSchema>;
@@ -2954,6 +5619,7 @@ export type BreakpointDefinition = z.infer<typeof breakpointDefinitionSchema>;
2954
5619
  export type ThemeDefinition = z.infer<typeof themeDefinitionSchema>;
2955
5620
  export type MotionPreset = z.infer<typeof motionPresetSchema>;
2956
5621
  export type ProjectDesignGraph = z.infer<typeof projectDesignGraphSchema>;
5622
+ export type ProjectDesignGraphInput = z.input<typeof projectDesignGraphSchema>;
2957
5623
  export type DesignTokenUsage = z.infer<typeof designTokenUsageSchema>;
2958
5624
  export type DesignSystemFinding = z.infer<typeof designSystemFindingSchema>;
2959
5625
  export type TokenPromotionCandidate = z.infer<typeof tokenPromotionCandidateSchema>;
@@ -2969,6 +5635,8 @@ export type VerificationResult = z.infer<typeof verificationResultSchema>;
2969
5635
  export type ApplyRunState = z.infer<typeof applyRunStateSchema>;
2970
5636
  export type ApplyRunMessage = z.infer<typeof applyRunMessageSchema>;
2971
5637
  export type ValidationResult = z.infer<typeof validationResultSchema>;
5638
+ export type SourceFileSnapshot = z.infer<typeof sourceFileSnapshotSchema>;
5639
+ export type SourceLineAnchor = z.infer<typeof sourceLineAnchorSchema>;
2972
5640
  export type ApplyRun = z.infer<typeof applyRunSchema>;
2973
5641
  export type DeliveryRecordStatus = z.infer<typeof deliveryRecordStatusSchema>;
2974
5642
  export type DeliveryNarrativeSource = z.infer<typeof deliveryNarrativeSourceSchema>;
@@ -2986,6 +5654,11 @@ export type VisualAgentRequest = z.infer<typeof visualAgentRequestSchema>;
2986
5654
  export type StressConditionId = z.infer<typeof stressConditionIdSchema>;
2987
5655
  export type StressTestSession = z.infer<typeof stressTestSessionSchema>;
2988
5656
  export type SurfaceSnapshot = z.infer<typeof surfaceSnapshotSchema>;
5657
+ export type PreviewContext = z.infer<typeof previewContextSchema>;
5658
+ export type PreviewAxisResult = z.infer<typeof previewAxisResultSchema>;
5659
+ export type PreviewContextResult = z.infer<typeof previewContextResultSchema>;
5660
+ export type PreviewCapabilities = z.infer<typeof previewCapabilitiesSchema>;
5661
+ export type WorkspaceSnapshot = z.infer<typeof workspaceSnapshotSchema>;
2989
5662
  export type PreviewCommand = z.infer<typeof previewCommandSchema>;
2990
5663
  export declare function changeKey(change: DesignChange): string;
2991
5664
  export declare function coalesceChanges(changes: DesignChange[]): DesignChange[];