@noob-stupid/dsh-plugin-console
Framework-upgrade safety and plugin gating for DSH: a pre-upgrade session-format contract preflight that adapts incompatible plugins and agent presets before you upgrade, automatic rollback on failure, auto-quarantine of plugins that broke a boot, plus environment fingerprinting and a public contrac
Install
dsh plugin --profile web add @noob-stupid/dsh-plugin-console
Sandbox test results
| Stage | Result |
|---|---|
| 1 install | ✓ |
| 2 list | ✓ |
| 3 mount | — |
| 4 boot | — |
Four stages run in an isolated sandbox: install (network on) → list → mount → boot (last three with no network).
README
<sub>同时支持 <b>Web</b> 与 <b>Desktop</b> 两种形态。</sub>
English: [README.md](README.md) | 中文: [README.zh.md](README.zh.md)
DSH 插件门控中心(dsh-plugin-gating-hub)
原名 dsh-plugin-hub,已改名;旧链接 301 跳转有效。
DSH 的框架升级安全 + 插件升级门控。 升级失败自动回滚。别的通道改了框架也照样守门。
宿主带不动的插件版本直接拒绝,不会装上。








 


安装(npm,一行)
dsh plugin --profile web add @noob-stupid/dsh-plugin-console
然后重启 dsh 服务 → 刷新页面 → 设置 → 插件 → 插件控制台。
三条最硬的能力
- 🛡️ 升级前契约预检 → 回滚点 → 失败自动回滚。 先跑数据化的契约预检(消息契约 /
依赖 API / 配置 schema / 被删 API / 装载器契约),再做配置备份 + 全树回滚点;
安装或拉起失败即全树自动回滚,升级成功后还有「回滚到上一版」按钮,
新框架带不动的插件自动禁用 —— 版本校验防假成功,15 分钟硬超时 + 卡死检测。
- 👁️ 别的更新通道改了框架,也守门。 环境指纹能发现官方桌面端更新器或手动
pnpm
造成的框架变更:变化即自动跑一次只读预检,且有确证证据才禁用某行
(包确证解析不到 / file:// 目标确实不存在 / 启动失败日志点名);@deepseek-ai/*(框架自带)
与受保护 / 核心行永不禁用,每次自动禁用都留一条可读的恢复命令。
- 🔒 插件安装与升级门控。 版本/声明门控(
dsh.engines.framework/engines.dsh/
@deepseek-ai/* 范围,内置零依赖 semver)+ 源码通道的体积门禁 + 非 registry 来源的
显式处理(只有在 registry 真能解析到该版本时才写回裸版本号,否则物化成 link:);
安装脚本绝不自动放行,pnpm 的供应链闸绝不绕过。
<img width="1170" height="609" alt="DSH 插件门控中心" src="https://github.com/user-attachments/assets/b802d606-14ba-4151-9956-ff642ed12b0a" />
上层还带一个发现层:内置多源插件市场与自定义索引(500+ 插件 / 300+ 技能,零 GitHub API 调用)——
而且每一条源都能换成你自己的:安装源(含内网私有 registry)、搜索源(URL 模板 + 请求头)、
索引源(内网自建索引)、Git 源(含 file:// 本地裸仓库),纯内网 / 断网也能装插件。
为什么是 DSH 插件门控中心
- 🛡️ 一键框架升级,失败自动回滚 — 备份配置 + 升级前全树 checkpoint(回滚点)→ 在线安装
(服务不中断、页面不断开)→ 版本校验 → 自动重启生效;安装失败自动全树回滚,
版本校验防假成功,15 分钟硬超时 + 卡死检测——框架绝不处于损坏状态。
→ [详见](docs/upgrade-safety-adapt-gate.zh.md)
- ↩️ 升级后一键回滚到上一版 — 升级成功后框架卡片保留「回滚到上一版」:停服 → 全树恢复 →
自动拉起 → 健康检测,全程状态可见。
- 🚫 旧插件不适配自动禁用 — 适配门把新框架加载不了的插件强制禁用(启用按钮锁定,
服务端 /toggle 直接 409、无法绕过);「检测更新 → 更新并适配」自动校验后解锁。
- 🔒 插件升级门控 — 按
dsh.engines.framework/engines.dsh声明与@deepseek-ai/*
依赖范围(内置零依赖 semver 判定器)判定插件版本能否在本宿主运行,
避免框架升级把插件悄悄带下线。
- 🧩 内置发现层:多源插件市场 — GitHub / Gitee / 自定义源,外加静态索引(按 star 收录
dsh-plugin 仓库 500+)与技能 tab(最多 300);浏览、搜索、一键安装,
零 GitHub API 调用(CDN 分发,秒开零限流)。
每条源都能换成你自己的 —— 内网私有 npm registry、自定义搜索源(URL 模板 + 请求头)、
内网自建索引源、Git 源(含 file:// 本地裸仓库),纯内网 / 断网环境照样浏览与安装。
- 🤖 AI 赋能 — 输入 npm 包名或 GitHub 仓库,本地 AI 读文档生成部署计划
(安装/写配置/启动服务/健康检查),你确认后安全执行;服务器组件自动生成控制卡片。
→ [详见](docs/ai-empower.zh.md)
一键部署
# npm 发布版(推荐:预构建产物,无需 git / 构建授权) dsh plugin --profile web add @noob-stupid/dsh-plugin-console # 或直接装 GitHub 源码(需 git,首次需 allowBuilds 授权) dsh plugin --profile web add github:Noob-stupid/dsh-plugin-gating-hub
然后重启 dsh 服务 → 刷新页面 → 设置 → 插件 → 插件控制台。
<details><summary><b>更多部署方式</b>(部署脚本 / 一句话交给 AI)</summary>
方式二:部署脚本(网络受限时的兜底)
Windows(PowerShell):
git clone https://github.com/Noob-stupid/dsh-plugin-gating-hub "$env:TEMP\dsh-plugin-console" 2>$null; & "$env:TEMP\dsh-plugin-console\deploy.ps1"
Linux / macOS:
git clone https://github.com/Noob-stupid/dsh-plugin-gating-hub /tmp/dsh-plugin-console 2>/dev/null; bash /tmp/dsh-plugin-console/deploy.sh
脚本会做两件事:把插件包拷进 $DSH_HOME/profiles/<profile>/node_modules/,
并在 cordis.patch.yml 幂等追加启用条目。完成后:
1. 重启 dsh 服务(宿主代码变更需要重启进程;命令行方式重启进程,桌面客户端退出重开);
2. 刷新页面 → 设置 → 插件 → 插件管理。
方式三:一句话交给 AI
安装 DSH 插件中心(dsh-plugin-hub):运行dsh plugin --profile web add @noob-stupid/dsh-plugin-console(npm 发布版);若没有 dsh CLI,则克隆 https://github.com/Noob-stupid/dsh-plugin-gating-hub 到~/.dsh/profiles/web/node_modules/,在cordis.patch.yml注册(id: plugin-console,name: @noob-stupid/dsh-plugin-console)。完成后重启 dsh web。
要求:DSH ≥ 0.1.0-rc.6(web profile,含 dsh-client-modules / dsh-host-plugin-inventory)。
</details>
核心优势
· 优势 · 说明
🤖 · AI 赋能 · 输入 npm 包名 / GitHub
…(truncated)
Rendered from the README published on npm. Formatted only, not edited.
Versions
Published on npm::124,最后更新 2026-11-04