前言¶
DSH(DeepSeek Harness)的理念是「一切皆插件」。对于开发者而言,完成一个本地项目的发布通常涉及多个步骤:创建 GitHub 仓库、提交代码、同步需求进度到 Linear、发布到 npm 以及在社区发布公告。这些操作分散且繁琐,容易遗漏环节。
dsh-deploy-master 是一个 DSH 部署助手插件,旨在将「本地项目发布到 GitHub + 同步 Linear + 发布 npm + 加入社区」这一整套流程自动化。它作为 host 侧 tool 插件运行,通过注册工具和注入工作流提示词,让对话 agent 变成部署助手。
核心功能¶
该插件提供了以下核心能力:
- GitHub 自动发布:通过
dsh_deploy_github工具,执行git init/commit/push,调用 GitHub API 创建仓库、设置 topics、打 tag 并发布 release。 - 同步 Linear:通过
dsh_deploy_linear工具,在 Linear 中创建需求 issue 或更新进度 issue(状态、优先级、描述)。 - 可配置 / 运行时询问:所有配置项既可在
cordis.yml中设置,也支持在对话中由 agent 向用户询问后作为参数传入。缺失配置时,工具会返回提示。 - 发布到 npm + 加入社区:通过
dsh_deploy_npm执行npm publish,并自动带上dsh-plugin/deepseek-harness/dshtopics,参与 deepseek-harness 社区与 dsh-plugin topic。 - 社区公告:通过
dsh_deploy_announce工具,在社区仓库的 GitHub Discussions 里发布插件公告(默认分类为 “Show Your Plugins!”)。
安装与启用¶
在终端执行以下命令安装插件:
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 传递:所有 token 均通过 Config 或工具参数传递,不写入磁盘。
dsh_deploy_npm使用NODE_AUTH_TOKEN环境变量注入。 - GitHub 推送:
dsh_deploy_github推送时使用https://<owner>:<token>@github.com/...的一次性 URL,不会将 token 写入.git/config。 - 权限建议:建议使用具有最小权限的专用 token,并在完成后轮换。
适用场景与注意¶
该插件适用于需要快速将本地代码标准化发布到 GitHub、管理 Linear 需求进度并接入 DSH 社区的开发者。
注意事项:
* 插件以当前 dsh 进程的权限运行,安装前建议检查源码与许可证(MIT)。
* 生态背景:DSH 社区目录(SkillHub)与 DeepSeek / 幻方无官方从属关系。
总结¶
dsh-deploy-master 通过工具注入和工作流引导,将分散的发布动作整合为一个自然语言指令。对于习惯使用 DSH 进行开发调试的用户,这一插件能有效降低部署和社区维护的门槛。