New:Socket for Asana Is Now Available.Learn more
Get Started

dsh-git

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package version was removed
This package version has been unpublished, mostly likely due to security reasons

dsh-git

Git capability bundle for DeepSeek Harness: structured git tools, approval-gated mutations, and auto-checkpoints.

unpublished
Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
20
-44.44%
Maintainers
1
Weekly downloads
 
Created
Source

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 under refs/harness-checkpoints/<session-id>. The git_checkpoint_restore tool restores the corresponding state. 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 with git_status, and restore the checkpoint if an error occurs.
  • Structured repository state. git_status, git_diff, and git_log return typed data parsed from porcelain 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_restore restores from HEAD.

All mutating tools are approval-gated through the Harness UI, using the same approval mechanism as bash.

Tools

ToolPurpose
git_status / git_diff / git_logStructured reads of the working tree
git_commitCommit staged changes (approval-gated)
git_restoreDiscard worktree changes (approval-gated)
git_checkpoint / git_checkpoint_restoreManual snapshot / rollback (approval-gated; falls back to HEAD when no snapshot 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 git executable 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 seven 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/git as a plugin entry. The definition registers ctx.git automatically; mounting it alongside git-local causes a duplicate-service error.

Verify

  • Confirm that the plugin inventory in Settings contains git-local, tool-git, and git-checkpoint-policy.
  • Run git_status and confirm that it returns a structured report containing branch:.
  • Run git_commit, approve the operation, and confirm that it returns committed <sha>.
  • Edit a file, confirm that a checkpoint ref is created under refs/harness-checkpoints/, and use git_checkpoint_restore to 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, and gh workflows remain shell-driven.
  • Checkpoint restoration does not remove untracked files; support for git clean is 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-git must be installed in a profile belonging to a compatible Harness installation.

Keywords

deepseek-harness

FAQs

Package last updated on 13 Aug 2026

Related posts