@retrivora-ai/rag-engine 2.4.3 → 2.4.6

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 (142) hide show
  1. package/README.md +22 -0
  2. package/dist/{BatchProcessor-zbQMaZHm.d.mts → BatchProcessor-BGslIR5l.d.mts} +65 -4
  3. package/dist/{BatchProcessor-D42E706a.d.ts → BatchProcessor-C3gY6kZ0.d.ts} +65 -4
  4. package/dist/handlers/index.js +668 -837
  5. package/dist/handlers/index.mjs +678 -837
  6. package/dist/index.css +5 -0
  7. package/dist/index.d.mts +4 -28
  8. package/dist/index.d.ts +4 -28
  9. package/dist/index.js +91 -43
  10. package/dist/index.min.css +1 -1
  11. package/dist/index.mjs +91 -43
  12. package/dist/server.d.mts +21 -7
  13. package/dist/server.d.ts +21 -7
  14. package/dist/server.js +731 -875
  15. package/dist/server.mjs +741 -875
  16. package/package.json +11 -4
  17. package/src/LicensedRetrivora.ts +0 -278
  18. package/src/app/api/chat/route.ts +0 -4
  19. package/src/app/api/health/route.ts +0 -5
  20. package/src/app/api/ingest/route.ts +0 -27
  21. package/src/app/api/suggestions/route.ts +0 -5
  22. package/src/app/api/upload/route.ts +0 -5
  23. package/src/app/constants.tsx +0 -270
  24. package/src/app/favicon.ico +0 -0
  25. package/src/app/globals.css +0 -449
  26. package/src/app/layout.tsx +0 -22
  27. package/src/app/page.tsx +0 -64
  28. package/src/app/types.ts +0 -30
  29. package/src/browser.tsx +0 -127
  30. package/src/components/ChatWidget.tsx +0 -393
  31. package/src/components/ChatWindow.tsx +0 -952
  32. package/src/components/CodeViewer.tsx +0 -56
  33. package/src/components/ConfigProvider.tsx +0 -141
  34. package/src/components/DocumentUpload.tsx +0 -354
  35. package/src/components/DynamicChart.tsx +0 -297
  36. package/src/components/HourglassLoader.tsx +0 -87
  37. package/src/components/MarkdownComponents.tsx +0 -186
  38. package/src/components/MessageBubble.tsx +0 -498
  39. package/src/components/ObservabilityPanel.tsx +0 -374
  40. package/src/components/ProductCard.tsx +0 -107
  41. package/src/components/ProductCarousel.tsx +0 -97
  42. package/src/components/SourceCard.tsx +0 -61
  43. package/src/components/ThemeProvider.tsx +0 -8
  44. package/src/components/ThemeToggle.tsx +0 -29
  45. package/src/components/ThinkingBlock.tsx +0 -75
  46. package/src/components/UIDispatcher.tsx +0 -342
  47. package/src/components/VisualizationRenderer.tsx +0 -621
  48. package/src/components/constants.tsx +0 -503
  49. package/src/config/ConfigBuilder.ts +0 -285
  50. package/src/config/EmbeddingStrategy.ts +0 -148
  51. package/src/config/LicenseConfigResolver.ts +0 -298
  52. package/src/config/RagConfig.ts +0 -328
  53. package/src/config/UniversalProfiles.ts +0 -82
  54. package/src/config/constants.ts +0 -64
  55. package/src/config/serverConfig.ts +0 -378
  56. package/src/config/uiConstants.ts +0 -47
  57. package/src/core/BatchProcessor.ts +0 -385
  58. package/src/core/CircuitBreaker.ts +0 -118
  59. package/src/core/ConfigFetcher.ts +0 -220
  60. package/src/core/ConfigResolver.ts +0 -165
  61. package/src/core/ConfigValidator.ts +0 -197
  62. package/src/core/DatabaseStorage.ts +0 -526
  63. package/src/core/FreeTierLimitsGuard.ts +0 -281
  64. package/src/core/LLMRouter.ts +0 -79
  65. package/src/core/LangChainAgent.ts +0 -132
  66. package/src/core/LicenseValidator.ts +0 -284
  67. package/src/core/LicenseVerifier.ts +0 -261
  68. package/src/core/MultiAgentCoordinator.ts +0 -239
  69. package/src/core/Pipeline.ts +0 -1279
  70. package/src/core/PluginManager.ts +0 -277
  71. package/src/core/ProjectSettings.ts +0 -247
  72. package/src/core/ProviderHealthCheck.ts +0 -133
  73. package/src/core/ProviderInterfaces.ts +0 -37
  74. package/src/core/ProviderRegistry.ts +0 -156
  75. package/src/core/QueryProcessor.ts +0 -399
  76. package/src/core/Retrivora.ts +0 -98
  77. package/src/core/VectorPlugin.ts +0 -193
  78. package/src/core/mcp.ts +0 -261
  79. package/src/exceptions/index.ts +0 -131
  80. package/src/handlers/index.ts +0 -1625
  81. package/src/hooks/useHydrated.ts +0 -13
  82. package/src/hooks/useProjectSettings.ts +0 -105
  83. package/src/hooks/useRagChat.ts +0 -436
  84. package/src/hooks/useStoredMessages.ts +0 -64
  85. package/src/index.css +0 -4269
  86. package/src/index.ts +0 -137
  87. package/src/lib/plugin.ts +0 -24
  88. package/src/llm/ILLMProvider.ts +0 -60
  89. package/src/llm/LLMFactory.ts +0 -141
  90. package/src/llm/providers/AnthropicProvider.ts +0 -215
  91. package/src/llm/providers/GeminiProvider.ts +0 -311
  92. package/src/llm/providers/GroqProvider.ts +0 -184
  93. package/src/llm/providers/OllamaProvider.ts +0 -232
  94. package/src/llm/providers/OpenAIProvider.ts +0 -188
  95. package/src/llm/providers/QwenProvider.ts +0 -199
  96. package/src/llm/providers/UniversalLLMAdapter.ts +0 -422
  97. package/src/llm/utils.ts +0 -46
  98. package/src/providers/graphdb/BaseGraphProvider.ts +0 -43
  99. package/src/providers/graphdb/SimpleGraphProvider.ts +0 -66
  100. package/src/providers/vectordb/BaseVectorProvider.ts +0 -98
  101. package/src/providers/vectordb/ChromaDBProvider.ts +0 -130
  102. package/src/providers/vectordb/MilvusProvider.ts +0 -134
  103. package/src/providers/vectordb/MongoDBProvider.ts +0 -250
  104. package/src/providers/vectordb/MultiTablePostgresProvider.ts +0 -461
  105. package/src/providers/vectordb/PineconeProvider.ts +0 -295
  106. package/src/providers/vectordb/PostgreSQLProvider.ts +0 -227
  107. package/src/providers/vectordb/QdrantProvider.ts +0 -294
  108. package/src/providers/vectordb/RedisProvider.ts +0 -105
  109. package/src/providers/vectordb/UniversalVectorProvider.ts +0 -221
  110. package/src/providers/vectordb/WeaviateProvider.ts +0 -172
  111. package/src/rag/DocumentChunker.ts +0 -144
  112. package/src/rag/EntityExtractor.ts +0 -90
  113. package/src/rag/LlamaIndexIngestor.ts +0 -60
  114. package/src/rag/Reranker.ts +0 -106
  115. package/src/rendering/IntentClassifier.ts +0 -167
  116. package/src/rendering/RendererRegistry.ts +0 -164
  117. package/src/rendering/RuleEngine.ts +0 -67
  118. package/src/rendering/VisualizationDecisionEngine.ts +0 -164
  119. package/src/rendering/__tests__/VisualizationDecisionEngine.test.ts +0 -237
  120. package/src/rendering/index.ts +0 -12
  121. package/src/rendering/rules/Rule1SpecificInfoRule.ts +0 -28
  122. package/src/rendering/rules/Rule2ComparisonRule.ts +0 -24
  123. package/src/rendering/rules/Rule3ProductDiscoveryRule.ts +0 -28
  124. package/src/rendering/rules/Rule4AnalyticalRule.ts +0 -38
  125. package/src/rendering/rules/Rule5MixedResponseRule.ts +0 -29
  126. package/src/rendering/rules/Rule6SmallResultSetRule.ts +0 -24
  127. package/src/rendering/rules/Rule7LargeTableRule.ts +0 -35
  128. package/src/rendering/types.ts +0 -96
  129. package/src/server.ts +0 -156
  130. package/src/tailwind.css +0 -194
  131. package/src/telemetry/TelemetryService.ts +0 -330
  132. package/src/types/chat.ts +0 -89
  133. package/src/types/index.ts +0 -278
  134. package/src/types/pdf-parse.d.ts +0 -13
  135. package/src/types/props.ts +0 -169
  136. package/src/utils/DocumentParser.ts +0 -111
  137. package/src/utils/ProductExtractor.ts +0 -350
  138. package/src/utils/SchemaMapper.ts +0 -176
  139. package/src/utils/UITransformer.ts +0 -1812
  140. package/src/utils/synonyms.ts +0 -80
  141. package/src/utils/templateUtils.ts +0 -78
  142. package/src/version.ts +0 -6
package/dist/server.d.mts CHANGED
@@ -1,7 +1,7 @@
1
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
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-zbQMaZHm.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-zbQMaZHm.mjs';
3
+ import { n as DecisionContext, p as IntentCategory, I as IRenderRule, F as RenderDecision, o as IRendererStrategy } from './BatchProcessor-BGslIR5l.mjs';
4
+ export { U as ArchitectureCardProps, A as AuthenticationException, B as BatchOptions, e as BatchProcessor, f as BatchResult, g as ChartType, V as ChatViewportSize, C as ChatWidgetProps, a as ChatWindowProps, h as Chunk, i as ChunkOptions, c as ClientConfig, l as ConfigFetcher, b as ConfigProviderProps, m as ConfigurationException, W as DocumentChunker, D as DocumentUploadProps, E as EmbeddingFailedException, X as LicenseConfigResolver, L as LicenseTierConfig, q as LicenseValidationError, r as LicenseValidationRequest, s as LicenseValidationResponse, t as LicenseValidator, M as MessageBubbleProps, Y as Pipeline, Z as PipelineStep, P as ProductCardProps, d as ProductCarouselProps, u as ProviderCredentials, v as ProviderNotFoundException, _ as ProviderPill, w as RateLimitException, R as RemoteConfig, x as RemoteEmbeddingConfig, y as RemoteLLMConfig, z as RemoteVectorConfig, $ as RenderSectionDecision, G as RenderType, H as RetrievalException, J as Retrivora, K as RetrivoraError, N as RetrivoraErrorCode, O as SDKVersionUnsupportedError, Q as SDK_VERSION, a0 as Snippet, S as SourceCardProps, a1 as wrapError } from './BatchProcessor-BGslIR5l.mjs';
5
5
  import { H as HealthCheckResult, I as IProviderValidator, a as IProviderHealthChecker } from './index-59CHg0V3.mjs';
6
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';
7
7
  import 'react';
@@ -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,7 +1,7 @@
1
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
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-D42E706a.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-D42E706a.js';
3
+ import { n as DecisionContext, p as IntentCategory, I as IRenderRule, F as RenderDecision, o as IRendererStrategy } from './BatchProcessor-C3gY6kZ0.js';
4
+ export { U as ArchitectureCardProps, A as AuthenticationException, B as BatchOptions, e as BatchProcessor, f as BatchResult, g as ChartType, V as ChatViewportSize, C as ChatWidgetProps, a as ChatWindowProps, h as Chunk, i as ChunkOptions, c as ClientConfig, l as ConfigFetcher, b as ConfigProviderProps, m as ConfigurationException, W as DocumentChunker, D as DocumentUploadProps, E as EmbeddingFailedException, X as LicenseConfigResolver, L as LicenseTierConfig, q as LicenseValidationError, r as LicenseValidationRequest, s as LicenseValidationResponse, t as LicenseValidator, M as MessageBubbleProps, Y as Pipeline, Z as PipelineStep, P as ProductCardProps, d as ProductCarouselProps, u as ProviderCredentials, v as ProviderNotFoundException, _ as ProviderPill, w as RateLimitException, R as RemoteConfig, x as RemoteEmbeddingConfig, y as RemoteLLMConfig, z as RemoteVectorConfig, $ as RenderSectionDecision, G as RenderType, H as RetrievalException, J as Retrivora, K as RetrivoraError, N as RetrivoraErrorCode, O as SDKVersionUnsupportedError, Q as SDK_VERSION, a0 as Snippet, S as SourceCardProps, a1 as wrapError } from './BatchProcessor-C3gY6kZ0.js';
5
5
  import { H as HealthCheckResult, I as IProviderValidator, a as IProviderHealthChecker } from './index-BgKRInpa.js';
6
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';
7
7
  import 'react';
@@ -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