跳到主内容

plugin-registry 使用指南

在 DSH Web 设置页嵌入「插件管理」面板与 4 个 agent 工具,按官方机制统一管理 profile 插件安装态:bundle 层栈与 insert 行启停、版本检查、增删查。

本文为派生内容(基于 wiki / faq / compatibility_json 自动组装),非 AI 即时创作。

本文由本站基于该插件已收录的字段自动派生(wiki / faq / compatibility_json / readme),非 AI 即时创作。每节末尾标源字段。

快速上手

plugin-registry

— 源: plugin_wiki.wiki_content

安装与验证

dsh plugin --profile web add github:vlln/plugin-registry

复制以上命令在 DSH Web Profile 内运行。安装完成后在「插件列表」启用即可。

— 源: plugins.install

关键要点

— 源: plugin_wiki.readme_zh (fallback readme_raw)

常见问题

装好之后在 DSH Web 的哪里能看到管理面板?

装好后刷新 Web 页面,进入设置页会多出一个名为「插件管理」的 tab(Panel.tsx:300 头部 / src/client/index.ts:54 label),与官方「插件」tab 并列但独立存在,避免重名冲突。

非 bundle 插件安装完为什么不需要重启 DSH?

面板走的是 profile cordis.patch.yml 的 insert 行写入;DSH 0811 起 profile-boot 挂载 watch-only HMR 实例,写行/删行实时生效(packages/plugin/console/README.md:29 / src/index.ts:94-145)。

bundle 插件为什么装完还要重启 web?

bundle 插件装在 profile package.json 的 dependencies + dsh.profile.bundles 层栈里,层栈在启动时合成,运行时不能热插拔(packages/plugin/console/README.md:73 / src/index.ts:340-380)。

agent 怎么用这套安装机制?需要切到面板吗?

不必。Node half 同时注册 4 个 defineTool 工具(plugin_search / plugin_install / plugin_uninstall / plugin_status),与面板写同一份安装态(src/discovery/tools.ts:98-335 / packages/plugin/console/README.md:48-58)。

面板显示的「运行中 / 预设挂载 / 已停用」三态怎么区分?

运行中 = host 启用;预设挂载 = host 停用但 agent preset 仍挂载(0811 模型面工具走 preset 通道,停用 host 不等于工具消失);已停用 = 完全停用(src/client/Panel.tsx:98-102 / src/index.ts:501-531)。

能不能在面板里把这个管理工具自身停用或卸载?

不能。Node half 在 toggle/remove 路由里硬性禁止对 @dsh-external/plugin-console 操作,返回 409(src/index.ts:752-754 / src/index.ts:826-829)——避免管理入口自毁。

安装失败时提示「pnpm add succeeded but X is not in the profile dependencies」是什么意思?

通常是 git 源或路径源未真正落盘(pnpm 退出 0 但依赖未写入 package.json),不会继续写安装态以免假成功;改用明确包名或确认 git/路径可达后重试(src/index.ts:720-724 / src/discovery/tools.ts:196-199)。

插件有新版本时怎么更新?

面板点「检查更新」按钮触发 Node half 用原生 fetch 查 npm registry 6h 缓存(30 秒最小间隔防抖),bundle 露出「更新」按钮,点后走 pnpm update(重启生效);git/link 包标记为「本地」无 latest(src/versions.ts:36-47 / src/client/Panel.tsx:208-226)。

— 源: plugin_wiki.faq_json

兼容性

  • DSH: ^0.1.0-rc.5(peerDependencies 中 @deepseek-ai/dsh-tools ^0.1.0-rc.5 表明适配 0811 后的 DSH Web,含 webServer/loader/tools/agentPresets 四个 inject 服务;0811 起官方移除 repository-plugins 机制后才有此设计)
  • Node: 未在 packages/plugin/console/package.json 声明 engines.node(仅 devDependencies @types/node ^22.0.0;建议 Node ≥ 22,对齐 DSH 0811 host 要求)

— 源: plugin_wiki.compatibility_json

踩坑提醒

安装前请审阅上游仓库;本指南基于已收录字段自动派生,可能滞后于最新版本。如发现与官方文档冲突,请以上游为准。

— 来源:通用规则