@burtson-labs/bandit-engine 2.0.42 → 2.0.49

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 (54) hide show
  1. package/README.md +7 -5
  2. package/dist/{aiProviderStore-UQI33C5E.mjs → aiProviderStore-3N3VE6D4.mjs} +2 -2
  3. package/dist/chat-647M6BRG.mjs +15 -0
  4. package/dist/chat-provider.js +45 -10
  5. package/dist/chat-provider.js.map +1 -1
  6. package/dist/chat-provider.mjs +6 -6
  7. package/dist/{chunk-UXE67LR7.mjs → chunk-6WZUQHZT.mjs} +11 -7
  8. package/dist/chunk-6WZUQHZT.mjs.map +1 -0
  9. package/dist/{chunk-EOEI74X4.mjs → chunk-7HXARU5R.mjs} +101 -37
  10. package/dist/chunk-7HXARU5R.mjs.map +1 -0
  11. package/dist/{chunk-XUBYA5I7.mjs → chunk-7ZDS33S2.mjs} +34 -6
  12. package/dist/chunk-7ZDS33S2.mjs.map +1 -0
  13. package/dist/{chunk-SBNENBUQ.mjs → chunk-AXFX2HUK.mjs} +12 -12
  14. package/dist/{chunk-SBNENBUQ.mjs.map → chunk-AXFX2HUK.mjs.map} +1 -1
  15. package/dist/{chunk-54ZQ3FSN.mjs → chunk-BENL3EF2.mjs} +7 -4
  16. package/dist/chunk-BENL3EF2.mjs.map +1 -0
  17. package/dist/{chunk-RTQDQ6TC.mjs → chunk-EHNWQ4T3.mjs} +2 -2
  18. package/dist/{chunk-KBKWVG7X.mjs → chunk-HKJTRBWC.mjs} +5 -5
  19. package/dist/{chunk-4RCAVVDN.mjs → chunk-JCLL7AGP.mjs} +63 -45
  20. package/dist/chunk-JCLL7AGP.mjs.map +1 -0
  21. package/dist/{chunk-ERV7GLY3.mjs → chunk-TVF45U7B.mjs} +5 -5
  22. package/dist/{chunk-H4PBQ5LJ.mjs → chunk-VL3CMSDO.mjs} +4 -4
  23. package/dist/cli.js +45 -45
  24. package/dist/cli.js.map +1 -1
  25. package/dist/{gateway-5yt_3QDP.d.mts → gateway-oScD5tvE.d.mts} +4 -3
  26. package/dist/{gateway-5yt_3QDP.d.ts → gateway-oScD5tvE.d.ts} +4 -3
  27. package/dist/index.d.mts +2 -2
  28. package/dist/index.d.ts +2 -2
  29. package/dist/index.js +199 -76
  30. package/dist/index.js.map +1 -1
  31. package/dist/index.mjs +10 -10
  32. package/dist/management/management.js +199 -76
  33. package/dist/management/management.js.map +1 -1
  34. package/dist/management/management.mjs +8 -8
  35. package/dist/modals/chat-modal/chat-modal.js +53 -18
  36. package/dist/modals/chat-modal/chat-modal.js.map +1 -1
  37. package/dist/modals/chat-modal/chat-modal.mjs +5 -5
  38. package/dist/{modelStore-UMJBDSEF.mjs → modelStore-XWFHNTBT.mjs} +2 -2
  39. package/dist/public-types.d.mts +2 -1
  40. package/dist/public-types.d.ts +2 -1
  41. package/package.json +2 -2
  42. package/dist/chat-XDC4SNJF.mjs +0 -15
  43. package/dist/chunk-4RCAVVDN.mjs.map +0 -1
  44. package/dist/chunk-54ZQ3FSN.mjs.map +0 -1
  45. package/dist/chunk-EOEI74X4.mjs.map +0 -1
  46. package/dist/chunk-UXE67LR7.mjs.map +0 -1
  47. package/dist/chunk-XUBYA5I7.mjs.map +0 -1
  48. /package/dist/{aiProviderStore-UQI33C5E.mjs.map → aiProviderStore-3N3VE6D4.mjs.map} +0 -0
  49. /package/dist/{chat-XDC4SNJF.mjs.map → chat-647M6BRG.mjs.map} +0 -0
  50. /package/dist/{chunk-RTQDQ6TC.mjs.map → chunk-EHNWQ4T3.mjs.map} +0 -0
  51. /package/dist/{chunk-KBKWVG7X.mjs.map → chunk-HKJTRBWC.mjs.map} +0 -0
  52. /package/dist/{chunk-ERV7GLY3.mjs.map → chunk-TVF45U7B.mjs.map} +0 -0
  53. /package/dist/{chunk-H4PBQ5LJ.mjs.map → chunk-VL3CMSDO.mjs.map} +0 -0
  54. /package/dist/{modelStore-UMJBDSEF.mjs.map → modelStore-XWFHNTBT.mjs.map} +0 -0
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-ONQMRE2G.mjs";
4
4
  import {
5
5
  aiProviderInitService
6
- } from "./chunk-H4PBQ5LJ.mjs";
6
+ } from "./chunk-VL3CMSDO.mjs";
7
7
  import {
8
8
  useMCPToolsStore
9
- } from "./chunk-RTQDQ6TC.mjs";
9
+ } from "./chunk-EHNWQ4T3.mjs";
10
10
  import {
11
11
  FeatureFlagProvider,
12
12
  NotificationProvider,
@@ -20,13 +20,13 @@ import {
20
20
  useKnowledgeStore2,
21
21
  useMemoryStore,
22
22
  useProjectStore
23
- } from "./chunk-UXE67LR7.mjs";
23
+ } from "./chunk-6WZUQHZT.mjs";
24
24
  import {
25
25
  indexedDBService_default,
26
26
  useModelStore,
27
27
  usePackageSettingsStore,
28
28
  usePreferencesStore
29
- } from "./chunk-XUBYA5I7.mjs";
29
+ } from "./chunk-7ZDS33S2.mjs";
30
30
  import {
31
31
  debugLogger
32
32
  } from "./chunk-KCI46M23.mjs";
@@ -157,4 +157,4 @@ export {
157
157
  ChatProvider,
158
158
  chat_provider_default
159
159
  };
160
- //# sourceMappingURL=chunk-KBKWVG7X.mjs.map
160
+ //# sourceMappingURL=chunk-HKJTRBWC.mjs.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  aiProviderInitService
3
- } from "./chunk-H4PBQ5LJ.mjs";
3
+ } from "./chunk-VL3CMSDO.mjs";
4
4
  import {
5
5
  useMCPToolsStore
6
- } from "./chunk-RTQDQ6TC.mjs";
6
+ } from "./chunk-EHNWQ4T3.mjs";
7
7
  import {
8
8
  chat_modal_default
9
- } from "./chunk-ERV7GLY3.mjs";
9
+ } from "./chunk-TVF45U7B.mjs";
10
10
  import {
11
11
  DocumentCard_default,
12
12
  banditDarkTheme,
@@ -14,7 +14,7 @@ import {
14
14
  predefinedThemes,
15
15
  useNotificationService,
16
16
  useVoiceStore
17
- } from "./chunk-SBNENBUQ.mjs";
17
+ } from "./chunk-AXFX2HUK.mjs";
18
18
  import {
19
19
  authenticationService,
20
20
  brandingService_default,
@@ -27,19 +27,19 @@ import {
27
27
  useFeatures,
28
28
  useKnowledgeStore2 as useKnowledgeStore,
29
29
  useVectorStore
30
- } from "./chunk-UXE67LR7.mjs";
30
+ } from "./chunk-6WZUQHZT.mjs";
31
31
  import {
32
32
  indexedDBService_default,
33
33
  models,
34
34
  useModelStore,
35
35
  usePackageSettingsStore,
36
36
  usePreferencesStore
37
- } from "./chunk-XUBYA5I7.mjs";
37
+ } from "./chunk-7ZDS33S2.mjs";
38
38
  import {
39
39
  AIProviderFactory,
40
40
  GatewayService,
41
41
  useAIProviderStore
42
- } from "./chunk-54ZQ3FSN.mjs";
42
+ } from "./chunk-BENL3EF2.mjs";
43
43
  import {
44
44
  debugLogger
45
45
  } from "./chunk-KCI46M23.mjs";
@@ -2303,7 +2303,7 @@ var PreferencesTab = ({
2303
2303
  await setAdvancedVectorFeaturesEnabled(enabled);
2304
2304
  if (showSnackbar) {
2305
2305
  showSnackbar(
2306
- enabled ? "Advanced vector features enabled for this account." : "Advanced vector features disabled.",
2306
+ enabled ? "Advanced knowledge sync enabled for this account." : "Advanced knowledge sync disabled.",
2307
2307
  "success"
2308
2308
  );
2309
2309
  }
@@ -2588,8 +2588,8 @@ var PreferencesTab = ({
2588
2588
  }
2589
2589
  ),
2590
2590
  label: /* @__PURE__ */ jsxs3(Box3, { textAlign: "left", children: [
2591
- /* @__PURE__ */ jsx3(Typography3, { variant: "body1", sx: { fontWeight: 600, color: "text.primary" }, children: "Advanced vector features" }),
2592
- /* @__PURE__ */ jsx3(Typography3, { variant: "body2", color: "text.secondary", children: "Keep semantic search, vector memories, and related context in sync across devices" })
2591
+ /* @__PURE__ */ jsx3(Typography3, { variant: "body1", sx: { fontWeight: 600, color: "text.primary" }, children: "Advanced knowledge sync" }),
2592
+ /* @__PURE__ */ jsx3(Typography3, { variant: "body2", color: "text.secondary", children: "Keep richer search, saved memories, and context in sync across devices" })
2593
2593
  ] }),
2594
2594
  sx: { alignSelf: { xs: "flex-start", sm: "center" } }
2595
2595
  }
@@ -3190,6 +3190,7 @@ var LogoCropper = ({
3190
3190
  canvas.width = outputWidth;
3191
3191
  canvas.height = outputHeight;
3192
3192
  ctx.save();
3193
+ ctx.clearRect(0, 0, outputWidth, outputHeight);
3193
3194
  const scaleX = outputWidth / cropDims.width;
3194
3195
  const scaleY = outputHeight / cropDims.height;
3195
3196
  ctx.translate(outputWidth / 2, outputHeight / 2);
@@ -4266,30 +4267,29 @@ var defaultSteps = [
4266
4267
  },
4267
4268
  {
4268
4269
  id: "embed",
4269
- title: "Creating Vectors",
4270
- description: "Neural networks are encoding knowledge into searchable vectors...",
4270
+ title: "Making It Searchable",
4271
+ description: "We turn the content into a private, searchable index...",
4271
4272
  icon: /* @__PURE__ */ jsx6(Memory, {}),
4272
4273
  duration: 10
4273
4274
  },
4274
4275
  {
4275
4276
  id: "optimize",
4276
4277
  title: "Optimizing Search",
4277
- description: "AI algorithms are organizing data for lightning-fast retrieval...",
4278
+ description: "Organizing everything for quick, reliable answers...",
4278
4279
  icon: /* @__PURE__ */ jsx6(AutoAwesome, {}),
4279
4280
  duration: 8
4280
4281
  }
4281
4282
  ];
4282
4283
  var cleverMessages = [
4283
- "\u{1F977} Digital ninjas are working their magic...",
4284
- "\u{1F916} AI robots are crunching your data...",
4285
- "\u26A1 Neural networks firing at maximum capacity...",
4286
- "\u{1F9E0} Machine learning models deep in thought...",
4287
- "\u{1F52E} AI wizards casting knowledge spells...",
4288
- "\u2699\uFE0F Quantum processors spinning up...",
4289
- "\u{1F680} Algorithms achieving warp speed...",
4290
- "\u{1F4AB} Creating digital memories from your content...",
4291
- "\u{1F3AF} Precision-targeting knowledge patterns...",
4292
- "\u{1F31F} Transforming text into searchable stardust..."
4284
+ "\u{1F977} Keeping your content safe while we set things up...",
4285
+ "\u{1F916} Getting everything ready for fast answers...",
4286
+ "\u26A1 Tidying the data so responses stay consistent...",
4287
+ "\u{1F9E0} Remembering the important parts for you...",
4288
+ "\u{1F512} Locking in privacy before we share results...",
4289
+ "\u{1F680} Optimizing for quick, reliable lookups...",
4290
+ "\u{1F4AB} Turning this into searchable knowledge...",
4291
+ "\u{1F3AF} Focusing on the details that matter to you...",
4292
+ "\u{1F31F} Making sure it stays available when you need it..."
4293
4293
  ];
4294
4294
  var ProcessingOverlay = ({
4295
4295
  open,
@@ -4877,16 +4877,16 @@ var KnowledgeTab = ({
4877
4877
  const handleDocumentUpload = async (files) => {
4878
4878
  if (shouldUseVector) {
4879
4879
  showProcessing(
4880
- "Uploading to Vector Database",
4880
+ "Uploading to Secure Workspace",
4881
4881
  [
4882
- "\u{1F977} Digital ninjas securing your documents...",
4883
- "\u{1F916} AI robots reading and understanding content...",
4884
- "\u26A1 Neural networks encoding knowledge vectors...",
4885
- "\u{1F9E0} Machine learning creating searchable memories...",
4886
- "\u{1F52E} AI wizards optimizing semantic search...",
4887
- "\u{1F680} Vector embeddings achieving light speed...",
4888
- "\u{1F4AB} Transforming documents into intelligent data...",
4889
- "\u{1F3AF} Precision-targeting knowledge patterns..."
4882
+ "\u{1F977} Keeping your documents private while we prepare them...",
4883
+ "\u{1F916} Reading the content so answers stay accurate...",
4884
+ "\u26A1 Turning pages into a searchable index...",
4885
+ "\u{1F9E0} Remembering highlights for quick recall...",
4886
+ "\u{1F52E} Organizing everything so search feels instant...",
4887
+ "\u{1F680} Optimizing for fast, consistent responses...",
4888
+ "\u{1F4AB} Transforming documents into trusted knowledge...",
4889
+ "\u{1F3AF} Focusing on the details that matter most..."
4890
4890
  ]
4891
4891
  );
4892
4892
  try {
@@ -4960,7 +4960,7 @@ var KnowledgeTab = ({
4960
4960
  progress: 100,
4961
4961
  status: "success"
4962
4962
  })));
4963
- const message = result.usedVector ? `Successfully uploaded ${files.length} document(s) to vector database` : result.error ? `Upload completed with warnings: ${result.error}` : `Successfully uploaded ${files.length} document(s)`;
4963
+ const message = result.usedVector ? `Successfully uploaded ${files.length} document(s) to your secure workspace` : result.error ? `Upload completed with warnings: ${result.error}` : `Successfully uploaded ${files.length} document(s)`;
4964
4964
  setSnackbarMessage(message);
4965
4965
  setSnackbarSeverity(result.error ? "warning" : "success");
4966
4966
  setShowSnackbar(true);
@@ -5021,7 +5021,7 @@ var KnowledgeTab = ({
5021
5021
  progress: 100,
5022
5022
  status: "success"
5023
5023
  })));
5024
- const message = result.usedVector ? `Successfully uploaded ${files.length} document(s) to vector database` : result.error ? `Upload completed with warnings: ${result.error}` : `Successfully uploaded ${files.length} document(s)`;
5024
+ const message = result.usedVector ? `Successfully uploaded ${files.length} document(s) to your secure workspace` : result.error ? `Upload completed with warnings: ${result.error}` : `Successfully uploaded ${files.length} document(s)`;
5025
5025
  setSnackbarMessage(message);
5026
5026
  setSnackbarSeverity(result.error ? "warning" : "success");
5027
5027
  setShowSnackbar(true);
@@ -5199,7 +5199,7 @@ var KnowledgeTab = ({
5199
5199
  shouldUseVector && /* @__PURE__ */ jsx7(
5200
5200
  Chip5,
5201
5201
  {
5202
- label: "Vector DB",
5202
+ label: "Synced",
5203
5203
  color: "primary",
5204
5204
  size: "small",
5205
5205
  sx: { ml: 1 }
@@ -5216,7 +5216,7 @@ var KnowledgeTab = ({
5216
5216
  sx: { fontSize: { xs: "0.95rem", sm: "1rem" }, lineHeight: 1.5 },
5217
5217
  children: [
5218
5218
  "Add documents to your private knowledge base. Files are securely stored ",
5219
- shouldUseVector ? "in the vector database" : "locally in your browser",
5219
+ shouldUseVector ? "in your private workspace" : "locally in your browser",
5220
5220
  "."
5221
5221
  ]
5222
5222
  }
@@ -5552,7 +5552,7 @@ var KnowledgeTab = ({
5552
5552
  filteredAndSortedDocuments.length === 0 ? /* @__PURE__ */ jsx7(Card3, { sx: { textAlign: "center", py: 8 }, children: /* @__PURE__ */ jsxs7(CardContent3, { children: [
5553
5553
  /* @__PURE__ */ jsx7(FolderIcon, { sx: { fontSize: 64, color: "text.secondary", mb: 2 } }),
5554
5554
  /* @__PURE__ */ jsx7(Typography7, { variant: "h6", color: "text.secondary", gutterBottom: true, children: "No Documents Yet" }),
5555
- /* @__PURE__ */ jsx7(Typography7, { variant: "body2", color: "text.secondary", children: shouldUseVector ? "Upload and embed your first document to get started with advanced vector search" : "Upload your first document to get started" })
5555
+ /* @__PURE__ */ jsx7(Typography7, { variant: "body2", color: "text.secondary", children: shouldUseVector ? "Upload and embed your first document to get started with advanced search" : "Upload your first document to get started" })
5556
5556
  ] }) }) : /* @__PURE__ */ jsxs7(Box7, { children: [
5557
5557
  /* @__PURE__ */ jsxs7(Typography7, { variant: "body2", color: "text.secondary", sx: { mb: 2 }, children: [
5558
5558
  "Showing ",
@@ -5561,7 +5561,7 @@ var KnowledgeTab = ({
5561
5561
  shouldUseVector ? vectorDocuments.length : documents.length,
5562
5562
  " documents",
5563
5563
  searchQuery && ` for "${searchQuery}"`,
5564
- shouldUseVector && ` (Vector Database)`
5564
+ shouldUseVector && ` (Synced workspace)`
5565
5565
  ] }),
5566
5566
  viewMode === "grid" ? /* @__PURE__ */ jsx7(
5567
5567
  Box7,
@@ -7797,7 +7797,7 @@ var MCPToolsTabV2_default = MCPToolsTabV2;
7797
7797
 
7798
7798
  // src/management/management.tsx
7799
7799
  import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
7800
- var preloadChatPage = () => import("./chat-XDC4SNJF.mjs");
7800
+ var preloadChatPage = () => import("./chat-647M6BRG.mjs");
7801
7801
  var Management = () => {
7802
7802
  const navigate = useNavigate();
7803
7803
  const notificationService = useNotificationService();
@@ -8083,6 +8083,7 @@ var Management = () => {
8083
8083
  name: modelToSave.name,
8084
8084
  tagline: modelToSave.tagline,
8085
8085
  systemPrompt: modelToSave.systemPrompt,
8086
+ avatarBase64: modelToSave.avatarBase64 || void 0,
8086
8087
  selectedModel: modelToSave.name
8087
8088
  }
8088
8089
  };
@@ -8135,6 +8136,19 @@ var Management = () => {
8135
8136
  try {
8136
8137
  const storeConfigs = [{ name: "config", keyPath: "id" }];
8137
8138
  debugLogger.info("Saving branding data to IndexedDB");
8139
+ let finalHasTransparentLogo = hasTransparentLogo;
8140
+ if (logoBase64) {
8141
+ try {
8142
+ const detected = await detectTransparency(logoBase64);
8143
+ const isPng = logoBase64.startsWith("data:image/png");
8144
+ finalHasTransparentLogo = detected || isPng;
8145
+ debugLogger.debug("SaveBranding transparency check", { detected, isPng, finalHasTransparentLogo });
8146
+ } catch (err) {
8147
+ const isPng = logoBase64.startsWith("data:image/png");
8148
+ finalHasTransparentLogo = finalHasTransparentLogo ?? isPng ?? true;
8149
+ debugLogger.warn("SaveBranding transparency check failed, using fallback", { error: err, finalHasTransparentLogo });
8150
+ }
8151
+ }
8138
8152
  const current = await indexedDBService_default.get(
8139
8153
  "banditConfig",
8140
8154
  1,
@@ -8150,7 +8164,7 @@ var Management = () => {
8150
8164
  logoBase64,
8151
8165
  brandingText,
8152
8166
  theme,
8153
- hasTransparentLogo,
8167
+ hasTransparentLogo: finalHasTransparentLogo,
8154
8168
  userSaved: true
8155
8169
  // Mark as user-saved to protect from CDN overrides
8156
8170
  }
@@ -8189,9 +8203,11 @@ var Management = () => {
8189
8203
  setLogoBase64(base64);
8190
8204
  debugLogger.debug("Starting transparency detection for uploaded image");
8191
8205
  try {
8206
+ const isPng = base64.startsWith("data:image/png");
8192
8207
  const isTransparent = await detectTransparency(base64);
8193
- setHasTransparentLogo(isTransparent);
8194
- debugLogger.debug("Transparency detection result saved", { isTransparent });
8208
+ const finalTransparent = isTransparent || isPng;
8209
+ setHasTransparentLogo(finalTransparent);
8210
+ debugLogger.debug("Transparency detection result saved", { isTransparent, finalTransparent });
8195
8211
  } catch (err) {
8196
8212
  debugLogger.error("Failed to detect transparency", { error: err });
8197
8213
  }
@@ -8404,7 +8420,8 @@ var Management = () => {
8404
8420
  name: modelName2,
8405
8421
  tagline: typeof parsedModel.tagline === "string" ? parsedModel.tagline : void 0,
8406
8422
  systemPrompt: typeof parsedModel.systemPrompt === "string" ? parsedModel.systemPrompt : void 0,
8407
- selectedModel: typeof parsedModel.selectedModel === "string" ? parsedModel.selectedModel : void 0
8423
+ selectedModel: typeof parsedModel.selectedModel === "string" ? parsedModel.selectedModel : void 0,
8424
+ avatarBase64: typeof parsedModel.avatarBase64 === "string" ? parsedModel.avatarBase64 : parsedModel.avatarBase64 === null ? void 0 : void 0
8408
8425
  };
8409
8426
  const entry = {
8410
8427
  id: modelName2,
@@ -8412,7 +8429,8 @@ var Management = () => {
8412
8429
  name: modelName2,
8413
8430
  tagline: sanitizedModel.tagline,
8414
8431
  systemPrompt: sanitizedModel.systemPrompt,
8415
- avatarBase64: typeof parsedModel.avatarBase64 === "string" ? parsedModel.avatarBase64 : void 0
8432
+ // Normalize to match StoredBanditConfigRecord (string | undefined)
8433
+ avatarBase64: sanitizedModel.avatarBase64 ?? void 0
8416
8434
  };
8417
8435
  await indexedDBService_default.put("banditConfig", 1, "config", entry, storeConfigs);
8418
8436
  }
@@ -8975,4 +8993,4 @@ export {
8975
8993
  useGatewayMemory,
8976
8994
  management_default
8977
8995
  };
8978
- //# sourceMappingURL=chunk-4RCAVVDN.mjs.map
8996
+ //# sourceMappingURL=chunk-JCLL7AGP.mjs.map