pi-tool-repair 0.1.0 → 0.1.1

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
@@ -40,6 +40,12 @@ Reverse-engineered from [Command Code](https://commandcode.ai/)'s tool parsing p
40
40
  pi install https://github.com/monotykamary/pi-tool-repair
41
41
  ```
42
42
 
43
+ **With npm**:
44
+
45
+ ```bash
46
+ npm install pi-tool-repair
47
+ ```
48
+
43
49
  **Manual** — add to `~/.pi/agent/settings.json`:
44
50
 
45
51
  ```json
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-tool-repair",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Validate-then-repair extension for pi — fixes common LLM tool-call mistakes (null fields, stringified arrays, wrong field names, anchor bleed) before tools execute",
5
5
  "type": "module",
6
6
  "author": "Tom X Nguyen",
@@ -1,6 +1,6 @@
1
1
  import { existsSync, readFileSync } from "node:fs";
2
- import { homedir } from "node:os";
3
2
  import { join } from "node:path";
3
+ import { getAgentDir } from "@earendil-works/pi-coding-agent";
4
4
 
5
5
  export const GRAMMAR_NAMES = [
6
6
  "dsml",
@@ -109,7 +109,7 @@ export function loadGrammarRepairConfig(path = defaultConfigPath()): GrammarRepa
109
109
  }
110
110
 
111
111
  export function defaultConfigPath(): string {
112
- return join(homedir(), ".pi", "agent", "extensions", "pi-tool-repair.json");
112
+ return join(getAgentDir(), "extensions", "pi-tool-repair.json");
113
113
  }
114
114
 
115
115
  export function normalizeGrammarRepairConfig(raw: Partial<GrammarRepairConfig> = {}): GrammarRepairConfig {