"""
Cognitive features for Toxo layers.

This module provides advanced cognitive capabilities including
self-improvement, meta-learning, autonomous optimization, and
enterprise-grade retrieval-augmented generation.
"""

try:
    from .self_improvement import (
        SelfImprovementEngine,
        PerformanceMonitor,
        StrategyEngine,
        MetaLearner,
        PerformanceMetric,
        ImprovementStrategy,
        OptimizationGoal,
    )
except Exception:
    SelfImprovementEngine = None
    PerformanceMonitor = None
    StrategyEngine = None
    MetaLearner = None
    PerformanceMetric = None
    ImprovementStrategy = None
    OptimizationGoal = None

# Advanced RAG system (optional heavy deps)
try:
    from .advanced_rag import (
        AdvancedRAGSystem,
        QueryProcessor,
        AdvancedRetriever,
        ResultRanker,
        ContextCompressor,
        RetrievalStrategy,
        FusionMethod,
        RetrievalQuery,
        RetrievalResult,
        RAGResponse,
        create_advanced_rag_system,
    )
except Exception:
    AdvancedRAGSystem = None
    QueryProcessor = None
    AdvancedRetriever = None
    ResultRanker = None
    ContextCompressor = None
    RetrievalStrategy = None
    FusionMethod = None
    RetrievalQuery = None
    RetrievalResult = None
    RAGResponse = None
    create_advanced_rag_system = None

# Phase 2: Advanced Feedback Learning System (optional heavy deps)
try:
    from .advanced_feedback_learning import (
        AdvancedFeedbackLearningSystem,
        FeedbackInstance,
        PreferenceComparison,
        AdaptationTrigger,
        BradleyTerryModel,
        DeepPreferenceNetwork,
        MultiArmedBandit,
        ConceptDriftDetector,
        FeedbackType,
        LearningStrategy,
        create_advanced_feedback_learning_system,
    )
except Exception:
    AdvancedFeedbackLearningSystem = None
    FeedbackInstance = None
    PreferenceComparison = None
    AdaptationTrigger = None
    BradleyTerryModel = None
    DeepPreferenceNetwork = None
    MultiArmedBandit = None
    ConceptDriftDetector = None
    FeedbackType = None
    LearningStrategy = None
    create_advanced_feedback_learning_system = None

__all__ = [
    # Self-improvement components
    "SelfImprovementEngine",
    "PerformanceMonitor", 
    "StrategyEngine",
    "MetaLearner",
    "PerformanceMetric",
    "ImprovementStrategy",
    "OptimizationGoal",
    
    # Advanced RAG system
    "AdvancedRAGSystem",
    "QueryProcessor",
    "AdvancedRetriever",
    "ResultRanker",
    "ContextCompressor",
    "RetrievalStrategy",
    "FusionMethod",
    "RetrievalQuery",
    "RetrievalResult",
    "RAGResponse",
    "create_advanced_rag_system",
    
    # Phase 2: Advanced Feedback Learning
    "AdvancedFeedbackLearningSystem",
    "FeedbackInstance",
    "PreferenceComparison",
    "AdaptationTrigger",
    "BradleyTerryModel",
    "DeepPreferenceNetwork",
    "MultiArmedBandit",
    "ConceptDriftDetector",
    "FeedbackType",
    "LearningStrategy",
    "create_advanced_feedback_learning_system"
] 