@burdenoff/microfe-vibecontrols 2026.625.2 → 2026.625.3

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.
@@ -119,7 +119,7 @@ function lt({ legend: e, name: t, value: n, onChange: r, passwordLabel: ee, keyL
119
119
  ] });
120
120
  }
121
121
  function g() {
122
- let m = ne(), { workspaceId: g } = se(), _ = ce(), { hasPermission: ut, isLoading: dt } = Ge(), [ft] = We(), v = ft.get("selectedTargetId"), pt = Ae(), [y, mt] = l(""), [b, ht] = l(null), [x, gt] = l("all"), [S, _t] = l("all"), [C, vt] = l("grid"), [yt, w] = l(!1), [T, E] = l(null), [bt, xt] = l(!1), [D, O] = l(/* @__PURE__ */ new Set()), [St, k] = l(null), [A, Ct] = l(null), [j, wt] = l(null), [Tt, Et] = l(null), [M, N] = l(null), [P, Dt] = l(!1), [Ot, F] = l(null), [kt, At] = l(""), [jt, Mt] = l(""), [Nt, Pt] = l(""), [Ft, It] = l(22), [Lt, Rt] = l(""), [I, zt] = l("key"), [L, Bt] = l(""), [R, Vt] = l(""), [z, Ht] = l(""), [B, Ut] = l("DIRECT"), [V, Wt] = l(""), [H, Gt] = l(""), [U, Kt] = l(""), [W, qt] = l(""), [Jt, Yt] = l(22), [G, Xt] = l(""), [K, Zt] = l("key"), [Qt, $t] = l(""), [en, tn] = l(""), [nn, rn] = l(""), [q, an] = l(""), { data: on, loading: J, refetch: Y } = ee({
122
+ let m = ne(), { workspaceId: g } = se(), _ = ce(), { hasPermission: ut, isLoading: dt } = Ge(), [ft] = We(), v = ft.get("selectedTargetId"), pt = Ae(), [y, mt] = l(""), [b, ht] = l(null), [x, gt] = l("all"), [S, _t] = l("all"), [C, vt] = l("grid"), [yt, w] = l(!1), [T, E] = l(null), [bt, xt] = l(!1), [D, O] = l(/* @__PURE__ */ new Set()), [St, k] = l(null), [A, Ct] = l(null), [j, wt] = l(null), [Tt, Et] = l(null), [M, N] = l(null), [P, Dt] = l(!1), [Ot, F] = l(null), [kt, At] = l(""), [jt, Mt] = l(""), [Nt, Pt] = l(""), [Ft, It] = l(22), [Lt, Rt] = l(""), [I, zt] = l("key"), [Bt, Vt] = l(""), [L, Ht] = l(""), [R, Ut] = l(""), [z, Wt] = l("DIRECT"), [B, Gt] = l(""), [V, Kt] = l(""), [H, qt] = l(""), [U, Jt] = l(""), [Yt, Xt] = l(22), [W, Zt] = l(""), [G, Qt] = l("key"), [$t, en] = l(""), [tn, nn] = l(""), [rn, an] = l(""), [K, on] = l(""), { data: sn, loading: q, refetch: J } = ee({
123
123
  variables: {
124
124
  workspaceId: g || "",
125
125
  limit: 50,
@@ -127,10 +127,10 @@ function g() {
127
127
  },
128
128
  skip: !g,
129
129
  fetchPolicy: "cache-first"
130
- }), { agents: sn, refetch: X } = le(), [cn] = e({
130
+ }), { agents: cn, refetch: Y } = le(), [ln] = e({
131
131
  refetchQueries: ["VibeControlsInitialData", "ListTargets"],
132
132
  awaitRefetchQueries: !0
133
- }), { setDraftTagIds: ln, flushTags: un } = me("VIBECONTROLS_TARGET"), [dn] = o(), [fn] = a(), [pn] = i(), [mn] = t(), [hn] = r(), [gn] = te(), [_n] = n({ fetchPolicy: "network-only" }), Z = c(() => (on?.targets?.items ?? []).map((e) => ({
133
+ }), { setDraftTagIds: un, flushTags: dn } = me("VIBECONTROLS_TARGET"), [fn] = o(), [pn] = a(), [mn] = i(), [hn] = t(), [gn] = r(), [_n] = te(), [vn] = n({ fetchPolicy: "network-only" }), X = c(() => (sn?.targets?.items ?? []).map((e) => ({
134
134
  id: e.id,
135
135
  type: e.type || "DIRECT",
136
136
  name: e.name,
@@ -149,28 +149,28 @@ function g() {
149
149
  version: e.version,
150
150
  isActive: e.isActive
151
151
  }))
152
- })), [on]), Q = c(() => sn.map((e) => ({
152
+ })), [sn]), Z = c(() => cn.map((e) => ({
153
153
  id: e.id,
154
154
  name: e.name,
155
155
  isActive: e.isActive,
156
156
  tunnelUrl: e.tunnelUrl ?? null,
157
157
  agentApiKey: null
158
- })), [sn]), $ = c(() => {
159
- let e = Z;
158
+ })), [cn]), Q = c(() => {
159
+ let e = X;
160
160
  if (y) {
161
161
  let t = y.toLowerCase();
162
162
  e = e.filter((e) => e.name.toLowerCase().includes(t) || e.host?.toLowerCase().includes(t) || e.label?.toLowerCase().includes(t));
163
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
165
  }, [
166
- Z,
166
+ X,
167
167
  y,
168
168
  b,
169
169
  x,
170
170
  S
171
171
  ]);
172
172
  ke(() => {
173
- if (!v || !$.find((e) => e.id === v)) return;
173
+ if (!v || !Q.find((e) => e.id === v)) return;
174
174
  let e = window.setTimeout(() => {
175
175
  document.getElementById(`target-row-${v}`)?.scrollIntoView({
176
176
  behavior: "smooth",
@@ -178,12 +178,12 @@ function g() {
178
178
  });
179
179
  }, 150);
180
180
  return () => window.clearTimeout(e);
181
- }, [$, v]);
182
- let vn = Z.filter((e) => e.status === "connected").length, yn = $.length > 0 && $.every((e) => D.has(e.id)), bn = D.size > 0;
181
+ }, [Q, v]);
182
+ let yn = X.filter((e) => e.status === "connected").length, bn = Q.length > 0 && Q.every((e) => D.has(e.id)), xn = D.size > 0;
183
183
  ke(() => {
184
184
  if (!Tt || !A) return;
185
185
  let e = !1, t = () => {
186
- _n({ variables: {
186
+ vn({ variables: {
187
187
  targetId: A.id,
188
188
  jobId: Tt
189
189
  } }).then((t) => {
@@ -196,7 +196,7 @@ function g() {
196
196
  steps: n.steps ?? [],
197
197
  result: n.result ?? void 0,
198
198
  error: n.error ?? void 0
199
- }), (n.status === "completed" || n.status === "failed") && n.status === "completed" && (Y(), X()));
199
+ }), (n.status === "completed" || n.status === "failed") && n.status === "completed" && (J(), Y()));
200
200
  }).catch(() => {});
201
201
  };
202
202
  t();
@@ -207,26 +207,26 @@ function g() {
207
207
  }, [
208
208
  Tt,
209
209
  A,
210
- _n,
211
- X,
212
- Y
210
+ vn,
211
+ Y,
212
+ J
213
213
  ]);
214
- let xn = s(async () => {
215
- if (!(!V || !g) && !(B !== "DIRECT" && (!U || !W || !G))) try {
216
- let e = await cn({ variables: {
214
+ let Sn = s(async () => {
215
+ if (!(!B || !g) && !(z !== "DIRECT" && (!H || !U || !W))) try {
216
+ let e = await ln({ variables: {
217
217
  workspaceId: g,
218
218
  input: {
219
- type: B,
220
- name: V,
221
- sourceAgentId: B === "DIRECT" ? void 0 : U,
222
- host: B === "DIRECT" ? void 0 : W,
223
- port: B === "DIRECT" ? void 0 : Jt,
224
- username: B === "DIRECT" ? void 0 : G,
225
- password: B === "SSH" && K === "password" ? Qt : void 0,
226
- privateKeyPath: B === "SSH" && K === "key" ? en : void 0,
227
- label: nn || void 0,
228
- tags: q ? q.split(",").map((e) => e.trim()) : void 0,
229
- metadata: H ? { description: H } : void 0
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 : Yt,
224
+ username: z === "DIRECT" ? void 0 : W,
225
+ password: z === "SSH" && G === "password" ? $t : void 0,
226
+ privateKeyPath: z === "SSH" && G === "key" ? tn : void 0,
227
+ label: rn || void 0,
228
+ tags: K ? K.split(",").map((e) => e.trim()) : void 0,
229
+ metadata: V ? { description: V } : void 0
230
230
  }
231
231
  } });
232
232
  if (e.error) {
@@ -238,7 +238,7 @@ function g() {
238
238
  return;
239
239
  }
240
240
  let t = e.data?.createTarget?.id;
241
- w(!1), Wt(""), qt(""), Xt(""), $t(""), tn(""), rn(""), an(""), t && await un(t), Y(), X();
241
+ w(!1), Gt(""), Jt(""), Zt(""), en(""), nn(""), an(""), on(""), t && await dn(t), J(), Y();
242
242
  } catch (e) {
243
243
  if (ae(e)) {
244
244
  w(!1), oe(), k("target");
@@ -247,39 +247,39 @@ function g() {
247
247
  De.error(m("targets.createFailed", "Failed to create target"), e instanceof Error ? e.message : void 0);
248
248
  }
249
249
  }, [
250
- V,
250
+ B,
251
+ H,
251
252
  U,
253
+ Yt,
252
254
  W,
253
- Jt,
254
255
  G,
256
+ $t,
257
+ tn,
258
+ rn,
255
259
  K,
256
- Qt,
257
- en,
258
- nn,
259
- q,
260
- H,
261
- B,
260
+ V,
261
+ z,
262
262
  g,
263
- cn,
264
- un,
265
- X,
263
+ ln,
264
+ dn,
266
265
  Y,
266
+ J,
267
267
  m
268
- ]), Sn = s(async (e) => {
269
- let t = (await fn({ 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), Y(), X());
268
+ ]), Cn = s(async (e) => {
269
+ let t = (await pn({ 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());
271
271
  }, [
272
- fn,
273
- X,
272
+ pn,
274
273
  Y,
274
+ J,
275
275
  m
276
- ]), [Cn, wn] = l(/* @__PURE__ */ new Set()), Tn = s(async (e) => {
277
- wn((t) => {
276
+ ]), [wn, Tn] = l(/* @__PURE__ */ new Set()), En = s(async (e) => {
277
+ Tn((t) => {
278
278
  let n = new Set(t);
279
279
  return n.add(e), n;
280
280
  });
281
281
  try {
282
- let t = await pn({ variables: { targetId: e } });
282
+ let t = await mn({ variables: { targetId: e } });
283
283
  if (t.error && ae(t.error)) {
284
284
  oe(), k("environment");
285
285
  return;
@@ -293,55 +293,55 @@ function g() {
293
293
  }
294
294
  throw e;
295
295
  } finally {
296
- wn((t) => {
296
+ Tn((t) => {
297
297
  if (!t.has(e)) return t;
298
298
  let n = new Set(t);
299
299
  return n.delete(e), n;
300
300
  });
301
301
  }
302
- }, [pn, _]), En = s(async () => {
302
+ }, [mn, _]), Dn = s(async () => {
303
303
  if (T) {
304
304
  try {
305
- await mn({ variables: { id: T } }), Ce() && we("success");
305
+ await hn({ variables: { id: T } }), Ce() && we("success");
306
306
  } catch (e) {
307
307
  throw Ce() && we("error"), e;
308
308
  }
309
309
  E(null), O((e) => {
310
310
  let t = new Set(e);
311
311
  return t.delete(T), t;
312
- }), Y(), X();
312
+ }), J(), Y();
313
313
  }
314
314
  }, [
315
315
  T,
316
- mn,
317
- X,
318
- Y
319
- ]), Dn = s(async () => {
316
+ hn,
317
+ Y,
318
+ J
319
+ ]), On = s(async () => {
320
320
  let e = Array.from(D);
321
- await Promise.all(e.map((e) => mn({ variables: { id: e } }))), O(/* @__PURE__ */ new Set()), xt(!1), Y(), X();
321
+ await Promise.all(e.map((e) => hn({ variables: { id: e } }))), O(/* @__PURE__ */ new Set()), xt(!1), J(), Y();
322
322
  }, [
323
323
  D,
324
- mn,
325
- X,
326
- Y
327
- ]), On = s(async (e) => {
324
+ hn,
325
+ Y,
326
+ J
327
+ ]), kn = s(async (e) => {
328
328
  Ct(e), wt(null), Et(null);
329
- let t = Q.find((e) => e.isActive);
329
+ let t = Z.find((e) => e.isActive);
330
330
  if (!t) return;
331
- let n = (await hn({ variables: {
331
+ let n = (await gn({ variables: {
332
332
  targetId: e.id,
333
333
  sourceAgentId: t.id
334
334
  } })).data?.installAgentOnTarget;
335
335
  n?.jobId && Et(n.jobId);
336
- }, [hn, Q]), kn = s(async (e) => {
337
- await gn({ variables: { targetId: e.id } }), Y(), X();
336
+ }, [gn, Z]), An = s(async (e) => {
337
+ await _n({ variables: { targetId: e.id } }), J(), Y();
338
338
  }, [
339
- gn,
340
- X,
341
- Y
342
- ]), An = s((e) => {
343
- N(e), At(e.name), Mt(e.label ?? ""), Pt(e.host ?? ""), It(e.port ?? 22), Rt(e.username ?? ""), zt("key"), Bt(""), Vt(""), Ht(e.tags.join(", ")), F(null);
344
- }, []), jn = s(async () => {
339
+ _n,
340
+ Y,
341
+ J
342
+ ]), jn = s((e) => {
343
+ N(e), At(e.name), Mt(e.label ?? ""), Pt(e.host ?? ""), It(e.port ?? 22), Rt(e.username ?? ""), zt("key"), Vt(""), Ht(""), Ut(e.tags.join(", ")), F(null);
344
+ }, []), Mn = s(async () => {
345
345
  if (M) {
346
346
  if (!kt.trim()) {
347
347
  F("Name is required");
@@ -349,7 +349,7 @@ function g() {
349
349
  }
350
350
  Dt(!0), F(null);
351
351
  try {
352
- let e = await dn({ variables: {
352
+ let e = await fn({ variables: {
353
353
  id: M.id,
354
354
  input: {
355
355
  name: kt.trim(),
@@ -357,16 +357,16 @@ function g() {
357
357
  host: Nt.trim() || void 0,
358
358
  port: Ft || void 0,
359
359
  username: Lt.trim() || void 0,
360
- password: M.type === "SSH" && I === "password" && L ? L : void 0,
361
- privateKeyPath: M.type === "SSH" && I === "key" && R ? R : void 0,
362
- tags: z ? z.split(",").map((e) => e.trim()).filter(Boolean) : []
360
+ password: M.type === "SSH" && I === "password" && Bt ? Bt : void 0,
361
+ privateKeyPath: M.type === "SSH" && I === "key" && L ? L : void 0,
362
+ tags: R ? R.split(",").map((e) => e.trim()).filter(Boolean) : []
363
363
  }
364
364
  } });
365
365
  if (e.error) {
366
366
  F(e.error.message || "Failed to update target");
367
367
  return;
368
368
  }
369
- N(null), Y(), X();
369
+ N(null), J(), Y();
370
370
  } catch (e) {
371
371
  F(e instanceof Error ? e.message : "Failed to update target");
372
372
  } finally {
@@ -381,31 +381,31 @@ function g() {
381
381
  Ft,
382
382
  Lt,
383
383
  I,
384
+ Bt,
384
385
  L,
385
386
  R,
386
- z,
387
- dn,
388
- X,
389
- Y
390
- ]), Mn = s(() => {
387
+ fn,
388
+ Y,
389
+ J
390
+ ]), Nn = s(() => {
391
391
  Ct(null), wt(null), Et(null);
392
- }, []), Nn = s(() => {
393
- O(yn ? (e) => {
392
+ }, []), Pn = s(() => {
393
+ O(bn ? (e) => {
394
394
  let t = new Set(e);
395
- return $.forEach((e) => t.delete(e.id)), t;
395
+ return Q.forEach((e) => t.delete(e.id)), t;
396
396
  } : (e) => {
397
397
  let t = new Set(e);
398
- return $.forEach((e) => t.add(e.id)), t;
398
+ return Q.forEach((e) => t.add(e.id)), t;
399
399
  });
400
- }, [yn, $]), Pn = s((e) => {
400
+ }, [bn, Q]), Fn = s((e) => {
401
401
  O((t) => {
402
402
  let n = new Set(t);
403
403
  return n.has(e) ? n.delete(e) : n.add(e), n;
404
404
  });
405
- }, []), Fn = {
406
- total: Z.length,
407
- connected: vn
408
- }, In = c(() => [
405
+ }, []), In = {
406
+ total: X.length,
407
+ connected: yn
408
+ }, Ln = c(() => [
409
409
  {
410
410
  value: "all",
411
411
  label: m("targets.filterTypeAll", "All Types")
@@ -418,7 +418,7 @@ function g() {
418
418
  value: "SSH",
419
419
  label: "SSH"
420
420
  }
421
- ], [m]), Ln = c(() => [
421
+ ], [m]), Rn = c(() => [
422
422
  {
423
423
  value: "all",
424
424
  label: m("targets.filterStatusAll", "All Statuses")
@@ -435,15 +435,15 @@ function g() {
435
435
  value: "unknown",
436
436
  label: m("targets.unknown", "Unknown")
437
437
  }
438
- ], [m]), Rn = y || b || x !== "all" || S !== "all", zn = `${m("targets.agentConnectionHintPrefix", "The agent that will establish the")} ${B} ${m("targets.agentConnectionHintSuffix", "connection to this target.")}`, Bn = Se({ hint: zn }), Vn = `${pt}-add-type-label`;
438
+ ], [m]), $ = y || b || x !== "all" || S !== "all", zn = `${m("targets.agentConnectionHintPrefix", "The agent that will establish the")} ${z} ${m("targets.agentConnectionHintSuffix", "connection to this target.")}`, Bn = Se({ hint: zn }), Vn = `${pt}-add-type-label`;
439
439
  return dt ? /* @__PURE__ */ d(de, { message: m("targets.loadingPermissions", "Loading permissions…") }) : ut(Te.TARGET_LIST) ? /* @__PURE__ */ f(nt, {
440
440
  className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-full",
441
441
  children: [
442
442
  /* @__PURE__ */ d(ue, {
443
443
  title: m("nav.targets", "Targets"),
444
444
  description: m("targets.onlineSummary", "{{connected}} of {{total}} targets online", {
445
- connected: Fn.connected,
446
- total: Fn.total
445
+ connected: In.connected,
446
+ total: In.total
447
447
  }),
448
448
  actions: /* @__PURE__ */ f("div", {
449
449
  className: "flex flex-col sm:flex-row items-stretch sm:items-center gap-2",
@@ -451,13 +451,13 @@ function g() {
451
451
  type: "button",
452
452
  variant: "ghost",
453
453
  size: "icon",
454
- onClick: () => void Y(),
455
- disabled: J,
454
+ onClick: () => void J(),
455
+ disabled: q,
456
456
  "aria-label": m("targets.refreshTitle", "Refresh targets"),
457
457
  title: m("targets.refreshTitle", "Refresh targets"),
458
458
  className: "max-md:min-h-11 max-md:min-w-11",
459
459
  children: /* @__PURE__ */ d(ze, {
460
- className: `size-4 ${J ? "animate-spin" : ""}`,
460
+ className: `size-4 ${q ? "animate-spin" : ""}`,
461
461
  "aria-hidden": "true"
462
462
  })
463
463
  }), /* @__PURE__ */ f(p, {
@@ -471,7 +471,7 @@ function g() {
471
471
  })]
472
472
  })
473
473
  }),
474
- Q.length === 0 && !J && /* @__PURE__ */ d(ve, {
474
+ Z.length === 0 && !q && /* @__PURE__ */ d(ve, {
475
475
  variant: "full",
476
476
  dismissKey: "vibecontrols-targets-setup-banner"
477
477
  }),
@@ -518,19 +518,19 @@ function g() {
518
518
  /* @__PURE__ */ d(_e, {
519
519
  label: m("sessions.filterType", "Type"),
520
520
  value: x,
521
- options: In,
521
+ options: Ln,
522
522
  onChange: gt
523
523
  }),
524
524
  /* @__PURE__ */ d(_e, {
525
525
  label: m("sessions.filterStatus", "Status"),
526
526
  value: S,
527
- options: Ln,
527
+ options: Rn,
528
528
  onChange: _t
529
529
  }),
530
530
  /* @__PURE__ */ d(be, {
531
531
  value: b ?? "",
532
532
  onChange: (e) => ht(e || null),
533
- options: Q.map((e) => ({
533
+ options: Z.map((e) => ({
534
534
  value: e.id,
535
535
  label: e.name
536
536
  })),
@@ -542,22 +542,22 @@ function g() {
542
542
  ]
543
543
  })]
544
544
  }),
545
- $.length > 0 && /* @__PURE__ */ d("div", {
545
+ Q.length > 0 && /* @__PURE__ */ d("div", {
546
546
  className: "flex items-center gap-2 flex-wrap",
547
547
  children: /* @__PURE__ */ d("div", {
548
548
  className: "ml-auto flex items-center gap-2",
549
549
  children: /* @__PURE__ */ f("button", {
550
550
  type: "button",
551
- onClick: Nn,
551
+ onClick: Pn,
552
552
  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",
553
553
  children: [/* @__PURE__ */ d(Ne, {
554
554
  className: "size-3.5",
555
555
  "aria-hidden": "true"
556
- }), yn ? m("targets.deselectAll", "Deselect All") : m("targets.selectAll", "Select All")]
556
+ }), bn ? m("targets.deselectAll", "Deselect All") : m("targets.selectAll", "Select All")]
557
557
  })
558
558
  })
559
559
  }),
560
- bn && /* @__PURE__ */ f("div", {
560
+ xn && /* @__PURE__ */ f("div", {
561
561
  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",
562
562
  children: [/* @__PURE__ */ f("span", {
563
563
  className: "text-sm font-medium text-text-primary",
@@ -598,10 +598,10 @@ function g() {
598
598
  })]
599
599
  })]
600
600
  }),
601
- Rn ? /* @__PURE__ */ f("p", {
601
+ $ ? /* @__PURE__ */ f("p", {
602
602
  className: "text-sm text-text-secondary",
603
603
  role: "status",
604
- children: [m("targets.showingResults", "Showing {{filtered}} of {{total}} targets").replace("{{filtered}}", String($.length)).replace("{{total}}", String(Z.length)), J && /* @__PURE__ */ f("span", {
604
+ children: [m("targets.showingResults", "Showing {{filtered}} of {{total}} targets").replace("{{filtered}}", String(Q.length)).replace("{{total}}", String(X.length)), q && /* @__PURE__ */ f("span", {
605
605
  className: "ml-2 text-text-muted",
606
606
  children: [
607
607
  "(",
@@ -610,48 +610,48 @@ function g() {
610
610
  ]
611
611
  })]
612
612
  }) : null,
613
- J && Z.length === 0 ? /* @__PURE__ */ d(Ee, {
613
+ q && X.length === 0 ? /* @__PURE__ */ d(Ee, {
614
614
  variant: "rows",
615
615
  count: 6
616
- }) : $.length > 0 ? /* @__PURE__ */ d(Ke, {
616
+ }) : Q.length > 0 ? /* @__PURE__ */ d(Ke, {
617
617
  mode: "wait",
618
618
  children: C === "grid" ? /* @__PURE__ */ d(tt, {
619
619
  stagger: .04,
620
620
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
621
- children: $.map((e) => /* @__PURE__ */ d(et, {
621
+ children: Q.map((e) => /* @__PURE__ */ d(et, {
622
622
  className: "h-full",
623
623
  children: /* @__PURE__ */ d(Oe, {
624
624
  target: e,
625
- onTest: (e) => void Sn(e),
626
- onTerminal: (e) => void Tn(e),
625
+ onTest: (e) => void Cn(e),
626
+ onTerminal: (e) => void En(e),
627
627
  onOpenDetail: (e) => _(`/targets/${e}`),
628
- onEdit: (e) => An(e),
629
- onInstallAgent: (e) => void On(e),
630
- onUninstallAgent: (e) => void kn(e),
628
+ onEdit: (e) => jn(e),
629
+ onInstallAgent: (e) => void kn(e),
630
+ onUninstallAgent: (e) => void An(e),
631
631
  onDelete: (e) => E(e),
632
632
  selected: D.has(e.id),
633
- onToggleSelect: () => Pn(e.id),
633
+ onToggleSelect: () => Fn(e.id),
634
634
  highlighted: v === e.id,
635
- isStartingTerminal: Cn.has(e.id)
635
+ isStartingTerminal: wn.has(e.id)
636
636
  })
637
637
  }, e.id))
638
638
  }, "grid-view") : /* @__PURE__ */ d(tt, {
639
639
  stagger: .04,
640
640
  className: "space-y-2",
641
- children: $.map((e) => {
641
+ children: Q.map((e) => {
642
642
  let t = ct(e), n = v === e.id, r = [
643
643
  {
644
644
  key: "edit",
645
645
  label: m("common.edit", "Edit"),
646
646
  icon: Le,
647
- onSelect: () => An(e)
647
+ onSelect: () => jn(e)
648
648
  },
649
649
  ...e.type !== "DIRECT" && t ? [{
650
650
  key: "uninstall",
651
651
  label: m("targets.uninstall", "Uninstall"),
652
652
  icon: He,
653
653
  variant: "danger",
654
- onSelect: () => void kn(e)
654
+ onSelect: () => void An(e)
655
655
  }] : [],
656
656
  {
657
657
  key: "delete",
@@ -671,7 +671,7 @@ function g() {
671
671
  className: "flex items-start gap-3",
672
672
  children: [/* @__PURE__ */ d(qe, {
673
673
  checked: D.has(e.id),
674
- onCheckedChange: () => Pn(e.id),
674
+ onCheckedChange: () => Fn(e.id),
675
675
  "aria-label": m("targets.selectTarget", "Select {{name}}", { name: e.name }),
676
676
  className: "mt-1"
677
677
  }), /* @__PURE__ */ f("div", {
@@ -742,26 +742,26 @@ function g() {
742
742
  children: [
743
743
  /* @__PURE__ */ d("button", {
744
744
  type: "button",
745
- onClick: () => void Sn(e.id),
745
+ onClick: () => void Cn(e.id),
746
746
  title: m("targets.testConnectivity", "Test connectivity"),
747
747
  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",
748
748
  children: m("targets.test", "Test")
749
749
  }),
750
750
  /* @__PURE__ */ d("button", {
751
751
  type: "button",
752
- onClick: () => void Tn(e.id),
753
- disabled: Cn.has(e.id),
754
- "aria-busy": Cn.has(e.id),
752
+ onClick: () => void En(e.id),
753
+ disabled: wn.has(e.id),
754
+ "aria-busy": wn.has(e.id),
755
755
  title: m("targets.openTerminal", "Open terminal"),
756
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 disabled:opacity-60 disabled:cursor-not-allowed focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
757
- children: Cn.has(e.id) ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(Ie, {
757
+ children: wn.has(e.id) ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(Ie, {
758
758
  className: "size-3 animate-spin",
759
759
  "aria-hidden": "true"
760
760
  }), m("targets.starting", "Starting…")] }) : m("targets.terminal", "Terminal")
761
761
  }),
762
762
  e.type !== "DIRECT" && !t && /* @__PURE__ */ d("button", {
763
763
  type: "button",
764
- onClick: () => void On(e),
764
+ onClick: () => void kn(e),
765
765
  title: m("targets.installAgent", "Install agent"),
766
766
  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",
767
767
  children: m("targets.installAgent", "Install Agent")
@@ -784,9 +784,10 @@ function g() {
784
784
  className: "size-8 text-text-secondary",
785
785
  "aria-hidden": "true"
786
786
  }),
787
- title: Rn ? m("targets.emptyNoTargetsFound", "No targets found") : m("targets.emptyNoTargetsConfigured", "No targets configured"),
788
- description: Rn ? m("targets.emptyAdjustSearch", "Try adjusting your search or filters") : m("targets.emptyDescription", "Add a target to start managing servers, workstations, and environments."),
789
- action: Rn ? void 0 : /* @__PURE__ */ f("div", {
787
+ illustration: $ ? "empty-search" : "empty-generic",
788
+ title: $ ? m("targets.emptyNoTargetsFound", "No targets found") : m("targets.emptyNoTargetsConfigured", "No targets configured"),
789
+ description: $ ? m("targets.emptyAdjustSearch", "Try adjusting your search or filters") : m("targets.emptyDescription", "Add a target to start managing servers, workstations, and environments."),
790
+ action: $ ? void 0 : /* @__PURE__ */ f("div", {
790
791
  className: "flex flex-wrap items-center justify-center gap-2",
791
792
  children: [/* @__PURE__ */ f(p, {
792
793
  type: "button",
@@ -823,31 +824,31 @@ function g() {
823
824
  className: "grid grid-cols-2 gap-2",
824
825
  children: ["DIRECT", "SSH"].map((e) => /* @__PURE__ */ d("button", {
825
826
  type: "button",
826
- onClick: () => Ut(e),
827
- "aria-pressed": B === e,
828
- 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 ${B === e ? "border-action-primary-bg bg-action-primary-bg/10 text-action-primary-bg" : "border-border-default hover:bg-bg-sunken text-text-secondary"}`,
827
+ onClick: () => Wt(e),
828
+ "aria-pressed": z === e,
829
+ 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"}`,
829
830
  children: e
830
831
  }, e))
831
832
  }),
832
833
  /* @__PURE__ */ d("p", {
833
834
  className: "mt-1 text-xs text-text-muted",
834
- children: B === "DIRECT" ? m("targets.targetTypeDirectHint", "A local machine where you will install the agent manually.") : m("targets.targetTypeSshHint", "A remote server accessible via SSH.")
835
+ 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.")
835
836
  })
836
837
  ] }),
837
838
  /* @__PURE__ */ d(h, {
838
839
  label: m("webhooks.name", "Name"),
839
- value: V,
840
- onChange: Wt,
840
+ value: B,
841
+ onChange: Gt,
841
842
  requiredField: !0,
842
- placeholder: B === "DIRECT" ? m("targets.namePlaceholderDirect", "My Laptop") : m("targets.namePlaceholderServer", "Production Server")
843
+ placeholder: z === "DIRECT" ? m("targets.namePlaceholderDirect", "My Laptop") : m("targets.namePlaceholderServer", "Production Server")
843
844
  }),
844
845
  /* @__PURE__ */ d(h, {
845
846
  label: m("targets.descriptionOptional", "Description (optional)"),
846
- value: H,
847
- onChange: Gt,
847
+ value: V,
848
+ onChange: Kt,
848
849
  placeholder: m("targets.descriptionPlaceholder", "Brief description of this target")
849
850
  }),
850
- B !== "DIRECT" && /* @__PURE__ */ f(u, { children: [
851
+ z !== "DIRECT" && /* @__PURE__ */ f(u, { children: [
851
852
  /* @__PURE__ */ f("div", { children: [
852
853
  /* @__PURE__ */ d("label", {
853
854
  htmlFor: Bn.id,
@@ -856,14 +857,14 @@ function g() {
856
857
  }),
857
858
  /* @__PURE__ */ f("select", {
858
859
  ...Bn.inputProps,
859
- value: U,
860
- onChange: (e) => Kt(e.target.value),
860
+ value: H,
861
+ onChange: (e) => qt(e.target.value),
861
862
  "aria-required": "true",
862
863
  className: "w-full rounded-input border border-border-default bg-bg-elevated px-3 py-2 text-base md:text-sm",
863
864
  children: [/* @__PURE__ */ d("option", {
864
865
  value: "",
865
866
  children: m("targets.selectAgentConnectFrom", "Select an agent to connect from")
866
- }), Q.map((e) => /* @__PURE__ */ d("option", {
867
+ }), Z.map((e) => /* @__PURE__ */ d("option", {
867
868
  value: e.id,
868
869
  children: e.name
869
870
  }, e.id))]
@@ -878,54 +879,54 @@ function g() {
878
879
  className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
879
880
  children: [/* @__PURE__ */ d(h, {
880
881
  label: m("targets.host", "Host"),
881
- value: W,
882
- onChange: qt,
882
+ value: U,
883
+ onChange: Jt,
883
884
  requiredField: !0,
884
885
  placeholder: m("targets.hostPlaceholder", "192.168.1.100")
885
886
  }), /* @__PURE__ */ d(h, {
886
887
  label: m("tunnels.port", "Port"),
887
- value: Jt,
888
- onChange: (e) => Yt(Number(e)),
888
+ value: Yt,
889
+ onChange: (e) => Xt(Number(e)),
889
890
  type: "number"
890
891
  })]
891
892
  }),
892
893
  /* @__PURE__ */ d(h, {
893
894
  label: m("targets.username", "Username"),
894
- value: G,
895
- onChange: Xt,
895
+ value: W,
896
+ onChange: Zt,
896
897
  requiredField: !0,
897
898
  placeholder: m("targets.usernamePlaceholder", "root")
898
899
  }),
899
- B === "SSH" && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(lt, {
900
+ z === "SSH" && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(lt, {
900
901
  legend: m("targets.authentication", "Authentication"),
901
902
  name: `${pt}-add-auth`,
902
- value: K,
903
- onChange: Zt,
903
+ value: G,
904
+ onChange: Qt,
904
905
  passwordLabel: m("targets.password", "Password"),
905
906
  keyLabel: m("targets.privateKey", "Private Key")
906
- }), K === "password" ? /* @__PURE__ */ d(h, {
907
+ }), G === "password" ? /* @__PURE__ */ d(h, {
907
908
  label: m("targets.password", "Password"),
908
- value: Qt,
909
- onChange: $t,
909
+ value: $t,
910
+ onChange: en,
910
911
  type: "password",
911
912
  autoComplete: "new-password"
912
913
  }) : /* @__PURE__ */ d(h, {
913
914
  label: m("targets.privateKeyPath", "Private Key Path"),
914
- value: en,
915
- onChange: tn,
915
+ value: tn,
916
+ onChange: nn,
916
917
  placeholder: m("targets.privateKeyPathPlaceholder", "~/.ssh/id_rsa")
917
918
  })] })
918
919
  ] }),
919
920
  /* @__PURE__ */ d(h, {
920
921
  label: m("targets.labelOptional", "Label (optional)"),
921
- value: nn,
922
- onChange: rn,
922
+ value: rn,
923
+ onChange: an,
923
924
  placeholder: m("targets.labelPlaceholder", "web-server-01")
924
925
  }),
925
926
  /* @__PURE__ */ d(h, {
926
927
  label: m("targets.tagsCommaSeparated", "Tags (comma-separated)"),
927
- value: q,
928
- onChange: an,
928
+ value: K,
929
+ onChange: on,
929
930
  placeholder: m("targets.tagsPlaceholder", "production, web")
930
931
  }),
931
932
  /* @__PURE__ */ f("div", {
@@ -935,7 +936,7 @@ function g() {
935
936
  children: m("targets.tags", "Tags")
936
937
  }), /* @__PURE__ */ d(pe, {
937
938
  entityType: "VIBECONTROLS_TARGET",
938
- onDraftChange: ln
939
+ onDraftChange: un
939
940
  })]
940
941
  })
941
942
  ]
@@ -948,7 +949,7 @@ function g() {
948
949
  children: m("common.cancel", "Cancel")
949
950
  }), /* @__PURE__ */ d(p, {
950
951
  type: "button",
951
- onClick: () => void xn(),
952
+ onClick: () => void Sn(),
952
953
  className: "max-md:min-h-11",
953
954
  children: m("targets.addTarget", "Add Target")
954
955
  })] })
@@ -1016,22 +1017,22 @@ function g() {
1016
1017
  hint: m("targets.keepCredentialsHint", "Leave blank to keep existing credentials.")
1017
1018
  }), I === "password" ? /* @__PURE__ */ d(h, {
1018
1019
  label: m("targets.newPassword", "New Password"),
1019
- value: L,
1020
- onChange: Bt,
1020
+ value: Bt,
1021
+ onChange: Vt,
1021
1022
  type: "password",
1022
1023
  autoComplete: "new-password",
1023
1024
  placeholder: m("targets.keepCurrentPlaceholder", "Leave blank to keep current")
1024
1025
  }) : /* @__PURE__ */ d(h, {
1025
1026
  label: m("targets.newPrivateKeyPath", "New Private Key Path"),
1026
- value: R,
1027
- onChange: Vt,
1027
+ value: L,
1028
+ onChange: Ht,
1028
1029
  placeholder: m("targets.keepCurrentKeyPlaceholder", "Leave blank to keep current (~/.ssh/id_rsa)")
1029
1030
  })] })
1030
1031
  ] }),
1031
1032
  /* @__PURE__ */ d(h, {
1032
1033
  label: m("targets.tagsCommaSeparated", "Tags (comma-separated)"),
1033
- value: z,
1034
- onChange: Ht,
1034
+ value: R,
1035
+ onChange: Ut,
1035
1036
  placeholder: m("targets.tagsPlaceholder", "production, web")
1036
1037
  })
1037
1038
  ]
@@ -1045,7 +1046,7 @@ function g() {
1045
1046
  children: m("common.cancel", "Cancel")
1046
1047
  }), /* @__PURE__ */ d(p, {
1047
1048
  type: "button",
1048
- onClick: () => void jn(),
1049
+ onClick: () => void Mn(),
1049
1050
  disabled: P,
1050
1051
  "aria-busy": P,
1051
1052
  className: "max-md:min-h-11",
@@ -1057,7 +1058,7 @@ function g() {
1057
1058
  /* @__PURE__ */ d(re, {
1058
1059
  isOpen: !!T,
1059
1060
  onClose: () => E(null),
1060
- onConfirm: () => void En(),
1061
+ onConfirm: () => void Dn(),
1061
1062
  title: m("targets.deleteTarget", "Delete Target"),
1062
1063
  message: m("targets.deleteTargetMessage", "This will remove the target and its connection from the agent. Active terminals will be disconnected."),
1063
1064
  confirmLabel: m("common.delete", "Delete"),
@@ -1066,7 +1067,7 @@ function g() {
1066
1067
  /* @__PURE__ */ d(re, {
1067
1068
  isOpen: bt,
1068
1069
  onClose: () => xt(!1),
1069
- onConfirm: () => void Dn(),
1070
+ onConfirm: () => void On(),
1070
1071
  title: m("targets.deleteSelectedTargets", "Delete Selected Targets"),
1071
1072
  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.")}`,
1072
1073
  confirmLabel: m("targets.deleteAll", "Delete All"),
@@ -1075,7 +1076,7 @@ function g() {
1075
1076
  /* @__PURE__ */ d(Je, {
1076
1077
  open: A !== null,
1077
1078
  onOpenChange: (e) => {
1078
- !e && j?.status !== "running" && Mn();
1079
+ !e && j?.status !== "running" && Nn();
1079
1080
  },
1080
1081
  children: /* @__PURE__ */ d(Ye, {
1081
1082
  className: "sm:max-w-md",
@@ -1150,7 +1151,7 @@ function g() {
1150
1151
  /* @__PURE__ */ d(Ze, { children: /* @__PURE__ */ d(p, {
1151
1152
  type: "button",
1152
1153
  variant: "outline",
1153
- onClick: Mn,
1154
+ onClick: Nn,
1154
1155
  disabled: j?.status === "running",
1155
1156
  "aria-busy": j?.status === "running",
1156
1157
  className: "w-full max-md:min-h-11",