@burtson-labs/bandit-engine 2.0.8 → 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/LICENSE +2 -2
- package/README.md +161 -56
- package/dist/{aiProviderStore-YWJHSWFA.mjs → aiProviderStore-3YS2BZU3.mjs} +2 -2
- package/dist/chat-ZPJNWIXI.mjs +15 -0
- package/dist/chat-provider.js +9608 -0
- package/dist/chat-provider.js.map +1 -0
- package/dist/chat-provider.mjs +17 -0
- package/dist/chunk-2ZNIQD26.mjs +259 -0
- package/dist/chunk-2ZNIQD26.mjs.map +1 -0
- package/dist/chunk-5UVULH77.mjs +9427 -0
- package/dist/chunk-5UVULH77.mjs.map +1 -0
- package/dist/chunk-CY227I4F.mjs +160 -0
- package/dist/chunk-CY227I4F.mjs.map +1 -0
- package/dist/chunk-IFN52MQL.mjs +8763 -0
- package/dist/chunk-IFN52MQL.mjs.map +1 -0
- package/dist/{chunk-AVC6IZJQ.mjs → chunk-IHJPVIGB.mjs} +179 -2
- package/dist/chunk-IHJPVIGB.mjs.map +1 -0
- package/dist/chunk-L7UOQ2Y2.mjs +2810 -0
- package/dist/chunk-L7UOQ2Y2.mjs.map +1 -0
- package/dist/chunk-ONQMRE2G.mjs +26 -0
- package/dist/chunk-ONQMRE2G.mjs.map +1 -0
- package/dist/chunk-RTQDQ6TC.mjs +231 -0
- package/dist/chunk-RTQDQ6TC.mjs.map +1 -0
- package/dist/chunk-UMPVXYVC.mjs +5658 -0
- package/dist/chunk-UMPVXYVC.mjs.map +1 -0
- package/dist/chunk-XEG45Q6V.mjs +8925 -0
- package/dist/chunk-XEG45Q6V.mjs.map +1 -0
- package/dist/{chunk-WYS5CZVG.mjs → chunk-XUBYA5I7.mjs} +2 -2
- package/dist/{chunk-WYS5CZVG.mjs.map → chunk-XUBYA5I7.mjs.map} +1 -1
- package/dist/cli/cli.js +24 -13
- package/dist/cli/cli.js.map +1 -1
- package/dist/gateway-BiHRHJMM.d.mts +314 -0
- package/dist/gateway-BiHRHJMM.d.ts +314 -0
- package/dist/index.d.mts +11 -309
- package/dist/index.d.ts +11 -309
- package/dist/index.js +400 -155
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +86 -11874
- package/dist/index.mjs.map +1 -1
- package/dist/management/management.js +39535 -0
- package/dist/management/management.js.map +1 -0
- package/dist/management/management.mjs +16 -0
- package/dist/management/management.mjs.map +1 -0
- package/dist/{chunk-BIPELT57.mjs → modals/chat-modal/chat-modal.js} +16818 -20860
- package/dist/modals/chat-modal/chat-modal.js.map +1 -0
- package/dist/modals/chat-modal/chat-modal.mjs +19 -0
- package/dist/modals/chat-modal/chat-modal.mjs.map +1 -0
- package/dist/{modelStore-Y3LZWRQC.mjs → modelStore-UMJBDSEF.mjs} +2 -2
- package/dist/modelStore-UMJBDSEF.mjs.map +1 -0
- package/dist/public-types.d.mts +32 -0
- package/dist/public-types.d.ts +32 -0
- package/docs/01_quickstart.md +9 -6
- package/docs/02_gateway_api.md +55 -12
- package/docs/04_local_dev.md +1 -1
- package/docs/api_reference/assets/navigation.js +1 -1
- 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 +4 -4
- 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 +130 -40
- 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 +7 -0
- 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 +5 -3
- 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/LICENSE +2 -2
- package/docs/api_reference/media/PROTECTION-README.md +6 -8
- package/docs/api_reference/media/README.md +37 -9
- package/docs/api_reference/modules.html +1 -0
- 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 +24 -13
- package/dist/chat-QXB526NZ.mjs +0 -11
- package/dist/chunk-AVC6IZJQ.mjs.map +0 -1
- package/dist/chunk-BIPELT57.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-QXB526NZ.mjs.map → chat-ZPJNWIXI.mjs.map} +0 -0
- /package/dist/{modelStore-Y3LZWRQC.mjs.map → chat-provider.mjs.map} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,174 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { F as FeatureFlagConfig, a as FeatureKey, b as FeatureEvaluation, S as SubscriptionTier, T as TrialUsage, G as GatewayHealthResponse, c as GatewayModel, d as GatewayMemoryResponse } from './gateway-BiHRHJMM.mjs';
|
|
2
|
+
export { t as AIChatRequest, u as AIChatResponse, w as AIGenerateRequest, x as AIGenerateResponse, y as AIMessage, s as AIModel, A as AIProviderConfig, g as ChatConfig, e as ChatModal, h as ChatModalProps, C as ChatProvider, D as DEFAULT_TIER_FEATURES, f as FeatureMatrix, m as GatewayChatRequest, n as GatewayChatResponse, j as GatewayContract, o as GatewayGenerateRequest, p as GatewayGenerateResponse, r as GatewayMemoryRecord, l as GatewayMessage, k as GatewayMessageContent, q as GatewayModelsResponse, O as OSS_DEFAULT_FEATURES, P as PackageSettings, i as VoiceModelsResponse, V as VoiceService, v as voiceService } from './gateway-BiHRHJMM.mjs';
|
|
2
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import React, { ReactNode } from 'react';
|
|
3
5
|
import * as zustand from 'zustand';
|
|
4
6
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
7
|
import { UseQueryOptions } from '@tanstack/react-query';
|
|
6
8
|
import { Observable } from 'rxjs';
|
|
7
9
|
import { AlertColor } from '@mui/material';
|
|
8
10
|
|
|
9
|
-
/**
|
|
10
|
-
* Common types used across all AI providers
|
|
11
|
-
*/
|
|
12
|
-
interface AIMessage {
|
|
13
|
-
role: 'system' | 'user' | 'assistant';
|
|
14
|
-
content: string;
|
|
15
|
-
}
|
|
16
|
-
interface AIChatRequest {
|
|
17
|
-
model: string;
|
|
18
|
-
messages: AIMessage[];
|
|
19
|
-
stream?: boolean;
|
|
20
|
-
temperature?: number;
|
|
21
|
-
maxTokens?: number;
|
|
22
|
-
images?: string[];
|
|
23
|
-
options?: Record<string, unknown>;
|
|
24
|
-
}
|
|
25
|
-
interface AIChatResponse {
|
|
26
|
-
message: {
|
|
27
|
-
content: string;
|
|
28
|
-
role: 'assistant';
|
|
29
|
-
};
|
|
30
|
-
done?: boolean;
|
|
31
|
-
}
|
|
32
|
-
interface AIGenerateRequest {
|
|
33
|
-
model: string;
|
|
34
|
-
prompt: string;
|
|
35
|
-
stream?: boolean;
|
|
36
|
-
options?: Record<string, unknown>;
|
|
37
|
-
}
|
|
38
|
-
interface AIGenerateResponse {
|
|
39
|
-
response: string;
|
|
40
|
-
done?: boolean;
|
|
41
|
-
}
|
|
42
|
-
interface AIModel {
|
|
43
|
-
name: string;
|
|
44
|
-
size?: number;
|
|
45
|
-
details?: {
|
|
46
|
-
format?: string;
|
|
47
|
-
family?: string;
|
|
48
|
-
families?: string[];
|
|
49
|
-
parameter_size?: string;
|
|
50
|
-
quantization_level?: string;
|
|
51
|
-
};
|
|
52
|
-
digest?: string;
|
|
53
|
-
modified_at?: string;
|
|
54
|
-
}
|
|
55
|
-
interface AIProviderConfig {
|
|
56
|
-
type: 'ollama' | 'openai' | 'azure-openai' | 'anthropic' | 'gateway';
|
|
57
|
-
baseUrl?: string;
|
|
58
|
-
apiKey?: string;
|
|
59
|
-
apiVersion?: string;
|
|
60
|
-
deploymentName?: string;
|
|
61
|
-
gatewayUrl?: string;
|
|
62
|
-
provider?: 'openai' | 'azure-openai' | 'anthropic' | 'ollama';
|
|
63
|
-
tokenFactory?: () => string | null;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Subscription tiers available in the system
|
|
68
|
-
*/
|
|
69
|
-
type SubscriptionTier = 'basic' | 'premium' | 'pro' | 'team' | 'trial' | 'expired';
|
|
70
|
-
/**
|
|
71
|
-
* Available feature keys that can be toggled
|
|
72
|
-
*/
|
|
73
|
-
type FeatureKey = 'memory' | 'documentKnowledge' | 'moodAdaptation' | 'chatSuggestions' | 'tts' | 'stt' | 'adminDashboardEnabled' | 'limitedAdminDashboard' | 'semanticSearchSimple' | 'semanticSearchPremium' | 'advancedSearch' | 'advancedMemories';
|
|
74
|
-
/**
|
|
75
|
-
* Feature matrix defining which features are enabled/disabled
|
|
76
|
-
*/
|
|
77
|
-
type FeatureMatrix = Partial<Record<FeatureKey, boolean>>;
|
|
78
|
-
/**
|
|
79
|
-
* Feature flag configuration interface
|
|
80
|
-
*/
|
|
81
|
-
interface FeatureFlagConfig {
|
|
82
|
-
/** Current subscription tier - if not provided, assumes OSS mode */
|
|
83
|
-
subscriptionType?: SubscriptionTier;
|
|
84
|
-
/** JWT claim key to extract roles from (default: 'roles') */
|
|
85
|
-
rolesClaimKey?: string;
|
|
86
|
-
/** JWT claim key to extract subscription type from (default: 'subscriptionType') */
|
|
87
|
-
subscriptionTypeClaimKey?: string;
|
|
88
|
-
/** JWT claim key to check if subscription is active (default: 'isSubscribed') */
|
|
89
|
-
isSubscribedClaimKey?: string;
|
|
90
|
-
/** LocalStorage key where JWT is stored (default: 'bandit-jwt') */
|
|
91
|
-
jwtStorageKey?: string;
|
|
92
|
-
/** Manual feature overrides - takes precedence in OSS mode */
|
|
93
|
-
featureMatrix?: FeatureMatrix;
|
|
94
|
-
/** Admin role name that grants full access (default: 'admin') */
|
|
95
|
-
adminRole?: string;
|
|
96
|
-
/** Enable debug logging for feature evaluation */
|
|
97
|
-
debug?: boolean;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Default feature matrices for each subscription tier
|
|
101
|
-
*/
|
|
102
|
-
declare const DEFAULT_TIER_FEATURES: Record<SubscriptionTier, FeatureMatrix>;
|
|
103
|
-
/**
|
|
104
|
-
* Open source mode - all features available by default
|
|
105
|
-
*/
|
|
106
|
-
declare const OSS_DEFAULT_FEATURES: FeatureMatrix;
|
|
107
|
-
/**
|
|
108
|
-
* Trial usage information from JWT
|
|
109
|
-
*/
|
|
110
|
-
interface TrialUsage {
|
|
111
|
-
chatRequestsUsed: number;
|
|
112
|
-
chatRequestsLimit: number;
|
|
113
|
-
generateRequestsUsed: number;
|
|
114
|
-
generateRequestsLimit: number;
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Feature evaluation result
|
|
118
|
-
*/
|
|
119
|
-
interface FeatureEvaluation {
|
|
120
|
-
/** Current subscription tier (or 'oss' for open source mode) */
|
|
121
|
-
tier: SubscriptionTier | 'oss';
|
|
122
|
-
/** Whether the user has admin role */
|
|
123
|
-
isAdmin: boolean;
|
|
124
|
-
/** Whether the user's subscription is active (false for trial users) */
|
|
125
|
-
isSubscribed: boolean;
|
|
126
|
-
/** Trial usage limits (only present for trial users) */
|
|
127
|
-
trialUsage?: TrialUsage;
|
|
128
|
-
/** Final computed feature matrix */
|
|
129
|
-
features: FeatureMatrix;
|
|
130
|
-
/** Evaluation metadata */
|
|
131
|
-
metadata: {
|
|
132
|
-
jwtFound: boolean;
|
|
133
|
-
jwtValid: boolean;
|
|
134
|
-
rolesExtracted: string[];
|
|
135
|
-
subscriptionTypeFromJWT?: SubscriptionTier;
|
|
136
|
-
isSubscribedFromJWT?: boolean;
|
|
137
|
-
trialUsageFromJWT?: TrialUsage;
|
|
138
|
-
evaluatedAt: number;
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
interface PackageSettings {
|
|
143
|
-
ollamaUrl?: string;
|
|
144
|
-
defaultModel: string;
|
|
145
|
-
fallbackModel?: string;
|
|
146
|
-
aiProvider?: AIProviderConfig;
|
|
147
|
-
gatewayApiUrl: string;
|
|
148
|
-
s3ApiUrl?: string;
|
|
149
|
-
brandingConfigUrl: string;
|
|
150
|
-
homeUrl?: string | null;
|
|
151
|
-
feedbackEmail?: string;
|
|
152
|
-
featureFlags?: FeatureFlagConfig;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
interface ChatConfig {
|
|
156
|
-
packageSettings: PackageSettings;
|
|
157
|
-
/** Feature flag configuration - can override packageSettings.featureFlags */
|
|
158
|
-
featureFlags?: FeatureFlagConfig;
|
|
159
|
-
children?: React.ReactNode;
|
|
160
|
-
}
|
|
161
|
-
declare const ChatProvider: React.FC<ChatConfig>;
|
|
162
|
-
|
|
163
11
|
declare const Chat: () => react_jsx_runtime.JSX.Element | null;
|
|
164
12
|
|
|
165
13
|
declare const Management: () => react_jsx_runtime.JSX.Element | null;
|
|
166
14
|
|
|
167
|
-
declare const ChatModal: React.FC<{
|
|
168
|
-
open: boolean;
|
|
169
|
-
onClose: () => void;
|
|
170
|
-
}>;
|
|
171
|
-
|
|
172
15
|
declare function defineCustomElement<Props extends Record<string, unknown>>(name: string, Component: React.ComponentType<Props>): void;
|
|
173
16
|
|
|
174
17
|
/**
|
|
@@ -550,141 +393,6 @@ interface VoiceState {
|
|
|
550
393
|
}
|
|
551
394
|
declare const useVoiceStore: zustand.UseBoundStore<zustand.StoreApi<VoiceState>>;
|
|
552
395
|
|
|
553
|
-
interface VoiceModelsResponse {
|
|
554
|
-
models: string[];
|
|
555
|
-
defaultModel: string;
|
|
556
|
-
fallbackModel: string;
|
|
557
|
-
}
|
|
558
|
-
declare class VoiceService {
|
|
559
|
-
private static instance;
|
|
560
|
-
private cachedModels;
|
|
561
|
-
private cacheTimestamp;
|
|
562
|
-
private readonly CACHE_DURATION;
|
|
563
|
-
private constructor();
|
|
564
|
-
static getInstance(): VoiceService;
|
|
565
|
-
private getGatewayApiUrl;
|
|
566
|
-
private isValid;
|
|
567
|
-
private isCacheValid;
|
|
568
|
-
fetchAvailableVoices(): Promise<VoiceModelsResponse>;
|
|
569
|
-
clearCache(): void;
|
|
570
|
-
}
|
|
571
|
-
declare const voiceService: VoiceService;
|
|
572
|
-
|
|
573
|
-
interface GatewayMessageContent {
|
|
574
|
-
type: 'text' | 'image_url';
|
|
575
|
-
text?: string;
|
|
576
|
-
image_url?: {
|
|
577
|
-
url: string;
|
|
578
|
-
detail?: 'low' | 'high' | 'auto';
|
|
579
|
-
};
|
|
580
|
-
}
|
|
581
|
-
interface GatewayMessage {
|
|
582
|
-
role: 'system' | 'user' | 'assistant';
|
|
583
|
-
content: string | GatewayMessageContent[];
|
|
584
|
-
name?: string;
|
|
585
|
-
images?: string[];
|
|
586
|
-
}
|
|
587
|
-
interface GatewayChatRequest {
|
|
588
|
-
model: string;
|
|
589
|
-
messages: GatewayMessage[];
|
|
590
|
-
stream?: boolean;
|
|
591
|
-
temperature?: number;
|
|
592
|
-
max_tokens?: number;
|
|
593
|
-
top_p?: number;
|
|
594
|
-
frequency_penalty?: number;
|
|
595
|
-
presence_penalty?: number;
|
|
596
|
-
provider?: 'openai' | 'azure-openai' | 'anthropic' | 'ollama';
|
|
597
|
-
stop?: string | string[];
|
|
598
|
-
images?: string[];
|
|
599
|
-
}
|
|
600
|
-
interface GatewayChatResponse {
|
|
601
|
-
id: string;
|
|
602
|
-
object: string;
|
|
603
|
-
created: number;
|
|
604
|
-
model: string;
|
|
605
|
-
choices: {
|
|
606
|
-
index: number;
|
|
607
|
-
delta?: {
|
|
608
|
-
role?: string;
|
|
609
|
-
content?: string;
|
|
610
|
-
};
|
|
611
|
-
message?: {
|
|
612
|
-
role: string;
|
|
613
|
-
content: string;
|
|
614
|
-
};
|
|
615
|
-
finish_reason?: string | null;
|
|
616
|
-
}[];
|
|
617
|
-
usage?: {
|
|
618
|
-
prompt_tokens: number;
|
|
619
|
-
completion_tokens: number;
|
|
620
|
-
total_tokens: number;
|
|
621
|
-
};
|
|
622
|
-
}
|
|
623
|
-
interface GatewayGenerateRequest {
|
|
624
|
-
model: string;
|
|
625
|
-
prompt: string;
|
|
626
|
-
stream?: boolean;
|
|
627
|
-
temperature?: number;
|
|
628
|
-
max_tokens?: number;
|
|
629
|
-
provider?: 'openai' | 'azure-openai' | 'anthropic' | 'ollama';
|
|
630
|
-
stop?: string | string[];
|
|
631
|
-
}
|
|
632
|
-
interface GatewayGenerateResponse {
|
|
633
|
-
model: string;
|
|
634
|
-
created_at: string;
|
|
635
|
-
response: string;
|
|
636
|
-
done: boolean;
|
|
637
|
-
context?: number[];
|
|
638
|
-
total_duration?: number;
|
|
639
|
-
load_duration?: number;
|
|
640
|
-
prompt_eval_count?: number;
|
|
641
|
-
prompt_eval_duration?: number;
|
|
642
|
-
eval_count?: number;
|
|
643
|
-
eval_duration?: number;
|
|
644
|
-
}
|
|
645
|
-
interface GatewayModel {
|
|
646
|
-
id: string;
|
|
647
|
-
name: string;
|
|
648
|
-
provider: string;
|
|
649
|
-
created: number;
|
|
650
|
-
modified_at: string;
|
|
651
|
-
size: number;
|
|
652
|
-
digest: string;
|
|
653
|
-
details?: {
|
|
654
|
-
format: string;
|
|
655
|
-
family: string;
|
|
656
|
-
families: string[];
|
|
657
|
-
parameter_size: string;
|
|
658
|
-
quantization_level: string;
|
|
659
|
-
};
|
|
660
|
-
}
|
|
661
|
-
interface GatewayModelsResponse {
|
|
662
|
-
models: GatewayModel[];
|
|
663
|
-
}
|
|
664
|
-
interface GatewayHealthResponse {
|
|
665
|
-
status: 'healthy' | 'unhealthy';
|
|
666
|
-
version: string;
|
|
667
|
-
providers: {
|
|
668
|
-
name: string;
|
|
669
|
-
status: 'available' | 'unavailable';
|
|
670
|
-
models_count: number;
|
|
671
|
-
}[];
|
|
672
|
-
uptime: number;
|
|
673
|
-
}
|
|
674
|
-
interface GatewayMemoryRecord {
|
|
675
|
-
id: string;
|
|
676
|
-
type: string;
|
|
677
|
-
content: string;
|
|
678
|
-
createdAt: string;
|
|
679
|
-
updatedAt: string;
|
|
680
|
-
metadata?: Record<string, unknown>;
|
|
681
|
-
}
|
|
682
|
-
interface GatewayMemoryResponse {
|
|
683
|
-
records: GatewayMemoryRecord[];
|
|
684
|
-
total: number;
|
|
685
|
-
nextCursor?: string | null;
|
|
686
|
-
}
|
|
687
|
-
|
|
688
396
|
type GatewayQueryOptions<TData> = Omit<UseQueryOptions<TData, Error>, "queryKey" | "queryFn">;
|
|
689
397
|
declare const useGatewayHealth: (options?: GatewayQueryOptions<GatewayHealthResponse>) => _tanstack_react_query.UseQueryResult<GatewayHealthResponse, Error>;
|
|
690
398
|
declare const useGatewayModels: (options?: GatewayQueryOptions<GatewayModel[]>) => _tanstack_react_query.UseQueryResult<GatewayModel[], Error>;
|
|
@@ -1190,11 +898,11 @@ interface UploadRequest {
|
|
|
1190
898
|
*/
|
|
1191
899
|
declare class VectorDatabaseService {
|
|
1192
900
|
private baseUrl;
|
|
1193
|
-
private
|
|
901
|
+
private fileStorageApiUrl;
|
|
1194
902
|
private token;
|
|
1195
903
|
private lastAvailabilityState;
|
|
1196
904
|
private lastConfigState;
|
|
1197
|
-
constructor(gatewayApiUrl?: string,
|
|
905
|
+
constructor(gatewayApiUrl?: string, fileStorageApiUrl?: string);
|
|
1198
906
|
/**
|
|
1199
907
|
* Set authentication token for API calls
|
|
1200
908
|
*/
|
|
@@ -1302,7 +1010,7 @@ declare class VectorDatabaseService {
|
|
|
1302
1010
|
duration: number;
|
|
1303
1011
|
}>;
|
|
1304
1012
|
/**
|
|
1305
|
-
* Upload file to
|
|
1013
|
+
* Upload file to file storage API and get file ID
|
|
1306
1014
|
*
|
|
1307
1015
|
* @param file - The file to upload
|
|
1308
1016
|
* @param shareWithTeam - Whether to share the file with team members.
|
|
@@ -1328,13 +1036,13 @@ declare class VectorDatabaseService {
|
|
|
1328
1036
|
*/
|
|
1329
1037
|
getAvailableFiles(skip?: number, limit?: number): Promise<RawFileRecord[]>;
|
|
1330
1038
|
/**
|
|
1331
|
-
* Get user's files - tries both Gateway API and
|
|
1039
|
+
* Get user's files - tries both Gateway API and file storage API
|
|
1332
1040
|
*/
|
|
1333
1041
|
getUserFiles(skip?: number, limit?: number): Promise<RawFileRecord[]>;
|
|
1334
1042
|
/**
|
|
1335
|
-
* Get user's files from
|
|
1043
|
+
* Get user's files from file storage API as fallback
|
|
1336
1044
|
*/
|
|
1337
|
-
private
|
|
1045
|
+
private getUserFilesFromFileStorage;
|
|
1338
1046
|
/**
|
|
1339
1047
|
* Download a file using MongoDB ObjectId (secure method)
|
|
1340
1048
|
*/
|
|
@@ -1362,7 +1070,7 @@ declare class VectorDatabaseService {
|
|
|
1362
1070
|
* Configure the service with API URLs
|
|
1363
1071
|
* This should be called by the main application with environment variables
|
|
1364
1072
|
*/
|
|
1365
|
-
configure(gatewayApiUrl: string,
|
|
1073
|
+
configure(gatewayApiUrl: string, fileStorageApiUrl: string): void;
|
|
1366
1074
|
/**
|
|
1367
1075
|
* Manual debug function to test Gateway API connection
|
|
1368
1076
|
* Call this from browser console to debug API issues
|
|
@@ -1627,10 +1335,4 @@ declare const useVectorStore: () => {
|
|
|
1627
1335
|
initializeVectorService: () => Promise<void>;
|
|
1628
1336
|
};
|
|
1629
1337
|
|
|
1630
|
-
|
|
1631
|
-
chat(request: GatewayChatRequest): Promise<GatewayChatResponse>;
|
|
1632
|
-
generate(request: GatewayGenerateRequest): Promise<GatewayGenerateResponse>;
|
|
1633
|
-
health(): Promise<GatewayHealthResponse>;
|
|
1634
|
-
}
|
|
1635
|
-
|
|
1636
|
-
export { type AIChatRequest, type AIChatResponse, type AIGenerateRequest, type AIGenerateResponse, type AIMessage, type AIModel, type AIProviderConfig, Chat, type ChatConfig, ChatModal, ChatProvider, type CreateMemoryOptions, DEFAULT_TIER_FEATURES, DebugLogger, type FeatureEvaluation, type FeatureFlagConfig, FeatureFlagContext, type FeatureFlagContextValue, FeatureFlagProvider, type FeatureFlagProviderProps, FeatureFlagService, type FeatureKey, type FeatureMatrix, FeedbackButton, type FeedbackButtonProps, type FeedbackCategories, FeedbackModal, type FeedbackModalProps, type FeedbackPriorities, type FeedbackRequest, type FeedbackResponse, type FileUploadResult, type GatewayChatRequest, type GatewayChatResponse, type GatewayContract, type GatewayGenerateRequest, type GatewayGenerateResponse, type GatewayHealthResponse, type GatewayMemoryRecord, type GatewayMemoryResponse, type GatewayMessage, type GatewayMessageContent, type GatewayModel, type GatewayModelsResponse, type GatewayQueryOptions, type LogContext, Management, type MemorySearchFilters, type MigrationProgress, type MigrationStatus, type NotificationConfig, type NotificationContextType, NotificationProvider, type NotificationProviderProps, NotificationService, OSS_DEFAULT_FEATURES, type PackageSettings, SYSTEM_FLAGS, type SearchOptions, type SearchResult, StreamingTTSClient, SubscriptionExpiredGuard, type SubscriptionExpiredGuardProps, SubscriptionExpiredModal, type SubscriptionExpiredModalProps, type SubscriptionTier, type TTSOptions, type TTSProgress, TTSState, type TrialUsage, type UploadRequest, type UseTTSReturn, VectorDatabaseService, type VectorDocument, type VectorMemory, type VectorMemoryMetadata, VectorMigrationService, type VectorStoreStatus, type VoiceModelsResponse, VoiceService, type VoiceState, authenticationService, debugLogger, defineCustomElement, featureFlagService, getCriticalConfig, getFeatureMatrix, getStreamingTTSClient, getSystemConstants, getTTSState, handleHttpError, handleSubscriptionUpgrade, handleValidationError, initializeCoreSystem, notificationService, pauseTTS, previewTierUpgrade, resumeTTS, showInfoNotification, showSuccessNotification, speakStream as speakWithStreaming, stopTTS, syncSubscriptionWithAPI, updateSubscriptionTier, useFeatureFlag, useFeatureVisibility, useFeatures, useGatewayHealth, useGatewayMemory, useGatewayModels, useGlobalTTS, useNotification, useNotificationService, useTTS, useVectorStore, useVoiceStore, useVoices, validateEnvironment, validateSystemIntegrity, vectorDatabaseService, vectorMigrationService, voiceService };
|
|
1338
|
+
export { Chat, type CreateMemoryOptions, DebugLogger, FeatureEvaluation, FeatureFlagConfig, FeatureFlagContext, type FeatureFlagContextValue, FeatureFlagProvider, type FeatureFlagProviderProps, FeatureFlagService, FeatureKey, FeedbackButton, type FeedbackButtonProps, type FeedbackCategories, FeedbackModal, type FeedbackModalProps, type FeedbackPriorities, type FeedbackRequest, type FeedbackResponse, type FileUploadResult, GatewayHealthResponse, GatewayMemoryResponse, GatewayModel, type GatewayQueryOptions, type LogContext, Management, type MemorySearchFilters, type MigrationProgress, type MigrationStatus, type NotificationConfig, type NotificationContextType, NotificationProvider, type NotificationProviderProps, NotificationService, SYSTEM_FLAGS, type SearchOptions, type SearchResult, StreamingTTSClient, SubscriptionExpiredGuard, type SubscriptionExpiredGuardProps, SubscriptionExpiredModal, type SubscriptionExpiredModalProps, SubscriptionTier, type TTSOptions, type TTSProgress, TTSState, TrialUsage, type UploadRequest, type UseTTSReturn, VectorDatabaseService, type VectorDocument, type VectorMemory, type VectorMemoryMetadata, VectorMigrationService, type VectorStoreStatus, type VoiceState, authenticationService, debugLogger, defineCustomElement, featureFlagService, getCriticalConfig, getFeatureMatrix, getStreamingTTSClient, getSystemConstants, getTTSState, handleHttpError, handleSubscriptionUpgrade, handleValidationError, initializeCoreSystem, notificationService, pauseTTS, previewTierUpgrade, resumeTTS, showInfoNotification, showSuccessNotification, speakStream as speakWithStreaming, stopTTS, syncSubscriptionWithAPI, updateSubscriptionTier, useFeatureFlag, useFeatureVisibility, useFeatures, useGatewayHealth, useGatewayMemory, useGatewayModels, useGlobalTTS, useNotification, useNotificationService, useTTS, useVectorStore, useVoiceStore, useVoices, validateEnvironment, validateSystemIntegrity, vectorDatabaseService, vectorMigrationService };
|