@burtson-labs/bandit-engine 2.0.168 → 2.1.0

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 (237) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/LICENSE +189 -31
  3. package/NOTICE +26 -0
  4. package/README.md +15 -59
  5. package/dist/aiProviderStore-DKQCCDWF.mjs +8 -0
  6. package/dist/aiProviderStore-DKQCCDWF.mjs.map +1 -0
  7. package/dist/chat-VYZFUECC.mjs +10 -0
  8. package/dist/chat-VYZFUECC.mjs.map +1 -0
  9. package/dist/{chunk-GRPTCHFN.mjs → chunk-BJT6KPUG.mjs} +309 -154
  10. package/dist/chunk-BJT6KPUG.mjs.map +1 -0
  11. package/dist/{chunk-SZJB5FLZ.mjs → chunk-FCQN3LKT.mjs} +251 -77
  12. package/dist/chunk-FCQN3LKT.mjs.map +1 -0
  13. package/dist/chunk-HD4PJNPH.mjs +29034 -0
  14. package/dist/chunk-HD4PJNPH.mjs.map +1 -0
  15. package/dist/{chunk-HNXPDIWC.mjs → chunk-NI7BKLC7.mjs} +1 -1
  16. package/dist/chunk-NI7BKLC7.mjs.map +1 -0
  17. package/dist/index.d.mts +63 -57
  18. package/dist/index.d.ts +63 -57
  19. package/dist/index.js +15415 -7570
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs +16630 -142
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/{memoryUtils-HGCYEUCD.mjs → memoryUtils-UBZ33DNA.mjs} +8 -3
  24. package/dist/memoryUtils-UBZ33DNA.mjs.map +1 -0
  25. package/dist/modelStore-SEC34WRM.mjs +8 -0
  26. package/dist/modelStore-SEC34WRM.mjs.map +1 -0
  27. package/dist/{public-DJa4Db00.d.mts → public-CKQQDOoy.d.mts} +8 -8
  28. package/dist/{public-DJa4Db00.d.ts → public-CKQQDOoy.d.ts} +8 -8
  29. package/dist/public-types.d.mts +1 -1
  30. package/dist/public-types.d.ts +1 -1
  31. package/docs/00_intro.md +2 -2
  32. package/docs/05_contributing.md +2 -2
  33. package/docs/06_licensing.md +18 -0
  34. package/docs/07_custom_tools.md +233 -0
  35. package/docs/README.md +2 -1
  36. package/package.json +23 -20
  37. package/dist/aiProviderStore-HY5G4QAK.mjs +0 -8
  38. package/dist/aiProviderStore-HY5G4QAK.mjs.map +0 -1
  39. package/dist/chat-7LOFYEWE.mjs +0 -15
  40. package/dist/chat-7LOFYEWE.mjs.map +0 -1
  41. package/dist/chat-provider.js +0 -11080
  42. package/dist/chat-provider.js.map +0 -1
  43. package/dist/chat-provider.mjs +0 -16
  44. package/dist/chat-provider.mjs.map +0 -1
  45. package/dist/chunk-4SXXEGEK.mjs +0 -10690
  46. package/dist/chunk-4SXXEGEK.mjs.map +0 -1
  47. package/dist/chunk-62IYSU3I.mjs +0 -7324
  48. package/dist/chunk-62IYSU3I.mjs.map +0 -1
  49. package/dist/chunk-CABOLDNR.mjs +0 -216
  50. package/dist/chunk-CABOLDNR.mjs.map +0 -1
  51. package/dist/chunk-E5WMDLE3.mjs +0 -390
  52. package/dist/chunk-E5WMDLE3.mjs.map +0 -1
  53. package/dist/chunk-GRPTCHFN.mjs.map +0 -1
  54. package/dist/chunk-HNXPDIWC.mjs.map +0 -1
  55. package/dist/chunk-JD6C64CT.mjs +0 -516
  56. package/dist/chunk-JD6C64CT.mjs.map +0 -1
  57. package/dist/chunk-KAXUI5H7.mjs +0 -6009
  58. package/dist/chunk-KAXUI5H7.mjs.map +0 -1
  59. package/dist/chunk-ONQMRE2G.mjs +0 -26
  60. package/dist/chunk-ONQMRE2G.mjs.map +0 -1
  61. package/dist/chunk-P4C5IRM5.mjs +0 -39
  62. package/dist/chunk-P4C5IRM5.mjs.map +0 -1
  63. package/dist/chunk-QI67R5F6.mjs +0 -194
  64. package/dist/chunk-QI67R5F6.mjs.map +0 -1
  65. package/dist/chunk-R3NOM2DG.mjs +0 -2945
  66. package/dist/chunk-R3NOM2DG.mjs.map +0 -1
  67. package/dist/chunk-SZJB5FLZ.mjs.map +0 -1
  68. package/dist/chunk-YGOLNWXJ.mjs +0 -11906
  69. package/dist/chunk-YGOLNWXJ.mjs.map +0 -1
  70. package/dist/management/management.js +0 -44454
  71. package/dist/management/management.js.map +0 -1
  72. package/dist/management/management.mjs +0 -16
  73. package/dist/management/management.mjs.map +0 -1
  74. package/dist/memoryUtils-HGCYEUCD.mjs.map +0 -1
  75. package/dist/modals/chat-modal/chat-modal.js +0 -19730
  76. package/dist/modals/chat-modal/chat-modal.js.map +0 -1
  77. package/dist/modals/chat-modal/chat-modal.mjs +0 -18
  78. package/dist/modals/chat-modal/chat-modal.mjs.map +0 -1
  79. package/dist/modelStore-TFNX4GEC.mjs +0 -8
  80. package/dist/modelStore-TFNX4GEC.mjs.map +0 -1
  81. package/dist/shared/custom-element.js +0 -73
  82. package/dist/shared/custom-element.js.map +0 -1
  83. package/dist/shared/custom-element.mjs +0 -7
  84. package/dist/shared/custom-element.mjs.map +0 -1
  85. package/docs/06_busl_licensing.md +0 -25
  86. package/docs/api_reference/.nojekyll +0 -1
  87. package/docs/api_reference/assets/bandit-docs.js +0 -462
  88. package/docs/api_reference/assets/highlight.css +0 -141
  89. package/docs/api_reference/assets/icons.js +0 -18
  90. package/docs/api_reference/assets/icons.svg +0 -1
  91. package/docs/api_reference/assets/main.js +0 -61
  92. package/docs/api_reference/assets/navigation.js +0 -1
  93. package/docs/api_reference/assets/search.js +0 -1
  94. package/docs/api_reference/assets/style.css +0 -1664
  95. package/docs/api_reference/classes/DebugLogger.html +0 -29
  96. package/docs/api_reference/classes/FeatureFlagService.html +0 -28
  97. package/docs/api_reference/classes/NotificationService.html +0 -21
  98. package/docs/api_reference/classes/StreamingTTSClient.html +0 -19
  99. package/docs/api_reference/classes/VectorDatabaseService.html +0 -63
  100. package/docs/api_reference/classes/VectorMigrationService.html +0 -27
  101. package/docs/api_reference/classes/VoiceService.html +0 -4
  102. package/docs/api_reference/enums/TTSState.html +0 -6
  103. package/docs/api_reference/functions/Chat.html +0 -1
  104. package/docs/api_reference/functions/ChatModal.html +0 -29
  105. package/docs/api_reference/functions/ChatProvider.html +0 -29
  106. package/docs/api_reference/functions/FeatureFlagProvider.html +0 -30
  107. package/docs/api_reference/functions/FeedbackButton.html +0 -29
  108. package/docs/api_reference/functions/FeedbackModal.html +0 -29
  109. package/docs/api_reference/functions/InterestsEditor.html +0 -5
  110. package/docs/api_reference/functions/Management.html +0 -1
  111. package/docs/api_reference/functions/NotificationProvider.html +0 -29
  112. package/docs/api_reference/functions/SubscriptionExpiredGuard.html +0 -31
  113. package/docs/api_reference/functions/SubscriptionExpiredModal.html +0 -31
  114. package/docs/api_reference/functions/defineCustomElement.html +0 -1
  115. package/docs/api_reference/functions/getCriticalConfig.html +0 -2
  116. package/docs/api_reference/functions/getFeatureMatrix.html +0 -1
  117. package/docs/api_reference/functions/getStreamingTTSClient.html +0 -1
  118. package/docs/api_reference/functions/getSystemConstants.html +0 -2
  119. package/docs/api_reference/functions/getTTSState.html +0 -1
  120. package/docs/api_reference/functions/handleHttpError.html +0 -2
  121. package/docs/api_reference/functions/handleSubscriptionUpgrade.html +0 -1
  122. package/docs/api_reference/functions/handleValidationError.html +0 -2
  123. package/docs/api_reference/functions/initializeCoreSystem.html +0 -2
  124. package/docs/api_reference/functions/isWorkspaceAdminRole.html +0 -6
  125. package/docs/api_reference/functions/pauseTTS.html +0 -1
  126. package/docs/api_reference/functions/previewTierUpgrade.html +0 -1
  127. package/docs/api_reference/functions/resolveManagementSections.html +0 -2
  128. package/docs/api_reference/functions/resumeTTS.html +0 -1
  129. package/docs/api_reference/functions/showInfoNotification.html +0 -2
  130. package/docs/api_reference/functions/showSuccessNotification.html +0 -2
  131. package/docs/api_reference/functions/speakWithStreaming.html +0 -1
  132. package/docs/api_reference/functions/stopTTS.html +0 -1
  133. package/docs/api_reference/functions/syncSubscriptionWithAPI.html +0 -1
  134. package/docs/api_reference/functions/updateSubscriptionTier.html +0 -2
  135. package/docs/api_reference/functions/useFeatureFlag.html +0 -2
  136. package/docs/api_reference/functions/useFeatureVisibility.html +0 -2
  137. package/docs/api_reference/functions/useFeatures.html +0 -2
  138. package/docs/api_reference/functions/useGatewayHealth.html +0 -1
  139. package/docs/api_reference/functions/useGatewayMemory.html +0 -1
  140. package/docs/api_reference/functions/useGatewayModels.html +0 -1
  141. package/docs/api_reference/functions/useGlobalTTS.html +0 -2
  142. package/docs/api_reference/functions/useManagementAccess.html +0 -2
  143. package/docs/api_reference/functions/useNotification.html +0 -1
  144. package/docs/api_reference/functions/useNotificationService.html +0 -6
  145. package/docs/api_reference/functions/useTTS.html +0 -2
  146. package/docs/api_reference/functions/useVectorStore.html +0 -13
  147. package/docs/api_reference/functions/useVoiceStore.html +0 -8
  148. package/docs/api_reference/functions/useVoices.html +0 -3
  149. package/docs/api_reference/functions/validateEnvironment.html +0 -2
  150. package/docs/api_reference/functions/validateSystemIntegrity.html +0 -2
  151. package/docs/api_reference/index.html +0 -916
  152. package/docs/api_reference/interfaces/AIChatRequest.html +0 -8
  153. package/docs/api_reference/interfaces/AIChatResponse.html +0 -3
  154. package/docs/api_reference/interfaces/AIGenerateRequest.html +0 -5
  155. package/docs/api_reference/interfaces/AIGenerateResponse.html +0 -3
  156. package/docs/api_reference/interfaces/AIMessage.html +0 -4
  157. package/docs/api_reference/interfaces/AIModel.html +0 -6
  158. package/docs/api_reference/interfaces/AIProviderConfig.html +0 -12
  159. package/docs/api_reference/interfaces/ChatConfig.html +0 -5
  160. package/docs/api_reference/interfaces/ChatModalProps.html +0 -7
  161. package/docs/api_reference/interfaces/CreateMemoryOptions.html +0 -7
  162. package/docs/api_reference/interfaces/FeatureEvaluation.html +0 -14
  163. package/docs/api_reference/interfaces/FeatureFlagConfig.html +0 -18
  164. package/docs/api_reference/interfaces/FeatureFlagContextValue.html +0 -16
  165. package/docs/api_reference/interfaces/FeatureFlagProviderProps.html +0 -4
  166. package/docs/api_reference/interfaces/FeedbackButtonProps.html +0 -19
  167. package/docs/api_reference/interfaces/FeedbackCategories.html +0 -6
  168. package/docs/api_reference/interfaces/FeedbackModalProps.html +0 -4
  169. package/docs/api_reference/interfaces/FeedbackPriorities.html +0 -5
  170. package/docs/api_reference/interfaces/FeedbackRequest.html +0 -12
  171. package/docs/api_reference/interfaces/FeedbackResponse.html +0 -7
  172. package/docs/api_reference/interfaces/FileUploadResult.html +0 -4
  173. package/docs/api_reference/interfaces/GatewayChatRequest.html +0 -13
  174. package/docs/api_reference/interfaces/GatewayChatResponse.html +0 -7
  175. package/docs/api_reference/interfaces/GatewayContract.html +0 -4
  176. package/docs/api_reference/interfaces/GatewayGenerateRequest.html +0 -8
  177. package/docs/api_reference/interfaces/GatewayGenerateResponse.html +0 -12
  178. package/docs/api_reference/interfaces/GatewayHealthResponse.html +0 -5
  179. package/docs/api_reference/interfaces/GatewayMemoryRecord.html +0 -7
  180. package/docs/api_reference/interfaces/GatewayMemoryResponse.html +0 -4
  181. package/docs/api_reference/interfaces/GatewayMessage.html +0 -5
  182. package/docs/api_reference/interfaces/GatewayMessageContent.html +0 -4
  183. package/docs/api_reference/interfaces/GatewayModel.html +0 -9
  184. package/docs/api_reference/interfaces/GatewayModelsResponse.html +0 -2
  185. package/docs/api_reference/interfaces/ManagementAccess.html +0 -5
  186. package/docs/api_reference/interfaces/ManagementAccessInput.html +0 -5
  187. package/docs/api_reference/interfaces/ManagementLink.html +0 -7
  188. package/docs/api_reference/interfaces/ManagementProps.html +0 -22
  189. package/docs/api_reference/interfaces/ManagementSectionDef.html +0 -10
  190. package/docs/api_reference/interfaces/MemorySearchFilters.html +0 -5
  191. package/docs/api_reference/interfaces/MigrationProgress.html +0 -6
  192. package/docs/api_reference/interfaces/MigrationStatus.html +0 -7
  193. package/docs/api_reference/interfaces/NotificationConfig.html +0 -5
  194. package/docs/api_reference/interfaces/NotificationContextType.html +0 -6
  195. package/docs/api_reference/interfaces/NotificationProviderProps.html +0 -4
  196. package/docs/api_reference/interfaces/PackageSettings.html +0 -22
  197. package/docs/api_reference/interfaces/SearchOptions.html +0 -6
  198. package/docs/api_reference/interfaces/SearchResult.html +0 -5
  199. package/docs/api_reference/interfaces/SubscriptionExpiredGuardProps.html +0 -7
  200. package/docs/api_reference/interfaces/SubscriptionExpiredModalProps.html +0 -6
  201. package/docs/api_reference/interfaces/TTSOptions.html +0 -5
  202. package/docs/api_reference/interfaces/TTSProgress.html +0 -6
  203. package/docs/api_reference/interfaces/TrialUsage.html +0 -6
  204. package/docs/api_reference/interfaces/UploadRequest.html +0 -9
  205. package/docs/api_reference/interfaces/UseTTSReturn.html +0 -14
  206. package/docs/api_reference/interfaces/VectorDocument.html +0 -11
  207. package/docs/api_reference/interfaces/VectorMemory.html +0 -12
  208. package/docs/api_reference/interfaces/VectorMemoryMetadata.html +0 -7
  209. package/docs/api_reference/interfaces/VectorStoreStatus.html +0 -7
  210. package/docs/api_reference/interfaces/VoiceModelsResponse.html +0 -4
  211. package/docs/api_reference/interfaces/VoiceState.html +0 -12
  212. package/docs/api_reference/media/02_gateway_api.md +0 -123
  213. package/docs/api_reference/media/05_cli_quickstart.md +0 -87
  214. package/docs/api_reference/media/LICENSE +0 -43
  215. package/docs/api_reference/media/PRE-PUSH-CHECKLIST.md +0 -10
  216. package/docs/api_reference/media/PROTECTION-NOTICE.md +0 -11
  217. package/docs/api_reference/media/README.md +0 -58
  218. package/docs/api_reference/modules.html +0 -136
  219. package/docs/api_reference/types/FeatureKey.html +0 -2
  220. package/docs/api_reference/types/FeatureMatrix.html +0 -2
  221. package/docs/api_reference/types/GatewayQueryOptions.html +0 -1
  222. package/docs/api_reference/types/LogContext.html +0 -14
  223. package/docs/api_reference/types/ManagementRequest.html +0 -1
  224. package/docs/api_reference/types/ManagementSectionId.html +0 -2
  225. package/docs/api_reference/types/SubscriptionTier.html +0 -2
  226. package/docs/api_reference/variables/DEFAULT_TIER_FEATURES.html +0 -2
  227. package/docs/api_reference/variables/FeatureFlagContext.html +0 -1
  228. package/docs/api_reference/variables/MANAGEMENT_SECTIONS.html +0 -1
  229. package/docs/api_reference/variables/OSS_DEFAULT_FEATURES.html +0 -2
  230. package/docs/api_reference/variables/SYSTEM_FLAGS.html +0 -2
  231. package/docs/api_reference/variables/authenticationService.html +0 -1
  232. package/docs/api_reference/variables/debugLogger-1.html +0 -1
  233. package/docs/api_reference/variables/featureFlagService-1.html +0 -2
  234. package/docs/api_reference/variables/notificationService-1.html +0 -1
  235. package/docs/api_reference/variables/vectorDatabaseService-1.html +0 -1
  236. package/docs/api_reference/variables/vectorMigrationService-1.html +0 -1
  237. package/docs/api_reference/variables/voiceService-1.html +0 -1
@@ -95,7 +95,9 @@ var MemoryUtils = class {
95
95
  const embeddingsPerMinute = 100;
96
96
  const tokensPerCharacter = 0.25;
97
97
  const estimatedTimeMinutes = Math.ceil(memoryCount / embeddingsPerMinute);
98
- const estimatedTokens = Math.ceil(memoryCount * averageContentLength * tokensPerCharacter);
98
+ const estimatedTokens = Math.ceil(
99
+ memoryCount * averageContentLength * tokensPerCharacter
100
+ );
99
101
  let recommendedChunkSize = 50;
100
102
  if (memoryCount > 1e3) {
101
103
  recommendedChunkSize = 25;
@@ -182,7 +184,10 @@ var MemoryUtils = class {
182
184
  const potentialDuplicates = [];
183
185
  for (let j = i + 1; j < memories.length; j++) {
184
186
  const compareMemory = memories[j];
185
- const similarity = this.calculateSimilarity(currentMemory.content, compareMemory.content);
187
+ const similarity = this.calculateSimilarity(
188
+ currentMemory.content,
189
+ compareMemory.content
190
+ );
186
191
  if (similarity >= similarityThreshold) {
187
192
  potentialDuplicates.push({
188
193
  memory: compareMemory,
@@ -218,4 +223,4 @@ export {
218
223
  generateProgressMessage,
219
224
  validateMemories
220
225
  };
221
- //# sourceMappingURL=memoryUtils-HGCYEUCD.mjs.map
226
+ //# sourceMappingURL=memoryUtils-UBZ33DNA.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils/memoryUtils.ts"],"mappings":";AAwCA,IAAM,WAAW,CAAC,UAChB,OAAO,UAAU,YAAY,UA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AS,QAAQ,KAAK;AACxC,YAAM,gBAAgB,SAAS,CAAC;AAChC,YAAM,sBAID,CAAC;AAEN,eAAS,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;AAC5C,cAAM,gBAAgB,SAAS,CAAC;AAChC,cAAM,aAAa,KAAK;AAAA,UACtB,cAAc;AAAA,UACd,cAAc;AAAA,QAChB;AAEA,YAAI,cAAc,qBAAqB;AACrC,8BAAoB,KAAK;AAAA,YACvB,QAAQ;AAAA,YACR;AAAA,YACA,OAAO;AAAA,UACT,CAAC;AAAA,QACH;AAAA,MACF;AAEA,UAAI,oBAAoB,SAAS,GAAG;AAClC,mBAAW,KAAK;AAAA,UACd,QAAQ;AAAA,UACR,YAAY;AAAA,QACd,CAAC;AAAA,MACH;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AACF;AAGO,IAAM,mBAAmB,YAAY;AACrC,IAAM,wBAAwB,YAAY;AAC1C,IAAM,gBAAgB,YAAY;AAClC,IAAM,yBAAyB,YAAY;AAC3C,IAAM,qBAAqB,YAAY;AACvC,IAAM,0BAA0B,YAAY;AAC5C,IAAM,0BAA0B,YAAY;","names":[]}
@@ -0,0 +1,8 @@
1
+ import {
2
+ useModelStore
3
+ } from "./chunk-FCQN3LKT.mjs";
4
+ import "./chunk-NI7BKLC7.mjs";
5
+ export {
6
+ useModelStore
7
+ };
8
+ //# sourceMappingURL=modelStore-SEC34WRM.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"mappings":"","names":[]}
@@ -5,7 +5,7 @@ import '@burtson-labs/bandit-types';
5
5
  * Common types used across all AI providers
6
6
  */
7
7
  interface AIMessage {
8
- role: 'system' | 'user' | 'assistant';
8
+ role: "system" | "user" | "assistant";
9
9
  content: string;
10
10
  }
11
11
  interface AIChatRequest {
@@ -19,7 +19,7 @@ interface AIChatRequest {
19
19
  }
20
20
  interface AIToolCall {
21
21
  id?: string;
22
- type?: 'function';
22
+ type?: "function";
23
23
  function: {
24
24
  name: string;
25
25
  arguments: string | Record<string, unknown>;
@@ -28,7 +28,7 @@ interface AIToolCall {
28
28
  interface AIChatResponse {
29
29
  message: {
30
30
  content: string;
31
- role: 'assistant';
31
+ role: "assistant";
32
32
  tool_calls?: AIToolCall[];
33
33
  };
34
34
  done?: boolean;
@@ -57,7 +57,7 @@ interface AIModel {
57
57
  modified_at?: string;
58
58
  }
59
59
  interface AIProviderConfig {
60
- type: 'ollama' | 'openai' | 'azure-openai' | 'anthropic' | 'xai' | 'bandit' | 'gateway' | 'playground';
60
+ type: "ollama" | "openai" | "azure-openai" | "anthropic" | "xai" | "bandit" | "gateway" | "playground";
61
61
  baseUrl?: string;
62
62
  apiKey?: string;
63
63
  apiVersion?: string;
@@ -66,18 +66,18 @@ interface AIProviderConfig {
66
66
  anthropicVersion?: string;
67
67
  anthropicMaxTokens?: number;
68
68
  gatewayUrl?: string;
69
- provider?: 'openai' | 'azure-openai' | 'anthropic' | 'ollama' | 'xai' | 'bandit' | 'playground';
69
+ provider?: "openai" | "azure-openai" | "anthropic" | "ollama" | "xai" | "bandit" | "playground";
70
70
  tokenFactory?: () => string | null;
71
71
  }
72
72
 
73
73
  /**
74
74
  * Subscription tiers available in the system
75
75
  */
76
- type SubscriptionTier = 'basic' | 'premium' | 'pro' | 'team' | 'trial' | 'expired';
76
+ type SubscriptionTier = "basic" | "premium" | "pro" | "team" | "trial" | "expired";
77
77
  /**
78
78
  * Available feature keys that can be toggled
79
79
  */
80
- type FeatureKey = 'memory' | 'documentKnowledge' | 'moodAdaptation' | 'chatSuggestions' | 'tts' | 'stt' | 'adminDashboardEnabled' | 'limitedAdminDashboard' | 'semanticSearchSimple' | 'semanticSearchPremium' | 'advancedSearch' | 'advancedMemories';
80
+ type FeatureKey = "memory" | "documentKnowledge" | "moodAdaptation" | "chatSuggestions" | "tts" | "stt" | "adminDashboardEnabled" | "limitedAdminDashboard" | "semanticSearchSimple" | "semanticSearchPremium" | "advancedSearch" | "advancedMemories";
81
81
  /**
82
82
  * Feature matrix defining which features are enabled/disabled
83
83
  */
@@ -125,7 +125,7 @@ interface TrialUsage {
125
125
  */
126
126
  interface FeatureEvaluation {
127
127
  /** Current subscription tier (or 'oss' for open source mode) */
128
- tier: SubscriptionTier | 'oss';
128
+ tier: SubscriptionTier | "oss";
129
129
  /** Whether the user has admin role */
130
130
  isAdmin: boolean;
131
131
  /** Whether the user's subscription is active (false for trial users) */
@@ -5,7 +5,7 @@ import '@burtson-labs/bandit-types';
5
5
  * Common types used across all AI providers
6
6
  */
7
7
  interface AIMessage {
8
- role: 'system' | 'user' | 'assistant';
8
+ role: "system" | "user" | "assistant";
9
9
  content: string;
10
10
  }
11
11
  interface AIChatRequest {
@@ -19,7 +19,7 @@ interface AIChatRequest {
19
19
  }
20
20
  interface AIToolCall {
21
21
  id?: string;
22
- type?: 'function';
22
+ type?: "function";
23
23
  function: {
24
24
  name: string;
25
25
  arguments: string | Record<string, unknown>;
@@ -28,7 +28,7 @@ interface AIToolCall {
28
28
  interface AIChatResponse {
29
29
  message: {
30
30
  content: string;
31
- role: 'assistant';
31
+ role: "assistant";
32
32
  tool_calls?: AIToolCall[];
33
33
  };
34
34
  done?: boolean;
@@ -57,7 +57,7 @@ interface AIModel {
57
57
  modified_at?: string;
58
58
  }
59
59
  interface AIProviderConfig {
60
- type: 'ollama' | 'openai' | 'azure-openai' | 'anthropic' | 'xai' | 'bandit' | 'gateway' | 'playground';
60
+ type: "ollama" | "openai" | "azure-openai" | "anthropic" | "xai" | "bandit" | "gateway" | "playground";
61
61
  baseUrl?: string;
62
62
  apiKey?: string;
63
63
  apiVersion?: string;
@@ -66,18 +66,18 @@ interface AIProviderConfig {
66
66
  anthropicVersion?: string;
67
67
  anthropicMaxTokens?: number;
68
68
  gatewayUrl?: string;
69
- provider?: 'openai' | 'azure-openai' | 'anthropic' | 'ollama' | 'xai' | 'bandit' | 'playground';
69
+ provider?: "openai" | "azure-openai" | "anthropic" | "ollama" | "xai" | "bandit" | "playground";
70
70
  tokenFactory?: () => string | null;
71
71
  }
72
72
 
73
73
  /**
74
74
  * Subscription tiers available in the system
75
75
  */
76
- type SubscriptionTier = 'basic' | 'premium' | 'pro' | 'team' | 'trial' | 'expired';
76
+ type SubscriptionTier = "basic" | "premium" | "pro" | "team" | "trial" | "expired";
77
77
  /**
78
78
  * Available feature keys that can be toggled
79
79
  */
80
- type FeatureKey = 'memory' | 'documentKnowledge' | 'moodAdaptation' | 'chatSuggestions' | 'tts' | 'stt' | 'adminDashboardEnabled' | 'limitedAdminDashboard' | 'semanticSearchSimple' | 'semanticSearchPremium' | 'advancedSearch' | 'advancedMemories';
80
+ type FeatureKey = "memory" | "documentKnowledge" | "moodAdaptation" | "chatSuggestions" | "tts" | "stt" | "adminDashboardEnabled" | "limitedAdminDashboard" | "semanticSearchSimple" | "semanticSearchPremium" | "advancedSearch" | "advancedMemories";
81
81
  /**
82
82
  * Feature matrix defining which features are enabled/disabled
83
83
  */
@@ -125,7 +125,7 @@ interface TrialUsage {
125
125
  */
126
126
  interface FeatureEvaluation {
127
127
  /** Current subscription tier (or 'oss' for open source mode) */
128
- tier: SubscriptionTier | 'oss';
128
+ tier: SubscriptionTier | "oss";
129
129
  /** Whether the user has admin role */
130
130
  isAdmin: boolean;
131
131
  /** Whether the user's subscription is active (false for trial users) */
@@ -1,3 +1,3 @@
1
- export { A as AIChatRequest, c as AIChatResponse, d as AIGenerateRequest, e as AIGenerateResponse, f as AIMessage, g as AIModel, h as AIProviderConfig, C as ChatConfig, j as ChatModalProps, C as ChatProviderProps, a as FeatureEvaluation, b as FeatureFlagConfig, F as FeatureKey, l as FeatureMatrix, P as PackageSettings, S as SubscriptionTier, T as TrialUsage, V as VoiceModelsResponse } from './public-DJa4Db00.mjs';
1
+ export { A as AIChatRequest, c as AIChatResponse, d as AIGenerateRequest, e as AIGenerateResponse, f as AIMessage, g as AIModel, h as AIProviderConfig, C as ChatConfig, j as ChatModalProps, C as ChatProviderProps, a as FeatureEvaluation, b as FeatureFlagConfig, F as FeatureKey, l as FeatureMatrix, P as PackageSettings, S as SubscriptionTier, T as TrialUsage, V as VoiceModelsResponse } from './public-CKQQDOoy.mjs';
2
2
  export { GatewayChatRequest, GatewayChatResponse, GatewayContract, GatewayGenerateRequest, GatewayGenerateResponse, GatewayHealthResponse, GatewayMemoryRecord, GatewayMemoryResponse, GatewayMessage, GatewayMessageContent, GatewayModel, GatewayModelsResponse, StoredBanditConfigRecord, StoredBrandingConfig, StoredModelConfig } from '@burtson-labs/bandit-types';
3
3
  import 'react';
@@ -1,3 +1,3 @@
1
- export { A as AIChatRequest, c as AIChatResponse, d as AIGenerateRequest, e as AIGenerateResponse, f as AIMessage, g as AIModel, h as AIProviderConfig, C as ChatConfig, j as ChatModalProps, C as ChatProviderProps, a as FeatureEvaluation, b as FeatureFlagConfig, F as FeatureKey, l as FeatureMatrix, P as PackageSettings, S as SubscriptionTier, T as TrialUsage, V as VoiceModelsResponse } from './public-DJa4Db00.js';
1
+ export { A as AIChatRequest, c as AIChatResponse, d as AIGenerateRequest, e as AIGenerateResponse, f as AIMessage, g as AIModel, h as AIProviderConfig, C as ChatConfig, j as ChatModalProps, C as ChatProviderProps, a as FeatureEvaluation, b as FeatureFlagConfig, F as FeatureKey, l as FeatureMatrix, P as PackageSettings, S as SubscriptionTier, T as TrialUsage, V as VoiceModelsResponse } from './public-CKQQDOoy.js';
2
2
  export { GatewayChatRequest, GatewayChatResponse, GatewayContract, GatewayGenerateRequest, GatewayGenerateResponse, GatewayHealthResponse, GatewayMemoryRecord, GatewayMemoryResponse, GatewayMessage, GatewayMessageContent, GatewayModel, GatewayModelsResponse, StoredBanditConfigRecord, StoredBrandingConfig, StoredModelConfig } from '@burtson-labs/bandit-types';
3
3
  import 'react';
package/docs/00_intro.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Bandit Engine Overview
2
2
  ## Overview
3
- Bandit Engine is the client framework that powers the Bandit conversational AI experience. It delivers a production-ready chat interface, management console, and integration utilities while keeping proprietary infrastructure behind your own gateway. The library ships as a TypeScript-first React package published as `@burtson-labs/bandit-engine` under the Business Source License (BUSL-1.1).
3
+ Bandit Engine is the client framework that powers the Bandit conversational AI experience. It delivers a production-ready chat interface, management console, and integration utilities while keeping proprietary infrastructure behind your own gateway. The library ships as a TypeScript-first React package published as `@burtson-labs/bandit-engine` under the Apache License 2.0.
4
4
 
5
5
  ## Endpoints / API Usage
6
6
  Bandit Engine communicates with a customer-hosted **gateway API**. The minimum required endpoints are:
@@ -23,4 +23,4 @@ See [`docs/02_gateway_api.md`](./02_gateway_api.md) for the canonical gateway co
23
23
  ## Related Files
24
24
  - [`README.md`](../README.md)
25
25
  - [`docs/01_quickstart.md`](./01_quickstart.md)
26
- - [`docs/06_busl_licensing.md`](./06_busl_licensing.md)
26
+ - [`docs/06_licensing.md`](./06_licensing.md)
@@ -1,6 +1,6 @@
1
1
  # Contributing Guide
2
2
  ## Overview
3
- We welcome community pull requests that improve the Bandit Engine while respecting the Business Source License. This document summarizes expectations for contributors and the workflow we follow internally.
3
+ We welcome community pull requests that improve the Bandit Engine. The project is licensed under the Apache License 2.0 and contributions are accepted under the same license. This document summarizes expectations for contributors and the workflow we follow internally.
4
4
 
5
5
  ## Endpoints / API Usage
6
6
  Contributors rarely need to modify gateway endpoints, but when you do:
@@ -30,4 +30,4 @@ Contributors rarely need to modify gateway endpoints, but when you do:
30
30
  ## Related Files
31
31
  - [`CONTRIBUTING.md`](../CONTRIBUTING.md)
32
32
  - [`LICENSE-NOTICE.md`](../LICENSE-NOTICE.md)
33
- - [`docs/06_busl_licensing.md`](./06_busl_licensing.md)
33
+ - [`docs/06_licensing.md`](./06_licensing.md)
@@ -0,0 +1,18 @@
1
+ # Licensing
2
+ ## Overview
3
+ Bandit Engine is distributed under the Apache License, Version 2.0. You may use it in development and production, modify it, and redistribute it, including in commercial products, under the license's conditions: keep the license and copyright notices, state significant changes you made, and carry the attributions in [`NOTICE`](../NOTICE) when you redistribute. Contributors grant a patent license for their contributions. The license grants no trademark rights; "Bandit", "Bandit AI" and "Burtson Labs" are trademarks of Burtson Labs LLC.
4
+
5
+ ## History
6
+ Releases up to and including 2.0.168 were published under the Business Source License 1.1 and remain under that license. 2.1.0 and later are Apache-2.0.
7
+
8
+ ## Dependencies
9
+ The package depends on `@burtson-labs/bandit-types` and bundles `@burtson-labs/bandit-themes`; check their licenses alongside this one. Third-party dependencies carry their own licenses (`npm ls --omit=dev` lists them).
10
+
11
+ ## Support
12
+ Commercial support, hosted Bandit plans and custom integrations are available from Burtson Labs separately from the license: team@burtson.ai. Licensing questions: legal@burtson.ai. Security reports: security@burtson.ai (see [`SECURITY.md`](../SECURITY.md)).
13
+
14
+ ## Related Files
15
+ - [`LICENSE`](../LICENSE)
16
+ - [`NOTICE`](../NOTICE)
17
+ - [`LICENSE-NOTICE.md`](../LICENSE-NOTICE.md)
18
+ - [`SECURITY.md`](../SECURITY.md)
@@ -0,0 +1,233 @@
1
+ # Custom MCP Tools Examples
2
+
3
+ ## Adding Custom Tools to Bandit
4
+
5
+ Bandit now supports creating custom MCP (Model Context Protocol) tools that allow the AI to interact with external APIs and services. Here are some examples of powerful tools you can create:
6
+
7
+ ### 1. GitHub Repository Information Tool
8
+
9
+ **Purpose:** Get real-time information about GitHub repositories
10
+
11
+ **Configuration:**
12
+ - **Name:** GitHub Repository Info
13
+ - **Description:** Get information about GitHub repositories, commits, and issues
14
+ - **Endpoint:** `/api/github/repo`
15
+ - **Method:** GET
16
+ - **Parameters:**
17
+ ```json
18
+ {
19
+ "type": "object",
20
+ "properties": {
21
+ "owner": {
22
+ "type": "string",
23
+ "description": "GitHub repository owner"
24
+ },
25
+ "repo": {
26
+ "type": "string",
27
+ "description": "GitHub repository name"
28
+ }
29
+ },
30
+ "required": ["owner", "repo"]
31
+ }
32
+ ```
33
+
34
+ **Usage Example:**
35
+ > "What's the latest information about the microsoft/typescript repository?"
36
+
37
+ The AI will automatically use this tool to fetch current repository data including stars, forks, latest commits, and issues.
38
+
39
+ ### 2. Weather Information Tool
40
+
41
+ **Purpose:** Get current weather and forecasts for any location
42
+
43
+ **Configuration:**
44
+ - **Name:** Weather API
45
+ - **Description:** Get current weather information for any location
46
+ - **Endpoint:** `/api/weather`
47
+ - **Method:** GET
48
+ - **Parameters:**
49
+ ```json
50
+ {
51
+ "type": "object",
52
+ "properties": {
53
+ "location": {
54
+ "type": "string",
55
+ "description": "City name or coordinates"
56
+ },
57
+ "units": {
58
+ "type": "string",
59
+ "description": "Temperature units (metric, imperial)",
60
+ "enum": ["metric", "imperial"]
61
+ }
62
+ },
63
+ "required": ["location"]
64
+ }
65
+ ```
66
+
67
+ **Usage Example:**
68
+ > "What's the weather like in San Francisco today?"
69
+
70
+ ### 3. Database Query Tool
71
+
72
+ **Purpose:** Execute SQL queries on configured databases
73
+
74
+ **Configuration:**
75
+ - **Name:** Database Query
76
+ - **Description:** Execute SQL queries on configured databases
77
+ - **Endpoint:** `/api/database/query`
78
+ - **Method:** POST
79
+ - **Parameters:**
80
+ ```json
81
+ {
82
+ "type": "object",
83
+ "properties": {
84
+ "query": {
85
+ "type": "string",
86
+ "description": "SQL query to execute"
87
+ },
88
+ "database": {
89
+ "type": "string",
90
+ "description": "Database connection name"
91
+ }
92
+ },
93
+ "required": ["query"]
94
+ }
95
+ ```
96
+
97
+ **Usage Example:**
98
+ > "Show me the top 10 customers by revenue from our sales database"
99
+
100
+ ### 4. CRM Integration Tool
101
+
102
+ **Purpose:** Access customer data from Salesforce or similar CRM systems
103
+
104
+ **Configuration:**
105
+ - **Name:** CRM Integration
106
+ - **Description:** Access customer data from Salesforce or similar CRM systems
107
+ - **Endpoint:** `/api/crm/contact`
108
+ - **Method:** GET
109
+ - **Parameters:**
110
+ ```json
111
+ {
112
+ "type": "object",
113
+ "properties": {
114
+ "contactId": {
115
+ "type": "string",
116
+ "description": "Contact ID to retrieve"
117
+ },
118
+ "email": {
119
+ "type": "string",
120
+ "description": "Contact email to search for"
121
+ }
122
+ },
123
+ "required": []
124
+ }
125
+ ```
126
+
127
+ **Usage Example:**
128
+ > "Get me the contact information for john.doe@example.com"
129
+
130
+ ### 5. System Status Tool
131
+
132
+ **Purpose:** Monitor server health and system metrics
133
+
134
+ **Configuration:**
135
+ - **Name:** System Status
136
+ - **Description:** Check system health, server status, and performance metrics
137
+ - **Endpoint:** `/api/system/status`
138
+ - **Method:** GET
139
+ - **Parameters:**
140
+ ```json
141
+ {
142
+ "type": "object",
143
+ "properties": {
144
+ "component": {
145
+ "type": "string",
146
+ "description": "Specific component to check (optional)",
147
+ "enum": ["database", "cache", "api", "storage"]
148
+ }
149
+ },
150
+ "required": []
151
+ }
152
+ ```
153
+
154
+ **Usage Example:**
155
+ > "How is our system performing right now? Any issues I should know about?"
156
+
157
+ ## How to Create Custom Tools
158
+
159
+ 1. **Open Management Panel:** Navigate to Settings → MCP Tools
160
+ 2. **Click "Add Custom Tool":** This opens the tool creation modal
161
+ 3. **Choose a Template:** Select from GitHub, Weather, Database, CRM, or start from scratch
162
+ 4. **Configure the Tool:**
163
+ - Enter a descriptive name
164
+ - Write a clear description of what the tool does
165
+ - Set the API endpoint path
166
+ - Choose the HTTP method (GET, POST, PUT, DELETE)
167
+ - Define the parameters schema in JSON format
168
+ 5. **Test the Tool:** Use the "Test Tool" button to verify it works
169
+ 6. **Enable and Use:** Toggle the tool on and start chatting!
170
+
171
+ ## Tool Features
172
+
173
+ ### Built-in vs Custom Tools
174
+ - **Built-in Tools:** Come pre-configured (like the health check tool) with a blue "Built-in" badge
175
+ - **Custom Tools:** Created by you with a purple "Custom" badge
176
+ - **Edit/Delete:** Custom tools can be edited or deleted, built-in tools cannot
177
+
178
+ ### Smart Parameter Handling
179
+ The AI automatically understands how to use your tools based on:
180
+ - The tool description
181
+ - Parameter schemas
182
+ - Usage context in conversations
183
+
184
+ ### Error Handling
185
+ Tools gracefully handle errors and provide helpful feedback:
186
+ - Network connection issues
187
+ - API authentication problems
188
+ - Invalid parameters
189
+ - Service unavailability
190
+
191
+ ### Real-time Execution
192
+ When the AI uses a tool, you'll see:
193
+ 1. **"🔍 Running diagnostics..."** (for diagnostic tools)
194
+ 2. **"🔄 Executing tool_name..."** (for other tools)
195
+ 3. Rich, formatted results with analysis
196
+
197
+ ## Advanced Use Cases
198
+
199
+ ### Multi-step Workflows
200
+ The AI can chain multiple tools together:
201
+ > "Check our system status, then if there are any database issues, run a query to show recent error logs"
202
+
203
+ ### Contextual Tool Selection
204
+ The AI chooses the right tool based on context:
205
+ > "What's the weather like where our main office is located?"
206
+ (AI uses location from company data + weather tool)
207
+
208
+ ### Data Correlation
209
+ Tools can work together to provide insights:
210
+ > "How does our website traffic correlate with recent GitHub commits?"
211
+ (AI uses GitHub tool + analytics tool + correlation analysis)
212
+
213
+ ## Security & Best Practices
214
+
215
+ 1. **Endpoint Security:** Ensure your API endpoints are properly secured
216
+ 2. **Authentication:** Tools inherit authentication from the gateway service
217
+ 3. **Rate Limiting:** Implement appropriate rate limits on your APIs
218
+ 4. **Data Validation:** Always validate parameters before processing
219
+ 5. **Error Handling:** Provide meaningful error messages
220
+ 6. **Documentation:** Write clear descriptions for the AI to understand
221
+
222
+ ## Future Enhancements
223
+
224
+ - Visual tool builder with drag-and-drop interface
225
+ - Tool marketplace for sharing configurations
226
+ - Advanced authentication options (OAuth, API keys)
227
+ - Tool performance analytics
228
+ - Webhook support for real-time updates
229
+ - Tool composition and workflows
230
+
231
+ ---
232
+
233
+ *Bandit's MCP tool system makes it incredibly easy to extend the AI's capabilities with any API or service. The combination of smart AI understanding and real-time execution creates a powerful platform for building AI-powered applications that can interact with your entire technology stack.*
package/docs/README.md CHANGED
@@ -5,5 +5,6 @@
5
5
  - [03 — Provider Integration Patterns](./03_provider_integration.md)
6
6
  - [04 — Local Development & Advanced Services](./04_local_dev.md)
7
7
  - [05 — Contributing Guide](./05_contributing.md)
8
- - [06 — BUSL Licensing & Commercial Terms](./06_busl_licensing.md)
8
+ - [06 — Licensing](./06_licensing.md)
9
+ - [07 — Custom MCP Tools](./07_custom_tools.md)
9
10
  - [API Reference (generated)](./api_reference/index.md)
package/package.json CHANGED
@@ -1,14 +1,16 @@
1
1
  {
2
2
  "name": "@burtson-labs/bandit-engine",
3
- "version": "2.0.168",
4
- "license": "BUSL-1.1",
3
+ "version": "2.1.0",
4
+ "license": "Apache-2.0",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
8
8
  "files": [
9
9
  "dist",
10
- "docs",
10
+ "docs/*.md",
11
11
  "LICENSE",
12
+ "NOTICE",
13
+ "CHANGELOG.md",
12
14
  "README.md"
13
15
  ],
14
16
  "repository": {
@@ -51,37 +53,30 @@
51
53
  },
52
54
  "dependencies": {
53
55
  "@burtson-labs/bandit-types": "^1.0.1",
54
- "@burtson-labs/icons": "^0.5.0",
55
- "@emotion/react": "^11.14.0",
56
- "@emotion/styled": "^11.14.0",
57
- "@mui/material": "^7.1.0",
58
56
  "@tanstack/react-query": "^5.66.3",
59
- "axios": "^1.7.9",
57
+ "axios": "^1.21.0",
60
58
  "highlight.js": "^11.10.0",
61
- "idb": "latest",
59
+ "idb": "^8.0.3",
62
60
  "lowlight": "^3.1.0",
63
- "mammoth": "^1.9.0",
61
+ "mammoth": "^1.13.0",
64
62
  "pdfjs-dist": "^5.2.133",
65
- "react": "^19.0.0",
66
- "react-dom": "^19.0.0",
67
63
  "react-markdown": "^10.1.0",
68
- "react-router-dom": "^7.5.0",
64
+ "react-router-dom": "^7.18.5",
69
65
  "rehype-raw": "^7.0.0",
70
66
  "rehype-sanitize": "^6.0.0",
71
67
  "remark-gfm": "^4.0.1",
72
68
  "rxjs": "^7.8.2",
73
- "uuid": "^11.1.0",
74
69
  "zustand": "^4.5.6"
75
70
  },
76
71
  "devDependencies": {
77
72
  "@burtson-labs/bandit-themes": "*",
73
+ "@burtson-labs/icons": "^0.5.0",
78
74
  "@burtson-labs/ui": "^0.12.2",
79
75
  "@testing-library/jest-dom": "^6.6.3",
80
76
  "@testing-library/react": "^16.3.0",
81
77
  "@types/node": "^24.0.3",
82
78
  "@types/react": "^18.3.22",
83
79
  "@types/react-dom": "^18.2.17",
84
- "@types/uuid": "^10.0.0",
85
80
  "@vitejs/plugin-react": "^4.6.0",
86
81
  "eslint": "^8.57.0",
87
82
  "eslint-plugin-react": "^7.34.1",
@@ -92,18 +87,26 @@
92
87
  "vitest": "^3.2.4"
93
88
  },
94
89
  "peerDependencies": {
90
+ "@emotion/react": "^11.0.0",
91
+ "@emotion/styled": "^11.0.0",
95
92
  "@mui/material": "^7.0.0",
96
93
  "react": "^19.0.0",
97
94
  "react-dom": "^19.0.0"
98
95
  },
99
96
  "exports": {
100
97
  ".": {
101
- "import": "./dist/index.mjs",
102
- "require": "./dist/index.js"
98
+ "import": {
99
+ "types": "./dist/index.d.mts",
100
+ "default": "./dist/index.mjs"
101
+ },
102
+ "require": {
103
+ "types": "./dist/index.d.ts",
104
+ "default": "./dist/index.js"
105
+ }
103
106
  },
104
107
  "./types": {
105
- "types": "./dist/public-types.d.ts",
106
- "default": "./dist/public-types.d.ts"
107
- }
108
+ "types": "./dist/public-types.d.ts"
109
+ },
110
+ "./package.json": "./package.json"
108
111
  }
109
112
  }
@@ -1,8 +0,0 @@
1
- import {
2
- useAIProviderStore
3
- } from "./chunk-GRPTCHFN.mjs";
4
- import "./chunk-HNXPDIWC.mjs";
5
- export {
6
- useAIProviderStore
7
- };
8
- //# sourceMappingURL=aiProviderStore-HY5G4QAK.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,15 +0,0 @@
1
- import {
2
- chat_default
3
- } from "./chunk-YGOLNWXJ.mjs";
4
- import "./chunk-ONQMRE2G.mjs";
5
- import "./chunk-JD6C64CT.mjs";
6
- import "./chunk-E5WMDLE3.mjs";
7
- import "./chunk-62IYSU3I.mjs";
8
- import "./chunk-KAXUI5H7.mjs";
9
- import "./chunk-SZJB5FLZ.mjs";
10
- import "./chunk-GRPTCHFN.mjs";
11
- import "./chunk-HNXPDIWC.mjs";
12
- export {
13
- chat_default as default
14
- };
15
- //# sourceMappingURL=chat-7LOFYEWE.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}