Releases: Rianico/dsh-better-edit
Releases · Rianico/dsh-better-edit
Release list
v0.1.9
Changed
- READMEs (English and 中文): added a concise "Why you need this" opening section — the transcription cost and 46–51% patch-failure rate of
str_replace, the 31%/43% edit-token savings, verified landing, and the leaner-context benefit (the model's attention stays on the code, not on re-transcribing it) — placed before Quick Start so the demo stays immediately visible. Fixed the stale static version badge.
v0.1.8
Added
- This CHANGELOG (Keep-a-Changelog style, following the pi-interactive-shell layout), shipped in the npm tarball.
- Git tag / GitHub release automation: a
postpublishhook (scripts/tag-current.mjs) reads the version frompackage.json, creates an annotatedvX.Y.Ztag at HEAD and pushes it, so every successfulnpm publishstays in sync with git; a GitHub Actions workflow (.github/workflows/release.yml) turns anyv*tag push into a release with auto-generated notes. - Backfilled
v0.1.0–v0.1.7git tags and GitHub releases at their version-bump commits.
v0.1.7
Added
assets/logo.svgandassets/banner.svg(file.ts → read → hashed lines → edit by hash → diff), shipped in the npm tarball.- READMEs (English and 中文) restyled in a centered, image-led layout: badge row, harness-problem pull-quote, example-driven Quick Start, a hashline-vs-
str_replace-vs-line-number comparison table, project-structure tree, roadmap, acknowledgments, and a star-history chart.
Changed
- The published tarball now includes
assets/alongsideREADME.mdandREADME.zh.md.
v0.1.6
v0.1.5
Added
- Reproducible token-cost benchmark (
benchmark/run.mjs+ frozen 103-line corpus + methodology): hashline vsstr_replaceon the same file with the same 12 replacements — 31% fewer output tokens over the session (43% on multi-line ranges), ~1.4× cheaper on effective cost at the 5× output-token rate. Deterministic: content-addressed self-checking edit script, pinnedjs-tiktokencl100k_basedevDependency. Run withnpm run benchmark. - README rewritten around the three pillars — token-saving, correctness, and the modern content-addressed edit pattern — with Mermaid diagrams, a
str_replacecomparison table, and an inspiration/lineage section (The Harness Problem, pi-hashline-edit, pi-hashline-edit-pro, pi-hashline-edit-lsz).
v0.1.4
Fixed
E_RANGE_UNVERIFIED("served at N positions") on edits after a shrinking write: the served-state array was upserted by position but never truncated to the file's current line count, so a stale tail kept a surviving line's hash at its OLD position while the current serve held it at its new one.recordServed/recordServesnow take the current line count and truncate before upserting, threaded from every whole-file serve — read, write auto-read, drift rows, and all rejection-echo sites. Regression test covers the 8-line→2-line write case (Rianico/pi-hashline-edit-lsz#27).- The fix is a candidate to upstream into pi-hashline-edit-lsz / upstream, whose
upsertServedhas the same never-truncate behavior (tracked in Rianico/pi-hashline-edit-lsz#27).
v0.1.3
Fixed
- Sandboxed sessions rejected in-workspace edits while the built-in
writesucceeded: the shadowed mutating tools calledfs.writeTextwithout the per-call sandbox policy, so a confined backend fell back to the deployment root. Tools now mirror@deepseek-ai/dsh-tool-fs'sFsSandboxController— resolve the policy with the session cwd as the workspace root, advertisesandbox_permissions/justification, pass the policy tofs.writeText, and mapFS_SANDBOX_DENIEDto the shared[sandbox: …]marker.
v0.1.2
Changed
- The hash store moved from
$DSH_HOME/plugins/dsh-better-editto a per-workspace location:<workspace>/.dsh_better_edit/hash-store.sqlite, carried per tool call via an AsyncLocalStorage workspace context (src/workspace.ts). Parallel sessions in different workspaces no longer share anchors or undo history. The shared home path remains the fallback for tests/previews. - Undo history from before 0.1.2 is not migrated to the new layout.
v0.1.1
Fixed
- Shadowed tools silently never registering, leaving sessions on the built-ins: per-agent installation failed with
cannot get property "fs" without injectatsession-start. The plugin now declaresinject = ['tools', 'systemPrompt', 'fs']and resolves the hostfsservice from the plugin's ownrootCtx(the agent fiber chain does not carry the plugin's inject list).
v0.1.0
Added
- Initial dsh port of pi-hashline-edit-lsz: hash-anchored
read/edit/batch_edit/undo_last_edittools for DeepSeek Harness. Every line gets a unique 3-character content hash; edits targetremove_from/remove_tohashes. The hashline core is ported byte-for-byte; the tool layer is rewritten on dsh's plugin API (batch_edit spec: Rianico/pi-hashline-edit-lsz#19). - Built-in replacement via scope-layered registry shadowing: on
agent/session-startthe tools and thetool:read/tool:editprompt sections are registered on the agent's own layer (own-layer-wins), unwinding automatically on disposal; atools/post-executelistener appends the auto-read to built-inwriteresults. - Served-state range verification with reject-and-serve: every line of the resolved range is checked against what the model was shown; stale/never-served/unverified ranges are hard-rejected with the current
HASH│contentrows echoed back (retry needs noread). Drift notices report served territory changed outside the edit range (reject-and-serve spec: Rianico/pi-hashline-edit-lsz#13). - Chained edits without re-reading: post-edit diff rows and rejection echoes count as serves, so follow-up edits verify cleanly.
- Error-code contract (
[E_*]codes, README-documented and test-enforced) including the noop-loop guard (Rianico/pi-hashline-edit-lsz#18);undo_last_editsurviving restarts; and safe writes preserving permissions, line endings, BOMs, symlinks, and hard links viactx.fs. - Test suite ported from pi-hashline-edit-lsz (614 tests at release), driving the dsh tool builders directly over a local filesystem bridge.