Skip to content

Releases: RimuruW/pi-hashline-edit

v0.6.1

09 May 16:30
v0.6.1
fa82314

Choose a tag to compare

What's Changed

  • Fix Claude Agent SDK edit compatibility by accepting deprecated legacy top-level replace args by @dszmaj in #16
  • refactor: migrate npm scope to @earendil-works, switch bun→npm+vitest by @RimuruW in #19
  • fix(hashline): align rendered line numbers by @XYenon in #18

New Contributors

Full Changelog: v0.6.0...v0.6.1

v0.6.0

24 Apr 15:24
v0.6.0
259fcbf

Choose a tag to compare

Added

  • Add first-class replace_text edits.
  • Add full and ranges return modes for edit previews.
  • Add protocol metadata for snapshot validation, outlines, stale refresh anchors, and edit metrics.

Fixed

  • Preserve hard links during atomic writes.
  • Canonicalize mutation targets across aliases.
  • Render applied edit diffs in the UI only while keeping model-visible responses compact.
  • Preserve legacy payload compatibility and fenced result sections.
  • Tighten range and snapshot metadata handling.

Changed

  • Slim read/edit prompt guidance and edit response text for token efficiency.
  • Drop snapshot ID rejection and silent autocorrection behavior from the protocol.
  • Improve text-like MIME handling, including XML candidates.

Tests

  • Expand file-kind coverage for XML read guard paths and harden related test coverage.

v0.5.4

19 Apr 05:08
v0.5.4
5d2ab5f

Choose a tag to compare

Highlights

This release fixes #12: If text-file sample for file-kind ends containing a partial utf-8 character, file is incorrectly determined to be binary.

Fixed

  • Preserve rendered diff previews when the edit tool returns results.
  • Preserve @ signs and Unicode spaces when normalizing relative paths.
  • Remove edit-application autocorrection heuristics to keep strict hashline semantics.
  • Tighten UTF-8 classification for full-window reads while tolerating incomplete truncated input. (#12)
  • Prevent unbounded _hasherCache memory growth.

Changed

  • Share file reads between file-kind detection and the read/edit tools to reduce duplicate I/O.

Performance

  • Cache the XXH32 hasher instance in hashline processing.

Documentation

  • Sync README.md, AGENTS.md, and prompts with current tool behavior.
  • Fix broken links in README.md.

Tests

  • Add coverage for stale-position compound edits, EACCES/EPERM paths, line-ending/BOM helpers, and Windows-specific permission guards.

v0.5.3

06 Apr 14:40
v0.5.3
171c5b0

Choose a tag to compare

What's Changed

Features

  • Return updated anchors in edit results for chained editing workflows
  • Shared file-mutation-queue bridge with tighter schema and prepareArguments hook
  • Add hashline-specific prompt metadata (snippets & guidelines) for read and edit tools

Fixes

  • Fix legacy edit line-range and multi-line delete tracking
  • Fix fuzzy anchor validation and tighten error handling
  • Fix prepend into empty file correctly
  • Handle empty range deletes and empty edit results
  • Avoid emitting sentinel anchors and correctly track changed span
  • Compute updated anchors in final document coordinates
  • Use final-document offsets for append tracking
  • Preserve non-string legacy key values instead of silently dropping
  • Return advisory for empty files, hide terminal newline sentinel
  • Remove noisy warning heuristic for line-shift noise
  • Enable chained anchors for legacy top-level replace

Docs

  • Document read offset/limit, chained edits, and diff preview
  • Replace pseudo-code payload with full JSON examples for edit
  • Require edits to be a JSON array, not a JSON-encoded string

Other

  • Sync with pi 0.63+ types and tighten peer dep minimums

New Contributors

Full Changelog: v0.4.1...v0.5.3

v0.4.1

27 Mar 03:03
v0.4.1
8287564

Choose a tag to compare

Fixed

  • Fixes #7: restore Pi tool registration by publishing the edit tool schema as a top-level JSON object, while preserving legacy oldText/newText compatibility.
  • Fix EOF append behavior for files ending with a terminal newline so append inserts at the real end of file instead of creating an unintended blank line.

Verification

  • Added regression coverage for schema publication and terminal-newline append handling.
  • bun test

v0.4.0

22 Mar 16:07
v0.4.0
3d24b04

Choose a tag to compare

What's Changed

Added

  • Compact diff preview in edit results. Each successful edit now returns a condensed Diff preview: block showing changed lines with +/- markers and their new LINE#HASH anchors, making quick follow-up edits possible without a full re-read.
  • Legacy compatibility mode. When a caller sends a top-level oldText/newText or old_text/new_text payload (the built-in edit format), the tool attempts an exact unique match and applies it. Usage is surfaced to the interactive UI as a warning — not to the model — so operators can see when hashline mode is not being used.
  • Compatibility notifications. A turn-end notification is emitted to the UI when one or more edits in a turn fell back to legacy mode, with a count of affected edits.
  • Input autocorrections. The tool now automatically strips accidental LINE#HASH: display prefixes or diff +/- markers copied into replacement lines, and corrects \t-escaped tab indentation when PI_HASHLINE_AUTOCORRECT_ESCAPED_TABS=1 is set.
  • Binary and image file detection. Both read and edit now classify files before processing: images (JPEG, PNG, GIF, WebP) are handled as attachments; binary files are rejected with a descriptive error; only UTF-8 text files proceed to hashline processing.
  • Out-of-range read offset reporting. Requesting an offset beyond the end of file now returns a clear advisory with the file's actual line count and valid offset range.

Fixed

  • Stale anchor error snippets include retry anchors. On hash mismatch the error snippet marks stale lines with >>> and includes their current LINE#HASH for immediate retry, with surrounding context for range edits.
  • Atomic writes preserve symlink targets, file mode, and detect symlink loops.
  • Caller-owned edit arrays are not mutatedapplyHashlineEdits clones its input before deduplication.
  • Schema validation accepts legacy payloads and rejects mixed camelCase/snake_case keys.
  • Hash semantics tightened — symbol-only lines use their line number as hash seed to reduce collisions on } / { etc.
  • Unsafe truncated previews are rejectedread returns an advisory instead of a partial hashline when the first line exceeds the byte budget.

Changed

  • Edit tool is strict hashline-only. Free-text relocation removed; legacy oldText/newText is a hidden compatibility fallback only.
  • grep tool override removed — use the built-in grep tool.
  • Migrated from npm to Bun (bun.lock replaces package-lock.json).
  • Test suite reorganized into layered directories (core/, tools/, extension/, integration/).
  • tsconfig.json added for explicit TypeScript strict-mode checking.

Full Changelog: https://github.com/RimuruW/pi-hashline-edit/blob/master/CHANGELOG.md