#!/bin/zsh
# Wrapper script that runs the vibe-rag CLI via uv from the repository root.
# Used by .mcp.json and .claude/settings.json hooks so the MCP server and
# session-start hook resolve the correct project directory regardless of the
# caller's working directory.

set -euo pipefail

script_dir=${0:A:h}
repo_root=${script_dir:h}

exec uv run --directory "$repo_root" vibe-rag "$@"
