/**
 * NeuroLink AI Toolkit
 *
 * A unified AI provider interface with support for 14+ providers,
 * automatic fallback, streaming, MCP tool integration, HITL security,
 * Redis persistence, and enterprise-grade middleware.
 *
 * NeuroLink provides comprehensive AI functionality with battle-tested
 * patterns extracted from production systems at Juspay.
 *
 * @packageDocumentation
 * @module @juspay/neurolink
 * @category Core
 *
 * @example
 * ```typescript
 * import { NeuroLink } from '@juspay/neurolink';
 *
 * // Create NeuroLink instance
 * const neurolink = new NeuroLink();
 *
 * // Generate with any provider
 * const result = await neurolink.generate({
 *   input: { text: 'Explain quantum computing' },
 *   provider: 'vertex',
 *   model: 'gemini-3-flash-preview'
 * });
 *
 * console.log(result.content);
 * ```
 *
 * @since 1.0.0
 */
import { AIProviderFactory } from "./core/factory.js";
export { AIProviderFactory };
export { GoogleTTSHandler } from "./adapters/tts/googleTTSHandler.js";
export { NeuroLinkConfigManager as ConfigManager } from "./config/configManager.js";
export { BaseFactory, BaseRegistry, NeuroLinkFeatureError, createErrorFactory, withRetry, TypedEventEmitter, } from "./core/infrastructure/index.js";
export type { ErrorCode, FactoryFunction, FactoryRegistration, RegistryEntry as CoreRegistryEntry, RetryOptions, } from "./core/infrastructure/index.js";
export { NeuroLinkClient, createClient, NeuroLinkApiError, NeuroLinkLanguageModel, NeuroLinkAIProvider, createNeuroLinkProvider, createNeuroLinkModel, createStreamingResponse, neurolink as neuroLinkAIInstance, createApiKeyAuthInterceptor, createBearerAuthInterceptor, createDynamicAuthInterceptor, createLoggingInterceptor, createRetryInterceptor, createRateLimitInterceptor, createRequestTransformInterceptor, createResponseTransformInterceptor, createCacheInterceptor, createTimeoutInterceptor, createErrorHandlerInterceptor, composeMiddleware, conditionalMiddleware, SSEClient, WebSocketStreamingClient, createStreamingClient, createAsyncStream, collectStream, OAuth2TokenManager, JWTTokenManager, createApiKeyMiddleware, createBearerTokenMiddleware, createTokenManagerMiddleware, createAuthWithRetryMiddleware, createMultiAuthMiddleware, OAuth2Error, OAuth2AuthError, TokenRefreshError, decodeJWTPayload, isJWTExpired, getJWTExpiry, getApiKeyFromEnv, ErrorCode as ClientErrorCode, NeuroLinkError as ClientNeuroLinkError, HttpError, ClientRateLimitError, ClientValidationError, ClientAuthenticationError, ClientAuthorizationError, NotFoundError, ClientNetworkError, ClientTimeoutError, ClientConnectionError, AbortError, ClientConfigurationError, StreamError, ClientProviderError, ContextLengthError, ContentFilterError, createErrorFromResponse, createErrorFromNative, mapStatusToErrorCode, isRetryableStatus, isRetryableError, isNeuroLinkError, isApiError, } from "./client/index.js";
export type { ClientConfig, RequestOptions, ApiResponse, ApiError, RetryConfig, Middleware as ClientMiddleware, MiddlewareRequest, MiddlewareResponse, MiddlewareContext as ClientMiddlewareContext, StreamCallbacks, StreamEvent, StreamResult, GenerateRequestOptions, GenerateResponse, StreamRequestOptions, AgentExecuteOptions, AgentExecuteResult, AgentInfo, WorkflowExecuteOptions, WorkflowExecuteResult, WorkflowInfo, ToolInfo as ClientToolInfo, ProviderStatus, WebSocketOptions, WebSocketState, WebSocketMessageHandler, NeuroLinkProviderOptions, ModelOptions, LanguageModel, LanguageModelCallOptions, LanguageModelResponse, LanguageModelStreamResponse, LoggingInterceptorOptions, RetryInterceptorOptions, RateLimiterOptions, CacheInterceptorOptions, TimeoutInterceptorOptions, ErrorHandlerOptions, SSEConnectionOptions, SSEConnectionState, StreamingRequestOptions, StreamingEventEmitter, StreamingClientConfig, SpeechRecognitionResult, SpeechSynthesisOptions, AuthConfig as ClientAuthConfig, OAuth2Config, TokenRefreshResult, ErrorCodeType, } from "./client/index.js";
export { AIProviderName, BedrockModels, OpenAIModels, VertexModels, } from "./constants/enums.js";
export { dynamicModelProvider } from "./core/dynamicModels.js";
export { validateTool } from "./sdk/toolRegistration.js";
export * from "./types/index.js";
export type { DynamicModelConfig, ModelRegistry } from "./types/modelTypes.js";
export { isAbortError } from "./utils/errorHandling.js";
export { calculateCost, hasPricing } from "./utils/pricing.js";
export { getAvailableProviders, getBestProvider, isValidProvider, } from "./utils/providerUtils.js";
export { TTSProcessor } from "./utils/ttsProcessor.js";
import { NeuroLink } from "./neurolink.js";
export { NeuroLink };
export type { MCPServerInfo } from "./types/mcpTypes.js";
export type { LangfuseConfig, LangfuseSpanAttributes, ObservabilityConfig, OpenTelemetryConfig, TraceNameFormat, } from "./types/observability.js";
export { buildObservabilityConfigFromEnv } from "./utils/observabilityHelpers.js";
import { createContextEnricher, flushOpenTelemetry, getLangfuseContext, getLangfuseHealthStatus, getLangfuseSpanProcessor, getSpanProcessors, getTracer, getTracerProvider, initializeOpenTelemetry, isOpenTelemetryInitialized, isUsingExternalTracerProvider, runWithCurrentLangfuseContext, setLangfuseContext, shutdownOpenTelemetry } from "./services/server/ai/observability/instrumentation.js";
export type { LangfuseContext } from "./services/server/ai/observability/instrumentation.js";
export { initializeOpenTelemetry, shutdownOpenTelemetry, flushOpenTelemetry, getLangfuseHealthStatus, setLangfuseContext, getLangfuseSpanProcessor, getTracerProvider, isOpenTelemetryInitialized, getSpanProcessors, createContextEnricher, isUsingExternalTracerProvider, getLangfuseContext, getTracer, runWithCurrentLangfuseContext, };
export { clearAnalyticsMetrics, createAnalyticsMiddleware, getAnalyticsMetrics, } from "./middleware/builtin/analytics.js";
export { createLifecycleMiddleware } from "./middleware/builtin/lifecycle.js";
export { MiddlewareFactory } from "./middleware/factory.js";
export { ExporterRegistry } from "./observability/exporterRegistry.js";
export { NoOpExporter } from "./observability/exporters/baseExporter.js";
export type { LatencyStats, MetricsSummary, ModelCostStats, ProviderCostStats, TraceView, } from "./observability/metricsAggregator.js";
export { getMetricsAggregator, MetricsAggregator, resetMetricsAggregator, } from "./observability/metricsAggregator.js";
export { AlwaysSampler, NeverSampler, } from "./observability/sampling/samplers.js";
export { TokenTracker } from "./observability/tokenTracker.js";
export type { SpanAttributes, SpanData, SpanEvent, } from "./observability/types/spanTypes.js";
export { GENAI_ATTRIBUTES, SpanStatus, SpanType, } from "./observability/types/spanTypes.js";
export { SpanSerializer } from "./observability/utils/spanSerializer.js";
export type { MiddlewareConfig, MiddlewareContext, MiddlewareFactoryOptions, MiddlewarePreset, NeuroLinkMiddleware, } from "./types/middlewareTypes.js";
export declare const VERSION = "1.0.0";
/**
 * Quick start factory function for creating AI provider instances.
 *
 * Creates a configured AI provider instance ready for immediate use.
 * Supports 14+ providers: OpenAI, Anthropic, Google AI Studio,
 * Google Vertex, AWS Bedrock, AWS SageMaker, Azure OpenAI, Hugging Face,
 * LiteLLM, Mistral, Ollama, OpenAI Compatible, OpenRouter, and more.
 *
 * @category Factory
 *
 * @param providerName - The AI provider name (e.g., 'bedrock', 'vertex', 'openai')
 * @param modelName - Optional model name to override provider default
 * @returns Promise resolving to configured AI provider instance
 *
 * @example Basic usage
 * ```typescript
 * import { createAIProvider } from '@juspay/neurolink';
 *
 * const provider = await createAIProvider('bedrock');
 * const result = await provider.stream({ input: { text: 'Hello, AI!' } });
 * ```
 *
 * @example With custom model
 * ```typescript
 * const provider = await createAIProvider('vertex', 'gemini-3-flash-preview');
 * ```
 *
 * @see {@link AIProviderFactory.createProvider}
 * @see {@link NeuroLink} for the main SDK class
 * @since 1.0.0
 */
export declare function createAIProvider(providerName?: string, modelName?: string): Promise<import("./types/providers.js").AIProvider>;
/**
 * Create provider with automatic fallback for production resilience.
 *
 * Creates both primary and fallback provider instances for high-availability
 * deployments. Automatically switches to fallback on primary provider failure.
 *
 * @category Factory
 *
 * @param primaryProvider - Primary AI provider name (default: 'bedrock')
 * @param fallbackProvider - Fallback AI provider name (default: 'vertex')
 * @param modelName - Optional model name for both providers
 * @returns Promise resolving to object with primary and fallback providers
 *
 * @example Production failover setup
 * ```typescript
 * import { createAIProviderWithFallback } from '@juspay/neurolink';
 *
 * const { primary, fallback } = await createAIProviderWithFallback('bedrock', 'vertex');
 *
 * try {
 *   const result = await primary.generate({ input: { text: 'Hello!' } });
 * } catch (error) {
 *   // Automatically use fallback
 *   const result = await fallback.generate({ input: { text: 'Hello!' } });
 * }
 * ```
 *
 * @example Multi-region setup
 * ```typescript
 * const { primary, fallback } = await createAIProviderWithFallback(
 *   'vertex',      // Primary: US region
 *   'bedrock',     // Fallback: Global
 *   'claude-3-sonnet'
 * );
 * ```
 *
 * @see {@link AIProviderFactory.createProviderWithFallback}
 * @since 1.0.0
 */
export declare function createAIProviderWithFallback(primaryProvider?: string, fallbackProvider?: string, modelName?: string): Promise<import("./types/typeAliases.js").ProviderPairResult<import("./types/providers.js").AIProvider>>;
/**
 * Create the best available provider based on environment configuration.
 *
 * Intelligently selects the best provider based on available API keys
 * in environment variables. Automatically detects and configures the
 * optimal provider without manual configuration.
 *
 * @category Factory
 *
 * @param requestedProvider - Optional preferred provider name
 * @param modelName - Optional model name
 * @returns Promise resolving to the best configured provider
 *
 * @example Automatic provider selection
 * ```typescript
 * import { createBestAIProvider } from '@juspay/neurolink';
 *
 * // Automatically uses provider with configured API key
 * const provider = await createBestAIProvider();
 * const result = await provider.generate({ input: { text: 'Hello!' } });
 * ```
 *
 * @example With provider preference
 * ```typescript
 * // Tries to use OpenAI, falls back to available provider
 * const provider = await createBestAIProvider('openai');
 * ```
 *
 * @remarks
 * Environment variables checked (in order):
 * - OPENAI_API_KEY
 * - ANTHROPIC_API_KEY
 * - GOOGLE_API_KEY
 * - VERTEX_PROJECT_ID + credentials
 * - AWS credentials for Bedrock
 * - And more...
 *
 * @see {@link AIProviderFactory.createBestProvider}
 * @see {@link getBestProvider} for provider detection utility
 * @since 1.0.0
 */
export declare function createBestAIProvider(requestedProvider?: string, modelName?: string): Promise<import("./types/providers.js").AIProvider>;
/**
 * MCP (Model Context Protocol) Plugin Ecosystem
 *
 * Extensible plugin architecture based on research blueprint for
 * transforming NeuroLink into a Universal AI Development Platform.
 *
 * @example
 * ```typescript
 * import { mcpEcosystem, readFile, writeFile } from '@juspay/neurolink';
 *
 * // Initialize the ecosystem
 * await mcpEcosystem.initialize();
 *
 * // List available plugins
 * const plugins = await mcpEcosystem.list();
 *
 * // Use filesystem operations
 * const content = await readFile('README.md');
 * await writeFile('output.txt', 'Hello from MCP!');
 * ```
 */
export { CircuitBreakerManager, calculateExpiresAt, createMCPServer, createOAuthProviderFromConfig, DEFAULT_HTTP_RETRY_CONFIG, DEFAULT_RATE_LIMIT_CONFIG, executeMCP, FileTokenStorage, getMCPStats, getServerInfo, globalCircuitBreakerManager, globalRateLimiterManager, HTTPRateLimiter, InMemoryTokenStorage, initializeMCPEcosystem, isRetryableHTTPError, isRetryableStatusCode, isTokenExpired, listMCPs, CircuitBreakerOpenError, MCPCircuitBreaker, mcpLogger, NeuroLinkOAuthProvider, RateLimiterManager, validateServerTools, validateTool as validateMCPTool, withHTTPRetry, MCPToolRegistry, ExternalServerManager, MCPClientFactory, ToolRouter, createToolRouter, DEFAULT_ROUTER_CONFIG, ToolCache, createToolCache, DEFAULT_CACHE_CONFIG, ToolResultCache, createToolResultCache, RequestBatcher, ToolCallBatcher, createRequestBatcher, createToolCallBatcher, DEFAULT_BATCH_CONFIG, inferAnnotations, createAnnotatedTool, validateAnnotations, filterToolsByAnnotations, mergeAnnotations, getAnnotationSummary, requiresConfirmation, isSafeToRetry, getToolSafetyLevel, ElicitationManager, globalElicitationManager, EnhancedToolDiscovery, MCPRegistryClient, globalMCPRegistryClient, getWellKnownServer, getAllWellKnownServers, MCPServerBase, MultiServerManager, globalMultiServerManager, AgentExposureManager, exposeAgentAsTool, exposeAgentsAsTools, exposeWorkflowAsTool, exposeWorkflowsAsTools, globalAgentExposureManager, ServerCapabilitiesManager, createTextResource, createJsonResource, createPrompt, neuroLinkToolToMCP, mcpToolToNeuroLink, batchConvertToMCP, batchConvertToNeuroLink, sanitizeToolName, validateToolName, createToolFromFunction, mcpProtocolToolToServerTool, serverToolToMCPProtocol, TOOL_COMPATIBILITY, ToolIntegrationManager, globalToolIntegrationManager, wrapToolWithElicitation, wrapToolsWithElicitation, createElicitationContext, confirmationMiddleware, validationMiddleware, loggingMiddleware, createRetryMiddleware, createTimeoutMiddleware, createToolMiddlewareChain, ElicitationProtocolAdapter, globalElicitationProtocol, isElicitationProtocolMessage, protocolMessageToElicitation, elicitationResponseToProtocol, createElicitationRequest, createElicitationResponse, createElicitationCancel, createTextInputRequest, createSelectRequest, createConfirmationRequest, createFormRequest, } from "./mcp/index.js";
export type { RoutingStrategy, ToolRouterConfig, RoutingDecision, MCPTool, ToolRouterEvents, AffinityRule, CategoryMapping, RouterServerWeight, CacheStrategy, CacheConfig as MCPCacheConfig, CacheStats, CacheEvents, BatchConfig, BatchResult, BatchExecutor, BatcherEvents, MCPToolAnnotations, MCPServerTool, ToolConverterOptions, MCPProtocolTool, NeuroLinkTool, ToolMiddleware, EnhancedExecutionContext, ToolWrapperOptions, ExposableAgent, ExposableWorkflow, ExposureOptions, ExposureResult, MCPResource, MCPPrompt, ServerCapabilitiesConfig, PromptGenerator, PromptMessage, PromptResult, RegisteredPrompt, RegisteredResource, ResourceContent, ResourceReader, ResourceSubscriptionCallback, RegistryEntry, RegistryEntry as MCPRegistryEntry, RegistrySearchOptions, RegistrySearchResult, RegistrySourceType, RegistryConfig, MCPRegistryClientConfig, LoadBalancingStrategy, ServerGroup, UnifiedTool, MultiServerManagerConfig, ServerWeight, MCPServerBaseConfig, MCPServerEvents, EnhancedToolInfo, ToolSearchCriteria, ToolSearchResult, CompatibilityCheckResult, ElicitationType, Elicitation, ElicitationResponse, ElicitationHandler, ElicitationManagerConfig, ElicitationRequest, ElicitationContext, TextElicitation, SelectElicitation, SelectOption, MultiSelectElicitation, ConfirmationElicitation, FileElicitation, SecretElicitation, FormElicitation, FormField, ElicitationProtocolMessage, ElicitationProtocolMessageType, ElicitationProtocolPayload, ElicitationProtocolHandler, ElicitationProtocolAdapterConfig, ElicitationRequestMessage, ElicitationRequestParams, ElicitationResponseMessage, ElicitationResponseParams, ElicitationCancelMessage, ElicitationCancelParams, } from "./mcp/index.js";
export type { AuthorizationUrlResult, DiscoveredMcp, HTTPRetryConfig, MCPOAuthConfig, McpMetadata, OAuthClientInformation, OAuthTokens as McpOAuthTokens, RateLimitConfig, TokenExchangeRequest, TokenStorage, } from "./types/mcpTypes.js";
export type { ExecutionContext, ToolExecutionResult, ToolInfo, } from "./types/tools.js";
export type { LogLevel } from "./types/utilities.js";
export { logger } from "./utils/logger.js";
export { getPoolStats } from "./utils/redis.js";
export declare function initializeTelemetry(): Promise<boolean>;
export declare function getTelemetryStatus(): Promise<{
    enabled: boolean;
    initialized: boolean;
    endpoint?: string;
    service?: string;
    version?: string;
}>;
/**
 * Evaluation System Exports
 *
 * A comprehensive evaluation framework for assessing AI response quality,
 * with support for RAGAS-style metrics, custom scorers, and pipeline-based evaluation.
 *
 * @example
 * ```typescript
 * import {
 *   Evaluator,
 *   ScorerRegistry,
 *   EvaluationPipeline,
 *   createFaithfulnessScorer,
 *   createAnswerRelevancyScorer,
 * } from '@juspay/neurolink';
 *
 * // Create a pipeline with multiple scorers
 * const pipeline = new EvaluationPipeline({
 *   scorers: [
 *     createFaithfulnessScorer({ model: 'gpt-4' }),
 *     createAnswerRelevancyScorer({ model: 'gpt-4' }),
 *   ],
 * });
 *
 * // Run evaluation
 * const result = await pipeline.evaluate({
 *   question: 'What is quantum computing?',
 *   answer: 'Quantum computing uses quantum mechanics...',
 *   context: ['Quantum computing is a type of computation...'],
 * });
 * ```
 */
export { Evaluator, BatchEvaluator, EvaluationAggregator, EvaluatorFactory, getEvaluatorFactory, EvaluatorRegistry, getEvaluatorRegistry, EvaluationErrorCodes, evaluationErrors, isRetryableEvaluationError, isEvaluationError, createEvaluationFailedError, createParseError, createStrategyNotFoundError, createProviderError, createMaxRetriesExceededError, createBatchEvaluationError, createConfigurationError, contextToErrorContext, createLangfuseAdapter, createMockLangfuseClient, LangfuseAdapter, startLangfuseAdapter, createConsoleLoggerHook, createMetricsCollectorHook, ObservabilityHooks, observabilityHooks, pipelineToSpanAttributes, scorerToSpanAttributes, createAndInitializePipeline, createPipeline, EvaluationPipeline, PipelineBuilder, Pipelines, CODE_GENERATION_PIPELINE, COMPREHENSIVE_PIPELINE, CUSTOMER_SUPPORT_PIPELINE, getPreset, getPresetNames, MINIMAL_PIPELINE, PipelinePresets, QUALITY_PIPELINE, RAG_PIPELINE, SAFETY_PIPELINE, SUMMARIZATION_PIPELINE, BatchStrategy, createBatchStrategy, evaluateBatch, streamBatchEvaluation, createSamplingStrategy, DEFAULT_SAMPLING_CONFIG, SamplingStrategies, SamplingStrategy, createMetricsCollector, globalMetricsCollector, MetricsCollector, createReportGenerator, ReportGenerator, Reports, BaseScorer, DEFAULT_SCORE_SCALE as EVAL_DEFAULT_SCORE_SCALE, composeScorers, createConditionalScorer, createFunctionScorer, createInvertedScorer, createKeywordScorer, createRegexScorer, createScorerMetadata, createSimpleLengthScorer, AnswerRelevancyScorer, createAnswerRelevancyScorer, BaseLLMScorer, DEFAULT_LLM_SCORER_CONFIG, BiasDetectionScorer, createBiasDetectionScorer, ContextPrecisionScorer, createContextPrecisionScorer, ContextRelevancyScorer, createContextRelevancyScorer, createFaithfulnessScorer, FaithfulnessScorer, createHallucinationScorer, HallucinationScorer, createPromptAlignmentScorer, PromptAlignmentScorer, createSummarizationScorer, SummarizationScorer, createToneConsistencyScorer, ToneConsistencyScorer, createToxicityScorer, ToxicityScorer, BaseRuleScorer, DEFAULT_RULE_SCORER_CONFIG, ContentSimilarityScorer, createContentSimilarityScorer, createFormatScorer, FormatScorer, FormatScorerPresets, createKeywordCoverageScorer, KeywordCoverageScorer, createLengthScorer, LengthScorer, LengthScorerPresets, ScorerBuilder, Scorers, ScorerRegistry, } from "./evaluation/index.js";
export type { LangfuseAdapterConfig, LangfuseClient, EvaluationEvents, EventHandler, SpanAttributes as EvalSpanAttributes, PipelineExecutionOptions, PipelineResult, AggregatedMetrics, PipelineMetrics, ScorerMetrics, GeneratedReport, ReportData, BatchConfig as EvalBatchConfig, BatchItemResult, BatchProgress as PipelineBatchProgress, BatchResult as EvalBatchResult, ScorerFunction, ContentSimilarityConfig, SimilarityMetric, CodeLanguage, FormatScorerConfig, FormatType, KeywordCoverageConfig, LengthConstraintType, LengthScorerConfig, LengthUnit, BatchEvaluationConfig, BatchProgress, BatchEvaluationItem, BatchEvaluationItemResult, BatchEvaluationResult, ScoreStatistics, ScoreDistribution, TrendAnalysis, DimensionAnalysis, AlertSummary, AggregationResult, EvaluatorPreset, EvaluationStrategyFunction, EvaluationStrategyConfig, EvaluationStrategyMetadata, EvaluationErrorCode, EvaluationErrorContext, } from "./evaluation/index.js";
export type { AnalyticsData, EvaluationData, TextGenerationOptions, TextGenerationResult, } from "./types/index.js";
/**
 * Legacy generateText function for backward compatibility.
 *
 * Provides standalone text generation function for existing code.
 * For new code, use {@link NeuroLink.generate} instead which provides
 * more features including streaming, tools, and structured output.
 *
 * @category Legacy
 * @deprecated Use {@link NeuroLink.generate} for new code
 *
 * @param options - Text generation options
 * @param options.prompt - Input prompt text
 * @param options.provider - AI provider name (e.g., 'bedrock', 'openai')
 * @param options.model - Model name to use
 * @param options.temperature - Sampling temperature (0-2)
 * @param options.maxTokens - Maximum tokens to generate
 * @returns Promise resolving to text generation result with content and metadata
 *
 * @example Basic text generation
 * ```typescript
 * import { generateText } from '@juspay/neurolink';
 *
 * const result = await generateText({
 *   prompt: 'Explain quantum computing in simple terms',
 *   provider: 'bedrock',
 *   model: 'claude-3-sonnet'
 * });
 * console.log(result.content);
 * ```
 *
 * @example With temperature control
 * ```typescript
 * const result = await generateText({
 *   prompt: 'Write a creative story',
 *   provider: 'openai',
 *   temperature: 1.5,
 *   maxTokens: 500
 * });
 * ```
 *
 * @see {@link NeuroLink.generate} for modern API with more features
 * @since 1.0.0
 */
export declare function generateText(options: import("./types/index.js").TextGenerationOptions): Promise<import("./types/index.js").TextGenerationResult>;
/**
 * Workflow Engine for multi-model ensembles with judge-based evaluation
 *
 * Enables sophisticated AI orchestration patterns:
 * - Ensemble execution (parallel multi-model)
 * - Chain execution (sequential fallback)
 * - Adaptive execution (tier-based quality/cost optimization)
 * - Multi-judge voting for consensus
 *
 * @example
 * ```typescript
 * import { neurolink, CONSENSUS_3_WORKFLOW } from '@juspay/neurolink';
 *
 * // Use workflow via generate() with workflowConfig option
 * const result = await neurolink.generate({
 *   input: { text: 'Explain quantum computing' },
 *   workflowConfig: CONSENSUS_3_WORKFLOW,
 * });
 *
 * console.log('Best response:', result.content);
 * console.log('Selected model:', result.workflow?.selectedModel);
 * console.log('Total time:', result.workflow?.metrics?.totalTime);
 * ```
 */
export { clearRegistry as clearWorkflowRegistry, getWorkflow, listWorkflows, registerWorkflow, } from "./workflow/core/workflowRegistry.js";
export type { RunWorkflowOptions } from "./workflow/core/workflowRunner.js";
export { runWorkflow } from "./workflow/core/workflowRunner.js";
export { DEFAULT_SCORE_SCALE, WORKFLOW_ENGINE_VERSION, } from "./workflow/index.js";
export type { EnsembleResponse, ExecutionStrategy, JudgeConfig, JudgeScores, ModelConfig, ModelGroup, MultiJudgeScores, WorkflowConfig, WorkflowResult, WorkflowType, WorkflowValidationResult, } from "./workflow/types.js";
export { calculateModelMetrics, compareWorkflows, generateSummaryStats, } from "./workflow/utils/workflowMetrics.js";
export { validateWorkflow } from "./workflow/utils/workflowValidation.js";
export { BALANCED_ADAPTIVE_WORKFLOW, createAdaptiveWorkflow, QUALITY_MAX_WORKFLOW, SPEED_FIRST_WORKFLOW, } from "./workflow/workflows/adaptiveWorkflow.js";
export { CONSENSUS_3_FAST_WORKFLOW, CONSENSUS_3_WORKFLOW, createConsensus3WithPrompt, } from "./workflow/workflows/consensusWorkflow.js";
export { AGGRESSIVE_FALLBACK_WORKFLOW, FAST_FALLBACK_WORKFLOW, } from "./workflow/workflows/fallbackWorkflow.js";
export { createMultiJudgeWorkflow, MULTI_JUDGE_3_WORKFLOW, MULTI_JUDGE_5_WORKFLOW, } from "./workflow/workflows/multiJudgeWorkflow.js";
export type { AgentExecuteRequest, AgentExecuteResponse, AuthConfig, AuthenticatedUser, AuthResult, AuthStrategy, BodyParserConfig, CacheConfig, CacheEntry, CacheStore, CORSConfig, CreateRoutesOptions, DataEvent, DataStreamEvent, DataStreamEventType, DataStreamResponseConfig, DataStreamWriter, DataStreamWriterConfig, ErrorCategoryType, ErrorEvent, ErrorResponse, ErrorSeverityType, FinishEvent, HealthResponse, HttpMethod, LoggingConfig, MCPServerStatusResponse, MiddlewareDefinition, MiddlewareHandler, OpenAPIGeneratorConfig, OpenAPISpec, PropertySchema, RateLimitConfig as ServerRateLimitConfig, RateLimitMiddlewareConfig, RateLimitStore, ReadyResponse, RequiredServerAdapterConfig, RouteDefinition, RouteGroup, RouteHandler, ServerAdapterConfig, ServerAdapterErrorCodeType, ServerAdapterErrorContext, ServerAdapterEvents, ServerAdapterFactoryOptions, ServerContext, ServerFramework, ServerResponse, ServerStatus, SSEWriteOptions, StreamingConfig, TextDeltaEvent, TextEndEvent, TextStartEvent, ToolCallEvent, ToolExecuteRequest, ToolExecuteResponse, ToolResultEvent, ValidationConfig, ValidationResult, ValidationSchema, WebSocketAuthConfig, WebSocketConfig, WebSocketConnection, WebSocketHandler, WebSocketMessage, WebSocketMessageType, } from "./server/index.js";
/**
 * Server Adapters for exposing NeuroLink as HTTP APIs
 *
 * Supports multiple frameworks: Hono, Express, Fastify, Koa
 *
 * @example
 * ```typescript
 * import { NeuroLink } from '@juspay/neurolink';
 * import { createServer } from '@juspay/neurolink/server';
 *
 * const neurolink = new NeuroLink({ provider: 'openai' });
 * const server = await createServer(neurolink, {
 *   framework: 'hono',
 *   config: { port: 3000 }
 * });
 * await server.start();
 * ```
 */
export { AgentExecuteRequestSchema, AlreadyRunningError, AuthenticationError, AuthorizationError, BaseServerAdapter, ConfigurationError, createAgentRoutes, createAgentWebSocketHandler, createAllRoutes, createAuthMiddleware, createCacheInvalidator, createCacheMiddleware, createCompressionMiddleware, createDataStreamResponse, createDataStreamWriter, createErrorHandlingMiddleware, createErrorResponse, createFieldValidator, createHealthRoutes, createLoggingMiddleware, createMCPRoutes, createMemoryRoutes, createNDJSONHeaders, createOpenAPIGenerator, createRateLimitMiddleware, createRequestIdMiddleware, createRequestValidationMiddleware, createRoleMiddleware, createSecurityHeadersMiddleware, createServer, createSlidingWindowRateLimitMiddleware, createSSEHeaders, createTimingMiddleware, createToolRoutes, DataStreamResponse, ErrorCategory, ErrorRecoveryStrategies, ErrorSeverity, ExpressServerAdapter, FastifyServerAdapter, generateOpenAPIFromConfig, generateOpenAPISpec, HandlerError, HonoServerAdapter, InMemoryCacheStore, InMemoryRateLimitStore, InvalidAuthenticationError, KoaServerAdapter, MissingDependencyError, NotRunningError, OpenAPIGenerator, pipeAsyncIterableToDataStream, RateLimitError, RouteConflictError, RouteNotFoundError, registerAllRoutes, ServerAdapterError, ServerAdapterErrorCode, ServerAdapterFactory, ServerNameParamSchema, ServerRateLimitError, ServerStartError, ServerStopError, ServerValidationError, SessionIdParamSchema, StreamAbortedError, StreamingError, TimeoutError, ToolArgumentsSchema, ToolExecuteRequestSchema, ToolNameParamSchema, ToolSearchQuerySchema, ValidationError, validateParams, validateQuery, validateRequest, WebSocketConnectionError, WebSocketConnectionManager, WebSocketError, WebSocketMessageRouter, wrapError, } from "./server/index.js";
export type { BaseChunkerConfig, BM25Result, CharacterChunkerConfig, Chunk, ChunkingStrategy, ChunkMetadata, ChunkParams, CitationFormat, ContextAssemblyOptions, ContextWindow, CSVLoaderOptions, DocumentType, EmbeddingModelConfig, ExtractionResult, ExtractParams, GenerationModelConfig, GraphChunk, GraphEdge, GraphEmbedding, GraphNode, GraphQueryParams, GraphRAGConfig, GraphStats, HTMLChunkerConfig, HybridSearchConfig, HybridSearchResult, IngestOptions, JSONChunkerConfig, LaTeXChunkerConfig, LoaderOptions, MarkdownChunkerConfig, MDocumentConfig, MetadataFilter, PDFLoaderOptions, PipelineStats, QueryOptions as RAGQueryOptions, RAGCommandArgs, RAGConfig, RAGPipelineConfig, RAGResponse, RankedNode, RecursiveChunkerConfig, RerankerConfig, RerankerOptions, RerankResult, SemanticChunkerConfig, SentenceChunkerConfig, TokenChunkerConfig, VectorQueryResponse, VectorQueryResult, VectorQueryToolConfig, VectorStore, WebLoaderOptions, } from "./rag/index.js";
/**
 * RAG (Retrieval-Augmented Generation) Document Processing
 *
 * Comprehensive RAG system with document loading, chunking, embedding,
 * retrieval, and context assembly capabilities.
 *
 * @example
 * ```typescript
 * import {
 *   MDocument,
 *   loadDocument,
 *   RAGPipeline,
 *   ChunkerRegistry
 * } from '@juspay/neurolink';
 *
 * // Load and process a document
 * const doc = await loadDocument('/path/to/document.md');
 * await doc.chunk({ strategy: 'markdown', config: { maxSize: 1000 } });
 *
 * // Use the full RAG pipeline
 * const pipeline = new RAGPipeline({
 *   embeddingModel: { provider: 'openai', modelName: 'text-embedding-3-small' },
 *   generationModel: { provider: 'openai', modelName: 'gpt-4o-mini' }
 * });
 * await pipeline.ingest(['./docs/*.md']);
 * const response = await pipeline.query('What are the key features?');
 * console.log(response.answer);
 * ```
 */
export { assembleContext, batchRerank, CharacterChunker, ChunkerRegistry, CohereRelevanceScorer, CrossEncoderReranker, CSVLoader, chunkText, createChunker, createContextWindow, createHybridSearch, createRAGPipeline, createVectorQueryTool, executeWithCircuitBreaker, extractMetadata, formatContextWithCitations, GraphRAG, getAvailableStrategies, getCircuitBreaker, getDefaultChunkerConfig, getRecommendedStrategy, HTMLChunker, HTMLLoader, InMemoryBM25Index, InMemoryVectorStore, JSONChunker as RAGJSONChunker, JSONLoader, LaTeXChunker, LLMMetadataExtractor, linearCombination, loadDocument, loadDocuments, MarkdownChunker, MarkdownLoader, MDocument, PDFLoader, prepareRAGTool, processDocument, RAGCircuitBreaker, type RAGCircuitBreakerConfig, type RAGCircuitBreakerEvents, RAGCircuitBreakerManager, type RAGCircuitBreakerStats, RAGPipeline, RAGRetryHandler, RecursiveChunker, ragCircuitBreakerManager, reciprocalRankFusion, rerank, SemanticChunker, SentenceChunker, simpleRerank, summarizeContext, TextLoader, TokenChunker, WebLoader, } from "./rag/index.js";
export { ContextBuilder } from "./evaluation/contextBuilder.js";
export { AuthProviderFactory, createAuthProvider, AuthProviderRegistry, AuthError as AuthErrorFactory, AuthErrorCodes, BaseAuthProvider, InMemorySessionStorage, AuthProviderError, createAuthMiddleware as createAuthProviderMiddleware, createRBACMiddleware, createProtectedMiddleware, createExpressAuthMiddleware, createRequestContext, extractToken, AuthMiddlewareError, AuthMiddlewareErrorCodes, type MiddlewareHandler as AuthMiddlewareHandler, type MiddlewareResult, type NextFunction, type ExpressMiddleware, UserRateLimiter, MemoryRateLimitStorage, RedisRateLimitStorage, createRateLimitByUserMiddleware, createAuthenticatedRateLimitMiddleware, createRateLimitStorage, type RateLimitConfig as AuthRateLimitConfig, type RateLimitResult, type RateLimitMiddlewareResult, type RateLimitStorage, SessionManager, MemorySessionStorage, RedisSessionStorage, createSessionStorage, type SessionStorageInterface, AuthContextHolder, globalAuthContext, getAuthContext, getCurrentUser, getCurrentSession, isAuthenticated, hasRole, hasAnyRole, hasPermission, hasAllPermissions, requireAuth, requireRole, requirePermission, requireUser, runWithAuthContext, createAuthenticatedContext, RequestContext, NEUROLINK_RESOURCE_ID_KEY, NEUROLINK_THREAD_ID_KEY, createAuthValidatorFromProvider, } from "./auth/index.js";
