dsh-better-edit 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +318 -245
- package/README.zh.md +20 -11
- package/lib/contract.js +40 -1
- package/lib/edit-engine.js +4 -4
- package/lib/edit-pipeline.js +4 -4
- package/lib/file-view.js +63 -0
- package/lib/guidance/index.js +8 -0
- package/lib/guidance/materialize.js +191 -0
- package/lib/guidance/parse.js +80 -0
- package/lib/guidance/resolve.js +122 -0
- package/lib/guidance.js +6 -388
- package/lib/hash-store.js +1 -2
- package/lib/hashline/anchor-pipeline.js +23 -0
- package/lib/hashline/hash-assign.js +20 -0
- package/lib/hashline/index.js +4 -5
- package/lib/hashline/resolve.js +5 -0
- package/lib/index.js +1 -1
- package/lib/mutation.js +58 -0
- package/lib/read-and-serve.js +23 -23
- package/lib/served-store.js +1 -1
- package/lib/session-view.js +34 -0
- package/lib/tool-batch-edit.js +9 -10
- package/lib/tool-edit.js +9 -11
- package/lib/tool-read.js +3 -5
- package/lib/tool-undo.js +6 -6
- package/lib/types/contract.d.ts +31 -0
- package/lib/types/edit-engine.d.ts +2 -2
- package/lib/types/edit-pipeline.d.ts +2 -2
- package/lib/types/file-view.d.ts +74 -0
- package/lib/types/guidance/index.d.ts +8 -0
- package/lib/types/guidance/materialize.d.ts +23 -0
- package/lib/types/guidance/parse.d.ts +36 -0
- package/lib/types/guidance/resolve.d.ts +55 -0
- package/lib/types/guidance.d.ts +6 -127
- package/lib/types/hashline/anchor-pipeline.d.ts +26 -0
- package/lib/types/hashline/hash-assign.d.ts +19 -0
- package/lib/types/hashline/index.d.ts +7 -5
- package/lib/types/hashline/resolve.d.ts +5 -0
- package/lib/types/mutation.d.ts +78 -0
- package/lib/types/read-and-serve.d.ts +6 -5
- package/lib/types/session-view.d.ts +33 -0
- package/lib/write-hook.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,18 @@ Entries link to the originating spec issue in [pi-hashline-edit-lsz](https://git
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.3.0] - 2026-08-20
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- **BREAKING** — `edit` now requires `{ path, edits: [[remove_from, remove_to, replacement_text], ...] }` tuple payload (ADR-0003); `batch_edit` removed — single `edit` covers single and batched edits via `edits` arity (ADR-0007). `EDITS_MAX_ITEMS=32`, path nullable (`null` infers from anchors). Old top-level `{remove_from,remove_to,replacement_text}` shape now fails with `[E_BAD_SHAPE]`.
|
|
14
|
+
- Whitespace-insensitive anchors (ADR-0002): `canon()` strips all ASCII whitespace `[ \t\r\n]` (`CANON_VERSION=2`, memoized `getCanon`), snapshot cache versioned so pre-upgrade caches invalidate; formatter-only drift (prettier/black) no longer rotates anchors. String-internal whitespace caveat documented.
|
|
15
|
+
- Orphaned serve healing & served robustness (ADR-0004): `SessionView.patchServed` eagerly heals stale duplicates, `verifyServedRange` disambiguates candidate spans, truncation on rejection-echo/external-shrink ends the `E_RANGE_UNVERIFIED` self-loop.
|
|
16
|
+
- Hashline purity & store seams (ARCH C1-C4): `HashSnapshotIO` injection keeps hashing pure, `recordDiffServes` helper, one `applyOneEdit` composition, `DebouncedPreview` (150ms) extracted, noop-loop folded, per-domain stmt slices.
|
|
17
|
+
- Notices & prompts hygiene: Zed-style terse drift/noop/rejection notices (codes unchanged), lean guidelines (dedupe tool descriptions), tool schema descriptions trimmed to one-liners.
|
|
18
|
+
- README brooks-lint reorg + CONTEXT glossary merge: hook, shining points, Why Hashline before Tools, benchmark section referencing `pi-better-edit/benchmarks/results/` (same hashline algorithm).
|
|
19
|
+
|
|
20
|
+
|
|
9
21
|
## [0.2.2] - 2026-08-19
|
|
10
22
|
|
|
11
23
|
### Added
|