@tempad-dev/mcp 0.7.0 → 0.8.0-alpha.0

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 CHANGED
@@ -7,7 +7,7 @@
7
7
  ```json
8
8
  {
9
9
  "mcpServers": {
10
- "TemPad Dev": {
10
+ "tempad-dev": {
11
11
  "command": "npx",
12
12
  "args": ["-y", "@tempad-dev/mcp@latest"]
13
13
  }
@@ -15,19 +15,19 @@
15
15
  }
16
16
  ```
17
17
 
18
- Quick setup helpers:
19
-
20
- - VS Code / Cursor / TRAE: use the deep links in TemPad Dev (Preferences → Agent integration).
21
- - Claude Code / Codex CLI: copy or run the CLI command from the same panel.
18
+ For agent-specific setup, open TemPad Dev's **Preferences → Agent integration → Set up agents**. It provides guided paths for Codex, Cursor, Claude Code, Gemini, VS Code, OpenCode, and TRAE, plus **Other** for compatible clients not listed.
22
19
 
23
20
  Supported tools/resources:
24
21
 
25
22
  - `get_code`: Tailwind-first JSX/Vue markup plus assets and token references.
23
+ - `get_design_system`: Query-ranked Figma components and variables from the active page/file.
24
+ - `apply_canvas`: One declarative create/update result, reconciled locally against the live canvas.
26
25
  - `get_structure`: Hierarchy/geometry outline for the selection.
27
26
 
28
27
  Notes:
29
28
 
30
29
  - Tool responses use a shared `64 KiB` inline budget measured on the `CallToolResult` body. When a selection is too large for the `get_code` budget, TemPad Dev may return a shell response instead of failing. The shell keeps the current node wrapper and lists omitted direct child ids in an inline code comment so agents can request them one by one. The accompanying warning stays lightweight and only points agents to that comment.
30
+ - `apply_canvas` is disabled by default. Enable **Canvas writes** in Agent integration only when you want the connected agent to modify the active Figma file.
31
31
  - Assets are ephemeral and tool-linked; image/SVG bytes are downloaded via the capability-bearing HTTP `asset.url` from tool results. Treat the full URL as a temporary secret and do not persist it in logs.
32
32
  - Asset resources are not exposed via MCP `resources/list`/`resources/read`.
33
33
  - The HTTP fallback URL uses `/{capability}/assets/{hash}` and may include an image extension (for example `/{capability}/assets/{hash}.png`). Both filename forms are accepted.
package/README.zh-Hans.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ```json
6
6
  {
7
7
  "mcpServers": {
8
- "TemPad Dev": {
8
+ "tempad-dev": {
9
9
  "command": "npx",
10
10
  "args": ["-y", "@tempad-dev/mcp@latest"]
11
11
  }
@@ -13,19 +13,19 @@
13
13
  }
14
14
  ```
15
15
 
16
- 快速配置方式:
17
-
18
- - VS Code / Cursor / TRAE:使用 TemPad Dev(Preferences → Agent integration)中的深链接。
19
- - Claude Code / Codex CLI:从同一面板复制或运行 CLI 命令。
16
+ 如需针对不同 agent 配置,请打开 TemPad Dev 的 **Preferences → Agent integration → Set up agents**。界面提供 Codex、Cursor、Claude Code、Gemini、VS Code、OpenCode 和 TRAE 的引导路径;未列出的兼容客户端可选择 **Other**。
20
17
 
21
18
  支持的工具和资源:
22
19
 
23
20
  - `get_code`:以 Tailwind 优先的 JSX/Vue 标记输出,并附带资源和变量引用。
21
+ - `get_design_system`:从当前页面/文件中返回按查询排序的 Figma 组件和变量。
22
+ - `apply_canvas`:提交一次声明式创建或更新结果,由扩展与实时画布在本地进行增量协调。
24
23
  - `get_structure`:当前选中节点的层级/几何结构信息。
25
24
 
26
25
  说明:
27
26
 
28
27
  - 工具响应共用 `64 KiB` 的 inline budget,按 `CallToolResult` 整体响应体积计算。若选区过大而超出 `get_code` 的预算,TemPad Dev 可能返回 shell response 而不是直接失败。shell 会保留当前节点的包裹结构,并在内联代码注释中列出被省略的直接子节点 id,方便 agent 逐个继续拉取;配套 warning 只保留最小化的提示信息,用来指向这条注释。
28
+ - `apply_canvas` 默认禁用。只有在希望已连接的 agent 修改当前 Figma 文件时,才在 Agent integration 中启用 **Canvas writes**。
29
29
  - 资源是临时且与工具调用关联的;图片/SVG 请直接使用工具结果中带 capability 的 HTTP `asset.url` 下载。完整 URL 应视作临时密钥,不要持久化到日志中。
30
30
  - MCP 不再暴露 `resources/list` / `resources/read` 用于 asset 内容读取。
31
31
  - HTTP 回退 URL 使用 `/{capability}/assets/{hash}`,也可能带图片扩展名(例如 `/{capability}/assets/{hash}.png`),两种文件名形式都支持。
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as LOCK_PATH, c as SOCK_PATH, d as log, l as ensureDir, o as PACKAGE_VERSION, s as RUNTIME_DIR } from "./shared-BAyjEPbx.mjs";
2
+ import { a as LOCK_PATH, c as SOCK_PATH, d as log, l as ensureDir, o as PACKAGE_VERSION, s as RUNTIME_DIR } from "./shared-BM-k8yN9.mjs";
3
3
  import { spawn } from "node:child_process";
4
4
  import { connect } from "node:net";
5
5
  import { join } from "node:path";