@burdenoff/microfe-vibecontrols 2026.519.6 → 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.
- package/dist/components/agents/AgentForm.js +152 -148
- package/dist/components/agents/AgentForm.js.map +1 -1
- package/dist/components/catalog/CatalogForm.js +46 -42
- package/dist/components/catalog/CatalogForm.js.map +1 -1
- package/dist/components/idp-components/ComponentForm.js +69 -65
- package/dist/components/idp-components/ComponentForm.js.map +1 -1
- package/dist/components/shared/EntityTagPicker.js +5 -1
- package/dist/components/shared/EntityTagPicker.js.map +1 -1
- package/dist/components/tunnels/TunnelCreateWizard.js +45 -54
- package/dist/components/tunnels/TunnelCreateWizard.js.map +1 -1
- package/dist/hooks/useDraftEntityTags.js +29 -0
- package/dist/hooks/useDraftEntityTags.js.map +1 -0
- package/dist/pages/ActionsPage.js +109 -96
- package/dist/pages/ActionsPage.js.map +1 -1
- package/dist/pages/AgentsPage.js +345 -337
- package/dist/pages/AgentsPage.js.map +1 -1
- package/dist/pages/CatalogPage.js +107 -97
- package/dist/pages/CatalogPage.js.map +1 -1
- package/dist/pages/ComponentsPage.js +126 -116
- package/dist/pages/ComponentsPage.js.map +1 -1
- package/dist/pages/SessionsPage.js +598 -586
- package/dist/pages/SessionsPage.js.map +1 -1
- package/dist/pages/TargetsPage.js +499 -485
- package/dist/pages/TargetsPage.js.map +1 -1
- package/dist/pages/VibeDeckPage.js +310 -300
- package/dist/pages/VibeDeckPage.js.map +1 -1
- package/dist/pages/VibesPage.js +309 -296
- package/dist/pages/VibesPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -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:
|
|
9
|
-
let { t: le } = r(),
|
|
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
|
-
}, [
|
|
13
|
-
navigator.clipboard.writeText(e),
|
|
14
|
-
}, []),
|
|
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
|
-
},
|
|
18
|
-
let e =
|
|
19
|
-
e && (
|
|
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
|
-
|
|
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
|
-
|
|
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 &&
|
|
37
|
+
}), n.version && xe(n.version);
|
|
38
38
|
} catch (e) {
|
|
39
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 &&
|
|
67
|
+
}), i && he(i), a && _e(a), o && ye(o), !O && i && pe(i);
|
|
68
68
|
} catch (e) {
|
|
69
|
-
|
|
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
|
-
})()]),
|
|
75
|
-
},
|
|
74
|
+
})()]), me(!1));
|
|
75
|
+
}, ke = async () => {
|
|
76
76
|
Y(null);
|
|
77
|
-
let e =
|
|
78
|
-
name:
|
|
79
|
-
hostname:
|
|
80
|
-
platform:
|
|
81
|
-
architecture:
|
|
82
|
-
version:
|
|
83
|
-
tunnelUrl:
|
|
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:
|
|
85
|
+
agentApiKey: j,
|
|
86
86
|
metadata: { profile: e },
|
|
87
|
-
...
|
|
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
|
-
},
|
|
100
|
-
if (!(!
|
|
101
|
-
|
|
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
|
|
104
|
-
e ? (
|
|
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
|
-
|
|
106
|
+
H(e instanceof Error ? e.message : "Failed to create target");
|
|
107
107
|
} finally {
|
|
108
|
-
|
|
108
|
+
B(!1);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
}, [
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
]),
|
|
112
|
+
x,
|
|
113
|
+
L,
|
|
114
|
+
S
|
|
115
|
+
]), Pe = ({ text: e, id: t }) => /* @__PURE__ */ p("button", {
|
|
116
116
|
type: "button",
|
|
117
|
-
onClick: () =>
|
|
117
|
+
onClick: () => Ee(e, t),
|
|
118
118
|
className: "p-1 rounded hover:bg-bg-elevated transition-colors",
|
|
119
|
-
title:
|
|
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 ===
|
|
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:
|
|
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: [
|
|
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(!
|
|
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:
|
|
176
|
+
children: S("agentsPage.installInstructions", "Agent Install Instructions")
|
|
177
177
|
})]
|
|
178
|
-
}), /* @__PURE__ */ p(s, { className: `w-4 h-4 text-text-secondary transition-transform ${
|
|
179
|
-
}),
|
|
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:
|
|
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:
|
|
189
|
+
label: S("agentsPage.installStep2", "2. Start the agent"),
|
|
190
190
|
cmd: "vibe start"
|
|
191
191
|
},
|
|
192
192
|
{
|
|
193
|
-
label:
|
|
193
|
+
label: S("agentsPage.installStep3", "3. Get the API key"),
|
|
194
194
|
cmd: "vibe key"
|
|
195
195
|
},
|
|
196
196
|
{
|
|
197
|
-
label:
|
|
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(
|
|
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
|
-
|
|
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 && !
|
|
233
|
-
placeholder:
|
|
234
|
-
searchPlaceholder:
|
|
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:
|
|
241
|
-
onChange:
|
|
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
|
-
|
|
246
|
+
S("agentsPage.targetDescription", "The target machine this agent will be installed on."),
|
|
247
247
|
" ",
|
|
248
|
-
|
|
248
|
+
x && /* @__PURE__ */ m("button", {
|
|
249
249
|
type: "button",
|
|
250
250
|
onClick: () => {
|
|
251
|
-
|
|
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" }),
|
|
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 && !
|
|
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:
|
|
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
|
-
|
|
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" }),
|
|
269
|
+
children: [/* @__PURE__ */ p(l, { className: "w-4 h-4" }), S("agentsPage.createFirstTarget", "Create first target")]
|
|
270
270
|
})]
|
|
271
271
|
}),
|
|
272
|
-
|
|
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:
|
|
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:
|
|
282
|
-
onChange: (e) =>
|
|
283
|
-
placeholder:
|
|
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(),
|
|
287
|
+
e.key === "Enter" && (e.preventDefault(), Ne());
|
|
288
288
|
}
|
|
289
289
|
}),
|
|
290
|
-
|
|
290
|
+
V && /* @__PURE__ */ p("p", {
|
|
291
291
|
className: "text-xs text-status-error-text",
|
|
292
|
-
children:
|
|
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
|
|
299
|
-
disabled: !
|
|
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: [
|
|
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
|
-
|
|
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:
|
|
308
|
+
children: S("agentsPage.cancel", "Cancel")
|
|
309
309
|
})]
|
|
310
310
|
})
|
|
311
311
|
]
|
|
312
312
|
}),
|
|
313
|
-
|
|
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" }),
|
|
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
|
-
|
|
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:
|
|
333
|
-
onChange: (e) =>
|
|
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:
|
|
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
|
-
|
|
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:
|
|
359
|
-
value:
|
|
360
|
-
onChange: (e) =>
|
|
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(!
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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: () =>
|
|
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:
|
|
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:
|
|
405
|
+
children: S("agentsPage.profileName", "Profile name")
|
|
406
406
|
}),
|
|
407
407
|
/* @__PURE__ */ p("input", {
|
|
408
408
|
type: "text",
|
|
409
|
-
value:
|
|
410
|
-
onChange: (e) =>
|
|
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:
|
|
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:
|
|
432
|
+
children: S("agentsPage.cancel", "Cancel")
|
|
429
433
|
}), /* @__PURE__ */ m("button", {
|
|
430
434
|
type: "button",
|
|
431
|
-
disabled: !
|
|
435
|
+
disabled: !Me,
|
|
432
436
|
onClick: () => {
|
|
433
|
-
|
|
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: [
|
|
440
|
+
children: [S("agentsPage.nextValidate", "Next: Validate"), /* @__PURE__ */ p(s, { className: "w-4 h-4" })]
|
|
437
441
|
})]
|
|
438
442
|
})
|
|
439
443
|
]
|
|
440
|
-
}),
|
|
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 ${
|
|
447
|
-
children: [
|
|
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:
|
|
456
|
+
children: S("agentsPage.healthCheck", "Health Check")
|
|
453
457
|
}),
|
|
454
|
-
|
|
458
|
+
W?.ok && W.data && /* @__PURE__ */ m("p", {
|
|
455
459
|
className: "text-xs text-text-secondary",
|
|
456
460
|
children: [
|
|
457
461
|
"Status: ",
|
|
458
|
-
|
|
462
|
+
W.data.status,
|
|
459
463
|
" | Version: ",
|
|
460
|
-
|
|
464
|
+
W.data.version,
|
|
461
465
|
" | Uptime: ",
|
|
462
|
-
Math.round(
|
|
466
|
+
Math.round(W.data.uptime),
|
|
463
467
|
"s"
|
|
464
468
|
]
|
|
465
469
|
}),
|
|
466
|
-
|
|
470
|
+
W && !W.ok && /* @__PURE__ */ p("p", {
|
|
467
471
|
className: "text-xs text-status-error-text",
|
|
468
|
-
children:
|
|
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 ${
|
|
474
|
-
children: [
|
|
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:
|
|
483
|
+
children: S("agentsPage.apiAccess", "API Access")
|
|
480
484
|
}),
|
|
481
|
-
|
|
485
|
+
K?.ok && K.data && /* @__PURE__ */ m("p", {
|
|
482
486
|
className: "text-xs text-text-secondary",
|
|
483
487
|
children: [
|
|
484
488
|
"Host: ",
|
|
485
|
-
|
|
489
|
+
K.data.hostname,
|
|
486
490
|
" | ",
|
|
487
|
-
|
|
491
|
+
K.data.platform,
|
|
488
492
|
" /",
|
|
489
493
|
" ",
|
|
490
|
-
|
|
494
|
+
K.data.arch
|
|
491
495
|
]
|
|
492
496
|
}),
|
|
493
|
-
|
|
497
|
+
K && !K.ok && /* @__PURE__ */ p("p", {
|
|
494
498
|
className: "text-xs text-status-error-text",
|
|
495
|
-
children:
|
|
499
|
+
children: K.error
|
|
496
500
|
})
|
|
497
501
|
]
|
|
498
502
|
})]
|
|
499
503
|
})]
|
|
500
504
|
}),
|
|
501
|
-
!
|
|
505
|
+
!U && (!W?.ok || !K?.ok) && /* @__PURE__ */ m("button", {
|
|
502
506
|
type: "button",
|
|
503
|
-
onClick:
|
|
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" }),
|
|
509
|
+
children: [/* @__PURE__ */ p(u, { className: "w-3.5 h-3.5" }), S("agentsPage.retryValidation", "Retry validation")]
|
|
506
510
|
}),
|
|
507
|
-
|
|
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:
|
|
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:
|
|
520
|
+
children: S("agentsPage.name", "Name")
|
|
517
521
|
}), /* @__PURE__ */ p("input", {
|
|
518
522
|
type: "text",
|
|
519
|
-
value:
|
|
520
|
-
onChange: (e) =>
|
|
521
|
-
placeholder:
|
|
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:
|
|
532
|
+
children: S("agentsPage.platform", "Platform")
|
|
529
533
|
}), /* @__PURE__ */ m("select", {
|
|
530
|
-
value:
|
|
531
|
-
onChange: (e) =>
|
|
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:
|
|
553
|
+
children: S("agentsPage.architecture", "Architecture")
|
|
550
554
|
}), /* @__PURE__ */ m("select", {
|
|
551
|
-
value:
|
|
552
|
-
onChange: (e) =>
|
|
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
|
-
|
|
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:
|
|
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),
|
|
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" }),
|
|
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:
|
|
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: () =>
|
|
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" }),
|
|
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: !
|
|
607
|
-
onClick:
|
|
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" }),
|
|
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
|
]
|