DSH Plugin Store
Back to home

Wanbinyu

dsh-plugin-git-inspect

Read-only Git inspection tools for DeepSeek Harness

Stars
1
Language
TypeScript
Created
Aug 14, 2026
Updated
Aug 14, 2026
Other
GitHub repo

Introduction

dsh-plugin-git-inspect

License: MIT

Read-only Git visibility for agents running inside DeepSeek Harness.

[!NOTE] This is an independent community plugin. It is not part of the official DeepSeek Harness distribution.

What it adds

The plugin registers three model-facing tools:

ToolPurposeOptional arguments
git_statusShow the current branch and working-tree status.None
git_diffShow the working-tree diff or the staged index diff.staged, path
git_logShow recent commits in compact one-line form.maxCount, path

The working directory comes from the active Harness session (session.header.cwd). When a session does not provide one, the plugin falls back to the host process working directory.

Safety model

The plugin is intentionally narrow:

  • It never invokes a shell. git is resolved through the Harness subprocess service and started with a fixed argv vector.
  • User paths are passed after Git's -- pathspec separator; shell expansion is never involved.
  • Pager, color, external diff, text conversion, optional Git locks, and terminal prompts are disabled for predictable automation.
  • Only inspection commands are exposed. There is no commit, push, reset, stash, checkout, or file-editing tool.
  • The Harness cancellation signal is forwarded to the child process.
  • stdout and stderr are bounded by configuration; the result reports when output was truncated.

Requirements

  • Windows, macOS, or Linux with git available on the host PATH.
  • Node.js >=22.19.0.
  • A DeepSeek Harness developer-preview composition providing:
    • @deepseek-ai/dsh-tools
    • @deepseek-ai/dsh-system-prompt
    • @deepseek-ai/dsh-subprocess
  • A subprocess implementation, such as @deepseek-ai/dsh-subprocess-local.

The package currently targets the Harness 0.1.0-rc.x line and is not published to npm yet.

Install From GitHub

Install the current repository version into the project that owns your Harness composition:

npm install github:Wanbinyu/dsh-plugin-git-inspect

The package's prepare script builds its TypeScript entrypoint during a Git-based install, so the published runtime is available under dist/.

Configure

Add the plugin to a Cordis composition that already mounts the required Harness services:

- id: git-inspect
  name: dsh-plugin-git-inspect
  config:
    timeoutMs: 30000
    maxOutputBytes: 200000
    stderrMaxBytes: 16384
    graceMs: 1000
    defaultLogCount: 20
    maxLogCount: 100

The repository includes an overlay example at examples/cordis.yml. The overlay does not install a subprocess provider; that remains a host composition responsibility.

Configuration

All limits must be positive integers. defaultLogCount cannot exceed maxLogCount.

OptionDefaultEffect
timeoutMs30000Maximum tool execution time supplied to Harness tools.
maxOutputBytes200000stdout capture limit.
stderrMaxBytes16384stderr capture limit.
graceMs1000Termination grace period for the Git subprocess.
defaultLogCount20Commit count used when git_log.maxCount is omitted.
maxLogCount100Upper bound for git_log.maxCount.

Tool Calls

Typical calls look like this:

{"name":"git_status","arguments":{}}
{"name":"git_diff","arguments":{"staged":true,"path":"src/index.ts"}}
{"name":"git_log","arguments":{"maxCount":10,"path":"src/index.ts"}}

Non-zero Git exit codes become structured tool errors. A missing repository, a blank path, an aborted request, or a terminated subprocess is reported instead of being treated as successful output.

Development

git clone https://github.com/Wanbinyu/dsh-plugin-git-inspect.git
cd dsh-plugin-git-inspect
npm install
npm run verify
npm run build
npm pack --dry-run

The integration suite creates temporary repositories and exercises the real git executable through the local Harness subprocess provider. It covers branch status, working-tree and staged diffs, path-filtered history, bounded output, cancellation/error paths, and argv safety.

Scope

This plugin is a read-only inspection surface for agent workflows. Write operations, remote synchronization, branch switching, worktree management, and file editing are deliberately out of scope. Keeping those actions separate makes it easier for a host composition to apply its own approval policy.

Links

License

MIT. See LICENSE.