@muloka/figma-console-mcp 0.6.5 → 0.6.6

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 (94) hide show
  1. package/README.md +12 -5
  2. package/dist/apps/design-system-dashboard/mcp-app.html +20 -20
  3. package/dist/apps/design-system-dashboard/scoring/accessibility.d.ts.map +1 -1
  4. package/dist/apps/design-system-dashboard/scoring/accessibility.js +2 -1
  5. package/dist/apps/design-system-dashboard/scoring/accessibility.js.map +1 -1
  6. package/dist/apps/design-system-dashboard/scoring/coverage.d.ts.map +1 -1
  7. package/dist/apps/design-system-dashboard/scoring/coverage.js +2 -1
  8. package/dist/apps/design-system-dashboard/scoring/coverage.js.map +1 -1
  9. package/dist/apps/design-system-dashboard/scoring/token-architecture.d.ts.map +1 -1
  10. package/dist/apps/design-system-dashboard/scoring/token-architecture.js +2 -1
  11. package/dist/apps/design-system-dashboard/scoring/token-architecture.js.map +1 -1
  12. package/dist/apps/design-system-dashboard/server.d.ts.map +1 -1
  13. package/dist/apps/design-system-dashboard/server.js +2 -1
  14. package/dist/apps/design-system-dashboard/server.js.map +1 -1
  15. package/dist/core/annotation-tools.d.ts.map +1 -1
  16. package/dist/core/annotation-tools.js +7 -6
  17. package/dist/core/annotation-tools.js.map +1 -1
  18. package/dist/core/comment-tools.d.ts.map +1 -1
  19. package/dist/core/comment-tools.js +4 -3
  20. package/dist/core/comment-tools.js.map +1 -1
  21. package/dist/core/deep-component-tools.d.ts.map +1 -1
  22. package/dist/core/deep-component-tools.js +5 -4
  23. package/dist/core/deep-component-tools.js.map +1 -1
  24. package/dist/core/design-code-tools.d.ts.map +1 -1
  25. package/dist/core/design-code-tools.js +4 -3
  26. package/dist/core/design-code-tools.js.map +1 -1
  27. package/dist/core/design-system-tools.d.ts.map +1 -1
  28. package/dist/core/design-system-tools.js +2 -1
  29. package/dist/core/design-system-tools.js.map +1 -1
  30. package/dist/core/diagnose-tool.d.ts +2 -0
  31. package/dist/core/diagnose-tool.d.ts.map +1 -1
  32. package/dist/core/diagnose-tool.js +6 -5
  33. package/dist/core/diagnose-tool.js.map +1 -1
  34. package/dist/core/figjam-tools.d.ts.map +1 -1
  35. package/dist/core/figjam-tools.js +5 -4
  36. package/dist/core/figjam-tools.js.map +1 -1
  37. package/dist/core/figma-api.d.ts.map +1 -1
  38. package/dist/core/figma-api.js +2 -1
  39. package/dist/core/figma-api.js.map +1 -1
  40. package/dist/core/figma-tools.d.ts.map +1 -1
  41. package/dist/core/figma-tools.js +39 -38
  42. package/dist/core/figma-tools.js.map +1 -1
  43. package/dist/core/library-tools.d.ts.map +1 -1
  44. package/dist/core/library-tools.js +7 -6
  45. package/dist/core/library-tools.js.map +1 -1
  46. package/dist/core/logger.d.ts +11 -0
  47. package/dist/core/logger.d.ts.map +1 -1
  48. package/dist/core/logger.js +13 -1
  49. package/dist/core/logger.js.map +1 -1
  50. package/dist/core/plugin-import-dir.d.ts +9 -0
  51. package/dist/core/plugin-import-dir.d.ts.map +1 -0
  52. package/dist/core/plugin-import-dir.js +47 -0
  53. package/dist/core/plugin-import-dir.js.map +1 -0
  54. package/dist/core/plugin-name.d.ts +26 -0
  55. package/dist/core/plugin-name.d.ts.map +1 -0
  56. package/dist/core/plugin-name.js +35 -0
  57. package/dist/core/plugin-name.js.map +1 -0
  58. package/dist/core/port-discovery.d.ts +2 -2
  59. package/dist/core/port-discovery.d.ts.map +1 -1
  60. package/dist/core/port-discovery.js +8 -6
  61. package/dist/core/port-discovery.js.map +1 -1
  62. package/dist/core/slides-tools.d.ts.map +1 -1
  63. package/dist/core/slides-tools.js +2 -1
  64. package/dist/core/slides-tools.js.map +1 -1
  65. package/dist/core/slot-tools.d.ts.map +1 -1
  66. package/dist/core/slot-tools.js +3 -2
  67. package/dist/core/slot-tools.js.map +1 -1
  68. package/dist/core/tokens-tools.d.ts.map +1 -1
  69. package/dist/core/tokens-tools.js +2 -1
  70. package/dist/core/tokens-tools.js.map +1 -1
  71. package/dist/core/variable-resolver.d.ts.map +1 -1
  72. package/dist/core/variable-resolver.js +3 -2
  73. package/dist/core/variable-resolver.js.map +1 -1
  74. package/dist/core/version-tools.d.ts.map +1 -1
  75. package/dist/core/version-tools.js +9 -8
  76. package/dist/core/version-tools.js.map +1 -1
  77. package/dist/core/websocket-connector.d.ts.map +1 -1
  78. package/dist/core/websocket-connector.js +3 -2
  79. package/dist/core/websocket-connector.js.map +1 -1
  80. package/dist/core/websocket-server.d.ts.map +1 -1
  81. package/dist/core/websocket-server.js +6 -5
  82. package/dist/core/websocket-server.js.map +1 -1
  83. package/dist/core/write-tools.d.ts.map +1 -1
  84. package/dist/core/write-tools.js +283 -232
  85. package/dist/core/write-tools.js.map +1 -1
  86. package/dist/local.d.ts +1 -1
  87. package/dist/local.d.ts.map +1 -1
  88. package/dist/local.js +76 -147
  89. package/dist/local.js.map +1 -1
  90. package/figma-desktop-bridge/README.md +15 -63
  91. package/figma-desktop-bridge/code.js +31 -29
  92. package/figma-desktop-bridge/manifest.json +5 -9
  93. package/figma-desktop-bridge/ui.html +768 -924
  94. package/package.json +1 -1
package/README.md CHANGED
@@ -52,9 +52,9 @@ claude mcp add figma-console -s user -e FIGMA_ACCESS_TOKEN=figd_YOUR_TOKEN -- np
52
52
 
53
53
  Restart the client afterwards.
54
54
 
55
- ### 3. Import the Desktop Bridge plugin
55
+ ### 3. Import the plugin
56
56
 
57
- The server keeps the plugin at a stable path, `~/.figma-console-mcp/plugin/manifest.json`, and refreshes it on every start. To print the exact path:
57
+ The plugin is called **Toko Relay** in Figma's menus. The server keeps it in its own folder, `~/.figma-console-mcp/toko-relay/`, and refreshes the files on every start. To print the exact path of its `manifest.json`:
58
58
 
59
59
  ```bash
60
60
  npx @muloka/figma-console-mcp --print-path
@@ -62,7 +62,9 @@ npx @muloka/figma-console-mcp --print-path
62
62
 
63
63
  In Figma Desktop, open a file, then **Plugins → Development → Import plugin from manifest…** and pick that `manifest.json`. On macOS the folder is hidden, so the file dialog won't show it: press **Cmd+Shift+G** in the dialog and paste the path.
64
64
 
65
- Run the plugin in each file you want the agent to work in. It scans ports 9223–9232 and connects to your running server on its own. Ask your agent to *"check Figma status"* (`figma_get_status`) to confirm the connection.
65
+ Run it from **Plugins → Development → Toko Relay** in each file you want the agent to work in. It scans ports 9223–9232 and connects to your running server on its own. Ask your agent to *"check Figma status"* (`figma_get_status`) to confirm the connection.
66
+
67
+ **Already using Figma Desktop Bridge?** From 0.6.6 the plugin has its own name and plugin ID, so Figma treats it as a new plugin rather than an update. Import the new folder's `manifest.json` as above, not the old `~/.figma-console-mcp/plugin/` one, then remove the old entry: **Plugins → Development → Manage plugins in development**. Until you switch, the old plugin keeps working and shows an update notice.
66
68
 
67
69
  ### When to re-import the plugin
68
70
 
@@ -71,9 +73,9 @@ Figma caches plugin files (`code.js`, `ui.html`) and keeps using its cached copy
71
73
  - **Re-import when a release says `figma-desktop-bridge/` changed.** Otherwise the new server stays compatible with the plugin you have.
72
74
  - **The server tells you when a re-import is needed (from 0.6.1).**
73
75
  - The plugin's `PLUGIN_VERSION` tracks the upstream lineage it was vendored from (currently 1.35.0), so it never changes for this fork's own plugin edits.
74
- - The plugin therefore also reports a fork revision. When yours is older than the one the server ships, `figma_get_status` and `figma_diagnose` report `pluginUpdateAvailable`, and the plugin shows its update banner.
76
+ - The plugin therefore also reports a fork revision. When yours is older than the one the server ships, `figma_get_status` and `figma_diagnose` report `pluginUpdateAvailable`, and the plugin window shows **Plugin update available**.
75
77
  - Plugins imported before 0.6.1 don't report a revision, so they're flagged once; re-importing clears it.
76
- - To re-import: **Plugins → Manage plugins**, then import the same `manifest.json` again.
78
+ - To re-import: **Plugins → Development → Import plugin from manifest…**, then choose the same `manifest.json` again.
77
79
 
78
80
  ---
79
81
 
@@ -178,6 +180,11 @@ With `ENABLE_MCP_APPS=true`, hosts that support [MCP Apps](https://github.com/mo
178
180
  - Read-only tools clear nothing, and neither does a write rejected before it reaches Figma.
179
181
  - Edits you make by hand in Figma still wait for the edit event, as before.
180
182
  - **Fetch warnings in every design-system tool (0.6.5)** — when the plugin's component scan or variable read fails, `figma_get_component_details` and `figma_get_token_values` now say so in a `warnings` list, as `figma_get_design_system_summary` and `figma_search_components` already did. Before, they answered from the partial data without a word, so a failed component scan read as "component not found".
183
+ - **The plugin's own name and folder (0.6.6)** — the plugin is **Toko Relay**, with its own plugin ID, so Figma lists it apart from upstream's Figma Desktop Bridge. The server copies it to `~/.figma-console-mcp/toko-relay/` and no longer writes `~/.figma-console-mcp/plugin/`. While people switch, messages that send you to the plugin give both names, and an older plugin gets the steps: import the new folder, then remove the old entry (see [step 3](#3-import-the-plugin)).
184
+ - **No cloud pairing (0.6.6)** — the plugin no longer carries upstream's cloud pairing, and its manifest allows network access to localhost only.
185
+ - **A quieter plugin window (0.6.6)** — two short status lines, with Pause or Resume, Activity and Minimize on one row underneath. It reads "Ready" until your AI acts, then the time and the last action; a failed action turns that line red. Minimize shrinks the window to one row at the same width, and the plugin remembers that across files and restarts. The plugin and server versions are at the top of the open activity log.
186
+ - **Logged errors keep their details (0.6.6)** — an error the server logs keeps its message and stack trace. Before, many came out as `{}`.
187
+ - **The arranger cleans up after a failure (0.6.6)** — when `figma_arrange_component_set` fails before the set moves into its new container, it removes the layers it created in that run. Once the set has moved it removes nothing, and a layer it couldn't remove is reported.
181
188
  - **Honest error reporting** — the eight single-op variable/collection/mode write tools check the bridge's result envelope, so a plugin-side failure surfaces its real error text instead of a false success or a masking TypeError; batch-create failure rows identify variables that were created before the throw (`created`/`id`/`valueSet: false`).
182
189
  - **Mode-limit safety** — `figma_setup_design_tokens` and `figma_create_variable_collection` roll the collection back on a mode-limit failure instead of orphaning it, and the setup tool returns your file's real ceiling as `planModeLimit`; the schema's stale 4-mode cap is now a 40 sanity bound (current Figma plans allow 10/20/unlimited — the runtime limit governs).
183
190
  - **No orphaned nodes on failure** — `figma_create_connector` validates endpoints before creating, and create-child / add-text-to-slide / create-table remove their partially-created node on error; batch stickies report the id of any sticky a failed row left behind. `figma_create_child` also gains the POLYGON/STAR/VECTOR types the plugin always supported.