**Motivations:** - Centraliser les fichiers Cursor (rules, skills, agents, commands, hooks) par user et par projet **Root causes:** - N/A **Correctifs:** - N/A **Evolutions:** - desk: rules, skills-cursor, agents, commands, hooks, argv/hooks/mcp.json - ncantu: README placeholder - 4NK_node, algo, builazoo, ia_local, lecoffre_ng, lecoffre_ng_pprod, lecoffre_ng_test: .cursor contents **Pages affectées:** - cursor/desk/, cursor/ncantu/, cursor/<project>/
15 lines
508 B
Bash
Executable File
15 lines
508 B
Bash
Executable File
#!/bin/bash
|
|
# beforeShellExecution: log command, allow by default. Block dangerous patterns if needed.
|
|
HOOKS_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
# shellcheck source=lib.sh
|
|
. "${HOOKS_DIR}/lib.sh"
|
|
|
|
input=$(cat)
|
|
command=$(echo "$input" | jq -r '.command // ""')
|
|
cwd=$(echo "$input" | jq -r '.cwd // "?"')
|
|
log_event "beforeShellExecution" "cwd=$cwd cmd=${command:0:100}"
|
|
|
|
# Allow all commands by default. Add deny rules here if needed (e.g. rm -rf /, etc.)
|
|
echo '{"continue":true,"permission":"allow"}'
|
|
exit 0
|