@burtson-labs/bandit-engine 2.0.19 → 2.0.21

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.
@@ -6288,7 +6288,7 @@ var StorageTab = ({ currentTheme }) => {
6288
6288
  ]);
6289
6289
  const calculatedUsed = categories.reduce((sum, cat) => sum + cat.size, 0);
6290
6290
  const browserQuota = quotaEstimate.quota && quotaEstimate.quota > 0 ? quotaEstimate.quota : 0;
6291
- let normalizedQuota = browserQuota > 0 ? Math.min(Math.max(browserQuota, calculatedUsed || DEFAULT_DISPLAY_QUOTA_BYTES), MAX_DISPLAY_QUOTA_BYTES) : Math.max(DEFAULT_DISPLAY_QUOTA_BYTES, calculatedUsed);
6291
+ const normalizedQuota = browserQuota > 0 ? Math.min(Math.max(browserQuota, calculatedUsed || DEFAULT_DISPLAY_QUOTA_BYTES), MAX_DISPLAY_QUOTA_BYTES) : Math.max(DEFAULT_DISPLAY_QUOTA_BYTES, calculatedUsed);
6292
6292
  const available = Math.max(normalizedQuota - calculatedUsed, 0);
6293
6293
  debugLogger.info("Storage data loaded successfully", {
6294
6294
  browserQuota,
@@ -7374,7 +7374,19 @@ import ErrorOutlineIcon from "@mui/icons-material/ErrorOutline";
7374
7374
  import SettingsIcon2 from "@mui/icons-material/Settings";
7375
7375
 
7376
7376
  // src/services/mcp/mcpControllerService.ts
7377
+ var isPlaygroundMode = () => {
7378
+ const settings = usePackageSettingsStore.getState().settings;
7379
+ if (!settings) {
7380
+ return false;
7381
+ }
7382
+ const gatewayUrl = settings.gatewayApiUrl?.toLowerCase() ?? "";
7383
+ return Boolean(settings.playgroundMode || gatewayUrl.startsWith("playground://"));
7384
+ };
7377
7385
  function buildUrl(path) {
7386
+ if (isPlaygroundMode()) {
7387
+ debugLogger.info("MCP controller URL build skipped in playground mode", { path });
7388
+ return path.startsWith("/") ? path : `/${path}`;
7389
+ }
7378
7390
  const base = usePackageSettingsStore.getState().settings?.gatewayApiUrl?.replace(/\/$/, "") || "";
7379
7391
  if (base) {
7380
7392
  const normalized = path.startsWith("/") ? path : `/${path}`;
@@ -7389,6 +7401,10 @@ function authHeaders() {
7389
7401
  return headers;
7390
7402
  }
7391
7403
  async function fetchAvailableMcpTools() {
7404
+ if (isPlaygroundMode()) {
7405
+ debugLogger.info("Skipping remote MCP tool fetch \u2014 playground mode active");
7406
+ return [];
7407
+ }
7392
7408
  const url = buildUrl("/mcp/tools");
7393
7409
  try {
7394
7410
  const res = await fetch(url, { headers: authHeaders() });
@@ -7403,6 +7419,16 @@ async function fetchAvailableMcpTools() {
7403
7419
  }
7404
7420
  }
7405
7421
  async function fetchMcpHealth() {
7422
+ if (isPlaygroundMode()) {
7423
+ debugLogger.info("Returning mocked MCP health \u2014 playground mode active");
7424
+ return {
7425
+ status: "healthy",
7426
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
7427
+ totalTools: 0,
7428
+ enabledTools: 0,
7429
+ availableTools: []
7430
+ };
7431
+ }
7406
7432
  const url = buildUrl("/mcp/health");
7407
7433
  try {
7408
7434
  const res = await fetch(url, { headers: authHeaders() });
@@ -7582,7 +7608,7 @@ var MCPToolsTabV2_default = MCPToolsTabV2;
7582
7608
 
7583
7609
  // src/management/management.tsx
7584
7610
  import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
7585
- var preloadChatPage = () => import("./chat-ZPJNWIXI.mjs");
7611
+ var preloadChatPage = () => import("./chat-2Y72EFJ2.mjs");
7586
7612
  var Management = () => {
7587
7613
  const navigate = useNavigate();
7588
7614
  const notificationService = useNotificationService();
@@ -8760,4 +8786,4 @@ export {
8760
8786
  useGatewayMemory,
8761
8787
  management_default
8762
8788
  };
8763
- //# sourceMappingURL=chunk-IFN52MQL.mjs.map
8789
+ //# sourceMappingURL=chunk-JECYIAWF.mjs.map