@burtson-labs/bandit-engine 2.0.44 → 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-QV4ELNLP.mjs → chunk-7HXARU5R.mjs} +58 -19
  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-JRGCRBWE.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 +44 -44
  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 +159 -67
  30. package/dist/index.js.map +1 -1
  31. package/dist/index.mjs +10 -10
  32. package/dist/management/management.js +159 -67
  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 +1 -1
  42. package/dist/chat-7U633EWN.mjs +0 -15
  43. package/dist/chunk-54ZQ3FSN.mjs.map +0 -1
  44. package/dist/chunk-JRGCRBWE.mjs.map +0 -1
  45. package/dist/chunk-QV4ELNLP.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-7U633EWN.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
@@ -8,23 +8,23 @@ import {
8
8
  useNotificationService,
9
9
  useTTS,
10
10
  useVoiceStore
11
- } from "./chunk-SBNENBUQ.mjs";
11
+ } from "./chunk-AXFX2HUK.mjs";
12
12
  import {
13
13
  brandingService_default,
14
14
  toTitleCase,
15
15
  useAIQueryStore,
16
16
  useConversationStore,
17
17
  useMemoryStore
18
- } from "./chunk-UXE67LR7.mjs";
18
+ } from "./chunk-6WZUQHZT.mjs";
19
19
  import {
20
20
  indexedDBService_default,
21
21
  useModelStore,
22
22
  usePackageSettingsStore,
23
23
  usePreferencesStore
24
- } from "./chunk-XUBYA5I7.mjs";
24
+ } from "./chunk-7ZDS33S2.mjs";
25
25
  import {
26
26
  useAIProviderStore
27
- } from "./chunk-54ZQ3FSN.mjs";
27
+ } from "./chunk-BENL3EF2.mjs";
28
28
  import {
29
29
  debugLogger
30
30
  } from "./chunk-KCI46M23.mjs";
@@ -2807,4 +2807,4 @@ export {
2807
2807
  MAX_WINDOWED_HEIGHT,
2808
2808
  chat_modal_default
2809
2809
  };
2810
- //# sourceMappingURL=chunk-ERV7GLY3.mjs.map
2810
+ //# sourceMappingURL=chunk-TVF45U7B.mjs.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  authenticationService
3
- } from "./chunk-UXE67LR7.mjs";
3
+ } from "./chunk-6WZUQHZT.mjs";
4
4
  import {
5
5
  indexedDBService_default,
6
6
  usePackageSettingsStore
7
- } from "./chunk-XUBYA5I7.mjs";
7
+ } from "./chunk-7ZDS33S2.mjs";
8
8
  import {
9
9
  useAIProviderStore
10
- } from "./chunk-54ZQ3FSN.mjs";
10
+ } from "./chunk-BENL3EF2.mjs";
11
11
  import {
12
12
  debugLogger
13
13
  } from "./chunk-KCI46M23.mjs";
@@ -287,4 +287,4 @@ var aiProviderInitService = AIProviderInitService.getInstance();
287
287
  export {
288
288
  aiProviderInitService
289
289
  };
290
- //# sourceMappingURL=chunk-H4PBQ5LJ.mjs.map
290
+ //# sourceMappingURL=chunk-VL3CMSDO.mjs.map
package/dist/cli.js CHANGED
@@ -30,7 +30,7 @@ var import_commander = require("commander");
30
30
  // package.json
31
31
  var package_default = {
32
32
  name: "@burtson-labs/bandit-engine",
33
- version: "2.0.44",
33
+ version: "2.0.49",
34
34
  license: "BUSL-1.1",
35
35
  main: "dist/index.js",
36
36
  module: "dist/index.mjs",
@@ -517,55 +517,55 @@ const packageSettings = {
517
517
  },
518
518
  };
519
519
 
520
+ const seedQuickstartAuth = () => {
521
+ if (typeof window === "undefined" || typeof localStorage === "undefined") {
522
+ return;
523
+ }
524
+
525
+ const applyAuthToken = (token: string) => {
526
+ localStorage.setItem("authToken", token);
527
+ const maybeService = (BanditEngine as { authenticationService?: { setToken: (token: string) => void } }).authenticationService;
528
+ try {
529
+ maybeService?.setToken(token);
530
+ } catch (error) {
531
+ console.warn("Bandit quickstart: failed to seed authentication service token", error);
532
+ }
533
+ };
534
+
535
+ const existing = localStorage.getItem("authToken");
536
+ if (existing) {
537
+ applyAuthToken(existing);
538
+ return;
539
+ }
540
+
541
+ const header = {
542
+ alg: "HS256",
543
+ typ: "JWT",
544
+ };
545
+ const payload = {
546
+ exp: Math.floor(Date.now() / 1000) + 60 * 60 * 8,
547
+ roles: ["admin"],
548
+ iat: Math.floor(Date.now() / 1000),
549
+ email: "quickstart@burtson.ai",
550
+ sub: "123456789012345678901",
551
+ };
552
+ const encodeSegment = (value: unknown) =>
553
+ btoa(JSON.stringify(value))
554
+ .replace(/=+$/g, "")
555
+ .replace(/\\+/g, "-")
556
+ .replace(/\\//g, "_");
557
+ const mockToken = \`${"${"}encodeSegment(header)}.${"${"}encodeSegment(payload)}.quickstart\`;
558
+ applyAuthToken(mockToken);
559
+ };
560
+
561
+ seedQuickstartAuth();
562
+
520
563
  function App() {
521
564
  const location = useLocation();
522
565
  const [isModalOpen, setIsModalOpen] = useState(false);
523
566
  const [gatewayStatus, setGatewayStatus] = useState<"checking" | "healthy" | "error">("checking");
524
567
  const [gatewayError, setGatewayError] = useState<string | null>(null);
525
568
 
526
- useEffect(() => {
527
- if (typeof window !== "undefined") {
528
- const applyAuthToken = (token: string) => {
529
- localStorage.setItem("authToken", token);
530
- const maybeService = (BanditEngine as { authenticationService?: { setToken: (token: string) => void } }).authenticationService;
531
- try {
532
- maybeService?.setToken(token);
533
- } catch (error) {
534
- console.warn("Bandit quickstart: failed to seed authentication service token", error);
535
- }
536
- };
537
-
538
- const ensureAuthToken = () => {
539
- const existing = localStorage.getItem("authToken");
540
- if (existing) {
541
- applyAuthToken(existing);
542
- return;
543
- }
544
-
545
- const header = {
546
- alg: "HS256",
547
- typ: "JWT",
548
- };
549
- const payload = {
550
- exp: Math.floor(Date.now() / 1000) + 60 * 60 * 8,
551
- roles: ["admin"],
552
- iat: Math.floor(Date.now() / 1000),
553
- email: "quickstart@burtson.ai",
554
- sub: "123456789012345678901",
555
- };
556
- const encodeSegment = (value: unknown) =>
557
- btoa(JSON.stringify(value))
558
- .replace(/=+$/g, "")
559
- .replace(/\\+/g, "-")
560
- .replace(/\\//g, "_");
561
- const mockToken = \`${"${"}encodeSegment(header)}.${"${"}encodeSegment(payload)}.quickstart\`;
562
- applyAuthToken(mockToken);
563
- };
564
-
565
- ensureAuthToken();
566
- }
567
- }, []);
568
-
569
569
  // Separate effect for health checking to avoid re-renders
570
570
  useEffect(() => {
571
571
  let cancelled = false;