@burtson-labs/bandit-engine 2.0.165 → 2.0.167

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 (61) hide show
  1. package/README.md +4 -1
  2. package/dist/aiProviderStore-HY5G4QAK.mjs +8 -0
  3. package/dist/chat-6N5B7A7F.mjs +15 -0
  4. package/dist/chat-provider.js +175 -109
  5. package/dist/chat-provider.js.map +1 -1
  6. package/dist/chat-provider.mjs +6 -7
  7. package/dist/{chunk-FEIDGXVR.mjs → chunk-46OGYEME.mjs} +24 -6
  8. package/dist/{chunk-FEIDGXVR.mjs.map → chunk-46OGYEME.mjs.map} +1 -1
  9. package/dist/{chunk-ASWUEAWM.mjs → chunk-5BZWJQ5O.mjs} +2 -2
  10. package/dist/{chunk-LKGBO5OP.mjs → chunk-CABOLDNR.mjs} +12 -84
  11. package/dist/chunk-CABOLDNR.mjs.map +1 -0
  12. package/dist/{chunk-NGGTQVGX.mjs → chunk-E5WMDLE3.mjs} +3 -3
  13. package/dist/{chunk-J6LSSK3G.mjs → chunk-GRPTCHFN.mjs} +149 -41
  14. package/dist/chunk-GRPTCHFN.mjs.map +1 -0
  15. package/dist/{chunk-RLW4RBIR.mjs → chunk-KDIL5WUL.mjs} +4 -4
  16. package/dist/{chunk-6VDL4SLX.mjs → chunk-N4BQ6HKL.mjs} +5 -5
  17. package/dist/{chunk-RNCASZ2Y.mjs → chunk-PK3LFBGC.mjs} +10 -10
  18. package/dist/{chunk-WSUUW7T2.mjs → chunk-SHYNXDRO.mjs} +10 -7
  19. package/dist/chunk-SHYNXDRO.mjs.map +1 -0
  20. package/dist/{chunk-2EM4ATKI.mjs → chunk-SZJB5FLZ.mjs} +2 -2
  21. package/dist/{chunk-2EM4ATKI.mjs.map → chunk-SZJB5FLZ.mjs.map} +1 -1
  22. package/dist/{chunk-QHGGV4KJ.mjs → chunk-US4TG745.mjs} +6 -6
  23. package/dist/index.d.mts +94 -3
  24. package/dist/index.d.ts +94 -3
  25. package/dist/index.js +191 -130
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.mjs +21 -20
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/management/management.js +162 -120
  30. package/dist/management/management.js.map +1 -1
  31. package/dist/management/management.mjs +9 -10
  32. package/dist/{memoryUtils-2FVXDSS6.mjs → memoryUtils-HGCYEUCD.mjs} +1 -3
  33. package/dist/{memoryUtils-2FVXDSS6.mjs.map → memoryUtils-HGCYEUCD.mjs.map} +1 -1
  34. package/dist/modals/chat-modal/chat-modal.js +149 -30
  35. package/dist/modals/chat-modal/chat-modal.js.map +1 -1
  36. package/dist/modals/chat-modal/chat-modal.mjs +5 -6
  37. package/dist/modelStore-TFNX4GEC.mjs +8 -0
  38. package/dist/{public-0EYmtpGD.d.mts → public-DJa4Db00.d.mts} +9 -0
  39. package/dist/{public-0EYmtpGD.d.ts → public-DJa4Db00.d.ts} +9 -0
  40. package/dist/public-types.d.mts +1 -1
  41. package/dist/public-types.d.ts +1 -1
  42. package/dist/shared/custom-element.mjs +0 -1
  43. package/docs/03_provider_integration.md +5 -2
  44. package/package.json +1 -1
  45. package/dist/aiProviderStore-M4BVEKUB.mjs +0 -9
  46. package/dist/chat-EMKHB23B.mjs +0 -16
  47. package/dist/chunk-BJTO5JO5.mjs +0 -11
  48. package/dist/chunk-J6LSSK3G.mjs.map +0 -1
  49. package/dist/chunk-LKGBO5OP.mjs.map +0 -1
  50. package/dist/chunk-WSUUW7T2.mjs.map +0 -1
  51. package/dist/modelStore-7YYELPF6.mjs +0 -9
  52. package/dist/modelStore-7YYELPF6.mjs.map +0 -1
  53. /package/dist/{aiProviderStore-M4BVEKUB.mjs.map → aiProviderStore-HY5G4QAK.mjs.map} +0 -0
  54. /package/dist/{chat-EMKHB23B.mjs.map → chat-6N5B7A7F.mjs.map} +0 -0
  55. /package/dist/{chunk-ASWUEAWM.mjs.map → chunk-5BZWJQ5O.mjs.map} +0 -0
  56. /package/dist/{chunk-NGGTQVGX.mjs.map → chunk-E5WMDLE3.mjs.map} +0 -0
  57. /package/dist/{chunk-RLW4RBIR.mjs.map → chunk-KDIL5WUL.mjs.map} +0 -0
  58. /package/dist/{chunk-6VDL4SLX.mjs.map → chunk-N4BQ6HKL.mjs.map} +0 -0
  59. /package/dist/{chunk-RNCASZ2Y.mjs.map → chunk-PK3LFBGC.mjs.map} +0 -0
  60. /package/dist/{chunk-QHGGV4KJ.mjs.map → chunk-US4TG745.mjs.map} +0 -0
  61. /package/dist/{chunk-BJTO5JO5.mjs.map → modelStore-TFNX4GEC.mjs.map} +0 -0
@@ -3,13 +3,12 @@ import {
3
3
  MAX_WINDOWED_HEIGHT,
4
4
  MIN_WINDOWED_HEIGHT,
5
5
  chat_modal_default
6
- } from "../../chunk-6VDL4SLX.mjs";
7
- import "../../chunk-RLW4RBIR.mjs";
8
- import "../../chunk-FEIDGXVR.mjs";
9
- import "../../chunk-2EM4ATKI.mjs";
10
- import "../../chunk-J6LSSK3G.mjs";
6
+ } from "../../chunk-N4BQ6HKL.mjs";
7
+ import "../../chunk-KDIL5WUL.mjs";
8
+ import "../../chunk-46OGYEME.mjs";
9
+ import "../../chunk-SZJB5FLZ.mjs";
10
+ import "../../chunk-GRPTCHFN.mjs";
11
11
  import "../../chunk-HNXPDIWC.mjs";
12
- import "../../chunk-BJTO5JO5.mjs";
13
12
  export {
14
13
  FULL_SCREEN_THRESHOLD,
15
14
  MAX_WINDOWED_HEIGHT,
@@ -0,0 +1,8 @@
1
+ import {
2
+ useModelStore
3
+ } from "./chunk-SZJB5FLZ.mjs";
4
+ import "./chunk-HNXPDIWC.mjs";
5
+ export {
6
+ useModelStore
7
+ };
8
+ //# sourceMappingURL=modelStore-TFNX4GEC.mjs.map
@@ -158,6 +158,15 @@ interface TelemetryOptIn {
158
158
  interface ComponentOverrides {
159
159
  /** Optional host-provided replacement for the Under Review access gate view. */
160
160
  UnderReview?: ComponentType;
161
+ /**
162
+ * Optional host navigation rendered in the middle of the chat's title strip
163
+ * (between the strip's own controls): banditailabs.com puts its product bar
164
+ * there. `compact` is the phone layout. Render nothing to leave the strip as
165
+ * it is.
166
+ */
167
+ ProductNav?: ComponentType<{
168
+ compact?: boolean;
169
+ }>;
161
170
  }
162
171
  interface PackageSettings {
163
172
  ollamaUrl?: string;
@@ -158,6 +158,15 @@ interface TelemetryOptIn {
158
158
  interface ComponentOverrides {
159
159
  /** Optional host-provided replacement for the Under Review access gate view. */
160
160
  UnderReview?: ComponentType;
161
+ /**
162
+ * Optional host navigation rendered in the middle of the chat's title strip
163
+ * (between the strip's own controls): banditailabs.com puts its product bar
164
+ * there. `compact` is the phone layout. Render nothing to leave the strip as
165
+ * it is.
166
+ */
167
+ ProductNav?: ComponentType<{
168
+ compact?: boolean;
169
+ }>;
161
170
  }
162
171
  interface PackageSettings {
163
172
  ollamaUrl?: string;
@@ -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-0EYmtpGD.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-DJa4Db00.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-0EYmtpGD.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-DJa4Db00.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';
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  defineCustomElement
3
3
  } from "../chunk-P4C5IRM5.mjs";
4
- import "../chunk-BJTO5JO5.mjs";
5
4
  export {
6
5
  defineCustomElement
7
6
  };
@@ -9,12 +9,15 @@ Bandit Engine routes every model invocation through your gateway but preserves p
9
9
 
10
10
  ## Example Implementation
11
11
  ```ts
12
- import { GatewayProvider } from "@burtson-labs/bandit-engine";
12
+ import { GatewayProvider, authenticationService } from "@burtson-labs/bandit-engine";
13
13
 
14
14
  const provider = new GatewayProvider({
15
15
  provider: "bandit",
16
16
  gatewayUrl: "https://gateway.example.com",
17
- tokenFactory: () => localStorage.getItem("authToken") ?? ""
17
+ // The engine's session is the source of truth for the signed-in user's token.
18
+ // (Reading localStorage.getItem("authToken") directly still works for hosts
19
+ // on the default localStorage contract, but not for memory-only sessions.)
20
+ tokenFactory: () => authenticationService.getToken() ?? ""
18
21
  });
19
22
 
20
23
  provider.listModelsByProvider("bandit").subscribe(models => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burtson-labs/bandit-engine",
3
- "version": "2.0.165",
3
+ "version": "2.0.167",
4
4
  "license": "BUSL-1.1",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -1,9 +0,0 @@
1
- import {
2
- useAIProviderStore
3
- } from "./chunk-J6LSSK3G.mjs";
4
- import "./chunk-HNXPDIWC.mjs";
5
- import "./chunk-BJTO5JO5.mjs";
6
- export {
7
- useAIProviderStore
8
- };
9
- //# sourceMappingURL=aiProviderStore-M4BVEKUB.mjs.map
@@ -1,16 +0,0 @@
1
- import {
2
- chat_default
3
- } from "./chunk-WSUUW7T2.mjs";
4
- import "./chunk-ONQMRE2G.mjs";
5
- import "./chunk-ASWUEAWM.mjs";
6
- import "./chunk-NGGTQVGX.mjs";
7
- import "./chunk-RLW4RBIR.mjs";
8
- import "./chunk-FEIDGXVR.mjs";
9
- import "./chunk-2EM4ATKI.mjs";
10
- import "./chunk-J6LSSK3G.mjs";
11
- import "./chunk-HNXPDIWC.mjs";
12
- import "./chunk-BJTO5JO5.mjs";
13
- export {
14
- chat_default as default
15
- };
16
- //# sourceMappingURL=chat-EMKHB23B.mjs.map
@@ -1,11 +0,0 @@
1
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
- }) : x)(function(x) {
4
- if (typeof require !== "undefined") return require.apply(this, arguments);
5
- throw Error('Dynamic require of "' + x + '" is not supported');
6
- });
7
-
8
- export {
9
- __require
10
- };
11
- //# sourceMappingURL=chunk-BJTO5JO5.mjs.map