@retrivora-ai/rag-engine 0.4.5 → 1.0.1

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.
Files changed (74) hide show
  1. package/README.md +32 -57
  2. package/dist/{ChromaDBProvider-GI7TB7GJ.mjs → ChromaDBProvider-MIDOR4FW.mjs} +2 -2
  3. package/dist/{DocumentChunker-3yElxTO3.d.mts → DocumentChunker-C-sCZPhi.d.mts} +6 -6
  4. package/dist/{DocumentChunker-3yElxTO3.d.ts → DocumentChunker-C-sCZPhi.d.ts} +6 -6
  5. package/dist/{MilvusProvider-WDVTFB7D.mjs → MilvusProvider-U7SKC27V.mjs} +2 -2
  6. package/dist/{MongoDBProvider-RE3Q5S5B.mjs → MongoDBProvider-Z6ALOVDN.mjs} +2 -2
  7. package/dist/{PineconeProvider-BE2JWSPD.mjs → PineconeProvider-QZNRKTN2.mjs} +2 -2
  8. package/dist/{PostgreSQLProvider-5HHTK4SU.mjs → PostgreSQLProvider-BMOETDZA.mjs} +2 -2
  9. package/dist/{QdrantProvider-XVDVBNIG.mjs → QdrantProvider-YNUNEOZH.mjs} +2 -2
  10. package/dist/{RagConfig-BgRDL9Vy.d.mts → RagConfig-DRJO4hGU.d.mts} +12 -1
  11. package/dist/{RagConfig-BgRDL9Vy.d.ts → RagConfig-DRJO4hGU.d.ts} +12 -1
  12. package/dist/{RedisProvider-EK2R2PQH.mjs → RedisProvider-SR65SCKV.mjs} +2 -2
  13. package/dist/{SimpleGraphProvider-M6T7SE7D.mjs → SimpleGraphProvider-SLOXO4M7.mjs} +1 -1
  14. package/dist/{UniversalVectorProvider-YIDRX6VT.mjs → UniversalVectorProvider-IN67OS56.mjs} +3 -3
  15. package/dist/{WeaviateProvider-4CAPQ7UY.mjs → WeaviateProvider-5FWDFITI.mjs} +2 -2
  16. package/dist/{chunk-5KNBWQM6.mjs → chunk-3DSHW676.mjs} +5 -1
  17. package/dist/{chunk-PRC5CZIZ.mjs → chunk-5W2YWFT3.mjs} +1248 -1361
  18. package/dist/{chunk-H6RKMU7W.mjs → chunk-5YGUXK7Z.mjs} +1 -1
  19. package/dist/{chunk-PQKTC73Y.mjs → chunk-CD6TSNL4.mjs} +67 -6
  20. package/dist/{chunk-RK2UDJA2.mjs → chunk-CFVEZTBJ.mjs} +1 -1
  21. package/dist/{chunk-LJWWPTWE.mjs → chunk-FLOSGE6A.mjs} +76 -14
  22. package/dist/{chunk-GQT5LF4G.mjs → chunk-LR3VMDVK.mjs} +2 -2
  23. package/dist/{chunk-KTS3LLHY.mjs → chunk-M6JSPGAR.mjs} +5 -5
  24. package/dist/{chunk-3QWAK3RZ.mjs → chunk-U55XRW3U.mjs} +6 -2
  25. package/dist/{chunk-XCNXPECE.mjs → chunk-VUQJVIJT.mjs} +55 -1
  26. package/dist/chunk-X4TOT24V.mjs +89 -0
  27. package/dist/{chunk-EDLTMSNY.mjs → chunk-YLTMFW4M.mjs} +1 -1
  28. package/dist/handlers/index.d.mts +2 -2
  29. package/dist/handlers/index.d.ts +2 -2
  30. package/dist/handlers/index.js +1488 -1371
  31. package/dist/handlers/index.mjs +5 -3
  32. package/dist/index-B2mutkgp.d.ts +116 -0
  33. package/dist/index-Bjy0es5a.d.mts +116 -0
  34. package/dist/index.d.mts +17 -11
  35. package/dist/index.d.ts +17 -11
  36. package/dist/index.js +253 -363
  37. package/dist/index.mjs +243 -353
  38. package/dist/server.d.mts +108 -158
  39. package/dist/server.d.ts +108 -158
  40. package/dist/server.js +1452 -1386
  41. package/dist/server.mjs +12 -12
  42. package/package.json +5 -1
  43. package/src/config/RagConfig.ts +7 -0
  44. package/src/core/ConfigValidator.ts +66 -492
  45. package/src/core/LangChainAgent.ts +78 -0
  46. package/src/core/Pipeline.ts +210 -240
  47. package/src/core/ProviderHealthCheck.ts +35 -406
  48. package/src/core/ProviderInterfaces.ts +37 -0
  49. package/src/core/ProviderRegistry.ts +70 -55
  50. package/src/core/QueryProcessor.ts +173 -0
  51. package/src/core/VectorPlugin.ts +7 -0
  52. package/src/handlers/index.ts +45 -0
  53. package/src/llm/ILLMProvider.ts +10 -0
  54. package/src/llm/LLMFactory.ts +33 -13
  55. package/src/llm/providers/AnthropicProvider.ts +55 -15
  56. package/src/llm/providers/GeminiProvider.ts +51 -0
  57. package/src/llm/providers/OllamaProvider.ts +100 -15
  58. package/src/llm/providers/OpenAIProvider.ts +60 -11
  59. package/src/providers/vectordb/BaseVectorProvider.ts +11 -0
  60. package/src/providers/vectordb/MilvusProvider.ts +4 -0
  61. package/src/providers/vectordb/MongoDBProvider.ts +72 -8
  62. package/src/providers/vectordb/PineconeProvider.ts +60 -5
  63. package/src/providers/vectordb/PostgreSQLProvider.ts +84 -14
  64. package/src/providers/vectordb/QdrantProvider.ts +4 -0
  65. package/src/providers/vectordb/WeaviateProvider.ts +8 -4
  66. package/src/rag/DocumentChunker.ts +15 -19
  67. package/src/rag/EntityExtractor.ts +3 -0
  68. package/src/rag/LlamaIndexIngestor.ts +61 -0
  69. package/src/rag/Reranker.ts +20 -0
  70. package/src/server.ts +1 -1
  71. package/src/types/index.ts +9 -0
  72. package/dist/chunk-FWCSY2DS.mjs +0 -37
  73. package/dist/index-7qeLTPBL.d.mts +0 -114
  74. package/dist/index-DowY4_K0.d.ts +0 -114
@@ -2,13 +2,15 @@ import {
2
2
  createChatHandler,
3
3
  createHealthHandler,
4
4
  createIngestHandler,
5
+ createStreamHandler,
5
6
  createUploadHandler
6
- } from "../chunk-PRC5CZIZ.mjs";
7
- import "../chunk-EDLTMSNY.mjs";
8
- import "../chunk-FWCSY2DS.mjs";
7
+ } from "../chunk-5W2YWFT3.mjs";
8
+ import "../chunk-YLTMFW4M.mjs";
9
+ import "../chunk-X4TOT24V.mjs";
9
10
  export {
10
11
  createChatHandler,
11
12
  createHealthHandler,
12
13
  createIngestHandler,
14
+ createStreamHandler,
13
15
  createUploadHandler
14
16
  };
@@ -0,0 +1,116 @@
1
+ import { c as RagConfig, C as ChatResponse } from './RagConfig-DRJO4hGU.js';
2
+ import { NextRequest, NextResponse } from 'next/server';
3
+
4
+ interface ValidationError {
5
+ field: string;
6
+ message: string;
7
+ suggestion?: string;
8
+ severity: 'error' | 'warning';
9
+ }
10
+ /**
11
+ * ConfigValidator.ts — Comprehensive configuration validation.
12
+ * Uses a pluggable architecture to delegate provider-specific checks.
13
+ */
14
+ declare class ConfigValidator {
15
+ /**
16
+ * Validates the entire RagConfig object.
17
+ */
18
+ static validate(config: RagConfig): Promise<ValidationError[]>;
19
+ private static validateVectorDbConfig;
20
+ private static validateLLMConfig;
21
+ private static validateEmbeddingConfig;
22
+ /**
23
+ * Temporary fallbacks for providers not yet migrated to the pluggable architecture.
24
+ */
25
+ private static fallbackVectorValidation;
26
+ private static fallbackLLMValidation;
27
+ private static fallbackEmbeddingValidation;
28
+ private static validateUIConfig;
29
+ private static validateRAGConfig;
30
+ private static isValidCSSColor;
31
+ static validateAndThrow(config: RagConfig): Promise<void>;
32
+ }
33
+
34
+ /**
35
+ * Interface for provider-specific configuration validation logic.
36
+ */
37
+ interface IProviderValidator {
38
+ /**
39
+ * Validates the configuration for a specific provider.
40
+ * @param config - The configuration object to validate.
41
+ * @returns An array of validation errors (empty if valid).
42
+ */
43
+ validate(config: Record<string, unknown>): ValidationError[];
44
+ }
45
+ /**
46
+ * Result of a provider health check.
47
+ */
48
+ interface HealthCheckResult {
49
+ healthy: boolean;
50
+ provider: string;
51
+ version?: string;
52
+ capabilities?: Record<string, unknown>;
53
+ error?: string;
54
+ timestamp: number;
55
+ }
56
+ /**
57
+ * Interface for provider-specific health checking logic.
58
+ */
59
+ interface IProviderHealthChecker {
60
+ /**
61
+ * Performs a health check for a specific provider.
62
+ * @param config - The configuration object used to connect to the provider.
63
+ * @returns A promise that resolves to the health check result.
64
+ */
65
+ check(config: Record<string, unknown>): Promise<HealthCheckResult>;
66
+ }
67
+
68
+ /**
69
+ * createChatHandler — factory that returns a Next.js App Router POST handler
70
+ */
71
+ declare function createChatHandler(config?: Partial<RagConfig>): (req: NextRequest) => Promise<NextResponse<{
72
+ error: string;
73
+ }> | NextResponse<ChatResponse>>;
74
+ /**
75
+ * createStreamHandler — factory that returns a streaming Next.js App Router POST handler
76
+ */
77
+ declare function createStreamHandler(config?: Partial<RagConfig>): (req: NextRequest) => Promise<Response>;
78
+ /**
79
+ * createIngestHandler — factory for the document ingestion endpoint.
80
+ */
81
+ declare function createIngestHandler(config?: Partial<RagConfig>): (req: NextRequest) => Promise<NextResponse<{
82
+ error: string;
83
+ }> | NextResponse<{
84
+ results: {
85
+ docId: string | number;
86
+ chunksIngested: number;
87
+ }[];
88
+ }>>;
89
+ /**
90
+ * createHealthHandler — factory for the health-check endpoint.
91
+ */
92
+ declare function createHealthHandler(config?: Partial<RagConfig>): () => Promise<NextResponse<{
93
+ timestamp: string;
94
+ vectorDb: HealthCheckResult;
95
+ llm: HealthCheckResult;
96
+ embedding?: HealthCheckResult;
97
+ allHealthy: boolean;
98
+ status: string;
99
+ }> | NextResponse<{
100
+ status: string;
101
+ error: string;
102
+ }>>;
103
+ /**
104
+ * createUploadHandler — factory for the file upload ingestion endpoint.
105
+ */
106
+ declare function createUploadHandler(config?: Partial<RagConfig>): (req: NextRequest) => Promise<NextResponse<{
107
+ error: string;
108
+ }> | NextResponse<{
109
+ message: string;
110
+ results: {
111
+ docId: string | number;
112
+ chunksIngested: number;
113
+ }[];
114
+ }>>;
115
+
116
+ export { ConfigValidator as C, type HealthCheckResult as H, type IProviderValidator as I, type ValidationError as V, type IProviderHealthChecker as a, createHealthHandler as b, createChatHandler as c, createIngestHandler as d, createUploadHandler as e, createStreamHandler as f };
@@ -0,0 +1,116 @@
1
+ import { c as RagConfig, C as ChatResponse } from './RagConfig-DRJO4hGU.mjs';
2
+ import { NextRequest, NextResponse } from 'next/server';
3
+
4
+ interface ValidationError {
5
+ field: string;
6
+ message: string;
7
+ suggestion?: string;
8
+ severity: 'error' | 'warning';
9
+ }
10
+ /**
11
+ * ConfigValidator.ts — Comprehensive configuration validation.
12
+ * Uses a pluggable architecture to delegate provider-specific checks.
13
+ */
14
+ declare class ConfigValidator {
15
+ /**
16
+ * Validates the entire RagConfig object.
17
+ */
18
+ static validate(config: RagConfig): Promise<ValidationError[]>;
19
+ private static validateVectorDbConfig;
20
+ private static validateLLMConfig;
21
+ private static validateEmbeddingConfig;
22
+ /**
23
+ * Temporary fallbacks for providers not yet migrated to the pluggable architecture.
24
+ */
25
+ private static fallbackVectorValidation;
26
+ private static fallbackLLMValidation;
27
+ private static fallbackEmbeddingValidation;
28
+ private static validateUIConfig;
29
+ private static validateRAGConfig;
30
+ private static isValidCSSColor;
31
+ static validateAndThrow(config: RagConfig): Promise<void>;
32
+ }
33
+
34
+ /**
35
+ * Interface for provider-specific configuration validation logic.
36
+ */
37
+ interface IProviderValidator {
38
+ /**
39
+ * Validates the configuration for a specific provider.
40
+ * @param config - The configuration object to validate.
41
+ * @returns An array of validation errors (empty if valid).
42
+ */
43
+ validate(config: Record<string, unknown>): ValidationError[];
44
+ }
45
+ /**
46
+ * Result of a provider health check.
47
+ */
48
+ interface HealthCheckResult {
49
+ healthy: boolean;
50
+ provider: string;
51
+ version?: string;
52
+ capabilities?: Record<string, unknown>;
53
+ error?: string;
54
+ timestamp: number;
55
+ }
56
+ /**
57
+ * Interface for provider-specific health checking logic.
58
+ */
59
+ interface IProviderHealthChecker {
60
+ /**
61
+ * Performs a health check for a specific provider.
62
+ * @param config - The configuration object used to connect to the provider.
63
+ * @returns A promise that resolves to the health check result.
64
+ */
65
+ check(config: Record<string, unknown>): Promise<HealthCheckResult>;
66
+ }
67
+
68
+ /**
69
+ * createChatHandler — factory that returns a Next.js App Router POST handler
70
+ */
71
+ declare function createChatHandler(config?: Partial<RagConfig>): (req: NextRequest) => Promise<NextResponse<{
72
+ error: string;
73
+ }> | NextResponse<ChatResponse>>;
74
+ /**
75
+ * createStreamHandler — factory that returns a streaming Next.js App Router POST handler
76
+ */
77
+ declare function createStreamHandler(config?: Partial<RagConfig>): (req: NextRequest) => Promise<Response>;
78
+ /**
79
+ * createIngestHandler — factory for the document ingestion endpoint.
80
+ */
81
+ declare function createIngestHandler(config?: Partial<RagConfig>): (req: NextRequest) => Promise<NextResponse<{
82
+ error: string;
83
+ }> | NextResponse<{
84
+ results: {
85
+ docId: string | number;
86
+ chunksIngested: number;
87
+ }[];
88
+ }>>;
89
+ /**
90
+ * createHealthHandler — factory for the health-check endpoint.
91
+ */
92
+ declare function createHealthHandler(config?: Partial<RagConfig>): () => Promise<NextResponse<{
93
+ timestamp: string;
94
+ vectorDb: HealthCheckResult;
95
+ llm: HealthCheckResult;
96
+ embedding?: HealthCheckResult;
97
+ allHealthy: boolean;
98
+ status: string;
99
+ }> | NextResponse<{
100
+ status: string;
101
+ error: string;
102
+ }>>;
103
+ /**
104
+ * createUploadHandler — factory for the file upload ingestion endpoint.
105
+ */
106
+ declare function createUploadHandler(config?: Partial<RagConfig>): (req: NextRequest) => Promise<NextResponse<{
107
+ error: string;
108
+ }> | NextResponse<{
109
+ message: string;
110
+ results: {
111
+ docId: string | number;
112
+ chunksIngested: number;
113
+ }[];
114
+ }>>;
115
+
116
+ export { ConfigValidator as C, type HealthCheckResult as H, type IProviderValidator as I, type ValidationError as V, type IProviderHealthChecker as a, createHealthHandler as b, createChatHandler as c, createIngestHandler as d, createUploadHandler as e, createStreamHandler as f };
package/dist/index.d.mts CHANGED
@@ -1,15 +1,14 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import React$1, { ReactNode } from 'react';
3
- import { C as ChatMessage } from './DocumentChunker-3yElxTO3.mjs';
4
- export { a as ChatOptions, b as Chunk, c as ChunkOptions, E as EmbedOptions, I as ILLMProvider } from './DocumentChunker-3yElxTO3.mjs';
5
- import { V as VectorMatch, U as UIConfig } from './RagConfig-BgRDL9Vy.mjs';
6
- export { C as ChatResponse, E as EmbeddingConfig, a as EmbeddingProvider, I as IngestDocument, L as LLMConfig, b as LLMProvider, R as RAGConfig, c as RagConfig, d as UpsertDocument, e as VectorDBConfig, f as VectorDBProvider } from './RagConfig-BgRDL9Vy.mjs';
2
+ import { C as ChatMessage } from './DocumentChunker-C-sCZPhi.mjs';
3
+ export { a as ChatOptions, b as Chunk, c as ChunkOptions, E as EmbedOptions, I as ILLMProvider } from './DocumentChunker-C-sCZPhi.mjs';
4
+ import { V as VectorMatch, U as UIConfig } from './RagConfig-DRJO4hGU.mjs';
5
+ export { C as ChatResponse, E as EmbeddingConfig, a as EmbeddingProvider, I as IngestDocument, L as LLMConfig, b as LLMProvider, R as RAGConfig, c as RagConfig, d as UpsertDocument, e as VectorDBConfig, f as VectorDBProvider } from './RagConfig-DRJO4hGU.mjs';
7
6
 
8
7
  interface ChatWidgetProps {
9
8
  /** Position of the floating button. Defaults to bottom-right. */
10
9
  position?: 'bottom-right' | 'bottom-left';
11
10
  }
12
- declare function ChatWidget({ position }: ChatWidgetProps): react_jsx_runtime.JSX.Element | null;
11
+ declare function ChatWidget({ position }: ChatWidgetProps): React$1.JSX.Element | null;
13
12
 
14
13
  interface ChatWindowProps {
15
14
  /** Additional className for the wrapper div */
@@ -21,7 +20,7 @@ interface ChatWindowProps {
21
20
  /** Whether to show a close (X) button in the header */
22
21
  showClose?: boolean;
23
22
  }
24
- declare function ChatWindow({ className, style, onClose, showClose }: ChatWindowProps): react_jsx_runtime.JSX.Element;
23
+ declare function ChatWindow({ className, style, onClose, showClose }: ChatWindowProps): React$1.JSX.Element;
25
24
 
26
25
  interface DocumentUploadProps {
27
26
  /** Optional namespace for the upload */
@@ -31,7 +30,7 @@ interface DocumentUploadProps {
31
30
  /** Additional className */
32
31
  className?: string;
33
32
  }
34
- declare function DocumentUpload({ namespace, onUploadComplete, className }: DocumentUploadProps): react_jsx_runtime.JSX.Element;
33
+ declare function DocumentUpload({ namespace, onUploadComplete, className }: DocumentUploadProps): React$1.JSX.Element;
35
34
 
36
35
  interface MessageBubbleProps {
37
36
  message: ChatMessage;
@@ -40,13 +39,20 @@ interface MessageBubbleProps {
40
39
  primaryColor?: string;
41
40
  accentColor?: string;
42
41
  }
43
- declare function MessageBubble({ message, sources, isStreaming, primaryColor, accentColor, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
42
+ declare function MessageBubble({ message, sources, isStreaming, primaryColor, accentColor, }: MessageBubbleProps): React$1.JSX.Element;
44
43
 
45
44
  interface SourceCardProps {
46
45
  source: VectorMatch;
47
46
  index: number;
48
47
  }
49
- declare function SourceCard({ source, index }: SourceCardProps): react_jsx_runtime.JSX.Element;
48
+ declare function SourceCard({ source, index }: SourceCardProps): React$1.JSX.Element;
49
+
50
+ /**
51
+ * ConfigProvider — React Context that makes RagConfig (UI subset) available
52
+ * to all child components without prop drilling.
53
+ *
54
+ * Only the UI-safe portions of RagConfig are exposed to the client.
55
+ */
50
56
 
51
57
  interface ClientConfig {
52
58
  projectId: string;
@@ -58,7 +64,7 @@ declare function ConfigProvider({ config, children, }: {
58
64
  ui?: Partial<UIConfig>;
59
65
  };
60
66
  children: ReactNode;
61
- }): react_jsx_runtime.JSX.Element;
67
+ }): React$1.JSX.Element;
62
68
  declare function useConfig(): ClientConfig;
63
69
 
64
70
  type MessageRole = 'user' | 'assistant';
package/dist/index.d.ts CHANGED
@@ -1,15 +1,14 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import React$1, { ReactNode } from 'react';
3
- import { C as ChatMessage } from './DocumentChunker-3yElxTO3.js';
4
- export { a as ChatOptions, b as Chunk, c as ChunkOptions, E as EmbedOptions, I as ILLMProvider } from './DocumentChunker-3yElxTO3.js';
5
- import { V as VectorMatch, U as UIConfig } from './RagConfig-BgRDL9Vy.js';
6
- export { C as ChatResponse, E as EmbeddingConfig, a as EmbeddingProvider, I as IngestDocument, L as LLMConfig, b as LLMProvider, R as RAGConfig, c as RagConfig, d as UpsertDocument, e as VectorDBConfig, f as VectorDBProvider } from './RagConfig-BgRDL9Vy.js';
2
+ import { C as ChatMessage } from './DocumentChunker-C-sCZPhi.js';
3
+ export { a as ChatOptions, b as Chunk, c as ChunkOptions, E as EmbedOptions, I as ILLMProvider } from './DocumentChunker-C-sCZPhi.js';
4
+ import { V as VectorMatch, U as UIConfig } from './RagConfig-DRJO4hGU.js';
5
+ export { C as ChatResponse, E as EmbeddingConfig, a as EmbeddingProvider, I as IngestDocument, L as LLMConfig, b as LLMProvider, R as RAGConfig, c as RagConfig, d as UpsertDocument, e as VectorDBConfig, f as VectorDBProvider } from './RagConfig-DRJO4hGU.js';
7
6
 
8
7
  interface ChatWidgetProps {
9
8
  /** Position of the floating button. Defaults to bottom-right. */
10
9
  position?: 'bottom-right' | 'bottom-left';
11
10
  }
12
- declare function ChatWidget({ position }: ChatWidgetProps): react_jsx_runtime.JSX.Element | null;
11
+ declare function ChatWidget({ position }: ChatWidgetProps): React$1.JSX.Element | null;
13
12
 
14
13
  interface ChatWindowProps {
15
14
  /** Additional className for the wrapper div */
@@ -21,7 +20,7 @@ interface ChatWindowProps {
21
20
  /** Whether to show a close (X) button in the header */
22
21
  showClose?: boolean;
23
22
  }
24
- declare function ChatWindow({ className, style, onClose, showClose }: ChatWindowProps): react_jsx_runtime.JSX.Element;
23
+ declare function ChatWindow({ className, style, onClose, showClose }: ChatWindowProps): React$1.JSX.Element;
25
24
 
26
25
  interface DocumentUploadProps {
27
26
  /** Optional namespace for the upload */
@@ -31,7 +30,7 @@ interface DocumentUploadProps {
31
30
  /** Additional className */
32
31
  className?: string;
33
32
  }
34
- declare function DocumentUpload({ namespace, onUploadComplete, className }: DocumentUploadProps): react_jsx_runtime.JSX.Element;
33
+ declare function DocumentUpload({ namespace, onUploadComplete, className }: DocumentUploadProps): React$1.JSX.Element;
35
34
 
36
35
  interface MessageBubbleProps {
37
36
  message: ChatMessage;
@@ -40,13 +39,20 @@ interface MessageBubbleProps {
40
39
  primaryColor?: string;
41
40
  accentColor?: string;
42
41
  }
43
- declare function MessageBubble({ message, sources, isStreaming, primaryColor, accentColor, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
42
+ declare function MessageBubble({ message, sources, isStreaming, primaryColor, accentColor, }: MessageBubbleProps): React$1.JSX.Element;
44
43
 
45
44
  interface SourceCardProps {
46
45
  source: VectorMatch;
47
46
  index: number;
48
47
  }
49
- declare function SourceCard({ source, index }: SourceCardProps): react_jsx_runtime.JSX.Element;
48
+ declare function SourceCard({ source, index }: SourceCardProps): React$1.JSX.Element;
49
+
50
+ /**
51
+ * ConfigProvider — React Context that makes RagConfig (UI subset) available
52
+ * to all child components without prop drilling.
53
+ *
54
+ * Only the UI-safe portions of RagConfig are exposed to the client.
55
+ */
50
56
 
51
57
  interface ClientConfig {
52
58
  projectId: string;
@@ -58,7 +64,7 @@ declare function ConfigProvider({ config, children, }: {
58
64
  ui?: Partial<UIConfig>;
59
65
  };
60
66
  children: ReactNode;
61
- }): react_jsx_runtime.JSX.Element;
67
+ }): React$1.JSX.Element;
62
68
  declare function useConfig(): ClientConfig;
63
69
 
64
70
  type MessageRole = 'user' | 'assistant';