@sxl-studio/bridge 1.4.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/agent-recipes.d.ts +185 -17
- package/dist/agent-recipes.js +372 -26
- package/dist/agent-recipes.js.map +1 -1
- package/dist/command-queue.js +9 -0
- package/dist/command-queue.js.map +1 -1
- package/dist/mcp-factory.js +1 -1
- package/dist/sxl-mcp-instructions.js +104 -26
- package/dist/sxl-mcp-instructions.js.map +1 -1
- package/dist/tools/catalogue-bootstrap.js +4 -0
- package/dist/tools/catalogue-bootstrap.js.map +1 -1
- package/dist/tools/orchestration.js +201 -2
- package/dist/tools/orchestration.js.map +1 -1
- package/dist/tools/resources.d.ts +4 -1
- package/dist/tools/resources.js +37 -2
- package/dist/tools/resources.js.map +1 -1
- package/dist/tools/tokens.d.ts +629 -0
- package/dist/tools/tokens.js +94 -0
- package/dist/tools/tokens.js.map +1 -1
- package/dist/tools/variables.js +59 -0
- package/dist/tools/variables.js.map +1 -1
- package/package.json +2 -2
package/dist/agent-recipes.js
CHANGED
|
@@ -1,56 +1,271 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Machine-readable documentation recipes for MCP resources (sxl://agent/recipes/*).
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
|
+
* Read order for an agent that just got a documentation request:
|
|
5
|
+
* 1. sxl://agent/recipes/index — intent router (THIS file: RECIPE_INDEX).
|
|
6
|
+
* 2. The specific recipe it points to.
|
|
7
|
+
* 3. sxl://agent/recipes/doc-spec-v2 — section vocabulary, when needed.
|
|
8
|
+
* 4. sxl://agent/recipes/template-discovery — how to find templateNodeId.
|
|
9
|
+
*
|
|
10
|
+
* Every recipe MUST list:
|
|
11
|
+
* - userPhrases — short sample utterances that route to it.
|
|
12
|
+
* - decideBetween — siblings + when each wins.
|
|
13
|
+
* - preferredTools — Bridge / direct tool names in call order.
|
|
14
|
+
* - forbidden — concrete anti-patterns to avoid.
|
|
15
|
+
* - steps — minimal sequence to reach doneCriteria.
|
|
16
|
+
* - doneCriteria — verifiable success.
|
|
4
17
|
*/
|
|
18
|
+
export const RECIPE_INDEX = {
|
|
19
|
+
id: "index",
|
|
20
|
+
title: "SXL Doc Builder — intent router",
|
|
21
|
+
version: 1,
|
|
22
|
+
context: "Decision tree for any documentation / palette / scenario request that targets a Figma file managed by SXL Studio. Always read this resource first; it routes the agent to a specific recipe instead of running ad-hoc figma.* JS.",
|
|
23
|
+
userIntents: [
|
|
24
|
+
{
|
|
25
|
+
recipeId: "doc-tokens",
|
|
26
|
+
userPhrases: [
|
|
27
|
+
"задокументируй токены",
|
|
28
|
+
"build a token doc",
|
|
29
|
+
"table of token values",
|
|
30
|
+
"fill template TEXT layers with token values",
|
|
31
|
+
"tokenPath, layerName binding",
|
|
32
|
+
"show DTCG paths in doc frame",
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
recipeId: "variable-palette",
|
|
37
|
+
userPhrases: [
|
|
38
|
+
"добавь все цвета коллекции projects карточками",
|
|
39
|
+
"render figma variable collection as cards",
|
|
40
|
+
"swatches from local variable collection",
|
|
41
|
+
"по коллекции переменных нарисуй палитру",
|
|
42
|
+
"fill content with one card per variable",
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
recipeId: "doc-component",
|
|
47
|
+
userPhrases: [
|
|
48
|
+
"задокументируй компонент",
|
|
49
|
+
"document WButton",
|
|
50
|
+
"component frame with variants and props",
|
|
51
|
+
"build component doc",
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
recipeId: "doc-flow",
|
|
56
|
+
userPhrases: [
|
|
57
|
+
"сделай flow по этим ссылкам",
|
|
58
|
+
"build a multi-page scenario",
|
|
59
|
+
"screen flow doc",
|
|
60
|
+
"story of pages from these urls",
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
recipeId: "doc-spec-v2",
|
|
65
|
+
userPhrases: [
|
|
66
|
+
"сложная документация: title + variants + props + palette",
|
|
67
|
+
"mix sections in one frame",
|
|
68
|
+
"custom doc spec",
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
recipeId: "template-discovery",
|
|
73
|
+
userPhrases: [
|
|
74
|
+
"find the card template inside content frame",
|
|
75
|
+
"локализуй карточку-шаблон в content",
|
|
76
|
+
"where is the swatch template node",
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
recipeId: "compose-with-variables",
|
|
81
|
+
userPhrases: [
|
|
82
|
+
"получи JSON компонента и сгенерируй его назначив переменные",
|
|
83
|
+
"export composition and generate component with variables assigned",
|
|
84
|
+
"сохрани компонент в репо с привязкой переменных",
|
|
85
|
+
"generate component from figma url with variable bindings",
|
|
86
|
+
"создай компонент сет и привяжи переменные",
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
recipeId: "scenario-from-markdown",
|
|
91
|
+
userPhrases: [
|
|
92
|
+
"вот md файл сценария, создай flow",
|
|
93
|
+
"build scenario from this markdown",
|
|
94
|
+
"у меня есть md с описанием флоу",
|
|
95
|
+
"создай сценарий из md файла",
|
|
96
|
+
"render this spec as a figma flow",
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
decideBetween: [
|
|
101
|
+
{
|
|
102
|
+
between: ["doc-tokens", "variable-palette"],
|
|
103
|
+
use_doc_tokens_when: "data source is DTCG token files in the plugin workspace (paths like core.color.fg)",
|
|
104
|
+
use_variable_palette_when: "data source is local Figma Variables (no DTCG file behind them)",
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
between: ["doc-component", "doc-spec-v2"],
|
|
108
|
+
use_doc_component_when: "single Figma component / component set with default sections (title + variants + props)",
|
|
109
|
+
use_doc_spec_v2_when: "user wants a custom mix of sections, or several non-component artefacts in one frame",
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
between: ["scenario-from-markdown", "doc-flow"],
|
|
113
|
+
use_scenario_from_markdown_when: "user provides a markdown document with H2 sections and Figma URLs — call build_scenario_from_md",
|
|
114
|
+
use_doc_flow_when: "user provides individual Figma URLs / nodeIds directly (no markdown doc)",
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
between: ["compose-with-variables", "doc-composition"],
|
|
118
|
+
use_compose_with_variables_when: "goal is to generate a reusable Figma component with variable bindings from a design URL",
|
|
119
|
+
use_doc_composition_when: "goal is to render a documentation frame from an existing composition file",
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
forbidden: [
|
|
123
|
+
"Calling use_figma with a hand-written figma.* script when an SXL Bridge tool covers the task.",
|
|
124
|
+
"Shell payload assembly to /tmp/*.json + base64 loaders + node -e glue to invoke MCP.",
|
|
125
|
+
"Hand-crafting composition / token / Doc Spec JSON when the plugin pipeline (export_composition_json / list_compositions / get_variables) is the source of truth.",
|
|
126
|
+
"Skipping this index and jumping straight to a sub-recipe without confirming intent.",
|
|
127
|
+
],
|
|
128
|
+
doneCriteria: "Agent picked exactly one recipe, called only the tools it lists, and produced a verifiable result (doneWhen of that recipe).",
|
|
129
|
+
};
|
|
130
|
+
export const RECIPE_TEMPLATE_DISCOVERY = {
|
|
131
|
+
id: "template-discovery",
|
|
132
|
+
title: "Find the swatch / card template inside a content frame",
|
|
133
|
+
version: 1,
|
|
134
|
+
context: "Many doc tasks (variable-palette, doc-spec-v2.palette, doc-component.variants) need a templateNodeId — an existing scene node we can clone. This recipe shows how to locate it deterministically without scripts.",
|
|
135
|
+
userPhrases: [
|
|
136
|
+
"find template card in content",
|
|
137
|
+
"locate swatch template",
|
|
138
|
+
"templateNodeId под content фрейма",
|
|
139
|
+
],
|
|
140
|
+
preferredTools: [
|
|
141
|
+
"get_node_tree",
|
|
142
|
+
"find_nodes",
|
|
143
|
+
"get_node_info",
|
|
144
|
+
"read_node_properties",
|
|
145
|
+
],
|
|
146
|
+
forbidden: [
|
|
147
|
+
"Cloning the entire content frame instead of one card.",
|
|
148
|
+
"Guessing node ids — always verify via get_node_tree / find_nodes.",
|
|
149
|
+
"Falling back to use_figma to traverse the file: get_node_tree returns enough info for SXL templates.",
|
|
150
|
+
],
|
|
151
|
+
steps: [
|
|
152
|
+
"From the user URL, parse node-id (`figma.com/design/.../?node-id=151-2` → `151:2`).",
|
|
153
|
+
"Call get_node_tree with that nodeId and depth=4 to inspect the frame and its content.",
|
|
154
|
+
"Pick the first child of the content layer (or one named 'card', 'swatch', 'token-card' — let the user confirm if ambiguous).",
|
|
155
|
+
"Read swatch / label / value layer names with get_node_tree (depth=2 from the picked card) and pass them to bind_variable_palette / palette section.",
|
|
156
|
+
],
|
|
157
|
+
doneCriteria: "templateNodeId + swatchLayerName (and optionally labelLayerName / valueLayerName) confirmed against the file before any clone.",
|
|
158
|
+
};
|
|
159
|
+
export const RECIPE_DOC_SPEC_V2 = {
|
|
160
|
+
id: "doc-spec-v2",
|
|
161
|
+
title: "Doc Spec v2 — sections vocabulary",
|
|
162
|
+
version: 1,
|
|
163
|
+
context: "Doc Spec v2 lets you compose a single apply_doc_spec call from a list of sections. Each section is independent: combine only what the user asked for. Read this resource before assembling a custom spec.",
|
|
164
|
+
preferredTools: ["apply_doc_spec", "build_component_doc", "bind_variable_palette", "build_doc_flow"],
|
|
165
|
+
sections: [
|
|
166
|
+
{ type: "title", note: "Either creates a TEXT node or writes into an existing layerName." },
|
|
167
|
+
{ type: "description", note: "Markdown subset → formatted runs. Use **bold**, *italic*, `code`, # headings." },
|
|
168
|
+
{ type: "variants", note: "ComponentSet → matrix / grid / list of instances. Use groupBy for matrix rows." },
|
|
169
|
+
{ type: "props", note: "componentPropertyDefinitions → table TEXT block. include filters which kinds." },
|
|
170
|
+
{ type: "tokenTable", note: "v1 surface preserved: layerName + tokenPath. Picks values from DTCG workspace." },
|
|
171
|
+
{ type: "palette", note: "Local Figma Variables → cards by cloning templateNodeId." },
|
|
172
|
+
{ type: "measure", note: "Experimental: node.annotations = [...]." },
|
|
173
|
+
],
|
|
174
|
+
forbidden: [
|
|
175
|
+
"Generating section types not in the schema (the validator rejects them).",
|
|
176
|
+
"Using `palette.collectionName` for a DTCG file path — palette only inspects local Figma Variables.",
|
|
177
|
+
"Putting v1 fields (`groups`, `version: \"1\"`) into a v2 spec — use apply_token_doc_spec for v1.",
|
|
178
|
+
],
|
|
179
|
+
steps: [
|
|
180
|
+
"Decide which sections are needed (intent router → user request).",
|
|
181
|
+
"Resolve targetRootId (existing frame) or targetParentId (with createIfMissing).",
|
|
182
|
+
"Call apply_doc_spec with the assembled spec; rely on per-section reports for partial failures.",
|
|
183
|
+
],
|
|
184
|
+
doneCriteria: "apply_doc_spec returns ok=true (or section-level report shows which section failed and why).",
|
|
185
|
+
};
|
|
5
186
|
export const RECIPE_DOC_TOKENS = {
|
|
6
187
|
id: "doc-tokens",
|
|
7
|
-
title: "Token documentation (Doc Spec v1)",
|
|
8
|
-
version:
|
|
188
|
+
title: "Token documentation (Doc Spec v1 / v2 tokenTable)",
|
|
189
|
+
version: 2,
|
|
190
|
+
userPhrases: [
|
|
191
|
+
"задокументируй токены",
|
|
192
|
+
"fill doc template with token values",
|
|
193
|
+
"table of DTCG paths and resolved values",
|
|
194
|
+
],
|
|
195
|
+
decideBetween: [
|
|
196
|
+
{
|
|
197
|
+
between: ["doc-tokens", "variable-palette"],
|
|
198
|
+
hint: "If the data source is local Figma variables (no DTCG file), switch to variable-palette.",
|
|
199
|
+
},
|
|
200
|
+
],
|
|
9
201
|
preferredTools: [
|
|
10
202
|
"list_token_files",
|
|
11
203
|
"get_token_file_content",
|
|
12
204
|
"build_token_documentation",
|
|
13
205
|
"apply_token_doc_spec",
|
|
206
|
+
"apply_doc_spec",
|
|
14
207
|
"duplicate_subtree",
|
|
15
|
-
"apply_documentation_payload",
|
|
16
208
|
],
|
|
17
209
|
forbidden: [
|
|
18
|
-
"Hand-written DTCG
|
|
19
|
-
"Raw
|
|
210
|
+
"Hand-written DTCG / composition JSON as the source of truth — use plugin workspace files.",
|
|
211
|
+
"Raw figma.* JS / use_figma scripts to traverse tokens — Bridge has list_token_files + get_token_file_content.",
|
|
212
|
+
"Copy-pasting token values into the spec instead of letting the plugin resolve them.",
|
|
20
213
|
],
|
|
21
214
|
steps: [
|
|
22
215
|
"Read sxl://tokens/config and sxl://tokens/files (or list_token_files) to locate token files.",
|
|
23
|
-
"In Figma Design mode
|
|
24
|
-
"Build
|
|
25
|
-
"Call build_token_documentation with { spec, targetRootId }
|
|
26
|
-
"On unresolved paths
|
|
216
|
+
"In Figma Design mode duplicate the doc template (or use an existing one) to obtain targetRootId.",
|
|
217
|
+
"Build Doc Spec v1 (groups[].rows with layerName + tokenPath) — or v2 with a single tokenTable section if you also need title / description.",
|
|
218
|
+
"Call build_token_documentation / apply_token_doc_spec (v1) or apply_doc_spec (v2) with { spec, targetRootId }.",
|
|
219
|
+
"On unresolved paths re-check tokenPath spelling and confirm files are present in the workspace.",
|
|
27
220
|
],
|
|
28
|
-
|
|
221
|
+
doneCriteria: "TEXT layers under targetRootId show resolved values; the response reports updated > 0 and no unresolved paths (unless dryRun).",
|
|
29
222
|
};
|
|
30
223
|
export const RECIPE_DOC_COMPONENT = {
|
|
31
224
|
id: "doc-component",
|
|
32
|
-
title: "Component documentation",
|
|
33
|
-
version:
|
|
225
|
+
title: "Component documentation (title + variants + props + optional measure)",
|
|
226
|
+
version: 2,
|
|
227
|
+
userPhrases: [
|
|
228
|
+
"задокументируй компонент",
|
|
229
|
+
"document this component",
|
|
230
|
+
"WButton documentation frame",
|
|
231
|
+
"build component doc",
|
|
232
|
+
],
|
|
233
|
+
decideBetween: [
|
|
234
|
+
{
|
|
235
|
+
between: ["doc-component", "doc-spec-v2"],
|
|
236
|
+
hint: "If you need anything beyond title/description/variants/props/measure (e.g. palette, tokenTable), pick doc-spec-v2 + apply_doc_spec.",
|
|
237
|
+
},
|
|
238
|
+
],
|
|
34
239
|
preferredTools: [
|
|
240
|
+
"build_component_doc",
|
|
241
|
+
"apply_doc_spec",
|
|
35
242
|
"export_composition_json",
|
|
36
243
|
"get_codegen",
|
|
37
|
-
"
|
|
38
|
-
"apply_documentation_payload",
|
|
39
|
-
"create_component_instance",
|
|
244
|
+
"duplicate_subtree",
|
|
40
245
|
],
|
|
41
246
|
forbidden: [
|
|
42
|
-
"Synthesising composition JSON from get_node_tree — use export_composition_json
|
|
247
|
+
"Synthesising composition JSON from get_node_tree — use export_composition_json / get_codegen.",
|
|
248
|
+
"Calling use_figma to read componentPropertyDefinitions — the plugin already exposes it via build_component_doc.",
|
|
249
|
+
"Mutating the component itself when documenting it — work on the doc frame, not the source.",
|
|
43
250
|
],
|
|
44
251
|
steps: [
|
|
45
|
-
"
|
|
46
|
-
"
|
|
252
|
+
"Identify the component (componentNodeId). For a component set, pass the set id.",
|
|
253
|
+
"Provide either targetRootId (existing doc frame) or targetParentId (createIfMissing=true).",
|
|
254
|
+
"Call build_component_doc; toggle includeMeasure only if the user asked for size annotations.",
|
|
255
|
+
"Refine specific sections (e.g. update description markdown) by re-running with new payload.",
|
|
47
256
|
],
|
|
257
|
+
doneCriteria: "The doc frame contains a title, a variants matrix (when applicable), and a props table with all componentPropertyDefinitions.",
|
|
48
258
|
phases: "Measuring/annotations: see Plugin/sxl/docs/23-doc-agent-phased-roadmap.md (Phase 3).",
|
|
49
259
|
};
|
|
50
260
|
export const RECIPE_DOC_COMPOSITION = {
|
|
51
261
|
id: "doc-composition",
|
|
52
262
|
title: "Documentation from composition file",
|
|
53
|
-
version:
|
|
263
|
+
version: 2,
|
|
264
|
+
userPhrases: [
|
|
265
|
+
"render this composition file as documentation",
|
|
266
|
+
"доку по composition.json",
|
|
267
|
+
"build a frame from a composition file",
|
|
268
|
+
],
|
|
54
269
|
preferredTools: [
|
|
55
270
|
"list_compositions",
|
|
56
271
|
"export_composition_json",
|
|
@@ -58,19 +273,150 @@ export const RECIPE_DOC_COMPOSITION = {
|
|
|
58
273
|
"apply_composition",
|
|
59
274
|
"compose_from_url",
|
|
60
275
|
],
|
|
276
|
+
forbidden: [
|
|
277
|
+
"Hand-assembling composition trees in JSON — the plugin pipeline is the single source of truth.",
|
|
278
|
+
"Using use_figma to draw the composition manually.",
|
|
279
|
+
],
|
|
61
280
|
steps: [
|
|
62
|
-
"Prefer compose_from_url
|
|
63
|
-
"
|
|
281
|
+
"Prefer compose_from_url for a Figma URL → export_composition_json → create_token_file → generate_composition.",
|
|
282
|
+
"Apply with apply_composition / generate_composition; do not hand-construct nodes.",
|
|
64
283
|
],
|
|
284
|
+
doneCriteria: "Composition file in workspace + generated component / instance on the canvas matching the source.",
|
|
65
285
|
};
|
|
66
286
|
export const RECIPE_DOC_FLOW = {
|
|
67
287
|
id: "doc-flow",
|
|
68
|
-
title: "Multi-page screen flow",
|
|
288
|
+
title: "Multi-page screen flow / scenario",
|
|
289
|
+
version: 2,
|
|
290
|
+
userPhrases: [
|
|
291
|
+
"сделай flow по этим ссылкам",
|
|
292
|
+
"build a screen flow doc",
|
|
293
|
+
"story of pages from these urls",
|
|
294
|
+
"scenario doc with multiple frames",
|
|
295
|
+
],
|
|
296
|
+
preferredTools: ["build_doc_flow", "compose_from_url", "duplicate_subtree", "apply_doc_spec"],
|
|
297
|
+
forbidden: [
|
|
298
|
+
"Calling use_figma to clone many frames into one container — use build_doc_flow.",
|
|
299
|
+
"Skipping captions when the user provided a description per page — pass them via pages[].title / description.",
|
|
300
|
+
],
|
|
301
|
+
steps: [
|
|
302
|
+
"Resolve each Figma URL to a node id (parseFigmaUrl handles `&node-id=` segments).",
|
|
303
|
+
"Call build_doc_flow with pages[] (each with nodeId and optional title / description).",
|
|
304
|
+
"If a page references a composition file rather than a node, call compose_from_url first to materialise it.",
|
|
305
|
+
],
|
|
306
|
+
doneCriteria: "All requested pages appear inside a single auto-layout container with optional captions; no use_figma script was used.",
|
|
307
|
+
};
|
|
308
|
+
export const RECIPE_COMPOSE_WITH_VARIABLES = {
|
|
309
|
+
id: "compose-with-variables",
|
|
310
|
+
title: "Export composition and generate component with Figma variable bindings",
|
|
69
311
|
version: 1,
|
|
70
|
-
|
|
312
|
+
userPhrases: [
|
|
313
|
+
"получи JSON компонента и сгенерируй его назначив переменные",
|
|
314
|
+
"export composition and generate component with variables assigned",
|
|
315
|
+
"сохрани компонент в репо и создай с привязкой переменных фигмы",
|
|
316
|
+
"generate component from figma url with variable bindings",
|
|
317
|
+
"создай компонент сет и привяжи переменные экспортированные из фигмы",
|
|
318
|
+
"get code JSON and generate component assigning all variables",
|
|
319
|
+
],
|
|
320
|
+
decideBetween: [
|
|
321
|
+
{
|
|
322
|
+
between: ["compose-with-variables", "doc-composition"],
|
|
323
|
+
hint: "If the goal is documentation (render a frame, not generate a reusable component), use doc-composition.",
|
|
324
|
+
},
|
|
325
|
+
],
|
|
326
|
+
context: "Variable references inside a composition JSON are automatically applied during generate_composition — the plugin binds Figma local variables to nodes without extra steps. Use batch_bind_variables only for bindings NOT captured in the composition JSON.",
|
|
327
|
+
preferredTools: [
|
|
328
|
+
"compose_from_url",
|
|
329
|
+
"export_composition_json",
|
|
330
|
+
"create_token_file",
|
|
331
|
+
"generate_composition",
|
|
332
|
+
"get_variables",
|
|
333
|
+
"batch_bind_variables",
|
|
334
|
+
],
|
|
335
|
+
forbidden: [
|
|
336
|
+
"Hand-crafting composition JSON from get_node_tree — always use export_composition_json / get_codegen.",
|
|
337
|
+
"Calling bind_variable N times in a loop — use batch_bind_variables for bulk wiring.",
|
|
338
|
+
"Skipping get_plugin_status before canvas writes — confirm writesAllowed first.",
|
|
339
|
+
],
|
|
340
|
+
steps: [
|
|
341
|
+
"Call compose_from_url { url, generate: true } — exports composition JSON, saves token file, generates Figma component. Variable references inside the JSON are auto-bound.",
|
|
342
|
+
"If additional bindings are needed (not in composition JSON): call get_variables to list local variables, then batch_bind_variables with the required {nodeId, variableId, field} entries.",
|
|
343
|
+
"Verify result with get_drift_status or get_selection_summary.",
|
|
344
|
+
],
|
|
345
|
+
doneCriteria: "Composition token file exists in workspace; Figma component generated on canvas; variable bindings visible in Figma inspector.",
|
|
346
|
+
};
|
|
347
|
+
export const RECIPE_SCENARIO_FROM_MARKDOWN = {
|
|
348
|
+
id: "scenario-from-markdown",
|
|
349
|
+
title: "Multi-page scenario / flow from a markdown spec document",
|
|
350
|
+
version: 1,
|
|
351
|
+
userPhrases: [
|
|
352
|
+
"вот md файл сценария, создай flow в фигме",
|
|
353
|
+
"build scenario from this markdown document",
|
|
354
|
+
"у меня есть md с описанием флоу",
|
|
355
|
+
"render this spec as a figma flow",
|
|
356
|
+
"создай сценарий из md файла",
|
|
357
|
+
"scenario document → figma pages",
|
|
358
|
+
"make a user flow from this spec",
|
|
359
|
+
"go through this markdown and create a figma scenario",
|
|
360
|
+
],
|
|
361
|
+
decideBetween: [
|
|
362
|
+
{
|
|
363
|
+
between: ["scenario-from-markdown", "doc-flow"],
|
|
364
|
+
hint: "If the user provides individual Figma URLs (not a markdown document), use doc-flow / build_doc_flow directly.",
|
|
365
|
+
},
|
|
366
|
+
],
|
|
367
|
+
context: "The markdown spec format: H1 = flow container title, H2 sections = pages, Figma URL per section = source node to clone, paragraph text = page caption. build_scenario_from_md parses this automatically.",
|
|
368
|
+
preferredTools: [
|
|
369
|
+
"build_scenario_from_md",
|
|
370
|
+
"build_doc_flow",
|
|
371
|
+
],
|
|
372
|
+
forbidden: [
|
|
373
|
+
"Hand-parsing Figma URLs from markdown and assembling pages[] manually — use build_scenario_from_md.",
|
|
374
|
+
"Calling use_figma to create frames and place screenshots.",
|
|
375
|
+
"Generating a node-by-node script when build_scenario_from_md covers the whole flow.",
|
|
376
|
+
],
|
|
377
|
+
steps: [
|
|
378
|
+
"Run build_scenario_from_md { markdown, dryRun: true } — confirm the parsed pages list (title, nodeId, description) is correct.",
|
|
379
|
+
"If nodeIds are missing: check that Figma URLs in the markdown include ?node-id= parameters.",
|
|
380
|
+
"Run build_scenario_from_md with targetParentId (or targetRootId for an existing container) and dryRun: false.",
|
|
381
|
+
],
|
|
382
|
+
doneCriteria: "All H2 pages from the markdown appear as frames inside a single auto-layout container; each page has the correct caption.",
|
|
383
|
+
};
|
|
384
|
+
export const RECIPE_VARIABLE_PALETTE = {
|
|
385
|
+
id: "variable-palette",
|
|
386
|
+
title: "Color (or variable) cards from a Figma variable collection",
|
|
387
|
+
version: 2,
|
|
388
|
+
userPhrases: [
|
|
389
|
+
"добавь все цвета коллекции projects карточками",
|
|
390
|
+
"render figma variable collection as cards",
|
|
391
|
+
"swatches from local variable collection",
|
|
392
|
+
"по коллекции переменных нарисуй палитру",
|
|
393
|
+
],
|
|
394
|
+
decideBetween: [
|
|
395
|
+
{
|
|
396
|
+
between: ["variable-palette", "doc-tokens"],
|
|
397
|
+
hint: "If user names a DTCG file or token path (`core.color.*`), switch to doc-tokens.",
|
|
398
|
+
},
|
|
399
|
+
],
|
|
400
|
+
context: "Example: fill a frame's content with one card per COLOR variable in the Projects collection, using an existing card component / instance as template.",
|
|
401
|
+
preferredTools: [
|
|
402
|
+
"get_plugin_status",
|
|
403
|
+
"get_variables",
|
|
404
|
+
"get_node_tree",
|
|
405
|
+
"find_nodes",
|
|
406
|
+
"bind_variable_palette",
|
|
407
|
+
"apply_doc_spec",
|
|
408
|
+
],
|
|
409
|
+
forbidden: [
|
|
410
|
+
"use_figma (official Figma MCP) with a custom JavaScript payload — SXL session cannot execute that in the plugin; bind_variable_palette covers the same flow.",
|
|
411
|
+
"Shell payloads (/tmp/*.json, base64 loaders, copy-paste into tokens/system, node -e glue) to invoke MCP — pass JSON directly to bind_variable_palette.",
|
|
412
|
+
"Pretending the task requires a 'Figma script' when get_variables + bind_variable_palette is enough.",
|
|
413
|
+
],
|
|
71
414
|
steps: [
|
|
72
|
-
"
|
|
73
|
-
"
|
|
415
|
+
"get_plugin_status — confirm writesAllowed (Figma Design, not Dev Mode read-only).",
|
|
416
|
+
"Use sxl://agent/recipes/template-discovery to locate templateNodeId + swatchLayerName under the user's content frame.",
|
|
417
|
+
"Call bind_variable_palette with { templateNodeId, collectionName, variableType: 'COLOR', swatchLayerName, labelLayerName? }.",
|
|
418
|
+
"Inspect the response: created should equal the variable count; bound should equal created (one fill bind per swatch).",
|
|
74
419
|
],
|
|
420
|
+
doneCriteria: "One card per target variable next to the template; each swatch is bound to its variable; no use_figma script was used.",
|
|
75
421
|
};
|
|
76
422
|
//# sourceMappingURL=agent-recipes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-recipes.js","sourceRoot":"","sources":["../src/agent-recipes.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"agent-recipes.js","sourceRoot":"","sources":["../src/agent-recipes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,EAAE,EAAE,OAAO;IACX,KAAK,EAAE,iCAAiC;IACxC,OAAO,EAAE,CAAC;IACV,OAAO,EACL,mOAAmO;IACrO,WAAW,EAAE;QACX;YACE,QAAQ,EAAE,YAAY;YACtB,WAAW,EAAE;gBACX,uBAAuB;gBACvB,mBAAmB;gBACnB,uBAAuB;gBACvB,6CAA6C;gBAC7C,8BAA8B;gBAC9B,8BAA8B;aAC/B;SACF;QACD;YACE,QAAQ,EAAE,kBAAkB;YAC5B,WAAW,EAAE;gBACX,gDAAgD;gBAChD,2CAA2C;gBAC3C,yCAAyC;gBACzC,yCAAyC;gBACzC,yCAAyC;aAC1C;SACF;QACD;YACE,QAAQ,EAAE,eAAe;YACzB,WAAW,EAAE;gBACX,0BAA0B;gBAC1B,kBAAkB;gBAClB,yCAAyC;gBACzC,qBAAqB;aACtB;SACF;QACD;YACE,QAAQ,EAAE,UAAU;YACpB,WAAW,EAAE;gBACX,6BAA6B;gBAC7B,6BAA6B;gBAC7B,iBAAiB;gBACjB,gCAAgC;aACjC;SACF;QACD;YACE,QAAQ,EAAE,aAAa;YACvB,WAAW,EAAE;gBACX,0DAA0D;gBAC1D,2BAA2B;gBAC3B,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tG;IACD,KAAK,EAAE;QACL,mFAAmF;QACnF,uHAAuH;QACvH,8HAA8H;QAC9H,uHAAuH;KACxH;IACD,YAAY,EACV,wHAAwH;CAClH,CAAC"}
|
package/dist/command-queue.js
CHANGED
|
@@ -20,11 +20,20 @@ export const BRIDGE_COMMAND_TIMEOUT_MS = {
|
|
|
20
20
|
duplicate_subtree: 60_000,
|
|
21
21
|
apply_documentation_payload: 45_000,
|
|
22
22
|
apply_token_doc_spec: 45_000,
|
|
23
|
+
apply_doc_spec: 90_000,
|
|
24
|
+
bind_variable_palette: 90_000,
|
|
25
|
+
build_component_doc: 120_000,
|
|
26
|
+
build_doc_flow: 120_000,
|
|
23
27
|
generate_instances: 30_000,
|
|
24
28
|
reapply_token_bindings: 30_000,
|
|
25
29
|
reapply_compositions: 60_000,
|
|
26
30
|
cross_file_sync_fetch: 30_000,
|
|
27
31
|
cross_file_sync_apply: 30_000,
|
|
32
|
+
/** Batch variable / binding operations */
|
|
33
|
+
batch_create_variables: 60_000,
|
|
34
|
+
batch_set_variable_values: 60_000,
|
|
35
|
+
batch_delete_variables: 30_000,
|
|
36
|
+
batch_bind_variables: 60_000,
|
|
28
37
|
/** Aligned with Plugin `COMMAND_TIMEOUTS` (remote/types.ts) for canvas-heavy commands */
|
|
29
38
|
export_as_svg: 60_000,
|
|
30
39
|
list_available_fonts: 45_000,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-queue.js","sourceRoot":"","sources":["../src/command-queue.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,uGAAuG;AACvG,MAAM,CAAC,MAAM,yBAAyB,GAAqC;IACzE,gBAAgB,EAAE,OAAO;IACzB,QAAQ,EAAE,OAAO;IACjB,aAAa,EAAE,OAAO;IACtB,QAAQ,EAAE,OAAO;IACjB,oBAAoB,EAAE,MAAM;IAC5B,iBAAiB,EAAE,MAAM;IACzB,kBAAkB,E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