dsh-publish-plugin
by liulei237136
一条流程把 DeepSeek Harness 插件包发布到 npm + GitHub(始终双平台):/publish-dsh-plugin 命令与配套工具
Publish a DeepSeek Harness plugin bundle to npm + GitHub (always both platforms) in one flow — the /publish-dsh-plugin command (human-driven in the Web GUI / TUI) and the…
安装
dsh plugin --profile web add github:liulei237136/dsh-publish-pluginGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
English | 简体中文
把 DeepSeek Harness 插件一键发布到 npm + GitHub(双平台必发)的 DSH 插件:/publish-dsh-plugin 命令(人在 Web GUI / TUI 里直接操作)+ publish_plugin 工具(模型驱动)。两者共享同一个发布域,且都是 fail-closed:没有显式确认绝不执行。
安装
# 从 npm(推荐——已发布的包)
dsh plugin --profile web add dsh-publish-plugin
# 或从 git
dsh plugin --profile web add github:liulei237136/dsh-publish-plugin
安装后 /publish-dsh-plugin 命令与 publish_plugin 工具同时可用(组合里有命令注册表时命令才注册,有工具注册表时工具才注册)。
命令面用法
① /publish-dsh-plugin → 发现当前会话目录(及向上/直接子目录)的插件候选
② /publish-dsh-plugin <插件名> → 校验 manifest + 冲突检查 + 动作汇总
③ /publish-dsh-plugin <插件名> yes → 执行(npm publish + GitHub 建仓/推送 + tag + topic)
- 不带
yes永远只汇总不执行(fail-closed); - 版本冲突(npm 上该版本已存在)时报错提示提升版本;包名/仓库已存在视为升级发布(发新版本、推已有仓库);
- 执行前会再查一遍冲突。
工具面用法
对模型说"把这个插件发了"即可。模型调用 publish_plugin(参数 plugin_path 可选,默认当前会话目录),工具校验后展示动作汇总并经 ctx.approval 请求一次性确认——只有 allowed-once 才执行。发布完成后结果回到模型,可继续验证安装、写 CHANGELOG、处理失败。
前置条件
- Node.js + npm(发布机器)
ghCLI 已安装并登录(gh auth login;gh 在 host 启动之后安装的需要重启 host——PATH 是启动时快照)- npm 发布认证——npm 现在要求 2FA 或 bypass token(具体命令见下方 Troubleshooting):
- 在 npm 账号上启用 2FA(
auth-only模式即可,发布不需要 OTP);或 - 创建带 Bypass 2FA 的 Granular Access Token 并配置为认证 token
- 在 npm 账号上启用 2FA(
Troubleshooting(踩坑记录)
| 症状 | 原因与解决 |
|---|---|
npm error 403 Forbidden - PUT ... - Two-factor authentication or granular access token with bypass 2fa enabled is required to publish packages |
npm 要求启用 2FA 才能发布。在账号启用 2FA(npm profile enable-2fa auth-only,发布无需每次 OTP),或在 https://www.npmjs.com/settings/<你的账号>/tokens 创建带 Bypass 2FA 的 Granular Access Token,然后 npm config set //registry.npmjs.org/:_authToken=<token> |
npm error ENEEDAUTH: need auth ... You need to authorize this machine using npm adduser |
未登录:执行 npm login,或设置 NPM_TOKEN(环境变量;新设环境变量需要重启 host) |
GitHub 仓库:gh 未登录(检查失败) |
执行 gh auth login;如果 gh 是在 host 启动之后安装的,需要重启 host(PATH 是启动时快照) |
| 命令/工具不可见,或改动不生效 | bundle 层不热重载(只有用户 profile 的 cordis.patch.yml 热重载)。安装或修改 bundle 后请重启 web profile |
从 git 安装时 pnpm 拦截 prepare |
pnpm ≥10 需要在 profile 的 pnpm-workspace.yaml 放行构建脚本(pnpm 会打印具体 key,dsh plugin 也有提示) |
说明
- 发布是同步等待子进程(npm publish / gh 可能耗时较长),期间 UI 等待结果,可用取消信号中断;Windows 上取消信号只终止 npm/gh 的 cmd 包装进程,其子进程可能残留,必要时手动清理;
- 部分失败会明确报告"已完成哪些步骤",剩余步骤需手动收尾(例如 npm 已发布但 GitHub 失败);
- 发布前会先做 git 预检(脏工作树 / remote 不匹配直接拒绝),因此这类失败不会产生任何副作用——插件绝不改 remote、绝不自动提交;
- 工具面在无
ctx.approval的组合中拒绝执行(fail-closed); - 发布后给出的安装命令使用
--profile web,因为dsh plugin必须指定 profile;读者按自己的 profile(如tui)替换即可。
维护者请看 CONTRIBUTING.md(本地开发、测试与自举发布流程),固定决策与实现说明在 docs/design.md。
原始 README: https://github.com/liulei237136/dsh-publish-plugin/blob/master/README.zh.md ↗
同类插件
查看全部 →
dsh-anchored-standard
两阶段 DeepSeek Harness 预设:先 Minimal 对齐的 bootstrap,再切完整 Standard 工具(Project2 98/99)

PicGo-Core
极致的图片上传引擎,CLI 与 API 双支持

awesome-deepseek-harness
DeepSeek Harness(DSH)及其优秀社区插件的精选指南。

awesome-deepseek-harness
DeepSeek Harness (DSH)生态系统:来自dsh-external/hub和公共dsh-plugin主题的精选插件、工具和基础设施。

AI-Novel-Writer
本地优先 AI 小说创作工作台,提供 Windows/macOS 桌面版与 DeepSeek Harness 插件开发预览,支持角色、大纲、章节蓝图、审稿修稿和本地模型。

mcp-for-stata
MCP-for-Stata:把 Stata 集成进你的 agent