@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.
- package/dist/components/agents/AgentConnectionRecovery.js +100 -94
- package/dist/components/agents/AgentConnectionRecovery.js.map +1 -1
- package/dist/components/agents/AgentMaintenanceTab.js +177 -160
- package/dist/components/agents/AgentMaintenanceTab.js.map +1 -1
- package/dist/components/agents/OpenInBrowserEditorButton.js +102 -94
- package/dist/components/agents/OpenInBrowserEditorButton.js.map +1 -1
- package/dist/components/assistant/AssistantChatArea.js +1 -0
- package/dist/components/assistant/AssistantChatArea.js.map +1 -1
- package/dist/components/assistant/AssistantModeSelector.js +20 -19
- package/dist/components/assistant/AssistantModeSelector.js.map +1 -1
- package/dist/components/tunnels/TunnelCard.js +3 -3
- package/dist/components/tunnels/TunnelCard.js.map +1 -1
- package/dist/components/tunnels/TunnelPublicAccessPanel.js +36 -36
- package/dist/components/tunnels/TunnelPublicAccessPanel.js.map +1 -1
- package/dist/config/assistantUsecases.js +11 -0
- package/dist/config/assistantUsecases.js.map +1 -1
- package/dist/constants/permissions.js +38 -6
- package/dist/constants/permissions.js.map +1 -1
- package/dist/index.js +4 -3
- package/dist/pages/CatalogDetailPage.js +155 -155
- package/dist/pages/CatalogDetailPage.js.map +1 -1
- package/dist/pages/CatalogPage.js +110 -109
- package/dist/pages/CatalogPage.js.map +1 -1
- package/dist/pages/ComponentDetailPage.js +338 -338
- package/dist/pages/ComponentDetailPage.js.map +1 -1
- package/dist/pages/ComponentsPage.js +104 -103
- package/dist/pages/ComponentsPage.js.map +1 -1
- package/dist/pages/TargetDetailsPage.js +140 -132
- package/dist/pages/TargetDetailsPage.js.map +1 -1
- package/dist/pages/TemplateDetailPage.js +201 -199
- package/dist/pages/TemplateDetailPage.js.map +1 -1
- package/dist/pages/TemplatesPage.js +62 -61
- package/dist/pages/TemplatesPage.js.map +1 -1
- package/dist/pages/VibeDetailsPage.js +568 -555
- package/dist/pages/VibeDetailsPage.js.map +1 -1
- package/dist/pages/ai/AIBookmarksPage.js +104 -89
- package/dist/pages/ai/AIBookmarksPage.js.map +1 -1
- package/dist/pages/ai/AIPage.js +116 -107
- package/dist/pages/ai/AIPage.js.map +1 -1
- package/dist/pages/ai/AISessionDetailPage.js +46 -34
- package/dist/pages/ai/AISessionDetailPage.js.map +1 -1
- package/dist/pages/ai/AgentManagerPage.js +112 -100
- package/dist/pages/ai/AgentManagerPage.js.map +1 -1
- package/dist/pages/tunnels/TunnelDetailsPage.js +177 -153
- package/dist/pages/tunnels/TunnelDetailsPage.js.map +1 -1
- package/dist/pages/tunnels/TunnelsTab.js +119 -111
- package/dist/pages/tunnels/TunnelsTab.js.map +1 -1
- package/dist/pages/tunnels/tabs/TunnelDomainsTab.js +24 -24
- package/dist/pages/tunnels/tabs/TunnelDomainsTab.js.map +1 -1
- package/dist/pages/tunnels/tabs/TunnelOverviewTab.js +9 -8
- package/dist/pages/tunnels/tabs/TunnelOverviewTab.js.map +1 -1
- package/dist/pages/tunnels/tabs/TunnelSessionsTab.js +13 -13
- package/dist/pages/tunnels/tabs/TunnelSessionsTab.js.map +1 -1
- package/dist/pages/tunnels/tabs/TunnelSettingsTab.js +19 -15
- package/dist/pages/tunnels/tabs/TunnelSettingsTab.js.map +1 -1
- package/dist/services/assistantApi.js +9 -3
- package/dist/services/assistantApi.js.map +1 -1
- package/dist/services/createSandboxAssistantTransport.js +120 -0
- package/dist/services/createSandboxAssistantTransport.js.map +1 -0
- package/dist/store/assistantStore.js +1 -1
- package/dist/store/assistantStore.js.map +1 -1
- 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
|
|
4
|
-
import { useField as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
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
|
|
12
|
+
function m(e) {
|
|
11
13
|
return e && typeof e == "object" && !Array.isArray(e) ? e : null;
|
|
12
14
|
}
|
|
13
|
-
function
|
|
15
|
+
function h(e, t) {
|
|
14
16
|
let n = e?.[t];
|
|
15
17
|
return typeof n == "string" ? n : null;
|
|
16
18
|
}
|
|
17
|
-
function
|
|
19
|
+
function g(e, t) {
|
|
18
20
|
let n = e?.[t];
|
|
19
21
|
return typeof n == "boolean" ? n : null;
|
|
20
22
|
}
|
|
21
|
-
var
|
|
22
|
-
function x({ agentId: x, agentVersion: S, onAfterDestructiveNuke:
|
|
23
|
-
let C = te(), [w, T] =
|
|
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:
|
|
31
|
+
}, []), { data: pe, refetch: D } = r({
|
|
30
32
|
variables: { agentId: x },
|
|
31
33
|
fetchPolicy: "cache-and-network"
|
|
32
|
-
}), [
|
|
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
|
|
36
|
-
e.data?.agentUpdateCheck?.error ? E(C("agentDetails.maintenance.update", "Update"), e.data.agentUpdateCheck.error, !0) :
|
|
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
|
-
|
|
44
|
+
O,
|
|
43
45
|
E,
|
|
44
46
|
C,
|
|
45
47
|
S
|
|
46
|
-
]),
|
|
48
|
+
]), B = l(async (e) => {
|
|
47
49
|
T(null);
|
|
48
50
|
try {
|
|
49
|
-
let t = (await
|
|
51
|
+
let t = (await A({ variables: {
|
|
50
52
|
agentId: x,
|
|
51
53
|
version: e || null
|
|
52
|
-
} })).data?.agentSelfUpdate, n =
|
|
53
|
-
t?.error ||
|
|
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
|
-
|
|
61
|
+
A,
|
|
60
62
|
E,
|
|
61
63
|
D
|
|
62
|
-
]),
|
|
64
|
+
]), xe = l(async (e) => {
|
|
63
65
|
try {
|
|
64
|
-
await
|
|
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
|
-
|
|
75
|
+
M,
|
|
74
76
|
D,
|
|
75
77
|
E
|
|
76
|
-
]), { data:
|
|
78
|
+
]), { data: Se, loading: V, refetch: Ce } = e({
|
|
77
79
|
variables: { agentId: x },
|
|
78
80
|
fetchPolicy: "cache-and-network"
|
|
79
|
-
}), [
|
|
80
|
-
let e =
|
|
81
|
+
}), [we, { loading: H }] = a(), Te = ne(() => {
|
|
82
|
+
let e = m(Se?.agentCommands?.data)?.commands;
|
|
81
83
|
return Array.isArray(e) ? e : [];
|
|
82
|
-
}, [
|
|
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
|
|
87
|
+
let t = (await we({ variables: {
|
|
86
88
|
agentId: x,
|
|
87
89
|
argv: e
|
|
88
|
-
} })).data?.runAgentCommand, n =
|
|
89
|
-
E(`vibe ${e.join(" ")}`, ee.trim() || t?.error || "(no output)", !
|
|
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
|
-
|
|
97
|
+
we,
|
|
96
98
|
E
|
|
97
|
-
]),
|
|
99
|
+
]), ke = l(() => {
|
|
98
100
|
if (!U) return;
|
|
99
|
-
let e =
|
|
100
|
-
q?.destructive ? K(e) :
|
|
101
|
+
let e = Oe();
|
|
102
|
+
q?.destructive ? K(e) : J(e);
|
|
101
103
|
}, [
|
|
102
104
|
U,
|
|
103
|
-
|
|
105
|
+
Oe,
|
|
104
106
|
q,
|
|
105
|
-
|
|
106
|
-
]), [
|
|
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
|
|
111
|
+
let t = (await Ae({ variables: {
|
|
110
112
|
agentId: x,
|
|
111
113
|
all: e.all,
|
|
112
114
|
removeConfig: e.removeConfig,
|
|
113
|
-
dryRun:
|
|
114
|
-
} })).data?.nukeVibecontrolsAgent, n =
|
|
115
|
-
E(`vibe nuke${e.all ? " --all" : ""}${
|
|
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
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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__ */
|
|
130
|
-
className:
|
|
146
|
+
Fe && /* @__PURE__ */ p("section", {
|
|
147
|
+
className: _,
|
|
131
148
|
children: [
|
|
132
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ p("div", {
|
|
133
150
|
className: "flex items-center gap-2 mb-3",
|
|
134
|
-
children: [/* @__PURE__ */
|
|
151
|
+
children: [/* @__PURE__ */ f(ie, {
|
|
135
152
|
className: "size-5 text-text-secondary",
|
|
136
153
|
"aria-hidden": "true"
|
|
137
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
159
|
+
/* @__PURE__ */ p("div", {
|
|
143
160
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-3 text-sm mb-4",
|
|
144
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
164
|
+
}), /* @__PURE__ */ f("div", {
|
|
148
165
|
className: "font-mono text-text-primary",
|
|
149
166
|
children: S ?? "—"
|
|
150
|
-
})] }), /* @__PURE__ */
|
|
167
|
+
})] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("div", {
|
|
151
168
|
className: "text-text-muted",
|
|
152
169
|
children: C("agentDetails.maintenance.latest", "Latest")
|
|
153
|
-
}), /* @__PURE__ */
|
|
170
|
+
}), /* @__PURE__ */ p("div", {
|
|
154
171
|
className: "font-mono text-text-primary",
|
|
155
|
-
children: [
|
|
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__ */
|
|
178
|
+
/* @__PURE__ */ p("div", {
|
|
162
179
|
className: "flex flex-wrap items-center gap-2 mb-4",
|
|
163
|
-
children: [/* @__PURE__ */
|
|
180
|
+
children: [/* @__PURE__ */ p("button", {
|
|
164
181
|
type: "button",
|
|
165
|
-
onClick:
|
|
166
|
-
disabled:
|
|
182
|
+
onClick: be,
|
|
183
|
+
disabled: k,
|
|
167
184
|
className: v,
|
|
168
|
-
children: [
|
|
185
|
+
children: [k ? /* @__PURE__ */ f(d, {
|
|
169
186
|
className: "size-4 animate-spin",
|
|
170
187
|
"aria-hidden": "true"
|
|
171
|
-
}) : /* @__PURE__ */
|
|
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__ */
|
|
192
|
+
}), /* @__PURE__ */ p("button", {
|
|
176
193
|
type: "button",
|
|
177
|
-
onClick: () =>
|
|
178
|
-
disabled:
|
|
179
|
-
"aria-busy":
|
|
180
|
-
className:
|
|
181
|
-
children: [
|
|
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__ */
|
|
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__ */
|
|
207
|
+
/* @__PURE__ */ p("div", {
|
|
191
208
|
className: "flex flex-wrap items-end gap-2 mb-4",
|
|
192
|
-
children: [/* @__PURE__ */
|
|
209
|
+
children: [/* @__PURE__ */ p("div", {
|
|
193
210
|
className: "flex w-full sm:w-44 flex-col gap-1",
|
|
194
|
-
children: [/* @__PURE__ */
|
|
195
|
-
htmlFor:
|
|
211
|
+
children: [/* @__PURE__ */ f("label", {
|
|
212
|
+
htmlFor: L.id,
|
|
196
213
|
className: y,
|
|
197
214
|
children: C("agentDetails.maintenance.versionLabel", "Version")
|
|
198
|
-
}), /* @__PURE__ */
|
|
199
|
-
...
|
|
215
|
+
}), /* @__PURE__ */ f("input", {
|
|
216
|
+
...L.inputProps,
|
|
200
217
|
type: "text",
|
|
201
|
-
value:
|
|
202
|
-
onChange: (e) =>
|
|
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__ */
|
|
223
|
+
}), /* @__PURE__ */ f("button", {
|
|
207
224
|
type: "button",
|
|
208
|
-
onClick: () =>
|
|
209
|
-
disabled:
|
|
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__ */
|
|
231
|
+
/* @__PURE__ */ p("label", {
|
|
215
232
|
className: "flex items-center gap-3 cursor-pointer",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
217
|
-
checked:
|
|
218
|
-
disabled:
|
|
219
|
-
onCheckedChange: (e) =>
|
|
220
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
228
|
-
className:
|
|
244
|
+
$ && /* @__PURE__ */ p("section", {
|
|
245
|
+
className: _,
|
|
229
246
|
children: [
|
|
230
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ p("div", {
|
|
231
248
|
className: "flex items-center justify-between gap-2 mb-3",
|
|
232
|
-
children: [/* @__PURE__ */
|
|
249
|
+
children: [/* @__PURE__ */ p("div", {
|
|
233
250
|
className: "flex items-center gap-2",
|
|
234
|
-
children: [/* @__PURE__ */
|
|
251
|
+
children: [/* @__PURE__ */ f(oe, {
|
|
235
252
|
className: "size-5 text-text-secondary",
|
|
236
253
|
"aria-hidden": "true"
|
|
237
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
258
|
+
}), /* @__PURE__ */ f("button", {
|
|
242
259
|
type: "button",
|
|
243
|
-
onClick: () =>
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
274
|
+
/* @__PURE__ */ p("div", {
|
|
258
275
|
className: "flex flex-wrap items-end gap-2 mb-3",
|
|
259
276
|
children: [
|
|
260
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ p("div", {
|
|
261
278
|
className: "flex w-full sm:w-auto sm:min-w-44 flex-col gap-1",
|
|
262
|
-
children: [/* @__PURE__ */
|
|
263
|
-
htmlFor:
|
|
279
|
+
children: [/* @__PURE__ */ f("label", {
|
|
280
|
+
htmlFor: R.id,
|
|
264
281
|
className: y,
|
|
265
282
|
children: C("agentDetails.maintenance.command", "Command")
|
|
266
|
-
}), /* @__PURE__ */
|
|
267
|
-
...
|
|
283
|
+
}), /* @__PURE__ */ p("select", {
|
|
284
|
+
...R.inputProps,
|
|
268
285
|
value: U,
|
|
269
|
-
onChange: (e) =>
|
|
286
|
+
onChange: (e) => Ee(e.target.value),
|
|
270
287
|
className: `${b} w-full`,
|
|
271
|
-
children: [/* @__PURE__ */
|
|
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
|
-
}),
|
|
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__ */
|
|
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__ */
|
|
283
|
-
htmlFor:
|
|
299
|
+
children: [/* @__PURE__ */ f("label", {
|
|
300
|
+
htmlFor: z.id,
|
|
284
301
|
className: y,
|
|
285
302
|
children: C("agentDetails.maintenance.args", "Arguments (optional)")
|
|
286
|
-
}), /* @__PURE__ */
|
|
287
|
-
...
|
|
303
|
+
}), /* @__PURE__ */ f("input", {
|
|
304
|
+
...z.inputProps,
|
|
288
305
|
type: "text",
|
|
289
306
|
value: W,
|
|
290
|
-
onChange: (e) =>
|
|
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__ */
|
|
312
|
+
/* @__PURE__ */ p("button", {
|
|
296
313
|
type: "button",
|
|
297
|
-
onClick:
|
|
314
|
+
onClick: ke,
|
|
298
315
|
disabled: H || !U,
|
|
299
316
|
"aria-busy": H,
|
|
300
|
-
className:
|
|
301
|
-
children: [H ? /* @__PURE__ */ d
|
|
317
|
+
className: ue,
|
|
318
|
+
children: [H ? /* @__PURE__ */ f(d, {
|
|
302
319
|
className: "size-4 animate-spin",
|
|
303
320
|
"aria-hidden": "true"
|
|
304
|
-
}) : /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
318
|
-
className: `${
|
|
334
|
+
$ && /* @__PURE__ */ p("section", {
|
|
335
|
+
className: `${_} border-status-error-border`,
|
|
319
336
|
children: [
|
|
320
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ p("div", {
|
|
321
338
|
className: "flex items-center gap-2 mb-3",
|
|
322
|
-
children: [/* @__PURE__ */
|
|
339
|
+
children: [/* @__PURE__ */ f(re, {
|
|
323
340
|
className: "size-5 text-status-error-text",
|
|
324
341
|
"aria-hidden": "true"
|
|
325
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
347
|
+
/* @__PURE__ */ p("label", {
|
|
331
348
|
className: "flex items-center gap-3 cursor-pointer mb-3",
|
|
332
|
-
children: [/* @__PURE__ */
|
|
333
|
-
checked:
|
|
334
|
-
onCheckedChange: (e) =>
|
|
335
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
357
|
+
/* @__PURE__ */ p("div", {
|
|
341
358
|
className: "flex flex-wrap gap-2",
|
|
342
|
-
children: [/* @__PURE__ */
|
|
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:
|
|
365
|
+
disabled: Y,
|
|
349
366
|
className: v,
|
|
350
|
-
children: [
|
|
367
|
+
children: [Y ? /* @__PURE__ */ f(d, {
|
|
351
368
|
className: "size-4 animate-spin",
|
|
352
369
|
"aria-hidden": "true"
|
|
353
|
-
}) : /* @__PURE__ */
|
|
370
|
+
}) : /* @__PURE__ */ f(se, {
|
|
354
371
|
className: "size-4",
|
|
355
372
|
"aria-hidden": "true"
|
|
356
373
|
}), C("agentDetails.maintenance.nukeState", "Nuke state")]
|
|
357
|
-
}), /* @__PURE__ */
|
|
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:
|
|
364
|
-
className:
|
|
365
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
378
|
-
className:
|
|
394
|
+
w ? /* @__PURE__ */ p("section", {
|
|
395
|
+
className: _,
|
|
379
396
|
children: [
|
|
380
|
-
/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ p("div", {
|
|
381
398
|
className: "flex items-center justify-between gap-2 mb-2",
|
|
382
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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 &&
|
|
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__ */
|
|
418
|
-
isOpen:
|
|
419
|
-
onClose: () =>
|
|
434
|
+
/* @__PURE__ */ f(o, {
|
|
435
|
+
isOpen: Z !== null,
|
|
436
|
+
onClose: () => Q(null),
|
|
420
437
|
onConfirm: () => {
|
|
421
|
-
let e =
|
|
422
|
-
|
|
438
|
+
let e = Z;
|
|
439
|
+
Q(null), e && Me(e);
|
|
423
440
|
},
|
|
424
|
-
title:
|
|
425
|
-
message:
|
|
426
|
-
confirmLabel:
|
|
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:
|
|
445
|
+
isLoading: Y
|
|
429
446
|
})
|
|
430
447
|
]
|
|
431
448
|
});
|