@sxl-studio/bridge 1.7.2 → 1.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/README.md +342 -16
  2. package/dist/agent-recipes.d.ts +781 -11
  3. package/dist/agent-recipes.js +886 -13
  4. package/dist/agent-recipes.js.map +1 -1
  5. package/dist/agent-runbook.d.ts +50 -0
  6. package/dist/agent-runbook.js +243 -0
  7. package/dist/agent-runbook.js.map +1 -0
  8. package/dist/asset-upload.d.ts +63 -0
  9. package/dist/asset-upload.js +225 -0
  10. package/dist/asset-upload.js.map +1 -0
  11. package/dist/audit-store.d.ts +15 -0
  12. package/dist/audit-store.js +100 -0
  13. package/dist/audit-store.js.map +1 -0
  14. package/dist/audit.d.ts +4 -3
  15. package/dist/audit.js +37 -4
  16. package/dist/audit.js.map +1 -1
  17. package/dist/auth.d.ts +8 -1
  18. package/dist/auth.js +41 -1
  19. package/dist/auth.js.map +1 -1
  20. package/dist/bridge-agent-workflow-validation-cli.d.ts +2 -0
  21. package/dist/bridge-agent-workflow-validation-cli.js +68 -0
  22. package/dist/bridge-agent-workflow-validation-cli.js.map +1 -0
  23. package/dist/bridge-agent-workflow-validation.d.ts +42 -0
  24. package/dist/bridge-agent-workflow-validation.js +170 -0
  25. package/dist/bridge-agent-workflow-validation.js.map +1 -0
  26. package/dist/bridge-contract-audit.d.ts +45 -0
  27. package/dist/bridge-contract-audit.js +345 -0
  28. package/dist/bridge-contract-audit.js.map +1 -0
  29. package/dist/bridge-health-cli.d.ts +2 -0
  30. package/dist/bridge-health-cli.js +115 -0
  31. package/dist/bridge-health-cli.js.map +1 -0
  32. package/dist/bridge-health.d.ts +33 -0
  33. package/dist/bridge-health.js +594 -0
  34. package/dist/bridge-health.js.map +1 -0
  35. package/dist/bridge-live-validation-cli.d.ts +2 -0
  36. package/dist/bridge-live-validation-cli.js +114 -0
  37. package/dist/bridge-live-validation-cli.js.map +1 -0
  38. package/dist/bridge-live-validation.d.ts +39 -0
  39. package/dist/bridge-live-validation.js +1141 -0
  40. package/dist/bridge-live-validation.js.map +1 -0
  41. package/dist/bridge-performance-profile.d.ts +81 -0
  42. package/dist/bridge-performance-profile.js +227 -0
  43. package/dist/bridge-performance-profile.js.map +1 -0
  44. package/dist/bridge-readiness-cli.d.ts +30 -0
  45. package/dist/bridge-readiness-cli.js +242 -0
  46. package/dist/bridge-readiness-cli.js.map +1 -0
  47. package/dist/bridge-runtime-summary.d.ts +50 -0
  48. package/dist/bridge-runtime-summary.js +112 -0
  49. package/dist/bridge-runtime-summary.js.map +1 -0
  50. package/dist/bridge-workflow-smoke-cli.d.ts +2 -0
  51. package/dist/bridge-workflow-smoke-cli.js +126 -0
  52. package/dist/bridge-workflow-smoke-cli.js.map +1 -0
  53. package/dist/bridge-workflow-smoke.d.ts +39 -0
  54. package/dist/bridge-workflow-smoke.js +431 -0
  55. package/dist/bridge-workflow-smoke.js.map +1 -0
  56. package/dist/codeconnect-suggestions.d.ts +74 -0
  57. package/dist/codeconnect-suggestions.js +398 -0
  58. package/dist/codeconnect-suggestions.js.map +1 -0
  59. package/dist/codeconnect-template.d.ts +98 -0
  60. package/dist/codeconnect-template.js +280 -0
  61. package/dist/codeconnect-template.js.map +1 -0
  62. package/dist/command-queue.d.ts +11 -1
  63. package/dist/command-queue.js +200 -1
  64. package/dist/command-queue.js.map +1 -1
  65. package/dist/command-safety.d.ts +13 -0
  66. package/dist/command-safety.js +59 -0
  67. package/dist/command-safety.js.map +1 -0
  68. package/dist/enabled-library-search.d.ts +49 -0
  69. package/dist/enabled-library-search.js +151 -0
  70. package/dist/enabled-library-search.js.map +1 -0
  71. package/dist/figma-mcp-parity.d.ts +49 -0
  72. package/dist/figma-mcp-parity.js +368 -0
  73. package/dist/figma-mcp-parity.js.map +1 -0
  74. package/dist/figma-mcp-skills-parity.d.ts +61 -0
  75. package/dist/figma-mcp-skills-parity.js +434 -0
  76. package/dist/figma-mcp-skills-parity.js.map +1 -0
  77. package/dist/figma-rest-diagnostics.d.ts +50 -0
  78. package/dist/figma-rest-diagnostics.js +314 -0
  79. package/dist/figma-rest-diagnostics.js.map +1 -0
  80. package/dist/figma-rest.d.ts +27 -0
  81. package/dist/figma-rest.js +116 -0
  82. package/dist/figma-rest.js.map +1 -0
  83. package/dist/http-api.d.ts +14 -2
  84. package/dist/http-api.js +323 -17
  85. package/dist/http-api.js.map +1 -1
  86. package/dist/index.js +25 -1
  87. package/dist/index.js.map +1 -1
  88. package/dist/mcp-factory.d.ts +6 -1
  89. package/dist/mcp-factory.js +23 -4
  90. package/dist/mcp-factory.js.map +1 -1
  91. package/dist/mcp-runtime-probe.d.ts +22 -0
  92. package/dist/mcp-runtime-probe.js +777 -0
  93. package/dist/mcp-runtime-probe.js.map +1 -0
  94. package/dist/mcp-server.d.ts +2 -1
  95. package/dist/mcp-server.js +2 -2
  96. package/dist/mcp-server.js.map +1 -1
  97. package/dist/sxl-mcp-instructions.js +97 -25
  98. package/dist/sxl-mcp-instructions.js.map +1 -1
  99. package/dist/tools/audit.d.ts +22 -6
  100. package/dist/tools/audit.js +49 -7
  101. package/dist/tools/audit.js.map +1 -1
  102. package/dist/tools/capability-matrix.d.ts +22 -0
  103. package/dist/tools/capability-matrix.js +38 -0
  104. package/dist/tools/capability-matrix.js.map +1 -0
  105. package/dist/tools/catalogue-bootstrap.d.ts +1 -0
  106. package/dist/tools/catalogue-bootstrap.js +665 -30
  107. package/dist/tools/catalogue-bootstrap.js.map +1 -1
  108. package/dist/tools/code-connect-context.d.ts +3 -0
  109. package/dist/tools/code-connect-context.js +319 -0
  110. package/dist/tools/code-connect-context.js.map +1 -0
  111. package/dist/tools/code-connect-template.d.ts +3 -0
  112. package/dist/tools/code-connect-template.js +111 -0
  113. package/dist/tools/code-connect-template.js.map +1 -0
  114. package/dist/tools/composition.js +13 -28
  115. package/dist/tools/composition.js.map +1 -1
  116. package/dist/tools/compositions-orchestration.d.ts +14 -14
  117. package/dist/tools/compositions-orchestration.js +2 -2
  118. package/dist/tools/compositions-orchestration.js.map +1 -1
  119. package/dist/tools/data.js +839 -27
  120. package/dist/tools/data.js.map +1 -1
  121. package/dist/tools/design-context.d.ts +3 -0
  122. package/dist/tools/design-context.js +197 -0
  123. package/dist/tools/design-context.js.map +1 -0
  124. package/dist/tools/destructive-confirmation.d.ts +10 -0
  125. package/dist/tools/destructive-confirmation.js +22 -0
  126. package/dist/tools/destructive-confirmation.js.map +1 -0
  127. package/dist/tools/diagnostics.js +76 -51
  128. package/dist/tools/diagnostics.js.map +1 -1
  129. package/dist/tools/figma-mcp-design.d.ts +3 -0
  130. package/dist/tools/figma-mcp-design.js +377 -0
  131. package/dist/tools/figma-mcp-design.js.map +1 -0
  132. package/dist/tools/figma-nodes.js +57 -43
  133. package/dist/tools/figma-nodes.js.map +1 -1
  134. package/dist/tools/figma-rc-extended.js +23 -6
  135. package/dist/tools/figma-rc-extended.js.map +1 -1
  136. package/dist/tools/figma-rest.d.ts +39 -0
  137. package/dist/tools/figma-rest.js +279 -0
  138. package/dist/tools/figma-rest.js.map +1 -0
  139. package/dist/tools/git.js +11 -7
  140. package/dist/tools/git.js.map +1 -1
  141. package/dist/tools/large-data.d.ts +14 -0
  142. package/dist/tools/large-data.js +189 -0
  143. package/dist/tools/large-data.js.map +1 -0
  144. package/dist/tools/meta.d.ts +6 -1
  145. package/dist/tools/meta.js +89 -11
  146. package/dist/tools/meta.js.map +1 -1
  147. package/dist/tools/metadata.d.ts +3 -0
  148. package/dist/tools/metadata.js +140 -0
  149. package/dist/tools/metadata.js.map +1 -0
  150. package/dist/tools/mockup.d.ts +15 -156
  151. package/dist/tools/mockup.js +54 -121
  152. package/dist/tools/mockup.js.map +1 -1
  153. package/dist/tools/orchestration.js +73 -45
  154. package/dist/tools/orchestration.js.map +1 -1
  155. package/dist/tools/prompts.d.ts +3 -0
  156. package/dist/tools/prompts.js +219 -0
  157. package/dist/tools/prompts.js.map +1 -0
  158. package/dist/tools/registry.d.ts +19 -1
  159. package/dist/tools/registry.js +4 -4
  160. package/dist/tools/registry.js.map +1 -1
  161. package/dist/tools/resources.d.ts +19 -2
  162. package/dist/tools/resources.js +149 -5
  163. package/dist/tools/resources.js.map +1 -1
  164. package/dist/tools/schema-contracts.d.ts +4763 -0
  165. package/dist/tools/schema-contracts.js +814 -0
  166. package/dist/tools/schema-contracts.js.map +1 -0
  167. package/dist/tools/screenshot.d.ts +3 -0
  168. package/dist/tools/screenshot.js +144 -0
  169. package/dist/tools/screenshot.js.map +1 -0
  170. package/dist/tools/shared.d.ts +11 -1
  171. package/dist/tools/shared.js +55 -2
  172. package/dist/tools/shared.js.map +1 -1
  173. package/dist/tools/styles-orchestration.d.ts +2 -2
  174. package/dist/tools/styles-orchestration.js +13 -5
  175. package/dist/tools/styles-orchestration.js.map +1 -1
  176. package/dist/tools/styles.js +22 -8
  177. package/dist/tools/styles.js.map +1 -1
  178. package/dist/tools/tokens.d.ts +31 -692
  179. package/dist/tools/tokens.js +175 -135
  180. package/dist/tools/tokens.js.map +1 -1
  181. package/dist/tools/variable-defs.d.ts +3 -0
  182. package/dist/tools/variable-defs.js +338 -0
  183. package/dist/tools/variable-defs.js.map +1 -0
  184. package/dist/tools/variables-orchestration.js +13 -5
  185. package/dist/tools/variables-orchestration.js.map +1 -1
  186. package/dist/tools/variables.js +18 -15
  187. package/dist/tools/variables.js.map +1 -1
  188. package/dist/types.d.ts +53 -0
  189. package/dist/ultimate-readiness-audit.d.ts +37 -0
  190. package/dist/ultimate-readiness-audit.js +431 -0
  191. package/dist/ultimate-readiness-audit.js.map +1 -0
  192. package/dist/workflow-planner.d.ts +57 -0
  193. package/dist/workflow-planner.js +464 -0
  194. package/dist/workflow-planner.js.map +1 -0
  195. package/dist/ws-server.js +16 -3
  196. package/dist/ws-server.js.map +1 -1
  197. package/package.json +18 -2
@@ -0,0 +1,434 @@
1
+ import { ALL_AGENT_RECIPES } from "./agent-recipes.js";
2
+ import { BRIDGE_SCHEMA_INDEX } from "./tools/schema-contracts.js";
3
+ import { ensureBridgeToolCatalogue } from "./tools/catalogue-bootstrap.js";
4
+ import { getBridgeToolCatalogue } from "./tools/registry.js";
5
+ const SOURCE = {
6
+ skills: "https://help.figma.com/hc/en-us/articles/39166810751895-Figma-skills-for-MCP",
7
+ toolsAndPrompts: "https://developers.figma.com/docs/figma-mcp-server/tools-and-prompts/",
8
+ createSkills: "https://developers.figma.com/docs/figma-mcp-server/create-skills/",
9
+ };
10
+ const VERIFIED_AT = "2026-06-10";
11
+ const COMMON_PREFLIGHT = [
12
+ "get_bridge_runtime_summary",
13
+ "route_intent",
14
+ "plan_workflow",
15
+ "preview_workflow",
16
+ ];
17
+ const REQUIRED_COMPANION_SKILLS = [
18
+ "figma-use-figjam",
19
+ "figma-use-slides",
20
+ "figma-create-new-file",
21
+ "figma-generate-diagram",
22
+ ];
23
+ export const FIGMA_MCP_SKILL_COMPATIBILITY_ALIASES = [
24
+ {
25
+ alias: "figma-code-connect-components",
26
+ mapsToOfficialSkill: "figma-code-connect",
27
+ sxlRecipe: "sxl-code-connect",
28
+ note: "Older/client-specific Code Connect skill naming. Treat it as figma-code-connect and use Bridge Code Connect context, suggestions, template, and binding tools.",
29
+ },
30
+ {
31
+ alias: "figma-implement-design",
32
+ sxlRecipe: "sxl-implement-design",
33
+ note: "Design-to-code alias used by some agent stacks. It is not in the current official Figma skills list, but Bridge routes it to read-only design context, screenshots, variables, and Code Connect hints before agent-side code edits.",
34
+ },
35
+ {
36
+ alias: "figma-create-design-system-rules",
37
+ sxlRecipe: "sxl-generate-library",
38
+ note: "Rule-generation alias used by some agent stacks. It is not in the current official Figma skills list, but Bridge routes it to SXL design-system, token, composition, docs, and Code Connect discovery before the agent writes client-specific rules.",
39
+ },
40
+ ];
41
+ export const FIGMA_MCP_SKILL_PARITY_ENTRIES = [
42
+ {
43
+ officialSkill: "figma-use",
44
+ kind: "official-skill",
45
+ status: "covered-by-bridge-and-sxl",
46
+ bridgeTools: [
47
+ "get_plugin_status",
48
+ "get_capability_matrix",
49
+ "get_metadata",
50
+ "get_variable_defs",
51
+ "inspect_design_system",
52
+ "validate_screen_spec",
53
+ "build_screen",
54
+ "update_screen",
55
+ "import_variable_spec",
56
+ "import_style_spec",
57
+ "apply_coverage_suggestions",
58
+ "upload_assets",
59
+ ],
60
+ bridgeResources: [
61
+ "sxl://agent/recipes/sxl-use",
62
+ "sxl://agent/schemas/design-dsl-v1",
63
+ "sxl://agent/figma-mcp-parity",
64
+ ],
65
+ sxlRecipes: ["sxl-use", "sxl-generate-design", "sxl-generate-library", "sxl-audit"],
66
+ preferredFlow: [
67
+ ...COMMON_PREFLIGHT,
68
+ "Use the thick Bridge tool for the requested Figma Design operation.",
69
+ "Run dryRun/preview first when the tool supports it.",
70
+ "Commit only after approval and get_plugin_status confirms writesAllowed=true.",
71
+ ],
72
+ limitations: [
73
+ "Bridge covers active Figma Design files through SXL Studio Remote Connect.",
74
+ "FigJam and Slides writes remain official Figma MCP companion scope.",
75
+ "Bridge intentionally prefers typed commands over arbitrary use_figma JavaScript.",
76
+ ],
77
+ note: "This is the SXL-safe equivalent of figma-use for Figma Design: canvas reads/writes, variables, styles, components, documentation, and SXL workflows through explicit Bridge contracts.",
78
+ },
79
+ {
80
+ officialSkill: "figma-use-figjam",
81
+ kind: "official-skill",
82
+ status: "companion-figma-mcp-required",
83
+ bridgeTools: ["get_figma_mcp_parity", "get_figma_mcp_skills_parity", "get_bridge_runtime_summary", "plan_workflow"],
84
+ bridgeResources: [
85
+ "sxl://agent/recipes/figma-mcp-companion",
86
+ "sxl://agent/figma-mcp-parity",
87
+ "sxl://agent/figma-mcp-skills-parity",
88
+ ],
89
+ sxlRecipes: ["figma-mcp-companion"],
90
+ preferredFlow: [
91
+ "Use official Figma MCP use_figma with the figma-use-figjam skill.",
92
+ "Keep Bridge as read-only context for SXL/Figma Design follow-up work only after the user returns to a Figma Design file.",
93
+ "Do not translate FigJam boards into Figma Design frames through SXL Bridge.",
94
+ ],
95
+ limitations: [
96
+ "SXL Studio Remote Connect targets Figma Design plugin workflows, not FigJam boards.",
97
+ "Bridge can route and explain the handoff but should not fake FigJam stickies, sections, connectors, tables, or board semantics.",
98
+ ],
99
+ note: "The current official Figma MCP skill for FigJam is a companion path. Bridge remains the SXL/Figma Design automation layer once the workflow returns to a Design file.",
100
+ },
101
+ {
102
+ officialSkill: "figma-use-slides",
103
+ kind: "official-skill",
104
+ status: "companion-figma-mcp-required",
105
+ bridgeTools: ["get_figma_mcp_parity", "get_figma_mcp_skills_parity", "get_bridge_runtime_summary", "plan_workflow"],
106
+ bridgeResources: [
107
+ "sxl://agent/recipes/figma-mcp-companion",
108
+ "sxl://agent/figma-mcp-parity",
109
+ "sxl://agent/figma-mcp-skills-parity",
110
+ ],
111
+ sxlRecipes: ["figma-mcp-companion"],
112
+ preferredFlow: [
113
+ "Use official Figma MCP use_figma with the figma-use-slides skill.",
114
+ "Use Bridge only for SXL/Figma Design context when the task later targets a Design file.",
115
+ "Do not route slide deck creation, slide sections, speaker notes, or deck theme edits through the local plugin.",
116
+ ],
117
+ limitations: [
118
+ "Figma Slides is outside the SXL Studio plugin's active Figma Design canvas scope.",
119
+ "Bridge can route and explain the handoff but does not create Slides decks or slide-native content.",
120
+ ],
121
+ note: "Slides workflows require the official Figma MCP companion. This keeps Bridge honest about the local plugin's file-type boundary.",
122
+ },
123
+ {
124
+ officialSkill: "figma-swiftui",
125
+ kind: "official-skill",
126
+ status: "bridge-primary-with-agent-work",
127
+ bridgeTools: [
128
+ "get_design_context",
129
+ "get_metadata",
130
+ "get_screenshot",
131
+ "get_variable_defs",
132
+ "get_context_for_code_connect",
133
+ "get_code_connect_suggestions",
134
+ "generate_code_connect_template",
135
+ ],
136
+ bridgeResources: [
137
+ "sxl://agent/recipes/sxl-implement-design",
138
+ "sxl://agent/recipes/sxl-code-connect",
139
+ "sxl://agent/figma-mcp-parity",
140
+ "sxl://agent/figma-mcp-skills-parity",
141
+ ],
142
+ sxlRecipes: ["sxl-implement-design", "sxl-code-connect"],
143
+ preferredFlow: [
144
+ ...COMMON_PREFLIGHT,
145
+ "Ask whether the direction is Figma Design → SwiftUI code or SwiftUI code → Figma Design when ambiguous.",
146
+ "For Figma Design → SwiftUI, gather get_design_context, get_screenshot, get_variable_defs, and Code Connect context, then let the agent edit Swift code in the repository.",
147
+ "For SwiftUI code → Figma Design, use official Figma MCP companion or an explicit SXL Design DSL spec; Bridge should not invent a SwiftUI parser.",
148
+ "Verify repository changes with the project's iOS/Swift checks when available.",
149
+ ],
150
+ limitations: [
151
+ "Bridge provides active-file SXL/Figma context, screenshots, variables, and Code Connect hints; it does not implement a dedicated SwiftUI semantic parser.",
152
+ "Exact SwiftUI-to-Figma canvas generation remains official Figma MCP companion or future dedicated tooling.",
153
+ ],
154
+ note: "This entry covers the current official figma-swiftui skill without overclaiming: Bridge is useful for Figma Design context and Code Connect, while SwiftUI source edits are agent-side work.",
155
+ },
156
+ {
157
+ officialSkill: "figma-code-connect",
158
+ kind: "official-skill",
159
+ status: "covered-by-bridge-and-sxl",
160
+ bridgeTools: [
161
+ "get_context_for_code_connect",
162
+ "get_code_connect_suggestions",
163
+ "generate_code_connect_template",
164
+ "codeconnect_save_binding",
165
+ "codeconnect_get_registry",
166
+ "codeconnect_get_global_settings",
167
+ "codeconnect_get_selection_status",
168
+ "codeconnect_get_node_ui_status",
169
+ ],
170
+ bridgeResources: [
171
+ "sxl://agent/recipes/sxl-code-connect",
172
+ "sxl://agent/schemas/code-connect-context-v1",
173
+ "sxl://agent/schemas/code-connect-template-v1",
174
+ ],
175
+ sxlRecipes: ["sxl-code-connect"],
176
+ preferredFlow: [
177
+ ...COMMON_PREFLIGHT,
178
+ "get_context_for_code_connect",
179
+ "get_code_connect_suggestions",
180
+ "generate_code_connect_template with writeFile=false",
181
+ "Review generated template/binding metadata.",
182
+ "codeconnect_save_binding or write the reviewed .figma.ts template.",
183
+ ],
184
+ limitations: [
185
+ "Hosted repository/library context from the official remote MCP server may still be needed for published-library Code Connect at organization scale.",
186
+ "Bridge stores SXL binding metadata and local template guidance; it does not publish Figma libraries.",
187
+ ],
188
+ note: "Bridge covers the local-codebase and active-file SXL Code Connect workflow, including Storybook/docs/files/component API metadata and dry-run-first template generation.",
189
+ },
190
+ {
191
+ officialSkill: "figma-create-new-file",
192
+ kind: "official-skill",
193
+ status: "companion-figma-mcp-required",
194
+ bridgeTools: ["get_figma_mcp_parity", "get_figma_mcp_skills_parity", "get_bridge_runtime_summary"],
195
+ bridgeResources: [
196
+ "sxl://agent/recipes/figma-mcp-companion",
197
+ "sxl://agent/figma-mcp-parity",
198
+ "sxl://agent/figma-mcp-skills-parity",
199
+ ],
200
+ sxlRecipes: ["figma-mcp-companion"],
201
+ preferredFlow: [
202
+ "Use official Figma MCP create_new_file.",
203
+ "Open the created file in Figma and start SXL Studio Remote Connect.",
204
+ "Continue with Bridge/SXL tools for active-file work.",
205
+ ],
206
+ limitations: [
207
+ "Figma Plugin API cannot create a new Figma Design/FigJam/Slides file or select a drafts organization.",
208
+ ],
209
+ note: "Bridge should not fake new-file creation. It routes this official skill to the companion MCP and resumes once the file is open in SXL Studio.",
210
+ },
211
+ {
212
+ officialSkill: "figma-generate-diagram",
213
+ kind: "official-skill",
214
+ status: "companion-figma-mcp-required",
215
+ bridgeTools: ["get_figma_mcp_parity", "get_figma_mcp_skills_parity", "plan_workflow"],
216
+ bridgeResources: [
217
+ "sxl://agent/recipes/figma-mcp-companion",
218
+ "sxl://agent/figma-mcp-parity",
219
+ "sxl://agent/figma-mcp-skills-parity",
220
+ ],
221
+ sxlRecipes: ["figma-mcp-companion"],
222
+ preferredFlow: [
223
+ "Use official Figma MCP generate_diagram for Mermaid/natural-language diagrams.",
224
+ "Create or update a FigJam diagram through the companion MCP.",
225
+ "Return to Bridge only if the user later needs SXL/Figma Design documentation or component work.",
226
+ ],
227
+ limitations: [
228
+ "SXL Studio Bridge does not generate FigJam-native diagrams through the local plugin.",
229
+ ],
230
+ note: "Diagram generation is now an explicit official MCP companion skill, not an untracked future Bridge promise.",
231
+ },
232
+ {
233
+ officialSkill: "figma-generate-library",
234
+ kind: "example-skill",
235
+ status: "covered-by-bridge-and-sxl",
236
+ bridgeTools: [
237
+ "inspect_design_system",
238
+ "preview_export_variables",
239
+ "export_variables",
240
+ "import_variable_spec",
241
+ "import_style_spec",
242
+ "list_compositions",
243
+ "bulk_generate_compositions",
244
+ "audit_composition_drift",
245
+ "build_token_documentation",
246
+ "build_component_doc",
247
+ "build_doc_flow",
248
+ "codeconnect_save_binding",
249
+ ],
250
+ bridgeResources: [
251
+ "sxl://agent/recipes/sxl-generate-library",
252
+ "sxl://agent/recipes/sxl-doc-builder",
253
+ "sxl://agent/schemas/doc-spec-v2",
254
+ "sxl://agent/figma-mcp-skills-parity",
255
+ ],
256
+ sxlRecipes: ["sxl-generate-library", "sxl-doc-builder", "bulk-compositions", "composition-drift"],
257
+ preferredFlow: [
258
+ ...COMMON_PREFLIGHT,
259
+ "inspect_design_system",
260
+ "preview_export_variables before export_variables",
261
+ "import_variable_spec/import_style_spec with dryRun first for bulk foundations.",
262
+ "bulk_generate_compositions with dryRun first for component pages.",
263
+ "Render docs through build_token_documentation/build_component_doc/build_doc_flow.",
264
+ ],
265
+ limitations: [
266
+ "Bridge targets SXL Studio token/composition/library workflows inside an existing Figma Design file.",
267
+ "Create a new file first with official Figma MCP when no target file exists.",
268
+ ],
269
+ note: "SXL Bridge is intentionally stronger than the example skill for SXL Studio: it includes safe export defaults, composition drift, bulk regeneration, docs, and Code Connect metadata.",
270
+ },
271
+ {
272
+ officialSkill: "figma-generate-design",
273
+ kind: "example-skill",
274
+ status: "covered-by-bridge-and-sxl",
275
+ bridgeTools: [
276
+ "inspect_design_system",
277
+ "validate_screen_spec",
278
+ "build_screen",
279
+ "update_screen",
280
+ "find_components",
281
+ "build_mockup",
282
+ "apply_mockup_dataset",
283
+ "get_screenshot",
284
+ "get_variable_defs",
285
+ ],
286
+ bridgeResources: [
287
+ "sxl://agent/recipes/sxl-generate-design",
288
+ "sxl://agent/recipes/mockup-builder",
289
+ "sxl://agent/schemas/design-dsl-v1",
290
+ "sxl://agent/figma-mcp-skills-parity",
291
+ ],
292
+ sxlRecipes: ["sxl-generate-design", "mockup-builder", "sxl-use"],
293
+ preferredFlow: [
294
+ ...COMMON_PREFLIGHT,
295
+ "inspect_design_system",
296
+ "validate_screen_spec",
297
+ "build_screen with dryRun=true",
298
+ "Review resolved plan and component bindings.",
299
+ "build_screen or update_screen after approval.",
300
+ ],
301
+ limitations: [
302
+ "Bridge builds editable Figma Design screens from SXL Design DSL and actual components.",
303
+ "It does not perform the official generate_figma_design browser capture path; use official Figma MCP companion when that exact capture flow is required.",
304
+ ],
305
+ note: "This is the preferred SXL path for 'нарисуй экран в Figma': thick commands, design-system inspection, typed payload schemas, and dry-run-first application.",
306
+ },
307
+ ];
308
+ function countByStatus(entries, status) {
309
+ return entries.filter((entry) => entry.status === status).length;
310
+ }
311
+ function buildValidResourceSet() {
312
+ return new Set([
313
+ "sxl://agent/recipes/index",
314
+ "sxl://agent/figma-mcp-parity",
315
+ "sxl://agent/figma-mcp-skills-parity",
316
+ "sxl://agent/performance-profile",
317
+ "sxl://agent/runtime-summary",
318
+ "sxl://agent/ultimate-readiness",
319
+ "sxl://agent/schemas/index",
320
+ ...ALL_AGENT_RECIPES.map((recipe) => `sxl://agent/recipes/${recipe.id}`),
321
+ ...BRIDGE_SCHEMA_INDEX.schemas.map((schema) => schema.uri),
322
+ ]);
323
+ }
324
+ export function buildFigmaMcpSkillsParityMatrix() {
325
+ ensureBridgeToolCatalogue();
326
+ const bridgeToolNames = new Set(getBridgeToolCatalogue().map((entry) => entry.name));
327
+ const bridgeResources = buildValidResourceSet();
328
+ const recipeIds = new Set(ALL_AGENT_RECIPES.map((recipe) => recipe.id));
329
+ const staleBridgeToolReferences = Array.from(new Set(FIGMA_MCP_SKILL_PARITY_ENTRIES.flatMap((entry) => entry.bridgeTools).filter((toolName) => !bridgeToolNames.has(toolName)))).sort();
330
+ const staleBridgeResourceReferences = Array.from(new Set(FIGMA_MCP_SKILL_PARITY_ENTRIES
331
+ .flatMap((entry) => entry.bridgeResources)
332
+ .filter((resourceUri) => !bridgeResources.has(resourceUri)))).sort();
333
+ const staleRecipeReferences = Array.from(new Set([
334
+ ...FIGMA_MCP_SKILL_PARITY_ENTRIES.flatMap((entry) => entry.sxlRecipes),
335
+ ...FIGMA_MCP_SKILL_COMPATIBILITY_ALIASES.map((alias) => alias.sxlRecipe),
336
+ ].filter((recipeId) => !recipeIds.has(recipeId)))).sort();
337
+ return {
338
+ version: 1,
339
+ verifiedAt: VERIFIED_AT,
340
+ source: SOURCE,
341
+ summary: {
342
+ officialSkillCount: FIGMA_MCP_SKILL_PARITY_ENTRIES.length,
343
+ officialSkills: FIGMA_MCP_SKILL_PARITY_ENTRIES.filter((entry) => entry.kind === "official-skill").length,
344
+ exampleSkills: FIGMA_MCP_SKILL_PARITY_ENTRIES.filter((entry) => entry.kind === "example-skill").length,
345
+ coveredByBridgeAndSxl: countByStatus(FIGMA_MCP_SKILL_PARITY_ENTRIES, "covered-by-bridge-and-sxl"),
346
+ bridgePrimaryWithAgentWork: countByStatus(FIGMA_MCP_SKILL_PARITY_ENTRIES, "bridge-primary-with-agent-work"),
347
+ companionRequired: countByStatus(FIGMA_MCP_SKILL_PARITY_ENTRIES, "companion-figma-mcp-required"),
348
+ compatibilityAliases: FIGMA_MCP_SKILL_COMPATIBILITY_ALIASES.length,
349
+ staleBridgeToolReferences,
350
+ staleBridgeResourceReferences,
351
+ staleRecipeReferences,
352
+ },
353
+ operatingModel: {
354
+ bridgePrimary: FIGMA_MCP_SKILL_PARITY_ENTRIES
355
+ .filter((entry) => entry.status === "covered-by-bridge-and-sxl")
356
+ .map((entry) => entry.officialSkill),
357
+ companionFigmaMcp: FIGMA_MCP_SKILL_PARITY_ENTRIES
358
+ .filter((entry) => entry.status === "companion-figma-mcp-required")
359
+ .map((entry) => entry.officialSkill),
360
+ agentImplementationRequired: FIGMA_MCP_SKILL_PARITY_ENTRIES
361
+ .filter((entry) => entry.status === "bridge-primary-with-agent-work")
362
+ .map((entry) => entry.officialSkill),
363
+ },
364
+ compatibilityAliases: [...FIGMA_MCP_SKILL_COMPATIBILITY_ALIASES],
365
+ entries: [...FIGMA_MCP_SKILL_PARITY_ENTRIES],
366
+ };
367
+ }
368
+ function isRecord(value) {
369
+ return typeof value === "object" && value !== null && !Array.isArray(value);
370
+ }
371
+ function stringArray(value) {
372
+ return Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
373
+ }
374
+ export function validateFigmaMcpSkillsParityPayload(value) {
375
+ const expectedSkills = FIGMA_MCP_SKILL_PARITY_ENTRIES.map((entry) => entry.officialSkill);
376
+ const expectedAliases = FIGMA_MCP_SKILL_COMPATIBILITY_ALIASES.map((alias) => alias.alias);
377
+ const errors = [];
378
+ if (!isRecord(value)) {
379
+ return {
380
+ ok: false,
381
+ officialSkillCount: 0,
382
+ compatibilityAliases: 0,
383
+ missingOfficialSkills: expectedSkills,
384
+ missingCompanionSkills: [...REQUIRED_COMPANION_SKILLS],
385
+ missingCompatibilityAliases: expectedAliases,
386
+ errors: ["Payload is not an object."],
387
+ };
388
+ }
389
+ const summary = isRecord(value["summary"]) ? value["summary"] : {};
390
+ const entries = Array.isArray(value["entries"]) ? value["entries"].filter(isRecord) : [];
391
+ const aliases = Array.isArray(value["compatibilityAliases"])
392
+ ? value["compatibilityAliases"].filter(isRecord)
393
+ : [];
394
+ const operatingModel = isRecord(value["operatingModel"]) ? value["operatingModel"] : {};
395
+ const officialSkillCount = typeof summary["officialSkillCount"] === "number" ? summary["officialSkillCount"] : 0;
396
+ const compatibilityAliases = typeof summary["compatibilityAliases"] === "number" ? summary["compatibilityAliases"] : 0;
397
+ const entryNames = new Set(entries.map((entry) => entry["officialSkill"]).filter((item) => typeof item === "string"));
398
+ const aliasNames = new Set(aliases.map((alias) => alias["alias"]).filter((item) => typeof item === "string"));
399
+ const companionSkills = new Set(stringArray(operatingModel["companionFigmaMcp"]));
400
+ const missingOfficialSkills = expectedSkills.filter((skill) => !entryNames.has(skill));
401
+ const missingCompanionSkills = REQUIRED_COMPANION_SKILLS.filter((skill) => !companionSkills.has(skill));
402
+ const missingCompatibilityAliases = expectedAliases.filter((alias) => !aliasNames.has(alias));
403
+ if (value["verifiedAt"] !== VERIFIED_AT) {
404
+ errors.push(`verifiedAt must be ${VERIFIED_AT}.`);
405
+ }
406
+ if (officialSkillCount !== expectedSkills.length) {
407
+ errors.push(`officialSkillCount must be ${expectedSkills.length}.`);
408
+ }
409
+ if (entries.length !== expectedSkills.length) {
410
+ errors.push(`entries length must be ${expectedSkills.length}.`);
411
+ }
412
+ if (compatibilityAliases !== expectedAliases.length) {
413
+ errors.push(`compatibilityAliases must be ${expectedAliases.length}.`);
414
+ }
415
+ if (missingOfficialSkills.length > 0) {
416
+ errors.push(`Missing official skills: ${missingOfficialSkills.join(", ")}.`);
417
+ }
418
+ if (missingCompanionSkills.length > 0) {
419
+ errors.push(`Missing companion skills: ${missingCompanionSkills.join(", ")}.`);
420
+ }
421
+ if (missingCompatibilityAliases.length > 0) {
422
+ errors.push(`Missing compatibility aliases: ${missingCompatibilityAliases.join(", ")}.`);
423
+ }
424
+ return {
425
+ ok: errors.length === 0,
426
+ officialSkillCount,
427
+ compatibilityAliases,
428
+ missingOfficialSkills,
429
+ missingCompanionSkills,
430
+ missingCompatibilityAliases,
431
+ errors,
432
+ };
433
+ }
434
+ //# sourceMappingURL=figma-mcp-skills-parity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"figma-mcp-skills-parity.js","sourceRoot":"","sources":["../src/figma-mcp-skills-parity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAA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QAC3C,MAAM,CAAC,IAAI,CAAC,kCAAkC,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3F,CAAC;IAED,OAAO;QACL,EAAE,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;QACvB,kBAAkB;QAClB,oBAAoB;QACpB,qBAAqB;QACrB,sBAAsB;QACtB,2BAA2B;QAC3B,MAAM;KACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { type FigmaRestAuthMode, type FigmaRestClientOptions } from "./figma-rest.js";
2
+ export type FigmaRestDiagnosticCheckId = "whoami" | "fileMetadata" | "fileNodes" | "fileImages" | "fileImageFills" | "fileComponents" | "fileComponentSets" | "fileStyles" | "teamComponents" | "teamComponentSets" | "teamStyles" | "variablesLocal" | "variablesPublished";
3
+ export declare const FIGMA_REST_DIAGNOSTIC_CHECK_IDS: readonly ["whoami", "fileMetadata", "fileNodes", "fileImages", "fileImageFills", "fileComponents", "fileComponentSets", "fileStyles", "teamComponents", "teamComponentSets", "teamStyles", "variablesLocal", "variablesPublished"];
4
+ export type FigmaRestDiagnosticStatus = "pass" | "warn" | "fail" | "skip";
5
+ export type FigmaRestDiagnosticCheck = {
6
+ id: FigmaRestDiagnosticCheckId;
7
+ endpoint: string | null;
8
+ status: FigmaRestDiagnosticStatus;
9
+ durationMs: number;
10
+ httpStatus?: number;
11
+ message: string;
12
+ requiredScopes: string[];
13
+ requirements: string[];
14
+ retryable: boolean;
15
+ };
16
+ export type FigmaRestDiagnosticReport = {
17
+ ok: boolean;
18
+ status: "pass" | "warn" | "fail";
19
+ version: 1;
20
+ generatedAt: string;
21
+ auth: {
22
+ tokenConfigured: boolean;
23
+ tokenEnv: string | null;
24
+ authMode: FigmaRestAuthMode;
25
+ apiBaseUrl: string;
26
+ };
27
+ inputs: {
28
+ fileKey: string | null;
29
+ teamId: string | null;
30
+ nodeIds: string[];
31
+ };
32
+ summary: {
33
+ requested: number;
34
+ pass: number;
35
+ warn: number;
36
+ fail: number;
37
+ skip: number;
38
+ };
39
+ checks: FigmaRestDiagnosticCheck[];
40
+ recommendations: string[];
41
+ sources: string[];
42
+ };
43
+ export type FigmaRestDiagnosticOptions = FigmaRestClientOptions & {
44
+ checks?: FigmaRestDiagnosticCheckId[];
45
+ fileKey?: string;
46
+ url?: string;
47
+ teamId?: string;
48
+ nodeIds?: string[];
49
+ };
50
+ export declare function diagnoseFigmaRest(options?: FigmaRestDiagnosticOptions): Promise<FigmaRestDiagnosticReport>;