#!/usr/bin/env bash
# Wrapper that runs status.py inside the nostr-admin MCP venv (the SDK
# dependencies live there). Repo-relative — works from any cwd.
set -euo pipefail

here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
repo="$(cd "$here/../.." && pwd)"
venv_python="$repo/mcp_nostr_db/admin/mcp/.venv/bin/python"

if [[ ! -x "$venv_python" ]]; then
  echo "venv not found at $venv_python — bootstrap MCP first" >&2
  exit 2
fi

exec "$venv_python" "$here/status.py" "$@"
