@burtson-labs/bandit-engine 2.1.3 → 2.1.5

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 (49) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/ProjectsPane-BSVOVNK7.mjs +866 -0
  3. package/dist/ProjectsPane-BSVOVNK7.mjs.map +1 -0
  4. package/dist/{SchedulesTab-YZG3P2GW.mjs → SchedulesTab-TCUOAKLH.mjs} +5 -4
  5. package/dist/SchedulesTab-TCUOAKLH.mjs.map +1 -0
  6. package/dist/chat-Y7KPN54G.mjs +18 -0
  7. package/dist/chunk-4257FVLK.mjs +158 -0
  8. package/dist/chunk-4257FVLK.mjs.map +1 -0
  9. package/dist/chunk-HS62C62A.mjs +22 -0
  10. package/dist/chunk-HS62C62A.mjs.map +1 -0
  11. package/dist/chunk-IXD2TDA5.mjs +3567 -0
  12. package/dist/chunk-IXD2TDA5.mjs.map +1 -0
  13. package/dist/{chunk-4LLCLYLH.mjs → chunk-K7SQWDNF.mjs} +1 -1
  14. package/dist/{chunk-4LLCLYLH.mjs.map → chunk-K7SQWDNF.mjs.map} +1 -1
  15. package/dist/{chunk-6CSFKF34.mjs → chunk-KWOUXBSF.mjs} +3 -3
  16. package/dist/chunk-MAKXJD7A.mjs +233 -0
  17. package/dist/chunk-MAKXJD7A.mjs.map +1 -0
  18. package/dist/{chunk-PSI7RQ54.mjs → chunk-SK7FSLCY.mjs} +2 -2
  19. package/dist/{chunk-W2D454CZ.mjs → chunk-XGIQNHUO.mjs} +3087 -4831
  20. package/dist/chunk-XGIQNHUO.mjs.map +1 -0
  21. package/dist/{chunk-62H3OLTV.mjs → chunk-ZG66NJC3.mjs} +19 -22
  22. package/dist/chunk-ZG66NJC3.mjs.map +1 -0
  23. package/dist/index.d.mts +2 -2
  24. package/dist/index.d.ts +2 -2
  25. package/dist/index.js +6000 -3087
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.mjs +501 -276
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/modelStore-YNANSWCN.mjs +9 -0
  30. package/dist/{public-ByjnoHLe.d.mts → public-Tq2Pmw9m.d.mts} +44 -2
  31. package/dist/{public-ByjnoHLe.d.ts → public-Tq2Pmw9m.d.ts} +44 -2
  32. package/dist/public-types.d.mts +1 -1
  33. package/dist/public-types.d.ts +1 -1
  34. package/dist/{schedule-confirm-card-N4TKLEHL.mjs → schedule-confirm-card-7CMATYSP.mjs} +8 -5
  35. package/dist/schedule-confirm-card-7CMATYSP.mjs.map +1 -0
  36. package/docs/package-settings.md +25 -0
  37. package/package.json +1 -1
  38. package/dist/SchedulesTab-YZG3P2GW.mjs.map +0 -1
  39. package/dist/chat-W7MDFESE.mjs +0 -15
  40. package/dist/chunk-62H3OLTV.mjs.map +0 -1
  41. package/dist/chunk-LMAQWR7Z.mjs +0 -388
  42. package/dist/chunk-LMAQWR7Z.mjs.map +0 -1
  43. package/dist/chunk-W2D454CZ.mjs.map +0 -1
  44. package/dist/modelStore-FIVOSLFY.mjs +0 -9
  45. package/dist/schedule-confirm-card-N4TKLEHL.mjs.map +0 -1
  46. /package/dist/{chat-W7MDFESE.mjs.map → chat-Y7KPN54G.mjs.map} +0 -0
  47. /package/dist/{chunk-6CSFKF34.mjs.map → chunk-KWOUXBSF.mjs.map} +0 -0
  48. /package/dist/{chunk-PSI7RQ54.mjs.map → chunk-SK7FSLCY.mjs.map} +0 -0
  49. /package/dist/{modelStore-FIVOSLFY.mjs.map → modelStore-YNANSWCN.mjs.map} +0 -0
package/dist/index.mjs CHANGED
@@ -1,9 +1,6 @@
1
1
  import {
2
2
  CHUNK_SECONDS,
3
- DEFAULT_TIER_FEATURES,
4
3
  DocumentCard_default,
5
- FeatureFlagContext,
6
- FeatureFlagProvider,
7
4
  FeedbackModal,
8
5
  IS_STORE_BUILD,
9
6
  MAX_RECORDING_BYTES,
@@ -11,7 +8,6 @@ import {
11
8
  MeetingNotesError,
12
9
  NotificationProvider,
13
10
  NotificationService,
14
- OSS_DEFAULT_FEATURES,
15
11
  SpeechToTextError,
16
12
  StashError,
17
13
  StreamingTTSClient,
@@ -24,7 +20,6 @@ import {
24
20
  addMcpServer,
25
21
  ai_response_text_field_default,
26
22
  banditDarkTheme,
27
- brandingService_default,
28
23
  brandingThemeKey,
29
24
  chat_default,
30
25
  chunkTranscript,
@@ -41,9 +36,7 @@ import {
41
36
  getStreamingTTSClient,
42
37
  getTTSState,
43
38
  isMeetingFile,
44
- isNativeShell,
45
39
  isRecordingFile,
46
- isStandalonePwa,
47
40
  isTenantAccent,
48
41
  isTranscriptFileName,
49
42
  knowledge_file_modal_default,
@@ -51,7 +44,6 @@ import {
51
44
  looksLikeTranscript,
52
45
  meetingNotesErrorMessage,
53
46
  memory_modal_default,
54
- newId,
55
47
  notesToHtml,
56
48
  notesToMarkdown,
57
49
  notificationService,
@@ -75,12 +67,7 @@ import {
75
67
  transcribeRecording,
76
68
  transcriptToText,
77
69
  updateMcpServer,
78
- useAIQueryStore,
79
- useConversationStore,
80
70
  useConversationSyncStore,
81
- useFeatureFlag,
82
- useFeatureVisibility,
83
- useFeatures,
84
71
  useGlobalTTS,
85
72
  useKnowledgeStore,
86
73
  useKnowledgeStore2,
@@ -88,25 +75,41 @@ import {
88
75
  useMemoryStore,
89
76
  useNotification,
90
77
  useNotificationService,
91
- useProjectStore,
92
78
  useTTS,
93
79
  useVectorStore,
94
80
  useVoiceStore,
95
81
  vectorDatabaseService,
96
82
  vectorMigrationService,
97
83
  voiceService
98
- } from "./chunk-W2D454CZ.mjs";
99
- import {
100
- indexedDBService_default,
101
- models,
102
- useModelStore,
103
- usePreferencesStore
104
- } from "./chunk-6CSFKF34.mjs";
84
+ } from "./chunk-XGIQNHUO.mjs";
105
85
  import {
106
86
  AIProviderFactory,
107
87
  GatewayService,
108
88
  useAIProviderStore
109
89
  } from "./chunk-GX4FVZNA.mjs";
90
+ import {
91
+ DEFAULT_TIER_FEATURES,
92
+ FeatureFlagContext,
93
+ FeatureFlagProvider,
94
+ OSS_DEFAULT_FEATURES,
95
+ brandingService_default,
96
+ isNativeShell,
97
+ isStandalonePwa,
98
+ newId,
99
+ useAIQueryStore,
100
+ useConversationStore,
101
+ useFeatureFlag,
102
+ useFeatureVisibility,
103
+ useFeatures,
104
+ useProjectStore
105
+ } from "./chunk-IXD2TDA5.mjs";
106
+ import {
107
+ indexedDBService_default,
108
+ models,
109
+ useModelStore,
110
+ usePreferencesStore
111
+ } from "./chunk-KWOUXBSF.mjs";
112
+ import "./chunk-HS62C62A.mjs";
110
113
  import {
111
114
  Agent,
112
115
  AlertTriangle,
@@ -117,7 +120,7 @@ import {
117
120
  Sparkles,
118
121
  Upload,
119
122
  Zap
120
- } from "./chunk-62H3OLTV.mjs";
123
+ } from "./chunk-ZG66NJC3.mjs";
121
124
  import {
122
125
  ManagementEmptyState,
123
126
  ManagementPageHeader,
@@ -192,11 +195,12 @@ import {
192
195
  X,
193
196
  ZoomIn,
194
197
  ZoomOut
195
- } from "./chunk-PSI7RQ54.mjs";
196
- import "./chunk-LMAQWR7Z.mjs";
198
+ } from "./chunk-SK7FSLCY.mjs";
199
+ import "./chunk-MAKXJD7A.mjs";
200
+ import "./chunk-4257FVLK.mjs";
197
201
  import {
198
202
  usePackageSettingsStore
199
- } from "./chunk-4LLCLYLH.mjs";
203
+ } from "./chunk-K7SQWDNF.mjs";
200
204
  import {
201
205
  AUTH_TOKEN_CHANGED_EVENT,
202
206
  TOKEN_KEY,
@@ -612,9 +616,9 @@ var ChatProvider = (props) => {
612
616
  var chat_provider_default = ChatProvider;
613
617
 
614
618
  // src/management/management.tsx
615
- import { lazy, Suspense, useState as useState23, useEffect as useEffect20, useCallback as useCallback10, useMemo as useMemo8 } from "react";
619
+ import { lazy, Suspense, useState as useState24, useEffect as useEffect21, useCallback as useCallback11, useMemo as useMemo8 } from "react";
616
620
  import useMediaQuery7 from "@mui/material/useMediaQuery";
617
- import { Box as Box22, Button as Button15, ThemeProvider as ThemeProvider2, CssBaseline, Fab as Fab2 } from "@mui/material";
621
+ import { Box as Box23, Button as Button16, ThemeProvider as ThemeProvider2, CssBaseline, Fab as Fab2 } from "@mui/material";
618
622
  import { useNavigate as useNavigate2 } from "react-router-dom";
619
623
 
620
624
  // src/modals/chat-modal/chat-modal.tsx
@@ -13372,16 +13376,16 @@ var ProviderTab = () => {
13372
13376
  };
13373
13377
 
13374
13378
  // src/management/components/MCPToolsTabV2.tsx
13375
- import { useEffect as useEffect19, useMemo as useMemo6, useState as useState22 } from "react";
13379
+ import { useEffect as useEffect20, useMemo as useMemo6, useState as useState23 } from "react";
13376
13380
  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,
13381
+ Alert as Alert11,
13382
+ Box as Box20,
13383
+ Button as Button14,
13384
+ Typography as Typography16,
13385
+ Paper as Paper8,
13386
+ IconButton as IconButton13,
13387
+ Tooltip as Tooltip11,
13388
+ LinearProgress as LinearProgress7,
13385
13389
  Skeleton as Skeleton5,
13386
13390
  Switch as Switch4
13387
13391
  } from "@mui/material";
@@ -14070,8 +14074,228 @@ var McpServersSection = () => {
14070
14074
  };
14071
14075
  var McpServersSection_default = McpServersSection;
14072
14076
 
14073
- // src/management/components/MCPToolsTabV2.tsx
14077
+ // src/management/components/CrewSection.tsx
14078
+ import { useCallback as useCallback10, useEffect as useEffect19, useState as useState22 } from "react";
14079
+ import {
14080
+ Alert as Alert10,
14081
+ Box as Box19,
14082
+ Button as Button13,
14083
+ Chip as Chip11,
14084
+ Collapse as Collapse3,
14085
+ IconButton as IconButton12,
14086
+ LinearProgress as LinearProgress6,
14087
+ Link as Link3,
14088
+ Paper as Paper7,
14089
+ Stack as Stack8,
14090
+ TextField as TextField10,
14091
+ Tooltip as Tooltip10,
14092
+ Typography as Typography15
14093
+ } from "@mui/material";
14094
+
14095
+ // src/services/crew/crewService.ts
14096
+ var gatewayBase = () => {
14097
+ const settings = usePackageSettingsStore.getState().settings;
14098
+ const url = settings?.gatewayApiUrl?.replace(/\/$/, "");
14099
+ if (!url) throw new Error("Gateway API is not configured.");
14100
+ return url;
14101
+ };
14102
+ var authHeaders2 = () => {
14103
+ const headers = { "Content-Type": "application/json" };
14104
+ const token = authenticationService.getToken();
14105
+ if (token) headers["Authorization"] = `Bearer ${token}`;
14106
+ return headers;
14107
+ };
14108
+ var parse = async (res) => {
14109
+ const text = await res.text();
14110
+ const body = text ? JSON.parse(text) : null;
14111
+ if (!res.ok) {
14112
+ const message = body && typeof body === "object" && (body.error || body.message) || `Request failed (${res.status})`;
14113
+ throw new Error(String(message));
14114
+ }
14115
+ return body;
14116
+ };
14117
+ var scoped = (path, scope) => `${gatewayBase()}/crew/${path}${scope ? `${path.includes("?") ? "&" : "?"}scope=${encodeURIComponent(scope)}` : ""}`;
14118
+ var listBandits = async (scope) => parse(await fetch(scoped("bandits", scope), { headers: authHeaders2() }));
14119
+ var createBandit = async (input, scope) => parse(
14120
+ await fetch(scoped("bandits", scope), {
14121
+ method: "POST",
14122
+ headers: authHeaders2(),
14123
+ body: JSON.stringify(input)
14124
+ })
14125
+ );
14126
+ var deleteBandit = async (id, scope) => {
14127
+ const res = await fetch(scoped(`bandits/${encodeURIComponent(id)}`, scope), {
14128
+ method: "DELETE",
14129
+ headers: authHeaders2()
14130
+ });
14131
+ if (!res.ok && res.status !== 204) {
14132
+ throw new Error(`Could not remove the Bandit (${res.status}).`);
14133
+ }
14134
+ };
14135
+ var listCrewTasks = async (scope, limit = 8) => parse(await fetch(scoped(`tasks?limit=${limit}`, scope), { headers: authHeaders2() }));
14136
+
14137
+ // src/management/components/CrewSection.tsx
14074
14138
  import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
14139
+ var NAME_PATTERN = /^[A-Za-z][\w-]{0,30}$/;
14140
+ var statusLabel = (status) => {
14141
+ switch (status) {
14142
+ case "completed":
14143
+ return { label: "done", color: "success" };
14144
+ case "awaiting_approval":
14145
+ return { label: "needs approval", color: "warning" };
14146
+ case "failed":
14147
+ case "expired":
14148
+ return { label: status, color: "error" };
14149
+ case "cancelled":
14150
+ return { label: "stopped", color: "default" };
14151
+ default:
14152
+ return { label: status, color: "info" };
14153
+ }
14154
+ };
14155
+ var CrewSection = () => {
14156
+ const [bandits, setBandits] = useState22([]);
14157
+ const [tasks, setTasks] = useState22([]);
14158
+ const [loading, setLoading] = useState22(true);
14159
+ const [error, setError] = useState22(null);
14160
+ const [showForm, setShowForm] = useState22(false);
14161
+ const [name, setName] = useState22("");
14162
+ const [job, setJob] = useState22("");
14163
+ const [saving, setSaving] = useState22(false);
14164
+ const refresh = useCallback10(async () => {
14165
+ setLoading(true);
14166
+ setError(null);
14167
+ try {
14168
+ const [list, recent] = await Promise.all([listBandits(), listCrewTasks(void 0, 5).catch(() => [])]);
14169
+ setBandits(list);
14170
+ setTasks(recent);
14171
+ } catch (err) {
14172
+ setError(err instanceof Error ? err.message : "Could not load the crew.");
14173
+ } finally {
14174
+ setLoading(false);
14175
+ }
14176
+ }, []);
14177
+ useEffect19(() => {
14178
+ void refresh();
14179
+ }, [refresh]);
14180
+ const submit = async () => {
14181
+ const trimmedName = name.trim();
14182
+ const trimmedJob = job.trim();
14183
+ if (!NAME_PATTERN.test(trimmedName)) {
14184
+ setError("Names are one word: letters, digits, - or _ (for example Riley).");
14185
+ return;
14186
+ }
14187
+ if (trimmedJob.length < 10) {
14188
+ setError("Give the Bandit a job description of at least a sentence.");
14189
+ return;
14190
+ }
14191
+ setSaving(true);
14192
+ setError(null);
14193
+ try {
14194
+ await createBandit({ name: trimmedName, jobDescription: trimmedJob });
14195
+ setName("");
14196
+ setJob("");
14197
+ setShowForm(false);
14198
+ await refresh();
14199
+ } catch (err) {
14200
+ setError(err instanceof Error ? err.message : "Could not create the Bandit.");
14201
+ } finally {
14202
+ setSaving(false);
14203
+ }
14204
+ };
14205
+ const remove = async (bandit) => {
14206
+ try {
14207
+ await deleteBandit(bandit.id);
14208
+ setBandits((current) => current.filter((b) => b.id !== bandit.id));
14209
+ } catch (err) {
14210
+ setError(err instanceof Error ? err.message : "Could not remove the Bandit.");
14211
+ }
14212
+ };
14213
+ return /* @__PURE__ */ jsxs17(Box19, { component: "section", "aria-label": "Bandit Crew", sx: { mt: 4 }, children: [
14214
+ /* @__PURE__ */ jsxs17(Box19, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", mb: 0.5 }, children: [
14215
+ /* @__PURE__ */ jsx21(Typography15, { variant: "overline", color: "text.secondary", sx: { fontWeight: 700, letterSpacing: 0.6 }, children: "Bandit Crew" }),
14216
+ /* @__PURE__ */ jsxs17(Stack8, { direction: "row", spacing: 0.5, children: [
14217
+ /* @__PURE__ */ jsx21(Tooltip10, { title: "Refresh", children: /* @__PURE__ */ jsx21(IconButton12, { size: "small", onClick: () => void refresh(), "aria-label": "Refresh crew", children: /* @__PURE__ */ jsx21(Refresh, { fontSize: "small" }) }) }),
14218
+ /* @__PURE__ */ jsx21(Button13, { size: "small", startIcon: /* @__PURE__ */ jsx21(Plus, {}), onClick: () => setShowForm((v) => !v), children: "New Bandit" })
14219
+ ] })
14220
+ ] }),
14221
+ /* @__PURE__ */ jsxs17(Typography15, { variant: "body2", color: "text.secondary", sx: { mb: 1.5 }, children: [
14222
+ "Named teammates you can delegate work to in Slack: ",
14223
+ /* @__PURE__ */ jsx21("code", { children: "@Bandit ask Riley to research X and draft a summary" }),
14224
+ ". Each one shows its steps, asks before it acts outside the thread, and files the result in your Stash."
14225
+ ] }),
14226
+ loading && /* @__PURE__ */ jsx21(LinearProgress6, { sx: { mb: 1 } }),
14227
+ error && /* @__PURE__ */ jsx21(Alert10, { severity: "error", sx: { mb: 1.5 }, onClose: () => setError(null), children: error }),
14228
+ /* @__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: [
14229
+ /* @__PURE__ */ jsx21(
14230
+ TextField10,
14231
+ {
14232
+ label: "Name",
14233
+ size: "small",
14234
+ value: name,
14235
+ onChange: (e) => setName(e.target.value),
14236
+ placeholder: "Riley",
14237
+ inputProps: { maxLength: 31, "aria-label": "Bandit name" }
14238
+ }
14239
+ ),
14240
+ /* @__PURE__ */ jsx21(
14241
+ TextField10,
14242
+ {
14243
+ label: "Job description",
14244
+ size: "small",
14245
+ multiline: true,
14246
+ minRows: 2,
14247
+ value: job,
14248
+ onChange: (e) => setJob(e.target.value),
14249
+ placeholder: "Research analyst who writes short, cited briefs for the sales team.",
14250
+ inputProps: { "aria-label": "Job description" }
14251
+ }
14252
+ ),
14253
+ /* @__PURE__ */ jsxs17(Stack8, { direction: "row", spacing: 1, children: [
14254
+ /* @__PURE__ */ jsx21(Button13, { variant: "contained", size: "small", onClick: () => void submit(), disabled: saving, children: saving ? "Creating\u2026" : "Create" }),
14255
+ /* @__PURE__ */ jsx21(Button13, { size: "small", onClick: () => setShowForm(false), disabled: saving, children: "Cancel" })
14256
+ ] })
14257
+ ] }) }) }),
14258
+ !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: [
14259
+ "No Bandits yet. Create one here or in Slack: ",
14260
+ /* @__PURE__ */ jsx21("code", { children: "/bandit crew create Riley | Research analyst who writes short, cited briefs" })
14261
+ ] }) }),
14262
+ /* @__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: [
14263
+ /* @__PURE__ */ jsxs17(Box19, { sx: { flex: 1, minWidth: 0 }, children: [
14264
+ /* @__PURE__ */ jsxs17(Stack8, { direction: "row", spacing: 1, alignItems: "center", children: [
14265
+ /* @__PURE__ */ jsx21(Typography15, { sx: { fontWeight: 700 }, children: bandit.name }),
14266
+ bandit.model && /* @__PURE__ */ jsx21(Chip11, { size: "small", label: bandit.model })
14267
+ ] }),
14268
+ /* @__PURE__ */ jsx21(Typography15, { variant: "body2", color: "text.secondary", sx: { whiteSpace: "pre-wrap" }, children: bandit.jobDescription }),
14269
+ /* @__PURE__ */ jsxs17(Typography15, { variant: "caption", color: "text.secondary", children: [
14270
+ "tools: ",
14271
+ bandit.allowedTools.join(", "),
14272
+ bandit.ownerDisplayName ? ` \xB7 owner ${bandit.ownerDisplayName}` : ""
14273
+ ] })
14274
+ ] }),
14275
+ /* @__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" }) }) })
14276
+ ] }, bandit.id)) }),
14277
+ tasks.length > 0 && /* @__PURE__ */ jsxs17(Box19, { sx: { mt: 2 }, children: [
14278
+ /* @__PURE__ */ jsx21(Typography15, { variant: "caption", color: "text.secondary", sx: { fontWeight: 700 }, children: "Recent tasks" }),
14279
+ /* @__PURE__ */ jsx21(Stack8, { spacing: 0.5, sx: { mt: 0.5 }, children: tasks.map((task) => {
14280
+ const status = statusLabel(task.status);
14281
+ const link = task.deliverables?.find((d) => d.shareUrl || d.url);
14282
+ return /* @__PURE__ */ jsxs17(Stack8, { direction: "row", spacing: 1, alignItems: "center", sx: { minWidth: 0 }, children: [
14283
+ /* @__PURE__ */ jsx21(Chip11, { size: "small", label: status.label, color: status.color, variant: "outlined" }),
14284
+ /* @__PURE__ */ jsxs17(Typography15, { variant: "body2", noWrap: true, sx: { flex: 1, minWidth: 0 }, children: [
14285
+ /* @__PURE__ */ jsx21("strong", { children: task.banditName }),
14286
+ ": ",
14287
+ task.prompt
14288
+ ] }),
14289
+ link && /* @__PURE__ */ jsx21(Link3, { href: link.shareUrl ?? link.url ?? void 0, target: "_blank", rel: "noreferrer", variant: "body2", children: "open" })
14290
+ ] }, task.id);
14291
+ }) })
14292
+ ] })
14293
+ ] });
14294
+ };
14295
+ var CrewSection_default = CrewSection;
14296
+
14297
+ // src/management/components/MCPToolsTabV2.tsx
14298
+ import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
14075
14299
  var MCPToolsTabV2 = () => {
14076
14300
  const { settings } = usePackageSettingsStore();
14077
14301
  const {
@@ -14084,10 +14308,10 @@ var MCPToolsTabV2 = () => {
14084
14308
  lastSavedAt,
14085
14309
  saveTools
14086
14310
  } = useMCPToolsStore();
14087
- const [loading, setLoading] = useState22(true);
14088
- const [error, setError] = useState22(null);
14089
- const [tools, setTools] = useState22([]);
14090
- const [health, setHealth] = useState22(null);
14311
+ const [loading, setLoading] = useState23(true);
14312
+ const [error, setError] = useState23(null);
14313
+ const [tools, setTools] = useState23([]);
14314
+ const [health, setHealth] = useState23(null);
14091
14315
  const gatewayConfigured = !!settings?.gatewayApiUrl;
14092
14316
  const refresh = async () => {
14093
14317
  setLoading(true);
@@ -14112,7 +14336,7 @@ var MCPToolsTabV2 = () => {
14112
14336
  setLoading(false);
14113
14337
  }
14114
14338
  };
14115
- useEffect19(() => {
14339
+ useEffect20(() => {
14116
14340
  if (isLoaded) {
14117
14341
  refresh();
14118
14342
  } else {
@@ -14139,11 +14363,12 @@ var MCPToolsTabV2 = () => {
14139
14363
  }, [localTools]);
14140
14364
  const touchTarget = { width: { xs: 44, sm: 32 }, height: { xs: 44, sm: 32 } };
14141
14365
  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,
14366
+ return /* @__PURE__ */ jsxs18(Box20, { children: [
14367
+ /* @__PURE__ */ jsx22(McpServersSection_default, {}),
14368
+ /* @__PURE__ */ jsx22(CrewSection_default, {}),
14369
+ /* @__PURE__ */ jsxs18(Box20, { component: "section", "aria-label": "Built-in capabilities", sx: { mt: 4 }, children: [
14370
+ /* @__PURE__ */ jsxs18(
14371
+ Box20,
14147
14372
  {
14148
14373
  sx: {
14149
14374
  display: "flex",
@@ -14153,8 +14378,8 @@ var MCPToolsTabV2 = () => {
14153
14378
  gap: 1
14154
14379
  },
14155
14380
  children: [
14156
- /* @__PURE__ */ jsx21(
14157
- Typography15,
14381
+ /* @__PURE__ */ jsx22(
14382
+ Typography16,
14158
14383
  {
14159
14384
  variant: "overline",
14160
14385
  color: "text.secondary",
@@ -14162,9 +14387,9 @@ var MCPToolsTabV2 = () => {
14162
14387
  children: "Built-in capabilities"
14163
14388
  }
14164
14389
  ),
14165
- /* @__PURE__ */ jsxs17(Box19, { sx: { display: "flex", alignItems: "center", gap: 0.75 }, children: [
14166
- /* @__PURE__ */ jsx21(Tooltip10, { title: healthLabel, children: /* @__PURE__ */ jsx21(
14167
- Box19,
14390
+ /* @__PURE__ */ jsxs18(Box20, { sx: { display: "flex", alignItems: "center", gap: 0.75 }, children: [
14391
+ /* @__PURE__ */ jsx22(Tooltip11, { title: healthLabel, children: /* @__PURE__ */ jsx22(
14392
+ Box20,
14168
14393
  {
14169
14394
  role: "img",
14170
14395
  "aria-label": healthLabel,
@@ -14176,22 +14401,22 @@ var MCPToolsTabV2 = () => {
14176
14401
  }
14177
14402
  }
14178
14403
  ) }),
14179
- /* @__PURE__ */ jsx21(Tooltip10, { title: "Refresh", children: /* @__PURE__ */ jsx21(
14180
- IconButton12,
14404
+ /* @__PURE__ */ jsx22(Tooltip11, { title: "Refresh", children: /* @__PURE__ */ jsx22(
14405
+ IconButton13,
14181
14406
  {
14182
14407
  size: "small",
14183
14408
  onClick: refresh,
14184
14409
  "aria-label": "Refresh built-in capabilities",
14185
14410
  sx: touchTarget,
14186
- children: /* @__PURE__ */ jsx21(Refresh, { fontSize: "small" })
14411
+ children: /* @__PURE__ */ jsx22(Refresh, { fontSize: "small" })
14187
14412
  }
14188
14413
  ) })
14189
14414
  ] })
14190
14415
  ]
14191
14416
  }
14192
14417
  ),
14193
- /* @__PURE__ */ jsxs17(
14194
- Box19,
14418
+ /* @__PURE__ */ jsxs18(
14419
+ Box20,
14195
14420
  {
14196
14421
  sx: {
14197
14422
  display: "flex",
@@ -14202,8 +14427,8 @@ var MCPToolsTabV2 = () => {
14202
14427
  mb: 1.5
14203
14428
  },
14204
14429
  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(
14430
+ /* @__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." }),
14431
+ /* @__PURE__ */ jsx22(
14207
14432
  SaveStatus,
14208
14433
  {
14209
14434
  auto: true,
@@ -14215,22 +14440,22 @@ var MCPToolsTabV2 = () => {
14215
14440
  ]
14216
14441
  }
14217
14442
  ),
14218
- loading && tools.length > 0 && /* @__PURE__ */ jsx21(LinearProgress6, { sx: { mb: 2 } }),
14219
- error && /* @__PURE__ */ jsxs17(
14220
- Alert10,
14443
+ loading && tools.length > 0 && /* @__PURE__ */ jsx22(LinearProgress7, { sx: { mb: 2 } }),
14444
+ error && /* @__PURE__ */ jsxs18(
14445
+ Alert11,
14221
14446
  {
14222
14447
  severity: "error",
14223
14448
  sx: { mb: 2 },
14224
- action: /* @__PURE__ */ jsx21(Button13, { color: "inherit", size: "small", onClick: refresh, children: "Retry" }),
14449
+ action: /* @__PURE__ */ jsx22(Button14, { color: "inherit", size: "small", onClick: refresh, children: "Retry" }),
14225
14450
  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 })
14451
+ /* @__PURE__ */ jsx22(Typography16, { variant: "body2", sx: { fontWeight: 600 }, children: "Couldn't load built-in capabilities. The tool controller didn't respond." }),
14452
+ /* @__PURE__ */ jsx22(Typography16, { variant: "caption", sx: { display: "block", opacity: 0.8 }, children: error })
14228
14453
  ]
14229
14454
  }
14230
14455
  ),
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,
14456
+ !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." }),
14457
+ loading && tools.length === 0 ? /* @__PURE__ */ jsx22(
14458
+ Box20,
14234
14459
  {
14235
14460
  role: "status",
14236
14461
  "aria-busy": "true",
@@ -14240,19 +14465,19 @@ var MCPToolsTabV2 = () => {
14240
14465
  gridTemplateColumns: { xs: "1fr", sm: "repeat(2, 1fr)" },
14241
14466
  gap: 1.25
14242
14467
  },
14243
- children: Array.from({ length: 4 }, (_, i) => /* @__PURE__ */ jsx21(Skeleton5, { variant: "rounded", height: 64 }, i))
14468
+ children: Array.from({ length: 4 }, (_, i) => /* @__PURE__ */ jsx22(Skeleton5, { variant: "rounded", height: 64 }, i))
14244
14469
  }
14245
- ) : !loading && tools.length === 0 && !error ? /* @__PURE__ */ jsx21(
14470
+ ) : !loading && tools.length === 0 && !error ? /* @__PURE__ */ jsx22(
14246
14471
  ManagementEmptyState,
14247
14472
  {
14248
14473
  compact: true,
14249
- icon: /* @__PURE__ */ jsx21(Braces, {}),
14474
+ icon: /* @__PURE__ */ jsx22(Braces, {}),
14250
14475
  title: "No built-in capabilities reported",
14251
14476
  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" })
14477
+ action: /* @__PURE__ */ jsx22(Button14, { variant: "outlined", onClick: refresh, children: "Check again" })
14253
14478
  }
14254
- ) : /* @__PURE__ */ jsx21(
14255
- Box19,
14479
+ ) : /* @__PURE__ */ jsx22(
14480
+ Box20,
14256
14481
  {
14257
14482
  sx: {
14258
14483
  display: "grid",
@@ -14270,8 +14495,8 @@ var MCPToolsTabV2 = () => {
14270
14495
  );
14271
14496
  locallyEnabled = directLookup?.enabled ?? tool.isEnabled;
14272
14497
  }
14273
- return /* @__PURE__ */ jsxs17(
14274
- Paper7,
14498
+ return /* @__PURE__ */ jsxs18(
14499
+ Paper8,
14275
14500
  {
14276
14501
  variant: "outlined",
14277
14502
  sx: {
@@ -14282,10 +14507,10 @@ var MCPToolsTabV2 = () => {
14282
14507
  gap: 1
14283
14508
  },
14284
14509
  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,
14510
+ /* @__PURE__ */ jsxs18(Box20, { sx: { minWidth: 0 }, children: [
14511
+ /* @__PURE__ */ jsx22(Typography16, { variant: "subtitle2", sx: { fontWeight: 600 }, children: tool.name }),
14512
+ /* @__PURE__ */ jsx22(
14513
+ Typography16,
14289
14514
  {
14290
14515
  variant: "caption",
14291
14516
  color: "text.secondary",
@@ -14294,7 +14519,7 @@ var MCPToolsTabV2 = () => {
14294
14519
  }
14295
14520
  )
14296
14521
  ] }),
14297
- /* @__PURE__ */ jsx21(
14522
+ /* @__PURE__ */ jsx22(
14298
14523
  Switch4,
14299
14524
  {
14300
14525
  size: "small",
@@ -14326,21 +14551,21 @@ var MCPToolsTabV2_default = MCPToolsTabV2;
14326
14551
  // src/management/shell/ManagementShell.tsx
14327
14552
  import React20 from "react";
14328
14553
  import {
14329
- Box as Box20,
14554
+ Box as Box21,
14330
14555
  ButtonBase as ButtonBase2,
14331
- IconButton as IconButton13,
14556
+ IconButton as IconButton14,
14332
14557
  List as List5,
14333
14558
  ListItemButton as ListItemButton2,
14334
14559
  ListItemIcon as ListItemIcon2,
14335
14560
  ListItemText as ListItemText2,
14336
14561
  ListSubheader,
14337
- Stack as Stack8,
14562
+ Stack as Stack9,
14338
14563
  SwipeableDrawer,
14339
- Tooltip as Tooltip11,
14340
- Typography as Typography16
14564
+ Tooltip as Tooltip12,
14565
+ Typography as Typography17
14341
14566
  } from "@mui/material";
14342
14567
  import { alpha as alpha3 } from "@mui/material/styles";
14343
- import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
14568
+ import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
14344
14569
  var RAIL_WIDTH = 248;
14345
14570
  var controlRadius = (theme) => `${Math.max(Number(theme.shape.borderRadius) - 2, 4)}px`;
14346
14571
  var SECTION_ICONS = {
@@ -14404,9 +14629,9 @@ function Navigation({
14404
14629
  textTransform: "uppercase",
14405
14630
  color: "text.secondary"
14406
14631
  };
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(
14632
+ return /* @__PURE__ */ jsxs19(Stack9, { sx: { height: "100%", minHeight: 0 }, children: [
14633
+ /* @__PURE__ */ jsxs19(Box21, { sx: { px: 1.5, pt: 1.5, pb: 1 }, children: [
14634
+ /* @__PURE__ */ jsxs19(
14410
14635
  ButtonBase2,
14411
14636
  {
14412
14637
  onClick: () => {
@@ -14427,13 +14652,13 @@ function Navigation({
14427
14652
  "& svg": { width: 16, height: 16 }
14428
14653
  }),
14429
14654
  children: [
14430
- /* @__PURE__ */ jsx22(ChevronLeft, {}),
14655
+ /* @__PURE__ */ jsx23(ChevronLeft, {}),
14431
14656
  "Back to chat"
14432
14657
  ]
14433
14658
  }
14434
14659
  ),
14435
- /* @__PURE__ */ jsx22(Typography16, { variant: "subtitle1", sx: { px: 1, mt: 1, fontWeight: 600 }, children: "Management" }),
14436
- onOpenCommandPalette && /* @__PURE__ */ jsxs18(
14660
+ /* @__PURE__ */ jsx23(Typography17, { variant: "subtitle1", sx: { px: 1, mt: 1, fontWeight: 600 }, children: "Management" }),
14661
+ onOpenCommandPalette && /* @__PURE__ */ jsxs19(
14437
14662
  ButtonBase2,
14438
14663
  {
14439
14664
  onClick: () => {
@@ -14457,10 +14682,10 @@ function Navigation({
14457
14682
  "& svg": { width: 15, height: 15 }
14458
14683
  }),
14459
14684
  children: [
14460
- /* @__PURE__ */ jsx22(Search, {}),
14461
- /* @__PURE__ */ jsx22(Box20, { component: "span", sx: { flex: 1, textAlign: "left" }, children: "Search\u2026" }),
14462
- /* @__PURE__ */ jsx22(
14463
- Box20,
14685
+ /* @__PURE__ */ jsx23(Search, {}),
14686
+ /* @__PURE__ */ jsx23(Box21, { component: "span", sx: { flex: 1, textAlign: "left" }, children: "Search\u2026" }),
14687
+ /* @__PURE__ */ jsx23(
14688
+ Box21,
14464
14689
  {
14465
14690
  component: "kbd",
14466
14691
  sx: (theme) => ({
@@ -14478,24 +14703,24 @@ function Navigation({
14478
14703
  }
14479
14704
  )
14480
14705
  ] }),
14481
- /* @__PURE__ */ jsxs18(
14482
- Box20,
14706
+ /* @__PURE__ */ jsxs19(
14707
+ Box21,
14483
14708
  {
14484
14709
  component: "nav",
14485
14710
  "aria-label": "Management",
14486
14711
  sx: { flex: 1, overflowY: "auto", px: 1.5, pb: 2 },
14487
14712
  children: [
14488
- /* @__PURE__ */ jsx22(
14713
+ /* @__PURE__ */ jsx23(
14489
14714
  List5,
14490
14715
  {
14491
14716
  component: "div",
14492
14717
  dense: true,
14493
14718
  disablePadding: true,
14494
- subheader: /* @__PURE__ */ jsx22(ListSubheader, { component: "div", disableSticky: true, sx: subheaderSx, children: "Workspace" }),
14719
+ subheader: /* @__PURE__ */ jsx23(ListSubheader, { component: "div", disableSticky: true, sx: subheaderSx, children: "Workspace" }),
14495
14720
  children: sections.map((section) => {
14496
14721
  const Icon = SECTION_ICONS[section.id];
14497
14722
  const selected = section.id === active;
14498
- return /* @__PURE__ */ jsxs18(
14723
+ return /* @__PURE__ */ jsxs19(
14499
14724
  ListItemButton2,
14500
14725
  {
14501
14726
  selected,
@@ -14506,8 +14731,8 @@ function Navigation({
14506
14731
  },
14507
14732
  sx: (theme) => railItemSx(theme, selected),
14508
14733
  children: [
14509
- /* @__PURE__ */ jsx22(ListItemIcon2, { children: /* @__PURE__ */ jsx22(Icon, { fontSize: "small" }) }),
14510
- /* @__PURE__ */ jsx22(
14734
+ /* @__PURE__ */ jsx23(ListItemIcon2, { children: /* @__PURE__ */ jsx23(Icon, { fontSize: "small" }) }),
14735
+ /* @__PURE__ */ jsx23(
14511
14736
  ListItemText2,
14512
14737
  {
14513
14738
  primary: section.label,
@@ -14524,15 +14749,15 @@ function Navigation({
14524
14749
  })
14525
14750
  }
14526
14751
  ),
14527
- organizationLinks && organizationLinks.length > 0 && /* @__PURE__ */ jsx22(
14752
+ organizationLinks && organizationLinks.length > 0 && /* @__PURE__ */ jsx23(
14528
14753
  List5,
14529
14754
  {
14530
14755
  component: "div",
14531
14756
  dense: true,
14532
14757
  disablePadding: true,
14533
14758
  sx: { mt: 1 },
14534
- subheader: /* @__PURE__ */ jsx22(ListSubheader, { component: "div", disableSticky: true, sx: subheaderSx, children: "Organization" }),
14535
- children: organizationLinks.map((link) => /* @__PURE__ */ jsxs18(
14759
+ subheader: /* @__PURE__ */ jsx23(ListSubheader, { component: "div", disableSticky: true, sx: subheaderSx, children: "Organization" }),
14760
+ children: organizationLinks.map((link) => /* @__PURE__ */ jsxs19(
14536
14761
  ListItemButton2,
14537
14762
  {
14538
14763
  onClick: () => {
@@ -14541,8 +14766,8 @@ function Navigation({
14541
14766
  },
14542
14767
  sx: (theme) => railItemSx(theme, false),
14543
14768
  children: [
14544
- link.icon && /* @__PURE__ */ jsx22(ListItemIcon2, { children: link.icon }),
14545
- /* @__PURE__ */ jsx22(
14769
+ link.icon && /* @__PURE__ */ jsx23(ListItemIcon2, { children: link.icon }),
14770
+ /* @__PURE__ */ jsx23(
14546
14771
  ListItemText2,
14547
14772
  {
14548
14773
  primary: link.label,
@@ -14573,8 +14798,8 @@ function ManagementShell(props) {
14573
14798
  const [sheetOpen, setSheetOpen] = React20.useState(false);
14574
14799
  const current = sections.find((s) => s.id === active);
14575
14800
  if (isMobile) {
14576
- return /* @__PURE__ */ jsxs18(
14577
- Box20,
14801
+ return /* @__PURE__ */ jsxs19(
14802
+ Box21,
14578
14803
  {
14579
14804
  sx: {
14580
14805
  display: "flex",
@@ -14583,8 +14808,8 @@ function ManagementShell(props) {
14583
14808
  bgcolor: "background.default"
14584
14809
  },
14585
14810
  children: [
14586
- /* @__PURE__ */ jsxs18(
14587
- Box20,
14811
+ /* @__PURE__ */ jsxs19(
14812
+ Box21,
14588
14813
  {
14589
14814
  component: "header",
14590
14815
  sx: (theme) => ({
@@ -14602,18 +14827,18 @@ function ManagementShell(props) {
14602
14827
  bgcolor: theme.palette.bandit?.surface.base ?? theme.palette.background.default
14603
14828
  }),
14604
14829
  children: [
14605
- /* @__PURE__ */ jsx22(Tooltip11, { title: "Back to chat", children: /* @__PURE__ */ jsx22(
14606
- IconButton13,
14830
+ /* @__PURE__ */ jsx23(Tooltip12, { title: "Back to chat", children: /* @__PURE__ */ jsx23(
14831
+ IconButton14,
14607
14832
  {
14608
14833
  "aria-label": "Back to chat",
14609
14834
  onClick: onBackToChat,
14610
14835
  sx: { width: 44, height: 44 },
14611
- children: /* @__PURE__ */ jsx22(ChevronLeft, {})
14836
+ children: /* @__PURE__ */ jsx23(ChevronLeft, {})
14612
14837
  }
14613
14838
  ) }),
14614
- /* @__PURE__ */ jsxs18(Box20, { sx: { flex: 1, minWidth: 0 }, children: [
14615
- /* @__PURE__ */ jsx22(
14616
- Typography16,
14839
+ /* @__PURE__ */ jsxs19(Box21, { sx: { flex: 1, minWidth: 0 }, children: [
14840
+ /* @__PURE__ */ jsx23(
14841
+ Typography17,
14617
14842
  {
14618
14843
  variant: "caption",
14619
14844
  color: "text.secondary",
@@ -14621,8 +14846,8 @@ function ManagementShell(props) {
14621
14846
  children: "Management"
14622
14847
  }
14623
14848
  ),
14624
- /* @__PURE__ */ jsx22(
14625
- Typography16,
14849
+ /* @__PURE__ */ jsx23(
14850
+ Typography17,
14626
14851
  {
14627
14852
  variant: "subtitle1",
14628
14853
  noWrap: true,
@@ -14631,29 +14856,29 @@ function ManagementShell(props) {
14631
14856
  }
14632
14857
  )
14633
14858
  ] }),
14634
- onOpenCommandPalette && /* @__PURE__ */ jsx22(
14635
- IconButton13,
14859
+ onOpenCommandPalette && /* @__PURE__ */ jsx23(
14860
+ IconButton14,
14636
14861
  {
14637
14862
  "aria-label": "Search Management",
14638
14863
  onClick: onOpenCommandPalette,
14639
14864
  sx: { width: 44, height: 44 },
14640
- children: /* @__PURE__ */ jsx22(Search, {})
14865
+ children: /* @__PURE__ */ jsx23(Search, {})
14641
14866
  }
14642
14867
  ),
14643
- /* @__PURE__ */ jsx22(
14644
- IconButton13,
14868
+ /* @__PURE__ */ jsx23(
14869
+ IconButton14,
14645
14870
  {
14646
14871
  "aria-label": "Open Management navigation",
14647
14872
  "aria-expanded": sheetOpen,
14648
14873
  onClick: () => setSheetOpen(true),
14649
14874
  sx: { width: 44, height: 44 },
14650
- children: /* @__PURE__ */ jsx22(PanelLeft, {})
14875
+ children: /* @__PURE__ */ jsx23(PanelLeft, {})
14651
14876
  }
14652
14877
  )
14653
14878
  ]
14654
14879
  }
14655
14880
  ),
14656
- /* @__PURE__ */ jsxs18(
14881
+ /* @__PURE__ */ jsxs19(
14657
14882
  SwipeableDrawer,
14658
14883
  {
14659
14884
  anchor: "bottom",
@@ -14672,8 +14897,8 @@ function ManagementShell(props) {
14672
14897
  })
14673
14898
  },
14674
14899
  children: [
14675
- /* @__PURE__ */ jsx22(
14676
- Box20,
14900
+ /* @__PURE__ */ jsx23(
14901
+ Box21,
14677
14902
  {
14678
14903
  "aria-hidden": true,
14679
14904
  sx: (theme) => ({
@@ -14686,12 +14911,12 @@ function ManagementShell(props) {
14686
14911
  })
14687
14912
  }
14688
14913
  ),
14689
- /* @__PURE__ */ jsx22(Navigation, { ...props, onAfterSelect: () => setSheetOpen(false) })
14914
+ /* @__PURE__ */ jsx23(Navigation, { ...props, onAfterSelect: () => setSheetOpen(false) })
14690
14915
  ]
14691
14916
  }
14692
14917
  ),
14693
- /* @__PURE__ */ jsx22(
14694
- Box20,
14918
+ /* @__PURE__ */ jsx23(
14919
+ Box21,
14695
14920
  {
14696
14921
  component: "main",
14697
14922
  sx: {
@@ -14708,8 +14933,8 @@ function ManagementShell(props) {
14708
14933
  }
14709
14934
  );
14710
14935
  }
14711
- return /* @__PURE__ */ jsxs18(
14712
- Box20,
14936
+ return /* @__PURE__ */ jsxs19(
14937
+ Box21,
14713
14938
  {
14714
14939
  sx: {
14715
14940
  display: "flex",
@@ -14719,8 +14944,8 @@ function ManagementShell(props) {
14719
14944
  bgcolor: "background.default"
14720
14945
  },
14721
14946
  children: [
14722
- /* @__PURE__ */ jsx22(
14723
- Box20,
14947
+ /* @__PURE__ */ jsx23(
14948
+ Box21,
14724
14949
  {
14725
14950
  component: "aside",
14726
14951
  sx: (theme) => ({
@@ -14730,11 +14955,11 @@ function ManagementShell(props) {
14730
14955
  borderRight: `1px solid ${theme.palette.divider}`,
14731
14956
  bgcolor: theme.palette.bandit?.surface.subtle ?? theme.palette.background.paper
14732
14957
  }),
14733
- children: /* @__PURE__ */ jsx22(Navigation, { ...props })
14958
+ children: /* @__PURE__ */ jsx23(Navigation, { ...props })
14734
14959
  }
14735
14960
  ),
14736
- /* @__PURE__ */ jsx22(
14737
- Box20,
14961
+ /* @__PURE__ */ jsx23(
14962
+ Box21,
14738
14963
  {
14739
14964
  component: "main",
14740
14965
  sx: {
@@ -14754,9 +14979,9 @@ function ManagementShell(props) {
14754
14979
  }
14755
14980
 
14756
14981
  // 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";
14982
+ import { Box as Box22, Button as Button15, ButtonBase as ButtonBase3, Stack as Stack10, Typography as Typography18 } from "@mui/material";
14758
14983
  import { alpha as alpha4 } from "@mui/material/styles";
14759
- import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
14984
+ import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
14760
14985
  var PROVIDER_LABELS = {
14761
14986
  ollama: "Ollama",
14762
14987
  openai: "OpenAI",
@@ -14776,7 +15001,7 @@ function Tile({
14776
15001
  onOpen
14777
15002
  }) {
14778
15003
  const Icon = SECTION_ICONS[id];
14779
- return /* @__PURE__ */ jsxs19(
15004
+ return /* @__PURE__ */ jsxs20(
14780
15005
  ButtonBase3,
14781
15006
  {
14782
15007
  onClick: onOpen,
@@ -14798,17 +15023,17 @@ function Tile({
14798
15023
  }
14799
15024
  }),
14800
15025
  children: [
14801
- /* @__PURE__ */ jsxs19(
14802
- Stack9,
15026
+ /* @__PURE__ */ jsxs20(
15027
+ Stack10,
14803
15028
  {
14804
15029
  direction: "row",
14805
15030
  alignItems: "center",
14806
15031
  spacing: 1,
14807
15032
  sx: { color: "text.secondary" },
14808
15033
  children: [
14809
- /* @__PURE__ */ jsx23(Box21, { sx: { display: "grid", "& svg": { width: 16, height: 16 } }, children: /* @__PURE__ */ jsx23(Icon, { fontSize: "small" }) }),
14810
- /* @__PURE__ */ jsx23(
14811
- Typography17,
15034
+ /* @__PURE__ */ jsx24(Box22, { sx: { display: "grid", "& svg": { width: 16, height: 16 } }, children: /* @__PURE__ */ jsx24(Icon, { fontSize: "small" }) }),
15035
+ /* @__PURE__ */ jsx24(
15036
+ Typography18,
14812
15037
  {
14813
15038
  variant: "caption",
14814
15039
  sx: { fontWeight: 600, letterSpacing: "0.04em", textTransform: "uppercase" },
@@ -14818,8 +15043,8 @@ function Tile({
14818
15043
  ]
14819
15044
  }
14820
15045
  ),
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 })
15046
+ /* @__PURE__ */ jsx24(Typography18, { variant: "h6", sx: { mt: 1, fontWeight: 600 }, noWrap: true, children: value }),
15047
+ detail && /* @__PURE__ */ jsx24(Typography18, { variant: "body2", color: "text.secondary", noWrap: true, children: detail })
14823
15048
  ]
14824
15049
  }
14825
15050
  );
@@ -14834,7 +15059,7 @@ function ManagementOverview({
14834
15059
  const tiles = [];
14835
15060
  if (has("personalities"))
14836
15061
  tiles.push(
14837
- /* @__PURE__ */ jsx23(
15062
+ /* @__PURE__ */ jsx24(
14838
15063
  Tile,
14839
15064
  {
14840
15065
  id: "personalities",
@@ -14848,7 +15073,7 @@ function ManagementOverview({
14848
15073
  );
14849
15074
  if (has("knowledge"))
14850
15075
  tiles.push(
14851
- /* @__PURE__ */ jsx23(
15076
+ /* @__PURE__ */ jsx24(
14852
15077
  Tile,
14853
15078
  {
14854
15079
  id: "knowledge",
@@ -14862,7 +15087,7 @@ function ManagementOverview({
14862
15087
  );
14863
15088
  if (has("provider"))
14864
15089
  tiles.push(
14865
- /* @__PURE__ */ jsx23(
15090
+ /* @__PURE__ */ jsx24(
14866
15091
  Tile,
14867
15092
  {
14868
15093
  id: "provider",
@@ -14876,7 +15101,7 @@ function ManagementOverview({
14876
15101
  );
14877
15102
  if (has("branding"))
14878
15103
  tiles.push(
14879
- /* @__PURE__ */ jsx23(
15104
+ /* @__PURE__ */ jsx24(
14880
15105
  Tile,
14881
15106
  {
14882
15107
  id: "branding",
@@ -14890,7 +15115,7 @@ function ManagementOverview({
14890
15115
  );
14891
15116
  if (has("preferences"))
14892
15117
  tiles.push(
14893
- /* @__PURE__ */ jsx23(
15118
+ /* @__PURE__ */ jsx24(
14894
15119
  Tile,
14895
15120
  {
14896
15121
  id: "preferences",
@@ -14902,18 +15127,18 @@ function ManagementOverview({
14902
15127
  "preferences"
14903
15128
  )
14904
15129
  );
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(
15130
+ return /* @__PURE__ */ jsxs20(Box22, { sx: { px: { xs: 1.5, sm: 2.5, md: 3 }, py: 2 }, children: [
15131
+ facts.personalities === 0 && has("personalities") && /* @__PURE__ */ jsx24(Box22, { sx: { mb: 2 }, children: /* @__PURE__ */ jsx24(
14907
15132
  ManagementEmptyState,
14908
15133
  {
14909
15134
  compact: true,
14910
15135
  title: "Give this workspace its first personality",
14911
15136
  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" })
15137
+ action: /* @__PURE__ */ jsx24(Button15, { variant: "contained", onClick: () => onSelect("personalities"), children: "Create a personality" })
14913
15138
  }
14914
15139
  ) }),
14915
- /* @__PURE__ */ jsx23(
14916
- Box21,
15140
+ /* @__PURE__ */ jsx24(
15141
+ Box22,
14917
15142
  {
14918
15143
  sx: {
14919
15144
  display: "grid",
@@ -15044,9 +15269,9 @@ function useManagementAccess() {
15044
15269
  }
15045
15270
 
15046
15271
  // src/management/management.tsx
15047
- import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
15048
- var preloadChatPage = () => import("./chat-W7MDFESE.mjs");
15049
- var SchedulesTab = lazy(() => import("./SchedulesTab-YZG3P2GW.mjs"));
15272
+ import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
15273
+ var preloadChatPage = () => import("./chat-Y7KPN54G.mjs");
15274
+ var SchedulesTab = lazy(() => import("./SchedulesTab-TCUOAKLH.mjs"));
15050
15275
  var buildCapabilitiesUrl = (gatewayApiUrl) => {
15051
15276
  const trimmed = gatewayApiUrl.replace(/\/$/, "");
15052
15277
  if (trimmed.endsWith("/api")) {
@@ -15107,16 +15332,16 @@ var Management = ({
15107
15332
  hasTransparentLogo,
15108
15333
  setHasTransparentLogo
15109
15334
  } = useModelStore();
15110
- const [modalOpen, setModalOpen] = useState23(false);
15335
+ const [modalOpen, setModalOpen] = useState24(false);
15111
15336
  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);
15337
+ const [fabLogo, setFabLogo] = useState24(banditHead3);
15338
+ const [logoFile, setLogoFile] = useState24(null);
15339
+ const [logoBase64, setLogoBase64] = useState24(null);
15340
+ const [brandingText, setBrandingText] = useState24("");
15341
+ const [headerMode, setHeaderMode] = useState24("logo");
15342
+ const [theme, setTheme] = useState24("bandit-dark");
15343
+ const [customAvatarBase64, setCustomAvatarBase64] = useState24(null);
15344
+ const [presetAvatar, setPresetAvatar] = useState24(null);
15120
15345
  const showSnackbarMessage = (message, severity = "success") => {
15121
15346
  if (severity === "success") {
15122
15347
  notificationService2?.showSuccess(message);
@@ -15124,22 +15349,22 @@ var Management = ({
15124
15349
  notificationService2?.showError(message);
15125
15350
  }
15126
15351
  };
15127
- const [brandingLoaded, setBrandingLoaded] = useState23(false);
15128
- const [isLoadingBranding, setIsLoadingBranding] = useState23(false);
15352
+ const [brandingLoaded, setBrandingLoaded] = useState24(false);
15353
+ const [isLoadingBranding, setIsLoadingBranding] = useState24(false);
15129
15354
  const { initModels } = useModelStore();
15130
15355
  const { settings: packageSettings } = usePackageSettingsStore();
15131
15356
  const authToken = useAuthenticationStore((state) => state.token);
15132
15357
  const { preferences, updatePreference } = usePreferencesStore();
15133
15358
  const { provider: currentProvider, config: currentProviderConfig } = useAIProviderStore();
15134
- const [seedPacksEnabled, setSeedPacksEnabled] = useState23(false);
15135
- const [localSelectedModel, setLocalSelectedModel] = useState23({
15359
+ const [seedPacksEnabled, setSeedPacksEnabled] = useState24(false);
15360
+ const [localSelectedModel, setLocalSelectedModel] = useState24({
15136
15361
  name: "",
15137
15362
  tagline: "",
15138
15363
  systemPrompt: "",
15139
15364
  selectedModel: ""
15140
15365
  });
15141
15366
  const { documents, addDocuments, removeDocument, loadDocuments, clearAllDocuments } = useKnowledgeStore2();
15142
- useEffect20(() => {
15367
+ useEffect21(() => {
15143
15368
  if (selectedModel) {
15144
15369
  const selected = availableModels.find((m) => m.name === selectedModel);
15145
15370
  if (selected) {
@@ -15163,7 +15388,7 @@ var Management = ({
15163
15388
  }
15164
15389
  }
15165
15390
  }, [selectedModel, availableModels]);
15166
- const loadBrandingConfig = useCallback10(async () => {
15391
+ const loadBrandingConfig = useCallback11(async () => {
15167
15392
  if (isLoadingBranding || brandingLoaded) {
15168
15393
  debugLogger.warn("Branding loading already in progress or completed, skipping");
15169
15394
  return;
@@ -15293,15 +15518,15 @@ var Management = ({
15293
15518
  setTagline,
15294
15519
  setTheme
15295
15520
  ]);
15296
- useEffect20(() => {
15521
+ useEffect21(() => {
15297
15522
  void loadBrandingConfig();
15298
15523
  }, [loadBrandingConfig]);
15299
15524
  const handleOpenModal = () => setModalOpen(true);
15300
15525
  const handleCloseModal = () => setModalOpen(false);
15301
- useEffect20(() => {
15526
+ useEffect21(() => {
15302
15527
  getOptimalFabLogo().then(setFabLogo);
15303
15528
  }, []);
15304
- useEffect20(() => {
15529
+ useEffect21(() => {
15305
15530
  if (logoBase64) {
15306
15531
  setFabLogo(logoBase64);
15307
15532
  } else {
@@ -15846,7 +16071,7 @@ var Management = ({
15846
16071
  reader.readAsText(file);
15847
16072
  }
15848
16073
  };
15849
- useEffect20(() => {
16074
+ useEffect21(() => {
15850
16075
  if (localSelectedModel.selectedModel && !availableModels.some((m) => m.name === localSelectedModel.selectedModel)) {
15851
16076
  setLocalSelectedModel((prev) => ({
15852
16077
  ...prev,
@@ -15854,10 +16079,10 @@ var Management = ({
15854
16079
  }));
15855
16080
  }
15856
16081
  }, [availableModels, localSelectedModel.selectedModel]);
15857
- useEffect20(() => {
16082
+ useEffect21(() => {
15858
16083
  loadDocuments();
15859
16084
  }, [loadDocuments]);
15860
- useEffect20(() => {
16085
+ useEffect21(() => {
15861
16086
  const gatewayApiUrl = packageSettings?.gatewayApiUrl;
15862
16087
  if (!gatewayApiUrl || gatewayApiUrl.toLowerCase().startsWith("playground://")) {
15863
16088
  setSeedPacksEnabled(false);
@@ -15904,7 +16129,7 @@ var Management = ({
15904
16129
  () => createBrandingTheme(theme, { density: "compact" }),
15905
16130
  [theme]
15906
16131
  );
15907
- useEffect20(() => {
16132
+ useEffect21(() => {
15908
16133
  onThemeChange?.(currentTheme);
15909
16134
  }, [currentTheme, onThemeChange]);
15910
16135
  const access = useManagementAccess();
@@ -15913,10 +16138,10 @@ var Management = ({
15913
16138
  [sectionOverride, access.sections]
15914
16139
  );
15915
16140
  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);
16141
+ const [ownSection, setOwnSection] = useState24(null);
15917
16142
  const requested = controlledSection ?? ownSection ?? defaultSection;
15918
16143
  const active = sections.some((s) => s.id === requested) ? requested : defaultSection;
15919
- const selectSection = useCallback10(
16144
+ const selectSection = useCallback11(
15920
16145
  (id) => {
15921
16146
  setOwnSection(id);
15922
16147
  onSectionChange?.(id);
@@ -15924,9 +16149,9 @@ var Management = ({
15924
16149
  [onSectionChange]
15925
16150
  );
15926
16151
  const activeDef = sectionById(active);
15927
- const [createPersonalityRequest, setCreatePersonalityRequest] = useState23(0);
15928
- const [pendingUpload, setPendingUpload] = useState23(0);
15929
- useEffect20(() => {
16152
+ const [createPersonalityRequest, setCreatePersonalityRequest] = useState24(0);
16153
+ const [pendingUpload, setPendingUpload] = useState24(0);
16154
+ useEffect21(() => {
15930
16155
  if (!request) return;
15931
16156
  if (request.action === "create-personality") {
15932
16157
  selectSection("personalities");
@@ -15936,11 +16161,11 @@ var Management = ({
15936
16161
  setPendingUpload(request.id);
15937
16162
  }
15938
16163
  }, [request?.id]);
15939
- useEffect20(() => {
16164
+ useEffect21(() => {
15940
16165
  if (createPersonalityRequest && active === "personalities" && brandingLoaded)
15941
16166
  setCreatePersonalityRequest(0);
15942
16167
  }, [createPersonalityRequest, active, brandingLoaded]);
15943
- useEffect20(() => {
16168
+ useEffect21(() => {
15944
16169
  if (!pendingUpload || active !== "knowledge" || !brandingLoaded) return;
15945
16170
  const frame = requestAnimationFrame(() => {
15946
16171
  document.getElementById("file-upload")?.click();
@@ -15952,9 +16177,9 @@ var Management = ({
15952
16177
  const prefSavedAt = usePreferencesStore((state) => state.lastSavedAt);
15953
16178
  const retryPreferences = usePreferencesStore((state) => state.savePreferences);
15954
16179
  const brandingValue = JSON.stringify({ logoBase64, brandingText, headerMode, theme });
15955
- const [brandingBaseline, setBrandingBaseline] = useState23(null);
15956
- const [brandingSave, setBrandingSave] = useState23("idle");
15957
- useEffect20(() => {
16180
+ const [brandingBaseline, setBrandingBaseline] = useState24(null);
16181
+ const [brandingSave, setBrandingSave] = useState24("idle");
16182
+ useEffect21(() => {
15958
16183
  if (brandingLoaded && brandingBaseline === null) setBrandingBaseline(brandingValue);
15959
16184
  }, [brandingLoaded, brandingBaseline, brandingValue]);
15960
16185
  const brandingDirty = brandingBaseline !== null && brandingBaseline !== brandingValue;
@@ -15981,7 +16206,7 @@ var Management = ({
15981
16206
  const personalityDirty = savedPersonality ? norm(localSelectedModel.name) !== norm(savedPersonality.name) || norm(localSelectedModel.tagline) !== norm(savedPersonality.tagline) || norm(localSelectedModel.systemPrompt) !== norm(savedPersonality.systemPrompt) : Boolean(
15982
16207
  norm(localSelectedModel.name) || norm(localSelectedModel.tagline) || norm(localSelectedModel.systemPrompt)
15983
16208
  );
15984
- const [personalitySaving, setPersonalitySaving] = useState23(false);
16209
+ const [personalitySaving, setPersonalitySaving] = useState24(false);
15985
16210
  const savePersonalityFromBar = async () => {
15986
16211
  setPersonalitySaving(true);
15987
16212
  try {
@@ -16002,7 +16227,7 @@ var Management = ({
16002
16227
  handleResetModel();
16003
16228
  }
16004
16229
  };
16005
- const headerStatus = active === "preferences" ? /* @__PURE__ */ jsx24(
16230
+ const headerStatus = active === "preferences" ? /* @__PURE__ */ jsx25(
16006
16231
  SaveStatus,
16007
16232
  {
16008
16233
  auto: true,
@@ -16010,17 +16235,17 @@ var Management = ({
16010
16235
  savedAt: prefSavedAt,
16011
16236
  onRetry: () => void retryPreferences()
16012
16237
  }
16013
- ) : active === "branding" ? /* @__PURE__ */ jsx24(
16238
+ ) : active === "branding" ? /* @__PURE__ */ jsx25(
16014
16239
  SaveStatus,
16015
16240
  {
16016
16241
  state: brandingDirty ? "unsaved" : brandingSave === "saving" ? "saving" : brandingSave
16017
16242
  }
16018
- ) : active === "personalities" && personalityDirty ? /* @__PURE__ */ jsx24(SaveStatus, { state: "unsaved" }) : null;
16243
+ ) : active === "personalities" && personalityDirty ? /* @__PURE__ */ jsx25(SaveStatus, { state: "unsaved" }) : null;
16019
16244
  const themeLabel = describeBrandingTheme(theme);
16020
16245
  if (!brandingLoaded) {
16021
- return /* @__PURE__ */ jsxs20(ThemeProvider2, { theme: currentTheme, children: [
16022
- /* @__PURE__ */ jsx24(CssBaseline, {}),
16023
- /* @__PURE__ */ jsx24(
16246
+ return /* @__PURE__ */ jsxs21(ThemeProvider2, { theme: currentTheme, children: [
16247
+ /* @__PURE__ */ jsx25(CssBaseline, {}),
16248
+ /* @__PURE__ */ jsx25(
16024
16249
  ManagementShell,
16025
16250
  {
16026
16251
  sections,
@@ -16031,14 +16256,14 @@ var Management = ({
16031
16256
  onBackHover: preloadChatPage,
16032
16257
  onOpenCommandPalette,
16033
16258
  isMobile,
16034
- children: /* @__PURE__ */ jsx24(SectionSkeleton, {})
16259
+ children: /* @__PURE__ */ jsx25(SectionSkeleton, {})
16035
16260
  }
16036
16261
  )
16037
16262
  ] });
16038
16263
  }
16039
- return /* @__PURE__ */ jsxs20(ThemeProvider2, { theme: currentTheme, children: [
16040
- /* @__PURE__ */ jsx24(CssBaseline, {}),
16041
- /* @__PURE__ */ jsxs20(
16264
+ return /* @__PURE__ */ jsxs21(ThemeProvider2, { theme: currentTheme, children: [
16265
+ /* @__PURE__ */ jsx25(CssBaseline, {}),
16266
+ /* @__PURE__ */ jsxs21(
16042
16267
  ManagementShell,
16043
16268
  {
16044
16269
  sections,
@@ -16051,30 +16276,30 @@ var Management = ({
16051
16276
  isMobile,
16052
16277
  children: [
16053
16278
  notice,
16054
- /* @__PURE__ */ jsx24(
16279
+ /* @__PURE__ */ jsx25(
16055
16280
  ManagementPageHeader,
16056
16281
  {
16057
16282
  title: activeDef.label,
16058
16283
  description: activeDef.description,
16059
16284
  status: headerStatus,
16060
- actions: active === "knowledge" ? /* @__PURE__ */ jsx24(
16061
- Button15,
16285
+ actions: active === "knowledge" ? /* @__PURE__ */ jsx25(
16286
+ Button16,
16062
16287
  {
16063
16288
  variant: "contained",
16064
- startIcon: /* @__PURE__ */ jsx24(FileUp, {}),
16289
+ startIcon: /* @__PURE__ */ jsx25(FileUp, {}),
16065
16290
  onClick: () => document.getElementById("file-upload")?.click(),
16066
16291
  children: "Upload"
16067
16292
  }
16068
16293
  ) : void 0
16069
16294
  }
16070
16295
  ),
16071
- /* @__PURE__ */ jsxs20(Box22, { sx: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column" }, children: [
16072
- /* @__PURE__ */ jsxs20(
16073
- Box22,
16296
+ /* @__PURE__ */ jsxs21(Box23, { sx: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column" }, children: [
16297
+ /* @__PURE__ */ jsxs21(
16298
+ Box23,
16074
16299
  {
16075
16300
  sx: active === "overview" ? void 0 : { px: { xs: 1.5, sm: 2.5, md: 3 }, pt: 1.5, pb: 3, minWidth: 0 },
16076
16301
  children: [
16077
- active === "overview" && /* @__PURE__ */ jsx24(
16302
+ active === "overview" && /* @__PURE__ */ jsx25(
16078
16303
  ManagementOverview,
16079
16304
  {
16080
16305
  sections,
@@ -16091,7 +16316,7 @@ var Management = ({
16091
16316
  }
16092
16317
  }
16093
16318
  ),
16094
- active === "personalities" && /* @__PURE__ */ jsx24(
16319
+ active === "personalities" && /* @__PURE__ */ jsx25(
16095
16320
  PersonalitiesTab_default,
16096
16321
  {
16097
16322
  availableModels,
@@ -16111,7 +16336,7 @@ var Management = ({
16111
16336
  createRequest: createPersonalityRequest
16112
16337
  }
16113
16338
  ),
16114
- active === "branding" && /* @__PURE__ */ jsx24(
16339
+ active === "branding" && /* @__PURE__ */ jsx25(
16115
16340
  BrandingTab_default,
16116
16341
  {
16117
16342
  logoFile,
@@ -16136,7 +16361,7 @@ var Management = ({
16136
16361
  setLogoBase64
16137
16362
  }
16138
16363
  ),
16139
- active === "knowledge" && /* @__PURE__ */ jsx24(
16364
+ active === "knowledge" && /* @__PURE__ */ jsx25(
16140
16365
  KnowledgeHubTab_default,
16141
16366
  {
16142
16367
  documents,
@@ -16149,8 +16374,8 @@ var Management = ({
16149
16374
  seedPacksEnabled
16150
16375
  }
16151
16376
  ),
16152
- active === "storage" && /* @__PURE__ */ jsx24(StorageTab_default, { currentTheme }),
16153
- active === "preferences" && /* @__PURE__ */ jsx24(
16377
+ active === "storage" && /* @__PURE__ */ jsx25(StorageTab_default, { currentTheme }),
16378
+ active === "preferences" && /* @__PURE__ */ jsx25(
16154
16379
  PreferencesTab_default,
16155
16380
  {
16156
16381
  preferences,
@@ -16160,14 +16385,14 @@ var Management = ({
16160
16385
  showSnackbar: showSnackbarMessage
16161
16386
  }
16162
16387
  ),
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 }) })
16388
+ active === "provider" && /* @__PURE__ */ jsx25(ProviderTab, {}),
16389
+ active === "tools" && /* @__PURE__ */ jsx25(MCPToolsTabV2_default, {}),
16390
+ active === "schedules" && /* @__PURE__ */ jsx25(Suspense, { fallback: /* @__PURE__ */ jsx25(SectionSkeleton, {}), children: /* @__PURE__ */ jsx25(SchedulesTab, { showSnackbar: showSnackbarMessage, chatPath }) })
16166
16391
  ]
16167
16392
  },
16168
16393
  active
16169
16394
  ),
16170
- active === "branding" && /* @__PURE__ */ jsx24(
16395
+ active === "branding" && /* @__PURE__ */ jsx25(
16171
16396
  UnsavedChangesBar,
16172
16397
  {
16173
16398
  open: brandingDirty,
@@ -16178,7 +16403,7 @@ var Management = ({
16178
16403
  message: "Branding has unsaved changes"
16179
16404
  }
16180
16405
  ),
16181
- active === "personalities" && /* @__PURE__ */ jsx24(
16406
+ active === "personalities" && /* @__PURE__ */ jsx25(
16182
16407
  UnsavedChangesBar,
16183
16408
  {
16184
16409
  open: personalityDirty,
@@ -16193,7 +16418,7 @@ var Management = ({
16193
16418
  ]
16194
16419
  }
16195
16420
  ),
16196
- !isMobile && /* @__PURE__ */ jsx24(
16421
+ !isMobile && /* @__PURE__ */ jsx25(
16197
16422
  Fab2,
16198
16423
  {
16199
16424
  "aria-label": "Ask the assistant",
@@ -16205,7 +16430,7 @@ var Management = ({
16205
16430
  right: 16,
16206
16431
  zIndex: (t) => t.zIndex.modal - 1
16207
16432
  },
16208
- children: /* @__PURE__ */ jsx24(
16433
+ children: /* @__PURE__ */ jsx25(
16209
16434
  "img",
16210
16435
  {
16211
16436
  src: fabLogo,
@@ -16215,15 +16440,15 @@ var Management = ({
16215
16440
  )
16216
16441
  }
16217
16442
  ),
16218
- !isMobile && /* @__PURE__ */ jsx24(chat_modal_default, { open: modalOpen, onClose: handleCloseModal })
16443
+ !isMobile && /* @__PURE__ */ jsx25(chat_modal_default, { open: modalOpen, onClose: handleCloseModal })
16219
16444
  ] });
16220
16445
  };
16221
16446
  var management_default = Management;
16222
16447
 
16223
16448
  // 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";
16449
+ import { useEffect as useEffect22 } from "react";
16450
+ import { Box as Box24, Chip as Chip12, Typography as Typography19 } from "@mui/material";
16451
+ import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
16227
16452
  var InterestsEditor = ({
16228
16453
  title = "Your interests",
16229
16454
  description = "Pick the topics you care about \u2014 your home-screen conversation starters lean toward them."
@@ -16232,19 +16457,19 @@ var InterestsEditor = ({
16232
16457
  const updatePreference = usePreferencesStore((s) => s.updatePreference);
16233
16458
  const loadPreferences = usePreferencesStore((s) => s.loadPreferences);
16234
16459
  const isLoaded = usePreferencesStore((s) => s.isLoaded);
16235
- useEffect21(() => {
16460
+ useEffect22(() => {
16236
16461
  if (!isLoaded) {
16237
16462
  void loadPreferences();
16238
16463
  }
16239
16464
  }, [isLoaded, loadPreferences]);
16240
16465
  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) => {
16466
+ return /* @__PURE__ */ jsxs22(Box24, { children: [
16467
+ title && /* @__PURE__ */ jsx26(Typography19, { variant: "h6", sx: { fontWeight: 600, color: "text.primary" }, children: title }),
16468
+ description && /* @__PURE__ */ jsx26(Typography19, { variant: "body2", color: "text.secondary", sx: { mb: 1.5 }, children: description }),
16469
+ /* @__PURE__ */ jsx26(Box24, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: TOPICS.map((topic) => {
16245
16470
  const selected = interests.includes(topic);
16246
- return /* @__PURE__ */ jsx25(
16247
- Chip11,
16471
+ return /* @__PURE__ */ jsx26(
16472
+ Chip12,
16248
16473
  {
16249
16474
  label: topic,
16250
16475
  size: "small",
@@ -16507,7 +16732,7 @@ var previewTierUpgrade = (tier) => featureFlagService.previewUpgrade(tier);
16507
16732
  var getFeatureMatrix = () => featureFlagService.generateFeatureMatrix();
16508
16733
 
16509
16734
  // src/hooks/useVoices.ts
16510
- import { useEffect as useEffect22 } from "react";
16735
+ import { useEffect as useEffect23 } from "react";
16511
16736
  var useVoices = () => {
16512
16737
  const {
16513
16738
  availableVoices,
@@ -16522,7 +16747,7 @@ var useVoices = () => {
16522
16747
  } = useVoiceStore();
16523
16748
  const gatewayApiUrl = usePackageSettingsStore((state) => state.settings?.gatewayApiUrl);
16524
16749
  const { token } = useAuthenticationStore();
16525
- useEffect22(() => {
16750
+ useEffect23(() => {
16526
16751
  const isAuthenticated = authenticationService.isAuthenticated();
16527
16752
  if (gatewayApiUrl && token && isAuthenticated && !isServiceAvailable) {
16528
16753
  debugLogger.debug(
@@ -16562,13 +16787,13 @@ import {
16562
16787
  DialogTitle as DialogTitle8,
16563
16788
  DialogContent as DialogContent9,
16564
16789
  DialogActions as DialogActions8,
16565
- Typography as Typography19,
16566
- Button as Button16,
16567
- Box as Box24,
16568
- Alert as Alert11,
16569
- Stack as Stack10
16790
+ Typography as Typography20,
16791
+ Button as Button17,
16792
+ Box as Box25,
16793
+ Alert as Alert12,
16794
+ Stack as Stack11
16570
16795
  } from "@mui/material";
16571
- import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
16796
+ import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
16572
16797
  var SubscriptionExpiredModal = ({
16573
16798
  open,
16574
16799
  onNavigateHome,
@@ -16590,7 +16815,7 @@ var SubscriptionExpiredModal = ({
16590
16815
  if (!IS_STORE_BUILD) window.location.href = "/manage-subscription";
16591
16816
  }
16592
16817
  };
16593
- return /* @__PURE__ */ jsxs22(
16818
+ return /* @__PURE__ */ jsxs23(
16594
16819
  Dialog9,
16595
16820
  {
16596
16821
  open,
@@ -16605,8 +16830,8 @@ var SubscriptionExpiredModal = ({
16605
16830
  }
16606
16831
  },
16607
16832
  children: [
16608
- /* @__PURE__ */ jsx26(DialogTitle8, { sx: { textAlign: "center", pb: 1 }, children: /* @__PURE__ */ jsxs22(
16609
- Box24,
16833
+ /* @__PURE__ */ jsx27(DialogTitle8, { sx: { textAlign: "center", pb: 1 }, children: /* @__PURE__ */ jsxs23(
16834
+ Box25,
16610
16835
  {
16611
16836
  sx: {
16612
16837
  display: "flex",
@@ -16616,35 +16841,35 @@ var SubscriptionExpiredModal = ({
16616
16841
  mb: 1
16617
16842
  },
16618
16843
  children: [
16619
- /* @__PURE__ */ jsx26(AlertTriangle, { size: 32, color: "warning" }),
16620
- /* @__PURE__ */ jsx26(Typography19, { variant: "h5", component: "span", fontWeight: "bold", children: "Subscription Expired" })
16844
+ /* @__PURE__ */ jsx27(AlertTriangle, { size: 32, color: "warning" }),
16845
+ /* @__PURE__ */ jsx27(Typography20, { variant: "h5", component: "span", fontWeight: "bold", children: "Subscription Expired" })
16621
16846
  ]
16622
16847
  }
16623
16848
  ) }),
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,
16849
+ /* @__PURE__ */ jsx27(DialogContent9, { sx: { pt: 1 }, children: /* @__PURE__ */ jsxs23(Stack11, { spacing: 2, children: [
16850
+ /* @__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." }) }),
16851
+ userEmail && /* @__PURE__ */ jsxs23(
16852
+ Typography20,
16628
16853
  {
16629
16854
  variant: "body2",
16630
16855
  color: "text.secondary",
16631
16856
  sx: { textAlign: "center" },
16632
16857
  children: [
16633
16858
  "Account: ",
16634
- /* @__PURE__ */ jsx26("strong", { children: userEmail })
16859
+ /* @__PURE__ */ jsx27("strong", { children: userEmail })
16635
16860
  ]
16636
16861
  }
16637
16862
  ),
16638
- /* @__PURE__ */ jsx26(
16639
- Typography19,
16863
+ /* @__PURE__ */ jsx27(
16864
+ Typography20,
16640
16865
  {
16641
16866
  variant: "body1",
16642
16867
  sx: { textAlign: "center", color: "text.secondary" },
16643
16868
  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
16869
  }
16645
16870
  ),
16646
- /* @__PURE__ */ jsx26(
16647
- Box24,
16871
+ /* @__PURE__ */ jsx27(
16872
+ Box25,
16648
16873
  {
16649
16874
  sx: {
16650
16875
  bgcolor: "background.paper",
@@ -16654,14 +16879,14 @@ var SubscriptionExpiredModal = ({
16654
16879
  p: 2,
16655
16880
  mt: 2
16656
16881
  },
16657
- children: /* @__PURE__ */ jsxs22(
16658
- Typography19,
16882
+ children: /* @__PURE__ */ jsxs23(
16883
+ Typography20,
16659
16884
  {
16660
16885
  variant: "caption",
16661
16886
  color: "text.secondary",
16662
16887
  sx: { fontStyle: "italic" },
16663
16888
  children: [
16664
- /* @__PURE__ */ jsx26("strong", { children: "What's affected:" }),
16889
+ /* @__PURE__ */ jsx27("strong", { children: "What's affected:" }),
16665
16890
  " All premium features including document upload, voice controls, advanced search, and admin dashboard access have been disabled until your subscription is renewed."
16666
16891
  ]
16667
16892
  }
@@ -16669,24 +16894,24 @@ var SubscriptionExpiredModal = ({
16669
16894
  }
16670
16895
  )
16671
16896
  ] }) }),
16672
- /* @__PURE__ */ jsxs22(DialogActions8, { sx: { px: 3, pb: 3, gap: 1, justifyContent: "center" }, children: [
16673
- /* @__PURE__ */ jsx26(
16674
- Button16,
16897
+ /* @__PURE__ */ jsxs23(DialogActions8, { sx: { px: 3, pb: 3, gap: 1, justifyContent: "center" }, children: [
16898
+ /* @__PURE__ */ jsx27(
16899
+ Button17,
16675
16900
  {
16676
16901
  onClick: handleNavigateHome,
16677
16902
  variant: "outlined",
16678
- startIcon: /* @__PURE__ */ jsx26(Home, {}),
16903
+ startIcon: /* @__PURE__ */ jsx27(Home, {}),
16679
16904
  size: "large",
16680
16905
  sx: { minWidth: 140 },
16681
16906
  children: IS_STORE_BUILD ? "My Account" : "Go Home"
16682
16907
  }
16683
16908
  ),
16684
- (!IS_STORE_BUILD || onManageSubscription) && /* @__PURE__ */ jsx26(
16685
- Button16,
16909
+ (!IS_STORE_BUILD || onManageSubscription) && /* @__PURE__ */ jsx27(
16910
+ Button17,
16686
16911
  {
16687
16912
  onClick: handleManageSubscription,
16688
16913
  variant: "contained",
16689
- startIcon: /* @__PURE__ */ jsx26(CreditCard, {}),
16914
+ startIcon: /* @__PURE__ */ jsx27(CreditCard, {}),
16690
16915
  size: "large",
16691
16916
  color: "primary",
16692
16917
  sx: { minWidth: 140 },
@@ -16700,8 +16925,8 @@ var SubscriptionExpiredModal = ({
16700
16925
  };
16701
16926
 
16702
16927
  // 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";
16928
+ import { useEffect as useEffect24, useState as useState25 } from "react";
16929
+ import { Fragment as Fragment8, jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
16705
16930
  var SubscriptionExpiredGuard = ({
16706
16931
  children,
16707
16932
  onNavigateHome,
@@ -16710,9 +16935,9 @@ var SubscriptionExpiredGuard = ({
16710
16935
  allowContinue = false
16711
16936
  }) => {
16712
16937
  const { isExpiredTier, getFullEvaluation } = useFeatures();
16713
- const [showModal, setShowModal] = useState24(false);
16714
- const [userDismissed, setUserDismissed] = useState24(false);
16715
- useEffect23(() => {
16938
+ const [showModal, setShowModal] = useState25(false);
16939
+ const [userDismissed, setUserDismissed] = useState25(false);
16940
+ useEffect24(() => {
16716
16941
  if (isExpiredTier() && !userDismissed) {
16717
16942
  setShowModal(true);
16718
16943
  } else {
@@ -16736,9 +16961,9 @@ var SubscriptionExpiredGuard = ({
16736
16961
  }
16737
16962
  return void 0;
16738
16963
  })() : void 0;
16739
- return /* @__PURE__ */ jsxs23(Fragment8, { children: [
16964
+ return /* @__PURE__ */ jsxs24(Fragment8, { children: [
16740
16965
  children,
16741
- /* @__PURE__ */ jsx27(
16966
+ /* @__PURE__ */ jsx28(
16742
16967
  SubscriptionExpiredModal,
16743
16968
  {
16744
16969
  open: showModal,