**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>/
19 lines
700 B
Bash
Executable File
19 lines
700 B
Bash
Executable File
#!/bin/bash
|
|
# postToolUseFailure: log when a tool fails (shell, etc.)
|
|
HOOKS_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
# shellcheck source=lib.sh
|
|
. "${HOOKS_DIR}/lib.sh"
|
|
|
|
input=$(cat)
|
|
tool_name=$(echo "$input" | jq -r '.tool_name // "?"')
|
|
failure_type=$(echo "$input" | jq -r '.failure_type // "?"')
|
|
error_message=$(echo "$input" | jq -r '.error_message // ""')
|
|
command=$(echo "$input" | jq -r '.tool_input.command // .tool_input // ""' 2>/dev/null || echo "")
|
|
log_event "postToolUseFailure" "tool=$tool_name failure=$failure_type"
|
|
log_json_truncated "postToolUseFailure_error" "$error_message" 500
|
|
if [ -n "$command" ]; then
|
|
log_event "postToolUseFailure" "command=${command:0:150}"
|
|
fi
|
|
echo '{}'
|
|
exit 0
|