autoworkflow 3.10.0 → 3.11.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.
|
@@ -9,8 +9,15 @@
|
|
|
9
9
|
# Project directory (use env var if set, otherwise current directory)
|
|
10
10
|
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-.}"
|
|
11
11
|
|
|
12
|
-
#
|
|
13
|
-
|
|
12
|
+
# Read JSON input from stdin (Claude Code hooks pass data via stdin)
|
|
13
|
+
INPUT_JSON=$(cat)
|
|
14
|
+
|
|
15
|
+
# Extract command from JSON
|
|
16
|
+
if echo "$INPUT_JSON" | grep -q '"command"'; then
|
|
17
|
+
TOOL_INPUT=$(echo "$INPUT_JSON" | grep -o '"command"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/"command"[[:space:]]*:[[:space:]]*"//' | sed 's/"$//')
|
|
18
|
+
else
|
|
19
|
+
TOOL_INPUT="$INPUT_JSON"
|
|
20
|
+
fi
|
|
14
21
|
|
|
15
22
|
# Check if this was a git commit command
|
|
16
23
|
if echo "$TOOL_INPUT" | grep -qE "git\s+commit"; then
|
|
@@ -6,7 +6,16 @@
|
|
|
6
6
|
# This router determines what checks to run based on the command being executed
|
|
7
7
|
# It also enforces task-type-aware restrictions (similar to Serena's mode switching)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
# Read JSON input from stdin (Claude Code hooks pass data via stdin)
|
|
10
|
+
INPUT_JSON=$(cat)
|
|
11
|
+
|
|
12
|
+
# Extract command from JSON - handle both formats:
|
|
13
|
+
# {"tool_input":{"command":"..."}} or just the command string
|
|
14
|
+
if echo "$INPUT_JSON" | grep -q '"command"'; then
|
|
15
|
+
TOOL_INPUT=$(echo "$INPUT_JSON" | grep -o '"command"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/"command"[[:space:]]*:[[:space:]]*"//' | sed 's/"$//')
|
|
16
|
+
else
|
|
17
|
+
TOOL_INPUT="$INPUT_JSON"
|
|
18
|
+
fi
|
|
10
19
|
|
|
11
20
|
# Colors
|
|
12
21
|
RED='\033[0;31m'
|
package/.claude/settings.json
CHANGED
|
@@ -11,9 +11,8 @@
|
|
|
11
11
|
"hooks": [
|
|
12
12
|
{
|
|
13
13
|
"type": "command",
|
|
14
|
-
"command": "
|
|
15
|
-
"timeout": 10
|
|
16
|
-
"statusMessage": "Checking project state..."
|
|
14
|
+
"command": ".claude/hooks/session-check.sh",
|
|
15
|
+
"timeout": 10
|
|
17
16
|
}
|
|
18
17
|
]
|
|
19
18
|
}
|
|
@@ -24,9 +23,8 @@
|
|
|
24
23
|
"hooks": [
|
|
25
24
|
{
|
|
26
25
|
"type": "command",
|
|
27
|
-
"command": "
|
|
28
|
-
"timeout": 5
|
|
29
|
-
"statusMessage": "Checking plan approval..."
|
|
26
|
+
"command": ".claude/hooks/pre-edit.sh",
|
|
27
|
+
"timeout": 5
|
|
30
28
|
}
|
|
31
29
|
]
|
|
32
30
|
},
|
|
@@ -35,9 +33,8 @@
|
|
|
35
33
|
"hooks": [
|
|
36
34
|
{
|
|
37
35
|
"type": "command",
|
|
38
|
-
"command": "
|
|
39
|
-
"timeout": 300
|
|
40
|
-
"statusMessage": "Checking workflow gates..."
|
|
36
|
+
"command": ".claude/hooks/pre-tool-router.sh",
|
|
37
|
+
"timeout": 300
|
|
41
38
|
}
|
|
42
39
|
]
|
|
43
40
|
}
|
|
@@ -48,9 +45,8 @@
|
|
|
48
45
|
"hooks": [
|
|
49
46
|
{
|
|
50
47
|
"type": "command",
|
|
51
|
-
"command": "
|
|
52
|
-
"timeout": 120
|
|
53
|
-
"statusMessage": "Running verification..."
|
|
48
|
+
"command": ".claude/hooks/post-edit.sh",
|
|
49
|
+
"timeout": 120
|
|
54
50
|
}
|
|
55
51
|
]
|
|
56
52
|
},
|
|
@@ -59,9 +55,8 @@
|
|
|
59
55
|
"hooks": [
|
|
60
56
|
{
|
|
61
57
|
"type": "command",
|
|
62
|
-
"command": "
|
|
63
|
-
"timeout": 30
|
|
64
|
-
"statusMessage": "Checking post-command actions..."
|
|
58
|
+
"command": ".claude/hooks/post-bash-router.sh",
|
|
59
|
+
"timeout": 30
|
|
65
60
|
}
|
|
66
61
|
]
|
|
67
62
|
}
|
|
@@ -25,7 +25,13 @@
|
|
|
25
25
|
"WebFetch(domain:apidog.com)",
|
|
26
26
|
"WebFetch(domain:mcpservers.org)",
|
|
27
27
|
"WebFetch(domain:oraios.github.io)",
|
|
28
|
-
"Bash(bash:*)"
|
|
28
|
+
"Bash(bash:*)",
|
|
29
|
+
"Bash(CLAUDE_PROJECT_DIR=\".\" ./.claude/hooks/session-check.sh:*)",
|
|
30
|
+
"Bash(claude:*)",
|
|
31
|
+
"WebFetch(domain:raw.githubusercontent.com)",
|
|
32
|
+
"Bash(./.claude/hooks/pre-tool-router.sh:*)",
|
|
33
|
+
"Bash(./.claude/hooks/session-check.sh:*)",
|
|
34
|
+
"Bash(CLAUDE_PROJECT_DIR=\".\" bash:*)"
|
|
29
35
|
]
|
|
30
36
|
}
|
|
31
37
|
}
|