hy-sde/dsh-git--packages-git ↗★ 0

@hy-sde-org/dsh-git

Agentic git plumbing for DeepSeek Harness: the host ctx.git service (diff capture/parsing, hunk staging, commit/push/log over the subprocess seam) plus the vcs/repo-lock/worktree/conventional layers backing the commit, review, and worktree tools in @hy-sde-org/dsh-tool-git — a standalone plugin with no upstream harness changes required. 作为底层服务,为上层 Git 工具提供差异解析、暂存、提交等 CLI 封装支持。

Package
@hy-sde-org/dsh-git
Compatibility
Unverified
Harness peer range
^0.2.0-rc.2
Cordis peer range
~4.0.4
Version
0.2.0-rc.2
License
NOASSERTION
Last updated
Oct 3, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:hy-sde/dsh-git#189f27bec98e5eb8fc3797ccadc6196100b1d092&path:packages/git

@hy-sde-org/dsh-git

Host-plane ctx.git service for the DeepSeek Harness: a stateless, thin wrapper around the git CLI through the ctx.subprocess seam, plus the diff-parsing primitives and split-commit execution verbs the model-facing tools need. Consumed by @hy-sde-org/dsh-tool-git; never called by the model directly.

  • GitService — run / status / diffText / diffStat / stagedFiles / resetIndex / stageHunks / commit / log / currentBranch / isWorktree, plus push with remote/branch/upstream options and root for the review gate.
  • parseFileDiffs / parseNumstat / computeDependencyOrder / LOCK_FILES — pure diff + topo-sort + lock-file primitives.
  • vcs — TS contract port of omp's native pi-vcs surface (error taxonomy, repo discovery, newline-safe joinPatches, HEAD stat-poll watch).
  • withRepoLock — in-process per-repository mutation queue (repo-lock).
  • acquireWorktree / releaseWorktree / listWorktrees / pruneWorktrees / destroyWorktree — a durable-lease worktree pool with dry-run safety (worktree).
  • conventional — llm-git canonical commit-type vocabulary plus commit message normalization / validation (scopes, summaries, bodies, pep-595 length rules).
  • apply(ctx, config) registers ctx.git (subprocess seam required).

Port of omp (oh-my-pi)'s git layer — see LICENSE. The service owns no durable state and shells out per call, so one host instance serves every session; which repo the tools act on comes from the calling agent's session cwd at call time.

Install & mount

See the repo README.md — as a plugin:

dsh plugin --profile web add @hy-sde-org/dsh-git

The bundle cordis.patch.yml inserts the git row into the profile's base composition (stock INSERT patch form, safe on official releases). The tools mount from any user preset that copies examples/agent-preset/.

Development

pnpm install
pnpm run check   # tsc --noEmit
pnpm run build   # tsc -p tsconfig.build.json → dist/
pnpm run test    # vitest (89 tests: conventional/repo-lock/vcs/worktree/service/unit on real temp repos)