"""
Aegis Python SDK - LLM Inference Firewall

A comprehensive Python SDK for integrating with the Aegis LLM Inference Firewall.
Provides both synchronous and asynchronous clients for maximum flexibility.

Example:
    >>> from aegis import AegisClient, AegisFirewall
    >>> client = AegisClient(base_url="http://localhost:8080")
    >>> firewall = AegisFirewall(client)
    >>> span = firewall.add_user_message("Send email to john@example.com")
    >>> result = firewall.safe_execute_tool_call(
    ...     "tool.send_email",
    ...     {"to": "john@example.com"},
    ...     [span.id]
    ... )
"""

__version__ = "2.0.0"

from .client import AegisClient, AegisAsyncClient
from .types import (
    TrustLevel,
    SensitivityLevel,
    RiskLevel,
    RunMode,
    SpanSource,
    Span,
    Capability,
    ToolCall,
    ToolCallResult,
    PolicyDecision,
    TraceSession,
    GatewayConfig,
    HealthResponse,
    ApprovalRequest,
)
from .errors import (
    AegisError,
    PolicyError,
    CapabilityBlockedError,
    ApprovalRequiredError,
    TaintViolationError,
    NetworkError,
    TraceVerificationError,
)
from .policy import Policy, PolicyBuilder
from .firewall import AegisFirewall, AegisAsyncFirewall

# Advanced features
try:
    from .websocket import AegisWebSocket, WebSocketEvent
    from .metrics import MetricsCollector, AegisMetrics
    from .cache import LRUCache, ResponseCache
except ImportError:
    # Optional dependencies not installed
    pass

__all__ = [
    "AegisClient",
    "AegisAsyncClient",
    "AegisFirewall",
    "AegisAsyncFirewall",
    "PolicyBuilder",
    "Policy",
    "TrustLevel",
    "SensitivityLevel",
    "RiskLevel",
    "RunMode",
    "SpanSource",
    "Span",
    "Capability",
    "ToolCall",
    "ToolCallResult",
    "PolicyDecision",
    "TraceSession",
    "GatewayConfig",
    "HealthResponse",
    "ApprovalRequest",
    "AegisError",
    "PolicyError",
    "CapabilityBlockedError",
    "ApprovalRequiredError",
    "TaintViolationError",
    "NetworkError",
    "TraceVerificationError",
    "AegisWebSocket",
    "WebSocketEvent",
    "MetricsCollector",
    "AegisMetrics",
    "LRUCache",
    "ResponseCache",
]
