@juspay/neurolink 9.54.3 → 9.54.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/action/actionExecutor.d.ts +1 -1
- package/dist/action/actionInputs.d.ts +1 -1
- package/dist/action/githubIntegration.d.ts +1 -1
- package/dist/action/index.d.ts +0 -1
- package/dist/action/index.js +1 -0
- package/dist/adapters/providerImageAdapter.d.ts +1 -1
- package/dist/adapters/tts/googleTTSHandler.d.ts +1 -2
- package/dist/adapters/tts/googleTTSHandler.js +1 -2
- package/dist/adapters/video/directorPipeline.d.ts +1 -1
- package/dist/adapters/video/vertexVideoHandler.d.ts +1 -1
- package/dist/agent/directTools.d.ts +7 -6
- package/dist/artifacts/artifactStore.d.ts +1 -2
- package/dist/artifacts/artifactStore.js +1 -0
- package/dist/auth/AuthProviderFactory.d.ts +1 -1
- package/dist/auth/anthropicOAuth.d.ts +4 -3
- package/dist/auth/anthropicOAuth.js +1 -1
- package/dist/auth/authContext.d.ts +1 -1
- package/dist/auth/errors.d.ts +1 -1
- package/dist/auth/index.d.ts +5 -10
- package/dist/auth/index.js +8 -2
- package/dist/auth/middleware/AuthMiddleware.d.ts +9 -8
- package/dist/auth/middleware/rateLimitByUser.d.ts +7 -7
- package/dist/auth/providers/BaseAuthProvider.d.ts +2 -2
- package/dist/auth/providers/CognitoProvider.d.ts +1 -1
- package/dist/auth/providers/KeycloakProvider.d.ts +1 -1
- package/dist/auth/providers/KeycloakProvider.js +1 -2
- package/dist/auth/providers/auth0.d.ts +1 -1
- package/dist/auth/providers/betterAuth.d.ts +1 -1
- package/dist/auth/providers/clerk.d.ts +1 -1
- package/dist/auth/providers/custom.d.ts +1 -1
- package/dist/auth/providers/firebase.d.ts +1 -1
- package/dist/auth/providers/jwt.d.ts +1 -1
- package/dist/auth/providers/oauth2.d.ts +1 -1
- package/dist/auth/providers/supabase.d.ts +1 -1
- package/dist/auth/providers/workos.d.ts +1 -1
- package/dist/auth/serverBridge.d.ts +1 -1
- package/dist/auth/sessionManager.d.ts +1 -27
- package/dist/auth/tokenStore.d.ts +1 -1
- package/dist/auth/tokenStore.js +1 -1
- package/dist/autoresearch/config.d.ts +1 -1
- package/dist/autoresearch/config.js +1 -1
- package/dist/autoresearch/phasePolicy.d.ts +1 -1
- package/dist/autoresearch/promptCompiler.d.ts +1 -1
- package/dist/autoresearch/repoPolicy.d.ts +1 -1
- package/dist/autoresearch/resultRecorder.d.ts +1 -1
- package/dist/autoresearch/runner.d.ts +1 -1
- package/dist/autoresearch/stateStore.d.ts +1 -1
- package/dist/autoresearch/summaryParser.d.ts +1 -1
- package/dist/autoresearch/tools.d.ts +3 -6
- package/dist/autoresearch/worker.d.ts +1 -1
- package/dist/browser/neurolink.min.js +377 -377
- package/dist/cli/commands/authProviders.d.ts +1 -30
- package/dist/cli/commands/config.d.ts +2 -2
- package/dist/cli/commands/evaluate.js +1 -1
- package/dist/cli/commands/proxy.js +333 -31
- package/dist/cli/loop/conversationSelector.d.ts +1 -2
- package/dist/cli/loop/conversationSelector.js +1 -1
- package/dist/cli/loop/optionsSchema.d.ts +1 -2
- package/dist/cli/utils/completeSetup.d.ts +1 -1
- package/dist/cli/utils/interactiveSetup.d.ts +3 -12
- package/dist/cli/utils/videoFileUtils.d.ts +2 -1
- package/dist/client/aiSdkAdapter.d.ts +8 -9
- package/dist/client/aiSdkAdapter.js +6 -1
- package/dist/client/auth.d.ts +6 -6
- package/dist/client/auth.js +1 -1
- package/dist/client/errors.d.ts +5 -6
- package/dist/client/errors.js +1 -1
- package/dist/client/httpClient.d.ts +25 -26
- package/dist/client/httpClient.js +3 -3
- package/dist/client/index.d.ts +0 -9
- package/dist/client/index.js +1 -1
- package/dist/client/interceptors.d.ts +14 -90
- package/dist/client/interceptors.js +18 -0
- package/dist/client/reactHooks.d.ts +1 -2
- package/dist/client/reactHooks.tsx +44 -64
- package/dist/client/sseClient.d.ts +6 -47
- package/dist/client/streamingClient.d.ts +9 -83
- package/dist/client/streamingClient.js +6 -0
- package/dist/client/wsClient.d.ts +8 -16
- package/dist/config/configManager.d.ts +2 -2
- package/dist/config/configManager.js +1 -1
- package/dist/config/conversationMemory.d.ts +1 -1
- package/dist/constants/index.d.ts +0 -1
- package/dist/constants/index.js +1 -0
- package/dist/context/budgetChecker.d.ts +1 -2
- package/dist/context/budgetChecker.js +1 -2
- package/dist/context/contextCompactor.d.ts +1 -3
- package/dist/context/contextCompactor.js +1 -2
- package/dist/context/effectiveHistory.d.ts +1 -1
- package/dist/context/emergencyTruncation.d.ts +1 -1
- package/dist/context/fileSummarizationService.d.ts +2 -3
- package/dist/context/fileSummarizer.d.ts +1 -2
- package/dist/context/fileTokenBudget.d.ts +1 -2
- package/dist/context/prompts/summarizationPrompt.d.ts +1 -2
- package/dist/context/stages/fileReadDeduplicator.d.ts +1 -3
- package/dist/context/stages/slidingWindowTruncator.d.ts +1 -3
- package/dist/context/stages/structuredSummarizer.d.ts +1 -3
- package/dist/context/stages/toolOutputPruner.d.ts +1 -3
- package/dist/context/summarizationEngine.d.ts +1 -1
- package/dist/context/toolOutputLimits.d.ts +1 -2
- package/dist/context/toolPairRepair.d.ts +1 -3
- package/dist/core/analytics.d.ts +1 -1
- package/dist/core/baseProvider.d.ts +1 -5
- package/dist/core/baseProvider.js +1 -1
- package/dist/core/conversationMemoryFactory.d.ts +1 -2
- package/dist/core/conversationMemoryInitializer.d.ts +1 -1
- package/dist/core/conversationMemoryManager.d.ts +1 -2
- package/dist/core/conversationMemoryManager.js +1 -1
- package/dist/core/factory.d.ts +1 -3
- package/dist/core/infrastructure/baseRegistry.d.ts +2 -1
- package/dist/core/infrastructure/index.d.ts +0 -2
- package/dist/core/infrastructure/retry.d.ts +2 -7
- package/dist/core/modelConfiguration.d.ts +1 -1
- package/dist/core/modules/MessageBuilder.d.ts +1 -2
- package/dist/core/modules/StreamHandler.d.ts +1 -3
- package/dist/core/modules/TelemetryHandler.d.ts +1 -2
- package/dist/core/modules/Utilities.d.ts +1 -4
- package/dist/core/redisConversationMemoryManager.d.ts +1 -2
- package/dist/core/redisConversationMemoryManager.js +1 -1
- package/dist/core/serviceRegistry.d.ts +1 -1
- package/dist/core/streamAnalytics.d.ts +1 -2
- package/dist/evaluation/BatchEvaluator.d.ts +12 -14
- package/dist/evaluation/EvaluationAggregator.d.ts +14 -13
- package/dist/evaluation/EvaluatorFactory.d.ts +4 -3
- package/dist/evaluation/EvaluatorRegistry.d.ts +7 -7
- package/dist/evaluation/contextBuilder.d.ts +1 -2
- package/dist/evaluation/errors/EvaluationError.d.ts +5 -8
- package/dist/evaluation/errors/index.d.ts +1 -1
- package/dist/evaluation/hooks/index.d.ts +2 -2
- package/dist/evaluation/hooks/langfuseAdapter.d.ts +3 -2
- package/dist/evaluation/hooks/observabilityHooks.d.ts +5 -5
- package/dist/evaluation/index.d.ts +5 -8
- package/dist/evaluation/index.js +3 -3
- package/dist/evaluation/pipeline/evaluationPipeline.d.ts +1 -33
- package/dist/evaluation/pipeline/index.d.ts +1 -1
- package/dist/evaluation/pipeline/pipelineBuilder.d.ts +1 -1
- package/dist/evaluation/pipeline/presets.d.ts +1 -1
- package/dist/evaluation/pipeline/strategies/batchStrategy.d.ts +7 -6
- package/dist/evaluation/pipeline/strategies/index.d.ts +1 -1
- package/dist/evaluation/pipeline/strategies/samplingStrategy.d.ts +1 -1
- package/dist/evaluation/prompts.d.ts +1 -1
- package/dist/evaluation/ragasEvaluator.d.ts +1 -1
- package/dist/evaluation/ragasEvaluator.js +1 -2
- package/dist/evaluation/reporting/index.d.ts +2 -2
- package/dist/evaluation/reporting/metricsCollector.d.ts +5 -5
- package/dist/evaluation/reporting/reportGenerator.d.ts +3 -20
- package/dist/evaluation/retryManager.d.ts +1 -2
- package/dist/evaluation/scorers/baseScorer.d.ts +1 -2
- package/dist/evaluation/scorers/customScorerUtils.d.ts +1 -10
- package/dist/evaluation/scorers/index.d.ts +1 -1
- package/dist/evaluation/scorers/llm/answerRelevancyScorer.d.ts +1 -1
- package/dist/evaluation/scorers/llm/baseLLMScorer.d.ts +1 -3
- package/dist/evaluation/scorers/llm/biasDetectionScorer.d.ts +1 -1
- package/dist/evaluation/scorers/llm/contextPrecisionScorer.d.ts +1 -1
- package/dist/evaluation/scorers/llm/contextRelevancyScorer.d.ts +1 -1
- package/dist/evaluation/scorers/llm/faithfulnessScorer.d.ts +1 -1
- package/dist/evaluation/scorers/llm/hallucinationScorer.d.ts +1 -1
- package/dist/evaluation/scorers/llm/promptAlignmentScorer.d.ts +1 -1
- package/dist/evaluation/scorers/llm/summarizationScorer.d.ts +1 -1
- package/dist/evaluation/scorers/llm/toneConsistencyScorer.d.ts +1 -1
- package/dist/evaluation/scorers/llm/toxicityScorer.d.ts +1 -1
- package/dist/evaluation/scorers/rule/baseRuleScorer.d.ts +1 -1
- package/dist/evaluation/scorers/rule/contentSimilarityScorer.d.ts +4 -3
- package/dist/evaluation/scorers/rule/formatScorer.d.ts +5 -4
- package/dist/evaluation/scorers/rule/index.d.ts +4 -4
- package/dist/evaluation/scorers/rule/keywordCoverageScorer.d.ts +3 -2
- package/dist/evaluation/scorers/rule/lengthScorer.d.ts +5 -4
- package/dist/evaluation/scorers/scorerBuilder.d.ts +1 -2
- package/dist/evaluation/scorers/scorerBuilder.js +1 -1
- package/dist/evaluation/scorers/scorerRegistry.d.ts +1 -1
- package/dist/evaluation/scoring.d.ts +1 -2
- package/dist/evaluation/scoring.js +1 -2
- package/dist/factories/providerFactory.d.ts +1 -2
- package/dist/features/ppt/constants.d.ts +1 -1
- package/dist/features/ppt/contentPlanner.d.ts +1 -2
- package/dist/features/ppt/contentPlanner.js +1 -1
- package/dist/features/ppt/index.d.ts +2 -17
- package/dist/features/ppt/index.js +6 -14
- package/dist/features/ppt/pptError.d.ts +38 -0
- package/dist/features/ppt/pptError.js +53 -0
- package/dist/features/ppt/presentationOrchestrator.d.ts +1 -1
- package/dist/features/ppt/presentationOrchestrator.js +2 -3
- package/dist/features/ppt/slideGenerator.d.ts +1 -1
- package/dist/features/ppt/slideGenerator.js +2 -3
- package/dist/features/ppt/slideRenderers.d.ts +1 -1
- package/dist/features/ppt/slideTypeInference.d.ts +1 -1
- package/dist/features/ppt/utils.d.ts +1 -2
- package/dist/features/ppt/utils.js +1 -1
- package/dist/files/fileReferenceRegistry.d.ts +1 -2
- package/dist/files/fileReferenceRegistry.js +1 -1
- package/dist/files/fileTools.d.ts +5 -5
- package/dist/files/index.d.ts +1 -2
- package/dist/files/index.js +1 -1
- package/dist/files/streamingReader.d.ts +1 -1
- package/dist/hitl/hitlManager.d.ts +1 -1
- package/dist/image-gen/ImageGenService.d.ts +1 -1
- package/dist/image-gen/ImageGenService.js +1 -1
- package/dist/image-gen/imageGenTools.d.ts +1 -18
- package/dist/image-gen/index.d.ts +1 -2
- package/dist/image-gen/index.js +1 -1
- package/dist/index.d.ts +6 -25
- package/dist/index.js +23 -8
- package/dist/lib/action/actionExecutor.d.ts +1 -1
- package/dist/lib/action/actionInputs.d.ts +1 -1
- package/dist/lib/action/githubIntegration.d.ts +1 -1
- package/dist/lib/action/index.d.ts +0 -1
- package/dist/lib/action/index.js +1 -0
- package/dist/lib/adapters/providerImageAdapter.d.ts +1 -1
- package/dist/lib/adapters/tts/googleTTSHandler.d.ts +1 -2
- package/dist/lib/adapters/tts/googleTTSHandler.js +1 -2
- package/dist/lib/adapters/video/directorPipeline.d.ts +1 -1
- package/dist/lib/adapters/video/vertexVideoHandler.d.ts +1 -1
- package/dist/lib/agent/directTools.d.ts +7 -6
- package/dist/lib/artifacts/artifactStore.d.ts +1 -2
- package/dist/lib/artifacts/artifactStore.js +1 -0
- package/dist/lib/auth/AuthProviderFactory.d.ts +1 -1
- package/dist/lib/auth/anthropicOAuth.d.ts +4 -3
- package/dist/lib/auth/anthropicOAuth.js +1 -1
- package/dist/lib/auth/authContext.d.ts +1 -1
- package/dist/lib/auth/errors.d.ts +1 -1
- package/dist/lib/auth/index.d.ts +5 -10
- package/dist/lib/auth/index.js +8 -2
- package/dist/lib/auth/middleware/AuthMiddleware.d.ts +9 -8
- package/dist/lib/auth/middleware/rateLimitByUser.d.ts +7 -7
- package/dist/lib/auth/providers/BaseAuthProvider.d.ts +2 -2
- package/dist/lib/auth/providers/CognitoProvider.d.ts +1 -1
- package/dist/lib/auth/providers/KeycloakProvider.d.ts +1 -1
- package/dist/lib/auth/providers/KeycloakProvider.js +1 -2
- package/dist/lib/auth/providers/auth0.d.ts +1 -1
- package/dist/lib/auth/providers/betterAuth.d.ts +1 -1
- package/dist/lib/auth/providers/clerk.d.ts +1 -1
- package/dist/lib/auth/providers/custom.d.ts +1 -1
- package/dist/lib/auth/providers/firebase.d.ts +1 -1
- package/dist/lib/auth/providers/jwt.d.ts +1 -1
- package/dist/lib/auth/providers/oauth2.d.ts +1 -1
- package/dist/lib/auth/providers/supabase.d.ts +1 -1
- package/dist/lib/auth/providers/workos.d.ts +1 -1
- package/dist/lib/auth/serverBridge.d.ts +1 -1
- package/dist/lib/auth/sessionManager.d.ts +1 -27
- package/dist/lib/auth/tokenStore.d.ts +1 -1
- package/dist/lib/auth/tokenStore.js +1 -1
- package/dist/lib/autoresearch/config.d.ts +1 -1
- package/dist/lib/autoresearch/config.js +1 -1
- package/dist/lib/autoresearch/phasePolicy.d.ts +1 -1
- package/dist/lib/autoresearch/promptCompiler.d.ts +1 -1
- package/dist/lib/autoresearch/repoPolicy.d.ts +1 -1
- package/dist/lib/autoresearch/resultRecorder.d.ts +1 -1
- package/dist/lib/autoresearch/runner.d.ts +1 -1
- package/dist/lib/autoresearch/stateStore.d.ts +1 -1
- package/dist/lib/autoresearch/summaryParser.d.ts +1 -1
- package/dist/lib/autoresearch/tools.d.ts +7 -10
- package/dist/lib/autoresearch/worker.d.ts +2 -2
- package/dist/lib/client/aiSdkAdapter.d.ts +8 -9
- package/dist/lib/client/aiSdkAdapter.js +6 -1
- package/dist/lib/client/auth.d.ts +6 -6
- package/dist/lib/client/auth.js +1 -1
- package/dist/lib/client/errors.d.ts +5 -6
- package/dist/lib/client/errors.js +1 -1
- package/dist/lib/client/httpClient.d.ts +25 -26
- package/dist/lib/client/httpClient.js +3 -3
- package/dist/lib/client/index.d.ts +0 -9
- package/dist/lib/client/index.js +1 -1
- package/dist/lib/client/interceptors.d.ts +14 -90
- package/dist/lib/client/interceptors.js +18 -0
- package/dist/lib/client/reactHooks.d.ts +1 -2
- package/dist/lib/client/sseClient.d.ts +6 -47
- package/dist/lib/client/streamingClient.d.ts +9 -83
- package/dist/lib/client/streamingClient.js +6 -0
- package/dist/lib/client/wsClient.d.ts +8 -16
- package/dist/lib/config/configManager.d.ts +2 -2
- package/dist/lib/config/configManager.js +1 -1
- package/dist/lib/config/conversationMemory.d.ts +1 -1
- package/dist/lib/constants/index.d.ts +0 -1
- package/dist/lib/constants/index.js +1 -0
- package/dist/lib/context/budgetChecker.d.ts +1 -2
- package/dist/lib/context/budgetChecker.js +1 -2
- package/dist/lib/context/contextCompactor.d.ts +1 -3
- package/dist/lib/context/contextCompactor.js +1 -2
- package/dist/lib/context/effectiveHistory.d.ts +1 -1
- package/dist/lib/context/emergencyTruncation.d.ts +1 -1
- package/dist/lib/context/fileSummarizationService.d.ts +2 -3
- package/dist/lib/context/fileSummarizer.d.ts +1 -2
- package/dist/lib/context/fileTokenBudget.d.ts +1 -2
- package/dist/lib/context/prompts/summarizationPrompt.d.ts +1 -2
- package/dist/lib/context/stages/fileReadDeduplicator.d.ts +1 -3
- package/dist/lib/context/stages/slidingWindowTruncator.d.ts +1 -3
- package/dist/lib/context/stages/structuredSummarizer.d.ts +1 -3
- package/dist/lib/context/stages/toolOutputPruner.d.ts +1 -3
- package/dist/lib/context/summarizationEngine.d.ts +1 -1
- package/dist/lib/context/toolOutputLimits.d.ts +1 -2
- package/dist/lib/context/toolPairRepair.d.ts +1 -3
- package/dist/lib/core/analytics.d.ts +1 -1
- package/dist/lib/core/baseProvider.d.ts +1 -5
- package/dist/lib/core/baseProvider.js +1 -1
- package/dist/lib/core/conversationMemoryFactory.d.ts +1 -2
- package/dist/lib/core/conversationMemoryInitializer.d.ts +1 -1
- package/dist/lib/core/conversationMemoryManager.d.ts +1 -2
- package/dist/lib/core/conversationMemoryManager.js +1 -1
- package/dist/lib/core/factory.d.ts +1 -3
- package/dist/lib/core/infrastructure/baseRegistry.d.ts +2 -1
- package/dist/lib/core/infrastructure/index.d.ts +0 -2
- package/dist/lib/core/infrastructure/retry.d.ts +2 -7
- package/dist/lib/core/modelConfiguration.d.ts +1 -1
- package/dist/lib/core/modules/MessageBuilder.d.ts +1 -2
- package/dist/lib/core/modules/StreamHandler.d.ts +1 -3
- package/dist/lib/core/modules/TelemetryHandler.d.ts +1 -2
- package/dist/lib/core/modules/Utilities.d.ts +1 -4
- package/dist/lib/core/redisConversationMemoryManager.d.ts +1 -2
- package/dist/lib/core/redisConversationMemoryManager.js +1 -1
- package/dist/lib/core/serviceRegistry.d.ts +1 -1
- package/dist/lib/core/streamAnalytics.d.ts +1 -2
- package/dist/lib/evaluation/BatchEvaluator.d.ts +12 -14
- package/dist/lib/evaluation/EvaluationAggregator.d.ts +14 -13
- package/dist/lib/evaluation/EvaluatorFactory.d.ts +4 -3
- package/dist/lib/evaluation/EvaluatorRegistry.d.ts +7 -7
- package/dist/lib/evaluation/contextBuilder.d.ts +1 -2
- package/dist/lib/evaluation/errors/EvaluationError.d.ts +5 -8
- package/dist/lib/evaluation/errors/index.d.ts +1 -1
- package/dist/lib/evaluation/hooks/index.d.ts +2 -2
- package/dist/lib/evaluation/hooks/langfuseAdapter.d.ts +3 -2
- package/dist/lib/evaluation/hooks/observabilityHooks.d.ts +5 -5
- package/dist/lib/evaluation/index.d.ts +5 -8
- package/dist/lib/evaluation/index.js +3 -3
- package/dist/lib/evaluation/pipeline/evaluationPipeline.d.ts +1 -33
- package/dist/lib/evaluation/pipeline/index.d.ts +1 -1
- package/dist/lib/evaluation/pipeline/pipelineBuilder.d.ts +1 -1
- package/dist/lib/evaluation/pipeline/presets.d.ts +1 -1
- package/dist/lib/evaluation/pipeline/strategies/batchStrategy.d.ts +7 -6
- package/dist/lib/evaluation/pipeline/strategies/index.d.ts +1 -1
- package/dist/lib/evaluation/pipeline/strategies/samplingStrategy.d.ts +1 -1
- package/dist/lib/evaluation/prompts.d.ts +1 -1
- package/dist/lib/evaluation/ragasEvaluator.d.ts +1 -1
- package/dist/lib/evaluation/ragasEvaluator.js +1 -2
- package/dist/lib/evaluation/reporting/index.d.ts +2 -2
- package/dist/lib/evaluation/reporting/metricsCollector.d.ts +5 -5
- package/dist/lib/evaluation/reporting/reportGenerator.d.ts +3 -20
- package/dist/lib/evaluation/retryManager.d.ts +1 -2
- package/dist/lib/evaluation/scorers/baseScorer.d.ts +1 -2
- package/dist/lib/evaluation/scorers/customScorerUtils.d.ts +1 -10
- package/dist/lib/evaluation/scorers/index.d.ts +1 -1
- package/dist/lib/evaluation/scorers/llm/answerRelevancyScorer.d.ts +1 -1
- package/dist/lib/evaluation/scorers/llm/baseLLMScorer.d.ts +1 -3
- package/dist/lib/evaluation/scorers/llm/biasDetectionScorer.d.ts +1 -1
- package/dist/lib/evaluation/scorers/llm/contextPrecisionScorer.d.ts +1 -1
- package/dist/lib/evaluation/scorers/llm/contextRelevancyScorer.d.ts +1 -1
- package/dist/lib/evaluation/scorers/llm/faithfulnessScorer.d.ts +1 -1
- package/dist/lib/evaluation/scorers/llm/hallucinationScorer.d.ts +1 -1
- package/dist/lib/evaluation/scorers/llm/promptAlignmentScorer.d.ts +1 -1
- package/dist/lib/evaluation/scorers/llm/summarizationScorer.d.ts +1 -1
- package/dist/lib/evaluation/scorers/llm/toneConsistencyScorer.d.ts +1 -1
- package/dist/lib/evaluation/scorers/llm/toxicityScorer.d.ts +1 -1
- package/dist/lib/evaluation/scorers/rule/baseRuleScorer.d.ts +1 -1
- package/dist/lib/evaluation/scorers/rule/contentSimilarityScorer.d.ts +4 -3
- package/dist/lib/evaluation/scorers/rule/formatScorer.d.ts +5 -4
- package/dist/lib/evaluation/scorers/rule/index.d.ts +4 -4
- package/dist/lib/evaluation/scorers/rule/keywordCoverageScorer.d.ts +3 -2
- package/dist/lib/evaluation/scorers/rule/lengthScorer.d.ts +5 -4
- package/dist/lib/evaluation/scorers/scorerBuilder.d.ts +1 -2
- package/dist/lib/evaluation/scorers/scorerBuilder.js +1 -1
- package/dist/lib/evaluation/scorers/scorerRegistry.d.ts +1 -1
- package/dist/lib/evaluation/scoring.d.ts +1 -2
- package/dist/lib/evaluation/scoring.js +1 -2
- package/dist/lib/factories/providerFactory.d.ts +1 -2
- package/dist/lib/features/ppt/constants.d.ts +1 -1
- package/dist/lib/features/ppt/contentPlanner.d.ts +1 -2
- package/dist/lib/features/ppt/contentPlanner.js +1 -1
- package/dist/lib/features/ppt/index.d.ts +2 -17
- package/dist/lib/features/ppt/index.js +6 -14
- package/dist/lib/features/ppt/pptError.d.ts +38 -0
- package/dist/lib/features/ppt/pptError.js +54 -0
- package/dist/lib/features/ppt/presentationOrchestrator.d.ts +1 -1
- package/dist/lib/features/ppt/presentationOrchestrator.js +2 -3
- package/dist/lib/features/ppt/slideGenerator.d.ts +1 -1
- package/dist/lib/features/ppt/slideGenerator.js +2 -3
- package/dist/lib/features/ppt/slideRenderers.d.ts +1 -1
- package/dist/lib/features/ppt/slideTypeInference.d.ts +1 -1
- package/dist/lib/features/ppt/utils.d.ts +1 -2
- package/dist/lib/features/ppt/utils.js +1 -1
- package/dist/lib/files/fileReferenceRegistry.d.ts +1 -2
- package/dist/lib/files/fileReferenceRegistry.js +1 -1
- package/dist/lib/files/fileTools.d.ts +5 -5
- package/dist/lib/files/index.d.ts +1 -2
- package/dist/lib/files/index.js +1 -1
- package/dist/lib/files/streamingReader.d.ts +1 -1
- package/dist/lib/hitl/hitlManager.d.ts +1 -1
- package/dist/lib/image-gen/ImageGenService.d.ts +1 -1
- package/dist/lib/image-gen/ImageGenService.js +1 -1
- package/dist/lib/image-gen/imageGenTools.d.ts +1 -18
- package/dist/lib/image-gen/index.d.ts +1 -2
- package/dist/lib/image-gen/index.js +1 -1
- package/dist/lib/index.d.ts +6 -25
- package/dist/lib/index.js +23 -8
- package/dist/lib/mcp/agentExposure.d.ts +1 -146
- package/dist/lib/mcp/auth/oauthClientProvider.d.ts +1 -1
- package/dist/lib/mcp/auth/tokenStorage.d.ts +1 -1
- package/dist/lib/mcp/batching/index.d.ts +0 -10
- package/dist/lib/mcp/batching/index.js +0 -9
- package/dist/lib/mcp/batching/requestBatcher.d.ts +1 -73
- package/dist/lib/mcp/caching/index.d.ts +0 -10
- package/dist/lib/mcp/caching/index.js +0 -9
- package/dist/lib/mcp/caching/toolCache.d.ts +6 -73
- package/dist/lib/mcp/elicitation/elicitationManager.d.ts +1 -1
- package/dist/lib/mcp/elicitation/index.d.ts +0 -10
- package/dist/lib/mcp/elicitation/index.js +0 -9
- package/dist/lib/mcp/elicitationProtocol.d.ts +1 -90
- package/dist/lib/mcp/enhancedToolDiscovery.d.ts +2 -82
- package/dist/lib/mcp/enhancedToolDiscovery.js +1 -1
- package/dist/lib/mcp/externalServerManager.d.ts +1 -5
- package/dist/lib/mcp/factory.d.ts +1 -1
- package/dist/lib/mcp/flexibleToolValidator.d.ts +1 -1
- package/dist/lib/mcp/httpRateLimiter.d.ts +6 -6
- package/dist/lib/mcp/httpRateLimiter.js +1 -2
- package/dist/lib/mcp/httpRetryHandler.d.ts +1 -1
- package/dist/lib/mcp/httpRetryHandler.js +1 -2
- package/dist/lib/mcp/index.d.ts +1 -15
- package/dist/lib/mcp/index.js +7 -0
- package/dist/lib/mcp/mcpCircuitBreaker.d.ts +2 -2
- package/dist/lib/mcp/mcpCircuitBreaker.js +2 -2
- package/dist/lib/mcp/mcpClientFactory.d.ts +1 -2
- package/dist/lib/mcp/mcpClientFactory.js +2 -3
- package/dist/lib/mcp/mcpOutputNormalizer.d.ts +1 -3
- package/dist/lib/mcp/mcpOutputNormalizer.js +1 -0
- package/dist/lib/mcp/mcpRegistryClient.d.ts +13 -216
- package/dist/lib/mcp/mcpServerBase.d.ts +1 -66
- package/dist/lib/mcp/mcpServerBase.js +3 -0
- package/dist/lib/mcp/multiServerManager.d.ts +1 -116
- package/dist/lib/mcp/registry.d.ts +1 -3
- package/dist/lib/mcp/routing/index.d.ts +0 -10
- package/dist/lib/mcp/routing/index.js +0 -9
- package/dist/lib/mcp/routing/toolRouter.d.ts +1 -110
- package/dist/lib/mcp/serverCapabilities.d.ts +1 -167
- package/dist/lib/mcp/servers/agent/directToolsServer.d.ts +1 -1
- package/dist/lib/mcp/servers/aiProviders/aiCoreServer.d.ts +1 -1
- package/dist/lib/mcp/servers/utilities/utilityServer.d.ts +1 -1
- package/dist/lib/mcp/toolAnnotations.d.ts +1 -98
- package/dist/lib/mcp/toolConverter.d.ts +1 -92
- package/dist/lib/mcp/toolDiscoveryService.d.ts +1 -3
- package/dist/lib/mcp/toolIntegration.d.ts +1 -45
- package/dist/lib/mcp/toolRegistry.d.ts +1 -3
- package/dist/lib/memory/hippocampusInitializer.d.ts +0 -3
- package/dist/lib/memory/memoryRetrievalTools.d.ts +1 -1
- package/dist/lib/memory/memoryRetrievalTools.js +1 -2
- package/dist/lib/middleware/builtin/analytics.d.ts +1 -1
- package/dist/lib/middleware/builtin/autoEvaluation.d.ts +1 -1
- package/dist/lib/middleware/builtin/guardrails.d.ts +1 -2
- package/dist/lib/middleware/builtin/lifecycle.d.ts +1 -1
- package/dist/lib/middleware/factory.d.ts +1 -1
- package/dist/lib/middleware/index.d.ts +0 -2
- package/dist/lib/middleware/index.js +1 -0
- package/dist/lib/middleware/registry.d.ts +1 -1
- package/dist/lib/middleware/utils/guardrailsUtils.d.ts +1 -1
- package/dist/lib/models/anthropicModels.d.ts +2 -2
- package/dist/lib/models/anthropicModels.js +1 -1
- package/dist/lib/models/modelRegistry.d.ts +1 -2
- package/dist/lib/models/modelRegistry.js +1 -1
- package/dist/lib/models/modelResolver.d.ts +1 -2
- package/dist/lib/neurolink.d.ts +15 -30
- package/dist/lib/neurolink.js +3 -5
- package/dist/lib/observability/exporterRegistry.d.ts +1 -1
- package/dist/lib/observability/exporters/arizeExporter.d.ts +1 -1
- package/dist/lib/observability/exporters/baseExporter.d.ts +1 -1
- package/dist/lib/observability/exporters/braintrustExporter.d.ts +1 -1
- package/dist/lib/observability/exporters/datadogExporter.d.ts +1 -1
- package/dist/lib/observability/exporters/datadogExporter.js +1 -1
- package/dist/lib/observability/exporters/laminarExporter.d.ts +1 -1
- package/dist/lib/observability/exporters/laminarExporter.js +1 -1
- package/dist/lib/observability/exporters/langfuseExporter.d.ts +1 -1
- package/dist/lib/observability/exporters/langfuseExporter.js +1 -1
- package/dist/lib/observability/exporters/langsmithExporter.d.ts +1 -1
- package/dist/lib/observability/exporters/otelExporter.d.ts +1 -1
- package/dist/lib/observability/exporters/posthogExporter.d.ts +1 -1
- package/dist/lib/observability/exporters/posthogExporter.js +1 -1
- package/dist/lib/observability/exporters/sentryExporter.d.ts +1 -1
- package/dist/lib/observability/exporters/sentryExporter.js +1 -1
- package/dist/lib/observability/index.d.ts +6 -8
- package/dist/lib/observability/index.js +1 -1
- package/dist/lib/observability/metricsAggregator.d.ts +4 -108
- package/dist/lib/observability/metricsAggregator.js +0 -4
- package/dist/lib/observability/otelBridge.d.ts +2 -2
- package/dist/lib/observability/otelBridge.js +1 -1
- package/dist/lib/observability/retryPolicy.d.ts +1 -27
- package/dist/lib/observability/sampling/index.d.ts +1 -1
- package/dist/lib/observability/sampling/samplers.d.ts +1 -3
- package/dist/lib/observability/sampling/samplers.js +1 -1
- package/dist/lib/observability/spanProcessor.d.ts +1 -2
- package/dist/lib/observability/tokenTracker.d.ts +3 -41
- package/dist/lib/observability/utils/safeMetadata.d.ts +1 -1
- package/dist/lib/observability/utils/spanSerializer.d.ts +1 -1
- package/dist/lib/observability/utils/spanSerializer.js +1 -1
- package/dist/lib/processors/archive/ArchiveProcessor.d.ts +3 -44
- package/dist/lib/processors/archive/ArchiveProcessor.js +3 -0
- package/dist/lib/processors/archive/index.d.ts +1 -1
- package/dist/lib/processors/archive/index.js +1 -0
- package/dist/lib/processors/base/BaseFileProcessor.d.ts +6 -6
- package/dist/lib/processors/base/BaseFileProcessor.js +1 -1
- package/dist/lib/processors/base/index.d.ts +1 -2
- package/dist/lib/processors/base/index.js +4 -1
- package/dist/lib/processors/cli/fileProcessorCli.d.ts +1 -40
- package/dist/lib/processors/cli/fileProcessorCli.js +3 -0
- package/dist/lib/processors/cli/index.d.ts +0 -1
- package/dist/lib/processors/cli/index.js +3 -0
- package/dist/lib/processors/code/ConfigProcessor.d.ts +2 -4
- package/dist/lib/processors/code/ConfigProcessor.js +4 -0
- package/dist/lib/processors/code/SourceCodeProcessor.d.ts +2 -4
- package/dist/lib/processors/code/SourceCodeProcessor.js +4 -0
- package/dist/lib/processors/code/index.d.ts +2 -2
- package/dist/lib/processors/code/index.js +6 -2
- package/dist/lib/processors/config/fileTypes.d.ts +0 -20
- package/dist/lib/processors/config/fileTypes.js +3 -0
- package/dist/lib/processors/config/index.d.ts +4 -4
- package/dist/lib/processors/config/index.js +10 -3
- package/dist/lib/processors/config/languageMap.d.ts +0 -4
- package/dist/lib/processors/config/languageMap.js +3 -0
- package/dist/lib/processors/config/mimeTypes.d.ts +0 -18
- package/dist/lib/processors/config/mimeTypes.js +3 -0
- package/dist/lib/processors/config/sizeLimits.d.ts +0 -8
- package/dist/lib/processors/config/sizeLimits.js +3 -0
- package/dist/lib/processors/data/JsonProcessor.d.ts +2 -4
- package/dist/lib/processors/data/JsonProcessor.js +2 -0
- package/dist/lib/processors/data/XmlProcessor.d.ts +3 -5
- package/dist/lib/processors/data/XmlProcessor.js +4 -0
- package/dist/lib/processors/data/YamlProcessor.d.ts +3 -5
- package/dist/lib/processors/data/YamlProcessor.js +2 -0
- package/dist/lib/processors/data/index.d.ts +3 -3
- package/dist/lib/processors/data/index.js +9 -3
- package/dist/lib/processors/document/ExcelProcessor.d.ts +3 -5
- package/dist/lib/processors/document/ExcelProcessor.js +2 -0
- package/dist/lib/processors/document/OpenDocumentProcessor.d.ts +2 -4
- package/dist/lib/processors/document/OpenDocumentProcessor.js +1 -0
- package/dist/lib/processors/document/RtfProcessor.d.ts +2 -4
- package/dist/lib/processors/document/RtfProcessor.js +2 -0
- package/dist/lib/processors/document/WordProcessor.d.ts +3 -5
- package/dist/lib/processors/document/WordProcessor.js +2 -0
- package/dist/lib/processors/document/index.d.ts +4 -4
- package/dist/lib/processors/document/index.js +4 -1
- package/dist/lib/processors/errors/FileErrorCode.d.ts +3 -15
- package/dist/lib/processors/errors/errorHelpers.d.ts +2 -2
- package/dist/lib/processors/errors/errorHelpers.js +1 -1
- package/dist/lib/processors/errors/errorSerializer.d.ts +3 -2
- package/dist/lib/processors/errors/index.d.ts +3 -3
- package/dist/lib/processors/index.d.ts +7 -10
- package/dist/lib/processors/index.js +11 -2
- package/dist/lib/processors/integration/FileProcessorIntegration.d.ts +2 -70
- package/dist/lib/processors/integration/FileProcessorIntegration.js +6 -0
- package/dist/lib/processors/integration/index.d.ts +0 -1
- package/dist/lib/processors/integration/index.js +3 -0
- package/dist/lib/processors/markup/HtmlProcessor.d.ts +2 -4
- package/dist/lib/processors/markup/HtmlProcessor.js +2 -0
- package/dist/lib/processors/markup/MarkdownProcessor.d.ts +2 -4
- package/dist/lib/processors/markup/MarkdownProcessor.js +4 -0
- package/dist/lib/processors/markup/SvgProcessor.d.ts +2 -4
- package/dist/lib/processors/markup/SvgProcessor.js +4 -0
- package/dist/lib/processors/markup/TextProcessor.d.ts +2 -4
- package/dist/lib/processors/markup/TextProcessor.js +2 -0
- package/dist/lib/processors/markup/index.d.ts +4 -4
- package/dist/lib/processors/markup/index.js +12 -4
- package/dist/lib/processors/media/AudioProcessor.d.ts +3 -64
- package/dist/lib/processors/media/AudioProcessor.js +3 -0
- package/dist/lib/processors/media/VideoProcessor.d.ts +3 -48
- package/dist/lib/processors/media/VideoProcessor.js +3 -0
- package/dist/lib/processors/media/index.d.ts +0 -1
- package/dist/lib/processors/media/index.js +3 -0
- package/dist/lib/processors/registry/ProcessorRegistry.d.ts +2 -3
- package/dist/lib/processors/registry/ProcessorRegistry.js +1 -1
- package/dist/lib/processors/registry/index.d.ts +1 -11
- package/dist/lib/processors/registry/index.js +2 -9
- package/dist/lib/providers/amazonBedrock.d.ts +1 -2
- package/dist/lib/providers/amazonBedrock.js +1 -1
- package/dist/lib/providers/amazonSagemaker.d.ts +1 -1
- package/dist/lib/providers/anthropic.d.ts +2 -7
- package/dist/lib/providers/anthropic.js +3 -1
- package/dist/lib/providers/anthropicBaseProvider.d.ts +1 -1
- package/dist/lib/providers/anthropicBaseProvider.js +1 -1
- package/dist/lib/providers/azureOpenai.d.ts +1 -2
- package/dist/lib/providers/googleAiStudio.d.ts +1 -3
- package/dist/lib/providers/googleAiStudio.js +3 -2
- package/dist/lib/providers/googleNativeGemini3.d.ts +1 -2
- package/dist/lib/providers/googleVertex.d.ts +1 -3
- package/dist/lib/providers/googleVertex.js +3 -3
- package/dist/lib/providers/huggingFace.d.ts +1 -2
- package/dist/lib/providers/litellm.d.ts +1 -1
- package/dist/lib/providers/litellm.js +3 -2
- package/dist/lib/providers/mistral.d.ts +1 -3
- package/dist/lib/providers/ollama.d.ts +1 -2
- package/dist/lib/providers/ollama.js +1 -1
- package/dist/lib/providers/openAI.d.ts +1 -2
- package/dist/lib/providers/openAI.js +1 -1
- package/dist/lib/providers/openRouter.d.ts +1 -1
- package/dist/lib/providers/openaiCompatible.d.ts +1 -2
- package/dist/lib/providers/providerTypeUtils.d.ts +1 -1
- package/dist/lib/providers/sagemaker/adaptive-semaphore.d.ts +1 -1
- package/dist/lib/providers/sagemaker/client.d.ts +1 -2
- package/dist/lib/providers/sagemaker/config.d.ts +1 -1
- package/dist/lib/providers/sagemaker/detection.d.ts +4 -27
- package/dist/lib/providers/sagemaker/diagnostics.d.ts +3 -2
- package/dist/lib/providers/sagemaker/errors.d.ts +1 -1
- package/dist/lib/providers/sagemaker/index.d.ts +0 -1
- package/dist/lib/providers/sagemaker/index.js +1 -0
- package/dist/lib/providers/sagemaker/language-model.d.ts +3 -4
- package/dist/lib/providers/sagemaker/parsers.d.ts +1 -26
- package/dist/lib/providers/sagemaker/streaming.d.ts +1 -1
- package/dist/lib/providers/sagemaker/streaming.js +1 -1
- package/dist/lib/providers/sagemaker/structured-parser.d.ts +1 -1
- package/dist/lib/providers/sagemaker/structured-parser.js +1 -1
- package/dist/lib/proxy/cloaking/index.d.ts +0 -1
- package/dist/lib/proxy/cloaking/index.js +1 -0
- package/dist/lib/proxy/proxyEnv.d.ts +3 -3
- package/dist/lib/proxy/proxyPaths.d.ts +1 -10
- package/dist/lib/proxy/proxyTracer.d.ts +0 -1
- package/dist/lib/proxy/quietDetector.d.ts +3 -2
- package/dist/lib/proxy/rawStreamCapture.d.ts +3 -2
- package/dist/lib/proxy/routingPolicy.d.ts +4 -29
- package/dist/lib/proxy/routingPolicy.js +14 -46
- package/dist/lib/proxy/sseInterceptor.d.ts +5 -4
- package/dist/lib/proxy/updateChecker.d.ts +3 -2
- package/dist/lib/proxy/updateState.d.ts +5 -4
- package/dist/lib/proxy/usageStats.d.ts +0 -1
- package/dist/lib/proxy/usageStats.js +0 -7
- package/dist/lib/rag/ChunkerFactory.d.ts +1 -1
- package/dist/lib/rag/ChunkerRegistry.d.ts +1 -1
- package/dist/lib/rag/chunkers/BaseChunker.d.ts +1 -1
- package/dist/lib/rag/chunkers/CharacterChunker.d.ts +1 -1
- package/dist/lib/rag/chunkers/HTMLChunker.d.ts +1 -1
- package/dist/lib/rag/chunkers/JSONChunker.d.ts +1 -1
- package/dist/lib/rag/chunkers/LaTeXChunker.d.ts +1 -1
- package/dist/lib/rag/chunkers/MarkdownChunker.d.ts +1 -1
- package/dist/lib/rag/chunkers/RecursiveChunker.d.ts +1 -1
- package/dist/lib/rag/chunkers/SemanticMarkdownChunker.d.ts +1 -1
- package/dist/lib/rag/chunkers/SentenceChunker.d.ts +1 -1
- package/dist/lib/rag/chunkers/TokenChunker.d.ts +1 -1
- package/dist/lib/rag/chunking/characterChunker.d.ts +1 -1
- package/dist/lib/rag/chunking/chunkerRegistry.d.ts +2 -2
- package/dist/lib/rag/chunking/htmlChunker.d.ts +1 -1
- package/dist/lib/rag/chunking/jsonChunker.d.ts +1 -1
- package/dist/lib/rag/chunking/latexChunker.d.ts +1 -1
- package/dist/lib/rag/chunking/markdownChunker.d.ts +1 -1
- package/dist/lib/rag/chunking/recursiveChunker.d.ts +1 -1
- package/dist/lib/rag/chunking/semanticChunker.d.ts +1 -1
- package/dist/lib/rag/chunking/sentenceChunker.d.ts +1 -1
- package/dist/lib/rag/chunking/tokenChunker.d.ts +1 -1
- package/dist/lib/rag/document/MDocument.d.ts +1 -1
- package/dist/lib/rag/document/index.d.ts +1 -1
- package/dist/lib/rag/document/loaders.d.ts +1 -6
- package/dist/lib/rag/errors/RAGError.d.ts +2 -1
- package/dist/lib/rag/errors/index.d.ts +1 -1
- package/dist/lib/rag/graphRag/graphRAG.d.ts +1 -1
- package/dist/lib/rag/index.d.ts +8 -8
- package/dist/lib/rag/index.js +1 -1
- package/dist/lib/rag/metadata/MetadataExtractorFactory.d.ts +1 -5
- package/dist/lib/rag/metadata/MetadataExtractorRegistry.d.ts +1 -1
- package/dist/lib/rag/metadata/index.d.ts +1 -1
- package/dist/lib/rag/metadata/metadataExtractor.d.ts +1 -1
- package/dist/lib/rag/pipeline/RAGPipeline.d.ts +1 -8
- package/dist/lib/rag/pipeline/RAGPipeline.js +1 -1
- package/dist/lib/rag/pipeline/contextAssembly.d.ts +1 -5
- package/dist/lib/rag/pipeline/index.d.ts +2 -2
- package/dist/lib/rag/pipeline/index.js +1 -1
- package/dist/lib/rag/ragIntegration.d.ts +1 -3
- package/dist/lib/rag/reranker/RerankerFactory.d.ts +1 -6
- package/dist/lib/rag/reranker/RerankerFactory.js +2 -2
- package/dist/lib/rag/reranker/RerankerRegistry.d.ts +1 -1
- package/dist/lib/rag/reranker/index.d.ts +1 -1
- package/dist/lib/rag/reranker/reranker.d.ts +1 -2
- package/dist/lib/rag/resilience/CircuitBreaker.d.ts +0 -4
- package/dist/lib/rag/resilience/RetryHandler.d.ts +1 -2
- package/dist/lib/rag/resilience/index.d.ts +2 -2
- package/dist/lib/rag/retrieval/hybridSearch.d.ts +1 -4
- package/dist/lib/rag/retrieval/hybridSearch.js +5 -1
- package/dist/lib/rag/retrieval/index.d.ts +2 -2
- package/dist/lib/rag/retrieval/vectorQueryTool.d.ts +1 -3
- package/dist/lib/rag/retrieval/vectorQueryTool.js +5 -1
- package/dist/lib/sdk/toolRegistration.d.ts +3 -5
- package/dist/lib/server/abstract/baseServerAdapter.d.ts +1 -1
- package/dist/lib/server/abstract/baseServerAdapter.js +1 -2
- package/dist/lib/server/adapters/expressAdapter.d.ts +1 -1
- package/dist/lib/server/adapters/fastifyAdapter.d.ts +1 -1
- package/dist/lib/server/adapters/honoAdapter.d.ts +1 -1
- package/dist/lib/server/adapters/koaAdapter.d.ts +1 -1
- package/dist/lib/server/errors.d.ts +1 -1
- package/dist/lib/server/errors.js +1 -1
- package/dist/lib/server/factory/serverAdapterFactory.d.ts +1 -1
- package/dist/lib/server/index.d.ts +10 -12
- package/dist/lib/server/index.js +14 -3
- package/dist/lib/server/middleware/abortSignal.d.ts +3 -2
- package/dist/lib/server/middleware/auth.d.ts +7 -49
- package/dist/lib/server/middleware/auth.js +3 -0
- package/dist/lib/server/middleware/cache.d.ts +3 -54
- package/dist/lib/server/middleware/cache.js +6 -0
- package/dist/lib/server/middleware/common.d.ts +1 -1
- package/dist/lib/server/middleware/common.js +1 -2
- package/dist/lib/server/middleware/deprecation.d.ts +3 -2
- package/dist/lib/server/middleware/index.d.ts +6 -6
- package/dist/lib/server/middleware/index.js +3 -3
- package/dist/lib/server/middleware/mcpBodyAttachment.d.ts +1 -1
- package/dist/lib/server/middleware/rateLimit.d.ts +5 -5
- package/dist/lib/server/middleware/validation.d.ts +6 -6
- package/dist/lib/server/openapi/generator.d.ts +4 -4
- package/dist/lib/server/openapi/index.d.ts +1 -1
- package/dist/lib/server/openapi/schemas.d.ts +1 -1
- package/dist/lib/server/openapi/templates.d.ts +1 -1
- package/dist/lib/server/routes/agentRoutes.d.ts +1 -1
- package/dist/lib/server/routes/claudeProxyRoutes.d.ts +1 -2
- package/dist/lib/server/routes/claudeProxyRoutes.js +55 -95
- package/dist/lib/server/routes/healthRoutes.d.ts +1 -1
- package/dist/lib/server/routes/index.d.ts +2 -2
- package/dist/lib/server/routes/mcpRoutes.d.ts +1 -1
- package/dist/lib/server/routes/memoryRoutes.d.ts +1 -1
- package/dist/lib/server/routes/openApiRoutes.d.ts +1 -1
- package/dist/lib/server/routes/toolRoutes.d.ts +1 -1
- package/dist/lib/server/streaming/dataStream.d.ts +5 -99
- package/dist/lib/server/streaming/index.d.ts +1 -1
- package/dist/lib/server/streaming/index.js +6 -1
- package/dist/lib/server/utils/redaction.d.ts +1 -8
- package/dist/lib/server/utils/redaction.js +0 -6
- package/dist/lib/server/utils/validation.d.ts +4 -30
- package/dist/lib/server/utils/validation.js +3 -0
- package/dist/lib/server/voice/frameBus.d.ts +1 -1
- package/dist/lib/server/voice/voiceWebSocketHandler.d.ts +0 -4
- package/dist/lib/server/websocket/WebSocketHandler.d.ts +1 -1
- package/dist/lib/services/server/ai/observability/instrumentation.d.ts +1 -63
- package/dist/lib/session/globalSessionState.d.ts +1 -1
- package/dist/lib/tasks/autoresearchTaskExecutor.d.ts +1 -2
- package/dist/lib/tasks/backends/bullmqBackend.d.ts +1 -1
- package/dist/lib/tasks/backends/bullmqBackend.js +1 -1
- package/dist/lib/tasks/backends/nodeTimeoutBackend.d.ts +1 -1
- package/dist/lib/tasks/backends/nodeTimeoutBackend.js +1 -1
- package/dist/lib/tasks/backends/taskBackendRegistry.d.ts +1 -1
- package/dist/lib/tasks/store/fileTaskStore.d.ts +1 -1
- package/dist/lib/tasks/store/fileTaskStore.js +1 -1
- package/dist/lib/tasks/store/redisTaskStore.d.ts +1 -1
- package/dist/lib/tasks/store/redisTaskStore.js +1 -1
- package/dist/lib/tasks/taskExecutor.d.ts +1 -2
- package/dist/lib/tasks/taskManager.d.ts +1 -1
- package/dist/lib/tasks/taskManager.js +1 -1
- package/dist/lib/tasks/tools/taskTools.d.ts +7 -7
- package/dist/lib/telemetry/index.d.ts +2 -2
- package/dist/lib/telemetry/telemetryService.d.ts +1 -8
- package/dist/lib/telemetry/withSpan.d.ts +2 -7
- package/dist/lib/telemetry/withSpan.js +1 -1
- package/dist/lib/types/{actionTypes.js → action.js} +1 -1
- package/dist/lib/types/{typeAliases.d.ts → aliases.d.ts} +1 -32
- package/dist/lib/types/{typeAliases.js → aliases.js} +1 -1
- package/dist/{types/artifactTypes.d.ts → lib/types/artifact.d.ts} +2 -2
- package/dist/lib/types/{artifactTypes.js → artifact.js} +1 -1
- package/dist/{types/authTypes.d.ts → lib/types/auth.d.ts} +43 -2
- package/dist/lib/types/{authTypes.js → auth.js} +1 -1
- package/dist/{types/autoresearchTypes.d.ts → lib/types/autoresearch.d.ts} +1 -1
- package/dist/lib/types/{autoresearchTypes.js → autoresearch.js} +1 -1
- package/dist/lib/types/circuitBreakerErrors.d.ts +1 -1
- package/dist/lib/types/cli.d.ts +60 -12
- package/dist/lib/types/cli.js +1 -1
- package/dist/{types/clientTypes.d.ts → lib/types/client.d.ts} +292 -107
- package/dist/lib/types/{clientTypes.js → client.js} +1 -1
- package/dist/lib/types/common.d.ts +135 -2
- package/dist/{types/configTypes.d.ts → lib/types/config.d.ts} +8 -9
- package/dist/lib/types/{configTypes.js → config.js} +1 -1
- package/dist/lib/types/{contextTypes.js → context.js} +1 -1
- package/dist/lib/types/conversation.d.ts +6 -4
- package/dist/lib/types/{domainTypes.js → domain.js} +1 -1
- package/dist/lib/{mcp/elicitation/types.d.ts → types/elicitation.d.ts} +1 -1
- package/dist/lib/{mcp/elicitation/types.js → types/elicitation.js} +1 -1
- package/dist/lib/types/enums.d.ts +9 -0
- package/dist/lib/types/enums.js +10 -0
- package/dist/lib/types/evaluation.d.ts +200 -1
- package/dist/lib/types/evaluation.js +1 -1
- package/dist/lib/{observability/types/exporterTypes.js → types/exporter.js} +1 -1
- package/dist/lib/types/externalMcp.d.ts +4 -4
- package/dist/lib/types/{fileTypes.js → file.js} +1 -1
- package/dist/lib/types/{fileReferenceTypes.d.ts → fileReference.d.ts} +13 -1
- package/dist/lib/{files/types.js → types/fileReference.js} +3 -5
- package/dist/lib/types/{generateTypes.d.ts → generate.d.ts} +13 -11
- package/dist/lib/types/generate.js +2 -0
- package/dist/lib/types/{groundingTypes.js → grounding.js} +1 -1
- package/dist/lib/types/{hitlTypes.js → hitl.js} +1 -1
- package/dist/{image-gen/types.d.ts → lib/types/imageGen.d.ts} +18 -0
- package/dist/lib/{image-gen/types.js → types/imageGen.js} +1 -1
- package/dist/lib/types/index.d.ts +50 -47
- package/dist/lib/types/index.js +52 -57
- package/dist/lib/types/mcp.d.ts +2035 -0
- package/dist/lib/types/{mcpTypes.js → mcp.js} +1 -1
- package/dist/lib/types/{mcpOutputTypes.js → mcpOutput.js} +1 -1
- package/dist/lib/types/{middlewareTypes.d.ts → middleware.d.ts} +1 -2
- package/dist/lib/types/middleware.js +2 -0
- package/dist/lib/types/{modelTypes.d.ts → model.d.ts} +1 -1
- package/dist/lib/types/{modelTypes.js → model.js} +1 -1
- package/dist/lib/types/observability.d.ts +216 -4
- package/dist/{types/pptTypes.d.ts → lib/types/ppt.d.ts} +0 -28
- package/dist/lib/types/ppt.js +37 -0
- package/dist/lib/{processors/base/types.d.ts → types/processor.d.ts} +233 -7
- package/dist/lib/{processors/base/types.js → types/processor.js} +9 -1
- package/dist/lib/types/providers.d.ts +9 -8
- package/dist/lib/types/{proxyTypes.d.ts → proxy.d.ts} +18 -16
- package/dist/lib/types/{proxyTypes.js → proxy.js} +1 -1
- package/dist/lib/{rag/types.d.ts → types/rag.d.ts} +604 -32
- package/dist/lib/types/{ragTypes.js → rag.js} +1 -1
- package/dist/{types/scorerTypes.d.ts → lib/types/scorer.d.ts} +2 -2
- package/dist/lib/types/{scorerTypes.js → scorer.js} +1 -1
- package/dist/lib/types/{sdkTypes.d.ts → sdk.d.ts} +9 -9
- package/dist/lib/types/{sdkTypes.js → sdk.js} +1 -1
- package/dist/{types/serverTypes.d.ts → lib/types/server.d.ts} +156 -2
- package/dist/lib/types/{serverTypes.js → server.js} +1 -1
- package/dist/lib/types/{serviceTypes.js → service.js} +1 -1
- package/dist/lib/{observability/types/spanTypes.js → types/span.js} +1 -1
- package/dist/{types/streamTypes.d.ts → lib/types/stream.d.ts} +19 -36
- package/dist/lib/types/stream.js +2 -0
- package/dist/lib/types/{subscriptionTypes.d.ts → subscription.d.ts} +34 -56
- package/dist/lib/types/{subscriptionTypes.js → subscription.js} +1 -1
- package/dist/lib/types/{taskTypes.d.ts → task.d.ts} +6 -6
- package/dist/lib/types/{taskTypes.js → task.js} +1 -1
- package/dist/lib/types/{taskClassificationTypes.js → taskClassification.js} +1 -1
- package/dist/lib/types/tools.d.ts +6 -4
- package/dist/lib/types/{ttsTypes.js → tts.js} +1 -1
- package/dist/lib/types/universalProviderOptions.d.ts +1 -1
- package/dist/lib/types/utilities.d.ts +1 -1
- package/dist/lib/types/{workflowTypes.d.ts → workflow.d.ts} +23 -1
- package/dist/lib/types/{workflowTypes.js → workflow.js} +1 -9
- package/dist/lib/utils/async/index.d.ts +1 -1
- package/dist/lib/utils/async/retry.d.ts +2 -1
- package/dist/lib/utils/conversationMemory.d.ts +1 -2
- package/dist/lib/utils/csvProcessor.d.ts +1 -1
- package/dist/lib/utils/errorHandling.d.ts +1 -1
- package/dist/lib/utils/errorHandling.js +1 -1
- package/dist/lib/utils/evaluationUtils.d.ts +1 -1
- package/dist/lib/utils/factoryProcessing.d.ts +1 -5
- package/dist/lib/utils/fileDetector.d.ts +1 -1
- package/dist/lib/utils/imageCache.d.ts +1 -1
- package/dist/lib/utils/imageCompressor.d.ts +5 -5
- package/dist/lib/utils/imageProcessor.d.ts +1 -2
- package/dist/lib/utils/json/extract.d.ts +1 -2
- package/dist/lib/utils/logger.d.ts +1 -1
- package/dist/lib/utils/loopUtils.d.ts +1 -2
- package/dist/lib/utils/mcpDefaults.d.ts +1 -1
- package/dist/lib/utils/messageBuilder.d.ts +1 -4
- package/dist/lib/utils/messageBuilder.js +1 -1
- package/dist/lib/utils/modelAliasResolver.d.ts +1 -1
- package/dist/lib/utils/modelRouter.d.ts +1 -1
- package/dist/lib/utils/multimodalOptionsBuilder.d.ts +6 -6
- package/dist/lib/utils/observabilityHelpers.d.ts +1 -1
- package/dist/lib/utils/optionsConversion.d.ts +1 -3
- package/dist/lib/utils/optionsUtils.d.ts +1 -3
- package/dist/lib/utils/optionsUtils.js +1 -1
- package/dist/lib/utils/parameterValidation.d.ts +1 -5
- package/dist/lib/utils/performance.d.ts +1 -1
- package/dist/lib/utils/pricing.d.ts +1 -1
- package/dist/lib/utils/promptRedaction.d.ts +1 -1
- package/dist/lib/utils/providerConfig.d.ts +1 -4
- package/dist/lib/utils/providerConfig.js +1 -0
- package/dist/lib/utils/providerHealth.d.ts +1 -1
- package/dist/lib/utils/providerUtils.d.ts +2 -3
- package/dist/lib/utils/rateLimiter.d.ts +1 -1
- package/dist/lib/utils/redis.d.ts +1 -1
- package/dist/lib/utils/retryHandler.d.ts +1 -1
- package/dist/lib/utils/sanitizers/index.d.ts +0 -2
- package/dist/lib/utils/schemaConversion.d.ts +1 -1
- package/dist/lib/utils/taskClassificationUtils.d.ts +1 -1
- package/dist/lib/utils/taskClassifier.d.ts +1 -1
- package/dist/lib/utils/thinkingConfig.d.ts +1 -1
- package/dist/lib/utils/timeout.d.ts +1 -1
- package/dist/lib/utils/tokenEstimation.d.ts +1 -1
- package/dist/lib/utils/tokenUtils.d.ts +1 -2
- package/dist/lib/utils/toolUtils.d.ts +1 -1
- package/dist/lib/utils/transformationUtils.d.ts +1 -1
- package/dist/lib/utils/ttsProcessor.d.ts +1 -69
- package/dist/lib/utils/ttsProcessor.js +1 -2
- package/dist/lib/workflow/LAYER-EXAMPLES.d.ts +1 -1
- package/dist/lib/workflow/config.d.ts +9 -9
- package/dist/lib/workflow/core/ensembleExecutor.d.ts +1 -2
- package/dist/lib/workflow/core/ensembleExecutor.js +1 -1
- package/dist/lib/workflow/core/judgeScorer.d.ts +2 -3
- package/dist/lib/workflow/core/judgeScorer.js +1 -1
- package/dist/lib/workflow/core/responseConditioner.d.ts +1 -2
- package/dist/lib/workflow/core/workflowRegistry.d.ts +1 -2
- package/dist/lib/workflow/core/workflowRunner.d.ts +3 -39
- package/dist/lib/workflow/index.d.ts +0 -15
- package/dist/lib/workflow/index.js +3 -8
- package/dist/lib/workflow/utils/workflowMetrics.d.ts +1 -3
- package/dist/lib/workflow/utils/workflowValidation.d.ts +1 -1
- package/dist/lib/workflow/workflows/adaptiveWorkflow.d.ts +1 -1
- package/dist/lib/workflow/workflows/consensusWorkflow.d.ts +1 -1
- package/dist/lib/workflow/workflows/fallbackWorkflow.d.ts +1 -1
- package/dist/lib/workflow/workflows/multiJudgeWorkflow.d.ts +1 -1
- package/dist/mcp/agentExposure.d.ts +1 -146
- package/dist/mcp/auth/oauthClientProvider.d.ts +1 -1
- package/dist/mcp/auth/tokenStorage.d.ts +1 -1
- package/dist/mcp/batching/index.d.ts +0 -10
- package/dist/mcp/batching/index.js +0 -9
- package/dist/mcp/batching/requestBatcher.d.ts +1 -73
- package/dist/mcp/caching/index.d.ts +0 -10
- package/dist/mcp/caching/index.js +0 -9
- package/dist/mcp/caching/toolCache.d.ts +6 -73
- package/dist/mcp/elicitation/elicitationManager.d.ts +1 -1
- package/dist/mcp/elicitation/index.d.ts +0 -10
- package/dist/mcp/elicitation/index.js +0 -9
- package/dist/mcp/elicitationProtocol.d.ts +1 -90
- package/dist/mcp/enhancedToolDiscovery.d.ts +2 -82
- package/dist/mcp/enhancedToolDiscovery.js +1 -1
- package/dist/mcp/externalServerManager.d.ts +1 -5
- package/dist/mcp/factory.d.ts +1 -1
- package/dist/mcp/flexibleToolValidator.d.ts +1 -1
- package/dist/mcp/httpRateLimiter.d.ts +6 -6
- package/dist/mcp/httpRateLimiter.js +1 -2
- package/dist/mcp/httpRetryHandler.d.ts +1 -1
- package/dist/mcp/httpRetryHandler.js +1 -2
- package/dist/mcp/index.d.ts +1 -15
- package/dist/mcp/index.js +7 -0
- package/dist/mcp/mcpCircuitBreaker.d.ts +2 -2
- package/dist/mcp/mcpCircuitBreaker.js +2 -2
- package/dist/mcp/mcpClientFactory.d.ts +1 -2
- package/dist/mcp/mcpClientFactory.js +2 -3
- package/dist/mcp/mcpOutputNormalizer.d.ts +1 -3
- package/dist/mcp/mcpOutputNormalizer.js +1 -0
- package/dist/mcp/mcpRegistryClient.d.ts +13 -216
- package/dist/mcp/mcpServerBase.d.ts +1 -66
- package/dist/mcp/mcpServerBase.js +3 -0
- package/dist/mcp/multiServerManager.d.ts +1 -116
- package/dist/mcp/registry.d.ts +1 -3
- package/dist/mcp/routing/index.d.ts +0 -10
- package/dist/mcp/routing/index.js +0 -9
- package/dist/mcp/routing/toolRouter.d.ts +1 -110
- package/dist/mcp/serverCapabilities.d.ts +1 -167
- package/dist/mcp/toolAnnotations.d.ts +1 -98
- package/dist/mcp/toolConverter.d.ts +1 -92
- package/dist/mcp/toolDiscoveryService.d.ts +1 -3
- package/dist/mcp/toolIntegration.d.ts +1 -45
- package/dist/mcp/toolRegistry.d.ts +1 -3
- package/dist/memory/hippocampusInitializer.d.ts +0 -3
- package/dist/memory/memoryRetrievalTools.d.ts +1 -1
- package/dist/memory/memoryRetrievalTools.js +1 -2
- package/dist/middleware/builtin/analytics.d.ts +1 -1
- package/dist/middleware/builtin/autoEvaluation.d.ts +1 -1
- package/dist/middleware/builtin/guardrails.d.ts +1 -2
- package/dist/middleware/builtin/lifecycle.d.ts +1 -1
- package/dist/middleware/factory.d.ts +1 -1
- package/dist/middleware/index.d.ts +0 -2
- package/dist/middleware/index.js +1 -0
- package/dist/middleware/registry.d.ts +1 -1
- package/dist/middleware/utils/guardrailsUtils.d.ts +1 -1
- package/dist/models/anthropicModels.d.ts +2 -2
- package/dist/models/anthropicModels.js +1 -1
- package/dist/models/modelRegistry.d.ts +1 -2
- package/dist/models/modelRegistry.js +1 -1
- package/dist/models/modelResolver.d.ts +1 -2
- package/dist/neurolink.d.ts +14 -29
- package/dist/neurolink.js +3 -5
- package/dist/observability/exporterRegistry.d.ts +1 -1
- package/dist/observability/exporters/arizeExporter.d.ts +1 -1
- package/dist/observability/exporters/baseExporter.d.ts +1 -1
- package/dist/observability/exporters/braintrustExporter.d.ts +1 -1
- package/dist/observability/exporters/datadogExporter.d.ts +1 -1
- package/dist/observability/exporters/datadogExporter.js +1 -1
- package/dist/observability/exporters/laminarExporter.d.ts +1 -1
- package/dist/observability/exporters/laminarExporter.js +1 -1
- package/dist/observability/exporters/langfuseExporter.d.ts +1 -1
- package/dist/observability/exporters/langfuseExporter.js +1 -1
- package/dist/observability/exporters/langsmithExporter.d.ts +1 -1
- package/dist/observability/exporters/otelExporter.d.ts +1 -1
- package/dist/observability/exporters/posthogExporter.d.ts +1 -1
- package/dist/observability/exporters/posthogExporter.js +1 -1
- package/dist/observability/exporters/sentryExporter.d.ts +1 -1
- package/dist/observability/exporters/sentryExporter.js +1 -1
- package/dist/observability/index.d.ts +6 -8
- package/dist/observability/index.js +1 -1
- package/dist/observability/metricsAggregator.d.ts +4 -108
- package/dist/observability/metricsAggregator.js +0 -4
- package/dist/observability/otelBridge.d.ts +2 -2
- package/dist/observability/otelBridge.js +1 -1
- package/dist/observability/retryPolicy.d.ts +1 -27
- package/dist/observability/sampling/index.d.ts +1 -1
- package/dist/observability/sampling/samplers.d.ts +1 -3
- package/dist/observability/sampling/samplers.js +1 -1
- package/dist/observability/spanProcessor.d.ts +1 -2
- package/dist/observability/tokenTracker.d.ts +3 -41
- package/dist/observability/utils/safeMetadata.d.ts +1 -1
- package/dist/observability/utils/spanSerializer.d.ts +1 -1
- package/dist/observability/utils/spanSerializer.js +1 -1
- package/dist/processors/archive/ArchiveProcessor.d.ts +3 -44
- package/dist/processors/archive/ArchiveProcessor.js +3 -0
- package/dist/processors/archive/index.d.ts +1 -1
- package/dist/processors/archive/index.js +1 -0
- package/dist/processors/base/BaseFileProcessor.d.ts +6 -6
- package/dist/processors/base/BaseFileProcessor.js +1 -1
- package/dist/processors/base/index.d.ts +1 -2
- package/dist/processors/base/index.js +4 -1
- package/dist/processors/cli/fileProcessorCli.d.ts +1 -40
- package/dist/processors/cli/fileProcessorCli.js +3 -0
- package/dist/processors/cli/index.d.ts +0 -1
- package/dist/processors/cli/index.js +3 -0
- package/dist/processors/code/ConfigProcessor.d.ts +2 -4
- package/dist/processors/code/ConfigProcessor.js +4 -0
- package/dist/processors/code/SourceCodeProcessor.d.ts +2 -4
- package/dist/processors/code/SourceCodeProcessor.js +4 -0
- package/dist/processors/code/index.d.ts +2 -2
- package/dist/processors/code/index.js +6 -2
- package/dist/processors/config/fileTypes.d.ts +0 -20
- package/dist/processors/config/fileTypes.js +3 -0
- package/dist/processors/config/index.d.ts +4 -4
- package/dist/processors/config/index.js +10 -3
- package/dist/processors/config/languageMap.d.ts +0 -4
- package/dist/processors/config/languageMap.js +3 -0
- package/dist/processors/config/mimeTypes.d.ts +0 -18
- package/dist/processors/config/mimeTypes.js +3 -0
- package/dist/processors/config/sizeLimits.d.ts +0 -8
- package/dist/processors/config/sizeLimits.js +3 -0
- package/dist/processors/data/JsonProcessor.d.ts +2 -4
- package/dist/processors/data/JsonProcessor.js +2 -0
- package/dist/processors/data/XmlProcessor.d.ts +3 -5
- package/dist/processors/data/XmlProcessor.js +4 -0
- package/dist/processors/data/YamlProcessor.d.ts +3 -5
- package/dist/processors/data/YamlProcessor.js +2 -0
- package/dist/processors/data/index.d.ts +3 -3
- package/dist/processors/data/index.js +9 -3
- package/dist/processors/document/ExcelProcessor.d.ts +3 -5
- package/dist/processors/document/ExcelProcessor.js +2 -0
- package/dist/processors/document/OpenDocumentProcessor.d.ts +2 -4
- package/dist/processors/document/OpenDocumentProcessor.js +1 -0
- package/dist/processors/document/RtfProcessor.d.ts +2 -4
- package/dist/processors/document/RtfProcessor.js +2 -0
- package/dist/processors/document/WordProcessor.d.ts +3 -5
- package/dist/processors/document/WordProcessor.js +2 -0
- package/dist/processors/document/index.d.ts +4 -4
- package/dist/processors/document/index.js +4 -1
- package/dist/processors/errors/FileErrorCode.d.ts +3 -15
- package/dist/processors/errors/errorHelpers.d.ts +2 -2
- package/dist/processors/errors/errorHelpers.js +1 -1
- package/dist/processors/errors/errorSerializer.d.ts +3 -2
- package/dist/processors/errors/index.d.ts +3 -3
- package/dist/processors/index.d.ts +7 -10
- package/dist/processors/index.js +11 -2
- package/dist/processors/integration/FileProcessorIntegration.d.ts +2 -70
- package/dist/processors/integration/FileProcessorIntegration.js +6 -0
- package/dist/processors/integration/index.d.ts +0 -1
- package/dist/processors/integration/index.js +3 -0
- package/dist/processors/markup/HtmlProcessor.d.ts +2 -4
- package/dist/processors/markup/HtmlProcessor.js +2 -0
- package/dist/processors/markup/MarkdownProcessor.d.ts +2 -4
- package/dist/processors/markup/MarkdownProcessor.js +4 -0
- package/dist/processors/markup/SvgProcessor.d.ts +2 -4
- package/dist/processors/markup/SvgProcessor.js +4 -0
- package/dist/processors/markup/TextProcessor.d.ts +2 -4
- package/dist/processors/markup/TextProcessor.js +2 -0
- package/dist/processors/markup/index.d.ts +4 -4
- package/dist/processors/markup/index.js +12 -4
- package/dist/processors/media/AudioProcessor.d.ts +3 -64
- package/dist/processors/media/AudioProcessor.js +3 -0
- package/dist/processors/media/VideoProcessor.d.ts +3 -48
- package/dist/processors/media/VideoProcessor.js +3 -0
- package/dist/processors/media/index.d.ts +0 -1
- package/dist/processors/media/index.js +3 -0
- package/dist/processors/registry/ProcessorRegistry.d.ts +2 -3
- package/dist/processors/registry/ProcessorRegistry.js +1 -1
- package/dist/processors/registry/index.d.ts +1 -11
- package/dist/processors/registry/index.js +2 -9
- package/dist/providers/amazonBedrock.d.ts +1 -2
- package/dist/providers/amazonBedrock.js +1 -1
- package/dist/providers/amazonSagemaker.d.ts +1 -1
- package/dist/providers/anthropic.d.ts +1 -6
- package/dist/providers/anthropic.js +3 -1
- package/dist/providers/anthropicBaseProvider.d.ts +1 -1
- package/dist/providers/anthropicBaseProvider.js +1 -1
- package/dist/providers/azureOpenai.d.ts +1 -2
- package/dist/providers/googleAiStudio.d.ts +1 -3
- package/dist/providers/googleAiStudio.js +3 -2
- package/dist/providers/googleNativeGemini3.d.ts +1 -2
- package/dist/providers/googleVertex.d.ts +1 -3
- package/dist/providers/googleVertex.js +3 -3
- package/dist/providers/huggingFace.d.ts +1 -2
- package/dist/providers/litellm.d.ts +1 -1
- package/dist/providers/litellm.js +3 -2
- package/dist/providers/mistral.d.ts +1 -3
- package/dist/providers/ollama.d.ts +1 -2
- package/dist/providers/ollama.js +1 -1
- package/dist/providers/openAI.d.ts +1 -2
- package/dist/providers/openAI.js +1 -1
- package/dist/providers/openRouter.d.ts +1 -1
- package/dist/providers/openaiCompatible.d.ts +1 -2
- package/dist/providers/providerTypeUtils.d.ts +1 -1
- package/dist/providers/sagemaker/adaptive-semaphore.d.ts +1 -1
- package/dist/providers/sagemaker/client.d.ts +1 -2
- package/dist/providers/sagemaker/config.d.ts +1 -1
- package/dist/providers/sagemaker/detection.d.ts +4 -27
- package/dist/providers/sagemaker/diagnostics.d.ts +3 -2
- package/dist/providers/sagemaker/errors.d.ts +1 -1
- package/dist/providers/sagemaker/index.d.ts +0 -1
- package/dist/providers/sagemaker/index.js +1 -0
- package/dist/providers/sagemaker/language-model.d.ts +3 -4
- package/dist/providers/sagemaker/parsers.d.ts +1 -26
- package/dist/providers/sagemaker/streaming.d.ts +1 -1
- package/dist/providers/sagemaker/streaming.js +1 -1
- package/dist/providers/sagemaker/structured-parser.d.ts +1 -1
- package/dist/providers/sagemaker/structured-parser.js +1 -1
- package/dist/proxy/cloaking/index.d.ts +0 -1
- package/dist/proxy/cloaking/index.js +1 -0
- package/dist/proxy/proxyEnv.d.ts +3 -3
- package/dist/proxy/proxyPaths.d.ts +1 -10
- package/dist/proxy/proxyTracer.d.ts +0 -1
- package/dist/proxy/quietDetector.d.ts +3 -2
- package/dist/proxy/rawStreamCapture.d.ts +3 -2
- package/dist/proxy/routingPolicy.d.ts +4 -29
- package/dist/proxy/routingPolicy.js +14 -46
- package/dist/proxy/sseInterceptor.d.ts +5 -4
- package/dist/proxy/updateChecker.d.ts +3 -2
- package/dist/proxy/updateState.d.ts +5 -4
- package/dist/proxy/usageStats.d.ts +0 -1
- package/dist/proxy/usageStats.js +0 -7
- package/dist/rag/ChunkerFactory.d.ts +1 -1
- package/dist/rag/ChunkerRegistry.d.ts +1 -1
- package/dist/rag/chunkers/BaseChunker.d.ts +1 -1
- package/dist/rag/chunkers/CharacterChunker.d.ts +1 -1
- package/dist/rag/chunkers/HTMLChunker.d.ts +1 -1
- package/dist/rag/chunkers/JSONChunker.d.ts +1 -1
- package/dist/rag/chunkers/LaTeXChunker.d.ts +1 -1
- package/dist/rag/chunkers/MarkdownChunker.d.ts +1 -1
- package/dist/rag/chunkers/RecursiveChunker.d.ts +1 -1
- package/dist/rag/chunkers/SemanticMarkdownChunker.d.ts +1 -1
- package/dist/rag/chunkers/SentenceChunker.d.ts +1 -1
- package/dist/rag/chunkers/TokenChunker.d.ts +1 -1
- package/dist/rag/chunking/characterChunker.d.ts +1 -1
- package/dist/rag/chunking/chunkerRegistry.d.ts +2 -2
- package/dist/rag/chunking/htmlChunker.d.ts +1 -1
- package/dist/rag/chunking/jsonChunker.d.ts +1 -1
- package/dist/rag/chunking/latexChunker.d.ts +1 -1
- package/dist/rag/chunking/markdownChunker.d.ts +1 -1
- package/dist/rag/chunking/recursiveChunker.d.ts +1 -1
- package/dist/rag/chunking/semanticChunker.d.ts +1 -1
- package/dist/rag/chunking/sentenceChunker.d.ts +1 -1
- package/dist/rag/chunking/tokenChunker.d.ts +1 -1
- package/dist/rag/document/MDocument.d.ts +1 -1
- package/dist/rag/document/index.d.ts +1 -1
- package/dist/rag/document/loaders.d.ts +1 -6
- package/dist/rag/errors/RAGError.d.ts +2 -1
- package/dist/rag/errors/index.d.ts +1 -1
- package/dist/rag/graphRag/graphRAG.d.ts +1 -1
- package/dist/rag/index.d.ts +8 -8
- package/dist/rag/index.js +1 -1
- package/dist/rag/metadata/MetadataExtractorFactory.d.ts +1 -5
- package/dist/rag/metadata/MetadataExtractorRegistry.d.ts +1 -1
- package/dist/rag/metadata/index.d.ts +1 -1
- package/dist/rag/metadata/metadataExtractor.d.ts +1 -1
- package/dist/rag/pipeline/RAGPipeline.d.ts +1 -8
- package/dist/rag/pipeline/RAGPipeline.js +1 -1
- package/dist/rag/pipeline/contextAssembly.d.ts +1 -5
- package/dist/rag/pipeline/index.d.ts +2 -2
- package/dist/rag/pipeline/index.js +1 -1
- package/dist/rag/ragIntegration.d.ts +1 -3
- package/dist/rag/reranker/RerankerFactory.d.ts +1 -6
- package/dist/rag/reranker/RerankerFactory.js +2 -2
- package/dist/rag/reranker/RerankerRegistry.d.ts +1 -1
- package/dist/rag/reranker/index.d.ts +1 -1
- package/dist/rag/reranker/reranker.d.ts +1 -2
- package/dist/rag/resilience/CircuitBreaker.d.ts +0 -4
- package/dist/rag/resilience/RetryHandler.d.ts +1 -2
- package/dist/rag/resilience/index.d.ts +2 -2
- package/dist/rag/retrieval/hybridSearch.d.ts +1 -4
- package/dist/rag/retrieval/hybridSearch.js +5 -1
- package/dist/rag/retrieval/index.d.ts +2 -2
- package/dist/rag/retrieval/vectorQueryTool.d.ts +1 -3
- package/dist/rag/retrieval/vectorQueryTool.js +5 -1
- package/dist/sdk/toolRegistration.d.ts +3 -5
- package/dist/server/abstract/baseServerAdapter.d.ts +1 -1
- package/dist/server/abstract/baseServerAdapter.js +1 -2
- package/dist/server/adapters/expressAdapter.d.ts +1 -1
- package/dist/server/adapters/fastifyAdapter.d.ts +1 -1
- package/dist/server/adapters/honoAdapter.d.ts +1 -1
- package/dist/server/adapters/koaAdapter.d.ts +1 -1
- package/dist/server/errors.d.ts +1 -1
- package/dist/server/errors.js +1 -1
- package/dist/server/factory/serverAdapterFactory.d.ts +1 -1
- package/dist/server/index.d.ts +10 -12
- package/dist/server/index.js +14 -3
- package/dist/server/middleware/abortSignal.d.ts +3 -2
- package/dist/server/middleware/auth.d.ts +7 -49
- package/dist/server/middleware/auth.js +3 -0
- package/dist/server/middleware/cache.d.ts +3 -54
- package/dist/server/middleware/cache.js +6 -0
- package/dist/server/middleware/common.d.ts +1 -1
- package/dist/server/middleware/common.js +1 -2
- package/dist/server/middleware/deprecation.d.ts +3 -2
- package/dist/server/middleware/index.d.ts +6 -6
- package/dist/server/middleware/index.js +3 -3
- package/dist/server/middleware/mcpBodyAttachment.d.ts +1 -1
- package/dist/server/middleware/rateLimit.d.ts +5 -5
- package/dist/server/middleware/validation.d.ts +6 -6
- package/dist/server/openapi/generator.d.ts +4 -4
- package/dist/server/openapi/index.d.ts +1 -1
- package/dist/server/openapi/schemas.d.ts +1 -1
- package/dist/server/openapi/templates.d.ts +1 -1
- package/dist/server/routes/agentRoutes.d.ts +1 -1
- package/dist/server/routes/claudeProxyRoutes.d.ts +1 -2
- package/dist/server/routes/claudeProxyRoutes.js +55 -95
- package/dist/server/routes/healthRoutes.d.ts +1 -1
- package/dist/server/routes/index.d.ts +2 -2
- package/dist/server/routes/mcpRoutes.d.ts +1 -1
- package/dist/server/routes/memoryRoutes.d.ts +1 -1
- package/dist/server/routes/openApiRoutes.d.ts +1 -1
- package/dist/server/routes/toolRoutes.d.ts +1 -1
- package/dist/server/streaming/dataStream.d.ts +5 -99
- package/dist/server/streaming/index.d.ts +1 -1
- package/dist/server/streaming/index.js +6 -1
- package/dist/server/utils/redaction.d.ts +1 -8
- package/dist/server/utils/redaction.js +0 -6
- package/dist/server/utils/validation.d.ts +4 -30
- package/dist/server/utils/validation.js +3 -0
- package/dist/server/voice/frameBus.d.ts +1 -1
- package/dist/server/voice/voiceWebSocketHandler.d.ts +0 -4
- package/dist/server/websocket/WebSocketHandler.d.ts +1 -1
- package/dist/services/server/ai/observability/instrumentation.d.ts +1 -63
- package/dist/session/globalSessionState.d.ts +1 -1
- package/dist/tasks/autoresearchTaskExecutor.d.ts +1 -2
- package/dist/tasks/backends/bullmqBackend.d.ts +1 -1
- package/dist/tasks/backends/bullmqBackend.js +1 -1
- package/dist/tasks/backends/nodeTimeoutBackend.d.ts +1 -1
- package/dist/tasks/backends/nodeTimeoutBackend.js +1 -1
- package/dist/tasks/backends/taskBackendRegistry.d.ts +1 -1
- package/dist/tasks/store/fileTaskStore.d.ts +1 -1
- package/dist/tasks/store/fileTaskStore.js +1 -1
- package/dist/tasks/store/redisTaskStore.d.ts +1 -1
- package/dist/tasks/store/redisTaskStore.js +1 -1
- package/dist/tasks/taskExecutor.d.ts +1 -2
- package/dist/tasks/taskManager.d.ts +1 -1
- package/dist/tasks/taskManager.js +1 -1
- package/dist/tasks/tools/taskTools.d.ts +3 -3
- package/dist/telemetry/index.d.ts +2 -2
- package/dist/telemetry/telemetryService.d.ts +1 -8
- package/dist/telemetry/withSpan.d.ts +2 -7
- package/dist/telemetry/withSpan.js +1 -1
- package/dist/types/{typeAliases.d.ts → aliases.d.ts} +1 -32
- package/dist/{lib/types/artifactTypes.d.ts → types/artifact.d.ts} +2 -2
- package/dist/{lib/types/authTypes.d.ts → types/auth.d.ts} +43 -2
- package/dist/{lib/types/autoresearchTypes.d.ts → types/autoresearch.d.ts} +1 -1
- package/dist/types/circuitBreakerErrors.d.ts +1 -1
- package/dist/types/cli.d.ts +60 -12
- package/dist/types/cli.js +1 -1
- package/dist/{lib/types/clientTypes.d.ts → types/client.d.ts} +292 -107
- package/dist/types/common.d.ts +135 -2
- package/dist/{lib/types/configTypes.d.ts → types/config.d.ts} +8 -9
- package/dist/types/conversation.d.ts +6 -4
- package/dist/{mcp/elicitation/types.d.ts → types/elicitation.d.ts} +1 -1
- package/dist/types/enums.d.ts +9 -0
- package/dist/types/enums.js +9 -0
- package/dist/types/evaluation.d.ts +200 -1
- package/dist/types/evaluation.js +1 -1
- package/dist/types/externalMcp.d.ts +4 -4
- package/dist/types/{fileReferenceTypes.d.ts → fileReference.d.ts} +13 -1
- package/dist/{files/types.js → types/fileReference.js} +2 -4
- package/dist/types/{generateTypes.d.ts → generate.d.ts} +13 -11
- package/dist/{lib/image-gen/types.d.ts → types/imageGen.d.ts} +18 -0
- package/dist/types/index.d.ts +50 -47
- package/dist/types/index.js +52 -57
- package/dist/types/mcp.d.ts +2035 -0
- package/dist/types/{middlewareTypes.d.ts → middleware.d.ts} +1 -2
- package/dist/types/{modelTypes.d.ts → model.d.ts} +1 -1
- package/dist/types/observability.d.ts +216 -4
- package/dist/{lib/types/pptTypes.d.ts → types/ppt.d.ts} +0 -28
- package/dist/types/ppt.js +36 -0
- package/dist/{processors/base/types.d.ts → types/processor.d.ts} +233 -7
- package/dist/{processors/base/types.js → types/processor.js} +8 -0
- package/dist/types/providers.d.ts +9 -8
- package/dist/types/{proxyTypes.d.ts → proxy.d.ts} +18 -16
- package/dist/{rag/types.d.ts → types/rag.d.ts} +604 -32
- package/dist/{lib/types/scorerTypes.d.ts → types/scorer.d.ts} +2 -2
- package/dist/types/{sdkTypes.d.ts → sdk.d.ts} +9 -9
- package/dist/{lib/types/serverTypes.d.ts → types/server.d.ts} +156 -2
- package/dist/{lib/types/streamTypes.d.ts → types/stream.d.ts} +19 -36
- package/dist/types/{subscriptionTypes.d.ts → subscription.d.ts} +34 -56
- package/dist/types/{taskTypes.d.ts → task.d.ts} +6 -6
- package/dist/types/tools.d.ts +6 -4
- package/dist/types/universalProviderOptions.d.ts +1 -1
- package/dist/types/utilities.d.ts +1 -1
- package/dist/types/{workflowTypes.d.ts → workflow.d.ts} +23 -1
- package/dist/types/{workflowTypes.js → workflow.js} +0 -8
- package/dist/utils/async/index.d.ts +1 -1
- package/dist/utils/async/retry.d.ts +2 -1
- package/dist/utils/conversationMemory.d.ts +1 -2
- package/dist/utils/csvProcessor.d.ts +1 -1
- package/dist/utils/errorHandling.d.ts +1 -1
- package/dist/utils/errorHandling.js +1 -1
- package/dist/utils/evaluationUtils.d.ts +1 -1
- package/dist/utils/factoryProcessing.d.ts +1 -5
- package/dist/utils/fileDetector.d.ts +1 -1
- package/dist/utils/imageCache.d.ts +1 -1
- package/dist/utils/imageCompressor.d.ts +5 -5
- package/dist/utils/imageProcessor.d.ts +1 -2
- package/dist/utils/json/extract.d.ts +1 -2
- package/dist/utils/logger.d.ts +1 -1
- package/dist/utils/loopUtils.d.ts +1 -2
- package/dist/utils/mcpDefaults.d.ts +1 -1
- package/dist/utils/messageBuilder.d.ts +1 -4
- package/dist/utils/messageBuilder.js +1 -1
- package/dist/utils/modelAliasResolver.d.ts +1 -1
- package/dist/utils/modelRouter.d.ts +1 -1
- package/dist/utils/multimodalOptionsBuilder.d.ts +1 -1
- package/dist/utils/observabilityHelpers.d.ts +1 -1
- package/dist/utils/optionsConversion.d.ts +1 -3
- package/dist/utils/optionsUtils.d.ts +1 -3
- package/dist/utils/optionsUtils.js +1 -1
- package/dist/utils/parameterValidation.d.ts +1 -5
- package/dist/utils/performance.d.ts +1 -1
- package/dist/utils/pricing.d.ts +1 -1
- package/dist/utils/promptRedaction.d.ts +1 -1
- package/dist/utils/providerConfig.d.ts +1 -4
- package/dist/utils/providerConfig.js +1 -0
- package/dist/utils/providerHealth.d.ts +1 -1
- package/dist/utils/providerUtils.d.ts +2 -3
- package/dist/utils/rateLimiter.d.ts +1 -1
- package/dist/utils/redis.d.ts +1 -1
- package/dist/utils/retryHandler.d.ts +1 -1
- package/dist/utils/sanitizers/index.d.ts +0 -2
- package/dist/utils/schemaConversion.d.ts +1 -1
- package/dist/utils/taskClassificationUtils.d.ts +1 -1
- package/dist/utils/taskClassifier.d.ts +1 -1
- package/dist/utils/thinkingConfig.d.ts +1 -1
- package/dist/utils/timeout.d.ts +1 -1
- package/dist/utils/tokenEstimation.d.ts +1 -1
- package/dist/utils/tokenUtils.d.ts +1 -2
- package/dist/utils/toolUtils.d.ts +1 -1
- package/dist/utils/transformationUtils.d.ts +1 -1
- package/dist/utils/ttsProcessor.d.ts +1 -69
- package/dist/utils/ttsProcessor.js +1 -2
- package/dist/workflow/LAYER-EXAMPLES.d.ts +1 -1
- package/dist/workflow/config.d.ts +12 -12
- package/dist/workflow/core/ensembleExecutor.d.ts +1 -2
- package/dist/workflow/core/ensembleExecutor.js +1 -1
- package/dist/workflow/core/judgeScorer.d.ts +2 -3
- package/dist/workflow/core/judgeScorer.js +1 -1
- package/dist/workflow/core/responseConditioner.d.ts +1 -2
- package/dist/workflow/core/workflowRegistry.d.ts +1 -2
- package/dist/workflow/core/workflowRunner.d.ts +3 -39
- package/dist/workflow/index.d.ts +0 -15
- package/dist/workflow/index.js +3 -8
- package/dist/workflow/utils/workflowMetrics.d.ts +1 -3
- package/dist/workflow/utils/workflowValidation.d.ts +1 -1
- package/dist/workflow/workflows/adaptiveWorkflow.d.ts +1 -1
- package/dist/workflow/workflows/consensusWorkflow.d.ts +1 -1
- package/dist/workflow/workflows/fallbackWorkflow.d.ts +1 -1
- package/dist/workflow/workflows/multiJudgeWorkflow.d.ts +1 -1
- package/package.json +6 -6
- package/dist/features/ppt/types.d.ts +0 -9
- package/dist/features/ppt/types.js +0 -13
- package/dist/files/types.d.ts +0 -23
- package/dist/lib/features/ppt/types.d.ts +0 -9
- package/dist/lib/features/ppt/types.js +0 -14
- package/dist/lib/files/types.d.ts +0 -23
- package/dist/lib/observability/types/index.d.ts +0 -6
- package/dist/lib/observability/types/index.js +0 -5
- package/dist/lib/processors/registry/types.d.ts +0 -53
- package/dist/lib/processors/registry/types.js +0 -11
- package/dist/lib/proxy/cloaking/types.d.ts +0 -1
- package/dist/lib/proxy/cloaking/types.js +0 -2
- package/dist/lib/rag/types.js +0 -9
- package/dist/lib/server/types.d.ts +0 -6
- package/dist/lib/server/types.js +0 -7
- package/dist/lib/server/voice/types.d.ts +0 -20
- package/dist/lib/server/voice/types.js +0 -2
- package/dist/lib/types/evaluationTypes.d.ts +0 -142
- package/dist/lib/types/evaluationTypes.js +0 -2
- package/dist/lib/types/fileReferenceTypes.js +0 -9
- package/dist/lib/types/generateTypes.js +0 -2
- package/dist/lib/types/mcpTypes.d.ts +0 -787
- package/dist/lib/types/middlewareTypes.js +0 -2
- package/dist/lib/types/pptTypes.js +0 -83
- package/dist/lib/types/processorTypes.d.ts +0 -597
- package/dist/lib/types/processorTypes.js +0 -91
- package/dist/lib/types/ragTypes.d.ts +0 -606
- package/dist/lib/types/streamTypes.js +0 -2
- package/dist/lib/workflow/core/types/conditionerTypes.d.ts +0 -7
- package/dist/lib/workflow/core/types/conditionerTypes.js +0 -8
- package/dist/lib/workflow/core/types/ensembleTypes.d.ts +0 -7
- package/dist/lib/workflow/core/types/ensembleTypes.js +0 -8
- package/dist/lib/workflow/core/types/index.d.ts +0 -7
- package/dist/lib/workflow/core/types/index.js +0 -8
- package/dist/lib/workflow/core/types/judgeTypes.d.ts +0 -7
- package/dist/lib/workflow/core/types/judgeTypes.js +0 -8
- package/dist/lib/workflow/core/types/layerTypes.d.ts +0 -7
- package/dist/lib/workflow/core/types/layerTypes.js +0 -8
- package/dist/lib/workflow/core/types/registryTypes.d.ts +0 -7
- package/dist/lib/workflow/core/types/registryTypes.js +0 -8
- package/dist/lib/workflow/types.d.ts +0 -19
- package/dist/lib/workflow/types.js +0 -10
- package/dist/lib/workflow/utils/types/index.d.ts +0 -7
- package/dist/lib/workflow/utils/types/index.js +0 -8
- package/dist/lib/workflow/utils/types/metricsTypes.d.ts +0 -7
- package/dist/lib/workflow/utils/types/metricsTypes.js +0 -8
- package/dist/lib/workflow/utils/types/validationTypes.d.ts +0 -7
- package/dist/lib/workflow/utils/types/validationTypes.js +0 -8
- package/dist/observability/types/index.d.ts +0 -6
- package/dist/observability/types/index.js +0 -4
- package/dist/processors/registry/types.d.ts +0 -53
- package/dist/processors/registry/types.js +0 -10
- package/dist/proxy/cloaking/types.d.ts +0 -1
- package/dist/rag/types.js +0 -8
- package/dist/server/types.d.ts +0 -6
- package/dist/server/types.js +0 -6
- package/dist/server/voice/types.d.ts +0 -20
- package/dist/types/evaluationTypes.d.ts +0 -142
- package/dist/types/fileReferenceTypes.js +0 -8
- package/dist/types/generateTypes.js +0 -1
- package/dist/types/mcpTypes.d.ts +0 -787
- package/dist/types/middlewareTypes.js +0 -1
- package/dist/types/pptTypes.js +0 -82
- package/dist/types/processorTypes.d.ts +0 -597
- package/dist/types/processorTypes.js +0 -90
- package/dist/types/ragTypes.d.ts +0 -606
- package/dist/types/streamTypes.js +0 -1
- package/dist/workflow/core/types/conditionerTypes.d.ts +0 -7
- package/dist/workflow/core/types/conditionerTypes.js +0 -7
- package/dist/workflow/core/types/ensembleTypes.d.ts +0 -7
- package/dist/workflow/core/types/ensembleTypes.js +0 -7
- package/dist/workflow/core/types/index.d.ts +0 -7
- package/dist/workflow/core/types/index.js +0 -7
- package/dist/workflow/core/types/judgeTypes.d.ts +0 -7
- package/dist/workflow/core/types/judgeTypes.js +0 -7
- package/dist/workflow/core/types/layerTypes.d.ts +0 -7
- package/dist/workflow/core/types/layerTypes.js +0 -7
- package/dist/workflow/core/types/registryTypes.d.ts +0 -7
- package/dist/workflow/core/types/registryTypes.js +0 -7
- package/dist/workflow/types.d.ts +0 -19
- package/dist/workflow/types.js +0 -9
- package/dist/workflow/utils/types/index.d.ts +0 -7
- package/dist/workflow/utils/types/index.js +0 -7
- package/dist/workflow/utils/types/metricsTypes.d.ts +0 -7
- package/dist/workflow/utils/types/metricsTypes.js +0 -7
- package/dist/workflow/utils/types/validationTypes.d.ts +0 -7
- package/dist/workflow/utils/types/validationTypes.js +0 -7
- /package/dist/lib/types/{actionTypes.d.ts → action.d.ts} +0 -0
- /package/dist/lib/types/{contextTypes.d.ts → context.d.ts} +0 -0
- /package/dist/lib/types/{domainTypes.d.ts → domain.d.ts} +0 -0
- /package/dist/lib/{observability/types/exporterTypes.d.ts → types/exporter.d.ts} +0 -0
- /package/dist/lib/types/{fileTypes.d.ts → file.d.ts} +0 -0
- /package/dist/lib/types/{groundingTypes.d.ts → grounding.d.ts} +0 -0
- /package/dist/lib/types/{hitlTypes.d.ts → hitl.d.ts} +0 -0
- /package/dist/lib/types/{mcpOutputTypes.d.ts → mcpOutput.d.ts} +0 -0
- /package/dist/lib/types/{serviceTypes.d.ts → service.d.ts} +0 -0
- /package/dist/lib/{observability/types/spanTypes.d.ts → types/span.d.ts} +0 -0
- /package/dist/lib/types/{taskClassificationTypes.d.ts → taskClassification.d.ts} +0 -0
- /package/dist/lib/types/{ttsTypes.d.ts → tts.d.ts} +0 -0
- /package/dist/types/{actionTypes.d.ts → action.d.ts} +0 -0
- /package/dist/types/{actionTypes.js → action.js} +0 -0
- /package/dist/types/{typeAliases.js → aliases.js} +0 -0
- /package/dist/types/{artifactTypes.js → artifact.js} +0 -0
- /package/dist/types/{authTypes.js → auth.js} +0 -0
- /package/dist/types/{autoresearchTypes.js → autoresearch.js} +0 -0
- /package/dist/types/{clientTypes.js → client.js} +0 -0
- /package/dist/types/{configTypes.js → config.js} +0 -0
- /package/dist/types/{contextTypes.d.ts → context.d.ts} +0 -0
- /package/dist/types/{contextTypes.js → context.js} +0 -0
- /package/dist/types/{domainTypes.d.ts → domain.d.ts} +0 -0
- /package/dist/types/{domainTypes.js → domain.js} +0 -0
- /package/dist/{mcp/elicitation/types.js → types/elicitation.js} +0 -0
- /package/dist/{observability/types/exporterTypes.d.ts → types/exporter.d.ts} +0 -0
- /package/dist/{observability/types/exporterTypes.js → types/exporter.js} +0 -0
- /package/dist/types/{fileTypes.d.ts → file.d.ts} +0 -0
- /package/dist/types/{fileTypes.js → file.js} +0 -0
- /package/dist/{proxy/cloaking/types.js → types/generate.js} +0 -0
- /package/dist/types/{groundingTypes.d.ts → grounding.d.ts} +0 -0
- /package/dist/types/{groundingTypes.js → grounding.js} +0 -0
- /package/dist/types/{hitlTypes.d.ts → hitl.d.ts} +0 -0
- /package/dist/types/{hitlTypes.js → hitl.js} +0 -0
- /package/dist/{image-gen/types.js → types/imageGen.js} +0 -0
- /package/dist/types/{mcpTypes.js → mcp.js} +0 -0
- /package/dist/types/{mcpOutputTypes.d.ts → mcpOutput.d.ts} +0 -0
- /package/dist/types/{mcpOutputTypes.js → mcpOutput.js} +0 -0
- /package/dist/{server/voice/types.js → types/middleware.js} +0 -0
- /package/dist/types/{modelTypes.js → model.js} +0 -0
- /package/dist/types/{proxyTypes.js → proxy.js} +0 -0
- /package/dist/types/{ragTypes.js → rag.js} +0 -0
- /package/dist/types/{scorerTypes.js → scorer.js} +0 -0
- /package/dist/types/{sdkTypes.js → sdk.js} +0 -0
- /package/dist/types/{serverTypes.js → server.js} +0 -0
- /package/dist/types/{serviceTypes.d.ts → service.d.ts} +0 -0
- /package/dist/types/{serviceTypes.js → service.js} +0 -0
- /package/dist/{observability/types/spanTypes.d.ts → types/span.d.ts} +0 -0
- /package/dist/{observability/types/spanTypes.js → types/span.js} +0 -0
- /package/dist/types/{evaluationTypes.js → stream.js} +0 -0
- /package/dist/types/{subscriptionTypes.js → subscription.js} +0 -0
- /package/dist/types/{taskTypes.js → task.js} +0 -0
- /package/dist/types/{taskClassificationTypes.d.ts → taskClassification.d.ts} +0 -0
- /package/dist/types/{taskClassificationTypes.js → taskClassification.js} +0 -0
- /package/dist/types/{ttsTypes.d.ts → tts.d.ts} +0 -0
- /package/dist/types/{ttsTypes.js → tts.js} +0 -0
|
@@ -0,0 +1,2035 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Types for In-Memory Server Support
|
|
3
|
+
* Enables various integrations to register tools directly
|
|
4
|
+
*/
|
|
5
|
+
import type { JsonValue, JsonObject } from "./common.js";
|
|
6
|
+
import type { OAuthTokens } from "./auth.js";
|
|
7
|
+
import type { ExecutionContext, ToolInfo, ToolResult } from "./tools.js";
|
|
8
|
+
export type { OAuthTokens } from "./auth.js";
|
|
9
|
+
/**
|
|
10
|
+
* In-memory MCP server configuration
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* MCP Transport Types - Maximally Reusable
|
|
14
|
+
*/
|
|
15
|
+
export type MCPTransportType = "stdio" | "sse" | "websocket" | "http" | "ws" | "tcp" | "unix";
|
|
16
|
+
/**
|
|
17
|
+
* MCP Server Connection Status - Individual server status
|
|
18
|
+
*/
|
|
19
|
+
export type MCPServerConnectionStatus = "initializing" | "connecting" | "connected" | "disconnected" | "failed" | "restarting" | "stopping" | "stopped";
|
|
20
|
+
/**
|
|
21
|
+
* MCP Server Category Types - Deployment and server type classification
|
|
22
|
+
*/
|
|
23
|
+
export type MCPServerCategory = "external" | "in-memory" | "built-in" | "user-defined" | "custom" | "uncategorized";
|
|
24
|
+
/**
|
|
25
|
+
* MCP Server Domain Categories - Functional domain classification
|
|
26
|
+
*/
|
|
27
|
+
export type MCPServerDomainCategory = "aiProviders" | "frameworks" | "development" | "business" | "content" | "data" | "integrations" | "automation" | "analysis" | "custom";
|
|
28
|
+
/**
|
|
29
|
+
* Universal MCP Server - Unified configuration and runtime state
|
|
30
|
+
* MCP 2024-11-05 specification compliant
|
|
31
|
+
* Replaces both MCPServerInfo and MCPServerConfig
|
|
32
|
+
*/
|
|
33
|
+
export type MCPServerInfo = {
|
|
34
|
+
id: string;
|
|
35
|
+
name: string;
|
|
36
|
+
description: string;
|
|
37
|
+
transport: MCPTransportType;
|
|
38
|
+
status: MCPServerConnectionStatus;
|
|
39
|
+
tools: Array<{
|
|
40
|
+
name: string;
|
|
41
|
+
description: string;
|
|
42
|
+
inputSchema?: object;
|
|
43
|
+
execute?: (params: unknown, context?: unknown) => Promise<unknown> | unknown;
|
|
44
|
+
}>;
|
|
45
|
+
command?: string;
|
|
46
|
+
args?: string[];
|
|
47
|
+
env?: Record<string, string>;
|
|
48
|
+
url?: string;
|
|
49
|
+
headers?: Record<string, string>;
|
|
50
|
+
/** HTTP transport-specific options */
|
|
51
|
+
httpOptions?: MCPHTTPTransportOptions;
|
|
52
|
+
timeout?: number;
|
|
53
|
+
retries?: number;
|
|
54
|
+
error?: string;
|
|
55
|
+
installed?: boolean;
|
|
56
|
+
cwd?: string;
|
|
57
|
+
autoRestart?: boolean;
|
|
58
|
+
healthCheckInterval?: number;
|
|
59
|
+
/** Retry configuration for HTTP transport */
|
|
60
|
+
retryConfig?: {
|
|
61
|
+
maxAttempts?: number;
|
|
62
|
+
initialDelay?: number;
|
|
63
|
+
maxDelay?: number;
|
|
64
|
+
backoffMultiplier?: number;
|
|
65
|
+
};
|
|
66
|
+
/** Rate limiting configuration for HTTP transport */
|
|
67
|
+
rateLimiting?: {
|
|
68
|
+
/** Maximum requests per minute (default: 60) */
|
|
69
|
+
requestsPerMinute?: number;
|
|
70
|
+
/** Maximum requests per hour (optional) */
|
|
71
|
+
requestsPerHour?: number;
|
|
72
|
+
/** Maximum burst size for token bucket (default: 10) */
|
|
73
|
+
maxBurst?: number;
|
|
74
|
+
/** Use token bucket algorithm (default: true) */
|
|
75
|
+
useTokenBucket?: boolean;
|
|
76
|
+
};
|
|
77
|
+
blockedTools?: string[];
|
|
78
|
+
/** Authentication configuration for HTTP/SSE/WebSocket transports */
|
|
79
|
+
auth?: {
|
|
80
|
+
/** Authentication type */
|
|
81
|
+
type: "oauth2" | "bearer" | "api-key";
|
|
82
|
+
/** OAuth 2.1 configuration */
|
|
83
|
+
oauth?: {
|
|
84
|
+
/** OAuth client ID */
|
|
85
|
+
clientId: string;
|
|
86
|
+
/** OAuth client secret (optional for public clients with PKCE) */
|
|
87
|
+
clientSecret?: string;
|
|
88
|
+
/** Authorization endpoint URL */
|
|
89
|
+
authorizationUrl: string;
|
|
90
|
+
/** Token endpoint URL */
|
|
91
|
+
tokenUrl: string;
|
|
92
|
+
/** Redirect URI for OAuth callback */
|
|
93
|
+
redirectUrl: string;
|
|
94
|
+
/** OAuth scope (space-separated) */
|
|
95
|
+
scope?: string;
|
|
96
|
+
/** Enable PKCE (Proof Key for Code Exchange) - recommended for OAuth 2.1 */
|
|
97
|
+
usePKCE?: boolean;
|
|
98
|
+
};
|
|
99
|
+
/** Bearer token for simple token authentication */
|
|
100
|
+
token?: string;
|
|
101
|
+
/** API key for API key authentication */
|
|
102
|
+
apiKey?: string;
|
|
103
|
+
/** Header name for API key (default: "X-API-Key") */
|
|
104
|
+
apiKeyHeader?: string;
|
|
105
|
+
};
|
|
106
|
+
metadata?: {
|
|
107
|
+
uptime?: number;
|
|
108
|
+
toolCount?: number;
|
|
109
|
+
category?: MCPServerCategory;
|
|
110
|
+
provider?: string;
|
|
111
|
+
version?: string;
|
|
112
|
+
author?: string;
|
|
113
|
+
tags?: string[];
|
|
114
|
+
[key: string]: unknown;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* HTTP Transport Options for fine-grained control
|
|
119
|
+
*/
|
|
120
|
+
export type MCPHTTPTransportOptions = {
|
|
121
|
+
/** Connection timeout in milliseconds (default: 30000) */
|
|
122
|
+
connectionTimeout?: number;
|
|
123
|
+
/** Request timeout in milliseconds (default: 60000) */
|
|
124
|
+
requestTimeout?: number;
|
|
125
|
+
/** Idle timeout for connection pool (default: 120000) */
|
|
126
|
+
idleTimeout?: number;
|
|
127
|
+
/** Keep-alive timeout (default: 30000) */
|
|
128
|
+
keepAliveTimeout?: number;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* MCP Server Status for CLI Operations - High Reusability
|
|
132
|
+
*/
|
|
133
|
+
export type MCPServerStatus = {
|
|
134
|
+
/** Whether MCP is initialized */
|
|
135
|
+
mcpInitialized: boolean;
|
|
136
|
+
/** Total number of servers */
|
|
137
|
+
totalServers: number;
|
|
138
|
+
/** Number of available servers */
|
|
139
|
+
availableServers: number;
|
|
140
|
+
/** Number of auto-discovered servers */
|
|
141
|
+
autoDiscoveredCount: number;
|
|
142
|
+
/** Total number of tools */
|
|
143
|
+
totalTools: number;
|
|
144
|
+
/** Number of custom tools */
|
|
145
|
+
customToolsCount: number;
|
|
146
|
+
/** Number of in-memory servers */
|
|
147
|
+
inMemoryServersCount: number;
|
|
148
|
+
/** Error message */
|
|
149
|
+
error?: string;
|
|
150
|
+
/** Auto-discovered servers from various sources */
|
|
151
|
+
autoDiscoveredServers?: MCPDiscoveredServer[];
|
|
152
|
+
/** Currently connected servers */
|
|
153
|
+
connectedServers: MCPConnectedServer[];
|
|
154
|
+
/** Available tools across all servers */
|
|
155
|
+
availableTools: MCPToolInfo[];
|
|
156
|
+
/** Server registry entries */
|
|
157
|
+
serverRegistry?: Record<string, MCPServerInfo>;
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* Auto-discovered MCP Server - High Reusability
|
|
161
|
+
*/
|
|
162
|
+
export type MCPDiscoveredServer = {
|
|
163
|
+
name: string;
|
|
164
|
+
status: MCPServerConnectionStatus;
|
|
165
|
+
source: string;
|
|
166
|
+
transport: MCPTransportType;
|
|
167
|
+
description?: string;
|
|
168
|
+
url?: string;
|
|
169
|
+
args?: string[];
|
|
170
|
+
env?: Record<string, string>;
|
|
171
|
+
metadata?: MCPServerMetadata;
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* Connected MCP Server - High Reusability
|
|
175
|
+
*/
|
|
176
|
+
export type MCPConnectedServer = {
|
|
177
|
+
name: string;
|
|
178
|
+
transport: MCPTransportType;
|
|
179
|
+
connected: boolean;
|
|
180
|
+
description?: string;
|
|
181
|
+
tools: MCPToolInfo[];
|
|
182
|
+
lastSeen?: Date;
|
|
183
|
+
connectionTime?: Date;
|
|
184
|
+
metadata?: MCPServerMetadata;
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* MCP Tool Information - High Reusability
|
|
188
|
+
*/
|
|
189
|
+
export type MCPToolInfo = {
|
|
190
|
+
name: string;
|
|
191
|
+
description: string;
|
|
192
|
+
serverId: string;
|
|
193
|
+
isExternal: boolean;
|
|
194
|
+
isImplemented?: boolean;
|
|
195
|
+
inputSchema?: JsonObject;
|
|
196
|
+
outputSchema?: JsonObject;
|
|
197
|
+
metadata?: MCPToolMetadata;
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* MCP Executable Tool - Tool with execution capability
|
|
201
|
+
* Extracted from MCPServerInfo.tools array for better readability
|
|
202
|
+
*/
|
|
203
|
+
export type MCPExecutableTool = MCPServerInfo["tools"][0];
|
|
204
|
+
/**
|
|
205
|
+
* MCP Server Metadata - Extensible
|
|
206
|
+
*/
|
|
207
|
+
export type MCPServerMetadata = {
|
|
208
|
+
[key: string]: JsonValue;
|
|
209
|
+
} & {
|
|
210
|
+
provider?: string;
|
|
211
|
+
version?: string;
|
|
212
|
+
author?: string;
|
|
213
|
+
category?: string;
|
|
214
|
+
tags?: string[];
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* MCP Tool Metadata - Extensible
|
|
218
|
+
*/
|
|
219
|
+
export type MCPToolMetadata = {
|
|
220
|
+
[key: string]: JsonValue;
|
|
221
|
+
} & {
|
|
222
|
+
category?: string;
|
|
223
|
+
tags?: string[];
|
|
224
|
+
complexity?: "simple" | "medium" | "complex";
|
|
225
|
+
executionTime?: number;
|
|
226
|
+
};
|
|
227
|
+
/**
|
|
228
|
+
* MCP Server Registry Entry - For Object.entries() usage
|
|
229
|
+
*/
|
|
230
|
+
export type MCPServerRegistryEntry = [string, MCPServerInfo];
|
|
231
|
+
export type MCPStatus = {
|
|
232
|
+
mcpInitialized: boolean;
|
|
233
|
+
totalServers: number;
|
|
234
|
+
availableServers: number;
|
|
235
|
+
autoDiscoveredCount: number;
|
|
236
|
+
totalTools: number;
|
|
237
|
+
autoDiscoveredServers: MCPServerInfo[];
|
|
238
|
+
customToolsCount: number;
|
|
239
|
+
inMemoryServersCount: number;
|
|
240
|
+
externalMCPServersCount?: number;
|
|
241
|
+
externalMCPConnectedCount?: number;
|
|
242
|
+
externalMCPFailedCount?: number;
|
|
243
|
+
externalMCPServers?: MCPServerInfo[];
|
|
244
|
+
error?: string;
|
|
245
|
+
[key: string]: unknown;
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* Call record for circuit breaker statistics tracking
|
|
249
|
+
* Extracted from mcpCircuitBreaker.ts for centralized type management
|
|
250
|
+
*/
|
|
251
|
+
export type CallRecord = {
|
|
252
|
+
timestamp: number;
|
|
253
|
+
success: boolean;
|
|
254
|
+
duration: number;
|
|
255
|
+
};
|
|
256
|
+
/**
|
|
257
|
+
* Tool execution context - Rich context passed to every tool execution
|
|
258
|
+
* Extracted from factory.ts for centralized type management
|
|
259
|
+
* Following standard patterns for rich tool context
|
|
260
|
+
*/
|
|
261
|
+
export type NeuroLinkExecutionContext = {
|
|
262
|
+
sessionId?: string;
|
|
263
|
+
userId?: string;
|
|
264
|
+
aiProvider?: string;
|
|
265
|
+
modelId?: string;
|
|
266
|
+
temperature?: number;
|
|
267
|
+
maxTokens?: number;
|
|
268
|
+
appId?: string;
|
|
269
|
+
clientId?: string;
|
|
270
|
+
clientVersion?: string;
|
|
271
|
+
organizationId?: string;
|
|
272
|
+
projectId?: string;
|
|
273
|
+
environment?: string;
|
|
274
|
+
environmentType?: "development" | "staging" | "production";
|
|
275
|
+
platform?: string;
|
|
276
|
+
device?: string;
|
|
277
|
+
browser?: string;
|
|
278
|
+
userAgent?: string;
|
|
279
|
+
frameworkType?: "react" | "vue" | "svelte" | "next" | "nuxt" | "sveltekit";
|
|
280
|
+
toolChain?: string[];
|
|
281
|
+
parentToolId?: string;
|
|
282
|
+
locale?: string;
|
|
283
|
+
timezone?: string;
|
|
284
|
+
ipAddress?: string;
|
|
285
|
+
requestId?: string;
|
|
286
|
+
timestamp?: number;
|
|
287
|
+
permissions?: string[];
|
|
288
|
+
features?: string[];
|
|
289
|
+
enableDemoMode?: boolean;
|
|
290
|
+
securityLevel?: "public" | "private" | "organization";
|
|
291
|
+
metadata?: Record<string, unknown>;
|
|
292
|
+
[key: string]: unknown;
|
|
293
|
+
};
|
|
294
|
+
export type { ToolResult } from "./tools.js";
|
|
295
|
+
/**
|
|
296
|
+
* Unified MCP Registry type
|
|
297
|
+
*/
|
|
298
|
+
export type UnifiedMCPRegistry = {
|
|
299
|
+
/**
|
|
300
|
+
* Register an in-memory server
|
|
301
|
+
*/
|
|
302
|
+
registerInMemoryServer(serverId: string, serverInfo: MCPServerInfo): Promise<void>;
|
|
303
|
+
/**
|
|
304
|
+
* Get all available tools
|
|
305
|
+
*/
|
|
306
|
+
getAllTools(): Promise<MCPToolInfo[]>;
|
|
307
|
+
/**
|
|
308
|
+
* Execute a tool
|
|
309
|
+
*/
|
|
310
|
+
executeTool(toolName: string, params: JsonObject, context: JsonObject): Promise<unknown>;
|
|
311
|
+
/**
|
|
312
|
+
* Check if connected to a server
|
|
313
|
+
*/
|
|
314
|
+
isConnected(serverId: string): boolean;
|
|
315
|
+
};
|
|
316
|
+
import type { StandardRecord } from "./aliases.js";
|
|
317
|
+
import type { ExternalMCPToolInfo, ExternalMCPToolContext } from "./externalMcp.js";
|
|
318
|
+
import type { ElicitationContext, ElicitationType } from "./elicitation.js";
|
|
319
|
+
/**
|
|
320
|
+
* NeuroLink MCP Tool Type - Standardized tool definition for MCP integration
|
|
321
|
+
* Moved from src/lib/mcp/factory.ts
|
|
322
|
+
*/
|
|
323
|
+
export type NeuroLinkMCPTool = {
|
|
324
|
+
/** Unique tool identifier for MCP registration and execution */
|
|
325
|
+
name: string;
|
|
326
|
+
/** Human-readable description of tool functionality */
|
|
327
|
+
description: string;
|
|
328
|
+
/** Optional category for tool organization and discovery */
|
|
329
|
+
category?: string;
|
|
330
|
+
/** Optional input schema for parameter validation (Zod or JSON Schema) */
|
|
331
|
+
inputSchema?: unknown;
|
|
332
|
+
/** Optional output schema for result validation */
|
|
333
|
+
outputSchema?: unknown;
|
|
334
|
+
/** Implementation status flag for development tracking */
|
|
335
|
+
isImplemented?: boolean;
|
|
336
|
+
/** Required permissions for tool execution in secured environments */
|
|
337
|
+
permissions?: string[];
|
|
338
|
+
/** Tool version for compatibility and update management */
|
|
339
|
+
version?: string;
|
|
340
|
+
/** Additional metadata for tool information and capabilities */
|
|
341
|
+
metadata?: Record<string, unknown>;
|
|
342
|
+
/**
|
|
343
|
+
* Tool execution function with standardized signature
|
|
344
|
+
*/
|
|
345
|
+
execute: (params: unknown, context: NeuroLinkExecutionContext) => Promise<ToolResult>;
|
|
346
|
+
};
|
|
347
|
+
/**
|
|
348
|
+
* NeuroLink MCP Server Type - Standard compatible
|
|
349
|
+
* Moved from src/lib/mcp/factory.ts
|
|
350
|
+
*/
|
|
351
|
+
export type NeuroLinkMCPServer = {
|
|
352
|
+
id: string;
|
|
353
|
+
title: string;
|
|
354
|
+
description?: string;
|
|
355
|
+
version?: string;
|
|
356
|
+
category?: MCPServerDomainCategory;
|
|
357
|
+
visibility?: "public" | "private" | "organization";
|
|
358
|
+
tools: Record<string, NeuroLinkMCPTool>;
|
|
359
|
+
registerTool(tool: NeuroLinkMCPTool): NeuroLinkMCPServer;
|
|
360
|
+
metadata?: Record<string, unknown>;
|
|
361
|
+
dependencies?: string[];
|
|
362
|
+
capabilities?: string[];
|
|
363
|
+
};
|
|
364
|
+
/**
|
|
365
|
+
* MCP Server Configuration for creation
|
|
366
|
+
* Moved from src/lib/mcp/factory.ts
|
|
367
|
+
*/
|
|
368
|
+
export type MCPServerConfig = {
|
|
369
|
+
id: string;
|
|
370
|
+
title: string;
|
|
371
|
+
description?: string;
|
|
372
|
+
version?: string;
|
|
373
|
+
category?: MCPServerDomainCategory;
|
|
374
|
+
visibility?: "public" | "private" | "organization";
|
|
375
|
+
metadata?: Record<string, unknown>;
|
|
376
|
+
dependencies?: string[];
|
|
377
|
+
capabilities?: string[];
|
|
378
|
+
};
|
|
379
|
+
/**
|
|
380
|
+
* Discovered MCP server/plugin definition
|
|
381
|
+
* Moved from src/lib/mcp/contracts/mcpContract.ts
|
|
382
|
+
*/
|
|
383
|
+
export type DiscoveredMcp<TTools = StandardRecord> = {
|
|
384
|
+
metadata: McpMetadata;
|
|
385
|
+
tools?: TTools;
|
|
386
|
+
capabilities?: string[];
|
|
387
|
+
version?: string;
|
|
388
|
+
configuration?: Record<string, string | number | boolean>;
|
|
389
|
+
[key: string]: unknown;
|
|
390
|
+
};
|
|
391
|
+
/**
|
|
392
|
+
* MCP server metadata
|
|
393
|
+
* Moved from src/lib/mcp/contracts/mcpContract.ts
|
|
394
|
+
*/
|
|
395
|
+
export type McpMetadata = {
|
|
396
|
+
name: string;
|
|
397
|
+
description?: string;
|
|
398
|
+
version?: string;
|
|
399
|
+
author?: string;
|
|
400
|
+
homepage?: string;
|
|
401
|
+
repository?: string;
|
|
402
|
+
category?: string;
|
|
403
|
+
};
|
|
404
|
+
/**
|
|
405
|
+
* Tool discovery result
|
|
406
|
+
* Moved from src/lib/mcp/toolDiscoveryService.ts
|
|
407
|
+
*/
|
|
408
|
+
export type ToolDiscoveryResult = {
|
|
409
|
+
/** Whether discovery was successful */
|
|
410
|
+
success: boolean;
|
|
411
|
+
/** Number of tools discovered */
|
|
412
|
+
toolCount: number;
|
|
413
|
+
/** Discovered tools */
|
|
414
|
+
tools: ExternalMCPToolInfo[];
|
|
415
|
+
/** Error message if failed */
|
|
416
|
+
error?: string;
|
|
417
|
+
/** Discovery duration in milliseconds */
|
|
418
|
+
duration: number;
|
|
419
|
+
/** Server ID */
|
|
420
|
+
serverId: string;
|
|
421
|
+
};
|
|
422
|
+
/**
|
|
423
|
+
* External MCP tool execution options
|
|
424
|
+
* Moved from src/lib/mcp/toolDiscoveryService.ts
|
|
425
|
+
*/
|
|
426
|
+
export type ExternalToolExecutionOptions = {
|
|
427
|
+
/** Execution timeout in milliseconds */
|
|
428
|
+
timeout?: number;
|
|
429
|
+
/** Additional context for execution */
|
|
430
|
+
context?: Partial<ExternalMCPToolContext>;
|
|
431
|
+
/** Whether to validate input parameters */
|
|
432
|
+
validateInput?: boolean;
|
|
433
|
+
/** Whether to validate output */
|
|
434
|
+
validateOutput?: boolean;
|
|
435
|
+
};
|
|
436
|
+
/**
|
|
437
|
+
* Tool validation result
|
|
438
|
+
* Moved from src/lib/mcp/toolDiscoveryService.ts
|
|
439
|
+
*/
|
|
440
|
+
export type ToolValidationResult = {
|
|
441
|
+
/** Whether the tool is valid */
|
|
442
|
+
isValid: boolean;
|
|
443
|
+
/** Validation errors */
|
|
444
|
+
errors: string[];
|
|
445
|
+
/** Validation warnings */
|
|
446
|
+
warnings: string[];
|
|
447
|
+
/** Tool metadata */
|
|
448
|
+
metadata?: {
|
|
449
|
+
category?: string;
|
|
450
|
+
complexity?: "simple" | "moderate" | "complex";
|
|
451
|
+
requiresAuth?: boolean;
|
|
452
|
+
isDeprecated?: boolean;
|
|
453
|
+
};
|
|
454
|
+
};
|
|
455
|
+
/**
|
|
456
|
+
* Tool registry events
|
|
457
|
+
* Moved from src/lib/mcp/toolDiscoveryService.ts
|
|
458
|
+
*/
|
|
459
|
+
export type ToolRegistryEvents = {
|
|
460
|
+
toolRegistered: {
|
|
461
|
+
serverId: string;
|
|
462
|
+
toolName: string;
|
|
463
|
+
toolInfo: ExternalMCPToolInfo;
|
|
464
|
+
timestamp: Date;
|
|
465
|
+
};
|
|
466
|
+
toolUnregistered: {
|
|
467
|
+
serverId: string;
|
|
468
|
+
toolName: string;
|
|
469
|
+
timestamp: Date;
|
|
470
|
+
};
|
|
471
|
+
toolExecuted: {
|
|
472
|
+
serverId: string;
|
|
473
|
+
toolName: string;
|
|
474
|
+
success: boolean;
|
|
475
|
+
duration: number;
|
|
476
|
+
timestamp: Date;
|
|
477
|
+
};
|
|
478
|
+
discoveryStarted: {
|
|
479
|
+
serverId: string;
|
|
480
|
+
timestamp: Date;
|
|
481
|
+
};
|
|
482
|
+
discoveryCompleted: {
|
|
483
|
+
serverId: string;
|
|
484
|
+
toolCount: number;
|
|
485
|
+
duration: number;
|
|
486
|
+
timestamp: Date;
|
|
487
|
+
};
|
|
488
|
+
discoveryFailed: {
|
|
489
|
+
serverId: string;
|
|
490
|
+
error: string;
|
|
491
|
+
timestamp: Date;
|
|
492
|
+
};
|
|
493
|
+
};
|
|
494
|
+
/**
|
|
495
|
+
* Circuit breaker states
|
|
496
|
+
* Moved from src/lib/mcp/mcpCircuitBreaker.ts
|
|
497
|
+
*/
|
|
498
|
+
export type CircuitBreakerState = "closed" | "open" | "half-open";
|
|
499
|
+
/**
|
|
500
|
+
* Circuit breaker configuration
|
|
501
|
+
* Moved from src/lib/mcp/mcpCircuitBreaker.ts
|
|
502
|
+
*/
|
|
503
|
+
export type CircuitBreakerConfig = {
|
|
504
|
+
/** Number of failures before opening the circuit */
|
|
505
|
+
failureThreshold: number;
|
|
506
|
+
/** Time to wait before attempting reset (milliseconds) */
|
|
507
|
+
resetTimeout: number;
|
|
508
|
+
/** Maximum calls allowed in half-open state */
|
|
509
|
+
halfOpenMaxCalls: number;
|
|
510
|
+
/** Timeout for individual operations (milliseconds) */
|
|
511
|
+
operationTimeout: number;
|
|
512
|
+
/** Minimum number of calls before calculating failure rate */
|
|
513
|
+
minimumCallsBeforeCalculation: number;
|
|
514
|
+
/** Window size for calculating failure rate (milliseconds) */
|
|
515
|
+
statisticsWindowSize: number;
|
|
516
|
+
};
|
|
517
|
+
/**
|
|
518
|
+
* Circuit breaker statistics
|
|
519
|
+
* Moved from src/lib/mcp/mcpCircuitBreaker.ts
|
|
520
|
+
*/
|
|
521
|
+
export type CircuitBreakerStats = {
|
|
522
|
+
/** Current state */
|
|
523
|
+
state: CircuitBreakerState;
|
|
524
|
+
/** Total number of calls */
|
|
525
|
+
totalCalls: number;
|
|
526
|
+
/** Number of successful calls */
|
|
527
|
+
successfulCalls: number;
|
|
528
|
+
/** Number of failed calls */
|
|
529
|
+
failedCalls: number;
|
|
530
|
+
/** Current failure rate (0-1) */
|
|
531
|
+
failureRate: number;
|
|
532
|
+
/** Calls in current time window */
|
|
533
|
+
windowCalls: number;
|
|
534
|
+
/** Last state change timestamp */
|
|
535
|
+
lastStateChange: Date;
|
|
536
|
+
/** Next retry time (for open state) */
|
|
537
|
+
nextRetryTime?: Date;
|
|
538
|
+
/** Half-open call count */
|
|
539
|
+
halfOpenCalls: number;
|
|
540
|
+
};
|
|
541
|
+
/**
|
|
542
|
+
* Circuit breaker events
|
|
543
|
+
* Moved from src/lib/mcp/mcpCircuitBreaker.ts
|
|
544
|
+
*/
|
|
545
|
+
export type CircuitBreakerEvents = {
|
|
546
|
+
stateChange: {
|
|
547
|
+
oldState: CircuitBreakerState;
|
|
548
|
+
newState: CircuitBreakerState;
|
|
549
|
+
reason: string;
|
|
550
|
+
timestamp: Date;
|
|
551
|
+
};
|
|
552
|
+
callSuccess: {
|
|
553
|
+
duration: number;
|
|
554
|
+
timestamp: Date;
|
|
555
|
+
};
|
|
556
|
+
callFailure: {
|
|
557
|
+
error: string;
|
|
558
|
+
duration: number;
|
|
559
|
+
timestamp: Date;
|
|
560
|
+
};
|
|
561
|
+
circuitOpen: {
|
|
562
|
+
failureRate: number;
|
|
563
|
+
totalCalls: number;
|
|
564
|
+
timestamp: Date;
|
|
565
|
+
};
|
|
566
|
+
circuitHalfOpen: {
|
|
567
|
+
timestamp: Date;
|
|
568
|
+
};
|
|
569
|
+
circuitClosed: {
|
|
570
|
+
timestamp: Date;
|
|
571
|
+
};
|
|
572
|
+
};
|
|
573
|
+
/**
|
|
574
|
+
* MCP Registry type with optional methods for maximum flexibility
|
|
575
|
+
* Moved from src/lib/mcp/registry.ts
|
|
576
|
+
*/
|
|
577
|
+
export type McpRegistry = {
|
|
578
|
+
registerServer?(serverId: string, serverConfig?: unknown, context?: ExecutionContext): Promise<void>;
|
|
579
|
+
executeTool?<T = unknown>(toolName: string, args?: unknown, context?: ExecutionContext): Promise<T>;
|
|
580
|
+
listTools?(context?: ExecutionContext): Promise<ToolInfo[]>;
|
|
581
|
+
};
|
|
582
|
+
/**
|
|
583
|
+
* MCP client creation result
|
|
584
|
+
* Moved from src/lib/mcp/mcpClientFactory.ts
|
|
585
|
+
*/
|
|
586
|
+
export type MCPClientResult = {
|
|
587
|
+
/** Whether client creation was successful */
|
|
588
|
+
success: boolean;
|
|
589
|
+
/** Created client instance */
|
|
590
|
+
client?: import("@modelcontextprotocol/sdk/client/index.js").Client;
|
|
591
|
+
/** Created transport instance */
|
|
592
|
+
transport?: import("@modelcontextprotocol/sdk/shared/transport.js").Transport;
|
|
593
|
+
/** Created process (for stdio transport) */
|
|
594
|
+
process?: import("child_process").ChildProcess;
|
|
595
|
+
/** Error message if failed */
|
|
596
|
+
error?: string;
|
|
597
|
+
/** Creation duration in milliseconds */
|
|
598
|
+
duration: number;
|
|
599
|
+
/** Server capabilities reported during handshake */
|
|
600
|
+
capabilities?: import("@modelcontextprotocol/sdk/types.js").ClientCapabilities;
|
|
601
|
+
};
|
|
602
|
+
/**
|
|
603
|
+
* Flexible validation result
|
|
604
|
+
* Moved from src/lib/mcp/flexibleToolValidator.ts
|
|
605
|
+
*/
|
|
606
|
+
export type FlexibleValidationResult = {
|
|
607
|
+
/** Whether validation passed */
|
|
608
|
+
isValid: boolean;
|
|
609
|
+
/** Validation error message (for simple cases) */
|
|
610
|
+
error?: string;
|
|
611
|
+
/** Validation warnings */
|
|
612
|
+
warnings?: string[];
|
|
613
|
+
/** Normalized parameters (if valid) */
|
|
614
|
+
normalizedParams?: Record<string, unknown>;
|
|
615
|
+
/** Validation metadata */
|
|
616
|
+
metadata?: {
|
|
617
|
+
validationTime?: number;
|
|
618
|
+
validator?: string;
|
|
619
|
+
schema?: string;
|
|
620
|
+
};
|
|
621
|
+
};
|
|
622
|
+
/**
|
|
623
|
+
* Token storage type for OAuth 2.1 authentication
|
|
624
|
+
* Implementations can use in-memory, file-based, or external storage
|
|
625
|
+
*/
|
|
626
|
+
export type TokenStorage = {
|
|
627
|
+
/**
|
|
628
|
+
* Get stored tokens for a server
|
|
629
|
+
* @param serverId - Unique identifier for the MCP server
|
|
630
|
+
* @returns Stored tokens or null if not found
|
|
631
|
+
*/
|
|
632
|
+
getTokens(serverId: string): Promise<OAuthTokens | null>;
|
|
633
|
+
/**
|
|
634
|
+
* Save tokens for a server
|
|
635
|
+
* @param serverId - Unique identifier for the MCP server
|
|
636
|
+
* @param tokens - OAuth tokens to store
|
|
637
|
+
*/
|
|
638
|
+
saveTokens(serverId: string, tokens: OAuthTokens): Promise<void>;
|
|
639
|
+
/**
|
|
640
|
+
* Delete stored tokens for a server
|
|
641
|
+
* @param serverId - Unique identifier for the MCP server
|
|
642
|
+
*/
|
|
643
|
+
deleteTokens(serverId: string): Promise<void>;
|
|
644
|
+
/**
|
|
645
|
+
* Check if tokens exist for a server
|
|
646
|
+
* @param serverId - Unique identifier for the MCP server
|
|
647
|
+
* @returns True if tokens exist
|
|
648
|
+
*/
|
|
649
|
+
hasTokens?(serverId: string): Promise<boolean>;
|
|
650
|
+
/**
|
|
651
|
+
* Clear all stored tokens
|
|
652
|
+
*/
|
|
653
|
+
clearAll?(): Promise<void>;
|
|
654
|
+
};
|
|
655
|
+
/**
|
|
656
|
+
* OAuth 2.1 configuration for MCP servers
|
|
657
|
+
*/
|
|
658
|
+
export type MCPOAuthConfig = {
|
|
659
|
+
/** OAuth client ID */
|
|
660
|
+
clientId: string;
|
|
661
|
+
/** OAuth client secret (optional for public clients with PKCE) */
|
|
662
|
+
clientSecret?: string;
|
|
663
|
+
/** Authorization endpoint URL */
|
|
664
|
+
authorizationUrl: string;
|
|
665
|
+
/** Token endpoint URL */
|
|
666
|
+
tokenUrl: string;
|
|
667
|
+
/** Redirect URI for OAuth callback */
|
|
668
|
+
redirectUrl: string;
|
|
669
|
+
/** OAuth scope (space-separated) */
|
|
670
|
+
scope?: string;
|
|
671
|
+
/** Enable PKCE (Proof Key for Code Exchange) - recommended for OAuth 2.1 */
|
|
672
|
+
usePKCE?: boolean;
|
|
673
|
+
/** Additional authorization parameters */
|
|
674
|
+
additionalParams?: Record<string, string>;
|
|
675
|
+
};
|
|
676
|
+
/**
|
|
677
|
+
* OAuth client information returned to MCP SDK
|
|
678
|
+
*/
|
|
679
|
+
export type OAuthClientInformation = {
|
|
680
|
+
clientId: string;
|
|
681
|
+
clientSecret?: string;
|
|
682
|
+
redirectUri: string;
|
|
683
|
+
};
|
|
684
|
+
/**
|
|
685
|
+
* Authorization URL result from OAuth flow
|
|
686
|
+
*/
|
|
687
|
+
export type AuthorizationUrlResult = {
|
|
688
|
+
url: string;
|
|
689
|
+
state: string;
|
|
690
|
+
codeVerifier?: string;
|
|
691
|
+
};
|
|
692
|
+
/**
|
|
693
|
+
* Token exchange request for OAuth code exchange
|
|
694
|
+
*/
|
|
695
|
+
export type TokenExchangeRequest = {
|
|
696
|
+
code: string;
|
|
697
|
+
state: string;
|
|
698
|
+
codeVerifier?: string;
|
|
699
|
+
};
|
|
700
|
+
/**
|
|
701
|
+
* Token bucket rate limit configuration options for HTTP transport
|
|
702
|
+
*/
|
|
703
|
+
export type TokenBucketRateLimitConfig = {
|
|
704
|
+
/** Maximum requests per window */
|
|
705
|
+
requestsPerWindow: number;
|
|
706
|
+
/** Window size in milliseconds (default: 60000 = 1 minute) */
|
|
707
|
+
windowMs: number;
|
|
708
|
+
/** Use token bucket algorithm (default: true) */
|
|
709
|
+
useTokenBucket: boolean;
|
|
710
|
+
/** Token refill rate (tokens per second, for token bucket) */
|
|
711
|
+
refillRate: number;
|
|
712
|
+
/** Maximum burst size (for token bucket) */
|
|
713
|
+
maxBurst: number;
|
|
714
|
+
};
|
|
715
|
+
/**
|
|
716
|
+
* HTTP retry configuration for MCP transport
|
|
717
|
+
*/
|
|
718
|
+
export type HTTPRetryConfig = {
|
|
719
|
+
/** Maximum retry attempts (default: 3) */
|
|
720
|
+
maxAttempts: number;
|
|
721
|
+
/** Initial delay in ms (default: 1000) */
|
|
722
|
+
initialDelay: number;
|
|
723
|
+
/** Maximum delay in ms (default: 30000) */
|
|
724
|
+
maxDelay: number;
|
|
725
|
+
/** Backoff multiplier (default: 2) */
|
|
726
|
+
backoffMultiplier: number;
|
|
727
|
+
/** HTTP status codes that trigger retry */
|
|
728
|
+
retryableStatusCodes: number[];
|
|
729
|
+
};
|
|
730
|
+
/**
|
|
731
|
+
* PKCE (Proof Key for Code Exchange) challenge data for OAuth 2.1 authentication
|
|
732
|
+
* Used internally by OAuth client providers to generate and store PKCE parameters
|
|
733
|
+
*/
|
|
734
|
+
export type PKCEChallenge = {
|
|
735
|
+
/** Random code verifier string (43-128 characters, URL-safe) */
|
|
736
|
+
codeVerifier: string;
|
|
737
|
+
/** SHA-256 hash of code verifier, base64url encoded */
|
|
738
|
+
codeChallenge: string;
|
|
739
|
+
/** Challenge method - always "S256" per OAuth 2.1 specification */
|
|
740
|
+
codeChallengeMethod: "S256";
|
|
741
|
+
};
|
|
742
|
+
/**
|
|
743
|
+
* Rate limiter statistics for monitoring and debugging HTTP transport rate limiting
|
|
744
|
+
* Provides insight into token bucket state and queue status
|
|
745
|
+
*/
|
|
746
|
+
export type RateLimiterStats = {
|
|
747
|
+
/** Current number of available tokens */
|
|
748
|
+
tokens: number;
|
|
749
|
+
/** Maximum burst size (token capacity) */
|
|
750
|
+
maxBurst: number;
|
|
751
|
+
/** Token refill rate (tokens per second) */
|
|
752
|
+
refillRate: number;
|
|
753
|
+
/** Number of requests waiting in queue */
|
|
754
|
+
queueLength: number;
|
|
755
|
+
/** Timestamp of last token refill */
|
|
756
|
+
lastRefill: Date;
|
|
757
|
+
};
|
|
758
|
+
/**
|
|
759
|
+
* Token response from OAuth server
|
|
760
|
+
* Standard OAuth 2.0/2.1 token endpoint response structure
|
|
761
|
+
* Used internally by NeuroLinkOAuthProvider for token exchange and refresh
|
|
762
|
+
*/
|
|
763
|
+
export type TokenResponse = {
|
|
764
|
+
/** Access token for API authentication */
|
|
765
|
+
access_token: string;
|
|
766
|
+
/** Refresh token for obtaining new access tokens (optional) */
|
|
767
|
+
refresh_token?: string;
|
|
768
|
+
/** Token lifetime in seconds (optional) */
|
|
769
|
+
expires_in?: number;
|
|
770
|
+
/** Token type (typically "Bearer") */
|
|
771
|
+
token_type: string;
|
|
772
|
+
/** OAuth scope granted (optional, space-separated) */
|
|
773
|
+
scope?: string;
|
|
774
|
+
};
|
|
775
|
+
/**
|
|
776
|
+
* Tool annotation metadata for MCP tools.
|
|
777
|
+
* Provides hints to AI models about tool behavior and safety.
|
|
778
|
+
*/
|
|
779
|
+
export type MCPToolAnnotations = {
|
|
780
|
+
/** Human-readable title for the tool */
|
|
781
|
+
title?: string;
|
|
782
|
+
/** Whether the tool only reads data without side effects */
|
|
783
|
+
readOnlyHint?: boolean;
|
|
784
|
+
/** Whether the tool performs destructive operations */
|
|
785
|
+
destructiveHint?: boolean;
|
|
786
|
+
/** Whether the tool can be safely retried without side effects */
|
|
787
|
+
idempotentHint?: boolean;
|
|
788
|
+
/** Whether the tool requires user confirmation before execution */
|
|
789
|
+
requiresConfirmation?: boolean;
|
|
790
|
+
/** Whether the tool operates on an open world of resources */
|
|
791
|
+
openWorldHint?: boolean;
|
|
792
|
+
/** Custom tags for categorization and filtering */
|
|
793
|
+
tags?: string[];
|
|
794
|
+
/** Estimated execution time in milliseconds */
|
|
795
|
+
estimatedDuration?: number;
|
|
796
|
+
/** Rate limit hint (calls per minute) */
|
|
797
|
+
rateLimitHint?: number;
|
|
798
|
+
/** Cost hint (arbitrary units for comparison) */
|
|
799
|
+
costHint?: number;
|
|
800
|
+
/** Complexity level for UI display */
|
|
801
|
+
complexity?: "simple" | "medium" | "complex";
|
|
802
|
+
/** Whether tool execution should be audited/logged */
|
|
803
|
+
auditRequired?: boolean;
|
|
804
|
+
/** Security classification for the tool */
|
|
805
|
+
securityLevel?: "public" | "internal" | "restricted";
|
|
806
|
+
};
|
|
807
|
+
/**
|
|
808
|
+
* Enhanced tool definition with annotations.
|
|
809
|
+
*/
|
|
810
|
+
export type MCPServerTool = {
|
|
811
|
+
name: string;
|
|
812
|
+
description: string;
|
|
813
|
+
inputSchema?: JsonObject;
|
|
814
|
+
outputSchema?: JsonObject;
|
|
815
|
+
annotations?: MCPToolAnnotations;
|
|
816
|
+
execute: (params: unknown, context?: NeuroLinkExecutionContext) => Promise<ToolResult | unknown>;
|
|
817
|
+
metadata?: Record<string, unknown>;
|
|
818
|
+
};
|
|
819
|
+
/**
|
|
820
|
+
* Base configuration for an MCP server.
|
|
821
|
+
*/
|
|
822
|
+
export type MCPServerBaseConfig = {
|
|
823
|
+
/** Unique server identifier */
|
|
824
|
+
id: string;
|
|
825
|
+
/** Human-readable server name */
|
|
826
|
+
name: string;
|
|
827
|
+
/** Server description */
|
|
828
|
+
description?: string;
|
|
829
|
+
/** Server version */
|
|
830
|
+
version?: string;
|
|
831
|
+
/** Server category for organization */
|
|
832
|
+
category?: MCPServerCategory;
|
|
833
|
+
/** Transport protocol preference */
|
|
834
|
+
transport?: MCPTransportType;
|
|
835
|
+
/** Custom metadata */
|
|
836
|
+
metadata?: Record<string, JsonValue>;
|
|
837
|
+
/** Default timeout for tool execution in milliseconds (default: 30000) */
|
|
838
|
+
defaultTimeoutMs?: number;
|
|
839
|
+
/** Global tool annotations applied to all tools */
|
|
840
|
+
defaultAnnotations?: MCPToolAnnotations;
|
|
841
|
+
};
|
|
842
|
+
/**
|
|
843
|
+
* Server lifecycle events.
|
|
844
|
+
*/
|
|
845
|
+
export type MCPServerEvents = {
|
|
846
|
+
toolRegistered: {
|
|
847
|
+
toolName: string;
|
|
848
|
+
tool: MCPServerTool;
|
|
849
|
+
};
|
|
850
|
+
toolExecuted: {
|
|
851
|
+
toolName: string;
|
|
852
|
+
duration: number;
|
|
853
|
+
success: boolean;
|
|
854
|
+
};
|
|
855
|
+
toolError: {
|
|
856
|
+
toolName: string;
|
|
857
|
+
error: Error;
|
|
858
|
+
};
|
|
859
|
+
serverReady: {
|
|
860
|
+
tools: string[];
|
|
861
|
+
};
|
|
862
|
+
serverStopped: {
|
|
863
|
+
reason?: string;
|
|
864
|
+
};
|
|
865
|
+
};
|
|
866
|
+
/**
|
|
867
|
+
* Agent definition for MCP exposure
|
|
868
|
+
*/
|
|
869
|
+
export type ExposableAgent = {
|
|
870
|
+
/**
|
|
871
|
+
* Unique agent identifier
|
|
872
|
+
*/
|
|
873
|
+
id: string;
|
|
874
|
+
/**
|
|
875
|
+
* Human-readable agent name
|
|
876
|
+
*/
|
|
877
|
+
name: string;
|
|
878
|
+
/**
|
|
879
|
+
* Agent description for AI models
|
|
880
|
+
*/
|
|
881
|
+
description: string;
|
|
882
|
+
/**
|
|
883
|
+
* Input schema for the agent
|
|
884
|
+
*/
|
|
885
|
+
inputSchema?: JsonObject;
|
|
886
|
+
/**
|
|
887
|
+
* Output schema for the agent
|
|
888
|
+
*/
|
|
889
|
+
outputSchema?: JsonObject;
|
|
890
|
+
/**
|
|
891
|
+
* Agent execution function
|
|
892
|
+
*/
|
|
893
|
+
execute: (input: unknown, context?: NeuroLinkExecutionContext) => Promise<unknown>;
|
|
894
|
+
/**
|
|
895
|
+
* Additional agent metadata
|
|
896
|
+
*/
|
|
897
|
+
metadata?: {
|
|
898
|
+
version?: string;
|
|
899
|
+
author?: string;
|
|
900
|
+
category?: string;
|
|
901
|
+
tags?: string[];
|
|
902
|
+
estimatedDuration?: number;
|
|
903
|
+
costHint?: number;
|
|
904
|
+
};
|
|
905
|
+
};
|
|
906
|
+
/**
|
|
907
|
+
* Workflow definition for MCP exposure
|
|
908
|
+
*/
|
|
909
|
+
export type ExposableWorkflow = {
|
|
910
|
+
/**
|
|
911
|
+
* Unique workflow identifier
|
|
912
|
+
*/
|
|
913
|
+
id: string;
|
|
914
|
+
/**
|
|
915
|
+
* Human-readable workflow name
|
|
916
|
+
*/
|
|
917
|
+
name: string;
|
|
918
|
+
/**
|
|
919
|
+
* Workflow description
|
|
920
|
+
*/
|
|
921
|
+
description: string;
|
|
922
|
+
/**
|
|
923
|
+
* Workflow steps (for documentation)
|
|
924
|
+
*/
|
|
925
|
+
steps?: Array<{
|
|
926
|
+
id: string;
|
|
927
|
+
name: string;
|
|
928
|
+
description?: string;
|
|
929
|
+
}>;
|
|
930
|
+
/**
|
|
931
|
+
* Input schema for the workflow
|
|
932
|
+
*/
|
|
933
|
+
inputSchema?: JsonObject;
|
|
934
|
+
/**
|
|
935
|
+
* Output schema for the workflow
|
|
936
|
+
*/
|
|
937
|
+
outputSchema?: JsonObject;
|
|
938
|
+
/**
|
|
939
|
+
* Workflow execution function
|
|
940
|
+
*/
|
|
941
|
+
execute: (input: unknown, context?: NeuroLinkExecutionContext) => Promise<unknown>;
|
|
942
|
+
/**
|
|
943
|
+
* Workflow metadata
|
|
944
|
+
*/
|
|
945
|
+
metadata?: {
|
|
946
|
+
version?: string;
|
|
947
|
+
author?: string;
|
|
948
|
+
category?: string;
|
|
949
|
+
tags?: string[];
|
|
950
|
+
estimatedDuration?: number;
|
|
951
|
+
retriable?: boolean;
|
|
952
|
+
idempotent?: boolean;
|
|
953
|
+
};
|
|
954
|
+
};
|
|
955
|
+
/**
|
|
956
|
+
* Options for exposing agents/workflows as MCP tools
|
|
957
|
+
*/
|
|
958
|
+
export type ExposureOptions = {
|
|
959
|
+
/**
|
|
960
|
+
* Prefix for tool names
|
|
961
|
+
*/
|
|
962
|
+
prefix?: string;
|
|
963
|
+
/**
|
|
964
|
+
* Default annotations for all exposed tools
|
|
965
|
+
*/
|
|
966
|
+
defaultAnnotations?: MCPToolAnnotations;
|
|
967
|
+
/**
|
|
968
|
+
* Whether to include metadata in tool description
|
|
969
|
+
*/
|
|
970
|
+
includeMetadataInDescription?: boolean;
|
|
971
|
+
/**
|
|
972
|
+
* Custom name transformer
|
|
973
|
+
*/
|
|
974
|
+
nameTransformer?: (name: string) => string;
|
|
975
|
+
/**
|
|
976
|
+
* Add execution context wrapper
|
|
977
|
+
*/
|
|
978
|
+
wrapWithContext?: boolean;
|
|
979
|
+
/**
|
|
980
|
+
* Timeout for agent/workflow execution (ms)
|
|
981
|
+
*/
|
|
982
|
+
executionTimeout?: number;
|
|
983
|
+
/**
|
|
984
|
+
* Enable execution logging
|
|
985
|
+
*/
|
|
986
|
+
enableLogging?: boolean;
|
|
987
|
+
};
|
|
988
|
+
/**
|
|
989
|
+
* Exposure result
|
|
990
|
+
*/
|
|
991
|
+
export type ExposureResult = {
|
|
992
|
+
/**
|
|
993
|
+
* Generated MCP tool
|
|
994
|
+
*/
|
|
995
|
+
tool: MCPServerTool;
|
|
996
|
+
/**
|
|
997
|
+
* Original source type
|
|
998
|
+
*/
|
|
999
|
+
sourceType: "agent" | "workflow";
|
|
1000
|
+
/**
|
|
1001
|
+
* Original source ID
|
|
1002
|
+
*/
|
|
1003
|
+
sourceId: string;
|
|
1004
|
+
/**
|
|
1005
|
+
* Generated tool name
|
|
1006
|
+
*/
|
|
1007
|
+
toolName: string;
|
|
1008
|
+
};
|
|
1009
|
+
/**
|
|
1010
|
+
* MCP elicitation protocol message types
|
|
1011
|
+
*/
|
|
1012
|
+
export type ElicitationProtocolMessageType = "elicitation/request" | "elicitation/response" | "elicitation/cancel";
|
|
1013
|
+
/**
|
|
1014
|
+
* Request params type
|
|
1015
|
+
*/
|
|
1016
|
+
export type ElicitationRequestParams = {
|
|
1017
|
+
type: ElicitationType;
|
|
1018
|
+
message: string;
|
|
1019
|
+
toolName: string;
|
|
1020
|
+
serverId?: string;
|
|
1021
|
+
timeout?: number;
|
|
1022
|
+
optional?: boolean;
|
|
1023
|
+
defaultValue?: JsonValue;
|
|
1024
|
+
options?: Record<string, JsonValue>;
|
|
1025
|
+
};
|
|
1026
|
+
/**
|
|
1027
|
+
* Response params type
|
|
1028
|
+
*/
|
|
1029
|
+
export type ElicitationResponseParams = {
|
|
1030
|
+
requestId: string;
|
|
1031
|
+
responded: boolean;
|
|
1032
|
+
value?: JsonValue;
|
|
1033
|
+
cancelled?: boolean;
|
|
1034
|
+
timedOut?: boolean;
|
|
1035
|
+
error?: string;
|
|
1036
|
+
};
|
|
1037
|
+
/**
|
|
1038
|
+
* Cancel params type
|
|
1039
|
+
*/
|
|
1040
|
+
export type ElicitationCancelParams = {
|
|
1041
|
+
requestId: string;
|
|
1042
|
+
reason?: string;
|
|
1043
|
+
};
|
|
1044
|
+
/**
|
|
1045
|
+
* Base protocol message structure
|
|
1046
|
+
*/
|
|
1047
|
+
export type ElicitationProtocolMessage = {
|
|
1048
|
+
jsonrpc: "2.0";
|
|
1049
|
+
id: string;
|
|
1050
|
+
method: ElicitationProtocolMessageType;
|
|
1051
|
+
params: ElicitationRequestParams | ElicitationResponseParams | ElicitationCancelParams;
|
|
1052
|
+
};
|
|
1053
|
+
/**
|
|
1054
|
+
* Elicitation request protocol message
|
|
1055
|
+
*/
|
|
1056
|
+
export type ElicitationRequestMessage = {
|
|
1057
|
+
jsonrpc: "2.0";
|
|
1058
|
+
id: string;
|
|
1059
|
+
method: "elicitation/request";
|
|
1060
|
+
params: ElicitationRequestParams;
|
|
1061
|
+
};
|
|
1062
|
+
/**
|
|
1063
|
+
* Elicitation response protocol message
|
|
1064
|
+
*/
|
|
1065
|
+
export type ElicitationResponseMessage = {
|
|
1066
|
+
jsonrpc: "2.0";
|
|
1067
|
+
id: string;
|
|
1068
|
+
method: "elicitation/response";
|
|
1069
|
+
params: ElicitationResponseParams;
|
|
1070
|
+
};
|
|
1071
|
+
/**
|
|
1072
|
+
* Elicitation cancel protocol message
|
|
1073
|
+
*/
|
|
1074
|
+
export type ElicitationCancelMessage = {
|
|
1075
|
+
jsonrpc: "2.0";
|
|
1076
|
+
id: string;
|
|
1077
|
+
method: "elicitation/cancel";
|
|
1078
|
+
params: ElicitationCancelParams;
|
|
1079
|
+
};
|
|
1080
|
+
/**
|
|
1081
|
+
* Protocol message union type
|
|
1082
|
+
*/
|
|
1083
|
+
export type ElicitationProtocolPayload = ElicitationRequestMessage | ElicitationResponseMessage | ElicitationCancelMessage;
|
|
1084
|
+
/**
|
|
1085
|
+
* Protocol handler function type
|
|
1086
|
+
*/
|
|
1087
|
+
export type ElicitationProtocolHandler = (message: ElicitationProtocolPayload) => Promise<ElicitationProtocolPayload | void>;
|
|
1088
|
+
/**
|
|
1089
|
+
* Protocol adapter configuration
|
|
1090
|
+
*/
|
|
1091
|
+
export type ElicitationProtocolAdapterConfig = {
|
|
1092
|
+
manager?: import("../mcp/elicitation/elicitationManager.js").ElicitationManager;
|
|
1093
|
+
defaultTimeout?: number;
|
|
1094
|
+
enableLogging?: boolean;
|
|
1095
|
+
customHandler?: ElicitationProtocolHandler;
|
|
1096
|
+
};
|
|
1097
|
+
/**
|
|
1098
|
+
* Enhanced tool info with annotations
|
|
1099
|
+
*/
|
|
1100
|
+
export type EnhancedToolInfo = ExternalMCPToolInfo & {
|
|
1101
|
+
annotations?: MCPToolAnnotations;
|
|
1102
|
+
version?: string;
|
|
1103
|
+
compatibleWith?: string[];
|
|
1104
|
+
aliases?: string[];
|
|
1105
|
+
examples?: Array<{
|
|
1106
|
+
name: string;
|
|
1107
|
+
description: string;
|
|
1108
|
+
params: JsonObject;
|
|
1109
|
+
}>;
|
|
1110
|
+
};
|
|
1111
|
+
/**
|
|
1112
|
+
* Tool search criteria
|
|
1113
|
+
*/
|
|
1114
|
+
export type ToolSearchCriteria = {
|
|
1115
|
+
/**
|
|
1116
|
+
* Search by name (partial match)
|
|
1117
|
+
*/
|
|
1118
|
+
name?: string;
|
|
1119
|
+
/**
|
|
1120
|
+
* Search by description (keyword match)
|
|
1121
|
+
*/
|
|
1122
|
+
description?: string;
|
|
1123
|
+
/**
|
|
1124
|
+
* Filter by server IDs
|
|
1125
|
+
*/
|
|
1126
|
+
serverIds?: string[];
|
|
1127
|
+
/**
|
|
1128
|
+
* Filter by category
|
|
1129
|
+
*/
|
|
1130
|
+
category?: string;
|
|
1131
|
+
/**
|
|
1132
|
+
* Filter by tags
|
|
1133
|
+
*/
|
|
1134
|
+
tags?: string[];
|
|
1135
|
+
/**
|
|
1136
|
+
* Filter by annotation flags
|
|
1137
|
+
*/
|
|
1138
|
+
annotations?: Partial<MCPToolAnnotations>;
|
|
1139
|
+
/**
|
|
1140
|
+
* Include unavailable tools
|
|
1141
|
+
*/
|
|
1142
|
+
includeUnavailable?: boolean;
|
|
1143
|
+
/**
|
|
1144
|
+
* Maximum results
|
|
1145
|
+
*/
|
|
1146
|
+
limit?: number;
|
|
1147
|
+
/**
|
|
1148
|
+
* Sort by field
|
|
1149
|
+
*/
|
|
1150
|
+
sortBy?: "name" | "calls" | "successRate" | "avgExecutionTime";
|
|
1151
|
+
/**
|
|
1152
|
+
* Sort direction
|
|
1153
|
+
*/
|
|
1154
|
+
sortDirection?: "asc" | "desc";
|
|
1155
|
+
};
|
|
1156
|
+
/**
|
|
1157
|
+
* Tool search result
|
|
1158
|
+
*/
|
|
1159
|
+
export type ToolSearchResult = {
|
|
1160
|
+
tools: EnhancedToolInfo[];
|
|
1161
|
+
totalCount: number;
|
|
1162
|
+
criteria: ToolSearchCriteria;
|
|
1163
|
+
executionTime: number;
|
|
1164
|
+
};
|
|
1165
|
+
/**
|
|
1166
|
+
* Tool compatibility check result
|
|
1167
|
+
*/
|
|
1168
|
+
export type CompatibilityCheckResult = {
|
|
1169
|
+
compatible: boolean;
|
|
1170
|
+
issues: string[];
|
|
1171
|
+
warnings: string[];
|
|
1172
|
+
recommendations: string[];
|
|
1173
|
+
};
|
|
1174
|
+
/**
|
|
1175
|
+
* Registry source types
|
|
1176
|
+
*/
|
|
1177
|
+
export type RegistrySourceType = "official" | "npm" | "github" | "custom";
|
|
1178
|
+
/**
|
|
1179
|
+
* Registry entry for an MCP server
|
|
1180
|
+
*/
|
|
1181
|
+
export type McpRegistryEntry = {
|
|
1182
|
+
/**
|
|
1183
|
+
* Unique identifier
|
|
1184
|
+
*/
|
|
1185
|
+
id: string;
|
|
1186
|
+
/**
|
|
1187
|
+
* Server name
|
|
1188
|
+
*/
|
|
1189
|
+
name: string;
|
|
1190
|
+
/**
|
|
1191
|
+
* Server description
|
|
1192
|
+
*/
|
|
1193
|
+
description: string;
|
|
1194
|
+
/**
|
|
1195
|
+
* Server version
|
|
1196
|
+
*/
|
|
1197
|
+
version: string;
|
|
1198
|
+
/**
|
|
1199
|
+
* Author or maintainer
|
|
1200
|
+
*/
|
|
1201
|
+
author?: string;
|
|
1202
|
+
/**
|
|
1203
|
+
* License
|
|
1204
|
+
*/
|
|
1205
|
+
license?: string;
|
|
1206
|
+
/**
|
|
1207
|
+
* Homepage URL
|
|
1208
|
+
*/
|
|
1209
|
+
homepage?: string;
|
|
1210
|
+
/**
|
|
1211
|
+
* Repository URL
|
|
1212
|
+
*/
|
|
1213
|
+
repository?: string;
|
|
1214
|
+
/**
|
|
1215
|
+
* NPM package name (if applicable)
|
|
1216
|
+
*/
|
|
1217
|
+
npmPackage?: string;
|
|
1218
|
+
/**
|
|
1219
|
+
* Installation command
|
|
1220
|
+
*/
|
|
1221
|
+
installCommand?: string;
|
|
1222
|
+
/**
|
|
1223
|
+
* Command to run the server
|
|
1224
|
+
*/
|
|
1225
|
+
command?: string;
|
|
1226
|
+
/**
|
|
1227
|
+
* Command arguments
|
|
1228
|
+
*/
|
|
1229
|
+
args?: string[];
|
|
1230
|
+
/**
|
|
1231
|
+
* Required environment variables
|
|
1232
|
+
*/
|
|
1233
|
+
requiredEnvVars?: string[];
|
|
1234
|
+
/**
|
|
1235
|
+
* Supported transport types
|
|
1236
|
+
*/
|
|
1237
|
+
transports?: MCPTransportType[];
|
|
1238
|
+
/**
|
|
1239
|
+
* Server categories
|
|
1240
|
+
*/
|
|
1241
|
+
categories?: string[];
|
|
1242
|
+
/**
|
|
1243
|
+
* Server tags
|
|
1244
|
+
*/
|
|
1245
|
+
tags?: string[];
|
|
1246
|
+
/**
|
|
1247
|
+
* Tool names provided by the server
|
|
1248
|
+
*/
|
|
1249
|
+
tools?: string[];
|
|
1250
|
+
/**
|
|
1251
|
+
* Download count (popularity metric)
|
|
1252
|
+
*/
|
|
1253
|
+
downloads?: number;
|
|
1254
|
+
/**
|
|
1255
|
+
* Star count (if from GitHub)
|
|
1256
|
+
*/
|
|
1257
|
+
stars?: number;
|
|
1258
|
+
/**
|
|
1259
|
+
* Last updated date
|
|
1260
|
+
*/
|
|
1261
|
+
lastUpdated?: string;
|
|
1262
|
+
/**
|
|
1263
|
+
* Verification status
|
|
1264
|
+
*/
|
|
1265
|
+
verified?: boolean;
|
|
1266
|
+
/**
|
|
1267
|
+
* Custom metadata
|
|
1268
|
+
*/
|
|
1269
|
+
metadata?: JsonObject;
|
|
1270
|
+
};
|
|
1271
|
+
/**
|
|
1272
|
+
* Registry configuration
|
|
1273
|
+
*/
|
|
1274
|
+
export type RegistryConfig = {
|
|
1275
|
+
/**
|
|
1276
|
+
* Registry type
|
|
1277
|
+
*/
|
|
1278
|
+
type: RegistrySourceType;
|
|
1279
|
+
/**
|
|
1280
|
+
* Registry URL or identifier
|
|
1281
|
+
*/
|
|
1282
|
+
url?: string;
|
|
1283
|
+
/**
|
|
1284
|
+
* Authentication token
|
|
1285
|
+
*/
|
|
1286
|
+
authToken?: string;
|
|
1287
|
+
/**
|
|
1288
|
+
* Request timeout in milliseconds
|
|
1289
|
+
*/
|
|
1290
|
+
timeout?: number;
|
|
1291
|
+
/**
|
|
1292
|
+
* Enable caching
|
|
1293
|
+
*/
|
|
1294
|
+
enableCache?: boolean;
|
|
1295
|
+
/**
|
|
1296
|
+
* Cache TTL in milliseconds
|
|
1297
|
+
*/
|
|
1298
|
+
cacheTTL?: number;
|
|
1299
|
+
};
|
|
1300
|
+
/**
|
|
1301
|
+
* Search options for registry queries
|
|
1302
|
+
*/
|
|
1303
|
+
export type RegistrySearchOptions = {
|
|
1304
|
+
/**
|
|
1305
|
+
* Search query (name, description, tags)
|
|
1306
|
+
*/
|
|
1307
|
+
query?: string;
|
|
1308
|
+
/**
|
|
1309
|
+
* Filter by categories
|
|
1310
|
+
*/
|
|
1311
|
+
categories?: string[];
|
|
1312
|
+
/**
|
|
1313
|
+
* Filter by tags
|
|
1314
|
+
*/
|
|
1315
|
+
tags?: string[];
|
|
1316
|
+
/**
|
|
1317
|
+
* Filter by transport type
|
|
1318
|
+
*/
|
|
1319
|
+
transport?: MCPTransportType;
|
|
1320
|
+
/**
|
|
1321
|
+
* Only verified servers
|
|
1322
|
+
*/
|
|
1323
|
+
verifiedOnly?: boolean;
|
|
1324
|
+
/**
|
|
1325
|
+
* Sort by field
|
|
1326
|
+
*/
|
|
1327
|
+
sortBy?: "name" | "downloads" | "stars" | "lastUpdated";
|
|
1328
|
+
/**
|
|
1329
|
+
* Sort direction
|
|
1330
|
+
*/
|
|
1331
|
+
sortDirection?: "asc" | "desc";
|
|
1332
|
+
/**
|
|
1333
|
+
* Maximum results
|
|
1334
|
+
*/
|
|
1335
|
+
limit?: number;
|
|
1336
|
+
/**
|
|
1337
|
+
* Offset for pagination
|
|
1338
|
+
*/
|
|
1339
|
+
offset?: number;
|
|
1340
|
+
};
|
|
1341
|
+
/**
|
|
1342
|
+
* Search result
|
|
1343
|
+
*/
|
|
1344
|
+
export type RegistrySearchResult = {
|
|
1345
|
+
entries: McpRegistryEntry[];
|
|
1346
|
+
totalCount: number;
|
|
1347
|
+
page: number;
|
|
1348
|
+
pageSize: number;
|
|
1349
|
+
hasMore: boolean;
|
|
1350
|
+
};
|
|
1351
|
+
/**
|
|
1352
|
+
* Registry client configuration
|
|
1353
|
+
*/
|
|
1354
|
+
export type MCPRegistryClientConfig = {
|
|
1355
|
+
/**
|
|
1356
|
+
* Default registries to use
|
|
1357
|
+
*/
|
|
1358
|
+
registries?: RegistryConfig[];
|
|
1359
|
+
/**
|
|
1360
|
+
* Enable automatic caching
|
|
1361
|
+
*/
|
|
1362
|
+
enableCache?: boolean;
|
|
1363
|
+
/**
|
|
1364
|
+
* Default cache TTL
|
|
1365
|
+
*/
|
|
1366
|
+
defaultCacheTTL?: number;
|
|
1367
|
+
/**
|
|
1368
|
+
* Request timeout
|
|
1369
|
+
*/
|
|
1370
|
+
timeout?: number;
|
|
1371
|
+
/**
|
|
1372
|
+
* User agent string
|
|
1373
|
+
*/
|
|
1374
|
+
userAgent?: string;
|
|
1375
|
+
};
|
|
1376
|
+
/**
|
|
1377
|
+
* Load balancing strategies
|
|
1378
|
+
*/
|
|
1379
|
+
export type LoadBalancingStrategy = "round-robin" | "least-loaded" | "random" | "weighted" | "failover-only";
|
|
1380
|
+
/**
|
|
1381
|
+
* Server weight for weighted load balancing
|
|
1382
|
+
*/
|
|
1383
|
+
export type ServerWeight = {
|
|
1384
|
+
serverId: string;
|
|
1385
|
+
weight: number;
|
|
1386
|
+
priority: number;
|
|
1387
|
+
};
|
|
1388
|
+
/**
|
|
1389
|
+
* Server group definition
|
|
1390
|
+
*/
|
|
1391
|
+
export type ServerGroup = {
|
|
1392
|
+
/**
|
|
1393
|
+
* Group identifier
|
|
1394
|
+
*/
|
|
1395
|
+
id: string;
|
|
1396
|
+
/**
|
|
1397
|
+
* Human-readable name
|
|
1398
|
+
*/
|
|
1399
|
+
name: string;
|
|
1400
|
+
/**
|
|
1401
|
+
* Description of the group
|
|
1402
|
+
*/
|
|
1403
|
+
description?: string;
|
|
1404
|
+
/**
|
|
1405
|
+
* Server IDs in this group
|
|
1406
|
+
*/
|
|
1407
|
+
servers: string[];
|
|
1408
|
+
/**
|
|
1409
|
+
* Load balancing strategy for this group
|
|
1410
|
+
*/
|
|
1411
|
+
strategy: LoadBalancingStrategy;
|
|
1412
|
+
/**
|
|
1413
|
+
* Weights for weighted strategy
|
|
1414
|
+
*/
|
|
1415
|
+
weights?: ServerWeight[];
|
|
1416
|
+
/**
|
|
1417
|
+
* Whether to enable health-aware routing
|
|
1418
|
+
*/
|
|
1419
|
+
healthAware?: boolean;
|
|
1420
|
+
/**
|
|
1421
|
+
* Minimum healthy servers before alerting
|
|
1422
|
+
*/
|
|
1423
|
+
minHealthyServers?: number;
|
|
1424
|
+
};
|
|
1425
|
+
/**
|
|
1426
|
+
* Unified tool entry from multiple servers
|
|
1427
|
+
*/
|
|
1428
|
+
export type UnifiedTool = {
|
|
1429
|
+
/**
|
|
1430
|
+
* Tool name
|
|
1431
|
+
*/
|
|
1432
|
+
name: string;
|
|
1433
|
+
/**
|
|
1434
|
+
* Tool description
|
|
1435
|
+
*/
|
|
1436
|
+
description: string;
|
|
1437
|
+
/**
|
|
1438
|
+
* Servers that provide this tool
|
|
1439
|
+
*/
|
|
1440
|
+
servers: Array<{
|
|
1441
|
+
serverId: string;
|
|
1442
|
+
serverName: string;
|
|
1443
|
+
inputSchema?: JsonObject;
|
|
1444
|
+
priority: number;
|
|
1445
|
+
}>;
|
|
1446
|
+
/**
|
|
1447
|
+
* Whether this tool has naming conflicts
|
|
1448
|
+
*/
|
|
1449
|
+
hasConflict: boolean;
|
|
1450
|
+
/**
|
|
1451
|
+
* Preferred server for this tool
|
|
1452
|
+
*/
|
|
1453
|
+
preferredServerId?: string;
|
|
1454
|
+
};
|
|
1455
|
+
/**
|
|
1456
|
+
* Multi-server manager configuration
|
|
1457
|
+
*/
|
|
1458
|
+
export type MultiServerManagerConfig = {
|
|
1459
|
+
/**
|
|
1460
|
+
* Default load balancing strategy
|
|
1461
|
+
*/
|
|
1462
|
+
defaultStrategy?: LoadBalancingStrategy;
|
|
1463
|
+
/**
|
|
1464
|
+
* Enable health-aware routing by default
|
|
1465
|
+
*/
|
|
1466
|
+
healthAwareRouting?: boolean;
|
|
1467
|
+
/**
|
|
1468
|
+
* Health check interval in milliseconds
|
|
1469
|
+
*/
|
|
1470
|
+
healthCheckInterval?: number;
|
|
1471
|
+
/**
|
|
1472
|
+
* Maximum retries on failover
|
|
1473
|
+
*/
|
|
1474
|
+
maxFailoverRetries?: number;
|
|
1475
|
+
/**
|
|
1476
|
+
* Tool namespace separator
|
|
1477
|
+
*/
|
|
1478
|
+
namespaceSeparator?: string;
|
|
1479
|
+
/**
|
|
1480
|
+
* Enable automatic tool namespace prefixing
|
|
1481
|
+
*/
|
|
1482
|
+
autoNamespace?: boolean;
|
|
1483
|
+
/**
|
|
1484
|
+
* Conflict resolution strategy.
|
|
1485
|
+
* Reserved for future conflict resolution strategy — currently stored but not
|
|
1486
|
+
* consumed by any routing or tool-merge logic.
|
|
1487
|
+
*/
|
|
1488
|
+
conflictResolution?: "first-wins" | "last-wins" | "namespace" | "explicit";
|
|
1489
|
+
};
|
|
1490
|
+
/**
|
|
1491
|
+
* MCP Resource definition
|
|
1492
|
+
*/
|
|
1493
|
+
export type MCPResource = {
|
|
1494
|
+
/**
|
|
1495
|
+
* Unique resource URI
|
|
1496
|
+
*/
|
|
1497
|
+
uri: string;
|
|
1498
|
+
/**
|
|
1499
|
+
* Human-readable name
|
|
1500
|
+
*/
|
|
1501
|
+
name: string;
|
|
1502
|
+
/**
|
|
1503
|
+
* Resource description
|
|
1504
|
+
*/
|
|
1505
|
+
description?: string;
|
|
1506
|
+
/**
|
|
1507
|
+
* MIME type of the resource content
|
|
1508
|
+
*/
|
|
1509
|
+
mimeType?: string;
|
|
1510
|
+
/**
|
|
1511
|
+
* Resource size in bytes (if known)
|
|
1512
|
+
*/
|
|
1513
|
+
size?: number;
|
|
1514
|
+
/**
|
|
1515
|
+
* Whether the resource content can change
|
|
1516
|
+
*/
|
|
1517
|
+
dynamic?: boolean;
|
|
1518
|
+
/**
|
|
1519
|
+
* Resource annotations/metadata
|
|
1520
|
+
*/
|
|
1521
|
+
annotations?: {
|
|
1522
|
+
/**
|
|
1523
|
+
* Audience description
|
|
1524
|
+
*/
|
|
1525
|
+
audience?: string[];
|
|
1526
|
+
/**
|
|
1527
|
+
* Priority hint (0-1)
|
|
1528
|
+
*/
|
|
1529
|
+
priority?: number;
|
|
1530
|
+
};
|
|
1531
|
+
};
|
|
1532
|
+
/**
|
|
1533
|
+
* Resource content returned when reading a resource
|
|
1534
|
+
*/
|
|
1535
|
+
export type ResourceContent = {
|
|
1536
|
+
/**
|
|
1537
|
+
* Resource URI
|
|
1538
|
+
*/
|
|
1539
|
+
uri: string;
|
|
1540
|
+
/**
|
|
1541
|
+
* MIME type
|
|
1542
|
+
*/
|
|
1543
|
+
mimeType?: string;
|
|
1544
|
+
/**
|
|
1545
|
+
* Text content (for text/* MIME types)
|
|
1546
|
+
*/
|
|
1547
|
+
text?: string;
|
|
1548
|
+
/**
|
|
1549
|
+
* Binary content as base64 (for non-text MIME types)
|
|
1550
|
+
*/
|
|
1551
|
+
blob?: string;
|
|
1552
|
+
};
|
|
1553
|
+
/**
|
|
1554
|
+
* Resource reader function type
|
|
1555
|
+
*/
|
|
1556
|
+
export type ResourceReader = (uri: string, context?: JsonObject) => Promise<ResourceContent>;
|
|
1557
|
+
/**
|
|
1558
|
+
* Registered resource with reader
|
|
1559
|
+
*/
|
|
1560
|
+
export type RegisteredResource = MCPResource & {
|
|
1561
|
+
reader: ResourceReader;
|
|
1562
|
+
};
|
|
1563
|
+
/**
|
|
1564
|
+
* MCP Prompt definition
|
|
1565
|
+
*/
|
|
1566
|
+
export type MCPPrompt = {
|
|
1567
|
+
/**
|
|
1568
|
+
* Unique prompt name
|
|
1569
|
+
*/
|
|
1570
|
+
name: string;
|
|
1571
|
+
/**
|
|
1572
|
+
* Human-readable description
|
|
1573
|
+
*/
|
|
1574
|
+
description?: string;
|
|
1575
|
+
/**
|
|
1576
|
+
* Prompt arguments schema
|
|
1577
|
+
*/
|
|
1578
|
+
arguments?: Array<{
|
|
1579
|
+
/**
|
|
1580
|
+
* Argument name
|
|
1581
|
+
*/
|
|
1582
|
+
name: string;
|
|
1583
|
+
/**
|
|
1584
|
+
* Argument description
|
|
1585
|
+
*/
|
|
1586
|
+
description?: string;
|
|
1587
|
+
/**
|
|
1588
|
+
* Whether the argument is required
|
|
1589
|
+
*/
|
|
1590
|
+
required?: boolean;
|
|
1591
|
+
}>;
|
|
1592
|
+
};
|
|
1593
|
+
/**
|
|
1594
|
+
* Prompt message content
|
|
1595
|
+
*/
|
|
1596
|
+
export type PromptMessage = {
|
|
1597
|
+
/**
|
|
1598
|
+
* Message role
|
|
1599
|
+
*/
|
|
1600
|
+
role: "user" | "assistant";
|
|
1601
|
+
/**
|
|
1602
|
+
* Message content
|
|
1603
|
+
*/
|
|
1604
|
+
content: {
|
|
1605
|
+
type: "text" | "image" | "resource";
|
|
1606
|
+
text?: string;
|
|
1607
|
+
data?: string;
|
|
1608
|
+
mimeType?: string;
|
|
1609
|
+
uri?: string;
|
|
1610
|
+
};
|
|
1611
|
+
};
|
|
1612
|
+
/**
|
|
1613
|
+
* Result of getting a prompt
|
|
1614
|
+
*/
|
|
1615
|
+
export type PromptResult = {
|
|
1616
|
+
/**
|
|
1617
|
+
* Optional description
|
|
1618
|
+
*/
|
|
1619
|
+
description?: string;
|
|
1620
|
+
/**
|
|
1621
|
+
* Prompt messages
|
|
1622
|
+
*/
|
|
1623
|
+
messages: PromptMessage[];
|
|
1624
|
+
};
|
|
1625
|
+
/**
|
|
1626
|
+
* Prompt generator function type
|
|
1627
|
+
*/
|
|
1628
|
+
export type PromptGenerator = (args: Record<string, JsonValue>, context?: JsonObject) => Promise<PromptResult>;
|
|
1629
|
+
/**
|
|
1630
|
+
* Registered prompt with generator
|
|
1631
|
+
*/
|
|
1632
|
+
export type RegisteredPrompt = MCPPrompt & {
|
|
1633
|
+
generator: PromptGenerator;
|
|
1634
|
+
};
|
|
1635
|
+
/**
|
|
1636
|
+
* Resource subscription callback
|
|
1637
|
+
*/
|
|
1638
|
+
export type ResourceSubscriptionCallback = (uri: string, content: ResourceContent) => void | Promise<void>;
|
|
1639
|
+
/**
|
|
1640
|
+
* Server capabilities configuration
|
|
1641
|
+
*/
|
|
1642
|
+
export type ServerCapabilitiesConfig = {
|
|
1643
|
+
/**
|
|
1644
|
+
* Enable resource support
|
|
1645
|
+
*/
|
|
1646
|
+
resources?: boolean;
|
|
1647
|
+
/**
|
|
1648
|
+
* Enable prompt support
|
|
1649
|
+
*/
|
|
1650
|
+
prompts?: boolean;
|
|
1651
|
+
/**
|
|
1652
|
+
* Enable resource subscriptions
|
|
1653
|
+
*/
|
|
1654
|
+
resourceSubscriptions?: boolean;
|
|
1655
|
+
};
|
|
1656
|
+
/**
|
|
1657
|
+
* NeuroLink internal tool format
|
|
1658
|
+
*/
|
|
1659
|
+
export type NeuroLinkTool = {
|
|
1660
|
+
/**
|
|
1661
|
+
* Tool name
|
|
1662
|
+
*/
|
|
1663
|
+
name: string;
|
|
1664
|
+
/**
|
|
1665
|
+
* Tool description
|
|
1666
|
+
*/
|
|
1667
|
+
description: string;
|
|
1668
|
+
/**
|
|
1669
|
+
* Input parameters schema
|
|
1670
|
+
*/
|
|
1671
|
+
parameters?: JsonObject;
|
|
1672
|
+
/**
|
|
1673
|
+
* Tool execution function
|
|
1674
|
+
*/
|
|
1675
|
+
execute: (params: unknown, context?: NeuroLinkExecutionContext) => Promise<ToolResult | unknown>;
|
|
1676
|
+
/**
|
|
1677
|
+
* Category for organization
|
|
1678
|
+
*/
|
|
1679
|
+
category?: string;
|
|
1680
|
+
/**
|
|
1681
|
+
* Tags for filtering
|
|
1682
|
+
*/
|
|
1683
|
+
tags?: string[];
|
|
1684
|
+
/**
|
|
1685
|
+
* Whether the tool is async
|
|
1686
|
+
*/
|
|
1687
|
+
isAsync?: boolean;
|
|
1688
|
+
/**
|
|
1689
|
+
* Custom metadata
|
|
1690
|
+
*/
|
|
1691
|
+
metadata?: Record<string, JsonValue>;
|
|
1692
|
+
};
|
|
1693
|
+
/**
|
|
1694
|
+
* MCP protocol tool format (from @modelcontextprotocol/sdk)
|
|
1695
|
+
*/
|
|
1696
|
+
export type MCPProtocolTool = {
|
|
1697
|
+
/**
|
|
1698
|
+
* Tool name
|
|
1699
|
+
*/
|
|
1700
|
+
name: string;
|
|
1701
|
+
/**
|
|
1702
|
+
* Tool description
|
|
1703
|
+
*/
|
|
1704
|
+
description?: string;
|
|
1705
|
+
/**
|
|
1706
|
+
* JSON Schema for input
|
|
1707
|
+
*/
|
|
1708
|
+
inputSchema: {
|
|
1709
|
+
type: "object";
|
|
1710
|
+
properties?: Record<string, JsonObject>;
|
|
1711
|
+
required?: string[];
|
|
1712
|
+
};
|
|
1713
|
+
/**
|
|
1714
|
+
* Optional annotations (MCP 2024-11-05+)
|
|
1715
|
+
*/
|
|
1716
|
+
annotations?: {
|
|
1717
|
+
title?: string;
|
|
1718
|
+
readOnlyHint?: boolean;
|
|
1719
|
+
destructiveHint?: boolean;
|
|
1720
|
+
idempotentHint?: boolean;
|
|
1721
|
+
openWorldHint?: boolean;
|
|
1722
|
+
};
|
|
1723
|
+
};
|
|
1724
|
+
/**
|
|
1725
|
+
* Tool converter options
|
|
1726
|
+
*/
|
|
1727
|
+
export type ToolConverterOptions = {
|
|
1728
|
+
/**
|
|
1729
|
+
* Automatically infer annotations from tool definition
|
|
1730
|
+
*/
|
|
1731
|
+
inferAnnotations?: boolean;
|
|
1732
|
+
/**
|
|
1733
|
+
* Default annotations to apply
|
|
1734
|
+
*/
|
|
1735
|
+
defaultAnnotations?: MCPToolAnnotations;
|
|
1736
|
+
/**
|
|
1737
|
+
* Whether to preserve original metadata
|
|
1738
|
+
*/
|
|
1739
|
+
preserveMetadata?: boolean;
|
|
1740
|
+
/**
|
|
1741
|
+
* Namespace prefix for tool names
|
|
1742
|
+
*/
|
|
1743
|
+
namespacePrefix?: string;
|
|
1744
|
+
};
|
|
1745
|
+
/**
|
|
1746
|
+
* Tool execution context with elicitation support
|
|
1747
|
+
*/
|
|
1748
|
+
export type EnhancedExecutionContext = NeuroLinkExecutionContext & {
|
|
1749
|
+
/**
|
|
1750
|
+
* Elicitation context for interactive input
|
|
1751
|
+
*/
|
|
1752
|
+
elicitation: ElicitationContext;
|
|
1753
|
+
/**
|
|
1754
|
+
* Tool metadata
|
|
1755
|
+
*/
|
|
1756
|
+
toolMeta: {
|
|
1757
|
+
name: string;
|
|
1758
|
+
serverId?: string;
|
|
1759
|
+
annotations?: MCPToolAnnotations;
|
|
1760
|
+
};
|
|
1761
|
+
};
|
|
1762
|
+
/**
|
|
1763
|
+
* Tool wrapper options
|
|
1764
|
+
*/
|
|
1765
|
+
export type ToolWrapperOptions = {
|
|
1766
|
+
/**
|
|
1767
|
+
* Elicitation manager to use
|
|
1768
|
+
*/
|
|
1769
|
+
elicitationManager?: import("../mcp/elicitation/elicitationManager.js").ElicitationManager;
|
|
1770
|
+
/**
|
|
1771
|
+
* Auto-confirm destructive operations
|
|
1772
|
+
*/
|
|
1773
|
+
autoConfirmDestructive?: boolean;
|
|
1774
|
+
/**
|
|
1775
|
+
* Default timeout for elicitations
|
|
1776
|
+
*/
|
|
1777
|
+
elicitationTimeout?: number;
|
|
1778
|
+
/**
|
|
1779
|
+
* Enable logging
|
|
1780
|
+
*/
|
|
1781
|
+
enableLogging?: boolean;
|
|
1782
|
+
};
|
|
1783
|
+
/**
|
|
1784
|
+
* Tool execution middleware
|
|
1785
|
+
*/
|
|
1786
|
+
export type ToolMiddleware = (tool: MCPServerTool, params: unknown, context: EnhancedExecutionContext, next: () => Promise<ToolResult | unknown>) => Promise<ToolResult | unknown>;
|
|
1787
|
+
/**
|
|
1788
|
+
* Batch configuration options
|
|
1789
|
+
*/
|
|
1790
|
+
export type BatchConfig = {
|
|
1791
|
+
/**
|
|
1792
|
+
* Maximum number of requests to batch together (default: 10)
|
|
1793
|
+
*/
|
|
1794
|
+
maxBatchSize: number;
|
|
1795
|
+
/**
|
|
1796
|
+
* Maximum time to wait for a full batch in milliseconds (default: 100ms)
|
|
1797
|
+
*/
|
|
1798
|
+
maxWaitMs: number;
|
|
1799
|
+
/**
|
|
1800
|
+
* Enable parallel execution of batched requests (default: true).
|
|
1801
|
+
* Reserved for future parallel batch execution; currently stored but not read.
|
|
1802
|
+
*/
|
|
1803
|
+
enableParallel?: boolean;
|
|
1804
|
+
/**
|
|
1805
|
+
* Maximum concurrent batches in flight (default: 5)
|
|
1806
|
+
*/
|
|
1807
|
+
maxConcurrentBatches?: number;
|
|
1808
|
+
/**
|
|
1809
|
+
* Group requests by server ID (default: true)
|
|
1810
|
+
*/
|
|
1811
|
+
groupByServer?: boolean;
|
|
1812
|
+
};
|
|
1813
|
+
/**
|
|
1814
|
+
* Batch execution result
|
|
1815
|
+
*/
|
|
1816
|
+
export type BatchResult<T> = {
|
|
1817
|
+
id: string;
|
|
1818
|
+
success: boolean;
|
|
1819
|
+
result?: T;
|
|
1820
|
+
error?: Error;
|
|
1821
|
+
executionTime: number;
|
|
1822
|
+
};
|
|
1823
|
+
/**
|
|
1824
|
+
* Batch executor function type
|
|
1825
|
+
*/
|
|
1826
|
+
export type BatchExecutor<T> = (requests: Array<{
|
|
1827
|
+
tool: string;
|
|
1828
|
+
args: unknown;
|
|
1829
|
+
serverId?: string;
|
|
1830
|
+
}>) => Promise<Array<{
|
|
1831
|
+
success: boolean;
|
|
1832
|
+
result?: T;
|
|
1833
|
+
error?: Error;
|
|
1834
|
+
}>>;
|
|
1835
|
+
/**
|
|
1836
|
+
* Batcher events
|
|
1837
|
+
*/
|
|
1838
|
+
export type BatcherEvents<T> = {
|
|
1839
|
+
batchStarted: {
|
|
1840
|
+
batchId: string;
|
|
1841
|
+
size: number;
|
|
1842
|
+
};
|
|
1843
|
+
batchCompleted: {
|
|
1844
|
+
batchId: string;
|
|
1845
|
+
results: BatchResult<T>[];
|
|
1846
|
+
};
|
|
1847
|
+
batchFailed: {
|
|
1848
|
+
batchId: string;
|
|
1849
|
+
error: Error;
|
|
1850
|
+
};
|
|
1851
|
+
requestQueued: {
|
|
1852
|
+
requestId: string;
|
|
1853
|
+
queueSize: number;
|
|
1854
|
+
};
|
|
1855
|
+
flushTriggered: {
|
|
1856
|
+
reason: "size" | "timeout" | "manual";
|
|
1857
|
+
queueSize: number;
|
|
1858
|
+
};
|
|
1859
|
+
};
|
|
1860
|
+
/**
|
|
1861
|
+
* Cache eviction strategy
|
|
1862
|
+
*/
|
|
1863
|
+
export type CacheStrategy = "lru" | "fifo" | "lfu";
|
|
1864
|
+
/**
|
|
1865
|
+
* Cache configuration options
|
|
1866
|
+
*/
|
|
1867
|
+
export type McpCacheConfig = {
|
|
1868
|
+
/**
|
|
1869
|
+
* Time-to-live in milliseconds (default: 5 minutes)
|
|
1870
|
+
*/
|
|
1871
|
+
ttl: number;
|
|
1872
|
+
/**
|
|
1873
|
+
* Maximum number of entries (default: 500)
|
|
1874
|
+
*/
|
|
1875
|
+
maxSize: number;
|
|
1876
|
+
/**
|
|
1877
|
+
* Eviction strategy (default: 'lru')
|
|
1878
|
+
*/
|
|
1879
|
+
strategy: CacheStrategy;
|
|
1880
|
+
/**
|
|
1881
|
+
* Enable automatic cleanup of expired entries
|
|
1882
|
+
*/
|
|
1883
|
+
enableAutoCleanup?: boolean;
|
|
1884
|
+
/**
|
|
1885
|
+
* Cleanup interval in milliseconds (default: 60 seconds)
|
|
1886
|
+
*/
|
|
1887
|
+
cleanupInterval?: number;
|
|
1888
|
+
/**
|
|
1889
|
+
* Namespace for cache keys (optional)
|
|
1890
|
+
*/
|
|
1891
|
+
namespace?: string;
|
|
1892
|
+
};
|
|
1893
|
+
/**
|
|
1894
|
+
* Cache statistics
|
|
1895
|
+
*/
|
|
1896
|
+
export type CacheStats = {
|
|
1897
|
+
hits: number;
|
|
1898
|
+
misses: number;
|
|
1899
|
+
evictions: number;
|
|
1900
|
+
size: number;
|
|
1901
|
+
maxSize: number;
|
|
1902
|
+
hitRate: number;
|
|
1903
|
+
};
|
|
1904
|
+
/**
|
|
1905
|
+
* Cache events
|
|
1906
|
+
*/
|
|
1907
|
+
export type CacheEvents = {
|
|
1908
|
+
hit: {
|
|
1909
|
+
key: string;
|
|
1910
|
+
value: unknown;
|
|
1911
|
+
};
|
|
1912
|
+
miss: {
|
|
1913
|
+
key: string;
|
|
1914
|
+
};
|
|
1915
|
+
set: {
|
|
1916
|
+
key: string;
|
|
1917
|
+
value: unknown;
|
|
1918
|
+
ttl: number;
|
|
1919
|
+
};
|
|
1920
|
+
evict: {
|
|
1921
|
+
key: string;
|
|
1922
|
+
reason: "expired" | "capacity" | "manual";
|
|
1923
|
+
};
|
|
1924
|
+
clear: {
|
|
1925
|
+
entriesRemoved: number;
|
|
1926
|
+
};
|
|
1927
|
+
};
|
|
1928
|
+
/**
|
|
1929
|
+
* Routing strategy types
|
|
1930
|
+
*/
|
|
1931
|
+
export type RoutingStrategy = "round-robin" | "least-loaded" | "capability-based" | "affinity" | "priority" | "random";
|
|
1932
|
+
/**
|
|
1933
|
+
* Server routing weight configuration
|
|
1934
|
+
*/
|
|
1935
|
+
export type McpServerWeight = {
|
|
1936
|
+
serverId: string;
|
|
1937
|
+
weight: number;
|
|
1938
|
+
capabilities?: string[];
|
|
1939
|
+
};
|
|
1940
|
+
/**
|
|
1941
|
+
* Category to server mapping
|
|
1942
|
+
*/
|
|
1943
|
+
export type CategoryMapping = {
|
|
1944
|
+
category: string;
|
|
1945
|
+
serverIds: string[];
|
|
1946
|
+
priority?: number;
|
|
1947
|
+
};
|
|
1948
|
+
/**
|
|
1949
|
+
* Affinity rule for session-based routing
|
|
1950
|
+
*/
|
|
1951
|
+
export type AffinityRule = {
|
|
1952
|
+
key: string;
|
|
1953
|
+
serverId: string;
|
|
1954
|
+
expiresAt?: number;
|
|
1955
|
+
};
|
|
1956
|
+
/**
|
|
1957
|
+
* Tool Router configuration
|
|
1958
|
+
*/
|
|
1959
|
+
export type ToolRouterConfig = {
|
|
1960
|
+
/**
|
|
1961
|
+
* Primary routing strategy
|
|
1962
|
+
*/
|
|
1963
|
+
strategy: RoutingStrategy;
|
|
1964
|
+
/**
|
|
1965
|
+
* Enable session/user affinity for consistent routing
|
|
1966
|
+
*/
|
|
1967
|
+
enableAffinity?: boolean;
|
|
1968
|
+
/**
|
|
1969
|
+
* Category to server mapping for capability-based routing
|
|
1970
|
+
*/
|
|
1971
|
+
categoryMapping?: Record<string, string[]>;
|
|
1972
|
+
/**
|
|
1973
|
+
* Server weights for priority-based routing
|
|
1974
|
+
*/
|
|
1975
|
+
serverWeights?: McpServerWeight[];
|
|
1976
|
+
/**
|
|
1977
|
+
* Fallback strategy if primary fails
|
|
1978
|
+
*/
|
|
1979
|
+
fallbackStrategy?: RoutingStrategy;
|
|
1980
|
+
/**
|
|
1981
|
+
* Maximum retries for failed routes
|
|
1982
|
+
*/
|
|
1983
|
+
maxRetries?: number;
|
|
1984
|
+
/**
|
|
1985
|
+
* Health check interval in milliseconds
|
|
1986
|
+
*/
|
|
1987
|
+
healthCheckInterval?: number;
|
|
1988
|
+
/**
|
|
1989
|
+
* Affinity TTL in milliseconds (default: 30 minutes)
|
|
1990
|
+
*/
|
|
1991
|
+
affinityTtl?: number;
|
|
1992
|
+
};
|
|
1993
|
+
/**
|
|
1994
|
+
* Routing decision result
|
|
1995
|
+
*/
|
|
1996
|
+
export type RoutingDecision = {
|
|
1997
|
+
serverId: string;
|
|
1998
|
+
strategy: RoutingStrategy;
|
|
1999
|
+
confidence: number;
|
|
2000
|
+
alternates?: string[];
|
|
2001
|
+
reason?: string;
|
|
2002
|
+
};
|
|
2003
|
+
/**
|
|
2004
|
+
* Tool Router events
|
|
2005
|
+
*/
|
|
2006
|
+
export type ToolRouterEvents = {
|
|
2007
|
+
routeDecision: {
|
|
2008
|
+
toolName: string;
|
|
2009
|
+
decision: RoutingDecision;
|
|
2010
|
+
};
|
|
2011
|
+
routeFailed: {
|
|
2012
|
+
toolName: string;
|
|
2013
|
+
error: Error;
|
|
2014
|
+
attemptedServers: string[];
|
|
2015
|
+
};
|
|
2016
|
+
affinitySet: {
|
|
2017
|
+
key: string;
|
|
2018
|
+
serverId: string;
|
|
2019
|
+
};
|
|
2020
|
+
affinityExpired: {
|
|
2021
|
+
key: string;
|
|
2022
|
+
};
|
|
2023
|
+
healthUpdate: {
|
|
2024
|
+
serverId: string;
|
|
2025
|
+
healthy: boolean;
|
|
2026
|
+
};
|
|
2027
|
+
};
|
|
2028
|
+
/**
|
|
2029
|
+
* MCP Tool type with annotations
|
|
2030
|
+
*/
|
|
2031
|
+
export type MCPTool = ToolInfo & {
|
|
2032
|
+
annotations?: MCPToolAnnotations;
|
|
2033
|
+
serverId?: string;
|
|
2034
|
+
category?: string;
|
|
2035
|
+
};
|