[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A1B8WD792ETC0XYJV8GNNB":3,"skill-same:01M7A1B8WD792ETC0XYJV8GNNB":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":29,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7A1B8WD792ETC0XYJV8GNNB","plugin-workbench",null,"Create, implement, build, pack, install, reload, and manage Vetta desktop plugins for non-developers. Use whenever the user wants a Vetta plugin, plugin scaffolding, apply a `.vettapkg` package to Vetta, edit plugin.json name\u002FguidingWords, or debug plugin load\u002Finstall. Requires the Plugin Workbench input-bar toggle (hard isolation). The plugin handbook ships inside the project's own @vetta-org\u002Fplugin-sdk; locate it with the bundled CLI's docs command.","openvetta\u002Fopen-vetta","openvetta","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F310452651?v=4","01M7A143Q6S7A6WZEJYZN5TTYM","Open Vetta","01M7A143R600YHMC29N957HQP8",299,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fopenvetta\u002Fopen-vetta\u002Fblob\u002Fmain\u002Fpackages\u002Fplugins\u002Fpresets\u002Fplugin-workbench\u002Fagent\u002Fskills\u002Fplugin-workbench\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: plugin-workbench\ndescription: >\n  Create, implement, build, pack, install, reload, and manage Vetta desktop plugins\n  for non-developers. Use whenever the user wants a Vetta plugin, plugin scaffolding,\n  apply a `.vettapkg` package to Vetta, edit plugin.json name\u002FguidingWords, or debug plugin load\u002Finstall.\n  Requires the Plugin Workbench input-bar toggle (hard isolation). The plugin handbook ships\n  inside the project's own @vetta-org\u002Fplugin-sdk; locate it with the bundled CLI's docs command.\n---\n\n# 制作插件（完整流水线）\n\n面向**不懂开发的用户**：你读规范、写代码、跑标准脚本、装进本机；用户只回答问题与点确认。\n\n**质量底线**：没有读过插件手册就动手写实现 = 禁止。凭记忆编造 SDK API 很容易装上不能用。\n\n---\n\n## 0. 解析工作台根目录（先做）\n\n```\nworkbenchRoot = listPlugins() 中 id === \"plugin-workbench\" 的 rootPath\n```\n\n若拿不到：用宿主 `plugins.query` list，或面板\u002F会话上下文；失败则 AskUserQuestion 请用户确认 App 已启用系统插件「制作插件」。\n\n| 资源 | 绝对路径 |\n| --- | --- |\n| **插件 CLI（内置）** | `{workbenchRoot}\u002Fagent\u002Fcli\u002Fvetta-plugin-cli.js` |\n| 文档索引（本 skill 附件） | 本 skill 目录 `references\u002Fdoc-index.md` |\n| 实现模板摘要 | 本 skill 目录 `references\u002Ftemplates.md` |\n| 标准脚本 | `{workbenchRoot}\u002Fscripts\u002F*.mjs` |\n\n**手册不在工作台里**，它随 `@vetta-org\u002Fplugin-sdk` 装进**被编辑工程自己的** `node_modules`。\n这是刻意的：那份手册与该工程实际编译的 SDK 版本一致，而随 App 发版的内嵌副本做不到。用内置\nCLI 解析它的位置（工程 `npm install` 之后）：\n\n```bash\nnode \"{workbenchRoot}\u002Fagent\u002Fcli\u002Fvetta-plugin-cli.js\" docs --json\n```\n\n返回 `manualDir`（手册目录绝对路径）、`entry`（README.md）、`sdkVersion`，以及当前命中的插件工程。\n**不要硬编码 node_modules 路径**：工作区可能把依赖提升到上层，一仓多插件时各插件还可能钉不同版本。\n\n---\n\n## 1. 强制读文档（不可跳过）\n\n用 **read 工具**打开文件（绝对路径），不要只 skim 本 skill。\n\n### 1.1 每次创建或大改插件\n\n先用上面的 `docs --json` 拿到 `manualDir`，然后（`{manualDir}` 代指它）：\n\n1. `read {manualDir}\u002FREADME.md` — 能力矩阵与导航  \n2. `read {manualDir}\u002Fgetting-started.md` — 工程结构、MF、构建安装  \n3. `read {manualDir}\u002Fmanifest.md` — plugin.json  \n4. `read {manualDir}\u002Fpermissions.md` — 权限清单  \n\n工程若还没 `npm install`，`docs` 会明确告诉你先装 SDK——那一步本来也绕不过去，构建需要它。\n\n### 1.2 按用户目标追加（实现前）\n\n| 用户意图 | 必读 |\n| --- | --- |\n| 侧栏面板 \u002F 活动 Tab | `ui-slots.md`（activity-tab） |\n| 整页工作区视图 \u002F 接管宿主页头 | `ui-slots.md`（workspace-view + setWorkspaceViewHeader） |\n| 视图要随宿主侧边栏收缩自适应 | `ui-slots.md`（useSidebarState；沉浸式页头尤其需要） |\n| 输入栏按钮 | `ui-slots.md`（input-action） |\n| 新会话页摆素材 \u002F 选完智能体的第一屏 | `ui-slots.md`（new-session-context） |\n| 插件自带人设 \u002F 团队 | `manifest.md`（贡献智能体与团队） |\n| 文件预览 | `ui-slots.md`（file-preview + **notify 错误上报**）+ `styling-and-pitfalls.md`（**面板布局边界**） |\n| 全局弹层 | `ui-slots.md`（global） |\n| 任何可能失败的 IO\u002F解析 | `ui-slots.md`（**notify**）+ `styling-and-pitfalls.md`（错误必须上报） |\n| Agent 工具 \u002F 读写文件 \u002F 对话 | `conversation-and-agent.md` |\n| 消息下方卡片 | `message-cards.md` |\n| 插件自带 MCP | `mcp.md` |\n| 样式 \u002F 布局逃逸 \u002F 不生效 \u002F 缓存 | `styling-and-pitfalls.md`（含**面板类 slot 禁止 viewport fixed**） |\n| 引导词 \u002F 设置项 | `manifest.md` 对应章节 |\n\n### 1.3 实现时\n\n- API 名、权限、scope_use fail-closed、返回值形状 **以手册为准**。  \n- 模板摘要见 `references\u002Ftemplates.md`，但细节冲突时以 `{manualDir}\u002F*` 为准。  \n- 不确定就再 read 对应章节，或 AskUserQuestion。\n\n---\n\n## 2. 前置条件\n\n1. 用户已打开输入栏 **「制作插件」** toggle（硬隔离；关着则 skill\u002Fagent 贡献不可见）。  \n2. 工程在**当前会话 cwd**（或一层子目录），无特殊工场目录。  \n3. 用户插件依赖：`@vetta-org\u002Fplugin-sdk` \u002F `@vetta-org\u002Fplugin-vite` 用 **registry 已发布 semver**（`init` 默认 sdk `^0.3.1` \u002F vite `^0.2.0`，两者版本独立；若 install 失败问用户 registry\u002F版本）。\n4. 构建用 **托管 Node + npm**；标准脚本封装，禁止随意手搓另一套 pack（除非用户明确要求且你已读 getting-started 的打包约定）。\n\n---\n\n## 3. 禁止臆测（必须 AskUserQuestion 或等价确认）\n\n| 项 | 原因 |\n| --- | --- |\n| 插件 `id` | 全局唯一，装后难改 |\n| 展示名 `name` | 用户可见品牌 |\n| `permissions` 列表 | 安全；对照 permissions.md 向用户解释再写入 |\n| 要解决的问题 \u002F MVP 范围 | 避免一次做全家桶 |\n| 是否立即安装到本机 | 构建后是否引导用户在面板点「应用到 Vetta」 |\n| 扩展点类型（用户没说时） | activity-tab \u002F 工具 \u002F 引导词 \u002F 预览 \u002F … |\n\n---\n\n## 4. 端到端流水线\n\n### 4.1 澄清\n\nAskUserQuestion 收齐 §3；对照 README 能力矩阵选定扩展点 → 列出要读的文档章节 → **先 read 再写代码**。\n\n### 4.2 Scaffold\n\n```bash\nnode \"{workbenchRoot}\u002Fagent\u002Fcli\u002Fvetta-plugin-cli.js\" init --id {id} --name \"{name}\" \"{cwd}\u002F{plugin-id}\"\ncd \"{cwd}\u002F{plugin-id}\" && npm install\n```\n\n脚手架同时落一份 `AGENTS.md`（该读哪些手册、不可违反的几条）。**先读它**，它与本 skill 同源。\n\n然后按文档改：\n\n- `plugin.json`：permissions、guidingWords、agent、styles、moduleFederation…（`agent_mode` 已废弃，不要写，见 manifest.md）  \n- `src\u002Findex.tsx`：register* \u002F registerTool 等（遵守 styling 顶层 JSX 规则）  \n- 需要 skill\u002Fprompt 时按 manifest 建目录  \n\n可选：\n\n```bash\nnode \"{workbenchRoot}\u002Fscripts\u002Fcheck-manifest.mjs\" \"{pluginRoot}\"\n```\n\n### 4.3 实现质量检查（自检清单）\n\n对照已读文档确认：\n\n- [ ] 每个用到的 API 都在 `permissions` 里声明  \n- [ ] 会话页 UI \u002F 工具都写了合理的 `scope_use`（fail-closed）  \n- [ ] 工具 description 写清何时调用  \n- [ ] 无 MF 顶层 JSX 陷阱  \n- [ ] **样式：只用 Tailwind className；未手写业务 .css \u002F 未用全局选择器**（`style.css` 仅 theme+utilities 入口，见 styling-and-pitfalls）  \n- [ ] **面板布局：file-preview \u002F activity-tab 内无 `fixed` 贴视口、无超高 z-index、无 portal 到 `document.body`**；面板内浮层用 `relative`+`absolute`；全局浮层用 `registerGlobalSlot`，Toast 用 `notify`（见 styling-and-pitfalls → 面板类 slot 布局边界）  \n- [ ] 用户工程无 `workspace:*`  \n- [ ] i18n：若要宿主渲染中文 label，按手册用 catalog \u002F `%key%`（desktop 用户文案规范）  \n- [ ] **错误可排查：所有可能失败的路径（读文件\u002F解析\u002F网络\u002F外部库）在 catch 里调用 `ctx.ui.notify({ message, error })`**，禁止只写死「失败」文案、丢掉原始 error；`notify` 无需权限，有 `error` 时宿主 Toast 可一键复制堆栈（见 `ui-slots.md` → notify）  \n\n\n### 4.3.5 热更新感知（改已装插件前必查）\n\n改一个**已安装**的插件前，先 `plugins.query` → `get {id}` 看返回项有没有 `devWatch` 字段：\n\n- **`devWatch` 存在（热更新已开启）**：改完工程源码或 `plugin.json` 即结束——vite watch 构建成功后自动重载；dev 会话内新增 permissions\u002Fcommands 也会自动放行。**禁止**再走 4.4\u002F4.5 或 reload。若 `devWatch.status === \"error\"`，提示用户看面板错误或拨一下热更新开关。仅当用户明确要**持久**写入注册表（关热更新\u002F重启后仍生效）时，才用 `workbench_offer_reinstall` 让用户点卡片「重新安装」。\n- **`devWatch` 不存在**：走 4.4→4.5 常规流程（构建打包后引导用户在面板点「应用到 Vetta」）。\n\n### 4.4 构建打包（强制脚本）\n\n```bash\nnode \"{workbenchRoot}\u002Fscripts\u002Fbuild-and-pack.mjs\" \"{pluginRoot}\"\n```\n\n- 默认：patch bump → `npm install` → `npm run build` → `release\u002F{id}-{version}.vettapkg`\n- 解析 stdout JSON：`packagePath`、`id`、`version`\n- 失败：读 stderr，按 getting-started \u002F styling 修；缺依赖或 registry 问题 → AskUserQuestion\n\n### 4.5 安装到本机 Vetta（引导用户在面板点击，不要弹确认）\n\n打包完成后**不要调用** `plugins.manage` 的 `install-from-path`（会弹确认 sheet，工作台流程已废弃此路径）。改为告知用户：\n\n> 打开右侧活动面板「制作插件」→ 对应工程卡片 → 点 **「应用到 Vetta」**（面板安装一次完成授权 + 启用，无确认弹窗）。\n\n- 应用成功后面板会**默认开启「热更新」**：之后你改源码即自动构建+重载（§4.3.5），无需再次应用。用户可手动关掉。  \n- 再次应用（热更新被关掉时）：build-and-pack 后再请用户点「应用到 Vetta」（应用后会重新默认开启热更新）。  \n- 不可覆盖系统插件 id。\n\n### 4.6 改 name \u002F guidingWords\n\n只改 **工程源码** `plugin.json`，再 4.4 → 4.5。禁止改 `~\u002F.vetta\u002Fplugins\u002F...` 已装目录当真相源。\n\n### 4.7 卸载 \u002F 重载 \u002F 重新安装\n\n- `plugins.manage`：`uninstall` \u002F `reload`（系统插件不可卸）。\n- **重新安装**（权限\u002F命令等安装态变更）：工具 `workbench_offer_reinstall` 出消息卡，或面板「重新安装」——**不要** `install-from-path`。\n\n---\n\n## 5. 运维面板\n\nActivity Tab「制作插件」（同样受 toggle 硬隔离）：扫描 cwd、构建、应用、卸载、重载、改 name\u002F引导词。与对话同一规则与同一脚本。\n\n每张工程卡片有 **「热更新」开关（已安装后默认开）**：宿主把插件 dev 链接到工程目录并常驻 `vetta-plugin dev`；React \u002F CSS 走 HMR，其余资源定向重载（无需 bump\u002F重打包\u002F手动 reload）。适合迭代调试。\n\n已安装时还有 **「重新安装」**（与消息卡按钮同路径）：强制 build-and-pack → 把权限\u002F命令**持久写入注册表** → **刷新整个 Vetta 窗口**。日常改代码 \u002F 改 plugin.json 靠热更新即可（dev 会话内权限声明自动放行）；重新安装用于落盘授权或热更新异常时兜底。首次安装仍用「应用到 Vetta」。\n\n---\n\n## 6. 排错\n\n| 现象 | 处理 |\n| --- | --- |\n| Skill\u002F工具不可见 | 是否打开工作台 toggle；系统插件是否启用 |\n| npm install 失败 | registry、网络、sdk 版本；AskUserQuestion |\n| 构建失败 | 读完整错误；对照 getting-started \u002F 依赖版本 |\n| 装上无效果 | permissions 是否授予；scope_use；插件 enabled；reload + version |\n| 反复改 UI 调试 | 已安装工程默认开热更新：保存即自动构建+重载（见 §5）；若被关掉可再打开 |\n| UI 不出现 | ui-slots 权限与 scope_use；activity tab 是否 attach |\n| 样式\u002F缓存怪 | styling-and-pitfalls；bump version |\n| 运行时「失败」但不知原因 | 插件是否 `notify({ message, error })`？让用户右下角 Toast 点「复制堆栈」贴给你；没有则补 notify 后热更新再复现 |\n| 只显示红字无堆栈 | 实现遗漏：catch 必须把原始 `error` 传给 `ctx.ui.notify`（见 §4.3 与 ui-slots notify） |\n\n---\n\n## 7. 边界\n\n- 不发布插件市场、不拖拽式 no-code 搭建  \n- 不保证任意原生\u002FC++ 依赖在托管 Node 下可构建  \n- 细粒度权限仍可在设置页调整  \n- 用户自建插件默认 **不要** 开 hardIsolation（除非用户明确要求模式开关）\n\n---\n\n## 8. 附件\n\n- `references\u002Fdoc-index.md` — 手册路径与阅读表  \n- `references\u002Ftemplates.md` — 常见扩展点代码起点  \n\n**再次强调**：实现前先 `docs --json` 拿到 `manualDir`，再 `read` 其中对应的章节。手册随工程自己的\n`@vetta-org\u002Fplugin-sdk` 发布，因此它描述的合同就是这个工程即将编译的合同。\n","# 制作插件（完整流水线）\n\n面向**不懂开发的用户**：你读规范、写代码、跑标准脚本、装进本机；用户只回答问题与点确认。\n\n**质量底线**：没有读过插件手册就动手写实现 = 禁止。凭记忆编造 SDK API 很容易装上不能用。\n\n---\n\n## 0. 解析工作台根目录（先做）\n\n```\nworkbenchRoot = listPlugins() 中 id === \"plugin-workbench\" 的 rootPath\n```\n\n若拿不到：用宿主 `plugins.query` list，或面板\u002F会话上下文；失败则 AskUserQuestion 请用户确认 App 已启用系统插件「制作插件」。\n\n| 资源 | 绝对路径 |\n| --- | --- |\n| **插件 CLI（内置）** | `{workbenchRoot}\u002Fagent\u002Fcli\u002Fvetta-plugin-cli.js` |\n| 文档索引（本 skill 附件） | 本 skill 目录 `references\u002Fdoc-index.md` |\n| 实现模板摘要 | 本 skill 目录 `references\u002Ftemplates.md` |\n| 标准脚本 | `{workbenchRoot}\u002Fscripts\u002F*.mjs` |\n\n**手册不在工作台里**，它随 `@vetta-org\u002Fplugin-sdk` 装进**被编辑工程自己的** `node_modules`。\n这是刻意的：那份手册与该工程实际编译的 SDK 版本一致，而随 App 发版的内嵌副本做不到。用内置\nCLI 解析它的位置（工程 `npm install` 之后）：\n\n```bash\nnode \"{workbenchRoot}\u002Fagent\u002Fcli\u002Fvetta-plugin-cli.js\" docs --json\n```\n\n返回 `manualDir`（手册目录绝对路径）、`entry`（README.md）、`sdkVersion`，以及当前命中的插件工程。\n**不要硬编码 node_modules 路径**：工作区可能把依赖提升到上层，一仓多插件时各插件还可能钉不同版本。\n\n---\n\n## 1. 强制读文档（不可跳过）\n\n用 **read 工具**打开文件（绝对路径），不要只 skim 本 skill。\n\n### 1.1 每次创建或大改插件\n\n先用上面的 `docs --json` 拿到 `manualDir`，然后（`{manualDir}` 代指它）：\n\n1. `read {manualDir}\u002FREADME.md` — 能力矩阵与导航  \n2. `read {manualDir}\u002Fgetting-started.md` — 工程结构、MF、构建安装  \n3. `read {manualDir}\u002Fmanifest.md` — plugin.json  \n4. `read {manualDir}\u002Fpermissions.md` — 权限清单  \n\n工程若还没 `npm install`，`docs` 会明确告诉你先装 SDK——那一步本来也绕不过去，构建需要它。\n\n### 1.2 按用户目标追加（实现前）\n\n| 用户意图 | 必读 |\n| --- | --- |\n| 侧栏面板 \u002F 活动 Tab | `ui-slots.md`（activity-tab） |\n| 整页工作区视图 \u002F 接管宿主页头 | `ui-slots.md`（workspace-view + setWorkspaceViewHeader） |\n| 视图要随宿主侧边栏收缩自适应 | `ui-slots.md`（useSidebarState；沉浸式页头尤其需要） |\n| 输入栏按钮 | `ui-slots.md`（input-action） |\n| 新会话页摆素材 \u002F 选完智能体的第一屏 | `ui-slots.md`（new-session-context） |\n| 插件自带人设 \u002F 团队 | `manifest.md`（贡献智能体与团队） |\n| 文件预览 | `ui-slots.md`（file-preview + **notify 错误上报**）+ `styling-and-pitfalls.md`（**面板布局边界**） |\n| 全局弹层 | `ui-slots.md`（global） |\n| 任何可能失败的 IO\u002F解析 | `ui-slots.md`（**notify**）+ `styling-and-pitfalls.md`（错误必须上报） |\n| Agent 工具 \u002F 读写文件 \u002F 对话 | `conversation-and-agent.md` |\n| 消息下方卡片 | `message-cards.md` |\n| 插件自带 MCP | `mcp.md` |\n| 样式 \u002F 布局逃逸 \u002F 不生效 \u002F 缓存 | `styling-and-pitfalls.md`（含**面板类 slot 禁止 viewport fixed**） |\n| 引导词 \u002F 设置项 | `manifest.md` 对应章节 |\n\n### 1.3 实现时\n\n- API 名、权限、scope_use fail-closed、返回值形状 **以手册为准**。  \n- 模板摘要见 `references\u002Ftemplates.md`，但细节冲突时以 `{manualDir}\u002F*` 为准。  \n- 不确定就再 read 对应章节，或 AskUserQuestion。\n\n---\n\n## 2. 前置条件\n\n1. 用户已打开输入栏 **「制作插件」** toggle（硬隔离；关着则 skill\u002Fagent 贡献不可见）。  \n2. 工程在**当前会话 cwd**（或一层子目录），无特殊工场目录。  \n3. 用户插件依赖：`@vetta-org\u002Fplugin-sdk` \u002F `@vetta-org\u002Fplugin-vite` 用 **registry 已发布 semver**（`init` 默认 sdk `^0.3.1` \u002F vite `^0.2.0`，两者版本独立；若 install 失败问用户 registry\u002F版本）。\n4. 构建用 **托管 Node + npm**；标准脚本封装，禁止随意手搓另一套 pack（除非用户明确要求且你已读 getting-started 的打包约定）。\n\n---\n\n## 3. 禁止臆测（必须 AskUserQuestion 或等价确认）\n\n| 项 | 原因 |\n| --- | --- |\n| 插件 `id` | 全局唯一，装后难改 |\n| 展示名 `name` | 用户可见品牌 |\n| `permissions` 列表 | 安全；对照 permissions.md 向用户解释再写入 |\n| 要解决的问题 \u002F MVP 范围 | 避免一次做全家桶 |\n| 是否立即安装到本机 | 构建后是否引导用户在面板点「应用到 Vetta」 |\n| 扩展点类型（用户没说时） | activity-tab \u002F 工具 \u002F 引导词 \u002F 预览 \u002F … |\n\n---\n\n## 4. 端到端流水线\n\n### 4.1 澄清\n\nAskUserQuestion 收齐 §3；对照 README 能力矩阵选定扩展点 → 列出要读的文档章节 → **先 read 再写代码**。\n\n### 4.2 Scaffold\n\n```bash\nnode \"{workbenchRoot}\u002Fagent\u002Fcli\u002Fvetta-plugin-cli.js\" init --id {id} --name \"{name}\" \"{cwd}\u002F{plugin-id}\"\ncd \"{cwd}\u002F{plugin-id}\" && npm install\n```\n\n脚手架同时落一份 `AGENTS.md`（该读哪些手册、不可违反的几条）。**先读它**，它与本 skill 同源。\n\n然后按文档改：\n\n- `plugin.json`：permissions、guidingWords、agent、styles、moduleFederation…（`agent_mode` 已废弃，不要写，见 manifest.md）  \n- `src\u002Findex.tsx`：register* \u002F registerTool 等（遵守 styling 顶层 JSX 规则）  \n- 需要 skill\u002Fprompt 时按 manifest 建目录  \n\n可选：\n\n```bash\nnode \"{workbenchRoot}\u002Fscripts\u002Fcheck-manifest.mjs\" \"{pluginRoot}\"\n```\n\n### 4.3 实现质量检查（自检清单）\n\n对照已读文档确认：\n\n- [ ] 每个用到的 API 都在 `permissions` 里声明  \n- [ ] 会话页 UI \u002F 工具都写了合理的 `scope_use`（fail-closed）  \n- [ ] 工具 description 写清何时调用  \n- [ ] 无 MF 顶层 JSX 陷阱  \n- [ ] **样式：只用 Tailwind className；未手写业务 .css \u002F 未用全局选择器**（`style.css` 仅 theme+utilities 入口，见 styling-and-pitfalls）  \n- [ ] **面板布局：file-preview \u002F activity-tab 内无 `fixed` 贴视口、无超高 z-index、无 portal 到 `document.body`**；面板内浮层用 `relative`+`absolute`；全局浮层用 `registerGlobalSlot`，Toast 用 `notify`（见 styling-and-pitfalls → 面板类 slot 布局边界）  \n- [ ] 用户工程无 `workspace:*`  \n- [ ] i18n：若要宿主渲染中文 label，按手册用 catalog \u002F `%key%`（desktop 用户文案规范）  \n- [ ] **错误可排查：所有可能失败的路径（读文件\u002F解析\u002F网络\u002F外部库）在 catch 里调用 `ctx.ui.notify({ message, error })`**，禁止只写死「失败」文案、丢掉原始 error；`notify` 无需权限，有 `error` 时宿主 Toast 可一键复制堆栈（见 `ui-slots.md` → notify）  \n\n\n### 4.3.5 热更新感知（改已装插件前必查）\n\n改一个**已安装**的插件前，先 `plugins.query` → `get {id}` 看返回项有没有 `devWatch` 字段：\n\n- **`devWatch` 存在（热更新已开启）**：改完工程源码或 `plugin.json` 即结束——vite watch 构建成功后自动重载；dev 会话内新增 permissions\u002Fcommands 也会自动放行。**禁止**再走 4.4\u002F4.5 或 reload。若 `devWatch.status === \"error\"`，提示用户看面板错误或拨一下热更新开关。仅当用户明确要**持久**写入注册表（关热更新\u002F重启后仍生效）时，才用 `workbench_offer_reinstall` 让用户点卡片「重新安装」。\n- **`devWatch` 不存在**：走 4.4→4.5 常规流程（构建打包后引导用户在面板点「应用到 Vetta」）。\n\n### 4.4 构建打包（强制脚本）\n\n```bash\nnode \"{workbenchRoot}\u002Fscripts\u002Fbuild-and-pack.mjs\" \"{pluginRoot}\"\n```\n\n- 默认：patch bump → `npm install` → `npm run build` → `release\u002F{id}-{version}.vettapkg`\n- 解析 stdout JSON：`packagePath`、`id`、`version`\n- 失败：读 stderr，按 getting-started \u002F styling 修；缺依赖或 registry 问题 → AskUserQuestion\n\n### 4.5 安装到本机 Vetta（引导用户在面板点击，不要弹确认）\n\n打包完成后**不要调用** `plugins.manage` 的 `install-from-path`（会弹确认 sheet，工作台流程已废弃此路径）。改为告知用户：\n\n> 打开右侧活动面板「制作插件」→ 对应工程卡片 → 点 **「应用到 Vetta」**（面板安装一次完成授权 + 启用，无确认弹窗）。\n\n- 应用成功后面板会**默认开启「热更新」**：之后你改源码即自动构建+重载（§4.3.5），无需再次应用。用户可手动关掉。  \n- 再次应用（热更新被关掉时）：build-and-pack 后再请用户点「应用到 Vetta」（应用后会重新默认开启热更新）。  \n- 不可覆盖系统插件 id。\n\n### 4.6 改 name \u002F guidingWords\n\n只改 **工程源码** `plugin.json`，再 4.4 → 4.5。禁止改 `~\u002F.vetta\u002Fplugins\u002F...` 已装目录当真相源。\n\n### 4.7 卸载 \u002F 重载 \u002F 重新安装\n\n- `plugins.manage`：`uninstall` \u002F `reload`（系统插件不可卸）。\n- **重新安装**（权限\u002F命令等安装态变更）：工具 `workbench_offer_reinstall` 出消息卡，或面板「重新安装」——**不要** `install-from-path`。\n\n---\n\n## 5. 运维面板\n\nActivity Tab「制作插件」（同样受 toggle 硬隔离）：扫描 cwd、构建、应用、卸载、重载、改 name\u002F引导词。与对话同一规则与同一脚本。\n\n每张工程卡片有 **「热更新」开关（已安装后默认开）**：宿主把插件 dev 链接到工程目录并常驻 `vetta-plugin dev`；React \u002F CSS 走 HMR，其余资源定向重载（无需 bump\u002F重打包\u002F手动 reload）。适合迭代调试。\n\n已安装时还有 **「重新安装」**（与消息卡按钮同路径）：强制 build-and-pack → 把权限\u002F命令**持久写入注册表** → **刷新整个 Vetta 窗口**。日常改代码 \u002F 改 plugin.json 靠热更新即可（dev 会话内权限声明自动放行）；重新安装用于落盘授权或热更新异常时兜底。首次安装仍用「应用到 Vetta」。\n\n---\n\n## 6. 排错\n\n| 现象 | 处理 |\n| --- | --- |\n| Skill\u002F工具不可见 | 是否打开工作台 toggle；系统插件是否启用 |\n| npm install 失败 | registry、网络、sdk 版本；AskUserQuestion |\n| 构建失败 | 读完整错误；对照 getting-started \u002F 依赖版本 |\n| 装上无效果 | permissions 是否授予；scope_use；插件 enabled；reload + version |\n| 反复改 UI 调试 | 已安装工程默认开热更新：保存即自动构建+重载（见 §5）；若被关掉可再打开 |\n| UI 不出现 | ui-slots 权限与 scope_use；activity tab 是否 attach |\n| 样式\u002F缓存怪 | styling-and-pitfalls；bump version |\n| 运行时「失败」但不知原因 | 插件是否 `notify({ message, error })`？让用户右下角 Toast 点「复制堆栈」贴给你；没有则补 notify 后热更新再复现 |\n| 只显示红字无堆栈 | 实现遗漏：catch 必须把原始 `error` 传给 `ctx.ui.notify`（见 §4.3 与 ui-slots notify） |\n\n---\n\n## 7. 边界\n\n- 不发布插件市场、不拖拽式 no-code 搭建  \n- 不保证任意原生\u002FC++ 依赖在托管 Node 下可构建  \n- 细粒度权限仍可在设置页调整  \n- 用户自建插件默认 **不要** 开 hardIsolation（除非用户明确要求模式开关）\n\n---\n\n## 8. 附件\n\n- `references\u002Fdoc-index.md` — 手册路径与阅读表  \n- `references\u002Ftemplates.md` — 常见扩展点代码起点  \n\n**再次强调**：实现前先 `docs --json` 拿到 `manualDir`，再 `read` 其中对应的章节。手册随工程自己的\n`@vetta-org\u002Fplugin-sdk` 发布，因此它描述的合同就是这个工程即将编译的合同。\n",{"name":5,"description":7},"main","a4aeb31ba1b80e809bf4ddc0406287429275e34e","packages\u002Fplugins\u002Fpresets\u002Fplugin-workbench\u002Fagent\u002Fskills\u002Fplugin-workbench",50,"https:\u002F\u002Fgithub.com\u002Fopenvetta\u002Fopen-vetta","https:\u002F\u002Fwww.openvetta.com","https:\u002F\u002Fgithub.com\u002Fopenvetta","Open-source, local-first AI agent for coding and real work.","2026-11-14 00:11:40",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add openvetta\u002Fopen-vetta --skill plugin-workbench",{"tool":39,"command":40},"bunx","bunx skills add openvetta\u002Fopen-vetta --skill plugin-workbench",{"tool":42,"command":43},"pnpm","pnpm dlx skills add openvetta\u002Fopen-vetta --skill plugin-workbench","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fopenvetta\u002Fopen-vetta\u002Fblob\u002Fmain\u002Fpackages\u002Fplugins\u002Fpresets\u002Fplugin-workbench\u002Fagent\u002Fskills\u002Fplugin-workbench\u002FSKILL.md",true,[47,53],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"references\u002Fdoc-index.md","REFERENCE","参考文档",3745,"https:\u002F\u002Fgithub.com\u002Fopenvetta\u002Fopen-vetta\u002Fblob\u002Fmain\u002Fpackages\u002Fplugins\u002Fpresets\u002Fplugin-workbench\u002Fagent\u002Fskills\u002Fplugin-workbench\u002Freferences\u002Fdoc-index.md",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Ftemplates.md",6817,"https:\u002F\u002Fgithub.com\u002Fopenvetta\u002Fopen-vetta\u002Fblob\u002Fmain\u002Fpackages\u002Fplugins\u002Fpresets\u002Fplugin-workbench\u002Fagent\u002Fskills\u002Fplugin-workbench\u002Freferences\u002Ftemplates.md",[58,65,72,79,86,93],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7A1CADNDSES6MRAARA1WXMB","publish-ability","Publish a skill, MCP server, plugin, or bundle to the Vetta ability marketplace. Use when the user asks to upload\u002Fpublish\u002Fsubmit an ability, put a plugin on the marketplace, share a skill with other users, or migrate an existing package into Vetta.","https:\u002F\u002Fgithub.com\u002Fopenvetta\u002Fopen-vetta\u002Fblob\u002Fmain\u002Fpackages\u002Fskill-presets\u002Fpublish-ability\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7A1C5VD4NEZHMZMCXF8J47M","install-ability","在本机 Vetta 中安装能力——插件（plugin）、Skill 与 MCP 服务器。用户说「装一个插件 \u002F install plugin \u002F 从能力市场安装 \u002F 加一个 MCP server \u002F 配置 MCP \u002F 装个 skill」，或插件装完没生效、需要 reload、pending 版本没应用时使用。不用于安装 npm 依赖、IDE 插件、浏览器扩展，也不用于开发插件（那是 plugin-workbench）或创作 Skill（那是 create-skill）。","https:\u002F\u002Fgithub.com\u002Fopenvetta\u002Fopen-vetta\u002Fblob\u002Fmain\u002Fpackages\u002Fskill-presets\u002Finstall-ability\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7A1C0414EPE2EWRD5B26HWC","create-skill","Create or update Vetta-compatible Agent Skills. Use when the user asks to create a skill, add a SKILL.md workflow, register a skill in skills-manifest.json, package a skill in a Vetta plugin, or add a built-in Vetta skill preset.","https:\u002F\u002Fgithub.com\u002Fopenvetta\u002Fopen-vetta\u002Fblob\u002Fmain\u002Fpackages\u002Fskill-presets\u002Fcreate-skill\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7A1BNBJ5XJKWND9XFJKP0FX","vetta-ui-design","Build and edit design documents (.vetd) on the Vetta design canvas — app screens, landing pages, slides, posters, infographics. Use when the user asks for a UI design, mockup, screen, deck, or poster, or attaches a design frame\u002Felement from the canvas. Frames are real React (TSX) routes, not pictures. Do NOT use for ordinary front-end work in the user's own codebase — building, styling or reworking pages of a real app is that repo's job, and none of the vetd_* tools or canvas rules here apply to it.","https:\u002F\u002Fgithub.com\u002Fopenvetta\u002Fopen-vetta\u002Fblob\u002Fmain\u002Fpackages\u002Fplugins\u002Fpresets\u002Fvetta-ui-design\u002Fagent\u002Fskills\u002Fvetta-ui-design\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7A1BFJSH10EZFJ4J56M8E2Z","remotion-video","Create, modify, and render Remotion React video projects in the current Vetta conversation workspace. Use for requests to make programmatic videos, motion graphics, animated explainers, social videos, data videos, or to edit an existing Remotion composition and export it as MP4.","https:\u002F\u002Fgithub.com\u002Fopenvetta\u002Fopen-vetta\u002Fblob\u002Fmain\u002Fpackages\u002Fplugins\u002Fpresets\u002Fremotion-renderer\u002Fagent\u002Fskills\u002Fremotion-video\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M7A1B1FB6NZQZ2G3YVR5DHPR","review-content-quality","Evaluate generated images and videos against their creative brief, delivery requirements, continuity rules, and technical quality, then propose the smallest evidence-based repair. Use when the user asks whether an output is good, requests critique or selection among variants, reports weak or broken media, or before expanding an approved direction into more assets.","https:\u002F\u002Fgithub.com\u002Fopenvetta\u002Fopen-vetta\u002Fblob\u002Fmain\u002Fpackages\u002Fplugins\u002Fpresets\u002Fcontent-creation\u002Fagent\u002Fskills\u002Freview-content-quality\u002FSKILL.md",[],[]]