Files
Neo-ZQYY/.cursor/hooks.json
2026-05-02 03:11:39 +08:00

46 lines
1.2 KiB
JSON

{
"version": 1,
"hooks": {
"preToolUse": [
{
"command": ".venv\\Scripts\\python.exe .cursor\\hooks\\ai_env_guard.py preToolUse",
"matcher": "Read|Glob|Edit|Write|ApplyPatch",
"timeout": 5,
"failClosed": true
}
],
"beforeReadFile": [
{
"command": ".venv\\Scripts\\python.exe .cursor\\hooks\\ai_env_guard.py beforeReadFile",
"matcher": "_archived",
"timeout": 5,
"failClosed": true
}
],
"beforeMCPExecution": [
{
"command": ".venv\\Scripts\\python.exe .cursor\\hooks\\ai_env_guard.py beforeMCPExecution",
"matcher": "pg-etl|pg-app",
"timeout": 5,
"failClosed": false
}
],
"beforeShellExecution": [
{
"command": ".venv\\Scripts\\python.exe .cursor\\hooks\\ai_env_guard.py beforeShellExecution",
"matcher": "git\\s+(reset|checkout)|--no-verify|psql|mcp-postgres|PG_DSN|APP_DB_DSN",
"timeout": 5,
"failClosed": false
}
],
"postToolUse": [
{
"command": ".venv\\Scripts\\python.exe .cursor\\hooks\\ai_env_guard.py postToolUse",
"matcher": "ApplyPatch|Edit|Write",
"timeout": 5,
"failClosed": false
}
]
}
}