/**
 * Server Adapter Types
 * Comprehensive type system for NeuroLink server adapters
 */
// ============================================
// Error Types
// ============================================
/**
 * Error categories for server adapter errors
 */
export const ErrorCategory = {
    CONFIG: "CONFIG",
    VALIDATION: "VALIDATION",
    EXECUTION: "EXECUTION",
    EXTERNAL: "EXTERNAL",
    RATE_LIMIT: "RATE_LIMIT",
    AUTHENTICATION: "AUTHENTICATION",
    AUTHORIZATION: "AUTHORIZATION",
    STREAMING: "STREAMING",
    WEBSOCKET: "WEBSOCKET",
};
/**
 * Error severity levels
 */
export const ErrorSeverity = {
    LOW: "LOW",
    MEDIUM: "MEDIUM",
    HIGH: "HIGH",
    CRITICAL: "CRITICAL",
};
/**
 * Server adapter error codes
 */
export const ServerAdapterErrorCode = {
    // Configuration errors
    INVALID_CONFIG: "SERVER_ADAPTER_INVALID_CONFIG",
    MISSING_DEPENDENCY: "SERVER_ADAPTER_MISSING_DEPENDENCY",
    FRAMEWORK_INIT_FAILED: "SERVER_ADAPTER_FRAMEWORK_INIT_FAILED",
    // Route errors
    ROUTE_NOT_FOUND: "SERVER_ADAPTER_ROUTE_NOT_FOUND",
    ROUTE_CONFLICT: "SERVER_ADAPTER_ROUTE_CONFLICT",
    INVALID_ROUTE: "SERVER_ADAPTER_INVALID_ROUTE",
    // Execution errors
    HANDLER_ERROR: "SERVER_ADAPTER_HANDLER_ERROR",
    TIMEOUT: "SERVER_ADAPTER_TIMEOUT",
    MIDDLEWARE_ERROR: "SERVER_ADAPTER_MIDDLEWARE_ERROR",
    // Rate limit errors
    RATE_LIMIT_EXCEEDED: "SERVER_ADAPTER_RATE_LIMIT_EXCEEDED",
    // Authentication/Authorization errors
    AUTH_REQUIRED: "SERVER_ADAPTER_AUTH_REQUIRED",
    AUTH_INVALID: "SERVER_ADAPTER_AUTH_INVALID",
    FORBIDDEN: "SERVER_ADAPTER_FORBIDDEN",
    // Streaming errors
    STREAM_ERROR: "SERVER_ADAPTER_STREAM_ERROR",
    STREAM_ABORTED: "SERVER_ADAPTER_STREAM_ABORTED",
    // WebSocket errors
    WEBSOCKET_ERROR: "SERVER_ADAPTER_WEBSOCKET_ERROR",
    WEBSOCKET_CONNECTION_FAILED: "SERVER_ADAPTER_WEBSOCKET_CONNECTION_FAILED",
    // Validation errors
    VALIDATION_ERROR: "SERVER_ADAPTER_VALIDATION_ERROR",
    SCHEMA_ERROR: "SERVER_ADAPTER_SCHEMA_ERROR",
    // Server lifecycle errors
    START_FAILED: "SERVER_ADAPTER_START_FAILED",
    STOP_FAILED: "SERVER_ADAPTER_STOP_FAILED",
    ALREADY_RUNNING: "SERVER_ADAPTER_ALREADY_RUNNING",
    NOT_RUNNING: "SERVER_ADAPTER_NOT_RUNNING",
};
