@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/dist/server/index.d.ts
CHANGED
|
@@ -23,22 +23,26 @@
|
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
25
|
export { BaseServerAdapter } from "./abstract/baseServerAdapter.js";
|
|
26
|
-
export { HonoServerAdapter } from "./adapters/honoAdapter.js";
|
|
27
26
|
export { ExpressServerAdapter } from "./adapters/expressAdapter.js";
|
|
28
27
|
export { FastifyServerAdapter } from "./adapters/fastifyAdapter.js";
|
|
28
|
+
export { HonoServerAdapter } from "./adapters/honoAdapter.js";
|
|
29
29
|
export { KoaServerAdapter } from "./adapters/koaAdapter.js";
|
|
30
|
+
export { AlreadyRunningError, AuthenticationError, AuthorizationError, ConfigurationError, ErrorRecoveryStrategies, HandlerError, InvalidAuthenticationError, MissingDependencyError, NotRunningError, RateLimitError as ServerRateLimitError, RouteConflictError, RouteNotFoundError, ServerAdapterError, ServerStartError, ServerStopError, StreamAbortedError, StreamingError, TimeoutError, ValidationError as ServerValidationError, WebSocketConnectionError, WebSocketError, wrapError, } from "./errors.js";
|
|
30
31
|
export { createServer, ServerAdapterFactory, } from "./factory/serverAdapterFactory.js";
|
|
31
|
-
export {
|
|
32
|
-
export {
|
|
32
|
+
export { type AbortSignalMiddlewareOptions, createAbortSignalMiddleware, createExpressAbortMiddleware, } from "./middleware/abortSignal.js";
|
|
33
|
+
export { type AuthConfig, type AuthResult, createAuthMiddleware, createRoleMiddleware, } from "./middleware/auth.js";
|
|
34
|
+
export { type CacheConfig, type CacheEntry, type CacheStore, createCacheInvalidator, createCacheMiddleware, InMemoryCacheStore, } from "./middleware/cache.js";
|
|
35
|
+
export { createCompressionMiddleware, createErrorHandlingMiddleware, createLoggingMiddleware, createRequestIdMiddleware, createSecurityHeadersMiddleware, createTimingMiddleware, } from "./middleware/common.js";
|
|
36
|
+
export { createDeprecationMiddleware, type DeprecationConfig, } from "./middleware/deprecation.js";
|
|
37
|
+
export { createMCPBodyAttachmentMiddleware, fastifyMCPBodyHook, } from "./middleware/mcpBodyAttachment.js";
|
|
33
38
|
export { createRateLimitMiddleware, createSlidingWindowRateLimitMiddleware, InMemoryRateLimitStore, RateLimitError, type RateLimitMiddlewareConfig, type RateLimitStore, } from "./middleware/rateLimit.js";
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
36
|
-
export {
|
|
37
|
-
export
|
|
39
|
+
export { CommonSchemas, createFieldValidator, createRequestValidationMiddleware, type PropertySchema, type ValidationConfig, ValidationError, type ValidationSchema, } from "./middleware/validation.js";
|
|
40
|
+
export { AgentExecuteRequestSchema as OpenAPIAgentExecuteRequestSchema, AgentExecuteResponseSchema, AgentInputSchema, ApiKeySecurityScheme, BasicSecurityScheme, BearerSecurityScheme, CommonParameters, ConversationMessageSchema, createApiInfo, createDeleteOperation, createErrorResponse as createOpenAPIErrorResponse, createGetOperation, createHeaderParameter, createOpenAPIGenerator, createPathParameter, createPostOperation, createQueryParameter, createServer as createOpenAPIServer, createStreamingPostOperation, createStreamingResponse, createSuccessResponse, DefaultServers, ErrorResponseSchema, generateOpenAPIFromConfig, generateOpenAPISpec, HealthResponseSchema, MCPServerStatusSchema, MCPServersListResponseSchema, MCPServerToolSchema, MetricsResponseSchema, NeuroLinkApiInfo, OpenAPIGenerator, type OpenAPIGeneratorConfig, OpenAPISchemas, type OpenAPISpec, ProviderInfoSchema, ReadyResponseSchema, SessionSchema, SessionsListResponseSchema, StandardErrorResponses, StandardTags, TokenUsageSchema, ToolCallSchema, ToolDefinitionSchema, ToolExecuteRequestSchema as OpenAPIToolExecuteRequestSchema, ToolExecuteResponseSchema, ToolListResponseSchema, ToolParameterSchema, } from "./openapi/index.js";
|
|
41
|
+
export { type CreateRoutesOptions, createAgentRoutes, createAllRoutes, createHealthRoutes, createMCPRoutes, createMemoryRoutes, createOpenApiRoutes, createToolRoutes, registerAllRoutes, } from "./routes/index.js";
|
|
42
|
+
export { BaseDataStreamWriter, createDataStreamResponse, createDataStreamWriter, createNDJSONHeaders, createSSEHeaders, type DataEvent, type DataStreamEvent, type DataStreamEventType, DataStreamResponse, type DataStreamResponseConfig, type DataStreamWriterConfig, type ErrorEvent, type FinishEvent, formatSSEEvent, pipeAsyncIterableToDataStream, type SSEEventOptions, type TextDeltaEvent, type TextEndEvent, type TextStartEvent, type ToolCallEvent, type ToolResultEvent, WebStreamWriter, } from "./streaming/index.js";
|
|
43
|
+
export type { AgentExecuteRequest, AgentExecuteResponse, AuthConfig as WebSocketAuthConfig, AuthenticatedUser, AuthStrategy, BodyParserConfig, CORSConfig, DataStreamWriter, ErrorCategoryType, ErrorSeverityType, HealthResponse, HttpMethod, LoggingConfig, MCPServerStatusResponse, MiddlewareDefinition, MiddlewareHandler, RateLimitConfig, ReadyResponse, RequiredServerAdapterConfig, RouteDefinition, RouteGroup, RouteHandler, ServerAdapterConfig, ServerAdapterErrorCodeType, ServerAdapterErrorContext, ServerAdapterEvents, ServerAdapterFactoryOptions, ServerContext, ServerFramework, ServerResponse, ServerStatus, SSEWriteOptions, StreamingConfig, ToolExecuteRequest, ToolExecuteResponse, WebSocketConfig, WebSocketConnection, WebSocketHandler, WebSocketMessage, WebSocketMessageType, } from "./types.js";
|
|
38
44
|
export { ErrorCategory, ErrorSeverity, ServerAdapterErrorCode, } from "./types.js";
|
|
45
|
+
export { createStreamRedactor, redactStreamChunk } from "./utils/redaction.js";
|
|
39
46
|
export type { ErrorResponse, ValidationResult } from "./utils/validation.js";
|
|
40
47
|
export { AgentExecuteRequestSchema, createErrorResponse, ServerNameParamSchema, SessionIdParamSchema, ToolArgumentsSchema, ToolExecuteRequestSchema, ToolNameParamSchema, ToolSearchQuerySchema, validateParams, validateQuery, validateRequest, } from "./utils/validation.js";
|
|
41
|
-
export {
|
|
42
|
-
export { type DataStreamEventType, type DataStreamEvent, type TextStartEvent, type TextDeltaEvent, type TextEndEvent, type ToolCallEvent, type ToolResultEvent, type DataEvent, type ErrorEvent, type FinishEvent, type DataStreamWriterConfig, createDataStreamWriter, type DataStreamResponseConfig, DataStreamResponse, createDataStreamResponse, pipeAsyncIterableToDataStream, createSSEHeaders, createNDJSONHeaders, } from "./streaming/index.js";
|
|
43
|
-
export { WebSocketConnectionManager, WebSocketMessageRouter, createAgentWebSocketHandler, } from "./websocket/index.js";
|
|
44
|
-
export { ServerAdapterError, ConfigurationError, RouteConflictError, RouteNotFoundError, ValidationError as ServerValidationError, AuthenticationError, InvalidAuthenticationError, AuthorizationError, RateLimitError as ServerRateLimitError, TimeoutError, HandlerError, StreamingError, StreamAbortedError, WebSocketError, WebSocketConnectionError, ServerStartError, ServerStopError, AlreadyRunningError, NotRunningError, MissingDependencyError, ErrorRecoveryStrategies, wrapError, } from "./errors.js";
|
|
48
|
+
export { createAgentWebSocketHandler, WebSocketConnectionManager, WebSocketMessageRouter, } from "./websocket/index.js";
|
package/dist/server/index.js
CHANGED
|
@@ -26,79 +26,83 @@
|
|
|
26
26
|
// Abstract Base Class
|
|
27
27
|
// ============================================
|
|
28
28
|
export { BaseServerAdapter } from "./abstract/baseServerAdapter.js";
|
|
29
|
+
export { ExpressServerAdapter } from "./adapters/expressAdapter.js";
|
|
30
|
+
export { FastifyServerAdapter } from "./adapters/fastifyAdapter.js";
|
|
29
31
|
// ============================================
|
|
30
32
|
// Framework Adapters
|
|
31
33
|
// ============================================
|
|
32
34
|
export { HonoServerAdapter } from "./adapters/honoAdapter.js";
|
|
33
|
-
export { ExpressServerAdapter } from "./adapters/expressAdapter.js";
|
|
34
|
-
export { FastifyServerAdapter } from "./adapters/fastifyAdapter.js";
|
|
35
35
|
export { KoaServerAdapter } from "./adapters/koaAdapter.js";
|
|
36
36
|
// ============================================
|
|
37
|
-
//
|
|
37
|
+
// Errors
|
|
38
38
|
// ============================================
|
|
39
|
-
export {
|
|
39
|
+
export { AlreadyRunningError,
|
|
40
|
+
// Authentication/Authorization errors
|
|
41
|
+
AuthenticationError, AuthorizationError,
|
|
42
|
+
// Configuration errors
|
|
43
|
+
ConfigurationError,
|
|
44
|
+
// Error recovery
|
|
45
|
+
ErrorRecoveryStrategies,
|
|
46
|
+
// Handler errors
|
|
47
|
+
HandlerError, InvalidAuthenticationError,
|
|
48
|
+
// Dependency errors
|
|
49
|
+
MissingDependencyError, NotRunningError,
|
|
50
|
+
// Rate limit errors
|
|
51
|
+
RateLimitError as ServerRateLimitError, RouteConflictError, RouteNotFoundError,
|
|
52
|
+
// Base error class
|
|
53
|
+
ServerAdapterError,
|
|
54
|
+
// Server lifecycle errors
|
|
55
|
+
ServerStartError, ServerStopError, StreamAbortedError,
|
|
56
|
+
// Streaming errors
|
|
57
|
+
StreamingError,
|
|
58
|
+
// Timeout errors
|
|
59
|
+
TimeoutError,
|
|
60
|
+
// Validation errors
|
|
61
|
+
ValidationError as ServerValidationError, WebSocketConnectionError,
|
|
62
|
+
// WebSocket errors
|
|
63
|
+
WebSocketError,
|
|
64
|
+
// Utilities
|
|
65
|
+
wrapError, } from "./errors.js";
|
|
40
66
|
// ============================================
|
|
41
|
-
//
|
|
67
|
+
// Factory
|
|
42
68
|
// ============================================
|
|
43
|
-
export {
|
|
69
|
+
export { createServer, ServerAdapterFactory, } from "./factory/serverAdapterFactory.js";
|
|
70
|
+
export { createAbortSignalMiddleware, createExpressAbortMiddleware, } from "./middleware/abortSignal.js";
|
|
44
71
|
// ============================================
|
|
45
72
|
// Middleware
|
|
46
73
|
// ============================================
|
|
47
74
|
export { createAuthMiddleware, createRoleMiddleware, } from "./middleware/auth.js";
|
|
75
|
+
export { createCacheInvalidator, createCacheMiddleware, InMemoryCacheStore, } from "./middleware/cache.js";
|
|
76
|
+
export { createCompressionMiddleware, createErrorHandlingMiddleware, createLoggingMiddleware, createRequestIdMiddleware, createSecurityHeadersMiddleware, createTimingMiddleware, } from "./middleware/common.js";
|
|
77
|
+
export { createDeprecationMiddleware, } from "./middleware/deprecation.js";
|
|
78
|
+
export { createMCPBodyAttachmentMiddleware, fastifyMCPBodyHook, } from "./middleware/mcpBodyAttachment.js";
|
|
48
79
|
export { createRateLimitMiddleware, createSlidingWindowRateLimitMiddleware, InMemoryRateLimitStore, RateLimitError, } from "./middleware/rateLimit.js";
|
|
49
|
-
export {
|
|
50
|
-
export { createRequestValidationMiddleware, createFieldValidator, ValidationError, } from "./middleware/validation.js";
|
|
51
|
-
export { createTimingMiddleware, createRequestIdMiddleware, createErrorHandlingMiddleware, createSecurityHeadersMiddleware, createLoggingMiddleware, createCompressionMiddleware, } from "./middleware/common.js";
|
|
52
|
-
// Export error constants
|
|
53
|
-
export { ErrorCategory, ErrorSeverity, ServerAdapterErrorCode, } from "./types.js";
|
|
54
|
-
export { AgentExecuteRequestSchema, createErrorResponse, ServerNameParamSchema, SessionIdParamSchema, ToolArgumentsSchema, ToolExecuteRequestSchema, ToolNameParamSchema, ToolSearchQuerySchema, validateParams, validateQuery, validateRequest, } from "./utils/validation.js";
|
|
80
|
+
export { CommonSchemas, createFieldValidator, createRequestValidationMiddleware, ValidationError, } from "./middleware/validation.js";
|
|
55
81
|
// ============================================
|
|
56
82
|
// OpenAPI
|
|
57
83
|
// ============================================
|
|
58
|
-
export {
|
|
59
|
-
// Generator
|
|
60
|
-
OpenAPIGenerator, createOpenAPIGenerator, generateOpenAPISpec, generateOpenAPIFromConfig,
|
|
61
|
-
// Schemas
|
|
62
|
-
ErrorResponseSchema, TokenUsageSchema, AgentInputSchema, AgentExecuteRequestSchema as OpenAPIAgentExecuteRequestSchema, AgentExecuteResponseSchema, ToolCallSchema, ProviderInfoSchema, ToolParameterSchema, ToolDefinitionSchema, ToolListResponseSchema, ToolExecuteRequestSchema as OpenAPIToolExecuteRequestSchema, ToolExecuteResponseSchema, MCPServerToolSchema, MCPServerStatusSchema, MCPServersListResponseSchema, ConversationMessageSchema, SessionSchema, SessionsListResponseSchema, HealthResponseSchema, ReadyResponseSchema, MetricsResponseSchema, OpenAPISchemas,
|
|
84
|
+
export { AgentExecuteRequestSchema as OpenAPIAgentExecuteRequestSchema, AgentExecuteResponseSchema, AgentInputSchema, ApiKeySecurityScheme, BasicSecurityScheme, BearerSecurityScheme, CommonParameters, ConversationMessageSchema, createApiInfo, createDeleteOperation, createErrorResponse as createOpenAPIErrorResponse, createGetOperation, createHeaderParameter, createOpenAPIGenerator, createPathParameter, createPostOperation, createQueryParameter, createServer as createOpenAPIServer, createStreamingPostOperation, createStreamingResponse,
|
|
63
85
|
// Templates
|
|
64
|
-
createSuccessResponse,
|
|
86
|
+
createSuccessResponse, DefaultServers,
|
|
87
|
+
// Schemas
|
|
88
|
+
ErrorResponseSchema, generateOpenAPIFromConfig, generateOpenAPISpec, HealthResponseSchema, MCPServerStatusSchema, MCPServersListResponseSchema, MCPServerToolSchema, MetricsResponseSchema, NeuroLinkApiInfo,
|
|
89
|
+
// Generator
|
|
90
|
+
OpenAPIGenerator, OpenAPISchemas, ProviderInfoSchema, ReadyResponseSchema, SessionSchema, SessionsListResponseSchema, StandardErrorResponses, StandardTags, TokenUsageSchema, ToolCallSchema, ToolDefinitionSchema, ToolExecuteRequestSchema as OpenAPIToolExecuteRequestSchema, ToolExecuteResponseSchema, ToolListResponseSchema, ToolParameterSchema, } from "./openapi/index.js";
|
|
91
|
+
// ============================================
|
|
92
|
+
// Routes
|
|
93
|
+
// ============================================
|
|
94
|
+
export { createAgentRoutes, createAllRoutes, createHealthRoutes, createMCPRoutes, createMemoryRoutes, createOpenApiRoutes, createToolRoutes, registerAllRoutes, } from "./routes/index.js";
|
|
65
95
|
// ============================================
|
|
66
96
|
// Streaming
|
|
67
97
|
// ============================================
|
|
68
|
-
export { createDataStreamWriter, DataStreamResponse,
|
|
98
|
+
export { BaseDataStreamWriter, createDataStreamResponse, createDataStreamWriter, createNDJSONHeaders, createSSEHeaders, DataStreamResponse, formatSSEEvent,
|
|
69
99
|
// Helpers
|
|
70
|
-
pipeAsyncIterableToDataStream,
|
|
100
|
+
pipeAsyncIterableToDataStream, WebStreamWriter, } from "./streaming/index.js";
|
|
101
|
+
// Export error constants
|
|
102
|
+
export { ErrorCategory, ErrorSeverity, ServerAdapterErrorCode, } from "./types.js";
|
|
103
|
+
export { createStreamRedactor, redactStreamChunk } from "./utils/redaction.js";
|
|
104
|
+
export { AgentExecuteRequestSchema, createErrorResponse, ServerNameParamSchema, SessionIdParamSchema, ToolArgumentsSchema, ToolExecuteRequestSchema, ToolNameParamSchema, ToolSearchQuerySchema, validateParams, validateQuery, validateRequest, } from "./utils/validation.js";
|
|
71
105
|
// ============================================
|
|
72
106
|
// WebSocket
|
|
73
107
|
// ============================================
|
|
74
|
-
export { WebSocketConnectionManager, WebSocketMessageRouter,
|
|
75
|
-
// ============================================
|
|
76
|
-
// Errors
|
|
77
|
-
// ============================================
|
|
78
|
-
export {
|
|
79
|
-
// Base error class
|
|
80
|
-
ServerAdapterError,
|
|
81
|
-
// Configuration errors
|
|
82
|
-
ConfigurationError, RouteConflictError, RouteNotFoundError,
|
|
83
|
-
// Validation errors
|
|
84
|
-
ValidationError as ServerValidationError,
|
|
85
|
-
// Authentication/Authorization errors
|
|
86
|
-
AuthenticationError, InvalidAuthenticationError, AuthorizationError,
|
|
87
|
-
// Rate limit errors
|
|
88
|
-
RateLimitError as ServerRateLimitError,
|
|
89
|
-
// Timeout errors
|
|
90
|
-
TimeoutError,
|
|
91
|
-
// Handler errors
|
|
92
|
-
HandlerError,
|
|
93
|
-
// Streaming errors
|
|
94
|
-
StreamingError, StreamAbortedError,
|
|
95
|
-
// WebSocket errors
|
|
96
|
-
WebSocketError, WebSocketConnectionError,
|
|
97
|
-
// Server lifecycle errors
|
|
98
|
-
ServerStartError, ServerStopError, AlreadyRunningError, NotRunningError,
|
|
99
|
-
// Dependency errors
|
|
100
|
-
MissingDependencyError,
|
|
101
|
-
// Error recovery
|
|
102
|
-
ErrorRecoveryStrategies,
|
|
103
|
-
// Utilities
|
|
104
|
-
wrapError, } from "./errors.js";
|
|
108
|
+
export { createAgentWebSocketHandler, WebSocketConnectionManager, WebSocketMessageRouter, } from "./websocket/index.js";
|
|
@@ -38,12 +38,12 @@ export declare const AgentExecuteRequestSchema: z.ZodObject<{
|
|
|
38
38
|
provider?: string | undefined;
|
|
39
39
|
model?: string | undefined;
|
|
40
40
|
userId?: string | undefined;
|
|
41
|
-
|
|
41
|
+
stream?: boolean | undefined;
|
|
42
42
|
sessionId?: string | undefined;
|
|
43
43
|
temperature?: number | undefined;
|
|
44
44
|
maxTokens?: number | undefined;
|
|
45
|
-
stream?: boolean | undefined;
|
|
46
45
|
systemPrompt?: string | undefined;
|
|
46
|
+
tools?: string[] | undefined;
|
|
47
47
|
}, {
|
|
48
48
|
input: string | {
|
|
49
49
|
text: string;
|
|
@@ -53,12 +53,12 @@ export declare const AgentExecuteRequestSchema: z.ZodObject<{
|
|
|
53
53
|
provider?: string | undefined;
|
|
54
54
|
model?: string | undefined;
|
|
55
55
|
userId?: string | undefined;
|
|
56
|
-
|
|
56
|
+
stream?: boolean | undefined;
|
|
57
57
|
sessionId?: string | undefined;
|
|
58
58
|
temperature?: number | undefined;
|
|
59
59
|
maxTokens?: number | undefined;
|
|
60
|
-
stream?: boolean | undefined;
|
|
61
60
|
systemPrompt?: string | undefined;
|
|
61
|
+
tools?: string[] | undefined;
|
|
62
62
|
}>;
|
|
63
63
|
/**
|
|
64
64
|
* Tool execute request schema
|
|
@@ -148,12 +148,12 @@ export declare const SessionsListQuerySchema: z.ZodObject<{
|
|
|
148
148
|
offset: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
|
|
149
149
|
}, "strip", z.ZodTypeAny, {
|
|
150
150
|
userId?: string | undefined;
|
|
151
|
-
limit?: number | undefined;
|
|
152
151
|
offset?: number | undefined;
|
|
152
|
+
limit?: number | undefined;
|
|
153
153
|
}, {
|
|
154
154
|
userId?: string | undefined;
|
|
155
|
-
limit?: string | undefined;
|
|
156
155
|
offset?: string | undefined;
|
|
156
|
+
limit?: string | undefined;
|
|
157
157
|
}>;
|
|
158
158
|
/**
|
|
159
159
|
* Session messages query schema (for pagination)
|
|
@@ -162,11 +162,11 @@ export declare const SessionMessagesQuerySchema: z.ZodObject<{
|
|
|
162
162
|
limit: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
|
|
163
163
|
offset: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>>;
|
|
164
164
|
}, "strip", z.ZodTypeAny, {
|
|
165
|
-
limit?: number | undefined;
|
|
166
165
|
offset?: number | undefined;
|
|
166
|
+
limit?: number | undefined;
|
|
167
167
|
}, {
|
|
168
|
-
limit?: string | undefined;
|
|
169
168
|
offset?: string | undefined;
|
|
169
|
+
limit?: string | undefined;
|
|
170
170
|
}>;
|
|
171
171
|
/**
|
|
172
172
|
* Standardized error response format
|
package/dist/types/common.d.ts
CHANGED
|
@@ -110,7 +110,6 @@ export type NeuroLinkEvents = {
|
|
|
110
110
|
"externalMCP:serverRemoved": unknown;
|
|
111
111
|
"tools-register:start": unknown;
|
|
112
112
|
"tools-register:end": unknown;
|
|
113
|
-
"conversation:titleGenerated": unknown;
|
|
114
113
|
connected: unknown;
|
|
115
114
|
message: unknown;
|
|
116
115
|
error: unknown;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Supported file types for multimodal input
|
|
6
6
|
*/
|
|
7
|
-
export type FileType = "csv" | "image" | "pdf" | "audio" | "text" | "docx" | "pptx" | "xlsx" | "unknown";
|
|
7
|
+
export type FileType = "csv" | "image" | "pdf" | "audio" | "text" | "svg" | "docx" | "pptx" | "xlsx" | "unknown";
|
|
8
8
|
/**
|
|
9
9
|
* Office document types
|
|
10
10
|
*/
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
1
|
+
import type { Schema, Tool } from "ai";
|
|
2
|
+
import type { AIProviderName } from "../constants/enums.js";
|
|
3
|
+
import type { RAGConfig } from "../rag/types.js";
|
|
4
4
|
import type { AnalyticsData, TokenUsage } from "./analytics.js";
|
|
5
|
-
import type { EvaluationData } from "./evaluation.js";
|
|
6
|
-
import type { ChatMessage, ConversationMemoryConfig } from "./conversation.js";
|
|
7
|
-
import type { MiddlewareFactoryOptions } from "./middlewareTypes.js";
|
|
8
5
|
import type { JsonValue } from "./common.js";
|
|
9
6
|
import type { Content, ImageWithAltText } from "./content.js";
|
|
7
|
+
import type { ChatMessage, ConversationMemoryConfig } from "./conversation.js";
|
|
8
|
+
import type { EvaluationData } from "./evaluation.js";
|
|
9
|
+
import type { MiddlewareFactoryOptions } from "./middlewareTypes.js";
|
|
10
|
+
import type { VideoGenerationResult, VideoOutputOptions } from "./multimodal.js";
|
|
11
|
+
import type { PPTGenerationResult, PPTOutputOptions } from "./pptTypes.js";
|
|
10
12
|
import type { TTSOptions, TTSResult } from "./ttsTypes.js";
|
|
11
|
-
import type {
|
|
12
|
-
import type { VideoOutputOptions, VideoGenerationResult } from "./multimodal.js";
|
|
13
|
+
import type { StandardRecord, ValidationSchema, ZodUnknownSchema } from "./typeAliases.js";
|
|
13
14
|
/**
|
|
14
15
|
* Generate function options type - Primary method for content generation
|
|
15
16
|
* Supports multimodal content while maintaining backward compatibility
|
|
@@ -257,6 +258,39 @@ export type GenerateOptions = {
|
|
|
257
258
|
enableProgress?: boolean;
|
|
258
259
|
fallbackToGenerate?: boolean;
|
|
259
260
|
};
|
|
261
|
+
/**
|
|
262
|
+
* RAG (Retrieval-Augmented Generation) configuration.
|
|
263
|
+
*
|
|
264
|
+
* When provided, NeuroLink automatically loads the specified files, chunks them,
|
|
265
|
+
* generates embeddings, and creates a search tool that the AI model can invoke
|
|
266
|
+
* on demand to find relevant context before answering.
|
|
267
|
+
*
|
|
268
|
+
* @example Basic RAG
|
|
269
|
+
* ```typescript
|
|
270
|
+
* const result = await neurolink.generate({
|
|
271
|
+
* input: { text: "What is RAG?" },
|
|
272
|
+
* provider: "vertex",
|
|
273
|
+
* rag: {
|
|
274
|
+
* files: ["./docs/guide.md"],
|
|
275
|
+
* }
|
|
276
|
+
* });
|
|
277
|
+
* ```
|
|
278
|
+
*
|
|
279
|
+
* @example Advanced RAG with options
|
|
280
|
+
* ```typescript
|
|
281
|
+
* const result = await neurolink.generate({
|
|
282
|
+
* input: { text: "Explain chunking strategies" },
|
|
283
|
+
* provider: "vertex",
|
|
284
|
+
* rag: {
|
|
285
|
+
* files: ["./docs/guide.md", "./docs/api.md"],
|
|
286
|
+
* strategy: "markdown",
|
|
287
|
+
* chunkSize: 512,
|
|
288
|
+
* topK: 5,
|
|
289
|
+
* }
|
|
290
|
+
* });
|
|
291
|
+
* ```
|
|
292
|
+
*/
|
|
293
|
+
rag?: RAGConfig;
|
|
260
294
|
};
|
|
261
295
|
/**
|
|
262
296
|
* Generate function result type - Primary output format
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Centralized type exports for NeuroLink
|
|
3
3
|
*/
|
|
4
|
-
export * from "./common.js";
|
|
5
4
|
export { AIProviderName } from "../constants/enums.js";
|
|
6
|
-
export type { ZodUnknownSchema, ValidationSchema, OptionalValidationSchema, StandardRecord, OptionalStandardRecord, } from "./typeAliases.js";
|
|
7
|
-
export * from "./tools.js";
|
|
8
|
-
export * from "./providers.js";
|
|
9
5
|
export * from "./cli.js";
|
|
6
|
+
export * from "./common.js";
|
|
7
|
+
export type { AnalyticsConfig, BackupInfo, BackupMetadata, CacheConfig, ConfigUpdateOptions, ConfigValidationResult, FallbackConfig, NeuroLinkConfig, PerformanceConfig, RetryConfig, ToolConfig, } from "./configTypes.js";
|
|
8
|
+
export type { ExternalMCPConfigValidation, ExternalMCPManagerConfig, ExternalMCPOperationResult, ExternalMCPServerEvents, ExternalMCPServerHealth, ExternalMCPServerInstance, ExternalMCPServerStatus, ExternalMCPToolContext, ExternalMCPToolInfo, ExternalMCPToolResult, } from "./externalMcp.js";
|
|
9
|
+
export type { AuthorizationUrlResult, CircuitBreakerConfig, CircuitBreakerEvents, CircuitBreakerState, CircuitBreakerStats, DiscoveredMcp, ExternalToolExecutionOptions, FlexibleValidationResult, HTTPRetryConfig, MCPClientResult, MCPConnectedServer, MCPDiscoveredServer, MCPExecutableTool, MCPOAuthConfig, MCPServerCategory, MCPServerConfig, MCPServerConnectionStatus, MCPServerMetadata, MCPServerRegistryEntry, MCPServerStatus, MCPToolInfo, MCPToolMetadata, MCPTransportType, McpMetadata, McpRegistry, NeuroLinkExecutionContext, NeuroLinkMCPServer, NeuroLinkMCPTool, OAuthClientInformation, OAuthTokens, RateLimitConfig, TokenBucketRateLimitConfig, TokenExchangeRequest, TokenStorage, ToolDiscoveryResult, ToolRegistryEvents, ToolValidationResult, } from "./mcpTypes.js";
|
|
10
|
+
export type { ModelCapability, ModelFilter, ModelPricing, ModelResolutionContext, ModelStats, ModelUseCase, } from "./providers.js";
|
|
11
|
+
export * from "./providers.js";
|
|
10
12
|
export * from "./taskClassificationTypes.js";
|
|
11
|
-
export
|
|
12
|
-
export type {
|
|
13
|
-
export type {
|
|
14
|
-
export
|
|
15
|
-
export type {
|
|
16
|
-
export type {
|
|
17
|
-
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
ToolCallResults, ToolCalls, StreamOptions, StreamingOptions, StreamResult, EnhancedStreamProvider, } from "./streamTypes.js";
|
|
21
|
-
export type { TokenUsage, ErrorInfo as AnalyticsErrorInfo, // Renamed to avoid conflict with common.js ErrorInfo
|
|
22
|
-
AnalyticsData, StreamAnalyticsData, PerformanceMetrics, } from "./analytics.js";
|
|
13
|
+
export * from "./tools.js";
|
|
14
|
+
export type { OptionalStandardRecord, OptionalValidationSchema, StandardRecord, ValidationSchema, ZodUnknownSchema, } from "./typeAliases.js";
|
|
15
|
+
export type { BatchProcessingSummary, ExcelWorksheet, FailedFileInfo, FileInfo, FileProcessingError, FileProcessingResult as ProcessorFileResult, FileProcessorConfig, FileWarning, JsonTypeGuard, OperationResult, ProcessedConfig, ProcessedExcel, ProcessedFileBase, ProcessedFileInfo, ProcessedHtml, ProcessedJson, ProcessedMarkdown, ProcessedOpenDocument, ProcessedRtf, ProcessedSourceCode, ProcessedSvg, ProcessedText, ProcessedWord, ProcessedYaml, ProcessOptions, ProcessorInfo, ProcessorMatch, ProcessorPriorityKey, ProcessorPriorityValue, RegistryOptions, RegistryProcessResult, RetryConfig as ProcessorRetryConfig, SkippedFileInfo, UnsupportedFileError, } from "../processors/base/types.js";
|
|
16
|
+
export { PROCESSOR_PRIORITIES } from "../processors/base/types.js";
|
|
17
|
+
export type { ActionAWSConfig, ActionCommentResult, ActionEvaluation, ActionExecutionResult, ActionGoogleCloudConfig, ActionInputs, ActionInputValidation, ActionMultimodalInputs, ActionOutput, ActionProviderKeys, ActionThinkingConfig, ActionTokenUsage, CliAnalytics, CliEvaluation, CliResponse, CliTokenUsage, ProviderKeyMapping, } from "./actionTypes.js";
|
|
18
|
+
export type { AnalyticsData, ErrorInfo as AnalyticsErrorInfo, // Renamed to avoid conflict with common.js ErrorInfo
|
|
19
|
+
PerformanceMetrics, StreamAnalyticsData, TokenUsage, } from "./analytics.js";
|
|
20
|
+
export * from "./content.js";
|
|
21
|
+
export type { DomainConfig, DomainConfigOptions, DomainEvaluationCriteria, DomainTemplate, DomainType, DomainValidationRule, } from "./domainTypes.js";
|
|
23
22
|
export * from "./evaluation.js";
|
|
24
|
-
export * from "./modelTypes.js";
|
|
25
|
-
export * from "./serviceTypes.js";
|
|
26
23
|
export * from "./evaluationProviders.js";
|
|
27
|
-
export * from "./sdkTypes.js";
|
|
28
|
-
export * from "./utilities.js";
|
|
29
|
-
export * from "./middlewareTypes.js";
|
|
30
24
|
export * from "./fileTypes.js";
|
|
31
|
-
export
|
|
32
|
-
|
|
25
|
+
export type { EnhancedGenerateResult, EnhancedProvider, FactoryEnhancedProvider, GenerateOptions, GenerateResult as GenerateApiResult, // Renamed to avoid conflict with cli.js GenerateResult
|
|
26
|
+
TextGenerationOptions, TextGenerationResult, UnifiedGenerationOptions, } from "./generateTypes.js";
|
|
33
27
|
export * from "./hitlTypes.js";
|
|
34
|
-
export
|
|
28
|
+
export * from "./middlewareTypes.js";
|
|
29
|
+
export * from "./modelTypes.js";
|
|
30
|
+
export * from "./sdkTypes.js";
|
|
31
|
+
export * from "./serviceTypes.js";
|
|
32
|
+
export type { EnhancedStreamProvider, ProgressCallback, StreamingMetadata, StreamingOptions, StreamingProgressData, StreamOptions, StreamResult, ToolCall as StreamToolCall, // Renamed to avoid conflict with tools.js ToolCall
|
|
33
|
+
ToolCallResults, ToolCalls, ToolResult as StreamToolResult, } from "./streamTypes.js";
|
|
34
|
+
export * from "./ttsTypes.js";
|
|
35
|
+
export * from "./utilities.js";
|
package/dist/types/index.js
CHANGED
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Centralized type exports for NeuroLink
|
|
3
3
|
*/
|
|
4
|
-
// Common utility types
|
|
5
|
-
export * from "./common.js";
|
|
6
4
|
// Constants and enums
|
|
7
5
|
export { AIProviderName } from "../constants/enums.js";
|
|
8
|
-
// Tool system types
|
|
9
|
-
export * from "./tools.js";
|
|
10
|
-
// Provider types
|
|
11
|
-
export * from "./providers.js";
|
|
12
6
|
// CLI types
|
|
13
7
|
export * from "./cli.js";
|
|
8
|
+
// Common utility types
|
|
9
|
+
export * from "./common.js";
|
|
10
|
+
// Provider types
|
|
11
|
+
export * from "./providers.js";
|
|
14
12
|
// Task classification types
|
|
15
13
|
export * from "./taskClassificationTypes.js";
|
|
14
|
+
// Tool system types
|
|
15
|
+
export * from "./tools.js";
|
|
16
|
+
export { PROCESSOR_PRIORITIES } from "../processors/base/types.js";
|
|
17
|
+
// Content types for multimodal support (includes multimodal re-exports for backward compatibility)
|
|
18
|
+
export * from "./content.js";
|
|
16
19
|
// Evaluation types - NEW
|
|
17
20
|
export * from "./evaluation.js";
|
|
18
|
-
// Model types - NEW
|
|
19
|
-
export * from "./modelTypes.js";
|
|
20
|
-
// Service types - NEW
|
|
21
|
-
export * from "./serviceTypes.js";
|
|
22
21
|
// Evaluation provider types - NEW
|
|
23
22
|
export * from "./evaluationProviders.js";
|
|
23
|
+
// File detection and processing types
|
|
24
|
+
export * from "./fileTypes.js";
|
|
25
|
+
// HITL (Human-in-the-Loop) types
|
|
26
|
+
export * from "./hitlTypes.js";
|
|
27
|
+
// Middleware Types - Middleware system types
|
|
28
|
+
export * from "./middlewareTypes.js";
|
|
29
|
+
// Model types - NEW
|
|
30
|
+
export * from "./modelTypes.js";
|
|
24
31
|
// SDK Types - Core types for external developers
|
|
25
32
|
// Note: sdkTypes.ts uses selective re-exports internally, so we use wildcard here
|
|
26
33
|
// The conflicts were from generateTypes and analytics which are now handled above
|
|
27
34
|
export * from "./sdkTypes.js";
|
|
28
|
-
//
|
|
29
|
-
export * from "./
|
|
30
|
-
// Middleware Types - Middleware system types
|
|
31
|
-
export * from "./middlewareTypes.js";
|
|
32
|
-
// File detection and processing types
|
|
33
|
-
export * from "./fileTypes.js";
|
|
34
|
-
// Content types for multimodal support (includes multimodal re-exports for backward compatibility)
|
|
35
|
-
export * from "./content.js";
|
|
35
|
+
// Service types - NEW
|
|
36
|
+
export * from "./serviceTypes.js";
|
|
36
37
|
// TTS (Text-to-Speech) types
|
|
37
38
|
export * from "./ttsTypes.js";
|
|
38
|
-
//
|
|
39
|
-
export * from "./
|
|
39
|
+
// Utilities Types - Utility module types (selective export to avoid conflicts)
|
|
40
|
+
export * from "./utilities.js";
|
|
@@ -88,8 +88,8 @@ export declare const ModelConfigSchema: z.ZodObject<{
|
|
|
88
88
|
contextWindow: z.ZodNumber;
|
|
89
89
|
releaseDate: z.ZodString;
|
|
90
90
|
}, "strip", z.ZodTypeAny, {
|
|
91
|
-
capabilities: string[];
|
|
92
91
|
id: string;
|
|
92
|
+
capabilities: string[];
|
|
93
93
|
displayName: string;
|
|
94
94
|
deprecated: boolean;
|
|
95
95
|
pricing: {
|
|
@@ -99,8 +99,8 @@ export declare const ModelConfigSchema: z.ZodObject<{
|
|
|
99
99
|
contextWindow: number;
|
|
100
100
|
releaseDate: string;
|
|
101
101
|
}, {
|
|
102
|
-
capabilities: string[];
|
|
103
102
|
id: string;
|
|
103
|
+
capabilities: string[];
|
|
104
104
|
displayName: string;
|
|
105
105
|
deprecated: boolean;
|
|
106
106
|
pricing: {
|
|
@@ -134,8 +134,8 @@ export declare const ModelRegistrySchema: z.ZodObject<{
|
|
|
134
134
|
contextWindow: z.ZodNumber;
|
|
135
135
|
releaseDate: z.ZodString;
|
|
136
136
|
}, "strip", z.ZodTypeAny, {
|
|
137
|
-
capabilities: string[];
|
|
138
137
|
id: string;
|
|
138
|
+
capabilities: string[];
|
|
139
139
|
displayName: string;
|
|
140
140
|
deprecated: boolean;
|
|
141
141
|
pricing: {
|
|
@@ -145,8 +145,8 @@ export declare const ModelRegistrySchema: z.ZodObject<{
|
|
|
145
145
|
contextWindow: number;
|
|
146
146
|
releaseDate: string;
|
|
147
147
|
}, {
|
|
148
|
-
capabilities: string[];
|
|
149
148
|
id: string;
|
|
149
|
+
capabilities: string[];
|
|
150
150
|
displayName: string;
|
|
151
151
|
deprecated: boolean;
|
|
152
152
|
pricing: {
|
|
@@ -159,11 +159,9 @@ export declare const ModelRegistrySchema: z.ZodObject<{
|
|
|
159
159
|
aliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
160
160
|
defaults: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
161
161
|
}, "strip", z.ZodTypeAny, {
|
|
162
|
-
version: string;
|
|
163
|
-
lastUpdated: string;
|
|
164
162
|
models: Record<string, Record<string, {
|
|
165
|
-
capabilities: string[];
|
|
166
163
|
id: string;
|
|
164
|
+
capabilities: string[];
|
|
167
165
|
displayName: string;
|
|
168
166
|
deprecated: boolean;
|
|
169
167
|
pricing: {
|
|
@@ -173,14 +171,14 @@ export declare const ModelRegistrySchema: z.ZodObject<{
|
|
|
173
171
|
contextWindow: number;
|
|
174
172
|
releaseDate: string;
|
|
175
173
|
}>>;
|
|
174
|
+
version: string;
|
|
175
|
+
lastUpdated: string;
|
|
176
176
|
aliases?: Record<string, string> | undefined;
|
|
177
177
|
defaults?: Record<string, string> | undefined;
|
|
178
178
|
}, {
|
|
179
|
-
version: string;
|
|
180
|
-
lastUpdated: string;
|
|
181
179
|
models: Record<string, Record<string, {
|
|
182
|
-
capabilities: string[];
|
|
183
180
|
id: string;
|
|
181
|
+
capabilities: string[];
|
|
184
182
|
displayName: string;
|
|
185
183
|
deprecated: boolean;
|
|
186
184
|
pricing: {
|
|
@@ -190,6 +188,8 @@ export declare const ModelRegistrySchema: z.ZodObject<{
|
|
|
190
188
|
contextWindow: number;
|
|
191
189
|
releaseDate: string;
|
|
192
190
|
}>>;
|
|
191
|
+
version: string;
|
|
192
|
+
lastUpdated: string;
|
|
193
193
|
aliases?: Record<string, string> | undefined;
|
|
194
194
|
defaults?: Record<string, string> | undefined;
|
|
195
195
|
}>;
|
package/dist/types/pptTypes.d.ts
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
* - CompleteSlide / PPTGenerationContext: Generation context types
|
|
11
11
|
* - PPTError: Error handling (follows VideoError pattern)
|
|
12
12
|
*/
|
|
13
|
-
import type {
|
|
13
|
+
import type { NeuroLink } from "../neurolink.js";
|
|
14
14
|
import { NeuroLinkError } from "../utils/errorHandling.js";
|
|
15
|
+
import type { ImageWithAltText } from "./content.js";
|
|
15
16
|
import type { AIProvider } from "./providers.js";
|
|
16
|
-
import type { NeuroLink } from "../neurolink.js";
|
|
17
17
|
export type ThemeOption = "modern" | "corporate" | "creative" | "minimal" | "dark";
|
|
18
18
|
export type AudienceOption = "business" | "students" | "technical" | "general";
|
|
19
19
|
export type ToneOption = "professional" | "casual" | "educational" | "persuasive";
|
|
@@ -681,11 +681,23 @@ export type CompleteSlide = {
|
|
|
681
681
|
};
|
|
682
682
|
generationTime: number;
|
|
683
683
|
};
|
|
684
|
+
/** Minimum number of slides allowed */
|
|
685
|
+
export declare const MIN_SLIDES = 5;
|
|
686
|
+
/** Maximum number of slides allowed */
|
|
687
|
+
export declare const MAX_SLIDES = 50;
|
|
684
688
|
/** Slide dimensions in inches by aspect ratio */
|
|
685
689
|
export declare const SLIDE_DIMENSIONS: Record<AspectRatioOption, {
|
|
686
690
|
width: number;
|
|
687
691
|
height: number;
|
|
688
692
|
}>;
|
|
693
|
+
/**
|
|
694
|
+
* Validate a hex color string (6 hex characters, no # prefix).
|
|
695
|
+
*/
|
|
696
|
+
export declare function isValidHexColor(color: string): boolean;
|
|
697
|
+
/**
|
|
698
|
+
* Normalize a hex color by stripping leading # if present.
|
|
699
|
+
*/
|
|
700
|
+
export declare function normalizeHexColor(color: string): string;
|
|
689
701
|
/**
|
|
690
702
|
* Text properties for addText method
|
|
691
703
|
* Represents individual text items with formatting options
|
package/dist/types/pptTypes.js
CHANGED
|
@@ -59,8 +59,24 @@ export class PPTError extends NeuroLinkError {
|
|
|
59
59
|
// ============================================================================
|
|
60
60
|
// VALIDATION CONSTANTS
|
|
61
61
|
// ============================================================================
|
|
62
|
+
/** Minimum number of slides allowed */
|
|
63
|
+
export const MIN_SLIDES = 5;
|
|
64
|
+
/** Maximum number of slides allowed */
|
|
65
|
+
export const MAX_SLIDES = 50;
|
|
62
66
|
/** Slide dimensions in inches by aspect ratio */
|
|
63
67
|
export const SLIDE_DIMENSIONS = {
|
|
64
68
|
"16:9": { width: 10, height: 5.625 },
|
|
65
69
|
"4:3": { width: 10, height: 7.5 },
|
|
66
70
|
};
|
|
71
|
+
/**
|
|
72
|
+
* Validate a hex color string (6 hex characters, no # prefix).
|
|
73
|
+
*/
|
|
74
|
+
export function isValidHexColor(color) {
|
|
75
|
+
return /^[0-9A-Fa-f]{6}$/.test(color);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Normalize a hex color by stripping leading # if present.
|
|
79
|
+
*/
|
|
80
|
+
export function normalizeHexColor(color) {
|
|
81
|
+
return color.startsWith("#") ? color.slice(1) : color;
|
|
82
|
+
}
|