@juspay/neurolink 11.13.0 → 11.13.2
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 +2 -6
- package/dist/browser/neurolink.min.js +681 -842
- package/dist/cli/commands/agent.js +2 -2
- package/dist/cli/commands/auth.d.ts +1 -1
- package/dist/cli/commands/auth.js +11 -11
- package/dist/cli/commands/authProviders.d.ts +1 -1
- package/dist/cli/commands/authProviders.js +2 -2
- package/dist/cli/commands/autoresearch.js +5 -5
- package/dist/cli/commands/config.d.ts +1 -1
- package/dist/cli/commands/config.js +4 -4
- package/dist/cli/commands/docs.d.ts +1 -1
- package/dist/cli/commands/evaluate.d.ts +1 -1
- package/dist/cli/commands/evaluate.js +4 -4
- package/dist/cli/commands/mcp.js +14 -14
- package/dist/cli/commands/models.js +3 -3
- package/dist/cli/commands/observability.d.ts +1 -1
- package/dist/cli/commands/observability.js +3 -3
- package/dist/cli/commands/ollama.js +1 -1
- package/dist/cli/commands/proxy.d.ts +2 -2
- package/dist/cli/commands/proxy.js +45 -45
- package/dist/cli/commands/proxyAnalyze.d.ts +1 -1
- package/dist/cli/commands/proxyAnalyze.js +2 -2
- package/dist/cli/commands/proxyReplay.d.ts +1 -1
- package/dist/cli/commands/proxyReplay.js +2 -2
- package/dist/cli/commands/rag.js +10 -10
- package/dist/cli/commands/serve.js +7 -7
- package/dist/cli/commands/server.js +6 -6
- package/dist/cli/commands/setup-anthropic.d.ts +1 -1
- package/dist/cli/commands/setup-anthropic.js +3 -3
- package/dist/cli/commands/setup-azure.d.ts +1 -1
- package/dist/cli/commands/setup-azure.js +3 -3
- package/dist/cli/commands/setup-bedrock.d.ts +1 -1
- package/dist/cli/commands/setup-bedrock.js +3 -3
- package/dist/cli/commands/setup-gcp.d.ts +1 -1
- package/dist/cli/commands/setup-gcp.js +1 -1
- package/dist/cli/commands/setup-google-ai.d.ts +1 -1
- package/dist/cli/commands/setup-google-ai.js +4 -4
- package/dist/cli/commands/setup-huggingface.d.ts +1 -1
- package/dist/cli/commands/setup-huggingface.js +1 -1
- package/dist/cli/commands/setup-mistral.d.ts +1 -1
- package/dist/cli/commands/setup-mistral.js +3 -3
- package/dist/cli/commands/setup-openai.d.ts +1 -1
- package/dist/cli/commands/setup-openai.js +3 -3
- package/dist/cli/commands/setup.d.ts +1 -1
- package/dist/cli/commands/setup.js +4 -4
- package/dist/cli/commands/task.js +4 -4
- package/dist/cli/commands/telemetry.d.ts +1 -1
- package/dist/cli/commands/telemetry.js +4 -4
- package/dist/cli/commands/voiceServer.d.ts +1 -1
- package/dist/cli/commands/voiceServer.js +6 -2
- package/dist/cli/commands/workflow.js +5 -5
- package/dist/cli/errorHandler.js +3 -3
- package/dist/cli/factories/commandFactory.js +13 -13
- package/dist/cli/factories/ollamaCommandFactory.js +3 -3
- package/dist/cli/factories/sagemakerCommandFactory.js +5 -5
- package/dist/cli/index.js +1 -1
- package/dist/cli/loop/conversationSelector.d.ts +1 -1
- package/dist/cli/loop/conversationSelector.js +3 -3
- package/dist/cli/loop/optionsSchema.d.ts +1 -1
- package/dist/cli/loop/optionsSchema.js +1 -1
- package/dist/cli/loop/session.d.ts +1 -1
- package/dist/cli/loop/session.js +6 -6
- package/dist/cli/parser.js +10 -2
- package/dist/cli/proxy-clients/claudeCode.d.ts +1 -1
- package/dist/cli/proxy-clients/claudeCode.js +1 -1
- package/dist/cli/proxy-clients/codex.d.ts +1 -1
- package/dist/cli/proxy-clients/codex.js +1 -1
- package/dist/cli/proxy-clients/copilot.d.ts +1 -1
- package/dist/cli/proxy-clients/copilot.js +1 -1
- package/dist/cli/proxy-clients/openCode.d.ts +1 -1
- package/dist/cli/proxy-clients/openCode.js +1 -1
- package/dist/cli/proxy-clients/qwenCode.d.ts +1 -1
- package/dist/cli/proxy-clients/qwenCode.js +1 -1
- package/dist/cli/proxy-clients/registry.d.ts +1 -1
- package/dist/cli/proxy-clients/registry.js +1 -1
- package/dist/cli/utils/audioFileUtils.d.ts +1 -1
- package/dist/cli/utils/audioPlayer.d.ts +1 -1
- package/dist/cli/utils/classifierRouterFlags.d.ts +1 -1
- package/dist/cli/utils/classifierRouterFlags.js +1 -1
- package/dist/cli/utils/completeSetup.d.ts +1 -1
- package/dist/cli/utils/completeSetup.js +1 -1
- package/dist/cli/utils/envManager.d.ts +1 -1
- package/dist/cli/utils/envManager.js +1 -1
- package/dist/cli/utils/inputValidation.js +2 -2
- package/dist/cli/utils/interactiveSetup.d.ts +2 -2
- package/dist/cli/utils/interactiveSetup.js +3 -3
- package/dist/cli/utils/ollamaUtils.d.ts +1 -1
- package/dist/cli/utils/ollamaUtils.js +1 -1
- package/dist/cli/utils/skillsFlags.d.ts +1 -1
- package/dist/cli/utils/toolRoutingFlags.d.ts +1 -1
- package/dist/cli/utils/toolRoutingFlags.js +1 -1
- package/dist/cli/utils/videoFileUtils.d.ts +1 -1
- package/dist/processors/data/XmlProcessor.d.ts +14 -0
- package/dist/processors/data/XmlProcessor.js +14 -0
- package/dist/processors/document/PptxProcessor.d.ts +9 -0
- package/dist/processors/document/PptxProcessor.js +9 -0
- package/dist/processors/media/VideoProcessor.js +30 -2
- package/dist/providers/amazonBedrock/client.js +1 -2
- package/dist/providers/googleVertex/index.d.ts +0 -1
- package/dist/providers/googleVertex/index.js +0 -1
- package/dist/rag/document/loaders.js +49 -21
- package/dist/server/abstract/baseServerAdapter.d.ts +13 -0
- package/dist/server/abstract/baseServerAdapter.js +39 -1
- package/dist/server/adapters/expressAdapter.js +15 -5
- package/dist/server/adapters/fastifyAdapter.js +15 -5
- package/dist/server/adapters/koaAdapter.js +16 -6
- package/dist/types/generate.d.ts +7 -0
- package/dist/types/stream.d.ts +1 -1
- package/docs-site/mcp-server/search.js +20 -12
- package/docs-site/mcp-server/types.d.ts +12 -5
- package/docs-site/static/search-index.json +1 -0
- package/package.json +16 -16
- package/dist/lib/action/actionExecutor.d.ts +0 -29
- package/dist/lib/action/actionExecutor.js +0 -291
- package/dist/lib/action/actionInputs.d.ts +0 -25
- package/dist/lib/action/actionInputs.js +0 -294
- package/dist/lib/action/githubIntegration.d.ts +0 -21
- package/dist/lib/action/githubIntegration.js +0 -188
- package/dist/lib/action/index.d.ts +0 -7
- package/dist/lib/action/index.js +0 -13
- package/dist/lib/adapters/audioFormatSupport.d.ts +0 -53
- package/dist/lib/adapters/audioFormatSupport.js +0 -201
- package/dist/lib/adapters/imageFormatSupport.d.ts +0 -75
- package/dist/lib/adapters/imageFormatSupport.js +0 -284
- package/dist/lib/adapters/providerImageAdapter.d.ts +0 -51
- package/dist/lib/adapters/providerImageAdapter.js +0 -704
- package/dist/lib/adapters/replicate/auth.d.ts +0 -19
- package/dist/lib/adapters/replicate/auth.js +0 -33
- package/dist/lib/adapters/replicate/predictionLifecycle.d.ts +0 -46
- package/dist/lib/adapters/replicate/predictionLifecycle.js +0 -289
- package/dist/lib/adapters/tts/cartesiaHandler.d.ts +0 -12
- package/dist/lib/adapters/tts/cartesiaHandler.js +0 -131
- package/dist/lib/adapters/tts/googleTTSHandler.d.ts +0 -97
- package/dist/lib/adapters/tts/googleTTSHandler.js +0 -353
- package/dist/lib/adapters/video/directorPipeline.d.ts +0 -31
- package/dist/lib/adapters/video/directorPipeline.js +0 -523
- package/dist/lib/adapters/video/ffmpegAdapter.d.ts +0 -84
- package/dist/lib/adapters/video/ffmpegAdapter.js +0 -207
- package/dist/lib/adapters/video/frameExtractor.d.ts +0 -28
- package/dist/lib/adapters/video/frameExtractor.js +0 -144
- package/dist/lib/adapters/video/klingVideoHandler.d.ts +0 -37
- package/dist/lib/adapters/video/klingVideoHandler.js +0 -306
- package/dist/lib/adapters/video/replicateVideoHandler.d.ts +0 -29
- package/dist/lib/adapters/video/replicateVideoHandler.js +0 -168
- package/dist/lib/adapters/video/runwayVideoHandler.d.ts +0 -32
- package/dist/lib/adapters/video/runwayVideoHandler.js +0 -317
- package/dist/lib/adapters/video/vertexVideoHandler.d.ts +0 -119
- package/dist/lib/adapters/video/vertexVideoHandler.js +0 -804
- package/dist/lib/adapters/video/videoAnalyzer.d.ts +0 -26
- package/dist/lib/adapters/video/videoAnalyzer.js +0 -239
- package/dist/lib/adapters/video/videoMerger.d.ts +0 -22
- package/dist/lib/adapters/video/videoMerger.js +0 -172
- package/dist/lib/agent/agent.d.ts +0 -104
- package/dist/lib/agent/agent.js +0 -433
- package/dist/lib/agent/agentNetwork.d.ts +0 -87
- package/dist/lib/agent/agentNetwork.js +0 -501
- package/dist/lib/agent/agentToolRegistrar.d.ts +0 -48
- package/dist/lib/agent/agentToolRegistrar.js +0 -337
- package/dist/lib/agent/communication/index.d.ts +0 -9
- package/dist/lib/agent/communication/index.js +0 -10
- package/dist/lib/agent/communication/message-bus.d.ts +0 -113
- package/dist/lib/agent/communication/message-bus.js +0 -407
- package/dist/lib/agent/coordination/coordinator.d.ts +0 -83
- package/dist/lib/agent/coordination/coordinator.js +0 -599
- package/dist/lib/agent/coordination/index.d.ts +0 -10
- package/dist/lib/agent/coordination/index.js +0 -11
- package/dist/lib/agent/coordination/task-distributor.d.ts +0 -113
- package/dist/lib/agent/coordination/task-distributor.js +0 -586
- package/dist/lib/agent/directTools.d.ts +0 -306
- package/dist/lib/agent/directTools.js +0 -907
- package/dist/lib/agent/index.d.ts +0 -41
- package/dist/lib/agent/index.js +0 -49
- package/dist/lib/agent/isolatedAgentRunner.d.ts +0 -73
- package/dist/lib/agent/isolatedAgentRunner.js +0 -947
- package/dist/lib/agent/orchestration/index.d.ts +0 -10
- package/dist/lib/agent/orchestration/index.js +0 -11
- package/dist/lib/agent/orchestration/orchestrator.d.ts +0 -114
- package/dist/lib/agent/orchestration/orchestrator.js +0 -479
- package/dist/lib/agent/orchestration/topology.d.ts +0 -164
- package/dist/lib/agent/orchestration/topology.js +0 -521
- package/dist/lib/agent/prompts/routingPrompts.d.ts +0 -63
- package/dist/lib/agent/prompts/routingPrompts.js +0 -202
- package/dist/lib/agent/structuredRecovery.d.ts +0 -30
- package/dist/lib/agent/structuredRecovery.js +0 -105
- package/dist/lib/analytics/index.d.ts +0 -7
- package/dist/lib/analytics/index.js +0 -8
- package/dist/lib/analytics/parseQualityScore.d.ts +0 -9
- package/dist/lib/analytics/parseQualityScore.js +0 -30
- package/dist/lib/analytics/pricing.d.ts +0 -27
- package/dist/lib/analytics/pricing.js +0 -42
- package/dist/lib/analytics/service.d.ts +0 -36
- package/dist/lib/analytics/service.js +0 -394
- package/dist/lib/analytics/storage.d.ts +0 -19
- package/dist/lib/analytics/storage.js +0 -33
- package/dist/lib/artifacts/artifactStore.d.ts +0 -55
- package/dist/lib/artifacts/artifactStore.js +0 -145
- package/dist/lib/auth/AuthProviderFactory.d.ts +0 -69
- package/dist/lib/auth/AuthProviderFactory.js +0 -112
- package/dist/lib/auth/AuthProviderRegistry.d.ts +0 -33
- package/dist/lib/auth/AuthProviderRegistry.js +0 -191
- package/dist/lib/auth/RequestContext.d.ts +0 -23
- package/dist/lib/auth/RequestContext.js +0 -79
- package/dist/lib/auth/accountPool.d.ts +0 -68
- package/dist/lib/auth/accountPool.js +0 -179
- package/dist/lib/auth/anthropicOAuth.d.ts +0 -400
- package/dist/lib/auth/anthropicOAuth.js +0 -1143
- package/dist/lib/auth/authContext.d.ts +0 -198
- package/dist/lib/auth/authContext.js +0 -315
- package/dist/lib/auth/codexOAuth.d.ts +0 -67
- package/dist/lib/auth/codexOAuth.js +0 -203
- package/dist/lib/auth/errors.d.ts +0 -63
- package/dist/lib/auth/errors.js +0 -40
- package/dist/lib/auth/index.d.ts +0 -41
- package/dist/lib/auth/index.js +0 -86
- package/dist/lib/auth/middleware/AuthMiddleware.d.ts +0 -127
- package/dist/lib/auth/middleware/AuthMiddleware.js +0 -523
- package/dist/lib/auth/middleware/rateLimitByUser.d.ts +0 -193
- package/dist/lib/auth/middleware/rateLimitByUser.js +0 -559
- package/dist/lib/auth/providers/BaseAuthProvider.d.ts +0 -259
- package/dist/lib/auth/providers/BaseAuthProvider.js +0 -724
- package/dist/lib/auth/providers/CognitoProvider.d.ts +0 -61
- package/dist/lib/auth/providers/CognitoProvider.js +0 -308
- package/dist/lib/auth/providers/KeycloakProvider.d.ts +0 -61
- package/dist/lib/auth/providers/KeycloakProvider.js +0 -396
- package/dist/lib/auth/providers/auth0.d.ts +0 -59
- package/dist/lib/auth/providers/auth0.js +0 -275
- package/dist/lib/auth/providers/betterAuth.d.ts +0 -51
- package/dist/lib/auth/providers/betterAuth.js +0 -183
- package/dist/lib/auth/providers/clerk.d.ts +0 -65
- package/dist/lib/auth/providers/clerk.js +0 -318
- package/dist/lib/auth/providers/custom.d.ts +0 -64
- package/dist/lib/auth/providers/custom.js +0 -113
- package/dist/lib/auth/providers/firebase.d.ts +0 -63
- package/dist/lib/auth/providers/firebase.js +0 -231
- package/dist/lib/auth/providers/jwt.d.ts +0 -68
- package/dist/lib/auth/providers/jwt.js +0 -217
- package/dist/lib/auth/providers/oauth2.d.ts +0 -73
- package/dist/lib/auth/providers/oauth2.js +0 -304
- package/dist/lib/auth/providers/supabase.d.ts +0 -63
- package/dist/lib/auth/providers/supabase.js +0 -260
- package/dist/lib/auth/providers/workos.d.ts +0 -61
- package/dist/lib/auth/providers/workos.js +0 -289
- package/dist/lib/auth/serverBridge.d.ts +0 -14
- package/dist/lib/auth/serverBridge.js +0 -26
- package/dist/lib/auth/sessionManager.d.ts +0 -118
- package/dist/lib/auth/sessionManager.js +0 -511
- package/dist/lib/auth/tokenStore.d.ts +0 -283
- package/dist/lib/auth/tokenStore.js +0 -929
- package/dist/lib/autoresearch/config.d.ts +0 -11
- package/dist/lib/autoresearch/config.js +0 -109
- package/dist/lib/autoresearch/errors.d.ts +0 -40
- package/dist/lib/autoresearch/errors.js +0 -21
- package/dist/lib/autoresearch/index.d.ts +0 -23
- package/dist/lib/autoresearch/index.js +0 -35
- package/dist/lib/autoresearch/phasePolicy.d.ts +0 -9
- package/dist/lib/autoresearch/phasePolicy.js +0 -70
- package/dist/lib/autoresearch/promptCompiler.d.ts +0 -15
- package/dist/lib/autoresearch/promptCompiler.js +0 -121
- package/dist/lib/autoresearch/repoPolicy.d.ts +0 -32
- package/dist/lib/autoresearch/repoPolicy.js +0 -129
- package/dist/lib/autoresearch/resultRecorder.d.ts +0 -20
- package/dist/lib/autoresearch/resultRecorder.js +0 -131
- package/dist/lib/autoresearch/runner.d.ts +0 -10
- package/dist/lib/autoresearch/runner.js +0 -109
- package/dist/lib/autoresearch/stateStore.d.ts +0 -12
- package/dist/lib/autoresearch/stateStore.js +0 -164
- package/dist/lib/autoresearch/summaryParser.d.ts +0 -16
- package/dist/lib/autoresearch/summaryParser.js +0 -95
- package/dist/lib/autoresearch/tools.d.ts +0 -27
- package/dist/lib/autoresearch/tools.js +0 -618
- package/dist/lib/autoresearch/worker.d.ts +0 -71
- package/dist/lib/autoresearch/worker.js +0 -418
- package/dist/lib/avatar/index.d.ts +0 -26
- package/dist/lib/avatar/index.js +0 -86
- package/dist/lib/avatar/providers/DIDAvatar.d.ts +0 -49
- package/dist/lib/avatar/providers/DIDAvatar.js +0 -502
- package/dist/lib/avatar/providers/HeyGenAvatar.d.ts +0 -30
- package/dist/lib/avatar/providers/HeyGenAvatar.js +0 -338
- package/dist/lib/avatar/providers/ReplicateAvatar.d.ts +0 -36
- package/dist/lib/avatar/providers/ReplicateAvatar.js +0 -268
- package/dist/lib/client/aiSdkAdapter.d.ts +0 -196
- package/dist/lib/client/aiSdkAdapter.js +0 -498
- package/dist/lib/client/auth.d.ts +0 -248
- package/dist/lib/client/auth.js +0 -469
- package/dist/lib/client/errors.d.ts +0 -298
- package/dist/lib/client/errors.js +0 -553
- package/dist/lib/client/httpClient.d.ts +0 -296
- package/dist/lib/client/httpClient.js +0 -851
- package/dist/lib/client/index.d.ts +0 -103
- package/dist/lib/client/index.js +0 -174
- package/dist/lib/client/interceptors.d.ts +0 -207
- package/dist/lib/client/interceptors.js +0 -620
- package/dist/lib/client/reactHooks.d.ts +0 -238
- package/dist/lib/client/reactHooks.js +0 -1168
- package/dist/lib/client/sseClient.d.ts +0 -115
- package/dist/lib/client/sseClient.js +0 -575
- package/dist/lib/client/streamingClient.d.ts +0 -255
- package/dist/lib/client/streamingClient.js +0 -963
- package/dist/lib/client/wsClient.d.ts +0 -127
- package/dist/lib/client/wsClient.js +0 -450
- package/dist/lib/config/configManager.d.ts +0 -60
- package/dist/lib/config/configManager.js +0 -304
- package/dist/lib/config/conversationMemory.d.ts +0 -51
- package/dist/lib/config/conversationMemory.js +0 -87
- package/dist/lib/config/modelSpecificPrompts.d.ts +0 -9
- package/dist/lib/config/modelSpecificPrompts.js +0 -39
- package/dist/lib/config/taskClassificationConfig.d.ts +0 -51
- package/dist/lib/config/taskClassificationConfig.js +0 -149
- package/dist/lib/constants/contextWindows.d.ts +0 -89
- package/dist/lib/constants/contextWindows.js +0 -568
- package/dist/lib/constants/enums.d.ts +0 -979
- package/dist/lib/constants/enums.js +0 -1247
- package/dist/lib/constants/index.d.ts +0 -184
- package/dist/lib/constants/index.js +0 -209
- package/dist/lib/constants/networkErrorCodes.d.ts +0 -14
- package/dist/lib/constants/networkErrorCodes.js +0 -22
- package/dist/lib/constants/performance.d.ts +0 -366
- package/dist/lib/constants/performance.js +0 -390
- package/dist/lib/constants/retry.d.ts +0 -224
- package/dist/lib/constants/retry.js +0 -267
- package/dist/lib/constants/timeouts.d.ts +0 -225
- package/dist/lib/constants/timeouts.js +0 -183
- package/dist/lib/constants/tokens.d.ts +0 -294
- package/dist/lib/constants/tokens.js +0 -381
- package/dist/lib/constants/videoErrors.d.ts +0 -49
- package/dist/lib/constants/videoErrors.js +0 -51
- package/dist/lib/context/anthropicLoopGuard.d.ts +0 -47
- package/dist/lib/context/anthropicLoopGuard.js +0 -186
- package/dist/lib/context/budgetChecker.d.ts +0 -33
- package/dist/lib/context/budgetChecker.js +0 -132
- package/dist/lib/context/contextCompactor.d.ts +0 -19
- package/dist/lib/context/contextCompactor.js +0 -258
- package/dist/lib/context/effectiveHistory.d.ts +0 -52
- package/dist/lib/context/effectiveHistory.js +0 -106
- package/dist/lib/context/emergencyTruncation.d.ts +0 -21
- package/dist/lib/context/emergencyTruncation.js +0 -89
- package/dist/lib/context/errorDetection.d.ts +0 -36
- package/dist/lib/context/errorDetection.js +0 -190
- package/dist/lib/context/errors.d.ts +0 -19
- package/dist/lib/context/errors.js +0 -22
- package/dist/lib/context/fileSummarizationService.d.ts +0 -45
- package/dist/lib/context/fileSummarizationService.js +0 -256
- package/dist/lib/context/fileSummarizer.d.ts +0 -55
- package/dist/lib/context/fileSummarizer.js +0 -146
- package/dist/lib/context/fileTokenBudget.d.ts +0 -52
- package/dist/lib/context/fileTokenBudget.js +0 -128
- package/dist/lib/context/geminiLoopGuard.d.ts +0 -54
- package/dist/lib/context/geminiLoopGuard.js +0 -141
- package/dist/lib/context/loopGuardCore.d.ts +0 -43
- package/dist/lib/context/loopGuardCore.js +0 -146
- package/dist/lib/context/openaiCompatLoopGuard.d.ts +0 -42
- package/dist/lib/context/openaiCompatLoopGuard.js +0 -173
- package/dist/lib/context/prompts/summarizationPrompt.d.ts +0 -16
- package/dist/lib/context/prompts/summarizationPrompt.js +0 -118
- package/dist/lib/context/stages/fileReadDeduplicator.d.ts +0 -8
- package/dist/lib/context/stages/fileReadDeduplicator.js +0 -67
- package/dist/lib/context/stages/slidingWindowTruncator.d.ts +0 -15
- package/dist/lib/context/stages/slidingWindowTruncator.js +0 -237
- package/dist/lib/context/stages/structuredSummarizer.d.ts +0 -8
- package/dist/lib/context/stages/structuredSummarizer.js +0 -123
- package/dist/lib/context/stages/toolOutputPruner.d.ts +0 -8
- package/dist/lib/context/stages/toolOutputPruner.js +0 -53
- package/dist/lib/context/stepBudgetGuard.d.ts +0 -61
- package/dist/lib/context/stepBudgetGuard.js +0 -358
- package/dist/lib/context/summarizationEngine.d.ts +0 -45
- package/dist/lib/context/summarizationEngine.js +0 -162
- package/dist/lib/context/toolOutputLimits.d.ts +0 -36
- package/dist/lib/context/toolOutputLimits.js +0 -95
- package/dist/lib/context/toolPairRepair.d.ts +0 -43
- package/dist/lib/context/toolPairRepair.js +0 -242
- package/dist/lib/core/analytics.d.ts +0 -11
- package/dist/lib/core/analytics.js +0 -117
- package/dist/lib/core/baseProvider.d.ts +0 -500
- package/dist/lib/core/baseProvider.js +0 -2081
- package/dist/lib/core/constants.d.ts +0 -146
- package/dist/lib/core/constants.js +0 -278
- package/dist/lib/core/conversationMemoryFactory.d.ts +0 -19
- package/dist/lib/core/conversationMemoryFactory.js +0 -147
- package/dist/lib/core/conversationMemoryInitializer.d.ts +0 -14
- package/dist/lib/core/conversationMemoryInitializer.js +0 -129
- package/dist/lib/core/conversationMemoryManager.d.ts +0 -110
- package/dist/lib/core/conversationMemoryManager.js +0 -471
- package/dist/lib/core/dynamicModels.d.ts +0 -89
- package/dist/lib/core/dynamicModels.js +0 -337
- package/dist/lib/core/evaluation.d.ts +0 -18
- package/dist/lib/core/evaluation.js +0 -310
- package/dist/lib/core/evaluationProviders.d.ts +0 -60
- package/dist/lib/core/evaluationProviders.js +0 -249
- package/dist/lib/core/factory.d.ts +0 -54
- package/dist/lib/core/factory.js +0 -364
- package/dist/lib/core/geminiLoopAdapter.d.ts +0 -20
- package/dist/lib/core/geminiLoopAdapter.js +0 -171
- package/dist/lib/core/handlerRegistry.d.ts +0 -29
- package/dist/lib/core/handlerRegistry.js +0 -62
- package/dist/lib/core/infrastructure/baseError.d.ts +0 -21
- package/dist/lib/core/infrastructure/baseError.js +0 -23
- package/dist/lib/core/infrastructure/baseFactory.d.ts +0 -16
- package/dist/lib/core/infrastructure/baseFactory.js +0 -55
- package/dist/lib/core/infrastructure/baseRegistry.d.ts +0 -19
- package/dist/lib/core/infrastructure/baseRegistry.js +0 -54
- package/dist/lib/core/infrastructure/index.d.ts +0 -5
- package/dist/lib/core/infrastructure/index.js +0 -6
- package/dist/lib/core/infrastructure/retry.d.ts +0 -2
- package/dist/lib/core/infrastructure/retry.js +0 -21
- package/dist/lib/core/infrastructure/typedEventEmitter.d.ts +0 -8
- package/dist/lib/core/infrastructure/typedEventEmitter.js +0 -24
- package/dist/lib/core/loopEngine.d.ts +0 -21
- package/dist/lib/core/loopEngine.js +0 -272
- package/dist/lib/core/modelConfiguration.d.ts +0 -179
- package/dist/lib/core/modelConfiguration.js +0 -549
- package/dist/lib/core/modules/GenerationHandler.d.ts +0 -135
- package/dist/lib/core/modules/GenerationHandler.js +0 -1028
- package/dist/lib/core/modules/MessageBuilder.d.ts +0 -24
- package/dist/lib/core/modules/MessageBuilder.js +0 -311
- package/dist/lib/core/modules/StreamHandler.d.ts +0 -70
- package/dist/lib/core/modules/StreamHandler.js +0 -229
- package/dist/lib/core/modules/TelemetryHandler.d.ts +0 -70
- package/dist/lib/core/modules/TelemetryHandler.js +0 -229
- package/dist/lib/core/modules/ToolsManager.d.ts +0 -105
- package/dist/lib/core/modules/ToolsManager.js +0 -737
- package/dist/lib/core/modules/Utilities.d.ts +0 -90
- package/dist/lib/core/modules/Utilities.js +0 -347
- package/dist/lib/core/modules/structuredOutputPolicy.d.ts +0 -91
- package/dist/lib/core/modules/structuredOutputPolicy.js +0 -136
- package/dist/lib/core/nativeToolFormat.d.ts +0 -33
- package/dist/lib/core/nativeToolFormat.js +0 -31
- package/dist/lib/core/redisConversationMemoryManager.d.ts +0 -235
- package/dist/lib/core/redisConversationMemoryManager.js +0 -1724
- package/dist/lib/core/serviceRegistry.d.ts +0 -40
- package/dist/lib/core/serviceRegistry.js +0 -113
- package/dist/lib/core/streamAnalytics.d.ts +0 -27
- package/dist/lib/core/streamAnalytics.js +0 -132
- package/dist/lib/core/streamChannel.d.ts +0 -10
- package/dist/lib/core/streamChannel.js +0 -77
- package/dist/lib/core/toolDedup.d.ts +0 -51
- package/dist/lib/core/toolDedup.js +0 -197
- package/dist/lib/core/toolEvents.d.ts +0 -2
- package/dist/lib/core/toolEvents.js +0 -8
- package/dist/lib/core/toolExecutionRecorder.d.ts +0 -76
- package/dist/lib/core/toolExecutionRecorder.js +0 -261
- package/dist/lib/core/toolRouting.d.ts +0 -68
- package/dist/lib/core/toolRouting.js +0 -496
- package/dist/lib/core/toolRoutingCache.d.ts +0 -64
- package/dist/lib/core/toolRoutingCache.js +0 -155
- package/dist/lib/core/toolRoutingEmbedding.d.ts +0 -112
- package/dist/lib/core/toolRoutingEmbedding.js +0 -323
- package/dist/lib/dynamic/dynamicResolver.d.ts +0 -282
- package/dist/lib/dynamic/dynamicResolver.js +0 -634
- package/dist/lib/dynamic/index.d.ts +0 -10
- package/dist/lib/dynamic/index.js +0 -13
- package/dist/lib/dynamic/resolution.d.ts +0 -17
- package/dist/lib/dynamic/resolution.js +0 -22
- package/dist/lib/evaluation/BatchEvaluator.d.ts +0 -65
- package/dist/lib/evaluation/BatchEvaluator.js +0 -271
- package/dist/lib/evaluation/EvaluationAggregator.d.ts +0 -156
- package/dist/lib/evaluation/EvaluationAggregator.js +0 -378
- package/dist/lib/evaluation/EvaluatorFactory.d.ts +0 -102
- package/dist/lib/evaluation/EvaluatorFactory.js +0 -281
- package/dist/lib/evaluation/EvaluatorRegistry.d.ts +0 -111
- package/dist/lib/evaluation/EvaluatorRegistry.js +0 -185
- package/dist/lib/evaluation/contextBuilder.d.ts +0 -44
- package/dist/lib/evaluation/contextBuilder.js +0 -132
- package/dist/lib/evaluation/errors/EvaluationError.d.ts +0 -161
- package/dist/lib/evaluation/errors/EvaluationError.js +0 -207
- package/dist/lib/evaluation/errors/index.d.ts +0 -4
- package/dist/lib/evaluation/errors/index.js +0 -5
- package/dist/lib/evaluation/hooks/index.d.ts +0 -6
- package/dist/lib/evaluation/hooks/index.js +0 -7
- package/dist/lib/evaluation/hooks/langfuseAdapter.d.ts +0 -62
- package/dist/lib/evaluation/hooks/langfuseAdapter.js +0 -173
- package/dist/lib/evaluation/hooks/observabilityHooks.d.ts +0 -77
- package/dist/lib/evaluation/hooks/observabilityHooks.js +0 -187
- package/dist/lib/evaluation/index.d.ts +0 -41
- package/dist/lib/evaluation/index.js +0 -78
- package/dist/lib/evaluation/pipeline/evaluationPipeline.d.ts +0 -83
- package/dist/lib/evaluation/pipeline/evaluationPipeline.js +0 -397
- package/dist/lib/evaluation/pipeline/index.d.ts +0 -8
- package/dist/lib/evaluation/pipeline/index.js +0 -9
- package/dist/lib/evaluation/pipeline/pipelineBuilder.d.ts +0 -126
- package/dist/lib/evaluation/pipeline/pipelineBuilder.js +0 -261
- package/dist/lib/evaluation/pipeline/presets.d.ts +0 -66
- package/dist/lib/evaluation/pipeline/presets.js +0 -225
- package/dist/lib/evaluation/pipeline/strategies/batchStrategy.d.ts +0 -46
- package/dist/lib/evaluation/pipeline/strategies/batchStrategy.js +0 -242
- package/dist/lib/evaluation/pipeline/strategies/index.d.ts +0 -6
- package/dist/lib/evaluation/pipeline/strategies/index.js +0 -7
- package/dist/lib/evaluation/pipeline/strategies/samplingStrategy.d.ts +0 -76
- package/dist/lib/evaluation/pipeline/strategies/samplingStrategy.js +0 -247
- package/dist/lib/evaluation/prompts.d.ts +0 -22
- package/dist/lib/evaluation/prompts.js +0 -74
- package/dist/lib/evaluation/ragasEvaluator.d.ts +0 -28
- package/dist/lib/evaluation/ragasEvaluator.js +0 -127
- package/dist/lib/evaluation/reporting/index.d.ts +0 -6
- package/dist/lib/evaluation/reporting/index.js +0 -7
- package/dist/lib/evaluation/reporting/metricsCollector.d.ts +0 -88
- package/dist/lib/evaluation/reporting/metricsCollector.js +0 -286
- package/dist/lib/evaluation/reporting/reportGenerator.d.ts +0 -57
- package/dist/lib/evaluation/reporting/reportGenerator.js +0 -375
- package/dist/lib/evaluation/retryManager.d.ts +0 -39
- package/dist/lib/evaluation/retryManager.js +0 -79
- package/dist/lib/evaluation/scorers/baseScorer.d.ts +0 -82
- package/dist/lib/evaluation/scorers/baseScorer.js +0 -233
- package/dist/lib/evaluation/scorers/customScorerUtils.d.ts +0 -86
- package/dist/lib/evaluation/scorers/customScorerUtils.js +0 -382
- package/dist/lib/evaluation/scorers/index.d.ts +0 -10
- package/dist/lib/evaluation/scorers/index.js +0 -17
- package/dist/lib/evaluation/scorers/llm/answerRelevancyScorer.d.ts +0 -12
- package/dist/lib/evaluation/scorers/llm/answerRelevancyScorer.js +0 -100
- package/dist/lib/evaluation/scorers/llm/baseLLMScorer.d.ts +0 -69
- package/dist/lib/evaluation/scorers/llm/baseLLMScorer.js +0 -282
- package/dist/lib/evaluation/scorers/llm/biasDetectionScorer.d.ts +0 -12
- package/dist/lib/evaluation/scorers/llm/biasDetectionScorer.js +0 -128
- package/dist/lib/evaluation/scorers/llm/contextPrecisionScorer.d.ts +0 -12
- package/dist/lib/evaluation/scorers/llm/contextPrecisionScorer.js +0 -93
- package/dist/lib/evaluation/scorers/llm/contextRelevancyScorer.d.ts +0 -12
- package/dist/lib/evaluation/scorers/llm/contextRelevancyScorer.js +0 -108
- package/dist/lib/evaluation/scorers/llm/faithfulnessScorer.d.ts +0 -12
- package/dist/lib/evaluation/scorers/llm/faithfulnessScorer.js +0 -122
- package/dist/lib/evaluation/scorers/llm/hallucinationScorer.d.ts +0 -12
- package/dist/lib/evaluation/scorers/llm/hallucinationScorer.js +0 -141
- package/dist/lib/evaluation/scorers/llm/index.d.ts +0 -15
- package/dist/lib/evaluation/scorers/llm/index.js +0 -17
- package/dist/lib/evaluation/scorers/llm/promptAlignmentScorer.d.ts +0 -12
- package/dist/lib/evaluation/scorers/llm/promptAlignmentScorer.js +0 -107
- package/dist/lib/evaluation/scorers/llm/summarizationScorer.d.ts +0 -12
- package/dist/lib/evaluation/scorers/llm/summarizationScorer.js +0 -115
- package/dist/lib/evaluation/scorers/llm/toneConsistencyScorer.d.ts +0 -12
- package/dist/lib/evaluation/scorers/llm/toneConsistencyScorer.js +0 -107
- package/dist/lib/evaluation/scorers/llm/toxicityScorer.d.ts +0 -12
- package/dist/lib/evaluation/scorers/llm/toxicityScorer.js +0 -122
- package/dist/lib/evaluation/scorers/rule/baseRuleScorer.d.ts +0 -77
- package/dist/lib/evaluation/scorers/rule/baseRuleScorer.js +0 -234
- package/dist/lib/evaluation/scorers/rule/contentSimilarityScorer.d.ts +0 -81
- package/dist/lib/evaluation/scorers/rule/contentSimilarityScorer.js +0 -353
- package/dist/lib/evaluation/scorers/rule/formatScorer.d.ts +0 -107
- package/dist/lib/evaluation/scorers/rule/formatScorer.js +0 -471
- package/dist/lib/evaluation/scorers/rule/index.d.ts +0 -9
- package/dist/lib/evaluation/scorers/rule/index.js +0 -11
- package/dist/lib/evaluation/scorers/rule/keywordCoverageScorer.d.ts +0 -66
- package/dist/lib/evaluation/scorers/rule/keywordCoverageScorer.js +0 -348
- package/dist/lib/evaluation/scorers/rule/lengthScorer.d.ts +0 -74
- package/dist/lib/evaluation/scorers/rule/lengthScorer.js +0 -352
- package/dist/lib/evaluation/scorers/scorerBuilder.d.ts +0 -160
- package/dist/lib/evaluation/scorers/scorerBuilder.js +0 -421
- package/dist/lib/evaluation/scorers/scorerRegistry.d.ts +0 -65
- package/dist/lib/evaluation/scorers/scorerRegistry.js +0 -540
- package/dist/lib/evaluation/scoring.d.ts +0 -15
- package/dist/lib/evaluation/scoring.js +0 -61
- package/dist/lib/factories/providerDescriptors.d.ts +0 -18
- package/dist/lib/factories/providerDescriptors.js +0 -547
- package/dist/lib/factories/providerFactory.d.ts +0 -87
- package/dist/lib/factories/providerFactory.js +0 -199
- package/dist/lib/factories/providerRegistry.d.ts +0 -58
- package/dist/lib/factories/providerRegistry.js +0 -549
- package/dist/lib/features/ppt/constants.d.ts +0 -121
- package/dist/lib/features/ppt/constants.js +0 -897
- package/dist/lib/features/ppt/contentPlanner.d.ts +0 -47
- package/dist/lib/features/ppt/contentPlanner.js +0 -558
- package/dist/lib/features/ppt/index.d.ts +0 -11
- package/dist/lib/features/ppt/index.js +0 -33
- package/dist/lib/features/ppt/pptError.d.ts +0 -38
- package/dist/lib/features/ppt/pptError.js +0 -54
- package/dist/lib/features/ppt/presentationOrchestrator.d.ts +0 -37
- package/dist/lib/features/ppt/presentationOrchestrator.js +0 -231
- package/dist/lib/features/ppt/slideGenerator.d.ts +0 -56
- package/dist/lib/features/ppt/slideGenerator.js +0 -542
- package/dist/lib/features/ppt/slideRenderers.d.ts +0 -347
- package/dist/lib/features/ppt/slideRenderers.js +0 -2384
- package/dist/lib/features/ppt/slideTypeInference.d.ts +0 -91
- package/dist/lib/features/ppt/slideTypeInference.js +0 -406
- package/dist/lib/features/ppt/utils.d.ts +0 -103
- package/dist/lib/features/ppt/utils.js +0 -446
- package/dist/lib/files/fileReferenceRegistry.d.ts +0 -275
- package/dist/lib/files/fileReferenceRegistry.js +0 -1559
- package/dist/lib/files/fileTools.d.ts +0 -176
- package/dist/lib/files/fileTools.js +0 -435
- package/dist/lib/files/index.d.ts +0 -13
- package/dist/lib/files/index.js +0 -14
- package/dist/lib/files/streamingReader.d.ts +0 -93
- package/dist/lib/files/streamingReader.js +0 -322
- package/dist/lib/hitl/hitlErrors.d.ts +0 -38
- package/dist/lib/hitl/hitlErrors.js +0 -55
- package/dist/lib/hitl/hitlManager.d.ts +0 -100
- package/dist/lib/hitl/hitlManager.js +0 -461
- package/dist/lib/hitl/index.d.ts +0 -7
- package/dist/lib/hitl/index.js +0 -10
- package/dist/lib/image-gen/ImageGenService.d.ts +0 -146
- package/dist/lib/image-gen/ImageGenService.js +0 -349
- package/dist/lib/image-gen/imageGenTools.d.ts +0 -109
- package/dist/lib/image-gen/imageGenTools.js +0 -305
- package/dist/lib/image-gen/index.d.ts +0 -45
- package/dist/lib/image-gen/index.js +0 -49
- package/dist/lib/index.d.ts +0 -447
- package/dist/lib/index.js +0 -748
- package/dist/lib/knowledge/context.d.ts +0 -18
- package/dist/lib/knowledge/context.js +0 -92
- package/dist/lib/knowledge/defaults.d.ts +0 -24
- package/dist/lib/knowledge/defaults.js +0 -30
- package/dist/lib/knowledge/engine.d.ts +0 -35
- package/dist/lib/knowledge/engine.js +0 -180
- package/dist/lib/knowledge/index.d.ts +0 -15
- package/dist/lib/knowledge/index.js +0 -16
- package/dist/lib/knowledge/indexCache.d.ts +0 -19
- package/dist/lib/knowledge/indexCache.js +0 -110
- package/dist/lib/knowledge/knowledgeIndex.d.ts +0 -41
- package/dist/lib/knowledge/knowledgeIndex.js +0 -205
- package/dist/lib/knowledge/normalize.d.ts +0 -32
- package/dist/lib/knowledge/normalize.js +0 -75
- package/dist/lib/knowledge/resolve.d.ts +0 -18
- package/dist/lib/knowledge/resolve.js +0 -157
- package/dist/lib/knowledge/retrieval.d.ts +0 -16
- package/dist/lib/knowledge/retrieval.js +0 -222
- package/dist/lib/mcp/agentExposure.d.ts +0 -83
- package/dist/lib/mcp/agentExposure.js +0 -357
- package/dist/lib/mcp/auth/index.d.ts +0 -6
- package/dist/lib/mcp/auth/index.js +0 -12
- package/dist/lib/mcp/auth/oauthClientProvider.d.ts +0 -93
- package/dist/lib/mcp/auth/oauthClientProvider.js +0 -331
- package/dist/lib/mcp/auth/tokenStorage.d.ts +0 -56
- package/dist/lib/mcp/auth/tokenStorage.js +0 -135
- package/dist/lib/mcp/batching/index.d.ts +0 -1
- package/dist/lib/mcp/batching/index.js +0 -2
- package/dist/lib/mcp/batching/requestBatcher.d.ts +0 -130
- package/dist/lib/mcp/batching/requestBatcher.js +0 -468
- package/dist/lib/mcp/caching/index.d.ts +0 -1
- package/dist/lib/mcp/caching/index.js +0 -2
- package/dist/lib/mcp/caching/toolCache.d.ts +0 -154
- package/dist/lib/mcp/caching/toolCache.js +0 -434
- package/dist/lib/mcp/elicitation/elicitationManager.d.ts +0 -169
- package/dist/lib/mcp/elicitation/elicitationManager.js +0 -377
- package/dist/lib/mcp/elicitation/index.d.ts +0 -1
- package/dist/lib/mcp/elicitation/index.js +0 -3
- package/dist/lib/mcp/elicitationProtocol.d.ts +0 -139
- package/dist/lib/mcp/elicitationProtocol.js +0 -376
- package/dist/lib/mcp/enhancedToolDiscovery.d.ts +0 -125
- package/dist/lib/mcp/enhancedToolDiscovery.js +0 -482
- package/dist/lib/mcp/externalServerManager.d.ts +0 -189
- package/dist/lib/mcp/externalServerManager.js +0 -1525
- package/dist/lib/mcp/factory.d.ts +0 -60
- package/dist/lib/mcp/factory.js +0 -162
- package/dist/lib/mcp/flexibleToolValidator.d.ts +0 -46
- package/dist/lib/mcp/flexibleToolValidator.js +0 -162
- package/dist/lib/mcp/httpRateLimiter.d.ts +0 -152
- package/dist/lib/mcp/httpRateLimiter.js +0 -386
- package/dist/lib/mcp/httpRetryHandler.d.ts +0 -62
- package/dist/lib/mcp/httpRetryHandler.js +0 -180
- package/dist/lib/mcp/index.d.ts +0 -60
- package/dist/lib/mcp/index.js +0 -82
- package/dist/lib/mcp/mcpCircuitBreaker.d.ts +0 -123
- package/dist/lib/mcp/mcpCircuitBreaker.js +0 -428
- package/dist/lib/mcp/mcpClientFactory.d.ts +0 -109
- package/dist/lib/mcp/mcpClientFactory.js +0 -714
- package/dist/lib/mcp/mcpOutputNormalizer.d.ts +0 -47
- package/dist/lib/mcp/mcpOutputNormalizer.js +0 -183
- package/dist/lib/mcp/mcpRegistryClient.d.ts +0 -129
- package/dist/lib/mcp/mcpRegistryClient.js +0 -489
- package/dist/lib/mcp/mcpServerBase.d.ts +0 -162
- package/dist/lib/mcp/mcpServerBase.js +0 -377
- package/dist/lib/mcp/multiServerManager.d.ts +0 -182
- package/dist/lib/mcp/multiServerManager.js +0 -580
- package/dist/lib/mcp/registry.d.ts +0 -94
- package/dist/lib/mcp/registry.js +0 -159
- package/dist/lib/mcp/routing/index.d.ts +0 -1
- package/dist/lib/mcp/routing/index.js +0 -2
- package/dist/lib/mcp/routing/toolRouter.d.ts +0 -110
- package/dist/lib/mcp/routing/toolRouter.js +0 -417
- package/dist/lib/mcp/serverCapabilities.d.ts +0 -175
- package/dist/lib/mcp/serverCapabilities.js +0 -503
- package/dist/lib/mcp/servers/agent/directToolsServer.d.ts +0 -8
- package/dist/lib/mcp/servers/agent/directToolsServer.js +0 -152
- package/dist/lib/mcp/servers/aiProviders/aiAnalysisTools.d.ts +0 -6
- package/dist/lib/mcp/servers/aiProviders/aiAnalysisTools.js +0 -364
- package/dist/lib/mcp/servers/aiProviders/aiCoreServer.d.ts +0 -10
- package/dist/lib/mcp/servers/aiProviders/aiCoreServer.js +0 -232
- package/dist/lib/mcp/servers/aiProviders/aiWorkflowTools.d.ts +0 -5
- package/dist/lib/mcp/servers/aiProviders/aiWorkflowTools.js +0 -584
- package/dist/lib/mcp/servers/utilities/utilityServer.d.ts +0 -8
- package/dist/lib/mcp/servers/utilities/utilityServer.js +0 -327
- package/dist/lib/mcp/toolAnnotations.d.ts +0 -57
- package/dist/lib/mcp/toolAnnotations.js +0 -240
- package/dist/lib/mcp/toolConverter.d.ts +0 -87
- package/dist/lib/mcp/toolConverter.js +0 -259
- package/dist/lib/mcp/toolDiscoveryService.d.ts +0 -144
- package/dist/lib/mcp/toolDiscoveryService.js +0 -978
- package/dist/lib/mcp/toolIntegration.d.ts +0 -92
- package/dist/lib/mcp/toolIntegration.js +0 -335
- package/dist/lib/mcp/toolRegistry.d.ts +0 -151
- package/dist/lib/mcp/toolRegistry.js +0 -755
- package/dist/lib/memory/hippocampusInitializer.d.ts +0 -2
- package/dist/lib/memory/hippocampusInitializer.js +0 -50
- package/dist/lib/memory/memoryRetrievalTools.d.ts +0 -13
- package/dist/lib/memory/memoryRetrievalTools.js +0 -267
- package/dist/lib/middleware/builtin/analytics.d.ts +0 -16
- package/dist/lib/middleware/builtin/analytics.js +0 -133
- package/dist/lib/middleware/builtin/autoEvaluation.d.ts +0 -11
- package/dist/lib/middleware/builtin/autoEvaluation.js +0 -201
- package/dist/lib/middleware/builtin/guardrails.d.ts +0 -7
- package/dist/lib/middleware/builtin/guardrails.js +0 -110
- package/dist/lib/middleware/builtin/lifecycle.d.ts +0 -2
- package/dist/lib/middleware/builtin/lifecycle.js +0 -161
- package/dist/lib/middleware/factory.d.ts +0 -69
- package/dist/lib/middleware/factory.js +0 -328
- package/dist/lib/middleware/index.d.ts +0 -11
- package/dist/lib/middleware/index.js +0 -17
- package/dist/lib/middleware/registry.d.ts +0 -76
- package/dist/lib/middleware/registry.js +0 -296
- package/dist/lib/middleware/utils/guardrailsUtils.d.ts +0 -50
- package/dist/lib/middleware/utils/guardrailsUtils.js +0 -397
- package/dist/lib/models/anthropicModels.d.ts +0 -261
- package/dist/lib/models/anthropicModels.js +0 -556
- package/dist/lib/models/manifestRegistry.d.ts +0 -33
- package/dist/lib/models/manifestRegistry.js +0 -174
- package/dist/lib/models/manifests/anthropic.d.ts +0 -9
- package/dist/lib/models/manifests/anthropic.js +0 -346
- package/dist/lib/models/manifests/azure.d.ts +0 -2
- package/dist/lib/models/manifests/azure.js +0 -87
- package/dist/lib/models/manifests/bedrock.d.ts +0 -2
- package/dist/lib/models/manifests/bedrock.js +0 -75
- package/dist/lib/models/manifests/cloudflare.d.ts +0 -8
- package/dist/lib/models/manifests/cloudflare.js +0 -19
- package/dist/lib/models/manifests/cohere.d.ts +0 -8
- package/dist/lib/models/manifests/cohere.js +0 -19
- package/dist/lib/models/manifests/deepseek.d.ts +0 -8
- package/dist/lib/models/manifests/deepseek.js +0 -19
- package/dist/lib/models/manifests/fireworks.d.ts +0 -8
- package/dist/lib/models/manifests/fireworks.js +0 -19
- package/dist/lib/models/manifests/google-ai.d.ts +0 -2
- package/dist/lib/models/manifests/google-ai.js +0 -28
- package/dist/lib/models/manifests/groq.d.ts +0 -8
- package/dist/lib/models/manifests/groq.js +0 -19
- package/dist/lib/models/manifests/huggingface.d.ts +0 -8
- package/dist/lib/models/manifests/huggingface.js +0 -19
- package/dist/lib/models/manifests/ideogram.d.ts +0 -8
- package/dist/lib/models/manifests/ideogram.js +0 -19
- package/dist/lib/models/manifests/jina.d.ts +0 -8
- package/dist/lib/models/manifests/jina.js +0 -19
- package/dist/lib/models/manifests/litellm.d.ts +0 -8
- package/dist/lib/models/manifests/litellm.js +0 -19
- package/dist/lib/models/manifests/llamacpp.d.ts +0 -8
- package/dist/lib/models/manifests/llamacpp.js +0 -19
- package/dist/lib/models/manifests/lm-studio.d.ts +0 -8
- package/dist/lib/models/manifests/lm-studio.js +0 -19
- package/dist/lib/models/manifests/mistral.d.ts +0 -2
- package/dist/lib/models/manifests/mistral.js +0 -50
- package/dist/lib/models/manifests/nvidia-nim.d.ts +0 -8
- package/dist/lib/models/manifests/nvidia-nim.js +0 -19
- package/dist/lib/models/manifests/ollama.d.ts +0 -2
- package/dist/lib/models/manifests/ollama.js +0 -72
- package/dist/lib/models/manifests/openai-compatible.d.ts +0 -8
- package/dist/lib/models/manifests/openai-compatible.js +0 -19
- package/dist/lib/models/manifests/openai.d.ts +0 -11
- package/dist/lib/models/manifests/openai.js +0 -560
- package/dist/lib/models/manifests/openrouter.d.ts +0 -8
- package/dist/lib/models/manifests/openrouter.js +0 -19
- package/dist/lib/models/manifests/perplexity.d.ts +0 -8
- package/dist/lib/models/manifests/perplexity.js +0 -19
- package/dist/lib/models/manifests/recraft.d.ts +0 -8
- package/dist/lib/models/manifests/recraft.js +0 -19
- package/dist/lib/models/manifests/replicate.d.ts +0 -8
- package/dist/lib/models/manifests/replicate.js +0 -19
- package/dist/lib/models/manifests/sagemaker.d.ts +0 -8
- package/dist/lib/models/manifests/sagemaker.js +0 -19
- package/dist/lib/models/manifests/stability.d.ts +0 -8
- package/dist/lib/models/manifests/stability.js +0 -19
- package/dist/lib/models/manifests/together-ai.d.ts +0 -8
- package/dist/lib/models/manifests/together-ai.js +0 -19
- package/dist/lib/models/manifests/vertex.d.ts +0 -8
- package/dist/lib/models/manifests/vertex.js +0 -19
- package/dist/lib/models/manifests/voyage.d.ts +0 -8
- package/dist/lib/models/manifests/voyage.js +0 -19
- package/dist/lib/models/manifests/xai.d.ts +0 -8
- package/dist/lib/models/manifests/xai.js +0 -19
- package/dist/lib/models/modelRegistry.d.ts +0 -74
- package/dist/lib/models/modelRegistry.js +0 -2695
- package/dist/lib/models/modelResolver.d.ts +0 -74
- package/dist/lib/models/modelResolver.js +0 -470
- package/dist/lib/music/index.d.ts +0 -27
- package/dist/lib/music/index.js +0 -94
- package/dist/lib/music/providers/BeatovenMusic.d.ts +0 -31
- package/dist/lib/music/providers/BeatovenMusic.js +0 -334
- package/dist/lib/music/providers/ElevenLabsMusic.d.ts +0 -30
- package/dist/lib/music/providers/ElevenLabsMusic.js +0 -169
- package/dist/lib/music/providers/LyriaMusic.d.ts +0 -29
- package/dist/lib/music/providers/LyriaMusic.js +0 -173
- package/dist/lib/music/providers/ReplicateMusic.d.ts +0 -31
- package/dist/lib/music/providers/ReplicateMusic.js +0 -262
- package/dist/lib/neurolink.d.ts +0 -2662
- package/dist/lib/neurolink.js +0 -12946
- package/dist/lib/observability/exporterRegistry.d.ts +0 -133
- package/dist/lib/observability/exporterRegistry.js +0 -414
- package/dist/lib/observability/exporters/arizeExporter.d.ts +0 -32
- package/dist/lib/observability/exporters/arizeExporter.js +0 -139
- package/dist/lib/observability/exporters/baseExporter.d.ts +0 -117
- package/dist/lib/observability/exporters/baseExporter.js +0 -191
- package/dist/lib/observability/exporters/braintrustExporter.d.ts +0 -30
- package/dist/lib/observability/exporters/braintrustExporter.js +0 -155
- package/dist/lib/observability/exporters/datadogExporter.d.ts +0 -37
- package/dist/lib/observability/exporters/datadogExporter.js +0 -197
- package/dist/lib/observability/exporters/index.d.ts +0 -13
- package/dist/lib/observability/exporters/index.js +0 -14
- package/dist/lib/observability/exporters/laminarExporter.d.ts +0 -48
- package/dist/lib/observability/exporters/laminarExporter.js +0 -304
- package/dist/lib/observability/exporters/langfuseExporter.d.ts +0 -48
- package/dist/lib/observability/exporters/langfuseExporter.js +0 -210
- package/dist/lib/observability/exporters/langsmithExporter.d.ts +0 -26
- package/dist/lib/observability/exporters/langsmithExporter.js +0 -144
- package/dist/lib/observability/exporters/otelExporter.d.ts +0 -39
- package/dist/lib/observability/exporters/otelExporter.js +0 -165
- package/dist/lib/observability/exporters/posthogExporter.d.ts +0 -48
- package/dist/lib/observability/exporters/posthogExporter.js +0 -289
- package/dist/lib/observability/exporters/sentryExporter.d.ts +0 -32
- package/dist/lib/observability/exporters/sentryExporter.js +0 -167
- package/dist/lib/observability/index.d.ts +0 -23
- package/dist/lib/observability/index.js +0 -32
- package/dist/lib/observability/metricsAggregator.d.ts +0 -126
- package/dist/lib/observability/metricsAggregator.js +0 -553
- package/dist/lib/observability/otelBridge.d.ts +0 -49
- package/dist/lib/observability/otelBridge.js +0 -141
- package/dist/lib/observability/retryPolicy.d.ts +0 -154
- package/dist/lib/observability/retryPolicy.js +0 -384
- package/dist/lib/observability/sampling/index.d.ts +0 -4
- package/dist/lib/observability/sampling/index.js +0 -5
- package/dist/lib/observability/sampling/samplers.d.ts +0 -104
- package/dist/lib/observability/sampling/samplers.js +0 -217
- package/dist/lib/observability/spanProcessor.d.ts +0 -115
- package/dist/lib/observability/spanProcessor.js +0 -304
- package/dist/lib/observability/tokenTracker.d.ts +0 -109
- package/dist/lib/observability/tokenTracker.js +0 -416
- package/dist/lib/observability/utils/index.d.ts +0 -4
- package/dist/lib/observability/utils/index.js +0 -5
- package/dist/lib/observability/utils/safeMetadata.d.ts +0 -10
- package/dist/lib/observability/utils/safeMetadata.js +0 -26
- package/dist/lib/observability/utils/spanSerializer.d.ts +0 -119
- package/dist/lib/observability/utils/spanSerializer.js +0 -314
- package/dist/lib/processors/archive/ArchiveProcessor.d.ts +0 -323
- package/dist/lib/processors/archive/ArchiveProcessor.js +0 -1662
- package/dist/lib/processors/archive/index.d.ts +0 -33
- package/dist/lib/processors/archive/index.js +0 -44
- package/dist/lib/processors/archive/zipEntryReader.d.ts +0 -51
- package/dist/lib/processors/archive/zipEntryReader.js +0 -81
- package/dist/lib/processors/base/BaseFileProcessor.d.ts +0 -309
- package/dist/lib/processors/base/BaseFileProcessor.js +0 -769
- package/dist/lib/processors/base/index.d.ts +0 -13
- package/dist/lib/processors/base/index.js +0 -23
- package/dist/lib/processors/cli/fileProcessorCli.d.ts +0 -124
- package/dist/lib/processors/cli/fileProcessorCli.js +0 -392
- package/dist/lib/processors/cli/index.d.ts +0 -36
- package/dist/lib/processors/cli/index.js +0 -53
- package/dist/lib/processors/code/ConfigProcessor.d.ts +0 -169
- package/dist/lib/processors/code/ConfigProcessor.js +0 -405
- package/dist/lib/processors/code/SourceCodeProcessor.d.ts +0 -172
- package/dist/lib/processors/code/SourceCodeProcessor.js +0 -309
- package/dist/lib/processors/code/index.d.ts +0 -44
- package/dist/lib/processors/code/index.js +0 -65
- package/dist/lib/processors/config/fileExtensions.d.ts +0 -280
- package/dist/lib/processors/config/fileExtensions.js +0 -485
- package/dist/lib/processors/config/fileTypeRegistry.d.ts +0 -106
- package/dist/lib/processors/config/fileTypeRegistry.js +0 -702
- package/dist/lib/processors/config/index.d.ts +0 -33
- package/dist/lib/processors/config/index.js +0 -104
- package/dist/lib/processors/config/languageMap.d.ts +0 -62
- package/dist/lib/processors/config/languageMap.js +0 -414
- package/dist/lib/processors/config/mimeConstants.d.ts +0 -373
- package/dist/lib/processors/config/mimeConstants.js +0 -348
- package/dist/lib/processors/config/sizeLimits.d.ts +0 -198
- package/dist/lib/processors/config/sizeLimits.js +0 -262
- package/dist/lib/processors/data/JsonProcessor.d.ts +0 -120
- package/dist/lib/processors/data/JsonProcessor.js +0 -206
- package/dist/lib/processors/data/XmlProcessor.d.ts +0 -158
- package/dist/lib/processors/data/XmlProcessor.js +0 -288
- package/dist/lib/processors/data/YamlProcessor.d.ts +0 -161
- package/dist/lib/processors/data/YamlProcessor.js +0 -297
- package/dist/lib/processors/data/index.d.ts +0 -49
- package/dist/lib/processors/data/index.js +0 -83
- package/dist/lib/processors/document/ExcelProcessor.d.ts +0 -250
- package/dist/lib/processors/document/ExcelProcessor.js +0 -615
- package/dist/lib/processors/document/OpenDocumentProcessor.d.ts +0 -67
- package/dist/lib/processors/document/OpenDocumentProcessor.js +0 -236
- package/dist/lib/processors/document/PptxProcessor.d.ts +0 -77
- package/dist/lib/processors/document/PptxProcessor.js +0 -262
- package/dist/lib/processors/document/RtfProcessor.d.ts +0 -150
- package/dist/lib/processors/document/RtfProcessor.js +0 -364
- package/dist/lib/processors/document/WordProcessor.d.ts +0 -166
- package/dist/lib/processors/document/WordProcessor.js +0 -365
- package/dist/lib/processors/document/index.d.ts +0 -55
- package/dist/lib/processors/document/index.js +0 -100
- package/dist/lib/processors/errors/FileErrorCode.d.ts +0 -86
- package/dist/lib/processors/errors/FileErrorCode.js +0 -256
- package/dist/lib/processors/errors/errorHelpers.d.ts +0 -121
- package/dist/lib/processors/errors/errorHelpers.js +0 -387
- package/dist/lib/processors/errors/errorSerializer.d.ts +0 -96
- package/dist/lib/processors/errors/errorSerializer.js +0 -508
- package/dist/lib/processors/errors/index.d.ts +0 -46
- package/dist/lib/processors/errors/index.js +0 -50
- package/dist/lib/processors/index.d.ts +0 -79
- package/dist/lib/processors/index.js +0 -133
- package/dist/lib/processors/integration/FileProcessorIntegration.d.ts +0 -176
- package/dist/lib/processors/integration/FileProcessorIntegration.js +0 -279
- package/dist/lib/processors/integration/index.d.ts +0 -41
- package/dist/lib/processors/integration/index.js +0 -48
- package/dist/lib/processors/markup/HtmlProcessor.d.ts +0 -167
- package/dist/lib/processors/markup/HtmlProcessor.js +0 -252
- package/dist/lib/processors/markup/MarkdownProcessor.d.ts +0 -163
- package/dist/lib/processors/markup/MarkdownProcessor.js +0 -249
- package/dist/lib/processors/markup/SvgProcessor.d.ts +0 -154
- package/dist/lib/processors/markup/SvgProcessor.js +0 -245
- package/dist/lib/processors/markup/TextProcessor.d.ts +0 -133
- package/dist/lib/processors/markup/TextProcessor.js +0 -191
- package/dist/lib/processors/markup/index.d.ts +0 -66
- package/dist/lib/processors/markup/index.js +0 -111
- package/dist/lib/processors/media/AudioProcessor.d.ts +0 -266
- package/dist/lib/processors/media/AudioProcessor.js +0 -712
- package/dist/lib/processors/media/VideoProcessor.d.ts +0 -337
- package/dist/lib/processors/media/VideoProcessor.js +0 -1154
- package/dist/lib/processors/media/index.d.ts +0 -26
- package/dist/lib/processors/media/index.js +0 -30
- package/dist/lib/processors/registry/ProcessorRegistry.d.ts +0 -347
- package/dist/lib/processors/registry/ProcessorRegistry.js +0 -715
- package/dist/lib/processors/registry/index.d.ts +0 -2
- package/dist/lib/processors/registry/index.js +0 -10
- package/dist/lib/providers/amazonBedrock/client.d.ts +0 -93
- package/dist/lib/providers/amazonBedrock/client.js +0 -1178
- package/dist/lib/providers/amazonBedrock/constants.d.ts +0 -1
- package/dist/lib/providers/amazonBedrock/constants.js +0 -3
- package/dist/lib/providers/amazonBedrock/index.d.ts +0 -3
- package/dist/lib/providers/amazonBedrock/index.js +0 -4
- package/dist/lib/providers/amazonBedrock/inferenceProfile.d.ts +0 -72
- package/dist/lib/providers/amazonBedrock/inferenceProfile.js +0 -186
- package/dist/lib/providers/amazonBedrock/loopAdapter.d.ts +0 -36
- package/dist/lib/providers/amazonBedrock/loopAdapter.js +0 -278
- package/dist/lib/providers/amazonBedrock/utils.d.ts +0 -1
- package/dist/lib/providers/amazonBedrock/utils.js +0 -4
- package/dist/lib/providers/amazonSagemaker.d.ts +0 -108
- package/dist/lib/providers/amazonSagemaker.js +0 -292
- package/dist/lib/providers/anthropic/cacheControl.d.ts +0 -12
- package/dist/lib/providers/anthropic/cacheControl.js +0 -15
- package/dist/lib/providers/anthropic/client.d.ts +0 -149
- package/dist/lib/providers/anthropic/client.js +0 -1862
- package/dist/lib/providers/anthropic/constants.d.ts +0 -3
- package/dist/lib/providers/anthropic/constants.js +0 -7
- package/dist/lib/providers/anthropic/index.d.ts +0 -2
- package/dist/lib/providers/anthropic/index.js +0 -3
- package/dist/lib/providers/anthropic/loopAdapter.d.ts +0 -26
- package/dist/lib/providers/anthropic/loopAdapter.js +0 -326
- package/dist/lib/providers/anthropic/rateLimitCapture.d.ts +0 -82
- package/dist/lib/providers/anthropic/rateLimitCapture.js +0 -375
- package/dist/lib/providers/anthropic/structuredOutput.d.ts +0 -58
- package/dist/lib/providers/anthropic/structuredOutput.js +0 -98
- package/dist/lib/providers/anthropic/toolOutput.d.ts +0 -9
- package/dist/lib/providers/anthropic/toolOutput.js +0 -39
- package/dist/lib/providers/anthropicImageBlocks.d.ts +0 -47
- package/dist/lib/providers/anthropicImageBlocks.js +0 -223
- package/dist/lib/providers/azureOpenai.d.ts +0 -67
- package/dist/lib/providers/azureOpenai.js +0 -230
- package/dist/lib/providers/cohere.d.ts +0 -54
- package/dist/lib/providers/cohere.js +0 -183
- package/dist/lib/providers/configuredOpenAICompat.d.ts +0 -24
- package/dist/lib/providers/configuredOpenAICompat.js +0 -67
- package/dist/lib/providers/deepseek.d.ts +0 -47
- package/dist/lib/providers/deepseek.js +0 -121
- package/dist/lib/providers/googleAiStudio/client.d.ts +0 -92
- package/dist/lib/providers/googleAiStudio/client.js +0 -1661
- package/dist/lib/providers/googleAiStudio/index.d.ts +0 -1
- package/dist/lib/providers/googleAiStudio/index.js +0 -2
- package/dist/lib/providers/googleNativeGemini3/index.d.ts +0 -1
- package/dist/lib/providers/googleNativeGemini3/index.js +0 -2
- package/dist/lib/providers/googleNativeGemini3/utils.d.ts +0 -482
- package/dist/lib/providers/googleNativeGemini3/utils.js +0 -1527
- package/dist/lib/providers/googleVertex/client.d.ts +0 -415
- package/dist/lib/providers/googleVertex/client.js +0 -7018
- package/dist/lib/providers/googleVertex/constants.d.ts +0 -5
- package/dist/lib/providers/googleVertex/constants.js +0 -27
- package/dist/lib/providers/googleVertex/index.d.ts +0 -3
- package/dist/lib/providers/googleVertex/index.js +0 -4
- package/dist/lib/providers/googleVertex/utils.d.ts +0 -12
- package/dist/lib/providers/googleVertex/utils.js +0 -287
- package/dist/lib/providers/huggingFace/client.d.ts +0 -31
- package/dist/lib/providers/huggingFace/client.js +0 -103
- package/dist/lib/providers/huggingFace/index.d.ts +0 -1
- package/dist/lib/providers/huggingFace/index.js +0 -2
- package/dist/lib/providers/ideogram.d.ts +0 -34
- package/dist/lib/providers/ideogram.js +0 -184
- package/dist/lib/providers/jina.d.ts +0 -58
- package/dist/lib/providers/jina.js +0 -217
- package/dist/lib/providers/litellm/client.d.ts +0 -84
- package/dist/lib/providers/litellm/client.js +0 -504
- package/dist/lib/providers/litellm/index.d.ts +0 -1
- package/dist/lib/providers/litellm/index.js +0 -2
- package/dist/lib/providers/llamaCpp.d.ts +0 -24
- package/dist/lib/providers/llamaCpp.js +0 -80
- package/dist/lib/providers/lmStudio.d.ts +0 -29
- package/dist/lib/providers/lmStudio.js +0 -88
- package/dist/lib/providers/nvidiaNim/client.d.ts +0 -60
- package/dist/lib/providers/nvidiaNim/client.js +0 -291
- package/dist/lib/providers/nvidiaNim/constants.d.ts +0 -1
- package/dist/lib/providers/nvidiaNim/constants.js +0 -2
- package/dist/lib/providers/nvidiaNim/index.d.ts +0 -2
- package/dist/lib/providers/nvidiaNim/index.js +0 -3
- package/dist/lib/providers/ollama/client.d.ts +0 -71
- package/dist/lib/providers/ollama/client.js +0 -283
- package/dist/lib/providers/ollama/constants.d.ts +0 -4
- package/dist/lib/providers/ollama/constants.js +0 -6
- package/dist/lib/providers/ollama/index.d.ts +0 -2
- package/dist/lib/providers/ollama/index.js +0 -3
- package/dist/lib/providers/openAI/client.d.ts +0 -76
- package/dist/lib/providers/openAI/client.js +0 -503
- package/dist/lib/providers/openAI/index.d.ts +0 -1
- package/dist/lib/providers/openAI/index.js +0 -2
- package/dist/lib/providers/openRouter/client.d.ts +0 -75
- package/dist/lib/providers/openRouter/client.js +0 -402
- package/dist/lib/providers/openRouter/constants.d.ts +0 -1
- package/dist/lib/providers/openRouter/constants.js +0 -2
- package/dist/lib/providers/openRouter/index.d.ts +0 -3
- package/dist/lib/providers/openRouter/index.js +0 -4
- package/dist/lib/providers/openRouter/utils.d.ts +0 -1
- package/dist/lib/providers/openRouter/utils.js +0 -6
- package/dist/lib/providers/openaiChatCompletionsBase.d.ts +0 -212
- package/dist/lib/providers/openaiChatCompletionsBase.js +0 -1154
- package/dist/lib/providers/openaiChatCompletionsClient.d.ts +0 -70
- package/dist/lib/providers/openaiChatCompletionsClient.js +0 -684
- package/dist/lib/providers/openaiCompatCatalog.d.ts +0 -24
- package/dist/lib/providers/openaiCompatCatalog.js +0 -270
- package/dist/lib/providers/openaiCompatible/client.d.ts +0 -21
- package/dist/lib/providers/openaiCompatible/client.js +0 -91
- package/dist/lib/providers/openaiCompatible/constants.d.ts +0 -1
- package/dist/lib/providers/openaiCompatible/constants.js +0 -2
- package/dist/lib/providers/openaiCompatible/index.d.ts +0 -3
- package/dist/lib/providers/openaiCompatible/index.js +0 -4
- package/dist/lib/providers/openaiCompatible/utils.d.ts +0 -5
- package/dist/lib/providers/openaiCompatible/utils.js +0 -17
- package/dist/lib/providers/providerTypeUtils.d.ts +0 -23
- package/dist/lib/providers/providerTypeUtils.js +0 -41
- package/dist/lib/providers/recraft.d.ts +0 -34
- package/dist/lib/providers/recraft.js +0 -197
- package/dist/lib/providers/replicate.d.ts +0 -74
- package/dist/lib/providers/replicate.js +0 -416
- package/dist/lib/providers/sagemaker/adaptive-semaphore.d.ts +0 -74
- package/dist/lib/providers/sagemaker/adaptive-semaphore.js +0 -216
- package/dist/lib/providers/sagemaker/client.d.ts +0 -161
- package/dist/lib/providers/sagemaker/client.js +0 -509
- package/dist/lib/providers/sagemaker/config.d.ts +0 -87
- package/dist/lib/providers/sagemaker/config.js +0 -355
- package/dist/lib/providers/sagemaker/detection.d.ts +0 -121
- package/dist/lib/providers/sagemaker/detection.js +0 -607
- package/dist/lib/providers/sagemaker/diagnostics.d.ts +0 -14
- package/dist/lib/providers/sagemaker/diagnostics.js +0 -138
- package/dist/lib/providers/sagemaker/error-constants.d.ts +0 -78
- package/dist/lib/providers/sagemaker/error-constants.js +0 -228
- package/dist/lib/providers/sagemaker/errors.d.ts +0 -90
- package/dist/lib/providers/sagemaker/errors.js +0 -301
- package/dist/lib/providers/sagemaker/index.d.ts +0 -34
- package/dist/lib/providers/sagemaker/index.js +0 -69
- package/dist/lib/providers/sagemaker/language-model.d.ts +0 -207
- package/dist/lib/providers/sagemaker/language-model.js +0 -805
- package/dist/lib/providers/sagemaker/parsers.d.ts +0 -111
- package/dist/lib/providers/sagemaker/parsers.js +0 -644
- package/dist/lib/providers/sagemaker/streaming.d.ts +0 -48
- package/dist/lib/providers/sagemaker/streaming.js +0 -390
- package/dist/lib/providers/sagemaker/structured-parser.d.ts +0 -117
- package/dist/lib/providers/sagemaker/structured-parser.js +0 -626
- package/dist/lib/providers/stability.d.ts +0 -37
- package/dist/lib/providers/stability.js +0 -191
- package/dist/lib/providers/voyage.d.ts +0 -46
- package/dist/lib/providers/voyage.js +0 -176
- package/dist/lib/proxy/accountCooldown.d.ts +0 -5
- package/dist/lib/proxy/accountCooldown.js +0 -121
- package/dist/lib/proxy/accountQuota.d.ts +0 -84
- package/dist/lib/proxy/accountQuota.js +0 -459
- package/dist/lib/proxy/accountQuotaRefreshCoordinator.d.ts +0 -19
- package/dist/lib/proxy/accountQuotaRefreshCoordinator.js +0 -105
- package/dist/lib/proxy/accountSelection.d.ts +0 -8
- package/dist/lib/proxy/accountSelection.js +0 -26
- package/dist/lib/proxy/accountUsage.d.ts +0 -45
- package/dist/lib/proxy/accountUsage.js +0 -302
- package/dist/lib/proxy/awsProxyIntegration.d.ts +0 -23
- package/dist/lib/proxy/awsProxyIntegration.js +0 -286
- package/dist/lib/proxy/claudeFormat.d.ts +0 -129
- package/dist/lib/proxy/claudeFormat.js +0 -600
- package/dist/lib/proxy/cloaking/index.d.ts +0 -43
- package/dist/lib/proxy/cloaking/index.js +0 -88
- package/dist/lib/proxy/cloaking/plugins/headerScrubber.d.ts +0 -9
- package/dist/lib/proxy/cloaking/plugins/headerScrubber.js +0 -87
- package/dist/lib/proxy/cloaking/plugins/sessionIdentity.d.ts +0 -11
- package/dist/lib/proxy/cloaking/plugins/sessionIdentity.js +0 -42
- package/dist/lib/proxy/cloaking/plugins/systemPromptInjector.d.ts +0 -11
- package/dist/lib/proxy/cloaking/plugins/systemPromptInjector.js +0 -84
- package/dist/lib/proxy/cloaking/plugins/tlsFingerprint.d.ts +0 -14
- package/dist/lib/proxy/cloaking/plugins/tlsFingerprint.js +0 -39
- package/dist/lib/proxy/cloaking/plugins/wordObfuscator.d.ts +0 -9
- package/dist/lib/proxy/cloaking/plugins/wordObfuscator.js +0 -122
- package/dist/lib/proxy/codexAccountUsage.d.ts +0 -26
- package/dist/lib/proxy/codexAccountUsage.js +0 -174
- package/dist/lib/proxy/codexUsage.d.ts +0 -68
- package/dist/lib/proxy/codexUsage.js +0 -247
- package/dist/lib/proxy/globalInstaller.d.ts +0 -19
- package/dist/lib/proxy/globalInstaller.js +0 -242
- package/dist/lib/proxy/logCleanupScheduler.d.ts +0 -12
- package/dist/lib/proxy/logCleanupScheduler.js +0 -74
- package/dist/lib/proxy/logCleanupWorkerEntry.d.ts +0 -1
- package/dist/lib/proxy/logCleanupWorkerEntry.js +0 -15
- package/dist/lib/proxy/modelRouter.d.ts +0 -34
- package/dist/lib/proxy/modelRouter.js +0 -74
- package/dist/lib/proxy/oauthFetch.d.ts +0 -36
- package/dist/lib/proxy/oauthFetch.js +0 -353
- package/dist/lib/proxy/openaiFormat.d.ts +0 -139
- package/dist/lib/proxy/openaiFormat.js +0 -817
- package/dist/lib/proxy/providerTransportCoordinator.d.ts +0 -17
- package/dist/lib/proxy/providerTransportCoordinator.js +0 -156
- package/dist/lib/proxy/proxyActivity.d.ts +0 -8
- package/dist/lib/proxy/proxyActivity.js +0 -117
- package/dist/lib/proxy/proxyAnalysis.d.ts +0 -3
- package/dist/lib/proxy/proxyAnalysis.js +0 -985
- package/dist/lib/proxy/proxyConfig.d.ts +0 -42
- package/dist/lib/proxy/proxyConfig.js +0 -700
- package/dist/lib/proxy/proxyDispatcher.d.ts +0 -5
- package/dist/lib/proxy/proxyDispatcher.js +0 -61
- package/dist/lib/proxy/proxyEnv.d.ts +0 -3
- package/dist/lib/proxy/proxyEnv.js +0 -73
- package/dist/lib/proxy/proxyFetch.d.ts +0 -50
- package/dist/lib/proxy/proxyFetch.js +0 -729
- package/dist/lib/proxy/proxyHealth.d.ts +0 -20
- package/dist/lib/proxy/proxyHealth.js +0 -76
- package/dist/lib/proxy/proxyLifecycle.d.ts +0 -13
- package/dist/lib/proxy/proxyLifecycle.js +0 -383
- package/dist/lib/proxy/proxyPaths.d.ts +0 -17
- package/dist/lib/proxy/proxyPaths.js +0 -42
- package/dist/lib/proxy/proxyReplay.d.ts +0 -10
- package/dist/lib/proxy/proxyReplay.js +0 -765
- package/dist/lib/proxy/proxyTracer.d.ts +0 -128
- package/dist/lib/proxy/proxyTracer.js +0 -748
- package/dist/lib/proxy/proxyTranslationEngine.d.ts +0 -125
- package/dist/lib/proxy/proxyTranslationEngine.js +0 -740
- package/dist/lib/proxy/quietDetector.d.ts +0 -17
- package/dist/lib/proxy/quietDetector.js +0 -125
- package/dist/lib/proxy/quotaHeaders.d.ts +0 -73
- package/dist/lib/proxy/quotaHeaders.js +0 -189
- package/dist/lib/proxy/rawStreamCapture.d.ts +0 -2
- package/dist/lib/proxy/rawStreamCapture.js +0 -129
- package/dist/lib/proxy/requestLogger.d.ts +0 -78
- package/dist/lib/proxy/requestLogger.js +0 -770
- package/dist/lib/proxy/rollingProxyServer.d.ts +0 -3
- package/dist/lib/proxy/rollingProxyServer.js +0 -220
- package/dist/lib/proxy/rollingWorkerProcess.d.ts +0 -2
- package/dist/lib/proxy/rollingWorkerProcess.js +0 -199
- package/dist/lib/proxy/rollingWorkerProtocol.d.ts +0 -5
- package/dist/lib/proxy/rollingWorkerProtocol.js +0 -46
- package/dist/lib/proxy/rollingWorkerSupervisor.d.ts +0 -44
- package/dist/lib/proxy/rollingWorkerSupervisor.js +0 -530
- package/dist/lib/proxy/routingEvidence.d.ts +0 -17
- package/dist/lib/proxy/routingEvidence.js +0 -59
- package/dist/lib/proxy/routingPolicy.d.ts +0 -19
- package/dist/lib/proxy/routingPolicy.js +0 -75
- package/dist/lib/proxy/runtimeConfig.d.ts +0 -27
- package/dist/lib/proxy/runtimeConfig.js +0 -448
- package/dist/lib/proxy/snapshotPersistence.d.ts +0 -2
- package/dist/lib/proxy/snapshotPersistence.js +0 -41
- package/dist/lib/proxy/socketWorkerRuntime.d.ts +0 -14
- package/dist/lib/proxy/socketWorkerRuntime.js +0 -322
- package/dist/lib/proxy/sseInterceptor.d.ts +0 -41
- package/dist/lib/proxy/sseInterceptor.js +0 -496
- package/dist/lib/proxy/streamOutcome.d.ts +0 -5
- package/dist/lib/proxy/streamOutcome.js +0 -104
- package/dist/lib/proxy/systemRelocation.d.ts +0 -21
- package/dist/lib/proxy/systemRelocation.js +0 -51
- package/dist/lib/proxy/tokenRefresh.d.ts +0 -18
- package/dist/lib/proxy/tokenRefresh.js +0 -257
- package/dist/lib/proxy/updateChecker.d.ts +0 -17
- package/dist/lib/proxy/updateChecker.js +0 -98
- package/dist/lib/proxy/updateCoordinator.d.ts +0 -7
- package/dist/lib/proxy/updateCoordinator.js +0 -60
- package/dist/lib/proxy/updateState.d.ts +0 -69
- package/dist/lib/proxy/updateState.js +0 -309
- package/dist/lib/proxy/updaterSupervisor.d.ts +0 -3
- package/dist/lib/proxy/updaterSupervisor.js +0 -58
- package/dist/lib/proxy/usageStats.d.ts +0 -91
- package/dist/lib/proxy/usageStats.js +0 -1154
- package/dist/lib/proxy/utils/noProxyUtils.d.ts +0 -39
- package/dist/lib/proxy/utils/noProxyUtils.js +0 -150
- package/dist/lib/proxy/workerLog.d.ts +0 -6
- package/dist/lib/proxy/workerLog.js +0 -42
- package/dist/lib/rag/ChunkerFactory.d.ts +0 -91
- package/dist/lib/rag/ChunkerFactory.js +0 -321
- package/dist/lib/rag/ChunkerRegistry.d.ts +0 -91
- package/dist/lib/rag/ChunkerRegistry.js +0 -422
- package/dist/lib/rag/chunkers/BaseChunker.d.ts +0 -53
- package/dist/lib/rag/chunkers/BaseChunker.js +0 -158
- package/dist/lib/rag/chunkers/CharacterChunker.d.ts +0 -18
- package/dist/lib/rag/chunkers/CharacterChunker.js +0 -29
- package/dist/lib/rag/chunkers/HTMLChunker.d.ts +0 -19
- package/dist/lib/rag/chunkers/HTMLChunker.js +0 -39
- package/dist/lib/rag/chunkers/JSONChunker.d.ts +0 -19
- package/dist/lib/rag/chunkers/JSONChunker.js +0 -69
- package/dist/lib/rag/chunkers/LaTeXChunker.d.ts +0 -15
- package/dist/lib/rag/chunkers/LaTeXChunker.js +0 -64
- package/dist/lib/rag/chunkers/MarkdownChunker.d.ts +0 -37
- package/dist/lib/rag/chunkers/MarkdownChunker.js +0 -315
- package/dist/lib/rag/chunkers/RecursiveChunker.d.ts +0 -27
- package/dist/lib/rag/chunkers/RecursiveChunker.js +0 -140
- package/dist/lib/rag/chunkers/SemanticMarkdownChunker.d.ts +0 -22
- package/dist/lib/rag/chunkers/SemanticMarkdownChunker.js +0 -139
- package/dist/lib/rag/chunkers/SentenceChunker.d.ts +0 -19
- package/dist/lib/rag/chunkers/SentenceChunker.js +0 -67
- package/dist/lib/rag/chunkers/TokenChunker.d.ts +0 -19
- package/dist/lib/rag/chunkers/TokenChunker.js +0 -62
- package/dist/lib/rag/chunkers/index.d.ts +0 -15
- package/dist/lib/rag/chunkers/index.js +0 -16
- package/dist/lib/rag/chunking/characterChunker.d.ts +0 -16
- package/dist/lib/rag/chunking/characterChunker.js +0 -143
- package/dist/lib/rag/chunking/chunkerRegistry.d.ts +0 -67
- package/dist/lib/rag/chunking/chunkerRegistry.js +0 -195
- package/dist/lib/rag/chunking/htmlChunker.d.ts +0 -34
- package/dist/lib/rag/chunking/htmlChunker.js +0 -248
- package/dist/lib/rag/chunking/index.d.ts +0 -15
- package/dist/lib/rag/chunking/index.js +0 -18
- package/dist/lib/rag/chunking/jsonChunker.d.ts +0 -20
- package/dist/lib/rag/chunking/jsonChunker.js +0 -282
- package/dist/lib/rag/chunking/latexChunker.d.ts +0 -26
- package/dist/lib/rag/chunking/latexChunker.js +0 -252
- package/dist/lib/rag/chunking/markdownChunker.d.ts +0 -35
- package/dist/lib/rag/chunking/markdownChunker.js +0 -383
- package/dist/lib/rag/chunking/recursiveChunker.d.ts +0 -19
- package/dist/lib/rag/chunking/recursiveChunker.js +0 -149
- package/dist/lib/rag/chunking/semanticChunker.d.ts +0 -41
- package/dist/lib/rag/chunking/semanticChunker.js +0 -306
- package/dist/lib/rag/chunking/sentenceChunker.d.ts +0 -25
- package/dist/lib/rag/chunking/sentenceChunker.js +0 -231
- package/dist/lib/rag/chunking/tokenChunker.d.ts +0 -36
- package/dist/lib/rag/chunking/tokenChunker.js +0 -184
- package/dist/lib/rag/document/MDocument.d.ts +0 -198
- package/dist/lib/rag/document/MDocument.js +0 -392
- package/dist/lib/rag/document/index.d.ts +0 -5
- package/dist/lib/rag/document/index.js +0 -6
- package/dist/lib/rag/document/loaders.d.ts +0 -142
- package/dist/lib/rag/document/loaders.js +0 -544
- package/dist/lib/rag/errors/RAGError.d.ts +0 -244
- package/dist/lib/rag/errors/RAGError.js +0 -275
- package/dist/lib/rag/errors/index.d.ts +0 -6
- package/dist/lib/rag/errors/index.js +0 -7
- package/dist/lib/rag/graphRag/graphRAG.d.ts +0 -115
- package/dist/lib/rag/graphRag/graphRAG.js +0 -402
- package/dist/lib/rag/graphRag/index.d.ts +0 -4
- package/dist/lib/rag/graphRag/index.js +0 -5
- package/dist/lib/rag/index.d.ts +0 -104
- package/dist/lib/rag/index.js +0 -144
- package/dist/lib/rag/metadata/MetadataExtractorFactory.d.ts +0 -103
- package/dist/lib/rag/metadata/MetadataExtractorFactory.js +0 -419
- package/dist/lib/rag/metadata/MetadataExtractorRegistry.d.ts +0 -99
- package/dist/lib/rag/metadata/MetadataExtractorRegistry.js +0 -363
- package/dist/lib/rag/metadata/index.d.ts +0 -6
- package/dist/lib/rag/metadata/index.js +0 -10
- package/dist/lib/rag/metadata/metadataExtractor.d.ts +0 -69
- package/dist/lib/rag/metadata/metadataExtractor.js +0 -281
- package/dist/lib/rag/pipeline/RAGPipeline.d.ts +0 -105
- package/dist/lib/rag/pipeline/RAGPipeline.js +0 -436
- package/dist/lib/rag/pipeline/contextAssembly.d.ts +0 -80
- package/dist/lib/rag/pipeline/contextAssembly.js +0 -342
- package/dist/lib/rag/pipeline/index.d.ts +0 -5
- package/dist/lib/rag/pipeline/index.js +0 -6
- package/dist/lib/rag/ragIntegration.d.ts +0 -30
- package/dist/lib/rag/ragIntegration.js +0 -327
- package/dist/lib/rag/reranker/RerankerFactory.d.ts +0 -124
- package/dist/lib/rag/reranker/RerankerFactory.js +0 -431
- package/dist/lib/rag/reranker/RerankerRegistry.d.ts +0 -119
- package/dist/lib/rag/reranker/RerankerRegistry.js +0 -403
- package/dist/lib/rag/reranker/index.d.ts +0 -6
- package/dist/lib/rag/reranker/index.js +0 -10
- package/dist/lib/rag/reranker/reranker.d.ts +0 -70
- package/dist/lib/rag/reranker/reranker.js +0 -307
- package/dist/lib/rag/resilience/CircuitBreaker.d.ts +0 -142
- package/dist/lib/rag/resilience/CircuitBreaker.js +0 -432
- package/dist/lib/rag/resilience/RetryHandler.d.ts +0 -95
- package/dist/lib/rag/resilience/RetryHandler.js +0 -305
- package/dist/lib/rag/resilience/index.d.ts +0 -7
- package/dist/lib/rag/resilience/index.js +0 -8
- package/dist/lib/rag/retrieval/hybridSearch.d.ts +0 -53
- package/dist/lib/rag/retrieval/hybridSearch.js +0 -339
- package/dist/lib/rag/retrieval/index.d.ts +0 -5
- package/dist/lib/rag/retrieval/index.js +0 -6
- package/dist/lib/rag/retrieval/vectorQueryTool.d.ts +0 -72
- package/dist/lib/rag/retrieval/vectorQueryTool.js +0 -325
- package/dist/lib/rag/stores/chroma.d.ts +0 -90
- package/dist/lib/rag/stores/chroma.js +0 -281
- package/dist/lib/rag/stores/index.d.ts +0 -21
- package/dist/lib/rag/stores/index.js +0 -22
- package/dist/lib/rag/stores/pgvector.d.ts +0 -95
- package/dist/lib/rag/stores/pgvector.js +0 -400
- package/dist/lib/rag/stores/pinecone.d.ts +0 -85
- package/dist/lib/rag/stores/pinecone.js +0 -159
- package/dist/lib/routing/classifierRouter.d.ts +0 -52
- package/dist/lib/routing/classifierRouter.js +0 -269
- package/dist/lib/routing/classifierStrategies.d.ts +0 -23
- package/dist/lib/routing/classifierStrategies.js +0 -156
- package/dist/lib/routing/index.d.ts +0 -9
- package/dist/lib/routing/index.js +0 -10
- package/dist/lib/routing/modelPool.d.ts +0 -83
- package/dist/lib/routing/modelPool.js +0 -243
- package/dist/lib/routing/requestRouter.d.ts +0 -30
- package/dist/lib/routing/requestRouter.js +0 -81
- package/dist/lib/sdk/toolRegistration.d.ts +0 -74
- package/dist/lib/sdk/toolRegistration.js +0 -383
- package/dist/lib/server/abstract/baseServerAdapter.d.ts +0 -171
- package/dist/lib/server/abstract/baseServerAdapter.js +0 -575
- package/dist/lib/server/adapters/expressAdapter.d.ts +0 -70
- package/dist/lib/server/adapters/expressAdapter.js +0 -487
- package/dist/lib/server/adapters/fastifyAdapter.d.ts +0 -70
- package/dist/lib/server/adapters/fastifyAdapter.js +0 -473
- package/dist/lib/server/adapters/honoAdapter.d.ts +0 -77
- package/dist/lib/server/adapters/honoAdapter.js +0 -633
- package/dist/lib/server/adapters/index.d.ts +0 -7
- package/dist/lib/server/adapters/index.js +0 -8
- package/dist/lib/server/adapters/koaAdapter.d.ts +0 -79
- package/dist/lib/server/adapters/koaAdapter.js +0 -511
- package/dist/lib/server/errors.d.ts +0 -193
- package/dist/lib/server/errors.js +0 -487
- package/dist/lib/server/factory/serverAdapterFactory.d.ts +0 -73
- package/dist/lib/server/factory/serverAdapterFactory.js +0 -161
- package/dist/lib/server/index.d.ts +0 -46
- package/dist/lib/server/index.js +0 -122
- package/dist/lib/server/middleware/abortSignal.d.ts +0 -52
- package/dist/lib/server/middleware/abortSignal.js +0 -112
- package/dist/lib/server/middleware/auth.d.ts +0 -166
- package/dist/lib/server/middleware/auth.js +0 -404
- package/dist/lib/server/middleware/cache.d.ts +0 -161
- package/dist/lib/server/middleware/cache.js +0 -370
- package/dist/lib/server/middleware/common.d.ts +0 -108
- package/dist/lib/server/middleware/common.js +0 -297
- package/dist/lib/server/middleware/deprecation.d.ts +0 -40
- package/dist/lib/server/middleware/deprecation.js +0 -191
- package/dist/lib/server/middleware/index.d.ts +0 -12
- package/dist/lib/server/middleware/index.js +0 -13
- package/dist/lib/server/middleware/mcpBodyAttachment.d.ts +0 -42
- package/dist/lib/server/middleware/mcpBodyAttachment.js +0 -64
- package/dist/lib/server/middleware/rateLimit.d.ts +0 -70
- package/dist/lib/server/middleware/rateLimit.js +0 -224
- package/dist/lib/server/middleware/validation.d.ts +0 -69
- package/dist/lib/server/middleware/validation.js +0 -393
- package/dist/lib/server/openapi/generator.d.ts +0 -61
- package/dist/lib/server/openapi/generator.js +0 -399
- package/dist/lib/server/openapi/index.d.ts +0 -7
- package/dist/lib/server/openapi/index.js +0 -37
- package/dist/lib/server/openapi/schemas.d.ts +0 -94
- package/dist/lib/server/openapi/schemas.js +0 -696
- package/dist/lib/server/openapi/templates.d.ts +0 -108
- package/dist/lib/server/openapi/templates.js +0 -375
- package/dist/lib/server/routes/agentRoutes.d.ts +0 -9
- package/dist/lib/server/routes/agentRoutes.js +0 -423
- package/dist/lib/server/routes/claudeProxyRoutes.d.ts +0 -491
- package/dist/lib/server/routes/claudeProxyRoutes.js +0 -6455
- package/dist/lib/server/routes/codexProxyRoutes.d.ts +0 -64
- package/dist/lib/server/routes/codexProxyRoutes.js +0 -482
- package/dist/lib/server/routes/healthRoutes.d.ts +0 -9
- package/dist/lib/server/routes/healthRoutes.js +0 -234
- package/dist/lib/server/routes/index.d.ts +0 -25
- package/dist/lib/server/routes/index.js +0 -66
- package/dist/lib/server/routes/mcpRoutes.d.ts +0 -9
- package/dist/lib/server/routes/mcpRoutes.js +0 -376
- package/dist/lib/server/routes/memoryRoutes.d.ts +0 -11
- package/dist/lib/server/routes/memoryRoutes.js +0 -366
- package/dist/lib/server/routes/openApiRoutes.d.ts +0 -34
- package/dist/lib/server/routes/openApiRoutes.js +0 -151
- package/dist/lib/server/routes/openaiProxyRoutes.d.ts +0 -38
- package/dist/lib/server/routes/openaiProxyRoutes.js +0 -404
- package/dist/lib/server/routes/toolRoutes.d.ts +0 -9
- package/dist/lib/server/routes/toolRoutes.js +0 -272
- package/dist/lib/server/streaming/dataStream.d.ts +0 -212
- package/dist/lib/server/streaming/dataStream.js +0 -502
- package/dist/lib/server/streaming/index.d.ts +0 -5
- package/dist/lib/server/streaming/index.js +0 -17
- package/dist/lib/server/utils/redaction.d.ts +0 -68
- package/dist/lib/server/utils/redaction.js +0 -321
- package/dist/lib/server/utils/validation.d.ts +0 -153
- package/dist/lib/server/utils/validation.js +0 -265
- package/dist/lib/server/voice/frameBus.d.ts +0 -8
- package/dist/lib/server/voice/frameBus.js +0 -25
- package/dist/lib/server/voice/tokenCompare.d.ts +0 -14
- package/dist/lib/server/voice/tokenCompare.js +0 -23
- package/dist/lib/server/voice/turnManager.d.ts +0 -15
- package/dist/lib/server/voice/turnManager.js +0 -36
- package/dist/lib/server/voice/voiceServerApp.d.ts +0 -1
- package/dist/lib/server/voice/voiceServerApp.js +0 -177
- package/dist/lib/server/voice/voiceWebSocketHandler.d.ts +0 -24
- package/dist/lib/server/voice/voiceWebSocketHandler.js +0 -669
- package/dist/lib/server/websocket/WebSocketHandler.d.ts +0 -107
- package/dist/lib/server/websocket/WebSocketHandler.js +0 -384
- package/dist/lib/server/websocket/index.d.ts +0 -4
- package/dist/lib/server/websocket/index.js +0 -5
- package/dist/lib/services/server/ai/observability/instrumentation.d.ts +0 -229
- package/dist/lib/services/server/ai/observability/instrumentation.js +0 -1244
- package/dist/lib/session/globalSessionState.d.ts +0 -71
- package/dist/lib/session/globalSessionState.js +0 -235
- package/dist/lib/skills/skillMatcher.d.ts +0 -55
- package/dist/lib/skills/skillMatcher.js +0 -170
- package/dist/lib/skills/skillSessionTracker.d.ts +0 -52
- package/dist/lib/skills/skillSessionTracker.js +0 -150
- package/dist/lib/skills/skillStoreRedis.d.ts +0 -30
- package/dist/lib/skills/skillStoreRedis.js +0 -114
- package/dist/lib/skills/skillStoreS3.d.ts +0 -56
- package/dist/lib/skills/skillStoreS3.js +0 -305
- package/dist/lib/skills/skillStores.d.ts +0 -58
- package/dist/lib/skills/skillStores.js +0 -341
- package/dist/lib/skills/skillTools.d.ts +0 -35
- package/dist/lib/skills/skillTools.js +0 -451
- package/dist/lib/skills/skillsManager.d.ts +0 -78
- package/dist/lib/skills/skillsManager.js +0 -281
- package/dist/lib/tasks/autoresearchTaskExecutor.d.ts +0 -31
- package/dist/lib/tasks/autoresearchTaskExecutor.js +0 -304
- package/dist/lib/tasks/backends/bullmqBackend.d.ts +0 -33
- package/dist/lib/tasks/backends/bullmqBackend.js +0 -206
- package/dist/lib/tasks/backends/nodeTimeoutBackend.d.ts +0 -27
- package/dist/lib/tasks/backends/nodeTimeoutBackend.js +0 -141
- package/dist/lib/tasks/backends/taskBackendRegistry.d.ts +0 -31
- package/dist/lib/tasks/backends/taskBackendRegistry.js +0 -66
- package/dist/lib/tasks/errors.d.ts +0 -33
- package/dist/lib/tasks/errors.js +0 -19
- package/dist/lib/tasks/store/fileTaskStore.d.ts +0 -43
- package/dist/lib/tasks/store/fileTaskStore.js +0 -179
- package/dist/lib/tasks/store/redisTaskStore.d.ts +0 -43
- package/dist/lib/tasks/store/redisTaskStore.js +0 -222
- package/dist/lib/tasks/taskExecutor.d.ts +0 -22
- package/dist/lib/tasks/taskExecutor.js +0 -170
- package/dist/lib/tasks/taskManager.d.ts +0 -65
- package/dist/lib/tasks/taskManager.js +0 -545
- package/dist/lib/tasks/tools/taskTools.d.ts +0 -20
- package/dist/lib/tasks/tools/taskTools.js +0 -265
- package/dist/lib/telemetry/attributes.d.ts +0 -136
- package/dist/lib/telemetry/attributes.js +0 -165
- package/dist/lib/telemetry/index.d.ts +0 -20
- package/dist/lib/telemetry/index.js +0 -28
- package/dist/lib/telemetry/telemetryService.d.ts +0 -58
- package/dist/lib/telemetry/telemetryService.js +0 -387
- package/dist/lib/telemetry/traceContext.d.ts +0 -9
- package/dist/lib/telemetry/traceContext.js +0 -19
- package/dist/lib/telemetry/tracers.d.ts +0 -38
- package/dist/lib/telemetry/tracers.js +0 -40
- package/dist/lib/telemetry/withSpan.d.ts +0 -39
- package/dist/lib/telemetry/withSpan.js +0 -138
- package/dist/lib/tools/toolDiscovery.d.ts +0 -70
- package/dist/lib/tools/toolDiscovery.js +0 -303
- package/dist/lib/tools/toolGate.d.ts +0 -16
- package/dist/lib/tools/toolGate.js +0 -51
- package/dist/lib/tools/toolPolicy.d.ts +0 -40
- package/dist/lib/tools/toolPolicy.js +0 -194
- package/dist/lib/types/action.d.ts +0 -207
- package/dist/lib/types/action.js +0 -7
- package/dist/lib/types/agentNetwork.d.ts +0 -1199
- package/dist/lib/types/agentNetwork.js +0 -8
- package/dist/lib/types/aliases.d.ts +0 -368
- package/dist/lib/types/aliases.js +0 -50
- package/dist/lib/types/analytics.d.ts +0 -215
- package/dist/lib/types/analytics.js +0 -6
- package/dist/lib/types/artifact.d.ts +0 -70
- package/dist/lib/types/artifact.js +0 -11
- package/dist/lib/types/auth.d.ts +0 -1140
- package/dist/lib/types/auth.js +0 -10
- package/dist/lib/types/autoresearch.d.ts +0 -206
- package/dist/lib/types/autoresearch.js +0 -18
- package/dist/lib/types/avatar.d.ts +0 -150
- package/dist/lib/types/avatar.js +0 -20
- package/dist/lib/types/circuitBreakerErrors.d.ts +0 -30
- package/dist/lib/types/circuitBreakerErrors.js +0 -35
- package/dist/lib/types/classifierRouter.d.ts +0 -194
- package/dist/lib/types/classifierRouter.js +0 -17
- package/dist/lib/types/cli.d.ts +0 -1734
- package/dist/lib/types/cli.js +0 -22
- package/dist/lib/types/client.d.ts +0 -1287
- package/dist/lib/types/client.js +0 -11
- package/dist/lib/types/codex.d.ts +0 -95
- package/dist/lib/types/codex.js +0 -15
- package/dist/lib/types/common.d.ts +0 -434
- package/dist/lib/types/common.js +0 -52
- package/dist/lib/types/config.d.ts +0 -506
- package/dist/lib/types/config.js +0 -54
- package/dist/lib/types/content.d.ts +0 -18
- package/dist/lib/types/content.js +0 -20
- package/dist/lib/types/context.d.ts +0 -587
- package/dist/lib/types/context.js +0 -401
- package/dist/lib/types/conversation.d.ts +0 -637
- package/dist/lib/types/conversation.js +0 -48
- package/dist/lib/types/conversationMemoryInterface.d.ts +0 -59
- package/dist/lib/types/conversationMemoryInterface.js +0 -7
- package/dist/lib/types/domain.d.ts +0 -62
- package/dist/lib/types/domain.js +0 -6
- package/dist/lib/types/dynamic.d.ts +0 -110
- package/dist/lib/types/dynamic.js +0 -10
- package/dist/lib/types/elicitation.d.ts +0 -278
- package/dist/lib/types/elicitation.js +0 -11
- package/dist/lib/types/enums.d.ts +0 -9
- package/dist/lib/types/enums.js +0 -10
- package/dist/lib/types/errors.d.ts +0 -188
- package/dist/lib/types/errors.js +0 -262
- package/dist/lib/types/evaluation.d.ts +0 -647
- package/dist/lib/types/evaluation.js +0 -2
- package/dist/lib/types/evaluationProviders.d.ts +0 -104
- package/dist/lib/types/evaluationProviders.js +0 -6
- package/dist/lib/types/exporter.d.ts +0 -257
- package/dist/lib/types/exporter.js +0 -6
- package/dist/lib/types/externalMcp.d.ts +0 -349
- package/dist/lib/types/externalMcp.js +0 -7
- package/dist/lib/types/file.d.ts +0 -616
- package/dist/lib/types/file.js +0 -5
- package/dist/lib/types/fileReference.d.ts +0 -243
- package/dist/lib/types/fileReference.js +0 -22
- package/dist/lib/types/generate.d.ts +0 -1520
- package/dist/lib/types/generate.js +0 -2
- package/dist/lib/types/grounding.d.ts +0 -231
- package/dist/lib/types/grounding.js +0 -12
- package/dist/lib/types/guardrails.d.ts +0 -116
- package/dist/lib/types/guardrails.js +0 -2
- package/dist/lib/types/hitl.d.ts +0 -237
- package/dist/lib/types/hitl.js +0 -9
- package/dist/lib/types/imageGen.d.ts +0 -255
- package/dist/lib/types/imageGen.js +0 -25
- package/dist/lib/types/index.d.ts +0 -86
- package/dist/lib/types/index.js +0 -98
- package/dist/lib/types/ioProcessor.d.ts +0 -119
- package/dist/lib/types/ioProcessor.js +0 -10
- package/dist/lib/types/isolatedAgent.d.ts +0 -365
- package/dist/lib/types/isolatedAgent.js +0 -12
- package/dist/lib/types/knowledge.d.ts +0 -342
- package/dist/lib/types/knowledge.js +0 -30
- package/dist/lib/types/livekit.d.ts +0 -512
- package/dist/lib/types/livekit.js +0 -13
- package/dist/lib/types/loopEngine.d.ts +0 -306
- package/dist/lib/types/loopEngine.js +0 -2
- package/dist/lib/types/mcp.d.ts +0 -2135
- package/dist/lib/types/mcp.js +0 -6
- package/dist/lib/types/mcpOutput.d.ts +0 -40
- package/dist/lib/types/mcpOutput.js +0 -9
- package/dist/lib/types/memory.d.ts +0 -96
- package/dist/lib/types/memory.js +0 -23
- package/dist/lib/types/middleware.d.ts +0 -435
- package/dist/lib/types/middleware.js +0 -2
- package/dist/lib/types/model.d.ts +0 -342
- package/dist/lib/types/model.js +0 -32
- package/dist/lib/types/modelPool.d.ts +0 -47
- package/dist/lib/types/modelPool.js +0 -11
- package/dist/lib/types/multimodal.d.ts +0 -614
- package/dist/lib/types/multimodal.js +0 -144
- package/dist/lib/types/music.d.ts +0 -172
- package/dist/lib/types/music.js +0 -21
- package/dist/lib/types/nativeTools.d.ts +0 -16
- package/dist/lib/types/nativeTools.js +0 -2
- package/dist/lib/types/noOutputSentinel.d.ts +0 -26
- package/dist/lib/types/noOutputSentinel.js +0 -2
- package/dist/lib/types/observability.d.ts +0 -502
- package/dist/lib/types/observability.js +0 -7
- package/dist/lib/types/openaiCompatible.d.ts +0 -287
- package/dist/lib/types/openaiCompatible.js +0 -2
- package/dist/lib/types/ppt.d.ts +0 -1093
- package/dist/lib/types/ppt.js +0 -37
- package/dist/lib/types/processor.d.ts +0 -993
- package/dist/lib/types/processor.js +0 -91
- package/dist/lib/types/providers.d.ts +0 -2155
- package/dist/lib/types/providers.js +0 -112
- package/dist/lib/types/proxy.d.ts +0 -2789
- package/dist/lib/types/proxy.js +0 -17
- package/dist/lib/types/proxyClient.d.ts +0 -54
- package/dist/lib/types/proxyClient.js +0 -2
- package/dist/lib/types/rag.d.ts +0 -1332
- package/dist/lib/types/rag.js +0 -2
- package/dist/lib/types/realtime.d.ts +0 -243
- package/dist/lib/types/realtime.js +0 -70
- package/dist/lib/types/replicate.d.ts +0 -67
- package/dist/lib/types/replicate.js +0 -10
- package/dist/lib/types/requestRouter.d.ts +0 -75
- package/dist/lib/types/requestRouter.js +0 -16
- package/dist/lib/types/safeFetch.d.ts +0 -24
- package/dist/lib/types/safeFetch.js +0 -7
- package/dist/lib/types/scorer.d.ts +0 -564
- package/dist/lib/types/scorer.js +0 -6
- package/dist/lib/types/sdk.d.ts +0 -23
- package/dist/lib/types/sdk.js +0 -9
- package/dist/lib/types/server.d.ts +0 -1192
- package/dist/lib/types/server.js +0 -68
- package/dist/lib/types/service.d.ts +0 -79
- package/dist/lib/types/service.js +0 -6
- package/dist/lib/types/skills.d.ts +0 -427
- package/dist/lib/types/skills.js +0 -17
- package/dist/lib/types/span.d.ts +0 -247
- package/dist/lib/types/span.js +0 -96
- package/dist/lib/types/stream.d.ts +0 -771
- package/dist/lib/types/stream.js +0 -2
- package/dist/lib/types/streamDedup.d.ts +0 -14
- package/dist/lib/types/streamDedup.js +0 -2
- package/dist/lib/types/streaming.d.ts +0 -15
- package/dist/lib/types/streaming.js +0 -2
- package/dist/lib/types/stt.d.ts +0 -585
- package/dist/lib/types/stt.js +0 -90
- package/dist/lib/types/subscription.d.ts +0 -1064
- package/dist/lib/types/subscription.js +0 -10
- package/dist/lib/types/task.d.ts +0 -313
- package/dist/lib/types/task.js +0 -37
- package/dist/lib/types/taskClassification.d.ts +0 -52
- package/dist/lib/types/taskClassification.js +0 -6
- package/dist/lib/types/toolDedup.d.ts +0 -45
- package/dist/lib/types/toolDedup.js +0 -14
- package/dist/lib/types/toolResolution.d.ts +0 -83
- package/dist/lib/types/toolResolution.js +0 -11
- package/dist/lib/types/toolRouting.d.ts +0 -350
- package/dist/lib/types/toolRouting.js +0 -19
- package/dist/lib/types/tools.d.ts +0 -531
- package/dist/lib/types/tools.js +0 -26
- package/dist/lib/types/tts.d.ts +0 -195
- package/dist/lib/types/tts.js +0 -65
- package/dist/lib/types/utilities.d.ts +0 -310
- package/dist/lib/types/utilities.js +0 -5
- package/dist/lib/types/vectorStoreChroma.d.ts +0 -67
- package/dist/lib/types/vectorStoreChroma.js +0 -12
- package/dist/lib/types/vectorStorePinecone.d.ts +0 -48
- package/dist/lib/types/vectorStorePinecone.js +0 -12
- package/dist/lib/types/video.d.ts +0 -89
- package/dist/lib/types/video.js +0 -15
- package/dist/lib/types/voice.d.ts +0 -272
- package/dist/lib/types/voice.js +0 -137
- package/dist/lib/types/workflow.d.ts +0 -598
- package/dist/lib/types/workflow.js +0 -24
- package/dist/lib/utils/analyticsUtils.d.ts +0 -37
- package/dist/lib/utils/analyticsUtils.js +0 -110
- package/dist/lib/utils/anthropicCacheBreakpoints.d.ts +0 -43
- package/dist/lib/utils/anthropicCacheBreakpoints.js +0 -151
- package/dist/lib/utils/anthropicTraceSanitizer.d.ts +0 -7
- package/dist/lib/utils/anthropicTraceSanitizer.js +0 -26
- package/dist/lib/utils/async/delay.d.ts +0 -40
- package/dist/lib/utils/async/delay.js +0 -43
- package/dist/lib/utils/async/index.d.ts +0 -23
- package/dist/lib/utils/async/index.js +0 -24
- package/dist/lib/utils/async/retry.d.ts +0 -107
- package/dist/lib/utils/async/retry.js +0 -172
- package/dist/lib/utils/async/withTimeout.d.ts +0 -85
- package/dist/lib/utils/async/withTimeout.js +0 -144
- package/dist/lib/utils/asyncMutex.d.ts +0 -14
- package/dist/lib/utils/asyncMutex.js +0 -61
- package/dist/lib/utils/audioFormatDetector.d.ts +0 -15
- package/dist/lib/utils/audioFormatDetector.js +0 -34
- package/dist/lib/utils/avatarProcessor.d.ts +0 -78
- package/dist/lib/utils/avatarProcessor.js +0 -173
- package/dist/lib/utils/cloneOptions.d.ts +0 -36
- package/dist/lib/utils/cloneOptions.js +0 -62
- package/dist/lib/utils/conversationMemory.d.ts +0 -80
- package/dist/lib/utils/conversationMemory.js +0 -670
- package/dist/lib/utils/csvProcessor.d.ts +0 -221
- package/dist/lib/utils/csvProcessor.js +0 -1527
- package/dist/lib/utils/csvUtils.d.ts +0 -26
- package/dist/lib/utils/csvUtils.js +0 -85
- package/dist/lib/utils/errorClassifier.d.ts +0 -30
- package/dist/lib/utils/errorClassifier.js +0 -183
- package/dist/lib/utils/errorHandling.d.ts +0 -398
- package/dist/lib/utils/errorHandling.js +0 -1282
- package/dist/lib/utils/evaluationUtils.d.ts +0 -27
- package/dist/lib/utils/evaluationUtils.js +0 -132
- package/dist/lib/utils/factoryProcessing.d.ts +0 -71
- package/dist/lib/utils/factoryProcessing.js +0 -590
- package/dist/lib/utils/fileDetector.d.ts +0 -198
- package/dist/lib/utils/fileDetector.js +0 -2806
- package/dist/lib/utils/generation.d.ts +0 -8
- package/dist/lib/utils/generation.js +0 -9
- package/dist/lib/utils/generationErrors.d.ts +0 -10
- package/dist/lib/utils/generationErrors.js +0 -11
- package/dist/lib/utils/imageCache.d.ts +0 -124
- package/dist/lib/utils/imageCache.js +0 -437
- package/dist/lib/utils/imageDetection.d.ts +0 -15
- package/dist/lib/utils/imageDetection.js +0 -53
- package/dist/lib/utils/imageProcessor.d.ts +0 -296
- package/dist/lib/utils/imageProcessor.js +0 -1158
- package/dist/lib/utils/isoBmff.d.ts +0 -24
- package/dist/lib/utils/isoBmff.js +0 -83
- package/dist/lib/utils/json/coerce.d.ts +0 -30
- package/dist/lib/utils/json/coerce.js +0 -412
- package/dist/lib/utils/json/extract.d.ts +0 -112
- package/dist/lib/utils/json/extract.js +0 -299
- package/dist/lib/utils/json/index.d.ts +0 -36
- package/dist/lib/utils/json/index.js +0 -37
- package/dist/lib/utils/json/safeParse.d.ts +0 -130
- package/dist/lib/utils/json/safeParse.js +0 -191
- package/dist/lib/utils/lifecycleCallbacks.d.ts +0 -56
- package/dist/lib/utils/lifecycleCallbacks.js +0 -100
- package/dist/lib/utils/lifecycleTimeout.d.ts +0 -25
- package/dist/lib/utils/lifecycleTimeout.js +0 -39
- package/dist/lib/utils/logSanitize.d.ts +0 -285
- package/dist/lib/utils/logSanitize.js +0 -555
- package/dist/lib/utils/logger.d.ts +0 -273
- package/dist/lib/utils/logger.js +0 -516
- package/dist/lib/utils/loggingFetch.d.ts +0 -29
- package/dist/lib/utils/loggingFetch.js +0 -60
- package/dist/lib/utils/loopUtils.d.ts +0 -70
- package/dist/lib/utils/loopUtils.js +0 -263
- package/dist/lib/utils/markupSniff.d.ts +0 -37
- package/dist/lib/utils/markupSniff.js +0 -125
- package/dist/lib/utils/mcpDefaults.d.ts +0 -54
- package/dist/lib/utils/mcpDefaults.js +0 -135
- package/dist/lib/utils/mcpErrorText.d.ts +0 -37
- package/dist/lib/utils/mcpErrorText.js +0 -95
- package/dist/lib/utils/mediaDuration.d.ts +0 -23
- package/dist/lib/utils/mediaDuration.js +0 -45
- package/dist/lib/utils/messageBuilder.d.ts +0 -59
- package/dist/lib/utils/messageBuilder.js +0 -2716
- package/dist/lib/utils/mimeTypeHints.d.ts +0 -40
- package/dist/lib/utils/mimeTypeHints.js +0 -122
- package/dist/lib/utils/modelAliasResolver.d.ts +0 -17
- package/dist/lib/utils/modelAliasResolver.js +0 -55
- package/dist/lib/utils/modelChoices.d.ts +0 -75
- package/dist/lib/utils/modelChoices.js +0 -698
- package/dist/lib/utils/modelDetection.d.ts +0 -37
- package/dist/lib/utils/modelDetection.js +0 -131
- package/dist/lib/utils/modelRouter.d.ts +0 -91
- package/dist/lib/utils/modelRouter.js +0 -293
- package/dist/lib/utils/multimodalOptionsBuilder.d.ts +0 -74
- package/dist/lib/utils/multimodalOptionsBuilder.js +0 -74
- package/dist/lib/utils/musicProcessor.d.ts +0 -77
- package/dist/lib/utils/musicProcessor.js +0 -190
- package/dist/lib/utils/noOutputSentinel.d.ts +0 -67
- package/dist/lib/utils/noOutputSentinel.js +0 -180
- package/dist/lib/utils/observabilityHelpers.d.ts +0 -27
- package/dist/lib/utils/observabilityHelpers.js +0 -48
- package/dist/lib/utils/optionsConversion.d.ts +0 -47
- package/dist/lib/utils/optionsConversion.js +0 -128
- package/dist/lib/utils/optionsUtils.d.ts +0 -175
- package/dist/lib/utils/optionsUtils.js +0 -970
- package/dist/lib/utils/parameterValidation.d.ts +0 -200
- package/dist/lib/utils/parameterValidation.js +0 -981
- package/dist/lib/utils/pdfProcessor.d.ts +0 -137
- package/dist/lib/utils/pdfProcessor.js +0 -689
- package/dist/lib/utils/performance.d.ts +0 -93
- package/dist/lib/utils/performance.js +0 -223
- package/dist/lib/utils/piiDetector.d.ts +0 -24
- package/dist/lib/utils/piiDetector.js +0 -221
- package/dist/lib/utils/pricing.d.ts +0 -26
- package/dist/lib/utils/pricing.js +0 -890
- package/dist/lib/utils/promptRedaction.d.ts +0 -22
- package/dist/lib/utils/promptRedaction.js +0 -63
- package/dist/lib/utils/providerConfig.d.ts +0 -393
- package/dist/lib/utils/providerConfig.js +0 -1363
- package/dist/lib/utils/providerErrorClassification.d.ts +0 -58
- package/dist/lib/utils/providerErrorClassification.js +0 -149
- package/dist/lib/utils/providerHealth.d.ts +0 -253
- package/dist/lib/utils/providerHealth.js +0 -1479
- package/dist/lib/utils/providerRetry.d.ts +0 -68
- package/dist/lib/utils/providerRetry.js +0 -230
- package/dist/lib/utils/providerSetupMessages.d.ts +0 -8
- package/dist/lib/utils/providerSetupMessages.js +0 -122
- package/dist/lib/utils/providerUtils.d.ts +0 -38
- package/dist/lib/utils/providerUtils.js +0 -366
- package/dist/lib/utils/rateLimiter.d.ts +0 -75
- package/dist/lib/utils/rateLimiter.js +0 -201
- package/dist/lib/utils/redis.d.ts +0 -119
- package/dist/lib/utils/redis.js +0 -530
- package/dist/lib/utils/responseValidator.d.ts +0 -21
- package/dist/lib/utils/responseValidator.js +0 -354
- package/dist/lib/utils/retryAfter.d.ts +0 -7
- package/dist/lib/utils/retryAfter.js +0 -44
- package/dist/lib/utils/retryHandler.d.ts +0 -82
- package/dist/lib/utils/retryHandler.js +0 -270
- package/dist/lib/utils/retryability.d.ts +0 -27
- package/dist/lib/utils/retryability.js +0 -45
- package/dist/lib/utils/safeFetch.d.ts +0 -26
- package/dist/lib/utils/safeFetch.js +0 -121
- package/dist/lib/utils/sanitizers/filename.d.ts +0 -116
- package/dist/lib/utils/sanitizers/filename.js +0 -366
- package/dist/lib/utils/sanitizers/html.d.ts +0 -170
- package/dist/lib/utils/sanitizers/html.js +0 -326
- package/dist/lib/utils/sanitizers/index.d.ts +0 -26
- package/dist/lib/utils/sanitizers/index.js +0 -30
- package/dist/lib/utils/sanitizers/svg.d.ts +0 -71
- package/dist/lib/utils/sanitizers/svg.js +0 -482
- package/dist/lib/utils/schemaConversion.d.ts +0 -56
- package/dist/lib/utils/schemaConversion.js +0 -656
- package/dist/lib/utils/sizeGuard.d.ts +0 -34
- package/dist/lib/utils/sizeGuard.js +0 -45
- package/dist/lib/utils/ssrfGuard.d.ts +0 -60
- package/dist/lib/utils/ssrfGuard.js +0 -446
- package/dist/lib/utils/sttProcessor.d.ts +0 -125
- package/dist/lib/utils/sttProcessor.js +0 -301
- package/dist/lib/utils/systemMessages.d.ts +0 -29
- package/dist/lib/utils/systemMessages.js +0 -45
- package/dist/lib/utils/taskClassificationUtils.d.ts +0 -55
- package/dist/lib/utils/taskClassificationUtils.js +0 -150
- package/dist/lib/utils/taskClassifier.d.ts +0 -23
- package/dist/lib/utils/taskClassifier.js +0 -95
- package/dist/lib/utils/textEncoding.d.ts +0 -25
- package/dist/lib/utils/textEncoding.js +0 -141
- package/dist/lib/utils/thinkingConfig.d.ts +0 -76
- package/dist/lib/utils/thinkingConfig.js +0 -105
- package/dist/lib/utils/timeout.d.ts +0 -158
- package/dist/lib/utils/timeout.js +0 -427
- package/dist/lib/utils/tokenEstimation.d.ts +0 -90
- package/dist/lib/utils/tokenEstimation.js +0 -187
- package/dist/lib/utils/tokenLimits.d.ts +0 -53
- package/dist/lib/utils/tokenLimits.js +0 -236
- package/dist/lib/utils/tokenUtils.d.ts +0 -101
- package/dist/lib/utils/tokenUtils.js +0 -323
- package/dist/lib/utils/tool.d.ts +0 -8
- package/dist/lib/utils/tool.js +0 -9
- package/dist/lib/utils/toolCallRepair.d.ts +0 -14
- package/dist/lib/utils/toolCallRepair.js +0 -286
- package/dist/lib/utils/toolChoice.d.ts +0 -4
- package/dist/lib/utils/toolChoice.js +0 -7
- package/dist/lib/utils/toolEndEmitter.d.ts +0 -25
- package/dist/lib/utils/toolEndEmitter.js +0 -65
- package/dist/lib/utils/toolUtils.d.ts +0 -40
- package/dist/lib/utils/toolUtils.js +0 -76
- package/dist/lib/utils/transformationUtils.d.ts +0 -218
- package/dist/lib/utils/transformationUtils.js +0 -578
- package/dist/lib/utils/tripwireEvaluator.d.ts +0 -73
- package/dist/lib/utils/tripwireEvaluator.js +0 -285
- package/dist/lib/utils/tryImport.d.ts +0 -35
- package/dist/lib/utils/tryImport.js +0 -95
- package/dist/lib/utils/ttsProcessor.d.ts +0 -159
- package/dist/lib/utils/ttsProcessor.js +0 -293
- package/dist/lib/utils/typeUtils.d.ts +0 -77
- package/dist/lib/utils/typeUtils.js +0 -98
- package/dist/lib/utils/videoAnalysisProcessor.d.ts +0 -24
- package/dist/lib/utils/videoAnalysisProcessor.js +0 -61
- package/dist/lib/utils/videoProcessor.d.ts +0 -64
- package/dist/lib/utils/videoProcessor.js +0 -196
- package/dist/lib/voice/RealtimeVoiceAPI.d.ts +0 -186
- package/dist/lib/voice/RealtimeVoiceAPI.js +0 -431
- package/dist/lib/voice/audio-utils.d.ts +0 -135
- package/dist/lib/voice/audio-utils.js +0 -435
- package/dist/lib/voice/errors.d.ts +0 -123
- package/dist/lib/voice/errors.js +0 -386
- package/dist/lib/voice/index.d.ts +0 -49
- package/dist/lib/voice/index.js +0 -177
- package/dist/lib/voice/livekit/brain.d.ts +0 -21
- package/dist/lib/voice/livekit/brain.js +0 -75
- package/dist/lib/voice/livekit/config.d.ts +0 -52
- package/dist/lib/voice/livekit/config.js +0 -134
- package/dist/lib/voice/livekit/eventBridge.d.ts +0 -27
- package/dist/lib/voice/livekit/eventBridge.js +0 -360
- package/dist/lib/voice/livekit/index.d.ts +0 -22
- package/dist/lib/voice/livekit/index.js +0 -23
- package/dist/lib/voice/livekit/realtimeEventBridge.d.ts +0 -14
- package/dist/lib/voice/livekit/realtimeEventBridge.js +0 -161
- package/dist/lib/voice/livekit/realtimeMcpTools.d.ts +0 -31
- package/dist/lib/voice/livekit/realtimeMcpTools.js +0 -206
- package/dist/lib/voice/livekit/realtimeVoiceAgent.d.ts +0 -26
- package/dist/lib/voice/livekit/realtimeVoiceAgent.js +0 -365
- package/dist/lib/voice/livekit/roomContext.d.ts +0 -23
- package/dist/lib/voice/livekit/roomContext.js +0 -57
- package/dist/lib/voice/livekit/roomDispatch.d.ts +0 -24
- package/dist/lib/voice/livekit/roomDispatch.js +0 -31
- package/dist/lib/voice/livekit/schemaSanitizer.d.ts +0 -26
- package/dist/lib/voice/livekit/schemaSanitizer.js +0 -144
- package/dist/lib/voice/livekit/tokens.d.ts +0 -19
- package/dist/lib/voice/livekit/tokens.js +0 -51
- package/dist/lib/voice/livekit/vertexAuth.d.ts +0 -30
- package/dist/lib/voice/livekit/vertexAuth.js +0 -73
- package/dist/lib/voice/livekit/voiceAgent.d.ts +0 -32
- package/dist/lib/voice/livekit/voiceAgent.js +0 -425
- package/dist/lib/voice/livekit/voiceAgentWorker.d.ts +0 -29
- package/dist/lib/voice/livekit/voiceAgentWorker.js +0 -122
- package/dist/lib/voice/providers/AzureSTT.d.ts +0 -47
- package/dist/lib/voice/providers/AzureSTT.js +0 -345
- package/dist/lib/voice/providers/AzureTTS.d.ts +0 -59
- package/dist/lib/voice/providers/AzureTTS.js +0 -349
- package/dist/lib/voice/providers/CartesiaTTS.d.ts +0 -31
- package/dist/lib/voice/providers/CartesiaTTS.js +0 -189
- package/dist/lib/voice/providers/DeepgramSTT.d.ts +0 -40
- package/dist/lib/voice/providers/DeepgramSTT.js +0 -550
- package/dist/lib/voice/providers/ElevenLabsTTS.d.ts +0 -53
- package/dist/lib/voice/providers/ElevenLabsTTS.js +0 -311
- package/dist/lib/voice/providers/FishAudioTTS.d.ts +0 -27
- package/dist/lib/voice/providers/FishAudioTTS.js +0 -183
- package/dist/lib/voice/providers/GeminiLive.d.ts +0 -52
- package/dist/lib/voice/providers/GeminiLive.js +0 -372
- package/dist/lib/voice/providers/GoogleSTT.d.ts +0 -60
- package/dist/lib/voice/providers/GoogleSTT.js +0 -454
- package/dist/lib/voice/providers/OpenAIRealtime.d.ts +0 -47
- package/dist/lib/voice/providers/OpenAIRealtime.js +0 -412
- package/dist/lib/voice/providers/OpenAISTT.d.ts +0 -41
- package/dist/lib/voice/providers/OpenAISTT.js +0 -286
- package/dist/lib/voice/providers/OpenAITTS.d.ts +0 -55
- package/dist/lib/voice/providers/OpenAITTS.js +0 -285
- package/dist/lib/voice/stream-handler.d.ts +0 -166
- package/dist/lib/voice/stream-handler.js +0 -514
- package/dist/lib/workflow/LAYER-EXAMPLES.d.ts +0 -13
- package/dist/lib/workflow/LAYER-EXAMPLES.js +0 -312
- package/dist/lib/workflow/PROMPT-EXAMPLES.d.ts +0 -117
- package/dist/lib/workflow/PROMPT-EXAMPLES.js +0 -246
- package/dist/lib/workflow/config.d.ts +0 -376
- package/dist/lib/workflow/config.js +0 -399
- package/dist/lib/workflow/core/ensembleExecutor.d.ts +0 -55
- package/dist/lib/workflow/core/ensembleExecutor.js +0 -451
- package/dist/lib/workflow/core/judgeScorer.d.ts +0 -25
- package/dist/lib/workflow/core/judgeScorer.js +0 -568
- package/dist/lib/workflow/core/responseConditioner.d.ts +0 -21
- package/dist/lib/workflow/core/responseConditioner.js +0 -243
- package/dist/lib/workflow/core/workflowRegistry.d.ts +0 -72
- package/dist/lib/workflow/core/workflowRegistry.js +0 -305
- package/dist/lib/workflow/core/workflowRunner.d.ts +0 -61
- package/dist/lib/workflow/core/workflowRunner.js +0 -642
- package/dist/lib/workflow/index.d.ts +0 -21
- package/dist/lib/workflow/index.js +0 -46
- package/dist/lib/workflow/utils/workflowMetrics.d.ts +0 -74
- package/dist/lib/workflow/utils/workflowMetrics.js +0 -312
- package/dist/lib/workflow/utils/workflowValidation.d.ts +0 -29
- package/dist/lib/workflow/utils/workflowValidation.js +0 -421
- package/dist/lib/workflow/workflows/adaptiveWorkflow.d.ts +0 -72
- package/dist/lib/workflow/workflows/adaptiveWorkflow.js +0 -367
- package/dist/lib/workflow/workflows/consensusWorkflow.d.ts +0 -69
- package/dist/lib/workflow/workflows/consensusWorkflow.js +0 -193
- package/dist/lib/workflow/workflows/fallbackWorkflow.d.ts +0 -49
- package/dist/lib/workflow/workflows/fallbackWorkflow.js +0 -226
- package/dist/lib/workflow/workflows/multiJudgeWorkflow.d.ts +0 -70
- package/dist/lib/workflow/workflows/multiJudgeWorkflow.js +0 -352
- package/dist/providers/googleVertex/utils.d.ts +0 -12
- package/dist/providers/googleVertex/utils.js +0 -286
|
@@ -1,1479 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Provider Health Checking System
|
|
3
|
-
* Prevents 500 errors by validating provider availability and configuration
|
|
4
|
-
*/
|
|
5
|
-
import { logger } from "./logger.js";
|
|
6
|
-
import { AIProviderName, OpenAIModels, GoogleAIModels, AnthropicModels, BedrockModels, } from "../constants/enums.js";
|
|
7
|
-
import { PROJECT_ID_FORMAT, satisfiesFallbacks } from "./providerConfig.js";
|
|
8
|
-
import { basename } from "path";
|
|
9
|
-
import { createProxyFetch } from "../proxy/proxyFetch.js";
|
|
10
|
-
import { DEFAULT_OLLAMA_MODEL } from "../providers/ollama/constants.js";
|
|
11
|
-
import { ProviderFactory } from "../factories/providerFactory.js";
|
|
12
|
-
export class ProviderHealthChecker {
|
|
13
|
-
static healthCache = new Map();
|
|
14
|
-
static DEFAULT_TIMEOUT = 5000; // 5 seconds
|
|
15
|
-
static DEFAULT_CACHE_AGE = 300000; // 5 minutes
|
|
16
|
-
static CONSECUTIVE_FAILURE_THRESHOLD = ProviderHealthChecker.getValidatedFailureThreshold();
|
|
17
|
-
static consecutiveFailures = new Map();
|
|
18
|
-
/**
|
|
19
|
-
* Validate and return a safe failure threshold value
|
|
20
|
-
*/
|
|
21
|
-
static getValidatedFailureThreshold() {
|
|
22
|
-
const envValue = process.env.PROVIDER_FAILURE_THRESHOLD;
|
|
23
|
-
if (!envValue) {
|
|
24
|
-
return 3; // default
|
|
25
|
-
}
|
|
26
|
-
const parsed = Number(envValue);
|
|
27
|
-
if (isNaN(parsed) || parsed <= 0 || parsed > 10) {
|
|
28
|
-
logger.warn(`Invalid PROVIDER_FAILURE_THRESHOLD: ${envValue} (must be between 1 and 10), using default: 3`);
|
|
29
|
-
return 3;
|
|
30
|
-
}
|
|
31
|
-
return parsed;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Comprehensive health check for a provider
|
|
35
|
-
*/
|
|
36
|
-
static async checkProviderHealth(providerName, options = {}) {
|
|
37
|
-
const { timeout = this.DEFAULT_TIMEOUT, includeConnectivityTest = false, includeModelValidation = false, cacheResults = true, maxCacheAge = this.DEFAULT_CACHE_AGE, } = options;
|
|
38
|
-
// Check cache first
|
|
39
|
-
if (cacheResults) {
|
|
40
|
-
const cached = this.getCachedHealth(providerName, maxCacheAge);
|
|
41
|
-
if (cached) {
|
|
42
|
-
logger.debug(`Using cached health status for ${providerName}`);
|
|
43
|
-
return cached;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
// Check if provider has consecutive failures (blacklisting)
|
|
47
|
-
const failureCount = this.consecutiveFailures.get(providerName) || 0;
|
|
48
|
-
if (failureCount >= this.CONSECUTIVE_FAILURE_THRESHOLD) {
|
|
49
|
-
const healthStatus = {
|
|
50
|
-
provider: providerName,
|
|
51
|
-
isHealthy: false,
|
|
52
|
-
isConfigured: false,
|
|
53
|
-
hasApiKey: false,
|
|
54
|
-
lastChecked: new Date(),
|
|
55
|
-
error: `Provider blacklisted after ${failureCount} consecutive failures`,
|
|
56
|
-
warning: "Provider will be retried after cache TTL expires",
|
|
57
|
-
configurationIssues: [
|
|
58
|
-
`Blacklisted due to ${failureCount} consecutive failures`,
|
|
59
|
-
],
|
|
60
|
-
recommendations: ["Check provider status and configuration"],
|
|
61
|
-
};
|
|
62
|
-
logger.warn(`Provider ${providerName} blacklisted due to consecutive failures`, { failureCount });
|
|
63
|
-
return healthStatus;
|
|
64
|
-
}
|
|
65
|
-
const startTime = Date.now();
|
|
66
|
-
const healthStatus = {
|
|
67
|
-
provider: providerName,
|
|
68
|
-
isHealthy: false,
|
|
69
|
-
isConfigured: false,
|
|
70
|
-
hasApiKey: false,
|
|
71
|
-
lastChecked: new Date(),
|
|
72
|
-
configurationIssues: [],
|
|
73
|
-
recommendations: [],
|
|
74
|
-
};
|
|
75
|
-
try {
|
|
76
|
-
// 1. Check environment configuration
|
|
77
|
-
await this.checkEnvironmentConfiguration(providerName, healthStatus, timeout);
|
|
78
|
-
// 2. Check API key validity (basic format validation)
|
|
79
|
-
await this.checkApiKeyValidity(providerName, healthStatus);
|
|
80
|
-
// 3. Optional: Connectivity test
|
|
81
|
-
if (includeConnectivityTest) {
|
|
82
|
-
await this.checkConnectivity(providerName, healthStatus, timeout);
|
|
83
|
-
}
|
|
84
|
-
// 4. Optional: Model validation
|
|
85
|
-
if (includeModelValidation) {
|
|
86
|
-
await this.checkModelAvailability(providerName, healthStatus);
|
|
87
|
-
}
|
|
88
|
-
// 5. Determine overall health
|
|
89
|
-
healthStatus.isHealthy =
|
|
90
|
-
healthStatus.isConfigured &&
|
|
91
|
-
healthStatus.hasApiKey &&
|
|
92
|
-
healthStatus.configurationIssues.length === 0;
|
|
93
|
-
healthStatus.responseTime = Date.now() - startTime;
|
|
94
|
-
// Cache results
|
|
95
|
-
if (cacheResults) {
|
|
96
|
-
this.healthCache.set(providerName, {
|
|
97
|
-
status: healthStatus,
|
|
98
|
-
timestamp: Date.now(),
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
// Reset failure count on success
|
|
102
|
-
if (healthStatus.isHealthy) {
|
|
103
|
-
this.consecutiveFailures.delete(providerName);
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
// Track consecutive failures
|
|
107
|
-
const currentFailures = this.consecutiveFailures.get(providerName) || 0;
|
|
108
|
-
this.consecutiveFailures.set(providerName, currentFailures + 1);
|
|
109
|
-
}
|
|
110
|
-
logger.debug(`Health check completed for ${providerName}`, {
|
|
111
|
-
isHealthy: healthStatus.isHealthy,
|
|
112
|
-
responseTime: healthStatus.responseTime,
|
|
113
|
-
issues: healthStatus.configurationIssues.length,
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
catch (error) {
|
|
117
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
118
|
-
healthStatus.error = errorMessage;
|
|
119
|
-
healthStatus.configurationIssues.push(`Health check failed: ${errorMessage}`);
|
|
120
|
-
healthStatus.responseTime = Date.now() - startTime;
|
|
121
|
-
// Track consecutive failures
|
|
122
|
-
const currentFailures = this.consecutiveFailures.get(providerName) || 0;
|
|
123
|
-
this.consecutiveFailures.set(providerName, currentFailures + 1);
|
|
124
|
-
logger.warn(`Health check failed for ${providerName}`, {
|
|
125
|
-
error: errorMessage,
|
|
126
|
-
consecutiveFailures: currentFailures + 1,
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
return healthStatus;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Check environment configuration for a provider
|
|
133
|
-
*/
|
|
134
|
-
static async checkEnvironmentConfiguration(providerName, healthStatus, timeout) {
|
|
135
|
-
const requiredEnvVars = this.getRequiredEnvironmentVariables(providerName);
|
|
136
|
-
logger.debug(`[ProviderHealthChecker] Checking environment configuration for ${providerName}`, {
|
|
137
|
-
requiredEnvVars,
|
|
138
|
-
presentEnvVars: requiredEnvVars.map((envVar) => ({
|
|
139
|
-
name: envVar,
|
|
140
|
-
present: !!process.env[envVar],
|
|
141
|
-
hasValue: !!(process.env[envVar] && process.env[envVar].trim() !== ""),
|
|
142
|
-
})),
|
|
143
|
-
});
|
|
144
|
-
let allConfigured = true;
|
|
145
|
-
const missingVars = [];
|
|
146
|
-
for (const envVar of requiredEnvVars) {
|
|
147
|
-
const value = process.env[envVar];
|
|
148
|
-
if (!value || value.trim() === "") {
|
|
149
|
-
allConfigured = false;
|
|
150
|
-
missingVars.push(envVar);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
healthStatus.isConfigured = allConfigured;
|
|
154
|
-
logger.debug(`[ProviderHealthChecker] Environment configuration result for ${providerName}`, {
|
|
155
|
-
isConfigured: allConfigured,
|
|
156
|
-
missingVars,
|
|
157
|
-
totalRequired: requiredEnvVars.length,
|
|
158
|
-
totalMissing: missingVars.length,
|
|
159
|
-
});
|
|
160
|
-
if (!allConfigured) {
|
|
161
|
-
healthStatus.configurationIssues.push(`Missing required environment variables: ${missingVars.join(", ")}`);
|
|
162
|
-
healthStatus.recommendations.push(`Set the following environment variables: ${missingVars.join(", ")}`);
|
|
163
|
-
}
|
|
164
|
-
// Provider-specific configuration checks
|
|
165
|
-
await this.checkProviderSpecificConfig(providerName, healthStatus, timeout);
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* Check API key validity (format validation)
|
|
169
|
-
*/
|
|
170
|
-
static async checkApiKeyValidity(providerName, healthStatus) {
|
|
171
|
-
// 🎯 SPECIAL HANDLING FOR VERTEX AI: Check both auth methods
|
|
172
|
-
if (providerName === AIProviderName.VERTEX) {
|
|
173
|
-
logger.debug("Vertex AI authentication check starting", {
|
|
174
|
-
providerName,
|
|
175
|
-
});
|
|
176
|
-
// Derive auth-var acceptance from the vertex descriptor instead of a
|
|
177
|
-
// hand-maintained var list, so this stays in sync with the real
|
|
178
|
-
// gating logic (hasGoogleCredentials() in googleVertex/client.ts and
|
|
179
|
-
// googleVertex/utils.ts): extraRequired.every(...) ||
|
|
180
|
-
// extraRequiredFallbacks.some(...), the same pattern used by
|
|
181
|
-
// hasProviderEnvVars() (providerUtils.ts), setup.ts, and
|
|
182
|
-
// environmentManager.ts. The old two-method check here only
|
|
183
|
-
// recognized GOOGLE_APPLICATION_CREDENTIALS or the
|
|
184
|
-
// GOOGLE_AUTH_CLIENT_EMAIL + GOOGLE_AUTH_PRIVATE_KEY pair — missing
|
|
185
|
-
// GOOGLE_SERVICE_ACCOUNT_KEY and, most importantly,
|
|
186
|
-
// GOOGLE_APPLICATION_CREDENTIALS_NEUROLINK, the descriptor's
|
|
187
|
-
// documented first-priority fallback. A user configured via that
|
|
188
|
-
// var alone had a fully working Vertex provider but was reported
|
|
189
|
-
// unhealthy here. Note: this is a presence-only check — it no
|
|
190
|
-
// longer verifies the GOOGLE_APPLICATION_CREDENTIALS file actually
|
|
191
|
-
// exists on disk (the old file-based method did via fs.access),
|
|
192
|
-
// matching the presence-only semantics already used by the other
|
|
193
|
-
// three callers of this pattern.
|
|
194
|
-
const descriptor = ProviderFactory.getDescriptor(AIProviderName.VERTEX);
|
|
195
|
-
const { extraRequired, extraRequiredFallbacks } = descriptor?.envVars ?? {};
|
|
196
|
-
const hasValidAuth = (extraRequired ?? []).every((v) => !!process.env[v]) ||
|
|
197
|
-
satisfiesFallbacks(extraRequiredFallbacks, process.env);
|
|
198
|
-
logger.debug("Vertex auth final result", { hasValidAuth });
|
|
199
|
-
if (hasValidAuth) {
|
|
200
|
-
healthStatus.hasApiKey = true;
|
|
201
|
-
logger.debug("Vertex auth SUCCESS");
|
|
202
|
-
}
|
|
203
|
-
else {
|
|
204
|
-
healthStatus.hasApiKey = false;
|
|
205
|
-
healthStatus.configurationIssues.push("Vertex AI authentication not found: set GOOGLE_APPLICATION_CREDENTIALS, GOOGLE_APPLICATION_CREDENTIALS_NEUROLINK, GOOGLE_SERVICE_ACCOUNT_KEY, or both GOOGLE_AUTH_CLIENT_EMAIL and GOOGLE_AUTH_PRIVATE_KEY");
|
|
206
|
-
logger.debug("Vertex auth FAILED", {
|
|
207
|
-
reason: "No valid auth method found",
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
return;
|
|
211
|
-
}
|
|
212
|
-
// Providers that don't use API keys directly
|
|
213
|
-
if (providerName === AIProviderName.OLLAMA ||
|
|
214
|
-
providerName === AIProviderName.BEDROCK ||
|
|
215
|
-
providerName === AIProviderName.LITELLM) {
|
|
216
|
-
healthStatus.hasApiKey = true;
|
|
217
|
-
return;
|
|
218
|
-
}
|
|
219
|
-
// 🔧 STANDARD HANDLING FOR OTHER PROVIDERS
|
|
220
|
-
const apiKeyVar = this.getApiKeyEnvironmentVariable(providerName);
|
|
221
|
-
const apiKey = process.env[apiKeyVar];
|
|
222
|
-
if (!apiKey) {
|
|
223
|
-
healthStatus.hasApiKey = false;
|
|
224
|
-
healthStatus.configurationIssues.push(`API key not found in ${apiKeyVar}`);
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
// Basic format validation
|
|
228
|
-
const isValidFormat = this.validateApiKeyFormat(providerName, apiKey);
|
|
229
|
-
if (!isValidFormat) {
|
|
230
|
-
healthStatus.hasApiKey = false;
|
|
231
|
-
healthStatus.configurationIssues.push(`API key format appears invalid for ${providerName}`);
|
|
232
|
-
healthStatus.recommendations.push(`Verify the API key format for ${providerName}`);
|
|
233
|
-
}
|
|
234
|
-
else {
|
|
235
|
-
healthStatus.hasApiKey = true;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* Check connectivity to provider endpoints
|
|
240
|
-
*/
|
|
241
|
-
static async checkConnectivity(providerName, healthStatus, timeout) {
|
|
242
|
-
const endpoint = this.getProviderHealthEndpoint(providerName);
|
|
243
|
-
if (!endpoint) {
|
|
244
|
-
healthStatus.warning = "No connectivity test available for this provider";
|
|
245
|
-
return;
|
|
246
|
-
}
|
|
247
|
-
const headers = {
|
|
248
|
-
"User-Agent": "NeuroLink-HealthCheck/1.0",
|
|
249
|
-
...this.getConnectivityHeaders(providerName),
|
|
250
|
-
};
|
|
251
|
-
try {
|
|
252
|
-
const controller = new AbortController();
|
|
253
|
-
const timeoutId = setTimeout(() => controller.abort(), timeout);
|
|
254
|
-
try {
|
|
255
|
-
const proxyFetch = createProxyFetch();
|
|
256
|
-
let response = await proxyFetch(endpoint, {
|
|
257
|
-
method: "HEAD",
|
|
258
|
-
signal: controller.signal,
|
|
259
|
-
headers,
|
|
260
|
-
});
|
|
261
|
-
// Fallback to GET if HEAD returns 405 (Method Not Allowed) for restrictive gateways
|
|
262
|
-
if (response.status === 405) {
|
|
263
|
-
response = await proxyFetch(endpoint, {
|
|
264
|
-
method: "GET",
|
|
265
|
-
signal: controller.signal,
|
|
266
|
-
headers,
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
if (!response.ok) {
|
|
270
|
-
healthStatus.configurationIssues.push(`Connectivity test failed: HTTP ${response.status}`);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
finally {
|
|
274
|
-
clearTimeout(timeoutId);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
catch (error) {
|
|
278
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
279
|
-
// Provide specific error messages for common network issues
|
|
280
|
-
if (errorMessage.includes("abort")) {
|
|
281
|
-
healthStatus.configurationIssues.push(`Connectivity test timed out after ${timeout}ms`);
|
|
282
|
-
}
|
|
283
|
-
else if (errorMessage.includes("ENOTFOUND") ||
|
|
284
|
-
errorMessage.includes("getaddrinfo")) {
|
|
285
|
-
healthStatus.configurationIssues.push(`DNS resolution failed: Cannot resolve hostname for ${providerName}`);
|
|
286
|
-
}
|
|
287
|
-
else if (errorMessage.includes("ECONNREFUSED")) {
|
|
288
|
-
healthStatus.configurationIssues.push(`Connection refused: ${providerName} service is not accepting connections`);
|
|
289
|
-
}
|
|
290
|
-
else if (errorMessage.includes("ETIMEDOUT")) {
|
|
291
|
-
healthStatus.configurationIssues.push(`Connection timeout: ${providerName} service did not respond`);
|
|
292
|
-
}
|
|
293
|
-
else if (errorMessage.includes("certificate") ||
|
|
294
|
-
errorMessage.includes("SSL") ||
|
|
295
|
-
errorMessage.includes("TLS")) {
|
|
296
|
-
healthStatus.configurationIssues.push(`SSL/TLS certificate error: ${providerName} has certificate issues`);
|
|
297
|
-
}
|
|
298
|
-
else if (errorMessage.includes("ECONNRESET")) {
|
|
299
|
-
healthStatus.configurationIssues.push(`Connection reset: ${providerName} terminated the connection`);
|
|
300
|
-
}
|
|
301
|
-
else if (errorMessage.includes("network") ||
|
|
302
|
-
errorMessage.includes("offline")) {
|
|
303
|
-
healthStatus.configurationIssues.push(`Network error: Check internet connectivity and firewall settings`);
|
|
304
|
-
}
|
|
305
|
-
else {
|
|
306
|
-
healthStatus.configurationIssues.push(`Connectivity test failed: ${errorMessage}`);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
static getConnectivityHeaders(providerName) {
|
|
311
|
-
if (providerName === AIProviderName.LITELLM) {
|
|
312
|
-
return {
|
|
313
|
-
Authorization: `Bearer ${process.env.LITELLM_API_KEY || "sk-anything"}`,
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
return {};
|
|
317
|
-
}
|
|
318
|
-
/**
|
|
319
|
-
* Check model availability (if possible without making API calls)
|
|
320
|
-
*/
|
|
321
|
-
static async checkModelAvailability(providerName, healthStatus) {
|
|
322
|
-
// Basic model name validation and recommendations
|
|
323
|
-
const commonModels = this.getCommonModelsForProvider(providerName);
|
|
324
|
-
if (commonModels.length > 0) {
|
|
325
|
-
if (providerName === AIProviderName.VERTEX) {
|
|
326
|
-
// Provide detailed information about dual provider architecture
|
|
327
|
-
healthStatus.recommendations.push(`Available models for ${providerName} (using dual provider architecture):\n` +
|
|
328
|
-
` Google Models (via vertex provider):\n` +
|
|
329
|
-
` • gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite\n` +
|
|
330
|
-
` • gemini-2.0-flash-001, gemini-1.5-pro, gemini-1.5-flash\n` +
|
|
331
|
-
` Anthropic Models (via vertexAnthropic provider):\n` +
|
|
332
|
-
` • claude-sonnet-4@20250514, claude-opus-4@20250514\n` +
|
|
333
|
-
` • claude-3-5-sonnet-20241022, claude-3-5-haiku-20241022\n` +
|
|
334
|
-
` • claude-3-sonnet-20240229, claude-3-haiku-20240307, claude-3-opus-20240229\n` +
|
|
335
|
-
` Implementation: Uses native SDKs (@google/genai for Gemini, @anthropic-ai/vertex-sdk for Claude)\n` +
|
|
336
|
-
` Authentication: Requires Google Cloud project with Vertex AI API enabled\n` +
|
|
337
|
-
` Note: Anthropic models require Anthropic integration in your Google Cloud project`);
|
|
338
|
-
}
|
|
339
|
-
else {
|
|
340
|
-
healthStatus.recommendations.push(`Common models for ${providerName}: ${commonModels.slice(0, 3).join(", ")}`);
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
/**
|
|
345
|
-
* Get required environment variables for a provider.
|
|
346
|
-
*
|
|
347
|
-
* Returns `[]` for providers with `descriptor.credentialsResolvedExternally
|
|
348
|
-
* === true` (Vertex, Bedrock, LiteLLM) — the check in
|
|
349
|
-
* checkEnvironmentConfiguration() below ANDs every entry in the returned
|
|
350
|
-
* list together, which can't express Vertex's file-OR-individual-creds-
|
|
351
|
-
* OR-service-account auth, Bedrock's AWS SDK default provider chain
|
|
352
|
-
* (profile / IAM role, no env vars at all), or LiteLLM's documented
|
|
353
|
-
* zero-config local proxy. Their real requirement is validated by
|
|
354
|
-
* checkProviderSpecificConfig()'s dedicated per-provider checks instead.
|
|
355
|
-
* Naively deriving [apiKey, ...extraRequired] from the descriptor for
|
|
356
|
-
* these three (as for the other 27 providers) would make
|
|
357
|
-
* checkEnvironmentConfiguration() push a false "missing environment
|
|
358
|
-
* variables" issue — and therefore isHealthy=false — for legitimate
|
|
359
|
-
* fallback-based Vertex auth, AWS_PROFILE/IAM-role Bedrock auth, and
|
|
360
|
-
* unauthenticated local LiteLLM proxies. See hasProviderEnvVars() in
|
|
361
|
-
* providerUtils.ts for the equivalent OR-aware check used for
|
|
362
|
-
* auto-select gating. See `ProviderDescriptor.credentialsResolvedExternally`
|
|
363
|
-
* (types/providers.ts) for the field's full documentation.
|
|
364
|
-
*/
|
|
365
|
-
static getRequiredEnvironmentVariables(providerName) {
|
|
366
|
-
// Resolve the descriptor FIRST so the field check below is keyed on
|
|
367
|
-
// the canonical, alias-resolved `descriptor.credentialsResolvedExternally`
|
|
368
|
-
// — not the raw, possibly-aliased `providerName` argument. Checking the
|
|
369
|
-
// raw input here would let documented aliases (e.g. "googleVertex" for
|
|
370
|
-
// vertex, "aws" for bedrock) skip the delegation and fall through to
|
|
371
|
-
// the naive [apiKey, ...extraRequired] derivation below, reproducing
|
|
372
|
-
// the exact false "missing environment variables" regression this
|
|
373
|
-
// field exists to prevent.
|
|
374
|
-
const descriptor = ProviderFactory.getDescriptor(providerName);
|
|
375
|
-
if (!descriptor) {
|
|
376
|
-
return [];
|
|
377
|
-
}
|
|
378
|
-
if (descriptor.credentialsResolvedExternally) {
|
|
379
|
-
return [];
|
|
380
|
-
}
|
|
381
|
-
const { apiKey, extraRequired } = descriptor.envVars;
|
|
382
|
-
return [...(apiKey ? [apiKey] : []), ...(extraRequired ?? [])];
|
|
383
|
-
}
|
|
384
|
-
/**
|
|
385
|
-
* Get API key environment variable for a provider.
|
|
386
|
-
*
|
|
387
|
-
* Dead code at its sole call site today (checkApiKeyValidity() early-
|
|
388
|
-
* returns for VERTEX/OLLAMA/BEDROCK/LITELLM before reaching this), but
|
|
389
|
-
* now `static` (public) so a future direct caller is plausible — hence
|
|
390
|
-
* the two intentional diffs from the original hand-written switch are
|
|
391
|
-
* documented here rather than left silent:
|
|
392
|
-
* - vertex: old switch returned "GOOGLE_APPLICATION_CREDENTIALS"
|
|
393
|
-
* (one of several valid auth vars); the descriptor's `envVars.apiKey`
|
|
394
|
-
* is "GOOGLE_CLOUD_PROJECT_ID" instead — the actual identity var for
|
|
395
|
-
* the provider, not one specific credential-supply mechanism.
|
|
396
|
-
* - ollama: old switch returned "OLLAMA_BASE_URL"; the descriptor has
|
|
397
|
-
* no `envVars.apiKey` for ollama (it's a local, unauthenticated
|
|
398
|
-
* runtime), so this now returns "".
|
|
399
|
-
* Both are kept deliberately (semantically truer identity vars) rather
|
|
400
|
-
* than reproduced byte-for-byte from the old switch.
|
|
401
|
-
*/
|
|
402
|
-
static getApiKeyEnvironmentVariable(providerName) {
|
|
403
|
-
return ProviderFactory.getDescriptor(providerName)?.envVars.apiKey ?? "";
|
|
404
|
-
}
|
|
405
|
-
/**
|
|
406
|
-
* Validate API key format for a provider
|
|
407
|
-
*/
|
|
408
|
-
static validateApiKeyFormat(providerName, apiKey) {
|
|
409
|
-
// Vertex's "API key" is really a credentials file path (or an inline
|
|
410
|
-
// JSON blob via GOOGLE_SERVICE_ACCOUNT_KEY) — never governed by the
|
|
411
|
-
// shared API_KEY_FORMATS regexes. Preserved exactly from the original
|
|
412
|
-
// switch even though checkApiKeyValidity() early-returns before ever
|
|
413
|
-
// reaching this call for Vertex today; kept correct for any other/
|
|
414
|
-
// future caller.
|
|
415
|
-
if (providerName === AIProviderName.VERTEX) {
|
|
416
|
-
return apiKey.endsWith(".json") || apiKey.includes("type");
|
|
417
|
-
}
|
|
418
|
-
const descriptor = ProviderFactory.getDescriptor(providerName);
|
|
419
|
-
if (!descriptor?.apiKeyFormatPattern) {
|
|
420
|
-
// Providers with no documented format (or local runtimes / providers
|
|
421
|
-
// usable with zero configuration) are accepted as-is — matches the
|
|
422
|
-
// old switch's per-provider `default: true`/no-format-check branches
|
|
423
|
-
// (ollama, litellm).
|
|
424
|
-
if (descriptor?.localRuntime || descriptor?.envVars.optional) {
|
|
425
|
-
return true;
|
|
426
|
-
}
|
|
427
|
-
return apiKey.length > 0;
|
|
428
|
-
}
|
|
429
|
-
return descriptor.apiKeyFormatPattern.test(apiKey);
|
|
430
|
-
}
|
|
431
|
-
/**
|
|
432
|
-
* Get health check endpoint for connectivity testing
|
|
433
|
-
*/
|
|
434
|
-
static getProviderHealthEndpoint(providerName) {
|
|
435
|
-
const descriptor = ProviderFactory.getDescriptor(providerName);
|
|
436
|
-
if (descriptor?.healthCheck !== "models-probe") {
|
|
437
|
-
return null;
|
|
438
|
-
}
|
|
439
|
-
// OpenAI/LiteLLM/Ollama each need a provider-specific URL builder that
|
|
440
|
-
// isn't pure descriptor data (LiteLLM/Ollama depend on the configured
|
|
441
|
-
// base URL) — keep the existing per-provider dispatch for the 3
|
|
442
|
-
// models-probe providers, now gated on the descriptor instead of a
|
|
443
|
-
// hardcoded name list.
|
|
444
|
-
switch (descriptor.name) {
|
|
445
|
-
case AIProviderName.OPENAI:
|
|
446
|
-
return "https://api.openai.com/v1/models";
|
|
447
|
-
case AIProviderName.LITELLM:
|
|
448
|
-
return this.getLiteLLMModelsUrl();
|
|
449
|
-
case AIProviderName.OLLAMA:
|
|
450
|
-
return this.getOllamaTagsUrl();
|
|
451
|
-
default:
|
|
452
|
-
return null;
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
/**
|
|
456
|
-
* Provider-specific configuration checks
|
|
457
|
-
*/
|
|
458
|
-
static async checkProviderSpecificConfig(providerName, healthStatus, timeout) {
|
|
459
|
-
switch (providerName) {
|
|
460
|
-
case AIProviderName.VERTEX:
|
|
461
|
-
await this.checkVertexAIConfig(healthStatus);
|
|
462
|
-
break;
|
|
463
|
-
case AIProviderName.BEDROCK:
|
|
464
|
-
await this.checkBedrockConfig(healthStatus);
|
|
465
|
-
break;
|
|
466
|
-
case AIProviderName.AZURE:
|
|
467
|
-
await this.checkAzureConfig(healthStatus);
|
|
468
|
-
break;
|
|
469
|
-
case AIProviderName.LITELLM:
|
|
470
|
-
await this.checkLiteLLMConfig(healthStatus, timeout);
|
|
471
|
-
break;
|
|
472
|
-
case AIProviderName.OLLAMA:
|
|
473
|
-
await this.checkOllamaConfig(healthStatus, timeout);
|
|
474
|
-
break;
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
/**
|
|
478
|
-
* Check Vertex AI configuration
|
|
479
|
-
*/
|
|
480
|
-
static async checkVertexAIConfig(healthStatus) {
|
|
481
|
-
logger.debug("Starting Vertex AI health check");
|
|
482
|
-
const projectId = this.getVertexProjectId();
|
|
483
|
-
if (!projectId) {
|
|
484
|
-
healthStatus.configurationIssues.push("Google Cloud project ID not set");
|
|
485
|
-
healthStatus.recommendations.push("Set one of: GOOGLE_VERTEX_PROJECT, GOOGLE_CLOUD_PROJECT_ID, GOOGLE_PROJECT_ID, or GOOGLE_CLOUD_PROJECT");
|
|
486
|
-
}
|
|
487
|
-
const hasValidAuth = await this.checkVertexAuthentication(healthStatus);
|
|
488
|
-
if (projectId && hasValidAuth) {
|
|
489
|
-
healthStatus.isConfigured = true;
|
|
490
|
-
logger.debug("Vertex AI health check PASSED");
|
|
491
|
-
}
|
|
492
|
-
else {
|
|
493
|
-
logger.debug("Vertex AI health check FAILED");
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
/**
|
|
497
|
-
* Get Vertex AI project ID from environment variables
|
|
498
|
-
*/
|
|
499
|
-
static getVertexProjectId() {
|
|
500
|
-
return (process.env.GOOGLE_PROJECT_ID ||
|
|
501
|
-
process.env.GOOGLE_CLOUD_PROJECT_ID ||
|
|
502
|
-
process.env.GOOGLE_VERTEX_PROJECT ||
|
|
503
|
-
process.env.GOOGLE_CLOUD_PROJECT ||
|
|
504
|
-
process.env.VERTEX_PROJECT_ID);
|
|
505
|
-
}
|
|
506
|
-
/**
|
|
507
|
-
* Check Vertex AI authentication
|
|
508
|
-
*/
|
|
509
|
-
static async checkVertexAuthentication(healthStatus) {
|
|
510
|
-
let hasValidAuth = false;
|
|
511
|
-
if (process.env.GOOGLE_APPLICATION_CREDENTIALS) {
|
|
512
|
-
hasValidAuth = await this.checkGoogleApplicationCredentials(healthStatus);
|
|
513
|
-
}
|
|
514
|
-
if (!hasValidAuth) {
|
|
515
|
-
hasValidAuth = this.checkExtraRequiredFallbackCredentials(healthStatus);
|
|
516
|
-
}
|
|
517
|
-
if (!hasValidAuth) {
|
|
518
|
-
healthStatus.configurationIssues.push("Google Cloud authentication not configured or credentials file missing");
|
|
519
|
-
healthStatus.recommendations.push("Set either GOOGLE_APPLICATION_CREDENTIALS (valid file path), GOOGLE_APPLICATION_CREDENTIALS_NEUROLINK, GOOGLE_SERVICE_ACCOUNT_KEY (base64), or both GOOGLE_AUTH_CLIENT_EMAIL and GOOGLE_AUTH_PRIVATE_KEY");
|
|
520
|
-
}
|
|
521
|
-
return hasValidAuth;
|
|
522
|
-
}
|
|
523
|
-
/**
|
|
524
|
-
* Check Google Application Credentials file
|
|
525
|
-
*/
|
|
526
|
-
static async checkGoogleApplicationCredentials(healthStatus) {
|
|
527
|
-
const credentialsPath = process.env.GOOGLE_APPLICATION_CREDENTIALS;
|
|
528
|
-
if (!credentialsPath) {
|
|
529
|
-
healthStatus.warning =
|
|
530
|
-
"GOOGLE_APPLICATION_CREDENTIALS environment variable not set";
|
|
531
|
-
return false;
|
|
532
|
-
}
|
|
533
|
-
try {
|
|
534
|
-
const { promises: fs } = await import("fs");
|
|
535
|
-
await fs.access(credentialsPath);
|
|
536
|
-
const fileName = basename(credentialsPath);
|
|
537
|
-
const jsonFilePattern = /\.json(\.\w+)?$/;
|
|
538
|
-
if (!jsonFilePattern.test(fileName)) {
|
|
539
|
-
healthStatus.warning =
|
|
540
|
-
"GOOGLE_APPLICATION_CREDENTIALS should point to a JSON file";
|
|
541
|
-
}
|
|
542
|
-
healthStatus.hasApiKey = true;
|
|
543
|
-
return true;
|
|
544
|
-
}
|
|
545
|
-
catch {
|
|
546
|
-
healthStatus.warning = `GOOGLE_APPLICATION_CREDENTIALS file does not exist: ${credentialsPath}`;
|
|
547
|
-
return false;
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
/**
|
|
551
|
-
* Check Vertex's non-file auth fallbacks (GOOGLE_APPLICATION_CREDENTIALS_
|
|
552
|
-
* NEUROLINK, GOOGLE_SERVICE_ACCOUNT_KEY, or the GOOGLE_AUTH_CLIENT_EMAIL +
|
|
553
|
-
* GOOGLE_AUTH_PRIVATE_KEY pair) via the descriptor's extraRequiredFallbacks
|
|
554
|
-
* instead of a hand-maintained env-var list, so this stays in sync with
|
|
555
|
-
* the real gating logic (hasGoogleCredentials()) the same way
|
|
556
|
-
* checkApiKeyValidity()'s vertex branch does. The previous hand-rolled
|
|
557
|
-
* version only recognized GOOGLE_SERVICE_ACCOUNT_KEY or the email+key
|
|
558
|
-
* pair — missing GOOGLE_APPLICATION_CREDENTIALS_NEUROLINK, the
|
|
559
|
-
* descriptor's documented first-priority fallback.
|
|
560
|
-
*/
|
|
561
|
-
static checkExtraRequiredFallbackCredentials(healthStatus) {
|
|
562
|
-
const descriptor = ProviderFactory.getDescriptor(AIProviderName.VERTEX);
|
|
563
|
-
const hasValidAuth = satisfiesFallbacks(descriptor?.envVars.extraRequiredFallbacks, process.env);
|
|
564
|
-
if (hasValidAuth) {
|
|
565
|
-
healthStatus.hasApiKey = true;
|
|
566
|
-
return true;
|
|
567
|
-
}
|
|
568
|
-
return false;
|
|
569
|
-
}
|
|
570
|
-
/**
|
|
571
|
-
* Check AWS Bedrock configuration
|
|
572
|
-
*/
|
|
573
|
-
static async checkBedrockConfig(healthStatus) {
|
|
574
|
-
logger.debug("Starting AWS Bedrock comprehensive health check");
|
|
575
|
-
this.checkAWSRegion(healthStatus);
|
|
576
|
-
this.checkAWSCredentials(healthStatus);
|
|
577
|
-
this.checkBedrockModels(healthStatus);
|
|
578
|
-
this.checkBedrockEndpoint(healthStatus);
|
|
579
|
-
if (healthStatus.configurationIssues.length === 0) {
|
|
580
|
-
healthStatus.hasApiKey = true;
|
|
581
|
-
logger.debug("AWS Bedrock configuration appears valid");
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
/**
|
|
585
|
-
* Check AWS region configuration
|
|
586
|
-
*/
|
|
587
|
-
static checkAWSRegion(healthStatus) {
|
|
588
|
-
const awsRegion = process.env.AWS_REGION;
|
|
589
|
-
const validBedrockRegions = [
|
|
590
|
-
"us-east-1",
|
|
591
|
-
"us-west-2",
|
|
592
|
-
"ap-southeast-1",
|
|
593
|
-
"ap-northeast-1",
|
|
594
|
-
"eu-central-1",
|
|
595
|
-
"eu-west-1",
|
|
596
|
-
"ap-south-1",
|
|
597
|
-
];
|
|
598
|
-
if (!awsRegion) {
|
|
599
|
-
healthStatus.configurationIssues.push("AWS_REGION not set");
|
|
600
|
-
healthStatus.recommendations.push(`Set AWS_REGION to a Bedrock-supported region: ${validBedrockRegions.join(", ")}`);
|
|
601
|
-
}
|
|
602
|
-
else if (!validBedrockRegions.includes(awsRegion)) {
|
|
603
|
-
healthStatus.configurationIssues.push(`AWS_REGION '${awsRegion}' may not support all Bedrock models`);
|
|
604
|
-
healthStatus.recommendations.push(`Consider using a primary Bedrock region: ${validBedrockRegions.slice(0, 3).join(", ")}`);
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
/**
|
|
608
|
-
* Check AWS credentials
|
|
609
|
-
*/
|
|
610
|
-
static checkAWSCredentials(healthStatus) {
|
|
611
|
-
const awsAccessKeyId = process.env.AWS_ACCESS_KEY_ID;
|
|
612
|
-
const awsSecretAccessKey = process.env.AWS_SECRET_ACCESS_KEY;
|
|
613
|
-
const awsProfile = process.env.AWS_PROFILE;
|
|
614
|
-
if (!awsAccessKeyId && !awsProfile) {
|
|
615
|
-
healthStatus.configurationIssues.push("No AWS credentials found");
|
|
616
|
-
healthStatus.recommendations.push("Set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, or configure AWS_PROFILE");
|
|
617
|
-
}
|
|
618
|
-
else if (awsAccessKeyId && !awsSecretAccessKey) {
|
|
619
|
-
healthStatus.configurationIssues.push("AWS_ACCESS_KEY_ID set but AWS_SECRET_ACCESS_KEY missing");
|
|
620
|
-
healthStatus.recommendations.push("Set AWS_SECRET_ACCESS_KEY to match your AWS_ACCESS_KEY_ID");
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
/**
|
|
624
|
-
* Check Bedrock models
|
|
625
|
-
*/
|
|
626
|
-
static checkBedrockModels(healthStatus) {
|
|
627
|
-
const bedrockModel = process.env.BEDROCK_MODEL || process.env.BEDROCK_MODEL_ID;
|
|
628
|
-
const supportedModels = [
|
|
629
|
-
BedrockModels.CLAUDE_3_SONNET,
|
|
630
|
-
BedrockModels.CLAUDE_3_HAIKU,
|
|
631
|
-
BedrockModels.CLAUDE_3_5_SONNET,
|
|
632
|
-
"anthropic.claude-v2:1",
|
|
633
|
-
"amazon.titan-text-express-v1",
|
|
634
|
-
];
|
|
635
|
-
if (!bedrockModel) {
|
|
636
|
-
healthStatus.recommendations.push(`Set BEDROCK_MODEL or BEDROCK_MODEL_ID for faster startup (e.g., ${BedrockModels.CLAUDE_3_SONNET})`);
|
|
637
|
-
}
|
|
638
|
-
else if (!supportedModels.includes(bedrockModel)) {
|
|
639
|
-
healthStatus.recommendations.push(`Consider using a popular Bedrock model: ${supportedModels.slice(0, 3).join(", ")}`);
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
/**
|
|
643
|
-
* Check Bedrock endpoint
|
|
644
|
-
*/
|
|
645
|
-
static checkBedrockEndpoint(healthStatus) {
|
|
646
|
-
const bedrockEndpoint = process.env.BEDROCK_ENDPOINT_URL;
|
|
647
|
-
if (bedrockEndpoint && !bedrockEndpoint.startsWith("https://")) {
|
|
648
|
-
healthStatus.configurationIssues.push("BEDROCK_ENDPOINT_URL should use HTTPS");
|
|
649
|
-
healthStatus.recommendations.push("Update BEDROCK_ENDPOINT_URL to use HTTPS protocol");
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
/**
|
|
653
|
-
* Check Azure OpenAI configuration
|
|
654
|
-
*/
|
|
655
|
-
static async checkAzureConfig(healthStatus) {
|
|
656
|
-
const azureEndpoint = process.env.AZURE_OPENAI_ENDPOINT;
|
|
657
|
-
if (azureEndpoint && !azureEndpoint.startsWith("https://")) {
|
|
658
|
-
healthStatus.configurationIssues.push("Invalid AZURE_OPENAI_ENDPOINT format");
|
|
659
|
-
healthStatus.recommendations.push("Set AZURE_OPENAI_ENDPOINT to a valid URL (e.g., https://your-resource.openai.azure.com/)");
|
|
660
|
-
}
|
|
661
|
-
// Check for deployment name using the SAME logic as the Azure provider
|
|
662
|
-
const deploymentName = process.env.AZURE_OPENAI_MODEL ||
|
|
663
|
-
process.env.AZURE_OPENAI_DEPLOYMENT ||
|
|
664
|
-
process.env.AZURE_OPENAI_DEPLOYMENT_ID;
|
|
665
|
-
if (!deploymentName) {
|
|
666
|
-
healthStatus.configurationIssues.push("No Azure deployment specified");
|
|
667
|
-
healthStatus.recommendations.push("Set one of: AZURE_OPENAI_MODEL, AZURE_OPENAI_DEPLOYMENT, or AZURE_OPENAI_DEPLOYMENT_ID");
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
static getLiteLLMBaseUrl() {
|
|
671
|
-
return process.env.LITELLM_BASE_URL || "http://localhost:4000";
|
|
672
|
-
}
|
|
673
|
-
static getLiteLLMModelsUrl() {
|
|
674
|
-
return new URL("/v1/models", this.getLiteLLMBaseUrl()).toString();
|
|
675
|
-
}
|
|
676
|
-
static getConfiguredLiteLLMModel() {
|
|
677
|
-
return process.env.LITELLM_MODEL || "openai/gpt-4o-mini";
|
|
678
|
-
}
|
|
679
|
-
static getOllamaBaseUrl() {
|
|
680
|
-
return (process.env.OLLAMA_BASE_URL ||
|
|
681
|
-
process.env.OLLAMA_API_BASE ||
|
|
682
|
-
"http://localhost:11434");
|
|
683
|
-
}
|
|
684
|
-
static getOllamaTagsUrl() {
|
|
685
|
-
return new URL("/api/tags", this.getOllamaBaseUrl()).toString();
|
|
686
|
-
}
|
|
687
|
-
static getConfiguredOllamaModel() {
|
|
688
|
-
return process.env.OLLAMA_MODEL || DEFAULT_OLLAMA_MODEL;
|
|
689
|
-
}
|
|
690
|
-
static async fetchJsonWithTimeout(url, options = {}) {
|
|
691
|
-
const controller = new AbortController();
|
|
692
|
-
const timeoutId = setTimeout(() => controller.abort(), options.timeout ?? this.DEFAULT_TIMEOUT);
|
|
693
|
-
try {
|
|
694
|
-
const proxyFetch = createProxyFetch();
|
|
695
|
-
const response = await proxyFetch(url, {
|
|
696
|
-
method: "GET",
|
|
697
|
-
headers: options.headers,
|
|
698
|
-
signal: controller.signal,
|
|
699
|
-
});
|
|
700
|
-
if (!response.ok) {
|
|
701
|
-
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
|
702
|
-
}
|
|
703
|
-
return await response.json();
|
|
704
|
-
}
|
|
705
|
-
finally {
|
|
706
|
-
clearTimeout(timeoutId);
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
static normalizeModelList(models) {
|
|
710
|
-
return models
|
|
711
|
-
.map((entry) => {
|
|
712
|
-
if (typeof entry === "string") {
|
|
713
|
-
return entry;
|
|
714
|
-
}
|
|
715
|
-
if (entry &&
|
|
716
|
-
typeof entry === "object" &&
|
|
717
|
-
"id" in entry &&
|
|
718
|
-
typeof entry.id === "string") {
|
|
719
|
-
return entry.id;
|
|
720
|
-
}
|
|
721
|
-
if (entry &&
|
|
722
|
-
typeof entry === "object" &&
|
|
723
|
-
"name" in entry &&
|
|
724
|
-
typeof entry.name === "string") {
|
|
725
|
-
return entry.name;
|
|
726
|
-
}
|
|
727
|
-
return null;
|
|
728
|
-
})
|
|
729
|
-
.filter((model) => typeof model === "string");
|
|
730
|
-
}
|
|
731
|
-
static hasRequestedModel(availableModels, requestedModel) {
|
|
732
|
-
const normalizedRequestedModel = requestedModel.trim();
|
|
733
|
-
const requiresExactMatch = /@/.test(normalizedRequestedModel);
|
|
734
|
-
return availableModels.some((model) => model === normalizedRequestedModel ||
|
|
735
|
-
(!requiresExactMatch &&
|
|
736
|
-
(model.startsWith(`${normalizedRequestedModel}:`) ||
|
|
737
|
-
model.startsWith(`${normalizedRequestedModel}@`))));
|
|
738
|
-
}
|
|
739
|
-
static async getOllamaAvailableModels(timeout = 2000) {
|
|
740
|
-
const payload = (await this.fetchJsonWithTimeout(this.getOllamaTagsUrl(), {
|
|
741
|
-
timeout,
|
|
742
|
-
}));
|
|
743
|
-
return this.normalizeModelList(payload.models ?? []);
|
|
744
|
-
}
|
|
745
|
-
static async getLiteLLMAvailableModels(timeout = 2000) {
|
|
746
|
-
const payload = (await this.fetchJsonWithTimeout(this.getLiteLLMModelsUrl(), {
|
|
747
|
-
timeout,
|
|
748
|
-
headers: {
|
|
749
|
-
Authorization: `Bearer ${process.env.LITELLM_API_KEY || "sk-anything"}`,
|
|
750
|
-
"Content-Type": "application/json",
|
|
751
|
-
},
|
|
752
|
-
}));
|
|
753
|
-
return this.normalizeModelList(payload.data ?? []);
|
|
754
|
-
}
|
|
755
|
-
static async checkOllamaAvailability(options) {
|
|
756
|
-
try {
|
|
757
|
-
const models = await this.getOllamaAvailableModels(options.timeout);
|
|
758
|
-
if (!this.hasRequestedModel(models, options.model)) {
|
|
759
|
-
return {
|
|
760
|
-
available: false,
|
|
761
|
-
reason: `Configured Ollama model '${options.model}' is not installed`,
|
|
762
|
-
models,
|
|
763
|
-
};
|
|
764
|
-
}
|
|
765
|
-
return { available: true, models };
|
|
766
|
-
}
|
|
767
|
-
catch (error) {
|
|
768
|
-
return {
|
|
769
|
-
available: false,
|
|
770
|
-
reason: error instanceof Error ? error.message : String(error),
|
|
771
|
-
models: [],
|
|
772
|
-
};
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
static async checkLiteLLMAvailability(options) {
|
|
776
|
-
try {
|
|
777
|
-
const models = await this.getLiteLLMAvailableModels(options.timeout);
|
|
778
|
-
if (models.length === 0) {
|
|
779
|
-
return {
|
|
780
|
-
available: false,
|
|
781
|
-
reason: "LiteLLM returned an empty model list",
|
|
782
|
-
models,
|
|
783
|
-
};
|
|
784
|
-
}
|
|
785
|
-
if (!this.hasRequestedModel(models, options.model)) {
|
|
786
|
-
return {
|
|
787
|
-
available: false,
|
|
788
|
-
reason: `Configured LiteLLM model '${options.model}' is not exposed by the proxy`,
|
|
789
|
-
models,
|
|
790
|
-
};
|
|
791
|
-
}
|
|
792
|
-
return { available: true, models };
|
|
793
|
-
}
|
|
794
|
-
catch (error) {
|
|
795
|
-
return {
|
|
796
|
-
available: false,
|
|
797
|
-
reason: error instanceof Error ? error.message : String(error),
|
|
798
|
-
models: [],
|
|
799
|
-
};
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
static async checkLiteLLMConfig(healthStatus, timeout = this.DEFAULT_TIMEOUT) {
|
|
803
|
-
const liteLLMBase = this.getLiteLLMBaseUrl();
|
|
804
|
-
if (!liteLLMBase.startsWith("http")) {
|
|
805
|
-
healthStatus.isConfigured = false;
|
|
806
|
-
healthStatus.configurationIssues.push("Invalid LITELLM_BASE_URL format");
|
|
807
|
-
healthStatus.recommendations.push("Set LITELLM_BASE_URL to a valid URL (e.g., http://localhost:4000)");
|
|
808
|
-
return;
|
|
809
|
-
}
|
|
810
|
-
const availability = await this.checkLiteLLMAvailability({
|
|
811
|
-
model: this.getConfiguredLiteLLMModel(),
|
|
812
|
-
timeout,
|
|
813
|
-
});
|
|
814
|
-
if (!availability.available) {
|
|
815
|
-
healthStatus.isConfigured = false;
|
|
816
|
-
healthStatus.configurationIssues.push(`LiteLLM runtime check failed: ${availability.reason ?? "unknown error"}`);
|
|
817
|
-
healthStatus.recommendations.push("Start the LiteLLM proxy and ensure the configured model is available from /v1/models");
|
|
818
|
-
return;
|
|
819
|
-
}
|
|
820
|
-
healthStatus.isConfigured = true;
|
|
821
|
-
}
|
|
822
|
-
/**
|
|
823
|
-
* Check Ollama configuration
|
|
824
|
-
*/
|
|
825
|
-
static async checkOllamaConfig(healthStatus, timeout = this.DEFAULT_TIMEOUT) {
|
|
826
|
-
const ollamaBase = this.getOllamaBaseUrl();
|
|
827
|
-
if (!ollamaBase.startsWith("http")) {
|
|
828
|
-
healthStatus.isConfigured = false;
|
|
829
|
-
healthStatus.configurationIssues.push("Invalid OLLAMA_BASE_URL format (OLLAMA_API_BASE is still accepted as a legacy alias)");
|
|
830
|
-
healthStatus.recommendations.push("Set OLLAMA_BASE_URL to a valid URL (e.g., http://localhost:11434). OLLAMA_API_BASE remains supported as a legacy alias.");
|
|
831
|
-
return;
|
|
832
|
-
}
|
|
833
|
-
const availability = await this.checkOllamaAvailability({
|
|
834
|
-
model: this.getConfiguredOllamaModel(),
|
|
835
|
-
timeout,
|
|
836
|
-
});
|
|
837
|
-
if (!availability.available) {
|
|
838
|
-
healthStatus.isConfigured = false;
|
|
839
|
-
healthStatus.configurationIssues.push(`Ollama runtime check failed: ${availability.reason ?? "unknown error"}`);
|
|
840
|
-
healthStatus.recommendations.push("Start Ollama and install the configured model before using Ollama as a fallback provider");
|
|
841
|
-
return;
|
|
842
|
-
}
|
|
843
|
-
healthStatus.isConfigured = true;
|
|
844
|
-
}
|
|
845
|
-
/**
|
|
846
|
-
* Get common models for a provider
|
|
847
|
-
*/
|
|
848
|
-
static getCommonModelsForProvider(providerName) {
|
|
849
|
-
switch (providerName) {
|
|
850
|
-
case AIProviderName.ANTHROPIC:
|
|
851
|
-
return [
|
|
852
|
-
AnthropicModels.CLAUDE_3_5_SONNET,
|
|
853
|
-
AnthropicModels.CLAUDE_3_HAIKU,
|
|
854
|
-
AnthropicModels.CLAUDE_3_OPUS,
|
|
855
|
-
];
|
|
856
|
-
case AIProviderName.OPENAI:
|
|
857
|
-
return [
|
|
858
|
-
OpenAIModels.GPT_4O,
|
|
859
|
-
OpenAIModels.GPT_4O_MINI,
|
|
860
|
-
OpenAIModels.GPT_3_5_TURBO,
|
|
861
|
-
];
|
|
862
|
-
case AIProviderName.GOOGLE_AI:
|
|
863
|
-
return [
|
|
864
|
-
GoogleAIModels.GEMINI_1_5_PRO,
|
|
865
|
-
GoogleAIModels.GEMINI_1_5_FLASH,
|
|
866
|
-
GoogleAIModels.GEMINI_2_5_PRO,
|
|
867
|
-
];
|
|
868
|
-
case AIProviderName.VERTEX:
|
|
869
|
-
return [
|
|
870
|
-
// Google models (via vertex provider)
|
|
871
|
-
GoogleAIModels.GEMINI_2_5_PRO,
|
|
872
|
-
GoogleAIModels.GEMINI_2_5_FLASH,
|
|
873
|
-
GoogleAIModels.GEMINI_2_5_FLASH_LITE,
|
|
874
|
-
GoogleAIModels.GEMINI_2_0_FLASH_001,
|
|
875
|
-
GoogleAIModels.GEMINI_1_5_PRO,
|
|
876
|
-
GoogleAIModels.GEMINI_1_5_FLASH,
|
|
877
|
-
// Anthropic models (via vertexAnthropic provider)
|
|
878
|
-
"claude-sonnet-4@20250514",
|
|
879
|
-
"claude-opus-4@20250514",
|
|
880
|
-
AnthropicModels.CLAUDE_3_5_SONNET,
|
|
881
|
-
AnthropicModels.CLAUDE_3_5_HAIKU,
|
|
882
|
-
AnthropicModels.CLAUDE_3_SONNET,
|
|
883
|
-
AnthropicModels.CLAUDE_3_HAIKU,
|
|
884
|
-
AnthropicModels.CLAUDE_3_OPUS,
|
|
885
|
-
];
|
|
886
|
-
case AIProviderName.BEDROCK:
|
|
887
|
-
return [BedrockModels.CLAUDE_3_SONNET, BedrockModels.CLAUDE_3_HAIKU];
|
|
888
|
-
case AIProviderName.AZURE:
|
|
889
|
-
return [OpenAIModels.GPT_4O, OpenAIModels.GPT_4O_MINI, "gpt-35-turbo"];
|
|
890
|
-
case AIProviderName.LITELLM:
|
|
891
|
-
return [
|
|
892
|
-
"openai/gpt-4o-mini",
|
|
893
|
-
"anthropic/claude-3-haiku",
|
|
894
|
-
"google/gemini-2.5-flash",
|
|
895
|
-
];
|
|
896
|
-
case AIProviderName.OLLAMA: {
|
|
897
|
-
const envModel = process.env.OLLAMA_MODEL;
|
|
898
|
-
const defaults = [
|
|
899
|
-
"llama3.2:latest",
|
|
900
|
-
"llama3.1:latest",
|
|
901
|
-
"mistral:latest",
|
|
902
|
-
];
|
|
903
|
-
return envModel ? [envModel, ...defaults] : defaults;
|
|
904
|
-
}
|
|
905
|
-
default:
|
|
906
|
-
return [];
|
|
907
|
-
}
|
|
908
|
-
}
|
|
909
|
-
/**
|
|
910
|
-
* Get cached health status if still valid
|
|
911
|
-
*/
|
|
912
|
-
static getCachedHealth(providerName, maxAge) {
|
|
913
|
-
const cached = this.healthCache.get(providerName);
|
|
914
|
-
if (!cached) {
|
|
915
|
-
return null;
|
|
916
|
-
}
|
|
917
|
-
const age = Date.now() - cached.timestamp;
|
|
918
|
-
if (age > maxAge) {
|
|
919
|
-
this.healthCache.delete(providerName);
|
|
920
|
-
return null;
|
|
921
|
-
}
|
|
922
|
-
return cached.status;
|
|
923
|
-
}
|
|
924
|
-
/**
|
|
925
|
-
* Check if Vertex AI supports Anthropic models (dual provider architecture)
|
|
926
|
-
*/
|
|
927
|
-
static async checkVertexAnthropicSupport() {
|
|
928
|
-
const result = {
|
|
929
|
-
isSupported: false,
|
|
930
|
-
hasCreateVertexAnthropic: false,
|
|
931
|
-
hasCorrectTypes: false,
|
|
932
|
-
hasValidProject: false,
|
|
933
|
-
hasRegionalSupport: false,
|
|
934
|
-
hasNetworkAccess: false,
|
|
935
|
-
hasAnthropicModels: false,
|
|
936
|
-
authentication: {
|
|
937
|
-
isValid: false,
|
|
938
|
-
method: "none",
|
|
939
|
-
issues: [],
|
|
940
|
-
},
|
|
941
|
-
projectConfiguration: {
|
|
942
|
-
isValid: false,
|
|
943
|
-
projectId: undefined,
|
|
944
|
-
region: undefined,
|
|
945
|
-
issues: [],
|
|
946
|
-
},
|
|
947
|
-
modelSupport: {
|
|
948
|
-
availableModels: [],
|
|
949
|
-
recommendedModels: [
|
|
950
|
-
"claude-sonnet-4@20250514",
|
|
951
|
-
"claude-opus-4@20250514",
|
|
952
|
-
"claude-3-5-sonnet-20241022",
|
|
953
|
-
"claude-3-5-haiku-20241022",
|
|
954
|
-
"claude-3-sonnet-20240229",
|
|
955
|
-
"claude-3-haiku-20240307",
|
|
956
|
-
],
|
|
957
|
-
deprecatedModels: [
|
|
958
|
-
"claude-3-opus-20240229", // Still available but newer versions preferred
|
|
959
|
-
],
|
|
960
|
-
},
|
|
961
|
-
recommendations: [],
|
|
962
|
-
troubleshooting: [],
|
|
963
|
-
};
|
|
964
|
-
logger.debug("Starting comprehensive Vertex Anthropic support verification");
|
|
965
|
-
try {
|
|
966
|
-
// 1. Check SDK module availability
|
|
967
|
-
logger.debug("Checking @anthropic-ai/vertex-sdk module availability");
|
|
968
|
-
const anthropicModule = await import("@anthropic-ai/vertex-sdk");
|
|
969
|
-
result.hasCreateVertexAnthropic =
|
|
970
|
-
typeof anthropicModule.AnthropicVertex === "function";
|
|
971
|
-
result.hasCorrectTypes = true; // Types are bundled with the class
|
|
972
|
-
if (!result.hasCreateVertexAnthropic) {
|
|
973
|
-
result.troubleshooting.push("📦 Install @anthropic-ai/vertex-sdk for Claude on Vertex AI support", "🔄 Run: npm install @anthropic-ai/vertex-sdk", "📖 See: https://docs.anthropic.com/en/api/claude-on-vertex-ai");
|
|
974
|
-
return result;
|
|
975
|
-
}
|
|
976
|
-
logger.debug("SDK module verified successfully");
|
|
977
|
-
// 2. Comprehensive Authentication Validation
|
|
978
|
-
logger.debug("Starting authentication validation");
|
|
979
|
-
result.authentication = await this.validateVertexAuthentication();
|
|
980
|
-
if (!result.authentication.isValid) {
|
|
981
|
-
result.troubleshooting.push("🔐 Fix authentication configuration:", " Option 1: Set GOOGLE_APPLICATION_CREDENTIALS to valid service account file", " Option 2: Set individual env vars: GOOGLE_AUTH_CLIENT_EMAIL, GOOGLE_AUTH_PRIVATE_KEY", "📖 See: https://cloud.google.com/docs/authentication/provide-credentials-adc");
|
|
982
|
-
}
|
|
983
|
-
// 3. Project Configuration Validation
|
|
984
|
-
logger.debug("Starting project configuration validation");
|
|
985
|
-
result.projectConfiguration =
|
|
986
|
-
await this.validateVertexProjectConfiguration();
|
|
987
|
-
result.hasValidProject = result.projectConfiguration.isValid;
|
|
988
|
-
if (!result.hasValidProject) {
|
|
989
|
-
result.troubleshooting.push("🏗️ Fix project configuration:", " Set GOOGLE_VERTEX_PROJECT or GOOGLE_CLOUD_PROJECT environment variable", " Ensure project exists and has Vertex AI API enabled", "📖 See: https://console.cloud.google.com/apis/library/aiplatform.googleapis.com");
|
|
990
|
-
}
|
|
991
|
-
// 4. Regional Support Validation
|
|
992
|
-
logger.debug("Starting regional support validation");
|
|
993
|
-
result.hasRegionalSupport = await this.checkVertexRegionalSupport(result.projectConfiguration.region);
|
|
994
|
-
if (!result.hasRegionalSupport) {
|
|
995
|
-
result.troubleshooting.push("🌍 Regional support issues:", " Anthropic models may not be available in your region", " Try regions: us-central1, us-east4, europe-west1, asia-southeast1", " Set GOOGLE_CLOUD_LOCATION environment variable");
|
|
996
|
-
}
|
|
997
|
-
// 5. Network Connectivity Check (non-blocking)
|
|
998
|
-
logger.debug("Starting network connectivity check");
|
|
999
|
-
result.hasNetworkAccess = await this.checkVertexNetworkConnectivity(result.projectConfiguration.region || "us-central1");
|
|
1000
|
-
if (!result.hasNetworkAccess) {
|
|
1001
|
-
result.troubleshooting.push("🌐 Network connectivity issues:", " Check proxy configuration if behind corporate firewall", " Verify DNS resolution for *.googleapis.com", " Ensure firewall allows HTTPS to Google Cloud endpoints");
|
|
1002
|
-
}
|
|
1003
|
-
// 6. Anthropic Model Integration Check
|
|
1004
|
-
logger.debug("Starting Anthropic model integration check");
|
|
1005
|
-
result.hasAnthropicModels = await this.checkAnthropicModelIntegration(result.projectConfiguration.projectId, result.projectConfiguration.region);
|
|
1006
|
-
if (!result.hasAnthropicModels) {
|
|
1007
|
-
result.troubleshooting.push("🤖 Anthropic model integration issues:", " Enable Anthropic integration in Google Cloud Console", " Navigate to: Vertex AI > Model Garden > Anthropic", " Accept terms and enable Claude model access", "📖 See: https://console.cloud.google.com/vertex-ai/publishers/anthropic");
|
|
1008
|
-
}
|
|
1009
|
-
// Calculate overall support status
|
|
1010
|
-
result.isSupported =
|
|
1011
|
-
result.hasCreateVertexAnthropic &&
|
|
1012
|
-
result.authentication.isValid &&
|
|
1013
|
-
result.hasValidProject &&
|
|
1014
|
-
result.hasRegionalSupport;
|
|
1015
|
-
// Note: Network and model integration are nice-to-have but not blocking
|
|
1016
|
-
// Generate comprehensive recommendations
|
|
1017
|
-
if (result.isSupported) {
|
|
1018
|
-
result.recommendations.push("✅ Vertex Anthropic support is fully configured", "✅ Claude models are available via vertexAnthropic provider", `✅ Authentication: ${result.authentication.method}`, `✅ Project: ${result.projectConfiguration.projectId}`, `✅ Region: ${result.projectConfiguration.region}`);
|
|
1019
|
-
if (result.hasNetworkAccess) {
|
|
1020
|
-
result.recommendations.push("✅ Network connectivity verified");
|
|
1021
|
-
}
|
|
1022
|
-
else {
|
|
1023
|
-
result.recommendations.push("⚠️ Network connectivity not verified (may still work)");
|
|
1024
|
-
}
|
|
1025
|
-
if (result.hasAnthropicModels) {
|
|
1026
|
-
result.recommendations.push("✅ Anthropic model integration verified");
|
|
1027
|
-
}
|
|
1028
|
-
else {
|
|
1029
|
-
result.recommendations.push("⚠️ Anthropic model integration not verified");
|
|
1030
|
-
}
|
|
1031
|
-
result.recommendations.push("", "🎯 Recommended Claude models:", ...result.modelSupport.recommendedModels.map((model) => ` • ${model}`), "", "📚 Usage example:", ' const vertex = new GoogleVertexProvider("claude-3-5-sonnet-20241022")', ' const result = await vertex.generate("Hello, Claude!")');
|
|
1032
|
-
logger.info("Vertex Anthropic support verification: FULLY_SUPPORTED");
|
|
1033
|
-
}
|
|
1034
|
-
else {
|
|
1035
|
-
const missingComponents = [];
|
|
1036
|
-
if (!result.hasCreateVertexAnthropic) {
|
|
1037
|
-
missingComponents.push("SDK module");
|
|
1038
|
-
}
|
|
1039
|
-
if (!result.authentication.isValid) {
|
|
1040
|
-
missingComponents.push("authentication");
|
|
1041
|
-
}
|
|
1042
|
-
if (!result.hasValidProject) {
|
|
1043
|
-
missingComponents.push("project configuration");
|
|
1044
|
-
}
|
|
1045
|
-
if (!result.hasRegionalSupport) {
|
|
1046
|
-
missingComponents.push("regional support");
|
|
1047
|
-
}
|
|
1048
|
-
result.recommendations.push(`⚠️ Vertex Anthropic support partially available`, `❌ Missing: ${missingComponents.join(", ")}`, "", "🔧 Quick fixes needed:");
|
|
1049
|
-
result.recommendations.push(...result.troubleshooting);
|
|
1050
|
-
logger.warn("Vertex Anthropic support verification: PARTIALLY_SUPPORTED", {
|
|
1051
|
-
missingComponents,
|
|
1052
|
-
hasBasicSupport: result.hasCreateVertexAnthropic,
|
|
1053
|
-
authenticationValid: result.authentication.isValid,
|
|
1054
|
-
projectValid: result.hasValidProject,
|
|
1055
|
-
});
|
|
1056
|
-
}
|
|
1057
|
-
}
|
|
1058
|
-
catch (error) {
|
|
1059
|
-
logger.error("Vertex Anthropic support check failed", {
|
|
1060
|
-
error: error instanceof Error ? error.message : String(error),
|
|
1061
|
-
stack: error instanceof Error ? error.stack : undefined,
|
|
1062
|
-
});
|
|
1063
|
-
result.recommendations.push("❌ Comprehensive Anthropic support check failed", `🐛 Error: ${error instanceof Error ? error.message : String(error)}`, "", "🔧 Troubleshooting steps:", "1. Verify @google-cloud/vertexai and @anthropic-ai/vertex-sdk are properly installed", "2. Verify Google Cloud authentication setup", "3. Check project ID and region configuration", "4. Enable Vertex AI API in Google Cloud Console", "5. Enable Anthropic integration in Vertex AI Model Garden");
|
|
1064
|
-
}
|
|
1065
|
-
return result;
|
|
1066
|
-
}
|
|
1067
|
-
/**
|
|
1068
|
-
* Validate Vertex AI authentication configuration
|
|
1069
|
-
*/
|
|
1070
|
-
static async validateVertexAuthentication() {
|
|
1071
|
-
const result = {
|
|
1072
|
-
isValid: false,
|
|
1073
|
-
method: "none",
|
|
1074
|
-
issues: [],
|
|
1075
|
-
};
|
|
1076
|
-
try {
|
|
1077
|
-
// Check for service account file authentication (preferred)
|
|
1078
|
-
if (process.env.GOOGLE_APPLICATION_CREDENTIALS) {
|
|
1079
|
-
const credentialsPath = process.env.GOOGLE_APPLICATION_CREDENTIALS;
|
|
1080
|
-
try {
|
|
1081
|
-
const { promises: fs } = await import("fs");
|
|
1082
|
-
try {
|
|
1083
|
-
await fs.access(credentialsPath);
|
|
1084
|
-
// Validate JSON structure
|
|
1085
|
-
const credentialsContent = await fs.readFile(credentialsPath, "utf8");
|
|
1086
|
-
const credentials = JSON.parse(credentialsContent);
|
|
1087
|
-
if (credentials.type === "service_account" &&
|
|
1088
|
-
credentials.project_id &&
|
|
1089
|
-
credentials.client_email &&
|
|
1090
|
-
credentials.private_key) {
|
|
1091
|
-
result.isValid = true;
|
|
1092
|
-
result.method = "service_account_file";
|
|
1093
|
-
return result;
|
|
1094
|
-
}
|
|
1095
|
-
else {
|
|
1096
|
-
result.issues.push("Service account file missing required fields");
|
|
1097
|
-
}
|
|
1098
|
-
}
|
|
1099
|
-
catch {
|
|
1100
|
-
result.issues.push(`Service account file not found: ${credentialsPath}`);
|
|
1101
|
-
}
|
|
1102
|
-
}
|
|
1103
|
-
catch (fileError) {
|
|
1104
|
-
result.issues.push(`Service account file validation failed: ${fileError}`);
|
|
1105
|
-
}
|
|
1106
|
-
}
|
|
1107
|
-
// Check for individual environment variables
|
|
1108
|
-
if (process.env.GOOGLE_AUTH_CLIENT_EMAIL &&
|
|
1109
|
-
process.env.GOOGLE_AUTH_PRIVATE_KEY) {
|
|
1110
|
-
const email = process.env.GOOGLE_AUTH_CLIENT_EMAIL;
|
|
1111
|
-
const privateKey = process.env.GOOGLE_AUTH_PRIVATE_KEY;
|
|
1112
|
-
if (email.includes("@") && privateKey.includes("BEGIN PRIVATE KEY")) {
|
|
1113
|
-
result.isValid = true;
|
|
1114
|
-
result.method = "environment_variables";
|
|
1115
|
-
return result;
|
|
1116
|
-
}
|
|
1117
|
-
else {
|
|
1118
|
-
result.issues.push("Individual credentials format validation failed");
|
|
1119
|
-
}
|
|
1120
|
-
}
|
|
1121
|
-
else {
|
|
1122
|
-
result.issues.push("Missing individual credential environment variables");
|
|
1123
|
-
}
|
|
1124
|
-
// Check for Application Default Credentials (ADC)
|
|
1125
|
-
try {
|
|
1126
|
-
// This is a simple heuristic - in real implementation you'd use Google Auth library
|
|
1127
|
-
if (process.env.GCLOUD_PROJECT || process.env.GOOGLE_CLOUD_PROJECT) {
|
|
1128
|
-
result.method = "application_default_credentials";
|
|
1129
|
-
result.isValid = true; // Assume valid if environment suggests ADC
|
|
1130
|
-
return result;
|
|
1131
|
-
}
|
|
1132
|
-
}
|
|
1133
|
-
catch (adcError) {
|
|
1134
|
-
result.issues.push(`ADC check failed: ${adcError}`);
|
|
1135
|
-
}
|
|
1136
|
-
if (!result.isValid) {
|
|
1137
|
-
result.issues.push("No valid authentication method found");
|
|
1138
|
-
}
|
|
1139
|
-
}
|
|
1140
|
-
catch (error) {
|
|
1141
|
-
result.issues.push(`Authentication validation error: ${error}`);
|
|
1142
|
-
}
|
|
1143
|
-
return result;
|
|
1144
|
-
}
|
|
1145
|
-
/**
|
|
1146
|
-
* Validate Vertex AI project configuration
|
|
1147
|
-
*/
|
|
1148
|
-
static async validateVertexProjectConfiguration() {
|
|
1149
|
-
const result = {
|
|
1150
|
-
isValid: false,
|
|
1151
|
-
projectId: undefined,
|
|
1152
|
-
region: undefined,
|
|
1153
|
-
issues: [],
|
|
1154
|
-
};
|
|
1155
|
-
// Check project ID
|
|
1156
|
-
const projectId = process.env.GOOGLE_VERTEX_PROJECT ||
|
|
1157
|
-
process.env.GOOGLE_CLOUD_PROJECT_ID ||
|
|
1158
|
-
process.env.GOOGLE_PROJECT_ID ||
|
|
1159
|
-
process.env.GOOGLE_CLOUD_PROJECT;
|
|
1160
|
-
if (projectId) {
|
|
1161
|
-
result.projectId = projectId;
|
|
1162
|
-
// Validate project ID format
|
|
1163
|
-
if (PROJECT_ID_FORMAT.PATTERN.test(projectId)) {
|
|
1164
|
-
result.isValid = true;
|
|
1165
|
-
}
|
|
1166
|
-
else {
|
|
1167
|
-
result.issues.push(`Invalid project ID format: ${projectId}`);
|
|
1168
|
-
}
|
|
1169
|
-
}
|
|
1170
|
-
else {
|
|
1171
|
-
result.issues.push("No project ID configured");
|
|
1172
|
-
}
|
|
1173
|
-
// Check region/location
|
|
1174
|
-
const region = process.env.GOOGLE_CLOUD_LOCATION ||
|
|
1175
|
-
process.env.VERTEX_LOCATION ||
|
|
1176
|
-
process.env.GOOGLE_VERTEX_LOCATION ||
|
|
1177
|
-
"us-central1";
|
|
1178
|
-
result.region = region;
|
|
1179
|
-
// Validate region format
|
|
1180
|
-
const regionPattern = /^[a-z]+-[a-z]+\d+$/;
|
|
1181
|
-
if (!regionPattern.test(region)) {
|
|
1182
|
-
result.issues.push(`Invalid region format: ${region}`);
|
|
1183
|
-
result.isValid = false;
|
|
1184
|
-
}
|
|
1185
|
-
return result;
|
|
1186
|
-
}
|
|
1187
|
-
/**
|
|
1188
|
-
* Check if the specified region supports Anthropic models
|
|
1189
|
-
*/
|
|
1190
|
-
static async checkVertexRegionalSupport(region = "us-central1") {
|
|
1191
|
-
// Based on Google Cloud documentation, these regions support Anthropic models
|
|
1192
|
-
const supportedRegions = [
|
|
1193
|
-
"us-central1",
|
|
1194
|
-
"us-east4",
|
|
1195
|
-
"us-west1",
|
|
1196
|
-
"us-west4",
|
|
1197
|
-
"europe-west1",
|
|
1198
|
-
"europe-west4",
|
|
1199
|
-
"asia-southeast1",
|
|
1200
|
-
"asia-northeast1",
|
|
1201
|
-
];
|
|
1202
|
-
const isSupported = supportedRegions.includes(region);
|
|
1203
|
-
logger.debug("Regional support check", {
|
|
1204
|
-
region,
|
|
1205
|
-
isSupported,
|
|
1206
|
-
supportedRegions,
|
|
1207
|
-
});
|
|
1208
|
-
return isSupported;
|
|
1209
|
-
}
|
|
1210
|
-
/**
|
|
1211
|
-
* Check network connectivity to Vertex AI endpoints
|
|
1212
|
-
*/
|
|
1213
|
-
static async checkVertexNetworkConnectivity(region = "us-central1") {
|
|
1214
|
-
try {
|
|
1215
|
-
const endpoint = `https://${region}-aiplatform.googleapis.com`;
|
|
1216
|
-
// Simple connectivity check with timeout
|
|
1217
|
-
const controller = new AbortController();
|
|
1218
|
-
const timeoutId = setTimeout(() => controller.abort(), 5000);
|
|
1219
|
-
const proxyFetch = createProxyFetch();
|
|
1220
|
-
let response = await proxyFetch(endpoint, {
|
|
1221
|
-
method: "HEAD",
|
|
1222
|
-
signal: controller.signal,
|
|
1223
|
-
});
|
|
1224
|
-
// Fallback to GET if HEAD returns 405 (Method Not Allowed) for restrictive gateways
|
|
1225
|
-
if (response.status === 405) {
|
|
1226
|
-
response = await proxyFetch(endpoint, {
|
|
1227
|
-
method: "GET",
|
|
1228
|
-
signal: controller.signal,
|
|
1229
|
-
});
|
|
1230
|
-
}
|
|
1231
|
-
clearTimeout(timeoutId);
|
|
1232
|
-
// Any response (even 401/403) indicates network connectivity
|
|
1233
|
-
const isConnected = response.status !== undefined;
|
|
1234
|
-
logger.debug("Network connectivity check", {
|
|
1235
|
-
endpoint,
|
|
1236
|
-
status: response.status,
|
|
1237
|
-
isConnected,
|
|
1238
|
-
});
|
|
1239
|
-
return isConnected;
|
|
1240
|
-
}
|
|
1241
|
-
catch (error) {
|
|
1242
|
-
logger.debug("Network connectivity check failed", {
|
|
1243
|
-
region,
|
|
1244
|
-
error: error instanceof Error ? error.message : String(error),
|
|
1245
|
-
});
|
|
1246
|
-
return false;
|
|
1247
|
-
}
|
|
1248
|
-
}
|
|
1249
|
-
/**
|
|
1250
|
-
* Check if Anthropic model integration is enabled in the project
|
|
1251
|
-
*/
|
|
1252
|
-
static async checkAnthropicModelIntegration(projectId, region = "us-central1") {
|
|
1253
|
-
if (!projectId) {
|
|
1254
|
-
logger.debug("Cannot check Anthropic integration without project ID");
|
|
1255
|
-
return false;
|
|
1256
|
-
}
|
|
1257
|
-
try {
|
|
1258
|
-
// This is a simplified check - in a real implementation, you would:
|
|
1259
|
-
// 1. Use Google Cloud APIs to check model availability
|
|
1260
|
-
// 2. Verify Anthropic integration status
|
|
1261
|
-
// 3. Check model access permissions
|
|
1262
|
-
// For now, we'll do a basic endpoint check
|
|
1263
|
-
const modelEndpoint = `https://${region}-aiplatform.googleapis.com/v1/projects/${projectId}/locations/${region}/publishers/anthropic/models`;
|
|
1264
|
-
const controller = new AbortController();
|
|
1265
|
-
const timeoutId = setTimeout(() => controller.abort(), 3000);
|
|
1266
|
-
const proxyFetch = createProxyFetch();
|
|
1267
|
-
let response = await proxyFetch(modelEndpoint, {
|
|
1268
|
-
method: "HEAD",
|
|
1269
|
-
signal: controller.signal,
|
|
1270
|
-
});
|
|
1271
|
-
// Fallback to GET if HEAD returns 405 (Method Not Allowed) for restrictive gateways
|
|
1272
|
-
if (response.status === 405) {
|
|
1273
|
-
response = await proxyFetch(modelEndpoint, {
|
|
1274
|
-
method: "GET",
|
|
1275
|
-
signal: controller.signal,
|
|
1276
|
-
});
|
|
1277
|
-
}
|
|
1278
|
-
clearTimeout(timeoutId);
|
|
1279
|
-
// Status 200 or 401/403 suggests the endpoint exists (integration enabled)
|
|
1280
|
-
// Status 404 suggests integration not enabled
|
|
1281
|
-
const integrationEnabled = response.status !== 404;
|
|
1282
|
-
logger.debug("Anthropic integration check", {
|
|
1283
|
-
projectId,
|
|
1284
|
-
region,
|
|
1285
|
-
endpoint: modelEndpoint,
|
|
1286
|
-
status: response.status,
|
|
1287
|
-
integrationEnabled,
|
|
1288
|
-
});
|
|
1289
|
-
return integrationEnabled;
|
|
1290
|
-
}
|
|
1291
|
-
catch (error) {
|
|
1292
|
-
logger.debug("Anthropic integration check failed", {
|
|
1293
|
-
projectId,
|
|
1294
|
-
region,
|
|
1295
|
-
error: error instanceof Error ? error.message : String(error),
|
|
1296
|
-
});
|
|
1297
|
-
// Assume integration might be enabled if we can't verify
|
|
1298
|
-
return true;
|
|
1299
|
-
}
|
|
1300
|
-
}
|
|
1301
|
-
/**
|
|
1302
|
-
* Initialize health checks in the background (NON-BLOCKING)
|
|
1303
|
-
* Starts background health monitoring without blocking initialization
|
|
1304
|
-
*/
|
|
1305
|
-
static initializeBackgroundHealthChecks() {
|
|
1306
|
-
// Run health checks in the background without awaiting
|
|
1307
|
-
const backgroundHealthCheck = async () => {
|
|
1308
|
-
try {
|
|
1309
|
-
logger.debug("Starting background health check initialization");
|
|
1310
|
-
await this.checkAllProvidersHealth({
|
|
1311
|
-
includeConnectivityTest: false,
|
|
1312
|
-
cacheResults: true,
|
|
1313
|
-
timeout: 2000, // 2-second timeout for background checks
|
|
1314
|
-
});
|
|
1315
|
-
logger.debug("Background health check initialization completed");
|
|
1316
|
-
}
|
|
1317
|
-
catch (error) {
|
|
1318
|
-
logger.warn("Background health check initialization failed", {
|
|
1319
|
-
error: error instanceof Error ? error.message : String(error),
|
|
1320
|
-
});
|
|
1321
|
-
}
|
|
1322
|
-
};
|
|
1323
|
-
// Start background check without blocking
|
|
1324
|
-
backgroundHealthCheck();
|
|
1325
|
-
}
|
|
1326
|
-
/**
|
|
1327
|
-
* Clear health cache for a provider or all providers
|
|
1328
|
-
*/
|
|
1329
|
-
static clearHealthCache(providerName) {
|
|
1330
|
-
if (providerName) {
|
|
1331
|
-
this.healthCache.delete(providerName);
|
|
1332
|
-
this.consecutiveFailures.delete(providerName);
|
|
1333
|
-
}
|
|
1334
|
-
else {
|
|
1335
|
-
this.healthCache.clear();
|
|
1336
|
-
this.consecutiveFailures.clear();
|
|
1337
|
-
}
|
|
1338
|
-
}
|
|
1339
|
-
static async checkFallbackProviderAvailability(providerName, model) {
|
|
1340
|
-
const provider = providerName;
|
|
1341
|
-
if (provider === AIProviderName.OLLAMA) {
|
|
1342
|
-
const availability = await this.checkOllamaAvailability({
|
|
1343
|
-
model,
|
|
1344
|
-
timeout: 2000,
|
|
1345
|
-
});
|
|
1346
|
-
return {
|
|
1347
|
-
available: availability.available,
|
|
1348
|
-
reason: availability.reason,
|
|
1349
|
-
};
|
|
1350
|
-
}
|
|
1351
|
-
if (provider === AIProviderName.LITELLM) {
|
|
1352
|
-
const availability = await this.checkLiteLLMAvailability({
|
|
1353
|
-
model,
|
|
1354
|
-
timeout: 2000,
|
|
1355
|
-
});
|
|
1356
|
-
return {
|
|
1357
|
-
available: availability.available,
|
|
1358
|
-
reason: availability.reason,
|
|
1359
|
-
};
|
|
1360
|
-
}
|
|
1361
|
-
try {
|
|
1362
|
-
const health = await this.checkProviderHealth(provider, {
|
|
1363
|
-
includeConnectivityTest: false,
|
|
1364
|
-
cacheResults: true,
|
|
1365
|
-
maxCacheAge: 15_000,
|
|
1366
|
-
timeout: 2000,
|
|
1367
|
-
});
|
|
1368
|
-
return {
|
|
1369
|
-
available: health.isHealthy,
|
|
1370
|
-
reason: health.error || health.configurationIssues[0] || health.warning,
|
|
1371
|
-
};
|
|
1372
|
-
}
|
|
1373
|
-
catch (error) {
|
|
1374
|
-
return {
|
|
1375
|
-
available: false,
|
|
1376
|
-
reason: error instanceof Error ? error.message : String(error),
|
|
1377
|
-
};
|
|
1378
|
-
}
|
|
1379
|
-
}
|
|
1380
|
-
/**
|
|
1381
|
-
* Get the best healthy provider from a list of options (NON-BLOCKING)
|
|
1382
|
-
* Prioritizes healthy providers over configured but unhealthy ones
|
|
1383
|
-
* Uses fast, cached health checks to avoid blocking initialization
|
|
1384
|
-
*/
|
|
1385
|
-
static async getBestHealthyProvider(preferredProviders = [
|
|
1386
|
-
"litellm",
|
|
1387
|
-
"ollama",
|
|
1388
|
-
"openai",
|
|
1389
|
-
"anthropic",
|
|
1390
|
-
"vertex",
|
|
1391
|
-
"google-ai",
|
|
1392
|
-
"bedrock",
|
|
1393
|
-
"azure",
|
|
1394
|
-
]) {
|
|
1395
|
-
const healthStatuses = await this.checkAllProvidersHealth({
|
|
1396
|
-
includeConnectivityTest: false, // Quick config check only
|
|
1397
|
-
cacheResults: true,
|
|
1398
|
-
timeout: 1000, // Fast 1-second timeout to avoid blocking
|
|
1399
|
-
});
|
|
1400
|
-
// First try to find a healthy provider in order of preference
|
|
1401
|
-
for (const provider of preferredProviders) {
|
|
1402
|
-
const health = healthStatuses.find((h) => h.provider === provider);
|
|
1403
|
-
if (health?.isHealthy) {
|
|
1404
|
-
logger.debug(`Selected healthy provider: ${provider}`);
|
|
1405
|
-
return provider;
|
|
1406
|
-
}
|
|
1407
|
-
}
|
|
1408
|
-
// Fallback to first healthy provider
|
|
1409
|
-
const firstHealthyProvider = healthStatuses.find((h) => h.isHealthy);
|
|
1410
|
-
if (firstHealthyProvider) {
|
|
1411
|
-
logger.info(`Using fallback healthy provider: ${firstHealthyProvider.provider}`);
|
|
1412
|
-
return firstHealthyProvider.provider;
|
|
1413
|
-
}
|
|
1414
|
-
// Last resort: first configured provider
|
|
1415
|
-
const anyConfigured = healthStatuses.find((h) => h.isConfigured);
|
|
1416
|
-
if (anyConfigured) {
|
|
1417
|
-
logger.warn(`Using configured but potentially unhealthy provider: ${anyConfigured.provider}`);
|
|
1418
|
-
return anyConfigured.provider;
|
|
1419
|
-
}
|
|
1420
|
-
logger.error("No healthy or configured providers found");
|
|
1421
|
-
return null;
|
|
1422
|
-
}
|
|
1423
|
-
/**
|
|
1424
|
-
* Get health status for all registered providers
|
|
1425
|
-
*/
|
|
1426
|
-
static async checkAllProvidersHealth(options = {}) {
|
|
1427
|
-
const providers = [
|
|
1428
|
-
AIProviderName.VERTEX,
|
|
1429
|
-
AIProviderName.GOOGLE_AI,
|
|
1430
|
-
AIProviderName.ANTHROPIC,
|
|
1431
|
-
AIProviderName.OPENAI,
|
|
1432
|
-
AIProviderName.BEDROCK,
|
|
1433
|
-
AIProviderName.AZURE,
|
|
1434
|
-
AIProviderName.LITELLM,
|
|
1435
|
-
AIProviderName.OLLAMA,
|
|
1436
|
-
];
|
|
1437
|
-
const healthChecks = providers.map((provider) => this.checkProviderHealth(provider, options));
|
|
1438
|
-
const results = await Promise.allSettled(healthChecks);
|
|
1439
|
-
return results.map((result, index) => {
|
|
1440
|
-
if (result.status === "fulfilled") {
|
|
1441
|
-
return result.value;
|
|
1442
|
-
}
|
|
1443
|
-
else {
|
|
1444
|
-
// Return a failed health status for rejected promises
|
|
1445
|
-
return {
|
|
1446
|
-
provider: providers[index],
|
|
1447
|
-
isHealthy: false,
|
|
1448
|
-
isConfigured: false,
|
|
1449
|
-
hasApiKey: false,
|
|
1450
|
-
lastChecked: new Date(),
|
|
1451
|
-
error: result.reason?.message || "Health check failed",
|
|
1452
|
-
configurationIssues: ["Health check promise rejected"],
|
|
1453
|
-
recommendations: [
|
|
1454
|
-
"Check provider configuration and network connectivity",
|
|
1455
|
-
],
|
|
1456
|
-
};
|
|
1457
|
-
}
|
|
1458
|
-
});
|
|
1459
|
-
}
|
|
1460
|
-
/**
|
|
1461
|
-
* Get a summary of provider health
|
|
1462
|
-
*/
|
|
1463
|
-
static getHealthSummary(healthStatuses) {
|
|
1464
|
-
const healthy = healthStatuses.filter((h) => h.isHealthy);
|
|
1465
|
-
const configured = healthStatuses.filter((h) => h.isConfigured);
|
|
1466
|
-
const hasIssues = healthStatuses.filter((h) => h.configurationIssues.length > 0);
|
|
1467
|
-
return {
|
|
1468
|
-
total: healthStatuses.length,
|
|
1469
|
-
healthy: healthy.length,
|
|
1470
|
-
configured: configured.length,
|
|
1471
|
-
hasIssues: hasIssues.length,
|
|
1472
|
-
healthyProviders: healthy.map((h) => h.provider),
|
|
1473
|
-
unhealthyProviders: healthStatuses
|
|
1474
|
-
.filter((h) => !h.isHealthy)
|
|
1475
|
-
.map((h) => h.provider),
|
|
1476
|
-
};
|
|
1477
|
-
}
|
|
1478
|
-
}
|
|
1479
|
-
//# sourceMappingURL=providerHealth.js.map
|