import importlib

from .basetools import all_tools, ToolEntry, llm_tools, enabled_tools, tool_functions
from ..setup_logging import setup_logging
from .. import defines

logger = setup_logging(level=defines.logging_level)

# Dynamically import all names from basetools listed in tools_all
module = importlib.import_module(".basetools", package=__package__)
for name in tool_functions:
    globals()[name] = getattr(module, name)

__all__ = ["all_tools", "ToolEntry", "llm_tools", "enabled_tools", "tool_functions"]
