"""MCAL Core Components"""

from .models import (
    DecisionTrail,
    IntentGraph,
    IntentNode,
    IntentStatus,
    IntentType,
    Memory,
    MemoryType,
    RetrievalConfig,
    RetrievalResult,
    Session,
)
from .goal_retriever import ContextAssembler
from .storage import MCALStorage, SQLiteStorage, StorageBackend, migrate_json_to_sqlite
from .extraction_cache import ExtractionCache, CacheStats, ExtractionState
from .unified_extractor import (
    UnifiedExtractor,
    UnifiedGraph,
    GraphNode,
    GraphEdge,
    NodeType,
    EdgeType,
    DeduplicationStrategy,
    DeduplicationStats,
    CompactionPolicy,
    CompactionEvent,
    EXTRACTION_PROFILES,
    VALID_PROFILES,
    graph_to_memories,
    memories_to_context_string,
)
from .streaming import (
    StreamEvent,
    StreamEventType,
    ExtractionPhase,
    StreamProgress,
    CacheHitInfo,
    PhaseResult,
)
from .embeddings import (
    EmbeddingService,
    embed_graph_nodes,
    embedding_to_bytes,
    bytes_to_embedding,
    embedding_to_base64,
    base64_to_embedding,
    get_embedding_model,
    clear_embedding_model,
)
from .vector_index import VectorIndex, build_index_from_nodes
from .chunk_store import ChunkStore, TextChunk
from .complexity_classifier import (
    TurnComplexityClassifier,
    ComplexityLevel,
    ClassificationResult,
)
from .tiered_routing import TieredLLMClient, RoutingMetrics, DEFAULT_TIERED_MODELS

__all__ = [
    "DecisionTrail",
    "IntentGraph",
    "IntentNode",
    "IntentStatus",
    "IntentType",
    "Memory",
    "MemoryType",
    "RetrievalConfig",
    "RetrievalResult",
    "Session",
    "ContextAssembler",
    "MCALStorage",
    "SQLiteStorage",
    "StorageBackend",
    "migrate_json_to_sqlite",
    "ExtractionCache",
    "CacheStats",
    "ExtractionState",
    # Unified Extractor (optimized)
    "UnifiedExtractor",
    "UnifiedGraph",
    "GraphNode",
    "GraphEdge",
    "NodeType",
    "EdgeType",
    "CompactionPolicy",
    "CompactionEvent",
    "EXTRACTION_PROFILES",
    "VALID_PROFILES",
    "graph_to_memories",
    "memories_to_context_string",
    # Streaming
    "StreamEvent",
    "StreamEventType",
    "ExtractionPhase",
    "StreamProgress",
    "CacheHitInfo",
    "PhaseResult",
    # Embeddings (Issue #50)
    "EmbeddingService",
    "embed_graph_nodes",
    "embedding_to_bytes",
    "bytes_to_embedding",
    "embedding_to_base64",
    "base64_to_embedding",
    "get_embedding_model",
    "clear_embedding_model",
    # Vector Search (Issue #51)
    "VectorIndex",
    "build_index_from_nodes",
    # Chunk Store (Issue #138)
    "ChunkStore",
    "TextChunk",
    # Tiered Model Routing (Issue #124)
    "TurnComplexityClassifier",
    "ComplexityLevel",
    "ClassificationResult",
    "TieredLLMClient",
    "RoutingMetrics",
    "DEFAULT_TIERED_MODELS",
]
