#!/bin/sh
# session-hook.sh - guard launcher for the session ledger (macOS / Linux / WSL / git-bash).
# NO business logic lives here - everything is in session-ledger.js (one implementation,
# no twin to drift). If node is absent the hook exits 0 silently: the capability simply
# stays off (graceful degradation), it never breaks a session.
command -v node >/dev/null 2>&1 || exit 0
DIR=$(dirname "$0")
[ -f "$DIR/session-ledger.js" ] || exit 0
exec node "$DIR/session-ledger.js" "$@"
