#!/usr/bin/env bash
# Append a JSONL usage line (local only). Requires jq when passing structured payload.
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
LOG="${ROOT}/telemetry/usage.jsonl"
mkdir -p "$(dirname "$LOG")"
echo "{\"ts\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\",\"event\":\"${1:-note}\",\"detail\":\"${2:-}\"}" >>"$LOG"
