Back to home

xiyue718

dsh-ui-plugin-manager

No description

Stars
0
Language
TypeScript
Created
Aug 17, 2026
Updated
Aug 17, 2026

Introduction

@dsh-external/ui-plugin-manager

在 DSH Web 客户端的“设置 → 插件”页面中新增“插件管理”导航标签,用于管理所有已安装的、非系统自带的第三方插件。

功能

  • 查看第三方插件列表:
    • 插件模块名
    • Loader Entry ID
    • 版本
    • 作者
    • 启用/禁用状态
    • 当前 Fiber 状态
  • 启用 / 禁用插件:通过 Loader 动态更新,立即生效,无需重启。
  • 卸载插件:从当前 Loader 运行时移除。
  • 搜索:按插件名称、Entry ID、作者筛选。
  • 操作反馈:操作完成后自动刷新列表,并显示成功或失败提示。

与系统插件的关系

  • 只列出并管理第三方插件。
  • @deepseek-ai/*cordis:*deepseek-harness/packages/*deepseek-harness/vendor/* 等系统内置条目会被过滤,不会出现在列表中,也不会被误操作。

安全说明

  • 卸载操作会弹出确认框。
  • 卸载使用 ctx.loader.remove(entryId),从当前运行实例移除该插件。
  • 如果插件是通过超级模组注入器注入的,重启后可能由超级模组自动恢复;如需永久卸载,请使用 dev_uninject_plugin
  • 本插件没有提供配置表单入口;需要配置的插件仍可继续使用原“配置”标签页。

Host API

GET /@dsh-external/ui-plugin-manager/api/plugins
POST /@dsh-external/ui-plugin-manager/api/toggle
Content-Type: application/json

{ "entryId": "xxx", "enabled": false }
POST /@dsh-external/ui-plugin-manager/api/uninstall
Content-Type: application/json

{ "entryId": "xxx" }

安装到其他 DSH 客户端

方式一:超级模组注入器(推荐)

dev_build_plugin  {"dir": "C:/Users/<user>/.dsh/plugins/ui-plugin-manager"}
dev_inject_plugin {"dir": "C:/Users/<user>/.dsh/plugins/ui-plugin-manager"}

然后打开/刷新 DSH Web,进入 设置 → 插件 → 插件管理

方式二:本地 bundle 装配

dev_install_package {
  "dir": "C:/Users/<user>/.dsh/plugins/ui-plugin-manager",
  "profile": "web"
}

方式三:手动 bundle 配置

将插件目录放入目标 DSH 可解析位置,在 profile 的 package.json 中声明依赖和 bundles 条目,然后重启 DSH Web。

使用步骤

  1. 打开 DSH Web 设置。
  2. 进入“插件”页面。
  3. 切换到“插件管理”标签。
  4. 查看第三方插件列表。
  5. 点击“启用/禁用”切换状态,或点击“卸载”移除插件。
  6. 列表会自动刷新并显示操作结果。

构建产物

  • host:lib/index.js
  • client:lib/client.js
  • 打包文件:dsh-external-ui-plugin-manager-0.0.1.tgz