@burdenoff/microfe-vibecontrols 2026.613.1 → 2026.618.1

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 (62) hide show
  1. package/dist/components/agents/AgentConnectionRecovery.js +100 -94
  2. package/dist/components/agents/AgentConnectionRecovery.js.map +1 -1
  3. package/dist/components/agents/AgentMaintenanceTab.js +177 -160
  4. package/dist/components/agents/AgentMaintenanceTab.js.map +1 -1
  5. package/dist/components/agents/OpenInBrowserEditorButton.js +102 -94
  6. package/dist/components/agents/OpenInBrowserEditorButton.js.map +1 -1
  7. package/dist/components/assistant/AssistantChatArea.js +1 -0
  8. package/dist/components/assistant/AssistantChatArea.js.map +1 -1
  9. package/dist/components/assistant/AssistantModeSelector.js +20 -19
  10. package/dist/components/assistant/AssistantModeSelector.js.map +1 -1
  11. package/dist/components/tunnels/TunnelCard.js +3 -3
  12. package/dist/components/tunnels/TunnelCard.js.map +1 -1
  13. package/dist/components/tunnels/TunnelPublicAccessPanel.js +36 -36
  14. package/dist/components/tunnels/TunnelPublicAccessPanel.js.map +1 -1
  15. package/dist/config/assistantUsecases.js +11 -0
  16. package/dist/config/assistantUsecases.js.map +1 -1
  17. package/dist/constants/permissions.js +38 -6
  18. package/dist/constants/permissions.js.map +1 -1
  19. package/dist/index.js +4 -3
  20. package/dist/pages/CatalogDetailPage.js +155 -155
  21. package/dist/pages/CatalogDetailPage.js.map +1 -1
  22. package/dist/pages/CatalogPage.js +110 -109
  23. package/dist/pages/CatalogPage.js.map +1 -1
  24. package/dist/pages/ComponentDetailPage.js +338 -338
  25. package/dist/pages/ComponentDetailPage.js.map +1 -1
  26. package/dist/pages/ComponentsPage.js +104 -103
  27. package/dist/pages/ComponentsPage.js.map +1 -1
  28. package/dist/pages/TargetDetailsPage.js +140 -132
  29. package/dist/pages/TargetDetailsPage.js.map +1 -1
  30. package/dist/pages/TemplateDetailPage.js +201 -199
  31. package/dist/pages/TemplateDetailPage.js.map +1 -1
  32. package/dist/pages/TemplatesPage.js +62 -61
  33. package/dist/pages/TemplatesPage.js.map +1 -1
  34. package/dist/pages/VibeDetailsPage.js +568 -555
  35. package/dist/pages/VibeDetailsPage.js.map +1 -1
  36. package/dist/pages/ai/AIBookmarksPage.js +104 -89
  37. package/dist/pages/ai/AIBookmarksPage.js.map +1 -1
  38. package/dist/pages/ai/AIPage.js +116 -107
  39. package/dist/pages/ai/AIPage.js.map +1 -1
  40. package/dist/pages/ai/AISessionDetailPage.js +46 -34
  41. package/dist/pages/ai/AISessionDetailPage.js.map +1 -1
  42. package/dist/pages/ai/AgentManagerPage.js +112 -100
  43. package/dist/pages/ai/AgentManagerPage.js.map +1 -1
  44. package/dist/pages/tunnels/TunnelDetailsPage.js +177 -153
  45. package/dist/pages/tunnels/TunnelDetailsPage.js.map +1 -1
  46. package/dist/pages/tunnels/TunnelsTab.js +119 -111
  47. package/dist/pages/tunnels/TunnelsTab.js.map +1 -1
  48. package/dist/pages/tunnels/tabs/TunnelDomainsTab.js +24 -24
  49. package/dist/pages/tunnels/tabs/TunnelDomainsTab.js.map +1 -1
  50. package/dist/pages/tunnels/tabs/TunnelOverviewTab.js +9 -8
  51. package/dist/pages/tunnels/tabs/TunnelOverviewTab.js.map +1 -1
  52. package/dist/pages/tunnels/tabs/TunnelSessionsTab.js +13 -13
  53. package/dist/pages/tunnels/tabs/TunnelSessionsTab.js.map +1 -1
  54. package/dist/pages/tunnels/tabs/TunnelSettingsTab.js +19 -15
  55. package/dist/pages/tunnels/tabs/TunnelSettingsTab.js.map +1 -1
  56. package/dist/services/assistantApi.js +9 -3
  57. package/dist/services/assistantApi.js.map +1 -1
  58. package/dist/services/createSandboxAssistantTransport.js +120 -0
  59. package/dist/services/createSandboxAssistantTransport.js.map +1 -0
  60. package/dist/store/assistantStore.js +1 -1
  61. package/dist/store/assistantStore.js.map +1 -1
  62. package/package.json +5 -1
@@ -1,67 +1,69 @@
1
1
  import { useAgentCommandsQuery as e, useAgentSelfUpdateMutation as t, useAgentUpdateCheckLazyQuery as n, useAgentUpdateStatusQuery as r, useNukeVibecontrolsAgentMutation as i, useRunAgentCommandMutation as a, useSetAgentAutoUpdateMutation as ee } from "../../generated/wspace-operations.js";
2
2
  import { useTr as te } from "../../shared/hooks/useTr.js";
3
- import { ConfirmDialog as ne } from "../shared/ConfirmDialog.js";
4
- import { useField as o } from "../../shared/hooks/useField.js";
5
- import { useCallback as s, useMemo as re, useState as c } from "react";
6
- import { AlertTriangle as ie, ArrowUpCircle as ae, Loader2 as l, RefreshCw as u, Terminal as oe, Trash2 as se } from "lucide-react";
7
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
8
- import { Checkbox as ce } from "@burdenoff/fe-libs/ui";
3
+ import { ConfirmDialog as o } from "../shared/ConfirmDialog.js";
4
+ import { useField as s } from "../../shared/hooks/useField.js";
5
+ import { VIBE_PERMISSIONS as c } from "../../constants/permissions.js";
6
+ import { useCallback as l, useMemo as ne, useState as u } from "react";
7
+ import { AlertTriangle as re, ArrowUpCircle as ie, Loader2 as d, RefreshCw as ae, Terminal as oe, Trash2 as se } from "lucide-react";
8
+ import { usePermissions as ce } from "@burdenoff/fe-libs/shared/providers/shell";
9
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
10
+ import { Checkbox as le } from "@burdenoff/fe-libs/ui";
9
11
  //#region src/components/agents/AgentMaintenanceTab.tsx
10
- function p(e) {
12
+ function m(e) {
11
13
  return e && typeof e == "object" && !Array.isArray(e) ? e : null;
12
14
  }
13
- function m(e, t) {
15
+ function h(e, t) {
14
16
  let n = e?.[t];
15
17
  return typeof n == "string" ? n : null;
16
18
  }
17
- function h(e, t) {
19
+ function g(e, t) {
18
20
  let n = e?.[t];
19
21
  return typeof n == "boolean" ? n : null;
20
22
  }
21
- var g = "rounded-card border border-border-default bg-bg-surface p-4", _ = "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-button bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bgHover transition-colors disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus", v = "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-button bg-bg-sunken text-text-primary hover:bg-bg-elevated transition-colors disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus", le = "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-button bg-action-danger-bg text-action-danger-text hover:bg-action-danger-bgHover transition-colors disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus", y = "text-xs font-medium text-text-muted", b = "px-3 py-2 text-base md:text-sm rounded-input bg-bg-sunken border border-border-default text-text-primary focus:outline-none focus:ring-2 focus:ring-border-focus";
22
- function x({ agentId: x, agentVersion: S, onAfterDestructiveNuke: ue }) {
23
- let C = te(), [w, T] = c(null), E = s((e, t, n = !1) => {
23
+ var _ = "rounded-card border border-border-default bg-bg-surface p-4", ue = "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-button bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bgHover transition-colors disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus", v = "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-button bg-bg-sunken text-text-primary hover:bg-bg-elevated transition-colors disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus", de = "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-button bg-action-danger-bg text-action-danger-text hover:bg-action-danger-bgHover transition-colors disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus", y = "text-xs font-medium text-text-muted", b = "px-3 py-2 text-base md:text-sm rounded-input bg-bg-sunken border border-border-default text-text-primary focus:outline-none focus:ring-2 focus:ring-border-focus";
24
+ function x({ agentId: x, agentVersion: S, onAfterDestructiveNuke: fe }) {
25
+ let C = te(), [w, T] = u(null), E = l((e, t, n = !1) => {
24
26
  T({
25
27
  title: e,
26
28
  body: t,
27
29
  error: n
28
30
  });
29
- }, []), { data: de, refetch: D } = r({
31
+ }, []), { data: pe, refetch: D } = r({
30
32
  variables: { agentId: x },
31
33
  fetchPolicy: "cache-and-network"
32
- }), [fe, { data: pe, loading: O }] = n({ fetchPolicy: "network-only" }), [k, { loading: A }] = t(), [j, { loading: me }] = ee(), M = p(de?.agentUpdateStatus?.data), N = p(M?.lastCheck), P = p(pe?.agentUpdateCheck?.data), he = h(M, "enabled") ?? !0, ge = m(P, "latest") ?? m(N, "latest") ?? null, _e = h(P, "hasUpdate") ?? h(N, "hasUpdate") ?? !1, [F, ve] = c(""), I = o(), L = o(), R = o(), ye = s(async () => {
34
+ }), [O, { data: me, loading: k }] = n({ fetchPolicy: "network-only" }), [A, { loading: j }] = t(), [M, { loading: he }] = ee(), N = m(pe?.agentUpdateStatus?.data), P = m(N?.lastCheck), F = m(me?.agentUpdateCheck?.data), ge = g(N, "enabled") ?? !0, _e = h(F, "latest") ?? h(P, "latest") ?? null, ve = g(F, "hasUpdate") ?? g(P, "hasUpdate") ?? !1, [I, ye] = u(""), L = s(), R = s(), z = s(), be = l(async () => {
33
35
  T(null);
34
36
  try {
35
- let e = await fe({ variables: { agentId: x } }), t = p(e.data?.agentUpdateCheck?.data);
36
- e.data?.agentUpdateCheck?.error ? E(C("agentDetails.maintenance.update", "Update"), e.data.agentUpdateCheck.error, !0) : h(t, "hasUpdate") ? E(C("agentDetails.maintenance.update", "Update"), `Update available: ${m(t, "current")} → ${m(t, "latest")}`) : E(C("agentDetails.maintenance.update", "Update"), `Up to date (${m(t, "current") ?? S ?? "?"}).`);
37
+ let e = await O({ variables: { agentId: x } }), t = m(e.data?.agentUpdateCheck?.data);
38
+ e.data?.agentUpdateCheck?.error ? E(C("agentDetails.maintenance.update", "Update"), e.data.agentUpdateCheck.error, !0) : g(t, "hasUpdate") ? E(C("agentDetails.maintenance.update", "Update"), `Update available: ${h(t, "current")} → ${h(t, "latest")}`) : E(C("agentDetails.maintenance.update", "Update"), `Up to date (${h(t, "current") ?? S ?? "?"}).`);
37
39
  } catch (e) {
38
40
  E("Update", e instanceof Error ? e.message : String(e), !0);
39
41
  }
40
42
  }, [
41
43
  x,
42
- fe,
44
+ O,
43
45
  E,
44
46
  C,
45
47
  S
46
- ]), z = s(async (e) => {
48
+ ]), B = l(async (e) => {
47
49
  T(null);
48
50
  try {
49
- let t = (await k({ variables: {
51
+ let t = (await A({ variables: {
50
52
  agentId: x,
51
53
  version: e || null
52
- } })).data?.agentSelfUpdate, n = p(t?.data);
53
- t?.error || h(n, "ok") === !1 ? E("Update", m(n, "error") ?? t?.error ?? "Update failed", !0) : E("Update", `Updated → ${m(n, "current") ?? e ?? "latest"} (restart: ${m(n, "restart") ?? "n/a"}).`), await D();
54
+ } })).data?.agentSelfUpdate, n = m(t?.data);
55
+ t?.error || g(n, "ok") === !1 ? E("Update", h(n, "error") ?? t?.error ?? "Update failed", !0) : E("Update", `Updated → ${h(n, "current") ?? e ?? "latest"} (restart: ${h(n, "restart") ?? "n/a"}).`), await D();
54
56
  } catch (e) {
55
57
  E("Update", e instanceof Error ? e.message : String(e), !0);
56
58
  }
57
59
  }, [
58
60
  x,
59
- k,
61
+ A,
60
62
  E,
61
63
  D
62
- ]), be = s(async (e) => {
64
+ ]), xe = l(async (e) => {
63
65
  try {
64
- await j({ variables: {
66
+ await M({ variables: {
65
67
  agentId: x,
66
68
  enabled: e
67
69
  } }), await D();
@@ -70,343 +72,358 @@ function x({ agentId: x, agentVersion: S, onAfterDestructiveNuke: ue }) {
70
72
  }
71
73
  }, [
72
74
  x,
73
- j,
75
+ M,
74
76
  D,
75
77
  E
76
- ]), { data: B, loading: V, refetch: xe } = e({
78
+ ]), { data: Se, loading: V, refetch: Ce } = e({
77
79
  variables: { agentId: x },
78
80
  fetchPolicy: "cache-and-network"
79
- }), [Se, { loading: H }] = a(), Ce = re(() => {
80
- let e = p(B?.agentCommands?.data)?.commands;
81
+ }), [we, { loading: H }] = a(), Te = ne(() => {
82
+ let e = m(Se?.agentCommands?.data)?.commands;
81
83
  return Array.isArray(e) ? e : [];
82
- }, [B]), [U, we] = c(""), [W, Te] = c(""), [G, K] = c(null), q = Ce.find((e) => e.name === U), J = s(() => [U, ...W.trim().length > 0 ? W.trim().split(/\s+/) : []], [U, W]), Y = s(async (e) => {
84
+ }, [Se]), [U, Ee] = u(""), [W, De] = u(""), [G, K] = u(null), q = Te.find((e) => e.name === U), Oe = l(() => [U, ...W.trim().length > 0 ? W.trim().split(/\s+/) : []], [U, W]), J = l(async (e) => {
83
85
  T(null);
84
86
  try {
85
- let t = (await Se({ variables: {
87
+ let t = (await we({ variables: {
86
88
  agentId: x,
87
89
  argv: e
88
- } })).data?.runAgentCommand, n = p(t?.data), r = m(n, "stdout") ?? "", i = m(n, "stderr") ?? "", a = n?.exitCode, ee = (r || "") + (i ? `\n[stderr]\n${i}` : "") + `\n[exit ${a ?? "?"}]`;
89
- E(`vibe ${e.join(" ")}`, ee.trim() || t?.error || "(no output)", !h(n, "ok"));
90
+ } })).data?.runAgentCommand, n = m(t?.data), r = h(n, "stdout") ?? "", i = h(n, "stderr") ?? "", a = n?.exitCode, ee = (r || "") + (i ? `\n[stderr]\n${i}` : "") + `\n[exit ${a ?? "?"}]`;
91
+ E(`vibe ${e.join(" ")}`, ee.trim() || t?.error || "(no output)", !g(n, "ok"));
90
92
  } catch (e) {
91
93
  E("Command", e instanceof Error ? e.message : String(e), !0);
92
94
  }
93
95
  }, [
94
96
  x,
95
- Se,
97
+ we,
96
98
  E
97
- ]), Ee = s(() => {
99
+ ]), ke = l(() => {
98
100
  if (!U) return;
99
- let e = J();
100
- q?.destructive ? K(e) : Y(e);
101
+ let e = Oe();
102
+ q?.destructive ? K(e) : J(e);
101
103
  }, [
102
104
  U,
103
- J,
105
+ Oe,
104
106
  q,
105
- Y
106
- ]), [De, { loading: X }] = i(), [Z, Oe] = c(!0), [Q, $] = c(null), ke = s(async (e) => {
107
+ J
108
+ ]), [Ae, { loading: Y }] = i(), [X, je] = u(!0), [Z, Q] = u(null), Me = l(async (e) => {
107
109
  T(null);
108
110
  try {
109
- let t = (await De({ variables: {
111
+ let t = (await Ae({ variables: {
110
112
  agentId: x,
111
113
  all: e.all,
112
114
  removeConfig: e.removeConfig,
113
- dryRun: Z
114
- } })).data?.nukeVibecontrolsAgent, n = p(t?.data), r = m(n, "stdout") ?? "", i = m(n, "stderr") ?? "", a = h(n, "ok") === !0 && !t?.error;
115
- E(`vibe nuke${e.all ? " --all" : ""}${Z ? " --dry-run" : ""}`, (r + (i ? `\n[stderr]\n${i}` : "")).trim() || t?.error || "(no output)", !a && !!t?.error), a && !Z && await ue?.();
115
+ dryRun: X
116
+ } })).data?.nukeVibecontrolsAgent, n = m(t?.data), r = h(n, "stdout") ?? "", i = h(n, "stderr") ?? "", a = g(n, "ok") === !0 && !t?.error;
117
+ E(`vibe nuke${e.all ? " --all" : ""}${X ? " --dry-run" : ""}`, (r + (i ? `\n[stderr]\n${i}` : "")).trim() || t?.error || "(no output)", !a && !!t?.error), a && !X && await fe?.();
116
118
  } catch (e) {
117
119
  E("Nuke", e instanceof Error ? e.message : String(e), !0);
118
120
  }
119
121
  }, [
120
122
  x,
121
- De,
122
- Z,
123
- ue,
123
+ Ae,
124
+ X,
125
+ fe,
124
126
  E
125
- ]);
126
- return /* @__PURE__ */ f("div", {
127
+ ]), { hasPermission: Ne, isLoading: Pe } = ce(), Fe = Ne(c.AGENT_UPDATE), $ = Ne(c.AGENT_ADMIN);
128
+ return Pe ? null : !Fe && !$ ? /* @__PURE__ */ f("div", {
129
+ className: "space-y-5",
130
+ children: /* @__PURE__ */ f("section", {
131
+ className: _,
132
+ children: /* @__PURE__ */ p("div", {
133
+ className: "flex items-center gap-2",
134
+ children: [/* @__PURE__ */ f(re, {
135
+ className: "size-5 text-text-secondary",
136
+ "aria-hidden": "true"
137
+ }), /* @__PURE__ */ f("p", {
138
+ className: "text-sm text-text-secondary",
139
+ children: C("agentDetails.maintenance.noPermission", "You do not have permission to manage this agent.")
140
+ })]
141
+ })
142
+ })
143
+ }) : /* @__PURE__ */ p("div", {
127
144
  className: "space-y-5",
128
145
  children: [
129
- /* @__PURE__ */ f("section", {
130
- className: g,
146
+ Fe && /* @__PURE__ */ p("section", {
147
+ className: _,
131
148
  children: [
132
- /* @__PURE__ */ f("div", {
149
+ /* @__PURE__ */ p("div", {
133
150
  className: "flex items-center gap-2 mb-3",
134
- children: [/* @__PURE__ */ d(ae, {
151
+ children: [/* @__PURE__ */ f(ie, {
135
152
  className: "size-5 text-text-secondary",
136
153
  "aria-hidden": "true"
137
- }), /* @__PURE__ */ d("h3", {
154
+ }), /* @__PURE__ */ f("h3", {
138
155
  className: "text-base font-semibold text-text-primary",
139
156
  children: C("agentDetails.maintenance.updateTitle", "Agent version & updates")
140
157
  })]
141
158
  }),
142
- /* @__PURE__ */ f("div", {
159
+ /* @__PURE__ */ p("div", {
143
160
  className: "grid grid-cols-1 sm:grid-cols-2 gap-3 text-sm mb-4",
144
- children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("div", {
161
+ children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("div", {
145
162
  className: "text-text-muted",
146
163
  children: C("agentDetails.maintenance.current", "Current")
147
- }), /* @__PURE__ */ d("div", {
164
+ }), /* @__PURE__ */ f("div", {
148
165
  className: "font-mono text-text-primary",
149
166
  children: S ?? "—"
150
- })] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("div", {
167
+ })] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("div", {
151
168
  className: "text-text-muted",
152
169
  children: C("agentDetails.maintenance.latest", "Latest")
153
- }), /* @__PURE__ */ f("div", {
170
+ }), /* @__PURE__ */ p("div", {
154
171
  className: "font-mono text-text-primary",
155
- children: [ge ?? "—", _e ? /* @__PURE__ */ d("span", {
172
+ children: [_e ?? "—", ve ? /* @__PURE__ */ f("span", {
156
173
  className: "ml-2 text-xs text-status-warning-text",
157
174
  children: C("agentDetails.maintenance.updateAvailable", "update available")
158
175
  }) : null]
159
176
  })] })]
160
177
  }),
161
- /* @__PURE__ */ f("div", {
178
+ /* @__PURE__ */ p("div", {
162
179
  className: "flex flex-wrap items-center gap-2 mb-4",
163
- children: [/* @__PURE__ */ f("button", {
180
+ children: [/* @__PURE__ */ p("button", {
164
181
  type: "button",
165
- onClick: ye,
166
- disabled: O,
182
+ onClick: be,
183
+ disabled: k,
167
184
  className: v,
168
- children: [O ? /* @__PURE__ */ d(l, {
185
+ children: [k ? /* @__PURE__ */ f(d, {
169
186
  className: "size-4 animate-spin",
170
187
  "aria-hidden": "true"
171
- }) : /* @__PURE__ */ d(u, {
188
+ }) : /* @__PURE__ */ f(ae, {
172
189
  className: "size-4",
173
190
  "aria-hidden": "true"
174
191
  }), C("agentDetails.maintenance.check", "Check for updates")]
175
- }), /* @__PURE__ */ f("button", {
192
+ }), /* @__PURE__ */ p("button", {
176
193
  type: "button",
177
- onClick: () => z(),
178
- disabled: A,
179
- "aria-busy": A,
180
- className: _,
181
- children: [A ? /* @__PURE__ */ d(l, {
194
+ onClick: () => B(),
195
+ disabled: j,
196
+ "aria-busy": j,
197
+ className: ue,
198
+ children: [j ? /* @__PURE__ */ f(d, {
182
199
  className: "size-4 animate-spin",
183
200
  "aria-hidden": "true"
184
- }) : /* @__PURE__ */ d(ae, {
201
+ }) : /* @__PURE__ */ f(ie, {
185
202
  className: "size-4",
186
203
  "aria-hidden": "true"
187
204
  }), C("agentDetails.maintenance.updateLatest", "Update to latest")]
188
205
  })]
189
206
  }),
190
- /* @__PURE__ */ f("div", {
207
+ /* @__PURE__ */ p("div", {
191
208
  className: "flex flex-wrap items-end gap-2 mb-4",
192
- children: [/* @__PURE__ */ f("div", {
209
+ children: [/* @__PURE__ */ p("div", {
193
210
  className: "flex w-full sm:w-44 flex-col gap-1",
194
- children: [/* @__PURE__ */ d("label", {
195
- htmlFor: I.id,
211
+ children: [/* @__PURE__ */ f("label", {
212
+ htmlFor: L.id,
196
213
  className: y,
197
214
  children: C("agentDetails.maintenance.versionLabel", "Version")
198
- }), /* @__PURE__ */ d("input", {
199
- ...I.inputProps,
215
+ }), /* @__PURE__ */ f("input", {
216
+ ...L.inputProps,
200
217
  type: "text",
201
- value: F,
202
- onChange: (e) => ve(e.target.value),
218
+ value: I,
219
+ onChange: (e) => ye(e.target.value),
203
220
  placeholder: C("agentDetails.maintenance.versionPlaceholder", "e.g. 2026.601.21"),
204
221
  className: `${b} font-mono w-full`
205
222
  })]
206
- }), /* @__PURE__ */ d("button", {
223
+ }), /* @__PURE__ */ f("button", {
207
224
  type: "button",
208
- onClick: () => z(F.trim()),
209
- disabled: A || F.trim().length === 0,
225
+ onClick: () => B(I.trim()),
226
+ disabled: j || I.trim().length === 0,
210
227
  className: v,
211
228
  children: C("agentDetails.maintenance.updateVersion", "Update to version")
212
229
  })]
213
230
  }),
214
- /* @__PURE__ */ f("label", {
231
+ /* @__PURE__ */ p("label", {
215
232
  className: "flex items-center gap-3 cursor-pointer",
216
- children: [/* @__PURE__ */ d(ce, {
217
- checked: he,
218
- disabled: me,
219
- onCheckedChange: (e) => be(e === !0)
220
- }), /* @__PURE__ */ d("span", {
233
+ children: [/* @__PURE__ */ f(le, {
234
+ checked: ge,
235
+ disabled: he,
236
+ onCheckedChange: (e) => xe(e === !0)
237
+ }), /* @__PURE__ */ f("span", {
221
238
  className: "text-sm text-text-primary",
222
239
  children: C("agentDetails.maintenance.autoUpdate", "Automatically install updates when idle (daily background check)")
223
240
  })]
224
241
  })
225
242
  ]
226
243
  }),
227
- /* @__PURE__ */ f("section", {
228
- className: g,
244
+ $ && /* @__PURE__ */ p("section", {
245
+ className: _,
229
246
  children: [
230
- /* @__PURE__ */ f("div", {
247
+ /* @__PURE__ */ p("div", {
231
248
  className: "flex items-center justify-between gap-2 mb-3",
232
- children: [/* @__PURE__ */ f("div", {
249
+ children: [/* @__PURE__ */ p("div", {
233
250
  className: "flex items-center gap-2",
234
- children: [/* @__PURE__ */ d(oe, {
251
+ children: [/* @__PURE__ */ f(oe, {
235
252
  className: "size-5 text-text-secondary",
236
253
  "aria-hidden": "true"
237
- }), /* @__PURE__ */ d("h3", {
254
+ }), /* @__PURE__ */ f("h3", {
238
255
  className: "text-base font-semibold text-text-primary",
239
256
  children: C("agentDetails.maintenance.commandsTitle", "Run a command")
240
257
  })]
241
- }), /* @__PURE__ */ d("button", {
258
+ }), /* @__PURE__ */ f("button", {
242
259
  type: "button",
243
- onClick: () => xe(),
260
+ onClick: () => Ce(),
244
261
  disabled: V,
245
262
  className: "inline-flex size-9 max-md:size-11 items-center justify-center rounded-button text-text-muted transition-colors hover:bg-bg-sunken hover:text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
246
263
  "aria-label": C("agentDetails.maintenance.refresh", "Refresh"),
247
- children: /* @__PURE__ */ d(u, {
264
+ children: /* @__PURE__ */ f(ae, {
248
265
  className: `size-4 ${V ? "animate-spin" : ""}`,
249
266
  "aria-hidden": "true"
250
267
  })
251
268
  })]
252
269
  }),
253
- /* @__PURE__ */ d("p", {
270
+ /* @__PURE__ */ f("p", {
254
271
  className: "text-xs text-text-muted mb-3",
255
272
  children: C("agentDetails.maintenance.commandsHint", "Every agent command can be run here. Destructive commands ask for confirmation.")
256
273
  }),
257
- /* @__PURE__ */ f("div", {
274
+ /* @__PURE__ */ p("div", {
258
275
  className: "flex flex-wrap items-end gap-2 mb-3",
259
276
  children: [
260
- /* @__PURE__ */ f("div", {
277
+ /* @__PURE__ */ p("div", {
261
278
  className: "flex w-full sm:w-auto sm:min-w-44 flex-col gap-1",
262
- children: [/* @__PURE__ */ d("label", {
263
- htmlFor: L.id,
279
+ children: [/* @__PURE__ */ f("label", {
280
+ htmlFor: R.id,
264
281
  className: y,
265
282
  children: C("agentDetails.maintenance.command", "Command")
266
- }), /* @__PURE__ */ f("select", {
267
- ...L.inputProps,
283
+ }), /* @__PURE__ */ p("select", {
284
+ ...R.inputProps,
268
285
  value: U,
269
- onChange: (e) => we(e.target.value),
286
+ onChange: (e) => Ee(e.target.value),
270
287
  className: `${b} w-full`,
271
- children: [/* @__PURE__ */ d("option", {
288
+ children: [/* @__PURE__ */ f("option", {
272
289
  value: "",
273
290
  children: V ? C("agentDetails.maintenance.loading", "Loading…") : C("agentDetails.maintenance.selectCommand", "Select a command…")
274
- }), Ce.map((e) => /* @__PURE__ */ f("option", {
291
+ }), Te.map((e) => /* @__PURE__ */ p("option", {
275
292
  value: e.name,
276
293
  children: [e.name, e.destructive ? ` ${C("agentDetails.maintenance.destructiveSuffix", "(destructive)")}` : ""]
277
294
  }, e.name))]
278
295
  })]
279
296
  }),
280
- /* @__PURE__ */ f("div", {
297
+ /* @__PURE__ */ p("div", {
281
298
  className: "flex flex-col gap-1 flex-1 min-w-0 basis-full sm:basis-auto",
282
- children: [/* @__PURE__ */ d("label", {
283
- htmlFor: R.id,
299
+ children: [/* @__PURE__ */ f("label", {
300
+ htmlFor: z.id,
284
301
  className: y,
285
302
  children: C("agentDetails.maintenance.args", "Arguments (optional)")
286
- }), /* @__PURE__ */ d("input", {
287
- ...R.inputProps,
303
+ }), /* @__PURE__ */ f("input", {
304
+ ...z.inputProps,
288
305
  type: "text",
289
306
  value: W,
290
- onChange: (e) => Te(e.target.value),
307
+ onChange: (e) => De(e.target.value),
291
308
  placeholder: "--json --tail 50",
292
309
  className: `${b} font-mono w-full`
293
310
  })]
294
311
  }),
295
- /* @__PURE__ */ f("button", {
312
+ /* @__PURE__ */ p("button", {
296
313
  type: "button",
297
- onClick: Ee,
314
+ onClick: ke,
298
315
  disabled: H || !U,
299
316
  "aria-busy": H,
300
- className: _,
301
- children: [H ? /* @__PURE__ */ d(l, {
317
+ className: ue,
318
+ children: [H ? /* @__PURE__ */ f(d, {
302
319
  className: "size-4 animate-spin",
303
320
  "aria-hidden": "true"
304
- }) : /* @__PURE__ */ d(oe, {
321
+ }) : /* @__PURE__ */ f(oe, {
305
322
  className: "size-4",
306
323
  "aria-hidden": "true"
307
324
  }), C("agentDetails.maintenance.run", "Run")]
308
325
  })
309
326
  ]
310
327
  }),
311
- q?.description ? /* @__PURE__ */ d("p", {
328
+ q?.description ? /* @__PURE__ */ f("p", {
312
329
  className: "text-xs text-text-muted",
313
330
  children: q.description
314
331
  }) : null
315
332
  ]
316
333
  }),
317
- /* @__PURE__ */ f("section", {
318
- className: `${g} border-status-error-border`,
334
+ $ && /* @__PURE__ */ p("section", {
335
+ className: `${_} border-status-error-border`,
319
336
  children: [
320
- /* @__PURE__ */ f("div", {
337
+ /* @__PURE__ */ p("div", {
321
338
  className: "flex items-center gap-2 mb-3",
322
- children: [/* @__PURE__ */ d(ie, {
339
+ children: [/* @__PURE__ */ f(re, {
323
340
  className: "size-5 text-status-error-text",
324
341
  "aria-hidden": "true"
325
- }), /* @__PURE__ */ d("h3", {
342
+ }), /* @__PURE__ */ f("h3", {
326
343
  className: "text-base font-semibold text-text-primary",
327
344
  children: C("agentDetails.maintenance.dangerTitle", "Danger zone")
328
345
  })]
329
346
  }),
330
- /* @__PURE__ */ f("label", {
347
+ /* @__PURE__ */ p("label", {
331
348
  className: "flex items-center gap-3 cursor-pointer mb-3",
332
- children: [/* @__PURE__ */ d(ce, {
333
- checked: Z,
334
- onCheckedChange: (e) => Oe(e === !0)
335
- }), /* @__PURE__ */ d("span", {
349
+ children: [/* @__PURE__ */ f(le, {
350
+ checked: X,
351
+ onCheckedChange: (e) => je(e === !0)
352
+ }), /* @__PURE__ */ f("span", {
336
353
  className: "text-sm text-text-primary",
337
354
  children: C("agentDetails.maintenance.dryRun", "Dry run (preview only — nothing is deleted)")
338
355
  })]
339
356
  }),
340
- /* @__PURE__ */ f("div", {
357
+ /* @__PURE__ */ p("div", {
341
358
  className: "flex flex-wrap gap-2",
342
- children: [/* @__PURE__ */ f("button", {
359
+ children: [/* @__PURE__ */ p("button", {
343
360
  type: "button",
344
- onClick: () => $({
361
+ onClick: () => Q({
345
362
  all: !1,
346
363
  removeConfig: !1
347
364
  }),
348
- disabled: X,
365
+ disabled: Y,
349
366
  className: v,
350
- children: [X ? /* @__PURE__ */ d(l, {
367
+ children: [Y ? /* @__PURE__ */ f(d, {
351
368
  className: "size-4 animate-spin",
352
369
  "aria-hidden": "true"
353
- }) : /* @__PURE__ */ d(se, {
370
+ }) : /* @__PURE__ */ f(se, {
354
371
  className: "size-4",
355
372
  "aria-hidden": "true"
356
373
  }), C("agentDetails.maintenance.nukeState", "Nuke state")]
357
- }), /* @__PURE__ */ f("button", {
374
+ }), /* @__PURE__ */ p("button", {
358
375
  type: "button",
359
- onClick: () => $({
376
+ onClick: () => Q({
360
377
  all: !0,
361
378
  removeConfig: !0
362
379
  }),
363
- disabled: X,
364
- className: le,
365
- children: [/* @__PURE__ */ d(se, {
380
+ disabled: Y,
381
+ className: de,
382
+ children: [/* @__PURE__ */ f(se, {
366
383
  className: "size-4",
367
384
  "aria-hidden": "true"
368
385
  }), C("agentDetails.maintenance.nukeAll", "Nuke everything (--all)")]
369
386
  })]
370
387
  }),
371
- /* @__PURE__ */ d("p", {
388
+ /* @__PURE__ */ f("p", {
372
389
  className: "text-xs text-text-muted mt-2",
373
390
  children: C("agentDetails.maintenance.nukeHint", "“Nuke state” wipes this agent’s data + tracked binaries. “Nuke everything” also removes all VibeControls plugins, secrets, and config across every profile on the host.")
374
391
  })
375
392
  ]
376
393
  }),
377
- w ? /* @__PURE__ */ f("section", {
378
- className: g,
394
+ w ? /* @__PURE__ */ p("section", {
395
+ className: _,
379
396
  children: [
380
- /* @__PURE__ */ f("div", {
397
+ /* @__PURE__ */ p("div", {
381
398
  className: "flex items-center justify-between gap-2 mb-2",
382
- children: [/* @__PURE__ */ d("h4", {
399
+ children: [/* @__PURE__ */ f("h4", {
383
400
  className: "text-sm font-semibold text-text-primary min-w-0 truncate",
384
401
  children: w.title
385
- }), /* @__PURE__ */ d("button", {
402
+ }), /* @__PURE__ */ f("button", {
386
403
  type: "button",
387
404
  onClick: () => T(null),
388
405
  className: "shrink-0 text-xs text-text-muted hover:text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus rounded-button px-1.5 py-1",
389
406
  children: C("agentDetails.maintenance.dismiss", "Dismiss")
390
407
  })]
391
408
  }),
392
- /* @__PURE__ */ d("p", {
409
+ /* @__PURE__ */ f("p", {
393
410
  role: "status",
394
411
  "aria-live": "polite",
395
412
  className: "sr-only",
396
413
  children: w.error ? C("agentDetails.maintenance.outputFailed", "{{title}} finished with errors", { title: w.title }) : C("agentDetails.maintenance.outputDone", "{{title}} finished", { title: w.title })
397
414
  }),
398
- /* @__PURE__ */ d("pre", {
415
+ /* @__PURE__ */ f("pre", {
399
416
  className: `text-xs whitespace-pre-wrap break-words max-h-96 overflow-auto rounded-md p-3 ${w.error ? "bg-status-error-bg-subtle text-status-error-text" : "bg-bg-sunken text-text-primary"}`,
400
417
  children: w.body
401
418
  })
402
419
  ]
403
420
  }) : null,
404
- /* @__PURE__ */ d(ne, {
421
+ /* @__PURE__ */ f(o, {
405
422
  isOpen: G !== null,
406
423
  onClose: () => K(null),
407
424
  onConfirm: () => {
408
425
  let e = G;
409
- K(null), e && Y(e);
426
+ K(null), e && J(e);
410
427
  },
411
428
  title: C("agentDetails.maintenance.confirmCommandTitle", "Run destructive command?"),
412
429
  message: C("agentDetails.maintenance.confirmCommandMsg", "This command can change or destroy agent state: {{cmd}}", { cmd: (G ?? []).join(" ") }),
@@ -414,18 +431,18 @@ function x({ agentId: x, agentVersion: S, onAfterDestructiveNuke: ue }) {
414
431
  variant: "danger",
415
432
  isLoading: H
416
433
  }),
417
- /* @__PURE__ */ d(ne, {
418
- isOpen: Q !== null,
419
- onClose: () => $(null),
434
+ /* @__PURE__ */ f(o, {
435
+ isOpen: Z !== null,
436
+ onClose: () => Q(null),
420
437
  onConfirm: () => {
421
- let e = Q;
422
- $(null), e && ke(e);
438
+ let e = Z;
439
+ Q(null), e && Me(e);
423
440
  },
424
- title: Z ? C("agentDetails.maintenance.confirmNukeDryTitle", "Preview nuke?") : C("agentDetails.maintenance.confirmNukeTitle", "Nuke agent?"),
425
- message: Q?.all ? C("agentDetails.maintenance.confirmNukeAllMsg", "This wipes ALL state, plugins, secrets and config on the host.") : C("agentDetails.maintenance.confirmNukeStateMsg", "This wipes this agent’s state and tracked binaries."),
426
- confirmLabel: Z ? C("agentDetails.maintenance.preview", "Preview") : C("agentDetails.maintenance.nuke", "Nuke"),
441
+ title: X ? C("agentDetails.maintenance.confirmNukeDryTitle", "Preview nuke?") : C("agentDetails.maintenance.confirmNukeTitle", "Nuke agent?"),
442
+ message: Z?.all ? C("agentDetails.maintenance.confirmNukeAllMsg", "This wipes ALL state, plugins, secrets and config on the host.") : C("agentDetails.maintenance.confirmNukeStateMsg", "This wipes this agent’s state and tracked binaries."),
443
+ confirmLabel: X ? C("agentDetails.maintenance.preview", "Preview") : C("agentDetails.maintenance.nuke", "Nuke"),
427
444
  variant: "danger",
428
- isLoading: X
445
+ isLoading: Y
429
446
  })
430
447
  ]
431
448
  });