@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.
Files changed (45) hide show
  1. package/dist/components/agent-manager/AgentManagerBookmarksDrawer.js +87 -85
  2. package/dist/components/agent-manager/AgentManagerBookmarksDrawer.js.map +1 -1
  3. package/dist/components/ai/InstructionFilesManager.js +138 -136
  4. package/dist/components/ai/InstructionFilesManager.js.map +1 -1
  5. package/dist/components/ai/PluginHarnessPicker.js +70 -64
  6. package/dist/components/ai/PluginHarnessPicker.js.map +1 -1
  7. package/dist/components/docs/DocsEditPanel.js +1 -1
  8. package/dist/components/docs/DocsEditPanel.js.map +1 -1
  9. package/dist/components/docs/DocsPageTree.js +1 -1
  10. package/dist/components/docs/DocsPageTree.js.map +1 -1
  11. package/dist/components/docs/DocsTabPanel.js +108 -106
  12. package/dist/components/docs/DocsTabPanel.js.map +1 -1
  13. package/dist/components/notes/NotesTabPanel.js +99 -99
  14. package/dist/components/notes/NotesTabPanel.js.map +1 -1
  15. package/dist/components/scorecard/ScorecardPanel.js +309 -308
  16. package/dist/components/scorecard/ScorecardPanel.js.map +1 -1
  17. package/dist/components/sessions/SessionPublicLinkPanel.js +104 -102
  18. package/dist/components/sessions/SessionPublicLinkPanel.js.map +1 -1
  19. package/dist/components/settings/AdvancedSection.js +92 -90
  20. package/dist/components/settings/AdvancedSection.js.map +1 -1
  21. package/dist/components/vibedeck/VibeDeckPublicLinkPanel.js +104 -102
  22. package/dist/components/vibedeck/VibeDeckPublicLinkPanel.js.map +1 -1
  23. package/dist/constants/permissions.js +7 -0
  24. package/dist/constants/permissions.js.map +1 -1
  25. package/dist/pages/ActionsPage.js +303 -303
  26. package/dist/pages/ActionsPage.js.map +1 -1
  27. package/dist/pages/AgentDetailsPage.js +520 -516
  28. package/dist/pages/AgentDetailsPage.js.map +1 -1
  29. package/dist/pages/AgentsPage.js +287 -283
  30. package/dist/pages/AgentsPage.js.map +1 -1
  31. package/dist/pages/TargetsPage.js +554 -549
  32. package/dist/pages/TargetsPage.js.map +1 -1
  33. package/dist/pages/VibeAuditPage.js +2 -2
  34. package/dist/pages/VibeAuditPage.js.map +1 -1
  35. package/dist/pages/VibeDeckPage.js +257 -257
  36. package/dist/pages/VibeDeckPage.js.map +1 -1
  37. package/dist/pages/VibeDetailsPage.js +688 -693
  38. package/dist/pages/VibeDetailsPage.js.map +1 -1
  39. package/dist/pages/VibesPage.js +49 -41
  40. package/dist/pages/VibesPage.js.map +1 -1
  41. package/dist/pages/WebhooksPage.js +162 -138
  42. package/dist/pages/WebhooksPage.js.map +1 -1
  43. package/dist/pages/tunnels/DomainsTab.js +54 -47
  44. package/dist/pages/tunnels/DomainsTab.js.map +1 -1
  45. package/package.json +1 -1
@@ -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 Oe } from "../constants/permissions.js";
23
- import { PageSkeleton as ke } from "../components/shared/PageSkeleton.js";
24
- import { notify as c } from "../lib/toast.js";
25
- import { AgentCard as Ae } from "../components/agents/AgentCard.js";
26
- import { AgentList as je } from "../components/agents/AgentList.js";
27
- import { AgentForm as Me } from "../components/agents/AgentForm.js";
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 Ne } from "../utils/agentStatus.js";
30
- import { useCallback as l, useEffect as u, useMemo as d, useRef as Pe, useState as f } from "react";
31
- import { Bot as Fe, CheckSquare as Ie, Grid as Le, List as Re, Plus as p, RefreshCw as ze, Trash2 as Be, XSquare as Ve } from "lucide-react";
32
- import { useSearchParams as He } from "react-router-dom";
33
- import { usePermissions as Ue } from "@burdenoff/fe-libs/shared/providers/shell";
34
- import { AnimatePresence as We } from "framer-motion";
35
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
36
- import { Button as Ge, Input as Ke, PagePurpose as qe, ResponsiveDialog as Je, ResponsiveDialogContent as Ye, ResponsiveDialogDescription as Xe, ResponsiveDialogFooter as Ze, ResponsiveDialogHeader as Qe, ResponsiveDialogTitle as $e } from "@burdenoff/fe-libs/ui";
37
- import { useEventBus as et } from "@burdenoff/fe-libs/shared/events";
38
- import { AccessDenied as tt, PermissionButton as nt } from "@burdenoff/fe-libs/shared/components";
39
- import { MotionItem as rt, MotionList as it, MotionPage as g } from "@burdenoff/fe-libs/shared/motion";
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 at() {
42
- let { onAgentSelect: at, workspaceId: _ } = pe(), v = me(), y = et(), { hasPermission: ot, isLoading: st, permissions: ct } = Ue(), b = le(), lt = [
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: b("agentsPage.statusAll", "All Statuses")
45
+ label: x("agentsPage.statusAll", "All Statuses")
46
46
  },
47
47
  {
48
48
  value: "ACTIVE",
49
- label: b("agentsPage.statusActive", "Active")
49
+ label: x("agentsPage.statusActive", "Active")
50
50
  },
51
51
  {
52
52
  value: "STOPPED",
53
- label: b("agentsPage.statusStopped", "Stopped")
53
+ label: x("agentsPage.statusStopped", "Stopped")
54
54
  },
55
55
  {
56
56
  value: "OFFLINE",
57
- label: b("agentsPage.statusOffline", "Offline")
57
+ label: x("agentsPage.statusOffline", "Offline")
58
58
  }
59
- ], ut = [
59
+ ], lt = [
60
60
  {
61
61
  value: "all",
62
- label: b("agentsPage.platformAll", "All Platforms")
62
+ label: x("agentsPage.platformAll", "All Platforms")
63
63
  },
64
64
  {
65
65
  value: "darwin",
66
- label: b("agentsPage.platformMac", "macOS")
66
+ label: x("agentsPage.platformMac", "macOS")
67
67
  },
68
68
  {
69
69
  value: "linux",
70
- label: b("agentsPage.platformLinux", "Linux")
70
+ label: x("agentsPage.platformLinux", "Linux")
71
71
  },
72
72
  {
73
73
  value: "windows",
74
- label: b("agentsPage.platformWindows", "Windows")
74
+ label: x("agentsPage.platformWindows", "Windows")
75
75
  }
76
- ], dt = ot(Oe.AGENT_LIST), [x, ft] = f(""), [S, pt] = f("all"), [C, mt] = f("all"), [w, ht] = f("all"), [T, E] = f("grid"), [gt, D] = f(!1), [_t, vt] = f(!1), [O, yt] = He();
77
- u(() => {
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] = f(null), [j, bt] = f(!1), M = s((e) => e.connectingAgents), xt = s((e) => e.markAgentConnecting), N = s((e) => e.clearAgentConnecting), St = d(() => new Set(Object.keys(M)), [M]), Ct = Pe(/* @__PURE__ */ new Map());
85
- u(() => {
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] = f(null), [wt, I] = f(!1), Tt = Pe(null), L = Ee({ hint: b("agentsPage.tunnelUrlHint", "Leave empty to clear. Agents with auto-tunnel report this automatically on startup.") }), [R, z] = f(/* @__PURE__ */ new Set()), [B, V] = f(!1), [Et, H] = f(!1), [U, W] = f(null), [Dt] = n({ refetchQueries: ["ListAgents"] }), { setDraftTagIds: Ot, flushTags: kt } = be("VIBECONTROLS_AGENT"), [At] = e({ refetchQueries: ["ListAgents"] }), [jt] = t({ refetchQueries: ["ListAgents"] }), [Mt] = i({ refetchQueries: ["ListAgents"] }), [Nt] = ie({ refetchQueries: ["ListAgents"] }), [Pt] = ae({ refetchQueries: ["ListAgents"] }), [Ft] = re({ refetchQueries: ["ListAgents"] }), { refetch: It } = he(), { data: Lt, loading: Rt, refetch: zt } = ne({
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
- }), Bt = Lt?.targets?.items ?? [], Vt = Bt.length > 0, [Ht] = oe({ refetchQueries: ["ListAgents"] }), [Ut] = ee({ refetchQueries: ["ListAgents"] }), [Wt] = r({
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
- }), Gt = l(async (e) => {
112
- if (!_ || !e.trim()) return null;
111
+ }), Kt = u(async (e) => {
112
+ if (!v || !e.trim()) return null;
113
113
  try {
114
- let t = await Wt({ variables: {
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(), W("target"), t.error;
121
+ if (t.error && a(t.error)) throw o(), U("target"), t.error;
122
122
  let n = t.data?.createTarget;
123
- return n ? (It(), zt(), {
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(), W("target"), e;
130
+ if (a(e)) throw o(), U("target"), e;
131
131
  return null;
132
132
  }
133
133
  }, [
134
- Wt,
135
- It,
136
- zt,
137
- _
138
- ]), { data: Kt, loading: G, error: qt, refetch: K } = te({
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: S === "ACTIVE" ? !0 : S === "OFFLINE" ? !1 : void 0,
142
- platform: C === "all" ? void 0 : C
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
- }), [Jt, Yt] = f(!1);
149
- u(() => {
150
- let e = window.setTimeout(() => Yt(!0), 0);
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 q = ce({
153
+ let K = ce({
154
154
  fetchPolicy: "cache-and-network",
155
155
  nextFetchPolicy: "cache-first",
156
156
  notifyOnNetworkStatusChange: !0,
157
- skip: !_ || !Jt,
157
+ skip: !v || !Yt,
158
158
  pollInterval: 6e4
159
- }), [Xt] = se({ fetchPolicy: "network-only" }), Zt = q.data === void 0, J = d(() => {
160
- let e = /* @__PURE__ */ new Map(), t = q.data?.vibecontrolsAgentHealthProbes ?? [];
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
- }, [q.data]), Y = d(() => (Kt?.vibecontrolsAgents ?? []).map((e) => ({
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" : Ne({
176
+ status: St.has(e.id) ? "CONNECTING" : Me({
177
177
  id: e.id,
178
178
  isActive: e.isActive,
179
179
  metadata: e.metadata
180
- }, J, { probesLoading: Zt }),
181
- healthError: J.get(e.id)?.errorMessage ?? (e.lastGatewayAuthPushStatus === "failed" ? e.lastGatewayAuthPushError ?? "Gateway-auth push failed" : null),
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
- Kt?.vibecontrolsAgents,
205
- J,
206
- Zt,
204
+ qt?.vibecontrolsAgents,
205
+ q,
206
+ Qt,
207
207
  St
208
208
  ]);
209
- u(() => {
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 && (J.get(r)?.healthy === !0 && t >= e ? N(r) : e < n && (n = e));
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 && J.get(t)?.healthy === !0 && Date.now() >= n && N(t);
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
- J,
227
+ q,
228
228
  M,
229
229
  N
230
230
  ]);
231
- let X = d(() => Y.filter((e) => {
232
- if (x) {
233
- let t = x.toLowerCase();
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 !(w !== "all" && !(e.tagAssignments ?? []).some((e) => e.tagId === w));
236
+ return !(T !== "all" && !(e.tagAssignments ?? []).some((e) => e.tagId === T));
237
237
  }), [
238
- Y,
239
- x,
240
- w
241
- ]), Qt = (e) => {
242
- v(`/agents/${e.id}`), at?.({
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), y.emitCustom("vibecontrols.agent.register_clicked", { workspaceId: _ ?? void 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 At({ variables: { input: {
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 kt(i.agent.id), y.emitCustom("vibecontrols.agent.registered", {
265
- workspaceId: _ ?? void 0,
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
- }), y.emitCustom("vibecontrols.agent.gateway_auth_setup", {
268
- workspaceId: _ ?? void 0,
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 Dt({ variables: { input: {
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 kt(i.id), y.emitCustom("vibecontrols.agent.registered", {
284
- workspaceId: _ ?? void 0,
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(), W("agent"), D(!1), y.emitCustom("vibecontrols.quota.agent_limit_hit", { workspaceId: _ ?? void 0 });
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 Nt({ variables: { agentId: e.id } })).data?.startVibecontrolsAgent;
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 Ft({ variables: { input: { agentId: e.id } } })).data?.setupAgentGatewayAuth;
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 Nt({ variables: { agentId: e.id } })).data?.startVibecontrolsAgent;
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
- y.emitCustom("vibecontrols.agent.gateway_auth_setup", {
310
- workspaceId: _ ?? void 0,
309
+ b.emitCustom("vibecontrols.agent.gateway_auth_setup", {
310
+ workspaceId: v ?? void 0,
311
311
  agentId: e.id
312
- }), await jt({ variables: { id: e.id } }), c.success(`Agent "${e.name}" re-credentialed and started.`);
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 jt({ variables: { id: e.id } }), c.success(`Agent "${e.name}" started`);
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), c.error(e instanceof Error ? e.message : "Failed to start agent");
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 Pt({ variables: { agentId: e.id } })).data?.stopVibecontrolsAgent;
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 Mt({ variables: { id: e.id } }), c.success(`Agent "${e.name}" stopped`);
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), c.error(e instanceof Error ? e.message : "Failed to stop agent");
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 Mt({
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), c.error(e instanceof Error ? e.message : "Failed to disconnect agent"), I(!1), F(null), await K();
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 Ht({
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
- }), c.success(`Agent "${e.name}" disconnected`);
354
+ }), l.success(`Agent "${e.name}" disconnected`);
355
355
  } catch (e) {
356
- console.error("Failed to clear tunnel fields:", e), c.error("Agent marked offline, but failed to clear connection fields — clear them manually in Settings.");
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 K();
358
+ I(!1), F(null), await G();
359
359
  }, an = (e) => {
360
- v(`/agents/${e.id}`);
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 Ht({
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 = l((e) => {
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 = l(() => {
388
- z(new Set(X.map((e) => e.id)));
389
- }, [X]), Q = l(() => {
387
+ }, []), ln = u(() => {
388
+ z(new Set(Y.map((e) => e.id)));
389
+ }, [Y]), Q = u(() => {
390
390
  z(/* @__PURE__ */ new Set());
391
- }, []), $ = X.length > 0 && R.size === X.length, un = R.size > 0, dn = l(async () => {
391
+ }, []), $ = Y.length > 0 && R.size === Y.length, un = R.size > 0, dn = u(async () => {
392
392
  if (R.size !== 0) {
393
- V(!0);
393
+ Et(!0);
394
394
  try {
395
- let e = await Promise.allSettled(Array.from(R).map((e) => Ut({ variables: { id: e } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.filter((e) => e.status === "rejected").length;
396
- n > 0 ? c.error(`Removed ${t}, failed to remove ${n} agent${n === 1 ? "" : "s"}`) : c.success(`Removed ${t} agent${t === 1 ? "" : "s"}`), z(/* @__PURE__ */ new Set());
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
- c.error(e instanceof Error ? e.message : "Failed to remove agents");
398
+ l.error(e instanceof Error ? e.message : "Failed to remove agents");
399
399
  } finally {
400
- V(!1), H(!1);
400
+ Et(!1), V(!1);
401
401
  }
402
402
  }
403
- }, [R, Ut]), fn = {
404
- total: Y.length,
405
- active: Y.filter((e) => e.status === "ACTIVE").length,
406
- offline: Y.filter((e) => e.status !== "ACTIVE").length
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 st ? /* @__PURE__ */ m(g, {
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__ */ m(_e, { message: b("agentsPage.loadingPermissions", "Loading permissions...") })
411
- }) : ct && ct.permissionStrings?.length > 0 && !dt ? /* @__PURE__ */ m(g, {
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__ */ m(tt, {
414
- title: b("agentsPage.accessDeniedTitle", "Access Denied"),
415
- description: b("agentsPage.accessDeniedDescription", "You don't have permission to view agents. Contact your workspace administrator for access.")
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
- }) : qt && Y.length === 0 ? /* @__PURE__ */ m(g, {
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__ */ m(ve, {
420
- title: b("agentsPage.failedLoad", "Failed to load agents"),
421
- message: qt.message,
422
- onRetry: () => K()
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__ */ h(g, {
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__ */ m(ge, {
428
- title: b("agentsPage.title", "Agents"),
429
- description: b("agentsPage.descriptionOnline", "{{active}} of {{total}} agents online", {
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__ */ h("div", {
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__ */ m("button", {
435
+ children: [/* @__PURE__ */ h("button", {
436
436
  type: "button",
437
437
  onClick: () => {
438
- K(), Xt();
438
+ G(), Zt();
439
439
  },
440
- disabled: G || q.loading,
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": b("agentsPage.refreshTitle", "Refresh agents"),
443
- title: b("agentsPage.refreshTitle", "Refresh agents"),
444
- children: /* @__PURE__ */ m(ze, {
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 ${G || q.loading ? "animate-spin" : ""}`
446
+ className: `size-4 ${W || K.loading ? "animate-spin" : ""}`
447
447
  })
448
- }), Vt ? /* @__PURE__ */ m(nt, {
449
- permission: Oe.AGENT_CREATE,
448
+ }), Ht ? /* @__PURE__ */ h(tt, {
449
+ permission: c.AGENT_CREATE,
450
450
  deniedBehavior: "disable",
451
- deniedTooltip: b("agentsPage.deniedCreateTooltip", "You don't have permission to create agents"),
452
- children: /* @__PURE__ */ h("button", {
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(p, { className: "size-4" }), b("agentsPage.addAgent", "Add Agent")]
456
+ children: [/* @__PURE__ */ h(m, { className: "size-4" }), x("agentsPage.addAgent", "Add Agent")]
457
457
  })
458
- }) : /* @__PURE__ */ h("button", {
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(p, { className: "size-4" }), b("agentsPage.addAgent", "Add Agent")]
462
+ children: [/* @__PURE__ */ h(m, { className: "size-4" }), x("agentsPage.addAgent", "Add Agent")]
463
463
  })]
464
464
  })
465
465
  }),
466
- /* @__PURE__ */ m(qe, {
467
- icon: /* @__PURE__ */ m(Fe, { className: "size-4" }),
468
- children: b("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.")
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
- Y.length === 0 && !G && /* @__PURE__ */ m(we, {
470
+ J.length === 0 && !W && /* @__PURE__ */ h(we, {
471
471
  variant: "full",
472
472
  dismissKey: "vibecontrols-agents-setup-banner"
473
473
  }),
474
- Y.length > 0 && /* @__PURE__ */ m(we, {
474
+ J.length > 0 && /* @__PURE__ */ h(we, {
475
475
  variant: "compact",
476
476
  dismissKey: "vibecontrols-agents-compact-banner"
477
477
  }),
478
- /* @__PURE__ */ h("div", {
478
+ /* @__PURE__ */ g("div", {
479
479
  className: "space-y-3",
480
- children: [/* @__PURE__ */ h("div", {
480
+ children: [/* @__PURE__ */ g("div", {
481
481
  className: "flex items-center gap-2",
482
- children: [/* @__PURE__ */ m(Se, {
483
- value: x,
484
- onChange: ft,
485
- placeholder: b("agentsPage.searchPlaceholder", "Search agents..."),
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__ */ h("div", {
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__ */ m("button", {
489
+ children: [/* @__PURE__ */ h("button", {
490
490
  type: "button",
491
491
  onClick: () => {
492
- E("grid"), z(/* @__PURE__ */ new Set());
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 ${T === "grid" ? "bg-[var(--color-accent-soft)] text-text-primary" : "text-text-secondary hover:bg-bg-surface/60"}`,
495
- "aria-label": b("agentsPage.gridViewTitle", "Grid view"),
496
- "aria-pressed": T === "grid",
497
- title: b("agentsPage.gridViewTitle", "Grid view"),
498
- children: /* @__PURE__ */ m(Le, {
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__ */ m("button", {
502
+ }), /* @__PURE__ */ h("button", {
503
503
  type: "button",
504
504
  onClick: () => {
505
- E("list"), z(/* @__PURE__ */ new Set());
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 ${T === "list" ? "bg-[var(--color-accent-soft)] text-text-primary" : "text-text-secondary hover:bg-bg-surface/60"}`,
508
- "aria-label": b("agentsPage.listViewTitle", "List view"),
509
- "aria-pressed": T === "list",
510
- title: b("agentsPage.listViewTitle", "List view"),
511
- children: /* @__PURE__ */ m(Re, {
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__ */ h("div", {
517
+ }), /* @__PURE__ */ g("div", {
518
518
  className: "flex items-center gap-2 sm:gap-3 flex-wrap",
519
519
  children: [
520
- /* @__PURE__ */ m(Ce, {
521
- label: b("agentsPage.filterStatus", "Status"),
522
- value: S,
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__ */ m(Ce, {
527
- label: b("agentsPage.filterPlatform", "Platform"),
528
- value: C,
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
- T === "grid" && X.length > 0 && /* @__PURE__ */ m("div", {
540
+ E === "grid" && Y.length > 0 && /* @__PURE__ */ h("div", {
541
541
  className: "flex justify-end",
542
- children: /* @__PURE__ */ h("button", {
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__ */ m(Ie, {
547
+ children: [/* @__PURE__ */ h(Fe, {
548
548
  "aria-hidden": "true",
549
549
  className: "size-3.5"
550
- }), $ ? b("agentsPage.deselectAll", "Deselect All") : b("agentsPage.selectAll", "Select All")]
550
+ }), $ ? x("agentsPage.deselectAll", "Deselect All") : x("agentsPage.selectAll", "Select All")]
551
551
  })
552
552
  }),
553
- un && /* @__PURE__ */ h("div", {
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__ */ m("span", {
555
+ children: [/* @__PURE__ */ h("span", {
556
556
  className: "text-sm font-medium text-text-primary",
557
- children: b("agentsPage.selectedCount", "{{count}} agents selected", { count: R.size })
558
- }), /* @__PURE__ */ h("div", {
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("button", {
561
- type: "button",
562
- onClick: () => H(!0),
563
- disabled: B,
564
- 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",
565
- children: [
566
- /* @__PURE__ */ m(Be, {
567
- "aria-hidden": "true",
568
- className: "size-3"
569
- }),
570
- " ",
571
- b("agentsPage.remove", "Remove")
572
- ]
573
- }), /* @__PURE__ */ h("button", {
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__ */ m(Ve, {
582
+ /* @__PURE__ */ h(Be, {
579
583
  "aria-hidden": "true",
580
584
  className: "size-3"
581
585
  }),
582
586
  " ",
583
- b("agentsPage.deselect", "Deselect")
587
+ x("agentsPage.deselect", "Deselect")
584
588
  ]
585
589
  })]
586
590
  })]
587
591
  }),
588
- x || S !== "all" || C !== "all" ? /* @__PURE__ */ h("p", {
592
+ S || C !== "all" || w !== "all" ? /* @__PURE__ */ g("p", {
589
593
  className: "text-sm text-text-secondary",
590
- children: [b("agentsPage.showingResults", "Showing {{filtered}} of {{total}} agents", {
591
- filtered: X.length,
592
- total: Y.length
593
- }), G && /* @__PURE__ */ m("span", {
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: b("agentsPage.refreshing", "(refreshing...)")
599
+ children: x("agentsPage.refreshing", "(refreshing...)")
596
600
  })]
597
601
  }) : null,
598
- G && Y.length === 0 ? /* @__PURE__ */ m(ke, {
602
+ W && J.length === 0 ? /* @__PURE__ */ h(Oe, {
599
603
  variant: "rows",
600
604
  count: 6
601
- }) : X.length > 0 ? /* @__PURE__ */ m(We, {
605
+ }) : Y.length > 0 ? /* @__PURE__ */ h(Ue, {
602
606
  mode: "wait",
603
- children: T === "grid" ? /* @__PURE__ */ m(it, {
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: X.map((e) => /* @__PURE__ */ m(rt, {
611
+ children: Y.map((e) => /* @__PURE__ */ h(nt, {
608
612
  className: "h-full",
609
- children: /* @__PURE__ */ m(Ae, {
613
+ children: /* @__PURE__ */ h(ke, {
610
614
  agent: e,
611
- onSelect: Qt,
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__ */ m(it, {
626
+ }, "grid-view") : /* @__PURE__ */ h(rt, {
623
627
  stagger: .04,
624
- children: /* @__PURE__ */ m(rt, {
628
+ children: /* @__PURE__ */ h(nt, {
625
629
  variant: "fadeRight",
626
- children: /* @__PURE__ */ m(je, {
627
- agents: X,
628
- onSelect: Qt,
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__ */ m(xe, {
641
- icon: /* @__PURE__ */ m(Fe, { className: "size-8 text-text-secondary" }),
642
- illustration: x || S !== "all" || C !== "all" ? "empty-search" : "empty-agents",
643
- title: x || S !== "all" || C !== "all" ? b("agentsPage.emptyNoAgentsFound", "No agents found") : b("agentsPage.emptyNoAgentsConfigured", "No agents configured"),
644
- description: x || S !== "all" || C !== "all" ? b("agentsPage.emptyAdjustSearch", "Try adjusting your search or filters") : b("agentsPage.emptyNoAgentsDescription", "Install the CLI agent on your machine, then add it here. You can create a target inline while adding the agent."),
645
- action: !x && S === "all" && C === "all" ? /* @__PURE__ */ h("div", {
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__ */ h("button", {
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(p, { className: "size-4" }), b("agentsPage.addAgent", "Add Agent")]
656
+ children: [/* @__PURE__ */ h(m, { className: "size-4" }), x("agentsPage.addAgent", "Add Agent")]
653
657
  }),
654
- /* @__PURE__ */ m("button", {
658
+ /* @__PURE__ */ h("button", {
655
659
  type: "button",
656
- onClick: () => v("/getting-started"),
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: b("agentsPage.setupGuide", "Setup guide")
662
+ children: x("agentsPage.setupGuide", "Setup guide")
659
663
  }),
660
- /* @__PURE__ */ m(Te, { prompt: "What is an Agent in VibeControls and how do I add one?" })
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__ */ m(Me, {
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), v(e);
673
+ D(!1), y(e);
670
674
  },
671
- targets: Bt.map((e) => ({
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: Rt,
678
- onCreateTarget: Gt,
679
- extraSection: /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h3", {
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: b("agents.tags", "Tags")
682
- }), /* @__PURE__ */ m(ye, {
685
+ children: x("agents.tags", "Tags")
686
+ }), /* @__PURE__ */ h(ye, {
683
687
  entityType: "VIBECONTROLS_AGENT",
684
- onDraftChange: Ot
688
+ onDraftChange: kt
685
689
  })] })
686
690
  }),
687
- /* @__PURE__ */ m(ue, {
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: b("agentsPage.disconnectTitle", "Disconnect Agent"),
694
- message: P ? Ne(P) === "OFFLINE" ? b("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 }) : b("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 }) : "",
695
- confirmLabel: b("agentsPage.disconnectConfirm", "Disconnect"),
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__ */ m(Je, {
703
+ /* @__PURE__ */ h(qe, {
700
704
  open: k !== null,
701
705
  onOpenChange: (e) => {
702
706
  e || A(null);
703
707
  },
704
- children: k ? /* @__PURE__ */ h(Ye, {
708
+ children: k ? /* @__PURE__ */ g(Je, {
705
709
  className: "sm:max-w-md",
706
710
  children: [
707
- /* @__PURE__ */ h(Qe, { children: [/* @__PURE__ */ m($e, { children: b("agentsPage.editTunnelTitle", "Edit Tunnel") }), /* @__PURE__ */ m(Xe, { children: b("agentsPage.editTunnelDescription", "Configure the cloudflared tunnel URL and API key for {{name}}.", { name: k.name }) })] }),
708
- /* @__PURE__ */ h("div", {
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__ */ m("label", {
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: b("agentsPage.tunnelUrlLabel", "Tunnel URL")
718
+ children: x("agentsPage.tunnelUrlLabel", "Tunnel URL")
715
719
  }),
716
- /* @__PURE__ */ m(Ke, {
720
+ /* @__PURE__ */ h(Ge, {
717
721
  ...L.inputProps,
718
722
  ref: Tt,
719
723
  type: "url",
720
724
  defaultValue: k.tunnelUrl || "",
721
- placeholder: b("agentsPage.tunnelUrlPlaceholder", "https://example.trycloudflare.com"),
725
+ placeholder: x("agentsPage.tunnelUrlPlaceholder", "https://example.trycloudflare.com"),
722
726
  className: "text-base md:text-sm"
723
727
  }),
724
- /* @__PURE__ */ m("p", {
728
+ /* @__PURE__ */ h("p", {
725
729
  id: L.hintId,
726
730
  className: "mt-1.5 text-xs text-text-muted",
727
- children: b("agentsPage.tunnelUrlHint", "Leave empty to clear. Agents with auto-tunnel report this automatically on startup.")
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__ */ h(Ze, { children: [/* @__PURE__ */ m(Ge, {
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: b("agentsPage.cancel", "Cancel")
737
- }), /* @__PURE__ */ m(Ge, {
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 ? b("agentsPage.saving", "Saving...") : b("agentsPage.save", "Save")
747
+ children: j ? x("agentsPage.saving", "Saving...") : x("agentsPage.save", "Save")
744
748
  })] })
745
749
  ]
746
750
  }) : null
747
751
  }),
748
- /* @__PURE__ */ m(ue, {
749
- isOpen: Et,
752
+ /* @__PURE__ */ h(ue, {
753
+ isOpen: Dt,
750
754
  onClose: () => {
751
- B || H(!1);
755
+ B || V(!1);
752
756
  },
753
757
  onConfirm: dn,
754
- title: b("agentsPage.bulkDeleteTitle", "Remove agents"),
755
- message: b("agentsPage.bulkDeleteConfirm", "Are you sure you want to remove {{count}} agent(s)? This cannot be undone.", { count: R.size }),
756
- confirmLabel: b("agentsPage.remove", "Remove"),
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__ */ m(de, {
761
- isOpen: U !== null,
762
- onClose: () => W(null),
764
+ /* @__PURE__ */ h(de, {
765
+ isOpen: H !== null,
766
+ onClose: () => U(null),
763
767
  onConfirm: () => {
764
- W(null), v("/billing/plans");
768
+ U(null), y("/billing/plans");
765
769
  },
766
- title: fe(U ?? "generic").title,
767
- message: fe(U ?? "generic").message
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 { at as AgentsPage };
777
+ export { it as AgentsPage };
774
778
 
775
779
  //# sourceMappingURL=AgentsPage.js.map