#!/bin/bash
# SessionEnd hook - consolidate session and cleanup

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"

cd "$PROJECT_ROOT"

# Clear session memories (they expire anyway)
npx tsx src/index.ts cli clear --scope session 2>/dev/null || true