"""
Type definitions for MCP Filter SDK.

This module provides comprehensive type definitions for the MCP Filter SDK,
including enums, data classes, and type aliases that mirror the C++ API.
"""

from .mcp_types import (
    # Core types
    McpBool,
    McpResult,
    McpFilter,
    McpFilterChain,
    McpFilterManager,
    McpBufferHandle,
    McpDispatcher,
    McpConnection,
    McpMemoryPool,
    McpJsonValue,
    McpMap,
    
    # Enums
    FilterStatus,
    FilterPosition,
    ProtocolLayer,
    BuiltinFilterType,
    FilterError,
    BufferOwnership,
    BufferFlags,
    ChainExecutionMode,
    RoutingStrategy,
    MatchCondition,
    ChainState,
    ConnectionState,
    
    # Constants
    MCP_OK,
    MCP_ERROR_INVALID_ARGUMENT,
    MCP_ERROR_NOT_FOUND,
    MCP_ERROR_INVALID_STATE,
    MCP_ERROR_RESOURCE_EXHAUSTED,
    MCP_TRUE,
    MCP_FALSE,
    MCP_FILTER_CONTINUE,
    MCP_FILTER_STOP_ITERATION,
    MCP_FILTER_POSITION_FIRST,
    MCP_FILTER_POSITION_LAST,
    MCP_FILTER_POSITION_BEFORE,
    MCP_FILTER_POSITION_AFTER,
    MCP_PROTOCOL_LAYER_3_NETWORK,
    MCP_PROTOCOL_LAYER_4_TRANSPORT,
    MCP_PROTOCOL_LAYER_5_SESSION,
    MCP_PROTOCOL_LAYER_6_PRESENTATION,
    MCP_PROTOCOL_LAYER_7_APPLICATION,
    MCP_TRANSPORT_PROTOCOL_TCP,
    MCP_TRANSPORT_PROTOCOL_UDP,
    MCP_TRANSPORT_PROTOCOL_QUIC,
    MCP_TRANSPORT_PROTOCOL_SCTP,
    MCP_APP_PROTOCOL_HTTP,
    MCP_APP_PROTOCOL_HTTPS,
    MCP_APP_PROTOCOL_HTTP2,
    MCP_APP_PROTOCOL_HTTP3,
    MCP_APP_PROTOCOL_GRPC,
    MCP_APP_PROTOCOL_WEBSOCKET,
    MCP_APP_PROTOCOL_JSONRPC,
    MCP_APP_PROTOCOL_CUSTOM,
    MCP_FILTER_TCP_PROXY,
    MCP_FILTER_UDP_PROXY,
    MCP_FILTER_HTTP_CODEC,
    MCP_FILTER_HTTP_ROUTER,
    MCP_FILTER_HTTP_COMPRESSION,
    MCP_FILTER_TLS_TERMINATION,
    MCP_FILTER_AUTHENTICATION,
    MCP_FILTER_AUTHORIZATION,
    MCP_FILTER_ACCESS_LOG,
    MCP_FILTER_METRICS,
    MCP_FILTER_TRACING,
    MCP_FILTER_RATE_LIMIT,
    MCP_FILTER_CIRCUIT_BREAKER,
    MCP_FILTER_RETRY,
    MCP_FILTER_LOAD_BALANCER,
    MCP_FILTER_CUSTOM,
    MCP_FILTER_ERROR_NONE,
    MCP_FILTER_ERROR_INVALID_CONFIG,
    MCP_FILTER_ERROR_INITIALIZATION_FAILED,
    MCP_FILTER_ERROR_BUFFER_OVERFLOW,
    MCP_FILTER_ERROR_PROTOCOL_VIOLATION,
    MCP_FILTER_ERROR_UPSTREAM_TIMEOUT,
    MCP_FILTER_ERROR_CIRCUIT_OPEN,
    MCP_FILTER_ERROR_RESOURCE_EXHAUSTED,
    MCP_FILTER_ERROR_INVALID_STATE,
    MCP_BUFFER_OWNERSHIP_NONE,
    MCP_BUFFER_OWNERSHIP_SHARED,
    MCP_BUFFER_OWNERSHIP_EXCLUSIVE,
    MCP_BUFFER_OWNERSHIP_EXTERNAL,
    MCP_BUFFER_FLAG_READONLY,
    MCP_BUFFER_FLAG_OWNED,
    MCP_BUFFER_FLAG_EXTERNAL,
    MCP_BUFFER_FLAG_ZERO_COPY,
    MCP_CHAIN_MODE_SEQUENTIAL,
    MCP_CHAIN_MODE_PARALLEL,
    MCP_CHAIN_MODE_CONDITIONAL,
    MCP_CHAIN_MODE_PIPELINE,
    MCP_ROUTING_ROUND_ROBIN,
    MCP_ROUTING_LEAST_LOADED,
    MCP_ROUTING_HASH_BASED,
    MCP_ROUTING_PRIORITY,
    MCP_ROUTING_CUSTOM,
    MCP_MATCH_ALL,
    MCP_MATCH_ANY,
    MCP_MATCH_NONE,
    MCP_MATCH_CUSTOM,
    MCP_CHAIN_STATE_IDLE,
    MCP_CHAIN_STATE_PROCESSING,
    MCP_CHAIN_STATE_PAUSED,
    MCP_CHAIN_STATE_ERROR,
    MCP_CHAIN_STATE_COMPLETED,
    MCP_CONNECTION_STATE_CONNECTING,
    MCP_CONNECTION_STATE_CONNECTED,
    MCP_CONNECTION_STATE_DISCONNECTING,
    MCP_CONNECTION_STATE_DISCONNECTED,
    MCP_CONNECTION_STATE_ERROR,
)

from .filters import (
    # Filter types
    FilterConfig,
    BufferSlice,
    ProtocolMetadata,
    FilterCallbacks,
    FilterStats,
)

from .buffers import (
    # Buffer types
    BufferFragment,
    BufferReservation,
    BufferStats,
    DrainTracker,
    BufferPoolConfig,
)

from .chains import (
    # Chain types
    FilterNode,
    ChainConfig,
    FilterCondition,
    ChainStats,
    RouterConfig,
)

__all__ = [
    # Core types
    "McpBool",
    "McpResult", 
    "McpFilter",
    "McpFilterChain",
    "McpFilterManager",
    "McpBufferHandle",
    "McpDispatcher",
    "McpConnection",
    "McpMemoryPool",
    "McpJsonValue",
    "McpMap",
    
    # Enums
    "FilterStatus",
    "FilterPosition",
    "ProtocolLayer",
    "BuiltinFilterType",
    "FilterError",
    "BufferOwnership",
    "BufferFlags",
    "ChainExecutionMode",
    "RoutingStrategy",
    "MatchCondition",
    "ChainState",
    "ConnectionState",
    
    # Constants
    "MCP_OK",
    "MCP_ERROR_INVALID_ARGUMENT",
    "MCP_ERROR_NOT_FOUND",
    "MCP_ERROR_INVALID_STATE",
    "MCP_ERROR_RESOURCE_EXHAUSTED",
    "MCP_TRUE",
    "MCP_FALSE",
    "MCP_FILTER_CONTINUE",
    "MCP_FILTER_STOP_ITERATION",
    "MCP_FILTER_POSITION_FIRST",
    "MCP_FILTER_POSITION_LAST",
    "MCP_FILTER_POSITION_BEFORE",
    "MCP_FILTER_POSITION_AFTER",
    "MCP_PROTOCOL_LAYER_3_NETWORK",
    "MCP_PROTOCOL_LAYER_4_TRANSPORT",
    "MCP_PROTOCOL_LAYER_5_SESSION",
    "MCP_PROTOCOL_LAYER_6_PRESENTATION",
    "MCP_PROTOCOL_LAYER_7_APPLICATION",
    "MCP_TRANSPORT_PROTOCOL_TCP",
    "MCP_TRANSPORT_PROTOCOL_UDP",
    "MCP_TRANSPORT_PROTOCOL_QUIC",
    "MCP_TRANSPORT_PROTOCOL_SCTP",
    "MCP_APP_PROTOCOL_HTTP",
    "MCP_APP_PROTOCOL_HTTPS",
    "MCP_APP_PROTOCOL_HTTP2",
    "MCP_APP_PROTOCOL_HTTP3",
    "MCP_APP_PROTOCOL_GRPC",
    "MCP_APP_PROTOCOL_WEBSOCKET",
    "MCP_APP_PROTOCOL_JSONRPC",
    "MCP_APP_PROTOCOL_CUSTOM",
    "MCP_FILTER_TCP_PROXY",
    "MCP_FILTER_UDP_PROXY",
    "MCP_FILTER_HTTP_CODEC",
    "MCP_FILTER_HTTP_ROUTER",
    "MCP_FILTER_HTTP_COMPRESSION",
    "MCP_FILTER_TLS_TERMINATION",
    "MCP_FILTER_AUTHENTICATION",
    "MCP_FILTER_AUTHORIZATION",
    "MCP_FILTER_ACCESS_LOG",
    "MCP_FILTER_METRICS",
    "MCP_FILTER_TRACING",
    "MCP_FILTER_RATE_LIMIT",
    "MCP_FILTER_CIRCUIT_BREAKER",
    "MCP_FILTER_RETRY",
    "MCP_FILTER_LOAD_BALANCER",
    "MCP_FILTER_CUSTOM",
    "MCP_FILTER_ERROR_NONE",
    "MCP_FILTER_ERROR_INVALID_CONFIG",
    "MCP_FILTER_ERROR_INITIALIZATION_FAILED",
    "MCP_FILTER_ERROR_BUFFER_OVERFLOW",
    "MCP_FILTER_ERROR_PROTOCOL_VIOLATION",
    "MCP_FILTER_ERROR_UPSTREAM_TIMEOUT",
    "MCP_FILTER_ERROR_CIRCUIT_OPEN",
    "MCP_FILTER_ERROR_RESOURCE_EXHAUSTED",
    "MCP_FILTER_ERROR_INVALID_STATE",
    "MCP_BUFFER_OWNERSHIP_NONE",
    "MCP_BUFFER_OWNERSHIP_SHARED",
    "MCP_BUFFER_OWNERSHIP_EXCLUSIVE",
    "MCP_BUFFER_OWNERSHIP_EXTERNAL",
    "MCP_BUFFER_FLAG_READONLY",
    "MCP_BUFFER_FLAG_OWNED",
    "MCP_BUFFER_FLAG_EXTERNAL",
    "MCP_BUFFER_FLAG_ZERO_COPY",
    "MCP_CHAIN_MODE_SEQUENTIAL",
    "MCP_CHAIN_MODE_PARALLEL",
    "MCP_CHAIN_MODE_CONDITIONAL",
    "MCP_CHAIN_MODE_PIPELINE",
    "MCP_ROUTING_ROUND_ROBIN",
    "MCP_ROUTING_LEAST_LOADED",
    "MCP_ROUTING_HASH_BASED",
    "MCP_ROUTING_PRIORITY",
    "MCP_ROUTING_CUSTOM",
    "MCP_MATCH_ALL",
    "MCP_MATCH_ANY",
    "MCP_MATCH_NONE",
    "MCP_MATCH_CUSTOM",
    "MCP_CHAIN_STATE_IDLE",
    "MCP_CHAIN_STATE_PROCESSING",
    "MCP_CHAIN_STATE_PAUSED",
    "MCP_CHAIN_STATE_ERROR",
    "MCP_CHAIN_STATE_COMPLETED",
    "MCP_CONNECTION_STATE_CONNECTING",
    "MCP_CONNECTION_STATE_CONNECTED",
    "MCP_CONNECTION_STATE_DISCONNECTING",
    "MCP_CONNECTION_STATE_DISCONNECTED",
    "MCP_CONNECTION_STATE_ERROR",
    
    # Filter types
    "FilterConfig",
    "BufferSlice",
    "ProtocolMetadata",
    "FilterCallbacks",
    "FilterStats",
    
    # Buffer types
    "BufferFragment",
    "BufferReservation",
    "BufferStats",
    "DrainTracker",
    "BufferPoolConfig",
    
    # Chain types
    "FilterNode",
    "ChainConfig",
    "FilterCondition",
    "ChainStats",
    "RouterConfig",
]
