claude-warden 2.3.2 → 2.4.0

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/dist/index.cjs CHANGED
@@ -20600,6 +20600,12 @@ function mergeNonLayerFields(config, raw) {
20600
20600
  }
20601
20601
  }
20602
20602
 
20603
+ // src/core.ts
20604
+ function wardenEvalWithConfig(command, config, cwd) {
20605
+ const parsed = parseCommand(command);
20606
+ return evaluate(parsed, config, cwd);
20607
+ }
20608
+
20603
20609
  // src/suggest.ts
20604
20610
  function generateAllowSnippet(details) {
20605
20611
  const lines = [];
@@ -20865,11 +20871,10 @@ async function main() {
20865
20871
  process.exit(0);
20866
20872
  }
20867
20873
  const config = loadConfig(input.cwd);
20874
+ const result = wardenEvalWithConfig(command, config, input.cwd);
20868
20875
  const yoloState = getYoloState(input.session_id);
20869
20876
  if (yoloState) {
20870
- const parsed2 = parseCommand(command);
20871
- const result2 = evaluate(parsed2, config, input.cwd);
20872
- if (result2.decision === "deny" && !yoloState.bypassDeny) {
20877
+ if (result.decision === "deny" && !yoloState.bypassDeny) {
20873
20878
  } else {
20874
20879
  const expiryInfo = yoloState.expiresAt ? `expires ${new Date(yoloState.expiresAt).toLocaleTimeString()}` : "full session";
20875
20880
  const output2 = {
@@ -20883,8 +20888,6 @@ async function main() {
20883
20888
  process.exit(0);
20884
20889
  }
20885
20890
  }
20886
- const parsed = parseCommand(command);
20887
- const result = evaluate(parsed, config, input.cwd);
20888
20891
  if (result.decision === "allow") {
20889
20892
  const output2 = {
20890
20893
  hookSpecificOutput: {
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "claude-warden",
3
- "version": "2.3.2",
3
+ "version": "2.4.0",
4
4
  "description": "Smart command safety filter for Claude Code — auto-approves safe commands, blocks dangerous ones",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
7
+ "bin": {
8
+ "warden": "dist/cli.cjs"
9
+ },
7
10
  "license": "MIT",
8
11
  "author": "banyudu",
9
12
  "repository": {
@@ -14,6 +17,8 @@
14
17
  "keywords": [
15
18
  "claude-code",
16
19
  "claude-code-plugin",
20
+ "copilot",
21
+ "copilot-cli",
17
22
  "safety",
18
23
  "security",
19
24
  "shell",
@@ -22,6 +27,7 @@
22
27
  "files": [
23
28
  "dist",
24
29
  ".claude-plugin",
30
+ ".github/hooks",
25
31
  "hooks",
26
32
  "config",
27
33
  "marketplace.json",
@@ -45,8 +51,9 @@
45
51
  "test:watch": "vitest",
46
52
  "typecheck": "tsc --noEmit",
47
53
  "eval": "node dist/index.cjs",
54
+ "warden": "node dist/cli.cjs",
48
55
  "codex:export-rules": "node dist/codex-export.cjs",
49
- "sync-plugin-version": "node -e \"const p=require('./package.json'),fs=require('fs'),f='.claude-plugin/plugin.json',j=JSON.parse(fs.readFileSync(f));j.version=p.version;fs.writeFileSync(f,JSON.stringify(j,null,2)+'\\n')\"",
56
+ "sync-plugin-version": "node scripts/sync-plugin-version.cjs",
50
57
  "release": "scripts/release.sh patch",
51
58
  "release:minor": "scripts/release.sh minor",
52
59
  "release:major": "scripts/release.sh major",