"""
组件层初始化模块

提供所有组件类型的统一导入接口
"""

from .agents.base import (
    BaseComponent,
    BaseAgent,
    BaseLLMAgent,
    BaseReactAgent,
    BaseGraphAgent
)


# 自动导入所有工具模块（这会触发工具注册）
from . import tools

from .tools.base import (
    BaseToolComponent,
    SimpleTool,
    AsyncTool,
    ConfigurableTool,
    ToolRegistry,
    tool_registry,
    component_tool
)

from .functions.base import (
    BaseFunction,
    SimpleFunction,
    ConfigurableFunction,
    PipelineFunction,
    ConditionalFunction,
    FunctionRegistry,
    function_registry,
    component_function,
    create_simple_function,
    create_configurable_function,
    create_pipeline
)

from .functions.json_utils import (
    JSONParseError,
    JsonSafeParseFunction,
    safe_json_parse,
    batch_json_parse,
    validate_json_structure
)

__all__ = [
    # Base classes
    "BaseComponent",
    "BaseAgent",
    "BaseLLMAgent",
    "BaseReactAgent",
    "BaseGraphAgent",
    "BaseToolComponent",
    "SimpleTool",
    "AsyncTool",
    "ConfigurableTool",
    "BaseFunction",
    "SimpleFunction",
    "ConfigurableFunction",
    "PipelineFunction",
    "ConditionalFunction",
    
    # Agent implementations
    "PersonaAnalysisAgent",
    "DeconstructionAgent",
    "ValidationAgent",
    "create_persona_analysis_agent",
    "create_deconstruction_agent",
    "create_validation_agent",
    "persona_analysis_node",
    "deconstruction_node",
    "validation_node",
    "validation_router",
    
    # Registries
    "ToolRegistry",
    "tool_registry",
    "FunctionRegistry",
    "function_registry",
    
    # Decorators and utilities
    "component_tool",
    "component_function",
    "create_simple_function",
    "create_configurable_function",
    "create_pipeline",
    
    # JSON utilities
    "JSONParseError",
    "JsonSafeParseFunction",
    "safe_json_parse",
    "batch_json_parse",
    "validate_json_structure"
]