AnothetLoice/dsh-hotplug-engine
面向DSH的插件安装、回滚与审计服务。
项目介绍Project Overview
dsh-hotplug-engine 是 DSH 的插件管理服务插件,把安装、卸载、启停、回滚、健康确认与审计封装为服务、REST 与 hotplug_* 工具,供市场、agent 或宿主插件调用。它只改 cordis.patch.yml 并调用 pnpm/CLI,不重写 loader 或 HMR。适合需要自动化插件生命周期且由调用方提供安装 spec 的场景;注意它不是市场,无目录搜索,bundle 默认禁用项无法启停。
dsh-hotplug-engine is a DSH service plugin for plugin lifecycle management. It exposes install, uninstall, enable/disable, rollback, health checks, and audit logs through a service, REST API, and hotplug_* tools for marketplaces, agents, or host plugins. It edits cordis.patch.yml and invokes pnpm or the official CLI without rewriting loader or HMR. Use it when callers supply install specs and need automated plugin operations. It is not a marketplace: no catalog, search, or recommendations, and bundle-default-disabled entries cannot be toggled.
请帮我了解并安装插件:【dsh-hotplug-engine】【https://github.com/AnothetLoice/dsh-hotplug-engine】
把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.
或使用命令行安装(适合开发者)Or use CLI install (for developers)
命令行安装CLI Install
dsh plugin --profile web add github:AnothetLoice/dsh-hotplug-engine
把 AnothetLoice/dsh-hotplug-engine 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-hotplug-engine
给 DSH 做插件管理的服务插件。市场、agent、其他插件都能调用:安装、卸载、启停、回滚、审计,一条链路。
做什么
DSH 用 cordis.patch.yml 和 loader 管理插件。这个插件把这套操作包成服务:改 patch、调 pnpm、装后健康确认、失败自动回滚、全程审计。只动文件和命令,不碰内核。
不做什么
- 不是市场:没有目录、搜索、榜单、推荐。
spec(装什么、从哪装)由调用方给,引擎不猜。 - 不改官方机制:HMR、loader、patch 语义都是官方的,只消费,不重写。
- 不另存状态:以官方组合树为唯一真源,引擎只投影和差分。
- 不带安装界面:UI 只有最小管理面板(查看、启停、回滚、审计),没有 spec 输入。
接入方式
| 场景 | 入口 |
|---|---|
| 市场 / 插件管理界面 | 注入 hotplugEngine 服务,或调 REST |
| agent 会话 | hotplug_* 工具 |
| 宿主插件 | 注入 hotplugEngine |
安装
pnpm --dir <profile-dir> add dsh-hotplug-engine
# 或 dsh plugin add dsh-hotplug-engine
bundle 包:装/卸后重启 profile;新客户端面板刷新页面加载。
启停
- 引擎改 profile 的
cordis.patch.yml,loader 反射后即时生效(mode:'hot');未反射则提示重启。 - patch 行(用户写的或引擎写的)都能启停,流式/块式 YAML 都能改。
- DSH 默认禁用的行(在 bundle 层,没有引擎可改的 patch 行)改不了:UI 显示 🔒「默认禁用」,点击只浮提示,API 返回
HOTPLUG.PATCH.DEFAULT_DISABLED。
DSH 版本
- 目标
0.1.1-rc.2(current),带版本支持矩阵(supportReport())。 dshPath显式配置才走官方dsh pluginCLI,否则 pnpm 直装。0.1.0-rc.6为 legacy,不再作为验收目标。
上手
- 宿主注入:
inject: ['hotplugEngine'],调ctx.hotplugEngine的install/rollback/enable等方法,Promise resolve 即操作完成。 - REST:前缀
/api/dsh-hotplug,同源。写:install/uninstall/enable/disable/rollback;读:snapshot/status/audit/operations/events(SSE)。 - 工具:
hotplug_status/hotplug_install/hotplug_uninstall/hotplug_toggle/hotplug_rollback/hotplug_audit,写工具走审批。
完整契约见 docs/01-contract.md。
Changelog
0.2.0
- 补 DSH
0.1.1-rc.2支持。 DshProfileAdapter:显式dshPath才走官方dsh plugin,否则 pnpm 回退。- patch 写层结构化,流式/块式行都能启停;webServer 就绪后自动挂 REST。
- 新增 DSH 默认禁用门禁:UI 🔒 徽标 + 内联提示,API 返回
HOTPLUG.PATCH.DEFAULT_DISABLED。 - 客户端面板卡片化(紧凑 + 折叠),深浅色自适应。
License
MIT
nexu-io/open-design
freestylefly/awesome-gpt-image-2
anywhere-labs/dsh-desktop
walkinglabs/learn-harness-engineering
awesome-dsh-plugin/awesome-dsh-plugin
MemTensor/MemOS