@burtson-labs/bandit-engine 2.0.165 → 2.0.166

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +4 -1
  2. package/dist/aiProviderStore-HY5G4QAK.mjs +8 -0
  3. package/dist/chat-RCMZYACB.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-33OSALGS.mjs} +24 -6
  8. package/dist/{chunk-FEIDGXVR.mjs.map → chunk-33OSALGS.mjs.map} +1 -1
  9. package/dist/{chunk-LKGBO5OP.mjs → chunk-6KRAPGXE.mjs} +12 -84
  10. package/dist/chunk-6KRAPGXE.mjs.map +1 -0
  11. package/dist/{chunk-6VDL4SLX.mjs → chunk-75OBTJPN.mjs} +5 -5
  12. package/dist/{chunk-QHGGV4KJ.mjs → chunk-A6W6XIDD.mjs} +6 -6
  13. package/dist/{chunk-J6LSSK3G.mjs → chunk-GRPTCHFN.mjs} +149 -41
  14. package/dist/chunk-GRPTCHFN.mjs.map +1 -0
  15. package/dist/{chunk-ASWUEAWM.mjs → chunk-IB2LPSQQ.mjs} +2 -2
  16. package/dist/{chunk-RNCASZ2Y.mjs → chunk-M4DWPNZZ.mjs} +10 -10
  17. package/dist/{chunk-NGGTQVGX.mjs → chunk-MM3NRLVR.mjs} +3 -3
  18. package/dist/{chunk-RLW4RBIR.mjs → chunk-Q2DINRIU.mjs} +4 -4
  19. package/dist/{chunk-WSUUW7T2.mjs → chunk-WSZE3DDJ.mjs} +7 -7
  20. package/dist/{chunk-2EM4ATKI.mjs → chunk-YH5YWK4K.mjs} +2 -2
  21. package/dist/index.d.mts +92 -1
  22. package/dist/index.d.ts +92 -1
  23. package/dist/index.js +188 -130
  24. package/dist/index.js.map +1 -1
  25. package/dist/index.mjs +21 -20
  26. package/dist/index.mjs.map +1 -1
  27. package/dist/management/management.js +159 -120
  28. package/dist/management/management.js.map +1 -1
  29. package/dist/management/management.mjs +9 -10
  30. package/dist/{memoryUtils-2FVXDSS6.mjs → memoryUtils-HGCYEUCD.mjs} +1 -3
  31. package/dist/{memoryUtils-2FVXDSS6.mjs.map → memoryUtils-HGCYEUCD.mjs.map} +1 -1
  32. package/dist/modals/chat-modal/chat-modal.js +149 -30
  33. package/dist/modals/chat-modal/chat-modal.js.map +1 -1
  34. package/dist/modals/chat-modal/chat-modal.mjs +5 -6
  35. package/dist/modelStore-F6JQUXGG.mjs +8 -0
  36. package/dist/shared/custom-element.mjs +0 -1
  37. package/docs/03_provider_integration.md +5 -2
  38. package/package.json +1 -1
  39. package/dist/aiProviderStore-M4BVEKUB.mjs +0 -9
  40. package/dist/chat-EMKHB23B.mjs +0 -16
  41. package/dist/chunk-BJTO5JO5.mjs +0 -11
  42. package/dist/chunk-J6LSSK3G.mjs.map +0 -1
  43. package/dist/chunk-LKGBO5OP.mjs.map +0 -1
  44. package/dist/modelStore-7YYELPF6.mjs +0 -9
  45. package/dist/modelStore-7YYELPF6.mjs.map +0 -1
  46. /package/dist/{aiProviderStore-M4BVEKUB.mjs.map → aiProviderStore-HY5G4QAK.mjs.map} +0 -0
  47. /package/dist/{chat-EMKHB23B.mjs.map → chat-RCMZYACB.mjs.map} +0 -0
  48. /package/dist/{chunk-6VDL4SLX.mjs.map → chunk-75OBTJPN.mjs.map} +0 -0
  49. /package/dist/{chunk-QHGGV4KJ.mjs.map → chunk-A6W6XIDD.mjs.map} +0 -0
  50. /package/dist/{chunk-ASWUEAWM.mjs.map → chunk-IB2LPSQQ.mjs.map} +0 -0
  51. /package/dist/{chunk-RNCASZ2Y.mjs.map → chunk-M4DWPNZZ.mjs.map} +0 -0
  52. /package/dist/{chunk-NGGTQVGX.mjs.map → chunk-MM3NRLVR.mjs.map} +0 -0
  53. /package/dist/{chunk-RLW4RBIR.mjs.map → chunk-Q2DINRIU.mjs.map} +0 -0
  54. /package/dist/{chunk-WSUUW7T2.mjs.map → chunk-WSZE3DDJ.mjs.map} +0 -0
  55. /package/dist/{chunk-2EM4ATKI.mjs.map → chunk-YH5YWK4K.mjs.map} +0 -0
  56. /package/dist/{chunk-BJTO5JO5.mjs.map → modelStore-F6JQUXGG.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-75OBTJPN.mjs";
7
+ import "../../chunk-Q2DINRIU.mjs";
8
+ import "../../chunk-33OSALGS.mjs";
9
+ import "../../chunk-YH5YWK4K.mjs";
10
+ import "../../chunk-GRPTCHFN.mjs";
11
11
  import "../../chunk-HNXPDIWC.mjs";
12
- import "../../chunk-BJTO5JO5.mjs";
13
12
  export {
14
13
  FULL_SCREEN_THRESHOLD,
15
14
  MAX_WINDOWED_HEIGHT,
@@ -0,0 +1,8 @@
1
+ import {
2
+ useModelStore
3
+ } from "./chunk-YH5YWK4K.mjs";
4
+ import "./chunk-HNXPDIWC.mjs";
5
+ export {
6
+ useModelStore
7
+ };
8
+ //# sourceMappingURL=modelStore-F6JQUXGG.mjs.map
@@ -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.166",
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