Repository navigation
pi-snap-edit v4.0.0
pi-snap-edit v4.0.0
Breaking API cleanup release. Simplifies target_edit selectors and op types, improves quick_edit guard flexibility, and adds diagnostic fuzzy hints on edit failures.
Changes
target_editbreaking cleanup: removedoccurrence/count/positionparams. Replaced withline/rangeselectors andinsert_before/insert_afterop types. Removed top-levelscope.quick_edittrim guard: addedexpectedStartLineMatch: "trim"andpreserveIndent: trueto handle whitespace uncertainty without failing.- Diagnostic fuzzy hints: when
quick_editguard ortarget_edittarget fails to match, the tool now lists close matches with line numbers and snippets for faster retry. - Runtime validation:
lineandrangeselectors now validate integer/min/bounds/order. Unknown op types are explicitly rejected.
Breaking Changes
target_editno longer supportsoccurrence,count,position, or top-levelscope.target_editinsert+positionreplaced byinsert_beforeandinsert_after.
Install
pi install npm:pi-snap-editVerification
npm run typecheckpassed.npm testpassed (44 tests).git diff --checkpassed.npm pack --dry-runpassed.