@burtson-labs/bandit-engine 2.0.39 → 2.0.41

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 (52) hide show
  1. package/README.md +14 -11
  2. package/dist/{aiProviderStore-XN7GCBHJ.mjs → aiProviderStore-UQI33C5E.mjs} +2 -2
  3. package/dist/{chat-5QJNWB7I.mjs → chat-T5ANWWYQ.mjs} +5 -5
  4. package/dist/chat-provider.js +571 -122
  5. package/dist/chat-provider.js.map +1 -1
  6. package/dist/chat-provider.mjs +4 -4
  7. package/dist/{chunk-3A2527TE.mjs → chunk-22EY3ZDC.mjs} +3 -3
  8. package/dist/{chunk-ECRNIAG6.mjs → chunk-3E57HLDV.mjs} +4 -4
  9. package/dist/{chunk-QU5S5QQP.mjs → chunk-54ZQ3FSN.mjs} +481 -77
  10. package/dist/chunk-54ZQ3FSN.mjs.map +1 -0
  11. package/dist/{chunk-JRCDANLN.mjs → chunk-A6OBEF72.mjs} +75 -12
  12. package/dist/{chunk-JRCDANLN.mjs.map → chunk-A6OBEF72.mjs.map} +1 -1
  13. package/dist/{chunk-CDQYBO3Q.mjs → chunk-CX3INLYJ.mjs} +27 -5
  14. package/dist/chunk-CX3INLYJ.mjs.map +1 -0
  15. package/dist/{chunk-QYH2T4L5.mjs → chunk-LYWVYBKU.mjs} +3 -3
  16. package/dist/{chunk-WO5KFNNW.mjs → chunk-QFNEHSY4.mjs} +62 -24
  17. package/dist/chunk-QFNEHSY4.mjs.map +1 -0
  18. package/dist/{chunk-EOKIE5HZ.mjs → chunk-WPWWWUD7.mjs} +51 -46
  19. package/dist/chunk-WPWWWUD7.mjs.map +1 -0
  20. package/dist/{cli/cli.js → cli.js} +423 -10
  21. package/dist/cli.js.map +1 -0
  22. package/dist/{gateway-B0LJ3-jT.d.ts → gateway-5yt_3QDP.d.mts} +4 -4
  23. package/dist/{gateway-B0LJ3-jT.d.mts → gateway-5yt_3QDP.d.ts} +4 -4
  24. package/dist/index.d.mts +2 -2
  25. package/dist/index.d.ts +2 -2
  26. package/dist/index.js +756 -206
  27. package/dist/index.js.map +1 -1
  28. package/dist/index.mjs +8 -8
  29. package/dist/management/management.js +754 -204
  30. package/dist/management/management.js.map +1 -1
  31. package/dist/management/management.mjs +6 -6
  32. package/dist/modals/chat-modal/chat-modal.js +532 -88
  33. package/dist/modals/chat-modal/chat-modal.js.map +1 -1
  34. package/dist/modals/chat-modal/chat-modal.mjs +4 -4
  35. package/dist/public-types.d.mts +1 -1
  36. package/dist/public-types.d.ts +1 -1
  37. package/docs/01_quickstart.md +10 -4
  38. package/docs/02_gateway_api.md +19 -3
  39. package/docs/03_provider_integration.md +5 -4
  40. package/docs/api_reference/media/02_gateway_api.md +19 -3
  41. package/docs/api_reference/media/README.md +3 -1
  42. package/package.json +1 -1
  43. package/dist/chunk-CDQYBO3Q.mjs.map +0 -1
  44. package/dist/chunk-EOKIE5HZ.mjs.map +0 -1
  45. package/dist/chunk-QU5S5QQP.mjs.map +0 -1
  46. package/dist/chunk-WO5KFNNW.mjs.map +0 -1
  47. package/dist/cli/cli.js.map +0 -1
  48. /package/dist/{aiProviderStore-XN7GCBHJ.mjs.map → aiProviderStore-UQI33C5E.mjs.map} +0 -0
  49. /package/dist/{chat-5QJNWB7I.mjs.map → chat-T5ANWWYQ.mjs.map} +0 -0
  50. /package/dist/{chunk-3A2527TE.mjs.map → chunk-22EY3ZDC.mjs.map} +0 -0
  51. /package/dist/{chunk-ECRNIAG6.mjs.map → chunk-3E57HLDV.mjs.map} +0 -0
  52. /package/dist/{chunk-QYH2T4L5.mjs.map → chunk-LYWVYBKU.mjs.map} +0 -0
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  aiProviderInitService
3
- } from "./chunk-EOKIE5HZ.mjs";
3
+ } from "./chunk-WPWWWUD7.mjs";
4
4
  import {
5
5
  useMCPToolsStore
6
6
  } from "./chunk-RTQDQ6TC.mjs";
7
7
  import {
8
8
  chat_modal_default
9
- } from "./chunk-ECRNIAG6.mjs";
9
+ } from "./chunk-3E57HLDV.mjs";
10
10
  import {
11
11
  DocumentCard_default,
12
12
  banditDarkTheme,
@@ -14,7 +14,7 @@ import {
14
14
  predefinedThemes,
15
15
  useNotificationService,
16
16
  useVoiceStore
17
- } from "./chunk-QYH2T4L5.mjs";
17
+ } from "./chunk-LYWVYBKU.mjs";
18
18
  import {
19
19
  authenticationService,
20
20
  brandingService_default,
@@ -27,7 +27,7 @@ import {
27
27
  useFeatures,
28
28
  useKnowledgeStore2 as useKnowledgeStore,
29
29
  useVectorStore
30
- } from "./chunk-CDQYBO3Q.mjs";
30
+ } from "./chunk-CX3INLYJ.mjs";
31
31
  import {
32
32
  indexedDBService_default,
33
33
  models,
@@ -39,7 +39,7 @@ import {
39
39
  AIProviderFactory,
40
40
  GatewayService,
41
41
  useAIProviderStore
42
- } from "./chunk-QU5S5QQP.mjs";
42
+ } from "./chunk-54ZQ3FSN.mjs";
43
43
  import {
44
44
  debugLogger
45
45
  } from "./chunk-KCI46M23.mjs";
@@ -6956,6 +6956,8 @@ var ProviderTab = () => {
6956
6956
  return "gpt-4o-mini";
6957
6957
  case "xai" /* XAI */:
6958
6958
  return "grok-beta";
6959
+ case "bandit" /* BANDIT */:
6960
+ return "bandit-core-1";
6959
6961
  default:
6960
6962
  return "";
6961
6963
  }
@@ -6963,7 +6965,7 @@ var ProviderTab = () => {
6963
6965
  const applyDefaultModel = useCallback6((config) => {
6964
6966
  const normalized = { ...config };
6965
6967
  const trimmed = typeof normalized.defaultModel === "string" ? normalized.defaultModel.trim() : void 0;
6966
- const requiresModel = normalized.type === "openai" /* OPENAI */ || normalized.type === "xai" /* XAI */;
6968
+ const requiresModel = normalized.type === "openai" /* OPENAI */ || normalized.type === "xai" /* XAI */ || normalized.type === "bandit" /* BANDIT */;
6967
6969
  if (trimmed) {
6968
6970
  normalized.defaultModel = trimmed;
6969
6971
  return normalized;
@@ -6986,11 +6988,16 @@ var ProviderTab = () => {
6986
6988
  const trimmed = sanitized.defaultModel.trim();
6987
6989
  sanitized.defaultModel = trimmed || void 0;
6988
6990
  }
6991
+ if (typeof sanitized.apiKey === "string") {
6992
+ const trimmedKey = sanitized.apiKey.trim();
6993
+ sanitized.apiKey = trimmedKey || void 0;
6994
+ }
6989
6995
  return sanitized;
6990
6996
  }, []);
6991
6997
  const [providerConfig, setProviderConfig] = useState10({
6992
- type: "ollama",
6993
- baseUrl: "http://localhost:11434"
6998
+ type: "gateway",
6999
+ gatewayUrl: packageSettings?.gatewayApiUrl || "",
7000
+ provider: "bandit"
6994
7001
  });
6995
7002
  const [isProviderConfigOpen, setIsProviderConfigOpen] = useState10(false);
6996
7003
  const [snackbarMessage, setSnackbarMessage] = useState10("");
@@ -7114,11 +7121,19 @@ var ProviderTab = () => {
7114
7121
  apiKey: ""
7115
7122
  }));
7116
7123
  break;
7124
+ case "bandit" /* BANDIT */:
7125
+ setProviderConfig(applyDefaultModel({
7126
+ ...baseConfig,
7127
+ baseUrl: "https://api.burtson.ai",
7128
+ apiKey: "",
7129
+ defaultModel: "bandit-core-1"
7130
+ }));
7131
+ break;
7117
7132
  case "gateway" /* GATEWAY */:
7118
7133
  setProviderConfig(applyDefaultModel({
7119
7134
  ...baseConfig,
7120
7135
  gatewayUrl: packageSettings?.gatewayApiUrl || "",
7121
- provider: "openai"
7136
+ provider: "bandit"
7122
7137
  }));
7123
7138
  break;
7124
7139
  case "playground" /* PLAYGROUND */:
@@ -7132,7 +7147,7 @@ var ProviderTab = () => {
7132
7147
  try {
7133
7148
  const normalizedConfigIntermediate = sanitizeConfigForSave(providerConfig);
7134
7149
  const normalizedConfig = convertAnthropicConfig(normalizedConfigIntermediate) || normalizedConfigIntermediate;
7135
- const requiresModel = normalizedConfig.type === "openai" /* OPENAI */ || normalizedConfig.type === "xai" /* XAI */;
7150
+ const requiresModel = normalizedConfig.type === "openai" /* OPENAI */ || normalizedConfig.type === "xai" /* XAI */ || normalizedConfig.type === "bandit" /* BANDIT */;
7136
7151
  if (requiresModel && !normalizedConfig.defaultModel) {
7137
7152
  showMessage("Please provide a default model ID for the selected provider.", "error");
7138
7153
  return;
@@ -7257,6 +7272,7 @@ var ProviderTab = () => {
7257
7272
  /* @__PURE__ */ jsx9(MenuItem3, { value: "ollama", children: "Ollama" }),
7258
7273
  /* @__PURE__ */ jsx9(MenuItem3, { value: "openai", children: "OpenAI" }),
7259
7274
  /* @__PURE__ */ jsx9(MenuItem3, { value: "azure-openai", children: "Azure OpenAI" }),
7275
+ /* @__PURE__ */ jsx9(MenuItem3, { value: "bandit", children: "Bandit AI" }),
7260
7276
  /* @__PURE__ */ jsx9(MenuItem3, { value: "xai", children: "xAI" }),
7261
7277
  /* @__PURE__ */ jsx9(MenuItem3, { value: "playground", children: "Playground (Mock Demo)" })
7262
7278
  ]
@@ -7291,6 +7307,7 @@ var ProviderTab = () => {
7291
7307
  /* @__PURE__ */ jsx9(MenuItem3, { value: "azure-openai", children: "Azure OpenAI" }),
7292
7308
  /* @__PURE__ */ jsx9(MenuItem3, { value: "anthropic", children: "Anthropic" }),
7293
7309
  /* @__PURE__ */ jsx9(MenuItem3, { value: "ollama", children: "Ollama" }),
7310
+ /* @__PURE__ */ jsx9(MenuItem3, { value: "bandit", children: "Bandit AI" }),
7294
7311
  /* @__PURE__ */ jsx9(MenuItem3, { value: "xai", children: "xAI" })
7295
7312
  ]
7296
7313
  }
@@ -7306,6 +7323,52 @@ var ProviderTab = () => {
7306
7323
  placeholder: "http://localhost:11434"
7307
7324
  }
7308
7325
  ),
7326
+ providerConfig.type === "bandit" && /* @__PURE__ */ jsxs9(Box9, { children: [
7327
+ /* @__PURE__ */ jsx9(
7328
+ TextField5,
7329
+ {
7330
+ label: "API Base URL",
7331
+ value: providerConfig.baseUrl || "",
7332
+ onChange: (e) => setProviderConfig((prev) => ({
7333
+ ...prev,
7334
+ baseUrl: e.target.value
7335
+ })),
7336
+ fullWidth: true,
7337
+ sx: { mb: 2 },
7338
+ placeholder: "https://api.burtson.ai",
7339
+ helperText: "Defaults to https://api.burtson.ai"
7340
+ }
7341
+ ),
7342
+ /* @__PURE__ */ jsx9(
7343
+ TextField5,
7344
+ {
7345
+ label: "API Key",
7346
+ type: "password",
7347
+ value: providerConfig.apiKey || "",
7348
+ onChange: (e) => setProviderConfig((prev) => ({
7349
+ ...prev,
7350
+ apiKey: e.target.value
7351
+ })),
7352
+ fullWidth: true,
7353
+ sx: { mb: 2 },
7354
+ placeholder: "bai_..."
7355
+ }
7356
+ ),
7357
+ /* @__PURE__ */ jsx9(
7358
+ TextField5,
7359
+ {
7360
+ label: "Default Model ID",
7361
+ value: providerConfig.defaultModel || "",
7362
+ onChange: (e) => setProviderConfig((prev) => ({
7363
+ ...prev,
7364
+ defaultModel: e.target.value
7365
+ })),
7366
+ fullWidth: true,
7367
+ placeholder: "bandit-core-1",
7368
+ helperText: "Example: bandit-core-1 (Bandit Core canonical alias)."
7369
+ }
7370
+ )
7371
+ ] }),
7309
7372
  providerConfig.type === "openai" && /* @__PURE__ */ jsxs9(Box9, { children: [
7310
7373
  /* @__PURE__ */ jsx9(
7311
7374
  TextField5,
@@ -7734,7 +7797,7 @@ var MCPToolsTabV2_default = MCPToolsTabV2;
7734
7797
 
7735
7798
  // src/management/management.tsx
7736
7799
  import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
7737
- var preloadChatPage = () => import("./chat-5QJNWB7I.mjs");
7800
+ var preloadChatPage = () => import("./chat-T5ANWWYQ.mjs");
7738
7801
  var Management = () => {
7739
7802
  const navigate = useNavigate();
7740
7803
  const notificationService = useNotificationService();
@@ -8912,4 +8975,4 @@ export {
8912
8975
  useGatewayMemory,
8913
8976
  management_default
8914
8977
  };
8915
- //# sourceMappingURL=chunk-JRCDANLN.mjs.map
8978
+ //# sourceMappingURL=chunk-A6OBEF72.mjs.map