dsh-plugin-market
DSH 插件市场:把 GitHub 的 dsh-plugin 话题直接装进设置界面,不用再翻 GitHub。
它能做什么
- 实时同步:列表直接来自 GitHub
dsh-plugin话题的搜索接口,动态更新,支持话题内搜索、按 Star(默认)/ 最近更新 / 相关度排序、分页。 - 只看可安装:勾选后服务端跨搜索结果页扫描,跳过非 bundle 仓库,直接给出满页的可安装插件。
- 每张卡片讲清楚:面向谁(
audience)、解决什么问题(problem)两个字段,优先用当前配置的模型对仓库 README + 描述做批量精读,模型不可用时回退到基于描述与话题的启发式判断。 - 一眼看出能否装:只有声明了
dsh.bundle.patch、且包名合法的仓库才标记为可装载;其余显示原因(缺 package.json / 缺 name / 非 bundle / private)。 - 一键安装:
pnpm add github:<owner>/<repo>写入当前 profile,并把包名追加进该 profile 的dsh.profile.bundles,重启 dsh 后生效。
安装
第 1 步:安装 DSH 本体
插件依赖 DSH (DeepSeek Harness)。如果终端执行 dsh -V 提示 command not found,说明还没装:
npm install -g @deepseek-ai/dsh
装好后确认一下:
dsh -V
第 2 步:下载插件到 web profile
dsh plugin --profile web add github:newbieYi/dsh-plugin-market
这一步只是把包下载进 ~/.dsh/profiles/web/node_modules,插件还不会生效,必须继续第 3 步。
第 3 步:在 bundles 中登记插件
打开 ~/.dsh/profiles/web/package.json,在 dsh.profile.bundles 数组末尾加一行 "dsh-plugin-market":
{
"dsh": {
"profile": {
"bundles": [
"@deepseek-ai/dsh-base",
"@deepseek-ai/dsh-web-app",
"dsh-plugin-market"
]
}
}
}
注意 JSON 语法:新增行的前一行末尾要补英文逗号。数组里原有的条目保持不动。
第 4 步:重启 DSH
插件在启动时装载,改完配置必须重启才生效。请正常退出,不要用 kill -9,否则会话数据可能来不及落盘:
- 切到正在运行
dsh web的那个终端窗口,按Ctrl + C等它自己退出; - 重新启动:
dsh web
如果找不到原来的终端窗口,可以先查一下进程再正常终止:
lsof -ti :3080 | xargs kill
第 5 步:验证
浏览器打开 DSH Web,进入 设置 → Plugins → 插件市场,应该能看到插件列表。
之后从市场里安装其它插件,前面这三步(下载、登记 bundles、重启)都由市场自动完成,包括一键重启。
常见问题
装完在设置里找不到「插件市场」?
九成是漏了第 3 步,或者没重启。先检查 ~/.dsh/profiles/web/package.json 的 bundles 里有没有 "dsh-plugin-market"。
需要登录 GitHub 账号吗? 不需要。搜索、读取仓库信息、安装全程匿名,不用填账号密码或 token。代价是匿名搜索接口每分钟只有 10 次配额,点太快会提示稍后重试。
市场里搜不到某个插件?
只能列出公开仓库、且打了 dsh-plugin 话题的项目。私有仓库匿名读不到,不会出现在列表里。
配置
在 profile 的 cordis.patch.yml 里可选配置:
- insert:
- id: plugin-market
name: dsh-plugin-market
config:
# 安装写入的 profile 目录。留空则自动寻找 bundles 中包含本包的 profile,
# 找不到再回退到 $DSH_HOME/profiles/web。
profileDir: ''
安全说明
- GitHub 匿名搜索接口每分钟 10 次、按 IP 限流;超出时页面会提示稍后再试。
- 所有
/plugin-market/*路由都挂在每进程随机的 Bearer Token 之后,Token 注入 index.html,本页面才能调用;安装动作发生在当前 profile 目录内。
目录结构
lib/index.js—— 宿主侧:GitHub 话题代理、卡片标注(模型 + 启发式)、安装。lib/client.js—— 浏览器侧:插件市场设置页,ModuleLoader 工厂格式,无需打包器。cordis.patch.yml—— 本包的 bundle patch 行。
No comments yet. Be the first to write one.