@melihmucuk/leash 1.0.1 → 1.0.2

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 +1 -1
  2. package/bin/lib.js +7 -7
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -61,7 +61,7 @@ Add to `~/.config/opencode/opencode.json` (or `opencode.jsonc` if you use that):
61
61
 
62
62
  ```json
63
63
  {
64
- "plugins": ["<path from leash --path opencode>"]
64
+ "plugin": ["<path from leash --path opencode>"]
65
65
  }
66
66
  ```
67
67
 
package/bin/lib.js CHANGED
@@ -10,18 +10,18 @@ export const PLATFORMS = {
10
10
  ],
11
11
  distPath: "opencode/leash.js",
12
12
  setup: (config, leashPath) => {
13
- config.plugins = config.plugins || [];
14
- if (config.plugins.some((p) => p.includes("leash"))) {
13
+ config.plugin = config.plugin || [];
14
+ if (config.plugin.some((p) => p.includes("leash"))) {
15
15
  return { skipped: true };
16
16
  }
17
- config.plugins.push(leashPath);
17
+ config.plugin.push(leashPath);
18
18
  return { skipped: false };
19
19
  },
20
20
  remove: (config) => {
21
- if (!config.plugins) return false;
22
- const before = config.plugins.length;
23
- config.plugins = config.plugins.filter((p) => !p.includes("leash"));
24
- return config.plugins.length < before;
21
+ if (!config.plugin) return false;
22
+ const before = config.plugin.length;
23
+ config.plugin = config.plugin.filter((p) => !p.includes("leash"));
24
+ return config.plugin.length < before;
25
25
  },
26
26
  },
27
27
  pi: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melihmucuk/leash",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "description": "Security guardrails for AI coding agents",
6
6
  "bin": {