dsh-git-tools
Structured, safety-guarded git tools (status/log/diff/branch/repo/stage/commit/reset/push/fetch) for DeepSeek Harness agent presets. Zero runtime dependencies.
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 README ↗dsh-git-tools
Structured, safety-guarded git tools for DeepSeek Harness agent presets — a zero-dependency Cordis plugin (plain ESM, no npm dependencies), hardened through real-repo testing.
Contents
| Path | What it is |
|---|---|
src/index.js | The plugin: apply registers 10 git tools; consumes only ctx.get('subprocess') / ctx.get('fs') / ctx.tools.register |
test/register-check.mjs | Zero-dependency self-check: runs apply against a mock context, asserts 10 complete tool schemas + guardrails |
docs/dsh-git-tools-plan.md | Design document: architecture decisions, safety-guardrail list, full test matrix, iteration/fix log |
testdata/ | Test fixtures (throwaway, gitignored): a diverged repo with a bare remote, a Chinese-named repo, a scratch repo, a non-repo dir |
The plugin
10 model tools: git_repo, git_status, git_log, git_branch, git_diff, git_stage, git_commit, git_reset, git_push, git_fetch.
| Tool | What it does | Guardrails |
|---|---|---|
git_repo | repo root, current branch, HEAD, remotes, git version | read-only |
git_status | branch, upstream tracking, ahead/behind, staged/unstaged/untracked/conflicts | read-only |
git_log | recent commits (hash, author, date, subject); // filters |