"""Rakam Systems — modular AI framework."""

import sys
import importlib
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    import rakam_systems_core as core
    import rakam_systems_cli as cli
    import rakam_systems_agent as agents
    import rakam_systems_vectorstore as vectorstore
    import rakam_systems_tools as tools

_ALIASES: dict[str, str] = {
    "core": "rakam_systems_core",
    "agent": "rakam_systems_agent",
    "agents": "rakam_systems_agent",
    "cli": "rakam_systems_cli",
    "vectorstore": "rakam_systems_vectorstore",
    "tools": "rakam_systems_tools",
}

for _alias, _pkg in _ALIASES.items():
    try:
        _mod = importlib.import_module(_pkg)
        sys.modules[f"rakam_systems.{_alias}"] = _mod
        globals()[_alias] = _mod
    except ImportError:
        pass

__all__ = [k for k in _ALIASES if k in globals()]
