DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Tool Git — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

dsh-tool-git

Tool Git

面向 DeepSeek Harness 的结构化安全 Git 工具集:提供 status/diff/log/branch/stage/commit/stash/show/fetch/pull/remote/checkout,并带有破坏性命令防护。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:lxj808624/dsh-tool-git#09df9e9ad56a144d61647f465b54f84bbf90113c
README兼容性版本

兼容性与来源证明

Tool Git 以 dsh-tool-git 发布,当前版本为 0.1.3。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/9/20

版本

0.1.3stable
2026/8/21
0.1.2stable
2026/8/14

相关插件

正在加载相关插件…

最新版
0.1.3
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 0
周下载
147
查看源码 ↗项目主页 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 developer-tools 分类下经过校验的插件。

Web App@deepseek-ai/dsh-web-appdsh 浏览器界面捆绑包:位于 dsh-base 之上的 Web 补丁层,加上运行时粘合插件(提供前端 dist、Web 界面提示符、bash 运行时变量和 URL 行)Sdk Minimal@deepseek-ai/dsh-sdk-minimal独立的最小 SDK 配置包:JSON-RPC、一个 DeepSeek 适配器、持久化 Shell 和 JSONL 会话Sdk App@deepseek-ai/dsh-sdk-appdsh SDK 配置包:基于 dsh-base 提供 stdio JSON-RPC 服务和进程生命周期管理Subagent Codex@deepseek-ai/dsh-subagent-codex基于官方 app-server 协议的一次性 Codex 子代理提供程序

README

dsh-tool-git

Structured, safe Git tool family for DeepSeek Harness (dsh).

Coding agents reach for git constantly, but the stock runtime only offers raw bash. dsh-tool-git gives the model eight structured tools that run git through a shell-free subprocess runner and return canonical JSON values — plus a tools/pre-execute safety gate that stops destructive git operations (force push, hard reset, rebase, amend, branch deletion, …) before they happen, whether the model calls them through these tools or through a shell tool.

  • No shell injection: every command goes through execFile with an explicit argument array. Model-supplied paths and messages are never string-interpolated.
  • Machine output: porcelain v2, --numstat, and --format records are parsed into structured JSON, not prose.
  • Safety by default: destructive operations are denied with an explanation unless you opt into ask (approval prompt) or allow.

Tools

ToolWhat it does
git_statusWorking tree state: branch, ahead/behind, staged / unstaged / untracked files
git_diffPer-file insertion/deletion stats, optional unified patch, --cached / rev bases
git_logCommit history: hash, author, date, subject, body; maxCount, rev range, path filter
git_branchBranches with upstream and ahead/behind tracking state
git_stageStage explicit paths, or all / tracked-only changes
git_commitCreate a commit with a message; returns hash and statistics
git_stashlist / push / pop stashes, with conflict-safe pop
git_showOne commit: metadata, per-file stats, optional patch
git_fetchDownload refs from a remote without touching the worktree
git_pullFast-forward-only by default; reports not-fast-forward / conflict outcomes
git_remoteList configured remotes with fetch/push URLs
git_checkoutSwitch branches, or create and switch (-b); never discards changes

Every tool accepts an optional repoDir argument and reports the resolved repository root in its result.

Safety gate

The gate listens on tools/pre-execute and inspects every tool call:

  • The plugin's own tools — e.g. git_commit with amend: true.

  • Shell tools — bash, tool:bash, bash_persistent, terminal, tool:terminal, pwsh — scanning their command text for destructive git invocations such as:

    push --force / --force-with-lease · push --delete · reset --hard · clean -f · branch -d/-D · tag -d · rebase · pull --rebase · commit --amend · checkout -- / checkout . / checkout -f · switch -f · restore (discarding worktree) · rm -r · update-ref -d · filter-branch

    Pattern matching is per-command: it never crosses |, ;, or newline boundaries, so git add . && git push --force is still caught but innocent compound commands are not misread.

This is a policy guardrail, not a sandbox. An agent that can run arbitrary code can always route around a string matcher (aliases, -c rewrites, scripting). The gate exists to make accidental destructive calls fail loudly with an explanation — deliberate destructive work is authorized through the configured policy, not by bypassing the gate.

Install

npm (recommended) — from any directory:

dsh plugin --profile web add dsh-tool-git

From GitHub (or a local checkout / tarball):

dsh plugin --profile web add github:lxj808624/dsh-tool-git#v0.1.3

Then restart dsh --profile web. For GitHub installs, pnpm asks you to allowlist the prepare build script once (see the official packaging guide).

Configuration

All options are optional; the defaults are shown below:

# profile-level or bundle patch config for the tool-git row
- id: tool-git
  name: dsh-tool-git
  config:
    workDir: ''                # repo discovery start dir (default: process cwd)
    gitPath: git               # git executable
    destructivePolicy: deny    # deny | ask | allow
    extraDestructivePatterns: []  # extra case-insensitive regexes for the gate
    logMaxCommits: 20          # git_log default count (cap 100)
    diffContextLines: 3        # patch context lines for git_diff / git_show
  • deny (default) — destructive calls are rejected with the pattern name and an explanation.
  • ask — destructive calls go through the runtime's approval seam (ctx.approval); without a mounted approval service they degrade to deny.
  • allow — the gate passes everything through.

Development

Prerequisites: Node.js ≥ 22.19 and pnpm. The project is self-contained — all @deepseek-ai/* types resolve from the published public API (0.0.1-rc.5 line) installed as devDependencies, so no deepseek-harness checkout is required.

pnpm install
pnpm run typecheck   # tsc against the public @deepseek-ai/* API
pnpm test            # vitest: boots the plugin, runs real git in temp repos
pnpm run build       # tsc declarations + tsdown bundle (lib/index.mjs)

The tests create a disposable repository, register the plugin on a Cordis context with the real dsh-tools runtime, and execute every tool through the full pipeline (tools/pre-execute → dispatch → tools/result).

Publish

  • dsh.bundle.patch in package.json points at cordis.patch.yml, so dsh plugin add activates the plugin as a profile layer.
  • prepare runs tsdown --config tsdown.prepare.config.ts, which transpiles src/ without project references — so GitHub installs build cleanly without a sibling harness checkout. Prefer publishing prebuilt tarballs / npm packages to avoid pnpm's build-script allowlist.

License

MIT

Contributors

  • taonokenshin — found and fixed the dsh-tools peer-resolution issue that crashed the host tool dispatcher on DeepSeek Harness 0.1.0-rc.6 (#1, #2).