@juspay/neurolink 9.5.2 → 9.6.0
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 +16 -0
- package/README.md +29 -25
- package/dist/agent/directTools.d.ts +5 -5
- package/dist/cli/commands/config.d.ts +9 -9
- package/dist/cli/commands/serve.d.ts +37 -0
- package/dist/cli/commands/serve.js +302 -229
- package/dist/cli/commands/setup-anthropic.d.ts +2 -2
- package/dist/cli/commands/setup-azure.d.ts +2 -2
- package/dist/cli/commands/setup-bedrock.d.ts +2 -2
- package/dist/cli/commands/setup-gcp.d.ts +2 -2
- package/dist/cli/commands/setup-google-ai.d.ts +2 -2
- package/dist/cli/commands/setup-huggingface.d.ts +2 -2
- package/dist/cli/commands/setup-mistral.d.ts +2 -2
- package/dist/cli/commands/setup-openai.d.ts +2 -2
- package/dist/cli/commands/setup.d.ts +2 -2
- package/dist/cli/factories/commandFactory.js +16 -2
- package/dist/cli/loop/optionsSchema.d.ts +2 -2
- package/dist/cli/loop/session.d.ts +4 -0
- package/dist/cli/loop/session.js +49 -4
- package/dist/cli/utils/interactiveSetup.d.ts +4 -4
- package/dist/config/conversationMemory.d.ts +2 -0
- package/dist/config/conversationMemory.js +5 -5
- package/dist/constants/contextWindows.d.ts +46 -0
- package/dist/constants/contextWindows.js +156 -0
- package/dist/context/budgetChecker.d.ts +18 -0
- package/dist/context/budgetChecker.js +71 -0
- package/dist/context/contextCompactor.d.ts +22 -0
- package/dist/context/contextCompactor.js +106 -0
- package/dist/context/effectiveHistory.d.ts +52 -0
- package/dist/context/effectiveHistory.js +105 -0
- package/dist/context/errorDetection.d.ts +14 -0
- package/dist/context/errorDetection.js +124 -0
- package/dist/context/fileSummarizationService.d.ts +54 -0
- package/dist/context/fileSummarizationService.js +255 -0
- package/dist/context/fileSummarizer.d.ts +56 -0
- package/dist/context/fileSummarizer.js +145 -0
- package/dist/context/fileTokenBudget.d.ts +53 -0
- package/dist/context/fileTokenBudget.js +127 -0
- package/dist/context/prompts/summarizationPrompt.d.ts +17 -0
- package/dist/context/prompts/summarizationPrompt.js +110 -0
- package/dist/context/stages/fileReadDeduplicator.d.ts +10 -0
- package/dist/context/stages/fileReadDeduplicator.js +66 -0
- package/dist/context/stages/slidingWindowTruncator.d.ts +11 -0
- package/dist/context/stages/slidingWindowTruncator.js +42 -0
- package/dist/context/stages/structuredSummarizer.d.ts +10 -0
- package/dist/context/stages/structuredSummarizer.js +49 -0
- package/dist/context/stages/toolOutputPruner.d.ts +10 -0
- package/dist/context/stages/toolOutputPruner.js +52 -0
- package/dist/context/summarizationEngine.d.ts +45 -0
- package/dist/context/summarizationEngine.js +110 -0
- package/dist/context/toolOutputLimits.d.ts +17 -0
- package/dist/context/toolOutputLimits.js +84 -0
- package/dist/context/toolPairRepair.d.ts +16 -0
- package/dist/context/toolPairRepair.js +66 -0
- package/dist/core/conversationMemoryManager.d.ts +5 -15
- package/dist/core/conversationMemoryManager.js +15 -75
- package/dist/core/modules/MessageBuilder.d.ts +1 -1
- package/dist/core/modules/MessageBuilder.js +2 -0
- package/dist/core/modules/TelemetryHandler.d.ts +2 -3
- package/dist/core/modules/TelemetryHandler.js +3 -3
- package/dist/core/modules/ToolsManager.d.ts +2 -2
- package/dist/core/redisConversationMemoryManager.d.ts +8 -14
- package/dist/core/redisConversationMemoryManager.js +69 -78
- package/dist/factories/providerFactory.d.ts +2 -2
- package/dist/files/fileReferenceRegistry.d.ts +276 -0
- package/dist/files/fileReferenceRegistry.js +1543 -0
- package/dist/files/fileTools.d.ts +423 -0
- package/dist/files/fileTools.js +449 -0
- package/dist/files/index.d.ts +14 -0
- package/dist/files/index.js +13 -0
- package/dist/files/streamingReader.d.ts +93 -0
- package/dist/files/streamingReader.js +321 -0
- package/dist/files/types.d.ts +23 -0
- package/dist/files/types.js +23 -0
- package/dist/image-gen/imageGenTools.d.ts +2 -2
- package/dist/image-gen/types.d.ts +12 -12
- package/dist/lib/agent/directTools.d.ts +7 -7
- package/dist/lib/config/conversationMemory.d.ts +2 -0
- package/dist/lib/config/conversationMemory.js +5 -5
- package/dist/lib/constants/contextWindows.d.ts +46 -0
- package/dist/lib/constants/contextWindows.js +157 -0
- package/dist/lib/context/budgetChecker.d.ts +18 -0
- package/dist/lib/context/budgetChecker.js +72 -0
- package/dist/lib/context/contextCompactor.d.ts +22 -0
- package/dist/lib/context/contextCompactor.js +107 -0
- package/dist/lib/context/effectiveHistory.d.ts +52 -0
- package/dist/lib/context/effectiveHistory.js +106 -0
- package/dist/lib/context/errorDetection.d.ts +14 -0
- package/dist/lib/context/errorDetection.js +125 -0
- package/dist/lib/context/fileSummarizationService.d.ts +54 -0
- package/dist/lib/context/fileSummarizationService.js +256 -0
- package/dist/lib/context/fileSummarizer.d.ts +56 -0
- package/dist/lib/context/fileSummarizer.js +146 -0
- package/dist/lib/context/fileTokenBudget.d.ts +53 -0
- package/dist/lib/context/fileTokenBudget.js +128 -0
- package/dist/lib/context/prompts/summarizationPrompt.d.ts +17 -0
- package/dist/lib/context/prompts/summarizationPrompt.js +111 -0
- package/dist/lib/context/stages/fileReadDeduplicator.d.ts +10 -0
- package/dist/lib/context/stages/fileReadDeduplicator.js +67 -0
- package/dist/lib/context/stages/slidingWindowTruncator.d.ts +11 -0
- package/dist/lib/context/stages/slidingWindowTruncator.js +43 -0
- package/dist/lib/context/stages/structuredSummarizer.d.ts +10 -0
- package/dist/lib/context/stages/structuredSummarizer.js +50 -0
- package/dist/lib/context/stages/toolOutputPruner.d.ts +10 -0
- package/dist/lib/context/stages/toolOutputPruner.js +53 -0
- package/dist/lib/context/summarizationEngine.d.ts +45 -0
- package/dist/lib/context/summarizationEngine.js +111 -0
- package/dist/lib/context/toolOutputLimits.d.ts +17 -0
- package/dist/lib/context/toolOutputLimits.js +85 -0
- package/dist/lib/context/toolPairRepair.d.ts +16 -0
- package/dist/lib/context/toolPairRepair.js +67 -0
- package/dist/lib/core/conversationMemoryManager.d.ts +5 -15
- package/dist/lib/core/conversationMemoryManager.js +15 -75
- package/dist/lib/core/modules/MessageBuilder.d.ts +1 -1
- package/dist/lib/core/modules/MessageBuilder.js +2 -0
- package/dist/lib/core/modules/TelemetryHandler.d.ts +2 -3
- package/dist/lib/core/modules/TelemetryHandler.js +3 -3
- package/dist/lib/core/modules/ToolsManager.d.ts +2 -2
- package/dist/lib/core/redisConversationMemoryManager.d.ts +8 -14
- package/dist/lib/core/redisConversationMemoryManager.js +69 -78
- package/dist/lib/factories/providerFactory.d.ts +2 -2
- package/dist/lib/files/fileReferenceRegistry.d.ts +276 -0
- package/dist/lib/files/fileReferenceRegistry.js +1544 -0
- package/dist/lib/files/fileTools.d.ts +423 -0
- package/dist/lib/files/fileTools.js +450 -0
- package/dist/lib/files/index.d.ts +14 -0
- package/dist/lib/files/index.js +14 -0
- package/dist/lib/files/streamingReader.d.ts +93 -0
- package/dist/lib/files/streamingReader.js +322 -0
- package/dist/lib/files/types.d.ts +23 -0
- package/dist/lib/files/types.js +24 -0
- package/dist/lib/image-gen/imageGenTools.d.ts +2 -2
- package/dist/lib/image-gen/types.d.ts +12 -12
- package/dist/lib/memory/mem0Initializer.d.ts +2 -2
- package/dist/lib/neurolink.d.ts +61 -2
- package/dist/lib/neurolink.js +619 -307
- package/dist/lib/processors/archive/ArchiveProcessor.d.ts +327 -0
- package/dist/lib/processors/archive/ArchiveProcessor.js +1309 -0
- package/dist/lib/processors/archive/index.d.ts +33 -0
- package/dist/lib/processors/archive/index.js +43 -0
- package/dist/lib/processors/base/types.d.ts +70 -64
- package/dist/lib/processors/base/types.js +6 -0
- package/dist/lib/processors/cli/fileProcessorCli.d.ts +8 -8
- package/dist/lib/processors/cli/fileProcessorCli.js +5 -5
- package/dist/lib/processors/config/mimeTypes.js +25 -0
- package/dist/lib/processors/config/sizeLimits.d.ts +52 -40
- package/dist/lib/processors/config/sizeLimits.js +56 -44
- package/dist/lib/processors/document/ExcelProcessor.d.ts +14 -0
- package/dist/lib/processors/document/ExcelProcessor.js +72 -1
- package/dist/lib/processors/document/PptxProcessor.d.ts +63 -0
- package/dist/lib/processors/document/PptxProcessor.js +158 -0
- package/dist/lib/processors/document/index.d.ts +1 -0
- package/dist/lib/processors/document/index.js +6 -0
- package/dist/lib/processors/errors/FileErrorCode.d.ts +2 -2
- package/dist/lib/processors/errors/errorHelpers.d.ts +2 -2
- package/dist/lib/processors/errors/errorSerializer.d.ts +4 -4
- package/dist/lib/processors/index.d.ts +8 -2
- package/dist/lib/processors/index.js +5 -2
- package/dist/lib/processors/integration/FileProcessorIntegration.d.ts +8 -8
- package/dist/lib/processors/integration/FileProcessorIntegration.js +7 -7
- package/dist/lib/processors/media/AudioProcessor.d.ts +328 -0
- package/dist/lib/processors/media/AudioProcessor.js +708 -0
- package/dist/lib/processors/media/VideoProcessor.d.ts +350 -0
- package/dist/lib/processors/media/VideoProcessor.js +992 -0
- package/dist/lib/processors/media/index.d.ts +27 -0
- package/dist/lib/processors/media/index.js +37 -0
- package/dist/lib/processors/registry/ProcessorRegistry.d.ts +19 -5
- package/dist/lib/processors/registry/ProcessorRegistry.js +103 -8
- package/dist/lib/processors/registry/index.d.ts +1 -1
- package/dist/lib/processors/registry/index.js +1 -1
- package/dist/lib/processors/registry/types.d.ts +2 -2
- package/dist/lib/providers/googleAiStudio.d.ts +34 -0
- package/dist/lib/providers/googleAiStudio.js +267 -397
- package/dist/lib/providers/googleVertex.d.ts +55 -1
- package/dist/lib/providers/googleVertex.js +452 -719
- package/dist/lib/providers/sagemaker/detection.d.ts +6 -6
- package/dist/lib/providers/sagemaker/diagnostics.d.ts +4 -4
- package/dist/lib/providers/sagemaker/parsers.d.ts +4 -4
- package/dist/lib/rag/chunkers/RecursiveChunker.js +2 -2
- package/dist/lib/rag/document/loaders.d.ts +6 -71
- package/dist/lib/rag/document/loaders.js +5 -5
- package/dist/lib/rag/graphRag/graphRAG.js +26 -9
- package/dist/lib/rag/metadata/MetadataExtractorFactory.d.ts +5 -55
- package/dist/lib/rag/metadata/metadataExtractor.js +6 -3
- package/dist/lib/rag/pipeline/RAGPipeline.d.ts +8 -126
- package/dist/lib/rag/pipeline/RAGPipeline.js +11 -11
- package/dist/lib/rag/pipeline/contextAssembly.d.ts +3 -42
- package/dist/lib/rag/pipeline/contextAssembly.js +6 -3
- package/dist/lib/rag/reranker/RerankerFactory.d.ts +5 -60
- package/dist/lib/rag/resilience/CircuitBreaker.d.ts +3 -33
- package/dist/lib/rag/resilience/RetryHandler.d.ts +2 -21
- package/dist/lib/rag/retrieval/hybridSearch.d.ts +3 -41
- package/dist/lib/rag/retrieval/vectorQueryTool.d.ts +2 -13
- package/dist/lib/rag/retrieval/vectorQueryTool.js +4 -3
- package/dist/lib/rag/types.d.ts +3 -3
- package/dist/lib/sdk/toolRegistration.d.ts +2 -2
- package/dist/lib/server/middleware/cache.d.ts +2 -2
- package/dist/lib/server/middleware/rateLimit.d.ts +2 -2
- package/dist/lib/server/routes/mcpRoutes.js +277 -249
- package/dist/lib/server/routes/memoryRoutes.js +287 -281
- package/dist/lib/server/utils/validation.d.ts +10 -10
- package/dist/lib/session/globalSessionState.d.ts +2 -2
- package/dist/lib/telemetry/telemetryService.d.ts +2 -2
- package/dist/lib/types/common.d.ts +39 -0
- package/dist/lib/types/contextTypes.d.ts +255 -0
- package/dist/lib/types/contextTypes.js +0 -2
- package/dist/lib/types/conversation.d.ts +62 -0
- package/dist/lib/types/conversationMemoryInterface.d.ts +27 -0
- package/dist/lib/types/conversationMemoryInterface.js +7 -0
- package/dist/lib/types/fileReferenceTypes.d.ts +222 -0
- package/dist/lib/types/fileReferenceTypes.js +9 -0
- package/dist/lib/types/fileTypes.d.ts +26 -3
- package/dist/lib/types/generateTypes.d.ts +22 -1
- package/dist/lib/types/index.d.ts +4 -5
- package/dist/lib/types/index.js +8 -10
- package/dist/lib/types/modelTypes.d.ts +2 -2
- package/dist/lib/types/processorTypes.d.ts +597 -0
- package/dist/lib/types/processorTypes.js +91 -0
- package/dist/lib/types/ragTypes.d.ts +481 -0
- package/dist/lib/types/ragTypes.js +8 -0
- package/dist/lib/types/sdkTypes.d.ts +17 -18
- package/dist/lib/types/streamTypes.d.ts +11 -1
- package/dist/lib/utils/async/retry.d.ts +2 -2
- package/dist/lib/utils/async/withTimeout.js +3 -1
- package/dist/lib/utils/conversationMemory.d.ts +12 -6
- package/dist/lib/utils/conversationMemory.js +76 -36
- package/dist/lib/utils/fileDetector.d.ts +62 -0
- package/dist/lib/utils/fileDetector.js +1014 -14
- package/dist/lib/utils/json/safeParse.d.ts +2 -2
- package/dist/lib/utils/messageBuilder.js +806 -153
- package/dist/lib/utils/modelChoices.d.ts +2 -2
- package/dist/lib/utils/multimodalOptionsBuilder.d.ts +2 -1
- package/dist/lib/utils/multimodalOptionsBuilder.js +1 -0
- package/dist/lib/utils/rateLimiter.d.ts +2 -2
- package/dist/lib/utils/sanitizers/filename.d.ts +4 -4
- package/dist/lib/utils/sanitizers/svg.d.ts +2 -2
- package/dist/lib/utils/thinkingConfig.d.ts +6 -6
- package/dist/lib/utils/tokenEstimation.d.ts +68 -0
- package/dist/lib/utils/tokenEstimation.js +113 -0
- package/dist/lib/utils/tokenUtils.d.ts +4 -4
- package/dist/lib/utils/ttsProcessor.d.ts +2 -2
- package/dist/lib/workflow/config.d.ts +150 -150
- package/dist/memory/mem0Initializer.d.ts +2 -2
- package/dist/neurolink.d.ts +61 -2
- package/dist/neurolink.js +619 -307
- package/dist/processors/archive/ArchiveProcessor.d.ts +327 -0
- package/dist/processors/archive/ArchiveProcessor.js +1308 -0
- package/dist/processors/archive/index.d.ts +33 -0
- package/dist/processors/archive/index.js +42 -0
- package/dist/processors/base/types.d.ts +70 -64
- package/dist/processors/base/types.js +6 -0
- package/dist/processors/cli/fileProcessorCli.d.ts +8 -8
- package/dist/processors/cli/fileProcessorCli.js +5 -5
- package/dist/processors/config/mimeTypes.js +25 -0
- package/dist/processors/config/sizeLimits.d.ts +52 -40
- package/dist/processors/config/sizeLimits.js +56 -44
- package/dist/processors/document/ExcelProcessor.d.ts +14 -0
- package/dist/processors/document/ExcelProcessor.js +72 -1
- package/dist/processors/document/PptxProcessor.d.ts +63 -0
- package/dist/processors/document/PptxProcessor.js +157 -0
- package/dist/processors/document/index.d.ts +1 -0
- package/dist/processors/document/index.js +6 -0
- package/dist/processors/errors/FileErrorCode.d.ts +2 -2
- package/dist/processors/errors/errorHelpers.d.ts +2 -2
- package/dist/processors/errors/errorSerializer.d.ts +4 -4
- package/dist/processors/index.d.ts +8 -2
- package/dist/processors/index.js +5 -2
- package/dist/processors/integration/FileProcessorIntegration.d.ts +8 -8
- package/dist/processors/integration/FileProcessorIntegration.js +7 -7
- package/dist/processors/media/AudioProcessor.d.ts +328 -0
- package/dist/processors/media/AudioProcessor.js +707 -0
- package/dist/processors/media/VideoProcessor.d.ts +350 -0
- package/dist/processors/media/VideoProcessor.js +991 -0
- package/dist/processors/media/ffprobe-static.d.ts +4 -0
- package/dist/processors/media/index.d.ts +27 -0
- package/dist/processors/media/index.js +36 -0
- package/dist/processors/registry/ProcessorRegistry.d.ts +19 -5
- package/dist/processors/registry/ProcessorRegistry.js +103 -8
- package/dist/processors/registry/index.d.ts +1 -1
- package/dist/processors/registry/index.js +1 -1
- package/dist/processors/registry/types.d.ts +2 -2
- package/dist/providers/googleAiStudio.d.ts +34 -0
- package/dist/providers/googleAiStudio.js +267 -397
- package/dist/providers/googleVertex.d.ts +55 -1
- package/dist/providers/googleVertex.js +452 -719
- package/dist/providers/sagemaker/detection.d.ts +6 -6
- package/dist/providers/sagemaker/diagnostics.d.ts +4 -4
- package/dist/providers/sagemaker/parsers.d.ts +4 -4
- package/dist/rag/chunkers/RecursiveChunker.js +2 -2
- package/dist/rag/document/loaders.d.ts +6 -71
- package/dist/rag/document/loaders.js +5 -5
- package/dist/rag/graphRag/graphRAG.js +26 -9
- package/dist/rag/metadata/MetadataExtractorFactory.d.ts +5 -55
- package/dist/rag/metadata/metadataExtractor.js +6 -3
- package/dist/rag/pipeline/RAGPipeline.d.ts +8 -126
- package/dist/rag/pipeline/RAGPipeline.js +11 -11
- package/dist/rag/pipeline/contextAssembly.d.ts +3 -42
- package/dist/rag/pipeline/contextAssembly.js +6 -3
- package/dist/rag/reranker/RerankerFactory.d.ts +5 -60
- package/dist/rag/resilience/CircuitBreaker.d.ts +3 -33
- package/dist/rag/resilience/RetryHandler.d.ts +2 -21
- package/dist/rag/retrieval/hybridSearch.d.ts +3 -41
- package/dist/rag/retrieval/vectorQueryTool.d.ts +2 -13
- package/dist/rag/retrieval/vectorQueryTool.js +4 -3
- package/dist/rag/types.d.ts +3 -3
- package/dist/sdk/toolRegistration.d.ts +2 -2
- package/dist/server/middleware/cache.d.ts +2 -2
- package/dist/server/middleware/rateLimit.d.ts +2 -2
- package/dist/server/routes/mcpRoutes.js +277 -249
- package/dist/server/routes/memoryRoutes.js +287 -281
- package/dist/server/utils/validation.d.ts +4 -4
- package/dist/session/globalSessionState.d.ts +2 -2
- package/dist/telemetry/telemetryService.d.ts +2 -2
- package/dist/types/common.d.ts +39 -0
- package/dist/types/contextTypes.d.ts +255 -0
- package/dist/types/contextTypes.js +0 -2
- package/dist/types/conversation.d.ts +62 -0
- package/dist/types/conversationMemoryInterface.d.ts +27 -0
- package/dist/types/conversationMemoryInterface.js +6 -0
- package/dist/types/fileReferenceTypes.d.ts +222 -0
- package/dist/types/fileReferenceTypes.js +8 -0
- package/dist/types/fileTypes.d.ts +26 -3
- package/dist/types/generateTypes.d.ts +22 -1
- package/dist/types/index.d.ts +4 -5
- package/dist/types/index.js +8 -10
- package/dist/types/processorTypes.d.ts +597 -0
- package/dist/types/processorTypes.js +90 -0
- package/dist/types/ragTypes.d.ts +481 -0
- package/dist/types/ragTypes.js +7 -0
- package/dist/types/sdkTypes.d.ts +17 -18
- package/dist/types/streamTypes.d.ts +11 -1
- package/dist/utils/async/retry.d.ts +2 -2
- package/dist/utils/async/withTimeout.js +3 -1
- package/dist/utils/conversationMemory.d.ts +12 -6
- package/dist/utils/conversationMemory.js +76 -36
- package/dist/utils/fileDetector.d.ts +62 -0
- package/dist/utils/fileDetector.js +1014 -14
- package/dist/utils/json/safeParse.d.ts +2 -2
- package/dist/utils/messageBuilder.js +806 -153
- package/dist/utils/modelChoices.d.ts +2 -2
- package/dist/utils/multimodalOptionsBuilder.d.ts +2 -1
- package/dist/utils/multimodalOptionsBuilder.js +1 -0
- package/dist/utils/rateLimiter.d.ts +2 -2
- package/dist/utils/sanitizers/filename.d.ts +4 -4
- package/dist/utils/sanitizers/svg.d.ts +2 -2
- package/dist/utils/thinkingConfig.d.ts +6 -6
- package/dist/utils/tokenEstimation.d.ts +68 -0
- package/dist/utils/tokenEstimation.js +112 -0
- package/dist/utils/tokenUtils.d.ts +4 -4
- package/dist/utils/ttsProcessor.d.ts +2 -2
- package/dist/workflow/config.d.ts +104 -104
- package/package.json +18 -6
- package/dist/lib/utils/conversationMemoryUtils.d.ts +0 -25
- package/dist/lib/utils/conversationMemoryUtils.js +0 -138
- package/dist/utils/conversationMemoryUtils.d.ts +0 -25
- package/dist/utils/conversationMemoryUtils.js +0 -137
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.6.0",
|
|
4
4
|
"description": "Universal AI Development Platform with working MCP integration, multi-provider support, and professional CLI. Built-in tools operational, 58+ external MCP servers discoverable. Connect to filesystem, GitHub, database operations, and more. Build, test, and deploy AI applications with 13 providers: OpenAI, Anthropic, Google AI, AWS Bedrock, Azure, Hugging Face, Ollama, and Mistral AI.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Juspay Technologies",
|
|
@@ -177,6 +177,7 @@
|
|
|
177
177
|
"@aws-sdk/client-sagemaker-runtime": "^3.886.0",
|
|
178
178
|
"@aws-sdk/credential-provider-node": "^3.886.0",
|
|
179
179
|
"@aws-sdk/types": "^3.862.0",
|
|
180
|
+
"@google-cloud/text-to-speech": "^5.0.0",
|
|
180
181
|
"@google-cloud/vertexai": "^1.10.0",
|
|
181
182
|
"@google/genai": "^1.34.0",
|
|
182
183
|
"@google/generative-ai": "^0.24.1",
|
|
@@ -196,6 +197,9 @@
|
|
|
196
197
|
"csv-parser": "^3.2.0",
|
|
197
198
|
"dotenv": "^16.6.1",
|
|
198
199
|
"exceljs": "^4.4.0",
|
|
200
|
+
"ffmpeg-static": "^5.3.0",
|
|
201
|
+
"ffprobe-static": "^3.1.0",
|
|
202
|
+
"fluent-ffmpeg": "^2.1.3",
|
|
199
203
|
"google-auth-library": "^9.1.0",
|
|
200
204
|
"hono": "^4.6.0",
|
|
201
205
|
"inquirer": "^9.3.7",
|
|
@@ -203,27 +207,30 @@
|
|
|
203
207
|
"mammoth": "^1.11.0",
|
|
204
208
|
"mathjs": "^14.7.0",
|
|
205
209
|
"mem0ai": "^2.1.38",
|
|
210
|
+
"music-metadata": "^11.11.2",
|
|
206
211
|
"nanoid": "^5.1.5",
|
|
207
212
|
"ollama-ai-provider": "^1.2.0",
|
|
208
213
|
"ora": "^7.0.1",
|
|
209
214
|
"p-limit": "^6.2.0",
|
|
215
|
+
"pdf-parse": "^2.4.5",
|
|
210
216
|
"pdf-to-img": "^5.0.0",
|
|
211
217
|
"pptxgenjs": "^3.12.0",
|
|
212
218
|
"reconnecting-eventsource": "^1.6.4",
|
|
213
219
|
"redis": "^5.8.2",
|
|
220
|
+
"sharp": "^0.34.5",
|
|
221
|
+
"tar-stream": "^3.1.7",
|
|
214
222
|
"undici": "^7.5.0",
|
|
215
223
|
"uuid": "^11.1.0",
|
|
216
224
|
"ws": "^8.18.3",
|
|
217
225
|
"xml2js": "^0.6.2",
|
|
218
226
|
"yargs": "^17.7.2",
|
|
219
227
|
"zod": "^3.22.0",
|
|
220
|
-
"zod-to-json-schema": "^3.24.6"
|
|
221
|
-
"@google-cloud/text-to-speech": "^5.0.0"
|
|
228
|
+
"zod-to-json-schema": "^3.24.6"
|
|
222
229
|
},
|
|
223
230
|
"peerDependencies": {
|
|
224
231
|
"@opentelemetry/api": "^1.9.0",
|
|
225
|
-
"@opentelemetry/sdk-trace-
|
|
226
|
-
"@opentelemetry/sdk-trace-
|
|
232
|
+
"@opentelemetry/sdk-trace-base": "^2.0.0",
|
|
233
|
+
"@opentelemetry/sdk-trace-node": "^2.0.0"
|
|
227
234
|
},
|
|
228
235
|
"optionalDependencies": {
|
|
229
236
|
"@hono/node-server": "^1.13.0",
|
|
@@ -259,11 +266,13 @@
|
|
|
259
266
|
"@types/adm-zip": "^0.5.7",
|
|
260
267
|
"@types/cors": "^2.8.19",
|
|
261
268
|
"@types/express": "^5.0.3",
|
|
269
|
+
"@types/fluent-ffmpeg": "^2.1.28",
|
|
262
270
|
"@types/inquirer": "^9.0.9",
|
|
263
271
|
"@types/koa": "^3.0.1",
|
|
264
272
|
"@types/koa-bodyparser": "^4.3.13",
|
|
265
273
|
"@types/koa__cors": "^5.0.1",
|
|
266
274
|
"@types/node": "^20.19.13",
|
|
275
|
+
"@types/tar-stream": "^3.1.4",
|
|
267
276
|
"@types/ws": "^8.18.1",
|
|
268
277
|
"@types/xml2js": "^0.4.14",
|
|
269
278
|
"@types/yargs": "^17.0.33",
|
|
@@ -341,7 +350,10 @@
|
|
|
341
350
|
"protobufjs",
|
|
342
351
|
"puppeteer",
|
|
343
352
|
"sqlite3",
|
|
344
|
-
"canvas"
|
|
353
|
+
"canvas",
|
|
354
|
+
"ffmpeg-static",
|
|
355
|
+
"sharp",
|
|
356
|
+
"ffprobe-static"
|
|
345
357
|
],
|
|
346
358
|
"overrides": {
|
|
347
359
|
"esbuild@<=0.24.2": ">=0.25.0",
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Conversation Memory Utilities
|
|
3
|
-
* Handles configuration merging and conversation memory operations
|
|
4
|
-
*/
|
|
5
|
-
import type { ConversationMemoryConfig, ChatMessage } from "../types/conversation.js";
|
|
6
|
-
import type { ConversationMemoryManager } from "../core/conversationMemoryManager.js";
|
|
7
|
-
import type { TextGenerationOptions, TextGenerationResult } from "../types/index.js";
|
|
8
|
-
/**
|
|
9
|
-
* Apply conversation memory defaults to user configuration
|
|
10
|
-
* Merges user config with environment variables and default values
|
|
11
|
-
*/
|
|
12
|
-
export declare function applyConversationMemoryDefaults(userConfig?: Partial<ConversationMemoryConfig>): ConversationMemoryConfig;
|
|
13
|
-
/**
|
|
14
|
-
* Get conversation history as message array, summarizing if needed.
|
|
15
|
-
*/
|
|
16
|
-
export declare function getConversationMessages(conversationMemory: ConversationMemoryManager | undefined, options: TextGenerationOptions): Promise<ChatMessage[]>;
|
|
17
|
-
/**
|
|
18
|
-
* Store conversation turn for future context
|
|
19
|
-
* Saves user messages and AI responses for conversation memory
|
|
20
|
-
*/
|
|
21
|
-
export declare function storeConversationTurn(conversationMemory: ConversationMemoryManager | undefined, originalOptions: TextGenerationOptions, result: TextGenerationResult, startTimeStamp?: Date | undefined): Promise<void>;
|
|
22
|
-
/**
|
|
23
|
-
* Check if Redis is available for conversation memory
|
|
24
|
-
*/
|
|
25
|
-
export declare function checkRedisAvailability(): Promise<boolean>;
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Conversation Memory Utilities
|
|
3
|
-
* Handles configuration merging and conversation memory operations
|
|
4
|
-
*/
|
|
5
|
-
import { getConversationMemoryDefaults } from "../config/conversationMemory.js";
|
|
6
|
-
import { logger } from "./logger.js";
|
|
7
|
-
import { createRedisClient, getNormalizedConfig } from "./redis.js";
|
|
8
|
-
/**
|
|
9
|
-
* Apply conversation memory defaults to user configuration
|
|
10
|
-
* Merges user config with environment variables and default values
|
|
11
|
-
*/
|
|
12
|
-
export function applyConversationMemoryDefaults(userConfig) {
|
|
13
|
-
const defaults = getConversationMemoryDefaults();
|
|
14
|
-
return {
|
|
15
|
-
...defaults,
|
|
16
|
-
...userConfig,
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Get conversation history as message array, summarizing if needed.
|
|
21
|
-
*/
|
|
22
|
-
export async function getConversationMessages(conversationMemory, options) {
|
|
23
|
-
if (!conversationMemory || !options.context) {
|
|
24
|
-
return [];
|
|
25
|
-
}
|
|
26
|
-
const sessionId = options.context?.sessionId;
|
|
27
|
-
if (typeof sessionId !== "string" || !sessionId) {
|
|
28
|
-
return [];
|
|
29
|
-
}
|
|
30
|
-
try {
|
|
31
|
-
// Remove duplicate summarization logic - it should be handled in ConversationMemoryManager
|
|
32
|
-
const messages = await conversationMemory.buildContextMessages(sessionId);
|
|
33
|
-
logger.debug("Conversation messages retrieved", {
|
|
34
|
-
sessionId,
|
|
35
|
-
messageCount: messages.length,
|
|
36
|
-
});
|
|
37
|
-
return messages;
|
|
38
|
-
}
|
|
39
|
-
catch (error) {
|
|
40
|
-
logger.warn("Failed to get conversation messages", {
|
|
41
|
-
sessionId,
|
|
42
|
-
error: error instanceof Error ? error.message : String(error),
|
|
43
|
-
});
|
|
44
|
-
return [];
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Store conversation turn for future context
|
|
49
|
-
* Saves user messages and AI responses for conversation memory
|
|
50
|
-
*/
|
|
51
|
-
export async function storeConversationTurn(conversationMemory, originalOptions, result, startTimeStamp) {
|
|
52
|
-
if (!conversationMemory || !originalOptions.context) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
const context = originalOptions.context;
|
|
56
|
-
const sessionId = context.sessionId;
|
|
57
|
-
const userId = typeof context.userId === "string" ? context.userId : undefined;
|
|
58
|
-
if (typeof sessionId !== "string" || !sessionId) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
let providerDetails = undefined;
|
|
62
|
-
if (result.provider && result.model) {
|
|
63
|
-
providerDetails = {
|
|
64
|
-
provider: result.provider,
|
|
65
|
-
model: result.model,
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
try {
|
|
69
|
-
await conversationMemory.storeConversationTurn({
|
|
70
|
-
sessionId,
|
|
71
|
-
userId,
|
|
72
|
-
userMessage: originalOptions.originalPrompt || originalOptions.prompt || "",
|
|
73
|
-
aiResponse: result.content,
|
|
74
|
-
startTimeStamp,
|
|
75
|
-
providerDetails,
|
|
76
|
-
enableSummarization: originalOptions.enableSummarization,
|
|
77
|
-
});
|
|
78
|
-
logger.debug("Conversation turn stored", {
|
|
79
|
-
sessionId,
|
|
80
|
-
userId,
|
|
81
|
-
promptLength: originalOptions.prompt?.length || 0,
|
|
82
|
-
responseLength: result.content.length,
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
catch (error) {
|
|
86
|
-
logger.warn("Failed to store conversation turn", {
|
|
87
|
-
sessionId,
|
|
88
|
-
userId,
|
|
89
|
-
error: error instanceof Error ? error.message : String(error),
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Check if Redis is available for conversation memory
|
|
95
|
-
*/
|
|
96
|
-
export async function checkRedisAvailability() {
|
|
97
|
-
let testClient = null;
|
|
98
|
-
try {
|
|
99
|
-
const testConfig = getNormalizedConfig({
|
|
100
|
-
host: process.env.REDIS_HOST,
|
|
101
|
-
port: process.env.REDIS_PORT ? Number(process.env.REDIS_PORT) : undefined,
|
|
102
|
-
password: process.env.REDIS_PASSWORD,
|
|
103
|
-
db: process.env.REDIS_DB ? Number(process.env.REDIS_DB) : undefined,
|
|
104
|
-
keyPrefix: process.env.REDIS_KEY_PREFIX,
|
|
105
|
-
ttl: process.env.REDIS_TTL ? Number(process.env.REDIS_TTL) : undefined,
|
|
106
|
-
connectionOptions: {
|
|
107
|
-
connectTimeout: 5000,
|
|
108
|
-
maxRetriesPerRequest: 1,
|
|
109
|
-
retryDelayOnFailover: 100,
|
|
110
|
-
},
|
|
111
|
-
});
|
|
112
|
-
// Test Redis connection
|
|
113
|
-
testClient = await createRedisClient(testConfig);
|
|
114
|
-
await testClient.ping();
|
|
115
|
-
logger.debug("Redis connection test successful");
|
|
116
|
-
return true;
|
|
117
|
-
}
|
|
118
|
-
catch (error) {
|
|
119
|
-
logger.debug("Redis connection test failed", {
|
|
120
|
-
error: error instanceof Error ? error.message : String(error),
|
|
121
|
-
});
|
|
122
|
-
return false;
|
|
123
|
-
}
|
|
124
|
-
finally {
|
|
125
|
-
if (testClient) {
|
|
126
|
-
try {
|
|
127
|
-
await testClient.quit();
|
|
128
|
-
logger.debug("Redis test client disconnected successfully");
|
|
129
|
-
}
|
|
130
|
-
catch (quitError) {
|
|
131
|
-
logger.debug("Error during Redis test client disconnect", {
|
|
132
|
-
error: quitError instanceof Error ? quitError.message : String(quitError),
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
//# sourceMappingURL=conversationMemoryUtils.js.map
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Conversation Memory Utilities
|
|
3
|
-
* Handles configuration merging and conversation memory operations
|
|
4
|
-
*/
|
|
5
|
-
import type { ConversationMemoryConfig, ChatMessage } from "../types/conversation.js";
|
|
6
|
-
import type { ConversationMemoryManager } from "../core/conversationMemoryManager.js";
|
|
7
|
-
import type { TextGenerationOptions, TextGenerationResult } from "../types/index.js";
|
|
8
|
-
/**
|
|
9
|
-
* Apply conversation memory defaults to user configuration
|
|
10
|
-
* Merges user config with environment variables and default values
|
|
11
|
-
*/
|
|
12
|
-
export declare function applyConversationMemoryDefaults(userConfig?: Partial<ConversationMemoryConfig>): ConversationMemoryConfig;
|
|
13
|
-
/**
|
|
14
|
-
* Get conversation history as message array, summarizing if needed.
|
|
15
|
-
*/
|
|
16
|
-
export declare function getConversationMessages(conversationMemory: ConversationMemoryManager | undefined, options: TextGenerationOptions): Promise<ChatMessage[]>;
|
|
17
|
-
/**
|
|
18
|
-
* Store conversation turn for future context
|
|
19
|
-
* Saves user messages and AI responses for conversation memory
|
|
20
|
-
*/
|
|
21
|
-
export declare function storeConversationTurn(conversationMemory: ConversationMemoryManager | undefined, originalOptions: TextGenerationOptions, result: TextGenerationResult, startTimeStamp?: Date | undefined): Promise<void>;
|
|
22
|
-
/**
|
|
23
|
-
* Check if Redis is available for conversation memory
|
|
24
|
-
*/
|
|
25
|
-
export declare function checkRedisAvailability(): Promise<boolean>;
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Conversation Memory Utilities
|
|
3
|
-
* Handles configuration merging and conversation memory operations
|
|
4
|
-
*/
|
|
5
|
-
import { getConversationMemoryDefaults } from "../config/conversationMemory.js";
|
|
6
|
-
import { logger } from "./logger.js";
|
|
7
|
-
import { createRedisClient, getNormalizedConfig } from "./redis.js";
|
|
8
|
-
/**
|
|
9
|
-
* Apply conversation memory defaults to user configuration
|
|
10
|
-
* Merges user config with environment variables and default values
|
|
11
|
-
*/
|
|
12
|
-
export function applyConversationMemoryDefaults(userConfig) {
|
|
13
|
-
const defaults = getConversationMemoryDefaults();
|
|
14
|
-
return {
|
|
15
|
-
...defaults,
|
|
16
|
-
...userConfig,
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Get conversation history as message array, summarizing if needed.
|
|
21
|
-
*/
|
|
22
|
-
export async function getConversationMessages(conversationMemory, options) {
|
|
23
|
-
if (!conversationMemory || !options.context) {
|
|
24
|
-
return [];
|
|
25
|
-
}
|
|
26
|
-
const sessionId = options.context?.sessionId;
|
|
27
|
-
if (typeof sessionId !== "string" || !sessionId) {
|
|
28
|
-
return [];
|
|
29
|
-
}
|
|
30
|
-
try {
|
|
31
|
-
// Remove duplicate summarization logic - it should be handled in ConversationMemoryManager
|
|
32
|
-
const messages = await conversationMemory.buildContextMessages(sessionId);
|
|
33
|
-
logger.debug("Conversation messages retrieved", {
|
|
34
|
-
sessionId,
|
|
35
|
-
messageCount: messages.length,
|
|
36
|
-
});
|
|
37
|
-
return messages;
|
|
38
|
-
}
|
|
39
|
-
catch (error) {
|
|
40
|
-
logger.warn("Failed to get conversation messages", {
|
|
41
|
-
sessionId,
|
|
42
|
-
error: error instanceof Error ? error.message : String(error),
|
|
43
|
-
});
|
|
44
|
-
return [];
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Store conversation turn for future context
|
|
49
|
-
* Saves user messages and AI responses for conversation memory
|
|
50
|
-
*/
|
|
51
|
-
export async function storeConversationTurn(conversationMemory, originalOptions, result, startTimeStamp) {
|
|
52
|
-
if (!conversationMemory || !originalOptions.context) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
const context = originalOptions.context;
|
|
56
|
-
const sessionId = context.sessionId;
|
|
57
|
-
const userId = typeof context.userId === "string" ? context.userId : undefined;
|
|
58
|
-
if (typeof sessionId !== "string" || !sessionId) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
let providerDetails = undefined;
|
|
62
|
-
if (result.provider && result.model) {
|
|
63
|
-
providerDetails = {
|
|
64
|
-
provider: result.provider,
|
|
65
|
-
model: result.model,
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
try {
|
|
69
|
-
await conversationMemory.storeConversationTurn({
|
|
70
|
-
sessionId,
|
|
71
|
-
userId,
|
|
72
|
-
userMessage: originalOptions.originalPrompt || originalOptions.prompt || "",
|
|
73
|
-
aiResponse: result.content,
|
|
74
|
-
startTimeStamp,
|
|
75
|
-
providerDetails,
|
|
76
|
-
enableSummarization: originalOptions.enableSummarization,
|
|
77
|
-
});
|
|
78
|
-
logger.debug("Conversation turn stored", {
|
|
79
|
-
sessionId,
|
|
80
|
-
userId,
|
|
81
|
-
promptLength: originalOptions.prompt?.length || 0,
|
|
82
|
-
responseLength: result.content.length,
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
catch (error) {
|
|
86
|
-
logger.warn("Failed to store conversation turn", {
|
|
87
|
-
sessionId,
|
|
88
|
-
userId,
|
|
89
|
-
error: error instanceof Error ? error.message : String(error),
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Check if Redis is available for conversation memory
|
|
95
|
-
*/
|
|
96
|
-
export async function checkRedisAvailability() {
|
|
97
|
-
let testClient = null;
|
|
98
|
-
try {
|
|
99
|
-
const testConfig = getNormalizedConfig({
|
|
100
|
-
host: process.env.REDIS_HOST,
|
|
101
|
-
port: process.env.REDIS_PORT ? Number(process.env.REDIS_PORT) : undefined,
|
|
102
|
-
password: process.env.REDIS_PASSWORD,
|
|
103
|
-
db: process.env.REDIS_DB ? Number(process.env.REDIS_DB) : undefined,
|
|
104
|
-
keyPrefix: process.env.REDIS_KEY_PREFIX,
|
|
105
|
-
ttl: process.env.REDIS_TTL ? Number(process.env.REDIS_TTL) : undefined,
|
|
106
|
-
connectionOptions: {
|
|
107
|
-
connectTimeout: 5000,
|
|
108
|
-
maxRetriesPerRequest: 1,
|
|
109
|
-
retryDelayOnFailover: 100,
|
|
110
|
-
},
|
|
111
|
-
});
|
|
112
|
-
// Test Redis connection
|
|
113
|
-
testClient = await createRedisClient(testConfig);
|
|
114
|
-
await testClient.ping();
|
|
115
|
-
logger.debug("Redis connection test successful");
|
|
116
|
-
return true;
|
|
117
|
-
}
|
|
118
|
-
catch (error) {
|
|
119
|
-
logger.debug("Redis connection test failed", {
|
|
120
|
-
error: error instanceof Error ? error.message : String(error),
|
|
121
|
-
});
|
|
122
|
-
return false;
|
|
123
|
-
}
|
|
124
|
-
finally {
|
|
125
|
-
if (testClient) {
|
|
126
|
-
try {
|
|
127
|
-
await testClient.quit();
|
|
128
|
-
logger.debug("Redis test client disconnected successfully");
|
|
129
|
-
}
|
|
130
|
-
catch (quitError) {
|
|
131
|
-
logger.debug("Error during Redis test client disconnect", {
|
|
132
|
-
error: quitError instanceof Error ? quitError.message : String(quitError),
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|