pi-hashline-edit-pro 0.3.4 → 0.3.6

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/README.md CHANGED
@@ -17,11 +17,15 @@ This fork makes two changes that compound:
17
17
 
18
18
  ## Installation
19
19
 
20
+ From npm:
21
+
20
22
  ```bash
21
- # From npm
22
23
  pi install npm:pi-hashline-edit-pro
24
+ ```
23
25
 
24
- # From a local checkout
26
+ From a local checkout:
27
+
28
+ ```bash
25
29
  pi install /path/to/pi-hashline-edit-pro
26
30
  ```
27
31
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-hashline-edit-pro",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "description": "Strict hashline read/edit tool override for pi-coding-agent with hash-anchored edits (4-char, 24-bit)",
5
5
  "repository": {
6
6
  "type": "git",
package/src/edit.ts CHANGED
@@ -322,7 +322,7 @@ async function executeEditPipeline(
322
322
  : [];
323
323
 
324
324
  if (toolEdits.length === 0) {
325
- throw new Error("No edits provided.");
325
+ throw new Error("[E_BAD_SHAPE] Edit request requires a non-empty \"edits\" array.");
326
326
  }
327
327
 
328
328
  throwIfAborted(signal);
@@ -157,7 +157,7 @@ function assertEditItem(edit: Record<string, unknown>, index: number): void {
157
157
  `[E_BAD_OP] Edit ${index} uses unknown op "${edit.op}". Expected "replace", "append", or "prepend".`,
158
158
  );
159
159
  }
160
- if ("pos" in edit && typeof edit.pos !== "string") {
160
+ if ("pos" in edit && typeof edit.pos !== "string" && edit.op !== "replace") {
161
161
  throw new Error(
162
162
  `[E_BAD_SHAPE] Edit ${index} field "pos" must be a string when provided.`,
163
163
  );