"""GEO 业务工具注册 - 统一注册入口""" import logging from agentkit.tools.registry import ToolRegistry from app.agent_framework.tools.citation_tools import register_citation_tools from app.agent_framework.tools.content_tools import register_content_tools from app.agent_framework.tools.monitor_tools import register_monitor_tools from app.agent_framework.tools.schema_tools import register_schema_tools from app.agent_framework.tools.competitor_tools import register_competitor_tools from app.agent_framework.tools.trend_tools import register_trend_tools from app.agent_framework.tools.knowledge_tools import register_knowledge_tools logger = logging.getLogger(__name__) _REGISTRY: ToolRegistry | None = None def get_tool_registry() -> ToolRegistry: """获取全局 ToolRegistry(懒初始化)""" global _REGISTRY if _REGISTRY is None: _REGISTRY = ToolRegistry() register_all_tools(_REGISTRY) return _REGISTRY def register_all_tools(registry: ToolRegistry) -> None: """注册所有业务工具""" register_citation_tools(registry) register_content_tools(registry) register_monitor_tools(registry) register_schema_tools(registry) register_competitor_tools(registry) register_trend_tools(registry) register_knowledge_tools(registry) logger.info("All GEO business tools registered")