dshm — plugin marketplace for deepseek-harness: search, install, uninstall, and categorize plugins


License
MIT
Install
npm install dshm-cli@0.7.3

Documentation

dsh-plugin-marketplace

deepseek-harness(DSH)的插件市场:搜索、分类、安装、卸载插件。dshm CLI(npm 包 dshm)+ registry 服务(packages/server,SQLite/MySQL 双后端)已交付;后台管理 Web 界面规划中(见 docs/architecture.md)。

快速接入请直接读 docs/usage.md(使用指南:五分钟跑通 + 命令速查 + 场景手册 + 故障排查)。

快速开始

npm 包名为 dshm-clidshm/dsh-plugin-marketplace 均被占用或被 npm 相似名策略拒绝;命令名仍为 dshm):

npm i -g dshm-cli      # 装完即得 dshm 命令
dshm doctor
dshm search cordis
dshm install tool-cordis --profile web

源码方式:

pnpm install && pnpm build
pnpm dshm doctor        # 检查 dsh / pnpm / $DSH_HOME / registry
pnpm dshm search cordis
pnpm dshm install tool-cordis --profile web
pnpm dshm uninstall tool-cordis --profile web

开发期别名:pnpm dshm <命令>(tsx 直跑源码)。

工作原理

  • 插件来源三种共存(registry 判别式 source.type):npm(包名+版本)、git(公有/私有仓库,支持 ref 与 subdir)、path(本地包目录或单文件)。
  • 安装委托 dsh plugin --profile P add <spec>:npm/git/包目录统一走 pnpm spec;声明了 dsh.bundle.patch 的包自动进入 bundle 层。单文件插件复制进 $DSH_HOME/profiles/P/dshm/<id>/,并在 profile 的 cordis.patch.yml 里追加带 marker 的托管块(绝不整体重写用户文件)。
  • 热生效:运行中的 dsh 会监听 profile 的 cordis.patch.yml,安装/卸载无需重启。
  • 多 registrydshm registry add <name> --file <path> | --url <url>;插件以 registry:id 命名空间区分。
  • 一插件多分类categories 为数组,搜索按 OR 过滤。
  • 私有 git:ssh 形式零配置走本机密钥;https 形式用 ~/.dshm/config.yaml 里 per-host token(凭证永不写入 registry 数据)。

目录

packages/core    @dshm/core   领域核心:registry 模型/搜索/安装编排(进程与文件操作在 Runner 接口之后)
packages/cli     @dshm/cli    dshm 命令行
registry/default              内置种子 registry(由 scripts/seed-from-harness.ts 生成,勿手改)
docs/                         架构、registry 格式、开发指南

开发

pnpm test        # vitest(39 用例)
pnpm lint        # oxlint
pnpm typecheck   # tsc --noEmit
pnpm build       # tsup → lib/
pnpm seed        # 重新扫描本地 harness checkout 生成种子 registry

CI(GitHub Actions)按 lint → typecheck → test → build 执行(Node 22/24 矩阵)。

安全注意

插件是任意 TypeScript/JavaScript 代码;git 源安装会执行包的构建脚本(pnpm allowBuilds 门槛即为此设计,dshm 会显式询问)。只安装信任来源的插件;registry 的 verified/author/license 元数据会随安装摘要展示。