Git 工具
Provides DeepSeek Harness agents with automatic checkpoints before risky edits, structured Git tools, and approval-gated write operations in a single npm bundle.
이것은 DeepSeek Harness(DSH) 플러그인입니다. 이 사이트는 GitHub README, 설치 정보, 유지보수 상태, 공개 보안 시그널을 모아 보여줍니다.
업스트림에서 중국어 README를 제공하지 않아 저장소 원본 내용을 표시합니다.
dsh-git
Provides DeepSeek Harness agents with automatic checkpoints before risky edits, structured Git tools, and approval-gated write operations in a single npm bundle.
English | 中文
Overview
- Automatic rollback protection. Before each risky operation—
write,edit,str_replace_editor, and, by default,bash—the worktree is snapshotted underrefs/harness-checkpoints/<session-id>.git_checkpoint_listshows the session's checkpoint history andgit_checkpoint_restorerolls back to any one of them — not just the latest. Because shell commands cannot be integrated directly into the agent's edit pipeline, the system prompt defines a mandatory Git safety procedure: create a checkpoint before every mutating tool call, verify the result withgit_status, and restore the checkpoint if an error occurs. - Structured repository state.
git_status,git_diff, andgit_logreturn typed data parsed fromporcelain v2, allowing the model to reason over repository state without parsing terminal formatting. - Durable, session-scoped checkpoints. Snapshots are stored as local refs under
refs/harness-checkpoints/<session-id>. They are not pushed or pruned, and rollback does not remove untracked files. If no checkpoint exists—typically during the first edit after a clean state—git_checkpoint_restorerestores fromHEAD.
All mutating tools are approval-gated through the Harness UI, using the same approval mechanism as bash.
Tools
| Tool | Purpose |
|---|---|
git_status / git_diff / git_log | Structured reads of the working tree |
git_commit | Commit staged changes (approval-gated) |
git_restore | Discard worktree changes (approval-gated) |
git_checkpoint | Manual snapshot (approval-gated) |
git_checkpoint_list | List session checkpoints, newest first, for selection |
git_checkpoint_restore | Roll back to a selected checkpoint, or the latest when omitted (approval-gated; falls back to HEAD when none exists) |
Requirements
- DeepSeek Harness — dev checkout or local build; the
@deepseek-ai/*packages it needs come with the install and are declared as peers - A
gitexecutable on the host
Install
Install through the Harness plugin command:
dsh plugin --profile web add dsh-git
dsh plugin runs pnpm add dsh-git inside the profile and auto-registers the bundle through its dsh.bundle.patch. Restart, and the three plugins (git-local, tool-git, git-checkpoint-policy) plus the eight git_* tools are live.
Alternatively, install the package manually and mount the plugins:
cd ~/.dsh/profiles/<profile>
npm install dsh-git
- insert:
- id: git-local
name: 'dsh-git/local'
- id: tool-git
name: 'dsh-git/tool'
- id: git-checkpoint-policy
name: 'dsh-git/checkpoint-policy'
Restart after editing the profile's cordis.patch.yml.
Do not mount
dsh-git/gitas a plugin entry. The definition registersctx.gitautomatically; mounting it alongsidegit-localcauses a duplicate-service error.
Verify
- Confirm that the plugin inventory in Settings contains
git-local,tool-git, andgit-checkpoint-policy. - Run
git_statusand confirm that it returns a structured report containingbranch:. - Run
git_commit, approve the operation, and confirm that it returnscommitted <sha>. - Edit a file, confirm that a checkpoint ref is created under
refs/harness-checkpoints/, list it withgit_checkpoint_list, and usegit_checkpoint_restoreto restore the pre-edit state.
Development
The built lib/ directory is synchronized from the upstream Harness repository (packages/git/ at https://github.com/deepseek-ai/deepseek-harness) with ./sync.sh [UPSTREAM_DIR]. The script copies each component's lib/ directory to lib/<component>/, rewrites internal @deepseek-ai/dsh-git imports to the package self-reference dsh-git/git, and pins the version. The upstream repository contains src/ and tests/; this repository distributes the build output.
Known limitations
- Remote and pull request operations are not supported;
push,fetch, andghworkflows remain shell-driven. - Checkpoint restoration does not remove untracked files; support for
git cleanis deferred. refs/harness-checkpoints/*are local refs and are neither fetched nor pushed or pruned.- If no approval service is mounted, mutating tools run without approval gating.
- The
@deepseek-ai/*peer dependencies are provided by Harness rather than published as registry packages.dsh-gitmust be installed in a profile belonging to a compatible Harness installation.
Related projects
- dsh-git-identity — pin commit authorship to the environment identity.
- dsh-gh-bridge — bridge a macOS Keychain GitHub token into sandboxed
gh. - dsh-auto-blame — automated blame.
보안 및 설치 증거
이 점수는 공개 저장소 메타데이터와 이 사이트에 등록된 설치 증거에만 기반하며, 코드 보안 감사와 다릅니다.
공개 플러그인 카탈로그에서 왔으며, 공개 GitHub 저장소로 연결됩니다.
GitHub 메타데이터에서 라이선스가 감지되지 않았습니다.
최근 180일 내 코드 업데이트가 있습니다.
재현 가능한 정확한 설치 메타데이터가 아직 등록되지 않았습니다. 저장소 설명에 따라 직접 확인하세요.
검사한 패키지 메타데이터에 설치 라이프사이클 스크립트가 선언되지 않았습니다.
missing-license