@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
@@ -1,7 +1,7 @@
1
- import { useCreateTargetMutation as e, useDeleteTargetMutation as t, useGetInstallAgentJobStatusLazyQuery as n, useInstallAgentOnTargetMutation as r, useListTargetsQuery as ee, useStartTerminalMutation as i, useTestTargetMutation as a, useUninstallAgentFromTargetMutation as te, useUpdateTargetMutation as o } from "../generated/wspace-operations.js";
2
- import { useTr as ne } from "../shared/hooks/useTr.js";
3
- import { ConfirmDialog as re } from "../components/shared/ConfirmDialog.js";
4
- import { getQuotaDialogContent as ie, isQuotaExhaustedError as ae, markQuotaHandledLocally as oe } from "../utils/quotaUtils.js";
1
+ import { useCreateTargetMutation as e, useDeleteTargetMutation as t, useGetInstallAgentJobStatusLazyQuery as n, useInstallAgentOnTargetMutation as r, useListTargetsQuery as ee, useStartTerminalMutation as i, useTestTargetMutation as te, useUninstallAgentFromTargetMutation as ne, useUpdateTargetMutation as re } from "../generated/wspace-operations.js";
2
+ import { useTr as ie } from "../shared/hooks/useTr.js";
3
+ import { ConfirmDialog as ae } from "../components/shared/ConfirmDialog.js";
4
+ import { getQuotaDialogContent as oe, isQuotaExhaustedError as a, markQuotaHandledLocally as o } from "../utils/quotaUtils.js";
5
5
  import { useVibeControls as se, useVibeNavigate as ce } from "../providers/VibeControlsProvider.js";
6
6
  import le from "../hooks/useCachedInitialData.js";
7
7
  import { PageHeader as ue } from "../components/shared/PageHeader.js";
@@ -19,18 +19,19 @@ import { ActionMenu as xe } from "../components/shared/ActionMenu.js";
19
19
  import { useField as Se } from "../shared/hooks/useField.js";
20
20
  import "../components/shared/index.js";
21
21
  import { isNative as Ce, nativeNotify as we } from "../utils/nativeBridge.js";
22
- import { VIBE_PERMISSIONS as Te } from "../constants/permissions.js";
23
- import { PageSkeleton as Ee } from "../components/shared/PageSkeleton.js";
24
- import { notify as De } from "../lib/toast.js";
25
- import { TargetCard as Oe } from "../components/targets/TargetCard.js";
22
+ import { VIBE_PERMISSIONS as s } from "../constants/permissions.js";
23
+ import { PageSkeleton as Te } from "../components/shared/PageSkeleton.js";
24
+ import { notify as Ee } from "../lib/toast.js";
25
+ import { TargetCard as De } from "../components/targets/TargetCard.js";
26
26
  import "../components/targets/index.js";
27
- import { useCallback as s, useEffect as ke, useId as Ae, useMemo as c, useState as l } from "react";
28
- import { Check as je, CheckCircle as Me, CheckSquare as Ne, Grid as Pe, List as Fe, Loader2 as Ie, Pencil as Le, Plus as Re, RefreshCw as ze, Server as Be, Trash2 as Ve, XCircle as He, XSquare as Ue } from "lucide-react";
29
- import { useSearchParams as We } from "react-router-dom";
30
- import { usePermissions as Ge } from "@burdenoff/fe-libs/shared/providers/shell";
31
- import { AnimatePresence as Ke } from "framer-motion";
32
- import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
33
- import { Button as p, Checkbox as qe, Input as m, 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";
27
+ import { useCallback as c, useEffect as Oe, useId as ke, useMemo as l, useState as u } from "react";
28
+ import { Check as Ae, CheckCircle as je, CheckSquare as Me, Grid as Ne, List as Pe, Loader2 as Fe, Pencil as Ie, Plus as Le, RefreshCw as Re, Server as ze, Trash2 as Be, XCircle as Ve, XSquare as He } from "lucide-react";
29
+ import { useSearchParams as Ue } from "react-router-dom";
30
+ import { usePermissions as We } from "@burdenoff/fe-libs/shared/providers/shell";
31
+ import { AnimatePresence as Ge } from "framer-motion";
32
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
33
+ import { Button as m, Checkbox as Ke, Input as h, 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";
34
+ import { PermissionButton as et } from "@burdenoff/fe-libs/shared/components";
34
35
  import { MotionItem as tt, MotionList as nt, MotionPage as rt } from "@burdenoff/fe-libs/shared/motion";
35
36
  //#region src/pages/TargetsPage.tsx
36
37
  function it(e) {
@@ -61,50 +62,50 @@ var at = {
61
62
  function lt(e) {
62
63
  return e.agents.length > 0;
63
64
  }
64
- function h({ label: e, value: t, onChange: n, type: r = "text", placeholder: ee, hint: i, requiredField: a = !1, autoComplete: te }) {
65
- let o = Se({ hint: i ?? null });
66
- return /* @__PURE__ */ f("div", { children: [
67
- /* @__PURE__ */ d("label", {
68
- htmlFor: o.id,
65
+ function g({ label: e, value: t, onChange: n, type: r = "text", placeholder: ee, hint: i, requiredField: te = !1, autoComplete: ne }) {
66
+ let re = Se({ hint: i ?? null });
67
+ return /* @__PURE__ */ p("div", { children: [
68
+ /* @__PURE__ */ f("label", {
69
+ htmlFor: re.id,
69
70
  className: "mb-1.5 block text-sm font-medium text-text-primary",
70
71
  children: e
71
72
  }),
72
- /* @__PURE__ */ d(m, {
73
- ...o.inputProps,
73
+ /* @__PURE__ */ f(h, {
74
+ ...re.inputProps,
74
75
  type: r,
75
76
  value: t,
76
77
  onChange: (e) => n(e.target.value),
77
78
  placeholder: ee,
78
- "aria-required": a || void 0,
79
- autoComplete: te,
79
+ "aria-required": te || void 0,
80
+ autoComplete: ne,
80
81
  className: "text-base md:text-sm"
81
82
  }),
82
- i ? /* @__PURE__ */ d("p", {
83
- id: o.hintId,
83
+ i ? /* @__PURE__ */ f("p", {
84
+ id: re.hintId,
84
85
  className: "mt-1.5 text-xs text-text-muted",
85
86
  children: i
86
87
  }) : null
87
88
  ] });
88
89
  }
89
- function ut({ legend: e, name: t, value: n, onChange: r, passwordLabel: ee, keyLabel: i, hint: a }) {
90
- return /* @__PURE__ */ f("fieldset", { children: [
91
- /* @__PURE__ */ d("legend", {
90
+ function ut({ legend: e, name: t, value: n, onChange: r, passwordLabel: ee, keyLabel: i, hint: te }) {
91
+ return /* @__PURE__ */ p("fieldset", { children: [
92
+ /* @__PURE__ */ f("legend", {
92
93
  className: "text-sm font-medium text-text-primary",
93
94
  children: e
94
95
  }),
95
- /* @__PURE__ */ f("div", {
96
+ /* @__PURE__ */ p("div", {
96
97
  className: "mt-1.5 flex flex-wrap gap-x-4 gap-y-2",
97
- children: [/* @__PURE__ */ f("label", {
98
+ children: [/* @__PURE__ */ p("label", {
98
99
  className: "flex min-h-9 cursor-pointer items-center gap-2 text-sm text-text-primary",
99
- children: [/* @__PURE__ */ d("input", {
100
+ children: [/* @__PURE__ */ f("input", {
100
101
  type: "radio",
101
102
  name: t,
102
103
  checked: n === "password",
103
104
  onChange: () => r("password")
104
105
  }), ee]
105
- }), /* @__PURE__ */ f("label", {
106
+ }), /* @__PURE__ */ p("label", {
106
107
  className: "flex min-h-9 cursor-pointer items-center gap-2 text-sm text-text-primary",
107
- children: [/* @__PURE__ */ d("input", {
108
+ children: [/* @__PURE__ */ f("input", {
108
109
  type: "radio",
109
110
  name: t,
110
111
  checked: n === "key",
@@ -112,25 +113,25 @@ function ut({ legend: e, name: t, value: n, onChange: r, passwordLabel: ee, keyL
112
113
  }), i]
113
114
  })]
114
115
  }),
115
- a ? /* @__PURE__ */ d("p", {
116
+ te ? /* @__PURE__ */ f("p", {
116
117
  className: "mt-1 text-xs text-text-muted",
117
- children: a
118
+ children: te
118
119
  }) : null
119
120
  ] });
120
121
  }
121
- function g() {
122
- let m = ne(), { workspaceId: g } = se(), _ = ce(), { hasPermission: dt, isLoading: ft } = Ge(), [pt] = We(), v = pt.get("selectedTargetId"), mt = Ae(), [y, ht] = l(""), [b, gt] = l(null), [x, _t] = l("all"), [S, vt] = l("all"), [C, yt] = l("grid"), [bt, w] = l(!1), [T, E] = l(null), [xt, St] = l(!1), [D, O] = l(/* @__PURE__ */ new Set()), [Ct, k] = l(null), [A, wt] = l(null), [j, Tt] = l(null), [Et, Dt] = l(null), [M, N] = l(null), [P, Ot] = l(!1), [kt, F] = l(null), [At, jt] = l(""), [Mt, Nt] = l(""), [Pt, Ft] = l(""), [It, Lt] = l(22), [Rt, zt] = l(""), [I, Bt] = l("key"), [Vt, Ht] = l(""), [L, Ut] = l(""), [R, Wt] = l(""), [z, Gt] = l("DIRECT"), [B, Kt] = l(""), [V, qt] = l(""), [H, Jt] = l(""), [U, Yt] = l(""), [Xt, Zt] = l(22), [W, Qt] = l(""), [G, $t] = l("key"), [en, tn] = l(""), [nn, rn] = l(""), [an, on] = l(""), [K, sn] = l(""), { data: cn, loading: q, refetch: J } = ee({
122
+ function _() {
123
+ let h = ie(), { workspaceId: _ } = se(), v = ce(), { hasPermission: dt, isLoading: ft } = We(), [pt] = Ue(), y = pt.get("selectedTargetId"), mt = ke(), [b, ht] = u(""), [x, gt] = u(null), [S, _t] = u("all"), [C, vt] = u("all"), [w, yt] = u("grid"), [bt, T] = u(!1), [E, D] = u(null), [xt, St] = u(!1), [O, k] = u(/* @__PURE__ */ new Set()), [Ct, A] = u(null), [j, wt] = u(null), [M, Tt] = u(null), [Et, Dt] = u(null), [N, Ot] = u(null), [P, kt] = u(!1), [At, F] = u(null), [I, jt] = u(""), [Mt, Nt] = u(""), [Pt, Ft] = u(""), [It, Lt] = u(22), [Rt, zt] = u(""), [L, Bt] = u("key"), [R, Vt] = u(""), [z, Ht] = u(""), [B, Ut] = u(""), [V, Wt] = u("DIRECT"), [H, Gt] = u(""), [U, Kt] = u(""), [W, qt] = u(""), [Jt, Yt] = u(""), [Xt, Zt] = u(22), [Qt, $t] = u(""), [G, en] = u("key"), [tn, nn] = u(""), [rn, an] = u(""), [on, sn] = u(""), [cn, ln] = u(""), { data: un, loading: K, refetch: q } = ee({
123
124
  variables: {
124
- workspaceId: g || "",
125
+ workspaceId: _ || "",
125
126
  limit: 50,
126
127
  offset: 0
127
128
  },
128
- skip: !g,
129
+ skip: !_,
129
130
  fetchPolicy: "cache-first"
130
- }), { agents: ln, refetch: Y } = le(), [un] = e({
131
+ }), { agents: dn, refetch: J } = le(), [fn] = e({
131
132
  refetchQueries: ["VibeControlsInitialData", "ListTargets"],
132
133
  awaitRefetchQueries: !0
133
- }), { setDraftTagIds: dn, flushTags: fn } = me("VIBECONTROLS_TARGET"), [pn] = o(), [mn] = a(), [hn] = i(), [gn] = t(), [_n] = r(), [vn] = te(), [yn] = n({ fetchPolicy: "network-only" }), X = c(() => (cn?.targets?.items ?? []).map((e) => ({
134
+ }), { setDraftTagIds: pn, flushTags: mn } = me("VIBECONTROLS_TARGET"), [hn] = re(), [gn] = te(), [_n] = i(), [vn] = t(), [yn] = r(), [bn] = ne(), [xn] = n({ fetchPolicy: "network-only" }), Y = l(() => (un?.targets?.items ?? []).map((e) => ({
134
135
  id: e.id,
135
136
  type: e.type || "DIRECT",
136
137
  name: e.name,
@@ -149,42 +150,42 @@ function g() {
149
150
  version: e.version,
150
151
  isActive: e.isActive
151
152
  }))
152
- })), [cn]), Z = c(() => ln.map((e) => ({
153
+ })), [un]), X = l(() => dn.map((e) => ({
153
154
  id: e.id,
154
155
  name: e.name,
155
156
  isActive: e.isActive,
156
157
  tunnelUrl: e.tunnelUrl ?? null,
157
158
  agentApiKey: null
158
- })), [ln]), Q = c(() => {
159
- let e = X;
160
- if (y) {
161
- let t = y.toLowerCase();
159
+ })), [dn]), Z = l(() => {
160
+ let e = Y;
161
+ if (b) {
162
+ let t = b.toLowerCase();
162
163
  e = e.filter((e) => e.name.toLowerCase().includes(t) || e.host?.toLowerCase().includes(t) || e.label?.toLowerCase().includes(t));
163
164
  }
164
- return b && (e = e.filter((e) => e.agents.some((e) => e.id === b))), x !== "all" && (e = e.filter((e) => e.type === x)), S !== "all" && (e = e.filter((e) => e.status === S)), e;
165
+ return x && (e = e.filter((e) => e.agents.some((e) => e.id === x))), S !== "all" && (e = e.filter((e) => e.type === S)), C !== "all" && (e = e.filter((e) => e.status === C)), e;
165
166
  }, [
166
- X,
167
- y,
167
+ Y,
168
168
  b,
169
169
  x,
170
- S
170
+ S,
171
+ C
171
172
  ]);
172
- ke(() => {
173
- if (!v || !Q.find((e) => e.id === v)) return;
173
+ Oe(() => {
174
+ if (!y || !Z.find((e) => e.id === y)) return;
174
175
  let e = window.setTimeout(() => {
175
- document.getElementById(`target-row-${v}`)?.scrollIntoView({
176
+ document.getElementById(`target-row-${y}`)?.scrollIntoView({
176
177
  behavior: "smooth",
177
178
  block: "center"
178
179
  });
179
180
  }, 150);
180
181
  return () => window.clearTimeout(e);
181
- }, [Q, v]);
182
- let bn = X.filter((e) => e.status === "connected").length, xn = Q.length > 0 && Q.every((e) => D.has(e.id)), Sn = D.size > 0;
183
- ke(() => {
184
- if (!Et || !A) return;
182
+ }, [Z, y]);
183
+ let Sn = Y.filter((e) => e.status === "connected").length, Cn = Z.length > 0 && Z.every((e) => O.has(e.id)), wn = O.size > 0;
184
+ Oe(() => {
185
+ if (!Et || !j) return;
185
186
  let e = !1, t = () => {
186
- yn({ variables: {
187
- targetId: A.id,
187
+ xn({ variables: {
188
+ targetId: j.id,
188
189
  jobId: Et
189
190
  } }).then((t) => {
190
191
  if (e) return;
@@ -196,7 +197,7 @@ function g() {
196
197
  steps: n.steps ?? [],
197
198
  result: n.result ?? void 0,
198
199
  error: n.error ?? void 0
199
- }), (n.status === "completed" || n.status === "failed") && n.status === "completed" && (J(), Y()));
200
+ }), (n.status === "completed" || n.status === "failed") && n.status === "completed" && (q(), J()));
200
201
  }).catch(() => {});
201
202
  };
202
203
  t();
@@ -206,339 +207,339 @@ function g() {
206
207
  };
207
208
  }, [
208
209
  Et,
209
- A,
210
- yn,
211
- Y,
212
- J
210
+ j,
211
+ xn,
212
+ J,
213
+ q
213
214
  ]);
214
- let Cn = s(async () => {
215
- if (!(!B || !g) && !(z !== "DIRECT" && (!H || !U || !W))) try {
216
- let e = await un({ variables: {
217
- workspaceId: g,
215
+ let Tn = c(async () => {
216
+ if (!(!H || !_) && !(V !== "DIRECT" && (!W || !Jt || !Qt))) try {
217
+ let e = await fn({ variables: {
218
+ workspaceId: _,
218
219
  input: {
219
- type: z,
220
- name: B,
221
- sourceAgentId: z === "DIRECT" ? void 0 : H,
222
- host: z === "DIRECT" ? void 0 : U,
223
- port: z === "DIRECT" ? void 0 : Xt,
224
- username: z === "DIRECT" ? void 0 : W,
225
- password: z === "SSH" && G === "password" ? en : void 0,
226
- privateKeyPath: z === "SSH" && G === "key" ? nn : void 0,
227
- label: an || void 0,
228
- tags: K ? K.split(",").map((e) => e.trim()) : void 0,
229
- metadata: V ? { description: V } : void 0
220
+ type: V,
221
+ name: H,
222
+ sourceAgentId: V === "DIRECT" ? void 0 : W,
223
+ host: V === "DIRECT" ? void 0 : Jt,
224
+ port: V === "DIRECT" ? void 0 : Xt,
225
+ username: V === "DIRECT" ? void 0 : Qt,
226
+ password: V === "SSH" && G === "password" ? tn : void 0,
227
+ privateKeyPath: V === "SSH" && G === "key" ? rn : void 0,
228
+ label: on || void 0,
229
+ tags: cn ? cn.split(",").map((e) => e.trim()) : void 0,
230
+ metadata: U ? { description: U } : void 0
230
231
  }
231
232
  } });
232
233
  if (e.error) {
233
- if (ae(e.error)) {
234
- w(!1), oe(), k("target");
234
+ if (a(e.error)) {
235
+ T(!1), o(), A("target");
235
236
  return;
236
237
  }
237
- De.error(m("targets.createFailed", "Failed to create target"), e.error.message || void 0);
238
+ Ee.error(h("targets.createFailed", "Failed to create target"), e.error.message || void 0);
238
239
  return;
239
240
  }
240
241
  let t = e.data?.createTarget?.id;
241
- w(!1), Kt(""), Yt(""), Qt(""), tn(""), rn(""), on(""), sn(""), t && await fn(t), J(), Y();
242
+ T(!1), Gt(""), Yt(""), $t(""), nn(""), an(""), sn(""), ln(""), t && await mn(t), q(), J();
242
243
  } catch (e) {
243
- if (ae(e)) {
244
- w(!1), oe(), k("target");
244
+ if (a(e)) {
245
+ T(!1), o(), A("target");
245
246
  return;
246
247
  }
247
- De.error(m("targets.createFailed", "Failed to create target"), e instanceof Error ? e.message : void 0);
248
+ Ee.error(h("targets.createFailed", "Failed to create target"), e instanceof Error ? e.message : void 0);
248
249
  }
249
250
  }, [
250
- B,
251
251
  H,
252
- U,
253
- Xt,
254
252
  W,
253
+ Jt,
254
+ Xt,
255
+ Qt,
255
256
  G,
256
- en,
257
- nn,
258
- an,
259
- K,
257
+ tn,
258
+ rn,
259
+ on,
260
+ cn,
261
+ U,
260
262
  V,
261
- z,
262
- g,
263
- un,
263
+ _,
264
264
  fn,
265
- Y,
265
+ mn,
266
266
  J,
267
- m
268
- ]), wn = s(async (e) => {
269
- let t = (await mn({ variables: { id: e } })).data?.testTarget;
270
- t && (t.success ? De.success(m("targets.connectionSuccessful", "Connection successful"), t.message || void 0) : De.error(m("targets.connectionFailed", "Connection failed"), t.message || void 0), J(), Y());
267
+ q,
268
+ h
269
+ ]), En = c(async (e) => {
270
+ let t = (await gn({ variables: { id: e } })).data?.testTarget;
271
+ t && (t.success ? Ee.success(h("targets.connectionSuccessful", "Connection successful"), t.message || void 0) : Ee.error(h("targets.connectionFailed", "Connection failed"), t.message || void 0), q(), J());
271
272
  }, [
272
- mn,
273
- Y,
273
+ gn,
274
274
  J,
275
- m
276
- ]), [Tn, En] = l(/* @__PURE__ */ new Set()), Dn = s(async (e) => {
277
- En((t) => {
275
+ q,
276
+ h
277
+ ]), [Q, Dn] = u(/* @__PURE__ */ new Set()), On = c(async (e) => {
278
+ Dn((t) => {
278
279
  let n = new Set(t);
279
280
  return n.add(e), n;
280
281
  });
281
282
  try {
282
- let t = await hn({ variables: { targetId: e } });
283
- if (t.error && ae(t.error)) {
284
- oe(), k("environment");
283
+ let t = await _n({ variables: { targetId: e } });
284
+ if (t.error && a(t.error)) {
285
+ o(), A("environment");
285
286
  return;
286
287
  }
287
288
  let n = t.data?.startTerminal;
288
- n?.sessionId && _(`/sessions/${n.sessionId}`);
289
+ n?.sessionId && v(`/sessions/${n.sessionId}`);
289
290
  } catch (e) {
290
- if (ae(e)) {
291
- oe(), k("environment");
291
+ if (a(e)) {
292
+ o(), A("environment");
292
293
  return;
293
294
  }
294
295
  throw e;
295
296
  } finally {
296
- En((t) => {
297
+ Dn((t) => {
297
298
  if (!t.has(e)) return t;
298
299
  let n = new Set(t);
299
300
  return n.delete(e), n;
300
301
  });
301
302
  }
302
- }, [hn, _]), On = s(async () => {
303
- if (T) {
303
+ }, [_n, v]), kn = c(async () => {
304
+ if (E) {
304
305
  try {
305
- await gn({ variables: { id: T } }), Ce() && we("success");
306
+ await vn({ variables: { id: E } }), Ce() && we("success");
306
307
  } catch (e) {
307
308
  throw Ce() && we("error"), e;
308
309
  }
309
- E(null), O((e) => {
310
+ D(null), k((e) => {
310
311
  let t = new Set(e);
311
- return t.delete(T), t;
312
- }), J(), Y();
312
+ return t.delete(E), t;
313
+ }), q(), J();
313
314
  }
314
315
  }, [
315
- T,
316
- gn,
317
- Y,
318
- J
319
- ]), kn = s(async () => {
320
- let e = Array.from(D);
321
- await Promise.all(e.map((e) => gn({ variables: { id: e } }))), O(/* @__PURE__ */ new Set()), St(!1), J(), Y();
316
+ E,
317
+ vn,
318
+ J,
319
+ q
320
+ ]), An = c(async () => {
321
+ let e = Array.from(O);
322
+ await Promise.all(e.map((e) => vn({ variables: { id: e } }))), k(/* @__PURE__ */ new Set()), St(!1), q(), J();
322
323
  }, [
323
- D,
324
- gn,
325
- Y,
326
- J
327
- ]), An = s(async (e) => {
324
+ O,
325
+ vn,
326
+ J,
327
+ q
328
+ ]), jn = c(async (e) => {
328
329
  wt(e), Tt(null), Dt(null);
329
- let t = Z.find((e) => e.isActive);
330
+ let t = X.find((e) => e.isActive);
330
331
  if (!t) return;
331
- let n = (await _n({ variables: {
332
+ let n = (await yn({ variables: {
332
333
  targetId: e.id,
333
334
  sourceAgentId: t.id
334
335
  } })).data?.installAgentOnTarget;
335
336
  n?.jobId && Dt(n.jobId);
336
- }, [_n, Z]), jn = s(async (e) => {
337
- await vn({ variables: { targetId: e.id } }), J(), Y();
337
+ }, [yn, X]), Mn = c(async (e) => {
338
+ await bn({ variables: { targetId: e.id } }), q(), J();
338
339
  }, [
339
- vn,
340
- Y,
341
- J
342
- ]), Mn = s((e) => {
343
- N(e), jt(e.name), Nt(e.label ?? ""), Ft(e.host ?? ""), Lt(e.port ?? 22), zt(e.username ?? ""), Bt("key"), Ht(""), Ut(""), Wt(e.tags.join(", ")), F(null);
344
- }, []), Nn = s(async () => {
345
- if (M) {
346
- if (!At.trim()) {
340
+ bn,
341
+ J,
342
+ q
343
+ ]), Nn = c((e) => {
344
+ Ot(e), jt(e.name), Nt(e.label ?? ""), Ft(e.host ?? ""), Lt(e.port ?? 22), zt(e.username ?? ""), Bt("key"), Vt(""), Ht(""), Ut(e.tags.join(", ")), F(null);
345
+ }, []), Pn = c(async () => {
346
+ if (N) {
347
+ if (!I.trim()) {
347
348
  F("Name is required");
348
349
  return;
349
350
  }
350
- Ot(!0), F(null);
351
+ kt(!0), F(null);
351
352
  try {
352
- let e = await pn({ variables: {
353
- id: M.id,
353
+ let e = await hn({ variables: {
354
+ id: N.id,
354
355
  input: {
355
- name: At.trim(),
356
+ name: I.trim(),
356
357
  label: Mt.trim() || null,
357
358
  host: Pt.trim() || void 0,
358
359
  port: It || void 0,
359
360
  username: Rt.trim() || void 0,
360
- password: M.type === "SSH" && I === "password" && Vt ? Vt : void 0,
361
- privateKeyPath: M.type === "SSH" && I === "key" && L ? L : void 0,
362
- tags: R ? R.split(",").map((e) => e.trim()).filter(Boolean) : []
361
+ password: N.type === "SSH" && L === "password" && R ? R : void 0,
362
+ privateKeyPath: N.type === "SSH" && L === "key" && z ? z : void 0,
363
+ tags: B ? B.split(",").map((e) => e.trim()).filter(Boolean) : []
363
364
  }
364
365
  } });
365
366
  if (e.error) {
366
367
  F(e.error.message || "Failed to update target");
367
368
  return;
368
369
  }
369
- N(null), J(), Y();
370
+ Ot(null), q(), J();
370
371
  } catch (e) {
371
372
  F(e instanceof Error ? e.message : "Failed to update target");
372
373
  } finally {
373
- Ot(!1);
374
+ kt(!1);
374
375
  }
375
376
  }
376
377
  }, [
377
- M,
378
- At,
378
+ N,
379
+ I,
379
380
  Mt,
380
381
  Pt,
381
382
  It,
382
383
  Rt,
383
- I,
384
- Vt,
385
384
  L,
386
385
  R,
387
- pn,
388
- Y,
389
- J
390
- ]), Pn = s(() => {
386
+ z,
387
+ B,
388
+ hn,
389
+ J,
390
+ q
391
+ ]), Fn = c(() => {
391
392
  wt(null), Tt(null), Dt(null);
392
- }, []), Fn = s(() => {
393
- O(xn ? (e) => {
393
+ }, []), In = c(() => {
394
+ k(Cn ? (e) => {
394
395
  let t = new Set(e);
395
- return Q.forEach((e) => t.delete(e.id)), t;
396
+ return Z.forEach((e) => t.delete(e.id)), t;
396
397
  } : (e) => {
397
398
  let t = new Set(e);
398
- return Q.forEach((e) => t.add(e.id)), t;
399
+ return Z.forEach((e) => t.add(e.id)), t;
399
400
  });
400
- }, [xn, Q]), In = s((e) => {
401
- O((t) => {
401
+ }, [Cn, Z]), Ln = c((e) => {
402
+ k((t) => {
402
403
  let n = new Set(t);
403
404
  return n.has(e) ? n.delete(e) : n.add(e), n;
404
405
  });
405
- }, []), Ln = {
406
- total: X.length,
407
- connected: bn
408
- }, Rn = c(() => [
406
+ }, []), Rn = {
407
+ total: Y.length,
408
+ connected: Sn
409
+ }, zn = l(() => [
409
410
  {
410
411
  value: "all",
411
- label: m("targets.filterTypeAll", "All Types")
412
+ label: h("targets.filterTypeAll", "All Types")
412
413
  },
413
414
  {
414
415
  value: "DIRECT",
415
- label: m("targets.typeDirect", "Direct")
416
+ label: h("targets.typeDirect", "Direct")
416
417
  },
417
418
  {
418
419
  value: "SSH",
419
420
  label: "SSH"
420
421
  }
421
- ], [m]), zn = c(() => [
422
+ ], [h]), Bn = l(() => [
422
423
  {
423
424
  value: "all",
424
- label: m("targets.filterStatusAll", "All Statuses")
425
+ label: h("targets.filterStatusAll", "All Statuses")
425
426
  },
426
427
  {
427
428
  value: "connected",
428
- label: m("targets.connected", "Connected")
429
+ label: h("targets.connected", "Connected")
429
430
  },
430
431
  {
431
432
  value: "disconnected",
432
- label: m("targets.disconnected", "Disconnected")
433
+ label: h("targets.disconnected", "Disconnected")
433
434
  },
434
435
  {
435
436
  value: "unknown",
436
- label: m("targets.unknown", "Unknown")
437
+ label: h("targets.unknown", "Unknown")
437
438
  }
438
- ], [m]), $ = y || b || x !== "all" || S !== "all", Bn = `${m("targets.agentConnectionHintPrefix", "The agent that will establish the")} ${z} ${m("targets.agentConnectionHintSuffix", "connection to this target.")}`, Vn = Se({ hint: Bn }), Hn = `${mt}-add-type-label`;
439
- return ft ? /* @__PURE__ */ d(de, { message: m("targets.loadingPermissions", "Loading permissions…") }) : dt(Te.TARGET_LIST) ? /* @__PURE__ */ f(rt, {
439
+ ], [h]), $ = b || x || S !== "all" || C !== "all", Vn = `${h("targets.agentConnectionHintPrefix", "The agent that will establish the")} ${V} ${h("targets.agentConnectionHintSuffix", "connection to this target.")}`, Hn = Se({ hint: Vn }), Un = `${mt}-add-type-label`;
440
+ return ft ? /* @__PURE__ */ f(de, { message: h("targets.loadingPermissions", "Loading permissions…") }) : dt(s.TARGET_LIST) ? /* @__PURE__ */ p(rt, {
440
441
  className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-full",
441
442
  children: [
442
- /* @__PURE__ */ d(ue, {
443
- title: m("nav.targets", "Targets"),
444
- description: m("targets.onlineSummary", "{{connected}} of {{total}} targets online", {
445
- connected: Ln.connected,
446
- total: Ln.total
443
+ /* @__PURE__ */ f(ue, {
444
+ title: h("nav.targets", "Targets"),
445
+ description: h("targets.onlineSummary", "{{connected}} of {{total}} targets online", {
446
+ connected: Rn.connected,
447
+ total: Rn.total
447
448
  }),
448
- actions: /* @__PURE__ */ f("div", {
449
+ actions: /* @__PURE__ */ p("div", {
449
450
  className: "flex flex-col sm:flex-row items-stretch sm:items-center gap-2",
450
- children: [/* @__PURE__ */ d(p, {
451
+ children: [/* @__PURE__ */ f(m, {
451
452
  type: "button",
452
453
  variant: "ghost",
453
454
  size: "icon",
454
- onClick: () => void J(),
455
- disabled: q,
456
- "aria-label": m("targets.refreshTitle", "Refresh targets"),
457
- title: m("targets.refreshTitle", "Refresh targets"),
455
+ onClick: () => void q(),
456
+ disabled: K,
457
+ "aria-label": h("targets.refreshTitle", "Refresh targets"),
458
+ title: h("targets.refreshTitle", "Refresh targets"),
458
459
  className: "max-md:min-h-11 max-md:min-w-11",
459
- children: /* @__PURE__ */ d(ze, {
460
- className: `size-4 ${q ? "animate-spin" : ""}`,
460
+ children: /* @__PURE__ */ f(Re, {
461
+ className: `size-4 ${K ? "animate-spin" : ""}`,
461
462
  "aria-hidden": "true"
462
463
  })
463
- }), /* @__PURE__ */ f(p, {
464
+ }), /* @__PURE__ */ p(m, {
464
465
  type: "button",
465
- onClick: () => w(!0),
466
+ onClick: () => T(!0),
466
467
  className: "max-md:min-h-11",
467
- children: [/* @__PURE__ */ d(Re, {
468
+ children: [/* @__PURE__ */ f(Le, {
468
469
  className: "size-4",
469
470
  "aria-hidden": "true"
470
- }), m("targets.addTarget", "Add Target")]
471
+ }), h("targets.addTarget", "Add Target")]
471
472
  })]
472
473
  })
473
474
  }),
474
- /* @__PURE__ */ d(Je, {
475
- icon: /* @__PURE__ */ d(Be, { className: "size-4" }),
476
- children: m("targets.purpose", "A target is a machine your agents can reach and run work on — your laptop, a remote SSH host, or a cloud box. Add a target here so that when you start a session it has somewhere concrete to execute. Targets keep your hosts, their connection details and online status in one list, separate from the agents that drive them.")
475
+ /* @__PURE__ */ f(qe, {
476
+ icon: /* @__PURE__ */ f(ze, { className: "size-4" }),
477
+ children: h("targets.purpose", "A target is a machine your agents can reach and run work on — your laptop, a remote SSH host, or a cloud box. Add a target here so that when you start a session it has somewhere concrete to execute. Targets keep your hosts, their connection details and online status in one list, separate from the agents that drive them.")
477
478
  }),
478
- Z.length === 0 && !q && /* @__PURE__ */ d(ve, {
479
+ X.length === 0 && !K && /* @__PURE__ */ f(ve, {
479
480
  variant: "full",
480
481
  dismissKey: "vibecontrols-targets-setup-banner"
481
482
  }),
482
- /* @__PURE__ */ f("div", {
483
+ /* @__PURE__ */ p("div", {
483
484
  className: "space-y-3",
484
- children: [/* @__PURE__ */ f("div", {
485
+ children: [/* @__PURE__ */ p("div", {
485
486
  className: "flex items-center gap-2",
486
- children: [/* @__PURE__ */ d(ge, {
487
- value: y,
487
+ children: [/* @__PURE__ */ f(ge, {
488
+ value: b,
488
489
  onChange: ht,
489
- placeholder: m("targets.searchPlaceholder", "Search targets..."),
490
+ placeholder: h("targets.searchPlaceholder", "Search targets..."),
490
491
  className: "flex-1 min-w-0 sm:w-64 sm:flex-none"
491
- }), /* @__PURE__ */ f("div", {
492
+ }), /* @__PURE__ */ p("div", {
492
493
  role: "group",
493
- "aria-label": m("targets.viewMode", "View mode"),
494
+ "aria-label": h("targets.viewMode", "View mode"),
494
495
  className: "flex items-center gap-1 bg-bg-sunken rounded-button p-1 flex-shrink-0 border border-border-subtle",
495
- children: [/* @__PURE__ */ d("button", {
496
+ children: [/* @__PURE__ */ f("button", {
496
497
  type: "button",
497
498
  onClick: () => yt("grid"),
498
- "aria-pressed": C === "grid",
499
- "aria-label": m("targets.gridViewTitle", "Grid view"),
500
- title: m("targets.gridViewTitle", "Grid view"),
501
- className: `flex size-8 max-md:size-9 items-center justify-center rounded transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus ${C === "grid" ? "bg-[var(--color-accent-soft)] text-text-primary" : "text-text-secondary hover:bg-bg-surface/60"}`,
502
- children: /* @__PURE__ */ d(Pe, {
499
+ "aria-pressed": w === "grid",
500
+ "aria-label": h("targets.gridViewTitle", "Grid view"),
501
+ title: h("targets.gridViewTitle", "Grid view"),
502
+ className: `flex size-8 max-md:size-9 items-center justify-center rounded transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus ${w === "grid" ? "bg-[var(--color-accent-soft)] text-text-primary" : "text-text-secondary hover:bg-bg-surface/60"}`,
503
+ children: /* @__PURE__ */ f(Ne, {
503
504
  className: "size-4 text-text-secondary",
504
505
  "aria-hidden": "true"
505
506
  })
506
- }), /* @__PURE__ */ d("button", {
507
+ }), /* @__PURE__ */ f("button", {
507
508
  type: "button",
508
509
  onClick: () => yt("list"),
509
- "aria-pressed": C === "list",
510
- "aria-label": m("targets.listViewTitle", "List view"),
511
- title: m("targets.listViewTitle", "List view"),
512
- className: `flex size-8 max-md:size-9 items-center justify-center rounded transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus ${C === "list" ? "bg-[var(--color-accent-soft)] text-text-primary" : "text-text-secondary hover:bg-bg-surface/60"}`,
513
- children: /* @__PURE__ */ d(Fe, {
510
+ "aria-pressed": w === "list",
511
+ "aria-label": h("targets.listViewTitle", "List view"),
512
+ title: h("targets.listViewTitle", "List view"),
513
+ className: `flex size-8 max-md:size-9 items-center justify-center rounded transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus ${w === "list" ? "bg-[var(--color-accent-soft)] text-text-primary" : "text-text-secondary hover:bg-bg-surface/60"}`,
514
+ children: /* @__PURE__ */ f(Pe, {
514
515
  className: "size-4 text-text-secondary",
515
516
  "aria-hidden": "true"
516
517
  })
517
518
  })]
518
519
  })]
519
- }), /* @__PURE__ */ f("div", {
520
+ }), /* @__PURE__ */ p("div", {
520
521
  className: "flex items-center gap-2 sm:gap-3 flex-wrap",
521
522
  children: [
522
- /* @__PURE__ */ d(_e, {
523
- label: m("sessions.filterType", "Type"),
524
- value: x,
525
- options: Rn,
526
- onChange: _t
527
- }),
528
- /* @__PURE__ */ d(_e, {
529
- label: m("sessions.filterStatus", "Status"),
523
+ /* @__PURE__ */ f(_e, {
524
+ label: h("sessions.filterType", "Type"),
530
525
  value: S,
531
526
  options: zn,
527
+ onChange: _t
528
+ }),
529
+ /* @__PURE__ */ f(_e, {
530
+ label: h("sessions.filterStatus", "Status"),
531
+ value: C,
532
+ options: Bn,
532
533
  onChange: vt
533
534
  }),
534
- /* @__PURE__ */ d(be, {
535
- value: b ?? "",
535
+ /* @__PURE__ */ f(be, {
536
+ value: x ?? "",
536
537
  onChange: (e) => gt(e || null),
537
- options: Z.map((e) => ({
538
+ options: X.map((e) => ({
538
539
  value: e.id,
539
540
  label: e.name
540
541
  })),
541
- placeholder: m("targets.allAgents", "All agents"),
542
+ placeholder: h("targets.allAgents", "All agents"),
542
543
  className: "w-full sm:min-w-[180px] sm:w-auto",
543
544
  dropdownAlign: "left",
544
545
  clearable: !0
@@ -546,193 +547,197 @@ function g() {
546
547
  ]
547
548
  })]
548
549
  }),
549
- Q.length > 0 && /* @__PURE__ */ d("div", {
550
+ Z.length > 0 && /* @__PURE__ */ f("div", {
550
551
  className: "flex items-center gap-2 flex-wrap",
551
- children: /* @__PURE__ */ d("div", {
552
+ children: /* @__PURE__ */ f("div", {
552
553
  className: "ml-auto flex items-center gap-2",
553
- children: /* @__PURE__ */ f("button", {
554
+ children: /* @__PURE__ */ p("button", {
554
555
  type: "button",
555
- onClick: Fn,
556
+ onClick: In,
556
557
  className: "flex min-h-9 items-center gap-1.5 px-3 py-1.5 text-xs text-text-secondary hover:text-text-primary transition-colors rounded-button focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
557
- children: [/* @__PURE__ */ d(Ne, {
558
+ children: [/* @__PURE__ */ f(Me, {
558
559
  className: "size-3.5",
559
560
  "aria-hidden": "true"
560
- }), xn ? m("targets.deselectAll", "Deselect All") : m("targets.selectAll", "Select All")]
561
+ }), Cn ? h("targets.deselectAll", "Deselect All") : h("targets.selectAll", "Select All")]
561
562
  })
562
563
  })
563
564
  }),
564
- Sn && /* @__PURE__ */ f("div", {
565
+ wn && /* @__PURE__ */ p("div", {
565
566
  className: "flex flex-col sm:flex-row items-start sm:items-center gap-3 px-4 py-2 border border-action-primary-bg bg-action-primary-bg/5 rounded-card",
566
- children: [/* @__PURE__ */ f("span", {
567
+ children: [/* @__PURE__ */ p("span", {
567
568
  className: "text-sm font-medium text-text-primary",
568
569
  children: [
569
- D.size,
570
+ O.size,
570
571
  " ",
571
- m("nav.targets", "target"),
572
- D.size === 1 ? "" : "s",
572
+ h("nav.targets", "target"),
573
+ O.size === 1 ? "" : "s",
573
574
  " ",
574
- m("sessions.selected", "selected")
575
+ h("sessions.selected", "selected")
575
576
  ]
576
- }), /* @__PURE__ */ f("div", {
577
+ }), /* @__PURE__ */ p("div", {
577
578
  className: "flex items-center gap-1.5 sm:ml-auto",
578
- children: [/* @__PURE__ */ f("button", {
579
- type: "button",
580
- onClick: () => St(!0),
581
- className: "flex min-h-9 items-center gap-1.5 px-3 py-1.5 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 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
582
- children: [
583
- /* @__PURE__ */ d(Ve, {
584
- className: "size-3",
585
- "aria-hidden": "true"
586
- }),
587
- " ",
588
- m("common.delete", "Delete")
589
- ]
590
- }), /* @__PURE__ */ f("button", {
579
+ children: [/* @__PURE__ */ f(et, {
580
+ permission: s.TARGET_DELETE,
581
+ deniedBehavior: "hide",
582
+ children: /* @__PURE__ */ p("button", {
583
+ type: "button",
584
+ onClick: () => St(!0),
585
+ className: "flex min-h-9 items-center gap-1.5 px-3 py-1.5 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 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
586
+ children: [
587
+ /* @__PURE__ */ f(Be, {
588
+ className: "size-3",
589
+ "aria-hidden": "true"
590
+ }),
591
+ " ",
592
+ h("common.delete", "Delete")
593
+ ]
594
+ })
595
+ }), /* @__PURE__ */ p("button", {
591
596
  type: "button",
592
- onClick: () => O(/* @__PURE__ */ new Set()),
597
+ onClick: () => k(/* @__PURE__ */ new Set()),
593
598
  className: "flex min-h-9 items-center gap-1.5 px-3 py-1.5 text-xs text-text-secondary hover:text-text-primary transition-colors rounded-button focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
594
599
  children: [
595
- /* @__PURE__ */ d(Ue, {
600
+ /* @__PURE__ */ f(He, {
596
601
  className: "size-3",
597
602
  "aria-hidden": "true"
598
603
  }),
599
604
  " ",
600
- m("sessions.deselect", "Deselect")
605
+ h("sessions.deselect", "Deselect")
601
606
  ]
602
607
  })]
603
608
  })]
604
609
  }),
605
- $ ? /* @__PURE__ */ f("p", {
610
+ $ ? /* @__PURE__ */ p("p", {
606
611
  className: "text-sm text-text-secondary",
607
612
  role: "status",
608
- children: [m("targets.showingResults", "Showing {{filtered}} of {{total}} targets").replace("{{filtered}}", String(Q.length)).replace("{{total}}", String(X.length)), q && /* @__PURE__ */ f("span", {
613
+ children: [h("targets.showingResults", "Showing {{filtered}} of {{total}} targets").replace("{{filtered}}", String(Z.length)).replace("{{total}}", String(Y.length)), K && /* @__PURE__ */ p("span", {
609
614
  className: "ml-2 text-text-muted",
610
615
  children: [
611
616
  "(",
612
- m("sessions.refreshing", "refreshing..."),
617
+ h("sessions.refreshing", "refreshing..."),
613
618
  ")"
614
619
  ]
615
620
  })]
616
621
  }) : null,
617
- q && X.length === 0 ? /* @__PURE__ */ d(Ee, {
622
+ K && Y.length === 0 ? /* @__PURE__ */ f(Te, {
618
623
  variant: "rows",
619
624
  count: 6
620
- }) : Q.length > 0 ? /* @__PURE__ */ d(Ke, {
625
+ }) : Z.length > 0 ? /* @__PURE__ */ f(Ge, {
621
626
  mode: "wait",
622
- children: C === "grid" ? /* @__PURE__ */ d(nt, {
627
+ children: w === "grid" ? /* @__PURE__ */ f(nt, {
623
628
  stagger: .04,
624
629
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
625
- children: Q.map((e) => /* @__PURE__ */ d(tt, {
630
+ children: Z.map((e) => /* @__PURE__ */ f(tt, {
626
631
  className: "h-full",
627
- children: /* @__PURE__ */ d(Oe, {
632
+ children: /* @__PURE__ */ f(De, {
628
633
  target: e,
629
- onTest: (e) => void wn(e),
630
- onTerminal: (e) => void Dn(e),
631
- onOpenDetail: (e) => _(`/targets/${e}`),
632
- onEdit: (e) => Mn(e),
633
- onInstallAgent: (e) => void An(e),
634
- onUninstallAgent: (e) => void jn(e),
635
- onDelete: (e) => E(e),
636
- selected: D.has(e.id),
637
- onToggleSelect: () => In(e.id),
638
- highlighted: v === e.id,
639
- isStartingTerminal: Tn.has(e.id)
634
+ onTest: (e) => void En(e),
635
+ onTerminal: (e) => void On(e),
636
+ onOpenDetail: (e) => v(`/targets/${e}`),
637
+ onEdit: (e) => Nn(e),
638
+ onInstallAgent: (e) => void jn(e),
639
+ onUninstallAgent: (e) => void Mn(e),
640
+ onDelete: (e) => D(e),
641
+ selected: O.has(e.id),
642
+ onToggleSelect: () => Ln(e.id),
643
+ highlighted: y === e.id,
644
+ isStartingTerminal: Q.has(e.id)
640
645
  })
641
646
  }, e.id))
642
- }, "grid-view") : /* @__PURE__ */ d(nt, {
647
+ }, "grid-view") : /* @__PURE__ */ f(nt, {
643
648
  stagger: .04,
644
649
  className: "space-y-2",
645
- children: Q.map((e) => {
646
- let t = lt(e), n = v === e.id, r = [
650
+ children: Z.map((e) => {
651
+ let t = lt(e), n = y === e.id, r = [
647
652
  {
648
653
  key: "edit",
649
- label: m("common.edit", "Edit"),
650
- icon: Le,
651
- onSelect: () => Mn(e)
654
+ label: h("common.edit", "Edit"),
655
+ icon: Ie,
656
+ onSelect: () => Nn(e)
652
657
  },
653
- ...e.type !== "DIRECT" && t ? [{
658
+ ...e.type !== "DIRECT" && t && dt(s.TARGET_UPDATE) ? [{
654
659
  key: "uninstall",
655
- label: m("targets.uninstall", "Uninstall"),
656
- icon: He,
660
+ label: h("targets.uninstall", "Uninstall"),
661
+ icon: Ve,
657
662
  variant: "danger",
658
- onSelect: () => void jn(e)
663
+ onSelect: () => void Mn(e)
659
664
  }] : [],
660
- {
665
+ ...dt(s.TARGET_DELETE) ? [{
661
666
  key: "delete",
662
- label: m("common.delete", "Delete"),
663
- icon: Ve,
667
+ label: h("common.delete", "Delete"),
668
+ icon: Be,
664
669
  variant: "danger",
665
670
  separatorBefore: !0,
666
- onSelect: () => E(e.id)
667
- }
671
+ onSelect: () => D(e.id)
672
+ }] : []
668
673
  ];
669
- return /* @__PURE__ */ d(tt, {
674
+ return /* @__PURE__ */ f(tt, {
670
675
  variant: "fadeRight",
671
- children: /* @__PURE__ */ f("div", {
676
+ children: /* @__PURE__ */ p("div", {
672
677
  id: `target-row-${e.id}`,
673
678
  className: `p-4 rounded-card border transition-colors ${n ? "border-action-primary-bg bg-action-primary-bg/5" : "border-border-default hover:bg-bg-sunken/30"}`,
674
- children: [/* @__PURE__ */ f("div", {
679
+ children: [/* @__PURE__ */ p("div", {
675
680
  className: "flex items-start gap-3",
676
- children: [/* @__PURE__ */ d(qe, {
677
- checked: D.has(e.id),
678
- onCheckedChange: () => In(e.id),
679
- "aria-label": m("targets.selectTarget", "Select {{name}}", { name: e.name }),
681
+ children: [/* @__PURE__ */ f(Ke, {
682
+ checked: O.has(e.id),
683
+ onCheckedChange: () => Ln(e.id),
684
+ "aria-label": h("targets.selectTarget", "Select {{name}}", { name: e.name }),
680
685
  className: "mt-1"
681
- }), /* @__PURE__ */ f("div", {
686
+ }), /* @__PURE__ */ p("div", {
682
687
  className: "flex min-w-0 flex-1 flex-wrap items-start gap-2",
683
688
  children: [
684
- /* @__PURE__ */ d("span", {
689
+ /* @__PURE__ */ f("span", {
685
690
  className: `inline-flex items-center px-2 py-0.5 text-xs font-semibold rounded ${st[e.type]}`,
686
691
  children: e.type
687
692
  }),
688
- /* @__PURE__ */ d("span", {
693
+ /* @__PURE__ */ f("span", {
689
694
  className: `inline-flex items-center px-2 py-0.5 text-xs font-semibold rounded ${ct[e.status]}`,
690
- children: m(`targets.status.${e.status}`, ot[e.status].label)
695
+ children: h(`targets.status.${e.status}`, ot[e.status].label)
691
696
  }),
692
- /* @__PURE__ */ f("div", {
697
+ /* @__PURE__ */ p("div", {
693
698
  className: "min-w-0 basis-full",
694
699
  children: [
695
- /* @__PURE__ */ f("div", {
700
+ /* @__PURE__ */ p("div", {
696
701
  className: "flex items-center gap-2 flex-wrap",
697
702
  children: [
698
- /* @__PURE__ */ d("span", {
703
+ /* @__PURE__ */ f("span", {
699
704
  className: "font-medium text-text-primary",
700
705
  children: e.name
701
706
  }),
702
- e.label && /* @__PURE__ */ d("span", {
707
+ e.label && /* @__PURE__ */ f("span", {
703
708
  className: "text-text-secondary text-sm",
704
709
  children: e.label
705
710
  }),
706
- t && /* @__PURE__ */ f("span", {
711
+ t && /* @__PURE__ */ p("span", {
707
712
  className: "inline-flex items-center gap-1 rounded-full border border-status-success-border px-2 py-0.5 text-xs bg-status-success-bg-subtle text-status-success-text",
708
- children: [/* @__PURE__ */ d(Me, {
713
+ children: [/* @__PURE__ */ f(je, {
709
714
  className: "size-2.5",
710
715
  "aria-hidden": "true"
711
- }), m("targets.agentInstalled", "Agent Installed")]
716
+ }), h("targets.agentInstalled", "Agent Installed")]
712
717
  })
713
718
  ]
714
719
  }),
715
- /* @__PURE__ */ f("div", {
720
+ /* @__PURE__ */ p("div", {
716
721
  className: "mt-1 flex flex-wrap items-center gap-2 text-sm text-text-secondary sm:gap-3",
717
- children: [e.host && /* @__PURE__ */ f("code", {
722
+ children: [e.host && /* @__PURE__ */ p("code", {
718
723
  className: "text-xs break-words",
719
724
  children: [
720
725
  e.username ? `${e.username}@` : "",
721
726
  e.host,
722
727
  e.port ? `:${e.port}` : ""
723
728
  ]
724
- }), e.agents.length > 0 && /* @__PURE__ */ f("span", {
729
+ }), e.agents.length > 0 && /* @__PURE__ */ p("span", {
725
730
  className: "text-text-muted",
726
731
  children: [
727
- m("targets.via", "via"),
732
+ h("targets.via", "via"),
728
733
  " ",
729
734
  e.agents[0].name
730
735
  ]
731
736
  })]
732
737
  }),
733
- e.tags.length > 0 && /* @__PURE__ */ d("div", {
738
+ e.tags.length > 0 && /* @__PURE__ */ f("div", {
734
739
  className: "mt-1.5 flex flex-wrap gap-1",
735
- children: e.tags.map((e) => /* @__PURE__ */ d("span", {
740
+ children: e.tags.map((e) => /* @__PURE__ */ f("span", {
736
741
  className: "px-1.5 py-0.5 text-xs bg-bg-sunken text-text-secondary rounded",
737
742
  children: e
738
743
  }, e))
@@ -741,39 +746,39 @@ function g() {
741
746
  })
742
747
  ]
743
748
  })]
744
- }), /* @__PURE__ */ f("div", {
749
+ }), /* @__PURE__ */ p("div", {
745
750
  className: "mt-3 flex flex-wrap items-center gap-2 pl-0 sm:pl-7",
746
751
  children: [
747
- /* @__PURE__ */ d("button", {
752
+ /* @__PURE__ */ f("button", {
748
753
  type: "button",
749
- onClick: () => void wn(e.id),
750
- title: m("targets.testConnectivity", "Test connectivity"),
754
+ onClick: () => void En(e.id),
755
+ title: h("targets.testConnectivity", "Test connectivity"),
751
756
  className: "flex min-h-9 items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-button border border-border-default bg-bg-surface hover:bg-bg-sunken transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
752
- children: m("targets.test", "Test")
757
+ children: h("targets.test", "Test")
753
758
  }),
754
- /* @__PURE__ */ d("button", {
759
+ /* @__PURE__ */ f("button", {
755
760
  type: "button",
756
- onClick: () => void Dn(e.id),
757
- disabled: Tn.has(e.id),
758
- "aria-busy": Tn.has(e.id),
759
- title: m("targets.openTerminal", "Open terminal"),
761
+ onClick: () => void On(e.id),
762
+ disabled: Q.has(e.id),
763
+ "aria-busy": Q.has(e.id),
764
+ title: h("targets.openTerminal", "Open terminal"),
760
765
  className: "flex min-h-9 items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-button border border-border-default bg-bg-surface hover:bg-bg-sunken transition-colors disabled:opacity-60 disabled:cursor-not-allowed focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
761
- children: Tn.has(e.id) ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(Ie, {
766
+ children: Q.has(e.id) ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(Fe, {
762
767
  className: "size-3 animate-spin",
763
768
  "aria-hidden": "true"
764
- }), m("targets.starting", "Starting…")] }) : m("targets.terminal", "Terminal")
769
+ }), h("targets.starting", "Starting…")] }) : h("targets.terminal", "Terminal")
765
770
  }),
766
- e.type !== "DIRECT" && !t && /* @__PURE__ */ d("button", {
771
+ e.type !== "DIRECT" && !t && /* @__PURE__ */ f("button", {
767
772
  type: "button",
768
- onClick: () => void An(e),
769
- title: m("targets.installAgent", "Install agent"),
773
+ onClick: () => void jn(e),
774
+ title: h("targets.installAgent", "Install agent"),
770
775
  className: "flex min-h-9 items-center gap-1.5 rounded-button px-3 py-1.5 text-xs font-medium bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bgHover transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
771
- children: m("targets.installAgent", "Install Agent")
776
+ children: h("targets.installAgent", "Install Agent")
772
777
  }),
773
- /* @__PURE__ */ d("div", { className: "hidden flex-1 sm:block" }),
774
- /* @__PURE__ */ d(xe, {
775
- ariaLabel: m("targets.targetActions", "Target actions"),
776
- title: m("targets.targetActions", "Target actions"),
778
+ /* @__PURE__ */ f("div", { className: "hidden flex-1 sm:block" }),
779
+ /* @__PURE__ */ f(xe, {
780
+ ariaLabel: h("targets.targetActions", "Target actions"),
781
+ title: h("targets.targetActions", "Target actions"),
777
782
  align: "end",
778
783
  items: r
779
784
  })
@@ -783,406 +788,406 @@ function g() {
783
788
  }, e.id);
784
789
  })
785
790
  }, "list-view")
786
- }) : /* @__PURE__ */ d(he, {
787
- icon: /* @__PURE__ */ d(Be, {
791
+ }) : /* @__PURE__ */ f(he, {
792
+ icon: /* @__PURE__ */ f(ze, {
788
793
  className: "size-8 text-text-secondary",
789
794
  "aria-hidden": "true"
790
795
  }),
791
796
  illustration: $ ? "empty-search" : "empty-generic",
792
- title: $ ? m("targets.emptyNoTargetsFound", "No targets found") : m("targets.emptyNoTargetsConfigured", "No targets configured"),
793
- description: $ ? m("targets.emptyAdjustSearch", "Try adjusting your search or filters") : m("targets.emptyDescription", "Add a target to start managing servers, workstations, and environments."),
794
- action: $ ? void 0 : /* @__PURE__ */ f("div", {
797
+ title: $ ? h("targets.emptyNoTargetsFound", "No targets found") : h("targets.emptyNoTargetsConfigured", "No targets configured"),
798
+ description: $ ? h("targets.emptyAdjustSearch", "Try adjusting your search or filters") : h("targets.emptyDescription", "Add a target to start managing servers, workstations, and environments."),
799
+ action: $ ? void 0 : /* @__PURE__ */ p("div", {
795
800
  className: "flex flex-wrap items-center justify-center gap-2",
796
- children: [/* @__PURE__ */ f(p, {
801
+ children: [/* @__PURE__ */ p(m, {
797
802
  type: "button",
798
- onClick: () => w(!0),
803
+ onClick: () => T(!0),
799
804
  className: "max-md:min-h-11",
800
- children: [/* @__PURE__ */ d(Re, {
805
+ children: [/* @__PURE__ */ f(Le, {
801
806
  className: "size-4",
802
807
  "aria-hidden": "true"
803
- }), m("targets.addTarget", "Add Target")]
804
- }), /* @__PURE__ */ d(ye, { prompt: "What is a Target in VibeControls and how do I create one?" })]
808
+ }), h("targets.addTarget", "Add Target")]
809
+ }), /* @__PURE__ */ f(ye, { prompt: "What is a Target in VibeControls and how do I create one?" })]
805
810
  })
806
811
  }),
807
- /* @__PURE__ */ d(Ye, {
812
+ /* @__PURE__ */ f(Je, {
808
813
  open: bt,
809
814
  onOpenChange: (e) => {
810
- e || w(!1);
815
+ e || T(!1);
811
816
  },
812
- children: /* @__PURE__ */ f(Xe, {
817
+ children: /* @__PURE__ */ p(Ye, {
813
818
  className: "sm:max-w-lg",
814
819
  children: [
815
- /* @__PURE__ */ f($e, { children: [/* @__PURE__ */ d(et, { children: m("targets.addTarget", "Add Target") }), /* @__PURE__ */ d(Ze, { children: m("targets.addTargetBody", "Register a machine or server you want to manage.") })] }),
816
- /* @__PURE__ */ f("div", {
820
+ /* @__PURE__ */ p(Qe, { children: [/* @__PURE__ */ f($e, { children: h("targets.addTarget", "Add Target") }), /* @__PURE__ */ f(Xe, { children: h("targets.addTargetBody", "Register a machine or server you want to manage.") })] }),
821
+ /* @__PURE__ */ p("div", {
817
822
  className: "max-h-[min(60vh,34rem)] space-y-4 overflow-y-auto px-0.5 py-1",
818
823
  children: [
819
- /* @__PURE__ */ f("div", { children: [
820
- /* @__PURE__ */ d("span", {
821
- id: Hn,
824
+ /* @__PURE__ */ p("div", { children: [
825
+ /* @__PURE__ */ f("span", {
826
+ id: Un,
822
827
  className: "mb-1.5 block text-sm font-medium text-text-primary",
823
- children: m("targets.targetType", "Target Type")
828
+ children: h("targets.targetType", "Target Type")
824
829
  }),
825
- /* @__PURE__ */ d("div", {
830
+ /* @__PURE__ */ f("div", {
826
831
  role: "group",
827
- "aria-labelledby": Hn,
832
+ "aria-labelledby": Un,
828
833
  className: "grid grid-cols-2 gap-2",
829
- children: ["DIRECT", "SSH"].map((e) => /* @__PURE__ */ d("button", {
834
+ children: ["DIRECT", "SSH"].map((e) => /* @__PURE__ */ f("button", {
830
835
  type: "button",
831
- onClick: () => Gt(e),
832
- "aria-pressed": z === e,
833
- className: `min-h-9 px-3 py-2 text-sm font-medium rounded-button border transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus ${z === e ? "border-action-primary-bg bg-action-primary-bg/10 text-action-primary-bg" : "border-border-default hover:bg-bg-sunken text-text-secondary"}`,
836
+ onClick: () => Wt(e),
837
+ "aria-pressed": V === e,
838
+ className: `min-h-9 px-3 py-2 text-sm font-medium rounded-button border transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus ${V === e ? "border-action-primary-bg bg-action-primary-bg/10 text-action-primary-bg" : "border-border-default hover:bg-bg-sunken text-text-secondary"}`,
834
839
  children: e
835
840
  }, e))
836
841
  }),
837
- /* @__PURE__ */ d("p", {
842
+ /* @__PURE__ */ f("p", {
838
843
  className: "mt-1 text-xs text-text-muted",
839
- children: z === "DIRECT" ? m("targets.targetTypeDirectHint", "A local machine where you will install the agent manually.") : m("targets.targetTypeSshHint", "A remote server accessible via SSH.")
844
+ children: V === "DIRECT" ? h("targets.targetTypeDirectHint", "A local machine where you will install the agent manually.") : h("targets.targetTypeSshHint", "A remote server accessible via SSH.")
840
845
  })
841
846
  ] }),
842
- /* @__PURE__ */ d(h, {
843
- label: m("webhooks.name", "Name"),
844
- value: B,
845
- onChange: Kt,
847
+ /* @__PURE__ */ f(g, {
848
+ label: h("webhooks.name", "Name"),
849
+ value: H,
850
+ onChange: Gt,
846
851
  requiredField: !0,
847
- placeholder: z === "DIRECT" ? m("targets.namePlaceholderDirect", "My Laptop") : m("targets.namePlaceholderServer", "Production Server")
852
+ placeholder: V === "DIRECT" ? h("targets.namePlaceholderDirect", "My Laptop") : h("targets.namePlaceholderServer", "Production Server")
848
853
  }),
849
- /* @__PURE__ */ d(h, {
850
- label: m("targets.descriptionOptional", "Description (optional)"),
851
- value: V,
852
- onChange: qt,
853
- placeholder: m("targets.descriptionPlaceholder", "Brief description of this target")
854
+ /* @__PURE__ */ f(g, {
855
+ label: h("targets.descriptionOptional", "Description (optional)"),
856
+ value: U,
857
+ onChange: Kt,
858
+ placeholder: h("targets.descriptionPlaceholder", "Brief description of this target")
854
859
  }),
855
- z !== "DIRECT" && /* @__PURE__ */ f(u, { children: [
856
- /* @__PURE__ */ f("div", { children: [
857
- /* @__PURE__ */ d("label", {
858
- htmlFor: Vn.id,
860
+ V !== "DIRECT" && /* @__PURE__ */ p(d, { children: [
861
+ /* @__PURE__ */ p("div", { children: [
862
+ /* @__PURE__ */ f("label", {
863
+ htmlFor: Hn.id,
859
864
  className: "mb-1.5 block text-sm font-medium text-text-primary",
860
- children: m("targets.sourceAgent", "Source Agent")
865
+ children: h("targets.sourceAgent", "Source Agent")
861
866
  }),
862
- /* @__PURE__ */ f("select", {
863
- ...Vn.inputProps,
864
- value: H,
865
- onChange: (e) => Jt(e.target.value),
867
+ /* @__PURE__ */ p("select", {
868
+ ...Hn.inputProps,
869
+ value: W,
870
+ onChange: (e) => qt(e.target.value),
866
871
  "aria-required": "true",
867
872
  className: "w-full rounded-input border border-border-default bg-bg-elevated px-3 py-2 text-base md:text-sm",
868
- children: [/* @__PURE__ */ d("option", {
873
+ children: [/* @__PURE__ */ f("option", {
869
874
  value: "",
870
- children: m("targets.selectAgentConnectFrom", "Select an agent to connect from")
871
- }), Z.map((e) => /* @__PURE__ */ d("option", {
875
+ children: h("targets.selectAgentConnectFrom", "Select an agent to connect from")
876
+ }), X.map((e) => /* @__PURE__ */ f("option", {
872
877
  value: e.id,
873
878
  children: e.name
874
879
  }, e.id))]
875
880
  }),
876
- /* @__PURE__ */ d("p", {
877
- id: Vn.hintId,
881
+ /* @__PURE__ */ f("p", {
882
+ id: Hn.hintId,
878
883
  className: "mt-1.5 text-xs text-text-muted",
879
- children: Bn
884
+ children: Vn
880
885
  })
881
886
  ] }),
882
- /* @__PURE__ */ f("div", {
887
+ /* @__PURE__ */ p("div", {
883
888
  className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
884
- children: [/* @__PURE__ */ d(h, {
885
- label: m("targets.host", "Host"),
886
- value: U,
889
+ children: [/* @__PURE__ */ f(g, {
890
+ label: h("targets.host", "Host"),
891
+ value: Jt,
887
892
  onChange: Yt,
888
893
  requiredField: !0,
889
- placeholder: m("targets.hostPlaceholder", "192.168.1.100")
890
- }), /* @__PURE__ */ d(h, {
891
- label: m("tunnels.port", "Port"),
894
+ placeholder: h("targets.hostPlaceholder", "192.168.1.100")
895
+ }), /* @__PURE__ */ f(g, {
896
+ label: h("tunnels.port", "Port"),
892
897
  value: Xt,
893
898
  onChange: (e) => Zt(Number(e)),
894
899
  type: "number"
895
900
  })]
896
901
  }),
897
- /* @__PURE__ */ d(h, {
898
- label: m("targets.username", "Username"),
899
- value: W,
900
- onChange: Qt,
902
+ /* @__PURE__ */ f(g, {
903
+ label: h("targets.username", "Username"),
904
+ value: Qt,
905
+ onChange: $t,
901
906
  requiredField: !0,
902
- placeholder: m("targets.usernamePlaceholder", "root")
907
+ placeholder: h("targets.usernamePlaceholder", "root")
903
908
  }),
904
- z === "SSH" && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(ut, {
905
- legend: m("targets.authentication", "Authentication"),
909
+ V === "SSH" && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(ut, {
910
+ legend: h("targets.authentication", "Authentication"),
906
911
  name: `${mt}-add-auth`,
907
912
  value: G,
908
- onChange: $t,
909
- passwordLabel: m("targets.password", "Password"),
910
- keyLabel: m("targets.privateKey", "Private Key")
911
- }), G === "password" ? /* @__PURE__ */ d(h, {
912
- label: m("targets.password", "Password"),
913
- value: en,
914
- onChange: tn,
913
+ onChange: en,
914
+ passwordLabel: h("targets.password", "Password"),
915
+ keyLabel: h("targets.privateKey", "Private Key")
916
+ }), G === "password" ? /* @__PURE__ */ f(g, {
917
+ label: h("targets.password", "Password"),
918
+ value: tn,
919
+ onChange: nn,
915
920
  type: "password",
916
921
  autoComplete: "new-password"
917
- }) : /* @__PURE__ */ d(h, {
918
- label: m("targets.privateKeyPath", "Private Key Path"),
919
- value: nn,
920
- onChange: rn,
921
- placeholder: m("targets.privateKeyPathPlaceholder", "~/.ssh/id_rsa")
922
+ }) : /* @__PURE__ */ f(g, {
923
+ label: h("targets.privateKeyPath", "Private Key Path"),
924
+ value: rn,
925
+ onChange: an,
926
+ placeholder: h("targets.privateKeyPathPlaceholder", "~/.ssh/id_rsa")
922
927
  })] })
923
928
  ] }),
924
- /* @__PURE__ */ d(h, {
925
- label: m("targets.labelOptional", "Label (optional)"),
926
- value: an,
927
- onChange: on,
928
- placeholder: m("targets.labelPlaceholder", "web-server-01")
929
- }),
930
- /* @__PURE__ */ d(h, {
931
- label: m("targets.tagsCommaSeparated", "Tags (comma-separated)"),
932
- value: K,
929
+ /* @__PURE__ */ f(g, {
930
+ label: h("targets.labelOptional", "Label (optional)"),
931
+ value: on,
933
932
  onChange: sn,
934
- placeholder: m("targets.tagsPlaceholder", "production, web")
933
+ placeholder: h("targets.labelPlaceholder", "web-server-01")
934
+ }),
935
+ /* @__PURE__ */ f(g, {
936
+ label: h("targets.tagsCommaSeparated", "Tags (comma-separated)"),
937
+ value: cn,
938
+ onChange: ln,
939
+ placeholder: h("targets.tagsPlaceholder", "production, web")
935
940
  }),
936
- /* @__PURE__ */ f("div", {
941
+ /* @__PURE__ */ p("div", {
937
942
  className: "border-t border-border-default pt-3",
938
- children: [/* @__PURE__ */ d("h3", {
943
+ children: [/* @__PURE__ */ f("h3", {
939
944
  className: "text-sm font-medium text-text-secondary mb-2",
940
- children: m("targets.tags", "Tags")
941
- }), /* @__PURE__ */ d(pe, {
945
+ children: h("targets.tags", "Tags")
946
+ }), /* @__PURE__ */ f(pe, {
942
947
  entityType: "VIBECONTROLS_TARGET",
943
- onDraftChange: dn
948
+ onDraftChange: pn
944
949
  })]
945
950
  })
946
951
  ]
947
952
  }),
948
- /* @__PURE__ */ f(Qe, { children: [/* @__PURE__ */ d(p, {
953
+ /* @__PURE__ */ p(Ze, { children: [/* @__PURE__ */ f(m, {
949
954
  type: "button",
950
955
  variant: "outline",
951
- onClick: () => w(!1),
956
+ onClick: () => T(!1),
952
957
  className: "max-md:min-h-11",
953
- children: m("common.cancel", "Cancel")
954
- }), /* @__PURE__ */ d(p, {
958
+ children: h("common.cancel", "Cancel")
959
+ }), /* @__PURE__ */ f(m, {
955
960
  type: "button",
956
- onClick: () => void Cn(),
961
+ onClick: () => void Tn(),
957
962
  className: "max-md:min-h-11",
958
- children: m("targets.addTarget", "Add Target")
963
+ children: h("targets.addTarget", "Add Target")
959
964
  })] })
960
965
  ]
961
966
  })
962
967
  }),
963
- /* @__PURE__ */ d(Ye, {
964
- open: M !== null,
968
+ /* @__PURE__ */ f(Je, {
969
+ open: N !== null,
965
970
  onOpenChange: (e) => {
966
- !e && !P && N(null);
971
+ !e && !P && Ot(null);
967
972
  },
968
- children: /* @__PURE__ */ d(Xe, {
973
+ children: /* @__PURE__ */ f(Ye, {
969
974
  className: "sm:max-w-lg",
970
- children: M && /* @__PURE__ */ f(u, { children: [
971
- /* @__PURE__ */ f($e, { children: [/* @__PURE__ */ d(et, { children: m("targets.editTarget", "Edit Target") }), /* @__PURE__ */ d(Ze, { children: M.name })] }),
972
- /* @__PURE__ */ f("div", {
975
+ children: N && /* @__PURE__ */ p(d, { children: [
976
+ /* @__PURE__ */ p(Qe, { children: [/* @__PURE__ */ f($e, { children: h("targets.editTarget", "Edit Target") }), /* @__PURE__ */ f(Xe, { children: N.name })] }),
977
+ /* @__PURE__ */ p("div", {
973
978
  className: "max-h-[min(60vh,34rem)] space-y-4 overflow-y-auto px-0.5 py-1",
974
979
  children: [
975
- kt && /* @__PURE__ */ d("div", {
980
+ At && /* @__PURE__ */ f("div", {
976
981
  role: "alert",
977
982
  className: "rounded-card border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-status-error-text",
978
- children: kt
983
+ children: At
979
984
  }),
980
- /* @__PURE__ */ d(h, {
981
- label: m("webhooks.name", "Name"),
982
- value: At,
985
+ /* @__PURE__ */ f(g, {
986
+ label: h("webhooks.name", "Name"),
987
+ value: I,
983
988
  onChange: jt,
984
989
  requiredField: !0,
985
- placeholder: m("targets.namePlaceholderServer", "Production Server")
990
+ placeholder: h("targets.namePlaceholderServer", "Production Server")
986
991
  }),
987
- /* @__PURE__ */ d(h, {
988
- label: m("targets.labelOptional", "Label (optional)"),
992
+ /* @__PURE__ */ f(g, {
993
+ label: h("targets.labelOptional", "Label (optional)"),
989
994
  value: Mt,
990
995
  onChange: Nt,
991
- placeholder: m("targets.labelPlaceholder", "web-server-01")
996
+ placeholder: h("targets.labelPlaceholder", "web-server-01")
992
997
  }),
993
- M.type !== "DIRECT" && /* @__PURE__ */ f(u, { children: [
994
- /* @__PURE__ */ f("div", {
998
+ N.type !== "DIRECT" && /* @__PURE__ */ p(d, { children: [
999
+ /* @__PURE__ */ p("div", {
995
1000
  className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
996
- children: [/* @__PURE__ */ d(h, {
997
- label: m("targets.host", "Host"),
1001
+ children: [/* @__PURE__ */ f(g, {
1002
+ label: h("targets.host", "Host"),
998
1003
  value: Pt,
999
1004
  onChange: Ft,
1000
- placeholder: m("targets.hostPlaceholder", "192.168.1.100")
1001
- }), /* @__PURE__ */ d(h, {
1002
- label: m("tunnels.port", "Port"),
1005
+ placeholder: h("targets.hostPlaceholder", "192.168.1.100")
1006
+ }), /* @__PURE__ */ f(g, {
1007
+ label: h("tunnels.port", "Port"),
1003
1008
  value: It,
1004
1009
  onChange: (e) => Lt(Number(e)),
1005
1010
  type: "number"
1006
1011
  })]
1007
1012
  }),
1008
- /* @__PURE__ */ d(h, {
1009
- label: m("targets.username", "Username"),
1013
+ /* @__PURE__ */ f(g, {
1014
+ label: h("targets.username", "Username"),
1010
1015
  value: Rt,
1011
1016
  onChange: zt,
1012
- placeholder: m("targets.usernamePlaceholder", "root")
1017
+ placeholder: h("targets.usernamePlaceholder", "root")
1013
1018
  }),
1014
- M.type === "SSH" && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(ut, {
1015
- legend: m("targets.updateCredentialsOptional", "Update credentials (optional)"),
1019
+ N.type === "SSH" && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(ut, {
1020
+ legend: h("targets.updateCredentialsOptional", "Update credentials (optional)"),
1016
1021
  name: `${mt}-edit-auth`,
1017
- value: I,
1022
+ value: L,
1018
1023
  onChange: Bt,
1019
- passwordLabel: m("targets.password", "Password"),
1020
- keyLabel: m("targets.privateKey", "Private Key"),
1021
- hint: m("targets.keepCredentialsHint", "Leave blank to keep existing credentials.")
1022
- }), I === "password" ? /* @__PURE__ */ d(h, {
1023
- label: m("targets.newPassword", "New Password"),
1024
- value: Vt,
1025
- onChange: Ht,
1024
+ passwordLabel: h("targets.password", "Password"),
1025
+ keyLabel: h("targets.privateKey", "Private Key"),
1026
+ hint: h("targets.keepCredentialsHint", "Leave blank to keep existing credentials.")
1027
+ }), L === "password" ? /* @__PURE__ */ f(g, {
1028
+ label: h("targets.newPassword", "New Password"),
1029
+ value: R,
1030
+ onChange: Vt,
1026
1031
  type: "password",
1027
1032
  autoComplete: "new-password",
1028
- placeholder: m("targets.keepCurrentPlaceholder", "Leave blank to keep current")
1029
- }) : /* @__PURE__ */ d(h, {
1030
- label: m("targets.newPrivateKeyPath", "New Private Key Path"),
1031
- value: L,
1032
- onChange: Ut,
1033
- placeholder: m("targets.keepCurrentKeyPlaceholder", "Leave blank to keep current (~/.ssh/id_rsa)")
1033
+ placeholder: h("targets.keepCurrentPlaceholder", "Leave blank to keep current")
1034
+ }) : /* @__PURE__ */ f(g, {
1035
+ label: h("targets.newPrivateKeyPath", "New Private Key Path"),
1036
+ value: z,
1037
+ onChange: Ht,
1038
+ placeholder: h("targets.keepCurrentKeyPlaceholder", "Leave blank to keep current (~/.ssh/id_rsa)")
1034
1039
  })] })
1035
1040
  ] }),
1036
- /* @__PURE__ */ d(h, {
1037
- label: m("targets.tagsCommaSeparated", "Tags (comma-separated)"),
1038
- value: R,
1039
- onChange: Wt,
1040
- placeholder: m("targets.tagsPlaceholder", "production, web")
1041
+ /* @__PURE__ */ f(g, {
1042
+ label: h("targets.tagsCommaSeparated", "Tags (comma-separated)"),
1043
+ value: B,
1044
+ onChange: Ut,
1045
+ placeholder: h("targets.tagsPlaceholder", "production, web")
1041
1046
  })
1042
1047
  ]
1043
1048
  }),
1044
- /* @__PURE__ */ f(Qe, { children: [/* @__PURE__ */ d(p, {
1049
+ /* @__PURE__ */ p(Ze, { children: [/* @__PURE__ */ f(m, {
1045
1050
  type: "button",
1046
1051
  variant: "outline",
1047
- onClick: () => N(null),
1052
+ onClick: () => Ot(null),
1048
1053
  disabled: P,
1049
1054
  className: "max-md:min-h-11",
1050
- children: m("common.cancel", "Cancel")
1051
- }), /* @__PURE__ */ d(p, {
1055
+ children: h("common.cancel", "Cancel")
1056
+ }), /* @__PURE__ */ f(m, {
1052
1057
  type: "button",
1053
- onClick: () => void Nn(),
1058
+ onClick: () => void Pn(),
1054
1059
  disabled: P,
1055
1060
  "aria-busy": P,
1056
1061
  className: "max-md:min-h-11",
1057
- children: P ? m("common.saving", "Saving...") : m("targets.saveChanges", "Save Changes")
1062
+ children: P ? h("common.saving", "Saving...") : h("targets.saveChanges", "Save Changes")
1058
1063
  })] })
1059
1064
  ] })
1060
1065
  })
1061
1066
  }),
1062
- /* @__PURE__ */ d(re, {
1063
- isOpen: !!T,
1064
- onClose: () => E(null),
1065
- onConfirm: () => void On(),
1066
- title: m("targets.deleteTarget", "Delete Target"),
1067
- message: m("targets.deleteTargetMessage", "This will remove the target and its connection from the agent. Active terminals will be disconnected."),
1068
- confirmLabel: m("common.delete", "Delete"),
1067
+ /* @__PURE__ */ f(ae, {
1068
+ isOpen: !!E,
1069
+ onClose: () => D(null),
1070
+ onConfirm: () => void kn(),
1071
+ title: h("targets.deleteTarget", "Delete Target"),
1072
+ message: h("targets.deleteTargetMessage", "This will remove the target and its connection from the agent. Active terminals will be disconnected."),
1073
+ confirmLabel: h("common.delete", "Delete"),
1069
1074
  variant: "danger"
1070
1075
  }),
1071
- /* @__PURE__ */ d(re, {
1076
+ /* @__PURE__ */ f(ae, {
1072
1077
  isOpen: xt,
1073
1078
  onClose: () => St(!1),
1074
- onConfirm: () => void kn(),
1075
- title: m("targets.deleteSelectedTargets", "Delete Selected Targets"),
1076
- message: `${m("targets.confirmDeleteSelectedPrefix", "Are you sure you want to delete")} ${D.size} ${m("nav.targets", "target")}${D.size === 1 ? "" : "s"}? ${m("targets.confirmDeleteSelectedSuffix", "This action cannot be undone.")}`,
1077
- confirmLabel: m("targets.deleteAll", "Delete All"),
1079
+ onConfirm: () => void An(),
1080
+ title: h("targets.deleteSelectedTargets", "Delete Selected Targets"),
1081
+ message: `${h("targets.confirmDeleteSelectedPrefix", "Are you sure you want to delete")} ${O.size} ${h("nav.targets", "target")}${O.size === 1 ? "" : "s"}? ${h("targets.confirmDeleteSelectedSuffix", "This action cannot be undone.")}`,
1082
+ confirmLabel: h("targets.deleteAll", "Delete All"),
1078
1083
  variant: "danger"
1079
1084
  }),
1080
- /* @__PURE__ */ d(Ye, {
1081
- open: A !== null,
1085
+ /* @__PURE__ */ f(Je, {
1086
+ open: j !== null,
1082
1087
  onOpenChange: (e) => {
1083
- !e && j?.status !== "running" && Pn();
1088
+ !e && M?.status !== "running" && Fn();
1084
1089
  },
1085
- children: /* @__PURE__ */ d(Xe, {
1090
+ children: /* @__PURE__ */ f(Ye, {
1086
1091
  className: "sm:max-w-md",
1087
- showCloseButton: j?.status !== "running",
1088
- children: A && /* @__PURE__ */ f(u, { children: [
1089
- /* @__PURE__ */ f($e, { children: [/* @__PURE__ */ f(et, {
1092
+ showCloseButton: M?.status !== "running",
1093
+ children: j && /* @__PURE__ */ p(d, { children: [
1094
+ /* @__PURE__ */ p(Qe, { children: [/* @__PURE__ */ p($e, {
1090
1095
  className: "break-words",
1091
1096
  children: [
1092
- m("targets.installingAgentOn", "Installing Agent on"),
1097
+ h("targets.installingAgentOn", "Installing Agent on"),
1093
1098
  " ",
1094
- A.name
1099
+ j.name
1095
1100
  ]
1096
- }), /* @__PURE__ */ d(Ze, { children: m("targets.installProgressBody", "Installation progress for this target.") })] }),
1097
- /* @__PURE__ */ d("div", {
1101
+ }), /* @__PURE__ */ f(Xe, { children: h("targets.installProgressBody", "Installation progress for this target.") })] }),
1102
+ /* @__PURE__ */ f("div", {
1098
1103
  className: "space-y-2",
1099
1104
  role: "status",
1100
- children: j && j.steps ? j.steps.map((e, t) => /* @__PURE__ */ f("div", {
1105
+ children: M && M.steps ? M.steps.map((e, t) => /* @__PURE__ */ p("div", {
1101
1106
  className: "flex items-center gap-3",
1102
1107
  children: [
1103
- e.status === "running" && /* @__PURE__ */ d(Ie, {
1108
+ e.status === "running" && /* @__PURE__ */ f(Fe, {
1104
1109
  className: "size-4 animate-spin text-text-secondary",
1105
1110
  "aria-hidden": "true"
1106
1111
  }),
1107
- e.status === "completed" && /* @__PURE__ */ d(Me, {
1112
+ e.status === "completed" && /* @__PURE__ */ f(je, {
1108
1113
  className: "size-4 text-status-success-text",
1109
1114
  "aria-hidden": "true"
1110
1115
  }),
1111
- e.status === "failed" && /* @__PURE__ */ d(He, {
1116
+ e.status === "failed" && /* @__PURE__ */ f(Ve, {
1112
1117
  className: "size-4 text-status-error-text",
1113
1118
  "aria-hidden": "true"
1114
1119
  }),
1115
- e.status === "skipped" && /* @__PURE__ */ d(je, {
1120
+ e.status === "skipped" && /* @__PURE__ */ f(Ae, {
1116
1121
  className: "size-4 text-text-muted",
1117
1122
  "aria-hidden": "true"
1118
1123
  }),
1119
- e.status === "pending" && /* @__PURE__ */ d("div", {
1124
+ e.status === "pending" && /* @__PURE__ */ f("div", {
1120
1125
  className: "size-4 rounded-full border-2 border-border-default",
1121
1126
  "aria-hidden": "true"
1122
1127
  }),
1123
- /* @__PURE__ */ f("div", {
1128
+ /* @__PURE__ */ p("div", {
1124
1129
  className: "min-w-0",
1125
- children: [/* @__PURE__ */ d("div", {
1130
+ children: [/* @__PURE__ */ f("div", {
1126
1131
  className: "text-sm font-medium text-text-primary",
1127
- children: m(`targets.installStep.${e.name}`, at[e.name] ?? e.name)
1128
- }), e.message && /* @__PURE__ */ d("div", {
1132
+ children: h(`targets.installStep.${e.name}`, at[e.name] ?? e.name)
1133
+ }), e.message && /* @__PURE__ */ f("div", {
1129
1134
  className: "text-xs text-text-muted break-words",
1130
1135
  children: e.message
1131
1136
  })]
1132
1137
  })
1133
1138
  ]
1134
- }, t)) : /* @__PURE__ */ f("div", {
1139
+ }, t)) : /* @__PURE__ */ p("div", {
1135
1140
  className: "flex items-center gap-3",
1136
- children: [/* @__PURE__ */ d(Ie, {
1141
+ children: [/* @__PURE__ */ f(Fe, {
1137
1142
  className: "size-4 animate-spin text-text-secondary",
1138
1143
  "aria-hidden": "true"
1139
- }), /* @__PURE__ */ d("span", {
1144
+ }), /* @__PURE__ */ f("span", {
1140
1145
  className: "text-sm text-text-primary",
1141
- children: m("targets.startingInstallJob", "Starting install job...")
1146
+ children: h("targets.startingInstallJob", "Starting install job...")
1142
1147
  })]
1143
1148
  })
1144
1149
  }),
1145
- j?.status === "completed" && /* @__PURE__ */ d("div", {
1150
+ M?.status === "completed" && /* @__PURE__ */ f("div", {
1146
1151
  role: "status",
1147
1152
  className: "rounded-card border border-status-success-border bg-status-success-bg-subtle p-3 text-sm text-status-success-text",
1148
- children: m("targets.agentInstalledSuccess", "Agent installed successfully!")
1153
+ children: h("targets.agentInstalledSuccess", "Agent installed successfully!")
1149
1154
  }),
1150
- j?.status === "failed" && /* @__PURE__ */ d("div", {
1155
+ M?.status === "failed" && /* @__PURE__ */ f("div", {
1151
1156
  role: "alert",
1152
1157
  className: "rounded-card border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-status-error-text",
1153
- children: j.error ?? m("targets.installationFailed", "Installation failed.")
1158
+ children: M.error ?? h("targets.installationFailed", "Installation failed.")
1154
1159
  }),
1155
- /* @__PURE__ */ d(Qe, { children: /* @__PURE__ */ d(p, {
1160
+ /* @__PURE__ */ f(Ze, { children: /* @__PURE__ */ f(m, {
1156
1161
  type: "button",
1157
1162
  variant: "outline",
1158
- onClick: Pn,
1159
- disabled: j?.status === "running",
1160
- "aria-busy": j?.status === "running",
1163
+ onClick: Fn,
1164
+ disabled: M?.status === "running",
1165
+ "aria-busy": M?.status === "running",
1161
1166
  className: "w-full max-md:min-h-11",
1162
- children: !j || j.status === "running" ? m("targets.installing", "Installing...") : m("common.close", "Close")
1167
+ children: !M || M.status === "running" ? h("targets.installing", "Installing...") : h("common.close", "Close")
1163
1168
  }) })
1164
1169
  ] })
1165
1170
  })
1166
1171
  }),
1167
- /* @__PURE__ */ d(re, {
1172
+ /* @__PURE__ */ f(ae, {
1168
1173
  isOpen: Ct !== null,
1169
- onClose: () => k(null),
1174
+ onClose: () => A(null),
1170
1175
  onConfirm: () => {
1171
- k(null), _("/billing/plans");
1176
+ A(null), v("/billing/plans");
1172
1177
  },
1173
- title: ie(Ct ?? "generic").title,
1174
- message: ie(Ct ?? "generic").message,
1175
- confirmLabel: m("targets.viewBilling", "View Billing"),
1176
- cancelLabel: m("common.dismiss", "Dismiss"),
1178
+ title: oe(Ct ?? "generic").title,
1179
+ message: oe(Ct ?? "generic").message,
1180
+ confirmLabel: h("targets.viewBilling", "View Billing"),
1181
+ cancelLabel: h("common.dismiss", "Dismiss"),
1177
1182
  variant: "warning"
1178
1183
  })
1179
1184
  ]
1180
- }) : /* @__PURE__ */ d(fe, {
1181
- title: m("common.accessDeniedTitle", "Access Denied"),
1182
- message: m("targets.accessDeniedBody", "You don't have permission to access this page.")
1185
+ }) : /* @__PURE__ */ f(fe, {
1186
+ title: h("common.accessDeniedTitle", "Access Denied"),
1187
+ message: h("targets.accessDeniedBody", "You don't have permission to access this page.")
1183
1188
  });
1184
1189
  }
1185
1190
  //#endregion
1186
- export { g as TargetsPage };
1191
+ export { _ as TargetsPage };
1187
1192
 
1188
1193
  //# sourceMappingURL=TargetsPage.js.map