Skip to content

Releases: Huasfan/dsh-tool-git

v0.2.0 — UI cards + four new git tools

Choose a tag to compare

@Huasfan Huasfan released this 14 Aug 15:16

v0.2.0

UI cards + four new tools — the tool family grows from five to nine tools, and git_diff / git_show now render as real UI cards in the Web GUI.

✨ New tools

  • git_branch — list / create / checkout / delete branches. Listing returns structured branches[] (name / current / upstream); deletes require force: true to drop an unmerged branch.
  • git_show — inspect a commit (metadata + patch, or a numeric stat summary) or a single file's content at any revision (rev:path).
  • git_restore — discard working-tree changes or unstage paths (staged: true), reporting the exact restored[] list. Destructive; deployment policy can gate it via tools/pre-execute.
  • git_merge — merge a branch/commit (--no-ff, custom message, abort supported). A merge conflict is a domain outcome: it returns the conflicting files (via porcelain v2) instead of failing.

🎨 UI cards

  • git_diff and git_show (commit mode) project replayable diff cards through output.presentationMeta — a pure unified-diff parser turns the diff text into per-file oldText/newText pairs that survive session-log replay.
  • git_show (file mode) renders a line-numbered read card.
  • All nine tools get presentCall / presentResult; git_diff / git_add attach file locations for editor follow-along.

🔗 Compatibility

  • Requires git ≥ 2.23 (now that git restore is used).
  • Still tested against DeepSeek Harness 0.1.0-rc.6.

✅ Quality

  • Test suite grows to 53 vitest tests (6 unified-diff parser, 19 new integration tests) — all passing, plus full CI and real-harness verification.

v0.1.0 — Git first-class tools for DeepSeek Harness

Choose a tag to compare

@Huasfan Huasfan released this 14 Aug 14:57

Release Notes — dsh-tool-git v0.1.0

Git first-class tools for DeepSeek Harness — five structured, model-facing tools that replace "shelling out to git and parsing text".

This is the first public release.

✨ Features

Tool What it does
git_status Working-tree status: branch / staged / unstaged / untracked / merge conflicts, as structured lists
git_diff Diff (unstaged by default; staged, stat, paths supported)
git_log Commit history as structured data (hash / author / date / subject)
git_add Stage files; returns the staged file list read back from the index
git_commit Create a commit (message required; body, amend, stageAll supported); returns the new hash and branch

All tools accept workdir (defaults to the session workspace; relative paths resolve against it).

🧱 Design & engineering

  • One canonical JSON value per tool (output.schema + output.render), following the official tool authoring reference.
  • Non-zero git exits are domain outcomes (ok: false + error); infrastructure failures (missing executable, timeout, cancellation) throw. Cooperative cancellation via exec.signal.
  • No shell injectionchild_process.execFile with argument arrays, never interpolated command strings.
  • Machine-readable parsinggit status --porcelain=v2 -z with positional slicing: paths with spaces, rename origin paths, and unmerged (conflict) entries are handled correctly.
  • ConfigurablegitPath / timeoutMs through cordis.yml (Schemastery schema, fails loudly on invalid config).

✅ Quality

  • 28 vitest tests, all passing: parser unit tests + real scratch-repository integration tests (status/diff/log/add/commit, timeouts, cancellation, non-repository, hook failures).
  • GitHub Actions CI: typecheck → tests → build → real-harness load verification (boots a profile with the plugin installed and asserts [git-tool] loaded).
  • End-to-end verified through the real tool pipeline (ctx.tools.execute) and a full profile install (dsh plugin add).

🔗 Compatibility

  • Tested against DeepSeek Harness 0.1.0-rc.6 (peer/dev dependencies are pinned to the packages shipped with that version).
  • Requires git ≥ 2.11 (--porcelain=v2).
  • Harness plugin interfaces are still evolving during the preview; see the Compatibility section in the README.

📦 Install

dsh plugin --profile web add github:Huasfan/dsh-tool-git

🗺 Roadmap (not in this release)

  • Tool-owned UI cards (presentCall / presentResult) for richer Web UI rendering.
  • More tools: git_branch / git_show / git_restore / git_merge.
  • npm publishing (pnpm publish).