dsh-plugin-manager
by Jesse-njx
`dsh pm` 插件管理器:多源搜索(awesome 列表 + GitHub + npm)、按 profile 安装/移除/更新,以及 doctor 审计(清单、bundle patch、版本漂移)。
The `dsh pm` plugin manager: multi-source search (awesome list + GitHub + npm), install/remove/update per profile, and a doctor audit of manifests, bundle patches, and version drift.
安装
dsh plugin --profile web add github:Jesse-njx/dsh-plugin-manager#path:/packages/cliGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
dsh pm 是 DeepSeek Harness 的命令组,围绕官方
dsh plugin 流程补齐「发现 → 安装 → 管理」闭环:在 awesome 列表 / GitHub topic / npm keyword 中搜索,
一行命令从 npm 或 GitHub 安装,按 profile 查看已装内容,检查更新,并用 doctor 做全面审计。
它刻意是官方安装机制之上的薄而诚实的一层:绝不手改 profile 的 cordis.yml,而是通过 installer
驱动 dsh plugin --profile <p> add|remove,并把自有的侧带状态(一个纯 JSON 文件)记录下来,从而能够
列表、更新与审计 —— 官方流程若变化,只需改一个适配层,而不是四个包。
dsh pm search memory → 发现
dsh pm install dsh-memory → 安装到配置的 profiles
dsh pm list → pm 装了什么,按 profile 展示
dsh pm update dsh-memory → 有新版就重装
dsh pm doctor → 审计 manifest、patch、来源、版本漂移
安装
本包就是 pm 命令组本身,把它装进你运行 dsh pm … 的 profile:
dsh plugin --profile default add @dsh-pm/cli # npm(发布后)
dsh plugin --profile default add github:Jesse-njx/dsh-plugin-manager # 或直接来自 monorepo
然后调用:
dsh --profile default pm search memory
dsh --profile default pm install dsh-memory
bundle patch 同时把 pm 注册为 Web UI 斜杠命令(/pm search memory),聊天输入框里也能用。
配置
配置块就是 PmConfig(规范 §5.1),由导出的 schemastery schema(Config)校验。所有字段都有默认值,
下面展示的是文档化取值:
# 在 profile 的 cordis.patch.yml 中
- id: dsh-plugin-manager
config:
registry:
awesomeUrl: https://raw.githubusercontent.com/社区精选目录/社区精选目录/main/README.md
npmKeyword: dsh
profiles: [default] # install 的目标 profiles
stateFile: ~/.dsh/pm/plugins.json
gitInstall: { depth: 1, build: true }
| 字段 | 默认值 | 含义 |
|---|---|---|
registry.awesomeUrl |
社区精选目录 README 地址 | 发现源 1 |
registry.npmKeyword |
dsh |
npm 关键词搜索词 |
profiles |
['default'] |
install 的目标 profiles |
stateFile |
~/.dsh/pm/plugins.json |
pm 自己的侧带状态 |
gitInstall.depth / build |
1 / true |
GitHub 引用时传给 installer |
命令
| 命令 | 行为 |
|---|---|
dsh pm search <q> |
在合并后的注册表中搜索;输出 name、source、stars、category、description 表格 |
dsh pm install <name> |
解析并安装到配置的 profiles;打印结果行 |
dsh pm remove <name> |
从状态中提到的每个 profile 卸载 |
dsh pm list |
按 profile 分组显示状态行:版本、来源、是否启用、最近检查时间 |
dsh pm update [name|all] |
检查最新版(npm dist-tag 或 GitHub HEAD);有新版本则重装 |
dsh pm doctor |
只读审计;存在 error 级别发现时以非零码退出 |
Doctor
dsh pm doctor 审计每个已安装插件:
- (a) manifest 仍能解析(
ManifestParser), - (b) 其
dsh.bundle.patch文件在磁盘上可解析, - (c) 其 repo/npm 来源仍可访问,
- (d) 版本漂移(已装 vs 最新),
- (e) 跨 profile 的重复 / 冲突条目,
- (f) profile 中存在但不在状态库里的未托管插件,
- (g) 注册表整体可达性。
Doctor 只读:输出 ok / warn / error 发现并附一行修复提示,告诉你该执行哪条 dsh pm 命令 ——
它从不自行修复。
工作原理
dsh pm install <name>
→ @dsh-pm/installer 解析来源(npm / github / registry)
→ run seam 调用: dsh plugin --profile <p> add <ref>
→ @dsh-pm/core StateStore 记录该行(原子 temp+rename JSON)
dsh pm list
→ installer.list() 读取状态库
@dsh-pm/cli 是唯一同时引入三个兄弟包(core、registry、installer)的包;它按规范 §5 冻结的
跨包类型契约把它们接起来。
开发
pnpm install
pnpm --filter @dsh-pm/cli build # tsc → lib/
pnpm --filter @dsh-pm/cli typecheck # tsc --noEmit(src + 测试)
pnpm --filter @dsh-pm/cli test # node --test test/*.test.ts
单元测试覆盖:在真实 Cordis ctx.commands 上的命令注册(register/dispose 恢复初始表面)、输出渲染
golden、以及基于假 store + registry 的 doctor 退出码行为。跨包真实流程(真 installer + 真 dsh CLI,
针对临时 DSH_HOME)放在 integration-test 包中。
License
MIT
原始 README: https://github.com/Jesse-njx/dsh-plugin-manager/blob/main/packages/cli/README.zh.md ↗
同类插件
查看全部 →
awesome-dsh-plugins
前部索引仓库(Radar):自动扫描发现的所有 dsh 插件候选;经测试合格的将移入后序精选目录仓库

DSH-Plugins-Marketplace
DSH插件市场 / DSH Plugin Marketplace: 在 DeepSeek Harness Web GUI 中一键浏览、安装与更新 GitHub topic:dsh-plugin 的全部插件 | browse, install & update all GitHub dsh-plugin plugins in the DSH Web GUI

zat-dsh-engine
DeepSeek Harness视觉插件市场——浏览、搜索和安装社区插件

dsh-market
装在 DSH 里的插件市场:设置页内逛/搜全部社区插件,按分类筛选,确认后一键安装,已装插件一目了然。

dsh-plugin-marketplace
DeepSeek Harness认证插件市场及自主注册库

deepseek-plugin-store
DeepSeek Harness 独立社区插件商店:发现、安装并提交经过验证的插件、工具与扩展。 | Independent community plugin directory.