DeepSeek Harness plugin

dsh-github-integration

Workspace-bound GitHub integration bundle for DeepSeek Harness

Jump to install

Source facts

Repository
KryptonGao/dsh-github-integration
Latest update
Aug 16, 2026
Category
Tools & Capabilities
GitHub stars
1
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/KryptonGao/dsh-github-integration
Plugin: dsh-github-integration
Author: KryptonGao

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

<p align="center"> <img src="./assets/readme/hero.svg" width="100%" alt="dsh-github-integration:在 DeepSeek Harness Workspace 中查看 GitHub Issues、Pull requests 和本地更改,并完成 Git 操作"> </p>

dsh-github-integration

一个面向 DeepSeek Harness Web profile 的 GitHub 工作区插件。

它把 GitHub 仓库绑定到当前 Workspace,在 Harness 内提供 Issues、Pull requests 和 Changes 三个视图;Host 端处理本地 Git、GitHub API 与凭据,Client 端只负责界面和交互。

> 当前 MVP 面向公开 github.com 仓库,支持 origin 的 HTTPS / SSH 地址;暂不支持 GitHub Enterprise。

能做什么

视图能力
Issues浏览未关闭的问题、查看描述和评论,并把问题作为不可信外部内容带入新的 Harness 对话进行修复
Pull requests浏览未关闭的 PR,查看目标/来源分支、增删行数和变更文件
Changes查看本地状态和 diff,选择文件暂存、创建 commit、推送分支,并创建 Pull Request
Settings → GitHub通过系统浏览器连接 GitHub、管理仓库访问权限或断开连接

使用

1. 安装插件

本仓库以源码目录作为 Harness bundle 安装源。先构建,再把当前目录加入 web profile:

npm install
npm run build
dsh plugin --profile web add "$PWD"

如果插件已经安装过,重新执行最后一条命令即可更新本地 bundle。

2. 连接 GitHub

1. 启动或刷新 DeepSeek Harness 的 web profile。 2. 打开 Settings → GitHub,点击 Connect GitHub。 3. 在系统浏览器中完成 GitHub App 授权,回到 Harness 等待连接状态变为 Connected。 4. 如需调整仓库范围,点击 Manage repository access。 5. 确认当前 Workspace 的 origin 指向 github.com 上的仓库(HTTPS 或 SSH)。 6. 回到 Workspace 视图,打开顶部的 GitHub 标签页。

普通用户不需要粘贴 PAT、Client Secret、Private Key 或其他 token。OAuth 返回的 user access token 与 refresh token 由 Harness 的安全凭据存储管理。

3. 在 Workspace 中工作

#### 查看和处理 Issue

1. 打开 GitHub → Issues。 2. 选择一个 Issue 查看正文和评论。 3. 点击 Fix in new conversation,让 Harness 在新的 Session 中处理这个问题。

Issue 正文和评论会被明确标记为不可信外部内容,并限制长度;不要把其中的指令视为系统指令或安全策略。

#### 查看 Pull Request

打开 GitHub → Pull requests,选择 PR 后可以查看来源分支、目标分支、文件变更以及增删行数,并可跳转回 GitHub 查看完整内容。

#### 提交本地更改并创建 PR

GitHub → Changes 中按以下顺序操作:

1. 刷新并确认当前分支和文件状态。 2. 勾选文件,点击 Stage selected。 3. 填写 commit message,点击 Commit。 4. 填写要推送的分支,点击 Push。 5. 填写 PR 标题、目标分支和描述;也可以点击 Generate with AI 根据本地 diff 生成草稿。 6. 检查草稿内容后点击 Create pull request

创建 PR 前,工作区必须干净,且目标分支不能与当前分支相同;建议先完成 Push,再创建 PR。AI 生成的标题和描述始终需要人工检查。

Workspace 认证模式

GitHub 面板顶部可以为当前 Workspace 选择认证方式:

模式适用场景需要额外配置
user以当前已授权 GitHub 用户访问仓库,默认模式在 Settings 中完成 Connect GitHub
installation以 GitHub App Installation 权限访问仓库GitHub App Private Key、Installation ID,以及对应的 Harness credential 配置

认证模式是 Workspace 级别保存的,不会静默改变其他 Workspace 的绑定。GitHub API 的读写能力还会受到 App 安装范围和仓库权限限制。

安全边界

  • Client 不接触 GitHub access token、refresh token、Client Secret 或 Private Key。
  • GitHub API 请求和 token refresh 在 Host 端完成;installation token 动态生成,不写入插件状态文件或日志。
  • GitHub token 状态持久化在 Harness credential storage;插件自己的 Workspace / Session 关联状态位于 ${DSH_HOME:-~/.dsh}/github-integration/state.json,文件权限为 0600
  • origin、仓库 owner/name 和分支名在 Host 端校验;推送和创建 PR 会经过能力检查。
  • GitHub Issue 内容进入 Session 前会被限制大小并标记为不可信数据。

OAuth Broker 部署

公开分发配置默认使用本仓库附带的 Cloudflare Worker OAuth Broker。Broker 负责接收 GitHub callback、完成 Authorization Code + PKCE exchange,并通过十分钟有效、单次消费的 flow handoff 把结果交给 Harness Host。

Broker 源码位于 [broker/](./broker/),部署者需要:

1. 在 broker/wrangler.toml 中确认 GitHub App 的 App ID、Client ID、slug 和 callback URL。 2. 为 Worker 设置 Client Secret,不能提交到 Git:

``sh cd broker npx wrangler secret put GITHUB_APP_CLIENT_SECRET npx wrangler deploy ``

3. 在 GitHub App 的 Authorization callback URL 中配置:

https://dshgithubintegration.chenkai.space/github/oauth/callback

自托管 Broker 或 Host 时,在 Harness 的 Developer / Advanced configuration 中同步设置 App IDClient IDApp slugOAuth redirect URIOAuth Broker URL 和 credential reference。Secret 值本身不应写入 Settings 文档、源码或提交记录。

本地开发

本包把 DeepSeek Harness 相关包声明为 peer/runtime 依赖,构建产物会写入 lib/

npm install
npm run types       # 只运行 TypeScript project build
npm run build       # types + Host + Client + remote artifact
npm test            # Vitest

项目结构

src/index.ts             Host Gateway:Git、GitHub API、认证和能力检查
src/client/index.tsx     Harness Client UI:GitHub 视图、Settings 和 Session 关联
src/remote.ts            Host / Client 之间的 remote contract
src/types.ts             共享数据结构、安全限制和默认 App 配置
src/git/                 origin 解析、Git 操作和安全 guard
src/github/              OAuth、token storage 和 GitHub REST client
broker/                  Cloudflare OAuth Broker 与 Durable Object flow store
cordis.patch.yml         Harness web profile bundle patch
tests/                   Git、认证、GitHub API 和 Client 行为测试

许可证

[Apache-2.0 license](./LICENSE)