@burdenoff/microfe-vibecontrols 2026.709.2 → 2026.710.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/agent-manager/AgentManagerBookmarksDrawer.js +87 -85
- package/dist/components/agent-manager/AgentManagerBookmarksDrawer.js.map +1 -1
- package/dist/components/ai/InstructionFilesManager.js +138 -136
- package/dist/components/ai/InstructionFilesManager.js.map +1 -1
- package/dist/components/ai/PluginHarnessPicker.js +70 -64
- package/dist/components/ai/PluginHarnessPicker.js.map +1 -1
- package/dist/components/docs/DocsEditPanel.js +1 -1
- package/dist/components/docs/DocsEditPanel.js.map +1 -1
- package/dist/components/docs/DocsPageTree.js +1 -1
- package/dist/components/docs/DocsPageTree.js.map +1 -1
- package/dist/components/docs/DocsTabPanel.js +108 -106
- package/dist/components/docs/DocsTabPanel.js.map +1 -1
- package/dist/components/notes/NotesTabPanel.js +99 -99
- package/dist/components/notes/NotesTabPanel.js.map +1 -1
- package/dist/components/scorecard/ScorecardPanel.js +309 -308
- package/dist/components/scorecard/ScorecardPanel.js.map +1 -1
- package/dist/components/sessions/SessionPublicLinkPanel.js +104 -102
- package/dist/components/sessions/SessionPublicLinkPanel.js.map +1 -1
- package/dist/components/settings/AdvancedSection.js +92 -90
- package/dist/components/settings/AdvancedSection.js.map +1 -1
- package/dist/components/vibedeck/VibeDeckPublicLinkPanel.js +104 -102
- package/dist/components/vibedeck/VibeDeckPublicLinkPanel.js.map +1 -1
- package/dist/constants/permissions.js +7 -0
- package/dist/constants/permissions.js.map +1 -1
- package/dist/pages/ActionsPage.js +303 -303
- package/dist/pages/ActionsPage.js.map +1 -1
- package/dist/pages/AgentDetailsPage.js +520 -516
- package/dist/pages/AgentDetailsPage.js.map +1 -1
- package/dist/pages/AgentsPage.js +287 -283
- package/dist/pages/AgentsPage.js.map +1 -1
- package/dist/pages/TargetsPage.js +554 -549
- package/dist/pages/TargetsPage.js.map +1 -1
- package/dist/pages/VibeAuditPage.js +2 -2
- package/dist/pages/VibeAuditPage.js.map +1 -1
- package/dist/pages/VibeDeckPage.js +257 -257
- package/dist/pages/VibeDeckPage.js.map +1 -1
- package/dist/pages/VibeDetailsPage.js +688 -693
- package/dist/pages/VibeDetailsPage.js.map +1 -1
- package/dist/pages/VibesPage.js +49 -41
- package/dist/pages/VibesPage.js.map +1 -1
- package/dist/pages/WebhooksPage.js +162 -138
- package/dist/pages/WebhooksPage.js.map +1 -1
- package/dist/pages/tunnels/DomainsTab.js +54 -47
- package/dist/pages/tunnels/DomainsTab.js.map +1 -1
- package/package.json +1 -1
package/dist/pages/AgentsPage.js
CHANGED
|
@@ -19,70 +19,70 @@ import { GetHelpButton as Te } from "../components/shared/GetHelpButton.js";
|
|
|
19
19
|
import { useField as Ee } from "../shared/hooks/useField.js";
|
|
20
20
|
import { TagFilter as De } from "../components/shared/TagFilter.js";
|
|
21
21
|
import "../components/shared/index.js";
|
|
22
|
-
import { VIBE_PERMISSIONS as
|
|
23
|
-
import { PageSkeleton as
|
|
24
|
-
import { notify as
|
|
25
|
-
import { AgentCard as
|
|
26
|
-
import { AgentList as
|
|
27
|
-
import { AgentForm as
|
|
22
|
+
import { VIBE_PERMISSIONS as c } from "../constants/permissions.js";
|
|
23
|
+
import { PageSkeleton as Oe } from "../components/shared/PageSkeleton.js";
|
|
24
|
+
import { notify as l } from "../lib/toast.js";
|
|
25
|
+
import { AgentCard as ke } from "../components/agents/AgentCard.js";
|
|
26
|
+
import { AgentList as Ae } from "../components/agents/AgentList.js";
|
|
27
|
+
import { AgentForm as je } from "../components/agents/AgentForm.js";
|
|
28
28
|
import "../components/agents/index.js";
|
|
29
|
-
import { deriveAgentStatus as
|
|
30
|
-
import { useCallback as
|
|
31
|
-
import { Bot as
|
|
32
|
-
import { useSearchParams as
|
|
33
|
-
import { usePermissions as
|
|
34
|
-
import { AnimatePresence as
|
|
35
|
-
import { jsx as
|
|
36
|
-
import { Button as
|
|
37
|
-
import { useEventBus as
|
|
38
|
-
import { AccessDenied as
|
|
39
|
-
import { MotionItem as
|
|
29
|
+
import { deriveAgentStatus as Me } from "../utils/agentStatus.js";
|
|
30
|
+
import { useCallback as u, useEffect as d, useMemo as f, useRef as Ne, useState as p } from "react";
|
|
31
|
+
import { Bot as Pe, CheckSquare as Fe, Grid as Ie, List as Le, Plus as m, RefreshCw as Re, Trash2 as ze, XSquare as Be } from "lucide-react";
|
|
32
|
+
import { useSearchParams as Ve } from "react-router-dom";
|
|
33
|
+
import { usePermissions as He } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
34
|
+
import { AnimatePresence as Ue } from "framer-motion";
|
|
35
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
36
|
+
import { Button as We, Input as Ge, PagePurpose as Ke, ResponsiveDialog as qe, ResponsiveDialogContent as Je, ResponsiveDialogDescription as Ye, ResponsiveDialogFooter as Xe, ResponsiveDialogHeader as Ze, ResponsiveDialogTitle as Qe } from "@burdenoff/fe-libs/ui";
|
|
37
|
+
import { useEventBus as $e } from "@burdenoff/fe-libs/shared/events";
|
|
38
|
+
import { AccessDenied as et, PermissionButton as tt } from "@burdenoff/fe-libs/shared/components";
|
|
39
|
+
import { MotionItem as nt, MotionList as rt, MotionPage as _ } from "@burdenoff/fe-libs/shared/motion";
|
|
40
40
|
//#region src/pages/AgentsPage.tsx
|
|
41
|
-
function
|
|
42
|
-
let { onAgentSelect:
|
|
41
|
+
function it() {
|
|
42
|
+
let { onAgentSelect: it, workspaceId: v } = pe(), y = me(), b = $e(), { hasPermission: at, isLoading: ot, permissions: st } = He(), x = le(), ct = [
|
|
43
43
|
{
|
|
44
44
|
value: "all",
|
|
45
|
-
label:
|
|
45
|
+
label: x("agentsPage.statusAll", "All Statuses")
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
value: "ACTIVE",
|
|
49
|
-
label:
|
|
49
|
+
label: x("agentsPage.statusActive", "Active")
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
value: "STOPPED",
|
|
53
|
-
label:
|
|
53
|
+
label: x("agentsPage.statusStopped", "Stopped")
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
value: "OFFLINE",
|
|
57
|
-
label:
|
|
57
|
+
label: x("agentsPage.statusOffline", "Offline")
|
|
58
58
|
}
|
|
59
|
-
],
|
|
59
|
+
], lt = [
|
|
60
60
|
{
|
|
61
61
|
value: "all",
|
|
62
|
-
label:
|
|
62
|
+
label: x("agentsPage.platformAll", "All Platforms")
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
value: "darwin",
|
|
66
|
-
label:
|
|
66
|
+
label: x("agentsPage.platformMac", "macOS")
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
value: "linux",
|
|
70
|
-
label:
|
|
70
|
+
label: x("agentsPage.platformLinux", "Linux")
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
value: "windows",
|
|
74
|
-
label:
|
|
74
|
+
label: x("agentsPage.platformWindows", "Windows")
|
|
75
75
|
}
|
|
76
|
-
],
|
|
77
|
-
|
|
76
|
+
], ut = at(c.AGENT_LIST), [S, dt] = p(""), [C, ft] = p("all"), [w, pt] = p("all"), [T, mt] = p("all"), [E, ht] = p("grid"), [gt, D] = p(!1), [_t, vt] = p(!1), [O, yt] = Ve();
|
|
77
|
+
d(() => {
|
|
78
78
|
if (O.get("create") === "true") {
|
|
79
79
|
D(!0);
|
|
80
80
|
let e = new URLSearchParams(O);
|
|
81
81
|
e.delete("create"), yt(e, { replace: !0 });
|
|
82
82
|
}
|
|
83
83
|
}, [O, yt]);
|
|
84
|
-
let [k, A] =
|
|
85
|
-
|
|
84
|
+
let [k, A] = p(null), [j, bt] = p(!1), M = s((e) => e.connectingAgents), xt = s((e) => e.markAgentConnecting), N = s((e) => e.clearAgentConnecting), St = f(() => new Set(Object.keys(M)), [M]), Ct = Ne(/* @__PURE__ */ new Map());
|
|
85
|
+
d(() => {
|
|
86
86
|
let e = Ct.current;
|
|
87
87
|
for (let t of Object.keys(M)) {
|
|
88
88
|
if (e.has(t)) continue;
|
|
@@ -97,74 +97,74 @@ function at() {
|
|
|
97
97
|
e.clear();
|
|
98
98
|
};
|
|
99
99
|
}, [M, N]);
|
|
100
|
-
let [P, F] =
|
|
100
|
+
let [P, F] = p(null), [wt, I] = p(!1), Tt = Ne(null), L = Ee({ hint: x("agentsPage.tunnelUrlHint", "Leave empty to clear. Agents with auto-tunnel report this automatically on startup.") }), [R, z] = p(/* @__PURE__ */ new Set()), [B, Et] = p(!1), [Dt, V] = p(!1), [H, U] = p(null), [Ot] = n({ refetchQueries: ["ListAgents"] }), { setDraftTagIds: kt, flushTags: At } = be("VIBECONTROLS_AGENT"), [jt] = e({ refetchQueries: ["ListAgents"] }), [Mt] = t({ refetchQueries: ["ListAgents"] }), [Nt] = i({ refetchQueries: ["ListAgents"] }), [Pt] = ie({ refetchQueries: ["ListAgents"] }), [Ft] = ae({ refetchQueries: ["ListAgents"] }), [It] = re({ refetchQueries: ["ListAgents"] }), { refetch: Lt } = he(), { data: Rt, loading: zt, refetch: Bt } = ne({
|
|
101
101
|
variables: {
|
|
102
|
-
workspaceId:
|
|
102
|
+
workspaceId: v ?? "",
|
|
103
103
|
limit: 50,
|
|
104
104
|
offset: 0
|
|
105
105
|
},
|
|
106
|
-
skip: !
|
|
106
|
+
skip: !v,
|
|
107
107
|
fetchPolicy: "cache-and-network"
|
|
108
|
-
}),
|
|
108
|
+
}), Vt = Rt?.targets?.items ?? [], Ht = Vt.length > 0, [Ut] = oe({ refetchQueries: ["ListAgents"] }), [Wt] = ee({ refetchQueries: ["ListAgents"] }), [Gt] = r({
|
|
109
109
|
refetchQueries: ["VibeControlsInitialData", "ListTargets"],
|
|
110
110
|
awaitRefetchQueries: !0
|
|
111
|
-
}),
|
|
112
|
-
if (!
|
|
111
|
+
}), Kt = u(async (e) => {
|
|
112
|
+
if (!v || !e.trim()) return null;
|
|
113
113
|
try {
|
|
114
|
-
let t = await
|
|
115
|
-
workspaceId:
|
|
114
|
+
let t = await Gt({ variables: {
|
|
115
|
+
workspaceId: v,
|
|
116
116
|
input: {
|
|
117
117
|
type: "DIRECT",
|
|
118
118
|
name: e.trim()
|
|
119
119
|
}
|
|
120
120
|
} });
|
|
121
|
-
if (t.error && a(t.error)) throw o(),
|
|
121
|
+
if (t.error && a(t.error)) throw o(), U("target"), t.error;
|
|
122
122
|
let n = t.data?.createTarget;
|
|
123
|
-
return n ? (
|
|
123
|
+
return n ? (Lt(), Bt(), {
|
|
124
124
|
id: n.id,
|
|
125
125
|
name: n.name,
|
|
126
126
|
type: n.type ?? "DIRECT",
|
|
127
127
|
status: n.status ?? "unknown"
|
|
128
128
|
}) : null;
|
|
129
129
|
} catch (e) {
|
|
130
|
-
if (a(e)) throw o(),
|
|
130
|
+
if (a(e)) throw o(), U("target"), e;
|
|
131
131
|
return null;
|
|
132
132
|
}
|
|
133
133
|
}, [
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
]), { data:
|
|
134
|
+
Gt,
|
|
135
|
+
Lt,
|
|
136
|
+
Bt,
|
|
137
|
+
v
|
|
138
|
+
]), { data: qt, loading: W, error: Jt, refetch: G } = te({
|
|
139
139
|
variables: {
|
|
140
140
|
filter: {
|
|
141
|
-
isActive:
|
|
142
|
-
platform:
|
|
141
|
+
isActive: C === "ACTIVE" ? !0 : C === "OFFLINE" ? !1 : void 0,
|
|
142
|
+
platform: w === "all" ? void 0 : w
|
|
143
143
|
},
|
|
144
144
|
pagination: { limit: 100 }
|
|
145
145
|
},
|
|
146
146
|
fetchPolicy: "cache-first",
|
|
147
|
-
skip: !
|
|
148
|
-
}), [
|
|
149
|
-
|
|
150
|
-
let e = window.setTimeout(() =>
|
|
147
|
+
skip: !v
|
|
148
|
+
}), [Yt, Xt] = p(!1);
|
|
149
|
+
d(() => {
|
|
150
|
+
let e = window.setTimeout(() => Xt(!0), 0);
|
|
151
151
|
return () => window.clearTimeout(e);
|
|
152
152
|
}, []);
|
|
153
|
-
let
|
|
153
|
+
let K = ce({
|
|
154
154
|
fetchPolicy: "cache-and-network",
|
|
155
155
|
nextFetchPolicy: "cache-first",
|
|
156
156
|
notifyOnNetworkStatusChange: !0,
|
|
157
|
-
skip: !
|
|
157
|
+
skip: !v || !Yt,
|
|
158
158
|
pollInterval: 6e4
|
|
159
|
-
}), [
|
|
160
|
-
let e = /* @__PURE__ */ new Map(), t =
|
|
159
|
+
}), [Zt] = se({ fetchPolicy: "network-only" }), Qt = K.data === void 0, q = f(() => {
|
|
160
|
+
let e = /* @__PURE__ */ new Map(), t = K.data?.vibecontrolsAgentHealthProbes ?? [];
|
|
161
161
|
for (let n of t) e.set(n.agentId, {
|
|
162
162
|
agentId: n.agentId,
|
|
163
163
|
healthy: n.healthy,
|
|
164
164
|
errorMessage: n.errorMessage
|
|
165
165
|
});
|
|
166
166
|
return e;
|
|
167
|
-
}, [
|
|
167
|
+
}, [K.data]), J = f(() => (qt?.vibecontrolsAgents ?? []).map((e) => ({
|
|
168
168
|
id: e.id,
|
|
169
169
|
workspaceId: e.workspaceId,
|
|
170
170
|
name: e.name,
|
|
@@ -173,12 +173,12 @@ function at() {
|
|
|
173
173
|
architecture: e.architecture,
|
|
174
174
|
version: e.version,
|
|
175
175
|
isActive: e.isActive,
|
|
176
|
-
status: St.has(e.id) ? "CONNECTING" :
|
|
176
|
+
status: St.has(e.id) ? "CONNECTING" : Me({
|
|
177
177
|
id: e.id,
|
|
178
178
|
isActive: e.isActive,
|
|
179
179
|
metadata: e.metadata
|
|
180
|
-
},
|
|
181
|
-
healthError:
|
|
180
|
+
}, q, { probesLoading: Qt }),
|
|
181
|
+
healthError: q.get(e.id)?.errorMessage ?? (e.lastGatewayAuthPushStatus === "failed" ? e.lastGatewayAuthPushError ?? "Gateway-auth push failed" : null),
|
|
182
182
|
lastHeartbeat: e.lastHeartbeat || null,
|
|
183
183
|
tunnelUrl: e.tunnelUrl ?? null,
|
|
184
184
|
tunnelStatus: e.tunnelStatus ?? null,
|
|
@@ -201,58 +201,58 @@ function at() {
|
|
|
201
201
|
} : null
|
|
202
202
|
}))
|
|
203
203
|
})), [
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
204
|
+
qt?.vibecontrolsAgents,
|
|
205
|
+
q,
|
|
206
|
+
Qt,
|
|
207
207
|
St
|
|
208
208
|
]);
|
|
209
|
-
|
|
209
|
+
d(() => {
|
|
210
210
|
let e = Object.keys(M);
|
|
211
211
|
if (e.length === 0) return;
|
|
212
212
|
let t = Date.now(), n = Infinity;
|
|
213
213
|
for (let r of e) {
|
|
214
214
|
let e = M[r];
|
|
215
|
-
e !== void 0 && (
|
|
215
|
+
e !== void 0 && (q.get(r)?.healthy === !0 && t >= e ? N(r) : e < n && (n = e));
|
|
216
216
|
}
|
|
217
217
|
if (n === Infinity) return;
|
|
218
218
|
let r = Math.max(0, n - t) + 50, i = setTimeout(() => {
|
|
219
219
|
let e = s.getState().connectingAgents;
|
|
220
220
|
for (let t of Object.keys(e)) {
|
|
221
221
|
let n = e[t];
|
|
222
|
-
n !== void 0 &&
|
|
222
|
+
n !== void 0 && q.get(t)?.healthy === !0 && Date.now() >= n && N(t);
|
|
223
223
|
}
|
|
224
224
|
}, r);
|
|
225
225
|
return () => clearTimeout(i);
|
|
226
226
|
}, [
|
|
227
|
-
|
|
227
|
+
q,
|
|
228
228
|
M,
|
|
229
229
|
N
|
|
230
230
|
]);
|
|
231
|
-
let
|
|
232
|
-
if (
|
|
233
|
-
let t =
|
|
231
|
+
let Y = f(() => J.filter((e) => {
|
|
232
|
+
if (S) {
|
|
233
|
+
let t = S.toLowerCase();
|
|
234
234
|
if (!(e.name.toLowerCase().includes(t) || e.hostname?.toLowerCase().includes(t) || e.id.toLowerCase().includes(t))) return !1;
|
|
235
235
|
}
|
|
236
|
-
return !(
|
|
236
|
+
return !(T !== "all" && !(e.tagAssignments ?? []).some((e) => e.tagId === T));
|
|
237
237
|
}), [
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
]),
|
|
242
|
-
|
|
238
|
+
J,
|
|
239
|
+
S,
|
|
240
|
+
T
|
|
241
|
+
]), X = (e) => {
|
|
242
|
+
y(`/agents/${e.id}`), it?.({
|
|
243
243
|
id: e.id,
|
|
244
244
|
name: e.name,
|
|
245
245
|
type: e.platform || "unknown",
|
|
246
246
|
status: e.status || (e.isActive ? "ACTIVE" : "OFFLINE")
|
|
247
247
|
});
|
|
248
248
|
}, Z = () => {
|
|
249
|
-
D(!0),
|
|
249
|
+
D(!0), b.emitCustom("vibecontrols.agent.register_clicked", { workspaceId: v ?? void 0 });
|
|
250
250
|
}, $t = async (e) => {
|
|
251
251
|
try {
|
|
252
252
|
vt(!0);
|
|
253
253
|
let t = e.tunnelUrl?.trim(), n = e.agentApiKey?.trim();
|
|
254
254
|
if (t && n) {
|
|
255
|
-
let r = await
|
|
255
|
+
let r = await jt({ variables: { input: {
|
|
256
256
|
tunnelUrl: t,
|
|
257
257
|
apiKey: n,
|
|
258
258
|
...e.name ? { name: e.name } : {},
|
|
@@ -261,16 +261,16 @@ function at() {
|
|
|
261
261
|
if (r.error) throw r.error;
|
|
262
262
|
let i = r.data?.addVibecontrolsAgentFromTunnel;
|
|
263
263
|
if (!i?.success) throw Error(i?.error || "Failed to onboard agent — probe or OAuth setup failed.");
|
|
264
|
-
if (i.agent?.id) return await
|
|
265
|
-
workspaceId:
|
|
264
|
+
if (i.agent?.id) return await At(i.agent.id), b.emitCustom("vibecontrols.agent.registered", {
|
|
265
|
+
workspaceId: v ?? void 0,
|
|
266
266
|
agentId: i.agent.id
|
|
267
|
-
}),
|
|
268
|
-
workspaceId:
|
|
267
|
+
}), b.emitCustom("vibecontrols.agent.gateway_auth_setup", {
|
|
268
|
+
workspaceId: v ?? void 0,
|
|
269
269
|
agentId: i.agent.id
|
|
270
270
|
}), { id: i.agent.id };
|
|
271
271
|
throw Error("Agent onboarding returned no agent record.");
|
|
272
272
|
}
|
|
273
|
-
let r = await
|
|
273
|
+
let r = await Ot({ variables: { input: {
|
|
274
274
|
name: e.name,
|
|
275
275
|
hostname: e.hostname,
|
|
276
276
|
platform: e.platform,
|
|
@@ -280,14 +280,14 @@ function at() {
|
|
|
280
280
|
...e.tunnelUrl ? { tunnelUrl: e.tunnelUrl } : {},
|
|
281
281
|
...e.tunnelStatus ? { tunnelStatus: e.tunnelStatus } : {}
|
|
282
282
|
} } }), i = r.data?.createVibecontrolsAgent;
|
|
283
|
-
if (i?.id) return await
|
|
284
|
-
workspaceId:
|
|
283
|
+
if (i?.id) return await At(i.id), b.emitCustom("vibecontrols.agent.registered", {
|
|
284
|
+
workspaceId: v ?? void 0,
|
|
285
285
|
agentId: i.id
|
|
286
286
|
}), { id: i.id };
|
|
287
287
|
throw r.error ? r.error : Error("Agent creation failed — no data returned from the server.");
|
|
288
288
|
} catch (e) {
|
|
289
289
|
if (a(e)) {
|
|
290
|
-
o(),
|
|
290
|
+
o(), U("agent"), D(!1), b.emitCustom("vibecontrols.quota.agent_limit_hit", { workspaceId: v ?? void 0 });
|
|
291
291
|
return;
|
|
292
292
|
}
|
|
293
293
|
throw console.error("Failed to create agent:", e), e;
|
|
@@ -296,35 +296,35 @@ function at() {
|
|
|
296
296
|
}
|
|
297
297
|
}, en = async (e) => {
|
|
298
298
|
try {
|
|
299
|
-
let t = (await
|
|
299
|
+
let t = (await Pt({ variables: { agentId: e.id } })).data?.startVibecontrolsAgent;
|
|
300
300
|
if (!t?.success) {
|
|
301
301
|
if (/not yet configured|awaiting[-\s_]config/i.test(t?.error ?? "")) {
|
|
302
|
-
let t = (await
|
|
302
|
+
let t = (await It({ variables: { input: { agentId: e.id } } })).data?.setupAgentGatewayAuth;
|
|
303
303
|
if (t?.error) throw Error(`Agent needs credentials. Auto re-push failed: ${t.error}. Try "Re-push credentials" in Security tab.`);
|
|
304
304
|
if (!t) throw Error("Agent needs credentials. Auto re-push returned no result. Try \"Re-push credentials\" in Security tab.");
|
|
305
305
|
let n = t.agent?.lastGatewayAuthPushStatus, r = t.agent?.lastGatewayAuthPushError;
|
|
306
306
|
if (n === "failed") throw Error(`Credentials created but push to agent tunnel failed: ${r || "unknown error"}. Check that the agent can reach the workspace's gateway URLs from its host network.`);
|
|
307
|
-
let i = (await
|
|
307
|
+
let i = (await Pt({ variables: { agentId: e.id } })).data?.startVibecontrolsAgent;
|
|
308
308
|
if (!i?.success) throw Error(`Credentials pushed but lifecycle/start failed: ${i?.error || "unknown error"}. The agent has fresh credentials; try clicking Reconnect again or check vibe status on the host.`);
|
|
309
|
-
|
|
310
|
-
workspaceId:
|
|
309
|
+
b.emitCustom("vibecontrols.agent.gateway_auth_setup", {
|
|
310
|
+
workspaceId: v ?? void 0,
|
|
311
311
|
agentId: e.id
|
|
312
|
-
}), await
|
|
312
|
+
}), await Mt({ variables: { id: e.id } }), l.success(`Agent "${e.name}" re-credentialed and started.`);
|
|
313
313
|
return;
|
|
314
314
|
}
|
|
315
315
|
throw Error(t?.error || "Failed to start agent");
|
|
316
316
|
}
|
|
317
|
-
await
|
|
317
|
+
await Mt({ variables: { id: e.id } }), l.success(`Agent "${e.name}" started`);
|
|
318
318
|
} catch (e) {
|
|
319
|
-
console.error("Failed to start agent:", e),
|
|
319
|
+
console.error("Failed to start agent:", e), l.error(e instanceof Error ? e.message : "Failed to start agent");
|
|
320
320
|
}
|
|
321
321
|
}, tn = async (e) => {
|
|
322
322
|
try {
|
|
323
|
-
let t = (await
|
|
323
|
+
let t = (await Ft({ variables: { agentId: e.id } })).data?.stopVibecontrolsAgent;
|
|
324
324
|
if (!t?.success) throw Error(t?.error || "Failed to stop agent");
|
|
325
|
-
await
|
|
325
|
+
await Nt({ variables: { id: e.id } }), l.success(`Agent "${e.name}" stopped`);
|
|
326
326
|
} catch (e) {
|
|
327
|
-
console.error("Failed to stop agent:", e),
|
|
327
|
+
console.error("Failed to stop agent:", e), l.error(e instanceof Error ? e.message : "Failed to stop agent");
|
|
328
328
|
}
|
|
329
329
|
}, nn = (e) => {
|
|
330
330
|
F(e);
|
|
@@ -333,16 +333,16 @@ function at() {
|
|
|
333
333
|
let e = P;
|
|
334
334
|
I(!0);
|
|
335
335
|
try {
|
|
336
|
-
await
|
|
336
|
+
await Nt({
|
|
337
337
|
variables: { id: e.id },
|
|
338
338
|
refetchQueries: []
|
|
339
339
|
});
|
|
340
340
|
} catch (e) {
|
|
341
|
-
console.error("Failed to deactivate agent:", e),
|
|
341
|
+
console.error("Failed to deactivate agent:", e), l.error(e instanceof Error ? e.message : "Failed to disconnect agent"), I(!1), F(null), await G();
|
|
342
342
|
return;
|
|
343
343
|
}
|
|
344
344
|
try {
|
|
345
|
-
await
|
|
345
|
+
await Ut({
|
|
346
346
|
variables: {
|
|
347
347
|
id: e.id,
|
|
348
348
|
input: {
|
|
@@ -351,20 +351,20 @@ function at() {
|
|
|
351
351
|
}
|
|
352
352
|
},
|
|
353
353
|
refetchQueries: []
|
|
354
|
-
}),
|
|
354
|
+
}), l.success(`Agent "${e.name}" disconnected`);
|
|
355
355
|
} catch (e) {
|
|
356
|
-
console.error("Failed to clear tunnel fields:", e),
|
|
356
|
+
console.error("Failed to clear tunnel fields:", e), l.error("Agent marked offline, but failed to clear connection fields — clear them manually in Settings.");
|
|
357
357
|
}
|
|
358
|
-
I(!1), F(null), await
|
|
358
|
+
I(!1), F(null), await G();
|
|
359
359
|
}, an = (e) => {
|
|
360
|
-
|
|
360
|
+
y(`/agents/${e.id}`);
|
|
361
361
|
}, on = (e) => {
|
|
362
362
|
A(e);
|
|
363
363
|
}, sn = async () => {
|
|
364
364
|
if (!k) return;
|
|
365
365
|
let e = k.id, t = Tt.current?.value?.trim() || "";
|
|
366
366
|
try {
|
|
367
|
-
bt(!0), await
|
|
367
|
+
bt(!0), await Ut({
|
|
368
368
|
variables: {
|
|
369
369
|
id: e,
|
|
370
370
|
input: {
|
|
@@ -379,236 +379,240 @@ function at() {
|
|
|
379
379
|
} finally {
|
|
380
380
|
bt(!1);
|
|
381
381
|
}
|
|
382
|
-
}, cn =
|
|
382
|
+
}, cn = u((e) => {
|
|
383
383
|
z((t) => {
|
|
384
384
|
let n = new Set(t);
|
|
385
385
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
386
386
|
});
|
|
387
|
-
}, []), ln =
|
|
388
|
-
z(new Set(
|
|
389
|
-
}, [
|
|
387
|
+
}, []), ln = u(() => {
|
|
388
|
+
z(new Set(Y.map((e) => e.id)));
|
|
389
|
+
}, [Y]), Q = u(() => {
|
|
390
390
|
z(/* @__PURE__ */ new Set());
|
|
391
|
-
}, []), $ =
|
|
391
|
+
}, []), $ = Y.length > 0 && R.size === Y.length, un = R.size > 0, dn = u(async () => {
|
|
392
392
|
if (R.size !== 0) {
|
|
393
|
-
|
|
393
|
+
Et(!0);
|
|
394
394
|
try {
|
|
395
|
-
let e = await Promise.allSettled(Array.from(R).map((e) =>
|
|
396
|
-
n > 0 ?
|
|
395
|
+
let e = await Promise.allSettled(Array.from(R).map((e) => Wt({ variables: { id: e } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.filter((e) => e.status === "rejected").length;
|
|
396
|
+
n > 0 ? l.error(`Removed ${t}, failed to remove ${n} agent${n === 1 ? "" : "s"}`) : l.success(`Removed ${t} agent${t === 1 ? "" : "s"}`), z(/* @__PURE__ */ new Set());
|
|
397
397
|
} catch (e) {
|
|
398
|
-
|
|
398
|
+
l.error(e instanceof Error ? e.message : "Failed to remove agents");
|
|
399
399
|
} finally {
|
|
400
|
-
|
|
400
|
+
Et(!1), V(!1);
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
|
-
}, [R,
|
|
404
|
-
total:
|
|
405
|
-
active:
|
|
406
|
-
offline:
|
|
403
|
+
}, [R, Wt]), fn = {
|
|
404
|
+
total: J.length,
|
|
405
|
+
active: J.filter((e) => e.status === "ACTIVE").length,
|
|
406
|
+
offline: J.filter((e) => e.status !== "ACTIVE").length
|
|
407
407
|
};
|
|
408
|
-
return
|
|
408
|
+
return ot ? /* @__PURE__ */ h(_, {
|
|
409
409
|
className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-full",
|
|
410
|
-
children: /* @__PURE__ */
|
|
411
|
-
}) :
|
|
410
|
+
children: /* @__PURE__ */ h(_e, { message: x("agentsPage.loadingPermissions", "Loading permissions...") })
|
|
411
|
+
}) : st && st.permissionStrings?.length > 0 && !ut ? /* @__PURE__ */ h(_, {
|
|
412
412
|
className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-full",
|
|
413
|
-
children: /* @__PURE__ */
|
|
414
|
-
title:
|
|
415
|
-
description:
|
|
413
|
+
children: /* @__PURE__ */ h(et, {
|
|
414
|
+
title: x("agentsPage.accessDeniedTitle", "Access Denied"),
|
|
415
|
+
description: x("agentsPage.accessDeniedDescription", "You don't have permission to view agents. Contact your workspace administrator for access.")
|
|
416
416
|
})
|
|
417
|
-
}) :
|
|
417
|
+
}) : Jt && J.length === 0 ? /* @__PURE__ */ h(_, {
|
|
418
418
|
className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-full",
|
|
419
|
-
children: /* @__PURE__ */
|
|
420
|
-
title:
|
|
421
|
-
message:
|
|
422
|
-
onRetry: () =>
|
|
419
|
+
children: /* @__PURE__ */ h(ve, {
|
|
420
|
+
title: x("agentsPage.failedLoad", "Failed to load agents"),
|
|
421
|
+
message: Jt.message,
|
|
422
|
+
onRetry: () => G()
|
|
423
423
|
})
|
|
424
|
-
}) : /* @__PURE__ */
|
|
424
|
+
}) : /* @__PURE__ */ g(_, {
|
|
425
425
|
className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-full",
|
|
426
426
|
children: [
|
|
427
|
-
/* @__PURE__ */
|
|
428
|
-
title:
|
|
429
|
-
description:
|
|
427
|
+
/* @__PURE__ */ h(ge, {
|
|
428
|
+
title: x("agentsPage.title", "Agents"),
|
|
429
|
+
description: x("agentsPage.descriptionOnline", "{{active}} of {{total}} agents online", {
|
|
430
430
|
active: fn.active,
|
|
431
431
|
total: fn.total
|
|
432
432
|
}),
|
|
433
|
-
actions: /* @__PURE__ */
|
|
433
|
+
actions: /* @__PURE__ */ g("div", {
|
|
434
434
|
className: "flex w-full flex-col items-end gap-2 sm:w-auto sm:flex-row sm:items-center",
|
|
435
|
-
children: [/* @__PURE__ */
|
|
435
|
+
children: [/* @__PURE__ */ h("button", {
|
|
436
436
|
type: "button",
|
|
437
437
|
onClick: () => {
|
|
438
|
-
|
|
438
|
+
G(), Zt();
|
|
439
439
|
},
|
|
440
|
-
disabled:
|
|
440
|
+
disabled: W || K.loading,
|
|
441
441
|
className: "flex items-center justify-center gap-2 px-3 py-2 max-md:min-h-11 max-md:min-w-11 text-text-secondary hover:bg-bg-sunken hover:text-text-primary rounded-button transition-colors disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
442
|
-
"aria-label":
|
|
443
|
-
title:
|
|
444
|
-
children: /* @__PURE__ */
|
|
442
|
+
"aria-label": x("agentsPage.refreshTitle", "Refresh agents"),
|
|
443
|
+
title: x("agentsPage.refreshTitle", "Refresh agents"),
|
|
444
|
+
children: /* @__PURE__ */ h(Re, {
|
|
445
445
|
"aria-hidden": "true",
|
|
446
|
-
className: `size-4 ${
|
|
446
|
+
className: `size-4 ${W || K.loading ? "animate-spin" : ""}`
|
|
447
447
|
})
|
|
448
|
-
}),
|
|
449
|
-
permission:
|
|
448
|
+
}), Ht ? /* @__PURE__ */ h(tt, {
|
|
449
|
+
permission: c.AGENT_CREATE,
|
|
450
450
|
deniedBehavior: "disable",
|
|
451
|
-
deniedTooltip:
|
|
452
|
-
children: /* @__PURE__ */
|
|
451
|
+
deniedTooltip: x("agentsPage.deniedCreateTooltip", "You don't have permission to create agents"),
|
|
452
|
+
children: /* @__PURE__ */ g("button", {
|
|
453
453
|
type: "button",
|
|
454
454
|
onClick: Z,
|
|
455
455
|
className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
456
|
-
children: [/* @__PURE__ */ m
|
|
456
|
+
children: [/* @__PURE__ */ h(m, { className: "size-4" }), x("agentsPage.addAgent", "Add Agent")]
|
|
457
457
|
})
|
|
458
|
-
}) : /* @__PURE__ */
|
|
458
|
+
}) : /* @__PURE__ */ g("button", {
|
|
459
459
|
type: "button",
|
|
460
460
|
onClick: Z,
|
|
461
461
|
className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
462
|
-
children: [/* @__PURE__ */ m
|
|
462
|
+
children: [/* @__PURE__ */ h(m, { className: "size-4" }), x("agentsPage.addAgent", "Add Agent")]
|
|
463
463
|
})]
|
|
464
464
|
})
|
|
465
465
|
}),
|
|
466
|
-
/* @__PURE__ */
|
|
467
|
-
icon: /* @__PURE__ */
|
|
468
|
-
children:
|
|
466
|
+
/* @__PURE__ */ h(Ke, {
|
|
467
|
+
icon: /* @__PURE__ */ h(Pe, { className: "size-4" }),
|
|
468
|
+
children: x("agentsPage.purpose", "Agents are the lightweight programs you install on your own machines (laptop, server, CI runner) that let VibeControls securely run terminal sessions and tasks there. Register an agent here, then attach it to a vibe to give that workspace a place to actually execute work — your code never leaves your hardware.")
|
|
469
469
|
}),
|
|
470
|
-
|
|
470
|
+
J.length === 0 && !W && /* @__PURE__ */ h(we, {
|
|
471
471
|
variant: "full",
|
|
472
472
|
dismissKey: "vibecontrols-agents-setup-banner"
|
|
473
473
|
}),
|
|
474
|
-
|
|
474
|
+
J.length > 0 && /* @__PURE__ */ h(we, {
|
|
475
475
|
variant: "compact",
|
|
476
476
|
dismissKey: "vibecontrols-agents-compact-banner"
|
|
477
477
|
}),
|
|
478
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ g("div", {
|
|
479
479
|
className: "space-y-3",
|
|
480
|
-
children: [/* @__PURE__ */
|
|
480
|
+
children: [/* @__PURE__ */ g("div", {
|
|
481
481
|
className: "flex items-center gap-2",
|
|
482
|
-
children: [/* @__PURE__ */
|
|
483
|
-
value:
|
|
484
|
-
onChange:
|
|
485
|
-
placeholder:
|
|
482
|
+
children: [/* @__PURE__ */ h(Se, {
|
|
483
|
+
value: S,
|
|
484
|
+
onChange: dt,
|
|
485
|
+
placeholder: x("agentsPage.searchPlaceholder", "Search agents..."),
|
|
486
486
|
className: "flex-1 sm:w-64 sm:flex-none"
|
|
487
|
-
}), /* @__PURE__ */
|
|
487
|
+
}), /* @__PURE__ */ g("div", {
|
|
488
488
|
className: "flex items-center gap-1 bg-bg-sunken rounded-button p-1 flex-shrink-0 border border-border-subtle",
|
|
489
|
-
children: [/* @__PURE__ */
|
|
489
|
+
children: [/* @__PURE__ */ h("button", {
|
|
490
490
|
type: "button",
|
|
491
491
|
onClick: () => {
|
|
492
|
-
|
|
492
|
+
ht("grid"), z(/* @__PURE__ */ new Set());
|
|
493
493
|
},
|
|
494
|
-
className: `flex items-center justify-center p-1.5 sm:p-2 max-md:min-h-11 max-md:min-w-11 rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus ${
|
|
495
|
-
"aria-label":
|
|
496
|
-
"aria-pressed":
|
|
497
|
-
title:
|
|
498
|
-
children: /* @__PURE__ */
|
|
494
|
+
className: `flex items-center justify-center p-1.5 sm:p-2 max-md:min-h-11 max-md:min-w-11 rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus ${E === "grid" ? "bg-[var(--color-accent-soft)] text-text-primary" : "text-text-secondary hover:bg-bg-surface/60"}`,
|
|
495
|
+
"aria-label": x("agentsPage.gridViewTitle", "Grid view"),
|
|
496
|
+
"aria-pressed": E === "grid",
|
|
497
|
+
title: x("agentsPage.gridViewTitle", "Grid view"),
|
|
498
|
+
children: /* @__PURE__ */ h(Ie, {
|
|
499
499
|
"aria-hidden": "true",
|
|
500
500
|
className: "size-4 text-text-secondary"
|
|
501
501
|
})
|
|
502
|
-
}), /* @__PURE__ */
|
|
502
|
+
}), /* @__PURE__ */ h("button", {
|
|
503
503
|
type: "button",
|
|
504
504
|
onClick: () => {
|
|
505
|
-
|
|
505
|
+
ht("list"), z(/* @__PURE__ */ new Set());
|
|
506
506
|
},
|
|
507
|
-
className: `flex items-center justify-center p-1.5 sm:p-2 max-md:min-h-11 max-md:min-w-11 rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus ${
|
|
508
|
-
"aria-label":
|
|
509
|
-
"aria-pressed":
|
|
510
|
-
title:
|
|
511
|
-
children: /* @__PURE__ */
|
|
507
|
+
className: `flex items-center justify-center p-1.5 sm:p-2 max-md:min-h-11 max-md:min-w-11 rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus ${E === "list" ? "bg-[var(--color-accent-soft)] text-text-primary" : "text-text-secondary hover:bg-bg-surface/60"}`,
|
|
508
|
+
"aria-label": x("agentsPage.listViewTitle", "List view"),
|
|
509
|
+
"aria-pressed": E === "list",
|
|
510
|
+
title: x("agentsPage.listViewTitle", "List view"),
|
|
511
|
+
children: /* @__PURE__ */ h(Le, {
|
|
512
512
|
"aria-hidden": "true",
|
|
513
513
|
className: "size-4 text-text-secondary"
|
|
514
514
|
})
|
|
515
515
|
})]
|
|
516
516
|
})]
|
|
517
|
-
}), /* @__PURE__ */
|
|
517
|
+
}), /* @__PURE__ */ g("div", {
|
|
518
518
|
className: "flex items-center gap-2 sm:gap-3 flex-wrap",
|
|
519
519
|
children: [
|
|
520
|
-
/* @__PURE__ */
|
|
521
|
-
label:
|
|
522
|
-
value:
|
|
520
|
+
/* @__PURE__ */ h(Ce, {
|
|
521
|
+
label: x("agentsPage.filterStatus", "Status"),
|
|
522
|
+
value: C,
|
|
523
|
+
options: ct,
|
|
524
|
+
onChange: ft
|
|
525
|
+
}),
|
|
526
|
+
/* @__PURE__ */ h(Ce, {
|
|
527
|
+
label: x("agentsPage.filterPlatform", "Platform"),
|
|
528
|
+
value: w,
|
|
523
529
|
options: lt,
|
|
524
530
|
onChange: pt
|
|
525
531
|
}),
|
|
526
|
-
/* @__PURE__ */
|
|
527
|
-
label:
|
|
528
|
-
value:
|
|
529
|
-
options: ut,
|
|
532
|
+
/* @__PURE__ */ h(De, {
|
|
533
|
+
label: x("agentsPage.filterTag", "Tag"),
|
|
534
|
+
value: T,
|
|
530
535
|
onChange: mt
|
|
531
|
-
}),
|
|
532
|
-
/* @__PURE__ */ m(De, {
|
|
533
|
-
label: b("agentsPage.filterTag", "Tag"),
|
|
534
|
-
value: w,
|
|
535
|
-
onChange: ht
|
|
536
536
|
})
|
|
537
537
|
]
|
|
538
538
|
})]
|
|
539
539
|
}),
|
|
540
|
-
|
|
540
|
+
E === "grid" && Y.length > 0 && /* @__PURE__ */ h("div", {
|
|
541
541
|
className: "flex justify-end",
|
|
542
|
-
children: /* @__PURE__ */
|
|
542
|
+
children: /* @__PURE__ */ g("button", {
|
|
543
543
|
type: "button",
|
|
544
544
|
onClick: $ ? Q : ln,
|
|
545
545
|
"aria-pressed": $,
|
|
546
546
|
className: "flex items-center gap-1.5 px-3 py-1.5 max-md:min-h-11 text-xs text-text-secondary hover:text-text-primary rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
547
|
-
children: [/* @__PURE__ */
|
|
547
|
+
children: [/* @__PURE__ */ h(Fe, {
|
|
548
548
|
"aria-hidden": "true",
|
|
549
549
|
className: "size-3.5"
|
|
550
|
-
}), $ ?
|
|
550
|
+
}), $ ? x("agentsPage.deselectAll", "Deselect All") : x("agentsPage.selectAll", "Select All")]
|
|
551
551
|
})
|
|
552
552
|
}),
|
|
553
|
-
un && /* @__PURE__ */
|
|
553
|
+
un && /* @__PURE__ */ g("div", {
|
|
554
554
|
className: "flex flex-col sm:flex-row items-start sm:items-center gap-3 px-4 py-2.5 bg-[var(--color-accent-soft)] border border-border-subtle rounded-card",
|
|
555
|
-
children: [/* @__PURE__ */
|
|
555
|
+
children: [/* @__PURE__ */ h("span", {
|
|
556
556
|
className: "text-sm font-medium text-text-primary",
|
|
557
|
-
children:
|
|
558
|
-
}), /* @__PURE__ */
|
|
557
|
+
children: x("agentsPage.selectedCount", "{{count}} agents selected", { count: R.size })
|
|
558
|
+
}), /* @__PURE__ */ g("div", {
|
|
559
559
|
className: "flex items-center gap-1.5 sm:ml-auto",
|
|
560
|
-
children: [/* @__PURE__ */ h(
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
560
|
+
children: [/* @__PURE__ */ h(tt, {
|
|
561
|
+
permission: c.AGENT_DELETE,
|
|
562
|
+
deniedBehavior: "hide",
|
|
563
|
+
children: /* @__PURE__ */ g("button", {
|
|
564
|
+
type: "button",
|
|
565
|
+
onClick: () => V(!0),
|
|
566
|
+
disabled: B,
|
|
567
|
+
className: "flex items-center gap-1.5 px-3 py-1.5 max-md:min-h-11 text-xs font-medium text-status-error-text bg-status-error-bg-subtle border border-status-error-border rounded-button hover:bg-status-error-bg-subtle/80 transition-colors disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
568
|
+
children: [
|
|
569
|
+
/* @__PURE__ */ h(ze, {
|
|
570
|
+
"aria-hidden": "true",
|
|
571
|
+
className: "size-3"
|
|
572
|
+
}),
|
|
573
|
+
" ",
|
|
574
|
+
x("agentsPage.remove", "Remove")
|
|
575
|
+
]
|
|
576
|
+
})
|
|
577
|
+
}), /* @__PURE__ */ g("button", {
|
|
574
578
|
type: "button",
|
|
575
579
|
onClick: Q,
|
|
576
580
|
className: "flex items-center gap-1.5 px-3 py-1.5 max-md:min-h-11 text-xs text-text-secondary hover:text-text-primary rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
577
581
|
children: [
|
|
578
|
-
/* @__PURE__ */
|
|
582
|
+
/* @__PURE__ */ h(Be, {
|
|
579
583
|
"aria-hidden": "true",
|
|
580
584
|
className: "size-3"
|
|
581
585
|
}),
|
|
582
586
|
" ",
|
|
583
|
-
|
|
587
|
+
x("agentsPage.deselect", "Deselect")
|
|
584
588
|
]
|
|
585
589
|
})]
|
|
586
590
|
})]
|
|
587
591
|
}),
|
|
588
|
-
|
|
592
|
+
S || C !== "all" || w !== "all" ? /* @__PURE__ */ g("p", {
|
|
589
593
|
className: "text-sm text-text-secondary",
|
|
590
|
-
children: [
|
|
591
|
-
filtered:
|
|
592
|
-
total:
|
|
593
|
-
}),
|
|
594
|
+
children: [x("agentsPage.showingResults", "Showing {{filtered}} of {{total}} agents", {
|
|
595
|
+
filtered: Y.length,
|
|
596
|
+
total: J.length
|
|
597
|
+
}), W && /* @__PURE__ */ h("span", {
|
|
594
598
|
className: "ml-2 text-text-muted",
|
|
595
|
-
children:
|
|
599
|
+
children: x("agentsPage.refreshing", "(refreshing...)")
|
|
596
600
|
})]
|
|
597
601
|
}) : null,
|
|
598
|
-
|
|
602
|
+
W && J.length === 0 ? /* @__PURE__ */ h(Oe, {
|
|
599
603
|
variant: "rows",
|
|
600
604
|
count: 6
|
|
601
|
-
}) :
|
|
605
|
+
}) : Y.length > 0 ? /* @__PURE__ */ h(Ue, {
|
|
602
606
|
mode: "wait",
|
|
603
|
-
children:
|
|
607
|
+
children: E === "grid" ? /* @__PURE__ */ h(rt, {
|
|
604
608
|
"data-tour": "agents-page-grid-header",
|
|
605
609
|
stagger: .04,
|
|
606
610
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
607
|
-
children:
|
|
611
|
+
children: Y.map((e) => /* @__PURE__ */ h(nt, {
|
|
608
612
|
className: "h-full",
|
|
609
|
-
children: /* @__PURE__ */
|
|
613
|
+
children: /* @__PURE__ */ h(ke, {
|
|
610
614
|
agent: e,
|
|
611
|
-
onSelect:
|
|
615
|
+
onSelect: X,
|
|
612
616
|
onStart: en,
|
|
613
617
|
onStop: tn,
|
|
614
618
|
onDisconnect: nn,
|
|
@@ -619,13 +623,13 @@ function at() {
|
|
|
619
623
|
healthErrorMessage: e.healthError ?? null
|
|
620
624
|
})
|
|
621
625
|
}, e.id))
|
|
622
|
-
}, "grid-view") : /* @__PURE__ */
|
|
626
|
+
}, "grid-view") : /* @__PURE__ */ h(rt, {
|
|
623
627
|
stagger: .04,
|
|
624
|
-
children: /* @__PURE__ */
|
|
628
|
+
children: /* @__PURE__ */ h(nt, {
|
|
625
629
|
variant: "fadeRight",
|
|
626
|
-
children: /* @__PURE__ */
|
|
627
|
-
agents:
|
|
628
|
-
onSelect:
|
|
630
|
+
children: /* @__PURE__ */ h(Ae, {
|
|
631
|
+
agents: Y,
|
|
632
|
+
onSelect: X,
|
|
629
633
|
onStart: en,
|
|
630
634
|
onStop: tn,
|
|
631
635
|
onDisconnect: nn,
|
|
@@ -637,139 +641,139 @@ function at() {
|
|
|
637
641
|
})
|
|
638
642
|
})
|
|
639
643
|
}, "list-view")
|
|
640
|
-
}) : /* @__PURE__ */
|
|
641
|
-
icon: /* @__PURE__ */
|
|
642
|
-
illustration:
|
|
643
|
-
title:
|
|
644
|
-
description:
|
|
645
|
-
action: !
|
|
644
|
+
}) : /* @__PURE__ */ h(xe, {
|
|
645
|
+
icon: /* @__PURE__ */ h(Pe, { className: "size-8 text-text-secondary" }),
|
|
646
|
+
illustration: S || C !== "all" || w !== "all" ? "empty-search" : "empty-agents",
|
|
647
|
+
title: S || C !== "all" || w !== "all" ? x("agentsPage.emptyNoAgentsFound", "No agents found") : x("agentsPage.emptyNoAgentsConfigured", "No agents configured"),
|
|
648
|
+
description: S || C !== "all" || w !== "all" ? x("agentsPage.emptyAdjustSearch", "Try adjusting your search or filters") : x("agentsPage.emptyNoAgentsDescription", "Install the CLI agent on your machine, then add it here. You can create a target inline while adding the agent."),
|
|
649
|
+
action: !S && C === "all" && w === "all" ? /* @__PURE__ */ g("div", {
|
|
646
650
|
className: "flex flex-wrap items-center gap-3",
|
|
647
651
|
children: [
|
|
648
|
-
/* @__PURE__ */
|
|
652
|
+
/* @__PURE__ */ g("button", {
|
|
649
653
|
type: "button",
|
|
650
654
|
onClick: Z,
|
|
651
655
|
className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
652
|
-
children: [/* @__PURE__ */ m
|
|
656
|
+
children: [/* @__PURE__ */ h(m, { className: "size-4" }), x("agentsPage.addAgent", "Add Agent")]
|
|
653
657
|
}),
|
|
654
|
-
/* @__PURE__ */
|
|
658
|
+
/* @__PURE__ */ h("button", {
|
|
655
659
|
type: "button",
|
|
656
|
-
onClick: () =>
|
|
660
|
+
onClick: () => y("/getting-started"),
|
|
657
661
|
className: "flex items-center gap-2 px-4 py-2 border border-border-subtle bg-bg-surface text-text-primary rounded-button hover:bg-bg-sunken hover:border-border-strong transition-all duration-200 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
658
|
-
children:
|
|
662
|
+
children: x("agentsPage.setupGuide", "Setup guide")
|
|
659
663
|
}),
|
|
660
|
-
/* @__PURE__ */
|
|
664
|
+
/* @__PURE__ */ h(Te, { prompt: "What is an Agent in VibeControls and how do I add one?" })
|
|
661
665
|
]
|
|
662
666
|
}) : void 0
|
|
663
667
|
}),
|
|
664
|
-
gt && /* @__PURE__ */
|
|
668
|
+
gt && /* @__PURE__ */ h(je, {
|
|
665
669
|
onSubmit: $t,
|
|
666
670
|
onCancel: () => D(!1),
|
|
667
671
|
isLoading: _t,
|
|
668
672
|
onNavigate: (e) => {
|
|
669
|
-
D(!1),
|
|
673
|
+
D(!1), y(e);
|
|
670
674
|
},
|
|
671
|
-
targets:
|
|
675
|
+
targets: Vt.map((e) => ({
|
|
672
676
|
id: e.id,
|
|
673
677
|
name: e.name,
|
|
674
678
|
type: e.type || "DIRECT",
|
|
675
679
|
status: e.status
|
|
676
680
|
})),
|
|
677
|
-
targetsLoading:
|
|
678
|
-
onCreateTarget:
|
|
679
|
-
extraSection: /* @__PURE__ */
|
|
681
|
+
targetsLoading: zt,
|
|
682
|
+
onCreateTarget: Kt,
|
|
683
|
+
extraSection: /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h3", {
|
|
680
684
|
className: "text-sm font-medium text-text-secondary mb-2",
|
|
681
|
-
children:
|
|
682
|
-
}), /* @__PURE__ */
|
|
685
|
+
children: x("agents.tags", "Tags")
|
|
686
|
+
}), /* @__PURE__ */ h(ye, {
|
|
683
687
|
entityType: "VIBECONTROLS_AGENT",
|
|
684
|
-
onDraftChange:
|
|
688
|
+
onDraftChange: kt
|
|
685
689
|
})] })
|
|
686
690
|
}),
|
|
687
|
-
/* @__PURE__ */
|
|
691
|
+
/* @__PURE__ */ h(ue, {
|
|
688
692
|
isOpen: P !== null,
|
|
689
693
|
onClose: () => {
|
|
690
694
|
wt || F(null);
|
|
691
695
|
},
|
|
692
696
|
onConfirm: rn,
|
|
693
|
-
title:
|
|
694
|
-
message: P ?
|
|
695
|
-
confirmLabel:
|
|
697
|
+
title: x("agentsPage.disconnectTitle", "Disconnect Agent"),
|
|
698
|
+
message: P ? Me(P) === "OFFLINE" ? x("agentsPage.disconnectOfflineMessage", "Clear the stored tunnel connection for {{name}}? This will remove the tunnel URL and API key from this offline agent.", { name: P.name }) : x("agentsPage.disconnectActiveMessage", "Mark {{name}} as offline and clear its tunnel connection? The agent process will not be stopped automatically — you may need to stop it manually on the host machine.", { name: P.name }) : "",
|
|
699
|
+
confirmLabel: x("agentsPage.disconnectConfirm", "Disconnect"),
|
|
696
700
|
variant: "danger",
|
|
697
701
|
isLoading: wt
|
|
698
702
|
}),
|
|
699
|
-
/* @__PURE__ */
|
|
703
|
+
/* @__PURE__ */ h(qe, {
|
|
700
704
|
open: k !== null,
|
|
701
705
|
onOpenChange: (e) => {
|
|
702
706
|
e || A(null);
|
|
703
707
|
},
|
|
704
|
-
children: k ? /* @__PURE__ */
|
|
708
|
+
children: k ? /* @__PURE__ */ g(Je, {
|
|
705
709
|
className: "sm:max-w-md",
|
|
706
710
|
children: [
|
|
707
|
-
/* @__PURE__ */
|
|
708
|
-
/* @__PURE__ */
|
|
711
|
+
/* @__PURE__ */ g(Ze, { children: [/* @__PURE__ */ h(Qe, { children: x("agentsPage.editTunnelTitle", "Edit Tunnel") }), /* @__PURE__ */ h(Ye, { children: x("agentsPage.editTunnelDescription", "Configure the cloudflared tunnel URL and API key for {{name}}.", { name: k.name }) })] }),
|
|
712
|
+
/* @__PURE__ */ g("div", {
|
|
709
713
|
className: "py-4",
|
|
710
714
|
children: [
|
|
711
|
-
/* @__PURE__ */
|
|
715
|
+
/* @__PURE__ */ h("label", {
|
|
712
716
|
htmlFor: L.id,
|
|
713
717
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
714
|
-
children:
|
|
718
|
+
children: x("agentsPage.tunnelUrlLabel", "Tunnel URL")
|
|
715
719
|
}),
|
|
716
|
-
/* @__PURE__ */
|
|
720
|
+
/* @__PURE__ */ h(Ge, {
|
|
717
721
|
...L.inputProps,
|
|
718
722
|
ref: Tt,
|
|
719
723
|
type: "url",
|
|
720
724
|
defaultValue: k.tunnelUrl || "",
|
|
721
|
-
placeholder:
|
|
725
|
+
placeholder: x("agentsPage.tunnelUrlPlaceholder", "https://example.trycloudflare.com"),
|
|
722
726
|
className: "text-base md:text-sm"
|
|
723
727
|
}),
|
|
724
|
-
/* @__PURE__ */
|
|
728
|
+
/* @__PURE__ */ h("p", {
|
|
725
729
|
id: L.hintId,
|
|
726
730
|
className: "mt-1.5 text-xs text-text-muted",
|
|
727
|
-
children:
|
|
731
|
+
children: x("agentsPage.tunnelUrlHint", "Leave empty to clear. Agents with auto-tunnel report this automatically on startup.")
|
|
728
732
|
})
|
|
729
733
|
]
|
|
730
734
|
}),
|
|
731
|
-
/* @__PURE__ */
|
|
735
|
+
/* @__PURE__ */ g(Xe, { children: [/* @__PURE__ */ h(We, {
|
|
732
736
|
type: "button",
|
|
733
737
|
variant: "outline",
|
|
734
738
|
onClick: () => A(null),
|
|
735
739
|
className: "max-md:min-h-11",
|
|
736
|
-
children:
|
|
737
|
-
}), /* @__PURE__ */
|
|
740
|
+
children: x("agentsPage.cancel", "Cancel")
|
|
741
|
+
}), /* @__PURE__ */ h(We, {
|
|
738
742
|
type: "button",
|
|
739
743
|
onClick: sn,
|
|
740
744
|
disabled: j,
|
|
741
745
|
"aria-busy": j,
|
|
742
746
|
className: "max-md:min-h-11",
|
|
743
|
-
children: j ?
|
|
747
|
+
children: j ? x("agentsPage.saving", "Saving...") : x("agentsPage.save", "Save")
|
|
744
748
|
})] })
|
|
745
749
|
]
|
|
746
750
|
}) : null
|
|
747
751
|
}),
|
|
748
|
-
/* @__PURE__ */
|
|
749
|
-
isOpen:
|
|
752
|
+
/* @__PURE__ */ h(ue, {
|
|
753
|
+
isOpen: Dt,
|
|
750
754
|
onClose: () => {
|
|
751
|
-
B ||
|
|
755
|
+
B || V(!1);
|
|
752
756
|
},
|
|
753
757
|
onConfirm: dn,
|
|
754
|
-
title:
|
|
755
|
-
message:
|
|
756
|
-
confirmLabel:
|
|
758
|
+
title: x("agentsPage.bulkDeleteTitle", "Remove agents"),
|
|
759
|
+
message: x("agentsPage.bulkDeleteConfirm", "Are you sure you want to remove {{count}} agent(s)? This cannot be undone.", { count: R.size }),
|
|
760
|
+
confirmLabel: x("agentsPage.remove", "Remove"),
|
|
757
761
|
variant: "danger",
|
|
758
762
|
isLoading: B
|
|
759
763
|
}),
|
|
760
|
-
/* @__PURE__ */
|
|
761
|
-
isOpen:
|
|
762
|
-
onClose: () =>
|
|
764
|
+
/* @__PURE__ */ h(de, {
|
|
765
|
+
isOpen: H !== null,
|
|
766
|
+
onClose: () => U(null),
|
|
763
767
|
onConfirm: () => {
|
|
764
|
-
|
|
768
|
+
U(null), y("/billing/plans");
|
|
765
769
|
},
|
|
766
|
-
title: fe(
|
|
767
|
-
message: fe(
|
|
770
|
+
title: fe(H ?? "generic").title,
|
|
771
|
+
message: fe(H ?? "generic").message
|
|
768
772
|
})
|
|
769
773
|
]
|
|
770
774
|
});
|
|
771
775
|
}
|
|
772
776
|
//#endregion
|
|
773
|
-
export {
|
|
777
|
+
export { it as AgentsPage };
|
|
774
778
|
|
|
775
779
|
//# sourceMappingURL=AgentsPage.js.map
|