"""Check registry and auto-import system."""

from __future__ import annotations

# Import registry and decorator for external use
from ai_qa.checks.registry import CheckRegistry, get_check, list_checks, register

# Auto-import all built-in checks
# This ensures all @register decorators are executed on module load

# Deterministic checks
from ai_qa.checks.json_format import JsonFormatCheck
from ai_qa.checks.length import LengthCheck
from ai_qa.checks.regex import RegexCheck
from ai_qa.checks.schema import SchemaCheck

# LLM-powered checks
from ai_qa.checks.consistency import ConsistencyCheck
from ai_qa.checks.factuality import FactualityCheck
from ai_qa.checks.hallucination import HallucinationCheck
from ai_qa.checks.relevance import RelevanceCheck
from ai_qa.checks.toxicity import ToxicityCheck

# Agent & RAG checks
from ai_qa.checks.groundedness import GroundednessCheck
from ai_qa.checks.tool_use import ToolUseCheck
from ai_qa.checks.trajectory import TrajectoryCheck

# Safety & Security checks
from ai_qa.checks.bias import BiasCheck
from ai_qa.checks.pii import PIICheck
from ai_qa.checks.prompt_injection import PromptInjectionCheck

# Conversation checks
from ai_qa.checks.context_retention import ContextRetentionCheck
from ai_qa.checks.contradiction import ContradictionCheck

# Custom check
from ai_qa.checks.custom import CustomCheck

# MCP checks
from ai_qa.mcp.checks import (
    MCPToolEfficiencyCheck,
    MCPToolErrorHandlingCheck,
    MCPToolParamsSchemaCheck,
    MCPToolResultUsageCheck,
)

__all__ = [
    "CheckRegistry",
    "register",
    "get_check",
    "list_checks",
    # Deterministic
    "SchemaCheck",
    "RegexCheck",
    "JsonFormatCheck",
    "LengthCheck",
    # LLM-powered
    "HallucinationCheck",
    "FactualityCheck",
    "RelevanceCheck",
    "ToxicityCheck",
    "ConsistencyCheck",
    # Agent & RAG
    "ToolUseCheck",
    "TrajectoryCheck",
    "GroundednessCheck",
    # Safety & Security
    "BiasCheck",
    "PIICheck",
    "PromptInjectionCheck",
    # Conversation
    "ContextRetentionCheck",
    "ContradictionCheck",
    # Custom
    "CustomCheck",
    # MCP
    "MCPToolParamsSchemaCheck",
    "MCPToolResultUsageCheck",
    "MCPToolEfficiencyCheck",
    "MCPToolErrorHandlingCheck",
]
