@retrivora-ai/rag-engine 1.9.6 → 1.9.8
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/README.md +130 -113
- package/dist/{ILLMProvider-DNhyOYoK.d.mts → ILLMProvider-B8ROITYK.d.mts} +59 -8
- package/dist/{ILLMProvider-DNhyOYoK.d.ts → ILLMProvider-B8ROITYK.d.ts} +59 -8
- package/dist/handlers/index.d.mts +2 -2
- package/dist/handlers/index.d.ts +2 -2
- package/dist/handlers/index.js +2376 -489
- package/dist/handlers/index.mjs +2372 -489
- package/dist/{index-CjQdL0cX.d.ts → index-B8PbEFSY.d.mts} +17 -3
- package/dist/{index-CHL1jdYm.d.mts → index-BCPKUAVL.d.ts} +33 -41
- package/dist/{index-Hgbwl9X4.d.ts → index-CrxCy36A.d.mts} +33 -41
- package/dist/{index-C9v7-tWd.d.mts → index-DNvoi-sV.d.ts} +17 -3
- package/dist/index.css +695 -203
- package/dist/index.d.mts +37 -7
- package/dist/index.d.ts +37 -7
- package/dist/index.js +1197 -286
- package/dist/index.mjs +1221 -297
- package/dist/server.d.mts +62 -6
- package/dist/server.d.ts +62 -6
- package/dist/server.js +2526 -574
- package/dist/server.mjs +2517 -573
- package/package.json +12 -10
- package/src/app/constants.tsx +207 -212
- package/src/app/layout.tsx +4 -28
- package/src/app/types.ts +17 -17
- package/src/components/AmbientBackground.tsx +10 -10
- package/src/components/ArchitectureCard.tsx +43 -7
- package/src/components/ArchitectureCardsSection.tsx +37 -4
- package/src/components/ChatWidget.tsx +4 -1
- package/src/components/ChatWindow.tsx +9 -2
- package/src/components/CodeViewer.tsx +19 -14
- package/src/components/DocViewer.tsx +75 -15
- package/src/components/Documentation.tsx +111 -28
- package/src/components/Hero.tsx +103 -20
- package/src/components/Lifecycle.tsx +65 -25
- package/src/components/MarkdownComponents.tsx +44 -1
- package/src/components/MessageBubble.tsx +162 -50
- package/src/components/constants.tsx +279 -0
- package/src/config/RagConfig.ts +56 -10
- package/src/config/constants.ts +5 -0
- package/src/config/serverConfig.ts +15 -0
- package/src/core/ConfigResolver.ts +30 -25
- package/src/core/DatabaseStorage.ts +469 -0
- package/src/core/LicenseVerifier.ts +154 -0
- package/src/core/MultiAgentCoordinator.ts +239 -0
- package/src/core/Pipeline.ts +148 -16
- package/src/core/ProviderRegistry.ts +5 -5
- package/src/core/Retrivora.ts +52 -6
- package/src/core/VectorPlugin.ts +74 -11
- package/src/core/mcp.ts +261 -0
- package/src/exceptions/index.ts +52 -0
- package/src/handlers/index.ts +504 -47
- package/src/hooks/useRagChat.ts +100 -43
- package/src/hooks/useStoredMessages.ts +15 -4
- package/src/index.ts +7 -0
- package/src/llm/LLMFactory.ts +15 -6
- package/src/llm/providers/GroqProvider.ts +176 -0
- package/src/llm/providers/QwenProvider.ts +191 -0
- package/src/server.ts +23 -13
- package/src/types/chat.ts +16 -0
- package/src/types/props.ts +50 -1
- package/.env.example +0 -80
- package/LICENSE.txt +0 -21
package/dist/server.d.mts
CHANGED
|
@@ -1,10 +1,31 @@
|
|
|
1
|
-
import { p as VectorDBConfig, L as LLMConfig, e as EmbeddingConfig, k as RagConfig, n as UniversalRagConfig, o as UpsertDocument, V as VectorMatch, G as GraphDBConfig, r as GraphNode, s as Edge, t as GraphSearchResult, I as ILLMProvider, q as VectorDBProvider, h as LLMProvider, f as EmbeddingProvider, j as RAGConfig, U as UIConfig, C as ChatMessage, c as ChatOptions, E as EmbedOptions } from './ILLMProvider-
|
|
2
|
-
export { d as ChatResponse, g as IngestDocument, l as RetrievalConfig, W as WorkflowConfig } from './ILLMProvider-
|
|
3
|
-
export { A as AuthenticationException, C as Chunk, a as ChunkOptions, b as ConfigurationException, D as DocumentChunker, E as EmbeddingFailedException, g as Pipeline, P as ProviderNotFoundException, R as RateLimitException, c as RetrievalException, d as Retrivora, e as RetrivoraError, f as RetrivoraErrorCode } from './index-
|
|
4
|
-
import { H as HealthCheckResult, I as IProviderValidator, a as IProviderHealthChecker } from './index-
|
|
5
|
-
export { C as ConfigValidator, V as ValidationError, b as VectorPlugin, c as createChatHandler, d as
|
|
1
|
+
import { p as VectorDBConfig, L as LLMConfig, e as EmbeddingConfig, k as RagConfig, n as UniversalRagConfig, o as UpsertDocument, V as VectorMatch, G as GraphDBConfig, r as GraphNode, s as Edge, t as GraphSearchResult, I as ILLMProvider, q as VectorDBProvider, h as LLMProvider, f as EmbeddingProvider, j as RAGConfig, U as UIConfig, C as ChatMessage, c as ChatOptions, E as EmbedOptions } from './ILLMProvider-B8ROITYK.mjs';
|
|
2
|
+
export { d as ChatResponse, g as IngestDocument, l as RetrievalConfig, W as WorkflowConfig } from './ILLMProvider-B8ROITYK.mjs';
|
|
3
|
+
export { A as AuthenticationException, C as Chunk, a as ChunkOptions, b as ConfigurationException, D as DocumentChunker, E as EmbeddingFailedException, g as Pipeline, P as ProviderNotFoundException, R as RateLimitException, c as RetrievalException, d as Retrivora, e as RetrivoraError, f as RetrivoraErrorCode, w as wrapError } from './index-B8PbEFSY.mjs';
|
|
4
|
+
import { H as HealthCheckResult, I as IProviderValidator, a as IProviderHealthChecker } from './index-CrxCy36A.mjs';
|
|
5
|
+
export { C as ConfigValidator, V as ValidationError, b as VectorPlugin, c as createChatHandler, d as createFeedbackHandler, e as createHealthHandler, f as createHistoryHandler, g as createIngestHandler, h as createRagHandler, i as createSessionsHandler, j as createStreamHandler, k as createUploadHandler, s as sseErrorFrame, l as sseFrame, m as sseMetaFrame, n as sseTextFrame } from './index-CrxCy36A.mjs';
|
|
6
6
|
import 'next/server';
|
|
7
7
|
|
|
8
|
+
interface LicensePayload {
|
|
9
|
+
projectId: string;
|
|
10
|
+
expiresAt: number;
|
|
11
|
+
tier: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* LicenseVerifier — handles cryptographic validation of signed JWT license keys.
|
|
15
|
+
* Enables zero-latency local license validation without external network calls.
|
|
16
|
+
*/
|
|
17
|
+
declare class LicenseVerifier {
|
|
18
|
+
private static readonly PUBLIC_KEY;
|
|
19
|
+
/**
|
|
20
|
+
* Decodes, verifies signature, and checks metadata of a license key.
|
|
21
|
+
*
|
|
22
|
+
* @param licenseKey - Base64url signed JWT license key.
|
|
23
|
+
* @param currentProjectId - Project namespace ID.
|
|
24
|
+
* @param publicKeyOverride - Optional override for unit/integration tests.
|
|
25
|
+
*/
|
|
26
|
+
static verify(licenseKey: string | undefined, currentProjectId: string, provider?: string, publicKeyOverride?: string): LicensePayload;
|
|
27
|
+
}
|
|
28
|
+
|
|
8
29
|
/**
|
|
9
30
|
* BatchProcessor.ts — Handles batch operations with retry logic.
|
|
10
31
|
*
|
|
@@ -901,6 +922,41 @@ declare class OllamaProvider implements ILLMProvider {
|
|
|
901
922
|
ping(): Promise<boolean>;
|
|
902
923
|
}
|
|
903
924
|
|
|
925
|
+
/**
|
|
926
|
+
* Groq LLM Provider
|
|
927
|
+
*/
|
|
928
|
+
|
|
929
|
+
declare class GroqProvider implements ILLMProvider {
|
|
930
|
+
private readonly client;
|
|
931
|
+
private readonly llmConfig;
|
|
932
|
+
constructor(llmConfig: LLMConfig, embeddingConfig?: EmbeddingConfig);
|
|
933
|
+
static getValidator(): IProviderValidator;
|
|
934
|
+
static getHealthChecker(): IProviderHealthChecker;
|
|
935
|
+
chat(messages: ChatMessage[], context: string, options?: ChatOptions): Promise<string>;
|
|
936
|
+
chatStream(messages: ChatMessage[], context: string, options?: ChatOptions): AsyncIterable<string>;
|
|
937
|
+
embed(text: string, options?: EmbedOptions): Promise<number[]>;
|
|
938
|
+
batchEmbed(texts: string[], options?: EmbedOptions): Promise<number[][]>;
|
|
939
|
+
ping(): Promise<boolean>;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* Qwen LLM Provider (via Alibaba DashScope / ModelStudio compatible mode)
|
|
944
|
+
*/
|
|
945
|
+
|
|
946
|
+
declare class QwenProvider implements ILLMProvider {
|
|
947
|
+
private readonly client;
|
|
948
|
+
private readonly llmConfig;
|
|
949
|
+
private readonly embeddingConfig?;
|
|
950
|
+
constructor(llmConfig: LLMConfig, embeddingConfig?: EmbeddingConfig);
|
|
951
|
+
static getValidator(): IProviderValidator;
|
|
952
|
+
static getHealthChecker(): IProviderHealthChecker;
|
|
953
|
+
chat(messages: ChatMessage[], context: string, options?: ChatOptions): Promise<string>;
|
|
954
|
+
chatStream(messages: ChatMessage[], context: string, options?: ChatOptions): AsyncIterable<string>;
|
|
955
|
+
embed(text: string, options?: EmbedOptions): Promise<number[]>;
|
|
956
|
+
batchEmbed(texts: string[], options?: EmbedOptions): Promise<number[][]>;
|
|
957
|
+
ping(): Promise<boolean>;
|
|
958
|
+
}
|
|
959
|
+
|
|
904
960
|
declare class UniversalLLMAdapter implements ILLMProvider {
|
|
905
961
|
private readonly http;
|
|
906
962
|
private readonly model;
|
|
@@ -924,4 +980,4 @@ declare class UniversalLLMAdapter implements ILLMProvider {
|
|
|
924
980
|
ping(): Promise<boolean>;
|
|
925
981
|
}
|
|
926
982
|
|
|
927
|
-
export { AnthropicProvider, BaseVectorProvider, type BatchOptions, BatchProcessor, type BatchResult, ChatMessage, ChatOptions, ChromaDBProvider, ConfigBuilder, ConfigResolver, DocumentParser, EmbedOptions, EmbeddingConfig, EmbeddingProvider, EmbeddingStrategy, EmbeddingStrategyResolver, HealthCheckResult, ILLMProvider, IProviderHealthChecker, IProviderValidator, LLMConfig, LLMFactory, LLMProvider, LLM_PROFILES, MilvusProvider, MongoDBProvider, MultiTablePostgresProvider, OllamaProvider, OpenAIProvider, PRESETS, PineconeProvider, PostgreSQLProvider, ProviderHealthCheck, ProviderRegistry, QdrantProvider, RAGConfig, RagConfig, RedisProvider, UIConfig, UniversalLLMAdapter, UniversalRagConfig, UniversalVectorProvider, UpsertDocument, VECTOR_PROFILES, VectorDBConfig, VectorDBProvider, VectorMatch, WeaviateProvider, createFromPreset, getRagConfig };
|
|
983
|
+
export { AnthropicProvider, BaseVectorProvider, type BatchOptions, BatchProcessor, type BatchResult, ChatMessage, ChatOptions, ChromaDBProvider, ConfigBuilder, ConfigResolver, DocumentParser, EmbedOptions, EmbeddingConfig, EmbeddingProvider, EmbeddingStrategy, EmbeddingStrategyResolver, GroqProvider, HealthCheckResult, ILLMProvider, IProviderHealthChecker, IProviderValidator, LLMConfig, LLMFactory, LLMProvider, LLM_PROFILES, type LicensePayload, LicenseVerifier, MilvusProvider, MongoDBProvider, MultiTablePostgresProvider, OllamaProvider, OpenAIProvider, PRESETS, PineconeProvider, PostgreSQLProvider, ProviderHealthCheck, ProviderRegistry, QdrantProvider, QwenProvider, RAGConfig, RagConfig, RedisProvider, UIConfig, UniversalLLMAdapter, UniversalRagConfig, UniversalVectorProvider, UpsertDocument, VECTOR_PROFILES, VectorDBConfig, VectorDBProvider, VectorMatch, WeaviateProvider, createFromPreset, getRagConfig };
|
package/dist/server.d.ts
CHANGED
|
@@ -1,10 +1,31 @@
|
|
|
1
|
-
import { p as VectorDBConfig, L as LLMConfig, e as EmbeddingConfig, k as RagConfig, n as UniversalRagConfig, o as UpsertDocument, V as VectorMatch, G as GraphDBConfig, r as GraphNode, s as Edge, t as GraphSearchResult, I as ILLMProvider, q as VectorDBProvider, h as LLMProvider, f as EmbeddingProvider, j as RAGConfig, U as UIConfig, C as ChatMessage, c as ChatOptions, E as EmbedOptions } from './ILLMProvider-
|
|
2
|
-
export { d as ChatResponse, g as IngestDocument, l as RetrievalConfig, W as WorkflowConfig } from './ILLMProvider-
|
|
3
|
-
export { A as AuthenticationException, C as Chunk, a as ChunkOptions, b as ConfigurationException, D as DocumentChunker, E as EmbeddingFailedException, g as Pipeline, P as ProviderNotFoundException, R as RateLimitException, c as RetrievalException, d as Retrivora, e as RetrivoraError, f as RetrivoraErrorCode } from './index-
|
|
4
|
-
import { H as HealthCheckResult, I as IProviderValidator, a as IProviderHealthChecker } from './index-
|
|
5
|
-
export { C as ConfigValidator, V as ValidationError, b as VectorPlugin, c as createChatHandler, d as
|
|
1
|
+
import { p as VectorDBConfig, L as LLMConfig, e as EmbeddingConfig, k as RagConfig, n as UniversalRagConfig, o as UpsertDocument, V as VectorMatch, G as GraphDBConfig, r as GraphNode, s as Edge, t as GraphSearchResult, I as ILLMProvider, q as VectorDBProvider, h as LLMProvider, f as EmbeddingProvider, j as RAGConfig, U as UIConfig, C as ChatMessage, c as ChatOptions, E as EmbedOptions } from './ILLMProvider-B8ROITYK.js';
|
|
2
|
+
export { d as ChatResponse, g as IngestDocument, l as RetrievalConfig, W as WorkflowConfig } from './ILLMProvider-B8ROITYK.js';
|
|
3
|
+
export { A as AuthenticationException, C as Chunk, a as ChunkOptions, b as ConfigurationException, D as DocumentChunker, E as EmbeddingFailedException, g as Pipeline, P as ProviderNotFoundException, R as RateLimitException, c as RetrievalException, d as Retrivora, e as RetrivoraError, f as RetrivoraErrorCode, w as wrapError } from './index-DNvoi-sV.js';
|
|
4
|
+
import { H as HealthCheckResult, I as IProviderValidator, a as IProviderHealthChecker } from './index-BCPKUAVL.js';
|
|
5
|
+
export { C as ConfigValidator, V as ValidationError, b as VectorPlugin, c as createChatHandler, d as createFeedbackHandler, e as createHealthHandler, f as createHistoryHandler, g as createIngestHandler, h as createRagHandler, i as createSessionsHandler, j as createStreamHandler, k as createUploadHandler, s as sseErrorFrame, l as sseFrame, m as sseMetaFrame, n as sseTextFrame } from './index-BCPKUAVL.js';
|
|
6
6
|
import 'next/server';
|
|
7
7
|
|
|
8
|
+
interface LicensePayload {
|
|
9
|
+
projectId: string;
|
|
10
|
+
expiresAt: number;
|
|
11
|
+
tier: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* LicenseVerifier — handles cryptographic validation of signed JWT license keys.
|
|
15
|
+
* Enables zero-latency local license validation without external network calls.
|
|
16
|
+
*/
|
|
17
|
+
declare class LicenseVerifier {
|
|
18
|
+
private static readonly PUBLIC_KEY;
|
|
19
|
+
/**
|
|
20
|
+
* Decodes, verifies signature, and checks metadata of a license key.
|
|
21
|
+
*
|
|
22
|
+
* @param licenseKey - Base64url signed JWT license key.
|
|
23
|
+
* @param currentProjectId - Project namespace ID.
|
|
24
|
+
* @param publicKeyOverride - Optional override for unit/integration tests.
|
|
25
|
+
*/
|
|
26
|
+
static verify(licenseKey: string | undefined, currentProjectId: string, provider?: string, publicKeyOverride?: string): LicensePayload;
|
|
27
|
+
}
|
|
28
|
+
|
|
8
29
|
/**
|
|
9
30
|
* BatchProcessor.ts — Handles batch operations with retry logic.
|
|
10
31
|
*
|
|
@@ -901,6 +922,41 @@ declare class OllamaProvider implements ILLMProvider {
|
|
|
901
922
|
ping(): Promise<boolean>;
|
|
902
923
|
}
|
|
903
924
|
|
|
925
|
+
/**
|
|
926
|
+
* Groq LLM Provider
|
|
927
|
+
*/
|
|
928
|
+
|
|
929
|
+
declare class GroqProvider implements ILLMProvider {
|
|
930
|
+
private readonly client;
|
|
931
|
+
private readonly llmConfig;
|
|
932
|
+
constructor(llmConfig: LLMConfig, embeddingConfig?: EmbeddingConfig);
|
|
933
|
+
static getValidator(): IProviderValidator;
|
|
934
|
+
static getHealthChecker(): IProviderHealthChecker;
|
|
935
|
+
chat(messages: ChatMessage[], context: string, options?: ChatOptions): Promise<string>;
|
|
936
|
+
chatStream(messages: ChatMessage[], context: string, options?: ChatOptions): AsyncIterable<string>;
|
|
937
|
+
embed(text: string, options?: EmbedOptions): Promise<number[]>;
|
|
938
|
+
batchEmbed(texts: string[], options?: EmbedOptions): Promise<number[][]>;
|
|
939
|
+
ping(): Promise<boolean>;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* Qwen LLM Provider (via Alibaba DashScope / ModelStudio compatible mode)
|
|
944
|
+
*/
|
|
945
|
+
|
|
946
|
+
declare class QwenProvider implements ILLMProvider {
|
|
947
|
+
private readonly client;
|
|
948
|
+
private readonly llmConfig;
|
|
949
|
+
private readonly embeddingConfig?;
|
|
950
|
+
constructor(llmConfig: LLMConfig, embeddingConfig?: EmbeddingConfig);
|
|
951
|
+
static getValidator(): IProviderValidator;
|
|
952
|
+
static getHealthChecker(): IProviderHealthChecker;
|
|
953
|
+
chat(messages: ChatMessage[], context: string, options?: ChatOptions): Promise<string>;
|
|
954
|
+
chatStream(messages: ChatMessage[], context: string, options?: ChatOptions): AsyncIterable<string>;
|
|
955
|
+
embed(text: string, options?: EmbedOptions): Promise<number[]>;
|
|
956
|
+
batchEmbed(texts: string[], options?: EmbedOptions): Promise<number[][]>;
|
|
957
|
+
ping(): Promise<boolean>;
|
|
958
|
+
}
|
|
959
|
+
|
|
904
960
|
declare class UniversalLLMAdapter implements ILLMProvider {
|
|
905
961
|
private readonly http;
|
|
906
962
|
private readonly model;
|
|
@@ -924,4 +980,4 @@ declare class UniversalLLMAdapter implements ILLMProvider {
|
|
|
924
980
|
ping(): Promise<boolean>;
|
|
925
981
|
}
|
|
926
982
|
|
|
927
|
-
export { AnthropicProvider, BaseVectorProvider, type BatchOptions, BatchProcessor, type BatchResult, ChatMessage, ChatOptions, ChromaDBProvider, ConfigBuilder, ConfigResolver, DocumentParser, EmbedOptions, EmbeddingConfig, EmbeddingProvider, EmbeddingStrategy, EmbeddingStrategyResolver, HealthCheckResult, ILLMProvider, IProviderHealthChecker, IProviderValidator, LLMConfig, LLMFactory, LLMProvider, LLM_PROFILES, MilvusProvider, MongoDBProvider, MultiTablePostgresProvider, OllamaProvider, OpenAIProvider, PRESETS, PineconeProvider, PostgreSQLProvider, ProviderHealthCheck, ProviderRegistry, QdrantProvider, RAGConfig, RagConfig, RedisProvider, UIConfig, UniversalLLMAdapter, UniversalRagConfig, UniversalVectorProvider, UpsertDocument, VECTOR_PROFILES, VectorDBConfig, VectorDBProvider, VectorMatch, WeaviateProvider, createFromPreset, getRagConfig };
|
|
983
|
+
export { AnthropicProvider, BaseVectorProvider, type BatchOptions, BatchProcessor, type BatchResult, ChatMessage, ChatOptions, ChromaDBProvider, ConfigBuilder, ConfigResolver, DocumentParser, EmbedOptions, EmbeddingConfig, EmbeddingProvider, EmbeddingStrategy, EmbeddingStrategyResolver, GroqProvider, HealthCheckResult, ILLMProvider, IProviderHealthChecker, IProviderValidator, LLMConfig, LLMFactory, LLMProvider, LLM_PROFILES, type LicensePayload, LicenseVerifier, MilvusProvider, MongoDBProvider, MultiTablePostgresProvider, OllamaProvider, OpenAIProvider, PRESETS, PineconeProvider, PostgreSQLProvider, ProviderHealthCheck, ProviderRegistry, QdrantProvider, QwenProvider, RAGConfig, RagConfig, RedisProvider, UIConfig, UniversalLLMAdapter, UniversalRagConfig, UniversalVectorProvider, UpsertDocument, VECTOR_PROFILES, VectorDBConfig, VectorDBProvider, VectorMatch, WeaviateProvider, createFromPreset, getRagConfig };
|