@burdenoff/microfe-vibecontrols 2026.520.1 → 2026.520.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,38 +5,38 @@ import { useI18n as r } from "@burdenoff/fe-libs/shared/providers/shell/I18nProv
5
5
  import { Check as i, CheckCircle2 as a, ChevronDown as o, ChevronLeft as ee, ChevronRight as s, Copy as te, Download as ne, Eye as re, EyeOff as ie, Loader2 as c, Plus as l, RefreshCw as u, Settings2 as ae, Terminal as oe, X as se, XCircle as d } from "lucide-react";
6
6
  import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
7
7
  //#region src/components/agents/AgentForm.tsx
8
- function h({ onSubmit: h, onCancel: g, isLoading: _, onNavigate: v, targets: y, targetsLoading: ce, onCreateTarget: b }) {
9
- let { t: le } = r(), x = (e, t) => {
8
+ function h({ onSubmit: h, onCancel: g, isLoading: _, onNavigate: v, targets: y, targetsLoading: b, onCreateTarget: x, extraSection: ce }) {
9
+ let { t: le } = r(), S = (e, t) => {
10
10
  let n = le(e);
11
11
  return n === e ? t : n;
12
- }, [S, C] = n("details"), [w, ue] = n(!1), [T, de] = n(!1), [fe, pe] = n(null), [E, me] = n(""), [D, O] = n(""), [k, A] = n(""), [j, M] = n(""), [N, P] = n(!1), [F, I] = n(""), [L, R] = n(!1), [z, B] = n(null), [V, H] = n(!1), [U, W] = n(null), [G, K] = n(null), [q, he] = n(""), [J, ge] = n("linux"), [_e, ve] = n("x86_64"), [ye, be] = n("1.0.0"), [xe, Y] = n(null), [X, Se] = n(!1), [Ce, we] = n("default"), Te = t((e, t) => {
13
- navigator.clipboard.writeText(e), pe(t), setTimeout(() => pe(null), 2e3);
14
- }, []), Ee = (e) => {
12
+ }, [C, w] = n("details"), [T, ue] = n(!1), [E, de] = n(!1), [fe, D] = n(null), [O, pe] = n(""), [k, A] = n(""), [j, M] = n(""), [N, P] = n(""), [F, I] = n(!1), [L, R] = n(""), [z, B] = n(!1), [V, H] = n(null), [U, me] = n(!1), [W, G] = n(null), [K, q] = n(null), [J, he] = n(""), [ge, _e] = n("linux"), [ve, ye] = n("x86_64"), [be, xe] = n("1.0.0"), [Se, Y] = n(null), [X, Ce] = n(!1), [we, Te] = n("default"), Ee = t((e, t) => {
13
+ navigator.clipboard.writeText(e), D(t), setTimeout(() => D(null), 2e3);
14
+ }, []), De = (e) => {
15
15
  let t = e.trim();
16
16
  return t.endsWith("/") && (t = t.slice(0, -1)), t;
17
- }, De = async () => {
18
- let e = Ee(D);
19
- e && (H(!0), W(null), K(null), await Promise.all([(async () => {
17
+ }, Oe = async () => {
18
+ let e = De(k);
19
+ e && (me(!0), G(null), q(null), await Promise.all([(async () => {
20
20
  try {
21
21
  let t = await fetch(`${e}/health`, { signal: AbortSignal.timeout(1e4) });
22
22
  if (!t.ok) {
23
- W({
23
+ G({
24
24
  ok: !1,
25
25
  error: `HTTP ${String(t.status)}: ${t.statusText}`
26
26
  });
27
27
  return;
28
28
  }
29
29
  let n = await t.json();
30
- W({
30
+ G({
31
31
  ok: !0,
32
32
  data: {
33
33
  status: n.status || "healthy",
34
34
  version: n.version || "unknown",
35
35
  uptime: n.uptime || 0
36
36
  }
37
- }), n.version && be(n.version);
37
+ }), n.version && xe(n.version);
38
38
  } catch (e) {
39
- W({
39
+ G({
40
40
  ok: !1,
41
41
  error: e instanceof DOMException && e.name === "AbortError" ? "Health check timed out after 10s" : e instanceof Error ? e.message : "Health check failed"
42
42
  });
@@ -44,47 +44,47 @@ function h({ onSubmit: h, onCancel: g, isLoading: _, onNavigate: v, targets: y,
44
44
  })(), (async () => {
45
45
  try {
46
46
  let t = {};
47
- k && (t["x-agent-api-key"] = k);
47
+ j && (t["x-agent-api-key"] = j);
48
48
  let n = await fetch(`${e}/api/profiles/default/agent/identity`, {
49
49
  headers: t,
50
50
  signal: AbortSignal.timeout(1e4)
51
51
  });
52
52
  if (!n.ok) {
53
- K({
53
+ q({
54
54
  ok: !1,
55
55
  error: n.status === 401 ? "Invalid API key" : `HTTP ${String(n.status)}: ${n.statusText}`
56
56
  });
57
57
  return;
58
58
  }
59
59
  let r = await n.json(), i = r.hostname || "", a = r.platform || "linux", o = r.arch || "x86_64";
60
- K({
60
+ q({
61
61
  ok: !0,
62
62
  data: {
63
63
  hostname: i,
64
64
  platform: a,
65
65
  arch: o
66
66
  }
67
- }), i && he(i), a && ge(a), o && ve(o), !E && i && me(i);
67
+ }), i && he(i), a && _e(a), o && ye(o), !O && i && pe(i);
68
68
  } catch (e) {
69
- K({
69
+ q({
70
70
  ok: !1,
71
71
  error: e instanceof DOMException && e.name === "AbortError" ? "Identity check timed out after 10s" : e instanceof Error ? e.message : "Identity check failed"
72
72
  });
73
73
  }
74
- })()]), H(!1));
75
- }, Oe = async () => {
74
+ })()]), me(!1));
75
+ }, ke = async () => {
76
76
  Y(null);
77
- let e = Ce.trim() || "default", t = {
78
- name: E || q || "Unnamed Agent",
79
- hostname: q || "unknown",
80
- platform: J,
81
- architecture: _e,
82
- version: ye,
83
- tunnelUrl: Ee(D),
77
+ let e = we.trim() || "default", t = {
78
+ name: O || J || "Unnamed Agent",
79
+ hostname: J || "unknown",
80
+ platform: ge,
81
+ architecture: ve,
82
+ version: be,
83
+ tunnelUrl: De(k),
84
84
  tunnelStatus: "ACTIVE",
85
- agentApiKey: k,
85
+ agentApiKey: j,
86
86
  metadata: { profile: e },
87
- ...j ? { targetId: j } : {}
87
+ ...N ? { targetId: N } : {}
88
88
  };
89
89
  try {
90
90
  let e = (await h(t))?.id || null;
@@ -96,27 +96,27 @@ function h({ onSubmit: h, onCancel: g, isLoading: _, onNavigate: v, targets: y,
96
96
  } catch (e) {
97
97
  Y(e instanceof Error ? e.message : "Failed to create agent");
98
98
  }
99
- }, ke = U?.ok && G?.ok, Z = y && y.length > 0, Ae = (b || Z) && j.length === 0, je = D.trim().length > 0 && !Ae, Me = t(async () => {
100
- if (!(!b || !F.trim())) {
101
- R(!0), B(null);
99
+ }, Ae = W?.ok && K?.ok, Z = y && y.length > 0, je = (x || Z) && N.length === 0, Me = k.trim().length > 0 && !je, Ne = t(async () => {
100
+ if (!(!x || !L.trim())) {
101
+ B(!0), H(null);
102
102
  try {
103
- let e = await b(F.trim());
104
- e ? (M(e.id), P(!1), I("")) : B(x("agentsPage.inlineTargetFailed", "Failed to create target. Please try again."));
103
+ let e = await x(L.trim());
104
+ e ? (P(e.id), I(!1), R("")) : H(S("agentsPage.inlineTargetFailed", "Failed to create target. Please try again."));
105
105
  } catch (e) {
106
- B(e instanceof Error ? e.message : "Failed to create target");
106
+ H(e instanceof Error ? e.message : "Failed to create target");
107
107
  } finally {
108
- R(!1);
108
+ B(!1);
109
109
  }
110
110
  }
111
111
  }, [
112
- b,
113
- F,
114
- x
115
- ]), Ne = ({ text: e, id: t }) => /* @__PURE__ */ p("button", {
112
+ x,
113
+ L,
114
+ S
115
+ ]), Pe = ({ text: e, id: t }) => /* @__PURE__ */ p("button", {
116
116
  type: "button",
117
- onClick: () => Te(e, t),
117
+ onClick: () => Ee(e, t),
118
118
  className: "p-1 rounded hover:bg-bg-elevated transition-colors",
119
- title: x("agentsPage.copy", "Copy"),
119
+ title: S("agentsPage.copy", "Copy"),
120
120
  children: fe === t ? /* @__PURE__ */ p(i, { className: "w-3.5 h-3.5 text-status-success-text" }) : /* @__PURE__ */ p(te, { className: "w-3.5 h-3.5 text-text-secondary" })
121
121
  }), Q = [{
122
122
  key: "details",
@@ -124,7 +124,7 @@ function h({ onSubmit: h, onCancel: g, isLoading: _, onNavigate: v, targets: y,
124
124
  }, {
125
125
  key: "validate",
126
126
  label: "Validate"
127
- }], $ = Q.findIndex((e) => e.key === S);
127
+ }], $ = Q.findIndex((e) => e.key === C);
128
128
  return /* @__PURE__ */ p("div", {
129
129
  className: "fixed inset-0 z-50 flex items-center justify-center bg-bg-overlay",
130
130
  children: /* @__PURE__ */ m("div", {
@@ -134,7 +134,7 @@ function h({ onSubmit: h, onCancel: g, isLoading: _, onNavigate: v, targets: y,
134
134
  className: "flex items-center justify-between px-6 py-4 border-b border-border-default sticky top-0 bg-bg-surface z-10",
135
135
  children: [/* @__PURE__ */ p("h2", {
136
136
  className: "text-lg font-semibold text-text-primary",
137
- children: x("agentsPage.addNewAgent", "Add New Agent")
137
+ children: S("agentsPage.addNewAgent", "Add New Agent")
138
138
  }), /* @__PURE__ */ p("button", {
139
139
  onClick: g,
140
140
  className: "p-1 rounded hover:bg-bg-sunken transition-colors",
@@ -160,41 +160,41 @@ function h({ onSubmit: h, onCancel: g, isLoading: _, onNavigate: v, targets: y,
160
160
  }),
161
161
  /* @__PURE__ */ m("div", {
162
162
  className: "p-6",
163
- children: [S === "details" && /* @__PURE__ */ m("div", {
163
+ children: [C === "details" && /* @__PURE__ */ m("div", {
164
164
  className: "space-y-4",
165
165
  children: [
166
166
  /* @__PURE__ */ m("div", {
167
167
  className: "border border-border-default rounded-lg overflow-hidden",
168
168
  children: [/* @__PURE__ */ m("button", {
169
169
  type: "button",
170
- onClick: () => de(!T),
170
+ onClick: () => de(!E),
171
171
  className: "w-full flex items-center justify-between px-4 py-3 bg-bg-sunken hover:bg-bg-sunken/80 transition-colors",
172
172
  children: [/* @__PURE__ */ m("div", {
173
173
  className: "flex items-center gap-2",
174
174
  children: [/* @__PURE__ */ p(ne, { className: "w-4 h-4 text-action-primary-bg" }), /* @__PURE__ */ p("span", {
175
175
  className: "text-sm font-medium text-text-primary",
176
- children: x("agentsPage.installInstructions", "Agent Install Instructions")
176
+ children: S("agentsPage.installInstructions", "Agent Install Instructions")
177
177
  })]
178
- }), /* @__PURE__ */ p(s, { className: `w-4 h-4 text-text-secondary transition-transform ${T ? "rotate-90" : ""}` })]
179
- }), T && /* @__PURE__ */ p("div", {
178
+ }), /* @__PURE__ */ p(s, { className: `w-4 h-4 text-text-secondary transition-transform ${E ? "rotate-90" : ""}` })]
179
+ }), E && /* @__PURE__ */ p("div", {
180
180
  className: "px-4 py-3 space-y-3 border-t border-border-default",
181
181
  children: /* @__PURE__ */ p("div", {
182
182
  className: "space-y-2",
183
183
  children: [
184
184
  {
185
- label: x("agentsPage.installStep1", "1. Install the agent CLI"),
185
+ label: S("agentsPage.installStep1", "1. Install the agent CLI"),
186
186
  cmd: "npm install -g @vibecontrols/agent@latest"
187
187
  },
188
188
  {
189
- label: x("agentsPage.installStep2", "2. Start the agent"),
189
+ label: S("agentsPage.installStep2", "2. Start the agent"),
190
190
  cmd: "vibe start"
191
191
  },
192
192
  {
193
- label: x("agentsPage.installStep3", "3. Get the API key"),
193
+ label: S("agentsPage.installStep3", "3. Get the API key"),
194
194
  cmd: "vibe key"
195
195
  },
196
196
  {
197
- label: x("agentsPage.installStep4", "4. Start the tunnel"),
197
+ label: S("agentsPage.installStep4", "4. Start the tunnel"),
198
198
  cmd: "vibe tunnel agent --start"
199
199
  }
200
200
  ].map((e) => /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
@@ -208,7 +208,7 @@ function h({ onSubmit: h, onCancel: g, isLoading: _, onNavigate: v, targets: y,
208
208
  className: "flex-1",
209
209
  children: e.cmd
210
210
  }),
211
- /* @__PURE__ */ p(Ne, {
211
+ /* @__PURE__ */ p(Pe, {
212
212
  text: e.cmd,
213
213
  id: e.cmd
214
214
  })
@@ -221,7 +221,7 @@ function h({ onSubmit: h, onCancel: g, isLoading: _, onNavigate: v, targets: y,
221
221
  /* @__PURE__ */ m("label", {
222
222
  className: "block text-sm font-medium text-text-primary mb-1",
223
223
  children: [
224
- x("agentsPage.target", "Target"),
224
+ S("agentsPage.target", "Target"),
225
225
  " ",
226
226
  /* @__PURE__ */ p("span", {
227
227
  className: "text-status-error-text",
@@ -229,97 +229,97 @@ function h({ onSubmit: h, onCancel: g, isLoading: _, onNavigate: v, targets: y,
229
229
  })
230
230
  ]
231
231
  }),
232
- Z && !N && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(e, {
233
- placeholder: x("agentsPage.selectTarget", "Select a target..."),
234
- searchPlaceholder: x("agentsPage.searchTargets", "Search targets..."),
232
+ Z && !F && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(e, {
233
+ placeholder: S("agentsPage.selectTarget", "Select a target..."),
234
+ searchPlaceholder: S("agentsPage.searchTargets", "Search targets..."),
235
235
  options: (y ?? []).map((e) => ({
236
236
  value: e.id,
237
237
  label: e.name,
238
238
  description: `${e.type}${e.status ? ` · ${e.status}` : ""}`
239
239
  })),
240
- value: j,
241
- onChange: M,
240
+ value: N,
241
+ onChange: P,
242
242
  clearable: !0
243
243
  }), /* @__PURE__ */ m("p", {
244
244
  className: "mt-1 text-xs text-text-muted",
245
245
  children: [
246
- x("agentsPage.targetDescription", "The target machine this agent will be installed on."),
246
+ S("agentsPage.targetDescription", "The target machine this agent will be installed on."),
247
247
  " ",
248
- b && /* @__PURE__ */ m("button", {
248
+ x && /* @__PURE__ */ m("button", {
249
249
  type: "button",
250
250
  onClick: () => {
251
- P(!0), I(E.trim() || "");
251
+ I(!0), R(O.trim() || "");
252
252
  },
253
253
  className: "text-action-primary-bg hover:underline inline-flex items-center gap-1",
254
- children: [/* @__PURE__ */ p(l, { className: "w-3 h-3" }), x("agentsPage.createNewTarget", "Create a new target")]
254
+ children: [/* @__PURE__ */ p(l, { className: "w-3 h-3" }), S("agentsPage.createNewTarget", "Create a new target")]
255
255
  })
256
256
  ]
257
257
  })] }),
258
- !Z && !ce && b && !N && /* @__PURE__ */ m("div", {
258
+ !Z && !b && x && !F && /* @__PURE__ */ m("div", {
259
259
  className: "p-3 bg-bg-sunken border border-border-default rounded-lg",
260
260
  children: [/* @__PURE__ */ p("p", {
261
261
  className: "text-sm text-text-secondary mb-2",
262
- children: x("agentsPage.noTargetsInlinePrompt", "You don't have any targets yet. Create one now to install this agent on it.")
262
+ children: S("agentsPage.noTargetsInlinePrompt", "You don't have any targets yet. Create one now to install this agent on it.")
263
263
  }), /* @__PURE__ */ m("button", {
264
264
  type: "button",
265
265
  onClick: () => {
266
- P(!0), I(E.trim() || "");
266
+ I(!0), R(O.trim() || "");
267
267
  },
268
268
  className: "inline-flex items-center gap-1.5 px-3 py-1.5 text-sm bg-action-primary-bg text-action-primary-text rounded-md hover:opacity-90",
269
- children: [/* @__PURE__ */ p(l, { className: "w-4 h-4" }), x("agentsPage.createFirstTarget", "Create first target")]
269
+ children: [/* @__PURE__ */ p(l, { className: "w-4 h-4" }), S("agentsPage.createFirstTarget", "Create first target")]
270
270
  })]
271
271
  }),
272
- N && b && /* @__PURE__ */ m("div", {
272
+ F && x && /* @__PURE__ */ m("div", {
273
273
  className: "p-3 bg-bg-sunken border border-border-default rounded-lg space-y-2",
274
274
  children: [
275
275
  /* @__PURE__ */ p("p", {
276
276
  className: "text-xs font-medium text-text-secondary",
277
- children: x("agentsPage.newDirectTarget", "New target (Direct — you can change the type later)")
277
+ children: S("agentsPage.newDirectTarget", "New target (Direct — you can change the type later)")
278
278
  }),
279
279
  /* @__PURE__ */ p("input", {
280
280
  type: "text",
281
- value: F,
282
- onChange: (e) => I(e.target.value),
283
- placeholder: x("agentsPage.targetName", "Target name"),
281
+ value: L,
282
+ onChange: (e) => R(e.target.value),
283
+ placeholder: S("agentsPage.targetName", "Target name"),
284
284
  className: "w-full px-3 py-2 text-sm bg-bg-elevated border border-border-default rounded-md text-text-primary placeholder-text-placeholder focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
285
285
  autoFocus: !0,
286
286
  onKeyDown: (e) => {
287
- e.key === "Enter" && (e.preventDefault(), Me());
287
+ e.key === "Enter" && (e.preventDefault(), Ne());
288
288
  }
289
289
  }),
290
- z && /* @__PURE__ */ p("p", {
290
+ V && /* @__PURE__ */ p("p", {
291
291
  className: "text-xs text-status-error-text",
292
- children: z
292
+ children: V
293
293
  }),
294
294
  /* @__PURE__ */ m("div", {
295
295
  className: "flex items-center gap-2",
296
296
  children: [/* @__PURE__ */ m("button", {
297
297
  type: "button",
298
- onClick: () => void Me(),
299
- disabled: !F.trim() || L,
298
+ onClick: () => void Ne(),
299
+ disabled: !L.trim() || z,
300
300
  className: "inline-flex items-center gap-1.5 px-3 py-1.5 text-sm bg-action-primary-bg text-action-primary-text rounded-md hover:opacity-90 disabled:opacity-50",
301
- children: [L ? /* @__PURE__ */ p(c, { className: "w-3.5 h-3.5 animate-spin" }) : /* @__PURE__ */ p(i, { className: "w-3.5 h-3.5" }), x("agentsPage.create", "Create")]
301
+ children: [z ? /* @__PURE__ */ p(c, { className: "w-3.5 h-3.5 animate-spin" }) : /* @__PURE__ */ p(i, { className: "w-3.5 h-3.5" }), S("agentsPage.create", "Create")]
302
302
  }), /* @__PURE__ */ p("button", {
303
303
  type: "button",
304
304
  onClick: () => {
305
- P(!1), I(""), B(null);
305
+ I(!1), R(""), H(null);
306
306
  },
307
307
  className: "px-3 py-1.5 text-sm text-text-secondary hover:text-text-primary",
308
- children: x("agentsPage.cancel", "Cancel")
308
+ children: S("agentsPage.cancel", "Cancel")
309
309
  })]
310
310
  })
311
311
  ]
312
312
  }),
313
- ce && !Z && /* @__PURE__ */ m("div", {
313
+ b && !Z && /* @__PURE__ */ m("div", {
314
314
  className: "p-3 bg-bg-sunken border border-border-default rounded-lg flex items-center gap-2 text-sm text-text-secondary",
315
- children: [/* @__PURE__ */ p(c, { className: "w-4 h-4 animate-spin" }), x("agentsPage.loadingTargets", "Loading targets...")]
315
+ children: [/* @__PURE__ */ p(c, { className: "w-4 h-4 animate-spin" }), S("agentsPage.loadingTargets", "Loading targets...")]
316
316
  })
317
317
  ] }),
318
318
  /* @__PURE__ */ m("div", { children: [
319
319
  /* @__PURE__ */ m("label", {
320
320
  className: "block text-sm font-medium text-text-primary mb-1",
321
321
  children: [
322
- x("agentsPage.apiTunnelUrl", "API / Tunnel URL"),
322
+ S("agentsPage.apiTunnelUrl", "API / Tunnel URL"),
323
323
  " ",
324
324
  /* @__PURE__ */ p("span", {
325
325
  className: "text-status-error-text",
@@ -329,22 +329,22 @@ function h({ onSubmit: h, onCancel: g, isLoading: _, onNavigate: v, targets: y,
329
329
  }),
330
330
  /* @__PURE__ */ p("input", {
331
331
  type: "url",
332
- value: D,
333
- onChange: (e) => O(e.target.value),
332
+ value: k,
333
+ onChange: (e) => A(e.target.value),
334
334
  placeholder: "https://your-tunnel.trycloudflare.com",
335
335
  required: !0,
336
336
  className: "w-full px-3 py-2 text-sm bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-action-primary-bg font-mono"
337
337
  }),
338
338
  /* @__PURE__ */ p("p", {
339
339
  className: "mt-1 text-xs text-text-muted",
340
- children: x("agentsPage.tunnelUrlHint", "The agent's tunnel URL or local API URL (e.g. http://localhost:3005)")
340
+ children: S("agentsPage.tunnelUrlHint", "The agent's tunnel URL or local API URL (e.g. http://localhost:3005)")
341
341
  })
342
342
  ] }),
343
343
  /* @__PURE__ */ m("div", { children: [
344
344
  /* @__PURE__ */ m("label", {
345
345
  className: "block text-sm font-medium text-text-primary mb-1",
346
346
  children: [
347
- x("agentsPage.agentApiKey", "Agent API Key"),
347
+ S("agentsPage.agentApiKey", "Agent API Key"),
348
348
  " ",
349
349
  /* @__PURE__ */ p("span", {
350
350
  className: "text-status-error-text",
@@ -355,30 +355,30 @@ function h({ onSubmit: h, onCancel: g, isLoading: _, onNavigate: v, targets: y,
355
355
  /* @__PURE__ */ m("div", {
356
356
  className: "relative",
357
357
  children: [/* @__PURE__ */ p("input", {
358
- type: w ? "text" : "password",
359
- value: k,
360
- onChange: (e) => A(e.target.value),
358
+ type: T ? "text" : "password",
359
+ value: j,
360
+ onChange: (e) => M(e.target.value),
361
361
  placeholder: "vcak_...",
362
362
  required: !0,
363
363
  className: "w-full px-3 py-2 pr-10 text-sm bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-action-primary-bg font-mono"
364
364
  }), /* @__PURE__ */ p("button", {
365
365
  type: "button",
366
- onClick: () => ue(!w),
366
+ onClick: () => ue(!T),
367
367
  className: "absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-bg-elevated transition-colors",
368
- children: p(w ? ie : re, { className: "w-4 h-4 text-text-secondary" })
368
+ children: p(T ? ie : re, { className: "w-4 h-4 text-text-secondary" })
369
369
  })]
370
370
  }),
371
371
  /* @__PURE__ */ m("p", {
372
372
  className: "mt-1 text-xs text-text-muted",
373
373
  children: [
374
- x("agentsPage.apiKeyHint", "Run"),
374
+ S("agentsPage.apiKeyHint", "Run"),
375
375
  " ",
376
376
  /* @__PURE__ */ p("code", {
377
377
  className: "bg-bg-sunken px-1 rounded",
378
378
  children: "vibe key"
379
379
  }),
380
380
  " ",
381
- x("agentsPage.apiKeyHintSuffix", "on the agent to get this. Changes on restart.")
381
+ S("agentsPage.apiKeyHintSuffix", "on the agent to get this. Changes on restart.")
382
382
  ]
383
383
  })
384
384
  ] }),
@@ -386,7 +386,7 @@ function h({ onSubmit: h, onCancel: g, isLoading: _, onNavigate: v, targets: y,
386
386
  className: "border border-border-default rounded-lg overflow-hidden",
387
387
  children: [/* @__PURE__ */ m("button", {
388
388
  type: "button",
389
- onClick: () => Se((e) => !e),
389
+ onClick: () => Ce((e) => !e),
390
390
  className: "w-full flex items-center justify-between px-4 py-2.5 bg-bg-sunken hover:bg-bg-sunken/80 transition-colors",
391
391
  "aria-expanded": X,
392
392
  "data-testid": "agent-form-advanced-toggle",
@@ -394,7 +394,7 @@ function h({ onSubmit: h, onCancel: g, isLoading: _, onNavigate: v, targets: y,
394
394
  className: "flex items-center gap-2",
395
395
  children: [/* @__PURE__ */ p(ae, { className: "w-4 h-4 text-text-secondary" }), /* @__PURE__ */ p("span", {
396
396
  className: "text-sm font-medium text-text-primary",
397
- children: x("agentsPage.advancedOptions", "Advanced options")
397
+ children: S("agentsPage.advancedOptions", "Advanced options")
398
398
  })]
399
399
  }), /* @__PURE__ */ p(o, { className: `w-4 h-4 text-text-secondary transition-transform ${X ? "rotate-180" : ""}` })]
400
400
  }), X && /* @__PURE__ */ p("div", {
@@ -402,133 +402,137 @@ function h({ onSubmit: h, onCancel: g, isLoading: _, onNavigate: v, targets: y,
402
402
  children: /* @__PURE__ */ m("div", { children: [
403
403
  /* @__PURE__ */ p("label", {
404
404
  className: "block text-sm font-medium text-text-primary mb-1",
405
- children: x("agentsPage.profileName", "Profile name")
405
+ children: S("agentsPage.profileName", "Profile name")
406
406
  }),
407
407
  /* @__PURE__ */ p("input", {
408
408
  type: "text",
409
- value: Ce,
410
- onChange: (e) => we(e.target.value),
409
+ value: we,
410
+ onChange: (e) => Te(e.target.value),
411
411
  placeholder: "default",
412
412
  className: "w-full px-3 py-2 text-sm bg-bg-surface border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-action-primary-bg font-mono",
413
413
  "data-testid": "agent-form-profile-input"
414
414
  }),
415
415
  /* @__PURE__ */ p("p", {
416
416
  className: "mt-1 text-xs text-text-muted",
417
- children: x("agentsPage.profileNameHint", "Each profile runs an isolated CLI on the daemon. Leave as \"default\" unless you want this agent to host multiple parallel profiles.")
417
+ children: S("agentsPage.profileNameHint", "Each profile runs an isolated CLI on the daemon. Leave as \"default\" unless you want this agent to host multiple parallel profiles.")
418
418
  })
419
419
  ] })
420
420
  })]
421
421
  }),
422
+ ce && /* @__PURE__ */ p("div", {
423
+ className: "border-t border-border-default pt-4 mt-4",
424
+ children: ce
425
+ }),
422
426
  /* @__PURE__ */ m("div", {
423
427
  className: "flex items-center justify-between pt-4",
424
428
  children: [/* @__PURE__ */ p("button", {
425
429
  type: "button",
426
430
  onClick: g,
427
431
  className: "px-4 py-2 text-sm font-medium text-text-primary bg-bg-sunken border border-border-default rounded-md hover:bg-bg-elevated transition-colors",
428
- children: x("agentsPage.cancel", "Cancel")
432
+ children: S("agentsPage.cancel", "Cancel")
429
433
  }), /* @__PURE__ */ m("button", {
430
434
  type: "button",
431
- disabled: !je,
435
+ disabled: !Me,
432
436
  onClick: () => {
433
- C("validate"), De();
437
+ w("validate"), Oe();
434
438
  },
435
439
  className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg rounded-md hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50",
436
- children: [x("agentsPage.nextValidate", "Next: Validate"), /* @__PURE__ */ p(s, { className: "w-4 h-4" })]
440
+ children: [S("agentsPage.nextValidate", "Next: Validate"), /* @__PURE__ */ p(s, { className: "w-4 h-4" })]
437
441
  })]
438
442
  })
439
443
  ]
440
- }), S === "validate" && /* @__PURE__ */ m("div", {
444
+ }), C === "validate" && /* @__PURE__ */ m("div", {
441
445
  className: "space-y-4",
442
446
  children: [
443
447
  /* @__PURE__ */ m("div", {
444
448
  className: "space-y-3",
445
449
  children: [/* @__PURE__ */ m("div", {
446
- className: `flex items-center gap-3 p-3 rounded-lg border ${U === null ? "border-border-default bg-bg-sunken" : U.ok ? "border-status-success-text/20 bg-status-success-bg/30" : "border-status-error-text/20 bg-status-error-bg/30"}`,
447
- children: [V && !U ? /* @__PURE__ */ p(c, { className: "w-5 h-5 text-text-secondary animate-spin" }) : U?.ok ? /* @__PURE__ */ p(a, { className: "w-5 h-5 text-status-success-text" }) : U ? /* @__PURE__ */ p(d, { className: "w-5 h-5 text-status-error-text" }) : /* @__PURE__ */ p("div", { className: "w-5 h-5 rounded-full border-2 border-border-default" }), /* @__PURE__ */ m("div", {
450
+ className: `flex items-center gap-3 p-3 rounded-lg border ${W === null ? "border-border-default bg-bg-sunken" : W.ok ? "border-status-success-text/20 bg-status-success-bg/30" : "border-status-error-text/20 bg-status-error-bg/30"}`,
451
+ children: [U && !W ? /* @__PURE__ */ p(c, { className: "w-5 h-5 text-text-secondary animate-spin" }) : W?.ok ? /* @__PURE__ */ p(a, { className: "w-5 h-5 text-status-success-text" }) : W ? /* @__PURE__ */ p(d, { className: "w-5 h-5 text-status-error-text" }) : /* @__PURE__ */ p("div", { className: "w-5 h-5 rounded-full border-2 border-border-default" }), /* @__PURE__ */ m("div", {
448
452
  className: "flex-1",
449
453
  children: [
450
454
  /* @__PURE__ */ p("p", {
451
455
  className: "text-sm font-medium text-text-primary",
452
- children: x("agentsPage.healthCheck", "Health Check")
456
+ children: S("agentsPage.healthCheck", "Health Check")
453
457
  }),
454
- U?.ok && U.data && /* @__PURE__ */ m("p", {
458
+ W?.ok && W.data && /* @__PURE__ */ m("p", {
455
459
  className: "text-xs text-text-secondary",
456
460
  children: [
457
461
  "Status: ",
458
- U.data.status,
462
+ W.data.status,
459
463
  " | Version: ",
460
- U.data.version,
464
+ W.data.version,
461
465
  " | Uptime: ",
462
- Math.round(U.data.uptime),
466
+ Math.round(W.data.uptime),
463
467
  "s"
464
468
  ]
465
469
  }),
466
- U && !U.ok && /* @__PURE__ */ p("p", {
470
+ W && !W.ok && /* @__PURE__ */ p("p", {
467
471
  className: "text-xs text-status-error-text",
468
- children: U.error
472
+ children: W.error
469
473
  })
470
474
  ]
471
475
  })]
472
476
  }), /* @__PURE__ */ m("div", {
473
- className: `flex items-center gap-3 p-3 rounded-lg border ${G === null ? "border-border-default bg-bg-sunken" : G.ok ? "border-status-success-text/20 bg-status-success-bg/30" : "border-status-error-text/20 bg-status-error-bg/30"}`,
474
- children: [V && !G ? /* @__PURE__ */ p(c, { className: "w-5 h-5 text-text-secondary animate-spin" }) : G?.ok ? /* @__PURE__ */ p(a, { className: "w-5 h-5 text-status-success-text" }) : G ? /* @__PURE__ */ p(d, { className: "w-5 h-5 text-status-error-text" }) : /* @__PURE__ */ p("div", { className: "w-5 h-5 rounded-full border-2 border-border-default" }), /* @__PURE__ */ m("div", {
477
+ className: `flex items-center gap-3 p-3 rounded-lg border ${K === null ? "border-border-default bg-bg-sunken" : K.ok ? "border-status-success-text/20 bg-status-success-bg/30" : "border-status-error-text/20 bg-status-error-bg/30"}`,
478
+ children: [U && !K ? /* @__PURE__ */ p(c, { className: "w-5 h-5 text-text-secondary animate-spin" }) : K?.ok ? /* @__PURE__ */ p(a, { className: "w-5 h-5 text-status-success-text" }) : K ? /* @__PURE__ */ p(d, { className: "w-5 h-5 text-status-error-text" }) : /* @__PURE__ */ p("div", { className: "w-5 h-5 rounded-full border-2 border-border-default" }), /* @__PURE__ */ m("div", {
475
479
  className: "flex-1",
476
480
  children: [
477
481
  /* @__PURE__ */ p("p", {
478
482
  className: "text-sm font-medium text-text-primary",
479
- children: x("agentsPage.apiAccess", "API Access")
483
+ children: S("agentsPage.apiAccess", "API Access")
480
484
  }),
481
- G?.ok && G.data && /* @__PURE__ */ m("p", {
485
+ K?.ok && K.data && /* @__PURE__ */ m("p", {
482
486
  className: "text-xs text-text-secondary",
483
487
  children: [
484
488
  "Host: ",
485
- G.data.hostname,
489
+ K.data.hostname,
486
490
  " | ",
487
- G.data.platform,
491
+ K.data.platform,
488
492
  " /",
489
493
  " ",
490
- G.data.arch
494
+ K.data.arch
491
495
  ]
492
496
  }),
493
- G && !G.ok && /* @__PURE__ */ p("p", {
497
+ K && !K.ok && /* @__PURE__ */ p("p", {
494
498
  className: "text-xs text-status-error-text",
495
- children: G.error
499
+ children: K.error
496
500
  })
497
501
  ]
498
502
  })]
499
503
  })]
500
504
  }),
501
- !V && (!U?.ok || !G?.ok) && /* @__PURE__ */ m("button", {
505
+ !U && (!W?.ok || !K?.ok) && /* @__PURE__ */ m("button", {
502
506
  type: "button",
503
- onClick: De,
507
+ onClick: Oe,
504
508
  className: "flex items-center gap-2 px-3 py-1.5 text-sm text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-md transition-colors",
505
- children: [/* @__PURE__ */ p(u, { className: "w-3.5 h-3.5" }), x("agentsPage.retryValidation", "Retry validation")]
509
+ children: [/* @__PURE__ */ p(u, { className: "w-3.5 h-3.5" }), S("agentsPage.retryValidation", "Retry validation")]
506
510
  }),
507
- ke && /* @__PURE__ */ m("div", {
511
+ Ae && /* @__PURE__ */ m("div", {
508
512
  className: "space-y-3 pt-2",
509
513
  children: [
510
514
  /* @__PURE__ */ p("p", {
511
515
  className: "text-sm font-medium text-text-primary",
512
- children: x("agentsPage.detectedAgentInfo", "Detected Agent Info")
516
+ children: S("agentsPage.detectedAgentInfo", "Detected Agent Info")
513
517
  }),
514
518
  /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
515
519
  className: "block text-xs font-medium text-text-secondary mb-1",
516
- children: x("agentsPage.name", "Name")
520
+ children: S("agentsPage.name", "Name")
517
521
  }), /* @__PURE__ */ p("input", {
518
522
  type: "text",
519
- value: E,
520
- onChange: (e) => me(e.target.value),
521
- placeholder: q,
523
+ value: O,
524
+ onChange: (e) => pe(e.target.value),
525
+ placeholder: J,
522
526
  className: "w-full px-3 py-1.5 text-sm bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-action-primary-bg"
523
527
  })] }),
524
528
  /* @__PURE__ */ m("div", {
525
529
  className: "grid grid-cols-2 gap-3",
526
530
  children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
527
531
  className: "block text-xs font-medium text-text-secondary mb-1",
528
- children: x("agentsPage.platform", "Platform")
532
+ children: S("agentsPage.platform", "Platform")
529
533
  }), /* @__PURE__ */ m("select", {
530
- value: J,
531
- onChange: (e) => ge(e.target.value),
534
+ value: ge,
535
+ onChange: (e) => _e(e.target.value),
532
536
  className: "w-full px-3 py-1.5 text-sm bg-bg-sunken border border-border-default rounded-md text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
533
537
  children: [
534
538
  /* @__PURE__ */ p("option", {
@@ -546,10 +550,10 @@ function h({ onSubmit: h, onCancel: g, isLoading: _, onNavigate: v, targets: y,
546
550
  ]
547
551
  })] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
548
552
  className: "block text-xs font-medium text-text-secondary mb-1",
549
- children: x("agentsPage.architecture", "Architecture")
553
+ children: S("agentsPage.architecture", "Architecture")
550
554
  }), /* @__PURE__ */ m("select", {
551
- value: _e,
552
- onChange: (e) => ve(e.target.value),
555
+ value: ve,
556
+ onChange: (e) => ye(e.target.value),
553
557
  className: "w-full px-3 py-1.5 text-sm bg-bg-sunken border border-border-default rounded-md text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
554
558
  children: [
555
559
  /* @__PURE__ */ p("option", {
@@ -569,28 +573,28 @@ function h({ onSubmit: h, onCancel: g, isLoading: _, onNavigate: v, targets: y,
569
573
  })
570
574
  ]
571
575
  }),
572
- xe && /* @__PURE__ */ m("div", {
576
+ Se && /* @__PURE__ */ m("div", {
573
577
  className: "p-3 bg-status-error-bg/30 border border-status-error-text/20 rounded-lg",
574
578
  children: [/* @__PURE__ */ m("div", {
575
579
  className: "flex items-center gap-2",
576
580
  children: [/* @__PURE__ */ p(d, { className: "w-5 h-5 text-status-error-text flex-shrink-0" }), /* @__PURE__ */ p("p", {
577
581
  className: "text-sm text-status-error-text",
578
- children: xe
582
+ children: Se
579
583
  })]
580
584
  }), /* @__PURE__ */ m("div", {
581
585
  className: "flex items-center gap-2 mt-3",
582
586
  children: [/* @__PURE__ */ m("button", {
583
587
  type: "button",
584
588
  onClick: () => {
585
- Y(null), C("details"), O(""), A(""), W(null), K(null);
589
+ Y(null), w("details"), A(""), M(""), G(null), q(null);
586
590
  },
587
591
  className: "flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-text-primary bg-bg-sunken border border-border-default rounded-md hover:bg-bg-elevated transition-colors",
588
- children: [/* @__PURE__ */ p(u, { className: "w-3.5 h-3.5" }), x("agentsPage.tryDifferentAgent", "Try Different Agent")]
592
+ children: [/* @__PURE__ */ p(u, { className: "w-3.5 h-3.5" }), S("agentsPage.tryDifferentAgent", "Try Different Agent")]
589
593
  }), /* @__PURE__ */ p("button", {
590
594
  type: "button",
591
595
  onClick: g,
592
596
  className: "px-3 py-1.5 text-sm font-medium text-text-secondary hover:text-text-primary transition-colors",
593
- children: x("agentsPage.close", "Close")
597
+ children: S("agentsPage.close", "Close")
594
598
  })]
595
599
  })]
596
600
  }),
@@ -598,15 +602,15 @@ function h({ onSubmit: h, onCancel: g, isLoading: _, onNavigate: v, targets: y,
598
602
  className: "flex items-center justify-between pt-4",
599
603
  children: [/* @__PURE__ */ m("button", {
600
604
  type: "button",
601
- onClick: () => C("details"),
605
+ onClick: () => w("details"),
602
606
  className: "flex items-center gap-1 px-4 py-2 text-sm font-medium text-text-primary bg-bg-sunken border border-border-default rounded-md hover:bg-bg-elevated transition-colors",
603
- children: [/* @__PURE__ */ p(ee, { className: "w-4 h-4" }), x("agentsPage.back", "Back")]
607
+ children: [/* @__PURE__ */ p(ee, { className: "w-4 h-4" }), S("agentsPage.back", "Back")]
604
608
  }), /* @__PURE__ */ p("button", {
605
609
  type: "button",
606
- disabled: !ke || _ || V,
607
- onClick: Oe,
610
+ disabled: !Ae || _ || U,
611
+ onClick: ke,
608
612
  className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg rounded-md hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50",
609
- children: _ ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(c, { className: "w-4 h-4 animate-spin" }), x("agentsPage.adding", "Adding...")] }) : /* @__PURE__ */ m(f, { children: [x("agentsPage.addAgent", "Add Agent"), /* @__PURE__ */ p(s, { className: "w-4 h-4" })] })
613
+ children: _ ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(c, { className: "w-4 h-4 animate-spin" }), S("agentsPage.adding", "Adding...")] }) : /* @__PURE__ */ m(f, { children: [S("agentsPage.addAgent", "Add Agent"), /* @__PURE__ */ p(s, { className: "w-4 h-4" })] })
610
614
  })]
611
615
  })
612
616
  ]