from __future__ import annotations

import sys
from pathlib import Path

_agent_root = Path(__file__).resolve().parents[3]
if str(_agent_root) not in sys.path:
    sys.path.insert(0, str(_agent_root))
_src = _agent_root / "src"
if _src.exists() and str(_src) not in sys.path:
    sys.path.insert(0, str(_src))


def main() -> int:
    argv = ["reindex", *sys.argv[1:]]
    from tests.pipeline_setup.suite_02_pipeline.pipeline_intent_rag.cli import main as cli_main

    return cli_main(argv)


if __name__ == "__main__":
    raise SystemExit(main())
