@retrivora-ai/rag-engine 2.4.5 → 2.4.7

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/dist/server.d.mts CHANGED
@@ -1,9 +1,9 @@
1
- import { V as VectorDBConfig, L as LLMConfig, d as EmbeddingConfig, n as RagConfig, t as UniversalRagConfig, u as UpsertDocument, w as VectorMatch, G as GraphDBConfig, D as GraphNode, F as Edge, H as GraphSearchResult, I as ILLMProvider, v as VectorDBProvider, g as LLMProvider, e as EmbeddingProvider, R as RAGConfig, s as UIConfig, J as UITransformationResponse, C as ChatMessage, b as ChatOptions, E as EmbedOptions, f as IngestDocument, c as ChatResponse } from './ILLMProvider-Y6aL5N8J.mjs';
2
- export { A as AuthMode, K as BarChartData, M as CarouselProduct, N as IRetriever, h as LatencyBreakdown, Q as LineChartDataPoint, S as MessageRole, X as MetricCardData, O as ObservabilityTrace, Y as PieChartData, Z as Product, i as ProjectAiSettings, j as ProjectAuthSettings, k as ProjectBrandingSettings, P as ProjectChatSettings, l as ProjectTelemetrySettings, m as ProjectWidgetSettings, o as RagMessage, p as RetrievalConfig, _ as RetrievalResult, q as RetrievedChunk, $ as RetrivoraChunkMetadata, a0 as RetrivoraIngestedDocument, a1 as ScatterPlotDataPoint, a2 as SuggestionsResponse, a3 as TableData, T as ThemeMode, r as TokenUsage, U as UseRagChatOptions, a as UseRagChatReturn, a4 as VisualizationType, W as WidgetPosition, x as WorkflowConfig, y as createDefaultProjectSettings, z as normalizeProjectSettings, B as projectSettingsToUiConfig } from './ILLMProvider-Y6aL5N8J.mjs';
3
- import { l as DecisionContext, n as IntentCategory, I as IRenderRule, y as RenderDecision, m as IRendererStrategy } from './BatchProcessor-Csy_K1qQ.mjs';
4
- export { Q as ArchitectureCardProps, A as AuthenticationException, B as BatchOptions, e as BatchProcessor, f as BatchResult, g as ChartType, T as ChatViewportSize, C as ChatWidgetProps, a as ChatWindowProps, h as Chunk, i as ChunkOptions, c as ClientConfig, j as ConfigFetcher, b as ConfigProviderProps, k as ConfigurationException, U as DocumentChunker, D as DocumentUploadProps, E as EmbeddingFailedException, V as LicenseConfigResolver, L as LicenseTierConfig, o as LicenseValidationError, p as LicenseValidationRequest, q as LicenseValidationResponse, r as LicenseValidator, M as MessageBubbleProps, W as Pipeline, X as PipelineStep, P as ProductCardProps, d as ProductCarouselProps, s as ProviderCredentials, t as ProviderNotFoundException, Y as ProviderPill, u as RateLimitException, R as RemoteConfig, v as RemoteEmbeddingConfig, w as RemoteLLMConfig, x as RemoteVectorConfig, Z as RenderSectionDecision, z as RenderType, F as RetrievalException, G as Retrivora, H as RetrivoraError, J as RetrivoraErrorCode, K as SDKVersionUnsupportedError, N as SDK_VERSION, _ as Snippet, S as SourceCardProps, $ as wrapError } from './BatchProcessor-Csy_K1qQ.mjs';
5
- import { H as HealthCheckResult, I as IProviderValidator, a as IProviderHealthChecker } from './index-59CHg0V3.mjs';
6
- export { C as ConfigValidator, b as HandlerOptions, V as ValidationError, c as VectorPlugin, d as createChatHandler, e as createFeedbackHandler, f as createHealthHandler, g as createHistoryHandler, h as createIngestHandler, i as createRagHandler, j as createSessionsHandler, k as createStreamHandler, l as createUploadHandler, s as sseErrorFrame, m as sseFrame, n as sseMetaFrame, o as sseTextFrame } from './index-59CHg0V3.mjs';
1
+ import { V as VectorDBConfig, L as LLMConfig, f as EmbeddingConfig, p as RagConfig, v as UniversalRagConfig, w as UpsertDocument, y as VectorMatch, G as GraphDBConfig, H as GraphNode, J as Edge, K as GraphSearchResult, I as ILLMProvider, x as VectorDBProvider, i as LLMProvider, g as EmbeddingProvider, R as RAGConfig, u as UIConfig, U as UITransformationResponse, C as ChatMessage, d as ChatOptions, E as EmbedOptions, h as IngestDocument, e as ChatResponse } from './ILLMProvider-BYQd0Nys.mjs';
2
+ export { A as AuthMode, M as BarChartData, N as CarouselProduct, Q as IRetriever, j as LatencyBreakdown, S as LineChartDataPoint, X as MessageRole, Y as MetricCardData, O as ObservabilityTrace, Z as PieChartData, P as Product, k as ProjectAiSettings, l as ProjectAuthSettings, m as ProjectBrandingSettings, c as ProjectChatSettings, n as ProjectTelemetrySettings, o as ProjectWidgetSettings, q as RagMessage, r as RetrievalConfig, _ as RetrievalResult, s as RetrievedChunk, $ as RetrivoraChunkMetadata, a0 as RetrivoraIngestedDocument, a1 as ScatterPlotDataPoint, a2 as SuggestionsResponse, a3 as TableData, T as ThemeMode, t as TokenUsage, a as UseRagChatOptions, b as UseRagChatReturn, a4 as VisualizationType, W as WidgetPosition, z as WorkflowConfig, B as createDefaultProjectSettings, D as normalizeProjectSettings, F as projectSettingsToUiConfig } from './ILLMProvider-BYQd0Nys.mjs';
3
+ import { o as DecisionContext, q as IntentCategory, I as IRenderRule, G as RenderDecision, p as IRendererStrategy } from './BatchProcessor-BZhwvT6o.mjs';
4
+ export { V as ArchitectureCardProps, A as AuthenticationException, B as BatchOptions, f as BatchProcessor, g as BatchResult, h as ChartType, e as ChatViewportSize, C as ChatWidgetProps, a as ChatWindowProps, i as Chunk, j as ChunkOptions, c as ClientConfig, m as ConfigFetcher, b as ConfigProviderProps, n as ConfigurationException, W as DocumentChunker, D as DocumentUploadProps, E as EmbeddingFailedException, X as LicenseConfigResolver, L as LicenseTierConfig, r as LicenseValidationError, s as LicenseValidationRequest, t as LicenseValidationResponse, u as LicenseValidator, M as MessageBubbleProps, Y as Pipeline, Z as PipelineStep, P as ProductCardProps, d as ProductCarouselProps, v as ProviderCredentials, w as ProviderNotFoundException, _ as ProviderPill, x as RateLimitException, R as RemoteConfig, y as RemoteEmbeddingConfig, z as RemoteLLMConfig, F as RemoteVectorConfig, $ as RenderSectionDecision, H as RenderType, J as RetrievalException, K as Retrivora, N as RetrivoraError, O as RetrivoraErrorCode, Q as SDKVersionUnsupportedError, T as SDK_VERSION, a0 as Snippet, S as SourceCardProps, a1 as wrapError } from './BatchProcessor-BZhwvT6o.mjs';
5
+ import { H as HealthCheckResult, I as IProviderValidator, a as IProviderHealthChecker } from './index-BTLsJ0da.mjs';
6
+ export { C as ConfigValidator, b as HandlerOptions, V as ValidationError, c as VectorPlugin, d as createChatHandler, e as createFeedbackHandler, f as createHealthHandler, g as createHistoryHandler, h as createIngestHandler, i as createRagHandler, j as createSessionsHandler, k as createStreamHandler, l as createUploadHandler, s as sseErrorFrame, m as sseFrame, n as sseMetaFrame, o as sseTextFrame } from './index-BTLsJ0da.mjs';
7
7
  import 'react';
8
8
  import 'next/server';
9
9
 
@@ -98,6 +98,7 @@ declare abstract class BaseVectorProvider {
98
98
  protected readonly config: VectorDBConfig;
99
99
  protected indexName: string;
100
100
  protected projectId?: string;
101
+ protected namespace?: string;
101
102
  constructor(config: VectorDBConfig);
102
103
  /**
103
104
  * Initialise the connection (create tables, verify index, etc.)
@@ -712,7 +713,7 @@ declare class Rule6SmallResultSetRule implements IRenderRule {
712
713
 
713
714
  declare class Rule7LargeTableRule implements IRenderRule {
714
715
  readonly name = "Rule7LargeTable";
715
- readonly priority = 75;
716
+ readonly priority = 82;
716
717
  evaluate(context: DecisionContext, intent: IntentCategory): RenderDecision | null;
717
718
  }
718
719
 
@@ -1164,7 +1165,9 @@ declare class LicensedRetrivora {
1164
1165
  private initialized;
1165
1166
  constructor(options: LicensedRetrivoraOptions);
1166
1167
  /**
1167
- * Initialize the SDK by validating license and fetching config
1168
+ * Generates a unique ID for correlating telemetry events.
1169
+ * Format: `{timestamp}-{random}` — not cryptographically secure, used for
1170
+ * tracing only.
1168
1171
  */
1169
1172
  private generateId;
1170
1173
  /**
@@ -1204,9 +1207,14 @@ declare class LicensedRetrivora {
1204
1207
  */
1205
1208
  isInitialized(): boolean;
1206
1209
  /**
1207
- * Get current RAG configuration (for debugging)
1210
+ * Get current RAG configuration (for debugging).
1211
+ *
1212
+ * Fix DX-3: throws when called before `initialize()` so callers receive a
1213
+ * clear, actionable error instead of a silent `undefined` that causes a
1214
+ * confusing null-reference error downstream. Consistent with the behavior
1215
+ * of `query()` and `ingest()`.
1208
1216
  */
1209
- getConfig(): RagConfig | undefined;
1217
+ getConfig(): RagConfig;
1210
1218
  }
1211
1219
  /**
1212
1220
  * Convenience function to create and initialize SDK in one call
@@ -1220,6 +1228,11 @@ declare function createRetrivora(options: LicensedRetrivoraOptions): Promise<Lic
1220
1228
  * Sends telemetry to both:
1221
1229
  * - Admin dashboard (retrivora.com)
1222
1230
  * - User's own dashboard (if configured)
1231
+ *
1232
+ * Fix PERF-5: replaced the `axios` runtime dependency with native `fetch`.
1233
+ * Axios added ~25KB gzipped to every consumer's bundle purely for non-critical
1234
+ * fire-and-forget POST calls. fetch is available in Node.js 18+ and all
1235
+ * Next.js deployment targets (Vercel, Edge, Node runtime).
1223
1236
  */
1224
1237
  declare enum EventType {
1225
1238
  EMBEDDING_GENERATED = "embedding_generated",
@@ -1259,7 +1272,6 @@ interface TelemetryEvent {
1259
1272
  declare class TelemetryService {
1260
1273
  private static readonly RETRIVORA_TELEMETRY_URL;
1261
1274
  private static readonly USER_TELEMETRY_URL_ENV_KEY;
1262
- private http;
1263
1275
  private projectId;
1264
1276
  private licenseKey;
1265
1277
  private userTelemetryUrl?;
@@ -1268,6 +1280,8 @@ declare class TelemetryService {
1268
1280
  private eventQueue;
1269
1281
  private flushTimer?;
1270
1282
  private enabled;
1283
+ /** Default headers added to every telemetry POST request. */
1284
+ private baseHeaders;
1271
1285
  constructor(projectId: string, licenseKey: string, userTelemetryUrl?: string);
1272
1286
  /**
1273
1287
  * Record a telemetry event
package/dist/server.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { V as VectorDBConfig, L as LLMConfig, d as EmbeddingConfig, n as RagConfig, t as UniversalRagConfig, u as UpsertDocument, w as VectorMatch, G as GraphDBConfig, D as GraphNode, F as Edge, H as GraphSearchResult, I as ILLMProvider, v as VectorDBProvider, g as LLMProvider, e as EmbeddingProvider, R as RAGConfig, s as UIConfig, J as UITransformationResponse, C as ChatMessage, b as ChatOptions, E as EmbedOptions, f as IngestDocument, c as ChatResponse } from './ILLMProvider-Y6aL5N8J.js';
2
- export { A as AuthMode, K as BarChartData, M as CarouselProduct, N as IRetriever, h as LatencyBreakdown, Q as LineChartDataPoint, S as MessageRole, X as MetricCardData, O as ObservabilityTrace, Y as PieChartData, Z as Product, i as ProjectAiSettings, j as ProjectAuthSettings, k as ProjectBrandingSettings, P as ProjectChatSettings, l as ProjectTelemetrySettings, m as ProjectWidgetSettings, o as RagMessage, p as RetrievalConfig, _ as RetrievalResult, q as RetrievedChunk, $ as RetrivoraChunkMetadata, a0 as RetrivoraIngestedDocument, a1 as ScatterPlotDataPoint, a2 as SuggestionsResponse, a3 as TableData, T as ThemeMode, r as TokenUsage, U as UseRagChatOptions, a as UseRagChatReturn, a4 as VisualizationType, W as WidgetPosition, x as WorkflowConfig, y as createDefaultProjectSettings, z as normalizeProjectSettings, B as projectSettingsToUiConfig } from './ILLMProvider-Y6aL5N8J.js';
3
- import { l as DecisionContext, n as IntentCategory, I as IRenderRule, y as RenderDecision, m as IRendererStrategy } from './BatchProcessor-Dg18zZGk.js';
4
- export { Q as ArchitectureCardProps, A as AuthenticationException, B as BatchOptions, e as BatchProcessor, f as BatchResult, g as ChartType, T as ChatViewportSize, C as ChatWidgetProps, a as ChatWindowProps, h as Chunk, i as ChunkOptions, c as ClientConfig, j as ConfigFetcher, b as ConfigProviderProps, k as ConfigurationException, U as DocumentChunker, D as DocumentUploadProps, E as EmbeddingFailedException, V as LicenseConfigResolver, L as LicenseTierConfig, o as LicenseValidationError, p as LicenseValidationRequest, q as LicenseValidationResponse, r as LicenseValidator, M as MessageBubbleProps, W as Pipeline, X as PipelineStep, P as ProductCardProps, d as ProductCarouselProps, s as ProviderCredentials, t as ProviderNotFoundException, Y as ProviderPill, u as RateLimitException, R as RemoteConfig, v as RemoteEmbeddingConfig, w as RemoteLLMConfig, x as RemoteVectorConfig, Z as RenderSectionDecision, z as RenderType, F as RetrievalException, G as Retrivora, H as RetrivoraError, J as RetrivoraErrorCode, K as SDKVersionUnsupportedError, N as SDK_VERSION, _ as Snippet, S as SourceCardProps, $ as wrapError } from './BatchProcessor-Dg18zZGk.js';
5
- import { H as HealthCheckResult, I as IProviderValidator, a as IProviderHealthChecker } from './index-BgKRInpa.js';
6
- export { C as ConfigValidator, b as HandlerOptions, V as ValidationError, c as VectorPlugin, d as createChatHandler, e as createFeedbackHandler, f as createHealthHandler, g as createHistoryHandler, h as createIngestHandler, i as createRagHandler, j as createSessionsHandler, k as createStreamHandler, l as createUploadHandler, s as sseErrorFrame, m as sseFrame, n as sseMetaFrame, o as sseTextFrame } from './index-BgKRInpa.js';
1
+ import { V as VectorDBConfig, L as LLMConfig, f as EmbeddingConfig, p as RagConfig, v as UniversalRagConfig, w as UpsertDocument, y as VectorMatch, G as GraphDBConfig, H as GraphNode, J as Edge, K as GraphSearchResult, I as ILLMProvider, x as VectorDBProvider, i as LLMProvider, g as EmbeddingProvider, R as RAGConfig, u as UIConfig, U as UITransformationResponse, C as ChatMessage, d as ChatOptions, E as EmbedOptions, h as IngestDocument, e as ChatResponse } from './ILLMProvider-BYQd0Nys.js';
2
+ export { A as AuthMode, M as BarChartData, N as CarouselProduct, Q as IRetriever, j as LatencyBreakdown, S as LineChartDataPoint, X as MessageRole, Y as MetricCardData, O as ObservabilityTrace, Z as PieChartData, P as Product, k as ProjectAiSettings, l as ProjectAuthSettings, m as ProjectBrandingSettings, c as ProjectChatSettings, n as ProjectTelemetrySettings, o as ProjectWidgetSettings, q as RagMessage, r as RetrievalConfig, _ as RetrievalResult, s as RetrievedChunk, $ as RetrivoraChunkMetadata, a0 as RetrivoraIngestedDocument, a1 as ScatterPlotDataPoint, a2 as SuggestionsResponse, a3 as TableData, T as ThemeMode, t as TokenUsage, a as UseRagChatOptions, b as UseRagChatReturn, a4 as VisualizationType, W as WidgetPosition, z as WorkflowConfig, B as createDefaultProjectSettings, D as normalizeProjectSettings, F as projectSettingsToUiConfig } from './ILLMProvider-BYQd0Nys.js';
3
+ import { o as DecisionContext, q as IntentCategory, I as IRenderRule, G as RenderDecision, p as IRendererStrategy } from './BatchProcessor-DlAkfGbv.js';
4
+ export { V as ArchitectureCardProps, A as AuthenticationException, B as BatchOptions, f as BatchProcessor, g as BatchResult, h as ChartType, e as ChatViewportSize, C as ChatWidgetProps, a as ChatWindowProps, i as Chunk, j as ChunkOptions, c as ClientConfig, m as ConfigFetcher, b as ConfigProviderProps, n as ConfigurationException, W as DocumentChunker, D as DocumentUploadProps, E as EmbeddingFailedException, X as LicenseConfigResolver, L as LicenseTierConfig, r as LicenseValidationError, s as LicenseValidationRequest, t as LicenseValidationResponse, u as LicenseValidator, M as MessageBubbleProps, Y as Pipeline, Z as PipelineStep, P as ProductCardProps, d as ProductCarouselProps, v as ProviderCredentials, w as ProviderNotFoundException, _ as ProviderPill, x as RateLimitException, R as RemoteConfig, y as RemoteEmbeddingConfig, z as RemoteLLMConfig, F as RemoteVectorConfig, $ as RenderSectionDecision, H as RenderType, J as RetrievalException, K as Retrivora, N as RetrivoraError, O as RetrivoraErrorCode, Q as SDKVersionUnsupportedError, T as SDK_VERSION, a0 as Snippet, S as SourceCardProps, a1 as wrapError } from './BatchProcessor-DlAkfGbv.js';
5
+ import { H as HealthCheckResult, I as IProviderValidator, a as IProviderHealthChecker } from './index-DtDY4Dwa.js';
6
+ export { C as ConfigValidator, b as HandlerOptions, V as ValidationError, c as VectorPlugin, d as createChatHandler, e as createFeedbackHandler, f as createHealthHandler, g as createHistoryHandler, h as createIngestHandler, i as createRagHandler, j as createSessionsHandler, k as createStreamHandler, l as createUploadHandler, s as sseErrorFrame, m as sseFrame, n as sseMetaFrame, o as sseTextFrame } from './index-DtDY4Dwa.js';
7
7
  import 'react';
8
8
  import 'next/server';
9
9
 
@@ -98,6 +98,7 @@ declare abstract class BaseVectorProvider {
98
98
  protected readonly config: VectorDBConfig;
99
99
  protected indexName: string;
100
100
  protected projectId?: string;
101
+ protected namespace?: string;
101
102
  constructor(config: VectorDBConfig);
102
103
  /**
103
104
  * Initialise the connection (create tables, verify index, etc.)
@@ -712,7 +713,7 @@ declare class Rule6SmallResultSetRule implements IRenderRule {
712
713
 
713
714
  declare class Rule7LargeTableRule implements IRenderRule {
714
715
  readonly name = "Rule7LargeTable";
715
- readonly priority = 75;
716
+ readonly priority = 82;
716
717
  evaluate(context: DecisionContext, intent: IntentCategory): RenderDecision | null;
717
718
  }
718
719
 
@@ -1164,7 +1165,9 @@ declare class LicensedRetrivora {
1164
1165
  private initialized;
1165
1166
  constructor(options: LicensedRetrivoraOptions);
1166
1167
  /**
1167
- * Initialize the SDK by validating license and fetching config
1168
+ * Generates a unique ID for correlating telemetry events.
1169
+ * Format: `{timestamp}-{random}` — not cryptographically secure, used for
1170
+ * tracing only.
1168
1171
  */
1169
1172
  private generateId;
1170
1173
  /**
@@ -1204,9 +1207,14 @@ declare class LicensedRetrivora {
1204
1207
  */
1205
1208
  isInitialized(): boolean;
1206
1209
  /**
1207
- * Get current RAG configuration (for debugging)
1210
+ * Get current RAG configuration (for debugging).
1211
+ *
1212
+ * Fix DX-3: throws when called before `initialize()` so callers receive a
1213
+ * clear, actionable error instead of a silent `undefined` that causes a
1214
+ * confusing null-reference error downstream. Consistent with the behavior
1215
+ * of `query()` and `ingest()`.
1208
1216
  */
1209
- getConfig(): RagConfig | undefined;
1217
+ getConfig(): RagConfig;
1210
1218
  }
1211
1219
  /**
1212
1220
  * Convenience function to create and initialize SDK in one call
@@ -1220,6 +1228,11 @@ declare function createRetrivora(options: LicensedRetrivoraOptions): Promise<Lic
1220
1228
  * Sends telemetry to both:
1221
1229
  * - Admin dashboard (retrivora.com)
1222
1230
  * - User's own dashboard (if configured)
1231
+ *
1232
+ * Fix PERF-5: replaced the `axios` runtime dependency with native `fetch`.
1233
+ * Axios added ~25KB gzipped to every consumer's bundle purely for non-critical
1234
+ * fire-and-forget POST calls. fetch is available in Node.js 18+ and all
1235
+ * Next.js deployment targets (Vercel, Edge, Node runtime).
1223
1236
  */
1224
1237
  declare enum EventType {
1225
1238
  EMBEDDING_GENERATED = "embedding_generated",
@@ -1259,7 +1272,6 @@ interface TelemetryEvent {
1259
1272
  declare class TelemetryService {
1260
1273
  private static readonly RETRIVORA_TELEMETRY_URL;
1261
1274
  private static readonly USER_TELEMETRY_URL_ENV_KEY;
1262
- private http;
1263
1275
  private projectId;
1264
1276
  private licenseKey;
1265
1277
  private userTelemetryUrl?;
@@ -1268,6 +1280,8 @@ declare class TelemetryService {
1268
1280
  private eventQueue;
1269
1281
  private flushTimer?;
1270
1282
  private enabled;
1283
+ /** Default headers added to every telemetry POST request. */
1284
+ private baseHeaders;
1271
1285
  constructor(projectId: string, licenseKey: string, userTelemetryUrl?: string);
1272
1286
  /**
1273
1287
  * Record a telemetry event