@juspay/neurolink 9.1.1 → 9.3.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 +27 -0
- package/README.md +106 -37
- package/dist/agent/directTools.d.ts +11 -11
- package/dist/cli/commands/config.d.ts +6 -6
- package/dist/cli/commands/rag.d.ts +19 -0
- package/dist/cli/commands/rag.js +756 -0
- package/dist/cli/factories/commandFactory.js +146 -83
- package/dist/cli/parser.js +4 -1
- package/dist/core/baseProvider.d.ts +43 -30
- package/dist/core/baseProvider.js +98 -138
- package/dist/core/conversationMemoryFactory.d.ts +2 -2
- package/dist/core/conversationMemoryFactory.js +2 -2
- package/dist/core/conversationMemoryInitializer.d.ts +1 -2
- package/dist/core/conversationMemoryInitializer.js +2 -2
- package/dist/core/infrastructure/baseError.d.ts +21 -0
- package/dist/core/infrastructure/baseError.js +22 -0
- package/dist/core/infrastructure/baseFactory.d.ts +21 -0
- package/dist/core/infrastructure/baseFactory.js +54 -0
- package/dist/core/infrastructure/baseRegistry.d.ts +21 -0
- package/dist/core/infrastructure/baseRegistry.js +49 -0
- package/dist/core/infrastructure/index.d.ts +5 -0
- package/dist/core/infrastructure/index.js +5 -0
- package/dist/core/infrastructure/retry.d.ts +7 -0
- package/dist/core/infrastructure/retry.js +20 -0
- package/dist/core/infrastructure/typedEventEmitter.d.ts +8 -0
- package/dist/core/infrastructure/typedEventEmitter.js +23 -0
- package/dist/core/redisConversationMemoryManager.d.ts +1 -6
- package/dist/core/redisConversationMemoryManager.js +7 -19
- package/dist/factories/providerFactory.d.ts +5 -3
- package/dist/factories/providerFactory.js +31 -24
- package/dist/image-gen/ImageGenService.d.ts +143 -0
- package/dist/image-gen/ImageGenService.js +345 -0
- package/dist/image-gen/imageGenTools.d.ts +126 -0
- package/dist/image-gen/imageGenTools.js +304 -0
- package/dist/image-gen/index.d.ts +46 -0
- package/dist/image-gen/index.js +48 -0
- package/dist/image-gen/types.d.ts +237 -0
- package/dist/image-gen/types.js +24 -0
- package/dist/index.d.ts +46 -12
- package/dist/index.js +88 -36
- package/dist/lib/agent/directTools.d.ts +8 -8
- package/dist/lib/core/baseProvider.d.ts +43 -30
- package/dist/lib/core/baseProvider.js +98 -138
- package/dist/lib/core/conversationMemoryFactory.d.ts +2 -2
- package/dist/lib/core/conversationMemoryFactory.js +2 -2
- package/dist/lib/core/conversationMemoryInitializer.d.ts +1 -2
- package/dist/lib/core/conversationMemoryInitializer.js +2 -2
- package/dist/lib/core/infrastructure/baseError.d.ts +21 -0
- package/dist/lib/core/infrastructure/baseError.js +23 -0
- package/dist/lib/core/infrastructure/baseFactory.d.ts +21 -0
- package/dist/lib/core/infrastructure/baseFactory.js +55 -0
- package/dist/lib/core/infrastructure/baseRegistry.d.ts +21 -0
- package/dist/lib/core/infrastructure/baseRegistry.js +50 -0
- package/dist/lib/core/infrastructure/index.d.ts +5 -0
- package/dist/lib/core/infrastructure/index.js +6 -0
- package/dist/lib/core/infrastructure/retry.d.ts +7 -0
- package/dist/lib/core/infrastructure/retry.js +21 -0
- package/dist/lib/core/infrastructure/typedEventEmitter.d.ts +8 -0
- package/dist/lib/core/infrastructure/typedEventEmitter.js +24 -0
- package/dist/lib/core/redisConversationMemoryManager.d.ts +1 -6
- package/dist/lib/core/redisConversationMemoryManager.js +7 -19
- package/dist/lib/factories/providerFactory.d.ts +5 -3
- package/dist/lib/factories/providerFactory.js +31 -24
- package/dist/lib/image-gen/ImageGenService.d.ts +143 -0
- package/dist/lib/image-gen/ImageGenService.js +346 -0
- package/dist/lib/image-gen/imageGenTools.d.ts +126 -0
- package/dist/lib/image-gen/imageGenTools.js +305 -0
- package/dist/lib/image-gen/index.d.ts +46 -0
- package/dist/lib/image-gen/index.js +49 -0
- package/dist/lib/image-gen/types.d.ts +237 -0
- package/dist/lib/image-gen/types.js +25 -0
- package/dist/lib/index.d.ts +46 -12
- package/dist/lib/index.js +88 -36
- package/dist/lib/mcp/index.d.ts +6 -5
- package/dist/lib/mcp/index.js +7 -5
- package/dist/lib/neurolink.d.ts +11 -13
- package/dist/lib/neurolink.js +95 -29
- package/dist/lib/processors/base/BaseFileProcessor.d.ts +273 -0
- package/dist/lib/processors/base/BaseFileProcessor.js +614 -0
- package/dist/lib/processors/base/index.d.ts +14 -0
- package/dist/lib/processors/base/index.js +20 -0
- package/dist/lib/processors/base/types.d.ts +593 -0
- package/dist/lib/processors/base/types.js +77 -0
- package/dist/lib/processors/cli/fileProcessorCli.d.ts +163 -0
- package/dist/lib/processors/cli/fileProcessorCli.js +389 -0
- package/dist/lib/processors/cli/index.d.ts +37 -0
- package/dist/lib/processors/cli/index.js +50 -0
- package/dist/lib/processors/code/ConfigProcessor.d.ts +171 -0
- package/dist/lib/processors/code/ConfigProcessor.js +401 -0
- package/dist/lib/processors/code/SourceCodeProcessor.d.ts +174 -0
- package/dist/lib/processors/code/SourceCodeProcessor.js +305 -0
- package/dist/lib/processors/code/index.d.ts +44 -0
- package/dist/lib/processors/code/index.js +61 -0
- package/dist/lib/processors/config/fileTypes.d.ts +283 -0
- package/dist/lib/processors/config/fileTypes.js +521 -0
- package/dist/lib/processors/config/index.d.ts +32 -0
- package/dist/lib/processors/config/index.js +93 -0
- package/dist/lib/processors/config/languageMap.d.ts +66 -0
- package/dist/lib/processors/config/languageMap.js +411 -0
- package/dist/lib/processors/config/mimeTypes.d.ts +376 -0
- package/dist/lib/processors/config/mimeTypes.js +339 -0
- package/dist/lib/processors/config/sizeLimits.d.ts +194 -0
- package/dist/lib/processors/config/sizeLimits.js +247 -0
- package/dist/lib/processors/data/JsonProcessor.d.ts +122 -0
- package/dist/lib/processors/data/JsonProcessor.js +204 -0
- package/dist/lib/processors/data/XmlProcessor.d.ts +160 -0
- package/dist/lib/processors/data/XmlProcessor.js +284 -0
- package/dist/lib/processors/data/YamlProcessor.d.ts +163 -0
- package/dist/lib/processors/data/YamlProcessor.js +295 -0
- package/dist/lib/processors/data/index.d.ts +49 -0
- package/dist/lib/processors/data/index.js +77 -0
- package/dist/lib/processors/document/ExcelProcessor.d.ts +238 -0
- package/dist/lib/processors/document/ExcelProcessor.js +520 -0
- package/dist/lib/processors/document/OpenDocumentProcessor.d.ts +69 -0
- package/dist/lib/processors/document/OpenDocumentProcessor.js +211 -0
- package/dist/lib/processors/document/RtfProcessor.d.ts +152 -0
- package/dist/lib/processors/document/RtfProcessor.js +362 -0
- package/dist/lib/processors/document/WordProcessor.d.ts +168 -0
- package/dist/lib/processors/document/WordProcessor.js +354 -0
- package/dist/lib/processors/document/index.d.ts +54 -0
- package/dist/lib/processors/document/index.js +91 -0
- package/dist/lib/processors/errors/FileErrorCode.d.ts +98 -0
- package/dist/lib/processors/errors/FileErrorCode.js +256 -0
- package/dist/lib/processors/errors/errorHelpers.d.ts +151 -0
- package/dist/lib/processors/errors/errorHelpers.js +379 -0
- package/dist/lib/processors/errors/errorSerializer.d.ts +139 -0
- package/dist/lib/processors/errors/errorSerializer.js +508 -0
- package/dist/lib/processors/errors/index.d.ts +46 -0
- package/dist/lib/processors/errors/index.js +50 -0
- package/dist/lib/processors/index.d.ts +76 -0
- package/dist/lib/processors/index.js +113 -0
- package/dist/lib/processors/integration/FileProcessorIntegration.d.ts +244 -0
- package/dist/lib/processors/integration/FileProcessorIntegration.js +273 -0
- package/dist/lib/processors/integration/index.d.ts +42 -0
- package/dist/lib/processors/integration/index.js +45 -0
- package/dist/lib/processors/markup/HtmlProcessor.d.ts +169 -0
- package/dist/lib/processors/markup/HtmlProcessor.js +250 -0
- package/dist/lib/processors/markup/MarkdownProcessor.d.ts +165 -0
- package/dist/lib/processors/markup/MarkdownProcessor.js +245 -0
- package/dist/lib/processors/markup/SvgProcessor.d.ts +156 -0
- package/dist/lib/processors/markup/SvgProcessor.js +241 -0
- package/dist/lib/processors/markup/TextProcessor.d.ts +135 -0
- package/dist/lib/processors/markup/TextProcessor.js +189 -0
- package/dist/lib/processors/markup/index.d.ts +66 -0
- package/dist/lib/processors/markup/index.js +103 -0
- package/dist/lib/processors/registry/ProcessorRegistry.d.ts +334 -0
- package/dist/lib/processors/registry/ProcessorRegistry.js +609 -0
- package/dist/lib/processors/registry/index.d.ts +12 -0
- package/dist/lib/processors/registry/index.js +17 -0
- package/dist/lib/processors/registry/types.d.ts +53 -0
- package/dist/lib/processors/registry/types.js +11 -0
- package/dist/lib/providers/amazonBedrock.d.ts +15 -2
- package/dist/lib/providers/amazonBedrock.js +65 -8
- package/dist/lib/providers/anthropic.d.ts +3 -3
- package/dist/lib/providers/anthropic.js +10 -7
- package/dist/lib/providers/googleAiStudio.d.ts +5 -5
- package/dist/lib/providers/googleAiStudio.js +10 -7
- package/dist/lib/providers/googleVertex.d.ts +16 -4
- package/dist/lib/providers/googleVertex.js +72 -16
- package/dist/lib/providers/litellm.d.ts +3 -3
- package/dist/lib/providers/litellm.js +10 -10
- package/dist/lib/providers/mistral.d.ts +3 -3
- package/dist/lib/providers/mistral.js +7 -6
- package/dist/lib/providers/ollama.d.ts +3 -4
- package/dist/lib/providers/ollama.js +7 -8
- package/dist/lib/providers/openAI.d.ts +14 -2
- package/dist/lib/providers/openAI.js +60 -6
- package/dist/lib/providers/openRouter.d.ts +2 -2
- package/dist/lib/providers/openRouter.js +10 -6
- package/dist/lib/providers/sagemaker/language-model.d.ts +2 -2
- package/dist/lib/rag/ChunkerFactory.d.ts +91 -0
- package/dist/lib/rag/ChunkerFactory.js +321 -0
- package/dist/lib/rag/ChunkerRegistry.d.ts +91 -0
- package/dist/lib/rag/ChunkerRegistry.js +422 -0
- package/dist/lib/rag/chunkers/BaseChunker.d.ts +53 -0
- package/dist/lib/rag/chunkers/BaseChunker.js +144 -0
- package/dist/lib/rag/chunkers/CharacterChunker.d.ts +18 -0
- package/dist/lib/rag/chunkers/CharacterChunker.js +29 -0
- package/dist/lib/rag/chunkers/HTMLChunker.d.ts +19 -0
- package/dist/lib/rag/chunkers/HTMLChunker.js +39 -0
- package/dist/lib/rag/chunkers/JSONChunker.d.ts +19 -0
- package/dist/lib/rag/chunkers/JSONChunker.js +69 -0
- package/dist/lib/rag/chunkers/LaTeXChunker.d.ts +15 -0
- package/dist/lib/rag/chunkers/LaTeXChunker.js +64 -0
- package/dist/lib/rag/chunkers/MarkdownChunker.d.ts +15 -0
- package/dist/lib/rag/chunkers/MarkdownChunker.js +103 -0
- package/dist/lib/rag/chunkers/RecursiveChunker.d.ts +27 -0
- package/dist/lib/rag/chunkers/RecursiveChunker.js +140 -0
- package/dist/lib/rag/chunkers/SemanticMarkdownChunker.d.ts +22 -0
- package/dist/lib/rag/chunkers/SemanticMarkdownChunker.js +139 -0
- package/dist/lib/rag/chunkers/SentenceChunker.d.ts +19 -0
- package/dist/lib/rag/chunkers/SentenceChunker.js +67 -0
- package/dist/lib/rag/chunkers/TokenChunker.d.ts +19 -0
- package/dist/lib/rag/chunkers/TokenChunker.js +62 -0
- package/dist/lib/rag/chunkers/index.d.ts +15 -0
- package/dist/lib/rag/chunkers/index.js +16 -0
- package/dist/lib/rag/chunking/characterChunker.d.ts +16 -0
- package/dist/lib/rag/chunking/characterChunker.js +143 -0
- package/dist/lib/rag/chunking/chunkerRegistry.d.ts +67 -0
- package/dist/lib/rag/chunking/chunkerRegistry.js +195 -0
- package/dist/lib/rag/chunking/htmlChunker.d.ts +34 -0
- package/dist/lib/rag/chunking/htmlChunker.js +248 -0
- package/dist/lib/rag/chunking/index.d.ts +15 -0
- package/dist/lib/rag/chunking/index.js +18 -0
- package/dist/lib/rag/chunking/jsonChunker.d.ts +20 -0
- package/dist/lib/rag/chunking/jsonChunker.js +282 -0
- package/dist/lib/rag/chunking/latexChunker.d.ts +26 -0
- package/dist/lib/rag/chunking/latexChunker.js +252 -0
- package/dist/lib/rag/chunking/markdownChunker.d.ts +19 -0
- package/dist/lib/rag/chunking/markdownChunker.js +202 -0
- package/dist/lib/rag/chunking/recursiveChunker.d.ts +19 -0
- package/dist/lib/rag/chunking/recursiveChunker.js +149 -0
- package/dist/lib/rag/chunking/semanticChunker.d.ts +41 -0
- package/dist/lib/rag/chunking/semanticChunker.js +307 -0
- package/dist/lib/rag/chunking/sentenceChunker.d.ts +25 -0
- package/dist/lib/rag/chunking/sentenceChunker.js +231 -0
- package/dist/lib/rag/chunking/tokenChunker.d.ts +36 -0
- package/dist/lib/rag/chunking/tokenChunker.js +184 -0
- package/dist/lib/rag/document/MDocument.d.ts +198 -0
- package/dist/lib/rag/document/MDocument.js +393 -0
- package/dist/lib/rag/document/index.d.ts +5 -0
- package/dist/lib/rag/document/index.js +6 -0
- package/dist/lib/rag/document/loaders.d.ts +201 -0
- package/dist/lib/rag/document/loaders.js +501 -0
- package/dist/lib/rag/errors/RAGError.d.ts +244 -0
- package/dist/lib/rag/errors/RAGError.js +275 -0
- package/dist/lib/rag/errors/index.d.ts +6 -0
- package/dist/lib/rag/errors/index.js +7 -0
- package/dist/lib/rag/graphRag/graphRAG.d.ts +115 -0
- package/dist/lib/rag/graphRag/graphRAG.js +385 -0
- package/dist/lib/rag/graphRag/index.d.ts +4 -0
- package/dist/lib/rag/graphRag/index.js +5 -0
- package/dist/lib/rag/index.d.ts +103 -0
- package/dist/lib/rag/index.js +142 -0
- package/dist/lib/rag/metadata/MetadataExtractorFactory.d.ts +157 -0
- package/dist/lib/rag/metadata/MetadataExtractorFactory.js +419 -0
- package/dist/lib/rag/metadata/MetadataExtractorRegistry.d.ts +99 -0
- package/dist/lib/rag/metadata/MetadataExtractorRegistry.js +363 -0
- package/dist/lib/rag/metadata/index.d.ts +6 -0
- package/dist/lib/rag/metadata/index.js +10 -0
- package/dist/lib/rag/metadata/metadataExtractor.d.ts +69 -0
- package/dist/lib/rag/metadata/metadataExtractor.js +278 -0
- package/dist/lib/rag/pipeline/RAGPipeline.d.ts +235 -0
- package/dist/lib/rag/pipeline/RAGPipeline.js +402 -0
- package/dist/lib/rag/pipeline/contextAssembly.d.ts +126 -0
- package/dist/lib/rag/pipeline/contextAssembly.js +338 -0
- package/dist/lib/rag/pipeline/index.d.ts +5 -0
- package/dist/lib/rag/pipeline/index.js +6 -0
- package/dist/lib/rag/ragIntegration.d.ts +38 -0
- package/dist/lib/rag/ragIntegration.js +212 -0
- package/dist/lib/rag/reranker/RerankerFactory.d.ts +184 -0
- package/dist/lib/rag/reranker/RerankerFactory.js +431 -0
- package/dist/lib/rag/reranker/RerankerRegistry.d.ts +119 -0
- package/dist/lib/rag/reranker/RerankerRegistry.js +403 -0
- package/dist/lib/rag/reranker/index.d.ts +6 -0
- package/dist/lib/rag/reranker/index.js +10 -0
- package/dist/lib/rag/reranker/reranker.d.ts +71 -0
- package/dist/lib/rag/reranker/reranker.js +278 -0
- package/dist/lib/rag/resilience/CircuitBreaker.d.ts +215 -0
- package/dist/lib/rag/resilience/CircuitBreaker.js +432 -0
- package/dist/lib/rag/resilience/RetryHandler.d.ts +115 -0
- package/dist/lib/rag/resilience/RetryHandler.js +301 -0
- package/dist/lib/rag/resilience/index.d.ts +7 -0
- package/dist/lib/rag/resilience/index.js +8 -0
- package/dist/lib/rag/retrieval/hybridSearch.d.ts +94 -0
- package/dist/lib/rag/retrieval/hybridSearch.js +314 -0
- package/dist/lib/rag/retrieval/index.d.ts +5 -0
- package/dist/lib/rag/retrieval/index.js +6 -0
- package/dist/lib/rag/retrieval/vectorQueryTool.d.ts +93 -0
- package/dist/lib/rag/retrieval/vectorQueryTool.js +290 -0
- package/dist/lib/rag/types.d.ts +768 -0
- package/dist/lib/rag/types.js +9 -0
- package/dist/lib/server/index.d.ts +15 -11
- package/dist/lib/server/index.js +55 -51
- package/dist/lib/server/utils/validation.d.ts +2 -2
- package/dist/lib/types/common.d.ts +0 -1
- package/dist/lib/types/fileTypes.d.ts +1 -1
- package/dist/lib/types/generateTypes.d.ts +42 -8
- package/dist/lib/types/generateTypes.js +1 -1
- package/dist/lib/types/index.d.ts +25 -24
- package/dist/lib/types/index.js +21 -20
- package/dist/lib/types/modelTypes.d.ts +16 -16
- package/dist/lib/types/pptTypes.d.ts +14 -2
- package/dist/lib/types/pptTypes.js +16 -0
- package/dist/lib/types/streamTypes.d.ts +28 -8
- package/dist/lib/types/streamTypes.js +1 -1
- package/dist/lib/utils/async/delay.d.ts +40 -0
- package/dist/lib/utils/async/delay.js +43 -0
- package/dist/lib/utils/async/index.d.ts +23 -0
- package/dist/lib/utils/async/index.js +24 -0
- package/dist/lib/utils/async/retry.d.ts +141 -0
- package/dist/lib/utils/async/retry.js +172 -0
- package/dist/lib/utils/async/withTimeout.d.ts +73 -0
- package/dist/lib/utils/async/withTimeout.js +97 -0
- package/dist/lib/utils/fileDetector.d.ts +7 -1
- package/dist/lib/utils/fileDetector.js +91 -18
- package/dist/lib/utils/json/extract.d.ts +103 -0
- package/dist/lib/utils/json/extract.js +249 -0
- package/dist/lib/utils/json/index.d.ts +36 -0
- package/dist/lib/utils/json/index.js +37 -0
- package/dist/lib/utils/json/safeParse.d.ts +137 -0
- package/dist/lib/utils/json/safeParse.js +191 -0
- package/dist/lib/utils/messageBuilder.d.ts +2 -2
- package/dist/lib/utils/messageBuilder.js +15 -7
- package/dist/lib/utils/modelRouter.d.ts +4 -4
- package/dist/lib/utils/modelRouter.js +4 -4
- package/dist/lib/utils/sanitizers/filename.d.ts +137 -0
- package/dist/lib/utils/sanitizers/filename.js +366 -0
- package/dist/lib/utils/sanitizers/html.d.ts +170 -0
- package/dist/lib/utils/sanitizers/html.js +326 -0
- package/dist/lib/utils/sanitizers/index.d.ts +26 -0
- package/dist/lib/utils/sanitizers/index.js +30 -0
- package/dist/lib/utils/sanitizers/svg.d.ts +81 -0
- package/dist/lib/utils/sanitizers/svg.js +483 -0
- package/dist/mcp/index.d.ts +6 -5
- package/dist/mcp/index.js +7 -5
- package/dist/neurolink.d.ts +11 -13
- package/dist/neurolink.js +95 -29
- package/dist/processors/base/BaseFileProcessor.d.ts +273 -0
- package/dist/processors/base/BaseFileProcessor.js +613 -0
- package/dist/processors/base/index.d.ts +14 -0
- package/dist/processors/base/index.js +19 -0
- package/dist/processors/base/types.d.ts +593 -0
- package/dist/processors/base/types.js +76 -0
- package/dist/processors/cli/fileProcessorCli.d.ts +163 -0
- package/dist/processors/cli/fileProcessorCli.js +388 -0
- package/dist/processors/cli/index.d.ts +37 -0
- package/dist/processors/cli/index.js +49 -0
- package/dist/processors/code/ConfigProcessor.d.ts +171 -0
- package/dist/processors/code/ConfigProcessor.js +400 -0
- package/dist/processors/code/SourceCodeProcessor.d.ts +174 -0
- package/dist/processors/code/SourceCodeProcessor.js +304 -0
- package/dist/processors/code/index.d.ts +44 -0
- package/dist/processors/code/index.js +60 -0
- package/dist/processors/config/fileTypes.d.ts +283 -0
- package/dist/processors/config/fileTypes.js +520 -0
- package/dist/processors/config/index.d.ts +32 -0
- package/dist/processors/config/index.js +92 -0
- package/dist/processors/config/languageMap.d.ts +66 -0
- package/dist/processors/config/languageMap.js +410 -0
- package/dist/processors/config/mimeTypes.d.ts +376 -0
- package/dist/processors/config/mimeTypes.js +338 -0
- package/dist/processors/config/sizeLimits.d.ts +194 -0
- package/dist/processors/config/sizeLimits.js +246 -0
- package/dist/processors/data/JsonProcessor.d.ts +122 -0
- package/dist/processors/data/JsonProcessor.js +203 -0
- package/dist/processors/data/XmlProcessor.d.ts +160 -0
- package/dist/processors/data/XmlProcessor.js +283 -0
- package/dist/processors/data/YamlProcessor.d.ts +163 -0
- package/dist/processors/data/YamlProcessor.js +294 -0
- package/dist/processors/data/index.d.ts +49 -0
- package/dist/processors/data/index.js +76 -0
- package/dist/processors/document/ExcelProcessor.d.ts +238 -0
- package/dist/processors/document/ExcelProcessor.js +519 -0
- package/dist/processors/document/OpenDocumentProcessor.d.ts +69 -0
- package/dist/processors/document/OpenDocumentProcessor.js +210 -0
- package/dist/processors/document/RtfProcessor.d.ts +152 -0
- package/dist/processors/document/RtfProcessor.js +361 -0
- package/dist/processors/document/WordProcessor.d.ts +168 -0
- package/dist/processors/document/WordProcessor.js +353 -0
- package/dist/processors/document/index.d.ts +54 -0
- package/dist/processors/document/index.js +90 -0
- package/dist/processors/errors/FileErrorCode.d.ts +98 -0
- package/dist/processors/errors/FileErrorCode.js +255 -0
- package/dist/processors/errors/errorHelpers.d.ts +151 -0
- package/dist/processors/errors/errorHelpers.js +378 -0
- package/dist/processors/errors/errorSerializer.d.ts +139 -0
- package/dist/processors/errors/errorSerializer.js +507 -0
- package/dist/processors/errors/index.d.ts +46 -0
- package/dist/processors/errors/index.js +49 -0
- package/dist/processors/index.d.ts +76 -0
- package/dist/processors/index.js +112 -0
- package/dist/processors/integration/FileProcessorIntegration.d.ts +244 -0
- package/dist/processors/integration/FileProcessorIntegration.js +272 -0
- package/dist/processors/integration/index.d.ts +42 -0
- package/dist/processors/integration/index.js +44 -0
- package/dist/processors/markup/HtmlProcessor.d.ts +169 -0
- package/dist/processors/markup/HtmlProcessor.js +249 -0
- package/dist/processors/markup/MarkdownProcessor.d.ts +165 -0
- package/dist/processors/markup/MarkdownProcessor.js +244 -0
- package/dist/processors/markup/SvgProcessor.d.ts +156 -0
- package/dist/processors/markup/SvgProcessor.js +240 -0
- package/dist/processors/markup/TextProcessor.d.ts +135 -0
- package/dist/processors/markup/TextProcessor.js +188 -0
- package/dist/processors/markup/index.d.ts +66 -0
- package/dist/processors/markup/index.js +102 -0
- package/dist/processors/registry/ProcessorRegistry.d.ts +334 -0
- package/dist/processors/registry/ProcessorRegistry.js +608 -0
- package/dist/processors/registry/index.d.ts +12 -0
- package/dist/processors/registry/index.js +16 -0
- package/dist/processors/registry/types.d.ts +53 -0
- package/dist/processors/registry/types.js +10 -0
- package/dist/providers/amazonBedrock.d.ts +15 -2
- package/dist/providers/amazonBedrock.js +65 -8
- package/dist/providers/anthropic.d.ts +3 -3
- package/dist/providers/anthropic.js +10 -7
- package/dist/providers/googleAiStudio.d.ts +5 -5
- package/dist/providers/googleAiStudio.js +10 -7
- package/dist/providers/googleVertex.d.ts +16 -4
- package/dist/providers/googleVertex.js +72 -16
- package/dist/providers/litellm.d.ts +3 -3
- package/dist/providers/litellm.js +10 -10
- package/dist/providers/mistral.d.ts +3 -3
- package/dist/providers/mistral.js +7 -6
- package/dist/providers/ollama.d.ts +3 -4
- package/dist/providers/ollama.js +7 -8
- package/dist/providers/openAI.d.ts +14 -2
- package/dist/providers/openAI.js +60 -6
- package/dist/providers/openRouter.d.ts +2 -2
- package/dist/providers/openRouter.js +10 -6
- package/dist/rag/ChunkerFactory.d.ts +91 -0
- package/dist/rag/ChunkerFactory.js +320 -0
- package/dist/rag/ChunkerRegistry.d.ts +91 -0
- package/dist/rag/ChunkerRegistry.js +421 -0
- package/dist/rag/chunkers/BaseChunker.d.ts +53 -0
- package/dist/rag/chunkers/BaseChunker.js +143 -0
- package/dist/rag/chunkers/CharacterChunker.d.ts +18 -0
- package/dist/rag/chunkers/CharacterChunker.js +28 -0
- package/dist/rag/chunkers/HTMLChunker.d.ts +19 -0
- package/dist/rag/chunkers/HTMLChunker.js +38 -0
- package/dist/rag/chunkers/JSONChunker.d.ts +19 -0
- package/dist/rag/chunkers/JSONChunker.js +68 -0
- package/dist/rag/chunkers/LaTeXChunker.d.ts +15 -0
- package/dist/rag/chunkers/LaTeXChunker.js +63 -0
- package/dist/rag/chunkers/MarkdownChunker.d.ts +15 -0
- package/dist/rag/chunkers/MarkdownChunker.js +102 -0
- package/dist/rag/chunkers/RecursiveChunker.d.ts +27 -0
- package/dist/rag/chunkers/RecursiveChunker.js +139 -0
- package/dist/rag/chunkers/SemanticMarkdownChunker.d.ts +22 -0
- package/dist/rag/chunkers/SemanticMarkdownChunker.js +138 -0
- package/dist/rag/chunkers/SentenceChunker.d.ts +19 -0
- package/dist/rag/chunkers/SentenceChunker.js +66 -0
- package/dist/rag/chunkers/TokenChunker.d.ts +19 -0
- package/dist/rag/chunkers/TokenChunker.js +61 -0
- package/dist/rag/chunkers/index.d.ts +15 -0
- package/dist/rag/chunkers/index.js +15 -0
- package/dist/rag/chunking/characterChunker.d.ts +16 -0
- package/dist/rag/chunking/characterChunker.js +142 -0
- package/dist/rag/chunking/chunkerRegistry.d.ts +67 -0
- package/dist/rag/chunking/chunkerRegistry.js +194 -0
- package/dist/rag/chunking/htmlChunker.d.ts +34 -0
- package/dist/rag/chunking/htmlChunker.js +247 -0
- package/dist/rag/chunking/index.d.ts +15 -0
- package/dist/rag/chunking/index.js +17 -0
- package/dist/rag/chunking/jsonChunker.d.ts +20 -0
- package/dist/rag/chunking/jsonChunker.js +281 -0
- package/dist/rag/chunking/latexChunker.d.ts +26 -0
- package/dist/rag/chunking/latexChunker.js +251 -0
- package/dist/rag/chunking/markdownChunker.d.ts +19 -0
- package/dist/rag/chunking/markdownChunker.js +201 -0
- package/dist/rag/chunking/recursiveChunker.d.ts +19 -0
- package/dist/rag/chunking/recursiveChunker.js +148 -0
- package/dist/rag/chunking/semanticChunker.d.ts +41 -0
- package/dist/rag/chunking/semanticChunker.js +306 -0
- package/dist/rag/chunking/sentenceChunker.d.ts +25 -0
- package/dist/rag/chunking/sentenceChunker.js +230 -0
- package/dist/rag/chunking/tokenChunker.d.ts +36 -0
- package/dist/rag/chunking/tokenChunker.js +183 -0
- package/dist/rag/document/MDocument.d.ts +198 -0
- package/dist/rag/document/MDocument.js +392 -0
- package/dist/rag/document/index.d.ts +5 -0
- package/dist/rag/document/index.js +5 -0
- package/dist/rag/document/loaders.d.ts +201 -0
- package/dist/rag/document/loaders.js +500 -0
- package/dist/rag/errors/RAGError.d.ts +244 -0
- package/dist/rag/errors/RAGError.js +274 -0
- package/dist/rag/errors/index.d.ts +6 -0
- package/dist/rag/errors/index.js +6 -0
- package/dist/rag/graphRag/graphRAG.d.ts +115 -0
- package/dist/rag/graphRag/graphRAG.js +384 -0
- package/dist/rag/graphRag/index.d.ts +4 -0
- package/dist/rag/graphRag/index.js +4 -0
- package/dist/rag/index.d.ts +103 -0
- package/dist/rag/index.js +141 -0
- package/dist/rag/metadata/MetadataExtractorFactory.d.ts +157 -0
- package/dist/rag/metadata/MetadataExtractorFactory.js +418 -0
- package/dist/rag/metadata/MetadataExtractorRegistry.d.ts +99 -0
- package/dist/rag/metadata/MetadataExtractorRegistry.js +362 -0
- package/dist/rag/metadata/index.d.ts +6 -0
- package/dist/rag/metadata/index.js +9 -0
- package/dist/rag/metadata/metadataExtractor.d.ts +69 -0
- package/dist/rag/metadata/metadataExtractor.js +277 -0
- package/dist/rag/pipeline/RAGPipeline.d.ts +235 -0
- package/dist/rag/pipeline/RAGPipeline.js +401 -0
- package/dist/rag/pipeline/contextAssembly.d.ts +126 -0
- package/dist/rag/pipeline/contextAssembly.js +337 -0
- package/dist/rag/pipeline/index.d.ts +5 -0
- package/dist/rag/pipeline/index.js +5 -0
- package/dist/rag/ragIntegration.d.ts +38 -0
- package/dist/rag/ragIntegration.js +211 -0
- package/dist/rag/reranker/RerankerFactory.d.ts +184 -0
- package/dist/rag/reranker/RerankerFactory.js +430 -0
- package/dist/rag/reranker/RerankerRegistry.d.ts +119 -0
- package/dist/rag/reranker/RerankerRegistry.js +402 -0
- package/dist/rag/reranker/index.d.ts +6 -0
- package/dist/rag/reranker/index.js +9 -0
- package/dist/rag/reranker/reranker.d.ts +71 -0
- package/dist/rag/reranker/reranker.js +277 -0
- package/dist/rag/resilience/CircuitBreaker.d.ts +215 -0
- package/dist/rag/resilience/CircuitBreaker.js +431 -0
- package/dist/rag/resilience/RetryHandler.d.ts +115 -0
- package/dist/rag/resilience/RetryHandler.js +300 -0
- package/dist/rag/resilience/index.d.ts +7 -0
- package/dist/rag/resilience/index.js +7 -0
- package/dist/rag/retrieval/hybridSearch.d.ts +94 -0
- package/dist/rag/retrieval/hybridSearch.js +313 -0
- package/dist/rag/retrieval/index.d.ts +5 -0
- package/dist/rag/retrieval/index.js +5 -0
- package/dist/rag/retrieval/vectorQueryTool.d.ts +93 -0
- package/dist/rag/retrieval/vectorQueryTool.js +289 -0
- package/dist/rag/types.d.ts +768 -0
- package/dist/rag/types.js +8 -0
- package/dist/server/index.d.ts +15 -11
- package/dist/server/index.js +55 -51
- package/dist/server/utils/validation.d.ts +8 -8
- package/dist/types/common.d.ts +0 -1
- package/dist/types/fileTypes.d.ts +1 -1
- package/dist/types/generateTypes.d.ts +42 -8
- package/dist/types/generateTypes.js +1 -1
- package/dist/types/index.d.ts +25 -24
- package/dist/types/index.js +21 -20
- package/dist/types/modelTypes.d.ts +10 -10
- package/dist/types/pptTypes.d.ts +14 -2
- package/dist/types/pptTypes.js +16 -0
- package/dist/types/streamTypes.d.ts +28 -8
- package/dist/types/streamTypes.js +1 -1
- package/dist/utils/async/delay.d.ts +40 -0
- package/dist/utils/async/delay.js +42 -0
- package/dist/utils/async/index.d.ts +23 -0
- package/dist/utils/async/index.js +23 -0
- package/dist/utils/async/retry.d.ts +141 -0
- package/dist/utils/async/retry.js +171 -0
- package/dist/utils/async/withTimeout.d.ts +73 -0
- package/dist/utils/async/withTimeout.js +96 -0
- package/dist/utils/fileDetector.d.ts +7 -1
- package/dist/utils/fileDetector.js +91 -18
- package/dist/utils/json/extract.d.ts +103 -0
- package/dist/utils/json/extract.js +248 -0
- package/dist/utils/json/index.d.ts +36 -0
- package/dist/utils/json/index.js +36 -0
- package/dist/utils/json/safeParse.d.ts +137 -0
- package/dist/utils/json/safeParse.js +190 -0
- package/dist/utils/messageBuilder.d.ts +2 -2
- package/dist/utils/messageBuilder.js +15 -7
- package/dist/utils/modelRouter.d.ts +4 -4
- package/dist/utils/modelRouter.js +4 -4
- package/dist/utils/sanitizers/filename.d.ts +137 -0
- package/dist/utils/sanitizers/filename.js +365 -0
- package/dist/utils/sanitizers/html.d.ts +170 -0
- package/dist/utils/sanitizers/html.js +325 -0
- package/dist/utils/sanitizers/index.d.ts +26 -0
- package/dist/utils/sanitizers/index.js +29 -0
- package/dist/utils/sanitizers/svg.d.ts +81 -0
- package/dist/utils/sanitizers/svg.js +482 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
## [9.3.0](https://github.com/juspay/neurolink/compare/v9.2.0...v9.3.0) (2026-02-08)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- **(rag):** add RAG document processing with generate()/stream() integration ([e595419](https://github.com/juspay/neurolink/commit/e59541962f05efb64a95fd1c6a1e821733232d3c))
|
|
6
|
+
|
|
7
|
+
## [9.2.0](https://github.com/juspay/neurolink/compare/v9.1.1...v9.2.0) (2026-02-06)
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- **(rag):** add `rag: { files }` option to generate() and stream() for automatic RAG pipeline setup
|
|
12
|
+
- **(rag):** add `--rag-files`, `--rag-strategy`, `--rag-chunk-size`, `--rag-chunk-overlap`, `--rag-top-k` CLI flags
|
|
13
|
+
- **(rag):** add 10 chunking strategies with infinite loop protection and input validation
|
|
14
|
+
- **(rag):** add RerankerFactory/Registry with 5 reranker types (simple, llm, batch, cross-encoder, cohere)
|
|
15
|
+
- **(rag):** add hybrid search with BM25 + vector similarity (RRF and linear combination fusion)
|
|
16
|
+
- **(rag):** migrate createVectorQueryTool parameters from JSON Schema to Zod for Vercel AI SDK compatibility
|
|
17
|
+
- **(streaming):** add central tool merge in BaseProvider.stream() for all 10 providers
|
|
18
|
+
- **(streaming):** fix external tool availability in streaming for openRouter, amazonBedrock, ollama, huggingFace, litellm, mistral, anthropic, openAI providers
|
|
19
|
+
- **(multimodal):** add file processor system with 17+ file types and SVG text injection ([9a7b585](https://github.com/juspay/neurolink/commit/9a7b5851e562f7bd55164d1c3dca42d8f18cc827))
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
- **(rag):** fix infinite loops in markdown, html, latex, semantic, recursive chunkers with forward progress guarantees
|
|
24
|
+
- **(rag):** fix missing semantic-markdown strategy registration in ChunkerRegistry
|
|
25
|
+
- **(rag):** fix BM25 division-by-zero guard and hybridSearch embed() validation
|
|
26
|
+
- **(rag):** fix overlap >= maxSize validation across all chunkers
|
|
27
|
+
|
|
1
28
|
## [9.1.1](https://github.com/juspay/neurolink/compare/v9.1.0...v9.1.1) (2026-02-05)
|
|
2
29
|
|
|
3
30
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -35,14 +35,15 @@ Extracted from production systems at Juspay and battle-tested at enterprise scal
|
|
|
35
35
|
|
|
36
36
|
## What's New (Q1 2026)
|
|
37
37
|
|
|
38
|
-
| Feature | Version | Description
|
|
39
|
-
| ----------------------------------- | ------- |
|
|
40
|
-
| **External TracerProvider Support** | v8.43.0 | Integrate NeuroLink with existing OpenTelemetry instrumentation. Prevents duplicate registration conflicts.
|
|
41
|
-
| **Server Adapters** | v8.43.0 | Multi-framework HTTP server with Hono, Express, Fastify, Koa support. Full CLI for server management with foreground/background modes.
|
|
42
|
-
| **Title Generation Events** | v8.38.0 | Emit `conversation:titleGenerated` event when conversation title is generated. Supports custom title prompts via `NEUROLINK_TITLE_PROMPT`.
|
|
43
|
-
| **Video Generation with Veo** | v8.32.0 | Video generation using Veo 3.1 (`veo-3.1`). Realistic video generation with many parameter options
|
|
44
|
-
| **Image Generation with Gemini** | v8.31.0 | Native image generation using Gemini 2.0 Flash Experimental (`imagen-3.0-generate-002`). High-quality image synthesis directly from Google AI.
|
|
45
|
-
| **
|
|
38
|
+
| Feature | Version | Description | Guide |
|
|
39
|
+
| ----------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
|
|
40
|
+
| **External TracerProvider Support** | v8.43.0 | Integrate NeuroLink with existing OpenTelemetry instrumentation. Prevents duplicate registration conflicts. | [Observability Guide](docs/features/observability.md) |
|
|
41
|
+
| **Server Adapters** | v8.43.0 | Multi-framework HTTP server with Hono, Express, Fastify, Koa support. Full CLI for server management with foreground/background modes. | [Server Adapters Guide](docs/guides/server-adapters/index.md) |
|
|
42
|
+
| **Title Generation Events** | v8.38.0 | Emit `conversation:titleGenerated` event when conversation title is generated. Supports custom title prompts via `NEUROLINK_TITLE_PROMPT`. | [Conversation Memory Guide](docs/conversation-memory.md) |
|
|
43
|
+
| **Video Generation with Veo** | v8.32.0 | Video generation using Veo 3.1 (`veo-3.1`). Realistic video generation with many parameter options | [Video Generation Guide](docs/features/video-generation.md) |
|
|
44
|
+
| **Image Generation with Gemini** | v8.31.0 | Native image generation using Gemini 2.0 Flash Experimental (`imagen-3.0-generate-002`). High-quality image synthesis directly from Google AI. | [Image Generation Guide](docs/image-generation-streaming.md) |
|
|
45
|
+
| **RAG with generate()/stream()** | v9.2.0 | Pass `rag: { files }` to generate/stream for automatic document chunking, embedding, and AI-powered search. 10 chunking strategies, hybrid search, reranking. | [RAG Guide](docs/features/rag.md) |
|
|
46
|
+
| **HTTP/Streamable HTTP Transport** | v8.29.0 | Connect to remote MCP servers via HTTP with authentication headers, automatic retry with exponential backoff, and configurable rate limiting. | [HTTP Transport Guide](docs/mcp-http-transport.md) |
|
|
46
47
|
|
|
47
48
|
- **External TracerProvider Support** – Integrate NeuroLink with applications that already have OpenTelemetry instrumentation. Supports auto-detection and manual configuration. → [Observability Guide](docs/features/observability.md)
|
|
48
49
|
- **Server Adapters** – Deploy NeuroLink as an HTTP API server with your framework of choice (Hono, Express, Fastify, Koa). Full CLI support with `serve` and `server` commands for foreground/background modes, route management, and OpenAPI generation. → [Server Adapters Guide](docs/guides/server-adapters/index.md)
|
|
@@ -50,11 +51,13 @@ Extracted from production systems at Juspay and battle-tested at enterprise scal
|
|
|
50
51
|
- **Custom Title Prompts** – Customize conversation title generation with `NEUROLINK_TITLE_PROMPT` environment variable. Use `${userMessage}` placeholder for dynamic prompts. → [Conversation Memory Guide](docs/conversation-memory.md#customizing-the-title-prompt)
|
|
51
52
|
- **Video Generation** – Transform images into 8-second videos with synchronized audio using Google Veo 3.1 via Vertex AI. Supports 720p/1080p resolutions, portrait/landscape aspect ratios. → [Video Generation Guide](docs/features/video-generation.md)
|
|
52
53
|
- **Image Generation** – Generate images from text prompts using Gemini models via Vertex AI or Google AI Studio. Supports streaming mode with automatic file saving. → [Image Generation Guide](docs/image-generation-streaming.md)
|
|
54
|
+
- **RAG with generate()/stream()** – Just pass `rag: { files: ["./docs/guide.md"] }` to `generate()` or `stream()`. NeuroLink auto-chunks, embeds, and creates a search tool the AI can invoke. 10 chunking strategies, hybrid search, 5 reranker types. → [RAG Guide](docs/features/rag.md)
|
|
53
55
|
- **HTTP/Streamable HTTP Transport for MCP** – Connect to remote MCP servers via HTTP with authentication headers, retry logic, and rate limiting. → [HTTP Transport Guide](docs/mcp-http-transport.md)
|
|
54
56
|
- 🧠 **Gemini 3 Preview Support** - Full support for gemini-3-flash-preview and gemini-3-pro-preview with extended thinking capabilities
|
|
55
57
|
- **Structured Output with Zod Schemas** – Type-safe JSON generation with automatic validation using `schema` + `output.format: "json"` in `generate()`. → [Structured Output Guide](docs/features/structured-output.md)
|
|
56
58
|
- **CSV File Support** – Attach CSV files to prompts for AI-powered data analysis with auto-detection. → [CSV Guide](docs/features/multimodal-chat.md#csv-file-support)
|
|
57
59
|
- **PDF File Support** – Process PDF documents with native visual analysis for Vertex AI, Anthropic, Bedrock, AI Studio. → [PDF Guide](docs/features/pdf-support.md)
|
|
60
|
+
- **50+ File Types** – Process Excel, Word, RTF, JSON, YAML, XML, HTML, SVG, Markdown, and 50+ code languages with intelligent content extraction. → [File Processors Guide](docs/features/file-processors.md)
|
|
58
61
|
- **LiteLLM Integration** – Access 100+ AI models from all major providers through unified interface. → [Setup Guide](docs/litellm-integration.md)
|
|
59
62
|
- **SageMaker Integration** – Deploy and use custom trained models on AWS infrastructure. → [Setup Guide](docs/sagemaker-integration.md)
|
|
60
63
|
- **OpenRouter Integration** – Access 300+ models from OpenAI, Anthropic, Google, Meta, and more through a single unified API. → [Setup Guide](docs/getting-started/providers/openrouter.md)
|
|
@@ -228,17 +231,60 @@ const result = await neurolink.generate({
|
|
|
228
231
|
|
|
229
232
|
**SDK-First Design** with TypeScript, IntelliSense, and type safety:
|
|
230
233
|
|
|
231
|
-
| Feature | Description
|
|
232
|
-
| --------------------------- |
|
|
233
|
-
| **Auto Provider Selection** | Intelligent provider fallback
|
|
234
|
-
| **Streaming Responses** | Real-time token streaming
|
|
235
|
-
| **Conversation Memory** | Automatic context management
|
|
236
|
-
| **Full Type Safety** | Complete TypeScript types
|
|
237
|
-
| **Error Handling** | Graceful provider fallback
|
|
238
|
-
| **Analytics & Evaluation** | Usage tracking, quality scores
|
|
239
|
-
| **Middleware System** | Request/response hooks
|
|
240
|
-
| **Framework Integration** | Next.js, SvelteKit, Express
|
|
241
|
-
| **Extended Thinking** | Native thinking/reasoning mode for Gemini 3 and Claude models
|
|
234
|
+
| Feature | Description | Documentation |
|
|
235
|
+
| --------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------- |
|
|
236
|
+
| **Auto Provider Selection** | Intelligent provider fallback | [SDK Guide](docs/sdk/index.md#auto-selection) |
|
|
237
|
+
| **Streaming Responses** | Real-time token streaming | [Streaming Guide](docs/advanced/streaming.md) |
|
|
238
|
+
| **Conversation Memory** | Automatic context management | [Memory Guide](docs/sdk/index.md#memory) |
|
|
239
|
+
| **Full Type Safety** | Complete TypeScript types | [Type Reference](docs/sdk/api-reference.md) |
|
|
240
|
+
| **Error Handling** | Graceful provider fallback | [Error Guide](docs/reference/troubleshooting.md) |
|
|
241
|
+
| **Analytics & Evaluation** | Usage tracking, quality scores | [Analytics Guide](docs/advanced/analytics.md) |
|
|
242
|
+
| **Middleware System** | Request/response hooks | [Middleware Guide](docs/custom-middleware-guide.md) |
|
|
243
|
+
| **Framework Integration** | Next.js, SvelteKit, Express | [Framework Guides](docs/sdk/framework-integration.md) |
|
|
244
|
+
| **Extended Thinking** | Native thinking/reasoning mode for Gemini 3 and Claude models | [Thinking Guide](docs/features/thinking-configuration.md) |
|
|
245
|
+
| **RAG Document Processing** | `rag: { files }` on generate/stream with 10 chunking strategies and hybrid search | [RAG Guide](docs/features/rag.md) |
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
### 📁 Multimodal & File Processing
|
|
250
|
+
|
|
251
|
+
**17+ file categories supported** (50+ total file types including code languages) with intelligent content extraction and provider-agnostic processing:
|
|
252
|
+
|
|
253
|
+
| Category | Supported Types | Processing |
|
|
254
|
+
| ------------- | ---------------------------------------------------------- | ----------------------------------- |
|
|
255
|
+
| **Documents** | Excel (`.xlsx`, `.xls`), Word (`.docx`), RTF, OpenDocument | Sheet extraction, text extraction |
|
|
256
|
+
| **Data** | JSON, YAML, XML | Validation, syntax highlighting |
|
|
257
|
+
| **Markup** | HTML, SVG, Markdown, Text | OWASP-compliant sanitization |
|
|
258
|
+
| **Code** | 50+ languages (TypeScript, Python, Java, Go, etc.) | Language detection, syntax metadata |
|
|
259
|
+
| **Config** | `.env`, `.ini`, `.toml`, `.cfg` | Secure parsing |
|
|
260
|
+
| **Media** | Images (PNG, JPEG, WebP, GIF), PDFs, CSV | Provider-specific formatting |
|
|
261
|
+
|
|
262
|
+
```typescript
|
|
263
|
+
// Process any supported file type
|
|
264
|
+
const result = await neurolink.generate({
|
|
265
|
+
input: {
|
|
266
|
+
text: "Analyze this data and code",
|
|
267
|
+
files: [
|
|
268
|
+
"./data.xlsx", // Excel spreadsheet
|
|
269
|
+
"./config.yaml", // YAML configuration
|
|
270
|
+
"./diagram.svg", // SVG (injected as sanitized text)
|
|
271
|
+
"./main.py", // Python source code
|
|
272
|
+
],
|
|
273
|
+
},
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
// CLI: Use --file for any supported type
|
|
277
|
+
// neurolink generate "Analyze this" --file ./report.xlsx --file ./config.json
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
**Key Features:**
|
|
281
|
+
|
|
282
|
+
- **ProcessorRegistry** - Priority-based processor selection with fallback
|
|
283
|
+
- **OWASP Security** - HTML/SVG sanitization prevents XSS attacks
|
|
284
|
+
- **Auto-detection** - FileDetector identifies file types by extension and content
|
|
285
|
+
- **Provider-agnostic** - All processors work across all 13 AI providers
|
|
286
|
+
|
|
287
|
+
**[📖 File Processors Guide](docs/features/file-processors.md)** - Complete reference for all file types
|
|
242
288
|
|
|
243
289
|
---
|
|
244
290
|
|
|
@@ -356,6 +402,9 @@ node your-app.js
|
|
|
356
402
|
| `server routes` | List all registered API routes | `neurolink server routes` | [Server](docs/cli/commands.md#server) |
|
|
357
403
|
| `server config` | View or modify server configuration | `neurolink server config` | [Server](docs/cli/commands.md#server) |
|
|
358
404
|
| `server openapi` | Generate OpenAPI specification | `neurolink server openapi` | [Server](docs/cli/commands.md#server) |
|
|
405
|
+
| `rag chunk` | Chunk documents for RAG | `neurolink rag chunk f.md` | [RAG CLI](docs/cli/commands.md#rag) |
|
|
406
|
+
|
|
407
|
+
**RAG flags** are available on `generate` and `stream`: `--rag-files`, `--rag-strategy`, `--rag-chunk-size`, `--rag-chunk-overlap`, `--rag-top-k`
|
|
359
408
|
|
|
360
409
|
**[📖 Complete CLI Reference](docs/cli/commands.md)** - All commands and options
|
|
361
410
|
|
|
@@ -373,13 +422,13 @@ Run AI-powered workflows directly in GitHub Actions with 13 provider support and
|
|
|
373
422
|
post_comment: true
|
|
374
423
|
```
|
|
375
424
|
|
|
376
|
-
| Feature | Description
|
|
377
|
-
| ---------------------- |
|
|
378
|
-
| **Multi-Provider** | 13 providers with unified interface
|
|
379
|
-
| **PR/Issue Comments** | Auto-post AI responses with intelligent updates
|
|
380
|
-
| **Multimodal Support** | Attach images, PDFs, CSVs to prompts
|
|
381
|
-
| **Cost Tracking** | Built-in analytics and quality evaluation
|
|
382
|
-
| **Extended Thinking** | Deep reasoning with thinking tokens
|
|
425
|
+
| Feature | Description |
|
|
426
|
+
| ---------------------- | ----------------------------------------------------------------------------------------- |
|
|
427
|
+
| **Multi-Provider** | 13 providers with unified interface |
|
|
428
|
+
| **PR/Issue Comments** | Auto-post AI responses with intelligent updates |
|
|
429
|
+
| **Multimodal Support** | Attach images, PDFs, CSVs, Excel, Word, JSON, YAML, XML, HTML, SVG, code files to prompts |
|
|
430
|
+
| **Cost Tracking** | Built-in analytics and quality evaluation |
|
|
431
|
+
| **Extended Thinking** | Deep reasoning with thinking tokens |
|
|
383
432
|
|
|
384
433
|
**[📖 GitHub Action Guide](docs/guides/github-action.md)** - Complete setup and examples
|
|
385
434
|
|
|
@@ -486,6 +535,10 @@ npx @juspay/neurolink generate "Summarize customer feedback" \
|
|
|
486
535
|
# Turn on analytics + evaluation for observability
|
|
487
536
|
npx @juspay/neurolink generate "Draft release notes" \
|
|
488
537
|
--enable-analytics --enable-evaluation --format json
|
|
538
|
+
|
|
539
|
+
# RAG: Ask questions about your docs (auto-chunks, embeds, searches)
|
|
540
|
+
npx @juspay/neurolink generate "What are the key features?" \
|
|
541
|
+
--rag-files ./docs/guide.md ./docs/api.md --rag-strategy markdown
|
|
489
542
|
```
|
|
490
543
|
|
|
491
544
|
```typescript
|
|
@@ -506,6 +559,10 @@ const result = await neurolink.generate({
|
|
|
506
559
|
"./sales_data.csv", // Auto-detected as CSV
|
|
507
560
|
"examples/data/invoice.pdf", // Auto-detected as PDF
|
|
508
561
|
"./diagrams/architecture.png", // Auto-detected as image
|
|
562
|
+
"./report.xlsx", // Auto-detected as Excel
|
|
563
|
+
"./config.json", // Auto-detected as JSON
|
|
564
|
+
"./diagram.svg", // Auto-detected as SVG (injected as text)
|
|
565
|
+
"./app.ts", // Auto-detected as TypeScript code
|
|
509
566
|
],
|
|
510
567
|
},
|
|
511
568
|
provider: "vertex", // PDF-capable provider (see docs/features/pdf-support.md)
|
|
@@ -515,6 +572,17 @@ const result = await neurolink.generate({
|
|
|
515
572
|
|
|
516
573
|
console.log(result.content);
|
|
517
574
|
console.log(result.evaluation?.overallScore);
|
|
575
|
+
|
|
576
|
+
// RAG: Ask questions about your documents
|
|
577
|
+
const answer = await neurolink.generate({
|
|
578
|
+
prompt: "What are the main architectural decisions?",
|
|
579
|
+
rag: {
|
|
580
|
+
files: ["./docs/architecture.md", "./docs/decisions.md"],
|
|
581
|
+
strategy: "markdown",
|
|
582
|
+
topK: 5,
|
|
583
|
+
},
|
|
584
|
+
});
|
|
585
|
+
console.log(answer.content); // AI searches your docs and answers
|
|
518
586
|
```
|
|
519
587
|
|
|
520
588
|
### Gemini 3 with Extended Thinking
|
|
@@ -553,17 +621,18 @@ Full command and API breakdown lives in [`docs/cli/commands.md`](docs/cli/comman
|
|
|
553
621
|
|
|
554
622
|
## Documentation Map
|
|
555
623
|
|
|
556
|
-
| Area | When to Use
|
|
557
|
-
| --------------- |
|
|
558
|
-
| Getting started | Install, configure, run first prompt
|
|
559
|
-
| Feature guides | Understand new functionality front-to-back
|
|
560
|
-
| CLI reference | Command syntax, flags, loop sessions
|
|
561
|
-
| SDK reference | Classes, methods, options
|
|
562
|
-
|
|
|
563
|
-
|
|
|
564
|
-
|
|
|
565
|
-
|
|
|
566
|
-
|
|
|
624
|
+
| Area | When to Use | Link |
|
|
625
|
+
| --------------- | --------------------------------------------------------- | ---------------------------------------------------------------- |
|
|
626
|
+
| Getting started | Install, configure, run first prompt | [`docs/getting-started/index.md`](docs/getting-started/index.md) |
|
|
627
|
+
| Feature guides | Understand new functionality front-to-back | [`docs/features/index.md`](docs/features/index.md) |
|
|
628
|
+
| CLI reference | Command syntax, flags, loop sessions | [`docs/cli/index.md`](docs/cli/index.md) |
|
|
629
|
+
| SDK reference | Classes, methods, options | [`docs/sdk/index.md`](docs/sdk/index.md) |
|
|
630
|
+
| RAG | Document chunking, hybrid search, reranking, `rag:{}` API | [`docs/features/rag.md`](docs/features/rag.md) |
|
|
631
|
+
| Integrations | LiteLLM, SageMaker, MCP, Mem0 | [`docs/litellm-integration.md`](docs/litellm-integration.md) |
|
|
632
|
+
| Advanced | Middleware, architecture, streaming patterns | [`docs/advanced/index.md`](docs/advanced/index.md) |
|
|
633
|
+
| Cookbook | Practical recipes for common patterns | [`docs/cookbook/index.md`](docs/cookbook/index.md) |
|
|
634
|
+
| Guides | Migration, Redis, troubleshooting, provider selection | [`docs/guides/index.md`](docs/guides/index.md) |
|
|
635
|
+
| Operations | Configuration, troubleshooting, provider matrix | [`docs/reference/index.md`](docs/reference/index.md) |
|
|
567
636
|
|
|
568
637
|
### New in 2026: Enhanced Documentation
|
|
569
638
|
|
|
@@ -219,13 +219,13 @@ export declare const directAgentTools: {
|
|
|
219
219
|
content: z.ZodString;
|
|
220
220
|
mode: z.ZodDefault<z.ZodEnum<["create", "overwrite", "append"]>>;
|
|
221
221
|
}, "strip", z.ZodTypeAny, {
|
|
222
|
-
content: string;
|
|
223
222
|
path: string;
|
|
224
|
-
mode: "create" | "overwrite" | "append";
|
|
225
|
-
}, {
|
|
226
223
|
content: string;
|
|
224
|
+
mode: "append" | "create" | "overwrite";
|
|
225
|
+
}, {
|
|
227
226
|
path: string;
|
|
228
|
-
|
|
227
|
+
content: string;
|
|
228
|
+
mode?: "append" | "create" | "overwrite" | undefined;
|
|
229
229
|
}>, {
|
|
230
230
|
success: boolean;
|
|
231
231
|
error: string;
|
|
@@ -236,7 +236,7 @@ export declare const directAgentTools: {
|
|
|
236
236
|
} | {
|
|
237
237
|
success: boolean;
|
|
238
238
|
path: string;
|
|
239
|
-
mode: "
|
|
239
|
+
mode: "append" | "create" | "overwrite";
|
|
240
240
|
size: number;
|
|
241
241
|
written: number;
|
|
242
242
|
error?: undefined;
|
|
@@ -249,9 +249,9 @@ export declare const directAgentTools: {
|
|
|
249
249
|
written?: undefined;
|
|
250
250
|
}> & {
|
|
251
251
|
execute: (args: {
|
|
252
|
-
content: string;
|
|
253
252
|
path: string;
|
|
254
|
-
|
|
253
|
+
content: string;
|
|
254
|
+
mode: "append" | "create" | "overwrite";
|
|
255
255
|
}, options: import("ai").ToolExecutionOptions) => PromiseLike<{
|
|
256
256
|
success: boolean;
|
|
257
257
|
error: string;
|
|
@@ -262,7 +262,7 @@ export declare const directAgentTools: {
|
|
|
262
262
|
} | {
|
|
263
263
|
success: boolean;
|
|
264
264
|
path: string;
|
|
265
|
-
mode: "
|
|
265
|
+
mode: "append" | "create" | "overwrite";
|
|
266
266
|
size: number;
|
|
267
267
|
written: number;
|
|
268
268
|
error?: undefined;
|
|
@@ -281,13 +281,13 @@ export declare const directAgentTools: {
|
|
|
281
281
|
column: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
282
282
|
maxRows: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
283
283
|
}, "strip", z.ZodTypeAny, {
|
|
284
|
-
operation: "count_by_column" | "sum_by_column" | "average_by_column" | "min_max_by_column" | "describe";
|
|
285
284
|
maxRows: number;
|
|
286
285
|
filePath: string;
|
|
286
|
+
operation: "count_by_column" | "sum_by_column" | "average_by_column" | "min_max_by_column" | "describe";
|
|
287
287
|
column: string;
|
|
288
288
|
}, {
|
|
289
|
-
operation: "count_by_column" | "sum_by_column" | "average_by_column" | "min_max_by_column" | "describe";
|
|
290
289
|
filePath: string;
|
|
290
|
+
operation: "count_by_column" | "sum_by_column" | "average_by_column" | "min_max_by_column" | "describe";
|
|
291
291
|
maxRows?: number | undefined;
|
|
292
292
|
column?: string | undefined;
|
|
293
293
|
}>, {
|
|
@@ -308,9 +308,9 @@ export declare const directAgentTools: {
|
|
|
308
308
|
column: string;
|
|
309
309
|
}> & {
|
|
310
310
|
execute: (args: {
|
|
311
|
-
operation: "count_by_column" | "sum_by_column" | "average_by_column" | "min_max_by_column" | "describe";
|
|
312
311
|
maxRows: number;
|
|
313
312
|
filePath: string;
|
|
313
|
+
operation: "count_by_column" | "sum_by_column" | "average_by_column" | "min_max_by_column" | "describe";
|
|
314
314
|
column: string;
|
|
315
315
|
}, options: import("ai").ToolExecutionOptions) => PromiseLike<{
|
|
316
316
|
success: boolean;
|
|
@@ -54,17 +54,17 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
54
54
|
location: string;
|
|
55
55
|
projectId?: string | undefined;
|
|
56
56
|
credentials?: string | undefined;
|
|
57
|
+
privateKey?: string | undefined;
|
|
57
58
|
serviceAccountKey?: string | undefined;
|
|
58
59
|
clientEmail?: string | undefined;
|
|
59
|
-
privateKey?: string | undefined;
|
|
60
60
|
}, {
|
|
61
61
|
model?: string | undefined;
|
|
62
62
|
projectId?: string | undefined;
|
|
63
63
|
credentials?: string | undefined;
|
|
64
64
|
location?: string | undefined;
|
|
65
|
+
privateKey?: string | undefined;
|
|
65
66
|
serviceAccountKey?: string | undefined;
|
|
66
67
|
clientEmail?: string | undefined;
|
|
67
|
-
privateKey?: string | undefined;
|
|
68
68
|
}>>;
|
|
69
69
|
anthropic: z.ZodOptional<z.ZodObject<{
|
|
70
70
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
@@ -153,9 +153,9 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
153
153
|
location: string;
|
|
154
154
|
projectId?: string | undefined;
|
|
155
155
|
credentials?: string | undefined;
|
|
156
|
+
privateKey?: string | undefined;
|
|
156
157
|
serviceAccountKey?: string | undefined;
|
|
157
158
|
clientEmail?: string | undefined;
|
|
158
|
-
privateKey?: string | undefined;
|
|
159
159
|
} | undefined;
|
|
160
160
|
anthropic?: {
|
|
161
161
|
model: string;
|
|
@@ -202,9 +202,9 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
202
202
|
projectId?: string | undefined;
|
|
203
203
|
credentials?: string | undefined;
|
|
204
204
|
location?: string | undefined;
|
|
205
|
+
privateKey?: string | undefined;
|
|
205
206
|
serviceAccountKey?: string | undefined;
|
|
206
207
|
clientEmail?: string | undefined;
|
|
207
|
-
privateKey?: string | undefined;
|
|
208
208
|
} | undefined;
|
|
209
209
|
anthropic?: {
|
|
210
210
|
model?: string | undefined;
|
|
@@ -473,9 +473,9 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
473
473
|
location: string;
|
|
474
474
|
projectId?: string | undefined;
|
|
475
475
|
credentials?: string | undefined;
|
|
476
|
+
privateKey?: string | undefined;
|
|
476
477
|
serviceAccountKey?: string | undefined;
|
|
477
478
|
clientEmail?: string | undefined;
|
|
478
|
-
privateKey?: string | undefined;
|
|
479
479
|
} | undefined;
|
|
480
480
|
anthropic?: {
|
|
481
481
|
model: string;
|
|
@@ -571,9 +571,9 @@ declare const ConfigSchema: z.ZodObject<{
|
|
|
571
571
|
projectId?: string | undefined;
|
|
572
572
|
credentials?: string | undefined;
|
|
573
573
|
location?: string | undefined;
|
|
574
|
+
privateKey?: string | undefined;
|
|
574
575
|
serviceAccountKey?: string | undefined;
|
|
575
576
|
clientEmail?: string | undefined;
|
|
576
|
-
privateKey?: string | undefined;
|
|
577
577
|
} | undefined;
|
|
578
578
|
anthropic?: {
|
|
579
579
|
model?: string | undefined;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RAG CLI Commands for NeuroLink
|
|
3
|
+
*
|
|
4
|
+
* Implements commands for RAG document processing:
|
|
5
|
+
* - neurolink rag chunk <file> - Chunk a document
|
|
6
|
+
* - neurolink rag index <file> - Index a document for retrieval
|
|
7
|
+
* - neurolink rag query <query> - Query indexed documents
|
|
8
|
+
*/
|
|
9
|
+
import type { CommandModule } from "yargs";
|
|
10
|
+
/**
|
|
11
|
+
* RAG CLI command factory
|
|
12
|
+
*/
|
|
13
|
+
export declare class RAGCommandFactory {
|
|
14
|
+
/**
|
|
15
|
+
* Create the main RAG command with subcommands
|
|
16
|
+
*/
|
|
17
|
+
static createRAGCommands(): CommandModule;
|
|
18
|
+
}
|
|
19
|
+
export declare const ragCommand: CommandModule<{}, {}>;
|