为内置 github-copilot 通道提供 GitHub Copilot 登录,支持 github.com 或 GitHub Enterprise 主机:设置页带 GitHub host 字段,OAuth 设备码登录,凭据存入 Harness 凭据库。
安装
# npm 包(预构建)
dsh plugin --profile web add dsh-copilot-bridge
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:leilengma/dsh-copilot-bridge
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
GitHub Copilot sign-in for DeepSeek Harness, on github.com or a GitHub Enterprise host such as https://<company>.ghe.com/.
It provides a Settings page and commands for sign-in, with a GitHub host field: you enter your Enterprise URL, click Save, and the plugin writes it to the profile's configuration file.
The plugin only handles sign-in. It runs the OAuth device flow against the configured host and stores the long-lived credential in the Harness credential store under llm-pi-ai / github-copilot, together with enterpriseUrl when a host is set. The built-in github-copilot model route reads that record, refreshes short-lived Copilot tokens from api.<host>, and lists the models available to your account.
Install
Use the dsh CLI that ships with the desktop app:
alias dsh="'/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh'"
dsh plugin --profile desktop add github:leilengma/dsh-copilot-bridge
Restart the app.
Use
- Open Settings → GitHub Copilot.
- Under GitHub host, enter your Enterprise URL (for example
https://octocorp.ghe.com/) and click Save. The input shows the saved value as its placeholder. Use github.com clears it. - Click Sign in to GitHub Copilot, open the device page (
https://<host>/login/device) and enter the code shown. - In Settings → Models, add or select the
github-copilotprovider. Leave its API key blank. The card shows a notice that no API key is needed and that you only need to click Apply. If you are not signed in yet, the notice tells you to sign in first.
The /copilot-login, /copilot-status and /copilot-logout commands work on chat surfaces too.
If you change the host while signed in, the page tells you that the stored credential belongs to the other host. Sign out and sign in again to switch.
Configuration
Save writes the value to the profile's own patch file, ~/.dsh/profiles/<profile>/cordis.patch.yml:
- id: copilot-bridge
config:
enterpriseUrl: https://octocorp.ghe.com/
You can also edit that file by hand. A blank value or github.com means github.com. The field accepts a full URL or a bare host, and only the hostname is used.
Development
Requires Node 24 or newer.
npm ci
npm run check # tsc --noEmit, esbuild bundle to lib/, node --test (type-stripped .ts)
src/host/: Host plugin. Device flow, auth controller, credential grant,/api/copilot-bridge/*routes, commands and config writes.src/client/: React Settings page, login dialog and logout confirmation.src/shared/contract.ts: request and response types shared by the Host and the client.
lib/ is committed so that github: installs work without a build step. Run npm run build before you commit.
To test a local checkout without touching your desktop profile:
export DSH_HOME=~/dsh-test
dsh plugin --profile web add "$PWD" -w
dsh web --port 0
链接
同类插件
Ebony-Vinyl/dsh-our-free-model★ 87287
为 dsh 接入免费模型车道(含 DeepSeek V4.1 Flash、Kimi K3 等),无需登录、注册或填写 API Key,并提供本地 OpenAI 兼容网关、降级路由与用量看板。
dingminhua/dsh-connect-workbuddy★ 2017
将本机登录的 WorkBuddy 模型(国内版与国际版)接入 DSH,每次刷新按上游目录读取每个模型的积分倍率,支持逐模型图片输入开关、带自动换号的账号池、手动每日签到,以及卡片与输入框里的只读积分胶囊读数。
Alice-Marx/dsh-model-router★ 1020
为 DeepSeek Harness 规划有依赖的工作包,将其分配给已配置的模型 API 或支持的厂商 CLI,并提供费用预览。
V1ki/dsh-plugin-subscriptions★ 640
把 ChatGPT(Codex)、Claude、Grok 订阅当作 DeepSeek Harness 的 LLM 提供方:设置页登录、模型目录、用量展示,以及 image_generate、video_generate 与 x_search 工具。
XDTrees/dsh-workbuddy-xdpool★ 623
把本机 WorkBuddy 桌面 App 登录过的所有账号自动并入 DSH 模型池:多账号轮换自动容错、实时积分,模型目录按模型标注积分倍率与限时免费 / 夜间折扣。
XDTrees/dsh-xdpool★ 623
把本机 WorkBuddy 桌面 App 登录过的所有账号自动并入 DSH 模型池:多账号轮换自动容错、429 冷却、实时积分,模型目录按模型标注积分倍率与限时免费 / 夜间折扣,扫码登录 13 家厂商,聚合免费额度渠道。账号重启不丢。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。