lonelymoon87/dsh-gitflow
Git status, diff, commit, pull request, and worktree workflows for DeepSeek Harness.
已收录
2
Git
Bundle 已验证
预览
功能介绍
增加需要审批的 Git 状态、diff、日志、提交、分支和可选检查点工具。
适合
- 希望在 DSH 内使用需审批的 Git 状态、diff、历史、提交和本地分支操作的开发者。
- 会显式暂存变更,并希望通过兼容 Change Ledger 服务获得可选恢复点的团队。
不适合
- 需要插件执行文件暂存、推送提交、创建拉取请求、管理 worktree 或删除分支的工作流。
- 未提供兼容 Change Ledger 服务的检查点工作流;普通 Git 工具仍可用,但检查点工具不可用。
README
dsh-gitflow
Git status, diff, log, commit, branch, and optional restore-point tools for DeepSeek Harness.
The installable v0.1.2 release targets DSH 0.1.0-rc.6. This project currently distributes prebuilt packages through GitHub Releases and is not published on npm.
MVP
-
git_statusreads branch and working-tree counts. -
git_diffreads unstaged or staged unified diffs without touching the index. -
git_logreturns bounded structured commit history and handles unborn repositories. -
git_commitcommits only existing staged changes and requires DSH approval. -
git_branchlists local branches; create and switch require approval. -
/commitloads a staged-change review skill before callinggit_commit. -
checkpoint_listand two-phasecheckpoint_restoredelegate to an optional Change Ledger service. - Optional
autoCheckpointcaptures a Change Ledger restore point attools/pre-executefor configured mutation tools.
Pull-request creation, push, worktree management, and branch deletion are deliberately outside the MVP.
Safety model
GitFlow never stages files implicitly. It does not run git add, git reset, git stash, git push, hook-bypass flags, or destructive branch commands. Git arguments are shell-quoted and commit messages are passed through stdin. Every Git process uses the mounted DSH shell service, preserving its timeout, sandbox, cancellation, and execution-world behavior.
Mutating tool calls pass through the DSH approval seam. Direct command handlers do not bypass it: /commit queues a user-invoked skill, and the eventual git_commit tool call asks for approval.
Change Ledger integration
dsh-turn-rewind owns workspace snapshots, restore planning, rescue points, stale-plan checks, and post-restore verification. GitFlow does not implement a competing stash or commit-tree restore engine.
When no compatible ctx.changeLedger service is mounted, ordinary Git tools continue to work and checkpoint tools fail with a configuration message. Because the restore point is already the durable source of truth, GitFlow does not duplicate it into required custom session events.
Install
The package currently targets DSH 0.1.0-rc.6 plugin APIs and Node.js ^22.19 || >=24.
dsh plugin --profile web add https://github.com/lonelymoon87/dsh-gitflow/releases/download/v0.1.2/dsh-gitflow-0.1.2.tgz
The release tarball is prebuilt and needs no build allowance. A pinned source install is also supported:
dsh plugin --profile web add github:lonelymoon87/dsh-gitflow#v0.1.2
The source install runs this package’s prepare build. pnpm 10 and later reject it until the profile allowlists the exact package key printed by the failed command; apply that instruction and rerun the same dsh plugin add command. Replace web with headless to install into the one-shot agent profile.
To upgrade, rerun dsh plugin add with the newer release URL. To uninstall:
dsh plugin --profile web remove dsh-gitflow
Configuration
- id: gitflow
name: dsh-gitflow
config:
timeoutMs: 30000
maxOutputBytes: 2097152
maxLogEntries: 100
conventionalCommits: true
autoCheckpoint: false
checkpointTools:
- write
- edit
- str_replace_editor
- git_commit
- git_branch
autoCheckpoint is disabled by default. Enabling it without a Change Ledger service does not pretend recovery exists; it leaves calls unchanged.
Verification
The test suite uses real temporary Git repositories. It covers dirty status, staged and unstaged diffs, commits, branch creation, unborn history, approval decisions, automatic checkpoint delegation, and two-phase restore delegation.
- The v0.1.2 tarball installs directly from its HTTPS release URL into a clean DSH profile.
- The packed bundle and pinned GitHub source install both appear in
dsh --dump-config. - CI covers Node 22.19 and Node 24; a scheduled workflow repeats the real install against
@deepseek-ai/dsh@latest. - Bugs and compatibility reports are tracked in GitHub Issues.
License
常见问题常见问题
在启用了 DSH 的终端中执行已验证命令 dsh plugin --profile default add github:lonelymoon87/dsh-gitflow。命令会解析公开 package 元数据,并保持插件与本页展示的目录身份一致。
兼容性以页面上展示的 bundle 与 profile 状态为准。如果某个 profile 尚未检测到,请先保持禁用,并在生产启用前阅读仓库文档。
GitHub 链接和 activity 元数据是 release 与维护状态的来源。新版本发布后重新查看本页,确认目录已经观察到最新版本。