"""Web layer of the Real Estate & Infrastructure Agent (v21). This package is the Hugging Face Spaces deployment of the program: - :mod:`web.routes` — form-driven adapters over the EXISTING route logic (``scripts/*.py``); nothing is re-implemented here, and every status the scripts report (``LIVE`` / ``PARTIAL_LIVE`` / ``NO_LIVE_MARKET_DATA``, ``COMPLETE`` / ``PARTIAL`` / ``FAILED``, ``PASS`` / ``CONDITIONAL`` / ``BLOCKED`` …) is surfaced verbatim. - :mod:`web.email_delivery` — sends a generated document to the person who asked for it through AWS SES, and notifies RailNexus with the requester's name and e-mail ONLY. No database, no log file, no persistence of any kind. - :mod:`web.ui` — the Gradio interface (``space_app.py`` launches it). The package lives outside ``scripts/`` on purpose: the descriptor tests (``tests/test_v16.py``) assert that ``scripts/*.py`` equals the declared validation-script set, and ``app.py`` (the route-selective prompt builder) injects every ``scripts/*.py`` docstring into the system prompt. """ from __future__ import annotations import sys from pathlib import Path ROOT = Path(__file__).resolve().parent.parent SCRIPTS_DIR = ROOT / "scripts" # The scripts import each other by bare module name (``from agent_version # import AGENT_VERSION``), exactly as the tests do; make them importable once. if str(SCRIPTS_DIR) not in sys.path: sys.path.insert(0, str(SCRIPTS_DIR)) from agent_version import AGENT_VERSION # noqa: E402 __all__ = ["AGENT_VERSION", "ROOT", "SCRIPTS_DIR"]