Preface¶
In DeepSeek Harness (DSH), a common conflict when allowing models to read and write to GitHub is: read operations must be smooth, but write operations cannot simply rely on the model’s own “confirmation” to take effect. Many GitHub plugins use confirm: true to express intent, but intent does not equal human consent. If an unrestricted escape hatch on REST is also required, the surface tools increase, making the trust boundary harder to clarify.
dsh-github-gate (Maintainer 1273984347, Community Category admin-security) hard-codes these trade-offs into its implementation: 9 typed github_* tools with 61 actions in total. All state-changing actions require confirm: true and must pass through a human approval seam that the model cannot forge. Under the hood, it uses the GitHub CLI (gh) uniformly, launching subprocesses via argv arrays (shell: false) with zero runtime dependencies. Below, we introduce what it is, how to install it, how to use it daily, and the boundaries you need to accept before use.
What is this¶
In short: dsh-github-gate is a GitHub toolkit hooked into DSH, allowing models to freely “view” repositories and PRs, but requires a human to click approve before write operations like merging, modifying Issues, or publishing Releases.
Consistent with the comparison table in the README, its main difference from similar plugins with “broader surfaces and looser doors” lies in:
| Dimension | Common Practice | This Plugin |
|---|---|---|
| Write Safety | Only confirm: true (set by model) |
confirm: true and human approval seam (model cannot set) |
| Raw REST | Unrestricted escape hatch | Paths must be relative, .. prohibited; write methods classified and gated at runtime |
| Self-Update | — | github_update verifies against GitHub’s published sha256 then stages, installation follows platform flow |
Environment Requirements (from source materials): DeepSeek Harness >=0.2.0-0 <0.3.0, gh installed on the system and in PATH; supports Linux, macOS, Windows. Node >=18.
Core Features¶
Nine github_* Tools and Write Operation Gates¶
The README states: Of the 61 actions, 29 are marked as destructive and require confirm: true and human approval. The confirm passed by the model merely indicates “intent to write,” not authorization. A typical chain is as follows:
github_pr { action: "merge", number: 42, confirm: true }
→ Triggers approval prompt stating the specific PR; abort if "No" is selected
→ Executes after consent: gh pr merge 42 --repo owner/name
The four write methods accepted by github_api are classified at runtime; models cannot turn text into commands via shell string concatenation: gh is always launched with shell: false.
Credential Chain and Settings Page¶
Credentials are resolved in order for each call: DSH credential store → environment variables GH_TOKEN / GITHUB_TOKEN → gh auth login → git credential helper. After rotating a token, it takes effect on the next call.
GUI Path: Settings → Plugins → GitHub: You can paste a PAT, test API connectivity, and view which layer is currently active; tokens are never echoed back. Device Flow login (github_auth { action: "login" }) requires a self-provided OAuth App; the README has a dedicated section explaining this.
Diagnostic tool github_auth { action: "probe" } isolates failure causes layer by layer; errors like 401 / 403 (quota or SSO) / 404 / 422 will point to actionable fix instructions rather than just throwing HTTP codes.
Branch Pill¶
On the browser side, only client.js (approx. 26 KB) is injected into the session header conversation.session.header.utilities: it displays the currently checked-out branch, PRs on that branch, and provides a branch switching menu; it fails closed when the caller identity cannot be determined. The plugin registers loopback routes like /branch, /branches, /diagnostics, /switch on the webServer; read routes are available even without a connection service, logging a warning.
Prompt Sections and On-demand Skills¶
Beyond tool schemas, the plugin contributes prompt sections and three on-demand workflow skills: github-pr-review, github-ci-triage, and github-issue-to-pr. These explain when to use which capability, what evidence is required for conclusions, and when to stop.
Self-Update with Digest Verification¶
github_update stages the release and verifies the sha256 against GitHub’s published digest before handing it over to the platform-side installation/approval flow.
Installation and Enablement¶
Installation is strictly performed via the Harness plugin manager’s plugin_manager action install_bundle. Do not use direct link installation from the source directory (README explains this creates junctions causing ERR_MODULE_NOT_FOUND and preventing plugin activation).
Method 1: GitHub Release
- Download
dsh-github-gate-<version>.tgzfrom Releases. - After extracting, pass the extracted directory (or the local path containing the package) to
install_bundle.
Method 2: Packaging Yourself
Package outside the source directory, then install the generated tgz:
npm pack --pack-destination ../packages
Then execute install_bundle on ../packages/dsh-github-gate-<version>.tgz. After modifying source code, you must repack and reinstall; restart to load the new module code.
One-click Download Script (Does not auto-install)
The script only fetches the latest release, verifies sha256, and prints the installation path. Actual installation still requires you to go through install_bundle and pass approval:
# Linux / macOS
curl -fsSL https://raw.githubusercontent.com/1273984347/dsh-github-gate/main/install.sh | sh
# Windows
irm https://raw.githubusercontent.com/1273984347/dsh-github-gate/main/install.ps1 | iex
Execute install_bundle using the path printed by the script.
The DSH ecosystem is “everything is a plugin”; the community catalog entry on SkillHub is an independent site with no official affiliation with DeepSeek / High-Flyer.
Typical Usage¶
When the workspace has a configured git remote, repo can be omitted in most calls, defaulting to operations on the current repository.
1. Check if credentials exist
github_auth { action: "status" }
→ credential source: credentials-seam | environment | gh-cli | git-credential-helper | none
2. If no credentials
github_auth { action: "login" } # Device Flow, requires self-provided OAuth App
Or paste a PAT in Settings → Plugins → GitHub, or run gh auth login in the terminal, and the credential chain will pick it up automatically.
3. Troubleshoot authentication issues
github_auth { action: "probe" }
4. Working with PRs
github_pr { action: "status" } # CI for current branch
github_pr { action: "view", number: 42 }
github_pr { action: "checks", number: 42 }
github_pr { action: "merge", number: 42, confirm: true } # Triggers human approval
For a more complete list of tools and action descriptions, refer to What it provides and Safety model in the repository README.
Suitable Scenarios and Notes¶
Who it is for: Those who need models to check PRs, CI, Issues, and Releases within Harness sessions, but require a real human to nod before any operation that changes repository state; those willing to accept a deliberately narrowed tool surface (9 tools / 61 actions) in exchange for a clearer trust model.
Who it is not for: Those seeking “as many tools as possible, minimal interception for write operations”—the README explicitly states this is not the target user.
Safety and Compliance:
- The plugin runs with the current DSH process privileges. The repositories and token capabilities it can reach depend on the credentials you configured and the local
gh/ git status; please review the source code and license yourself before installation, and do not paste production-grade PATs in untrusted environments. - PAT and OAuth configurations should only be granted necessary scopes; the approval seam reduces accidental operations but cannot replace code review or organizational GitHub permission policies.
- Although self-update verifies the digest, whether to apply the new version depends on your judgment of the release content and changelog.
Known limitations, background tasks, and other behaviors are subject to the repository’s Known limitations; for development builds and testing instructions, see Development (README mentions extensive automated testing and argv shape verification as quality endorsement, not a prerequisite for use).
Conclusion¶
dsh-github-gate separates GitHub write operations into two layers: “model expresses intent” and “human gives consent,” pinning the latter to the platform side using gh subprocesses and approval UIs. If your DSH workflow requires high read volume and low write volume on GitHub, with mandatory human intervention for writes, you can start with credential status and PR read-only actions, then bring in confirm: true to go through the approval chain when truly needed.
- Community Catalog: https://www.skillhub.cn/plugins/1273984347/dsh-github-gate
- Source Code and Documentation: https://github.com/1273984347/dsh-github-gate