@retrivora-ai/rag-engine 2.3.9 → 2.4.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 (47) hide show
  1. package/README.md +1 -1
  2. package/dist/{BatchProcessor-C42_RVWO.d.ts → BatchProcessor-D42E706a.d.ts} +12 -1
  3. package/dist/{BatchProcessor-BhLczWj5.d.mts → BatchProcessor-zbQMaZHm.d.mts} +12 -1
  4. package/dist/{ILLMProvider-B8TAVx3j.d.mts → ILLMProvider-Y6aL5N8J.d.mts} +1 -0
  5. package/dist/{ILLMProvider-B8TAVx3j.d.ts → ILLMProvider-Y6aL5N8J.d.ts} +1 -0
  6. package/dist/handlers/index.d.mts +2 -2
  7. package/dist/handlers/index.d.ts +2 -2
  8. package/dist/handlers/index.js +26 -85
  9. package/dist/handlers/index.mjs +26 -85
  10. package/dist/{index-C7aHK7_g.d.mts → index-59CHg0V3.d.mts} +1 -1
  11. package/dist/{index-BQd6Bax0.d.ts → index-BgKRInpa.d.ts} +1 -1
  12. package/dist/index.css +83 -0
  13. package/dist/index.d.mts +5 -5
  14. package/dist/index.d.ts +5 -5
  15. package/dist/index.js +482 -260
  16. package/dist/index.mjs +494 -269
  17. package/dist/server.d.mts +9 -6
  18. package/dist/server.d.ts +9 -6
  19. package/dist/server.js +34 -118
  20. package/dist/server.mjs +34 -118
  21. package/package.json +1 -1
  22. package/src/LicensedRetrivora.ts +21 -16
  23. package/src/components/ChatWindow.tsx +296 -28
  24. package/src/components/ConfigProvider.tsx +10 -1
  25. package/src/components/DocumentUpload.tsx +28 -29
  26. package/src/components/UIDispatcher.tsx +1 -1
  27. package/src/config/LicenseConfigResolver.ts +14 -12
  28. package/src/config/RagConfig.ts +1 -0
  29. package/src/config/serverConfig.ts +31 -29
  30. package/src/config/uiConstants.ts +1 -0
  31. package/src/core/ConfigFetcher.ts +2 -2
  32. package/src/core/LLMRouter.ts +3 -3
  33. package/src/core/PluginManager.ts +5 -5
  34. package/src/core/mcp.ts +5 -5
  35. package/src/handlers/index.ts +11 -5
  36. package/src/hooks/useRagChat.ts +13 -13
  37. package/src/index.css +83 -0
  38. package/src/llm/LLMFactory.ts +1 -1
  39. package/src/llm/providers/UniversalLLMAdapter.ts +18 -18
  40. package/src/providers/graphdb/SimpleGraphProvider.ts +5 -5
  41. package/src/providers/vectordb/ChromaDBProvider.ts +4 -4
  42. package/src/providers/vectordb/MultiTablePostgresProvider.ts +32 -32
  43. package/src/providers/vectordb/QdrantProvider.ts +17 -17
  44. package/src/telemetry/TelemetryService.ts +12 -12
  45. package/src/types/props.ts +11 -0
  46. package/src/utils/SchemaMapper.ts +1 -1
  47. package/src/utils/UITransformer.ts +1 -1
@@ -302,7 +302,7 @@ var init_package = __esm({
302
302
  "package.json"() {
303
303
  package_default = {
304
304
  name: "@retrivora-ai/rag-engine",
305
- version: "2.3.9",
305
+ version: "2.4.1",
306
306
  description: "Retrivora AI is a plug-and-play AI engine for RAG chat experiences \u2014 generic vector DB + LLM provider, embeddable or standalone.",
307
307
  author: "Abhinav Alkuchi",
308
308
  license: "UNLICENSED",
@@ -497,7 +497,6 @@ var init_ConfigFetcher = __esm({
497
497
  for (const baseUrl of controlPlaneUrls) {
498
498
  try {
499
499
  const url = `${baseUrl}/api/v1/config?projectId=${encodeURIComponent(projectId)}`;
500
- console.log(`[ConfigFetcher] Fetching config from: ${url}`);
501
500
  const res = await fetch(url, {
502
501
  method: "GET",
503
502
  headers: __spreadValues({
@@ -505,7 +504,6 @@ var init_ConfigFetcher = __esm({
505
504
  "x-sdk-version": SDK_VERSION
506
505
  }, licenseKey ? { "x-license-key": licenseKey } : {})
507
506
  });
508
- console.log(`[ConfigFetcher] Response status: ${res.status}`);
509
507
  if (!res.ok) {
510
508
  console.warn(`[ConfigFetcher] Error text: ${await res.text()}`);
511
509
  }
@@ -1224,9 +1222,6 @@ var init_MultiTablePostgresProvider = __esm({
1224
1222
  if (this.tables.length === 0) {
1225
1223
  console.warn('[MultiTablePostgresProvider] No tables with "embedding" columns found in the database.');
1226
1224
  } else {
1227
- console.log(
1228
- `[MultiTablePostgresProvider] Connected. Searching across ${this.tables.length} table(s): ${this.tables.join(", ")}`
1229
- );
1230
1225
  }
1231
1226
  } finally {
1232
1227
  client.release();
@@ -1348,11 +1343,8 @@ var init_MultiTablePostgresProvider = __esm({
1348
1343
  }
1349
1344
  const vectorLiteral = `[${vector.join(",")}]`;
1350
1345
  const allResults = [];
1351
- console.log(`[MultiTablePostgresProvider] --- Starting Multi-Table Search ---`);
1352
1346
  const queryText = _filter == null ? void 0 : _filter.queryText;
1353
1347
  const entityHints = Array.isArray(_filter == null ? void 0 : _filter.keywords) ? _filter.keywords.map((k) => k.trim().toLowerCase()).filter(Boolean) : [];
1354
- console.log(`[MultiTablePostgresProvider] queryText: "${queryText}"`);
1355
- console.log(`[MultiTablePostgresProvider] entityHints: [${entityHints.join(", ")}]`);
1356
1348
  const getDynamicKeywordQuery = () => {
1357
1349
  if (entityHints.length > 0) {
1358
1350
  return entityHints.map((h) => h.replace(/\s+/g, " & ")).join(" & ");
@@ -1440,9 +1432,7 @@ var init_MultiTablePostgresProvider = __esm({
1440
1432
  }
1441
1433
  const result = await this.pool.query(sqlQuery, params);
1442
1434
  if (result.rowCount && result.rowCount > 0) {
1443
- console.log(` \u2705 Table "${table}": Found ${result.rowCount} potential matches. Top score: ${result.rows[0].hybrid_score.toFixed(4)}`);
1444
1435
  } else {
1445
- console.log(` \u26AA Table "${table}": No relevant matches found.`);
1446
1436
  }
1447
1437
  const tableResults = [];
1448
1438
  for (const row of result.rows) {
@@ -1480,9 +1470,6 @@ var init_MultiTablePostgresProvider = __esm({
1480
1470
  var _a4;
1481
1471
  return ((_a4 = res.metadata) == null ? void 0 : _a4.source_table) === bestMatchTable;
1482
1472
  });
1483
- console.log(`[MultiTablePostgresProvider] --- Search Complete ---`);
1484
- console.log(`[MultiTablePostgresProvider] Final top match from "${bestMatchTable}" with score ${finalSorted[0].score.toFixed(4)}`);
1485
- console.log(`[MultiTablePostgresProvider] Restricting recommendations strictly to table: "${bestMatchTable}"`);
1486
1473
  return finalSorted.slice(0, Math.max(topK, 15));
1487
1474
  }
1488
1475
  async delete(_id, _namespace) {
@@ -1860,13 +1847,11 @@ var init_QdrantProvider = __esm({
1860
1847
  if (this.schemaDiscovered) return;
1861
1848
  await this.ping();
1862
1849
  await this.ensureCollection();
1863
- console.log(`[QdrantProvider] \u{1F50D} Discovering schema for collection "${this.indexName}"...`);
1864
1850
  const discoveredFields = await this.discoverSchema();
1865
1851
  const opts = this.config.options;
1866
1852
  const configFields = opts.filterableFields || [];
1867
1853
  const allFields = [.../* @__PURE__ */ new Set([...discoveredFields, ...configFields])];
1868
1854
  if (allFields.length > 0) {
1869
- console.log(`[QdrantProvider] \u{1F6E0} Ensuring indexes for ${allFields.length} discovered fields...`);
1870
1855
  await Promise.all(
1871
1856
  allFields.map(async (fieldInfo) => {
1872
1857
  const [fieldName, schemaType] = fieldInfo.split(":");
@@ -1874,7 +1859,6 @@ var init_QdrantProvider = __esm({
1874
1859
  })
1875
1860
  );
1876
1861
  } else {
1877
- console.log(`[QdrantProvider] \u2139\uFE0F No fields discovered for indexing.`);
1878
1862
  }
1879
1863
  this.schemaDiscovered = true;
1880
1864
  }
@@ -1918,19 +1902,16 @@ var init_QdrantProvider = __esm({
1918
1902
  var _a3;
1919
1903
  try {
1920
1904
  await this.http.get(`/collections/${this.indexName}`);
1921
- console.log(`[QdrantProvider] \u2705 Collection "${this.indexName}" already exists.`);
1922
1905
  } catch (err) {
1923
1906
  if (axios4.isAxiosError(err) && ((_a3 = err.response) == null ? void 0 : _a3.status) === 404) {
1924
1907
  const opts = this.config.options;
1925
1908
  const dimensionsForCreate = opts.dimensions || 1536;
1926
- console.log(`[QdrantProvider] \u23F3 Creating collection "${this.indexName}" (dimensions: ${dimensionsForCreate})...`);
1927
1909
  await this.http.put(`/collections/${this.indexName}`, {
1928
1910
  vectors: {
1929
1911
  size: dimensionsForCreate,
1930
1912
  distance: "Cosine"
1931
1913
  }
1932
1914
  });
1933
- console.log(`[QdrantProvider] \u2705 Created collection "${this.indexName}"`);
1934
1915
  } else {
1935
1916
  throw err;
1936
1917
  }
@@ -1950,7 +1931,6 @@ var init_QdrantProvider = __esm({
1950
1931
  field_name: fullPath,
1951
1932
  field_schema: schema
1952
1933
  });
1953
- console.log(`[QdrantProvider] \u2705 Ensured ${schema} index for "${fullPath}"`);
1954
1934
  } catch (err) {
1955
1935
  let status;
1956
1936
  if (axios4.isAxiosError(err)) status = (_a3 = err.response) == null ? void 0 : _a3.status;
@@ -2103,15 +2083,12 @@ var init_ChromaDBProvider = __esm({
2103
2083
  try {
2104
2084
  const { data } = await this.http.get(`/api/v1/collections/${this.indexName}`);
2105
2085
  this.collectionId = data.id;
2106
- console.log(`[ChromaDBProvider] \u2705 Collection "${this.indexName}" found (id: ${this.collectionId})`);
2107
2086
  } catch (err) {
2108
2087
  if (axios5.isAxiosError(err) && ((_a3 = err.response) == null ? void 0 : _a3.status) === 404) {
2109
- console.log(`[ChromaDBProvider] \u23F3 Collection "${this.indexName}" not found. Creating...`);
2110
2088
  const { data } = await this.http.post("/api/v1/collections", {
2111
2089
  name: this.indexName
2112
2090
  });
2113
2091
  this.collectionId = data.id;
2114
- console.log(`[ChromaDBProvider] \u2705 Created collection "${this.indexName}" (id: ${this.collectionId})`);
2115
2092
  } else {
2116
2093
  throw err;
2117
2094
  }
@@ -2597,7 +2574,6 @@ var init_SimpleGraphProvider = __esm({
2597
2574
  this.edges = [];
2598
2575
  }
2599
2576
  async initialize() {
2600
- console.log("[SimpleGraphProvider] Initialised in-memory graph store.");
2601
2577
  }
2602
2578
  async addNodes(nodes) {
2603
2579
  for (const node of nodes) {
@@ -2997,7 +2973,7 @@ function readEnum(env, name, fallback, allowed) {
2997
2973
  throw new Error(`[getRagConfig] ${name} must be one of: ${allowed.join(", ")}`);
2998
2974
  }
2999
2975
  function getEnvConfig(env = process.env, base) {
3000
- var _a3, _b, _c, _d, _e, _f, _g2, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na, _Oa, _Pa, _Qa, _Ra, _Sa, _Ta, _Ua, _Va, _Wa, _Xa, _Ya, _Za, __a, _$a, _ab, _bb, _cb, _db, _eb, _fb, _gb, _hb, _ib, _jb, _kb, _lb, _mb, _nb, _ob, _pb, _qb, _rb, _sb, _tb, _ub, _vb, _wb, _xb, _yb, _zb, _Ab, _Bb, _Cb, _Db, _Eb, _Fb, _Gb, _Hb, _Ib;
2976
+ var _a3, _b, _c, _d, _e, _f, _g2, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na, _Oa, _Pa, _Qa, _Ra, _Sa, _Ta, _Ua, _Va, _Wa, _Xa, _Ya, _Za, __a, _$a, _ab, _bb, _cb, _db, _eb, _fb, _gb, _hb, _ib, _jb, _kb, _lb, _mb, _nb, _ob, _pb, _qb, _rb, _sb, _tb, _ub, _vb, _wb, _xb, _yb, _zb, _Ab, _Bb, _Cb, _Db, _Eb, _Fb, _Gb, _Hb, _Ib, _Jb, _Kb, _Lb, _Mb, _Nb;
3001
2977
  const licenseKey = (_d = (_c = (_b = (_a3 = readString(env, "RAG_LICENSE_KEY")) != null ? _a3 : readString(env, "RETRIVORA_LICENSE_KEY")) != null ? _b : readString(env, "NEXT_PUBLIC_RETRIVORA_LICENSE_KEY")) != null ? _c : readString(env, "LICENSE_KEY")) != null ? _d : base == null ? void 0 : base.licenseKey;
3002
2978
  const jwtProjectId = (() => {
3003
2979
  if (!licenseKey) return void 0;
@@ -3099,26 +3075,12 @@ function getEnvConfig(env = process.env, base) {
3099
3075
  const llmModel = (_Ca = (_Ba = (_Aa = readString(env, "LLM_MODEL")) != null ? _Aa : (_za = base == null ? void 0 : base.llm) == null ? void 0 : _za.model) != null ? _Ba : rt == null ? void 0 : rt.llmModel) != null ? _Ca : tierBasedLLMModel;
3100
3076
  const llmApiKey = (_Ga = (_Fa = (_Da = readString(env, "LITELLM_MASTER_KEY")) != null ? _Da : rt == null ? void 0 : rt.litellmApiKey) != null ? _Fa : (_Ea = base == null ? void 0 : base.llm) == null ? void 0 : _Ea.apiKey) != null ? _Ga : licenseKey;
3101
3077
  const llmProfile = (_Ka = (_Ja = readString(env, "LLM_UNIVERSAL_PROFILE")) != null ? _Ja : (_Ia = (_Ha = base == null ? void 0 : base.llm) == null ? void 0 : _Ha.options) == null ? void 0 : _Ia.profile) != null ? _Ka : "litellm";
3102
- console.log("[serverConfig] \u{1F527} LLM Configuration:", {
3103
- baseUrl: llmBaseUrl,
3104
- model: llmModel,
3105
- provider: llmProvider,
3106
- hasApiKey: !!llmApiKey,
3107
- source: (rt == null ? void 0 : rt.llmModel) ? "runtime-injected" : "env/fallback"
3108
- });
3109
3078
  const defaultEmbeddingProvider = "universal_rest";
3110
3079
  const embeddingProvider = (_Na = (_Ma = readEnum(env, "EMBEDDING_PROVIDER", defaultEmbeddingProvider, EMBEDDING_PROVIDERS)) != null ? _Ma : (_La = base == null ? void 0 : base.embedding) == null ? void 0 : _La.provider) != null ? _Na : defaultEmbeddingProvider;
3111
3080
  const embeddingBaseUrl = (_Ua = (_Ta = (_Sa = (_Ra = (_Pa = (_Oa = readString(env, "LITELLM_BASE_URL")) != null ? _Oa : readString(env, "EMBEDDING_BASE_URL")) != null ? _Pa : readString(env, "LLM_BASE_URL")) != null ? _Ra : (_Qa = base == null ? void 0 : base.embedding) == null ? void 0 : _Qa.baseUrl) != null ? _Sa : rt == null ? void 0 : rt.embeddingBaseUrl) != null ? _Ta : rt == null ? void 0 : rt.llmBaseUrl) != null ? _Ua : defaultGatewayUrl;
3112
3081
  const embeddingModel = (_Ya = (_Xa = (_Wa = readString(env, "EMBEDDING_MODEL")) != null ? _Wa : (_Va = base == null ? void 0 : base.embedding) == null ? void 0 : _Va.model) != null ? _Xa : rt == null ? void 0 : rt.embeddingModel) != null ? _Ya : tierBasedEmbeddingModel;
3113
3082
  const embeddingApiKey = (_ab = (_$a = (_Za = readString(env, "LITELLM_MASTER_KEY")) != null ? _Za : rt == null ? void 0 : rt.litellmApiKey) != null ? _$a : (__a = base == null ? void 0 : base.embedding) == null ? void 0 : __a.apiKey) != null ? _ab : licenseKey;
3114
3083
  const embeddingProfile = (_eb = (_db = readString(env, "EMBEDDING_UNIVERSAL_PROFILE")) != null ? _db : (_cb = (_bb = base == null ? void 0 : base.embedding) == null ? void 0 : _bb.options) == null ? void 0 : _cb.profile) != null ? _eb : "litellm";
3115
- console.log("[serverConfig] \u{1F527} Embedding Configuration:", {
3116
- baseUrl: embeddingBaseUrl,
3117
- model: embeddingModel,
3118
- provider: embeddingProvider,
3119
- hasApiKey: !!embeddingApiKey,
3120
- source: (rt == null ? void 0 : rt.embeddingModel) ? "runtime-injected" : "env/fallback"
3121
- });
3122
3084
  return __spreadProps(__spreadValues({
3123
3085
  projectId,
3124
3086
  licenseKey,
@@ -3132,8 +3094,8 @@ function getEnvConfig(env = process.env, base) {
3132
3094
  model: llmModel,
3133
3095
  apiKey: llmApiKey,
3134
3096
  baseUrl: llmBaseUrl,
3135
- systemPrompt: readString(env, "LLM_SYSTEM_PROMPT"),
3136
- maxTokens: readNumber(env, "LLM_MAX_TOKENS", 4096),
3097
+ systemPrompt: (_hb = readString(env, "LLM_SYSTEM_PROMPT")) != null ? _hb : rt == null ? void 0 : rt.systemPrompt,
3098
+ maxTokens: readNumber(env, "LLM_MAX_TOKENS", (_ib = rt == null ? void 0 : rt.maxTokens) != null ? _ib : 4096),
3137
3099
  temperature: readNumber(env, "LLM_TEMPERATURE", 0.7),
3138
3100
  options: {
3139
3101
  profile: llmProfile,
@@ -3154,30 +3116,30 @@ function getEnvConfig(env = process.env, base) {
3154
3116
  }
3155
3117
  },
3156
3118
  ui: {
3157
- title: (_ib = (_hb = readString(env, "NEXT_PUBLIC_UI_TITLE")) != null ? _hb : readString(env, "UI_TITLE")) != null ? _ib : "AI Assistant",
3158
- subtitle: (_kb = (_jb = readString(env, "NEXT_PUBLIC_UI_SUBTITLE")) != null ? _jb : readString(env, "UI_SUBTITLE")) != null ? _kb : "Powered by RAG",
3159
- primaryColor: (_mb = (_lb = readString(env, "NEXT_PUBLIC_PRIMARY_COLOR")) != null ? _lb : readString(env, "UI_PRIMARY_COLOR")) != null ? _mb : "#10b981",
3160
- accentColor: (_ob = (_nb = readString(env, "NEXT_PUBLIC_ACCENT_COLOR")) != null ? _nb : readString(env, "UI_ACCENT_COLOR")) != null ? _ob : "#3b82f6",
3161
- logoUrl: (_pb = readString(env, "NEXT_PUBLIC_LOGO_URL")) != null ? _pb : readString(env, "UI_LOGO_URL"),
3162
- placeholder: (_rb = (_qb = readString(env, "NEXT_PUBLIC_PLACEHOLDER")) != null ? _qb : readString(env, "UI_PLACEHOLDER")) != null ? _rb : "Ask me anything\u2026",
3163
- showSources: ((_tb = (_sb = readString(env, "NEXT_PUBLIC_SHOW_SOURCES")) != null ? _sb : readString(env, "UI_SHOW_SOURCES")) != null ? _tb : "true") !== "false",
3164
- welcomeMessage: (_vb = (_ub = readString(env, "NEXT_PUBLIC_WELCOME_MESSAGE")) != null ? _ub : readString(env, "UI_WELCOME_MESSAGE")) != null ? _vb : "Hello! I'm your AI assistant. Ask me anything about your documents.",
3165
- visualStyle: (_xb = (_wb = readString(env, "NEXT_PUBLIC_UI_VISUAL_STYLE")) != null ? _wb : readString(env, "UI_VISUAL_STYLE")) != null ? _xb : "glass",
3166
- borderRadius: (_zb = (_yb = readString(env, "NEXT_PUBLIC_UI_BORDER_RADIUS")) != null ? _yb : readString(env, "UI_BORDER_RADIUS")) != null ? _zb : "xl",
3167
- allowUpload: ((_Bb = (_Ab = readString(env, "NEXT_PUBLIC_ALLOW_UPLOAD")) != null ? _Ab : readString(env, "UI_ALLOW_UPLOAD")) != null ? _Bb : "false") === "true"
3119
+ title: (_kb = (_jb = readString(env, "NEXT_PUBLIC_UI_TITLE")) != null ? _jb : readString(env, "UI_TITLE")) != null ? _kb : "AI Assistant",
3120
+ subtitle: (_mb = (_lb = readString(env, "NEXT_PUBLIC_UI_SUBTITLE")) != null ? _lb : readString(env, "UI_SUBTITLE")) != null ? _mb : "Powered by RAG",
3121
+ primaryColor: (_ob = (_nb = readString(env, "NEXT_PUBLIC_PRIMARY_COLOR")) != null ? _nb : readString(env, "UI_PRIMARY_COLOR")) != null ? _ob : "#10b981",
3122
+ accentColor: (_qb = (_pb = readString(env, "NEXT_PUBLIC_ACCENT_COLOR")) != null ? _pb : readString(env, "UI_ACCENT_COLOR")) != null ? _qb : "#3b82f6",
3123
+ logoUrl: (_rb = readString(env, "NEXT_PUBLIC_LOGO_URL")) != null ? _rb : readString(env, "UI_LOGO_URL"),
3124
+ placeholder: (_tb = (_sb = readString(env, "NEXT_PUBLIC_PLACEHOLDER")) != null ? _sb : readString(env, "UI_PLACEHOLDER")) != null ? _tb : "Ask me anything\u2026",
3125
+ showSources: ((_vb = (_ub = readString(env, "NEXT_PUBLIC_SHOW_SOURCES")) != null ? _ub : readString(env, "UI_SHOW_SOURCES")) != null ? _vb : "true") !== "false",
3126
+ welcomeMessage: (_xb = (_wb = readString(env, "NEXT_PUBLIC_WELCOME_MESSAGE")) != null ? _wb : readString(env, "UI_WELCOME_MESSAGE")) != null ? _xb : "Hello! I'm your AI assistant. Ask me anything about your documents.",
3127
+ visualStyle: (_zb = (_yb = readString(env, "NEXT_PUBLIC_UI_VISUAL_STYLE")) != null ? _yb : readString(env, "UI_VISUAL_STYLE")) != null ? _zb : "glass",
3128
+ borderRadius: (_Bb = (_Ab = readString(env, "NEXT_PUBLIC_UI_BORDER_RADIUS")) != null ? _Ab : readString(env, "UI_BORDER_RADIUS")) != null ? _Bb : "xl",
3129
+ allowUpload: ((_Db = (_Cb = readString(env, "NEXT_PUBLIC_ALLOW_UPLOAD")) != null ? _Cb : readString(env, "UI_ALLOW_UPLOAD")) != null ? _Db : "false") === "true"
3168
3130
  },
3169
3131
  rag: {
3170
- topK: readNumber(env, "RAG_TOP_K", 5),
3132
+ topK: readNumber(env, "RAG_TOP_K", (_Eb = rt == null ? void 0 : rt.topK) != null ? _Eb : 5),
3171
3133
  scoreThreshold: readNumber(env, "RAG_SCORE_THRESHOLD", 0),
3172
- chunkSize: readNumber(env, "RAG_CHUNK_SIZE", 1e3),
3173
- chunkOverlap: readNumber(env, "RAG_CHUNK_OVERLAP", 200),
3174
- filterableFields: (_Cb = readString(env, "RAG_FILTERABLE_FIELDS")) == null ? void 0 : _Cb.split(",").map((f) => f.trim()),
3134
+ chunkSize: readNumber(env, "RAG_CHUNK_SIZE", (_Fb = rt == null ? void 0 : rt.chunkSize) != null ? _Fb : 1e3),
3135
+ chunkOverlap: readNumber(env, "RAG_CHUNK_OVERLAP", (_Gb = rt == null ? void 0 : rt.chunkOverlap) != null ? _Gb : 200),
3136
+ filterableFields: (_Hb = readString(env, "RAG_FILTERABLE_FIELDS")) == null ? void 0 : _Hb.split(",").map((f) => f.trim()),
3175
3137
  // Query pipeline toggles — read from .env.local
3176
3138
  useQueryTransformation: readString(env, "RAG_USE_QUERY_TRANSFORMATION") === "true",
3177
3139
  useReranking: readString(env, "RAG_USE_RERANKING") === "true",
3178
3140
  useGraphRetrieval: readString(env, "RAG_USE_GRAPH_RETRIEVAL") === "true",
3179
- architecture: (_Db = readString(env, "RAG_ARCHITECTURE")) != null ? _Db : "simple",
3180
- chunkingStrategy: (_Eb = readString(env, "RAG_CHUNKING_STRATEGY")) != null ? _Eb : "recursive",
3141
+ architecture: (_Ib = readString(env, "RAG_ARCHITECTURE")) != null ? _Ib : "simple",
3142
+ chunkingStrategy: (_Jb = readString(env, "RAG_CHUNKING_STRATEGY")) != null ? _Jb : "recursive",
3181
3143
  uiMapping: (() => {
3182
3144
  const raw = readString(env, "RAG_UI_MAPPING");
3183
3145
  if (!raw) return void 0;
@@ -3190,7 +3152,7 @@ function getEnvConfig(env = process.env, base) {
3190
3152
  },
3191
3153
  telemetry: {
3192
3154
  enabled: telemetryEnabled,
3193
- url: (_Ib = (_Hb = (_Fb = readString(env, "TELEMETRY_URL")) != null ? _Fb : readString(env, "NEXT_PUBLIC_TELEMETRY_URL")) != null ? _Hb : (_Gb = base == null ? void 0 : base.telemetry) == null ? void 0 : _Gb.url) != null ? _Ib : "https://www.retrivora.com/api/telemetry"
3155
+ url: (_Nb = (_Mb = (_Kb = readString(env, "TELEMETRY_URL")) != null ? _Kb : readString(env, "NEXT_PUBLIC_TELEMETRY_URL")) != null ? _Mb : (_Lb = base == null ? void 0 : base.telemetry) == null ? void 0 : _Lb.url) != null ? _Nb : "https://www.retrivora.com/api/telemetry"
3194
3156
  }
3195
3157
  }, readString(env, "GRAPH_DB_PROVIDER") ? {
3196
3158
  graphDb: {
@@ -4501,12 +4463,6 @@ var UniversalLLMAdapter = class {
4501
4463
  this.resolvedHeaders = __spreadValues(__spreadValues({
4502
4464
  "Content-Type": "application/json"
4503
4465
  }, config.apiKey ? { Authorization: `Bearer ${config.apiKey}` } : {}), this.opts.headers || {});
4504
- console.log("[UniversalLLMAdapter] Initialized with:", {
4505
- model: this.model,
4506
- baseUrl: this.baseUrl,
4507
- hasApiKey: !!this.apiKey,
4508
- apiKeyPrefix: this.apiKey ? `${this.apiKey.slice(0, 12)}...` : void 0
4509
- });
4510
4466
  this.http = axios2.create({
4511
4467
  baseURL: this.baseUrl,
4512
4468
  headers: this.resolvedHeaders,
@@ -4723,15 +4679,10 @@ ${context != null ? context : "None"}` },
4723
4679
  const path2 = (_a3 = this.opts.embedPath) != null ? _a3 : "/embeddings";
4724
4680
  const payload = this.opts.embedPayloadTemplate ? buildPayload(this.opts.embedPayloadTemplate, { input: text, model: this.model }) : { input: text, model: this.model };
4725
4681
  try {
4726
- console.log(`[UniversalLLMAdapter] Posting to embedding endpoint: ${this.baseUrl}${path2}`, {
4727
- model: this.model,
4728
- inputLength: typeof text === "string" ? text.length : "unknown"
4729
- });
4730
4682
  const { data } = await this.http.post(path2, payload);
4731
4683
  const extractPath = (_b = this.opts.embedExtractPath) != null ? _b : "data[0].embedding";
4732
4684
  const vector = resolvePath(data, extractPath);
4733
4685
  if (Array.isArray(vector)) {
4734
- console.log(`[UniversalLLMAdapter] Embedding HTTP request successful. Vector size: ${vector.length}`);
4735
4686
  return vector;
4736
4687
  }
4737
4688
  console.warn(
@@ -4757,12 +4708,10 @@ ${context != null ? context : "None"}` },
4757
4708
  }
4758
4709
  }
4759
4710
  try {
4760
- console.log(`[UniversalLLMAdapter] Retrying embedding request to: ${this.baseUrl}${path2}`);
4761
4711
  const { data } = await this.http.post(path2, payload);
4762
4712
  const extractPath = (_f = this.opts.embedExtractPath) != null ? _f : "data[0].embedding";
4763
4713
  const vector = resolvePath(data, extractPath);
4764
4714
  if (Array.isArray(vector)) {
4765
- console.log(`[UniversalLLMAdapter] Retry embedding HTTP request successful. Vector size: ${vector.length}`);
4766
4715
  return vector;
4767
4716
  }
4768
4717
  console.error(
@@ -4826,7 +4775,6 @@ var LLMFactory = class _LLMFactory {
4826
4775
  */
4827
4776
  static register(name, factory) {
4828
4777
  customProviders.set(name.toLowerCase(), factory);
4829
- console.log(`[LLMFactory] Registered custom provider: "${name}"`);
4830
4778
  }
4831
4779
  /**
4832
4780
  * Unregister a previously registered custom provider.
@@ -5606,7 +5554,6 @@ var MCPClient = class {
5606
5554
  });
5607
5555
  await this.sendNotification("notifications/initialized");
5608
5556
  this.initialized = true;
5609
- console.log(`[MCPClient] Connected and initialized server "${this.config.name}" successfully.`);
5610
5557
  } catch (err) {
5611
5558
  this.disconnect();
5612
5559
  throw new Error(`[MCPClient] Failed to initialize server "${this.config.name}": ${err.message}`);
@@ -5632,7 +5579,6 @@ var MCPClient = class {
5632
5579
  console.warn(`[MCPClient] [stderr] [${this.config.name}]:`, data.toString("utf-8"));
5633
5580
  });
5634
5581
  this.childProcess.on("close", (code) => {
5635
- console.log(`[MCPClient] Connection closed for "${this.config.name}" with exit code: ${code}`);
5636
5582
  this.disconnect();
5637
5583
  });
5638
5584
  await new Promise((resolve) => setTimeout(resolve, 100));
@@ -6761,13 +6707,11 @@ var LLMRouter = class {
6761
6707
  const providerFastDefault = (_a3 = FAST_MODEL_DEFAULTS[this.config.llm.provider]) != null ? _a3 : "";
6762
6708
  const fastModelName = envFastModel || providerFastDefault;
6763
6709
  if (fastModelName && fastModelName !== this.config.llm.model) {
6764
- console.log(`[LLMRouter] Fast role \u2192 provider="${this.config.llm.provider}" model="${fastModelName}"`);
6765
6710
  const fastConfig = __spreadProps(__spreadValues({}, this.config.llm), {
6766
6711
  model: fastModelName
6767
6712
  });
6768
6713
  this.models.set("fast", LLMFactory.create(fastConfig, this.config.embedding));
6769
6714
  } else {
6770
- console.log(`[LLMRouter] Fast role \u2192 reusing default model (no lightweight alternative configured).`);
6771
6715
  this.models.set("fast", defaultModel);
6772
6716
  }
6773
6717
  this.models.set("powerful", defaultModel);
@@ -8755,7 +8699,6 @@ var SchemaMapper = class {
8755
8699
  }
8756
8700
  static async _doTrain(llm, cacheKey, keys) {
8757
8701
  var _a3, _b, _c, _d, _e, _f, _g2, _h, _i, _j, _k;
8758
- console.log(`[SchemaMapper] \u{1F9E0} Training on new schema keys: ${keys.join(", ")}`);
8759
8702
  const propertyList = Object.entries(this.TARGET_PROPERTIES).map(([prop, desc]) => `- ${prop} (${desc})`).join("\n");
8760
8703
  const messages = [
8761
8704
  { role: "system", content: "You are a database schema expert. Respond ONLY with valid JSON." },
@@ -11414,7 +11357,6 @@ function createStreamHandler(configOrPlugin, options) {
11414
11357
  },
11415
11358
  cancel(reason) {
11416
11359
  isActive = false;
11417
- console.log("[createStreamHandler] Stream connection closed by client:", reason);
11418
11360
  }
11419
11361
  });
11420
11362
  return new Response(stream, { headers: __spreadProps(__spreadValues({}, SSE_HEADERS), { "x-message-id": assistantMsgId, "x-user-message-id": userMsgId }) });
@@ -11505,7 +11447,6 @@ function createLicenseHandler(configOrPlugin, options) {
11505
11447
  const rawKey = req.headers.get("x-license-key") || (body == null ? void 0 : body.licenseKey) || ((_a3 = req.headers.get("authorization")) == null ? void 0 : _a3.replace(/^Bearer\s+/i, "")) || config.licenseKey || process.env.NEXT_PUBLIC_RETRIVORA_LICENSE_KEY || process.env.RETRIVORA_LICENSE_KEY || "";
11506
11448
  const licenseKey = (rawKey || "").trim().replace(/^["']|["']$/g, "").trim();
11507
11449
  const projectId = (body == null ? void 0 : body.projectId) || config.projectId || "";
11508
- console.log(`[DEBUG] createLicenseHandler: projectId="${projectId}", body.projectId="${body == null ? void 0 : body.projectId}", config.projectId="${config.projectId}"`);
11509
11450
  const payload = await LicenseVerifier.verifyAsync(licenseKey, projectId);
11510
11451
  return NextResponse.json({
11511
11452
  valid: true,
@@ -11536,7 +11477,6 @@ function createUploadHandler(configOrPlugin, options) {
11536
11477
  const plugin = getOrCreatePlugin(configOrPlugin);
11537
11478
  const onAuthorize = options == null ? void 0 : options.onAuthorize;
11538
11479
  return async function POST(req, context) {
11539
- console.log("Upload handler invoked");
11540
11480
  const authResult = await checkAuth(req, onAuthorize);
11541
11481
  if (authResult) return authResult;
11542
11482
  const config = plugin.getConfig();
@@ -11545,7 +11485,6 @@ function createUploadHandler(configOrPlugin, options) {
11545
11485
  try {
11546
11486
  const formData = await req.formData();
11547
11487
  const files = formData.getAll("files");
11548
- console.log("Files received for upload:", files.map((f) => f.name));
11549
11488
  const namespace = formData.get("namespace") || void 0;
11550
11489
  const dimensionRaw = formData.get("dimension");
11551
11490
  const dimension = dimensionRaw ? parseInt(dimensionRaw, 10) : void 0;
@@ -11883,7 +11822,7 @@ function createRagHandler(configOrPlugin, options) {
11883
11822
  }
11884
11823
  }
11885
11824
  async function getSegment(req, context) {
11886
- var _a3, _b;
11825
+ var _a3, _b, _c;
11887
11826
  const contentType = req.headers.get("content-type") || "";
11888
11827
  if (contentType.includes("multipart/form-data")) {
11889
11828
  return "upload";
@@ -11898,10 +11837,12 @@ function createRagHandler(configOrPlugin, options) {
11898
11837
  if (pathname.endsWith("/suggestions")) return "suggestions";
11899
11838
  if (pathname.endsWith("/feedback")) return "feedback";
11900
11839
  if (pathname.endsWith("/history")) return "history";
11840
+ if (pathname.endsWith("/history/clear")) return "history/clear";
11841
+ if (pathname.endsWith("/sessions")) return "sessions";
11901
11842
  } catch (e) {
11902
11843
  }
11903
11844
  const resolvedParams = typeof ((_a3 = context == null ? void 0 : context.params) == null ? void 0 : _a3.then) === "function" ? await context.params : context == null ? void 0 : context.params;
11904
- const segments = (resolvedParams == null ? void 0 : resolvedParams.retrivora) || ((_b = resolvedParams == null ? void 0 : resolvedParams.params) == null ? void 0 : _b.retrivora) || [];
11845
+ const segments = (resolvedParams == null ? void 0 : resolvedParams.retrivora) || ((_b = resolvedParams == null ? void 0 : resolvedParams.params) == null ? void 0 : _b.retrivora) || (resolvedParams == null ? void 0 : resolvedParams.rag) || ((_c = resolvedParams == null ? void 0 : resolvedParams.params) == null ? void 0 : _c.rag) || [];
11905
11846
  const joined = segments.join("/");
11906
11847
  return joined || "chat";
11907
11848
  }
@@ -1,5 +1,5 @@
1
1
  import { NextRequest } from 'next/server';
2
- import { n as RagConfig, I as ILLMProvider, C as ChatMessage, c as ChatResponse, f as IngestDocument } from './ILLMProvider-B8TAVx3j.mjs';
2
+ import { n as RagConfig, I as ILLMProvider, C as ChatMessage, c as ChatResponse, f as IngestDocument } from './ILLMProvider-Y6aL5N8J.mjs';
3
3
 
4
4
  interface ValidationError {
5
5
  field: string;
@@ -1,5 +1,5 @@
1
1
  import { NextRequest } from 'next/server';
2
- import { n as RagConfig, I as ILLMProvider, C as ChatMessage, c as ChatResponse, f as IngestDocument } from './ILLMProvider-B8TAVx3j.js';
2
+ import { n as RagConfig, I as ILLMProvider, C as ChatMessage, c as ChatResponse, f as IngestDocument } from './ILLMProvider-Y6aL5N8J.js';
3
3
 
4
4
  interface ValidationError {
5
5
  field: string;
package/dist/index.css CHANGED
@@ -111,6 +111,9 @@
111
111
  --color-slate-900: oklch(20.8% 0.042 265.755);
112
112
  --color-slate-950: oklch(12.9% 0.042 264.695);
113
113
  --color-gray-500: oklch(55.1% 0.027 264.364);
114
+ --color-zinc-500: oklch(55.2% 0.016 285.938);
115
+ --color-zinc-800: oklch(27.4% 0.006 286.033);
116
+ --color-zinc-900: oklch(21% 0.006 285.885);
114
117
  --color-black: #000;
115
118
  --color-white: #fff;
116
119
  --spacing: 0.25rem;
@@ -135,10 +138,12 @@
135
138
  --font-weight-semibold: 600;
136
139
  --font-weight-bold: 700;
137
140
  --font-weight-extrabold: 800;
141
+ --font-weight-black: 900;
138
142
  --tracking-tight: -0.025em;
139
143
  --tracking-wider: 0.05em;
140
144
  --tracking-widest: 0.1em;
141
145
  --leading-tight: 1.25;
146
+ --leading-snug: 1.375;
142
147
  --leading-relaxed: 1.625;
143
148
  --radius-sm: 0.25rem;
144
149
  --radius-md: 0.375rem;
@@ -445,6 +450,9 @@
445
450
  .mx-1 {
446
451
  margin-inline: calc(var(--spacing) * 1);
447
452
  }
453
+ .mx-4 {
454
+ margin-inline: calc(var(--spacing) * 4);
455
+ }
448
456
  .mx-auto {
449
457
  margin-inline: auto;
450
458
  }
@@ -739,6 +747,9 @@
739
747
  .w-44 {
740
748
  width: calc(var(--spacing) * 44);
741
749
  }
750
+ .w-64 {
751
+ width: calc(var(--spacing) * 64);
752
+ }
742
753
  .w-\[400\%\] {
743
754
  width: 400%;
744
755
  }
@@ -1244,6 +1255,9 @@
1244
1255
  .bg-\[\#080818\] {
1245
1256
  background-color: #080818;
1246
1257
  }
1258
+ .bg-\[var\(--primary\)\] {
1259
+ background-color: var(--primary);
1260
+ }
1247
1261
  .bg-amber-50 {
1248
1262
  background-color: var(--color-amber-50);
1249
1263
  }
@@ -1403,6 +1417,12 @@
1403
1417
  .bg-slate-200 {
1404
1418
  background-color: var(--color-slate-200);
1405
1419
  }
1420
+ .bg-slate-200\/70 {
1421
+ background-color: color-mix(in srgb, oklch(92.9% 0.013 255.508) 70%, transparent);
1422
+ @supports (color: color-mix(in lab, red, red)) {
1423
+ background-color: color-mix(in oklab, var(--color-slate-200) 70%, transparent);
1424
+ }
1425
+ }
1406
1426
  .bg-slate-400 {
1407
1427
  background-color: var(--color-slate-400);
1408
1428
  }
@@ -1472,6 +1492,9 @@
1472
1492
  --tw-gradient-to: var(--color-slate-200);
1473
1493
  --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
1474
1494
  }
1495
+ .stroke-\[2\.5\] {
1496
+ stroke-width: 2.5;
1497
+ }
1475
1498
  .object-cover {
1476
1499
  object-fit: cover;
1477
1500
  }
@@ -1550,6 +1573,9 @@
1550
1573
  .py-4 {
1551
1574
  padding-block: calc(var(--spacing) * 4);
1552
1575
  }
1576
+ .py-8 {
1577
+ padding-block: calc(var(--spacing) * 8);
1578
+ }
1553
1579
  .pt-1 {
1554
1580
  padding-top: calc(var(--spacing) * 1);
1555
1581
  }
@@ -1559,6 +1585,9 @@
1559
1585
  .pr-1 {
1560
1586
  padding-right: calc(var(--spacing) * 1);
1561
1587
  }
1588
+ .pr-6 {
1589
+ padding-right: calc(var(--spacing) * 6);
1590
+ }
1562
1591
  .pb-3 {
1563
1592
  padding-bottom: calc(var(--spacing) * 3);
1564
1593
  }
@@ -1623,10 +1652,18 @@
1623
1652
  --tw-leading: var(--leading-relaxed);
1624
1653
  line-height: var(--leading-relaxed);
1625
1654
  }
1655
+ .leading-snug {
1656
+ --tw-leading: var(--leading-snug);
1657
+ line-height: var(--leading-snug);
1658
+ }
1626
1659
  .leading-tight {
1627
1660
  --tw-leading: var(--leading-tight);
1628
1661
  line-height: var(--leading-tight);
1629
1662
  }
1663
+ .font-black {
1664
+ --tw-font-weight: var(--font-weight-black);
1665
+ font-weight: var(--font-weight-black);
1666
+ }
1630
1667
  .font-bold {
1631
1668
  --tw-font-weight: var(--font-weight-bold);
1632
1669
  font-weight: var(--font-weight-bold);
@@ -2219,6 +2256,16 @@
2219
2256
  }
2220
2257
  }
2221
2258
  }
2259
+ .hover\:bg-slate-200\/30 {
2260
+ &:hover {
2261
+ @media (hover: hover) {
2262
+ background-color: color-mix(in srgb, oklch(92.9% 0.013 255.508) 30%, transparent);
2263
+ @supports (color: color-mix(in lab, red, red)) {
2264
+ background-color: color-mix(in oklab, var(--color-slate-200) 30%, transparent);
2265
+ }
2266
+ }
2267
+ }
2268
+ }
2222
2269
  .hover\:bg-slate-800 {
2223
2270
  &:hover {
2224
2271
  @media (hover: hover) {
@@ -2292,6 +2339,13 @@
2292
2339
  }
2293
2340
  }
2294
2341
  }
2342
+ .hover\:text-slate-800 {
2343
+ &:hover {
2344
+ @media (hover: hover) {
2345
+ color: var(--color-slate-800);
2346
+ }
2347
+ }
2348
+ }
2295
2349
  .hover\:text-slate-900 {
2296
2350
  &:hover {
2297
2351
  @media (hover: hover) {
@@ -2612,6 +2666,11 @@
2612
2666
  }
2613
2667
  }
2614
2668
  }
2669
+ .dark\:border-zinc-800 {
2670
+ @media (prefers-color-scheme: dark) {
2671
+ border-color: var(--color-zinc-800);
2672
+ }
2673
+ }
2615
2674
  .dark\:bg-\[\#0f0f1a\] {
2616
2675
  @media (prefers-color-scheme: dark) {
2617
2676
  background-color: #0f0f1a;
@@ -2632,6 +2691,11 @@
2632
2691
  background-color: #080811;
2633
2692
  }
2634
2693
  }
2694
+ .dark\:bg-\[\#131322\] {
2695
+ @media (prefers-color-scheme: dark) {
2696
+ background-color: #131322;
2697
+ }
2698
+ }
2635
2699
  .dark\:bg-amber-400\/10 {
2636
2700
  @media (prefers-color-scheme: dark) {
2637
2701
  background-color: color-mix(in srgb, oklch(82.8% 0.189 84.429) 10%, transparent);
@@ -3067,6 +3131,11 @@
3067
3131
  }
3068
3132
  }
3069
3133
  }
3134
+ .dark\:bg-zinc-900 {
3135
+ @media (prefers-color-scheme: dark) {
3136
+ background-color: var(--color-zinc-900);
3137
+ }
3138
+ }
3070
3139
  .dark\:from-white\/10 {
3071
3140
  @media (prefers-color-scheme: dark) {
3072
3141
  --tw-gradient-from: color-mix(in srgb, #fff 10%, transparent);
@@ -3323,6 +3392,11 @@
3323
3392
  }
3324
3393
  }
3325
3394
  }
3395
+ .dark\:text-zinc-500 {
3396
+ @media (prefers-color-scheme: dark) {
3397
+ color: var(--color-zinc-500);
3398
+ }
3399
+ }
3326
3400
  .dark\:placeholder-white\/30 {
3327
3401
  @media (prefers-color-scheme: dark) {
3328
3402
  &::placeholder {
@@ -3516,6 +3590,15 @@
3516
3590
  }
3517
3591
  }
3518
3592
  }
3593
+ .dark\:hover\:text-slate-200 {
3594
+ @media (prefers-color-scheme: dark) {
3595
+ &:hover {
3596
+ @media (hover: hover) {
3597
+ color: var(--color-slate-200);
3598
+ }
3599
+ }
3600
+ }
3601
+ }
3519
3602
  .dark\:hover\:text-white {
3520
3603
  @media (prefers-color-scheme: dark) {
3521
3604
  &:hover {
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
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, R as RemoteConfig } from './BatchProcessor-BhLczWj5.mjs';
3
- export { A as AuthenticationException, B as BatchOptions, e as BatchProcessor, f as BatchResult, g as ChartType, h as Chunk, i as ChunkOptions, j as ConfigFetcher, k as ConfigurationException, l as DecisionContext, E as EmbeddingFailedException, I as IRenderRule, m as IRendererStrategy, n as IntentCategory, L as LicenseTierConfig, o as LicenseValidationError, p as LicenseValidationRequest, q as LicenseValidationResponse, r as LicenseValidator, s as ProviderCredentials, t as ProviderNotFoundException, u as RateLimitException, v as RemoteEmbeddingConfig, w as RemoteLLMConfig, x as RemoteVectorConfig, y as RenderDecision, z as RenderType, F as RetrievalException, G as Retrivora, H as RetrivoraError, J as RetrivoraErrorCode, K as SDKVersionUnsupportedError, N as SDK_VERSION, O as isTransientError } from './BatchProcessor-BhLczWj5.mjs';
4
- import { O as ObservabilityTrace, U as UseRagChatOptions, a as UseRagChatReturn, P as ProjectChatSettings } from './ILLMProvider-B8TAVx3j.mjs';
5
- export { A as AuthMode, C as ChatMessage, b as ChatOptions, c as ChatResponse, E as EmbedOptions, d as EmbeddingConfig, e as EmbeddingProvider, I as ILLMProvider, f as IngestDocument, L as LLMConfig, g as LLMProvider, h as LatencyBreakdown, i as ProjectAiSettings, j as ProjectAuthSettings, k as ProjectBrandingSettings, l as ProjectTelemetrySettings, m as ProjectWidgetSettings, R as RAGConfig, n as RagConfig, o as RagMessage, p as RetrievalConfig, q as RetrievedChunk, T as ThemeMode, r as TokenUsage, s as UIConfig, t as UniversalRagConfig, u as UpsertDocument, V as VectorDBConfig, v as VectorDBProvider, w as VectorMatch, W as WidgetPosition, x as WorkflowConfig, y as createDefaultProjectSettings, z as normalizeProjectSettings, B as projectSettingsToUiConfig } from './ILLMProvider-B8TAVx3j.mjs';
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, R as RemoteConfig } from './BatchProcessor-zbQMaZHm.mjs';
3
+ export { A as AuthenticationException, B as BatchOptions, e as BatchProcessor, f as BatchResult, g as ChartType, h as Chunk, i as ChunkOptions, j as ConfigFetcher, k as ConfigurationException, l as DecisionContext, E as EmbeddingFailedException, I as IRenderRule, m as IRendererStrategy, n as IntentCategory, L as LicenseTierConfig, o as LicenseValidationError, p as LicenseValidationRequest, q as LicenseValidationResponse, r as LicenseValidator, s as ProviderCredentials, t as ProviderNotFoundException, u as RateLimitException, v as RemoteEmbeddingConfig, w as RemoteLLMConfig, x as RemoteVectorConfig, y as RenderDecision, z as RenderType, F as RetrievalException, G as Retrivora, H as RetrivoraError, J as RetrivoraErrorCode, K as SDKVersionUnsupportedError, N as SDK_VERSION, O as isTransientError } from './BatchProcessor-zbQMaZHm.mjs';
4
+ import { O as ObservabilityTrace, U as UseRagChatOptions, a as UseRagChatReturn, P as ProjectChatSettings } from './ILLMProvider-Y6aL5N8J.mjs';
5
+ export { A as AuthMode, C as ChatMessage, b as ChatOptions, c as ChatResponse, E as EmbedOptions, d as EmbeddingConfig, e as EmbeddingProvider, I as ILLMProvider, f as IngestDocument, L as LLMConfig, g as LLMProvider, h as LatencyBreakdown, i as ProjectAiSettings, j as ProjectAuthSettings, k as ProjectBrandingSettings, l as ProjectTelemetrySettings, m as ProjectWidgetSettings, R as RAGConfig, n as RagConfig, o as RagMessage, p as RetrievalConfig, q as RetrievedChunk, T as ThemeMode, r as TokenUsage, s as UIConfig, t as UniversalRagConfig, u as UpsertDocument, V as VectorDBConfig, v as VectorDBProvider, w as VectorMatch, W as WidgetPosition, x as WorkflowConfig, y as createDefaultProjectSettings, z as normalizeProjectSettings, B as projectSettingsToUiConfig } from './ILLMProvider-Y6aL5N8J.mjs';
6
6
  import 'react';
7
7
 
8
8
  /**
@@ -43,7 +43,7 @@ declare function ChatWidget({ position, onAddToCart, apiUrl, retrivoraApiBase, l
43
43
  * @param licenseKey - Override license key (highest priority; falls back to headers/env).
44
44
  * @param headers - Custom headers forwarded with every network request.
45
45
  */
46
- declare function ChatWindow({ className, style, onClose, showClose, onResizeStart, onResetResize, isResized, onMaximize, isMaximized, onAddToCart, apiUrl, retrivoraApiBase, licenseKey: licenseKeyProp, headers }: ChatWindowProps): react_jsx_runtime.JSX.Element;
46
+ declare function ChatWindow({ className, style, onClose, showClose, onResizeStart, onResetResize, isResized, onMaximize, isMaximized, onAddToCart, apiUrl, retrivoraApiBase, licenseKey: licenseKeyProp, headers, sessionId: sessionIdProp, showHistory, }: ChatWindowProps): react_jsx_runtime.JSX.Element;
47
47
 
48
48
  declare function DocumentUpload({ namespace, uploadUrl, retrivoraApiBase, onUploadComplete, className }: DocumentUploadProps): react_jsx_runtime.JSX.Element;
49
49