# SPDX-License-Identifier: AGPL-3.0-or-later | Commercial license available
# Â© Concepts 1996â€“2026 Miroslav Ĺ otek. All rights reserved.
# Â© Code 2020â€“2026 Miroslav Ĺ otek. All rights reserved.
# ORCID: 0009-0009-3560-0851
# Contact: www.anulum.li | protoscience@anulum.li
# Director-Class AI â€” Package Initialisation

"""Director-AI: Real-time LLM hallucination guardrail.

::

    from director_ai.core import CoherenceAgent, CoherenceScorer, HaltMonitor
"""

__version__ = "3.9.5"

from .core import (
    AsyncStreamingKernel,
    BatchProcessor,
    BatchResult,
    ChromaBackend,
    ClaimAttribution,
    ClaimVerdict,
    CoherenceAgent,
    CoherenceScore,
    CoherenceScorer,
    ColBERTBackend,
    ConversationSession,
    DataQualityReport,
    DatasetTypeClassifier,
    DirectorConfig,
    ElasticsearchBackend,
    EvidenceChunk,
    FAISSBackend,
    FinetuneConfig,
    FinetuneResult,
    GroundTruthStore,
    HaltEvidence,
    HaltMonitor,
    HybridBackend,
    InMemoryBackend,
    InputSanitizer,
    LiteScorer,
    LLMGenerator,
    MetaClassifier,
    MockGenerator,
    NLIScorer,
    PineconeBackend,
    QdrantBackend,
    RegressionReport,
    RerankedBackend,
    ReviewQueue,
    ReviewResult,
    SafetyKernel,
    SanitizeResult,
    ScoreCache,
    ScorerBackend,
    ScoringEvidence,
    SentenceTransformerBackend,
    ShardedNLIScorer,
    StreamingKernel,
    StreamSession,
    TokenEvent,
    TuneResult,
    Turn,
    VectorBackend,
    VectorGroundTruthStore,
    VerificationResult,
    VerifiedScorer,
    WeaviateBackend,
    benchmark_finetuned_model,
    clear_model_cache,
    export_onnx,
    export_tensorrt,
    finetune_nli,
    get_backend,
    get_vector_backend,
    list_backends,
    list_vector_backends,
    nli_available,
    register_backend,
    register_vector_backend,
    tune,
    validate_finetune_data,
)
from .core.exceptions import (
    CoherenceError,
    DependencyError,
    DirectorAIError,
    GeneratorError,
    HallucinationError,
    KernelHaltError,
    NumericalError,
    PhysicsError,
    ValidationError,
)
from .integrations.sdk_guard import get_score, guard, score

__all__ = [
    "AsyncStreamingKernel",
    "BatchProcessor",
    "BatchResult",
    "ChromaBackend",
    "ClaimAttribution",
    "ClaimVerdict",
    "CoherenceAgent",
    "CoherenceError",
    "CoherenceScore",
    "CoherenceScorer",
    "ColBERTBackend",
    "ConversationSession",
    "DataQualityReport",
    "DatasetTypeClassifier",
    "DependencyError",
    "DirectorAIError",
    "DirectorConfig",
    "ElasticsearchBackend",
    "EvidenceChunk",
    "FAISSBackend",
    "FinetuneConfig",
    "FinetuneResult",
    "GeneratorError",
    "GroundTruthStore",
    "HallucinationError",
    "HaltEvidence",
    "HaltMonitor",
    "HybridBackend",
    "InMemoryBackend",
    "InputSanitizer",
    "KernelHaltError",
    "LLMGenerator",
    "LiteScorer",
    "MetaClassifier",
    "MockGenerator",
    "NLIScorer",
    "NumericalError",
    "PhysicsError",
    "PineconeBackend",
    "QdrantBackend",
    "RegressionReport",
    "RerankedBackend",
    "ReviewQueue",
    "ReviewResult",
    "SafetyKernel",
    "SanitizeResult",
    "ScoreCache",
    "ScorerBackend",
    "ScoringEvidence",
    "SentenceTransformerBackend",
    "ShardedNLIScorer",
    "StreamSession",
    "StreamingKernel",
    "TokenEvent",
    "TuneResult",
    "Turn",
    "ValidationError",
    "VectorBackend",
    "VectorGroundTruthStore",
    "VerificationResult",
    "VerifiedScorer",
    "WeaviateBackend",
    "benchmark_finetuned_model",
    "clear_model_cache",
    "export_onnx",
    "export_tensorrt",
    "finetune_nli",
    "get_backend",
    "get_score",
    "get_vector_backend",
    "guard",
    "list_backends",
    "list_vector_backends",
    "nli_available",
    "register_backend",
    "register_vector_backend",
    "score",
    "tune",
    "validate_finetune_data",
]

_MOVED_TO_ENTERPRISE = {
    "TenantRouter",
    "Policy",
    "Violation",
    "AuditLogger",
    "AuditEntry",
}


def __getattr__(name: str):
    if name in _MOVED_TO_ENTERPRISE:
        raise ImportError(
            f"{name} moved to director_ai.enterprise in v3.0. "
            f"Use: from director_ai.enterprise import {name}",
        )
    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
