@burtson-labs/bandit-engine 2.0.165 → 2.0.166
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/README.md +4 -1
- package/dist/aiProviderStore-HY5G4QAK.mjs +8 -0
- package/dist/chat-RCMZYACB.mjs +15 -0
- package/dist/chat-provider.js +175 -109
- package/dist/chat-provider.js.map +1 -1
- package/dist/chat-provider.mjs +6 -7
- package/dist/{chunk-FEIDGXVR.mjs → chunk-33OSALGS.mjs} +24 -6
- package/dist/{chunk-FEIDGXVR.mjs.map → chunk-33OSALGS.mjs.map} +1 -1
- package/dist/{chunk-LKGBO5OP.mjs → chunk-6KRAPGXE.mjs} +12 -84
- package/dist/chunk-6KRAPGXE.mjs.map +1 -0
- package/dist/{chunk-6VDL4SLX.mjs → chunk-75OBTJPN.mjs} +5 -5
- package/dist/{chunk-QHGGV4KJ.mjs → chunk-A6W6XIDD.mjs} +6 -6
- package/dist/{chunk-J6LSSK3G.mjs → chunk-GRPTCHFN.mjs} +149 -41
- package/dist/chunk-GRPTCHFN.mjs.map +1 -0
- package/dist/{chunk-ASWUEAWM.mjs → chunk-IB2LPSQQ.mjs} +2 -2
- package/dist/{chunk-RNCASZ2Y.mjs → chunk-M4DWPNZZ.mjs} +10 -10
- package/dist/{chunk-NGGTQVGX.mjs → chunk-MM3NRLVR.mjs} +3 -3
- package/dist/{chunk-RLW4RBIR.mjs → chunk-Q2DINRIU.mjs} +4 -4
- package/dist/{chunk-WSUUW7T2.mjs → chunk-WSZE3DDJ.mjs} +7 -7
- package/dist/{chunk-2EM4ATKI.mjs → chunk-YH5YWK4K.mjs} +2 -2
- package/dist/index.d.mts +92 -1
- package/dist/index.d.ts +92 -1
- package/dist/index.js +188 -130
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -20
- package/dist/index.mjs.map +1 -1
- package/dist/management/management.js +159 -120
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +9 -10
- package/dist/{memoryUtils-2FVXDSS6.mjs → memoryUtils-HGCYEUCD.mjs} +1 -3
- package/dist/{memoryUtils-2FVXDSS6.mjs.map → memoryUtils-HGCYEUCD.mjs.map} +1 -1
- package/dist/modals/chat-modal/chat-modal.js +149 -30
- package/dist/modals/chat-modal/chat-modal.js.map +1 -1
- package/dist/modals/chat-modal/chat-modal.mjs +5 -6
- package/dist/modelStore-F6JQUXGG.mjs +8 -0
- package/dist/shared/custom-element.mjs +0 -1
- package/docs/03_provider_integration.md +5 -2
- package/package.json +1 -1
- package/dist/aiProviderStore-M4BVEKUB.mjs +0 -9
- package/dist/chat-EMKHB23B.mjs +0 -16
- package/dist/chunk-BJTO5JO5.mjs +0 -11
- package/dist/chunk-J6LSSK3G.mjs.map +0 -1
- package/dist/chunk-LKGBO5OP.mjs.map +0 -1
- package/dist/modelStore-7YYELPF6.mjs +0 -9
- package/dist/modelStore-7YYELPF6.mjs.map +0 -1
- /package/dist/{aiProviderStore-M4BVEKUB.mjs.map → aiProviderStore-HY5G4QAK.mjs.map} +0 -0
- /package/dist/{chat-EMKHB23B.mjs.map → chat-RCMZYACB.mjs.map} +0 -0
- /package/dist/{chunk-6VDL4SLX.mjs.map → chunk-75OBTJPN.mjs.map} +0 -0
- /package/dist/{chunk-QHGGV4KJ.mjs.map → chunk-A6W6XIDD.mjs.map} +0 -0
- /package/dist/{chunk-ASWUEAWM.mjs.map → chunk-IB2LPSQQ.mjs.map} +0 -0
- /package/dist/{chunk-RNCASZ2Y.mjs.map → chunk-M4DWPNZZ.mjs.map} +0 -0
- /package/dist/{chunk-NGGTQVGX.mjs.map → chunk-MM3NRLVR.mjs.map} +0 -0
- /package/dist/{chunk-RLW4RBIR.mjs.map → chunk-Q2DINRIU.mjs.map} +0 -0
- /package/dist/{chunk-WSUUW7T2.mjs.map → chunk-WSZE3DDJ.mjs.map} +0 -0
- /package/dist/{chunk-2EM4ATKI.mjs.map → chunk-YH5YWK4K.mjs.map} +0 -0
- /package/dist/{chunk-BJTO5JO5.mjs.map → modelStore-F6JQUXGG.mjs.map} +0 -0
package/dist/chat-provider.mjs
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ChatProvider,
|
|
3
3
|
chat_provider_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-A6W6XIDD.mjs";
|
|
5
5
|
import "./chunk-ONQMRE2G.mjs";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-6KRAPGXE.mjs";
|
|
7
|
+
import "./chunk-MM3NRLVR.mjs";
|
|
8
|
+
import "./chunk-33OSALGS.mjs";
|
|
9
|
+
import "./chunk-YH5YWK4K.mjs";
|
|
10
|
+
import "./chunk-GRPTCHFN.mjs";
|
|
11
11
|
import "./chunk-HNXPDIWC.mjs";
|
|
12
|
-
import "./chunk-BJTO5JO5.mjs";
|
|
13
12
|
export {
|
|
14
13
|
ChatProvider,
|
|
15
14
|
chat_provider_default as default
|
|
@@ -2,12 +2,14 @@ import {
|
|
|
2
2
|
indexedDBService_default,
|
|
3
3
|
useModelStore,
|
|
4
4
|
usePackageSettingsStore
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-YH5YWK4K.mjs";
|
|
6
6
|
import {
|
|
7
|
+
AUTH_TOKEN_CHANGED_EVENT,
|
|
8
|
+
TOKEN_KEY,
|
|
7
9
|
authenticationService,
|
|
8
10
|
useAIProviderStore,
|
|
9
11
|
useAuthenticationStore
|
|
10
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-GRPTCHFN.mjs";
|
|
11
13
|
import {
|
|
12
14
|
debugLogger
|
|
13
15
|
} from "./chunk-HNXPDIWC.mjs";
|
|
@@ -3229,7 +3231,7 @@ var VectorDatabaseService = class {
|
|
|
3229
3231
|
onProgress,
|
|
3230
3232
|
validateContent = true
|
|
3231
3233
|
} = options;
|
|
3232
|
-
const { MemoryUtils } = await import("./memoryUtils-
|
|
3234
|
+
const { MemoryUtils } = await import("./memoryUtils-HGCYEUCD.mjs");
|
|
3233
3235
|
try {
|
|
3234
3236
|
let validMemories = memories;
|
|
3235
3237
|
const warnings = [];
|
|
@@ -4415,6 +4417,19 @@ var OSS_DEFAULT_FEATURES = {
|
|
|
4415
4417
|
// src/contexts/FeatureFlagContext.tsx
|
|
4416
4418
|
import { createContext, useContext, useEffect, useState, useCallback } from "react";
|
|
4417
4419
|
import { jsx } from "react/jsx-runtime";
|
|
4420
|
+
var readSessionToken = (jwtStorageKey) => {
|
|
4421
|
+
const fromStorage = () => {
|
|
4422
|
+
try {
|
|
4423
|
+
return localStorage.getItem(jwtStorageKey);
|
|
4424
|
+
} catch {
|
|
4425
|
+
return null;
|
|
4426
|
+
}
|
|
4427
|
+
};
|
|
4428
|
+
if (jwtStorageKey && jwtStorageKey !== TOKEN_KEY) {
|
|
4429
|
+
return fromStorage() ?? authenticationService.getToken();
|
|
4430
|
+
}
|
|
4431
|
+
return authenticationService.getToken() ?? fromStorage();
|
|
4432
|
+
};
|
|
4418
4433
|
var FeatureFlagContext = createContext(void 0);
|
|
4419
4434
|
function decodeJWT(token) {
|
|
4420
4435
|
try {
|
|
@@ -4480,7 +4495,7 @@ var FeatureFlagProvider = ({ config, children }) => {
|
|
|
4480
4495
|
let effectiveTier = currentTier || subscriptionType || "oss";
|
|
4481
4496
|
if (typeof window !== "undefined") {
|
|
4482
4497
|
try {
|
|
4483
|
-
const token =
|
|
4498
|
+
const token = readSessionToken(jwtStorageKey);
|
|
4484
4499
|
if (token) {
|
|
4485
4500
|
jwtFound = true;
|
|
4486
4501
|
const payload = decodeJWT(token);
|
|
@@ -4566,10 +4581,13 @@ var FeatureFlagProvider = ({ config, children }) => {
|
|
|
4566
4581
|
setCurrentTier(e.detail.tier);
|
|
4567
4582
|
}
|
|
4568
4583
|
};
|
|
4584
|
+
const handleSessionChange = () => refreshEvaluation();
|
|
4569
4585
|
window.addEventListener("storage", handleStorageChange);
|
|
4586
|
+
window.addEventListener(AUTH_TOKEN_CHANGED_EVENT, handleSessionChange);
|
|
4570
4587
|
window.addEventListener("bandit:tier-updated", handleTierUpdate);
|
|
4571
4588
|
return () => {
|
|
4572
4589
|
window.removeEventListener("storage", handleStorageChange);
|
|
4590
|
+
window.removeEventListener(AUTH_TOKEN_CHANGED_EVENT, handleSessionChange);
|
|
4573
4591
|
window.removeEventListener("bandit:tier-updated", handleTierUpdate);
|
|
4574
4592
|
};
|
|
4575
4593
|
}, [refreshEvaluation, config.jwtStorageKey]);
|
|
@@ -4833,7 +4851,7 @@ var useVectorStore = () => {
|
|
|
4833
4851
|
}, []);
|
|
4834
4852
|
const checkProviderCompatibility = useCallback2(async () => {
|
|
4835
4853
|
try {
|
|
4836
|
-
const { useAIProviderStore: useAIProviderStore2 } = await import("./aiProviderStore-
|
|
4854
|
+
const { useAIProviderStore: useAIProviderStore2 } = await import("./aiProviderStore-HY5G4QAK.mjs");
|
|
4837
4855
|
if (!mountedRef.current) return false;
|
|
4838
4856
|
const aiProviderState = useAIProviderStore2.getState();
|
|
4839
4857
|
const provider = aiProviderState.provider;
|
|
@@ -5874,4 +5892,4 @@ export {
|
|
|
5874
5892
|
useNotification,
|
|
5875
5893
|
NotificationProvider
|
|
5876
5894
|
};
|
|
5877
|
-
//# sourceMappingURL=chunk-
|
|
5895
|
+
//# sourceMappingURL=chunk-33OSALGS.mjs.map
|