@burtson-labs/bandit-engine 2.1.3 → 2.1.4

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.
package/dist/index.mjs CHANGED
@@ -612,9 +612,9 @@ var ChatProvider = (props) => {
612
612
  var chat_provider_default = ChatProvider;
613
613
 
614
614
  // src/management/management.tsx
615
- import { lazy, Suspense, useState as useState23, useEffect as useEffect20, useCallback as useCallback10, useMemo as useMemo8 } from "react";
615
+ import { lazy, Suspense, useState as useState24, useEffect as useEffect21, useCallback as useCallback11, useMemo as useMemo8 } from "react";
616
616
  import useMediaQuery7 from "@mui/material/useMediaQuery";
617
- import { Box as Box22, Button as Button15, ThemeProvider as ThemeProvider2, CssBaseline, Fab as Fab2 } from "@mui/material";
617
+ import { Box as Box23, Button as Button16, ThemeProvider as ThemeProvider2, CssBaseline, Fab as Fab2 } from "@mui/material";
618
618
  import { useNavigate as useNavigate2 } from "react-router-dom";
619
619
 
620
620
  // src/modals/chat-modal/chat-modal.tsx
@@ -13372,16 +13372,16 @@ var ProviderTab = () => {
13372
13372
  };
13373
13373
 
13374
13374
  // src/management/components/MCPToolsTabV2.tsx
13375
- import { useEffect as useEffect19, useMemo as useMemo6, useState as useState22 } from "react";
13375
+ import { useEffect as useEffect20, useMemo as useMemo6, useState as useState23 } from "react";
13376
13376
  import {
13377
- Alert as Alert10,
13378
- Box as Box19,
13379
- Button as Button13,
13380
- Typography as Typography15,
13381
- Paper as Paper7,
13382
- IconButton as IconButton12,
13383
- Tooltip as Tooltip10,
13384
- LinearProgress as LinearProgress6,
13377
+ Alert as Alert11,
13378
+ Box as Box20,
13379
+ Button as Button14,
13380
+ Typography as Typography16,
13381
+ Paper as Paper8,
13382
+ IconButton as IconButton13,
13383
+ Tooltip as Tooltip11,
13384
+ LinearProgress as LinearProgress7,
13385
13385
  Skeleton as Skeleton5,
13386
13386
  Switch as Switch4
13387
13387
  } from "@mui/material";
@@ -14070,8 +14070,228 @@ var McpServersSection = () => {
14070
14070
  };
14071
14071
  var McpServersSection_default = McpServersSection;
14072
14072
 
14073
- // src/management/components/MCPToolsTabV2.tsx
14073
+ // src/management/components/CrewSection.tsx
14074
+ import { useCallback as useCallback10, useEffect as useEffect19, useState as useState22 } from "react";
14075
+ import {
14076
+ Alert as Alert10,
14077
+ Box as Box19,
14078
+ Button as Button13,
14079
+ Chip as Chip11,
14080
+ Collapse as Collapse3,
14081
+ IconButton as IconButton12,
14082
+ LinearProgress as LinearProgress6,
14083
+ Link as Link3,
14084
+ Paper as Paper7,
14085
+ Stack as Stack8,
14086
+ TextField as TextField10,
14087
+ Tooltip as Tooltip10,
14088
+ Typography as Typography15
14089
+ } from "@mui/material";
14090
+
14091
+ // src/services/crew/crewService.ts
14092
+ var gatewayBase = () => {
14093
+ const settings = usePackageSettingsStore.getState().settings;
14094
+ const url = settings?.gatewayApiUrl?.replace(/\/$/, "");
14095
+ if (!url) throw new Error("Gateway API is not configured.");
14096
+ return url;
14097
+ };
14098
+ var authHeaders2 = () => {
14099
+ const headers = { "Content-Type": "application/json" };
14100
+ const token = authenticationService.getToken();
14101
+ if (token) headers["Authorization"] = `Bearer ${token}`;
14102
+ return headers;
14103
+ };
14104
+ var parse = async (res) => {
14105
+ const text = await res.text();
14106
+ const body = text ? JSON.parse(text) : null;
14107
+ if (!res.ok) {
14108
+ const message = body && typeof body === "object" && (body.error || body.message) || `Request failed (${res.status})`;
14109
+ throw new Error(String(message));
14110
+ }
14111
+ return body;
14112
+ };
14113
+ var scoped = (path, scope) => `${gatewayBase()}/crew/${path}${scope ? `${path.includes("?") ? "&" : "?"}scope=${encodeURIComponent(scope)}` : ""}`;
14114
+ var listBandits = async (scope) => parse(await fetch(scoped("bandits", scope), { headers: authHeaders2() }));
14115
+ var createBandit = async (input, scope) => parse(
14116
+ await fetch(scoped("bandits", scope), {
14117
+ method: "POST",
14118
+ headers: authHeaders2(),
14119
+ body: JSON.stringify(input)
14120
+ })
14121
+ );
14122
+ var deleteBandit = async (id, scope) => {
14123
+ const res = await fetch(scoped(`bandits/${encodeURIComponent(id)}`, scope), {
14124
+ method: "DELETE",
14125
+ headers: authHeaders2()
14126
+ });
14127
+ if (!res.ok && res.status !== 204) {
14128
+ throw new Error(`Could not remove the Bandit (${res.status}).`);
14129
+ }
14130
+ };
14131
+ var listCrewTasks = async (scope, limit = 8) => parse(await fetch(scoped(`tasks?limit=${limit}`, scope), { headers: authHeaders2() }));
14132
+
14133
+ // src/management/components/CrewSection.tsx
14074
14134
  import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
14135
+ var NAME_PATTERN = /^[A-Za-z][\w-]{0,30}$/;
14136
+ var statusLabel = (status) => {
14137
+ switch (status) {
14138
+ case "completed":
14139
+ return { label: "done", color: "success" };
14140
+ case "awaiting_approval":
14141
+ return { label: "needs approval", color: "warning" };
14142
+ case "failed":
14143
+ case "expired":
14144
+ return { label: status, color: "error" };
14145
+ case "cancelled":
14146
+ return { label: "stopped", color: "default" };
14147
+ default:
14148
+ return { label: status, color: "info" };
14149
+ }
14150
+ };
14151
+ var CrewSection = () => {
14152
+ const [bandits, setBandits] = useState22([]);
14153
+ const [tasks, setTasks] = useState22([]);
14154
+ const [loading, setLoading] = useState22(true);
14155
+ const [error, setError] = useState22(null);
14156
+ const [showForm, setShowForm] = useState22(false);
14157
+ const [name, setName] = useState22("");
14158
+ const [job, setJob] = useState22("");
14159
+ const [saving, setSaving] = useState22(false);
14160
+ const refresh = useCallback10(async () => {
14161
+ setLoading(true);
14162
+ setError(null);
14163
+ try {
14164
+ const [list, recent] = await Promise.all([listBandits(), listCrewTasks(void 0, 5).catch(() => [])]);
14165
+ setBandits(list);
14166
+ setTasks(recent);
14167
+ } catch (err) {
14168
+ setError(err instanceof Error ? err.message : "Could not load the crew.");
14169
+ } finally {
14170
+ setLoading(false);
14171
+ }
14172
+ }, []);
14173
+ useEffect19(() => {
14174
+ void refresh();
14175
+ }, [refresh]);
14176
+ const submit = async () => {
14177
+ const trimmedName = name.trim();
14178
+ const trimmedJob = job.trim();
14179
+ if (!NAME_PATTERN.test(trimmedName)) {
14180
+ setError("Names are one word: letters, digits, - or _ (for example Riley).");
14181
+ return;
14182
+ }
14183
+ if (trimmedJob.length < 10) {
14184
+ setError("Give the Bandit a job description of at least a sentence.");
14185
+ return;
14186
+ }
14187
+ setSaving(true);
14188
+ setError(null);
14189
+ try {
14190
+ await createBandit({ name: trimmedName, jobDescription: trimmedJob });
14191
+ setName("");
14192
+ setJob("");
14193
+ setShowForm(false);
14194
+ await refresh();
14195
+ } catch (err) {
14196
+ setError(err instanceof Error ? err.message : "Could not create the Bandit.");
14197
+ } finally {
14198
+ setSaving(false);
14199
+ }
14200
+ };
14201
+ const remove = async (bandit) => {
14202
+ try {
14203
+ await deleteBandit(bandit.id);
14204
+ setBandits((current) => current.filter((b) => b.id !== bandit.id));
14205
+ } catch (err) {
14206
+ setError(err instanceof Error ? err.message : "Could not remove the Bandit.");
14207
+ }
14208
+ };
14209
+ return /* @__PURE__ */ jsxs17(Box19, { component: "section", "aria-label": "Bandit Crew", sx: { mt: 4 }, children: [
14210
+ /* @__PURE__ */ jsxs17(Box19, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", mb: 0.5 }, children: [
14211
+ /* @__PURE__ */ jsx21(Typography15, { variant: "overline", color: "text.secondary", sx: { fontWeight: 700, letterSpacing: 0.6 }, children: "Bandit Crew" }),
14212
+ /* @__PURE__ */ jsxs17(Stack8, { direction: "row", spacing: 0.5, children: [
14213
+ /* @__PURE__ */ jsx21(Tooltip10, { title: "Refresh", children: /* @__PURE__ */ jsx21(IconButton12, { size: "small", onClick: () => void refresh(), "aria-label": "Refresh crew", children: /* @__PURE__ */ jsx21(Refresh, { fontSize: "small" }) }) }),
14214
+ /* @__PURE__ */ jsx21(Button13, { size: "small", startIcon: /* @__PURE__ */ jsx21(Plus, {}), onClick: () => setShowForm((v) => !v), children: "New Bandit" })
14215
+ ] })
14216
+ ] }),
14217
+ /* @__PURE__ */ jsxs17(Typography15, { variant: "body2", color: "text.secondary", sx: { mb: 1.5 }, children: [
14218
+ "Named teammates you can delegate work to in Slack: ",
14219
+ /* @__PURE__ */ jsx21("code", { children: "@Bandit ask Riley to research X and draft a summary" }),
14220
+ ". Each one shows its steps, asks before it acts outside the thread, and files the result in your Stash."
14221
+ ] }),
14222
+ loading && /* @__PURE__ */ jsx21(LinearProgress6, { sx: { mb: 1 } }),
14223
+ error && /* @__PURE__ */ jsx21(Alert10, { severity: "error", sx: { mb: 1.5 }, onClose: () => setError(null), children: error }),
14224
+ /* @__PURE__ */ jsx21(Collapse3, { in: showForm, children: /* @__PURE__ */ jsx21(Paper7, { variant: "outlined", sx: { p: 2, mb: 1.5 }, children: /* @__PURE__ */ jsxs17(Stack8, { spacing: 1.5, children: [
14225
+ /* @__PURE__ */ jsx21(
14226
+ TextField10,
14227
+ {
14228
+ label: "Name",
14229
+ size: "small",
14230
+ value: name,
14231
+ onChange: (e) => setName(e.target.value),
14232
+ placeholder: "Riley",
14233
+ inputProps: { maxLength: 31, "aria-label": "Bandit name" }
14234
+ }
14235
+ ),
14236
+ /* @__PURE__ */ jsx21(
14237
+ TextField10,
14238
+ {
14239
+ label: "Job description",
14240
+ size: "small",
14241
+ multiline: true,
14242
+ minRows: 2,
14243
+ value: job,
14244
+ onChange: (e) => setJob(e.target.value),
14245
+ placeholder: "Research analyst who writes short, cited briefs for the sales team.",
14246
+ inputProps: { "aria-label": "Job description" }
14247
+ }
14248
+ ),
14249
+ /* @__PURE__ */ jsxs17(Stack8, { direction: "row", spacing: 1, children: [
14250
+ /* @__PURE__ */ jsx21(Button13, { variant: "contained", size: "small", onClick: () => void submit(), disabled: saving, children: saving ? "Creating\u2026" : "Create" }),
14251
+ /* @__PURE__ */ jsx21(Button13, { size: "small", onClick: () => setShowForm(false), disabled: saving, children: "Cancel" })
14252
+ ] })
14253
+ ] }) }) }),
14254
+ !loading && bandits.length === 0 && !showForm && /* @__PURE__ */ jsx21(Paper7, { variant: "outlined", sx: { p: 2, mb: 1.5 }, children: /* @__PURE__ */ jsxs17(Typography15, { variant: "body2", color: "text.secondary", children: [
14255
+ "No Bandits yet. Create one here or in Slack: ",
14256
+ /* @__PURE__ */ jsx21("code", { children: "/bandit crew create Riley | Research analyst who writes short, cited briefs" })
14257
+ ] }) }),
14258
+ /* @__PURE__ */ jsx21(Stack8, { spacing: 1, children: bandits.map((bandit) => /* @__PURE__ */ jsxs17(Paper7, { variant: "outlined", sx: { p: 1.5, display: "flex", alignItems: "flex-start", gap: 1.5 }, children: [
14259
+ /* @__PURE__ */ jsxs17(Box19, { sx: { flex: 1, minWidth: 0 }, children: [
14260
+ /* @__PURE__ */ jsxs17(Stack8, { direction: "row", spacing: 1, alignItems: "center", children: [
14261
+ /* @__PURE__ */ jsx21(Typography15, { sx: { fontWeight: 700 }, children: bandit.name }),
14262
+ bandit.model && /* @__PURE__ */ jsx21(Chip11, { size: "small", label: bandit.model })
14263
+ ] }),
14264
+ /* @__PURE__ */ jsx21(Typography15, { variant: "body2", color: "text.secondary", sx: { whiteSpace: "pre-wrap" }, children: bandit.jobDescription }),
14265
+ /* @__PURE__ */ jsxs17(Typography15, { variant: "caption", color: "text.secondary", children: [
14266
+ "tools: ",
14267
+ bandit.allowedTools.join(", "),
14268
+ bandit.ownerDisplayName ? ` \xB7 owner ${bandit.ownerDisplayName}` : ""
14269
+ ] })
14270
+ ] }),
14271
+ /* @__PURE__ */ jsx21(Tooltip10, { title: `Remove ${bandit.name}`, children: /* @__PURE__ */ jsx21(IconButton12, { size: "small", onClick: () => void remove(bandit), "aria-label": `Remove ${bandit.name}`, children: /* @__PURE__ */ jsx21(Trash, { fontSize: "small" }) }) })
14272
+ ] }, bandit.id)) }),
14273
+ tasks.length > 0 && /* @__PURE__ */ jsxs17(Box19, { sx: { mt: 2 }, children: [
14274
+ /* @__PURE__ */ jsx21(Typography15, { variant: "caption", color: "text.secondary", sx: { fontWeight: 700 }, children: "Recent tasks" }),
14275
+ /* @__PURE__ */ jsx21(Stack8, { spacing: 0.5, sx: { mt: 0.5 }, children: tasks.map((task) => {
14276
+ const status = statusLabel(task.status);
14277
+ const link = task.deliverables?.find((d) => d.shareUrl || d.url);
14278
+ return /* @__PURE__ */ jsxs17(Stack8, { direction: "row", spacing: 1, alignItems: "center", sx: { minWidth: 0 }, children: [
14279
+ /* @__PURE__ */ jsx21(Chip11, { size: "small", label: status.label, color: status.color, variant: "outlined" }),
14280
+ /* @__PURE__ */ jsxs17(Typography15, { variant: "body2", noWrap: true, sx: { flex: 1, minWidth: 0 }, children: [
14281
+ /* @__PURE__ */ jsx21("strong", { children: task.banditName }),
14282
+ ": ",
14283
+ task.prompt
14284
+ ] }),
14285
+ link && /* @__PURE__ */ jsx21(Link3, { href: link.shareUrl ?? link.url ?? void 0, target: "_blank", rel: "noreferrer", variant: "body2", children: "open" })
14286
+ ] }, task.id);
14287
+ }) })
14288
+ ] })
14289
+ ] });
14290
+ };
14291
+ var CrewSection_default = CrewSection;
14292
+
14293
+ // src/management/components/MCPToolsTabV2.tsx
14294
+ import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
14075
14295
  var MCPToolsTabV2 = () => {
14076
14296
  const { settings } = usePackageSettingsStore();
14077
14297
  const {
@@ -14084,10 +14304,10 @@ var MCPToolsTabV2 = () => {
14084
14304
  lastSavedAt,
14085
14305
  saveTools
14086
14306
  } = useMCPToolsStore();
14087
- const [loading, setLoading] = useState22(true);
14088
- const [error, setError] = useState22(null);
14089
- const [tools, setTools] = useState22([]);
14090
- const [health, setHealth] = useState22(null);
14307
+ const [loading, setLoading] = useState23(true);
14308
+ const [error, setError] = useState23(null);
14309
+ const [tools, setTools] = useState23([]);
14310
+ const [health, setHealth] = useState23(null);
14091
14311
  const gatewayConfigured = !!settings?.gatewayApiUrl;
14092
14312
  const refresh = async () => {
14093
14313
  setLoading(true);
@@ -14112,7 +14332,7 @@ var MCPToolsTabV2 = () => {
14112
14332
  setLoading(false);
14113
14333
  }
14114
14334
  };
14115
- useEffect19(() => {
14335
+ useEffect20(() => {
14116
14336
  if (isLoaded) {
14117
14337
  refresh();
14118
14338
  } else {
@@ -14139,11 +14359,12 @@ var MCPToolsTabV2 = () => {
14139
14359
  }, [localTools]);
14140
14360
  const touchTarget = { width: { xs: 44, sm: 32 }, height: { xs: 44, sm: 32 } };
14141
14361
  const healthLabel = health?.status === "healthy" ? "Tool controller online" : health?.status === "unhealthy" ? "Tool controller reporting problems" : "Tool controller status unknown";
14142
- return /* @__PURE__ */ jsxs17(Box19, { children: [
14143
- /* @__PURE__ */ jsx21(McpServersSection_default, {}),
14144
- /* @__PURE__ */ jsxs17(Box19, { component: "section", "aria-label": "Built-in capabilities", sx: { mt: 4 }, children: [
14145
- /* @__PURE__ */ jsxs17(
14146
- Box19,
14362
+ return /* @__PURE__ */ jsxs18(Box20, { children: [
14363
+ /* @__PURE__ */ jsx22(McpServersSection_default, {}),
14364
+ /* @__PURE__ */ jsx22(CrewSection_default, {}),
14365
+ /* @__PURE__ */ jsxs18(Box20, { component: "section", "aria-label": "Built-in capabilities", sx: { mt: 4 }, children: [
14366
+ /* @__PURE__ */ jsxs18(
14367
+ Box20,
14147
14368
  {
14148
14369
  sx: {
14149
14370
  display: "flex",
@@ -14153,8 +14374,8 @@ var MCPToolsTabV2 = () => {
14153
14374
  gap: 1
14154
14375
  },
14155
14376
  children: [
14156
- /* @__PURE__ */ jsx21(
14157
- Typography15,
14377
+ /* @__PURE__ */ jsx22(
14378
+ Typography16,
14158
14379
  {
14159
14380
  variant: "overline",
14160
14381
  color: "text.secondary",
@@ -14162,9 +14383,9 @@ var MCPToolsTabV2 = () => {
14162
14383
  children: "Built-in capabilities"
14163
14384
  }
14164
14385
  ),
14165
- /* @__PURE__ */ jsxs17(Box19, { sx: { display: "flex", alignItems: "center", gap: 0.75 }, children: [
14166
- /* @__PURE__ */ jsx21(Tooltip10, { title: healthLabel, children: /* @__PURE__ */ jsx21(
14167
- Box19,
14386
+ /* @__PURE__ */ jsxs18(Box20, { sx: { display: "flex", alignItems: "center", gap: 0.75 }, children: [
14387
+ /* @__PURE__ */ jsx22(Tooltip11, { title: healthLabel, children: /* @__PURE__ */ jsx22(
14388
+ Box20,
14168
14389
  {
14169
14390
  role: "img",
14170
14391
  "aria-label": healthLabel,
@@ -14176,22 +14397,22 @@ var MCPToolsTabV2 = () => {
14176
14397
  }
14177
14398
  }
14178
14399
  ) }),
14179
- /* @__PURE__ */ jsx21(Tooltip10, { title: "Refresh", children: /* @__PURE__ */ jsx21(
14180
- IconButton12,
14400
+ /* @__PURE__ */ jsx22(Tooltip11, { title: "Refresh", children: /* @__PURE__ */ jsx22(
14401
+ IconButton13,
14181
14402
  {
14182
14403
  size: "small",
14183
14404
  onClick: refresh,
14184
14405
  "aria-label": "Refresh built-in capabilities",
14185
14406
  sx: touchTarget,
14186
- children: /* @__PURE__ */ jsx21(Refresh, { fontSize: "small" })
14407
+ children: /* @__PURE__ */ jsx22(Refresh, { fontSize: "small" })
14187
14408
  }
14188
14409
  ) })
14189
14410
  ] })
14190
14411
  ]
14191
14412
  }
14192
14413
  ),
14193
- /* @__PURE__ */ jsxs17(
14194
- Box19,
14414
+ /* @__PURE__ */ jsxs18(
14415
+ Box20,
14195
14416
  {
14196
14417
  sx: {
14197
14418
  display: "flex",
@@ -14202,8 +14423,8 @@ var MCPToolsTabV2 = () => {
14202
14423
  mb: 1.5
14203
14424
  },
14204
14425
  children: [
14205
- /* @__PURE__ */ jsx21(Typography15, { variant: "body2", color: "text.secondary", children: "Things Bandit can do on its own. Switch one off to stop the assistant using it. Changes apply immediately." }),
14206
- /* @__PURE__ */ jsx21(
14426
+ /* @__PURE__ */ jsx22(Typography16, { variant: "body2", color: "text.secondary", children: "Things Bandit can do on its own. Switch one off to stop the assistant using it. Changes apply immediately." }),
14427
+ /* @__PURE__ */ jsx22(
14207
14428
  SaveStatus,
14208
14429
  {
14209
14430
  auto: true,
@@ -14215,22 +14436,22 @@ var MCPToolsTabV2 = () => {
14215
14436
  ]
14216
14437
  }
14217
14438
  ),
14218
- loading && tools.length > 0 && /* @__PURE__ */ jsx21(LinearProgress6, { sx: { mb: 2 } }),
14219
- error && /* @__PURE__ */ jsxs17(
14220
- Alert10,
14439
+ loading && tools.length > 0 && /* @__PURE__ */ jsx22(LinearProgress7, { sx: { mb: 2 } }),
14440
+ error && /* @__PURE__ */ jsxs18(
14441
+ Alert11,
14221
14442
  {
14222
14443
  severity: "error",
14223
14444
  sx: { mb: 2 },
14224
- action: /* @__PURE__ */ jsx21(Button13, { color: "inherit", size: "small", onClick: refresh, children: "Retry" }),
14445
+ action: /* @__PURE__ */ jsx22(Button14, { color: "inherit", size: "small", onClick: refresh, children: "Retry" }),
14225
14446
  children: [
14226
- /* @__PURE__ */ jsx21(Typography15, { variant: "body2", sx: { fontWeight: 600 }, children: "Couldn't load built-in capabilities. The tool controller didn't respond." }),
14227
- /* @__PURE__ */ jsx21(Typography15, { variant: "caption", sx: { display: "block", opacity: 0.8 }, children: error })
14447
+ /* @__PURE__ */ jsx22(Typography16, { variant: "body2", sx: { fontWeight: 600 }, children: "Couldn't load built-in capabilities. The tool controller didn't respond." }),
14448
+ /* @__PURE__ */ jsx22(Typography16, { variant: "caption", sx: { display: "block", opacity: 0.8 }, children: error })
14228
14449
  ]
14229
14450
  }
14230
14451
  ),
14231
- !gatewayConfigured && /* @__PURE__ */ jsx21(Alert10, { severity: "info", sx: { mb: 2 }, children: "No gateway URL is configured, so tool requests go to this site's own address." }),
14232
- loading && tools.length === 0 ? /* @__PURE__ */ jsx21(
14233
- Box19,
14452
+ !gatewayConfigured && /* @__PURE__ */ jsx22(Alert11, { severity: "info", sx: { mb: 2 }, children: "No gateway URL is configured, so tool requests go to this site's own address." }),
14453
+ loading && tools.length === 0 ? /* @__PURE__ */ jsx22(
14454
+ Box20,
14234
14455
  {
14235
14456
  role: "status",
14236
14457
  "aria-busy": "true",
@@ -14240,19 +14461,19 @@ var MCPToolsTabV2 = () => {
14240
14461
  gridTemplateColumns: { xs: "1fr", sm: "repeat(2, 1fr)" },
14241
14462
  gap: 1.25
14242
14463
  },
14243
- children: Array.from({ length: 4 }, (_, i) => /* @__PURE__ */ jsx21(Skeleton5, { variant: "rounded", height: 64 }, i))
14464
+ children: Array.from({ length: 4 }, (_, i) => /* @__PURE__ */ jsx22(Skeleton5, { variant: "rounded", height: 64 }, i))
14244
14465
  }
14245
- ) : !loading && tools.length === 0 && !error ? /* @__PURE__ */ jsx21(
14466
+ ) : !loading && tools.length === 0 && !error ? /* @__PURE__ */ jsx22(
14246
14467
  ManagementEmptyState,
14247
14468
  {
14248
14469
  compact: true,
14249
- icon: /* @__PURE__ */ jsx21(Braces, {}),
14470
+ icon: /* @__PURE__ */ jsx22(Braces, {}),
14250
14471
  title: "No built-in capabilities reported",
14251
14472
  description: "The tool controller answered but listed no capabilities. They appear here once it reports them.",
14252
- action: /* @__PURE__ */ jsx21(Button13, { variant: "outlined", onClick: refresh, children: "Check again" })
14473
+ action: /* @__PURE__ */ jsx22(Button14, { variant: "outlined", onClick: refresh, children: "Check again" })
14253
14474
  }
14254
- ) : /* @__PURE__ */ jsx21(
14255
- Box19,
14475
+ ) : /* @__PURE__ */ jsx22(
14476
+ Box20,
14256
14477
  {
14257
14478
  sx: {
14258
14479
  display: "grid",
@@ -14270,8 +14491,8 @@ var MCPToolsTabV2 = () => {
14270
14491
  );
14271
14492
  locallyEnabled = directLookup?.enabled ?? tool.isEnabled;
14272
14493
  }
14273
- return /* @__PURE__ */ jsxs17(
14274
- Paper7,
14494
+ return /* @__PURE__ */ jsxs18(
14495
+ Paper8,
14275
14496
  {
14276
14497
  variant: "outlined",
14277
14498
  sx: {
@@ -14282,10 +14503,10 @@ var MCPToolsTabV2 = () => {
14282
14503
  gap: 1
14283
14504
  },
14284
14505
  children: [
14285
- /* @__PURE__ */ jsxs17(Box19, { sx: { minWidth: 0 }, children: [
14286
- /* @__PURE__ */ jsx21(Typography15, { variant: "subtitle2", sx: { fontWeight: 600 }, children: tool.name }),
14287
- /* @__PURE__ */ jsx21(
14288
- Typography15,
14506
+ /* @__PURE__ */ jsxs18(Box20, { sx: { minWidth: 0 }, children: [
14507
+ /* @__PURE__ */ jsx22(Typography16, { variant: "subtitle2", sx: { fontWeight: 600 }, children: tool.name }),
14508
+ /* @__PURE__ */ jsx22(
14509
+ Typography16,
14289
14510
  {
14290
14511
  variant: "caption",
14291
14512
  color: "text.secondary",
@@ -14294,7 +14515,7 @@ var MCPToolsTabV2 = () => {
14294
14515
  }
14295
14516
  )
14296
14517
  ] }),
14297
- /* @__PURE__ */ jsx21(
14518
+ /* @__PURE__ */ jsx22(
14298
14519
  Switch4,
14299
14520
  {
14300
14521
  size: "small",
@@ -14326,21 +14547,21 @@ var MCPToolsTabV2_default = MCPToolsTabV2;
14326
14547
  // src/management/shell/ManagementShell.tsx
14327
14548
  import React20 from "react";
14328
14549
  import {
14329
- Box as Box20,
14550
+ Box as Box21,
14330
14551
  ButtonBase as ButtonBase2,
14331
- IconButton as IconButton13,
14552
+ IconButton as IconButton14,
14332
14553
  List as List5,
14333
14554
  ListItemButton as ListItemButton2,
14334
14555
  ListItemIcon as ListItemIcon2,
14335
14556
  ListItemText as ListItemText2,
14336
14557
  ListSubheader,
14337
- Stack as Stack8,
14558
+ Stack as Stack9,
14338
14559
  SwipeableDrawer,
14339
- Tooltip as Tooltip11,
14340
- Typography as Typography16
14560
+ Tooltip as Tooltip12,
14561
+ Typography as Typography17
14341
14562
  } from "@mui/material";
14342
14563
  import { alpha as alpha3 } from "@mui/material/styles";
14343
- import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
14564
+ import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
14344
14565
  var RAIL_WIDTH = 248;
14345
14566
  var controlRadius = (theme) => `${Math.max(Number(theme.shape.borderRadius) - 2, 4)}px`;
14346
14567
  var SECTION_ICONS = {
@@ -14404,9 +14625,9 @@ function Navigation({
14404
14625
  textTransform: "uppercase",
14405
14626
  color: "text.secondary"
14406
14627
  };
14407
- return /* @__PURE__ */ jsxs18(Stack8, { sx: { height: "100%", minHeight: 0 }, children: [
14408
- /* @__PURE__ */ jsxs18(Box20, { sx: { px: 1.5, pt: 1.5, pb: 1 }, children: [
14409
- /* @__PURE__ */ jsxs18(
14628
+ return /* @__PURE__ */ jsxs19(Stack9, { sx: { height: "100%", minHeight: 0 }, children: [
14629
+ /* @__PURE__ */ jsxs19(Box21, { sx: { px: 1.5, pt: 1.5, pb: 1 }, children: [
14630
+ /* @__PURE__ */ jsxs19(
14410
14631
  ButtonBase2,
14411
14632
  {
14412
14633
  onClick: () => {
@@ -14427,13 +14648,13 @@ function Navigation({
14427
14648
  "& svg": { width: 16, height: 16 }
14428
14649
  }),
14429
14650
  children: [
14430
- /* @__PURE__ */ jsx22(ChevronLeft, {}),
14651
+ /* @__PURE__ */ jsx23(ChevronLeft, {}),
14431
14652
  "Back to chat"
14432
14653
  ]
14433
14654
  }
14434
14655
  ),
14435
- /* @__PURE__ */ jsx22(Typography16, { variant: "subtitle1", sx: { px: 1, mt: 1, fontWeight: 600 }, children: "Management" }),
14436
- onOpenCommandPalette && /* @__PURE__ */ jsxs18(
14656
+ /* @__PURE__ */ jsx23(Typography17, { variant: "subtitle1", sx: { px: 1, mt: 1, fontWeight: 600 }, children: "Management" }),
14657
+ onOpenCommandPalette && /* @__PURE__ */ jsxs19(
14437
14658
  ButtonBase2,
14438
14659
  {
14439
14660
  onClick: () => {
@@ -14457,10 +14678,10 @@ function Navigation({
14457
14678
  "& svg": { width: 15, height: 15 }
14458
14679
  }),
14459
14680
  children: [
14460
- /* @__PURE__ */ jsx22(Search, {}),
14461
- /* @__PURE__ */ jsx22(Box20, { component: "span", sx: { flex: 1, textAlign: "left" }, children: "Search\u2026" }),
14462
- /* @__PURE__ */ jsx22(
14463
- Box20,
14681
+ /* @__PURE__ */ jsx23(Search, {}),
14682
+ /* @__PURE__ */ jsx23(Box21, { component: "span", sx: { flex: 1, textAlign: "left" }, children: "Search\u2026" }),
14683
+ /* @__PURE__ */ jsx23(
14684
+ Box21,
14464
14685
  {
14465
14686
  component: "kbd",
14466
14687
  sx: (theme) => ({
@@ -14478,24 +14699,24 @@ function Navigation({
14478
14699
  }
14479
14700
  )
14480
14701
  ] }),
14481
- /* @__PURE__ */ jsxs18(
14482
- Box20,
14702
+ /* @__PURE__ */ jsxs19(
14703
+ Box21,
14483
14704
  {
14484
14705
  component: "nav",
14485
14706
  "aria-label": "Management",
14486
14707
  sx: { flex: 1, overflowY: "auto", px: 1.5, pb: 2 },
14487
14708
  children: [
14488
- /* @__PURE__ */ jsx22(
14709
+ /* @__PURE__ */ jsx23(
14489
14710
  List5,
14490
14711
  {
14491
14712
  component: "div",
14492
14713
  dense: true,
14493
14714
  disablePadding: true,
14494
- subheader: /* @__PURE__ */ jsx22(ListSubheader, { component: "div", disableSticky: true, sx: subheaderSx, children: "Workspace" }),
14715
+ subheader: /* @__PURE__ */ jsx23(ListSubheader, { component: "div", disableSticky: true, sx: subheaderSx, children: "Workspace" }),
14495
14716
  children: sections.map((section) => {
14496
14717
  const Icon = SECTION_ICONS[section.id];
14497
14718
  const selected = section.id === active;
14498
- return /* @__PURE__ */ jsxs18(
14719
+ return /* @__PURE__ */ jsxs19(
14499
14720
  ListItemButton2,
14500
14721
  {
14501
14722
  selected,
@@ -14506,8 +14727,8 @@ function Navigation({
14506
14727
  },
14507
14728
  sx: (theme) => railItemSx(theme, selected),
14508
14729
  children: [
14509
- /* @__PURE__ */ jsx22(ListItemIcon2, { children: /* @__PURE__ */ jsx22(Icon, { fontSize: "small" }) }),
14510
- /* @__PURE__ */ jsx22(
14730
+ /* @__PURE__ */ jsx23(ListItemIcon2, { children: /* @__PURE__ */ jsx23(Icon, { fontSize: "small" }) }),
14731
+ /* @__PURE__ */ jsx23(
14511
14732
  ListItemText2,
14512
14733
  {
14513
14734
  primary: section.label,
@@ -14524,15 +14745,15 @@ function Navigation({
14524
14745
  })
14525
14746
  }
14526
14747
  ),
14527
- organizationLinks && organizationLinks.length > 0 && /* @__PURE__ */ jsx22(
14748
+ organizationLinks && organizationLinks.length > 0 && /* @__PURE__ */ jsx23(
14528
14749
  List5,
14529
14750
  {
14530
14751
  component: "div",
14531
14752
  dense: true,
14532
14753
  disablePadding: true,
14533
14754
  sx: { mt: 1 },
14534
- subheader: /* @__PURE__ */ jsx22(ListSubheader, { component: "div", disableSticky: true, sx: subheaderSx, children: "Organization" }),
14535
- children: organizationLinks.map((link) => /* @__PURE__ */ jsxs18(
14755
+ subheader: /* @__PURE__ */ jsx23(ListSubheader, { component: "div", disableSticky: true, sx: subheaderSx, children: "Organization" }),
14756
+ children: organizationLinks.map((link) => /* @__PURE__ */ jsxs19(
14536
14757
  ListItemButton2,
14537
14758
  {
14538
14759
  onClick: () => {
@@ -14541,8 +14762,8 @@ function Navigation({
14541
14762
  },
14542
14763
  sx: (theme) => railItemSx(theme, false),
14543
14764
  children: [
14544
- link.icon && /* @__PURE__ */ jsx22(ListItemIcon2, { children: link.icon }),
14545
- /* @__PURE__ */ jsx22(
14765
+ link.icon && /* @__PURE__ */ jsx23(ListItemIcon2, { children: link.icon }),
14766
+ /* @__PURE__ */ jsx23(
14546
14767
  ListItemText2,
14547
14768
  {
14548
14769
  primary: link.label,
@@ -14573,8 +14794,8 @@ function ManagementShell(props) {
14573
14794
  const [sheetOpen, setSheetOpen] = React20.useState(false);
14574
14795
  const current = sections.find((s) => s.id === active);
14575
14796
  if (isMobile) {
14576
- return /* @__PURE__ */ jsxs18(
14577
- Box20,
14797
+ return /* @__PURE__ */ jsxs19(
14798
+ Box21,
14578
14799
  {
14579
14800
  sx: {
14580
14801
  display: "flex",
@@ -14583,8 +14804,8 @@ function ManagementShell(props) {
14583
14804
  bgcolor: "background.default"
14584
14805
  },
14585
14806
  children: [
14586
- /* @__PURE__ */ jsxs18(
14587
- Box20,
14807
+ /* @__PURE__ */ jsxs19(
14808
+ Box21,
14588
14809
  {
14589
14810
  component: "header",
14590
14811
  sx: (theme) => ({
@@ -14602,18 +14823,18 @@ function ManagementShell(props) {
14602
14823
  bgcolor: theme.palette.bandit?.surface.base ?? theme.palette.background.default
14603
14824
  }),
14604
14825
  children: [
14605
- /* @__PURE__ */ jsx22(Tooltip11, { title: "Back to chat", children: /* @__PURE__ */ jsx22(
14606
- IconButton13,
14826
+ /* @__PURE__ */ jsx23(Tooltip12, { title: "Back to chat", children: /* @__PURE__ */ jsx23(
14827
+ IconButton14,
14607
14828
  {
14608
14829
  "aria-label": "Back to chat",
14609
14830
  onClick: onBackToChat,
14610
14831
  sx: { width: 44, height: 44 },
14611
- children: /* @__PURE__ */ jsx22(ChevronLeft, {})
14832
+ children: /* @__PURE__ */ jsx23(ChevronLeft, {})
14612
14833
  }
14613
14834
  ) }),
14614
- /* @__PURE__ */ jsxs18(Box20, { sx: { flex: 1, minWidth: 0 }, children: [
14615
- /* @__PURE__ */ jsx22(
14616
- Typography16,
14835
+ /* @__PURE__ */ jsxs19(Box21, { sx: { flex: 1, minWidth: 0 }, children: [
14836
+ /* @__PURE__ */ jsx23(
14837
+ Typography17,
14617
14838
  {
14618
14839
  variant: "caption",
14619
14840
  color: "text.secondary",
@@ -14621,8 +14842,8 @@ function ManagementShell(props) {
14621
14842
  children: "Management"
14622
14843
  }
14623
14844
  ),
14624
- /* @__PURE__ */ jsx22(
14625
- Typography16,
14845
+ /* @__PURE__ */ jsx23(
14846
+ Typography17,
14626
14847
  {
14627
14848
  variant: "subtitle1",
14628
14849
  noWrap: true,
@@ -14631,29 +14852,29 @@ function ManagementShell(props) {
14631
14852
  }
14632
14853
  )
14633
14854
  ] }),
14634
- onOpenCommandPalette && /* @__PURE__ */ jsx22(
14635
- IconButton13,
14855
+ onOpenCommandPalette && /* @__PURE__ */ jsx23(
14856
+ IconButton14,
14636
14857
  {
14637
14858
  "aria-label": "Search Management",
14638
14859
  onClick: onOpenCommandPalette,
14639
14860
  sx: { width: 44, height: 44 },
14640
- children: /* @__PURE__ */ jsx22(Search, {})
14861
+ children: /* @__PURE__ */ jsx23(Search, {})
14641
14862
  }
14642
14863
  ),
14643
- /* @__PURE__ */ jsx22(
14644
- IconButton13,
14864
+ /* @__PURE__ */ jsx23(
14865
+ IconButton14,
14645
14866
  {
14646
14867
  "aria-label": "Open Management navigation",
14647
14868
  "aria-expanded": sheetOpen,
14648
14869
  onClick: () => setSheetOpen(true),
14649
14870
  sx: { width: 44, height: 44 },
14650
- children: /* @__PURE__ */ jsx22(PanelLeft, {})
14871
+ children: /* @__PURE__ */ jsx23(PanelLeft, {})
14651
14872
  }
14652
14873
  )
14653
14874
  ]
14654
14875
  }
14655
14876
  ),
14656
- /* @__PURE__ */ jsxs18(
14877
+ /* @__PURE__ */ jsxs19(
14657
14878
  SwipeableDrawer,
14658
14879
  {
14659
14880
  anchor: "bottom",
@@ -14672,8 +14893,8 @@ function ManagementShell(props) {
14672
14893
  })
14673
14894
  },
14674
14895
  children: [
14675
- /* @__PURE__ */ jsx22(
14676
- Box20,
14896
+ /* @__PURE__ */ jsx23(
14897
+ Box21,
14677
14898
  {
14678
14899
  "aria-hidden": true,
14679
14900
  sx: (theme) => ({
@@ -14686,12 +14907,12 @@ function ManagementShell(props) {
14686
14907
  })
14687
14908
  }
14688
14909
  ),
14689
- /* @__PURE__ */ jsx22(Navigation, { ...props, onAfterSelect: () => setSheetOpen(false) })
14910
+ /* @__PURE__ */ jsx23(Navigation, { ...props, onAfterSelect: () => setSheetOpen(false) })
14690
14911
  ]
14691
14912
  }
14692
14913
  ),
14693
- /* @__PURE__ */ jsx22(
14694
- Box20,
14914
+ /* @__PURE__ */ jsx23(
14915
+ Box21,
14695
14916
  {
14696
14917
  component: "main",
14697
14918
  sx: {
@@ -14708,8 +14929,8 @@ function ManagementShell(props) {
14708
14929
  }
14709
14930
  );
14710
14931
  }
14711
- return /* @__PURE__ */ jsxs18(
14712
- Box20,
14932
+ return /* @__PURE__ */ jsxs19(
14933
+ Box21,
14713
14934
  {
14714
14935
  sx: {
14715
14936
  display: "flex",
@@ -14719,8 +14940,8 @@ function ManagementShell(props) {
14719
14940
  bgcolor: "background.default"
14720
14941
  },
14721
14942
  children: [
14722
- /* @__PURE__ */ jsx22(
14723
- Box20,
14943
+ /* @__PURE__ */ jsx23(
14944
+ Box21,
14724
14945
  {
14725
14946
  component: "aside",
14726
14947
  sx: (theme) => ({
@@ -14730,11 +14951,11 @@ function ManagementShell(props) {
14730
14951
  borderRight: `1px solid ${theme.palette.divider}`,
14731
14952
  bgcolor: theme.palette.bandit?.surface.subtle ?? theme.palette.background.paper
14732
14953
  }),
14733
- children: /* @__PURE__ */ jsx22(Navigation, { ...props })
14954
+ children: /* @__PURE__ */ jsx23(Navigation, { ...props })
14734
14955
  }
14735
14956
  ),
14736
- /* @__PURE__ */ jsx22(
14737
- Box20,
14957
+ /* @__PURE__ */ jsx23(
14958
+ Box21,
14738
14959
  {
14739
14960
  component: "main",
14740
14961
  sx: {
@@ -14754,9 +14975,9 @@ function ManagementShell(props) {
14754
14975
  }
14755
14976
 
14756
14977
  // src/management/shell/ManagementOverview.tsx
14757
- import { Box as Box21, Button as Button14, ButtonBase as ButtonBase3, Stack as Stack9, Typography as Typography17 } from "@mui/material";
14978
+ import { Box as Box22, Button as Button15, ButtonBase as ButtonBase3, Stack as Stack10, Typography as Typography18 } from "@mui/material";
14758
14979
  import { alpha as alpha4 } from "@mui/material/styles";
14759
- import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
14980
+ import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
14760
14981
  var PROVIDER_LABELS = {
14761
14982
  ollama: "Ollama",
14762
14983
  openai: "OpenAI",
@@ -14776,7 +14997,7 @@ function Tile({
14776
14997
  onOpen
14777
14998
  }) {
14778
14999
  const Icon = SECTION_ICONS[id];
14779
- return /* @__PURE__ */ jsxs19(
15000
+ return /* @__PURE__ */ jsxs20(
14780
15001
  ButtonBase3,
14781
15002
  {
14782
15003
  onClick: onOpen,
@@ -14798,17 +15019,17 @@ function Tile({
14798
15019
  }
14799
15020
  }),
14800
15021
  children: [
14801
- /* @__PURE__ */ jsxs19(
14802
- Stack9,
15022
+ /* @__PURE__ */ jsxs20(
15023
+ Stack10,
14803
15024
  {
14804
15025
  direction: "row",
14805
15026
  alignItems: "center",
14806
15027
  spacing: 1,
14807
15028
  sx: { color: "text.secondary" },
14808
15029
  children: [
14809
- /* @__PURE__ */ jsx23(Box21, { sx: { display: "grid", "& svg": { width: 16, height: 16 } }, children: /* @__PURE__ */ jsx23(Icon, { fontSize: "small" }) }),
14810
- /* @__PURE__ */ jsx23(
14811
- Typography17,
15030
+ /* @__PURE__ */ jsx24(Box22, { sx: { display: "grid", "& svg": { width: 16, height: 16 } }, children: /* @__PURE__ */ jsx24(Icon, { fontSize: "small" }) }),
15031
+ /* @__PURE__ */ jsx24(
15032
+ Typography18,
14812
15033
  {
14813
15034
  variant: "caption",
14814
15035
  sx: { fontWeight: 600, letterSpacing: "0.04em", textTransform: "uppercase" },
@@ -14818,8 +15039,8 @@ function Tile({
14818
15039
  ]
14819
15040
  }
14820
15041
  ),
14821
- /* @__PURE__ */ jsx23(Typography17, { variant: "h6", sx: { mt: 1, fontWeight: 600 }, noWrap: true, children: value }),
14822
- detail && /* @__PURE__ */ jsx23(Typography17, { variant: "body2", color: "text.secondary", noWrap: true, children: detail })
15042
+ /* @__PURE__ */ jsx24(Typography18, { variant: "h6", sx: { mt: 1, fontWeight: 600 }, noWrap: true, children: value }),
15043
+ detail && /* @__PURE__ */ jsx24(Typography18, { variant: "body2", color: "text.secondary", noWrap: true, children: detail })
14823
15044
  ]
14824
15045
  }
14825
15046
  );
@@ -14834,7 +15055,7 @@ function ManagementOverview({
14834
15055
  const tiles = [];
14835
15056
  if (has("personalities"))
14836
15057
  tiles.push(
14837
- /* @__PURE__ */ jsx23(
15058
+ /* @__PURE__ */ jsx24(
14838
15059
  Tile,
14839
15060
  {
14840
15061
  id: "personalities",
@@ -14848,7 +15069,7 @@ function ManagementOverview({
14848
15069
  );
14849
15070
  if (has("knowledge"))
14850
15071
  tiles.push(
14851
- /* @__PURE__ */ jsx23(
15072
+ /* @__PURE__ */ jsx24(
14852
15073
  Tile,
14853
15074
  {
14854
15075
  id: "knowledge",
@@ -14862,7 +15083,7 @@ function ManagementOverview({
14862
15083
  );
14863
15084
  if (has("provider"))
14864
15085
  tiles.push(
14865
- /* @__PURE__ */ jsx23(
15086
+ /* @__PURE__ */ jsx24(
14866
15087
  Tile,
14867
15088
  {
14868
15089
  id: "provider",
@@ -14876,7 +15097,7 @@ function ManagementOverview({
14876
15097
  );
14877
15098
  if (has("branding"))
14878
15099
  tiles.push(
14879
- /* @__PURE__ */ jsx23(
15100
+ /* @__PURE__ */ jsx24(
14880
15101
  Tile,
14881
15102
  {
14882
15103
  id: "branding",
@@ -14890,7 +15111,7 @@ function ManagementOverview({
14890
15111
  );
14891
15112
  if (has("preferences"))
14892
15113
  tiles.push(
14893
- /* @__PURE__ */ jsx23(
15114
+ /* @__PURE__ */ jsx24(
14894
15115
  Tile,
14895
15116
  {
14896
15117
  id: "preferences",
@@ -14902,18 +15123,18 @@ function ManagementOverview({
14902
15123
  "preferences"
14903
15124
  )
14904
15125
  );
14905
- return /* @__PURE__ */ jsxs19(Box21, { sx: { px: { xs: 1.5, sm: 2.5, md: 3 }, py: 2 }, children: [
14906
- facts.personalities === 0 && has("personalities") && /* @__PURE__ */ jsx23(Box21, { sx: { mb: 2 }, children: /* @__PURE__ */ jsx23(
15126
+ return /* @__PURE__ */ jsxs20(Box22, { sx: { px: { xs: 1.5, sm: 2.5, md: 3 }, py: 2 }, children: [
15127
+ facts.personalities === 0 && has("personalities") && /* @__PURE__ */ jsx24(Box22, { sx: { mb: 2 }, children: /* @__PURE__ */ jsx24(
14907
15128
  ManagementEmptyState,
14908
15129
  {
14909
15130
  compact: true,
14910
15131
  title: "Give this workspace its first personality",
14911
15132
  description: "A personality is the assistant people chat with: its name, instructions and the model it runs on.",
14912
- action: /* @__PURE__ */ jsx23(Button14, { variant: "contained", onClick: () => onSelect("personalities"), children: "Create a personality" })
15133
+ action: /* @__PURE__ */ jsx24(Button15, { variant: "contained", onClick: () => onSelect("personalities"), children: "Create a personality" })
14913
15134
  }
14914
15135
  ) }),
14915
- /* @__PURE__ */ jsx23(
14916
- Box21,
15136
+ /* @__PURE__ */ jsx24(
15137
+ Box22,
14917
15138
  {
14918
15139
  sx: {
14919
15140
  display: "grid",
@@ -15044,7 +15265,7 @@ function useManagementAccess() {
15044
15265
  }
15045
15266
 
15046
15267
  // src/management/management.tsx
15047
- import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
15268
+ import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
15048
15269
  var preloadChatPage = () => import("./chat-W7MDFESE.mjs");
15049
15270
  var SchedulesTab = lazy(() => import("./SchedulesTab-YZG3P2GW.mjs"));
15050
15271
  var buildCapabilitiesUrl = (gatewayApiUrl) => {
@@ -15107,16 +15328,16 @@ var Management = ({
15107
15328
  hasTransparentLogo,
15108
15329
  setHasTransparentLogo
15109
15330
  } = useModelStore();
15110
- const [modalOpen, setModalOpen] = useState23(false);
15331
+ const [modalOpen, setModalOpen] = useState24(false);
15111
15332
  const banditHead3 = "https://cdn.burtson.ai/images/bandit-head.png";
15112
- const [fabLogo, setFabLogo] = useState23(banditHead3);
15113
- const [logoFile, setLogoFile] = useState23(null);
15114
- const [logoBase64, setLogoBase64] = useState23(null);
15115
- const [brandingText, setBrandingText] = useState23("");
15116
- const [headerMode, setHeaderMode] = useState23("logo");
15117
- const [theme, setTheme] = useState23("bandit-dark");
15118
- const [customAvatarBase64, setCustomAvatarBase64] = useState23(null);
15119
- const [presetAvatar, setPresetAvatar] = useState23(null);
15333
+ const [fabLogo, setFabLogo] = useState24(banditHead3);
15334
+ const [logoFile, setLogoFile] = useState24(null);
15335
+ const [logoBase64, setLogoBase64] = useState24(null);
15336
+ const [brandingText, setBrandingText] = useState24("");
15337
+ const [headerMode, setHeaderMode] = useState24("logo");
15338
+ const [theme, setTheme] = useState24("bandit-dark");
15339
+ const [customAvatarBase64, setCustomAvatarBase64] = useState24(null);
15340
+ const [presetAvatar, setPresetAvatar] = useState24(null);
15120
15341
  const showSnackbarMessage = (message, severity = "success") => {
15121
15342
  if (severity === "success") {
15122
15343
  notificationService2?.showSuccess(message);
@@ -15124,22 +15345,22 @@ var Management = ({
15124
15345
  notificationService2?.showError(message);
15125
15346
  }
15126
15347
  };
15127
- const [brandingLoaded, setBrandingLoaded] = useState23(false);
15128
- const [isLoadingBranding, setIsLoadingBranding] = useState23(false);
15348
+ const [brandingLoaded, setBrandingLoaded] = useState24(false);
15349
+ const [isLoadingBranding, setIsLoadingBranding] = useState24(false);
15129
15350
  const { initModels } = useModelStore();
15130
15351
  const { settings: packageSettings } = usePackageSettingsStore();
15131
15352
  const authToken = useAuthenticationStore((state) => state.token);
15132
15353
  const { preferences, updatePreference } = usePreferencesStore();
15133
15354
  const { provider: currentProvider, config: currentProviderConfig } = useAIProviderStore();
15134
- const [seedPacksEnabled, setSeedPacksEnabled] = useState23(false);
15135
- const [localSelectedModel, setLocalSelectedModel] = useState23({
15355
+ const [seedPacksEnabled, setSeedPacksEnabled] = useState24(false);
15356
+ const [localSelectedModel, setLocalSelectedModel] = useState24({
15136
15357
  name: "",
15137
15358
  tagline: "",
15138
15359
  systemPrompt: "",
15139
15360
  selectedModel: ""
15140
15361
  });
15141
15362
  const { documents, addDocuments, removeDocument, loadDocuments, clearAllDocuments } = useKnowledgeStore2();
15142
- useEffect20(() => {
15363
+ useEffect21(() => {
15143
15364
  if (selectedModel) {
15144
15365
  const selected = availableModels.find((m) => m.name === selectedModel);
15145
15366
  if (selected) {
@@ -15163,7 +15384,7 @@ var Management = ({
15163
15384
  }
15164
15385
  }
15165
15386
  }, [selectedModel, availableModels]);
15166
- const loadBrandingConfig = useCallback10(async () => {
15387
+ const loadBrandingConfig = useCallback11(async () => {
15167
15388
  if (isLoadingBranding || brandingLoaded) {
15168
15389
  debugLogger.warn("Branding loading already in progress or completed, skipping");
15169
15390
  return;
@@ -15293,15 +15514,15 @@ var Management = ({
15293
15514
  setTagline,
15294
15515
  setTheme
15295
15516
  ]);
15296
- useEffect20(() => {
15517
+ useEffect21(() => {
15297
15518
  void loadBrandingConfig();
15298
15519
  }, [loadBrandingConfig]);
15299
15520
  const handleOpenModal = () => setModalOpen(true);
15300
15521
  const handleCloseModal = () => setModalOpen(false);
15301
- useEffect20(() => {
15522
+ useEffect21(() => {
15302
15523
  getOptimalFabLogo().then(setFabLogo);
15303
15524
  }, []);
15304
- useEffect20(() => {
15525
+ useEffect21(() => {
15305
15526
  if (logoBase64) {
15306
15527
  setFabLogo(logoBase64);
15307
15528
  } else {
@@ -15846,7 +16067,7 @@ var Management = ({
15846
16067
  reader.readAsText(file);
15847
16068
  }
15848
16069
  };
15849
- useEffect20(() => {
16070
+ useEffect21(() => {
15850
16071
  if (localSelectedModel.selectedModel && !availableModels.some((m) => m.name === localSelectedModel.selectedModel)) {
15851
16072
  setLocalSelectedModel((prev) => ({
15852
16073
  ...prev,
@@ -15854,10 +16075,10 @@ var Management = ({
15854
16075
  }));
15855
16076
  }
15856
16077
  }, [availableModels, localSelectedModel.selectedModel]);
15857
- useEffect20(() => {
16078
+ useEffect21(() => {
15858
16079
  loadDocuments();
15859
16080
  }, [loadDocuments]);
15860
- useEffect20(() => {
16081
+ useEffect21(() => {
15861
16082
  const gatewayApiUrl = packageSettings?.gatewayApiUrl;
15862
16083
  if (!gatewayApiUrl || gatewayApiUrl.toLowerCase().startsWith("playground://")) {
15863
16084
  setSeedPacksEnabled(false);
@@ -15904,7 +16125,7 @@ var Management = ({
15904
16125
  () => createBrandingTheme(theme, { density: "compact" }),
15905
16126
  [theme]
15906
16127
  );
15907
- useEffect20(() => {
16128
+ useEffect21(() => {
15908
16129
  onThemeChange?.(currentTheme);
15909
16130
  }, [currentTheme, onThemeChange]);
15910
16131
  const access = useManagementAccess();
@@ -15913,10 +16134,10 @@ var Management = ({
15913
16134
  [sectionOverride, access.sections]
15914
16135
  );
15915
16136
  const defaultSection = sections.some((s) => s.id === "overview") ? "overview" : sections.some((s) => s.id === "preferences") ? "preferences" : sections[0]?.id ?? "preferences";
15916
- const [ownSection, setOwnSection] = useState23(null);
16137
+ const [ownSection, setOwnSection] = useState24(null);
15917
16138
  const requested = controlledSection ?? ownSection ?? defaultSection;
15918
16139
  const active = sections.some((s) => s.id === requested) ? requested : defaultSection;
15919
- const selectSection = useCallback10(
16140
+ const selectSection = useCallback11(
15920
16141
  (id) => {
15921
16142
  setOwnSection(id);
15922
16143
  onSectionChange?.(id);
@@ -15924,9 +16145,9 @@ var Management = ({
15924
16145
  [onSectionChange]
15925
16146
  );
15926
16147
  const activeDef = sectionById(active);
15927
- const [createPersonalityRequest, setCreatePersonalityRequest] = useState23(0);
15928
- const [pendingUpload, setPendingUpload] = useState23(0);
15929
- useEffect20(() => {
16148
+ const [createPersonalityRequest, setCreatePersonalityRequest] = useState24(0);
16149
+ const [pendingUpload, setPendingUpload] = useState24(0);
16150
+ useEffect21(() => {
15930
16151
  if (!request) return;
15931
16152
  if (request.action === "create-personality") {
15932
16153
  selectSection("personalities");
@@ -15936,11 +16157,11 @@ var Management = ({
15936
16157
  setPendingUpload(request.id);
15937
16158
  }
15938
16159
  }, [request?.id]);
15939
- useEffect20(() => {
16160
+ useEffect21(() => {
15940
16161
  if (createPersonalityRequest && active === "personalities" && brandingLoaded)
15941
16162
  setCreatePersonalityRequest(0);
15942
16163
  }, [createPersonalityRequest, active, brandingLoaded]);
15943
- useEffect20(() => {
16164
+ useEffect21(() => {
15944
16165
  if (!pendingUpload || active !== "knowledge" || !brandingLoaded) return;
15945
16166
  const frame = requestAnimationFrame(() => {
15946
16167
  document.getElementById("file-upload")?.click();
@@ -15952,9 +16173,9 @@ var Management = ({
15952
16173
  const prefSavedAt = usePreferencesStore((state) => state.lastSavedAt);
15953
16174
  const retryPreferences = usePreferencesStore((state) => state.savePreferences);
15954
16175
  const brandingValue = JSON.stringify({ logoBase64, brandingText, headerMode, theme });
15955
- const [brandingBaseline, setBrandingBaseline] = useState23(null);
15956
- const [brandingSave, setBrandingSave] = useState23("idle");
15957
- useEffect20(() => {
16176
+ const [brandingBaseline, setBrandingBaseline] = useState24(null);
16177
+ const [brandingSave, setBrandingSave] = useState24("idle");
16178
+ useEffect21(() => {
15958
16179
  if (brandingLoaded && brandingBaseline === null) setBrandingBaseline(brandingValue);
15959
16180
  }, [brandingLoaded, brandingBaseline, brandingValue]);
15960
16181
  const brandingDirty = brandingBaseline !== null && brandingBaseline !== brandingValue;
@@ -15981,7 +16202,7 @@ var Management = ({
15981
16202
  const personalityDirty = savedPersonality ? norm(localSelectedModel.name) !== norm(savedPersonality.name) || norm(localSelectedModel.tagline) !== norm(savedPersonality.tagline) || norm(localSelectedModel.systemPrompt) !== norm(savedPersonality.systemPrompt) : Boolean(
15982
16203
  norm(localSelectedModel.name) || norm(localSelectedModel.tagline) || norm(localSelectedModel.systemPrompt)
15983
16204
  );
15984
- const [personalitySaving, setPersonalitySaving] = useState23(false);
16205
+ const [personalitySaving, setPersonalitySaving] = useState24(false);
15985
16206
  const savePersonalityFromBar = async () => {
15986
16207
  setPersonalitySaving(true);
15987
16208
  try {
@@ -16002,7 +16223,7 @@ var Management = ({
16002
16223
  handleResetModel();
16003
16224
  }
16004
16225
  };
16005
- const headerStatus = active === "preferences" ? /* @__PURE__ */ jsx24(
16226
+ const headerStatus = active === "preferences" ? /* @__PURE__ */ jsx25(
16006
16227
  SaveStatus,
16007
16228
  {
16008
16229
  auto: true,
@@ -16010,17 +16231,17 @@ var Management = ({
16010
16231
  savedAt: prefSavedAt,
16011
16232
  onRetry: () => void retryPreferences()
16012
16233
  }
16013
- ) : active === "branding" ? /* @__PURE__ */ jsx24(
16234
+ ) : active === "branding" ? /* @__PURE__ */ jsx25(
16014
16235
  SaveStatus,
16015
16236
  {
16016
16237
  state: brandingDirty ? "unsaved" : brandingSave === "saving" ? "saving" : brandingSave
16017
16238
  }
16018
- ) : active === "personalities" && personalityDirty ? /* @__PURE__ */ jsx24(SaveStatus, { state: "unsaved" }) : null;
16239
+ ) : active === "personalities" && personalityDirty ? /* @__PURE__ */ jsx25(SaveStatus, { state: "unsaved" }) : null;
16019
16240
  const themeLabel = describeBrandingTheme(theme);
16020
16241
  if (!brandingLoaded) {
16021
- return /* @__PURE__ */ jsxs20(ThemeProvider2, { theme: currentTheme, children: [
16022
- /* @__PURE__ */ jsx24(CssBaseline, {}),
16023
- /* @__PURE__ */ jsx24(
16242
+ return /* @__PURE__ */ jsxs21(ThemeProvider2, { theme: currentTheme, children: [
16243
+ /* @__PURE__ */ jsx25(CssBaseline, {}),
16244
+ /* @__PURE__ */ jsx25(
16024
16245
  ManagementShell,
16025
16246
  {
16026
16247
  sections,
@@ -16031,14 +16252,14 @@ var Management = ({
16031
16252
  onBackHover: preloadChatPage,
16032
16253
  onOpenCommandPalette,
16033
16254
  isMobile,
16034
- children: /* @__PURE__ */ jsx24(SectionSkeleton, {})
16255
+ children: /* @__PURE__ */ jsx25(SectionSkeleton, {})
16035
16256
  }
16036
16257
  )
16037
16258
  ] });
16038
16259
  }
16039
- return /* @__PURE__ */ jsxs20(ThemeProvider2, { theme: currentTheme, children: [
16040
- /* @__PURE__ */ jsx24(CssBaseline, {}),
16041
- /* @__PURE__ */ jsxs20(
16260
+ return /* @__PURE__ */ jsxs21(ThemeProvider2, { theme: currentTheme, children: [
16261
+ /* @__PURE__ */ jsx25(CssBaseline, {}),
16262
+ /* @__PURE__ */ jsxs21(
16042
16263
  ManagementShell,
16043
16264
  {
16044
16265
  sections,
@@ -16051,30 +16272,30 @@ var Management = ({
16051
16272
  isMobile,
16052
16273
  children: [
16053
16274
  notice,
16054
- /* @__PURE__ */ jsx24(
16275
+ /* @__PURE__ */ jsx25(
16055
16276
  ManagementPageHeader,
16056
16277
  {
16057
16278
  title: activeDef.label,
16058
16279
  description: activeDef.description,
16059
16280
  status: headerStatus,
16060
- actions: active === "knowledge" ? /* @__PURE__ */ jsx24(
16061
- Button15,
16281
+ actions: active === "knowledge" ? /* @__PURE__ */ jsx25(
16282
+ Button16,
16062
16283
  {
16063
16284
  variant: "contained",
16064
- startIcon: /* @__PURE__ */ jsx24(FileUp, {}),
16285
+ startIcon: /* @__PURE__ */ jsx25(FileUp, {}),
16065
16286
  onClick: () => document.getElementById("file-upload")?.click(),
16066
16287
  children: "Upload"
16067
16288
  }
16068
16289
  ) : void 0
16069
16290
  }
16070
16291
  ),
16071
- /* @__PURE__ */ jsxs20(Box22, { sx: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column" }, children: [
16072
- /* @__PURE__ */ jsxs20(
16073
- Box22,
16292
+ /* @__PURE__ */ jsxs21(Box23, { sx: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column" }, children: [
16293
+ /* @__PURE__ */ jsxs21(
16294
+ Box23,
16074
16295
  {
16075
16296
  sx: active === "overview" ? void 0 : { px: { xs: 1.5, sm: 2.5, md: 3 }, pt: 1.5, pb: 3, minWidth: 0 },
16076
16297
  children: [
16077
- active === "overview" && /* @__PURE__ */ jsx24(
16298
+ active === "overview" && /* @__PURE__ */ jsx25(
16078
16299
  ManagementOverview,
16079
16300
  {
16080
16301
  sections,
@@ -16091,7 +16312,7 @@ var Management = ({
16091
16312
  }
16092
16313
  }
16093
16314
  ),
16094
- active === "personalities" && /* @__PURE__ */ jsx24(
16315
+ active === "personalities" && /* @__PURE__ */ jsx25(
16095
16316
  PersonalitiesTab_default,
16096
16317
  {
16097
16318
  availableModels,
@@ -16111,7 +16332,7 @@ var Management = ({
16111
16332
  createRequest: createPersonalityRequest
16112
16333
  }
16113
16334
  ),
16114
- active === "branding" && /* @__PURE__ */ jsx24(
16335
+ active === "branding" && /* @__PURE__ */ jsx25(
16115
16336
  BrandingTab_default,
16116
16337
  {
16117
16338
  logoFile,
@@ -16136,7 +16357,7 @@ var Management = ({
16136
16357
  setLogoBase64
16137
16358
  }
16138
16359
  ),
16139
- active === "knowledge" && /* @__PURE__ */ jsx24(
16360
+ active === "knowledge" && /* @__PURE__ */ jsx25(
16140
16361
  KnowledgeHubTab_default,
16141
16362
  {
16142
16363
  documents,
@@ -16149,8 +16370,8 @@ var Management = ({
16149
16370
  seedPacksEnabled
16150
16371
  }
16151
16372
  ),
16152
- active === "storage" && /* @__PURE__ */ jsx24(StorageTab_default, { currentTheme }),
16153
- active === "preferences" && /* @__PURE__ */ jsx24(
16373
+ active === "storage" && /* @__PURE__ */ jsx25(StorageTab_default, { currentTheme }),
16374
+ active === "preferences" && /* @__PURE__ */ jsx25(
16154
16375
  PreferencesTab_default,
16155
16376
  {
16156
16377
  preferences,
@@ -16160,14 +16381,14 @@ var Management = ({
16160
16381
  showSnackbar: showSnackbarMessage
16161
16382
  }
16162
16383
  ),
16163
- active === "provider" && /* @__PURE__ */ jsx24(ProviderTab, {}),
16164
- active === "tools" && /* @__PURE__ */ jsx24(MCPToolsTabV2_default, {}),
16165
- active === "schedules" && /* @__PURE__ */ jsx24(Suspense, { fallback: /* @__PURE__ */ jsx24(SectionSkeleton, {}), children: /* @__PURE__ */ jsx24(SchedulesTab, { showSnackbar: showSnackbarMessage, chatPath }) })
16384
+ active === "provider" && /* @__PURE__ */ jsx25(ProviderTab, {}),
16385
+ active === "tools" && /* @__PURE__ */ jsx25(MCPToolsTabV2_default, {}),
16386
+ active === "schedules" && /* @__PURE__ */ jsx25(Suspense, { fallback: /* @__PURE__ */ jsx25(SectionSkeleton, {}), children: /* @__PURE__ */ jsx25(SchedulesTab, { showSnackbar: showSnackbarMessage, chatPath }) })
16166
16387
  ]
16167
16388
  },
16168
16389
  active
16169
16390
  ),
16170
- active === "branding" && /* @__PURE__ */ jsx24(
16391
+ active === "branding" && /* @__PURE__ */ jsx25(
16171
16392
  UnsavedChangesBar,
16172
16393
  {
16173
16394
  open: brandingDirty,
@@ -16178,7 +16399,7 @@ var Management = ({
16178
16399
  message: "Branding has unsaved changes"
16179
16400
  }
16180
16401
  ),
16181
- active === "personalities" && /* @__PURE__ */ jsx24(
16402
+ active === "personalities" && /* @__PURE__ */ jsx25(
16182
16403
  UnsavedChangesBar,
16183
16404
  {
16184
16405
  open: personalityDirty,
@@ -16193,7 +16414,7 @@ var Management = ({
16193
16414
  ]
16194
16415
  }
16195
16416
  ),
16196
- !isMobile && /* @__PURE__ */ jsx24(
16417
+ !isMobile && /* @__PURE__ */ jsx25(
16197
16418
  Fab2,
16198
16419
  {
16199
16420
  "aria-label": "Ask the assistant",
@@ -16205,7 +16426,7 @@ var Management = ({
16205
16426
  right: 16,
16206
16427
  zIndex: (t) => t.zIndex.modal - 1
16207
16428
  },
16208
- children: /* @__PURE__ */ jsx24(
16429
+ children: /* @__PURE__ */ jsx25(
16209
16430
  "img",
16210
16431
  {
16211
16432
  src: fabLogo,
@@ -16215,15 +16436,15 @@ var Management = ({
16215
16436
  )
16216
16437
  }
16217
16438
  ),
16218
- !isMobile && /* @__PURE__ */ jsx24(chat_modal_default, { open: modalOpen, onClose: handleCloseModal })
16439
+ !isMobile && /* @__PURE__ */ jsx25(chat_modal_default, { open: modalOpen, onClose: handleCloseModal })
16219
16440
  ] });
16220
16441
  };
16221
16442
  var management_default = Management;
16222
16443
 
16223
16444
  // src/management/components/InterestsEditor.tsx
16224
- import { useEffect as useEffect21 } from "react";
16225
- import { Box as Box23, Chip as Chip11, Typography as Typography18 } from "@mui/material";
16226
- import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
16445
+ import { useEffect as useEffect22 } from "react";
16446
+ import { Box as Box24, Chip as Chip12, Typography as Typography19 } from "@mui/material";
16447
+ import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
16227
16448
  var InterestsEditor = ({
16228
16449
  title = "Your interests",
16229
16450
  description = "Pick the topics you care about \u2014 your home-screen conversation starters lean toward them."
@@ -16232,19 +16453,19 @@ var InterestsEditor = ({
16232
16453
  const updatePreference = usePreferencesStore((s) => s.updatePreference);
16233
16454
  const loadPreferences = usePreferencesStore((s) => s.loadPreferences);
16234
16455
  const isLoaded = usePreferencesStore((s) => s.isLoaded);
16235
- useEffect21(() => {
16456
+ useEffect22(() => {
16236
16457
  if (!isLoaded) {
16237
16458
  void loadPreferences();
16238
16459
  }
16239
16460
  }, [isLoaded, loadPreferences]);
16240
16461
  const interests = preferences?.interests ?? [];
16241
- return /* @__PURE__ */ jsxs21(Box23, { children: [
16242
- title && /* @__PURE__ */ jsx25(Typography18, { variant: "h6", sx: { fontWeight: 600, color: "text.primary" }, children: title }),
16243
- description && /* @__PURE__ */ jsx25(Typography18, { variant: "body2", color: "text.secondary", sx: { mb: 1.5 }, children: description }),
16244
- /* @__PURE__ */ jsx25(Box23, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: TOPICS.map((topic) => {
16462
+ return /* @__PURE__ */ jsxs22(Box24, { children: [
16463
+ title && /* @__PURE__ */ jsx26(Typography19, { variant: "h6", sx: { fontWeight: 600, color: "text.primary" }, children: title }),
16464
+ description && /* @__PURE__ */ jsx26(Typography19, { variant: "body2", color: "text.secondary", sx: { mb: 1.5 }, children: description }),
16465
+ /* @__PURE__ */ jsx26(Box24, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: TOPICS.map((topic) => {
16245
16466
  const selected = interests.includes(topic);
16246
- return /* @__PURE__ */ jsx25(
16247
- Chip11,
16467
+ return /* @__PURE__ */ jsx26(
16468
+ Chip12,
16248
16469
  {
16249
16470
  label: topic,
16250
16471
  size: "small",
@@ -16507,7 +16728,7 @@ var previewTierUpgrade = (tier) => featureFlagService.previewUpgrade(tier);
16507
16728
  var getFeatureMatrix = () => featureFlagService.generateFeatureMatrix();
16508
16729
 
16509
16730
  // src/hooks/useVoices.ts
16510
- import { useEffect as useEffect22 } from "react";
16731
+ import { useEffect as useEffect23 } from "react";
16511
16732
  var useVoices = () => {
16512
16733
  const {
16513
16734
  availableVoices,
@@ -16522,7 +16743,7 @@ var useVoices = () => {
16522
16743
  } = useVoiceStore();
16523
16744
  const gatewayApiUrl = usePackageSettingsStore((state) => state.settings?.gatewayApiUrl);
16524
16745
  const { token } = useAuthenticationStore();
16525
- useEffect22(() => {
16746
+ useEffect23(() => {
16526
16747
  const isAuthenticated = authenticationService.isAuthenticated();
16527
16748
  if (gatewayApiUrl && token && isAuthenticated && !isServiceAvailable) {
16528
16749
  debugLogger.debug(
@@ -16562,13 +16783,13 @@ import {
16562
16783
  DialogTitle as DialogTitle8,
16563
16784
  DialogContent as DialogContent9,
16564
16785
  DialogActions as DialogActions8,
16565
- Typography as Typography19,
16566
- Button as Button16,
16567
- Box as Box24,
16568
- Alert as Alert11,
16569
- Stack as Stack10
16786
+ Typography as Typography20,
16787
+ Button as Button17,
16788
+ Box as Box25,
16789
+ Alert as Alert12,
16790
+ Stack as Stack11
16570
16791
  } from "@mui/material";
16571
- import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
16792
+ import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
16572
16793
  var SubscriptionExpiredModal = ({
16573
16794
  open,
16574
16795
  onNavigateHome,
@@ -16590,7 +16811,7 @@ var SubscriptionExpiredModal = ({
16590
16811
  if (!IS_STORE_BUILD) window.location.href = "/manage-subscription";
16591
16812
  }
16592
16813
  };
16593
- return /* @__PURE__ */ jsxs22(
16814
+ return /* @__PURE__ */ jsxs23(
16594
16815
  Dialog9,
16595
16816
  {
16596
16817
  open,
@@ -16605,8 +16826,8 @@ var SubscriptionExpiredModal = ({
16605
16826
  }
16606
16827
  },
16607
16828
  children: [
16608
- /* @__PURE__ */ jsx26(DialogTitle8, { sx: { textAlign: "center", pb: 1 }, children: /* @__PURE__ */ jsxs22(
16609
- Box24,
16829
+ /* @__PURE__ */ jsx27(DialogTitle8, { sx: { textAlign: "center", pb: 1 }, children: /* @__PURE__ */ jsxs23(
16830
+ Box25,
16610
16831
  {
16611
16832
  sx: {
16612
16833
  display: "flex",
@@ -16616,35 +16837,35 @@ var SubscriptionExpiredModal = ({
16616
16837
  mb: 1
16617
16838
  },
16618
16839
  children: [
16619
- /* @__PURE__ */ jsx26(AlertTriangle, { size: 32, color: "warning" }),
16620
- /* @__PURE__ */ jsx26(Typography19, { variant: "h5", component: "span", fontWeight: "bold", children: "Subscription Expired" })
16840
+ /* @__PURE__ */ jsx27(AlertTriangle, { size: 32, color: "warning" }),
16841
+ /* @__PURE__ */ jsx27(Typography20, { variant: "h5", component: "span", fontWeight: "bold", children: "Subscription Expired" })
16621
16842
  ]
16622
16843
  }
16623
16844
  ) }),
16624
- /* @__PURE__ */ jsx26(DialogContent9, { sx: { pt: 1 }, children: /* @__PURE__ */ jsxs22(Stack10, { spacing: 2, children: [
16625
- /* @__PURE__ */ jsx26(Alert11, { severity: "warning", sx: { mb: 2 }, children: /* @__PURE__ */ jsx26(Typography19, { variant: "body2", children: "Your subscription has expired and access to features has been restricted." }) }),
16626
- userEmail && /* @__PURE__ */ jsxs22(
16627
- Typography19,
16845
+ /* @__PURE__ */ jsx27(DialogContent9, { sx: { pt: 1 }, children: /* @__PURE__ */ jsxs23(Stack11, { spacing: 2, children: [
16846
+ /* @__PURE__ */ jsx27(Alert12, { severity: "warning", sx: { mb: 2 }, children: /* @__PURE__ */ jsx27(Typography20, { variant: "body2", children: "Your subscription has expired and access to features has been restricted." }) }),
16847
+ userEmail && /* @__PURE__ */ jsxs23(
16848
+ Typography20,
16628
16849
  {
16629
16850
  variant: "body2",
16630
16851
  color: "text.secondary",
16631
16852
  sx: { textAlign: "center" },
16632
16853
  children: [
16633
16854
  "Account: ",
16634
- /* @__PURE__ */ jsx26("strong", { children: userEmail })
16855
+ /* @__PURE__ */ jsx27("strong", { children: userEmail })
16635
16856
  ]
16636
16857
  }
16637
16858
  ),
16638
- /* @__PURE__ */ jsx26(
16639
- Typography19,
16859
+ /* @__PURE__ */ jsx27(
16860
+ Typography20,
16640
16861
  {
16641
16862
  variant: "body1",
16642
16863
  sx: { textAlign: "center", color: "text.secondary" },
16643
16864
  children: IS_STORE_BUILD ? "Premium features are unavailable on this account right now. You can subscribe to Pro in the app or review your account." : "To continue using all features, please renew your subscription or return to the main application."
16644
16865
  }
16645
16866
  ),
16646
- /* @__PURE__ */ jsx26(
16647
- Box24,
16867
+ /* @__PURE__ */ jsx27(
16868
+ Box25,
16648
16869
  {
16649
16870
  sx: {
16650
16871
  bgcolor: "background.paper",
@@ -16654,14 +16875,14 @@ var SubscriptionExpiredModal = ({
16654
16875
  p: 2,
16655
16876
  mt: 2
16656
16877
  },
16657
- children: /* @__PURE__ */ jsxs22(
16658
- Typography19,
16878
+ children: /* @__PURE__ */ jsxs23(
16879
+ Typography20,
16659
16880
  {
16660
16881
  variant: "caption",
16661
16882
  color: "text.secondary",
16662
16883
  sx: { fontStyle: "italic" },
16663
16884
  children: [
16664
- /* @__PURE__ */ jsx26("strong", { children: "What's affected:" }),
16885
+ /* @__PURE__ */ jsx27("strong", { children: "What's affected:" }),
16665
16886
  " All premium features including document upload, voice controls, advanced search, and admin dashboard access have been disabled until your subscription is renewed."
16666
16887
  ]
16667
16888
  }
@@ -16669,24 +16890,24 @@ var SubscriptionExpiredModal = ({
16669
16890
  }
16670
16891
  )
16671
16892
  ] }) }),
16672
- /* @__PURE__ */ jsxs22(DialogActions8, { sx: { px: 3, pb: 3, gap: 1, justifyContent: "center" }, children: [
16673
- /* @__PURE__ */ jsx26(
16674
- Button16,
16893
+ /* @__PURE__ */ jsxs23(DialogActions8, { sx: { px: 3, pb: 3, gap: 1, justifyContent: "center" }, children: [
16894
+ /* @__PURE__ */ jsx27(
16895
+ Button17,
16675
16896
  {
16676
16897
  onClick: handleNavigateHome,
16677
16898
  variant: "outlined",
16678
- startIcon: /* @__PURE__ */ jsx26(Home, {}),
16899
+ startIcon: /* @__PURE__ */ jsx27(Home, {}),
16679
16900
  size: "large",
16680
16901
  sx: { minWidth: 140 },
16681
16902
  children: IS_STORE_BUILD ? "My Account" : "Go Home"
16682
16903
  }
16683
16904
  ),
16684
- (!IS_STORE_BUILD || onManageSubscription) && /* @__PURE__ */ jsx26(
16685
- Button16,
16905
+ (!IS_STORE_BUILD || onManageSubscription) && /* @__PURE__ */ jsx27(
16906
+ Button17,
16686
16907
  {
16687
16908
  onClick: handleManageSubscription,
16688
16909
  variant: "contained",
16689
- startIcon: /* @__PURE__ */ jsx26(CreditCard, {}),
16910
+ startIcon: /* @__PURE__ */ jsx27(CreditCard, {}),
16690
16911
  size: "large",
16691
16912
  color: "primary",
16692
16913
  sx: { minWidth: 140 },
@@ -16700,8 +16921,8 @@ var SubscriptionExpiredModal = ({
16700
16921
  };
16701
16922
 
16702
16923
  // src/guards/SubscriptionExpiredGuard.tsx
16703
- import { useEffect as useEffect23, useState as useState24 } from "react";
16704
- import { Fragment as Fragment8, jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
16924
+ import { useEffect as useEffect24, useState as useState25 } from "react";
16925
+ import { Fragment as Fragment8, jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
16705
16926
  var SubscriptionExpiredGuard = ({
16706
16927
  children,
16707
16928
  onNavigateHome,
@@ -16710,9 +16931,9 @@ var SubscriptionExpiredGuard = ({
16710
16931
  allowContinue = false
16711
16932
  }) => {
16712
16933
  const { isExpiredTier, getFullEvaluation } = useFeatures();
16713
- const [showModal, setShowModal] = useState24(false);
16714
- const [userDismissed, setUserDismissed] = useState24(false);
16715
- useEffect23(() => {
16934
+ const [showModal, setShowModal] = useState25(false);
16935
+ const [userDismissed, setUserDismissed] = useState25(false);
16936
+ useEffect24(() => {
16716
16937
  if (isExpiredTier() && !userDismissed) {
16717
16938
  setShowModal(true);
16718
16939
  } else {
@@ -16736,9 +16957,9 @@ var SubscriptionExpiredGuard = ({
16736
16957
  }
16737
16958
  return void 0;
16738
16959
  })() : void 0;
16739
- return /* @__PURE__ */ jsxs23(Fragment8, { children: [
16960
+ return /* @__PURE__ */ jsxs24(Fragment8, { children: [
16740
16961
  children,
16741
- /* @__PURE__ */ jsx27(
16962
+ /* @__PURE__ */ jsx28(
16742
16963
  SubscriptionExpiredModal,
16743
16964
  {
16744
16965
  open: showModal,