@burtson-labs/bandit-engine 2.0.9 → 2.0.10
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 +74 -29
- package/dist/{aiProviderStore-YWJHSWFA.mjs → aiProviderStore-3YS2BZU3.mjs} +2 -2
- package/dist/chat-ZPJNWIXI.mjs +15 -0
- package/dist/chat-provider.js +211 -16
- package/dist/chat-provider.js.map +1 -1
- package/dist/chat-provider.mjs +6 -6
- package/dist/{chunk-CVIOLFMX.mjs → chunk-2ZNIQD26.mjs} +4 -4
- package/dist/{chunk-6YRLBITU.mjs → chunk-5UVULH77.mjs} +18 -9
- package/dist/chunk-5UVULH77.mjs.map +1 -0
- package/dist/{chunk-VSHO7PF2.mjs → chunk-CY227I4F.mjs} +23 -13
- package/dist/chunk-CY227I4F.mjs.map +1 -0
- package/dist/{chunk-JQ6UNJNW.mjs → chunk-IFN52MQL.mjs} +16 -10
- package/dist/{chunk-JQ6UNJNW.mjs.map → chunk-IFN52MQL.mjs.map} +1 -1
- package/dist/{chunk-AVC6IZJQ.mjs → chunk-IHJPVIGB.mjs} +179 -2
- package/dist/chunk-IHJPVIGB.mjs.map +1 -0
- package/dist/{chunk-HHKXWNCG.mjs → chunk-L7UOQ2Y2.mjs} +5 -5
- package/dist/{chunk-5E7S7DK3.mjs → chunk-RTQDQ6TC.mjs} +2 -2
- package/dist/{chunk-6IHJZCUH.mjs → chunk-UMPVXYVC.mjs} +4 -4
- package/dist/{chunk-PXXVEH5M.mjs → chunk-XEG45Q6V.mjs} +4 -4
- package/dist/{chunk-QHLKGSMB.mjs → chunk-XUBYA5I7.mjs} +2 -2
- package/dist/{chunk-QHLKGSMB.mjs.map → chunk-XUBYA5I7.mjs.map} +1 -1
- package/dist/cli/cli.js +14 -1
- package/dist/cli/cli.js.map +1 -1
- package/dist/{gateway-BXVrH8B-.d.mts → gateway-BiHRHJMM.d.mts} +3 -1
- package/dist/{gateway-BXVrH8B-.d.ts → gateway-BiHRHJMM.d.ts} +3 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +282 -72
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -10
- package/dist/management/management.js +262 -62
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +8 -8
- package/dist/modals/chat-modal/chat-modal.js +202 -17
- package/dist/modals/chat-modal/chat-modal.js.map +1 -1
- package/dist/modals/chat-modal/chat-modal.mjs +5 -5
- package/dist/{modelStore-CY6SECYD.mjs → modelStore-UMJBDSEF.mjs} +2 -2
- package/dist/public-types.d.mts +1 -1
- package/dist/public-types.d.ts +1 -1
- package/docs/01_quickstart.md +9 -6
- package/docs/02_gateway_api.md +55 -12
- package/docs/api_reference/assets/search.js +1 -1
- package/docs/api_reference/classes/DebugLogger.html +11 -11
- package/docs/api_reference/classes/FeatureFlagService.html +13 -13
- package/docs/api_reference/classes/NotificationService.html +10 -10
- package/docs/api_reference/classes/StreamingTTSClient.html +9 -9
- package/docs/api_reference/classes/VectorDatabaseService.html +24 -24
- package/docs/api_reference/classes/VectorMigrationService.html +8 -8
- package/docs/api_reference/classes/VoiceService.html +2 -2
- package/docs/api_reference/enums/TTSState.html +2 -2
- package/docs/api_reference/functions/Chat.html +1 -1
- package/docs/api_reference/functions/ChatModal.html +1 -1
- package/docs/api_reference/functions/ChatProvider.html +1 -1
- package/docs/api_reference/functions/FeatureFlagProvider.html +1 -1
- package/docs/api_reference/functions/FeedbackButton.html +1 -1
- package/docs/api_reference/functions/FeedbackModal.html +1 -1
- package/docs/api_reference/functions/Management.html +1 -1
- package/docs/api_reference/functions/NotificationProvider.html +1 -1
- package/docs/api_reference/functions/SubscriptionExpiredGuard.html +1 -1
- package/docs/api_reference/functions/SubscriptionExpiredModal.html +1 -1
- package/docs/api_reference/functions/defineCustomElement.html +1 -1
- package/docs/api_reference/functions/getCriticalConfig.html +1 -1
- package/docs/api_reference/functions/getFeatureMatrix.html +1 -1
- package/docs/api_reference/functions/getStreamingTTSClient.html +1 -1
- package/docs/api_reference/functions/getSystemConstants.html +1 -1
- package/docs/api_reference/functions/getTTSState.html +1 -1
- package/docs/api_reference/functions/handleHttpError.html +1 -1
- package/docs/api_reference/functions/handleSubscriptionUpgrade.html +1 -1
- package/docs/api_reference/functions/handleValidationError.html +1 -1
- package/docs/api_reference/functions/initializeCoreSystem.html +1 -1
- package/docs/api_reference/functions/pauseTTS.html +1 -1
- package/docs/api_reference/functions/previewTierUpgrade.html +1 -1
- package/docs/api_reference/functions/resumeTTS.html +1 -1
- package/docs/api_reference/functions/showInfoNotification.html +1 -1
- package/docs/api_reference/functions/showSuccessNotification.html +1 -1
- package/docs/api_reference/functions/speakWithStreaming.html +1 -1
- package/docs/api_reference/functions/stopTTS.html +1 -1
- package/docs/api_reference/functions/syncSubscriptionWithAPI.html +1 -1
- package/docs/api_reference/functions/updateSubscriptionTier.html +1 -1
- package/docs/api_reference/functions/useFeatureFlag.html +1 -1
- package/docs/api_reference/functions/useFeatureVisibility.html +1 -1
- package/docs/api_reference/functions/useFeatures.html +1 -1
- package/docs/api_reference/functions/useGatewayHealth.html +1 -1
- package/docs/api_reference/functions/useGatewayMemory.html +1 -1
- package/docs/api_reference/functions/useGatewayModels.html +1 -1
- package/docs/api_reference/functions/useGlobalTTS.html +1 -1
- package/docs/api_reference/functions/useNotification.html +1 -1
- package/docs/api_reference/functions/useNotificationService.html +1 -1
- package/docs/api_reference/functions/useTTS.html +1 -1
- package/docs/api_reference/functions/useVectorStore.html +1 -1
- package/docs/api_reference/functions/useVoiceStore.html +2 -2
- package/docs/api_reference/functions/useVoices.html +1 -1
- package/docs/api_reference/functions/validateEnvironment.html +1 -1
- package/docs/api_reference/functions/validateSystemIntegrity.html +1 -1
- package/docs/api_reference/index.html +34 -15
- package/docs/api_reference/interfaces/AIChatRequest.html +2 -2
- package/docs/api_reference/interfaces/AIChatResponse.html +2 -2
- package/docs/api_reference/interfaces/AIGenerateRequest.html +2 -2
- package/docs/api_reference/interfaces/AIGenerateResponse.html +2 -2
- package/docs/api_reference/interfaces/AIMessage.html +2 -2
- package/docs/api_reference/interfaces/AIModel.html +2 -2
- package/docs/api_reference/interfaces/AIProviderConfig.html +2 -2
- package/docs/api_reference/interfaces/ChatConfig.html +3 -3
- package/docs/api_reference/interfaces/ChatModalProps.html +3 -3
- package/docs/api_reference/interfaces/CreateMemoryOptions.html +2 -2
- package/docs/api_reference/interfaces/FeatureEvaluation.html +7 -7
- package/docs/api_reference/interfaces/FeatureFlagConfig.html +9 -9
- package/docs/api_reference/interfaces/FeatureFlagContextValue.html +8 -8
- package/docs/api_reference/interfaces/FeatureFlagProviderProps.html +2 -2
- package/docs/api_reference/interfaces/FeedbackButtonProps.html +10 -10
- package/docs/api_reference/interfaces/FeedbackCategories.html +2 -2
- package/docs/api_reference/interfaces/FeedbackModalProps.html +2 -2
- package/docs/api_reference/interfaces/FeedbackPriorities.html +2 -2
- package/docs/api_reference/interfaces/FeedbackRequest.html +2 -2
- package/docs/api_reference/interfaces/FeedbackResponse.html +2 -2
- package/docs/api_reference/interfaces/FileUploadResult.html +2 -2
- package/docs/api_reference/interfaces/GatewayChatRequest.html +2 -2
- package/docs/api_reference/interfaces/GatewayChatResponse.html +2 -2
- package/docs/api_reference/interfaces/GatewayContract.html +2 -2
- package/docs/api_reference/interfaces/GatewayGenerateRequest.html +2 -2
- package/docs/api_reference/interfaces/GatewayGenerateResponse.html +2 -2
- package/docs/api_reference/interfaces/GatewayHealthResponse.html +2 -2
- package/docs/api_reference/interfaces/GatewayMemoryRecord.html +2 -2
- package/docs/api_reference/interfaces/GatewayMemoryResponse.html +2 -2
- package/docs/api_reference/interfaces/GatewayMessage.html +2 -2
- package/docs/api_reference/interfaces/GatewayMessageContent.html +2 -2
- package/docs/api_reference/interfaces/GatewayModel.html +2 -2
- package/docs/api_reference/interfaces/GatewayModelsResponse.html +2 -2
- package/docs/api_reference/interfaces/MemorySearchFilters.html +2 -2
- package/docs/api_reference/interfaces/MigrationProgress.html +2 -2
- package/docs/api_reference/interfaces/MigrationStatus.html +2 -2
- package/docs/api_reference/interfaces/NotificationConfig.html +2 -2
- package/docs/api_reference/interfaces/NotificationContextType.html +2 -2
- package/docs/api_reference/interfaces/NotificationProviderProps.html +2 -2
- package/docs/api_reference/interfaces/PackageSettings.html +4 -2
- package/docs/api_reference/interfaces/SearchOptions.html +2 -2
- package/docs/api_reference/interfaces/SearchResult.html +2 -2
- package/docs/api_reference/interfaces/SubscriptionExpiredGuardProps.html +2 -2
- package/docs/api_reference/interfaces/SubscriptionExpiredModalProps.html +2 -2
- package/docs/api_reference/interfaces/TTSOptions.html +2 -2
- package/docs/api_reference/interfaces/TTSProgress.html +2 -2
- package/docs/api_reference/interfaces/TrialUsage.html +2 -2
- package/docs/api_reference/interfaces/UploadRequest.html +3 -3
- package/docs/api_reference/interfaces/UseTTSReturn.html +2 -2
- package/docs/api_reference/interfaces/VectorDocument.html +2 -2
- package/docs/api_reference/interfaces/VectorMemory.html +2 -2
- package/docs/api_reference/interfaces/VectorMemoryMetadata.html +2 -2
- package/docs/api_reference/interfaces/VectorStoreStatus.html +2 -2
- package/docs/api_reference/interfaces/VoiceModelsResponse.html +2 -2
- package/docs/api_reference/interfaces/VoiceState.html +2 -2
- package/docs/api_reference/media/02_gateway_api.md +55 -12
- package/docs/api_reference/media/README.md +37 -9
- package/docs/api_reference/types/FeatureKey.html +1 -1
- package/docs/api_reference/types/FeatureMatrix.html +1 -1
- package/docs/api_reference/types/GatewayQueryOptions.html +1 -1
- package/docs/api_reference/types/LogContext.html +1 -1
- package/docs/api_reference/types/SubscriptionTier.html +1 -1
- package/docs/api_reference/variables/DEFAULT_TIER_FEATURES.html +1 -1
- package/docs/api_reference/variables/FeatureFlagContext.html +1 -1
- package/docs/api_reference/variables/OSS_DEFAULT_FEATURES.html +1 -1
- package/docs/api_reference/variables/SYSTEM_FLAGS.html +1 -1
- package/docs/api_reference/variables/authenticationService.html +1 -1
- package/docs/api_reference/variables/debugLogger-1.html +1 -1
- package/docs/api_reference/variables/featureFlagService-1.html +1 -1
- package/docs/api_reference/variables/notificationService-1.html +1 -1
- package/docs/api_reference/variables/vectorDatabaseService-1.html +1 -1
- package/docs/api_reference/variables/vectorMigrationService-1.html +1 -1
- package/docs/api_reference/variables/voiceService-1.html +1 -1
- package/package.json +14 -1
- package/dist/chat-OLCX6TBK.mjs +0 -15
- package/dist/chunk-6YRLBITU.mjs.map +0 -1
- package/dist/chunk-AVC6IZJQ.mjs.map +0 -1
- package/dist/chunk-VSHO7PF2.mjs.map +0 -1
- package/docs/api_reference/media/README-1.md +0 -23
- /package/dist/{aiProviderStore-YWJHSWFA.mjs.map → aiProviderStore-3YS2BZU3.mjs.map} +0 -0
- /package/dist/{chat-OLCX6TBK.mjs.map → chat-ZPJNWIXI.mjs.map} +0 -0
- /package/dist/{chunk-CVIOLFMX.mjs.map → chunk-2ZNIQD26.mjs.map} +0 -0
- /package/dist/{chunk-HHKXWNCG.mjs.map → chunk-L7UOQ2Y2.mjs.map} +0 -0
- /package/dist/{chunk-5E7S7DK3.mjs.map → chunk-RTQDQ6TC.mjs.map} +0 -0
- /package/dist/{chunk-6IHJZCUH.mjs.map → chunk-UMPVXYVC.mjs.map} +0 -0
- /package/dist/{chunk-PXXVEH5M.mjs.map → chunk-XEG45Q6V.mjs.map} +0 -0
- /package/dist/{modelStore-CY6SECYD.mjs.map → modelStore-UMJBDSEF.mjs.map} +0 -0
package/dist/chat-provider.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ChatProvider,
|
|
3
3
|
chat_provider_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CY227I4F.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-2ZNIQD26.mjs";
|
|
7
|
+
import "./chunk-RTQDQ6TC.mjs";
|
|
8
|
+
import "./chunk-UMPVXYVC.mjs";
|
|
9
|
+
import "./chunk-XUBYA5I7.mjs";
|
|
10
|
+
import "./chunk-IHJPVIGB.mjs";
|
|
11
11
|
import "./chunk-KCI46M23.mjs";
|
|
12
12
|
import "./chunk-BJTO5JO5.mjs";
|
|
13
13
|
export {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
authenticationService
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UMPVXYVC.mjs";
|
|
4
4
|
import {
|
|
5
5
|
indexedDBService_default,
|
|
6
6
|
usePackageSettingsStore
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XUBYA5I7.mjs";
|
|
8
8
|
import {
|
|
9
9
|
useAIProviderStore
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IHJPVIGB.mjs";
|
|
11
11
|
import {
|
|
12
12
|
debugLogger
|
|
13
13
|
} from "./chunk-KCI46M23.mjs";
|
|
@@ -256,4 +256,4 @@ var aiProviderInitService = AIProviderInitService.getInstance();
|
|
|
256
256
|
export {
|
|
257
257
|
aiProviderInitService
|
|
258
258
|
};
|
|
259
|
-
//# sourceMappingURL=chunk-
|
|
259
|
+
//# sourceMappingURL=chunk-2ZNIQD26.mjs.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-ONQMRE2G.mjs";
|
|
4
4
|
import {
|
|
5
5
|
useMCPToolsStore
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RTQDQ6TC.mjs";
|
|
7
7
|
import {
|
|
8
8
|
FeedbackButton,
|
|
9
9
|
FeedbackModal,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
useNotificationService,
|
|
20
20
|
useTTS,
|
|
21
21
|
useVoiceStore
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-XEG45Q6V.mjs";
|
|
23
23
|
import {
|
|
24
24
|
authenticationService,
|
|
25
25
|
brandingService_default,
|
|
@@ -43,16 +43,16 @@ import {
|
|
|
43
43
|
useMemoryStore,
|
|
44
44
|
useProjectStore,
|
|
45
45
|
useVectorStore
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-UMPVXYVC.mjs";
|
|
47
47
|
import {
|
|
48
48
|
indexedDBService_default,
|
|
49
49
|
useModelStore,
|
|
50
50
|
usePackageSettingsStore,
|
|
51
51
|
usePreferencesStore
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-XUBYA5I7.mjs";
|
|
53
53
|
import {
|
|
54
54
|
useAIProviderStore
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-IHJPVIGB.mjs";
|
|
56
56
|
import {
|
|
57
57
|
debugLogger
|
|
58
58
|
} from "./chunk-KCI46M23.mjs";
|
|
@@ -7828,10 +7828,12 @@ var QuerySuggestionPicker = ({
|
|
|
7828
7828
|
} else {
|
|
7829
7829
|
setExamplePrompts([]);
|
|
7830
7830
|
setVisiblePrompts([]);
|
|
7831
|
+
hasGenerated.current = false;
|
|
7831
7832
|
}
|
|
7832
7833
|
}).catch((error) => {
|
|
7833
7834
|
setExamplePrompts([]);
|
|
7834
7835
|
setVisiblePrompts([]);
|
|
7836
|
+
hasGenerated.current = false;
|
|
7835
7837
|
});
|
|
7836
7838
|
}, [getCurrentModel, isLoading]);
|
|
7837
7839
|
useEffect12(() => {
|
|
@@ -8362,6 +8364,7 @@ var ChatContent = () => {
|
|
|
8362
8364
|
const featureFlag = useFeatureFlag();
|
|
8363
8365
|
const { isOSSMode } = featureFlag;
|
|
8364
8366
|
const ossMode = isOSSMode() || !packageSettings?.featureFlags?.subscriptionType;
|
|
8367
|
+
const playgroundBypassAccess = packageSettings?.playgroundBypassAuth || typeof window !== "undefined" && window.location.pathname.includes("/playground");
|
|
8365
8368
|
const notificationService = useNotificationService();
|
|
8366
8369
|
const [selectedTheme, setSelectedTheme] = useState15(null);
|
|
8367
8370
|
const [themeLoading, setThemeLoading] = useState15(true);
|
|
@@ -9195,7 +9198,7 @@ var ChatContent = () => {
|
|
|
9195
9198
|
}
|
|
9196
9199
|
};
|
|
9197
9200
|
if (!hydrated || brandingLoading || themeLoading) return null;
|
|
9198
|
-
const userHasAccess = ossMode || claims?.roles?.includes("super-user") || claims?.roles?.includes("admin");
|
|
9201
|
+
const userHasAccess = playgroundBypassAccess || ossMode || claims?.roles?.includes("super-user") || claims?.roles?.includes("admin");
|
|
9199
9202
|
if (!userHasAccess) {
|
|
9200
9203
|
return /* @__PURE__ */ jsxs13(ThemeProvider, { theme: banditTheme, children: [
|
|
9201
9204
|
/* @__PURE__ */ jsx18(CssBaseline, {}),
|
|
@@ -9398,13 +9401,19 @@ var Chat = () => {
|
|
|
9398
9401
|
}
|
|
9399
9402
|
const ossConfigured = !packageSettings.featureFlags?.subscriptionType;
|
|
9400
9403
|
const allowUnauthenticated = isOSSMode() || ossConfigured;
|
|
9404
|
+
const playgroundBypassAuth = packageSettings.playgroundBypassAuth;
|
|
9405
|
+
const isPlaygroundRoute = typeof window !== "undefined" && window.location.pathname.includes("/playground");
|
|
9406
|
+
const bypassAuth = playgroundBypassAuth || isPlaygroundRoute;
|
|
9401
9407
|
debugLogger.info("Chat authentication gate", {
|
|
9402
9408
|
ossConfigured,
|
|
9403
9409
|
isOSSMode: isOSSMode(),
|
|
9404
9410
|
tier: featureFlag.getEvaluation()?.tier,
|
|
9405
|
-
hasToken: authenticationService.isAuthenticated()
|
|
9411
|
+
hasToken: authenticationService.isAuthenticated(),
|
|
9412
|
+
playgroundBypassAuth,
|
|
9413
|
+
isPlaygroundRoute,
|
|
9414
|
+
bypassAuth
|
|
9406
9415
|
});
|
|
9407
|
-
if (!allowUnauthenticated && !authenticationService.isAuthenticated()) {
|
|
9416
|
+
if (!allowUnauthenticated && !bypassAuth && !authenticationService.isAuthenticated()) {
|
|
9408
9417
|
debugLogger.debug("User is not authenticated, redirecting to login");
|
|
9409
9418
|
return /* @__PURE__ */ jsx18(Navigate, { to: "/login", replace: true });
|
|
9410
9419
|
}
|
|
@@ -9415,4 +9424,4 @@ var chat_default = Chat;
|
|
|
9415
9424
|
export {
|
|
9416
9425
|
chat_default
|
|
9417
9426
|
};
|
|
9418
|
-
//# sourceMappingURL=chunk-
|
|
9427
|
+
//# sourceMappingURL=chunk-5UVULH77.mjs.map
|