dsh-deploy-master
A DSH deploy-assistant plugin: GitHub publish + Linear sync + npm publish + community announcement.
- Stars
- 0
- Language
- TypeScript
- Created
- Aug 30, 2026
- Updated
- Aug 30, 2026
Introduction
dsh-deploy-master
一个 DeepSeek Harness (DSH) 插件:把「本地项目发布到 GitHub + 同步 Linear + 发布 npm 参与社区」这一整套流程自动化。它是一个 host 侧 tool 插件(像 dsh-master),通过注册工具 + 注入工作流提示词,让对话 agent 变成部署助手。
核心功能
- GitHub 自动发布 ——
dsh_deploy_github:对本地项目执行git init/commit/push、用 GitHub API 创建仓库、设置 topics、打 tag、发 release。 - 同步 Linear ——
dsh_deploy_linear:创建需求 issue 或更新进度 issue(状态/优先级/描述)。 - 可配置 / 运行时询问 —— 所有 key 和仓库名既可在
cordis.yml配置,也可在对话中由 agent 向用户询问后作为参数传入;缺失时工具会返回提示。 - 发布到 npm + 加入社区 ——
dsh_deploy_npm执行npm publish,并默认带上dsh-plugin/deepseek-harness/dshtopics,参与 deepseek-harness 社区与 dsh-plugin topic。 - 社区公告 ——
dsh_deploy_announce在社区仓库的 GitHub Discussions 里发布插件公告(默认 deepseek-harness 的 "Show Your Plugins!" 分类)。
安装
dsh plugin --profile web add dsh-deploy-master
# 或源码 checkout:pnpm dsh plugin --profile web add dsh-deploy-master
然后重启 dsh。
配置(cordis.yml 或 profile 的 patch 层)
- id: dsh-deploy-master
config:
githubToken: ghp_xxxx # GitHub PAT(repo + workflow 权限)
githubOwner: your-username # token 所属用户名
npmToken: npm_xxxx # npm granular token(publish + bypass-2FA)
linearApiKey: lin_api_xxxx # Linear API key
linearTeamKey: OLY # Linear team key
topics: [dsh-plugin, deepseek-harness, dsh]
gitCommand: [git]
discussionOwner: deepseek-ai # 公告发布到的社区仓库 owner
discussionRepo: deepseek-harness # 公告发布到的社区仓库名
discussionCategory: "Show Your Plugins!" # 公告发布到的讨论分类
injectWorkflowPrompt: true
所有字段都可留空——留空时 dsh_deploy_check 会报告缺失,工作流提示词会引导 agent 在对话里向用户索取,并以参数传入工具(每次调用可覆盖配置)。
注册的工具
| 工具 | 作用 |
|---|---|
dsh_deploy_check | 查看配置状态(哪些 key 已填/缺失) |
dsh_deploy_github | 本地项目 → GitHub(建仓/推送/topics/tag/release) |
dsh_deploy_linear | 同步需求/进度到 Linear(创建/更新 issue) |
dsh_deploy_npm | npm publish |
dsh_deploy_announce | 在社区 Discussions 发布插件公告 |
dsh_deploy_help | 能力与工作流说明 |
使用
直接在对话里说,例如:
帮我把当前项目发布到 GitHub(仓库名 dsh-github-sidebar、公开),同步需求到 Linear,并发布到 npm。
agent 会先 dsh_deploy_check 看配置,缺什么(token/仓库名/可见性等)会先问你,确认后再依次执行 GitHub → Linear → npm。
安全说明
- token 都通过 Config 或工具参数传递;
dsh_deploy_npm用NODE_AUTH_TOKEN注入,不写入磁盘。 dsh_deploy_github推送时用https://<owner>:<token>@github.com/...一次性 URL,不把 token 写进.git/config。- 建议使用具有最小权限的专用 token,并在完成后轮换。
项目结构
src/
├── index.ts # 插件入口:工具注册 + 工作流提示词注入
├── config.ts # Config schema + 配置状态检查
├── github.ts # GitHub API + git CLI 封装
├── linear.ts # Linear GraphQL 封装
├── npm.ts # npm publish 封装
├── announce.ts # GitHub Discussions 公告发布封装
└── prompts.ts # 工作流提示词