Introduction¶
In the development workflow of DeepSeek Harness (DSH), Agents often need to fetch source code or binary files. The first reaction is usually to use git clone, but this requires a git binary in the host environment and involves extensive network transfer. This article introduces the dsh-zgit plugin, which replaces git operations by directly calling Forge’s HTTPS interfaces, aiming to improve the runtime efficiency of DSH Agents.
Core Features¶
dsh-zgit focuses on “read” operations and provides a suite of fetch capabilities without requiring a git binary.
-
Source Code Fetching
The plugin directly downloads Forge archive files (such as tar.gz or zip) over HTTPS and extracts them into the workspace’s simulated checkout directory (.zerogit). This directory mirrors the structure of a git checkout, supporting browsing and status checks. -
Binary Release Download
It supports downloading binary assets from the Release pages of GitHub, GitLab, and Gitee. The download process includes SHA256 verification to ensure file integrity. -
Git Read Command Simulation
The plugin reimplements selected read-only git commands, including:zgit_ls_remote: Fetch remote branches and tags.zgit_show: Get the content of a single file under a specified reference.zgit_ls_tree: List the file structure under a specified reference.zgit_log: View the most recent commit records.zgit_diff: Compare differences between two references.zgit_status: Check differences between the simulated checkout directory and the remote.
-
Generic Download Tool
zgit_downloadcan download any direct URL (such as mirror sites or toolchains), with byte-limit restrictions and SHA256 verification to prevent abuse.
Installation and Activation¶
The installation process must be run in the DSH terminal. The plugin is hosted on npm and supports profile-based installation.
dsh plugin --profile web add dsh-zgit
After installation, the plugin registers the corresponding commands and the /zgit human-plane command entry in the DSH environment.
Typical Usage¶
The plugin supports multiple repository reference formats, including owner/repo, owner/repo@ref, full HTTPS URLs, and SSH URLs.
Command-line tool examples:
* Clone source code and switch to a specific branch:
zgit_clone owner/repo@ref
- Fetch the latest binary release:
zgit_fetch_release
- View the status of the current simulated workspace:
zgit_status
- Download a file from any URL (limit 1GB, verify SHA256):
zgit_download https://example.com/file.tar.gz
Human-plane commands (Web UI / TUI):
Type /zgit directly and select the corresponding operation (clone, get, show, ls, log, diff, resolve, status, download) without passing instructions through the model.
Use Cases and Notes¶
Use cases:
* The DSH runtime environment does not have a git binary installed.
* There is a need to strictly limit Agent download traffic and storage space.
* Agents need to directly fetch binary release assets for verification or deployment.
Notes:
* Read-only Mode: The plugin does not support write, commit, or push operations and is limited to code fetching.
* Security:
* Workspace writes are restricted to the calling session’s workspace to prevent path escape.
* All downloads are subject to byte-limit restrictions.
* Downloaded archives are only extracted and never executed.
* License: The plugin uses the MIT license.
Summary¶
dsh-zgit provides a lightweight alternative that allows DSH Agents to efficiently fetch code and resources in a git-less environment. By simulating git read operations, it simplifies workflows while maintaining security. For more details, refer to the plugin directory or the source repository.