@retrivora-ai/rag-engine 2.5.4 → 2.5.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.
- package/dist/{ILLMProvider-DO5gj-e5.d.mts → ILLMProvider-DwFj0h2u.d.mts} +2 -2
- package/dist/{ILLMProvider-DO5gj-e5.d.ts → ILLMProvider-DwFj0h2u.d.ts} +2 -2
- package/dist/handlers/index.d.mts +2 -2
- package/dist/handlers/index.d.ts +2 -2
- package/dist/handlers/index.js +208 -28
- package/dist/handlers/index.mjs +202 -22
- package/dist/{index-Dex_gQ3P.d.mts → index-Byv5MaYi.d.mts} +16 -1
- package/dist/{index-DkOhRqEc.d.ts → index-Cb0GsT16.d.ts} +1 -1
- package/dist/{index-DE8qPWpI.d.mts → index-D1jN8KSF.d.mts} +1 -1
- package/dist/{index--RhMcXrt.d.ts → index-DP3_OpuB.d.ts} +16 -1
- package/dist/index.css +12 -83
- package/dist/index.d.mts +21 -16
- package/dist/index.d.ts +21 -16
- package/dist/index.js +3797 -3847
- package/dist/index.min.css +1 -1
- package/dist/index.mjs +3845 -3896
- package/dist/server.d.mts +57 -10
- package/dist/server.d.ts +57 -10
- package/dist/server.js +236 -34
- package/dist/server.mjs +229 -28
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -358,9 +358,6 @@
|
|
|
358
358
|
.top-20 {
|
|
359
359
|
top: calc(var(--spacing) * 20);
|
|
360
360
|
}
|
|
361
|
-
.top-24 {
|
|
362
|
-
top: calc(var(--spacing) * 24);
|
|
363
|
-
}
|
|
364
361
|
.-right-4 {
|
|
365
362
|
right: calc(var(--spacing) * -4);
|
|
366
363
|
}
|
|
@@ -388,9 +385,6 @@
|
|
|
388
385
|
.bottom-20 {
|
|
389
386
|
bottom: calc(var(--spacing) * 20);
|
|
390
387
|
}
|
|
391
|
-
.bottom-24 {
|
|
392
|
-
bottom: calc(var(--spacing) * 24);
|
|
393
|
-
}
|
|
394
388
|
.-left-4 {
|
|
395
389
|
left: calc(var(--spacing) * -4);
|
|
396
390
|
}
|
|
@@ -454,6 +448,9 @@
|
|
|
454
448
|
.mx-4 {
|
|
455
449
|
margin-inline: calc(var(--spacing) * 4);
|
|
456
450
|
}
|
|
451
|
+
.mx-6 {
|
|
452
|
+
margin-inline: calc(var(--spacing) * 6);
|
|
453
|
+
}
|
|
457
454
|
.mx-auto {
|
|
458
455
|
margin-inline: auto;
|
|
459
456
|
}
|
|
@@ -1137,12 +1134,6 @@
|
|
|
1137
1134
|
.border-amber-200 {
|
|
1138
1135
|
border-color: var(--color-amber-200);
|
|
1139
1136
|
}
|
|
1140
|
-
.border-amber-200\/80 {
|
|
1141
|
-
border-color: color-mix(in srgb, oklch(92.4% 0.12 95.746) 80%, transparent);
|
|
1142
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
1143
|
-
border-color: color-mix(in oklab, var(--color-amber-200) 80%, transparent);
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
1137
|
.border-emerald-100 {
|
|
1147
1138
|
border-color: var(--color-emerald-100);
|
|
1148
1139
|
}
|
|
@@ -1179,6 +1170,12 @@
|
|
|
1179
1170
|
.border-rose-200 {
|
|
1180
1171
|
border-color: var(--color-rose-200);
|
|
1181
1172
|
}
|
|
1173
|
+
.border-rose-200\/50 {
|
|
1174
|
+
border-color: color-mix(in srgb, oklch(89.2% 0.058 10.001) 50%, transparent);
|
|
1175
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1176
|
+
border-color: color-mix(in oklab, var(--color-rose-200) 50%, transparent);
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1182
1179
|
.border-rose-200\/60 {
|
|
1183
1180
|
border-color: color-mix(in srgb, oklch(89.2% 0.058 10.001) 60%, transparent);
|
|
1184
1181
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -1248,12 +1245,6 @@
|
|
|
1248
1245
|
.bg-amber-50 {
|
|
1249
1246
|
background-color: var(--color-amber-50);
|
|
1250
1247
|
}
|
|
1251
|
-
.bg-amber-50\/70 {
|
|
1252
|
-
background-color: color-mix(in srgb, oklch(98.7% 0.022 95.277) 70%, transparent);
|
|
1253
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
1254
|
-
background-color: color-mix(in oklab, var(--color-amber-50) 70%, transparent);
|
|
1255
|
-
}
|
|
1256
|
-
}
|
|
1257
1248
|
.bg-amber-100 {
|
|
1258
1249
|
background-color: var(--color-amber-100);
|
|
1259
1250
|
}
|
|
@@ -1461,12 +1452,6 @@
|
|
|
1461
1452
|
background-color: color-mix(in oklab, var(--color-white) 90%, transparent);
|
|
1462
1453
|
}
|
|
1463
1454
|
}
|
|
1464
|
-
.bg-white\/95 {
|
|
1465
|
-
background-color: color-mix(in srgb, #fff 95%, transparent);
|
|
1466
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
1467
|
-
background-color: color-mix(in oklab, var(--color-white) 95%, transparent);
|
|
1468
|
-
}
|
|
1469
|
-
}
|
|
1470
1455
|
.bg-gradient-to-br {
|
|
1471
1456
|
--tw-gradient-position: to bottom right in oklab;
|
|
1472
1457
|
background-image: linear-gradient(var(--tw-gradient-stops));
|
|
@@ -1697,9 +1682,6 @@
|
|
|
1697
1682
|
.whitespace-pre-wrap {
|
|
1698
1683
|
white-space: pre-wrap;
|
|
1699
1684
|
}
|
|
1700
|
-
.text-amber-300 {
|
|
1701
|
-
color: var(--color-amber-300);
|
|
1702
|
-
}
|
|
1703
1685
|
.text-amber-400 {
|
|
1704
1686
|
color: var(--color-amber-400);
|
|
1705
1687
|
}
|
|
@@ -1721,6 +1703,9 @@
|
|
|
1721
1703
|
.text-amber-950 {
|
|
1722
1704
|
color: var(--color-amber-950);
|
|
1723
1705
|
}
|
|
1706
|
+
.text-black {
|
|
1707
|
+
color: var(--color-black);
|
|
1708
|
+
}
|
|
1724
1709
|
.text-blue-600 {
|
|
1725
1710
|
color: var(--color-blue-600);
|
|
1726
1711
|
}
|
|
@@ -2038,10 +2023,6 @@
|
|
|
2038
2023
|
--tw-outline-style: none;
|
|
2039
2024
|
outline-style: none;
|
|
2040
2025
|
}
|
|
2041
|
-
.select-all {
|
|
2042
|
-
-webkit-user-select: all;
|
|
2043
|
-
user-select: all;
|
|
2044
|
-
}
|
|
2045
2026
|
.select-none {
|
|
2046
2027
|
-webkit-user-select: none;
|
|
2047
2028
|
user-select: none;
|
|
@@ -2341,14 +2322,6 @@
|
|
|
2341
2322
|
border-color: color-mix(in oklab, var(--color-amber-500) 20%, transparent);
|
|
2342
2323
|
}
|
|
2343
2324
|
}
|
|
2344
|
-
.dark\:border-amber-800\/40 {
|
|
2345
|
-
border-color: color-mix(in srgb, oklch(47.3% 0.137 46.201) 40%, transparent);
|
|
2346
|
-
}
|
|
2347
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
2348
|
-
.dark\:border-amber-800\/40 {
|
|
2349
|
-
border-color: color-mix(in oklab, var(--color-amber-800) 40%, transparent);
|
|
2350
|
-
}
|
|
2351
|
-
}
|
|
2352
2325
|
.dark\:border-emerald-400\/20 {
|
|
2353
2326
|
border-color: color-mix(in srgb, oklch(76.5% 0.177 163.223) 20%, transparent);
|
|
2354
2327
|
}
|
|
@@ -2429,14 +2402,6 @@
|
|
|
2429
2402
|
border-color: color-mix(in oklab, var(--color-rose-800) 40%, transparent);
|
|
2430
2403
|
}
|
|
2431
2404
|
}
|
|
2432
|
-
.dark\:border-rose-900\/60 {
|
|
2433
|
-
border-color: color-mix(in srgb, oklch(41% 0.159 10.272) 60%, transparent);
|
|
2434
|
-
}
|
|
2435
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
2436
|
-
.dark\:border-rose-900\/60 {
|
|
2437
|
-
border-color: color-mix(in oklab, var(--color-rose-900) 60%, transparent);
|
|
2438
|
-
}
|
|
2439
|
-
}
|
|
2440
2405
|
.dark\:border-slate-700 {
|
|
2441
2406
|
border-color: var(--color-slate-700);
|
|
2442
2407
|
}
|
|
@@ -2484,9 +2449,6 @@
|
|
|
2484
2449
|
.dark\:bg-\[\#0f0f1a\]\/90 {
|
|
2485
2450
|
background-color: color-mix(in oklab, #0f0f1a 90%, transparent);
|
|
2486
2451
|
}
|
|
2487
|
-
.dark\:bg-\[\#0f0f1a\]\/95 {
|
|
2488
|
-
background-color: color-mix(in oklab, #0f0f1a 95%, transparent);
|
|
2489
|
-
}
|
|
2490
2452
|
.dark\:bg-\[\#080811\] {
|
|
2491
2453
|
background-color: #080811;
|
|
2492
2454
|
}
|
|
@@ -2533,22 +2495,6 @@
|
|
|
2533
2495
|
background-color: color-mix(in oklab, var(--color-amber-900) 20%, transparent);
|
|
2534
2496
|
}
|
|
2535
2497
|
}
|
|
2536
|
-
.dark\:bg-amber-900\/40 {
|
|
2537
|
-
background-color: color-mix(in srgb, oklch(41.4% 0.112 45.904) 40%, transparent);
|
|
2538
|
-
}
|
|
2539
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
2540
|
-
.dark\:bg-amber-900\/40 {
|
|
2541
|
-
background-color: color-mix(in oklab, var(--color-amber-900) 40%, transparent);
|
|
2542
|
-
}
|
|
2543
|
-
}
|
|
2544
|
-
.dark\:bg-amber-950\/20 {
|
|
2545
|
-
background-color: color-mix(in srgb, oklch(27.9% 0.077 45.635) 20%, transparent);
|
|
2546
|
-
}
|
|
2547
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
2548
|
-
.dark\:bg-amber-950\/20 {
|
|
2549
|
-
background-color: color-mix(in oklab, var(--color-amber-950) 20%, transparent);
|
|
2550
|
-
}
|
|
2551
|
-
}
|
|
2552
2498
|
.dark\:bg-amber-950\/40 {
|
|
2553
2499
|
background-color: color-mix(in srgb, oklch(27.9% 0.077 45.635) 40%, transparent);
|
|
2554
2500
|
}
|
|
@@ -3128,12 +3074,6 @@
|
|
|
3128
3074
|
.dark\:text-zinc-500 {
|
|
3129
3075
|
color: var(--color-zinc-500);
|
|
3130
3076
|
}
|
|
3131
|
-
.dark\:placeholder-white\/30::placeholder {
|
|
3132
|
-
color: color-mix(in srgb, #fff 30%, transparent);
|
|
3133
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
3134
|
-
color: color-mix(in oklab, var(--color-white) 30%, transparent);
|
|
3135
|
-
}
|
|
3136
|
-
}
|
|
3137
3077
|
.dark\:ring-white\/10 {
|
|
3138
3078
|
--tw-ring-color: color-mix(in srgb, #fff 10%, transparent);
|
|
3139
3079
|
}
|
|
@@ -3151,14 +3091,6 @@
|
|
|
3151
3091
|
border-color: color-mix(in oklab, var(--color-white) 50%, transparent);
|
|
3152
3092
|
}
|
|
3153
3093
|
}
|
|
3154
|
-
}
|
|
3155
|
-
.dark\:focus-within\:border-white\/20:focus-within {
|
|
3156
|
-
border-color: color-mix(in srgb, #fff 20%, transparent);
|
|
3157
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
3158
|
-
border-color: color-mix(in oklab, var(--color-white) 20%, transparent);
|
|
3159
|
-
}
|
|
3160
|
-
}
|
|
3161
|
-
@media (hover: hover) {
|
|
3162
3094
|
.dark\:hover\:border-emerald-500\/20:hover {
|
|
3163
3095
|
border-color: color-mix(in srgb, oklch(69.6% 0.17 162.48) 20%, transparent);
|
|
3164
3096
|
}
|
|
@@ -3249,9 +3181,6 @@
|
|
|
3249
3181
|
.dark\:hover\:text-slate-200:hover {
|
|
3250
3182
|
color: var(--color-slate-200);
|
|
3251
3183
|
}
|
|
3252
|
-
.dark\:hover\:text-white:hover {
|
|
3253
|
-
color: var(--color-white);
|
|
3254
|
-
}
|
|
3255
3184
|
.dark\:hover\:text-white\/60:hover {
|
|
3256
3185
|
color: color-mix(in srgb, #fff 60%, transparent);
|
|
3257
3186
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { C as ChatWidgetProps, a as ChatWindowProps, D as DocumentUploadProps, M as MessageBubbleProps, S as SourceCardProps, b as ConfigProviderProps, c as ClientConfig, P as ProductCardProps, d as ProductCarouselProps, e as ChatViewportSize, R as RemoteConfig } from './index-
|
|
3
|
-
export { A as AuthenticationException, B as BatchOptions, f as BatchProcessor, g as BatchResult, h as ChartType, i as Chunk, j as ChunkOptions, k as CircuitBreaker, l as CircuitBreakerOptions, m as ConfigFetcher, n as ConfigurationException, o as DecisionContext, E as EmbeddingFailedException, I as IRenderRule, p as IRendererStrategy, q as IntentCategory, L as LicenseTierConfig, r as LicenseValidationError, s as LicenseValidationRequest, t as LicenseValidationResponse, u as LicenseValidator, v as ProviderCredentials, w as ProviderNotFoundException, x as RateLimitException, y as RemoteEmbeddingConfig, z as RemoteLLMConfig, F as RemoteVectorConfig, G as RenderDecision, H as RenderType, J as RetrievalException, K as Retrivora, N as RetrivoraError, O as RetrivoraErrorCode, Q as SDKVersionUnsupportedError, T as SDK_VERSION, U as isTransientError } from './index-
|
|
4
|
-
import { O as ObservabilityTrace, P as Product, U as UITransformationResponse, a as UseRagChatOptions, b as UseRagChatReturn, c as ProjectChatSettings } from './ILLMProvider-
|
|
5
|
-
export { A as AuthMode, C as ChatMessage, d as ChatOptions, e as ChatResponse, E as EmbedOptions, f as EmbeddingConfig, g as EmbeddingProvider, I as ILLMProvider, h as IngestDocument, L as LLMConfig, i as LLMProvider, j as LatencyBreakdown, k as ProjectAiSettings, l as ProjectAuthSettings, m as ProjectBrandingSettings, n as ProjectTelemetrySettings, o as ProjectWidgetSettings, R as RAGConfig, p as RagConfig, q as RagMessage, r as RetrievalConfig, s as RetrievedChunk, T as ThemeMode, t as TokenUsage, u as UIConfig, v as UniversalRagConfig, w as UpsertDocument, V as VectorDBConfig, x as VectorDBProvider, y as VectorMatch, W as WidgetPosition, z as WorkflowConfig, B as createDefaultProjectSettings, D as normalizeProjectSettings, F as projectSettingsToUiConfig } from './ILLMProvider-
|
|
2
|
+
import { C as ChatWidgetProps, a as ChatWindowProps, D as DocumentUploadProps, M as MessageBubbleProps, S as SourceCardProps, b as ConfigProviderProps, c as ClientConfig, P as ProductCardProps, d as ProductCarouselProps, e as ChatViewportSize, R as RemoteConfig } from './index-Byv5MaYi.mjs';
|
|
3
|
+
export { A as AuthenticationException, B as BatchOptions, f as BatchProcessor, g as BatchResult, h as ChartType, i as Chunk, j as ChunkOptions, k as CircuitBreaker, l as CircuitBreakerOptions, m as ConfigFetcher, n as ConfigurationException, o as DecisionContext, E as EmbeddingFailedException, I as IRenderRule, p as IRendererStrategy, q as IntentCategory, L as LicenseTierConfig, r as LicenseValidationError, s as LicenseValidationRequest, t as LicenseValidationResponse, u as LicenseValidator, v as ProviderCredentials, w as ProviderNotFoundException, x as RateLimitException, y as RemoteEmbeddingConfig, z as RemoteLLMConfig, F as RemoteVectorConfig, G as RenderDecision, H as RenderType, J as RetrievalException, K as Retrivora, N as RetrivoraError, O as RetrivoraErrorCode, Q as SDKVersionUnsupportedError, T as SDK_VERSION, U as isTransientError } from './index-Byv5MaYi.mjs';
|
|
4
|
+
import { O as ObservabilityTrace, P as Product, U as UITransformationResponse, a as UseRagChatOptions, b as UseRagChatReturn, c as ProjectChatSettings } from './ILLMProvider-DwFj0h2u.mjs';
|
|
5
|
+
export { A as AuthMode, C as ChatMessage, d as ChatOptions, e as ChatResponse, E as EmbedOptions, f as EmbeddingConfig, g as EmbeddingProvider, I as ILLMProvider, h as IngestDocument, L as LLMConfig, i as LLMProvider, j as LatencyBreakdown, k as ProjectAiSettings, l as ProjectAuthSettings, m as ProjectBrandingSettings, n as ProjectTelemetrySettings, o as ProjectWidgetSettings, R as RAGConfig, p as RagConfig, q as RagMessage, r as RetrievalConfig, s as RetrievedChunk, T as ThemeMode, t as TokenUsage, u as UIConfig, v as UniversalRagConfig, w as UpsertDocument, V as VectorDBConfig, x as VectorDBProvider, y as VectorMatch, W as WidgetPosition, z as WorkflowConfig, B as createDefaultProjectSettings, D as normalizeProjectSettings, F as projectSettingsToUiConfig } from './ILLMProvider-DwFj0h2u.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* ChatWidget — Floating Action Button (FAB) that toggles the chat window.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* - Proactively validates on mount to visually lock the widget when no
|
|
13
|
-
* valid license is present (TERMINATED / SUSPENDED / missing)
|
|
14
|
-
* - Manages window resize, maximize, and visual positioning
|
|
15
|
-
* - Shows an error toast when license validation fails on user attempt
|
|
10
|
+
* Initialization is handled entirely by ConfigProvider (validate → /config).
|
|
11
|
+
* ChatWidget reads the resulting context flags to decide its visual state:
|
|
16
12
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* 4. Environment variables `NEXT_PUBLIC_RETRIVORA_LICENSE_KEY` / `RETRIVORA_LICENSE_KEY`
|
|
13
|
+
* isProjectSettingsLoading → null (invisible while sequence is in-flight)
|
|
14
|
+
* !isLicenseValid → disabled/locked FAB (license expired or invalid)
|
|
15
|
+
* !isConfigLoaded → disabled/locked FAB (/config API failed)
|
|
16
|
+
* both true → active FAB that opens the chat window
|
|
22
17
|
*
|
|
23
|
-
*
|
|
18
|
+
* No additional network calls are made by ChatWidget itself.
|
|
24
19
|
*/
|
|
25
20
|
declare function ChatWidget({ position, onAddToCart, apiUrl, retrivoraApiBase, licenseKey: licenseKeyProp, headers }: ChatWidgetProps): React.JSX.Element | null;
|
|
26
21
|
|
|
@@ -73,6 +68,16 @@ declare function ObservabilityPanel({ trace, primaryColor }: ObservabilityPanelP
|
|
|
73
68
|
* ConfigProvider — React Context that makes RagConfig (UI subset) available
|
|
74
69
|
* to all child components without prop drilling.
|
|
75
70
|
*
|
|
71
|
+
* Initialization sequence (sequential, short-circuits on failure):
|
|
72
|
+
* 1. POST /validate — verify the license key is ACTIVE
|
|
73
|
+
* ↳ If invalid/expired → isLicenseValid=false, isConfigLoaded=false, stop.
|
|
74
|
+
* ChatWidget shows a disabled/locked FAB immediately.
|
|
75
|
+
* 2. GET /config — fetch project credentials & settings (only if step 1 passed)
|
|
76
|
+
* ↳ If fails → isLicenseValid=true, isConfigLoaded=false.
|
|
77
|
+
* ChatWidget shows a disabled FAB (config unavailable).
|
|
78
|
+
* 3. All good → isLicenseValid=true, isConfigLoaded=true.
|
|
79
|
+
* ChatWidget shows the active FAB.
|
|
80
|
+
*
|
|
76
81
|
* Only the UI-safe portions of RagConfig are exposed to the client.
|
|
77
82
|
*/
|
|
78
83
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { C as ChatWidgetProps, a as ChatWindowProps, D as DocumentUploadProps, M as MessageBubbleProps, S as SourceCardProps, b as ConfigProviderProps, c as ClientConfig, P as ProductCardProps, d as ProductCarouselProps, e as ChatViewportSize, R as RemoteConfig } from './index
|
|
3
|
-
export { A as AuthenticationException, B as BatchOptions, f as BatchProcessor, g as BatchResult, h as ChartType, i as Chunk, j as ChunkOptions, k as CircuitBreaker, l as CircuitBreakerOptions, m as ConfigFetcher, n as ConfigurationException, o as DecisionContext, E as EmbeddingFailedException, I as IRenderRule, p as IRendererStrategy, q as IntentCategory, L as LicenseTierConfig, r as LicenseValidationError, s as LicenseValidationRequest, t as LicenseValidationResponse, u as LicenseValidator, v as ProviderCredentials, w as ProviderNotFoundException, x as RateLimitException, y as RemoteEmbeddingConfig, z as RemoteLLMConfig, F as RemoteVectorConfig, G as RenderDecision, H as RenderType, J as RetrievalException, K as Retrivora, N as RetrivoraError, O as RetrivoraErrorCode, Q as SDKVersionUnsupportedError, T as SDK_VERSION, U as isTransientError } from './index
|
|
4
|
-
import { O as ObservabilityTrace, P as Product, U as UITransformationResponse, a as UseRagChatOptions, b as UseRagChatReturn, c as ProjectChatSettings } from './ILLMProvider-
|
|
5
|
-
export { A as AuthMode, C as ChatMessage, d as ChatOptions, e as ChatResponse, E as EmbedOptions, f as EmbeddingConfig, g as EmbeddingProvider, I as ILLMProvider, h as IngestDocument, L as LLMConfig, i as LLMProvider, j as LatencyBreakdown, k as ProjectAiSettings, l as ProjectAuthSettings, m as ProjectBrandingSettings, n as ProjectTelemetrySettings, o as ProjectWidgetSettings, R as RAGConfig, p as RagConfig, q as RagMessage, r as RetrievalConfig, s as RetrievedChunk, T as ThemeMode, t as TokenUsage, u as UIConfig, v as UniversalRagConfig, w as UpsertDocument, V as VectorDBConfig, x as VectorDBProvider, y as VectorMatch, W as WidgetPosition, z as WorkflowConfig, B as createDefaultProjectSettings, D as normalizeProjectSettings, F as projectSettingsToUiConfig } from './ILLMProvider-
|
|
2
|
+
import { C as ChatWidgetProps, a as ChatWindowProps, D as DocumentUploadProps, M as MessageBubbleProps, S as SourceCardProps, b as ConfigProviderProps, c as ClientConfig, P as ProductCardProps, d as ProductCarouselProps, e as ChatViewportSize, R as RemoteConfig } from './index-DP3_OpuB.js';
|
|
3
|
+
export { A as AuthenticationException, B as BatchOptions, f as BatchProcessor, g as BatchResult, h as ChartType, i as Chunk, j as ChunkOptions, k as CircuitBreaker, l as CircuitBreakerOptions, m as ConfigFetcher, n as ConfigurationException, o as DecisionContext, E as EmbeddingFailedException, I as IRenderRule, p as IRendererStrategy, q as IntentCategory, L as LicenseTierConfig, r as LicenseValidationError, s as LicenseValidationRequest, t as LicenseValidationResponse, u as LicenseValidator, v as ProviderCredentials, w as ProviderNotFoundException, x as RateLimitException, y as RemoteEmbeddingConfig, z as RemoteLLMConfig, F as RemoteVectorConfig, G as RenderDecision, H as RenderType, J as RetrievalException, K as Retrivora, N as RetrivoraError, O as RetrivoraErrorCode, Q as SDKVersionUnsupportedError, T as SDK_VERSION, U as isTransientError } from './index-DP3_OpuB.js';
|
|
4
|
+
import { O as ObservabilityTrace, P as Product, U as UITransformationResponse, a as UseRagChatOptions, b as UseRagChatReturn, c as ProjectChatSettings } from './ILLMProvider-DwFj0h2u.js';
|
|
5
|
+
export { A as AuthMode, C as ChatMessage, d as ChatOptions, e as ChatResponse, E as EmbedOptions, f as EmbeddingConfig, g as EmbeddingProvider, I as ILLMProvider, h as IngestDocument, L as LLMConfig, i as LLMProvider, j as LatencyBreakdown, k as ProjectAiSettings, l as ProjectAuthSettings, m as ProjectBrandingSettings, n as ProjectTelemetrySettings, o as ProjectWidgetSettings, R as RAGConfig, p as RagConfig, q as RagMessage, r as RetrievalConfig, s as RetrievedChunk, T as ThemeMode, t as TokenUsage, u as UIConfig, v as UniversalRagConfig, w as UpsertDocument, V as VectorDBConfig, x as VectorDBProvider, y as VectorMatch, W as WidgetPosition, z as WorkflowConfig, B as createDefaultProjectSettings, D as normalizeProjectSettings, F as projectSettingsToUiConfig } from './ILLMProvider-DwFj0h2u.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* ChatWidget — Floating Action Button (FAB) that toggles the chat window.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* - Proactively validates on mount to visually lock the widget when no
|
|
13
|
-
* valid license is present (TERMINATED / SUSPENDED / missing)
|
|
14
|
-
* - Manages window resize, maximize, and visual positioning
|
|
15
|
-
* - Shows an error toast when license validation fails on user attempt
|
|
10
|
+
* Initialization is handled entirely by ConfigProvider (validate → /config).
|
|
11
|
+
* ChatWidget reads the resulting context flags to decide its visual state:
|
|
16
12
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* 4. Environment variables `NEXT_PUBLIC_RETRIVORA_LICENSE_KEY` / `RETRIVORA_LICENSE_KEY`
|
|
13
|
+
* isProjectSettingsLoading → null (invisible while sequence is in-flight)
|
|
14
|
+
* !isLicenseValid → disabled/locked FAB (license expired or invalid)
|
|
15
|
+
* !isConfigLoaded → disabled/locked FAB (/config API failed)
|
|
16
|
+
* both true → active FAB that opens the chat window
|
|
22
17
|
*
|
|
23
|
-
*
|
|
18
|
+
* No additional network calls are made by ChatWidget itself.
|
|
24
19
|
*/
|
|
25
20
|
declare function ChatWidget({ position, onAddToCart, apiUrl, retrivoraApiBase, licenseKey: licenseKeyProp, headers }: ChatWidgetProps): React.JSX.Element | null;
|
|
26
21
|
|
|
@@ -73,6 +68,16 @@ declare function ObservabilityPanel({ trace, primaryColor }: ObservabilityPanelP
|
|
|
73
68
|
* ConfigProvider — React Context that makes RagConfig (UI subset) available
|
|
74
69
|
* to all child components without prop drilling.
|
|
75
70
|
*
|
|
71
|
+
* Initialization sequence (sequential, short-circuits on failure):
|
|
72
|
+
* 1. POST /validate — verify the license key is ACTIVE
|
|
73
|
+
* ↳ If invalid/expired → isLicenseValid=false, isConfigLoaded=false, stop.
|
|
74
|
+
* ChatWidget shows a disabled/locked FAB immediately.
|
|
75
|
+
* 2. GET /config — fetch project credentials & settings (only if step 1 passed)
|
|
76
|
+
* ↳ If fails → isLicenseValid=true, isConfigLoaded=false.
|
|
77
|
+
* ChatWidget shows a disabled FAB (config unavailable).
|
|
78
|
+
* 3. All good → isLicenseValid=true, isConfigLoaded=true.
|
|
79
|
+
* ChatWidget shows the active FAB.
|
|
80
|
+
*
|
|
76
81
|
* Only the UI-safe portions of RagConfig are exposed to the client.
|
|
77
82
|
*/
|
|
78
83
|
|