from . import models
from . import services


def _post_init_hook(env):
    """Run initial vector indexing after module install."""
    import logging
    _logger = logging.getLogger(__name__)
    try:
        from .services.indexer import index_all
        count = index_all(env)
        _logger.info("Post-init vector indexing complete: %d records", count)
    except Exception:
        _logger.warning(
            "Post-init vector indexing skipped (sentence-transformers may not be installed)",
            exc_info=True,
        )
