@burdenoff/microfe-vibecontrols 2026.625.3 → 2026.626.2

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 (59) hide show
  1. package/dist/components/agents/AgentForm.js +129 -127
  2. package/dist/components/agents/AgentForm.js.map +1 -1
  3. package/dist/components/shared/InstallTabs.js +19 -7
  4. package/dist/components/shared/InstallTabs.js.map +1 -1
  5. package/dist/pages/ActionsPage.js +209 -204
  6. package/dist/pages/ActionsPage.js.map +1 -1
  7. package/dist/pages/AgentDetailsPage.js +678 -648
  8. package/dist/pages/AgentDetailsPage.js.map +1 -1
  9. package/dist/pages/AgentGraphPage.js +112 -108
  10. package/dist/pages/AgentGraphPage.js.map +1 -1
  11. package/dist/pages/AgentsPage.js +159 -155
  12. package/dist/pages/AgentsPage.js.map +1 -1
  13. package/dist/pages/AnalyticsPage.js +140 -136
  14. package/dist/pages/AnalyticsPage.js.map +1 -1
  15. package/dist/pages/CatalogDetailPage.js +249 -244
  16. package/dist/pages/CatalogDetailPage.js.map +1 -1
  17. package/dist/pages/CatalogPage.js +73 -68
  18. package/dist/pages/CatalogPage.js.map +1 -1
  19. package/dist/pages/ComponentDetailPage.js +195 -164
  20. package/dist/pages/ComponentDetailPage.js.map +1 -1
  21. package/dist/pages/ComponentsPage.js +80 -75
  22. package/dist/pages/ComponentsPage.js.map +1 -1
  23. package/dist/pages/EnvTopologyPage.js +100 -95
  24. package/dist/pages/EnvTopologyPage.js.map +1 -1
  25. package/dist/pages/HealthPage.js +331 -204
  26. package/dist/pages/HealthPage.js.map +1 -1
  27. package/dist/pages/LogsPage.js +54 -49
  28. package/dist/pages/LogsPage.js.map +1 -1
  29. package/dist/pages/OverviewPage.js +159 -129
  30. package/dist/pages/OverviewPage.js.map +1 -1
  31. package/dist/pages/PluginsCatalogPage.js +72 -78
  32. package/dist/pages/PluginsCatalogPage.js.map +1 -1
  33. package/dist/pages/SessionDetailsPage.js +517 -512
  34. package/dist/pages/SessionDetailsPage.js.map +1 -1
  35. package/dist/pages/SessionsPage.js +1084 -1079
  36. package/dist/pages/SessionsPage.js.map +1 -1
  37. package/dist/pages/SettingsPage.js +107 -103
  38. package/dist/pages/SettingsPage.js.map +1 -1
  39. package/dist/pages/TargetDetailsPage.js +131 -123
  40. package/dist/pages/TargetDetailsPage.js.map +1 -1
  41. package/dist/pages/TargetsPage.js +198 -194
  42. package/dist/pages/TargetsPage.js.map +1 -1
  43. package/dist/pages/TemplatesPage.js +77 -71
  44. package/dist/pages/TemplatesPage.js.map +1 -1
  45. package/dist/pages/VibeAuditPage.js +83 -78
  46. package/dist/pages/VibeAuditPage.js.map +1 -1
  47. package/dist/pages/VibeCalendarPage.js +109 -104
  48. package/dist/pages/VibeCalendarPage.js.map +1 -1
  49. package/dist/pages/VibeDeckPage.js +222 -217
  50. package/dist/pages/VibeDeckPage.js.map +1 -1
  51. package/dist/pages/VibeDetailsPage.js +532 -501
  52. package/dist/pages/VibeDetailsPage.js.map +1 -1
  53. package/dist/pages/VibesPage.js +137 -133
  54. package/dist/pages/VibesPage.js.map +1 -1
  55. package/dist/pages/WebhooksPage.js +329 -324
  56. package/dist/pages/WebhooksPage.js.map +1 -1
  57. package/dist/pages/ai/AIPage.js +149 -144
  58. package/dist/pages/ai/AIPage.js.map +1 -1
  59. package/package.json +2 -2
@@ -33,13 +33,13 @@ import { useSearchParams as Ue } from "react-router-dom";
33
33
  import { usePermissions as We } from "@burdenoff/fe-libs/shared/providers/shell";
34
34
  import { AnimatePresence as Ge } from "framer-motion";
35
35
  import { jsx as m, jsxs as h } from "react/jsx-runtime";
36
- import { Button as Ke, Input 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";
36
+ import { Button as Ke, Input as qe, PagePurpose as Je, ResponsiveDialog as Ye, ResponsiveDialogContent as Xe, ResponsiveDialogDescription as Ze, ResponsiveDialogFooter as Qe, ResponsiveDialogHeader as $e, ResponsiveDialogTitle as et } from "@burdenoff/fe-libs/ui";
37
+ import { useEventBus as tt } from "@burdenoff/fe-libs/shared/events";
38
+ import { AccessDenied as nt, PermissionButton as rt } from "@burdenoff/fe-libs/shared/components";
39
+ import { MotionItem as it, MotionList as at, MotionPage as g } from "@burdenoff/fe-libs/shared/motion";
40
40
  //#region src/pages/AgentsPage.tsx
41
- function at() {
42
- let { onAgentSelect: at, workspaceId: _ } = me(), v = he(), y = et(), { hasPermission: ot, isLoading: st, permissions: ct } = We(), b = ue(), lt = [
41
+ function ot() {
42
+ let { onAgentSelect: ot, workspaceId: _ } = me(), v = he(), y = tt(), { hasPermission: st, isLoading: ct, permissions: lt } = We(), b = ue(), ut = [
43
43
  {
44
44
  value: "all",
45
45
  label: b("agentsPage.statusAll", "All Statuses")
@@ -56,7 +56,7 @@ function at() {
56
56
  value: "OFFLINE",
57
57
  label: b("agentsPage.statusOffline", "Offline")
58
58
  }
59
- ], ut = [
59
+ ], dt = [
60
60
  {
61
61
  value: "all",
62
62
  label: b("agentsPage.platformAll", "All Platforms")
@@ -73,17 +73,17 @@ function at() {
73
73
  value: "windows",
74
74
  label: b("agentsPage.platformWindows", "Windows")
75
75
  }
76
- ], dt = ot(ke.AGENT_LIST), [x, ft] = f(""), [S, pt] = f("all"), [C, mt] = f("all"), [w, ht] = f("all"), [T, gt] = f("grid"), [_t, E] = f(!1), [vt, yt] = f(!1), [D, bt] = Ue();
76
+ ], ft = st(ke.AGENT_LIST), [x, pt] = f(""), [S, mt] = f("all"), [C, ht] = f("all"), [w, gt] = f("all"), [T, _t] = f("grid"), [vt, E] = f(!1), [yt, bt] = f(!1), [D, xt] = Ue();
77
77
  u(() => {
78
78
  if (D.get("create") === "true") {
79
79
  E(!0);
80
80
  let e = new URLSearchParams(D);
81
- e.delete("create"), bt(e, { replace: !0 });
81
+ e.delete("create"), xt(e, { replace: !0 });
82
82
  }
83
- }, [D, bt]);
84
- let [O, k] = f(null), [A, xt] = f(!1), j = s((e) => e.connectingAgents), St = s((e) => e.markAgentConnecting), M = s((e) => e.clearAgentConnecting), Ct = d(() => new Set(Object.keys(j)), [j]), wt = Fe(/* @__PURE__ */ new Map());
83
+ }, [D, xt]);
84
+ let [O, k] = f(null), [A, St] = f(!1), j = s((e) => e.connectingAgents), Ct = s((e) => e.markAgentConnecting), M = s((e) => e.clearAgentConnecting), wt = d(() => new Set(Object.keys(j)), [j]), Tt = Fe(/* @__PURE__ */ new Map());
85
85
  u(() => {
86
- let e = wt.current;
86
+ let e = Tt.current;
87
87
  for (let t of Object.keys(j)) {
88
88
  if (e.has(t)) continue;
89
89
  let n = setTimeout(() => {
@@ -97,7 +97,7 @@ function at() {
97
97
  e.clear();
98
98
  };
99
99
  }, [j, M]);
100
- let [N, P] = f(null), [Tt, F] = f(!1), Et = Fe(null), I = De({ hint: b("agentsPage.tunnelUrlHint", "Leave empty to clear. Agents with auto-tunnel report this automatically on startup.") }), [L, R] = f(/* @__PURE__ */ new Set()), [z, Dt] = f(!1), [Ot, B] = f(!1), [V, H] = f(null), [kt] = n({ refetchQueries: ["ListAgents"] }), { setDraftTagIds: At, flushTags: jt } = xe("VIBECONTROLS_AGENT"), [Mt] = e({ refetchQueries: ["ListAgents"] }), [U] = t({ refetchQueries: ["ListAgents"] }), [Nt] = i({ refetchQueries: ["ListAgents"] }), [Pt] = ie({ refetchQueries: ["ListAgents"] }), [Ft] = ae({ refetchQueries: ["ListAgents"] }), [It] = re({ refetchQueries: ["ListAgents"] }), { refetch: Lt } = ge(), { data: Rt, loading: zt, refetch: Bt } = ne({
100
+ let [N, P] = f(null), [Et, F] = f(!1), Dt = Fe(null), I = De({ hint: b("agentsPage.tunnelUrlHint", "Leave empty to clear. Agents with auto-tunnel report this automatically on startup.") }), [L, R] = f(/* @__PURE__ */ new Set()), [z, Ot] = f(!1), [kt, B] = f(!1), [V, H] = f(null), [At] = n({ refetchQueries: ["ListAgents"] }), { setDraftTagIds: jt, flushTags: Mt } = xe("VIBECONTROLS_AGENT"), [Nt] = e({ refetchQueries: ["ListAgents"] }), [Pt] = t({ refetchQueries: ["ListAgents"] }), [Ft] = i({ refetchQueries: ["ListAgents"] }), [It] = ie({ refetchQueries: ["ListAgents"] }), [Lt] = ae({ refetchQueries: ["ListAgents"] }), [Rt] = re({ refetchQueries: ["ListAgents"] }), { refetch: zt } = ge(), { data: Bt, loading: Vt, refetch: Ht } = ne({
101
101
  variables: {
102
102
  workspaceId: _ ?? "",
103
103
  limit: 50,
@@ -105,13 +105,13 @@ function at() {
105
105
  },
106
106
  skip: !_,
107
107
  fetchPolicy: "cache-and-network"
108
- }), Vt = Rt?.targets?.items ?? [], Ht = Vt.length > 0, [Ut] = oe({ refetchQueries: ["ListAgents"] }), [Wt] = ee({ refetchQueries: ["ListAgents"] }), [Gt] = r({
108
+ }), Ut = Bt?.targets?.items ?? [], Wt = Ut.length > 0, [Gt] = oe({ refetchQueries: ["ListAgents"] }), [Kt] = ee({ refetchQueries: ["ListAgents"] }), [qt] = r({
109
109
  refetchQueries: ["VibeControlsInitialData", "ListTargets"],
110
110
  awaitRefetchQueries: !0
111
- }), Kt = l(async (e) => {
111
+ }), Jt = l(async (e) => {
112
112
  if (!_ || !e.trim()) return null;
113
113
  try {
114
- let t = await Gt({ variables: {
114
+ let t = await qt({ variables: {
115
115
  workspaceId: _,
116
116
  input: {
117
117
  type: "DIRECT",
@@ -120,7 +120,7 @@ function at() {
120
120
  } });
121
121
  if (t.error && a(t.error)) throw o(), H("target"), t.error;
122
122
  let n = t.data?.createTarget;
123
- return n ? (Lt(), Bt(), {
123
+ return n ? (zt(), Ht(), {
124
124
  id: n.id,
125
125
  name: n.name,
126
126
  type: n.type ?? "DIRECT",
@@ -131,11 +131,11 @@ function at() {
131
131
  return null;
132
132
  }
133
133
  }, [
134
- Gt,
135
- Lt,
136
- Bt,
134
+ qt,
135
+ zt,
136
+ Ht,
137
137
  _
138
- ]), { data: qt, loading: W, error: Jt, refetch: G } = te({
138
+ ]), { data: Yt, loading: U, error: Xt, refetch: W } = te({
139
139
  variables: {
140
140
  filter: {
141
141
  isActive: S === "ACTIVE" ? !0 : S === "OFFLINE" ? !1 : void 0,
@@ -145,26 +145,26 @@ function at() {
145
145
  },
146
146
  fetchPolicy: "cache-first",
147
147
  skip: !_
148
- }), [Yt, Xt] = f(!1);
148
+ }), [Zt, Qt] = f(!1);
149
149
  u(() => {
150
- let e = window.setTimeout(() => Xt(!0), 0);
150
+ let e = window.setTimeout(() => Qt(!0), 0);
151
151
  return () => window.clearTimeout(e);
152
152
  }, []);
153
- let K = le({
153
+ let G = le({
154
154
  fetchPolicy: "cache-and-network",
155
155
  nextFetchPolicy: "cache-first",
156
156
  notifyOnNetworkStatusChange: !0,
157
- skip: !_ || !Yt,
157
+ skip: !_ || !Zt,
158
158
  pollInterval: 6e4
159
- }), [Zt] = ce({ fetchPolicy: "network-only" }), { data: q } = se({ skip: !_ || !Yt }), Qt = K.data === void 0 && q === void 0, J = d(() => {
160
- let e = /* @__PURE__ */ new Map(), t = q?.vibecontrolsAgentHealthProbeStream ?? K.data?.vibecontrolsAgentHealthProbes ?? [];
159
+ }), [$t] = ce({ fetchPolicy: "network-only" }), { data: K } = se({ skip: !_ || !Zt }), en = G.data === void 0 && K === void 0, q = d(() => {
160
+ let e = /* @__PURE__ */ new Map(), t = K?.vibecontrolsAgentHealthProbeStream ?? G.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
- }, [K.data, q]), Y = d(() => (qt?.vibecontrolsAgents ?? []).map((e) => ({
167
+ }, [G.data, K]), J = d(() => (Yt?.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: Ct.has(e.id) ? "CONNECTING" : Pe({
176
+ status: wt.has(e.id) ? "CONNECTING" : Pe({
177
177
  id: e.id,
178
178
  isActive: e.isActive,
179
179
  metadata: e.metadata
180
- }, J, { probesLoading: Qt }),
181
- healthError: J.get(e.id)?.errorMessage ?? (e.lastGatewayAuthPushStatus === "failed" ? e.lastGatewayAuthPushError ?? "Gateway-auth push failed" : null),
180
+ }, q, { probesLoading: en }),
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,10 +201,10 @@ function at() {
201
201
  } : null
202
202
  }))
203
203
  })), [
204
- qt?.vibecontrolsAgents,
205
- J,
206
- Qt,
207
- Ct
204
+ Yt?.vibecontrolsAgents,
205
+ q,
206
+ en,
207
+ wt
208
208
  ]);
209
209
  u(() => {
210
210
  let e = Object.keys(j);
@@ -212,47 +212,47 @@ function at() {
212
212
  let t = Date.now(), n = Infinity;
213
213
  for (let r of e) {
214
214
  let e = j[r];
215
- e !== void 0 && (J.get(r)?.healthy === !0 && t >= e ? M(r) : e < n && (n = e));
215
+ e !== void 0 && (q.get(r)?.healthy === !0 && t >= e ? M(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 && M(t);
222
+ n !== void 0 && q.get(t)?.healthy === !0 && Date.now() >= n && M(t);
223
223
  }
224
224
  }, r);
225
225
  return () => clearTimeout(i);
226
226
  }, [
227
- J,
227
+ q,
228
228
  j,
229
229
  M
230
230
  ]);
231
- let X = d(() => Y.filter((e) => {
231
+ let Y = d(() => J.filter((e) => {
232
232
  if (x) {
233
233
  let t = x.toLowerCase();
234
234
  if (!(e.name.toLowerCase().includes(t) || e.hostname?.toLowerCase().includes(t) || e.id.toLowerCase().includes(t))) return !1;
235
235
  }
236
236
  return !(w !== "all" && !(e.tagAssignments ?? []).some((e) => e.tagId === w));
237
237
  }), [
238
- Y,
238
+ J,
239
239
  x,
240
240
  w
241
- ]), $t = (e) => {
242
- v(`/agents/${e.id}`), at?.({
241
+ ]), tn = (e) => {
242
+ v(`/agents/${e.id}`), ot?.({
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
- }, Z = () => {
248
+ }, X = () => {
249
249
  E(!0), y.emitCustom("vibecontrols.agent.register_clicked", { workspaceId: _ ?? void 0 });
250
- }, en = async (e) => {
250
+ }, nn = async (e) => {
251
251
  try {
252
- yt(!0);
252
+ bt(!0);
253
253
  let t = e.tunnelUrl?.trim(), n = e.agentApiKey?.trim();
254
254
  if (t && n) {
255
- let r = await Mt({ variables: { input: {
255
+ let r = await Nt({ variables: { input: {
256
256
  tunnelUrl: t,
257
257
  apiKey: n,
258
258
  ...e.name ? { name: e.name } : {},
@@ -261,7 +261,7 @@ 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 jt(i.agent.id), y.emitCustom("vibecontrols.agent.registered", {
264
+ if (i.agent?.id) return await Mt(i.agent.id), y.emitCustom("vibecontrols.agent.registered", {
265
265
  workspaceId: _ ?? void 0,
266
266
  agentId: i.agent.id
267
267
  }), y.emitCustom("vibecontrols.agent.gateway_auth_setup", {
@@ -270,7 +270,7 @@ function at() {
270
270
  }), { id: i.agent.id };
271
271
  throw Error("Agent onboarding returned no agent record.");
272
272
  }
273
- let r = await kt({ variables: { input: {
273
+ let r = await At({ variables: { input: {
274
274
  name: e.name,
275
275
  hostname: e.hostname,
276
276
  platform: e.platform,
@@ -280,7 +280,7 @@ 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 jt(i.id), y.emitCustom("vibecontrols.agent.registered", {
283
+ if (i?.id) return await Mt(i.id), y.emitCustom("vibecontrols.agent.registered", {
284
284
  workspaceId: _ ?? void 0,
285
285
  agentId: i.id
286
286
  }), { id: i.id };
@@ -292,57 +292,57 @@ function at() {
292
292
  }
293
293
  throw console.error("Failed to create agent:", e), e;
294
294
  } finally {
295
- yt(!1);
295
+ bt(!1);
296
296
  }
297
- }, tn = async (e) => {
297
+ }, Z = async (e) => {
298
298
  try {
299
- let t = (await Pt({ variables: { agentId: e.id } })).data?.startVibecontrolsAgent;
299
+ let t = (await It({ 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 It({ variables: { input: { agentId: e.id } } })).data?.setupAgentGatewayAuth;
302
+ let t = (await Rt({ 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 Pt({ variables: { agentId: e.id } })).data?.startVibecontrolsAgent;
307
+ let i = (await It({ 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
309
  y.emitCustom("vibecontrols.agent.gateway_auth_setup", {
310
310
  workspaceId: _ ?? void 0,
311
311
  agentId: e.id
312
- }), await U({ variables: { id: e.id } }), c.success(`Agent "${e.name}" re-credentialed and started.`);
312
+ }), await Pt({ variables: { id: e.id } }), c.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 U({ variables: { id: e.id } }), c.success(`Agent "${e.name}" started`);
317
+ await Pt({ variables: { id: e.id } }), c.success(`Agent "${e.name}" started`);
318
318
  } catch (e) {
319
319
  console.error("Failed to start agent:", e), c.error(e instanceof Error ? e.message : "Failed to start agent");
320
320
  }
321
- }, nn = async (e) => {
321
+ }, rn = async (e) => {
322
322
  try {
323
- let t = (await Ft({ variables: { agentId: e.id } })).data?.stopVibecontrolsAgent;
323
+ let t = (await Lt({ variables: { agentId: e.id } })).data?.stopVibecontrolsAgent;
324
324
  if (!t?.success) throw Error(t?.error || "Failed to stop agent");
325
- await Nt({ variables: { id: e.id } }), c.success(`Agent "${e.name}" stopped`);
325
+ await Ft({ variables: { id: e.id } }), c.success(`Agent "${e.name}" stopped`);
326
326
  } catch (e) {
327
327
  console.error("Failed to stop agent:", e), c.error(e instanceof Error ? e.message : "Failed to stop agent");
328
328
  }
329
- }, rn = (e) => {
329
+ }, an = (e) => {
330
330
  P(e);
331
- }, an = async () => {
331
+ }, on = async () => {
332
332
  if (!N) return;
333
333
  let e = N;
334
334
  F(!0);
335
335
  try {
336
- await Nt({
336
+ await Ft({
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"), F(!1), P(null), await G();
341
+ console.error("Failed to deactivate agent:", e), c.error(e instanceof Error ? e.message : "Failed to disconnect agent"), F(!1), P(null), await W();
342
342
  return;
343
343
  }
344
344
  try {
345
- await Ut({
345
+ await Gt({
346
346
  variables: {
347
347
  id: e.id,
348
348
  input: {
@@ -355,16 +355,16 @@ function at() {
355
355
  } catch (e) {
356
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.");
357
357
  }
358
- F(!1), P(null), await G();
359
- }, on = (e) => {
360
- v(`/agents/${e.id}`);
358
+ F(!1), P(null), await W();
361
359
  }, sn = (e) => {
360
+ v(`/agents/${e.id}`);
361
+ }, cn = (e) => {
362
362
  k(e);
363
- }, cn = async () => {
363
+ }, ln = async () => {
364
364
  if (!O) return;
365
- let e = O.id, t = Et.current?.value?.trim() || "";
365
+ let e = O.id, t = Dt.current?.value?.trim() || "";
366
366
  try {
367
- xt(!0), await Ut({
367
+ St(!0), await Gt({
368
368
  variables: {
369
369
  id: e,
370
370
  input: {
@@ -373,53 +373,53 @@ function at() {
373
373
  }
374
374
  },
375
375
  refetchQueries: ["ListAgents", "VibecontrolsAgentHealthProbes"]
376
- }), t && St(e), k(null);
376
+ }), t && Ct(e), k(null);
377
377
  } catch (e) {
378
378
  console.error("Failed to update tunnel settings:", e);
379
379
  } finally {
380
- xt(!1);
380
+ St(!1);
381
381
  }
382
- }, ln = l((e) => {
382
+ }, un = l((e) => {
383
383
  R((t) => {
384
384
  let n = new Set(t);
385
385
  return n.has(e) ? n.delete(e) : n.add(e), n;
386
386
  });
387
- }, []), un = l(() => {
388
- R(new Set(X.map((e) => e.id)));
389
- }, [X]), Q = l(() => {
387
+ }, []), dn = l(() => {
388
+ R(new Set(Y.map((e) => e.id)));
389
+ }, [Y]), Q = l(() => {
390
390
  R(/* @__PURE__ */ new Set());
391
- }, []), $ = X.length > 0 && L.size === X.length, dn = L.size > 0, fn = l(async () => {
391
+ }, []), $ = Y.length > 0 && L.size === Y.length, fn = L.size > 0, pn = l(async () => {
392
392
  if (L.size !== 0) {
393
- Dt(!0);
393
+ Ot(!0);
394
394
  try {
395
- let e = await Promise.allSettled(Array.from(L).map((e) => Wt({ variables: { id: e } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.filter((e) => e.status === "rejected").length;
395
+ let e = await Promise.allSettled(Array.from(L).map((e) => Kt({ variables: { id: e } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.filter((e) => e.status === "rejected").length;
396
396
  n > 0 ? c.error(`Removed ${t}, failed to remove ${n} agent${n === 1 ? "" : "s"}`) : c.success(`Removed ${t} agent${t === 1 ? "" : "s"}`), R(/* @__PURE__ */ new Set());
397
397
  } catch (e) {
398
398
  c.error(e instanceof Error ? e.message : "Failed to remove agents");
399
399
  } finally {
400
- Dt(!1), B(!1);
400
+ Ot(!1), B(!1);
401
401
  }
402
402
  }
403
- }, [L, Wt]), pn = {
404
- total: Y.length,
405
- active: Y.filter((e) => e.status === "ACTIVE").length,
406
- offline: Y.filter((e) => e.status !== "ACTIVE").length
403
+ }, [L, Kt]), mn = {
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 ct ? /* @__PURE__ */ m(g, {
409
409
  className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-full",
410
410
  children: /* @__PURE__ */ m(ve, { message: b("agentsPage.loadingPermissions", "Loading permissions...") })
411
- }) : ct && ct.permissionStrings?.length > 0 && !dt ? /* @__PURE__ */ m(g, {
411
+ }) : lt && lt.permissionStrings?.length > 0 && !ft ? /* @__PURE__ */ m(g, {
412
412
  className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-full",
413
- children: /* @__PURE__ */ m(tt, {
413
+ children: /* @__PURE__ */ m(nt, {
414
414
  title: b("agentsPage.accessDeniedTitle", "Access Denied"),
415
415
  description: b("agentsPage.accessDeniedDescription", "You don't have permission to view agents. Contact your workspace administrator for access.")
416
416
  })
417
- }) : Jt && Y.length === 0 ? /* @__PURE__ */ m(g, {
417
+ }) : Xt && J.length === 0 ? /* @__PURE__ */ m(g, {
418
418
  className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-full",
419
419
  children: /* @__PURE__ */ m(ye, {
420
420
  title: b("agentsPage.failedLoad", "Failed to load agents"),
421
- message: Jt.message,
422
- onRetry: () => G()
421
+ message: Xt.message,
422
+ onRetry: () => W()
423
423
  })
424
424
  }) : /* @__PURE__ */ h(g, {
425
425
  className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-full",
@@ -427,47 +427,51 @@ function at() {
427
427
  /* @__PURE__ */ m(_e, {
428
428
  title: b("agentsPage.title", "Agents"),
429
429
  description: b("agentsPage.descriptionOnline", "{{active}} of {{total}} agents online", {
430
- active: pn.active,
431
- total: pn.total
430
+ active: mn.active,
431
+ total: mn.total
432
432
  }),
433
433
  actions: /* @__PURE__ */ h("div", {
434
434
  className: "flex w-full flex-col items-end gap-2 sm:w-auto sm:flex-row sm:items-center",
435
435
  children: [/* @__PURE__ */ m("button", {
436
436
  type: "button",
437
437
  onClick: () => {
438
- G(), Zt();
438
+ W(), $t();
439
439
  },
440
- disabled: W || K.loading,
440
+ disabled: U || G.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
442
  "aria-label": b("agentsPage.refreshTitle", "Refresh agents"),
443
443
  title: b("agentsPage.refreshTitle", "Refresh agents"),
444
444
  children: /* @__PURE__ */ m(Be, {
445
445
  "aria-hidden": "true",
446
- className: `size-4 ${W || K.loading ? "animate-spin" : ""}`
446
+ className: `size-4 ${U || G.loading ? "animate-spin" : ""}`
447
447
  })
448
- }), Ht ? /* @__PURE__ */ m(nt, {
448
+ }), Wt ? /* @__PURE__ */ m(rt, {
449
449
  permission: ke.AGENT_CREATE,
450
450
  deniedBehavior: "disable",
451
451
  deniedTooltip: b("agentsPage.deniedCreateTooltip", "You don't have permission to create agents"),
452
452
  children: /* @__PURE__ */ h("button", {
453
453
  type: "button",
454
- onClick: Z,
454
+ onClick: X,
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
456
  children: [/* @__PURE__ */ m(p, { className: "size-4" }), b("agentsPage.addAgent", "Add Agent")]
457
457
  })
458
458
  }) : /* @__PURE__ */ h("button", {
459
459
  type: "button",
460
- onClick: Z,
460
+ onClick: X,
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
462
  children: [/* @__PURE__ */ m(p, { className: "size-4" }), b("agentsPage.addAgent", "Add Agent")]
463
463
  })]
464
464
  })
465
465
  }),
466
- Y.length === 0 && !W && /* @__PURE__ */ m(Te, {
466
+ /* @__PURE__ */ m(Je, {
467
+ icon: /* @__PURE__ */ m(Ie, { 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.")
469
+ }),
470
+ J.length === 0 && !U && /* @__PURE__ */ m(Te, {
467
471
  variant: "full",
468
472
  dismissKey: "vibecontrols-agents-setup-banner"
469
473
  }),
470
- Y.length > 0 && /* @__PURE__ */ m(Te, {
474
+ J.length > 0 && /* @__PURE__ */ m(Te, {
471
475
  variant: "compact",
472
476
  dismissKey: "vibecontrols-agents-compact-banner"
473
477
  }),
@@ -477,7 +481,7 @@ function at() {
477
481
  className: "flex items-center gap-2",
478
482
  children: [/* @__PURE__ */ m(Ce, {
479
483
  value: x,
480
- onChange: ft,
484
+ onChange: pt,
481
485
  placeholder: b("agentsPage.searchPlaceholder", "Search agents..."),
482
486
  className: "flex-1 sm:w-64 sm:flex-none"
483
487
  }), /* @__PURE__ */ h("div", {
@@ -485,7 +489,7 @@ function at() {
485
489
  children: [/* @__PURE__ */ m("button", {
486
490
  type: "button",
487
491
  onClick: () => {
488
- gt("grid"), R(/* @__PURE__ */ new Set());
492
+ _t("grid"), R(/* @__PURE__ */ new Set());
489
493
  },
490
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"}`,
491
495
  "aria-label": b("agentsPage.gridViewTitle", "Grid view"),
@@ -498,7 +502,7 @@ function at() {
498
502
  }), /* @__PURE__ */ m("button", {
499
503
  type: "button",
500
504
  onClick: () => {
501
- gt("list"), R(/* @__PURE__ */ new Set());
505
+ _t("list"), R(/* @__PURE__ */ new Set());
502
506
  },
503
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"}`,
504
508
  "aria-label": b("agentsPage.listViewTitle", "List view"),
@@ -516,28 +520,28 @@ function at() {
516
520
  /* @__PURE__ */ m(we, {
517
521
  label: b("agentsPage.filterStatus", "Status"),
518
522
  value: S,
519
- options: lt,
520
- onChange: pt
523
+ options: ut,
524
+ onChange: mt
521
525
  }),
522
526
  /* @__PURE__ */ m(we, {
523
527
  label: b("agentsPage.filterPlatform", "Platform"),
524
528
  value: C,
525
- options: ut,
526
- onChange: mt
529
+ options: dt,
530
+ onChange: ht
527
531
  }),
528
532
  /* @__PURE__ */ m(Oe, {
529
533
  label: b("agentsPage.filterTag", "Tag"),
530
534
  value: w,
531
- onChange: ht
535
+ onChange: gt
532
536
  })
533
537
  ]
534
538
  })]
535
539
  }),
536
- T === "grid" && X.length > 0 && /* @__PURE__ */ m("div", {
540
+ T === "grid" && Y.length > 0 && /* @__PURE__ */ m("div", {
537
541
  className: "flex justify-end",
538
542
  children: /* @__PURE__ */ h("button", {
539
543
  type: "button",
540
- onClick: $ ? Q : un,
544
+ onClick: $ ? Q : dn,
541
545
  "aria-pressed": $,
542
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",
543
547
  children: [/* @__PURE__ */ m(Le, {
@@ -546,7 +550,7 @@ function at() {
546
550
  }), $ ? b("agentsPage.deselectAll", "Deselect All") : b("agentsPage.selectAll", "Select All")]
547
551
  })
548
552
  }),
549
- dn && /* @__PURE__ */ h("div", {
553
+ fn && /* @__PURE__ */ h("div", {
550
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",
551
555
  children: [/* @__PURE__ */ m("span", {
552
556
  className: "text-sm font-medium text-text-primary",
@@ -584,51 +588,51 @@ function at() {
584
588
  x || S !== "all" || C !== "all" ? /* @__PURE__ */ h("p", {
585
589
  className: "text-sm text-text-secondary",
586
590
  children: [b("agentsPage.showingResults", "Showing {{filtered}} of {{total}} agents", {
587
- filtered: X.length,
588
- total: Y.length
589
- }), W && /* @__PURE__ */ m("span", {
591
+ filtered: Y.length,
592
+ total: J.length
593
+ }), U && /* @__PURE__ */ m("span", {
590
594
  className: "ml-2 text-text-muted",
591
595
  children: b("agentsPage.refreshing", "(refreshing...)")
592
596
  })]
593
597
  }) : null,
594
- W && Y.length === 0 ? /* @__PURE__ */ m(Ae, {
598
+ U && J.length === 0 ? /* @__PURE__ */ m(Ae, {
595
599
  variant: "rows",
596
600
  count: 6
597
- }) : X.length > 0 ? /* @__PURE__ */ m(Ge, {
601
+ }) : Y.length > 0 ? /* @__PURE__ */ m(Ge, {
598
602
  mode: "wait",
599
- children: T === "grid" ? /* @__PURE__ */ m(it, {
603
+ children: T === "grid" ? /* @__PURE__ */ m(at, {
600
604
  "data-tour": "agents-page-grid-header",
601
605
  stagger: .04,
602
606
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
603
- children: X.map((e) => /* @__PURE__ */ m(rt, {
607
+ children: Y.map((e) => /* @__PURE__ */ m(it, {
604
608
  className: "h-full",
605
609
  children: /* @__PURE__ */ m(je, {
606
610
  agent: e,
607
- onSelect: $t,
608
- onStart: tn,
609
- onStop: nn,
610
- onDisconnect: rn,
611
- onConfigure: on,
612
- onEditTunnelUrl: sn,
611
+ onSelect: tn,
612
+ onStart: Z,
613
+ onStop: rn,
614
+ onDisconnect: an,
615
+ onConfigure: sn,
616
+ onEditTunnelUrl: cn,
613
617
  selected: L.has(e.id),
614
- onToggleSelect: () => ln(e.id),
618
+ onToggleSelect: () => un(e.id),
615
619
  healthErrorMessage: e.healthError ?? null
616
620
  })
617
621
  }, e.id))
618
- }, "grid-view") : /* @__PURE__ */ m(it, {
622
+ }, "grid-view") : /* @__PURE__ */ m(at, {
619
623
  stagger: .04,
620
- children: /* @__PURE__ */ m(rt, {
624
+ children: /* @__PURE__ */ m(it, {
621
625
  variant: "fadeRight",
622
626
  children: /* @__PURE__ */ m(Me, {
623
- agents: X,
624
- onSelect: $t,
625
- onStart: tn,
626
- onStop: nn,
627
- onDisconnect: rn,
628
- onSettings: on,
627
+ agents: Y,
628
+ onSelect: tn,
629
+ onStart: Z,
630
+ onStop: rn,
631
+ onDisconnect: an,
632
+ onSettings: sn,
629
633
  selectedIds: L,
630
- onToggleSelect: ln,
631
- onSelectAll: un,
634
+ onToggleSelect: un,
635
+ onSelectAll: dn,
632
636
  onDeselectAll: Q
633
637
  })
634
638
  })
@@ -643,7 +647,7 @@ function at() {
643
647
  children: [
644
648
  /* @__PURE__ */ h("button", {
645
649
  type: "button",
646
- onClick: Z,
650
+ onClick: X,
647
651
  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",
648
652
  children: [/* @__PURE__ */ m(p, { className: "size-4" }), b("agentsPage.addAgent", "Add Agent")]
649
653
  }),
@@ -657,50 +661,50 @@ function at() {
657
661
  ]
658
662
  }) : void 0
659
663
  }),
660
- _t && /* @__PURE__ */ m(Ne, {
661
- onSubmit: en,
664
+ vt && /* @__PURE__ */ m(Ne, {
665
+ onSubmit: nn,
662
666
  onCancel: () => E(!1),
663
- isLoading: vt,
667
+ isLoading: yt,
664
668
  onNavigate: (e) => {
665
669
  E(!1), v(e);
666
670
  },
667
- targets: Vt.map((e) => ({
671
+ targets: Ut.map((e) => ({
668
672
  id: e.id,
669
673
  name: e.name,
670
674
  type: e.type || "DIRECT",
671
675
  status: e.status
672
676
  })),
673
- targetsLoading: zt,
674
- onCreateTarget: Kt,
677
+ targetsLoading: Vt,
678
+ onCreateTarget: Jt,
675
679
  extraSection: /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h3", {
676
680
  className: "text-sm font-medium text-text-secondary mb-2",
677
681
  children: b("agents.tags", "Tags")
678
682
  }), /* @__PURE__ */ m(be, {
679
683
  entityType: "VIBECONTROLS_AGENT",
680
- onDraftChange: At
684
+ onDraftChange: jt
681
685
  })] })
682
686
  }),
683
687
  /* @__PURE__ */ m(de, {
684
688
  isOpen: N !== null,
685
689
  onClose: () => {
686
- Tt || P(null);
690
+ Et || P(null);
687
691
  },
688
- onConfirm: an,
692
+ onConfirm: on,
689
693
  title: b("agentsPage.disconnectTitle", "Disconnect Agent"),
690
694
  message: N ? Pe(N) === "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: N.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: N.name }) : "",
691
695
  confirmLabel: b("agentsPage.disconnectConfirm", "Disconnect"),
692
696
  variant: "danger",
693
- isLoading: Tt
697
+ isLoading: Et
694
698
  }),
695
- /* @__PURE__ */ m(Je, {
699
+ /* @__PURE__ */ m(Ye, {
696
700
  open: O !== null,
697
701
  onOpenChange: (e) => {
698
702
  e || k(null);
699
703
  },
700
- children: O ? /* @__PURE__ */ h(Ye, {
704
+ children: O ? /* @__PURE__ */ h(Xe, {
701
705
  className: "sm:max-w-md",
702
706
  children: [
703
- /* @__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: O.name }) })] }),
707
+ /* @__PURE__ */ h($e, { children: [/* @__PURE__ */ m(et, { children: b("agentsPage.editTunnelTitle", "Edit Tunnel") }), /* @__PURE__ */ m(Ze, { children: b("agentsPage.editTunnelDescription", "Configure the cloudflared tunnel URL and API key for {{name}}.", { name: O.name }) })] }),
704
708
  /* @__PURE__ */ h("div", {
705
709
  className: "py-4",
706
710
  children: [
@@ -711,7 +715,7 @@ function at() {
711
715
  }),
712
716
  /* @__PURE__ */ m(qe, {
713
717
  ...I.inputProps,
714
- ref: Et,
718
+ ref: Dt,
715
719
  type: "url",
716
720
  defaultValue: O.tunnelUrl || "",
717
721
  placeholder: b("agentsPage.tunnelUrlPlaceholder", "https://example.trycloudflare.com"),
@@ -724,7 +728,7 @@ function at() {
724
728
  })
725
729
  ]
726
730
  }),
727
- /* @__PURE__ */ h(Ze, { children: [/* @__PURE__ */ m(Ke, {
731
+ /* @__PURE__ */ h(Qe, { children: [/* @__PURE__ */ m(Ke, {
728
732
  type: "button",
729
733
  variant: "outline",
730
734
  onClick: () => k(null),
@@ -732,7 +736,7 @@ function at() {
732
736
  children: b("agentsPage.cancel", "Cancel")
733
737
  }), /* @__PURE__ */ m(Ke, {
734
738
  type: "button",
735
- onClick: cn,
739
+ onClick: ln,
736
740
  disabled: A,
737
741
  "aria-busy": A,
738
742
  className: "max-md:min-h-11",
@@ -742,11 +746,11 @@ function at() {
742
746
  }) : null
743
747
  }),
744
748
  /* @__PURE__ */ m(de, {
745
- isOpen: Ot,
749
+ isOpen: kt,
746
750
  onClose: () => {
747
751
  z || B(!1);
748
752
  },
749
- onConfirm: fn,
753
+ onConfirm: pn,
750
754
  title: b("agentsPage.bulkDeleteTitle", "Remove agents"),
751
755
  message: b("agentsPage.bulkDeleteConfirm", "Are you sure you want to remove {{count}} agent(s)? This cannot be undone.", { count: L.size }),
752
756
  confirmLabel: b("agentsPage.remove", "Remove"),
@@ -766,6 +770,6 @@ function at() {
766
770
  });
767
771
  }
768
772
  //#endregion
769
- export { at as AgentsPage };
773
+ export { ot as AgentsPage };
770
774
 
771
775
  //# sourceMappingURL=AgentsPage.js.map