DeepSeek Harness 插件

leilengma/dsh-copilot-bridge

Star 数 ★ 0 下载量(近 30 天) 329 分类 模型与账号接入 收录于 2026-11-25 npm dsh-copilot-bridge

为内置 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

  1. Open Settings → GitHub Copilot.
  2. 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.
  3. Click Sign in to GitHub Copilot, open the device page (https://<host>/login/device) and enter the code shown.
  4. In Settings → Models, add or select the github-copilot provider. 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

内容来自项目 README(GitHub)↗

链接

同类插件

查看整个分类 →

社区评论

评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。