"""Tool registration module.""" from __future__ import annotations from hermes.tools.base.registry import tool_registry from hermes.tools.code_analyzer import CodeAnalyzerTool from hermes.tools.documentation import DocumentationTool from hermes.tools.filesystem import FilesystemTool from hermes.tools.github import GitHubTool from hermes.tools.memory_tool import MemoryTool from hermes.tools.python_executor import PythonExecutionTool from hermes.tools.security_scanner import SecurityScannerTool from hermes.tools.taric_hts import HTSTool, TARICTool from hermes.tools.web_search import WebSearchTool _DEFAULT_TOOL_NAMES = frozenset({ "search_web", "github_repo_reader", "file_reader", "python_executor", "documentation_search", "memory_store", "security_scanner", "code_analyzer", "taric_lookup", "hts_lookup", }) def register_default_tools() -> None: """Register all default tools (idempotent — skips if already registered).""" if _DEFAULT_TOOL_NAMES.issubset(tool_registry.list_tools()): return from hermes.config.settings import get_settings settings = get_settings() tool_registry.register(WebSearchTool(api_key=settings.research.brave_api_key or None)) tool_registry.register(GitHubTool()) tool_registry.register(FilesystemTool()) tool_registry.register(PythonExecutionTool()) tool_registry.register(DocumentationTool()) tool_registry.register(MemoryTool()) tool_registry.register(SecurityScannerTool()) tool_registry.register(CodeAnalyzerTool()) tool_registry.register(TARICTool()) tool_registry.register(HTSTool())