@burdenoff/microfe-vibecontrols 2026.602.8 → 2026.602.10

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 (28) hide show
  1. package/dist/components/actions/ActionForm.js +260 -252
  2. package/dist/components/actions/ActionForm.js.map +1 -1
  3. package/dist/components/ai/InstructionFilesManager.js +138 -135
  4. package/dist/components/ai/InstructionFilesManager.js.map +1 -1
  5. package/dist/components/aliases/AliasManager.js +225 -224
  6. package/dist/components/aliases/AliasManager.js.map +1 -1
  7. package/dist/components/common/ActionAgentTargetNotice.js +125 -0
  8. package/dist/components/common/ActionAgentTargetNotice.js.map +1 -0
  9. package/dist/components/common/CommandEditor.js +49 -0
  10. package/dist/components/common/CommandEditor.js.map +1 -0
  11. package/dist/components/common/actionAgentTarget.js +55 -0
  12. package/dist/components/common/actionAgentTarget.js.map +1 -0
  13. package/dist/components/common/commandHighlight.js +190 -0
  14. package/dist/components/common/commandHighlight.js.map +1 -0
  15. package/dist/components/vibecalendar/ScheduleTaskModal.js +151 -149
  16. package/dist/components/vibecalendar/ScheduleTaskModal.js.map +1 -1
  17. package/dist/components/vibedeck/VibeDeckButtonForm.js +231 -219
  18. package/dist/components/vibedeck/VibeDeckButtonForm.js.map +1 -1
  19. package/dist/generated/wspace-operations.js +1 -0
  20. package/dist/generated/wspace-operations.js.map +1 -1
  21. package/dist/generated/wspace-types.js.map +1 -1
  22. package/dist/pages/ActionsPage.js +233 -224
  23. package/dist/pages/ActionsPage.js.map +1 -1
  24. package/dist/pages/AgentDetailsPage.js +490 -489
  25. package/dist/pages/AgentDetailsPage.js.map +1 -1
  26. package/dist/pages/SessionDetailsPage.js +401 -401
  27. package/dist/pages/SessionDetailsPage.js.map +1 -1
  28. package/package.json +1 -1
@@ -14,43 +14,44 @@ import { useActiveAgentProfile as ye } from "../hooks/useActiveAgentProfile.js";
14
14
  import "../components/shared/index.js";
15
15
  import { isNative as be, nativeCopyText as xe, nativeToast as Se } from "../utils/nativeBridge.js";
16
16
  import { VIBE_PERMISSIONS as Ce } from "../constants/permissions.js";
17
- import { PageSkeleton as we } from "../components/shared/PageSkeleton.js";
18
- import { AgentBackupTab as Te } from "../components/agents/backup/AgentBackupTab.js";
19
- import { ConnectionLogPanel as Ee } from "../components/agents/ConnectionLogPanel.js";
20
- import { AgentMaintenanceTab as De } from "../components/agents/AgentMaintenanceTab.js";
21
- import { AgentConnectionRecovery as Oe } from "../components/agents/AgentConnectionRecovery.js";
22
- import { AgentStorageConfig as ke } from "../components/agents/AgentStorageConfig.js";
23
- import { AliasManager as Ae } from "../components/aliases/AliasManager.js";
24
- import { AgentStatusBadge as je } from "../components/agents/AgentStatusBadge.js";
25
- import { RemoteTaskPermissionsCard as Me } from "../components/agents/RemoteTaskPermissionsCard.js";
26
- import { PluginUIPanel as Ne } from "../components/agents/PluginUIPanel.js";
27
- import { OpenInBrowserEditorButton as Pe } from "../components/agents/OpenInBrowserEditorButton.js";
17
+ import { CommandEditor as we } from "../components/common/CommandEditor.js";
18
+ import { PageSkeleton as Te } from "../components/shared/PageSkeleton.js";
19
+ import { AgentBackupTab as Ee } from "../components/agents/backup/AgentBackupTab.js";
20
+ import { ConnectionLogPanel as De } from "../components/agents/ConnectionLogPanel.js";
21
+ import { AgentMaintenanceTab as Oe } from "../components/agents/AgentMaintenanceTab.js";
22
+ import { AgentConnectionRecovery as ke } from "../components/agents/AgentConnectionRecovery.js";
23
+ import { AgentStorageConfig as Ae } from "../components/agents/AgentStorageConfig.js";
24
+ import { AliasManager as je } from "../components/aliases/AliasManager.js";
25
+ import { AgentStatusBadge as Me } from "../components/agents/AgentStatusBadge.js";
26
+ import { RemoteTaskPermissionsCard as Ne } from "../components/agents/RemoteTaskPermissionsCard.js";
27
+ import { PluginUIPanel as Pe } from "../components/agents/PluginUIPanel.js";
28
+ import { OpenInBrowserEditorButton as Fe } from "../components/agents/OpenInBrowserEditorButton.js";
28
29
  import "../components/agents/index.js";
29
- import { deriveAgentStatus as Fe } from "../utils/agentStatus.js";
30
- import { LogViewer as Ie } from "../components/logs/LogViewer.js";
31
- import { ProfilesPanel as Le } from "../components/agent-manager/ProfilesPanel.js";
30
+ import { deriveAgentStatus as Ie } from "../utils/agentStatus.js";
31
+ import { LogViewer as Le } from "../components/logs/LogViewer.js";
32
+ import { ProfilesPanel as Re } from "../components/agent-manager/ProfilesPanel.js";
32
33
  import "../components/agent-manager/index.js";
33
- import { NotesTabPanel as Re } from "../components/notes/NotesTabPanel.js";
34
+ import { NotesTabPanel as ze } from "../components/notes/NotesTabPanel.js";
34
35
  import "../components/notes/index.js";
35
- import { useQueryBackedTab as ze } from "../hooks/useQueryBackedTab.js";
36
- import { mintScopedIframeToken as Be } from "../services/iframeToken.js";
37
- import { AddTabDialog as Ve } from "../components/plugins/AddTabDialog.js";
38
- import { PluginIframeMount as He } from "../components/plugins/PluginIframeMount.js";
39
- import { useCallback as u, useEffect as d, useMemo as Ue, useRef as f, useState as p } from "react";
40
- import { useI18n as We } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
41
- import { ArrowLeft as Ge, ArrowUpCircle as Ke, Bot as qe, Check as Je, CheckCircle2 as Ye, Clock as Xe, Command as Ze, Copy as Qe, Cpu as $e, Database as et, Download as tt, Edit3 as nt, Eye as rt, EyeOff as it, FileText as at, HardDrive as ot, Info as st, Key as ct, Link2 as lt, Loader2 as m, Monitor as ut, Play as dt, Plus as ft, Puzzle as pt, RefreshCw as mt, ScrollText as ht, Search as gt, Server as _t, Settings as vt, Shield as yt, Square as bt, Tag as xt, Terminal as St, Trash2 as Ct, Unlink as h, Users as wt, Wrench as Tt, X as g, Zap as Et } from "lucide-react";
42
- import { useParams as Dt } from "react-router-dom";
43
- import { usePermissions as Ot } from "@burdenoff/fe-libs/shared/providers/shell";
44
- import { AnimatePresence as kt, motion as _ } from "framer-motion";
36
+ import { useQueryBackedTab as Be } from "../hooks/useQueryBackedTab.js";
37
+ import { mintScopedIframeToken as Ve } from "../services/iframeToken.js";
38
+ import { AddTabDialog as He } from "../components/plugins/AddTabDialog.js";
39
+ import { PluginIframeMount as Ue } from "../components/plugins/PluginIframeMount.js";
40
+ import { useCallback as u, useEffect as d, useMemo as We, useRef as f, useState as p } from "react";
41
+ import { useI18n as Ge } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
42
+ import { ArrowLeft as Ke, ArrowUpCircle as qe, Bot as Je, Check as Ye, CheckCircle2 as Xe, Clock as Ze, Command as Qe, Copy as $e, Cpu as et, Database as tt, Download as nt, Edit3 as rt, Eye as it, EyeOff as at, FileText as ot, HardDrive as st, Info as ct, Key as lt, Link2 as ut, Loader2 as m, Monitor as dt, Play as ft, Plus as pt, Puzzle as mt, RefreshCw as ht, ScrollText as gt, Search as _t, Server as vt, Settings as yt, Shield as bt, Square as xt, Tag as St, Terminal as Ct, Trash2 as wt, Unlink as h, Users as Tt, Wrench as Et, X as g, Zap as Dt } from "lucide-react";
43
+ import { useParams as Ot } from "react-router-dom";
44
+ import { usePermissions as kt } from "@burdenoff/fe-libs/shared/providers/shell";
45
+ import { AnimatePresence as At, motion as _ } from "framer-motion";
45
46
  import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
46
- import { Checkbox as At } from "@burdenoff/fe-libs/ui";
47
- import { useFeatureFlagDetails as jt } from "@burdenoff/fe-libs/shared/feature-flags";
48
- import { PermissionButton as Mt } from "@burdenoff/fe-libs/shared/components";
49
- import { MotionPage as Nt } from "@burdenoff/fe-libs/shared/motion";
50
- import { usePluginContributions as Pt } from "@burdenoff/fe-libs/shared/plugins";
47
+ import { Checkbox as jt } from "@burdenoff/fe-libs/ui";
48
+ import { useFeatureFlagDetails as Mt } from "@burdenoff/fe-libs/shared/feature-flags";
49
+ import { PermissionButton as Nt } from "@burdenoff/fe-libs/shared/components";
50
+ import { MotionPage as Pt } from "@burdenoff/fe-libs/shared/motion";
51
+ import { usePluginContributions as Ft } from "@burdenoff/fe-libs/shared/plugins";
51
52
  //#region src/pages/AgentDetailsPage.tsx
52
- function Ft({ agent: e, onUpdate: t }) {
53
- let { t: n } = We(), [r] = ie(), [i] = ne(), [a, ee] = p(!1), [te, o] = p(null), [re, ae] = p(!1), [s, oe] = p(null), [se, ce] = p(!1), [le, ue] = p(!1), [de, fe] = p(!1), pe = !!(e.appId && e.appClientId), c = (e, t, r) => {
53
+ function It({ agent: e, onUpdate: t }) {
54
+ let { t: n } = Ge(), [r] = ie(), [i] = ne(), [a, ee] = p(!1), [te, o] = p(null), [re, ae] = p(!1), [s, oe] = p(null), [se, ce] = p(!1), [le, ue] = p(!1), [de, fe] = p(!1), pe = !!(e.appId && e.appClientId), c = (e, t, r) => {
54
55
  let i = n(e, r), a = i === e ? t : i;
55
56
  return r ? Object.entries(r).reduce((e, [t, n]) => e.replace(`{{${t}}}`, String(n)), a) : a;
56
57
  }, me = e.metadata?.devportalApplicationId, he = async () => {
@@ -69,7 +70,7 @@ function Ft({ agent: e, onUpdate: t }) {
69
70
  className: "p-4 border-b border-border-default",
70
71
  children: /* @__PURE__ */ b("h3", {
71
72
  className: "font-semibold text-text-primary flex items-center gap-2",
72
- children: [/* @__PURE__ */ y(yt, { className: "size-5" }), c("agentDetails.gatewayAuthTitle", "Gateway Auth (OAuth2)")]
73
+ children: [/* @__PURE__ */ y(bt, { className: "size-5" }), c("agentDetails.gatewayAuthTitle", "Gateway Auth (OAuth2)")]
73
74
  })
74
75
  }), /* @__PURE__ */ b("div", {
75
76
  className: "p-4 space-y-3",
@@ -93,7 +94,7 @@ function Ft({ agent: e, onUpdate: t }) {
93
94
  className: "flex items-start gap-3",
94
95
  children: [/* @__PURE__ */ y("div", {
95
96
  className: "size-8 rounded-lg bg-status-success-bg flex items-center justify-center flex-shrink-0 mt-0.5",
96
- children: /* @__PURE__ */ y(lt, { className: "size-4 text-status-success-text" })
97
+ children: /* @__PURE__ */ y(ut, { className: "size-4 text-status-success-text" })
97
98
  }), /* @__PURE__ */ b("div", {
98
99
  className: "flex-1 min-w-0 space-y-2",
99
100
  children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
@@ -121,7 +122,7 @@ function Ft({ agent: e, onUpdate: t }) {
121
122
  },
122
123
  className: "p-1 rounded hover:bg-bg-sunken transition-colors flex-shrink-0",
123
124
  title: c("agentDetails.copyClientId", "Copy Client ID"),
124
- children: le ? /* @__PURE__ */ y(Je, { className: "size-3.5 text-status-success-text" }) : /* @__PURE__ */ y(Qe, { className: "size-3.5 text-text-secondary" })
125
+ children: le ? /* @__PURE__ */ y(Ye, { className: "size-3.5 text-status-success-text" }) : /* @__PURE__ */ y($e, { className: "size-3.5 text-text-secondary" })
125
126
  })]
126
127
  })] }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
127
128
  className: "text-xs text-text-secondary mb-1",
@@ -155,7 +156,7 @@ function Ft({ agent: e, onUpdate: t }) {
155
156
  type: "button",
156
157
  onClick: () => ae(!re),
157
158
  className: "p-1 rounded hover:bg-bg-sunken transition-colors flex-shrink-0",
158
- children: y(re ? it : rt, { className: "size-3.5 text-text-secondary" })
159
+ children: y(re ? at : it, { className: "size-3.5 text-text-secondary" })
159
160
  }),
160
161
  /* @__PURE__ */ y("button", {
161
162
  type: "button",
@@ -165,7 +166,7 @@ function Ft({ agent: e, onUpdate: t }) {
165
166
  } catch {}
166
167
  },
167
168
  className: "p-1 rounded hover:bg-bg-sunken transition-colors flex-shrink-0",
168
- children: se ? /* @__PURE__ */ y(Je, { className: "size-3.5 text-status-success-text" }) : /* @__PURE__ */ y(Qe, { className: "size-3.5 text-text-secondary" })
169
+ children: se ? /* @__PURE__ */ y(Ye, { className: "size-3.5 text-status-success-text" }) : /* @__PURE__ */ y($e, { className: "size-3.5 text-text-secondary" })
169
170
  })
170
171
  ]
171
172
  })
@@ -177,7 +178,7 @@ function Ft({ agent: e, onUpdate: t }) {
177
178
  me && /* @__PURE__ */ b("a", {
178
179
  href: `/devportal/apps/${me}`,
179
180
  className: "flex items-center gap-2 px-3 py-1.5 text-xs text-action-primary-bg bg-action-primary-bg/10 hover:bg-action-primary-bg/20 rounded-md transition-colors",
180
- children: [/* @__PURE__ */ y(ut, { className: "size-3" }), c("agentDetails.viewInDeveloperPortal", "View in Developer Portal")]
181
+ children: [/* @__PURE__ */ y(dt, { className: "size-3" }), c("agentDetails.viewInDeveloperPortal", "View in Developer Portal")]
181
182
  }),
182
183
  /* @__PURE__ */ b("button", {
183
184
  type: "button",
@@ -185,7 +186,7 @@ function Ft({ agent: e, onUpdate: t }) {
185
186
  disabled: a,
186
187
  className: "flex items-center gap-2 px-3 py-1.5 text-xs text-action-primary-bg bg-action-primary-bg/10 hover:bg-action-primary-bg/20 rounded-md transition-colors disabled:opacity-50",
187
188
  title: c("agentDetails.repushCredentialsTitle", "Rotate the OAuth secret and push it to the agent. Use this if the agent shows degraded with \"boot state awaiting-config\"."),
188
- children: [a ? /* @__PURE__ */ y(m, { className: "size-3 animate-spin" }) : /* @__PURE__ */ y(mt, { className: "size-3" }), c("agentDetails.repushCredentials", "Re-push credentials")]
189
+ children: [a ? /* @__PURE__ */ y(m, { className: "size-3 animate-spin" }) : /* @__PURE__ */ y(ht, { className: "size-3" }), c("agentDetails.repushCredentials", "Re-push credentials")]
189
190
  }),
190
191
  /* @__PURE__ */ b("button", {
191
192
  type: "button",
@@ -217,7 +218,7 @@ function Ft({ agent: e, onUpdate: t }) {
217
218
  className: "flex items-start gap-3",
218
219
  children: [/* @__PURE__ */ y("div", {
219
220
  className: "size-8 rounded-lg bg-bg-sunken flex items-center justify-center flex-shrink-0 mt-0.5",
220
- children: /* @__PURE__ */ y(yt, { className: "size-4 text-text-muted" })
221
+ children: /* @__PURE__ */ y(bt, { className: "size-4 text-text-muted" })
221
222
  }), /* @__PURE__ */ b("div", {
222
223
  className: "flex-1",
223
224
  children: [/* @__PURE__ */ y("p", {
@@ -233,11 +234,11 @@ function Ft({ agent: e, onUpdate: t }) {
233
234
  onClick: he,
234
235
  disabled: a,
235
236
  className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg rounded-md hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50",
236
- children: a ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(m, { className: "size-4 animate-spin" }), c("agentDetails.settingUp", "Setting up...")] }) : /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(lt, { className: "size-4" }), c("agentDetails.setupGatewayAuth", "Setup Gateway Auth")] })
237
+ children: a ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(m, { className: "size-4 animate-spin" }), c("agentDetails.settingUp", "Setting up...")] }) : /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(ut, { className: "size-4" }), c("agentDetails.setupGatewayAuth", "Setup Gateway Auth")] })
237
238
  })] })]
238
239
  })] });
239
240
  }
240
- var It = [
241
+ var Lt = [
241
242
  "overview",
242
243
  "profiles",
243
244
  "security",
@@ -251,11 +252,11 @@ var It = [
251
252
  "backup",
252
253
  "maintenance"
253
254
  ];
254
- function Lt() {
255
- let { t: lt } = We(), { id: h } = Dt(), { basePath: Lt } = fe(), Rt = Lt || "", x = pe(), { hasPermission: zt, isLoading: Bt, permissions: Vt } = Ot(), S = u((e, t, n) => {
256
- let r = lt(e, n), i = r === e ? t : r;
255
+ function Rt() {
256
+ let { t: ut } = Ge(), { id: h } = Ot(), { basePath: Rt } = fe(), zt = Rt || "", x = pe(), { hasPermission: Bt, isLoading: Vt, permissions: Ht } = kt(), S = u((e, t, n) => {
257
+ let r = ut(e, n), i = r === e ? t : r;
257
258
  return n ? Object.entries(n).reduce((e, [t, n]) => e.replace(`{{${t}}}`, String(n)), i) : i;
258
- }, [lt]), [Ht] = ie({ refetchQueries: ["GetAgent"] }), [Ut] = i({
259
+ }, [ut]), [Ut] = ie({ refetchQueries: ["GetAgent"] }), [Wt] = i({
259
260
  refetchQueries: ["ListAgents", "VibeControlsInitialData"],
260
261
  awaitRefetchQueries: !0,
261
262
  update(e, t, { variables: n }) {
@@ -265,11 +266,11 @@ function Lt() {
265
266
  id: r
266
267
  }) }), e.gc());
267
268
  }
268
- }), [Wt] = n({ refetchQueries: ["GetAgent"] }), [Gt] = o(), [Kt] = re(), [C, qt] = p(null), [Jt, Yt] = p(null), Xt = c((e) => e.setActiveAgentId);
269
+ }), [Gt] = n({ refetchQueries: ["GetAgent"] }), [Kt] = o(), [qt] = re(), [C, Jt] = p(null), [Yt, Xt] = p(null), Zt = c((e) => e.setActiveAgentId);
269
270
  d(() => {
270
- h && Xt(h);
271
- }, [h, Xt]);
272
- let [Zt, Qt] = p(!1), [$t, w] = p(null), [en, tn] = p(!1), [nn, T] = p(null), [rn, an] = p(!1), [on, sn] = p(!1), [cn, ln] = p(""), [E, un] = p(!1), [dn, fn] = p(null), pn = f(null), mn = f(null), hn = f(null), gn = f(null), _n = f(null), [vn, yn] = p(!1), [bn, xn] = p(!1), [D, Sn] = p(null), [Cn, wn] = p(!1), [Tn, En] = p(null), [Dn] = t({ fetchPolicy: "network-only" }), [O, k] = p(!1), [On, A] = p(null), [j, kn] = p(!1), M = f(null), An = f(null), jn = f(null), Mn = f(null), [Nn] = r({ refetchQueries: ["GetAgent", "ListSessions"] });
271
+ h && Zt(h);
272
+ }, [h, Zt]);
273
+ let [Qt, $t] = p(!1), [en, w] = p(null), [tn, nn] = p(!1), [rn, T] = p(null), [an, on] = p(!1), [sn, cn] = p(!1), [ln, un] = p(""), [E, dn] = p(!1), [fn, pn] = p(null), mn = f(null), hn = f(null), gn = f(null), _n = f(null), vn = f(null), [yn, bn] = p(!1), [xn, Sn] = p(!1), [D, Cn] = p(null), [wn, Tn] = p(!1), [En, Dn] = p(null), [On] = t({ fetchPolicy: "network-only" }), [O, k] = p(!1), [kn, A] = p(null), [j, An] = p(!1), M = f(null), jn = f(null), N = f(null), Mn = f(null), [Nn] = r({ refetchQueries: ["GetAgent", "ListSessions"] });
273
274
  d(() => {
274
275
  if (!O) return;
275
276
  let e = (e) => {
@@ -281,76 +282,76 @@ function Lt() {
281
282
  let e = requestAnimationFrame(() => M.current?.focus());
282
283
  return () => cancelAnimationFrame(e);
283
284
  }, [O]);
284
- let { data: Pn, loading: Fn, error: In, refetch: N } = a({
285
+ let { data: Pn, loading: Fn, error: In, refetch: P } = a({
285
286
  variables: { id: h || "" },
286
287
  skip: !h,
287
288
  fetchPolicy: "cache-and-network"
288
- }), P = Pn?.vibecontrolsAgent, F = oe({
289
+ }), F = Pn?.vibecontrolsAgent, I = oe({
289
290
  fetchPolicy: "cache-and-network",
290
291
  nextFetchPolicy: "cache-first",
291
292
  notifyOnNetworkStatusChange: !0,
292
293
  skip: !h,
293
294
  pollInterval: 3e4
294
- }), { data: Ln } = s({ skip: !h }), Rn = F.data === void 0 && Ln === void 0, I = Ue(() => {
295
- let e = /* @__PURE__ */ new Map(), t = Ln?.vibecontrolsAgentHealthProbeStream ?? F.data?.vibecontrolsAgentHealthProbes ?? [];
295
+ }), { data: Ln } = s({ skip: !h }), Rn = I.data === void 0 && Ln === void 0, L = We(() => {
296
+ let e = /* @__PURE__ */ new Map(), t = Ln?.vibecontrolsAgentHealthProbeStream ?? I.data?.vibecontrolsAgentHealthProbes ?? [];
296
297
  for (let n of t) e.set(n.agentId, {
297
298
  agentId: n.agentId,
298
299
  healthy: n.healthy,
299
300
  errorMessage: n.errorMessage
300
301
  });
301
302
  return e;
302
- }, [F.data, Ln]), L = Ue(() => P ? Fe({
303
- id: P.id,
304
- isActive: P.isActive,
305
- metadata: P.metadata
306
- }, I, { probesLoading: Rn }) : "REGISTERING", [
307
- P,
308
- I,
303
+ }, [I.data, Ln]), R = We(() => F ? Ie({
304
+ id: F.id,
305
+ isActive: F.isActive,
306
+ metadata: F.metadata
307
+ }, L, { probesLoading: Rn }) : "REGISTERING", [
308
+ F,
309
+ L,
309
310
  Rn
310
- ]), zn = L === "STOPPED" || L === "OFFLINE", { active: R } = ye(P?.id ?? null), z = jt("vibes.tabs.iframe-host")?.value === !0, Bn = Ue(() => {
311
- if (!z || !P?.tunnelUrl) return [];
312
- let e = P.id, t = R ?? "default";
311
+ ]), zn = R === "STOPPED" || R === "OFFLINE", { active: z } = ye(F?.id ?? null), B = Mt("vibes.tabs.iframe-host")?.value === !0, Bn = We(() => {
312
+ if (!B || !F?.tunnelUrl) return [];
313
+ let e = F.id, t = z ?? "default";
313
314
  return [{
314
- tunnelUrl: P.tunnelUrl,
315
+ tunnelUrl: F.tunnelUrl,
315
316
  profile: t,
316
- label: P.name ?? P.id,
317
- mintIframeToken: async ({ pathPrefixes: n }) => Be(e, t, n)
317
+ label: F.name ?? F.id,
318
+ mintIframeToken: async ({ pathPrefixes: n }) => Ve(e, t, n)
318
319
  }];
319
320
  }, [
320
- z,
321
- P?.id,
322
- P?.tunnelUrl,
323
- P?.name,
324
- R
325
- ]), B = Pt(Bn, {
321
+ B,
322
+ F?.id,
323
+ F?.tunnelUrl,
324
+ F?.name,
325
+ z
326
+ ]), V = Ft(Bn, {
326
327
  mountPoint: "agent.detailTab",
327
- enabled: z && Bn.length > 0
328
- }), [V, Vn] = ze(Ue(() => {
329
- let e = B.data.filter((e) => e.contribution.mountPoint === "agent.detailTab").map((e) => e.contribution.id);
330
- return [...It, ...e];
331
- }, [B.data]), "overview"), [Hn, Un] = p(!1), Wn = f(!1);
328
+ enabled: B && Bn.length > 0
329
+ }), [H, Vn] = Be(We(() => {
330
+ let e = V.data.filter((e) => e.contribution.mountPoint === "agent.detailTab").map((e) => e.contribution.id);
331
+ return [...Lt, ...e];
332
+ }, [V.data]), "overview"), [Hn, Un] = p(!1), Wn = f(!1);
332
333
  d(() => {
333
- P && !Wn.current && (Wn.current = !0, Wt().catch(() => {}));
334
- }, [P, Wt]);
334
+ F && !Wn.current && (Wn.current = !0, Gt().catch(() => {}));
335
+ }, [F, Gt]);
335
336
  let [Gn] = ne(), Kn = f(!1);
336
337
  d(() => {
337
- if (!P || Kn.current) return;
338
- let e = !!(P.appId && P.appClientId), t = !!P.tunnelUrl;
339
- !e || !t || (Kn.current = !0, Gn({ variables: { input: { agentId: P.id } } }).then(() => {
340
- N().catch(() => {});
338
+ if (!F || Kn.current) return;
339
+ let e = !!(F.appId && F.appClientId), t = !!F.tunnelUrl;
340
+ !e || !t || (Kn.current = !0, Gn({ variables: { input: { agentId: F.id } } }).then(() => {
341
+ P().catch(() => {});
341
342
  }).catch(() => {}));
342
343
  }, [
343
- P,
344
+ F,
344
345
  Gn,
345
- N
346
+ P
346
347
  ]);
347
- let [H, qn] = p([]), [Jn, Yn] = p([]), [Xn, Zn] = p(!0), [U, W] = p(null), [Qn, G] = p(null), [$n, er] = p(!1), [tr, nr] = p(!1), [rr, ir] = p(!1), [ar, or] = p(!1), [sr, cr] = p(!1), [lr, ur] = p("plugin"), dr = f(null), [K, fr] = p("installed"), [q, pr] = p(""), [J, mr] = p([]), [hr, gr] = p(!1), [_r, vr] = p(null), [Y, yr] = p(null), [br] = e(), [xr] = ee(), [Sr] = te(), [Cr] = ae(), X = u(async () => {
348
- if (P?.id) {
349
- Zn(!0), G(null);
348
+ let [U, qn] = p([]), [Jn, Yn] = p([]), [Xn, Zn] = p(!0), [W, G] = p(null), [Qn, K] = p(null), [$n, er] = p(!1), [tr, nr] = p(!1), [rr, ir] = p(!1), [ar, or] = p(!1), [sr, cr] = p(!1), [lr, ur] = p("plugin"), dr = f(null), [q, fr] = p("installed"), [J, pr] = p(""), [Y, mr] = p([]), [hr, gr] = p(!1), [_r, vr] = p(null), [yr, br] = p(null), [xr] = e(), [Sr] = ee(), [Cr] = te(), [wr] = ae(), X = u(async () => {
349
+ if (F?.id) {
350
+ Zn(!0), K(null);
350
351
  try {
351
- let { data: e } = await br({ variables: {
352
- agentId: P.id,
353
- profile: R
352
+ let { data: e } = await xr({ variables: {
353
+ agentId: F.id,
354
+ profile: z
354
355
  } }), t = e?.agentPlugins;
355
356
  if (t) {
356
357
  let e = (t.installed || []).map((e) => ({
@@ -378,34 +379,34 @@ function Lt() {
378
379
  tags: [...e.tags],
379
380
  installed: e.installed
380
381
  }));
381
- qn(e), Yn(n), t.error && G(t.error);
382
+ qn(e), Yn(n), t.error && K(t.error);
382
383
  }
383
384
  } catch {
384
- G("Agent unreachable — unable to fetch plugin list");
385
+ K("Agent unreachable — unable to fetch plugin list");
385
386
  } finally {
386
387
  Zn(!1);
387
388
  }
388
389
  }
389
390
  }, [
390
- P?.id,
391
- br,
392
- R
391
+ F?.id,
392
+ xr,
393
+ z
393
394
  ]);
394
395
  d(() => {
395
- if (!P?.id) return;
396
- let e = `${P.id}:${R}`;
396
+ if (!F?.id) return;
397
+ let e = `${F.id}:${z}`;
397
398
  dr.current !== e && (dr.current = e, X());
398
399
  }, [
399
- P?.id,
400
- R,
400
+ F?.id,
401
+ z,
401
402
  X
402
403
  ]);
403
- let wr = u(async (e) => {
404
- if (P?.id) {
405
- W(e);
404
+ let Tr = u(async (e) => {
405
+ if (F?.id) {
406
+ G(e);
406
407
  try {
407
- let { data: t } = await xr({ variables: {
408
- agentId: P.id,
408
+ let { data: t } = await Sr({ variables: {
409
+ agentId: F.id,
409
410
  packageName: e
410
411
  } });
411
412
  if (t?.installAgentPlugin?.success) await X();
@@ -415,62 +416,62 @@ function Lt() {
415
416
  de(), ur("plugin"), cr(!0);
416
417
  return;
417
418
  }
418
- G(e instanceof Error ? e.message : S("agentDetails.pluginInstallFailed", "Failed to install plugin")), setTimeout(() => G(null), 5e3);
419
+ K(e instanceof Error ? e.message : S("agentDetails.pluginInstallFailed", "Failed to install plugin")), setTimeout(() => K(null), 5e3);
419
420
  } finally {
420
- W(null);
421
+ G(null);
421
422
  }
422
423
  }
423
424
  }, [
424
- P?.id,
425
- xr,
425
+ F?.id,
426
+ Sr,
426
427
  X,
427
428
  S
428
- ]), Tr = u(async (e) => {
429
- if (P?.id && window.confirm(S("agentDetails.removePluginConfirm", "Remove plugin {{packageName}}?", { packageName: e }))) {
430
- W(e);
429
+ ]), Er = u(async (e) => {
430
+ if (F?.id && window.confirm(S("agentDetails.removePluginConfirm", "Remove plugin {{packageName}}?", { packageName: e }))) {
431
+ G(e);
431
432
  try {
432
- let { data: t } = await Sr({ variables: {
433
- agentId: P.id,
433
+ let { data: t } = await Cr({ variables: {
434
+ agentId: F.id,
434
435
  packageName: e
435
436
  } });
436
437
  if (t?.removeAgentPlugin?.success) await X();
437
438
  else throw Error(t?.removeAgentPlugin?.error || S("agentDetails.removeFailed", "Remove failed"));
438
439
  } catch (e) {
439
- G(e instanceof Error ? e.message : S("agentDetails.pluginRemoveFailed", "Failed to remove plugin")), setTimeout(() => G(null), 5e3);
440
+ K(e instanceof Error ? e.message : S("agentDetails.pluginRemoveFailed", "Failed to remove plugin")), setTimeout(() => K(null), 5e3);
440
441
  } finally {
441
- W(null);
442
+ G(null);
442
443
  }
443
444
  }
444
445
  }, [
445
- P?.id,
446
- Sr,
446
+ F?.id,
447
+ Cr,
447
448
  X,
448
449
  S
449
- ]), Er = u(async (e) => {
450
- if (!P?.id) return;
450
+ ]), Dr = u(async (e) => {
451
+ if (!F?.id) return;
451
452
  let t = window.prompt(S("agentDetails.updatePluginPrompt", "Update {{packageName}} to which version? Leave blank for latest.", { packageName: e }));
452
453
  if (t === null) return;
453
454
  let n = t.trim() || void 0;
454
- W(e);
455
+ G(e);
455
456
  try {
456
- let { data: t } = await Cr({ variables: {
457
- agentId: P.id,
457
+ let { data: t } = await wr({ variables: {
458
+ agentId: F.id,
458
459
  packageName: e,
459
460
  version: n ?? null
460
461
  } }), r = t?.updateAgentPlugin;
461
462
  if (r?.ok) await X();
462
463
  else throw Error(r?.error || S("agentDetails.updateFailed", "Plugin update failed"));
463
464
  } catch (e) {
464
- G(e instanceof Error ? e.message : S("agentDetails.pluginUpdateFailed", "Failed to update plugin")), setTimeout(() => G(null), 5e3);
465
+ K(e instanceof Error ? e.message : S("agentDetails.pluginUpdateFailed", "Failed to update plugin")), setTimeout(() => K(null), 5e3);
465
466
  } finally {
466
- W(null);
467
+ G(null);
467
468
  }
468
469
  }, [
469
- P?.id,
470
- Cr,
470
+ F?.id,
471
+ wr,
471
472
  X,
472
473
  S
473
- ]), Z = P?.sessions || [], Q = P?.vibes || [], Dr = u(async () => {
474
+ ]), Z = F?.sessions || [], Q = F?.vibes || [], Or = u(async () => {
474
475
  gr(!0), vr(null);
475
476
  try {
476
477
  let e = await (await fetch(typeof window < "u" && window.__BURDENOFF_GLOBAL_GATEWAY__ || "/global/graphql", {
@@ -493,16 +494,16 @@ function Lt() {
493
494
  }
494
495
  }, []);
495
496
  d(() => {
496
- K === "store" && J.length === 0 && !hr && Dr();
497
+ q === "store" && Y.length === 0 && !hr && Or();
497
498
  }, [
498
- K,
499
- J.length,
499
+ q,
500
+ Y.length,
500
501
  hr,
501
- Dr
502
+ Or
502
503
  ]);
503
- let Or = u(async (e, t) => {
504
- if (P?.id) {
505
- yr(e);
504
+ let kr = u(async (e, t) => {
505
+ if (F?.id) {
506
+ br(e);
506
507
  try {
507
508
  let n = await (await fetch(typeof window < "u" && window.__BURDENOFF_WSPACE_GATEWAY__ || "/workspaces/graphql", {
508
509
  method: "POST",
@@ -511,7 +512,7 @@ function Lt() {
511
512
  body: JSON.stringify({
512
513
  query: "mutation InstallStorePlugin($agentId: ID!, $productId: ID!, $licenseKey: String) {\n installStorePluginOnAgent(agentId: $agentId, productId: $productId, licenseKey: $licenseKey) {\n success\n error\n }\n }",
513
514
  variables: {
514
- agentId: P.id,
515
+ agentId: F.id,
515
516
  productId: e,
516
517
  licenseKey: t
517
518
  }
@@ -524,48 +525,48 @@ function Lt() {
524
525
  } catch (e) {
525
526
  vr(e instanceof Error ? e.message : "Install failed");
526
527
  } finally {
527
- yr(null);
528
+ br(null);
528
529
  }
529
530
  }
530
- }, [P?.id, X]);
531
+ }, [F?.id, X]);
531
532
  d(() => {
532
- if (typeof window > "u" || !P?.id) return;
533
+ if (typeof window > "u" || !F?.id) return;
533
534
  let e = new URLSearchParams(window.location.search), t = e.get("install"), n = e.get("licenseKey");
534
- if (t && t !== Y) {
535
- fr("store"), Or(t, n);
535
+ if (t && t !== yr) {
536
+ fr("store"), kr(t, n);
536
537
  let e = new URL(window.location.href);
537
538
  e.searchParams.delete("install"), e.searchParams.delete("licenseKey"), window.history.replaceState({}, "", e.toString());
538
539
  }
539
540
  }, [
540
- P?.id,
541
- Or,
542
- Y
541
+ F?.id,
542
+ kr,
543
+ yr
543
544
  ]);
544
- let kr = u(async () => {
545
- if (!P?.id) return null;
545
+ let Ar = u(async () => {
546
+ if (!F?.id) return null;
546
547
  if (D) return D;
547
- wn(!0), En(null);
548
+ Tn(!0), Dn(null);
548
549
  try {
549
- let e = (await Dn({ variables: { agentId: P.id } })).data?.vibecontrolsAgentSecretReveal ?? null;
550
- return e ? (Sn(e), e) : (En("No API key configured"), null);
550
+ let e = (await On({ variables: { agentId: F.id } })).data?.vibecontrolsAgentSecretReveal ?? null;
551
+ return e ? (Cn(e), e) : (Dn("No API key configured"), null);
551
552
  } catch (e) {
552
- return En(e instanceof Error ? e.message : "Reveal failed"), null;
553
+ return Dn(e instanceof Error ? e.message : "Reveal failed"), null;
553
554
  } finally {
554
- wn(!1);
555
+ Tn(!1);
555
556
  }
556
557
  }, [
557
- P?.id,
558
+ F?.id,
558
559
  D,
559
- Dn
560
+ On
560
561
  ]);
561
- if (Bt) return /* @__PURE__ */ y("div", {
562
+ if (Vt) return /* @__PURE__ */ y("div", {
562
563
  className: "flex items-center justify-center min-h-[400px]",
563
564
  children: /* @__PURE__ */ y("p", {
564
565
  className: "text-text-secondary",
565
566
  children: "Loading permissions…"
566
567
  })
567
568
  });
568
- if (Vt && (Vt.permissionStrings?.length ?? 0) > 0 && !zt(Ce.AGENT_READ)) return /* @__PURE__ */ y("div", {
569
+ if (Ht && (Ht.permissionStrings?.length ?? 0) > 0 && !Bt(Ce.AGENT_READ)) return /* @__PURE__ */ y("div", {
569
570
  className: "flex items-center justify-center min-h-[400px]",
570
571
  children: /* @__PURE__ */ b("div", {
571
572
  className: "text-center space-y-2",
@@ -580,49 +581,49 @@ function Lt() {
580
581
  });
581
582
  let $ = () => {
582
583
  x("/agents");
583
- }, Ar = async (e) => {
584
- if (!(!P?.id || C)) {
585
- qt(e), Yt(null);
584
+ }, jr = async (e) => {
585
+ if (!(!F?.id || C)) {
586
+ Jt(e), Xt(null);
586
587
  try {
587
- let t = e === "start" ? await Gt({ variables: { agentId: P.id } }) : await Kt({ variables: { agentId: P.id } }), n = e === "start" ? t.data?.startVibecontrolsAgent : t.data?.stopVibecontrolsAgent;
588
+ let t = e === "start" ? await Kt({ variables: { agentId: F.id } }) : await qt({ variables: { agentId: F.id } }), n = e === "start" ? t.data?.startVibecontrolsAgent : t.data?.stopVibecontrolsAgent;
588
589
  if (!n || n.success === !1) throw Error(n?.error || `Failed to ${e} agent`);
589
- T(e === "start" ? S("agentDetails.agentStarted", "Agent started") : S("agentDetails.agentStopped", "Agent stopped")), setTimeout(() => T(null), 3e3), await Promise.all([N(), F.refetch()]).catch(() => {});
590
+ T(e === "start" ? S("agentDetails.agentStarted", "Agent started") : S("agentDetails.agentStopped", "Agent stopped")), setTimeout(() => T(null), 3e3), await Promise.all([P(), I.refetch()]).catch(() => {});
590
591
  } catch (t) {
591
592
  let n = t instanceof Error ? t.message : "";
592
- Yt(/unable to connect|fetch failed|timed? ?out|ECONN|agent returned 5|network/i.test(n) ? S("agentDetails.agentUnreachable", `Couldn't reach the agent to ${e} it — it may be offline or its tunnel is down. Start it from the host with: vibe start`) : n || S("agentDetails.lifecycleFailed", `Failed to ${e} agent`)), setTimeout(() => Yt(null), 6e3);
593
+ Xt(/unable to connect|fetch failed|timed? ?out|ECONN|agent returned 5|network/i.test(n) ? S("agentDetails.agentUnreachable", `Couldn't reach the agent to ${e} it — it may be offline or its tunnel is down. Start it from the host with: vibe start`) : n || S("agentDetails.lifecycleFailed", `Failed to ${e} agent`)), setTimeout(() => Xt(null), 6e3);
593
594
  } finally {
594
- qt(null);
595
+ Jt(null);
595
596
  }
596
597
  }
597
- }, jr = () => void Ar("start"), Mr = () => void Ar("stop"), Nr = async () => {
598
- await Promise.all([N(), F.refetch()]).catch(() => {}), x("/agents");
599
- }, Pr = () => {
600
- w(null), Qt(!0);
601
- }, Fr = async () => {
602
- if (!P?.id) return;
603
- let e = cn.trim();
604
- if (!e || e === P.name) {
605
- sn(!1);
598
+ }, Mr = () => void jr("start"), Nr = () => void jr("stop"), Pr = async () => {
599
+ await Promise.all([P(), I.refetch()]).catch(() => {}), x("/agents");
600
+ }, Fr = () => {
601
+ w(null), $t(!0);
602
+ }, Ir = async () => {
603
+ if (!F?.id) return;
604
+ let e = ln.trim();
605
+ if (!e || e === F.name) {
606
+ cn(!1);
606
607
  return;
607
608
  }
608
- un(!0), fn(null);
609
+ dn(!0), pn(null);
609
610
  try {
610
- let t = await Ht({ variables: {
611
- id: P.id,
611
+ let t = await Ut({ variables: {
612
+ id: F.id,
612
613
  input: { name: e }
613
614
  } });
614
615
  if (t.error) throw t.error;
615
- sn(!1);
616
+ cn(!1);
616
617
  } catch (e) {
617
- fn(e instanceof Error ? e.message : String(e));
618
+ pn(e instanceof Error ? e.message : String(e));
618
619
  } finally {
619
- un(!1);
620
+ dn(!1);
620
621
  }
621
- }, Ir = () => {
622
- sn(!1), ln(""), fn(null);
623
- }, Lr = async () => {
624
- if (!P?.id) return;
625
- let e = mn.current?.value?.trim(), t = hn.current?.value?.trim(), n = gn.current?.value?.trim(), r = _n.current?.value?.trim();
622
+ }, Lr = () => {
623
+ cn(!1), un(""), pn(null);
624
+ }, Rr = async () => {
625
+ if (!F?.id) return;
626
+ let e = hn.current?.value?.trim(), t = gn.current?.value?.trim(), n = _n.current?.value?.trim(), r = vn.current?.value?.trim();
626
627
  if (!e) {
627
628
  w(S("agentDetails.agentNameRequired", "Agent name is required"));
628
629
  return;
@@ -634,39 +635,39 @@ function Lt() {
634
635
  w(S("agentDetails.metadataJsonRequired", "Metadata must be valid JSON"));
635
636
  return;
636
637
  }
637
- tn(!0), w(null);
638
+ nn(!0), w(null);
638
639
  try {
639
- await Ht({ variables: {
640
- id: P.id,
640
+ await Ut({ variables: {
641
+ id: F.id,
641
642
  input: {
642
643
  name: e,
643
644
  ...t === void 0 ? {} : { tunnelUrl: t || null },
644
645
  aiContext: n || null,
645
646
  metadata: i
646
647
  }
647
- } }), Qt(!1), T(S("agentDetails.configurationUpdated", "Agent configuration updated successfully")), setTimeout(() => T(null), 3e3);
648
+ } }), $t(!1), T(S("agentDetails.configurationUpdated", "Agent configuration updated successfully")), setTimeout(() => T(null), 3e3);
648
649
  } catch (e) {
649
650
  w(e instanceof Error ? e.message : S("agentDetails.configurationUpdateFailed", "Failed to update agent configuration"));
650
651
  } finally {
651
- tn(!1);
652
+ nn(!1);
652
653
  }
653
- }, Rr = async () => {
654
- let e = await kr();
654
+ }, zr = async () => {
655
+ let e = await Ar();
655
656
  if (e) try {
656
- await xe(e), be() && Se("API key copied"), xn(!0), setTimeout(() => xn(!1), 2e3);
657
+ await xe(e), be() && Se("API key copied"), Sn(!0), setTimeout(() => Sn(!1), 2e3);
657
658
  } catch {
658
659
  console.error("Failed to copy API key");
659
660
  }
660
- }, zr = async () => {
661
- vn || await kr(), yn((e) => !e);
662
- }, Br = () => {
663
- P?.id && (nr(!1), ir(!1), er(!0));
664
- }, Vr = async () => {
665
- if (P?.id) {
661
+ }, Br = async () => {
662
+ yn || await Ar(), bn((e) => !e);
663
+ }, Vr = () => {
664
+ F?.id && (nr(!1), ir(!1), er(!0));
665
+ }, Hr = async () => {
666
+ if (F?.id) {
666
667
  or(!0);
667
668
  try {
668
- await Ut({ variables: {
669
- id: P.id,
669
+ await Wt({ variables: {
670
+ id: F.id,
670
671
  uninstallFromTarget: tr,
671
672
  deleteTarget: rr
672
673
  } }), er(!1), $();
@@ -676,34 +677,34 @@ function Lt() {
676
677
  or(!1);
677
678
  }
678
679
  }
679
- }, Hr = (e) => {
680
+ }, Ur = (e) => {
680
681
  x(`/sessions/${e}`);
681
- }, Ur = () => {
682
+ }, Wr = () => {
682
683
  A(null), k(!0);
683
- }, Wr = async () => {
684
- let e = M.current?.value?.trim(), t = An.current?.value, n = jn.current?.value?.trim() || void 0, r = Mn.current?.value?.trim() || void 0;
684
+ }, Gr = async () => {
685
+ let e = M.current?.value?.trim(), t = jn.current?.value, n = N.current?.value?.trim() || void 0, r = Mn.current?.value?.trim() || void 0;
685
686
  if (!e) {
686
687
  A(S("vibeDetails.sessionNameRequired", "Session name is required"));
687
688
  return;
688
689
  }
689
- if (!P?.id) {
690
+ if (!F?.id) {
690
691
  A(S("agentDetails.noAgent", "Agent not loaded"));
691
692
  return;
692
693
  }
693
- let i = I.get(P.id);
694
+ let i = L.get(F.id);
694
695
  if (i && !i.healthy) {
695
696
  A(S("sessions.agentNotHealthy", "The selected agent isn’t fully reachable right now. Please wait for the agent badge to turn green and retry.") + (i.errorMessage ? ` (${i.errorMessage})` : ""));
696
697
  return;
697
698
  }
698
- kn(!0), A(null);
699
+ An(!0), A(null);
699
700
  try {
700
701
  await Nn({ variables: { input: {
701
702
  name: e,
702
703
  type: t || "TERMINAL",
703
- agentId: P.id,
704
+ agentId: F.id,
704
705
  command: n,
705
706
  workingDirectory: r
706
- } } }), k(!1), M.current && (M.current.value = ""), An.current && (An.current.selectedIndex = 0), jn.current && (jn.current.value = ""), Mn.current && (Mn.current.value = ""), T(S("sessions.createdSuccess", "Session created successfully")), setTimeout(() => T(null), 3e3);
707
+ } } }), k(!1), M.current && (M.current.value = ""), jn.current && (jn.current.selectedIndex = 0), N.current && (N.current.value = ""), Mn.current && (Mn.current.value = ""), T(S("sessions.createdSuccess", "Session created successfully")), setTimeout(() => T(null), 3e3);
707
708
  } catch (e) {
708
709
  if (ue(e)) {
709
710
  k(!1), de(), ur("session"), cr(!0);
@@ -711,46 +712,46 @@ function Lt() {
711
712
  }
712
713
  A(e instanceof Error ? e.message : S("sessions.failedCreate", "Failed to create session"));
713
714
  } finally {
714
- kn(!1);
715
+ An(!1);
715
716
  }
716
- }, Gr = (e) => {
717
- x(`/vibes/${e}`);
718
717
  }, Kr = (e) => {
718
+ x(`/vibes/${e}`);
719
+ }, qr = (e) => {
719
720
  if (!e) return S("health.never", "Never");
720
721
  let t = Date.now() - new Date(e).getTime();
721
722
  return t < 6e4 ? S("health.justNow", "Just now") : t < 36e5 ? S("agentDetails.minutesAgo", "{{count}}m ago", { count: Math.floor(t / 6e4) }) : t < 864e5 ? S("agentDetails.hoursAgo", "{{count}}h ago", { count: Math.floor(t / 36e5) }) : new Date(e).toLocaleDateString();
722
723
  };
723
- if (Fn && !P) return /* @__PURE__ */ b(Nt, {
724
+ if (Fn && !F) return /* @__PURE__ */ b(Pt, {
724
725
  className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
725
726
  children: [/* @__PURE__ */ b("button", {
726
727
  type: "button",
727
728
  onClick: $,
728
729
  className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
729
- children: [/* @__PURE__ */ y(Ge, { className: "size-4" }), S("agentDetails.backToAgents", "Back to Agents")]
730
- }), /* @__PURE__ */ y(we, { variant: "detail" })]
730
+ children: [/* @__PURE__ */ y(Ke, { className: "size-4" }), S("agentDetails.backToAgents", "Back to Agents")]
731
+ }), /* @__PURE__ */ y(Te, { variant: "detail" })]
731
732
  });
732
- if (In && !P) return /* @__PURE__ */ b(Nt, {
733
+ if (In && !F) return /* @__PURE__ */ b(Pt, {
733
734
  className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
734
735
  children: [/* @__PURE__ */ b("button", {
735
736
  type: "button",
736
737
  onClick: $,
737
738
  className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
738
- children: [/* @__PURE__ */ y(Ge, { className: "size-4" }), S("agentDetails.backToAgents", "Back to Agents")]
739
+ children: [/* @__PURE__ */ y(Ke, { className: "size-4" }), S("agentDetails.backToAgents", "Back to Agents")]
739
740
  }), /* @__PURE__ */ y(he, {
740
741
  title: S("agentDetails.failedLoad", "Failed to load agent"),
741
742
  message: In.message,
742
- onRetry: () => N()
743
+ onRetry: () => P()
743
744
  })]
744
745
  });
745
- if (!P) return /* @__PURE__ */ b(Nt, {
746
+ if (!F) return /* @__PURE__ */ b(Pt, {
746
747
  className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
747
748
  children: [/* @__PURE__ */ b("button", {
748
749
  type: "button",
749
750
  onClick: $,
750
751
  className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
751
- children: [/* @__PURE__ */ y(Ge, { className: "size-4" }), S("agentDetails.backToAgents", "Back to Agents")]
752
+ children: [/* @__PURE__ */ y(Ke, { className: "size-4" }), S("agentDetails.backToAgents", "Back to Agents")]
752
753
  }), /* @__PURE__ */ y(_e, {
753
- icon: /* @__PURE__ */ y(_t, { className: "size-8 text-text-secondary" }),
754
+ icon: /* @__PURE__ */ y(vt, { className: "size-8 text-text-secondary" }),
754
755
  title: S("agentDetails.notFound", "Agent not found"),
755
756
  description: `${S("agentDetails.notFoundDescriptionPrefix", "No agent with ID")} "${h}" ${S("agentDetails.notFoundDescriptionSuffix", "exists")}`,
756
757
  action: /* @__PURE__ */ y("button", {
@@ -761,95 +762,95 @@ function Lt() {
761
762
  })
762
763
  })]
763
764
  });
764
- let qr = [
765
+ let Jr = [
765
766
  {
766
767
  id: "overview",
767
768
  label: S("nav.overview", "Overview"),
768
- icon: _t
769
+ icon: vt
769
770
  },
770
771
  {
771
772
  id: "profiles",
772
773
  label: S("agentDetails.profiles", "Profiles"),
773
- icon: wt
774
+ icon: Tt
774
775
  },
775
776
  {
776
777
  id: "security",
777
778
  label: S("agentDetails.security", "Security"),
778
- icon: yt
779
+ icon: bt
779
780
  },
780
781
  {
781
782
  id: "plugins",
782
783
  label: S("agentDetails.plugins", "Plugins"),
783
- icon: pt,
784
- badge: `${H.length}`
784
+ icon: mt,
785
+ badge: `${U.length}`
785
786
  },
786
787
  {
787
788
  id: "sessions",
788
789
  label: S("nav.sessions", "Sessions"),
789
- icon: St,
790
+ icon: Ct,
790
791
  badge: `${Z.length}`
791
792
  },
792
793
  {
793
794
  id: "logs",
794
795
  label: S("nav.logs", "Logs"),
795
- icon: ht
796
+ icon: gt
796
797
  },
797
798
  {
798
799
  id: "connection",
799
800
  label: S("agentDetails.connection", "Connection Log"),
800
- icon: ht
801
+ icon: gt
801
802
  },
802
803
  {
803
804
  id: "vibes",
804
805
  label: S("nav.vibes", "Vibes"),
805
- icon: Et,
806
+ icon: Dt,
806
807
  badge: `${Q.length}`
807
808
  },
808
809
  {
809
810
  id: "notes",
810
811
  label: S("vibeDetails.notes", "Notes"),
811
- icon: at
812
+ icon: ot
812
813
  },
813
814
  {
814
815
  id: "aliases",
815
816
  label: S("agentDetails.aliases", "Aliases"),
816
- icon: Ze
817
+ icon: Qe
817
818
  },
818
819
  {
819
820
  id: "backup",
820
821
  label: S("agentDetails.backup", "Backup"),
821
- icon: et
822
+ icon: tt
822
823
  },
823
824
  {
824
825
  id: "maintenance",
825
826
  label: S("agentDetails.maintenance.tab", "Maintenance"),
826
- icon: Tt
827
+ icon: Et
827
828
  }
828
- ], Jr = Z.filter((e) => e.status === "RUNNING").length;
829
- return P?.tunnelUrl, /* @__PURE__ */ b(Nt, {
829
+ ], Yr = Z.filter((e) => e.status === "RUNNING").length;
830
+ return F?.tunnelUrl, /* @__PURE__ */ b(Pt, {
830
831
  className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
831
832
  children: [
832
- nn && /* @__PURE__ */ y("div", {
833
+ rn && /* @__PURE__ */ y("div", {
833
834
  className: "fixed top-4 left-4 right-4 sm:left-auto z-50 bg-status-success-bg text-status-success-text px-4 py-3 rounded-md shadow-lg",
834
- children: nn
835
+ children: rn
835
836
  }),
836
- Jt && /* @__PURE__ */ y("div", {
837
+ Yt && /* @__PURE__ */ y("div", {
837
838
  className: "fixed top-16 left-4 right-4 sm:left-auto z-50 bg-status-error-bg text-status-error-text px-4 py-3 rounded-md shadow-lg",
838
- children: Jt
839
+ children: Yt
839
840
  }),
840
841
  /* @__PURE__ */ b("button", {
841
842
  type: "button",
842
843
  onClick: $,
843
844
  className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
844
- children: [/* @__PURE__ */ y(Ge, { className: "size-4" }), S("agentDetails.backToAgents", "Back to Agents")]
845
+ children: [/* @__PURE__ */ y(Ke, { className: "size-4" }), S("agentDetails.backToAgents", "Back to Agents")]
845
846
  }),
846
847
  /* @__PURE__ */ y(me, {
847
- title: P.name,
848
- description: P.hostname || S("agentDetails.noHostnameConfigured", "No hostname configured"),
848
+ title: F.name,
849
+ description: F.hostname || S("agentDetails.noHostnameConfigured", "No hostname configured"),
849
850
  breadcrumb: [{
850
851
  label: S("nav.agents", "Agents"),
851
- path: Rt ? `${Rt}/agents` : "/agents"
852
- }, { label: P.name }],
852
+ path: zt ? `${zt}/agents` : "/agents"
853
+ }, { label: F.name }],
853
854
  actions: /* @__PURE__ */ b("div", {
854
855
  className: "flex flex-wrap items-center gap-2",
855
856
  children: [
@@ -859,114 +860,114 @@ function Lt() {
859
860
  className: "flex items-center gap-2 px-3 py-2 bg-bg-sunken text-text-primary rounded-md hover:bg-bg-sunken/80 transition-colors",
860
861
  title: S("agentDetails.openAiChat", "Open AI chat with this agent"),
861
862
  "data-testid": "agent-open-ai-chat",
862
- children: [/* @__PURE__ */ y(qe, { className: "size-4" }), /* @__PURE__ */ y("span", {
863
+ children: [/* @__PURE__ */ y(Je, { className: "size-4" }), /* @__PURE__ */ y("span", {
863
864
  className: "hidden sm:inline",
864
865
  children: S("agentDetails.aiChat", "AI Chat")
865
866
  })]
866
867
  }),
867
868
  /* @__PURE__ */ y("button", {
868
869
  type: "button",
869
- onClick: () => N(),
870
+ onClick: () => P(),
870
871
  disabled: Fn,
871
872
  className: "flex items-center gap-2 px-3 py-2 bg-bg-sunken text-text-primary rounded-md hover:bg-bg-sunken/80 transition-colors disabled:opacity-50",
872
873
  title: S("common.refresh", "Refresh"),
873
- children: /* @__PURE__ */ y(mt, { className: `size-4 ${Fn ? "animate-spin" : ""}` })
874
+ children: /* @__PURE__ */ y(ht, { className: `size-4 ${Fn ? "animate-spin" : ""}` })
874
875
  }),
875
876
  zn ? /* @__PURE__ */ b("button", {
876
877
  type: "button",
877
- onClick: jr,
878
+ onClick: Mr,
878
879
  disabled: C !== null,
879
880
  "aria-busy": C === "start",
880
881
  className: "flex items-center gap-2 px-3 py-2 bg-status-success-bg text-status-success-text rounded-md hover:opacity-80 transition-colors disabled:opacity-60 disabled:cursor-not-allowed",
881
- children: [C === "start" ? /* @__PURE__ */ y(m, { className: "size-4 animate-spin" }) : /* @__PURE__ */ y(dt, { className: "size-4" }), C === "start" ? S("agentDetails.starting", "Starting…") : S("agentDetails.start", "Start")]
882
+ children: [C === "start" ? /* @__PURE__ */ y(m, { className: "size-4 animate-spin" }) : /* @__PURE__ */ y(ft, { className: "size-4" }), C === "start" ? S("agentDetails.starting", "Starting…") : S("agentDetails.start", "Start")]
882
883
  }) : /* @__PURE__ */ b("button", {
883
884
  type: "button",
884
- onClick: Mr,
885
+ onClick: Nr,
885
886
  disabled: C !== null,
886
887
  "aria-busy": C === "stop",
887
888
  className: "flex items-center gap-2 px-3 py-2 bg-bg-sunken text-text-primary rounded-md hover:bg-bg-sunken/80 transition-colors disabled:opacity-60 disabled:cursor-not-allowed",
888
- children: [C === "stop" ? /* @__PURE__ */ y(m, { className: "size-4 animate-spin" }) : /* @__PURE__ */ y(bt, { className: "size-4" }), C === "stop" ? S("agentDetails.stopping", "Stopping…") : S("sessions.stop", "Stop")]
889
+ children: [C === "stop" ? /* @__PURE__ */ y(m, { className: "size-4 animate-spin" }) : /* @__PURE__ */ y(xt, { className: "size-4" }), C === "stop" ? S("agentDetails.stopping", "Stopping…") : S("sessions.stop", "Stop")]
889
890
  }),
890
- L === "DEGRADED" && /* @__PURE__ */ b("button", {
891
+ R === "DEGRADED" && /* @__PURE__ */ b("button", {
891
892
  type: "button",
892
- onClick: jr,
893
+ onClick: Mr,
893
894
  disabled: C !== null,
894
895
  "aria-busy": C === "start",
895
896
  className: "flex items-center gap-2 px-3 py-2 bg-status-warning-bg text-status-warning-text rounded-md hover:opacity-80 transition-colors disabled:opacity-60 disabled:cursor-not-allowed",
896
- title: I.get(P.id)?.errorMessage ? `Retry lifecycle/start — last error: ${I.get(P.id)?.errorMessage}` : "Retry lifecycle/start",
897
- children: [C === "start" ? /* @__PURE__ */ y(m, { className: "size-4 animate-spin" }) : /* @__PURE__ */ y(mt, { className: "size-4" }), C === "start" ? S("agentDetails.reconnecting", "Reconnecting…") : S("agentDetails.reconnect", "Reconnect")]
897
+ title: L.get(F.id)?.errorMessage ? `Retry lifecycle/start — last error: ${L.get(F.id)?.errorMessage}` : "Retry lifecycle/start",
898
+ children: [C === "start" ? /* @__PURE__ */ y(m, { className: "size-4 animate-spin" }) : /* @__PURE__ */ y(ht, { className: "size-4" }), C === "start" ? S("agentDetails.reconnecting", "Reconnecting…") : S("agentDetails.reconnect", "Reconnect")]
898
899
  }),
899
- /* @__PURE__ */ y(Pe, {
900
- agentId: P.id,
901
- tunnelUrl: P.tunnelUrl || null,
902
- profile: R
900
+ /* @__PURE__ */ y(Fe, {
901
+ agentId: F.id,
902
+ tunnelUrl: F.tunnelUrl || null,
903
+ profile: z
903
904
  }),
904
905
  /* @__PURE__ */ b("button", {
905
906
  type: "button",
906
- onClick: Pr,
907
+ onClick: Fr,
907
908
  className: "flex items-center gap-2 px-3 py-2 bg-bg-sunken text-text-primary rounded-md hover:bg-bg-sunken/80 transition-colors",
908
- children: [/* @__PURE__ */ y(vt, { className: "size-4" }), S("agentDetails.configure", "Configure")]
909
+ children: [/* @__PURE__ */ y(yt, { className: "size-4" }), S("agentDetails.configure", "Configure")]
909
910
  }),
910
911
  /* @__PURE__ */ b("button", {
911
912
  type: "button",
912
- onClick: Br,
913
+ onClick: Vr,
913
914
  className: "flex items-center gap-2 px-3 py-2 bg-status-error-bg text-status-error-text rounded-md hover:opacity-80 transition-colors",
914
- children: [/* @__PURE__ */ y(Ct, { className: "size-4" }), S("sessions.remove", "Remove")]
915
+ children: [/* @__PURE__ */ y(wt, { className: "size-4" }), S("sessions.remove", "Remove")]
915
916
  })
916
917
  ]
917
918
  })
918
919
  }),
919
920
  /* @__PURE__ */ y("div", {
920
921
  className: "flex items-center gap-2 -mt-2",
921
- children: on ? /* @__PURE__ */ b(v, { children: [
922
+ children: sn ? /* @__PURE__ */ b(v, { children: [
922
923
  /* @__PURE__ */ y("input", {
923
- ref: pn,
924
+ ref: mn,
924
925
  type: "text",
925
- value: cn,
926
- onChange: (e) => ln(e.target.value),
926
+ value: ln,
927
+ onChange: (e) => un(e.target.value),
927
928
  onKeyDown: (e) => {
928
- e.key === "Enter" && !E ? Fr() : e.key === "Escape" && Ir();
929
+ e.key === "Enter" && !E ? Ir() : e.key === "Escape" && Lr();
929
930
  },
930
931
  disabled: E,
931
932
  maxLength: 120,
932
933
  "aria-label": S("agentDetails.renameInput", "New agent name"),
933
934
  className: "flex-1 max-w-md px-3 py-1.5 text-sm bg-bg-surface border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
934
- placeholder: P.name,
935
+ placeholder: F.name,
935
936
  "data-testid": "agent-details-rename-input"
936
937
  }),
937
938
  /* @__PURE__ */ b("button", {
938
939
  type: "button",
939
- onClick: () => void Fr(),
940
- disabled: !cn.trim() || cn.trim() === P.name || E,
940
+ onClick: () => void Ir(),
941
+ disabled: !ln.trim() || ln.trim() === F.name || E,
941
942
  className: "inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors disabled:opacity-60 disabled:cursor-not-allowed",
942
943
  "data-testid": "agent-details-rename-save",
943
- children: [E ? /* @__PURE__ */ y(m, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ y(Je, { className: "size-3.5" }), S("agentDetails.saveName", "Save")]
944
+ children: [E ? /* @__PURE__ */ y(m, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ y(Ye, { className: "size-3.5" }), S("agentDetails.saveName", "Save")]
944
945
  }),
945
946
  /* @__PURE__ */ y("button", {
946
947
  type: "button",
947
- onClick: Ir,
948
+ onClick: Lr,
948
949
  disabled: E,
949
950
  className: "inline-flex items-center gap-1.5 px-3 py-1.5 text-xs text-text-secondary hover:text-text-primary disabled:opacity-60",
950
951
  "data-testid": "agent-details-rename-cancel",
951
952
  children: S("common.cancel", "Cancel")
952
953
  }),
953
- dn && /* @__PURE__ */ y("span", {
954
+ fn && /* @__PURE__ */ y("span", {
954
955
  className: "text-xs text-status-error-text",
955
956
  role: "alert",
956
- children: dn
957
+ children: fn
957
958
  })
958
959
  ] }) : /* @__PURE__ */ b("button", {
959
960
  type: "button",
960
961
  onClick: () => {
961
- fn(null), ln(P.name), sn(!0), requestAnimationFrame(() => pn.current?.select());
962
+ pn(null), un(F.name), cn(!0), requestAnimationFrame(() => mn.current?.select());
962
963
  },
963
964
  className: "inline-flex items-center gap-1.5 text-xs text-text-secondary hover:text-text-primary transition-colors",
964
965
  title: S("agentDetails.renameTooltip", "Rename this agent"),
965
966
  "data-testid": "agent-details-rename-trigger",
966
- children: [/* @__PURE__ */ y(nt, { className: "size-3.5" }), S("agentDetails.rename", "Rename")]
967
+ children: [/* @__PURE__ */ y(rt, { className: "size-3.5" }), S("agentDetails.rename", "Rename")]
967
968
  })
968
969
  }),
969
- L === "DEGRADED" && /* @__PURE__ */ b("div", {
970
+ R === "DEGRADED" && /* @__PURE__ */ b("div", {
970
971
  role: "status",
971
972
  "aria-live": "polite",
972
973
  className: "flex items-start gap-3 rounded-lg border border-status-warning-border bg-status-warning-bg/30 px-4 py-3 text-sm text-text-primary",
@@ -979,11 +980,11 @@ function Lt() {
979
980
  className: "font-medium",
980
981
  children: S("agentDetails.degradedBanner.title", "Agent is degraded — auto-reconnecting in the background")
981
982
  }),
982
- I.get(P.id)?.errorMessage && /* @__PURE__ */ y("p", {
983
+ L.get(F.id)?.errorMessage && /* @__PURE__ */ y("p", {
983
984
  className: "text-xs text-text-secondary",
984
985
  children: /* @__PURE__ */ y("span", {
985
986
  className: "font-mono text-status-warning-text",
986
- children: I.get(P.id)?.errorMessage
987
+ children: L.get(F.id)?.errorMessage
987
988
  })
988
989
  }),
989
990
  /* @__PURE__ */ y("p", {
@@ -1009,13 +1010,13 @@ function Lt() {
1009
1010
  className: "flex items-center gap-3",
1010
1011
  children: [/* @__PURE__ */ y("div", {
1011
1012
  className: "size-10 rounded-lg bg-bg-sunken flex items-center justify-center",
1012
- children: /* @__PURE__ */ y(_t, { className: "size-5 text-text-secondary" })
1013
+ children: /* @__PURE__ */ y(vt, { className: "size-5 text-text-secondary" })
1013
1014
  }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
1014
1015
  className: "text-sm text-text-secondary",
1015
1016
  children: S("sessions.filterStatus", "Status")
1016
- }), /* @__PURE__ */ y(je, {
1017
- status: L,
1018
- reason: I.get(P.id)?.errorMessage ?? (P.lastGatewayAuthPushStatus === "failed" ? P.lastGatewayAuthPushError ?? "Gateway-auth push failed" : null),
1017
+ }), /* @__PURE__ */ y(Me, {
1018
+ status: R,
1019
+ reason: L.get(F.id)?.errorMessage ?? (F.lastGatewayAuthPushStatus === "failed" ? F.lastGatewayAuthPushError ?? "Gateway-auth push failed" : null),
1019
1020
  linkTo: "?tab=connection",
1020
1021
  onClick: (e) => {
1021
1022
  e.preventDefault(), Vn("connection");
@@ -1029,16 +1030,16 @@ function Lt() {
1029
1030
  className: "flex items-center gap-3",
1030
1031
  children: [/* @__PURE__ */ y("div", {
1031
1032
  className: "size-10 rounded-lg bg-bg-sunken flex items-center justify-center",
1032
- children: /* @__PURE__ */ y($e, { className: "size-5 text-text-secondary" })
1033
+ children: /* @__PURE__ */ y(et, { className: "size-5 text-text-secondary" })
1033
1034
  }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
1034
1035
  className: "text-sm text-text-secondary",
1035
1036
  children: S("analytics.platform", "Platform")
1036
1037
  }), /* @__PURE__ */ b("p", {
1037
1038
  className: "font-semibold text-text-primary",
1038
1039
  children: [
1039
- P.platform,
1040
+ F.platform,
1040
1041
  "/",
1041
- P.architecture
1042
+ F.architecture
1042
1043
  ]
1043
1044
  })] })]
1044
1045
  })
@@ -1049,13 +1050,13 @@ function Lt() {
1049
1050
  className: "flex items-center gap-3",
1050
1051
  children: [/* @__PURE__ */ y("div", {
1051
1052
  className: "size-10 rounded-lg bg-bg-sunken flex items-center justify-center",
1052
- children: /* @__PURE__ */ y(ot, { className: "size-5 text-text-secondary" })
1053
+ children: /* @__PURE__ */ y(st, { className: "size-5 text-text-secondary" })
1053
1054
  }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
1054
1055
  className: "text-sm text-text-secondary",
1055
1056
  children: S("agentDetails.version", "Version")
1056
1057
  }), /* @__PURE__ */ b("p", {
1057
1058
  className: "font-semibold text-text-primary",
1058
- children: ["v", P.version]
1059
+ children: ["v", F.version]
1059
1060
  })] })]
1060
1061
  })
1061
1062
  }),
@@ -1065,14 +1066,14 @@ function Lt() {
1065
1066
  className: "flex items-center gap-3",
1066
1067
  children: [/* @__PURE__ */ y("div", {
1067
1068
  className: "size-10 rounded-lg bg-bg-sunken flex items-center justify-center",
1068
- children: /* @__PURE__ */ y(St, { className: "size-5 text-text-secondary" })
1069
+ children: /* @__PURE__ */ y(Ct, { className: "size-5 text-text-secondary" })
1069
1070
  }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
1070
1071
  className: "text-sm text-text-secondary",
1071
1072
  children: S("nav.sessions", "Sessions")
1072
1073
  }), /* @__PURE__ */ b("p", {
1073
1074
  className: "font-semibold text-text-primary",
1074
1075
  children: [
1075
- Jr,
1076
+ Yr,
1076
1077
  " ",
1077
1078
  S("health.active", "active")
1078
1079
  ]
@@ -1087,8 +1088,8 @@ function Lt() {
1087
1088
  className: "flex gap-1 -mb-px overflow-x-auto pb-1",
1088
1089
  "aria-label": S("agentDetails.tabsAriaLabel", "Agent tabs"),
1089
1090
  children: [
1090
- qr.map((e) => {
1091
- let t = e.icon, n = V === e.id;
1091
+ Jr.map((e) => {
1092
+ let t = e.icon, n = H === e.id;
1092
1093
  return /* @__PURE__ */ b("button", {
1093
1094
  type: "button",
1094
1095
  onClick: () => Vn(e.id),
@@ -1105,8 +1106,8 @@ function Lt() {
1105
1106
  ]
1106
1107
  }, e.id);
1107
1108
  }),
1108
- z && B.data.map((e) => {
1109
- let t = V === e.contribution.id;
1109
+ B && V.data.map((e) => {
1110
+ let t = H === e.contribution.id;
1110
1111
  return /* @__PURE__ */ y("button", {
1111
1112
  type: "button",
1112
1113
  onClick: () => Vn(e.contribution.id),
@@ -1117,7 +1118,7 @@ function Lt() {
1117
1118
  children: e.contribution.title
1118
1119
  }, `plugin-${e.contribution.id}`);
1119
1120
  }),
1120
- z && P && /* @__PURE__ */ b("button", {
1121
+ B && F && /* @__PURE__ */ b("button", {
1121
1122
  type: "button",
1122
1123
  onClick: () => Un(!0),
1123
1124
  className: "flex shrink-0 items-center gap-1 p-2 text-xs sm:text-sm border-b-2 border-transparent text-text-secondary hover:text-text-primary hover:border-border-default",
@@ -1134,10 +1135,10 @@ function Lt() {
1134
1135
  ]
1135
1136
  })
1136
1137
  }),
1137
- /* @__PURE__ */ b(kt, {
1138
+ /* @__PURE__ */ b(At, {
1138
1139
  mode: "wait",
1139
1140
  children: [
1140
- V === "overview" && /* @__PURE__ */ b(_.div, {
1141
+ H === "overview" && /* @__PURE__ */ b(_.div, {
1141
1142
  initial: {
1142
1143
  opacity: 0,
1143
1144
  y: 8
@@ -1157,14 +1158,14 @@ function Lt() {
1157
1158
  className: "p-4 border-b border-border-default",
1158
1159
  children: /* @__PURE__ */ b("h3", {
1159
1160
  className: "font-semibold text-text-primary flex items-center gap-2",
1160
- children: [/* @__PURE__ */ y(Ye, { className: "size-5" }), S("agentDetails.capabilities", "Capabilities")]
1161
+ children: [/* @__PURE__ */ y(Xe, { className: "size-5" }), S("agentDetails.capabilities", "Capabilities")]
1161
1162
  })
1162
1163
  }), /* @__PURE__ */ y("div", {
1163
1164
  className: "p-4",
1164
1165
  children: /* @__PURE__ */ y("div", {
1165
1166
  className: "flex flex-wrap gap-2",
1166
- children: P.capabilities && typeof P.capabilities == "object" && (Array.isArray(P.capabilities) ? P.capabilities.length > 0 : Object.keys(P.capabilities).length > 0) ? (Array.isArray(P.capabilities) ? P.capabilities : (() => {
1167
- let e = P.capabilities, t = Object.keys(e);
1167
+ children: F.capabilities && typeof F.capabilities == "object" && (Array.isArray(F.capabilities) ? F.capabilities.length > 0 : Object.keys(F.capabilities).length > 0) ? (Array.isArray(F.capabilities) ? F.capabilities : (() => {
1168
+ let e = F.capabilities, t = Object.keys(e);
1168
1169
  return t.length > 0 && t.every((e) => /^\d+$/.test(e)) ? Object.values(e) : t;
1169
1170
  })()).map((e) => /* @__PURE__ */ y("span", {
1170
1171
  className: "px-3 py-1 bg-bg-sunken text-text-primary text-sm rounded-full",
@@ -1223,20 +1224,20 @@ function Lt() {
1223
1224
  className: "p-4 border-b border-border-default",
1224
1225
  children: /* @__PURE__ */ b("h3", {
1225
1226
  className: "font-semibold text-text-primary flex items-center gap-2",
1226
- children: [/* @__PURE__ */ y(xt, { className: "size-5" }), "Tags"]
1227
+ children: [/* @__PURE__ */ y(St, { className: "size-5" }), "Tags"]
1227
1228
  })
1228
1229
  }), /* @__PURE__ */ y("div", {
1229
1230
  className: "p-4",
1230
1231
  children: /* @__PURE__ */ y(ge, {
1231
1232
  entityType: "VIBECONTROLS_AGENT",
1232
- entityId: P.id
1233
+ entityId: F.id
1233
1234
  })
1234
1235
  })] }),
1235
- P.tunnelUrl && /* @__PURE__ */ b(l, { children: [/* @__PURE__ */ y("div", {
1236
+ F.tunnelUrl && /* @__PURE__ */ b(l, { children: [/* @__PURE__ */ y("div", {
1236
1237
  className: "p-4 border-b border-border-default",
1237
1238
  children: /* @__PURE__ */ b("h3", {
1238
1239
  className: "font-semibold text-text-primary flex items-center gap-2",
1239
- children: [/* @__PURE__ */ y(Et, { className: "size-5" }), S("health.tunnel", "Tunnel")]
1240
+ children: [/* @__PURE__ */ y(Dt, { className: "size-5" }), S("health.tunnel", "Tunnel")]
1240
1241
  })
1241
1242
  }), /* @__PURE__ */ y("div", {
1242
1243
  className: "p-4",
@@ -1246,11 +1247,11 @@ function Lt() {
1246
1247
  className: "text-sm text-text-secondary mb-1",
1247
1248
  children: S("agentDetails.tunnelUrl", "Tunnel URL")
1248
1249
  }), /* @__PURE__ */ y("a", {
1249
- href: P.tunnelUrl,
1250
+ href: F.tunnelUrl,
1250
1251
  target: "_blank",
1251
1252
  rel: "noopener noreferrer",
1252
1253
  className: "text-action-primary-text hover:underline break-all",
1253
- children: P.tunnelUrl
1254
+ children: F.tunnelUrl
1254
1255
  })]
1255
1256
  })
1256
1257
  })] }),
@@ -1258,7 +1259,7 @@ function Lt() {
1258
1259
  className: "p-4 border-b border-border-default",
1259
1260
  children: /* @__PURE__ */ b("h3", {
1260
1261
  className: "font-semibold text-text-primary flex items-center gap-2",
1261
- children: [/* @__PURE__ */ y(vt, { className: "size-5" }), S("agentDetails.configuration", "Configuration")]
1262
+ children: [/* @__PURE__ */ y(yt, { className: "size-5" }), S("agentDetails.configuration", "Configuration")]
1262
1263
  })
1263
1264
  }), /* @__PURE__ */ b("div", {
1264
1265
  className: "p-4 space-y-4",
@@ -1270,36 +1271,36 @@ function Lt() {
1270
1271
  children: S("analytics.platform", "Platform")
1271
1272
  }), /* @__PURE__ */ y("p", {
1272
1273
  className: "font-medium text-text-primary",
1273
- children: P.platform
1274
+ children: F.platform
1274
1275
  })] }),
1275
1276
  /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
1276
1277
  className: "text-sm text-text-secondary",
1277
1278
  children: S("analytics.architecture", "Architecture")
1278
1279
  }), /* @__PURE__ */ y("p", {
1279
1280
  className: "font-medium text-text-primary",
1280
- children: P.architecture
1281
+ children: F.architecture
1281
1282
  })] }),
1282
1283
  /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
1283
1284
  className: "text-sm text-text-secondary",
1284
1285
  children: S("agentDetails.version", "Version")
1285
1286
  }), /* @__PURE__ */ y("p", {
1286
1287
  className: "font-medium text-text-primary",
1287
- children: P.version
1288
+ children: F.version
1288
1289
  })] })
1289
1290
  ]
1290
- }), P.aiContext && /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
1291
+ }), F.aiContext && /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
1291
1292
  className: "text-sm text-text-secondary mb-1",
1292
1293
  children: "AI Context"
1293
1294
  }), /* @__PURE__ */ y("pre", {
1294
1295
  className: "text-sm text-text-primary bg-bg-sunken border border-border-default rounded-md p-3 whitespace-pre-wrap font-sans",
1295
- children: P.aiContext
1296
+ children: F.aiContext
1296
1297
  })] })]
1297
1298
  })] }),
1298
1299
  /* @__PURE__ */ b(l, { children: [/* @__PURE__ */ y("div", {
1299
1300
  className: "p-4 border-b border-border-default",
1300
1301
  children: /* @__PURE__ */ b("h3", {
1301
1302
  className: "font-semibold text-text-primary flex items-center gap-2",
1302
- children: [/* @__PURE__ */ y(Xe, { className: "size-5" }), S("vibeDetails.timeline", "Timeline")]
1303
+ children: [/* @__PURE__ */ y(Ze, { className: "size-5" }), S("vibeDetails.timeline", "Timeline")]
1303
1304
  })
1304
1305
  }), /* @__PURE__ */ y("div", {
1305
1306
  className: "p-4",
@@ -1311,28 +1312,28 @@ function Lt() {
1311
1312
  children: S("health.lastHeartbeat", "Last Heartbeat")
1312
1313
  }), /* @__PURE__ */ y("p", {
1313
1314
  className: "font-medium text-text-primary",
1314
- children: Kr(P.lastHeartbeat)
1315
+ children: qr(F.lastHeartbeat)
1315
1316
  })] }),
1316
1317
  /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
1317
1318
  className: "text-text-secondary",
1318
1319
  children: S("vibeDetails.created", "Created")
1319
1320
  }), /* @__PURE__ */ y("p", {
1320
1321
  className: "font-medium text-text-primary",
1321
- children: Kr(P.createdAt)
1322
+ children: qr(F.createdAt)
1322
1323
  })] }),
1323
1324
  /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
1324
1325
  className: "text-text-secondary",
1325
1326
  children: S("vibeDetails.updated", "Updated")
1326
1327
  }), /* @__PURE__ */ y("p", {
1327
1328
  className: "font-medium text-text-primary",
1328
- children: Kr(P.updatedAt)
1329
+ children: qr(F.updatedAt)
1329
1330
  })] })
1330
1331
  ]
1331
1332
  })
1332
1333
  })] })
1333
1334
  ]
1334
1335
  }, "overview"),
1335
- V === "profiles" && /* @__PURE__ */ y(_.div, {
1336
+ H === "profiles" && /* @__PURE__ */ y(_.div, {
1336
1337
  initial: {
1337
1338
  opacity: 0,
1338
1339
  y: 8
@@ -1346,9 +1347,9 @@ function Lt() {
1346
1347
  y: -8
1347
1348
  },
1348
1349
  transition: { duration: .2 },
1349
- children: /* @__PURE__ */ y(Le, { agentId: P.id })
1350
+ children: /* @__PURE__ */ y(Re, { agentId: F.id })
1350
1351
  }, "profiles"),
1351
- V === "security" && /* @__PURE__ */ b(_.div, {
1352
+ H === "security" && /* @__PURE__ */ b(_.div, {
1352
1353
  initial: {
1353
1354
  opacity: 0,
1354
1355
  y: 8
@@ -1368,37 +1369,37 @@ function Lt() {
1368
1369
  className: "p-4 border-b border-border-default",
1369
1370
  children: /* @__PURE__ */ b("h3", {
1370
1371
  className: "font-semibold text-text-primary flex items-center gap-2",
1371
- children: [/* @__PURE__ */ y(ct, { className: "size-5" }), S("agentDetails.agentApiKey", "Agent API Key")]
1372
+ children: [/* @__PURE__ */ y(lt, { className: "size-5" }), S("agentDetails.agentApiKey", "Agent API Key")]
1372
1373
  })
1373
1374
  }), /* @__PURE__ */ b("div", {
1374
1375
  className: "p-4",
1375
- children: [P.tunnelUrl ? /* @__PURE__ */ b("div", {
1376
+ children: [F.tunnelUrl ? /* @__PURE__ */ b("div", {
1376
1377
  className: "flex items-center gap-3",
1377
1378
  children: [
1378
1379
  /* @__PURE__ */ b("div", {
1379
1380
  className: "flex-1 min-w-0",
1380
1381
  children: [/* @__PURE__ */ y("code", {
1381
1382
  className: "text-sm font-mono text-text-primary bg-bg-sunken px-3 py-2 rounded-md block truncate",
1382
- children: vn && D ? D : Cn ? S("agentDetails.revealLoading", "Revealing…") : "•".repeat(32)
1383
- }), Tn && /* @__PURE__ */ y("p", {
1383
+ children: yn && D ? D : wn ? S("agentDetails.revealLoading", "Revealing…") : "•".repeat(32)
1384
+ }), En && /* @__PURE__ */ y("p", {
1384
1385
  className: "text-xs text-status-error-text mt-1",
1385
- children: Tn
1386
+ children: En
1386
1387
  })]
1387
1388
  }),
1388
1389
  /* @__PURE__ */ y("button", {
1389
1390
  type: "button",
1390
- onClick: () => void zr(),
1391
- disabled: Cn,
1391
+ onClick: () => void Br(),
1392
+ disabled: wn,
1392
1393
  className: "p-2 rounded hover:bg-bg-sunken transition-colors flex-shrink-0 disabled:opacity-50",
1393
- title: vn ? S("agentDetails.hideApiKey", "Hide API key") : S("agentDetails.showApiKey", "Show API key"),
1394
- children: y(vn ? it : rt, { className: "size-4 text-text-secondary" })
1394
+ title: yn ? S("agentDetails.hideApiKey", "Hide API key") : S("agentDetails.showApiKey", "Show API key"),
1395
+ children: y(yn ? at : it, { className: "size-4 text-text-secondary" })
1395
1396
  }),
1396
1397
  /* @__PURE__ */ y("button", {
1397
1398
  type: "button",
1398
- onClick: Rr,
1399
+ onClick: zr,
1399
1400
  className: "p-2 rounded hover:bg-bg-sunken transition-colors flex-shrink-0",
1400
1401
  title: S("agentDetails.copyApiKey", "Copy API key"),
1401
- children: bn ? /* @__PURE__ */ y(Je, { className: "size-4 text-status-success-text" }) : /* @__PURE__ */ y(Qe, { className: "size-4 text-text-secondary" })
1402
+ children: xn ? /* @__PURE__ */ y(Ye, { className: "size-4 text-status-success-text" }) : /* @__PURE__ */ y($e, { className: "size-4 text-text-secondary" })
1402
1403
  })
1403
1404
  ]
1404
1405
  }) : /* @__PURE__ */ y("p", {
@@ -1409,53 +1410,53 @@ function Lt() {
1409
1410
  children: "This key authenticates requests sent to the agent. The key is revealed only on explicit operator action and every read is audited."
1410
1411
  })]
1411
1412
  })] }),
1412
- /* @__PURE__ */ y(Oe, {
1413
- agentId: P.id,
1414
- currentTunnelUrl: P.tunnelUrl,
1415
- onUpdated: () => N()
1416
- }),
1417
1413
  /* @__PURE__ */ y(ke, {
1418
- agentId: P.id,
1419
- storageAdapter: P.storageAdapter,
1420
- dbPath: P.dbPath,
1421
- hasStorageOptions: P.hasStorageOptions,
1422
- onUpdated: () => N()
1414
+ agentId: F.id,
1415
+ currentTunnelUrl: F.tunnelUrl,
1416
+ onUpdated: () => P()
1423
1417
  }),
1424
- /* @__PURE__ */ y(Ft, {
1425
- agent: P,
1426
- onUpdate: () => N()
1418
+ /* @__PURE__ */ y(Ae, {
1419
+ agentId: F.id,
1420
+ storageAdapter: F.storageAdapter,
1421
+ dbPath: F.dbPath,
1422
+ hasStorageOptions: F.hasStorageOptions,
1423
+ onUpdated: () => P()
1427
1424
  }),
1428
- /* @__PURE__ */ y(Me, { agent: {
1429
- id: P.id,
1430
- profile: R ?? "default"
1425
+ /* @__PURE__ */ y(It, {
1426
+ agent: F,
1427
+ onUpdate: () => P()
1428
+ }),
1429
+ /* @__PURE__ */ y(Ne, { agent: {
1430
+ id: F.id,
1431
+ profile: z ?? "default"
1431
1432
  } })
1432
1433
  ]
1433
1434
  }, "security"),
1434
- V === "plugins" && (() => {
1435
- let e = q.toLowerCase(), t = H.filter((t) => !e || t.pluginName.toLowerCase().includes(e) || t.packageName.toLowerCase().includes(e) || t.description?.toLowerCase().includes(e) || t.tags?.some((t) => t.toLowerCase().includes(e))), n = Jn.filter((t) => !t.installed && (!e || t.name.toLowerCase().includes(e) || t.packageName.toLowerCase().includes(e) || t.description.toLowerCase().includes(e))), r = H.filter((e) => e.hasUI), i = r.filter((t) => !e || t.pluginName.toLowerCase().includes(e) || t.packageName.toLowerCase().includes(e)), a = [
1435
+ H === "plugins" && (() => {
1436
+ let e = J.toLowerCase(), t = U.filter((t) => !e || t.pluginName.toLowerCase().includes(e) || t.packageName.toLowerCase().includes(e) || t.description?.toLowerCase().includes(e) || t.tags?.some((t) => t.toLowerCase().includes(e))), n = Jn.filter((t) => !t.installed && (!e || t.name.toLowerCase().includes(e) || t.packageName.toLowerCase().includes(e) || t.description.toLowerCase().includes(e))), r = U.filter((e) => e.hasUI), i = r.filter((t) => !e || t.pluginName.toLowerCase().includes(e) || t.packageName.toLowerCase().includes(e)), a = [
1436
1437
  {
1437
1438
  id: "installed",
1438
1439
  label: "Installed",
1439
1440
  count: t.length,
1440
- icon: pt
1441
+ icon: mt
1441
1442
  },
1442
1443
  {
1443
1444
  id: "available",
1444
1445
  label: "Available",
1445
1446
  count: n.length,
1446
- icon: tt
1447
+ icon: nt
1447
1448
  },
1448
1449
  {
1449
1450
  id: "store",
1450
1451
  label: "Store",
1451
- count: J.length,
1452
- icon: tt
1452
+ count: Y.length,
1453
+ icon: nt
1453
1454
  },
1454
1455
  {
1455
1456
  id: "ui-plugins",
1456
1457
  label: "UI Plugins",
1457
1458
  count: i.length,
1458
- icon: ut
1459
+ icon: dt
1459
1460
  }
1460
1461
  ];
1461
1462
  return /* @__PURE__ */ y(_.div, {
@@ -1481,16 +1482,16 @@ function Lt() {
1481
1482
  children: [/* @__PURE__ */ b("h3", {
1482
1483
  className: "font-semibold text-text-primary flex items-center gap-2",
1483
1484
  children: [
1484
- /* @__PURE__ */ y(pt, { className: "size-5" }),
1485
+ /* @__PURE__ */ y(mt, { className: "size-5" }),
1485
1486
  "Plugins",
1486
- H.length > 0 && /* @__PURE__ */ b("span", {
1487
+ U.length > 0 && /* @__PURE__ */ b("span", {
1487
1488
  className: "text-sm font-normal text-text-secondary",
1488
1489
  children: [
1489
1490
  "(",
1490
- H.filter((e) => e.isCore).length,
1491
+ U.filter((e) => e.isCore).length,
1491
1492
  " core,",
1492
1493
  " ",
1493
- H.filter((e) => !e.isCore).length,
1494
+ U.filter((e) => !e.isCore).length,
1494
1495
  " external)"
1495
1496
  ]
1496
1497
  })
@@ -1501,22 +1502,22 @@ function Lt() {
1501
1502
  disabled: Xn,
1502
1503
  className: "p-1.5 text-text-secondary hover:bg-bg-sunken rounded transition-colors disabled:opacity-50",
1503
1504
  title: S("agentDetails.refreshPlugins", "Refresh plugins"),
1504
- children: /* @__PURE__ */ y(mt, { className: `size-4 ${Xn ? "animate-spin" : ""}` })
1505
+ children: /* @__PURE__ */ y(ht, { className: `size-4 ${Xn ? "animate-spin" : ""}` })
1505
1506
  })]
1506
1507
  }),
1507
1508
  /* @__PURE__ */ b("div", {
1508
1509
  className: "relative",
1509
1510
  children: [
1510
- /* @__PURE__ */ y(gt, { className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-text-muted" }),
1511
+ /* @__PURE__ */ y(_t, { className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-text-muted" }),
1511
1512
  /* @__PURE__ */ y("input", {
1512
1513
  "aria-label": "control",
1513
1514
  type: "text",
1514
- value: q,
1515
+ value: J,
1515
1516
  onChange: (e) => pr(e.target.value),
1516
1517
  placeholder: S("agentDetails.searchPluginsPlaceholder", "Search plugins by name, package, description, or tag..."),
1517
1518
  className: "w-full pl-9 pr-8 py-2 text-sm bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-muted focus:outline-none focus:ring-1 focus:ring-action-primary-bg focus:border-action-primary-bg"
1518
1519
  }),
1519
- q && /* @__PURE__ */ y("button", {
1520
+ J && /* @__PURE__ */ y("button", {
1520
1521
  type: "button",
1521
1522
  onClick: () => pr(""),
1522
1523
  className: "absolute right-2 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-text-secondary rounded",
@@ -1527,7 +1528,7 @@ function Lt() {
1527
1528
  /* @__PURE__ */ y("div", {
1528
1529
  className: "flex gap-1 border-b border-border-default -mx-4 overflow-x-auto px-4 pb-1",
1529
1530
  children: a.map((e) => {
1530
- let t = K === e.id, n = e.icon;
1531
+ let t = q === e.id, n = e.icon;
1531
1532
  return /* @__PURE__ */ b("button", {
1532
1533
  type: "button",
1533
1534
  onClick: () => fr(e.id),
@@ -1557,17 +1558,17 @@ function Lt() {
1557
1558
  }),
1558
1559
  /* @__PURE__ */ y("button", {
1559
1560
  type: "button",
1560
- onClick: () => G(null),
1561
+ onClick: () => K(null),
1561
1562
  className: "flex-shrink-0 p-0.5 hover:bg-status-error-text/10 rounded",
1562
1563
  children: /* @__PURE__ */ y(g, { className: "size-3.5" })
1563
1564
  })
1564
1565
  ]
1565
1566
  }),
1566
- !P?.isActive && /* @__PURE__ */ b("p", {
1567
+ !F?.isActive && /* @__PURE__ */ b("p", {
1567
1568
  className: "text-sm text-text-muted flex items-center gap-1.5",
1568
- children: [/* @__PURE__ */ y(st, { className: "size-4 flex-shrink-0" }), "Agent is offline — showing known plugin catalog. Live data will load when the agent is reachable."]
1569
+ children: [/* @__PURE__ */ y(ct, { className: "size-4 flex-shrink-0" }), "Agent is offline — showing known plugin catalog. Live data will load when the agent is reachable."]
1569
1570
  }),
1570
- K === "installed" && /* @__PURE__ */ y(v, { children: t.length > 0 ? /* @__PURE__ */ y("div", {
1571
+ q === "installed" && /* @__PURE__ */ y(v, { children: t.length > 0 ? /* @__PURE__ */ y("div", {
1571
1572
  className: "space-y-2",
1572
1573
  children: t.map((e) => /* @__PURE__ */ b("div", {
1573
1574
  className: "flex flex-col sm:flex-row sm:items-center justify-between gap-2 p-3 bg-bg-sunken rounded-lg",
@@ -1651,31 +1652,31 @@ function Lt() {
1651
1652
  onClick: () => fr("ui-plugins"),
1652
1653
  className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs text-action-primary-bg bg-action-primary-bg/10 rounded-md hover:bg-action-primary-bg/20 transition-colors border border-action-primary-bg/20",
1653
1654
  title: `Open ${e.pluginName} UI`,
1654
- children: [/* @__PURE__ */ y(ut, { className: "size-3" }), "Open UI"]
1655
+ children: [/* @__PURE__ */ y(dt, { className: "size-3" }), "Open UI"]
1655
1656
  }),
1656
1657
  !e.isCore && /* @__PURE__ */ b("button", {
1657
1658
  type: "button",
1658
- onClick: () => Er(e.packageName),
1659
- disabled: U === e.packageName,
1659
+ onClick: () => Dr(e.packageName),
1660
+ disabled: W === e.packageName,
1660
1661
  className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-medium text-text-primary bg-bg-secondary border border-border-default rounded-md hover:bg-bg-elevated transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
1661
1662
  title: S("agentDetails.updatePlugin", "Update plugin (latest or a specific version)"),
1662
- children: [U === e.packageName ? /* @__PURE__ */ y(m, { className: "size-3 animate-spin" }) : /* @__PURE__ */ y(Ke, { className: "size-3" }), S("agentDetails.update", "Update")]
1663
+ children: [W === e.packageName ? /* @__PURE__ */ y(m, { className: "size-3 animate-spin" }) : /* @__PURE__ */ y(qe, { className: "size-3" }), S("agentDetails.update", "Update")]
1663
1664
  }),
1664
1665
  !e.isCore && /* @__PURE__ */ b("button", {
1665
1666
  type: "button",
1666
- onClick: () => Tr(e.packageName),
1667
- disabled: U === e.packageName,
1667
+ onClick: () => Er(e.packageName),
1668
+ disabled: W === e.packageName,
1668
1669
  className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-medium text-status-error-text bg-status-error-bg/15 border border-status-error-border/40 rounded-md hover:bg-status-error-bg/25 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
1669
- children: [U === e.packageName ? /* @__PURE__ */ y(m, { className: "size-3 animate-spin" }) : /* @__PURE__ */ y(Ct, { className: "size-3" }), S("sessions.remove", "Remove")]
1670
+ children: [W === e.packageName ? /* @__PURE__ */ y(m, { className: "size-3 animate-spin" }) : /* @__PURE__ */ y(wt, { className: "size-3" }), S("sessions.remove", "Remove")]
1670
1671
  })
1671
1672
  ]
1672
1673
  })]
1673
1674
  }, e.packageName))
1674
1675
  }) : /* @__PURE__ */ y("p", {
1675
1676
  className: "text-sm text-text-muted",
1676
- children: q ? "No installed plugins match your search." : "No plugin data available. Check agent connectivity or refresh."
1677
+ children: J ? "No installed plugins match your search." : "No plugin data available. Check agent connectivity or refresh."
1677
1678
  }) }),
1678
- K === "available" && /* @__PURE__ */ y(v, { children: n.length > 0 ? /* @__PURE__ */ y("div", {
1679
+ q === "available" && /* @__PURE__ */ y(v, { children: n.length > 0 ? /* @__PURE__ */ y("div", {
1679
1680
  className: "space-y-2",
1680
1681
  children: n.map((e) => /* @__PURE__ */ b("div", {
1681
1682
  className: "flex flex-col sm:flex-row sm:items-center justify-between gap-2 p-3 bg-bg-sunken rounded-lg",
@@ -1697,17 +1698,17 @@ function Lt() {
1697
1698
  ]
1698
1699
  }), /* @__PURE__ */ b("button", {
1699
1700
  type: "button",
1700
- onClick: () => wr(e.packageName),
1701
- disabled: U === e.packageName,
1701
+ onClick: () => Tr(e.packageName),
1702
+ disabled: W === e.packageName,
1702
1703
  className: "flex items-center gap-1.5 px-2.5 py-1.5 text-xs text-action-primary-text bg-action-primary-bg rounded-md hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex-shrink-0 sm:ml-3",
1703
- children: [U === e.packageName ? /* @__PURE__ */ y(m, { className: "size-3 animate-spin" }) : /* @__PURE__ */ y(tt, { className: "size-3" }), "Install"]
1704
+ children: [W === e.packageName ? /* @__PURE__ */ y(m, { className: "size-3 animate-spin" }) : /* @__PURE__ */ y(nt, { className: "size-3" }), "Install"]
1704
1705
  })]
1705
1706
  }, e.packageName))
1706
1707
  }) : /* @__PURE__ */ y("p", {
1707
1708
  className: "text-sm text-text-muted",
1708
- children: q ? "No available plugins match your search." : Jn.every((e) => e.installed) ? "All available plugins are already installed." : "No available plugins found."
1709
+ children: J ? "No available plugins match your search." : Jn.every((e) => e.installed) ? "All available plugins are already installed." : "No available plugins found."
1709
1710
  }) }),
1710
- K === "store" && /* @__PURE__ */ b(v, { children: [_r && /* @__PURE__ */ b("div", {
1711
+ q === "store" && /* @__PURE__ */ b(v, { children: [_r && /* @__PURE__ */ b("div", {
1711
1712
  className: "flex items-center gap-2 p-3 bg-status-error-bg text-status-error-text rounded-md text-sm",
1712
1713
  children: [/* @__PURE__ */ y(g, { className: "size-4 flex-shrink-0" }), /* @__PURE__ */ y("span", {
1713
1714
  className: "flex-1",
@@ -1716,7 +1717,7 @@ function Lt() {
1716
1717
  }), hr ? /* @__PURE__ */ y("p", {
1717
1718
  className: "text-sm text-text-muted",
1718
1719
  children: "Loading purchased plugins…"
1719
- }) : J.length === 0 ? /* @__PURE__ */ b("div", {
1720
+ }) : Y.length === 0 ? /* @__PURE__ */ b("div", {
1720
1721
  className: "py-8 text-center",
1721
1722
  children: [/* @__PURE__ */ y("p", {
1722
1723
  className: "text-sm text-text-muted",
@@ -1728,8 +1729,8 @@ function Lt() {
1728
1729
  })]
1729
1730
  }) : /* @__PURE__ */ y("div", {
1730
1731
  className: "space-y-2",
1731
- children: J.map((e) => {
1732
- let t = (e.product?.manifest ?? {}).digital?.install, n = typeof t?.packageName == "string" ? t.packageName : null, r = H.some((e) => e.packageName === n);
1732
+ children: Y.map((e) => {
1733
+ let t = (e.product?.manifest ?? {}).digital?.install, n = typeof t?.packageName == "string" ? t.packageName : null, r = U.some((e) => e.packageName === n);
1733
1734
  return /* @__PURE__ */ b("div", {
1734
1735
  className: "flex flex-col sm:flex-row sm:items-center justify-between gap-2 p-3 bg-bg-sunken rounded-lg",
1735
1736
  children: [/* @__PURE__ */ b("div", {
@@ -1740,7 +1741,7 @@ function Lt() {
1740
1741
  className: "size-10 rounded-md object-cover flex-shrink-0"
1741
1742
  }) : /* @__PURE__ */ y("div", {
1742
1743
  className: "size-10 flex-shrink-0 rounded-md bg-bg-secondary flex items-center justify-center",
1743
- children: /* @__PURE__ */ y(pt, { className: "size-5 text-text-muted" })
1744
+ children: /* @__PURE__ */ y(mt, { className: "size-5 text-text-muted" })
1744
1745
  }), /* @__PURE__ */ b("div", {
1745
1746
  className: "min-w-0 flex-1",
1746
1747
  children: [
@@ -1766,16 +1767,16 @@ function Lt() {
1766
1767
  })]
1767
1768
  }), /* @__PURE__ */ y("button", {
1768
1769
  type: "button",
1769
- onClick: () => void Or(e.productId, e.licenseKey),
1770
- disabled: r || Y === e.productId || !n,
1770
+ onClick: () => void kr(e.productId, e.licenseKey),
1771
+ disabled: r || yr === e.productId || !n,
1771
1772
  className: "inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-semibold rounded-md bg-action-primary-bg text-action-primary-text hover:opacity-90 disabled:opacity-60 flex-shrink-0",
1772
- children: r ? "Installed" : Y === e.productId ? "Installing…" : "Install"
1773
+ children: r ? "Installed" : yr === e.productId ? "Installing…" : "Install"
1773
1774
  })]
1774
1775
  }, e.id);
1775
1776
  })
1776
1777
  })] }),
1777
- K === "ui-plugins" && /* @__PURE__ */ y(v, { children: r.length > 0 || P?.tunnelUrl ? /* @__PURE__ */ y(Ne, {
1778
- availablePlugins: [...P?.tunnelUrl ? [{
1778
+ q === "ui-plugins" && /* @__PURE__ */ y(v, { children: r.length > 0 || F?.tunnelUrl ? /* @__PURE__ */ y(Pe, {
1779
+ availablePlugins: [...F?.tunnelUrl ? [{
1779
1780
  pluginName: "code-server",
1780
1781
  displayName: "Code Server (VS Code)",
1781
1782
  description: "Browser-based VS Code editor",
@@ -1787,14 +1788,14 @@ function Lt() {
1787
1788
  description: e.description,
1788
1789
  version: e.version
1789
1790
  }))],
1790
- tunnelUrl: P?.tunnelUrl || null,
1791
- agentId: P?.id ?? null,
1792
- profile: R
1791
+ tunnelUrl: F?.tunnelUrl || null,
1792
+ agentId: F?.id ?? null,
1793
+ profile: z
1793
1794
  }) : /* @__PURE__ */ y("p", {
1794
1795
  className: "text-sm text-text-muted",
1795
- children: q ? "No UI plugins match your search." : "No plugins with UI are currently installed."
1796
+ children: J ? "No UI plugins match your search." : "No plugins with UI are currently installed."
1796
1797
  }) }),
1797
- Xn && H.length === 0 && /* @__PURE__ */ b("div", {
1798
+ Xn && U.length === 0 && /* @__PURE__ */ b("div", {
1798
1799
  className: "flex items-center gap-2 text-sm text-text-secondary",
1799
1800
  children: [/* @__PURE__ */ y(m, { className: "size-4 animate-spin" }), "Loading plugins..."]
1800
1801
  })
@@ -1802,7 +1803,7 @@ function Lt() {
1802
1803
  })] })
1803
1804
  }, "plugins");
1804
1805
  })(),
1805
- V === "sessions" && /* @__PURE__ */ y(_.div, {
1806
+ H === "sessions" && /* @__PURE__ */ y(_.div, {
1806
1807
  initial: {
1807
1808
  opacity: 0,
1808
1809
  y: 8
@@ -1821,21 +1822,21 @@ function Lt() {
1821
1822
  children: [/* @__PURE__ */ b("h3", {
1822
1823
  className: "font-semibold text-text-primary flex items-center gap-2",
1823
1824
  children: [
1824
- /* @__PURE__ */ y(St, { className: "size-5" }),
1825
+ /* @__PURE__ */ y(Ct, { className: "size-5" }),
1825
1826
  S("nav.sessions", "Sessions"),
1826
1827
  " (",
1827
1828
  Z.length,
1828
1829
  ")"
1829
1830
  ]
1830
- }), /* @__PURE__ */ y(Mt, {
1831
+ }), /* @__PURE__ */ y(Nt, {
1831
1832
  permission: Ce.SESSION_CREATE,
1832
1833
  deniedBehavior: "disable",
1833
1834
  deniedTooltip: "You don't have permission to create sessions",
1834
1835
  children: /* @__PURE__ */ b("button", {
1835
1836
  "data-testid": "create-session-btn",
1836
- onClick: Ur,
1837
+ onClick: Wr,
1837
1838
  className: "inline-flex items-center gap-2 px-3 py-1.5 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors text-sm font-medium disabled:opacity-50 disabled:cursor-not-allowed",
1838
- children: [/* @__PURE__ */ y(ft, { className: "w-4 h-4" }), S("sessions.createSession", "Create Session")]
1839
+ children: [/* @__PURE__ */ y(pt, { className: "w-4 h-4" }), S("sessions.createSession", "Create Session")]
1839
1840
  })
1840
1841
  })]
1841
1842
  }), Z.length > 0 ? /* @__PURE__ */ y("div", {
@@ -1844,13 +1845,13 @@ function Lt() {
1844
1845
  role: "button",
1845
1846
  tabIndex: 0,
1846
1847
  onKeyDown: (t) => {
1847
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), Hr(e.id));
1848
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), Ur(e.id));
1848
1849
  },
1849
- onClick: () => Hr(e.id),
1850
+ onClick: () => Ur(e.id),
1850
1851
  className: "p-4 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2 cursor-pointer hover:bg-bg-sunken/50 transition-colors",
1851
1852
  children: [/* @__PURE__ */ b("div", {
1852
1853
  className: "flex items-center gap-3 min-w-0",
1853
- children: [/* @__PURE__ */ y(St, { className: "size-5 text-text-secondary flex-shrink-0" }), /* @__PURE__ */ b("div", {
1854
+ children: [/* @__PURE__ */ y(Ct, { className: "size-5 text-text-secondary flex-shrink-0" }), /* @__PURE__ */ b("div", {
1854
1855
  className: "min-w-0",
1855
1856
  children: [/* @__PURE__ */ y("p", {
1856
1857
  className: "font-medium text-text-primary truncate",
@@ -1864,20 +1865,20 @@ function Lt() {
1864
1865
  }, e.id))
1865
1866
  }) : /* @__PURE__ */ b("div", {
1866
1867
  className: "p-6 text-center text-text-secondary flex flex-col items-center gap-3",
1867
- children: [/* @__PURE__ */ y("span", { children: S("agentDetails.noSessionsOnAgent", "No sessions on this agent") }), /* @__PURE__ */ y(Mt, {
1868
+ children: [/* @__PURE__ */ y("span", { children: S("agentDetails.noSessionsOnAgent", "No sessions on this agent") }), /* @__PURE__ */ y(Nt, {
1868
1869
  permission: Ce.SESSION_CREATE,
1869
1870
  deniedBehavior: "disable",
1870
1871
  deniedTooltip: "You don't have permission to create sessions",
1871
1872
  children: /* @__PURE__ */ b("button", {
1872
1873
  "data-testid": "create-session-empty-btn",
1873
- onClick: Ur,
1874
+ onClick: Wr,
1874
1875
  className: "inline-flex items-center gap-2 px-3 py-1.5 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors text-sm font-medium disabled:opacity-50 disabled:cursor-not-allowed",
1875
- children: [/* @__PURE__ */ y(ft, { className: "w-4 h-4" }), S("sessions.createSession", "Create Session")]
1876
+ children: [/* @__PURE__ */ y(pt, { className: "w-4 h-4" }), S("sessions.createSession", "Create Session")]
1876
1877
  })
1877
1878
  })]
1878
1879
  })] })
1879
1880
  }, "sessions"),
1880
- V === "connection" && /* @__PURE__ */ y(_.div, {
1881
+ H === "connection" && /* @__PURE__ */ y(_.div, {
1881
1882
  initial: {
1882
1883
  opacity: 0,
1883
1884
  y: 8
@@ -1893,13 +1894,13 @@ function Lt() {
1893
1894
  transition: { duration: .2 },
1894
1895
  children: /* @__PURE__ */ y(l, {
1895
1896
  className: "min-h-[60vh]",
1896
- children: /* @__PURE__ */ y(Ee, {
1897
- agentId: P.id,
1898
- agentName: P.name
1897
+ children: /* @__PURE__ */ y(De, {
1898
+ agentId: F.id,
1899
+ agentName: F.name
1899
1900
  })
1900
1901
  })
1901
1902
  }, "connection"),
1902
- V === "logs" && /* @__PURE__ */ y(_.div, {
1903
+ H === "logs" && /* @__PURE__ */ y(_.div, {
1903
1904
  initial: {
1904
1905
  opacity: 0,
1905
1906
  y: 8
@@ -1917,18 +1918,18 @@ function Lt() {
1917
1918
  className: "p-4 border-b border-border-default flex items-center justify-between",
1918
1919
  children: /* @__PURE__ */ b("h3", {
1919
1920
  className: "font-semibold text-text-primary flex items-center gap-2",
1920
- children: [/* @__PURE__ */ y(ht, { className: "size-5" }), S("nav.logs", "Logs")]
1921
+ children: [/* @__PURE__ */ y(gt, { className: "size-5" }), S("nav.logs", "Logs")]
1921
1922
  })
1922
1923
  }), /* @__PURE__ */ y("div", {
1923
1924
  className: "p-4",
1924
- children: /* @__PURE__ */ y(Ie, {
1925
- agentId: P.id,
1926
- profile: R,
1925
+ children: /* @__PURE__ */ y(Le, {
1926
+ agentId: F.id,
1927
+ profile: z,
1927
1928
  className: "min-h-[28rem]"
1928
1929
  })
1929
1930
  })] })
1930
1931
  }, "logs"),
1931
- V === "vibes" && /* @__PURE__ */ y(_.div, {
1932
+ H === "vibes" && /* @__PURE__ */ y(_.div, {
1932
1933
  initial: {
1933
1934
  opacity: 0,
1934
1935
  y: 8
@@ -1947,7 +1948,7 @@ function Lt() {
1947
1948
  children: /* @__PURE__ */ b("h3", {
1948
1949
  className: "font-semibold text-text-primary flex items-center gap-2",
1949
1950
  children: [
1950
- /* @__PURE__ */ y(Et, { className: "size-5" }),
1951
+ /* @__PURE__ */ y(Dt, { className: "size-5" }),
1951
1952
  S("nav.vibes", "Vibes"),
1952
1953
  " (",
1953
1954
  Q.length,
@@ -1960,13 +1961,13 @@ function Lt() {
1960
1961
  role: "button",
1961
1962
  tabIndex: 0,
1962
1963
  onKeyDown: (t) => {
1963
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), Gr(e.id));
1964
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), Kr(e.id));
1964
1965
  },
1965
- onClick: () => Gr(e.id),
1966
+ onClick: () => Kr(e.id),
1966
1967
  className: "p-4 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2 cursor-pointer hover:bg-bg-sunken/50 transition-colors",
1967
1968
  children: [/* @__PURE__ */ b("div", {
1968
1969
  className: "flex items-center gap-3 min-w-0",
1969
- children: [/* @__PURE__ */ y(Et, { className: "size-5 text-text-secondary flex-shrink-0" }), /* @__PURE__ */ b("div", {
1970
+ children: [/* @__PURE__ */ y(Dt, { className: "size-5 text-text-secondary flex-shrink-0" }), /* @__PURE__ */ b("div", {
1970
1971
  className: "min-w-0",
1971
1972
  children: [/* @__PURE__ */ y("p", {
1972
1973
  className: "font-medium text-text-primary truncate",
@@ -1983,7 +1984,7 @@ function Lt() {
1983
1984
  children: S("agentDetails.noVibesUsingAgent", "No vibes using this agent")
1984
1985
  })] })
1985
1986
  }, "vibes"),
1986
- V === "notes" && /* @__PURE__ */ y(_.div, {
1987
+ H === "notes" && /* @__PURE__ */ y(_.div, {
1987
1988
  initial: {
1988
1989
  opacity: 0,
1989
1990
  y: 8
@@ -1998,7 +1999,7 @@ function Lt() {
1998
1999
  },
1999
2000
  transition: { duration: .2 },
2000
2001
  className: "space-y-6",
2001
- children: /* @__PURE__ */ y(Re, {
2002
+ children: /* @__PURE__ */ y(ze, {
2002
2003
  context: "agent",
2003
2004
  agentVibes: Q.map((e) => ({
2004
2005
  id: e.id,
@@ -2006,7 +2007,7 @@ function Lt() {
2006
2007
  }))
2007
2008
  })
2008
2009
  }, "notes"),
2009
- V === "aliases" && /* @__PURE__ */ y(_.div, {
2010
+ H === "aliases" && /* @__PURE__ */ y(_.div, {
2010
2011
  initial: {
2011
2012
  opacity: 0,
2012
2013
  y: 8
@@ -2021,12 +2022,12 @@ function Lt() {
2021
2022
  },
2022
2023
  transition: { duration: .2 },
2023
2024
  className: "space-y-6",
2024
- children: /* @__PURE__ */ y(Ae, { agent: {
2025
- id: P.id,
2026
- profile: P.metadata?.profile ?? "default"
2025
+ children: /* @__PURE__ */ y(je, { agent: {
2026
+ id: F.id,
2027
+ profile: F.metadata?.profile ?? "default"
2027
2028
  } })
2028
2029
  }, "aliases"),
2029
- V === "backup" && P.tunnelUrl && /* @__PURE__ */ y(_.div, {
2030
+ H === "backup" && F.tunnelUrl && /* @__PURE__ */ y(_.div, {
2030
2031
  initial: {
2031
2032
  opacity: 0,
2032
2033
  y: 8
@@ -2040,12 +2041,12 @@ function Lt() {
2040
2041
  y: -8
2041
2042
  },
2042
2043
  transition: { duration: .2 },
2043
- children: /* @__PURE__ */ y(Te, {
2044
- agentId: P.id,
2045
- profile: R
2044
+ children: /* @__PURE__ */ y(Ee, {
2045
+ agentId: F.id,
2046
+ profile: z
2046
2047
  })
2047
2048
  }, "backup"),
2048
- V === "backup" && !P.tunnelUrl && /* @__PURE__ */ y(_.div, {
2049
+ H === "backup" && !F.tunnelUrl && /* @__PURE__ */ y(_.div, {
2049
2050
  initial: {
2050
2051
  opacity: 0,
2051
2052
  y: 8
@@ -2062,7 +2063,7 @@ function Lt() {
2062
2063
  children: /* @__PURE__ */ b(l, {
2063
2064
  className: "p-6 text-center text-text-secondary",
2064
2065
  children: [
2065
- /* @__PURE__ */ y(et, { className: "size-8 mx-auto mb-2 text-text-muted" }),
2066
+ /* @__PURE__ */ y(tt, { className: "size-8 mx-auto mb-2 text-text-muted" }),
2066
2067
  /* @__PURE__ */ y("p", { children: S("agentDetails.backupRequiresTunnelAndApiKey", "Agent tunnel URL and API key are required for backup management.") }),
2067
2068
  /* @__PURE__ */ y("p", {
2068
2069
  className: "text-sm mt-1",
@@ -2071,7 +2072,7 @@ function Lt() {
2071
2072
  ]
2072
2073
  })
2073
2074
  }, "backup-no-tunnel"),
2074
- V === "maintenance" && /* @__PURE__ */ y(_.div, {
2075
+ H === "maintenance" && /* @__PURE__ */ y(_.div, {
2075
2076
  initial: {
2076
2077
  opacity: 0,
2077
2078
  y: 8
@@ -2085,15 +2086,15 @@ function Lt() {
2085
2086
  y: -8
2086
2087
  },
2087
2088
  transition: { duration: .2 },
2088
- children: /* @__PURE__ */ y(De, {
2089
- agentId: P.id,
2090
- agentVersion: P.version,
2091
- onAfterDestructiveNuke: Nr
2089
+ children: /* @__PURE__ */ y(Oe, {
2090
+ agentId: F.id,
2091
+ agentVersion: F.version,
2092
+ onAfterDestructiveNuke: Pr
2092
2093
  })
2093
2094
  }, "maintenance"),
2094
- z && (() => {
2095
- let e = B.data.find((e) => e.contribution.id === V);
2096
- return !e || !P ? null : /* @__PURE__ */ y(_.div, {
2095
+ B && (() => {
2096
+ let e = V.data.find((e) => e.contribution.id === H);
2097
+ return !e || !F ? null : /* @__PURE__ */ y(_.div, {
2097
2098
  initial: {
2098
2099
  opacity: 0,
2099
2100
  y: 8
@@ -2110,12 +2111,12 @@ function Lt() {
2110
2111
  className: "space-y-6",
2111
2112
  children: /* @__PURE__ */ y(l, { children: /* @__PURE__ */ y("div", {
2112
2113
  className: "p-0 h-[600px]",
2113
- children: /* @__PURE__ */ y(He, {
2114
+ children: /* @__PURE__ */ y(Ue, {
2114
2115
  contribution: e,
2115
2116
  tunnel: e.tunnel,
2116
2117
  restPaths: e.capabilities.restPaths.length > 0 ? e.capabilities.restPaths : [`/ui/${e.pluginKey}`],
2117
- context: { agentId: P.id },
2118
- agentId: P.id,
2118
+ context: { agentId: F.id },
2119
+ agentId: F.id,
2119
2120
  profile: e.tunnel.profile,
2120
2121
  theme: {
2121
2122
  colorMode: "light",
@@ -2130,17 +2131,17 @@ function Lt() {
2130
2131
  })()
2131
2132
  ]
2132
2133
  }),
2133
- z && P && /* @__PURE__ */ y(Ve, {
2134
+ B && F && /* @__PURE__ */ y(He, {
2134
2135
  isOpen: Hn,
2135
2136
  onClose: () => Un(!1),
2136
2137
  mountPoint: "agent.detailTab",
2137
- agentId: P.id,
2138
- profile: R ?? "default",
2138
+ agentId: F.id,
2139
+ profile: z ?? "default",
2139
2140
  onInstalled: () => {
2140
- B.refetch();
2141
+ V.refetch();
2141
2142
  }
2142
2143
  }),
2143
- Zt && /* @__PURE__ */ y("div", {
2144
+ Qt && /* @__PURE__ */ y("div", {
2144
2145
  className: "fixed inset-0 bg-bg-overlay flex items-center justify-center z-[100] p-4",
2145
2146
  children: /* @__PURE__ */ b("div", {
2146
2147
  className: "bg-bg-surface rounded-lg w-full max-w-lg max-h-[90vh] flex flex-col",
@@ -2152,15 +2153,15 @@ function Lt() {
2152
2153
  children: [
2153
2154
  S("agentDetails.configure", "Configure"),
2154
2155
  " ",
2155
- P.name
2156
+ F.name
2156
2157
  ]
2157
2158
  })
2158
2159
  }),
2159
2160
  /* @__PURE__ */ b("div", {
2160
2161
  className: "px-6 py-4 overflow-y-auto flex-1",
2161
- children: [$t && /* @__PURE__ */ y("div", {
2162
+ children: [en && /* @__PURE__ */ y("div", {
2162
2163
  className: "mb-4 p-3 bg-status-error-bg text-status-error-text rounded-md text-sm",
2163
- children: $t
2164
+ children: en
2164
2165
  }), /* @__PURE__ */ b("div", {
2165
2166
  className: "space-y-4",
2166
2167
  children: [
@@ -2169,9 +2170,9 @@ function Lt() {
2169
2170
  children: S("webhooks.name", "Name")
2170
2171
  }), /* @__PURE__ */ y("input", {
2171
2172
  "aria-label": "control",
2172
- ref: mn,
2173
+ ref: hn,
2173
2174
  type: "text",
2174
- defaultValue: P.name,
2175
+ defaultValue: F.name,
2175
2176
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary"
2176
2177
  })] }),
2177
2178
  /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
@@ -2180,7 +2181,7 @@ function Lt() {
2180
2181
  }), /* @__PURE__ */ y("input", {
2181
2182
  "aria-label": "control",
2182
2183
  type: "text",
2183
- value: `${P.platform} / ${P.architecture}`,
2184
+ value: `${F.platform} / ${F.architecture}`,
2184
2185
  disabled: !0,
2185
2186
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-secondary"
2186
2187
  })] }),
@@ -2190,7 +2191,7 @@ function Lt() {
2190
2191
  }), /* @__PURE__ */ y("input", {
2191
2192
  "aria-label": "control",
2192
2193
  type: "text",
2193
- value: P.version,
2194
+ value: F.version,
2194
2195
  disabled: !0,
2195
2196
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-secondary"
2196
2197
  })] }),
@@ -2201,9 +2202,9 @@ function Lt() {
2201
2202
  }),
2202
2203
  /* @__PURE__ */ y("input", {
2203
2204
  "aria-label": "control",
2204
- ref: hn,
2205
+ ref: gn,
2205
2206
  type: "text",
2206
- defaultValue: P.tunnelUrl ?? "",
2207
+ defaultValue: F.tunnelUrl ?? "",
2207
2208
  placeholder: S("agentDetails.tunnelUrlPlaceholder", "https://xxx.trycloudflare.com"),
2208
2209
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary font-mono text-sm"
2209
2210
  }),
@@ -2222,18 +2223,18 @@ function Lt() {
2222
2223
  className: "relative",
2223
2224
  children: [/* @__PURE__ */ y("button", {
2224
2225
  type: "button",
2225
- onClick: () => an((e) => !e),
2226
+ onClick: () => on((e) => !e),
2226
2227
  className: "p-0.5 rounded-full text-text-muted hover:text-text-secondary transition-colors",
2227
2228
  "aria-label": "What is AI Context?",
2228
- children: /* @__PURE__ */ y(st, { className: "size-3.5" })
2229
- }), rn && /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("div", {
2229
+ children: /* @__PURE__ */ y(ct, { className: "size-3.5" })
2230
+ }), an && /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("div", {
2230
2231
  role: "button",
2231
2232
  tabIndex: 0,
2232
2233
  onKeyDown: (e) => {
2233
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), an(!1));
2234
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), on(!1));
2234
2235
  },
2235
2236
  className: "fixed inset-0 z-10",
2236
- onClick: () => an(!1)
2237
+ onClick: () => on(!1)
2237
2238
  }), /* @__PURE__ */ b("div", {
2238
2239
  className: "absolute left-0 top-6 z-20 w-72 bg-bg-elevated border border-border-default rounded-lg shadow-xl p-3 text-xs text-text-secondary space-y-1.5",
2239
2240
  children: [
@@ -2249,24 +2250,24 @@ function Lt() {
2249
2250
  ]
2250
2251
  })] })]
2251
2252
  })]
2252
- }), /* @__PURE__ */ y("textarea", {
2253
+ }), /* @__PURE__ */ y(we, {
2253
2254
  id: "agentdetailspage-58",
2254
2255
  "aria-label": "e.g. This agent runs on the billing server. Node 20, Docker installed. Do not modify files outside /src.",
2255
- ref: gn,
2256
- defaultValue: P.aiContext ?? "",
2256
+ language: "markdown",
2257
+ ref: _n,
2258
+ defaultValue: F.aiContext ?? "",
2257
2259
  rows: 4,
2258
- placeholder: "e.g. This agent runs on the billing server. Node 20, Docker installed. Do not modify files outside /src.",
2259
- className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary text-sm"
2260
+ placeholder: "e.g. This agent runs on the billing server. Node 20, Docker installed. Do not modify files outside /src."
2260
2261
  })] }),
2261
2262
  /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
2262
2263
  className: "block text-sm font-medium text-text-primary mb-1",
2263
2264
  children: S("agentDetails.metadataLabel", "Metadata (JSON)")
2264
- }), /* @__PURE__ */ y("textarea", {
2265
+ }), /* @__PURE__ */ y(we, {
2265
2266
  "aria-label": "control",
2266
- ref: _n,
2267
- defaultValue: P.metadata ? JSON.stringify(P.metadata, null, 2) : "{}",
2268
- rows: 4,
2269
- className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary font-mono text-sm"
2267
+ language: "json",
2268
+ ref: vn,
2269
+ defaultValue: F.metadata ? JSON.stringify(F.metadata, null, 2) : "{}",
2270
+ rows: 4
2270
2271
  })] })
2271
2272
  ]
2272
2273
  })]
@@ -2275,16 +2276,16 @@ function Lt() {
2275
2276
  className: "px-6 py-4 border-t border-border-default flex-shrink-0 flex flex-wrap justify-end gap-3",
2276
2277
  children: [/* @__PURE__ */ y("button", {
2277
2278
  type: "button",
2278
- onClick: () => Qt(!1),
2279
- disabled: en,
2279
+ onClick: () => $t(!1),
2280
+ disabled: tn,
2280
2281
  className: "px-4 py-2 text-text-primary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
2281
2282
  children: S("common.cancel", "Cancel")
2282
2283
  }), /* @__PURE__ */ y("button", {
2283
2284
  type: "button",
2284
- onClick: Lr,
2285
- disabled: en,
2285
+ onClick: Rr,
2286
+ disabled: tn,
2286
2287
  className: "px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50",
2287
- children: en ? S("agentDetails.saving", "Saving...") : S("agentDetails.saveConfiguration", "Save Configuration")
2288
+ children: tn ? S("agentDetails.saving", "Saving...") : S("agentDetails.saveConfiguration", "Save Configuration")
2288
2289
  })]
2289
2290
  })
2290
2291
  ]
@@ -2309,12 +2310,12 @@ function Lt() {
2309
2310
  children: [
2310
2311
  S("agentDetails.newSessionFor", "New Session for"),
2311
2312
  " ",
2312
- P.name
2313
+ F.name
2313
2314
  ]
2314
2315
  }),
2315
- On && /* @__PURE__ */ y("div", {
2316
+ kn && /* @__PURE__ */ y("div", {
2316
2317
  className: "mb-4 p-3 bg-status-error-bg text-status-error-text rounded-md text-sm",
2317
- children: On
2318
+ children: kn
2318
2319
  }),
2319
2320
  /* @__PURE__ */ b("div", {
2320
2321
  className: "space-y-4",
@@ -2333,7 +2334,7 @@ function Lt() {
2333
2334
  className: "block text-sm font-medium text-text-primary mb-1",
2334
2335
  children: S("sessions.filterType", "Type")
2335
2336
  }), /* @__PURE__ */ b("select", {
2336
- ref: An,
2337
+ ref: jn,
2337
2338
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary",
2338
2339
  children: [
2339
2340
  /* @__PURE__ */ y("option", {
@@ -2362,7 +2363,7 @@ function Lt() {
2362
2363
  className: "block text-sm font-medium text-text-primary mb-1",
2363
2364
  children: S("sessions.command", "Command")
2364
2365
  }), /* @__PURE__ */ y("input", {
2365
- ref: jn,
2366
+ ref: N,
2366
2367
  type: "text",
2367
2368
  placeholder: S("vibeDetails.sessionCommandPlaceholder", "bash"),
2368
2369
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder"
@@ -2387,7 +2388,7 @@ function Lt() {
2387
2388
  children: S("common.cancel", "Cancel")
2388
2389
  }), /* @__PURE__ */ y("button", {
2389
2390
  "data-testid": "create-session-submit",
2390
- onClick: Wr,
2391
+ onClick: Gr,
2391
2392
  disabled: j,
2392
2393
  className: "px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50",
2393
2394
  children: j ? S("sessions.creating", "Creating...") : S("sessions.createSession", "Create Session")
@@ -2410,9 +2411,9 @@ function Lt() {
2410
2411
  onClose: () => {
2411
2412
  ar || er(!1);
2412
2413
  },
2413
- onConfirm: Vr,
2414
+ onConfirm: Hr,
2414
2415
  title: S("agentDetails.removeAgentTitle", "Remove agent"),
2415
- message: S("agentDetails.removeAgentMessage", "Remove “{{name}}” from this workspace.", { name: P.name }),
2416
+ message: S("agentDetails.removeAgentMessage", "Remove “{{name}}” from this workspace.", { name: F.name }),
2416
2417
  confirmLabel: S("sessions.remove", "Remove"),
2417
2418
  variant: "danger",
2418
2419
  isLoading: ar,
@@ -2420,7 +2421,7 @@ function Lt() {
2420
2421
  className: "space-y-2",
2421
2422
  children: [/* @__PURE__ */ b("label", {
2422
2423
  className: "flex items-start gap-3 p-3 rounded-md bg-bg-sunken border border-border-default cursor-pointer",
2423
- children: [/* @__PURE__ */ y(At, {
2424
+ children: [/* @__PURE__ */ y(jt, {
2424
2425
  checked: tr,
2425
2426
  disabled: ar,
2426
2427
  onCheckedChange: (e) => nr(e === !0),
@@ -2437,7 +2438,7 @@ function Lt() {
2437
2438
  })]
2438
2439
  }), /* @__PURE__ */ b("label", {
2439
2440
  className: "flex items-start gap-3 p-3 rounded-md bg-bg-sunken border border-border-default cursor-pointer",
2440
- children: [/* @__PURE__ */ y(At, {
2441
+ children: [/* @__PURE__ */ y(jt, {
2441
2442
  checked: rr,
2442
2443
  disabled: ar,
2443
2444
  onCheckedChange: (e) => ir(e === !0),
@@ -2459,6 +2460,6 @@ function Lt() {
2459
2460
  });
2460
2461
  }
2461
2462
  //#endregion
2462
- export { Lt as AgentDetailsPage };
2463
+ export { Rt as AgentDetailsPage };
2463
2464
 
2464
2465
  //# sourceMappingURL=AgentDetailsPage.js.map