"""
PromptShield detection engine — four layers.

Lazy import pattern: individual engine modules (patterns, heuristics,
semantic, layer4_linguistic) have no hard dependencies beyond the stdlib
and optional scikit-learn. They can be imported without pydantic.

The orchestrating `scan()` function lives in scanner.py and does require
pydantic (via models.schemas). It is imported lazily here so that the
SDK middleware can load the detection modules independently.
"""

from __future__ import annotations
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from .scanner import scan  # IDE type hints only — not executed at runtime

__all__ = ["scan"]


def scan(*args, **kwargs):
    """
    Lazy wrapper around scanner.scan().
    Imported on first call so pydantic is only required when scanner is used.
    """
    from .scanner import scan as _scan
    return _scan(*args, **kwargs)
