@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
package/dist/lib/types/auth.d.ts
DELETED
|
@@ -1,1140 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Auth-related type definitions for NeuroLink
|
|
3
|
-
*
|
|
4
|
-
* Canonical location for OAuth token storage types, token refresher contracts,
|
|
5
|
-
* and multi-provider authentication types.
|
|
6
|
-
* All auth type imports should reference this module (or the barrel re-export
|
|
7
|
-
* via src/lib/types/index.ts).
|
|
8
|
-
*/
|
|
9
|
-
import type { JsonValue, UnknownRecord } from "./common.js";
|
|
10
|
-
/**
|
|
11
|
-
* OAuth tokens structure for storage.
|
|
12
|
-
* Stricter version of OAuthTokens with required fields for persistent storage.
|
|
13
|
-
*/
|
|
14
|
-
export type StoredOAuthTokens = {
|
|
15
|
-
/** The access token for API authentication */
|
|
16
|
-
accessToken: string;
|
|
17
|
-
/** The refresh token for obtaining new access tokens (optional for some OAuth flows) */
|
|
18
|
-
refreshToken?: string;
|
|
19
|
-
/** Unix timestamp (ms) when the access token expires */
|
|
20
|
-
expiresAt: number;
|
|
21
|
-
/** Token type, typically "Bearer" */
|
|
22
|
-
tokenType: string;
|
|
23
|
-
/** Optional OAuth scopes granted */
|
|
24
|
-
scope?: string;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* OAuth tokens structure (relaxed version for general use).
|
|
28
|
-
* Use StoredOAuthTokens when persisting (stricter — expiresAt and tokenType required).
|
|
29
|
-
*/
|
|
30
|
-
export type OAuthTokens = {
|
|
31
|
-
/** The access token for API authentication */
|
|
32
|
-
accessToken: string;
|
|
33
|
-
/** The refresh token for obtaining new access tokens */
|
|
34
|
-
refreshToken?: string;
|
|
35
|
-
/** Token expiration timestamp (Unix epoch) */
|
|
36
|
-
expiresAt?: number;
|
|
37
|
-
/** Token type (typically "Bearer") */
|
|
38
|
-
tokenType?: string;
|
|
39
|
-
/** OAuth scope granted */
|
|
40
|
-
scope?: string;
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Token refresher function type.
|
|
44
|
-
* Takes a refresh token and returns new tokens.
|
|
45
|
-
*/
|
|
46
|
-
export type TokenRefresher = (refreshToken: string) => Promise<StoredOAuthTokens>;
|
|
47
|
-
/**
|
|
48
|
-
* Internal storage format for multi-provider tokens
|
|
49
|
-
*/
|
|
50
|
-
export type TokenStorageData = {
|
|
51
|
-
/** Version of the storage format */
|
|
52
|
-
version: string;
|
|
53
|
-
/** Last modified timestamp */
|
|
54
|
-
lastModified: number;
|
|
55
|
-
/** Tokens indexed by provider name */
|
|
56
|
-
providers: Record<string, StoredProviderTokens>;
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* Per-provider token storage structure
|
|
60
|
-
*/
|
|
61
|
-
export type StoredProviderTokens = {
|
|
62
|
-
/** The stored tokens */
|
|
63
|
-
tokens: StoredOAuthTokens;
|
|
64
|
-
/** When the tokens were stored */
|
|
65
|
-
createdAt: number;
|
|
66
|
-
/** When the tokens were last accessed */
|
|
67
|
-
lastAccessed: number;
|
|
68
|
-
/** Whether this provider's tokens are permanently disabled */
|
|
69
|
-
disabled?: boolean;
|
|
70
|
-
/** When the tokens were disabled (Unix ms) */
|
|
71
|
-
disabledAt?: number;
|
|
72
|
-
/** Reason the tokens were disabled (e.g., "refresh_invalid") */
|
|
73
|
-
disabledReason?: string;
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* Supported authentication provider types
|
|
77
|
-
*/
|
|
78
|
-
export type AuthProviderType = "auth0" | "clerk" | "firebase" | "supabase" | "cognito" | "keycloak" | "workos" | "better-auth" | "oauth2" | "jwt" | "custom";
|
|
79
|
-
/**
|
|
80
|
-
* Authentication token types
|
|
81
|
-
*/
|
|
82
|
-
export type TokenType = "jwt" | "session" | "api-key" | "oauth";
|
|
83
|
-
/**
|
|
84
|
-
* User information from authentication
|
|
85
|
-
*/
|
|
86
|
-
export type AuthUser = {
|
|
87
|
-
/** Unique user identifier */
|
|
88
|
-
id: string;
|
|
89
|
-
/** User's email address */
|
|
90
|
-
email?: string;
|
|
91
|
-
/** User's display name */
|
|
92
|
-
name?: string;
|
|
93
|
-
/** Profile picture URL */
|
|
94
|
-
picture?: string;
|
|
95
|
-
/** User's roles */
|
|
96
|
-
roles: string[];
|
|
97
|
-
/** User's permissions */
|
|
98
|
-
permissions: string[];
|
|
99
|
-
/** Provider-specific user data */
|
|
100
|
-
providerData?: Record<string, JsonValue>;
|
|
101
|
-
/** Provider-specific metadata */
|
|
102
|
-
metadata?: UnknownRecord;
|
|
103
|
-
/** Organization/tenant ID for multi-tenant apps */
|
|
104
|
-
organizationId?: string;
|
|
105
|
-
/** Email verification status */
|
|
106
|
-
emailVerified?: boolean;
|
|
107
|
-
/** Account creation timestamp */
|
|
108
|
-
createdAt?: Date;
|
|
109
|
-
/** Last update timestamp */
|
|
110
|
-
updatedAt?: Date;
|
|
111
|
-
/** Last login timestamp */
|
|
112
|
-
lastLoginAt?: Date;
|
|
113
|
-
};
|
|
114
|
-
/**
|
|
115
|
-
* Session information
|
|
116
|
-
*/
|
|
117
|
-
export type AuthSession = {
|
|
118
|
-
/** Session identifier */
|
|
119
|
-
id: string;
|
|
120
|
-
/** Associated user */
|
|
121
|
-
user: AuthUser;
|
|
122
|
-
/** Session access token */
|
|
123
|
-
accessToken?: string;
|
|
124
|
-
/** Session refresh token */
|
|
125
|
-
refreshToken?: string;
|
|
126
|
-
/** Session creation time */
|
|
127
|
-
createdAt: Date;
|
|
128
|
-
/** Session expiration time */
|
|
129
|
-
expiresAt: Date;
|
|
130
|
-
/** Whether session is still valid */
|
|
131
|
-
isValid: boolean;
|
|
132
|
-
/** Last activity timestamp */
|
|
133
|
-
lastActivityAt?: Date;
|
|
134
|
-
/** IP address of session origin */
|
|
135
|
-
ipAddress?: string;
|
|
136
|
-
/** User agent string */
|
|
137
|
-
userAgent?: string;
|
|
138
|
-
/** Device fingerprint */
|
|
139
|
-
deviceId?: string;
|
|
140
|
-
/** Session metadata */
|
|
141
|
-
metadata?: UnknownRecord;
|
|
142
|
-
};
|
|
143
|
-
/**
|
|
144
|
-
* Token validation result
|
|
145
|
-
*/
|
|
146
|
-
export type TokenValidationResult = {
|
|
147
|
-
/** Whether the token is valid */
|
|
148
|
-
valid: boolean;
|
|
149
|
-
/** Decoded token payload */
|
|
150
|
-
payload?: UnknownRecord;
|
|
151
|
-
/** Associated user if token is valid */
|
|
152
|
-
user?: AuthUser;
|
|
153
|
-
/** Decoded token claims */
|
|
154
|
-
claims?: Record<string, JsonValue>;
|
|
155
|
-
/** Error message if invalid */
|
|
156
|
-
error?: string;
|
|
157
|
-
/** Error code for programmatic handling */
|
|
158
|
-
errorCode?: AuthErrorCode;
|
|
159
|
-
/** Token expiration time */
|
|
160
|
-
expiresAt?: Date;
|
|
161
|
-
/** Token type */
|
|
162
|
-
tokenType?: TokenType;
|
|
163
|
-
/** Token issuer */
|
|
164
|
-
issuer?: string;
|
|
165
|
-
/** Token audience */
|
|
166
|
-
audience?: string | string[];
|
|
167
|
-
};
|
|
168
|
-
/**
|
|
169
|
-
* Token claims extracted from JWT
|
|
170
|
-
*/
|
|
171
|
-
export type TokenClaims = {
|
|
172
|
-
/** Subject (user ID) */
|
|
173
|
-
sub?: string;
|
|
174
|
-
/** Issuer */
|
|
175
|
-
iss?: string;
|
|
176
|
-
/** Audience */
|
|
177
|
-
aud?: string | string[];
|
|
178
|
-
/** Expiration time */
|
|
179
|
-
exp?: number;
|
|
180
|
-
/** Issued at */
|
|
181
|
-
iat?: number;
|
|
182
|
-
/** Not before */
|
|
183
|
-
nbf?: number;
|
|
184
|
-
/** JWT ID */
|
|
185
|
-
jti?: string;
|
|
186
|
-
/** Email */
|
|
187
|
-
email?: string;
|
|
188
|
-
/** Email verified */
|
|
189
|
-
email_verified?: boolean;
|
|
190
|
-
/** Name */
|
|
191
|
-
name?: string;
|
|
192
|
-
/** Picture */
|
|
193
|
-
picture?: string;
|
|
194
|
-
/** Custom claims */
|
|
195
|
-
[key: string]: JsonValue | undefined;
|
|
196
|
-
};
|
|
197
|
-
/**
|
|
198
|
-
* JWKS (JSON Web Key Set) types
|
|
199
|
-
*/
|
|
200
|
-
export type JWK = {
|
|
201
|
-
kty: string;
|
|
202
|
-
kid?: string;
|
|
203
|
-
use?: string;
|
|
204
|
-
alg?: string;
|
|
205
|
-
n?: string;
|
|
206
|
-
e?: string;
|
|
207
|
-
x?: string;
|
|
208
|
-
y?: string;
|
|
209
|
-
crv?: string;
|
|
210
|
-
};
|
|
211
|
-
export type JWKS = {
|
|
212
|
-
keys: JWK[];
|
|
213
|
-
};
|
|
214
|
-
/**
|
|
215
|
-
* Token refresh result
|
|
216
|
-
*/
|
|
217
|
-
export type TokenRefreshResult = {
|
|
218
|
-
/** New access token */
|
|
219
|
-
accessToken: string;
|
|
220
|
-
/** New refresh token (if rotated) */
|
|
221
|
-
refreshToken?: string;
|
|
222
|
-
/** Token expiration in seconds */
|
|
223
|
-
expiresIn: number;
|
|
224
|
-
};
|
|
225
|
-
/**
|
|
226
|
-
* Session validation result
|
|
227
|
-
*/
|
|
228
|
-
export type SessionValidationResult = {
|
|
229
|
-
/** Whether the session is valid */
|
|
230
|
-
valid: boolean;
|
|
231
|
-
/** Validated session if valid */
|
|
232
|
-
session?: AuthSession;
|
|
233
|
-
/** Error message if validation failed */
|
|
234
|
-
error?: string;
|
|
235
|
-
/** Error code for programmatic handling */
|
|
236
|
-
errorCode?: AuthErrorCode;
|
|
237
|
-
/** Whether session was refreshed */
|
|
238
|
-
refreshed?: boolean;
|
|
239
|
-
};
|
|
240
|
-
/**
|
|
241
|
-
* Session storage interface
|
|
242
|
-
*/
|
|
243
|
-
export type SessionStorage = {
|
|
244
|
-
/** Get a session by ID */
|
|
245
|
-
get(sessionId: string): Promise<AuthSession | null>;
|
|
246
|
-
/** Save a session */
|
|
247
|
-
save(session: AuthSession): Promise<void>;
|
|
248
|
-
/** Delete a session */
|
|
249
|
-
delete(sessionId: string): Promise<void>;
|
|
250
|
-
/** Delete all sessions for a user */
|
|
251
|
-
deleteAllForUser(userId: string): Promise<void>;
|
|
252
|
-
/** Get all sessions for a user */
|
|
253
|
-
getForUser(userId: string): Promise<AuthSession[]>;
|
|
254
|
-
/** Check if a session exists */
|
|
255
|
-
exists(sessionId: string): Promise<boolean>;
|
|
256
|
-
/** Update session last activity */
|
|
257
|
-
touch(sessionId: string): Promise<void>;
|
|
258
|
-
/** Clear all sessions */
|
|
259
|
-
clear(): Promise<void>;
|
|
260
|
-
};
|
|
261
|
-
/**
|
|
262
|
-
* Authorization check result
|
|
263
|
-
*/
|
|
264
|
-
export type AuthorizationResult = {
|
|
265
|
-
/** Whether the user is authorized */
|
|
266
|
-
authorized: boolean;
|
|
267
|
-
/** User being authorized */
|
|
268
|
-
user?: AuthUser;
|
|
269
|
-
/** Required roles that were checked */
|
|
270
|
-
requiredRoles?: string[];
|
|
271
|
-
/** Required permissions that were checked */
|
|
272
|
-
requiredPermissions?: string[];
|
|
273
|
-
/** Reason for denial if not authorized */
|
|
274
|
-
reason?: string;
|
|
275
|
-
/** Missing permissions if denied */
|
|
276
|
-
missingPermissions?: string[];
|
|
277
|
-
/** Missing roles if denied */
|
|
278
|
-
missingRoles?: string[];
|
|
279
|
-
};
|
|
280
|
-
/**
|
|
281
|
-
* Authentication request context
|
|
282
|
-
*/
|
|
283
|
-
export type AuthRequestContext = {
|
|
284
|
-
/** HTTP method */
|
|
285
|
-
method?: string;
|
|
286
|
-
/** Request URL/path */
|
|
287
|
-
path?: string;
|
|
288
|
-
/** HTTP request headers */
|
|
289
|
-
headers: Record<string, string | string[] | undefined>;
|
|
290
|
-
/** Request cookies */
|
|
291
|
-
cookies?: Record<string, string>;
|
|
292
|
-
/** Query parameters */
|
|
293
|
-
query?: Record<string, string | string[] | undefined>;
|
|
294
|
-
/** Request body (if available) */
|
|
295
|
-
body?: unknown;
|
|
296
|
-
/** IP address */
|
|
297
|
-
ip?: string;
|
|
298
|
-
/** IP address (alias for session builders that expect this field) */
|
|
299
|
-
ipAddress?: string;
|
|
300
|
-
/** Request user agent */
|
|
301
|
-
userAgent?: string;
|
|
302
|
-
/** Request ID for tracing */
|
|
303
|
-
requestId?: string;
|
|
304
|
-
};
|
|
305
|
-
/**
|
|
306
|
-
* Enhanced request context with authenticated user.
|
|
307
|
-
*
|
|
308
|
-
* Extends AuthRequestContext so it can be passed wherever a plain
|
|
309
|
-
* request context is expected (e.g. RBAC middleware callbacks).
|
|
310
|
-
*/
|
|
311
|
-
export type AuthenticatedContext = AuthRequestContext & {
|
|
312
|
-
/** Authenticated user */
|
|
313
|
-
user: AuthUser;
|
|
314
|
-
/** Current session */
|
|
315
|
-
session?: AuthSession;
|
|
316
|
-
/** Original request context (for callers that embed it explicitly) */
|
|
317
|
-
request?: AuthRequestContext;
|
|
318
|
-
/** Authentication timestamp */
|
|
319
|
-
authenticatedAt?: Date;
|
|
320
|
-
/** Provider that performed authentication */
|
|
321
|
-
provider?: AuthProviderType;
|
|
322
|
-
/** Token used for authentication */
|
|
323
|
-
token?: string;
|
|
324
|
-
/** Token claims */
|
|
325
|
-
claims?: Record<string, JsonValue>;
|
|
326
|
-
};
|
|
327
|
-
/**
|
|
328
|
-
* Base authentication provider configuration.
|
|
329
|
-
*
|
|
330
|
-
* Contains the common fields shared by every provider-specific config variant.
|
|
331
|
-
* Provider-specific fields are added via intersection in {@link AuthProviderConfig}.
|
|
332
|
-
*/
|
|
333
|
-
export type BaseAuthProviderConfig = {
|
|
334
|
-
/** Provider type */
|
|
335
|
-
type: AuthProviderType;
|
|
336
|
-
/** Whether authentication is required */
|
|
337
|
-
required?: boolean;
|
|
338
|
-
/** Enable debug logging */
|
|
339
|
-
debug?: boolean;
|
|
340
|
-
/** Custom token validation options */
|
|
341
|
-
tokenValidation?: TokenValidationConfig;
|
|
342
|
-
/** Token extraction strategy */
|
|
343
|
-
tokenExtraction?: TokenExtractionStrategy;
|
|
344
|
-
/** Session configuration */
|
|
345
|
-
session?: SessionConfig;
|
|
346
|
-
/** RBAC configuration */
|
|
347
|
-
rbac?: RBACConfig;
|
|
348
|
-
/** Cache configuration */
|
|
349
|
-
cache?: AuthCacheConfig;
|
|
350
|
-
/** Provider-specific options (generic extensibility point) */
|
|
351
|
-
options?: UnknownRecord;
|
|
352
|
-
};
|
|
353
|
-
/**
|
|
354
|
-
* Token validation configuration
|
|
355
|
-
*/
|
|
356
|
-
export type TokenValidationConfig = {
|
|
357
|
-
/** Token issuer to validate against */
|
|
358
|
-
issuer?: string;
|
|
359
|
-
/** Token audience to validate against */
|
|
360
|
-
audience?: string | string[];
|
|
361
|
-
/** Clock tolerance in seconds for expiration checks */
|
|
362
|
-
clockTolerance?: number;
|
|
363
|
-
/** Custom claims to extract */
|
|
364
|
-
extractClaims?: string[];
|
|
365
|
-
/** Whether to validate token signature */
|
|
366
|
-
validateSignature?: boolean;
|
|
367
|
-
/** JWKS endpoint for signature verification */
|
|
368
|
-
jwksUri?: string;
|
|
369
|
-
/** Cache JWKS for this duration (ms) */
|
|
370
|
-
jwksCacheDuration?: number;
|
|
371
|
-
};
|
|
372
|
-
/**
|
|
373
|
-
* Auth cache configuration
|
|
374
|
-
*/
|
|
375
|
-
export type AuthCacheConfig = {
|
|
376
|
-
/** Enable caching */
|
|
377
|
-
enabled?: boolean;
|
|
378
|
-
/** Cache TTL in seconds */
|
|
379
|
-
ttl?: number;
|
|
380
|
-
/** Maximum cache entries */
|
|
381
|
-
maxEntries?: number;
|
|
382
|
-
/** Cache key prefix */
|
|
383
|
-
prefix?: string;
|
|
384
|
-
};
|
|
385
|
-
/**
|
|
386
|
-
* Token extraction configuration (detailed, used by middleware)
|
|
387
|
-
*/
|
|
388
|
-
export type TokenExtractionConfig = {
|
|
389
|
-
/** Extract from Authorization header (Bearer token) */
|
|
390
|
-
fromHeader?: {
|
|
391
|
-
name?: string;
|
|
392
|
-
prefix?: string;
|
|
393
|
-
};
|
|
394
|
-
/** Extract from cookie */
|
|
395
|
-
fromCookie?: {
|
|
396
|
-
name: string;
|
|
397
|
-
};
|
|
398
|
-
/** Extract from query parameter */
|
|
399
|
-
fromQuery?: {
|
|
400
|
-
name: string;
|
|
401
|
-
};
|
|
402
|
-
/** Custom extraction function */
|
|
403
|
-
custom?: (context: AuthRequestContext) => string | null | Promise<string | null>;
|
|
404
|
-
};
|
|
405
|
-
/**
|
|
406
|
-
* Token extraction configuration (simple strategy)
|
|
407
|
-
*/
|
|
408
|
-
export type TokenExtractionStrategy = {
|
|
409
|
-
/** Extract from Authorization header */
|
|
410
|
-
fromHeader?: {
|
|
411
|
-
name: string;
|
|
412
|
-
scheme?: string;
|
|
413
|
-
};
|
|
414
|
-
/** Extract from cookie */
|
|
415
|
-
fromCookie?: {
|
|
416
|
-
name: string;
|
|
417
|
-
};
|
|
418
|
-
/** Extract from query parameter */
|
|
419
|
-
fromQuery?: {
|
|
420
|
-
name: string;
|
|
421
|
-
};
|
|
422
|
-
/** Custom extraction function (may be sync or async) */
|
|
423
|
-
custom?: (context: AuthRequestContext) => string | null | Promise<string | null>;
|
|
424
|
-
};
|
|
425
|
-
/**
|
|
426
|
-
* Session configuration
|
|
427
|
-
*/
|
|
428
|
-
export type SessionConfig = {
|
|
429
|
-
/** Session storage type */
|
|
430
|
-
storage?: SessionStorageType;
|
|
431
|
-
/** Session duration in seconds */
|
|
432
|
-
duration?: number;
|
|
433
|
-
/** Auto-refresh sessions before expiration */
|
|
434
|
-
autoRefresh?: boolean;
|
|
435
|
-
/** Refresh threshold in seconds (refresh when this much time remains) */
|
|
436
|
-
refreshThreshold?: number;
|
|
437
|
-
/** Allow multiple sessions per user */
|
|
438
|
-
allowMultipleSessions?: boolean;
|
|
439
|
-
/** Maximum sessions per user */
|
|
440
|
-
maxSessionsPerUser?: number;
|
|
441
|
-
/** Session identifier prefix */
|
|
442
|
-
prefix?: string;
|
|
443
|
-
/** Custom session storage implementation */
|
|
444
|
-
customStorage?: SessionStorage;
|
|
445
|
-
/** Redis configuration for distributed sessions */
|
|
446
|
-
redis?: {
|
|
447
|
-
url: string;
|
|
448
|
-
prefix?: string;
|
|
449
|
-
ttl?: number;
|
|
450
|
-
};
|
|
451
|
-
};
|
|
452
|
-
/**
|
|
453
|
-
* Session storage types
|
|
454
|
-
*/
|
|
455
|
-
export type SessionStorageType = "memory" | "redis" | "custom";
|
|
456
|
-
/**
|
|
457
|
-
* Role-Based Access Control configuration
|
|
458
|
-
*/
|
|
459
|
-
export type RBACConfig = {
|
|
460
|
-
/** Enable RBAC */
|
|
461
|
-
enabled?: boolean;
|
|
462
|
-
/** Default roles for new users */
|
|
463
|
-
defaultRoles?: string[];
|
|
464
|
-
/** Role hierarchy (higher roles inherit lower role permissions) */
|
|
465
|
-
roleHierarchy?: Record<string, string[]>;
|
|
466
|
-
/** Permission definitions per role */
|
|
467
|
-
rolePermissions?: Record<string, string[]>;
|
|
468
|
-
/** Permission definitions */
|
|
469
|
-
permissions?: PermissionDefinition[];
|
|
470
|
-
/** Default permissions for authenticated users */
|
|
471
|
-
defaultPermissions?: string[];
|
|
472
|
-
/** Super admin roles (bypass all checks) */
|
|
473
|
-
superAdminRoles?: string[];
|
|
474
|
-
};
|
|
475
|
-
/**
|
|
476
|
-
* Permission definition
|
|
477
|
-
*/
|
|
478
|
-
export type PermissionDefinition = {
|
|
479
|
-
/** Permission identifier */
|
|
480
|
-
id: string;
|
|
481
|
-
/** Human-readable name */
|
|
482
|
-
name: string;
|
|
483
|
-
/** Description */
|
|
484
|
-
description?: string;
|
|
485
|
-
/** Required roles for this permission */
|
|
486
|
-
requiredRoles?: string[];
|
|
487
|
-
};
|
|
488
|
-
/**
|
|
489
|
-
* Auth middleware options
|
|
490
|
-
*/
|
|
491
|
-
export type AuthMiddlewareOptions = {
|
|
492
|
-
/** Auth provider instance */
|
|
493
|
-
provider: AuthProvider;
|
|
494
|
-
/** Routes to exclude from authentication */
|
|
495
|
-
excludePaths?: string[];
|
|
496
|
-
/** Whether auth is optional (continue if no token) */
|
|
497
|
-
optional?: boolean;
|
|
498
|
-
/** Custom unauthorized handler */
|
|
499
|
-
onUnauthorized?: (context: AuthRequestContext) => Response | Promise<Response>;
|
|
500
|
-
/** Custom error handler */
|
|
501
|
-
onError?: (error: Error, context: AuthRequestContext) => Response | Promise<Response>;
|
|
502
|
-
};
|
|
503
|
-
/**
|
|
504
|
-
* Auth middleware configuration
|
|
505
|
-
*/
|
|
506
|
-
export type AuthMiddlewareConfig = {
|
|
507
|
-
/** Auth provider to use */
|
|
508
|
-
provider: AuthProviderType;
|
|
509
|
-
/** Provider configuration */
|
|
510
|
-
providerConfig: AuthProviderConfig;
|
|
511
|
-
/** Token extraction configuration */
|
|
512
|
-
tokenExtraction?: TokenExtractionConfig;
|
|
513
|
-
/** Routes that don't require authentication */
|
|
514
|
-
publicRoutes?: string[];
|
|
515
|
-
/** Whether authentication is optional (request proceeds with or without auth) */
|
|
516
|
-
optional?: boolean;
|
|
517
|
-
/** Custom error handler */
|
|
518
|
-
onError?: (error: AuthErrorInfo, context: AuthRequestContext) => void | Promise<void>;
|
|
519
|
-
/** Hook called after successful authentication */
|
|
520
|
-
onAuthenticated?: (context: AuthenticatedContext) => void | Promise<void>;
|
|
521
|
-
};
|
|
522
|
-
/**
|
|
523
|
-
* RBAC middleware configuration
|
|
524
|
-
*/
|
|
525
|
-
export type RBACMiddlewareConfig = {
|
|
526
|
-
/** Required roles (user must have at least one) */
|
|
527
|
-
roles?: string[];
|
|
528
|
-
/** Required permissions (user must have all) */
|
|
529
|
-
permissions?: string[];
|
|
530
|
-
/** Whether all roles are required (default: false, any role matches) */
|
|
531
|
-
requireAllRoles?: boolean;
|
|
532
|
-
/** Super admin roles that bypass all role/permission checks */
|
|
533
|
-
superAdminRoles?: string[];
|
|
534
|
-
/** Mapping from role name to granted permissions */
|
|
535
|
-
rolePermissions?: Record<string, string[]>;
|
|
536
|
-
/** Role hierarchy: a role inherits permissions from its children */
|
|
537
|
-
roleHierarchy?: Record<string, string[]>;
|
|
538
|
-
/** Custom authorization function */
|
|
539
|
-
custom?: (user: AuthUser, context: AuthRequestContext) => boolean | Promise<boolean>;
|
|
540
|
-
/** Custom error handler */
|
|
541
|
-
onDenied?: (result: AuthorizationResult, context: AuthRequestContext) => void | Promise<void>;
|
|
542
|
-
};
|
|
543
|
-
/**
|
|
544
|
-
* Auth0 provider configuration
|
|
545
|
-
*/
|
|
546
|
-
export type Auth0Config = {
|
|
547
|
-
/** Auth0 domain (e.g., 'your-tenant.auth0.com') */
|
|
548
|
-
domain: string;
|
|
549
|
-
/** Auth0 client ID */
|
|
550
|
-
clientId: string;
|
|
551
|
-
/** Auth0 client secret (for backend operations) */
|
|
552
|
-
clientSecret?: string;
|
|
553
|
-
/** Auth0 audience (API identifier) */
|
|
554
|
-
audience?: string;
|
|
555
|
-
/** Auth0 scope */
|
|
556
|
-
scope?: string;
|
|
557
|
-
/** Custom namespace for claims */
|
|
558
|
-
claimsNamespace?: string;
|
|
559
|
-
/** Management API configuration */
|
|
560
|
-
managementApi?: {
|
|
561
|
-
clientId: string;
|
|
562
|
-
clientSecret: string;
|
|
563
|
-
};
|
|
564
|
-
};
|
|
565
|
-
/**
|
|
566
|
-
* Clerk provider configuration
|
|
567
|
-
*/
|
|
568
|
-
export type ClerkConfig = {
|
|
569
|
-
/** Clerk publishable key */
|
|
570
|
-
publishableKey?: string;
|
|
571
|
-
/** Clerk secret key */
|
|
572
|
-
secretKey: string;
|
|
573
|
-
/** Clerk JWT key (for local validation) */
|
|
574
|
-
jwtKey?: string;
|
|
575
|
-
/** Clerk API version */
|
|
576
|
-
apiVersion?: string;
|
|
577
|
-
/** JWKS endpoint override */
|
|
578
|
-
jwksUrl?: string;
|
|
579
|
-
/** Allowed origins */
|
|
580
|
-
allowedOrigins?: string[];
|
|
581
|
-
};
|
|
582
|
-
/**
|
|
583
|
-
* Firebase provider configuration
|
|
584
|
-
*/
|
|
585
|
-
export type FirebaseConfig = {
|
|
586
|
-
/** Firebase project ID */
|
|
587
|
-
projectId: string;
|
|
588
|
-
/** Firebase API key */
|
|
589
|
-
apiKey?: string;
|
|
590
|
-
/** Service account credentials */
|
|
591
|
-
serviceAccount?: {
|
|
592
|
-
clientEmail: string;
|
|
593
|
-
privateKey: string;
|
|
594
|
-
};
|
|
595
|
-
/** Firebase database URL */
|
|
596
|
-
databaseURL?: string;
|
|
597
|
-
/** Custom claims key for roles */
|
|
598
|
-
rolesClaimKey?: string;
|
|
599
|
-
/** Custom claims key for permissions */
|
|
600
|
-
permissionsClaimKey?: string;
|
|
601
|
-
};
|
|
602
|
-
/**
|
|
603
|
-
* Supabase provider configuration
|
|
604
|
-
*/
|
|
605
|
-
export type SupabaseConfig = {
|
|
606
|
-
/** Supabase project URL */
|
|
607
|
-
url: string;
|
|
608
|
-
/** Supabase anon key */
|
|
609
|
-
anonKey: string;
|
|
610
|
-
/** Supabase service role key (for backend operations) */
|
|
611
|
-
serviceRoleKey?: string;
|
|
612
|
-
/** JWT secret for custom token verification */
|
|
613
|
-
jwtSecret?: string;
|
|
614
|
-
};
|
|
615
|
-
/**
|
|
616
|
-
* AWS Cognito provider configuration
|
|
617
|
-
*/
|
|
618
|
-
export type CognitoConfig = {
|
|
619
|
-
/** Cognito user pool ID */
|
|
620
|
-
userPoolId: string;
|
|
621
|
-
/** Cognito client ID */
|
|
622
|
-
clientId: string;
|
|
623
|
-
/** Cognito client secret */
|
|
624
|
-
clientSecret?: string;
|
|
625
|
-
/** AWS region */
|
|
626
|
-
region: string;
|
|
627
|
-
/** Custom attributes to extract as claims */
|
|
628
|
-
customAttributes?: string[];
|
|
629
|
-
};
|
|
630
|
-
/**
|
|
631
|
-
* Keycloak provider configuration
|
|
632
|
-
*/
|
|
633
|
-
export type KeycloakConfig = {
|
|
634
|
-
/** Keycloak server URL */
|
|
635
|
-
serverUrl: string;
|
|
636
|
-
/** Keycloak realm */
|
|
637
|
-
realm: string;
|
|
638
|
-
/** Client ID */
|
|
639
|
-
clientId: string;
|
|
640
|
-
/** Client secret */
|
|
641
|
-
clientSecret?: string;
|
|
642
|
-
/** Verify token signature */
|
|
643
|
-
verifyToken?: boolean;
|
|
644
|
-
};
|
|
645
|
-
/**
|
|
646
|
-
* Generic OAuth2 provider configuration
|
|
647
|
-
*/
|
|
648
|
-
export type OAuth2Config = {
|
|
649
|
-
/** Authorization endpoint URL */
|
|
650
|
-
authorizationUrl: string;
|
|
651
|
-
/** Token endpoint URL */
|
|
652
|
-
tokenUrl: string;
|
|
653
|
-
/** User info endpoint URL */
|
|
654
|
-
userInfoUrl?: string;
|
|
655
|
-
/** JWKS endpoint URL */
|
|
656
|
-
jwksUrl?: string;
|
|
657
|
-
/** Client ID */
|
|
658
|
-
clientId: string;
|
|
659
|
-
/** Client secret */
|
|
660
|
-
clientSecret?: string;
|
|
661
|
-
/** OAuth scopes */
|
|
662
|
-
scopes?: string[];
|
|
663
|
-
/** Redirect URL */
|
|
664
|
-
redirectUrl?: string;
|
|
665
|
-
/** Enable PKCE */
|
|
666
|
-
usePKCE?: boolean;
|
|
667
|
-
};
|
|
668
|
-
/**
|
|
669
|
-
* JWT provider configuration
|
|
670
|
-
*/
|
|
671
|
-
export type JWTConfig = {
|
|
672
|
-
/** JWT secret for HMAC algorithms */
|
|
673
|
-
secret?: string;
|
|
674
|
-
/** Public key for RSA/EC algorithms */
|
|
675
|
-
publicKey?: string;
|
|
676
|
-
/** Supported algorithms */
|
|
677
|
-
algorithms?: string[];
|
|
678
|
-
/** Token issuer */
|
|
679
|
-
issuer?: string;
|
|
680
|
-
/** Token audience */
|
|
681
|
-
audience?: string | string[];
|
|
682
|
-
};
|
|
683
|
-
/**
|
|
684
|
-
* Better Auth provider configuration
|
|
685
|
-
*/
|
|
686
|
-
export type BetterAuthConfig = {
|
|
687
|
-
/** Better Auth secret */
|
|
688
|
-
secret: string;
|
|
689
|
-
/** Better Auth base URL */
|
|
690
|
-
baseUrl: string;
|
|
691
|
-
/** Database connection string */
|
|
692
|
-
databaseUrl?: string;
|
|
693
|
-
/** Social providers configuration */
|
|
694
|
-
socialProviders?: {
|
|
695
|
-
github?: {
|
|
696
|
-
clientId: string;
|
|
697
|
-
clientSecret: string;
|
|
698
|
-
};
|
|
699
|
-
google?: {
|
|
700
|
-
clientId: string;
|
|
701
|
-
clientSecret: string;
|
|
702
|
-
};
|
|
703
|
-
discord?: {
|
|
704
|
-
clientId: string;
|
|
705
|
-
clientSecret: string;
|
|
706
|
-
};
|
|
707
|
-
};
|
|
708
|
-
};
|
|
709
|
-
/**
|
|
710
|
-
* WorkOS provider configuration
|
|
711
|
-
*/
|
|
712
|
-
export type WorkOSConfig = {
|
|
713
|
-
/** WorkOS API key */
|
|
714
|
-
apiKey: string;
|
|
715
|
-
/** WorkOS client ID */
|
|
716
|
-
clientId: string;
|
|
717
|
-
/** Organization ID (optional for multi-tenant) */
|
|
718
|
-
organizationId?: string;
|
|
719
|
-
};
|
|
720
|
-
/**
|
|
721
|
-
* Custom auth provider configuration
|
|
722
|
-
*/
|
|
723
|
-
export type CustomAuthConfig = {
|
|
724
|
-
/** Custom token validation function */
|
|
725
|
-
validateToken: (token: string, context?: AuthRequestContext) => Promise<TokenValidationResult>;
|
|
726
|
-
/** Custom user fetching function */
|
|
727
|
-
getUser?: (userId: string) => Promise<AuthUser | null>;
|
|
728
|
-
/** Custom session creation function */
|
|
729
|
-
createSession?: (user: AuthUser, context?: AuthRequestContext) => Promise<AuthSession>;
|
|
730
|
-
};
|
|
731
|
-
/**
|
|
732
|
-
* Configuration for AuthProvider.
|
|
733
|
-
*
|
|
734
|
-
* Discriminated union of base + each provider-specific config so that
|
|
735
|
-
* provider factories receive the properly typed config without requiring
|
|
736
|
-
* `as any` casts or an open index signature.
|
|
737
|
-
*
|
|
738
|
-
* The `type` discriminant narrows to the correct provider-specific fields.
|
|
739
|
-
* The final `BaseAuthProviderConfig` branch serves as a generic fallback
|
|
740
|
-
* for code that only needs the common fields.
|
|
741
|
-
*/
|
|
742
|
-
export type AuthProviderConfig = (BaseAuthProviderConfig & Auth0Config & {
|
|
743
|
-
type: "auth0";
|
|
744
|
-
}) | (BaseAuthProviderConfig & ClerkConfig & {
|
|
745
|
-
type: "clerk";
|
|
746
|
-
}) | (BaseAuthProviderConfig & FirebaseConfig & {
|
|
747
|
-
type: "firebase";
|
|
748
|
-
}) | (BaseAuthProviderConfig & SupabaseConfig & {
|
|
749
|
-
type: "supabase";
|
|
750
|
-
}) | (BaseAuthProviderConfig & CognitoConfig & {
|
|
751
|
-
type: "cognito";
|
|
752
|
-
}) | (BaseAuthProviderConfig & KeycloakConfig & {
|
|
753
|
-
type: "keycloak";
|
|
754
|
-
}) | (BaseAuthProviderConfig & OAuth2Config & {
|
|
755
|
-
type: "oauth2";
|
|
756
|
-
}) | (BaseAuthProviderConfig & JWTConfig & {
|
|
757
|
-
type: "jwt";
|
|
758
|
-
}) | (BaseAuthProviderConfig & BetterAuthConfig & {
|
|
759
|
-
type: "better-auth";
|
|
760
|
-
}) | (BaseAuthProviderConfig & WorkOSConfig & {
|
|
761
|
-
type: "workos";
|
|
762
|
-
}) | (BaseAuthProviderConfig & CustomAuthConfig & {
|
|
763
|
-
type: "custom";
|
|
764
|
-
}) | BaseAuthProviderConfig;
|
|
765
|
-
/**
|
|
766
|
-
* Auth error codes
|
|
767
|
-
*/
|
|
768
|
-
export type AuthErrorCode = "AUTH-001" | "AUTH-002" | "AUTH-003" | "AUTH-004" | "AUTH-005" | "AUTH-006" | "AUTH-007" | "AUTH-008" | "AUTH-009" | "AUTH-010" | "AUTH-011" | "AUTH-012" | "AUTH-013" | "AUTH-014" | "AUTH-015" | "AUTH-016" | "AUTH-017" | "AUTH-018" | "AUTH-019" | "AUTH-020";
|
|
769
|
-
/**
|
|
770
|
-
* Auth error information with additional context.
|
|
771
|
-
*
|
|
772
|
-
* Renamed from `AuthError` to `AuthErrorInfo` to avoid collision with the
|
|
773
|
-
* `createErrorFactory` result that is named `AuthError` in errors.ts.
|
|
774
|
-
*/
|
|
775
|
-
export type AuthErrorInfo = Error & {
|
|
776
|
-
/** Error code */
|
|
777
|
-
code: AuthErrorCode;
|
|
778
|
-
/** Provider that threw the error */
|
|
779
|
-
provider?: AuthProviderType;
|
|
780
|
-
/** HTTP status code */
|
|
781
|
-
statusCode?: number;
|
|
782
|
-
/** Whether the error is retryable */
|
|
783
|
-
retryable?: boolean;
|
|
784
|
-
/** Additional error context */
|
|
785
|
-
context?: Record<string, JsonValue>;
|
|
786
|
-
/** Original error if wrapped */
|
|
787
|
-
cause?: Error;
|
|
788
|
-
};
|
|
789
|
-
/**
|
|
790
|
-
* Auth events for EventEmitter
|
|
791
|
-
*/
|
|
792
|
-
export type AuthEvents = {
|
|
793
|
-
"auth:login": (user: AuthUser) => void;
|
|
794
|
-
"auth:logout": (userId: string) => void;
|
|
795
|
-
"auth:tokenRefresh": (session: AuthSession) => void;
|
|
796
|
-
"auth:unauthorized": (context: AuthRequestContext, reason: string) => void;
|
|
797
|
-
"auth:error": (error: Error, context?: AuthRequestContext) => void;
|
|
798
|
-
};
|
|
799
|
-
/**
|
|
800
|
-
* Auth event types for hooks
|
|
801
|
-
*/
|
|
802
|
-
export type AuthEventType = "token:validated" | "token:expired" | "token:invalid" | "session:created" | "session:refreshed" | "session:expired" | "session:revoked" | "auth:success" | "auth:failed" | "rbac:allowed" | "rbac:denied";
|
|
803
|
-
/**
|
|
804
|
-
* Auth event data
|
|
805
|
-
*/
|
|
806
|
-
export type AuthEventData = {
|
|
807
|
-
type: AuthEventType;
|
|
808
|
-
timestamp: Date;
|
|
809
|
-
provider?: AuthProviderType;
|
|
810
|
-
user?: AuthUser;
|
|
811
|
-
session?: AuthSession;
|
|
812
|
-
error?: AuthErrorInfo;
|
|
813
|
-
context?: Record<string, JsonValue>;
|
|
814
|
-
};
|
|
815
|
-
/**
|
|
816
|
-
* Auth event handler
|
|
817
|
-
*/
|
|
818
|
-
export type AuthEventHandler = (event: AuthEventData) => void | Promise<void>;
|
|
819
|
-
/**
|
|
820
|
-
* Auth provider factory function type
|
|
821
|
-
*/
|
|
822
|
-
export type AuthProviderFactoryFn = (config: AuthProviderConfig) => Promise<AuthProvider>;
|
|
823
|
-
/**
|
|
824
|
-
* Auth health check result
|
|
825
|
-
*/
|
|
826
|
-
export type AuthHealthCheck = {
|
|
827
|
-
/** Overall health status */
|
|
828
|
-
healthy: boolean;
|
|
829
|
-
/** Provider connection status */
|
|
830
|
-
providerConnected: boolean;
|
|
831
|
-
/** Session storage status */
|
|
832
|
-
sessionStorageHealthy: boolean;
|
|
833
|
-
/** Last successful authentication */
|
|
834
|
-
lastSuccessfulAuth?: Date;
|
|
835
|
-
/** Error details if unhealthy */
|
|
836
|
-
error?: string;
|
|
837
|
-
};
|
|
838
|
-
/**
|
|
839
|
-
* Health check result for auth providers (detailed)
|
|
840
|
-
*/
|
|
841
|
-
export type AuthProviderHealthCheck = {
|
|
842
|
-
/** Provider is healthy */
|
|
843
|
-
healthy: boolean;
|
|
844
|
-
/** Provider type */
|
|
845
|
-
provider: AuthProviderType;
|
|
846
|
-
/** Response time in ms */
|
|
847
|
-
latency?: number;
|
|
848
|
-
/** Last successful check */
|
|
849
|
-
lastCheck?: Date;
|
|
850
|
-
/** Error message if unhealthy */
|
|
851
|
-
error?: string;
|
|
852
|
-
/** Additional details */
|
|
853
|
-
details?: Record<string, JsonValue>;
|
|
854
|
-
};
|
|
855
|
-
/**
|
|
856
|
-
* Provider registration metadata used by AuthProviderRegistry.
|
|
857
|
-
*
|
|
858
|
-
* Previously defined in `AuthProviderRegistry.ts`; centralised here so all
|
|
859
|
-
* auth-domain types live in a single canonical file.
|
|
860
|
-
*/
|
|
861
|
-
export type AuthProviderMetadata = {
|
|
862
|
-
/** Provider type */
|
|
863
|
-
type: AuthProviderType;
|
|
864
|
-
/** Human-readable name */
|
|
865
|
-
name: string;
|
|
866
|
-
/** Description */
|
|
867
|
-
description: string;
|
|
868
|
-
/** Version */
|
|
869
|
-
version?: string;
|
|
870
|
-
/** Documentation URL */
|
|
871
|
-
documentation?: string;
|
|
872
|
-
/** Provider aliases */
|
|
873
|
-
aliases: string[];
|
|
874
|
-
/** Features supported by the provider */
|
|
875
|
-
features?: string[];
|
|
876
|
-
/** Whether provider requires external dependencies */
|
|
877
|
-
requiresExternalDependencies?: boolean;
|
|
878
|
-
/** Whether the provider ships built-in (no extra install) */
|
|
879
|
-
builtIn?: boolean;
|
|
880
|
-
};
|
|
881
|
-
/**
|
|
882
|
-
* Auth-domain provider health status returned by AuthProviderRegistry.
|
|
883
|
-
*
|
|
884
|
-
* Not to be confused with the AI-provider `ProviderHealthStatus` union in
|
|
885
|
-
* `providers.ts`; this type tracks auth-provider connectivity.
|
|
886
|
-
*/
|
|
887
|
-
export type AuthProviderHealthStatus = {
|
|
888
|
-
type: AuthProviderType;
|
|
889
|
-
healthy: boolean;
|
|
890
|
-
lastCheck: Date;
|
|
891
|
-
latency?: number;
|
|
892
|
-
error?: string;
|
|
893
|
-
};
|
|
894
|
-
/**
|
|
895
|
-
* Token operations: validate, extract, refresh, revoke.
|
|
896
|
-
*/
|
|
897
|
-
export type AuthTokenValidator = {
|
|
898
|
-
/** Validate and decode an authentication token */
|
|
899
|
-
authenticateToken(token: string, context?: AuthRequestContext): Promise<TokenValidationResult>;
|
|
900
|
-
/** Extract token from request context */
|
|
901
|
-
extractToken(context: AuthRequestContext): string | null | Promise<string | null>;
|
|
902
|
-
/** Refresh an authentication token (optional) */
|
|
903
|
-
refreshToken?(refreshToken: string): Promise<TokenRefreshResult>;
|
|
904
|
-
/** Revoke a token / logout (optional) */
|
|
905
|
-
revokeToken?(token: string): Promise<void>;
|
|
906
|
-
};
|
|
907
|
-
/**
|
|
908
|
-
* Authorization: check roles and permissions.
|
|
909
|
-
*/
|
|
910
|
-
export type AuthUserAuthorizer = {
|
|
911
|
-
/** Check if a user is authorized to perform an action */
|
|
912
|
-
authorizeUser(user: AuthUser, permission: string): Promise<AuthorizationResult>;
|
|
913
|
-
/** Check if user has specific roles */
|
|
914
|
-
authorizeRoles(user: AuthUser, roles: string[]): Promise<AuthorizationResult>;
|
|
915
|
-
/** Check if user has all specified permissions */
|
|
916
|
-
authorizePermissions(user: AuthUser, permissions: string[]): Promise<AuthorizationResult>;
|
|
917
|
-
};
|
|
918
|
-
/**
|
|
919
|
-
* Session management: create, read, refresh, destroy.
|
|
920
|
-
*/
|
|
921
|
-
export type AuthSessionManager = {
|
|
922
|
-
/** Create a new session for a user */
|
|
923
|
-
createSession(user: AuthUser, context?: AuthRequestContext): Promise<AuthSession>;
|
|
924
|
-
/** Get an existing session by ID */
|
|
925
|
-
getSession(sessionId: string): Promise<AuthSession | null>;
|
|
926
|
-
/** Refresh/extend a session */
|
|
927
|
-
refreshSession(sessionId: string): Promise<AuthSession | null>;
|
|
928
|
-
/** Invalidate/destroy a session */
|
|
929
|
-
destroySession(sessionId: string): Promise<void>;
|
|
930
|
-
/** Get all active sessions for a user */
|
|
931
|
-
getUserSessions(userId: string): Promise<AuthSession[]>;
|
|
932
|
-
/** Invalidate all sessions for a user (global logout) */
|
|
933
|
-
destroyAllUserSessions(userId: string): Promise<void>;
|
|
934
|
-
};
|
|
935
|
-
/**
|
|
936
|
-
* Request-level authentication.
|
|
937
|
-
*/
|
|
938
|
-
export type AuthRequestHandler = {
|
|
939
|
-
/** Authenticate a request and return full context */
|
|
940
|
-
authenticateRequest(context: AuthRequestContext): Promise<AuthenticatedContext | null>;
|
|
941
|
-
};
|
|
942
|
-
/**
|
|
943
|
-
* Optional user management operations.
|
|
944
|
-
*/
|
|
945
|
-
export type AuthUserManager = {
|
|
946
|
-
/** Get user by ID */
|
|
947
|
-
getUser?(userId: string): Promise<AuthUser | null>;
|
|
948
|
-
/** Get user by email */
|
|
949
|
-
getUserByEmail?(email: string): Promise<AuthUser | null>;
|
|
950
|
-
/** Update user metadata */
|
|
951
|
-
updateUserMetadata?(userId: string, metadata: Record<string, unknown>): Promise<AuthUser>;
|
|
952
|
-
/** Update user roles */
|
|
953
|
-
updateUserRoles?(userId: string, roles: string[]): Promise<AuthUser>;
|
|
954
|
-
/** Update user permissions */
|
|
955
|
-
updateUserPermissions?(userId: string, permissions: string[]): Promise<AuthUser>;
|
|
956
|
-
};
|
|
957
|
-
/**
|
|
958
|
-
* Provider lifecycle hooks.
|
|
959
|
-
*/
|
|
960
|
-
export type AuthLifecycle = {
|
|
961
|
-
/** Check provider health */
|
|
962
|
-
healthCheck?(): Promise<AuthHealthCheck>;
|
|
963
|
-
/** Initialize the provider */
|
|
964
|
-
initialize?(): Promise<void>;
|
|
965
|
-
/** Cleanup provider resources */
|
|
966
|
-
cleanup?(): Promise<void>;
|
|
967
|
-
/** Clean up resources (alias for cleanup) */
|
|
968
|
-
dispose?(): Promise<void>;
|
|
969
|
-
};
|
|
970
|
-
/**
|
|
971
|
-
* Base interface for all authentication providers.
|
|
972
|
-
*
|
|
973
|
-
* Composed from focused sub-types so consumers can depend on only the
|
|
974
|
-
* slice they need (e.g. `AuthTokenValidator` for token-only middleware).
|
|
975
|
-
*
|
|
976
|
-
* Unified auth provider interface covering:
|
|
977
|
-
* - Token validation (AuthTokenValidator)
|
|
978
|
-
* - User authorization (AuthUserAuthorizer)
|
|
979
|
-
* - Session management (AuthSessionManager)
|
|
980
|
-
* - Request context (AuthRequestHandler)
|
|
981
|
-
* - User management (AuthUserManager)
|
|
982
|
-
* - Lifecycle (AuthLifecycle)
|
|
983
|
-
*/
|
|
984
|
-
export type AuthProvider = AuthTokenValidator & AuthUserAuthorizer & AuthSessionManager & AuthRequestHandler & AuthUserManager & AuthLifecycle & {
|
|
985
|
-
/** Provider type identifier */
|
|
986
|
-
readonly type: AuthProviderType;
|
|
987
|
-
/** Provider configuration */
|
|
988
|
-
readonly config: AuthProviderConfig;
|
|
989
|
-
};
|
|
990
|
-
/**
|
|
991
|
-
* Session storage interface for SessionManager
|
|
992
|
-
*
|
|
993
|
-
* Defines the contract for session storage backends (memory, Redis, custom).
|
|
994
|
-
* Note: This is a SessionManager-specific interface that uses `set()`/`getUserSessions()`/
|
|
995
|
-
* `deleteUserSessions()`/`isHealthy()` method names, which differ from the canonical
|
|
996
|
-
* `SessionStorage` type in `../types/auth.js` (which uses `save()`/`getForUser()`/
|
|
997
|
-
* `deleteAllForUser()`/`exists()`/`touch()`). Both interfaces coexist because
|
|
998
|
-
* SessionManager and BaseAuthProvider have separate storage patterns.
|
|
999
|
-
*/
|
|
1000
|
-
export type SessionManagerStorage = {
|
|
1001
|
-
/** Get a session by ID */
|
|
1002
|
-
get(sessionId: string): Promise<AuthSession | null>;
|
|
1003
|
-
/** Store a session */
|
|
1004
|
-
set(session: AuthSession): Promise<void>;
|
|
1005
|
-
/** Delete a session */
|
|
1006
|
-
delete(sessionId: string): Promise<void>;
|
|
1007
|
-
/** Get all sessions for a user */
|
|
1008
|
-
getUserSessions(userId: string): Promise<AuthSession[]>;
|
|
1009
|
-
/** Delete all sessions for a user */
|
|
1010
|
-
deleteUserSessions(userId: string): Promise<void>;
|
|
1011
|
-
/** Clear all sessions (for cleanup) */
|
|
1012
|
-
clear(): Promise<void>;
|
|
1013
|
-
/** Health check */
|
|
1014
|
-
isHealthy(): Promise<boolean>;
|
|
1015
|
-
};
|
|
1016
|
-
/** Cached JWKS entry with TTL. Used by Cognito and Keycloak providers. */
|
|
1017
|
-
export type AuthJWKSCacheEntry = {
|
|
1018
|
-
jwks: JWKS;
|
|
1019
|
-
expiresAt: number;
|
|
1020
|
-
};
|
|
1021
|
-
/** Async constructor for an auth provider given its config. */
|
|
1022
|
-
export type AuthProviderConstructor = (config: AuthProviderConfig) => Promise<AuthProvider>;
|
|
1023
|
-
/** Registration row for an auth provider in AuthProviderFactory. */
|
|
1024
|
-
export type AuthProviderRegistration = {
|
|
1025
|
-
factory: AuthProviderConstructor;
|
|
1026
|
-
aliases: string[];
|
|
1027
|
-
metadata?: AuthProviderMetadata;
|
|
1028
|
-
};
|
|
1029
|
-
/** Synthetic Claude Code client identity used for quota + identification. */
|
|
1030
|
-
export type ClaudeCodeIdentity = {
|
|
1031
|
-
deviceId: string;
|
|
1032
|
-
accountUuid: string;
|
|
1033
|
-
sessionId: string;
|
|
1034
|
-
metadataUserId: string;
|
|
1035
|
-
};
|
|
1036
|
-
/** Minimal request object accepted by the auth middleware. */
|
|
1037
|
-
export type IncomingRequest = {
|
|
1038
|
-
method?: string;
|
|
1039
|
-
url?: string;
|
|
1040
|
-
path?: string;
|
|
1041
|
-
headers?: Record<string, string | string[] | undefined>;
|
|
1042
|
-
cookies?: Record<string, string>;
|
|
1043
|
-
query?: Record<string, string | string[] | undefined>;
|
|
1044
|
-
body?: unknown;
|
|
1045
|
-
ip?: string;
|
|
1046
|
-
user?: AuthUser;
|
|
1047
|
-
authContext?: AuthenticatedContext;
|
|
1048
|
-
};
|
|
1049
|
-
/** Minimal Express-style response object used by the auth middleware. */
|
|
1050
|
-
export type OutgoingResponse = {
|
|
1051
|
-
status(code: number): OutgoingResponse;
|
|
1052
|
-
json(body: unknown): void;
|
|
1053
|
-
};
|
|
1054
|
-
/** Middleware handler function type for the auth layer. */
|
|
1055
|
-
export type AuthMiddlewareHandler<TContext = AuthRequestContext> = (context: TContext) => Promise<AuthMiddlewareResult>;
|
|
1056
|
-
/** Result produced by an auth middleware handler. */
|
|
1057
|
-
export type AuthMiddlewareResult = {
|
|
1058
|
-
proceed: boolean;
|
|
1059
|
-
context?: AuthenticatedContext;
|
|
1060
|
-
error?: {
|
|
1061
|
-
statusCode: number;
|
|
1062
|
-
message: string;
|
|
1063
|
-
code?: string;
|
|
1064
|
-
};
|
|
1065
|
-
};
|
|
1066
|
-
/** Next-function for Express-style middleware chaining. */
|
|
1067
|
-
export type NextFunction = () => Promise<void>;
|
|
1068
|
-
/** Express-style auth middleware signature. */
|
|
1069
|
-
export type ExpressMiddleware = (req: IncomingRequest, res: OutgoingResponse, next: NextFunction) => Promise<void>;
|
|
1070
|
-
/** Token bucket state for a single user. */
|
|
1071
|
-
export type TokenBucket = {
|
|
1072
|
-
tokens: number;
|
|
1073
|
-
lastRefill: number;
|
|
1074
|
-
userId: string;
|
|
1075
|
-
};
|
|
1076
|
-
/** Rate limit configuration per user or role. */
|
|
1077
|
-
export type AuthRateLimitConfig = {
|
|
1078
|
-
maxRequests: number;
|
|
1079
|
-
windowMs: number;
|
|
1080
|
-
roleLimits?: Record<string, number>;
|
|
1081
|
-
userLimits?: Record<string, number>;
|
|
1082
|
-
skipRoles?: string[];
|
|
1083
|
-
message?: string;
|
|
1084
|
-
};
|
|
1085
|
-
/** Rate limit result. */
|
|
1086
|
-
export type RateLimitResult = {
|
|
1087
|
-
allowed: boolean;
|
|
1088
|
-
remaining: number;
|
|
1089
|
-
resetIn: number;
|
|
1090
|
-
limit: number;
|
|
1091
|
-
error?: string;
|
|
1092
|
-
};
|
|
1093
|
-
/** Result of an atomic consume operation against a token bucket. */
|
|
1094
|
-
export type AtomicConsumeResult = {
|
|
1095
|
-
bucket: TokenBucket;
|
|
1096
|
-
consumed: boolean;
|
|
1097
|
-
};
|
|
1098
|
-
/** Storage contract for rate-limit buckets (memory or Redis). */
|
|
1099
|
-
export type RateLimitStorage = {
|
|
1100
|
-
getBucket(userId: string): Promise<TokenBucket | null>;
|
|
1101
|
-
setBucket(userId: string, bucket: TokenBucket): Promise<void>;
|
|
1102
|
-
deleteBucket(userId: string): Promise<void>;
|
|
1103
|
-
healthCheck(): Promise<boolean>;
|
|
1104
|
-
cleanup(): Promise<void>;
|
|
1105
|
-
atomicConsume?(userId: string, limit: number, windowMs: number, nowMs: number): Promise<AtomicConsumeResult | null>;
|
|
1106
|
-
};
|
|
1107
|
-
/**
|
|
1108
|
-
* Minimal Redis client shape used by the rate-limiter to avoid a hard
|
|
1109
|
-
* dependency on the full `RedisClientType`. Named with an Auth prefix to
|
|
1110
|
-
* avoid collision with `RedisClientType` from the redis package.
|
|
1111
|
-
*/
|
|
1112
|
-
export type AuthRateLimitRedisClient = {
|
|
1113
|
-
connect(): Promise<void>;
|
|
1114
|
-
quit(): Promise<void>;
|
|
1115
|
-
ping(): Promise<string>;
|
|
1116
|
-
get(key: string): Promise<string | null>;
|
|
1117
|
-
setEx(key: string, seconds: number, value: string): Promise<void>;
|
|
1118
|
-
del(key: string): Promise<number>;
|
|
1119
|
-
eval(script: string, numkeys: number, ...args: string[]): Promise<unknown>;
|
|
1120
|
-
};
|
|
1121
|
-
/** Middleware-level outcome returned by the rate limiter. */
|
|
1122
|
-
export type RateLimitMiddlewareResult = {
|
|
1123
|
-
proceed: boolean;
|
|
1124
|
-
rateLimitResult: RateLimitResult;
|
|
1125
|
-
response?: Response;
|
|
1126
|
-
};
|
|
1127
|
-
/** Auth0 JWT payload structure. */
|
|
1128
|
-
export type Auth0TokenPayload = {
|
|
1129
|
-
sub: string;
|
|
1130
|
-
email?: string;
|
|
1131
|
-
name?: string;
|
|
1132
|
-
picture?: string;
|
|
1133
|
-
email_verified?: boolean;
|
|
1134
|
-
roles?: string[];
|
|
1135
|
-
permissions?: string[];
|
|
1136
|
-
iat: number;
|
|
1137
|
-
exp: number;
|
|
1138
|
-
aud: string | string[];
|
|
1139
|
-
iss: string;
|
|
1140
|
-
};
|