deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Viveksssss/DeepSeek-harness-marketplace
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
一个为 DeepSeek Harness (DSH) 打造的插件生态入口
在「设置 → 插件」里直接浏览、预览、一键安装 GitHub 上的 DSH 插件, 启用列表持久化保存,重启不丢失。
dsh-plugin-marketplace 是一个 DSH web 端插件,它在 DSH 的网页版「设置 → 插件」区域新增了一个
「插件市场」 标签页。
你可以像逛应用商店一样:
topic:dsh-plugin 标签的仓库;它本身是「DSH 的插件」,同时又是「DSH 插件的安装器」——是一个典型的生态入口(bootstrap)。
| 特性 | 说明 |
|---|---|
| 🔎 GitHub 搜索 | 按 topic:dsh-plugin / topic:dsh-theme / topic:dsh-skill 等关键词检索,按星标排序 |
| 📄 仓库预览 | 拉取仓库描述、星标、fork 数、语言、许可证、topics 与 README(自动截断) |
| ⚡ 一键启用 | 底层调用 dsh plugin --profile <name> add github:owner/repo,复用官方安装流程 |
| 🛡️ 安装校验 | 装完后验证插件包入口文件是否存在,缺失则自动回滚,避免弄坏 profile 下次无法启动 |
| 💾 持久化启用列表 | 写入 ~/.dsh/plugin-marketplace.json,重启不丢失 |
| 🎨 深度契合主题 | 全部样式使用 DSW 设计令牌(--dsw-alias-*),自动适配明暗主题 |
| 🚦 友好反馈 | 区分错误 / 警告 / 提示三态,网络异常、GitHub 限流都有清晰提示 |
DSH Web UI(设置 → 插件 → 插件市场)
│ fetch POST /marketplace/*
▼
后端 handler(lib/index.js,通过 ctx.webServer.register 挂载)
│
├── /marketplace/browse → GitHub Search API 搜仓库
├── /marketplace/import → GitHub Repos API 拉单个仓库 + README
├── /marketplace/enable → 调 dsh plugin add github:owner/repo(pnpm 转发)
├── /marketplace/disable → 调 dsh plugin remove <pkg>
└── /marketplace/enabled → 读/写 ~/.dsh/plugin-marketplace.json
│
▼
dsh plugin(官方 CLI)→ 转发给 pnpm → reconcilePlugins → 写入 profile 的 bundles 层栈
关键点:本插件 不重新发明安装逻辑,而是完全复用 DSH 官方的
dsh plugin命令(它本质是 pnpm 转发器 + bundle 调和器), 只负责「搜索、预览、持久化、安装后校验与回滚」这些官方 CLI 没有的 UI 能力。
dsh CLI 可用)dsh plugin 内部依赖 pnpm)api.github.com)把这个仓库作为一个插件安装进你的 web profile:
dsh plugin --profile web add github:Viveksssss/DeepSeek-harness-marketplace
然后用 dsh web 启动:
dsh web
打开网页版 → 进入 设置 → 插件,就能看到新增的 「插件市场」 标签页。🎉
装好插件市场之后,日常管理插件就再也不用记命令了:
dsh web现在就进入了插件市场,包含三个子页面:
搜索框:默认值是 topic:dsh-plugin,输入任意 GitHub 搜索关键词后回车或点「搜索」。
快捷标签(chips):一键切换热门搜索词:
| 快捷词 | 用途 |
|---|---|
topic:dsh-plugin |
搜索打上 dsh-plugin 标签的插件 |
topic:dsh-theme |
搜索 DSH 主题 |
topic:dsh-skill |
搜索 DSH 技能 |
deepseek-harness |
搜索含该关键词的仓库 |
结果卡片:每个仓库显示 —— 名称(可点开 GitHub)、星标数、描述、语言、许可证、topics, 以及一个 「启用 / 已启用 · 停用」 按钮。
分页:列表底部有「上一页 / 第 N 页 / 下一页」,每次最多 30 个结果。
用于精确安装某个已知仓库(浏览搜索不到时很实用)。
在输入框中填入仓库地址,支持以下任意格式:
deepseek-ai/deepseek-harness # owner/repo
https://github.com/owner/repo # 完整 URL
https://github.com/owner/repo/tree/main # 带路径的 URL
git@github.com:owner/repo.git # SSH 形式(会被归一化)
点 「导入并预览」 后,卡片会显示:
展示所有已启用(且已持久化)的插件。
~/.dsh/plugin-marketplace.json。插件市场本质上是对官方 CLI 的封装,你也可以完全脱离 UI 使用官方命令:
# 安装(推荐 github: 协议,git 依赖会执行 prepare 脚本)
dsh plugin --profile web add github:Viveksssss/DeepSeek-harness-marketplace
# 卸载
dsh plugin --profile web remove <pkg-name>
# 查看已安装
dsh plugin --profile web list
# 升级
dsh plugin --profile web update
⚠️ 注意:DSH / pnpm 不识别
@owner:repo这种写法(那是 npx 的语法)。 请使用github:owner/repo或owner/repo。
一个 GitHub 仓库要能作为 DSH 插件被本市场(以及 dsh plugin)正确安装,需要同时具备两个条件:
dsh.bundle(作为 profile bundle 层被加载)package.json 里声明 dsh.bundle.patch,指向仓库根目录的 cordis.patch.yml:
{
"name": "dsh-plugin-marketplace",
"dsh": {
// 关键:声明自己是 bundle,reconcilePlugins 会据此把它加进 dsh.profile.bundles
"bundle": {
"patch": "./cordis.patch.yml"
}
}
}
仓库根目录同时需要一个 cordis.patch.yml,把自己 insert 进 Loader 的 entries
(name 必须是 package.json 的包名;id 全局唯一):
- insert:
- id: plugin-marketplace
name: dsh-plugin-marketplace
inject: [webServer, subprocess] # 仅当 host 半需要这些服务时才写
⚠️ 没有
dsh.bundle声明,dsh plugin add会把它当普通依赖安装(不加入 bundle 层), 并打印declares no dsh.bundle警告;没有cordis.patch.yml里的 entry,则不会被 Loader 加载。两者缺一不可。
dsh.client(作为浏览器插件被扫描)如果插件有前端 UI,再声明 dsh.client:
{
"dsh": {
"bundle": { "patch": "./cordis.patch.yml" },
"client": {
"inject": ["@deepseek-ai/dsh-client-runtime"],
"platform": "web"
}
},
"exports": {
".": "./lib/index.js", // host 半(后端,提供 /marketplace 路由)
"./client": "./lib/client.js" // browser 半(前端,slot 注入 UI)
}
}
client-modules扫描ctx.loader.entries(),对每个包读dsh.client,校验platform === "web"且存在exports["./client"],然后 serve/plugins/<id>/client.js。
这是最常见的坑——很多 git 仓库不提交 lib/ 构建产物,安装时又没跑 prepare/build,
导致装上后却无法启动。
build 脚本改成(或加上)prepare,因为 pnpm 安装 git 依赖时会执行 prepare。本市场在启用插件时会对入口文件做校验,缺失会自动回滚并给出具体报错, 避免污染 profile 导致下次
dsh web启动失败。
插件市场会把启用状态写入:
~/.dsh/plugin-marketplace.json
结构大致如下(DSH_HOME 环境变量可自定义 DSH 主目录):
{
"version": 1,
"updatedAt": "2025-08-15T12:00:00.000Z",
"enabled": [
{
"full": "owner/repo",
"owner": "owner",
"name": "repo",
"description": "...",
"htmlUrl": "https://github.com/owner/repo",
"stars": 123,
"pkgName": "实际的 npm 包名",
"enabledAt": "2025-08-15T12:00:00.000Z"
}
]
}
pkgName,用真实的 npm 包名来卸载
(因为 git 依赖装进 profile 后,dependencies 里写的是 npm 名,不是 owner/repo);这是最典型的问题:仓库没提交构建产物(lib/),安装时也没生成。请
联系插件作者,让其要么提交构建产物,要么把 build 改为 prepare。
本市场已自动回滚,未污染你的 profile。
GitHub API 对匿名请求有速率上限(约 60 次/小时)。稍等一段时间再试,或为本机 配置一个 GitHub token 提升额度(本市场当前版本暂未内置 token 注入,后续可扩展)。
不会。状态文件只是市场用于「记住启用了哪些、卸载时用什么 npm 名」的索引。
真正的插件本体在 profile 的 node_modules 里,由 DSH 官方机制管理。
dsh plugin add github:... 走 git + pnpm,网络慢或 prepare 脚本
未在 pnpm-workspace.yaml 的 allowBuilds 白名单里时可能失败,此时 CLI 会打印
具体需要放行的 key。platform 声明为 web,客户端注入的是
@deepseek-ai/dsh-client-runtime,TUI 等其它 profile 不适用。# 克隆
git clone https://github.com/Viveksssss/DeepSeek-harness-marketplace.git
cd dsh-plugin-marketplace
# 本项目无独立构建步骤(源码即产物,lib/ 已提交)
# 以 git 依赖方式装进本地 profile 调试:
dsh plugin --profile web add github:Viveksssss/DeepSeek-harness-marketplace
# 或者用本地路径:
dsh plugin --profile web add link:$(pwd)
.
├── package.json # 包清单:dsh.bundle(bundle 层)+ dsh.client(浏览器插件)声明
├── cordis.patch.yml # bundle 补丁:把自己 insert 进 Loader entries
├── LICENSE # MIT
└── lib
├── index.js # host 半:/marketplace HTTP 路由 + dsh plugin 调用 + 校验/回滚
└── client.js # browser 半:设置页 UI(React + DSW 设计令牌)
MIT © 2025
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: dsh-skill。