mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-07 02:58:02 +00:00
- Remove shell:true from CJS hook npx fallback, use npx.cmd on Windows - Use sendHookResponse() consistently in both hook variants - Fix setup.ts path escaping with JSON.stringify for safe interpolation - Add path.isAbsolute(cwd) guards against crafted stdin input - Reduce PreToolUse CLI timeout from 8s to 7s - Truncate debug error messages to 200 chars - Add 73 regression tests covering shell injection, cwd validation, dispatch routing, staleness detection, and cross-platform spawning
30 lines
685 B
JSON
30 lines
685 B
JSON
{
|
|
"hooks": {
|
|
"PreToolUse": [
|
|
{
|
|
"matcher": "Grep|Glob|Bash",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/gitnexus-hook.js",
|
|
"timeout": 10,
|
|
"statusMessage": "Enriching with GitNexus graph context..."
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"PostToolUse": [
|
|
{
|
|
"matcher": "Bash",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/gitnexus-hook.js",
|
|
"timeout": 10,
|
|
"statusMessage": "Checking GitNexus index freshness..."
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|