@melihmucuk/leash 1.0.8 → 1.0.9

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.
Files changed (3) hide show
  1. package/README.md +4 -3
  2. package/bin/lib.js +7 -7
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -23,6 +23,7 @@ AI agents can hallucinate dangerous commands. Leash sandboxes them:
23
23
  <img height="400" alt="image" src="https://github.com/user-attachments/assets/94f0a4e5-db6c-4b14-bddd-b8984c51ed3d" />
24
24
 
25
25
  Links:
26
+
26
27
  1. [Claude CLI deleted my entire home directory (Dec 8th 2025)](https://www.reddit.com/r/ClaudeAI/comments/1pgxckk/claude_cli_deleted_my_entire_home_directory_wiped/)
27
28
  2. [Google Antigravity just deleted my drive (Nov 27th 2025)](https://www.reddit.com/r/google_antigravity/comments/1p82or6/google_antigravity_just_deleted_the_contents_of/)
28
29
 
@@ -56,13 +57,13 @@ Restart your agent. Done!
56
57
 
57
58
  If you prefer manual configuration, use `leash --path <platform>` to get the path and add it to your config file.
58
59
 
59
- **Pi Coding Agent** - [docs](https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/docs/hooks.md)
60
+ **Pi Coding Agent** - [docs](https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/docs/extensions.md)
60
61
 
61
62
  Add to `~/.pi/agent/settings.json`:
62
63
 
63
64
  ```json
64
65
  {
65
- "hooks": ["<path from leash --path pi>"]
66
+ "extensions": ["<path from leash --path pi>"]
66
67
  }
67
68
  ```
68
69
 
@@ -328,7 +329,7 @@ Near-zero latency impact on your workflow:
328
329
  | Platform | Latency per tool call | Notes |
329
330
  | ----------- | --------------------- | ---------------------------------------- |
330
331
  | OpenCode | **~20µs** | In-process plugin, near-zero overhead |
331
- | Pi | **~20µs** | In-process hook, near-zero overhead |
332
+ | Pi | **~20µs** | In-process extension, near-zero overhead |
332
333
  | Claude Code | **~31ms** | External process (~30ms Node.js startup) |
333
334
  | Factory | **~31ms** | External process (~30ms Node.js startup) |
334
335
 
package/bin/lib.js CHANGED
@@ -29,18 +29,18 @@ export const PLATFORMS = {
29
29
  configPath: ".pi/agent/settings.json",
30
30
  distPath: "pi/leash.js",
31
31
  setup: (config, leashPath) => {
32
- config.hooks = config.hooks || [];
33
- if (config.hooks.some((h) => h.includes("leash"))) {
32
+ config.extensions = config.extensions || [];
33
+ if (config.extensions.some((e) => e.includes("leash"))) {
34
34
  return { skipped: true };
35
35
  }
36
- config.hooks.push(leashPath);
36
+ config.extensions.push(leashPath);
37
37
  return { skipped: false };
38
38
  },
39
39
  remove: (config) => {
40
- if (!config.hooks) return false;
41
- const before = config.hooks.length;
42
- config.hooks = config.hooks.filter((h) => !h.includes("leash"));
43
- return config.hooks.length < before;
40
+ if (!config.extensions) return false;
41
+ const before = config.extensions.length;
42
+ config.extensions = config.extensions.filter((e) => !e.includes("leash"));
43
+ return config.extensions.length < before;
44
44
  },
45
45
  },
46
46
  "claude-code": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melihmucuk/leash",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "type": "module",
5
5
  "description": "Security guardrails for AI coding agents",
6
6
  "bin": {
@@ -49,7 +49,7 @@
49
49
  "build:factory": "esbuild packages/factory/leash.ts --bundle --outfile=dist/factory/leash.js --platform=node --format=esm"
50
50
  },
51
51
  "devDependencies": {
52
- "@mariozechner/pi-coding-agent": "^0.31.0",
52
+ "@mariozechner/pi-coding-agent": "^0.36.0",
53
53
  "@opencode-ai/plugin": "^1.0.224",
54
54
  "@types/node": "^22.19.3",
55
55
  "esbuild": "^0.27.2",