import deskclaw.adapters.nanoclaw as nanoclaw  # noqa: F401
import deskclaw.adapters.nanobot as nanobot  # noqa: F401
import deskclaw.adapters.openclaw_adapter as openclaw_adapter  # noqa: F401

from deskclaw.adapters.loader import AdapterLoader

_PROJECT_ROOT = __import__("pathlib").Path(__file__).resolve().parent.parent.parent.parent
_DEFAULT_ADAPTERS_DIR = str(_PROJECT_ROOT / "plugins" / "adapters")


def discover_dynamic_adapters(adapters_dir: str = _DEFAULT_ADAPTERS_DIR) -> list[str]:
    """Scan for and register YAML/Python adapter definitions at runtime."""
    return AdapterLoader.discover_and_register(adapters_dir)
