JohnXu22786/apply-patch
JohnXu22786★ 0TypeScript最后同步: 2026-08-20
Apply structured unified diffs (git format) to the real filesystem inside DeepSeek Harness (dsh): multi-file parsing, fuzzy hunk location, all-or-nothing application, dry-run, and reverse-patch undo.
README 摘要
dsh-patch-apply Apply structured unified diffs (git format) to the real filesystem inside DeepSeek Harness (dsh) — and anywhere else Node runs. 中文文档:README.zh.md dsh ships string-level edit / write tools but no structured diff-applier that writes to disk. dsh-patch-apply fills that gap: it parses a unified diff, applies every hunk with fuzzy context tolerance and line-offset correction, guards the whole operation so it is all-or-nothing , and records a reverse patch for byte-exact undo. Zero runtime dependencies. TypeScript sources, plain-object tool definitions, Node's built-in test runner. Highlights - Full git diff coverage — multi-file, multi-hunk, ± /context/add/delete, /dev/null creates & deletes, rename from/to , copy from/to , old mode / new mode , index shas, \ No newline at end of file , binary labels ( Binary files … differ , GIT binary patch ), quoted paths with spaces. Classic bare / +++ patches are accepted too. - Self-implemented parser — no heavy dependencies; the parser validates hunk headers against actual body line counts and fails with the precise patch line number on malformed input. - Precise hunk location — exact-at-anchor → exact-anywhere (line-offset correc…
在 GitHub 查看完整 README →分类
DeepSeek Harness: Everything is a Plugin.
★ 182,325
amruthpillai/reactive-resumeA one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
★ 41,477
anywhere-labs/deepseek-harness-desktop为 DeepSeek Harness (DSH) 插件生态打造的现代化桌面端解决方案。万物皆「插件」,桌面本身也是「插件」。
★ 17,784