**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>/
21 lines
812 B
Bash
Executable File
21 lines
812 B
Bash
Executable File
#!/bin/bash
|
|
# afterShellExecution: log command output (truncated), useful for lint runs
|
|
HOOKS_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
# shellcheck source=lib.sh
|
|
. "${HOOKS_DIR}/lib.sh"
|
|
|
|
input=$(cat)
|
|
command=$(echo "$input" | jq -r '.command // ""')
|
|
duration=$(echo "$input" | jq -r '.duration // 0')
|
|
output=$(echo "$input" | jq -r '.tool_output // .command_output // ""' 2>/dev/null || echo "$input" | jq -r '.command_output // ""' 2>/dev/null)
|
|
# Some hooks use tool_output, others command_output - try both
|
|
if [ -z "$output" ]; then
|
|
output=$(echo "$input" | jq -r '.tool_output // ""' 2>/dev/null)
|
|
fi
|
|
log_event "afterShellExecution" "cmd=${command:0:80} duration=${duration}ms"
|
|
if [ -n "$output" ] && [ ${#output} -gt 0 ]; then
|
|
log_json_truncated "afterShellExecution_output" "$output" 400
|
|
fi
|
|
echo '{}'
|
|
exit 0
|