#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.12"
# dependencies = [
#   "fastapi>=0.115",
#   "mcp>=1.28",
#   "pydantic>=2.11",
#   "pydantic-settings>=2.4",
#   "tiktoken>=0.13.0",
#   "uvicorn>=0.30",
#   "watchfiles>=1.2.0",
# ]
# ///
"""On-PATH MCP-server entry for the cc-session-explorer plugin's `bin/`.

Loads ``cc_session_explorer`` from this plugin's bundled ``src/``, and
``cc_session_core`` from a sibling ``cc-session-core`` checkout next to this
plugin's own root (both resolved relative to this file, not CLAUDE_PLUGIN_ROOT).
cc-session-core isn't published to PyPI yet, so this assumes the monorepo-siblings
layout used in development: cc-session-core/ and cc-session-explorer/ cloned side
by side. Once cc-session-core is published, drop the second sys.path insert and
add it to the ``dependencies`` list above instead.
"""
import sys
from pathlib import Path

_ROOT = Path(__file__).resolve().parent.parent
sys.path.insert(0, str(_ROOT / "src"))
sys.path.insert(0, str(_ROOT.parent / "cc-session-core" / "src"))

from cc_session_explorer.mcp.server import main  # noqa: E402

if __name__ == "__main__":
    main()
