Initial: desk + ncantu placeholder + per-project cursor configs
**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>/
This commit is contained in:
18
desk/hooks/post-tool-use-failure.sh
Executable file
18
desk/hooks/post-tool-use-failure.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user