@burdenoff/microfe-vibecontrols 2026.522.2 → 2026.522.4
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/node_modules/@apollo/client/errors/ServerError.js +17 -0
- package/dist/node_modules/@apollo/client/errors/ServerError.js.map +1 -0
- package/dist/node_modules/@apollo/client/errors/ServerParseError.js +17 -0
- package/dist/node_modules/@apollo/client/errors/ServerParseError.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/batch/batchLink.js +28 -0
- package/dist/node_modules/@apollo/client/link/batch/batchLink.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/batch/batching.js +70 -0
- package/dist/node_modules/@apollo/client/link/batch/batching.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/batch-http/BaseBatchHttpLink.js +74 -0
- package/dist/node_modules/@apollo/client/link/batch-http/BaseBatchHttpLink.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/batch-http/batchHttpLink.js +17 -0
- package/dist/node_modules/@apollo/client/link/batch-http/batchHttpLink.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/client-awareness/ClientAwarenessLink.js +32 -0
- package/dist/node_modules/@apollo/client/link/client-awareness/ClientAwarenessLink.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/core/ApolloLink.js +52 -0
- package/dist/node_modules/@apollo/client/link/core/ApolloLink.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/http/checkFetcher.js +9 -0
- package/dist/node_modules/@apollo/client/link/http/checkFetcher.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js +45 -0
- package/dist/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js +60 -0
- package/dist/node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/http/selectURI.js +6 -0
- package/dist/node_modules/@apollo/client/link/http/selectURI.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/utils/createOperation.js +34 -0
- package/dist/node_modules/@apollo/client/link/utils/createOperation.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/utils/filterOperationVariables.js +14 -0
- package/dist/node_modules/@apollo/client/link/utils/filterOperationVariables.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/caching/sizes.js +6 -0
- package/dist/node_modules/@apollo/client/utilities/caching/sizes.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/graphql/print.js +16 -0
- package/dist/node_modules/@apollo/client/utilities/graphql/print.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/caches.js +19 -0
- package/dist/node_modules/@apollo/client/utilities/internal/caches.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js +21 -0
- package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/compact.js +14 -0
- package/dist/node_modules/@apollo/client/utilities/internal/compact.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js +9 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js +9 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js +8 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js +9 -0
- package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js +10 -0
- package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js +10 -0
- package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/memoize.js +23 -0
- package/dist/node_modules/@apollo/client/utilities/internal/memoize.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js +10 -0
- package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/invariant/index.js +57 -0
- package/dist/node_modules/@apollo/client/utilities/invariant/index.js.map +1 -0
- package/dist/node_modules/@apollo/client/version.js +6 -0
- package/dist/node_modules/@apollo/client/version.js.map +1 -0
- package/dist/node_modules/@wry/caches/lib/weak.js +67 -0
- package/dist/node_modules/@wry/caches/lib/weak.js.map +1 -0
- package/dist/node_modules/@wry/trie/lib/index.js +53 -0
- package/dist/node_modules/@wry/trie/lib/index.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js +21 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js +78 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js +117 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js +93 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/config.js +12 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js +9 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/throwError.js +17 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/throwError.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +16 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +8 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +13 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +11 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +11 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +22 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js +8 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +8 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js +6 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js +13 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +14 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -0
- package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js +52 -0
- package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/pages/AgentsPage.js +242 -239
- package/dist/pages/AgentsPage.js.map +1 -1
- package/dist/pages/CatalogPage.js +146 -98
- package/dist/pages/CatalogPage.js.map +1 -1
- package/dist/pages/ComponentsPage.js +163 -117
- package/dist/pages/ComponentsPage.js.map +1 -1
- package/dist/pages/TemplatesPage.js +74 -26
- package/dist/pages/TemplatesPage.js.map +1 -1
- package/dist/providers/VibeControlsProvider.js +35 -30
- package/dist/providers/VibeControlsProvider.js.map +1 -1
- package/package.json +1 -1
package/dist/pages/AgentsPage.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { useAddAgentFromTunnelMutation as e, useAgentHeartbeatMutation as t, useCreateAgentMutation as n, useCreateTargetMutation as r, useDeactivateAgentMutation as i, useDeleteAgentMutation as ee, useListAgentsQuery as te, useStartVibecontrolsAgentMutation as ne, useStopVibecontrolsAgentMutation as re, useUpdateAgentMutation as ie, useVibecontrolsAgentHealthProbeStreamSubscription as ae, useVibecontrolsAgentHealthProbesLazyQuery as oe } from "../generated/wspace-operations.js";
|
|
2
|
-
import { useVibeControls as
|
|
1
|
+
import { useAddAgentFromTunnelMutation as e, useAgentHeartbeatMutation as t, useCreateAgentMutation as n, useCreateTargetMutation as r, useDeactivateAgentMutation as i, useDeleteAgentMutation as ee, useListAgentsQuery as te, useStartVibecontrolsAgentMutation as ne, useStopVibecontrolsAgentMutation as re, useUpdateAgentMutation as ie, useVibecontrolsAgentHealthProbeStreamSubscription as ae, useVibecontrolsAgentHealthProbesLazyQuery as oe, useVibecontrolsAgentHealthProbesQuery as se } from "../generated/wspace-operations.js";
|
|
2
|
+
import { useVibeControls as ce, useVibeNavigate as le } from "../providers/VibeControlsProvider.js";
|
|
3
3
|
import { useVibeControlsStore as a } from "../store/vibeControlsStore.js";
|
|
4
|
-
import
|
|
5
|
-
import { PageHeader as
|
|
6
|
-
import { LoadingState as
|
|
7
|
-
import { ErrorState as
|
|
8
|
-
import { QuotaExhaustedDialog as
|
|
9
|
-
import { isQuotaExhaustedError as
|
|
10
|
-
import { EntityTagPicker as
|
|
11
|
-
import { useDraftEntityTags as
|
|
12
|
-
import { EmptyState as
|
|
13
|
-
import { SearchInput as
|
|
14
|
-
import { FilterDropdown as
|
|
15
|
-
import { AgentSetupBanner as
|
|
16
|
-
import { GetHelpButton as
|
|
17
|
-
import { TagFilter as
|
|
4
|
+
import ue from "../hooks/useCachedInitialData.js";
|
|
5
|
+
import { PageHeader as de } from "../components/shared/PageHeader.js";
|
|
6
|
+
import { LoadingState as fe } from "../components/shared/LoadingState.js";
|
|
7
|
+
import { ErrorState as pe } from "../components/shared/ErrorState.js";
|
|
8
|
+
import { QuotaExhaustedDialog as me } from "../components/shared/QuotaExhaustedDialog.js";
|
|
9
|
+
import { isQuotaExhaustedError as he } from "../utils/quotaUtils.js";
|
|
10
|
+
import { EntityTagPicker as ge } from "../components/shared/EntityTagPicker.js";
|
|
11
|
+
import { useDraftEntityTags as _e } from "../hooks/useDraftEntityTags.js";
|
|
12
|
+
import { EmptyState as ve } from "../components/shared/EmptyState.js";
|
|
13
|
+
import { SearchInput as ye } from "../components/shared/SearchInput.js";
|
|
14
|
+
import { FilterDropdown as be } from "../components/shared/FilterDropdown.js";
|
|
15
|
+
import { AgentSetupBanner as xe } from "../components/shared/AgentSetupBanner.js";
|
|
16
|
+
import { GetHelpButton as Se } from "../components/shared/GetHelpButton.js";
|
|
17
|
+
import { TagFilter as Ce } from "../components/shared/TagFilter.js";
|
|
18
18
|
import "../components/shared/index.js";
|
|
19
|
-
import { VIBE_PERMISSIONS as
|
|
20
|
-
import { PageSkeleton as
|
|
21
|
-
import { AgentCard as
|
|
22
|
-
import { AgentList as
|
|
23
|
-
import { AgentForm as
|
|
19
|
+
import { VIBE_PERMISSIONS as we } from "../constants/permissions.js";
|
|
20
|
+
import { PageSkeleton as Te } from "../components/shared/PageSkeleton.js";
|
|
21
|
+
import { AgentCard as Ee } from "../components/agents/AgentCard.js";
|
|
22
|
+
import { AgentList as De } from "../components/agents/AgentList.js";
|
|
23
|
+
import { AgentForm as Oe } from "../components/agents/AgentForm.js";
|
|
24
24
|
import "../components/agents/index.js";
|
|
25
|
-
import { deriveAgentStatus as
|
|
25
|
+
import { deriveAgentStatus as ke } from "../utils/agentStatus.js";
|
|
26
26
|
import { useCallback as o, useEffect as s, useMemo as c, useRef as l, useState as u } from "react";
|
|
27
|
-
import { useI18n as
|
|
28
|
-
import { Bot as
|
|
29
|
-
import { usePermissions as
|
|
30
|
-
import { AnimatePresence as f, motion as
|
|
31
|
-
import { Fragment as
|
|
32
|
-
import { MotionItem as
|
|
27
|
+
import { useI18n as Ae } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
28
|
+
import { Bot as je, CheckSquare as Me, Grid as Ne, List as Pe, Plus as d, RefreshCw as Fe, Trash2 as Ie, XSquare as Le } from "lucide-react";
|
|
29
|
+
import { usePermissions as Re } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
30
|
+
import { AnimatePresence as f, motion as p } from "framer-motion";
|
|
31
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
32
|
+
import { MotionItem as _, MotionList as v, MotionPage as y } from "@burdenoff/fe-libs/shared/motion";
|
|
33
33
|
import { AccessDenied as ze, PermissionButton as Be } from "@burdenoff/fe-libs/shared/components";
|
|
34
34
|
//#region src/pages/AgentsPage.tsx
|
|
35
|
-
function
|
|
36
|
-
let { onAgentSelect:
|
|
37
|
-
let r =
|
|
35
|
+
function Ve() {
|
|
36
|
+
let { onAgentSelect: Ve, workspaceId: b } = ce(), x = le(), { hasPermission: He, isLoading: Ue, permissions: We } = Re(), { t: Ge } = Ae(), S = o((e, t, n) => {
|
|
37
|
+
let r = Ge(e, n), i = r === e ? t : r;
|
|
38
38
|
return n ? Object.entries(n).reduce((e, [t, n]) => e.replace(`{{${t}}}`, String(n)), i) : i;
|
|
39
|
-
}, [
|
|
39
|
+
}, [Ge]), Ke = [
|
|
40
40
|
{
|
|
41
41
|
value: "all",
|
|
42
42
|
label: S("agentsPage.statusAll", "All Statuses")
|
|
@@ -53,7 +53,7 @@ function y() {
|
|
|
53
53
|
value: "OFFLINE",
|
|
54
54
|
label: S("agentsPage.statusOffline", "Offline")
|
|
55
55
|
}
|
|
56
|
-
],
|
|
56
|
+
], qe = [
|
|
57
57
|
{
|
|
58
58
|
value: "all",
|
|
59
59
|
label: S("agentsPage.platformAll", "All Platforms")
|
|
@@ -70,9 +70,9 @@ function y() {
|
|
|
70
70
|
value: "windows",
|
|
71
71
|
label: S("agentsPage.platformWindows", "Windows")
|
|
72
72
|
}
|
|
73
|
-
],
|
|
73
|
+
], Je = He(we.AGENT_LIST), [C, Ye] = u(""), [w, Xe] = u("all"), [T, Ze] = u("all"), [E, Qe] = u("all"), [D, $e] = u("grid"), [et, O] = u(!1), [tt, nt] = u(!1), [k, A] = u(null), [rt, it] = u(!1), j = a((e) => e.connectingAgents), at = a((e) => e.markAgentConnecting), M = a((e) => e.clearAgentConnecting), ot = c(() => new Set(Object.keys(j)), [j]), N = l(/* @__PURE__ */ new Map());
|
|
74
74
|
s(() => {
|
|
75
|
-
let e =
|
|
75
|
+
let e = N.current;
|
|
76
76
|
for (let t of Object.keys(j)) {
|
|
77
77
|
if (e.has(t)) continue;
|
|
78
78
|
let n = setTimeout(() => {
|
|
@@ -82,21 +82,21 @@ function y() {
|
|
|
82
82
|
}
|
|
83
83
|
for (let [t, n] of e.entries()) t in j || (clearTimeout(n), e.delete(t));
|
|
84
84
|
}, [j, M]), s(() => {
|
|
85
|
-
let e =
|
|
85
|
+
let e = N.current;
|
|
86
86
|
return () => {
|
|
87
87
|
for (let t of e.values()) clearTimeout(t);
|
|
88
88
|
e.clear();
|
|
89
89
|
};
|
|
90
90
|
}, []);
|
|
91
|
-
let [
|
|
91
|
+
let [P, F] = u(null), [I, L] = u(!1), st = l(null), ct = l(null), [R, z] = u(/* @__PURE__ */ new Set()), [lt, ut] = u(!1), [dt, B] = u(null), [ft, V] = u(null), [pt, H] = u(!1), U = l(null);
|
|
92
92
|
s(() => () => {
|
|
93
|
-
|
|
93
|
+
U.current && clearTimeout(U.current);
|
|
94
94
|
}, []);
|
|
95
|
-
let
|
|
96
|
-
|
|
97
|
-
}, []),
|
|
98
|
-
|
|
99
|
-
}, []), [mt] = n({ refetchQueries: ["ListAgents"] }), { setDraftTagIds: ht, flushTags: gt } =
|
|
95
|
+
let W = o((e) => {
|
|
96
|
+
U.current && clearTimeout(U.current), V(null), B(e), U.current = setTimeout(() => B(null), 3e3);
|
|
97
|
+
}, []), G = o((e) => {
|
|
98
|
+
U.current && clearTimeout(U.current), B(null), V(e), U.current = setTimeout(() => V(null), 5e3);
|
|
99
|
+
}, []), [mt] = n({ refetchQueries: ["ListAgents"] }), { setDraftTagIds: ht, flushTags: gt } = _e("VIBECONTROLS_AGENT"), [_t] = e({ refetchQueries: ["ListAgents"] }), [vt] = t({ refetchQueries: ["ListAgents"] }), [yt] = i({ refetchQueries: ["ListAgents"] }), [bt] = ne({ refetchQueries: ["ListAgents"] }), [xt] = re({ refetchQueries: ["ListAgents"] }), { targets: St, loading: Ct, refetch: wt } = ue(), Tt = St, Et = Ct, Dt = Tt.length > 0, [Ot] = ie({ refetchQueries: ["ListAgents"] }), [kt] = ee({ refetchQueries: ["ListAgents"] }), [At] = r({
|
|
100
100
|
refetchQueries: ["VibeControlsInitialData", "ListTargets"],
|
|
101
101
|
awaitRefetchQueries: !0
|
|
102
102
|
}), jt = o(async (e) => {
|
|
@@ -122,7 +122,7 @@ function y() {
|
|
|
122
122
|
At,
|
|
123
123
|
wt,
|
|
124
124
|
b
|
|
125
|
-
]), { data: Mt, loading:
|
|
125
|
+
]), { data: Mt, loading: K, error: Nt, refetch: q } = te({
|
|
126
126
|
variables: {
|
|
127
127
|
filter: {
|
|
128
128
|
isActive: w === "ACTIVE" ? !0 : w === "OFFLINE" ? !1 : void 0,
|
|
@@ -132,18 +132,21 @@ function y() {
|
|
|
132
132
|
},
|
|
133
133
|
fetchPolicy: "cache-first",
|
|
134
134
|
skip: !b
|
|
135
|
-
}),
|
|
136
|
-
fetchPolicy: "network
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
135
|
+
}), J = se({
|
|
136
|
+
fetchPolicy: "cache-and-network",
|
|
137
|
+
nextFetchPolicy: "cache-first",
|
|
138
|
+
notifyOnNetworkStatusChange: !0,
|
|
139
|
+
skip: !b,
|
|
140
|
+
pollInterval: 3e4
|
|
141
|
+
}), [Pt] = oe({ fetchPolicy: "network-only" }), { data: Y } = ae({ skip: !b }), Ft = J.data === void 0 && Y === void 0, X = c(() => {
|
|
142
|
+
let e = /* @__PURE__ */ new Map(), t = Y?.vibecontrolsAgentHealthProbeStream ?? J.data?.vibecontrolsAgentHealthProbes ?? [];
|
|
140
143
|
for (let n of t) e.set(n.agentId, {
|
|
141
144
|
agentId: n.agentId,
|
|
142
145
|
healthy: n.healthy,
|
|
143
146
|
errorMessage: n.errorMessage
|
|
144
147
|
});
|
|
145
148
|
return e;
|
|
146
|
-
}, [
|
|
149
|
+
}, [J.data, Y]), Z = c(() => (Mt?.vibecontrolsAgents ?? []).map((e) => ({
|
|
147
150
|
id: e.id,
|
|
148
151
|
workspaceId: e.workspaceId,
|
|
149
152
|
name: e.name,
|
|
@@ -152,12 +155,12 @@ function y() {
|
|
|
152
155
|
architecture: e.architecture,
|
|
153
156
|
version: e.version,
|
|
154
157
|
isActive: e.isActive,
|
|
155
|
-
status:
|
|
158
|
+
status: ot.has(e.id) ? "CONNECTING" : ke({
|
|
156
159
|
id: e.id,
|
|
157
160
|
isActive: e.isActive,
|
|
158
161
|
metadata: e.metadata
|
|
159
|
-
},
|
|
160
|
-
healthError:
|
|
162
|
+
}, X, { probesLoading: Ft }),
|
|
163
|
+
healthError: X.get(e.id)?.errorMessage ?? (e.lastGatewayAuthPushStatus === "failed" ? e.lastGatewayAuthPushError ?? "Gateway-auth push failed" : null),
|
|
161
164
|
lastHeartbeat: e.lastHeartbeat || null,
|
|
162
165
|
tunnelUrl: e.tunnelUrl ?? null,
|
|
163
166
|
tunnelStatus: e.tunnelStatus ?? null,
|
|
@@ -182,9 +185,9 @@ function y() {
|
|
|
182
185
|
}))
|
|
183
186
|
})), [
|
|
184
187
|
Mt?.vibecontrolsAgents,
|
|
185
|
-
|
|
188
|
+
X,
|
|
186
189
|
Ft,
|
|
187
|
-
|
|
190
|
+
ot
|
|
188
191
|
]);
|
|
189
192
|
s(() => {
|
|
190
193
|
let e = Object.keys(j);
|
|
@@ -192,48 +195,48 @@ function y() {
|
|
|
192
195
|
let t = Date.now(), n = Infinity;
|
|
193
196
|
for (let r of e) {
|
|
194
197
|
let e = j[r];
|
|
195
|
-
e !== void 0 && (
|
|
198
|
+
e !== void 0 && (X.get(r)?.healthy === !0 && t >= e ? M(r) : e < n && (n = e));
|
|
196
199
|
}
|
|
197
200
|
if (n === Infinity) return;
|
|
198
201
|
let r = Math.max(0, n - t) + 50, i = setTimeout(() => {
|
|
199
202
|
let e = a.getState().connectingAgents;
|
|
200
203
|
for (let t of Object.keys(e)) {
|
|
201
204
|
let n = e[t];
|
|
202
|
-
n !== void 0 &&
|
|
205
|
+
n !== void 0 && X.get(t)?.healthy === !0 && Date.now() >= n && M(t);
|
|
203
206
|
}
|
|
204
207
|
}, r);
|
|
205
208
|
return () => clearTimeout(i);
|
|
206
209
|
}, [
|
|
207
|
-
|
|
210
|
+
X,
|
|
208
211
|
j,
|
|
209
212
|
M
|
|
210
213
|
]);
|
|
211
|
-
let
|
|
214
|
+
let Q = c(() => Z.filter((e) => {
|
|
212
215
|
if (C) {
|
|
213
216
|
let t = C.toLowerCase();
|
|
214
217
|
if (!(e.name.toLowerCase().includes(t) || e.hostname?.toLowerCase().includes(t) || e.id.toLowerCase().includes(t))) return !1;
|
|
215
218
|
}
|
|
216
219
|
return !(E !== "all" && !(e.tagAssignments ?? []).some((e) => e.tagId === E));
|
|
217
220
|
}), [
|
|
218
|
-
|
|
221
|
+
Z,
|
|
219
222
|
C,
|
|
220
223
|
E
|
|
221
224
|
]);
|
|
222
225
|
s(() => () => {
|
|
223
|
-
|
|
226
|
+
U.current && clearTimeout(U.current);
|
|
224
227
|
}, []);
|
|
225
228
|
let It = (e) => {
|
|
226
|
-
x(`/agents/${e.id}`),
|
|
229
|
+
x(`/agents/${e.id}`), Ve?.({
|
|
227
230
|
id: e.id,
|
|
228
231
|
name: e.name,
|
|
229
232
|
type: e.platform || "unknown",
|
|
230
233
|
status: e.status || (e.isActive ? "ACTIVE" : "OFFLINE")
|
|
231
234
|
});
|
|
232
|
-
},
|
|
235
|
+
}, $ = () => {
|
|
233
236
|
O(!0);
|
|
234
237
|
}, Lt = async (e) => {
|
|
235
238
|
try {
|
|
236
|
-
|
|
239
|
+
nt(!0);
|
|
237
240
|
let t = e.tunnelUrl?.trim(), n = e.agentApiKey?.trim();
|
|
238
241
|
if (t && n) {
|
|
239
242
|
let r = await _t({ variables: { input: {
|
|
@@ -261,43 +264,43 @@ function y() {
|
|
|
261
264
|
if (i?.id) return await gt(i.id), { id: i.id };
|
|
262
265
|
throw r.error ? r.error : Error("Agent creation failed — no data returned from the server.");
|
|
263
266
|
} catch (e) {
|
|
264
|
-
if (
|
|
265
|
-
|
|
267
|
+
if (he(e)) {
|
|
268
|
+
H(!0), O(!1);
|
|
266
269
|
return;
|
|
267
270
|
}
|
|
268
271
|
throw console.error("Failed to create agent:", e), e;
|
|
269
272
|
} finally {
|
|
270
|
-
|
|
273
|
+
nt(!1);
|
|
271
274
|
}
|
|
272
275
|
}, Rt = async (e) => {
|
|
273
276
|
try {
|
|
274
277
|
let t = (await bt({ variables: { agentId: e.id } })).data?.startVibecontrolsAgent;
|
|
275
278
|
if (!t?.success) throw Error(t?.error || "Failed to start agent");
|
|
276
|
-
await vt({ variables: { id: e.id } }),
|
|
279
|
+
await vt({ variables: { id: e.id } }), W(`Agent "${e.name}" started`);
|
|
277
280
|
} catch (e) {
|
|
278
|
-
console.error("Failed to start agent:", e),
|
|
281
|
+
console.error("Failed to start agent:", e), G(e instanceof Error ? e.message : "Failed to start agent");
|
|
279
282
|
}
|
|
280
283
|
}, zt = async (e) => {
|
|
281
284
|
try {
|
|
282
285
|
let t = (await xt({ variables: { agentId: e.id } })).data?.stopVibecontrolsAgent;
|
|
283
286
|
if (!t?.success) throw Error(t?.error || "Failed to stop agent");
|
|
284
|
-
await yt({ variables: { id: e.id } }),
|
|
287
|
+
await yt({ variables: { id: e.id } }), W(`Agent "${e.name}" stopped`);
|
|
285
288
|
} catch (e) {
|
|
286
|
-
console.error("Failed to stop agent:", e),
|
|
289
|
+
console.error("Failed to stop agent:", e), G(e instanceof Error ? e.message : "Failed to stop agent");
|
|
287
290
|
}
|
|
288
|
-
},
|
|
289
|
-
|
|
290
|
-
},
|
|
291
|
-
if (!
|
|
292
|
-
let e =
|
|
293
|
-
|
|
291
|
+
}, Bt = (e) => {
|
|
292
|
+
F(e);
|
|
293
|
+
}, Vt = async () => {
|
|
294
|
+
if (!P) return;
|
|
295
|
+
let e = P;
|
|
296
|
+
L(!0);
|
|
294
297
|
try {
|
|
295
298
|
await yt({
|
|
296
299
|
variables: { id: e.id },
|
|
297
300
|
refetchQueries: []
|
|
298
301
|
});
|
|
299
302
|
} catch (e) {
|
|
300
|
-
console.error("Failed to deactivate agent:", e),
|
|
303
|
+
console.error("Failed to deactivate agent:", e), G(e instanceof Error ? e.message : "Failed to disconnect agent"), L(!1), F(null), await q();
|
|
301
304
|
return;
|
|
302
305
|
}
|
|
303
306
|
try {
|
|
@@ -311,20 +314,20 @@ function y() {
|
|
|
311
314
|
}
|
|
312
315
|
},
|
|
313
316
|
refetchQueries: []
|
|
314
|
-
}),
|
|
317
|
+
}), W(`Agent "${e.name}" disconnected`);
|
|
315
318
|
} catch (e) {
|
|
316
|
-
console.error("Failed to clear tunnel fields:", e),
|
|
319
|
+
console.error("Failed to clear tunnel fields:", e), G("Agent marked offline, but failed to clear connection fields — clear them manually in Settings.");
|
|
317
320
|
}
|
|
318
|
-
|
|
319
|
-
}, Vt = (e) => {
|
|
320
|
-
x(`/agents/${e.id}`);
|
|
321
|
+
L(!1), F(null), await q();
|
|
321
322
|
}, Ht = (e) => {
|
|
323
|
+
x(`/agents/${e.id}`);
|
|
324
|
+
}, Ut = (e) => {
|
|
322
325
|
A(e);
|
|
323
|
-
},
|
|
326
|
+
}, Wt = async () => {
|
|
324
327
|
if (!k) return;
|
|
325
328
|
let e = k.id, t = st.current?.value?.trim() || "", n = ct.current?.value?.trim() || "";
|
|
326
329
|
try {
|
|
327
|
-
|
|
330
|
+
it(!0), await Ot({
|
|
328
331
|
variables: {
|
|
329
332
|
id: e,
|
|
330
333
|
input: {
|
|
@@ -334,267 +337,267 @@ function y() {
|
|
|
334
337
|
}
|
|
335
338
|
},
|
|
336
339
|
refetchQueries: ["ListAgents", "VibecontrolsAgentHealthProbes"]
|
|
337
|
-
}), t &&
|
|
340
|
+
}), t && at(e), A(null);
|
|
338
341
|
} catch (e) {
|
|
339
342
|
console.error("Failed to update tunnel settings:", e);
|
|
340
343
|
} finally {
|
|
341
|
-
|
|
344
|
+
it(!1);
|
|
342
345
|
}
|
|
343
|
-
},
|
|
344
|
-
|
|
346
|
+
}, Gt = o((e) => {
|
|
347
|
+
z((t) => {
|
|
345
348
|
let n = new Set(t);
|
|
346
349
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
347
350
|
});
|
|
348
|
-
}, []),
|
|
349
|
-
|
|
350
|
-
}, [
|
|
351
|
-
|
|
352
|
-
}, []),
|
|
353
|
-
if (
|
|
351
|
+
}, []), Kt = o(() => {
|
|
352
|
+
z(new Set(Q.map((e) => e.id)));
|
|
353
|
+
}, [Q]), qt = o(() => {
|
|
354
|
+
z(/* @__PURE__ */ new Set());
|
|
355
|
+
}, []), Jt = Q.length > 0 && R.size === Q.length, Yt = R.size > 0, Xt = o(async () => {
|
|
356
|
+
if (R.size !== 0 && window.confirm(S("agentsPage.bulkDeleteConfirm", "Are you sure you want to remove {{count}} agent(s)? This cannot be undone.", { count: R.size }))) {
|
|
354
357
|
ut(!0);
|
|
355
358
|
try {
|
|
356
|
-
let e = await Promise.allSettled(Array.from(
|
|
357
|
-
n > 0 ?
|
|
359
|
+
let e = await Promise.allSettled(Array.from(R).map((e) => kt({ variables: { id: e } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.filter((e) => e.status === "rejected").length;
|
|
360
|
+
n > 0 ? G(`Removed ${t}, failed to remove ${n} agent${n === 1 ? "" : "s"}`) : W(`Removed ${t} agent${t === 1 ? "" : "s"}`), z(/* @__PURE__ */ new Set());
|
|
358
361
|
} catch (e) {
|
|
359
|
-
|
|
362
|
+
G(e instanceof Error ? e.message : "Failed to remove agents");
|
|
360
363
|
} finally {
|
|
361
364
|
ut(!1);
|
|
362
365
|
}
|
|
363
366
|
}
|
|
364
367
|
}, [
|
|
365
|
-
|
|
368
|
+
R,
|
|
366
369
|
kt,
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
]),
|
|
370
|
-
total:
|
|
371
|
-
active:
|
|
372
|
-
offline:
|
|
370
|
+
G,
|
|
371
|
+
W
|
|
372
|
+
]), Zt = {
|
|
373
|
+
total: Z.length,
|
|
374
|
+
active: Z.filter((e) => e.isActive).length,
|
|
375
|
+
offline: Z.filter((e) => !e.isActive).length
|
|
373
376
|
};
|
|
374
|
-
return
|
|
377
|
+
return Ue ? /* @__PURE__ */ h(y, {
|
|
375
378
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
376
|
-
children: /* @__PURE__ */
|
|
377
|
-
}) :
|
|
379
|
+
children: /* @__PURE__ */ h(fe, { message: S("agentsPage.loadingPermissions", "Loading permissions...") })
|
|
380
|
+
}) : We && We.permissionStrings?.length > 0 && !Je ? /* @__PURE__ */ h(y, {
|
|
378
381
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
379
|
-
children: /* @__PURE__ */
|
|
382
|
+
children: /* @__PURE__ */ h(ze, {
|
|
380
383
|
title: S("agentsPage.accessDeniedTitle", "Access Denied"),
|
|
381
384
|
description: S("agentsPage.accessDeniedDescription", "You don't have permission to view agents. Contact your workspace administrator for access.")
|
|
382
385
|
})
|
|
383
|
-
}) : Nt &&
|
|
386
|
+
}) : Nt && Z.length === 0 ? /* @__PURE__ */ h(y, {
|
|
384
387
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
385
|
-
children: /* @__PURE__ */
|
|
388
|
+
children: /* @__PURE__ */ h(pe, {
|
|
386
389
|
title: S("agentsPage.failedLoad", "Failed to load agents"),
|
|
387
390
|
message: Nt.message,
|
|
388
|
-
onRetry: () =>
|
|
391
|
+
onRetry: () => q()
|
|
389
392
|
})
|
|
390
|
-
}) : /* @__PURE__ */
|
|
393
|
+
}) : /* @__PURE__ */ g(y, {
|
|
391
394
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
392
395
|
children: [
|
|
393
|
-
dt && /* @__PURE__ */
|
|
396
|
+
dt && /* @__PURE__ */ h("div", {
|
|
394
397
|
className: "fixed top-4 left-4 right-4 sm:left-auto z-50 bg-status-success-bg text-status-success-text px-4 py-3 rounded-md shadow-lg text-sm",
|
|
395
398
|
children: dt
|
|
396
399
|
}),
|
|
397
|
-
ft && /* @__PURE__ */
|
|
400
|
+
ft && /* @__PURE__ */ h("div", {
|
|
398
401
|
className: "fixed top-4 right-4 z-50 bg-status-error-bg text-status-error-text px-4 py-3 rounded-md shadow-lg text-sm",
|
|
399
402
|
children: ft
|
|
400
403
|
}),
|
|
401
|
-
/* @__PURE__ */
|
|
404
|
+
/* @__PURE__ */ h(de, {
|
|
402
405
|
title: S("agentsPage.title", "Agents"),
|
|
403
406
|
description: S("agentsPage.descriptionOnline", "{{active}} of {{total}} agents online", {
|
|
404
|
-
active:
|
|
405
|
-
total:
|
|
407
|
+
active: Zt.active,
|
|
408
|
+
total: Zt.total
|
|
406
409
|
}),
|
|
407
|
-
actions: /* @__PURE__ */
|
|
410
|
+
actions: /* @__PURE__ */ g("div", {
|
|
408
411
|
className: "flex w-full flex-col items-end gap-2 sm:w-auto sm:flex-row sm:items-center",
|
|
409
|
-
children: [/* @__PURE__ */
|
|
412
|
+
children: [/* @__PURE__ */ h("button", {
|
|
410
413
|
onClick: () => {
|
|
411
|
-
|
|
414
|
+
q(), Pt();
|
|
412
415
|
},
|
|
413
|
-
disabled:
|
|
416
|
+
disabled: K || J.loading,
|
|
414
417
|
className: "flex items-center justify-center gap-2 px-3 py-2 text-text-secondary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
|
|
415
418
|
title: S("agentsPage.refreshTitle", "Refresh agents"),
|
|
416
|
-
children: /* @__PURE__ */
|
|
417
|
-
}), Dt ? /* @__PURE__ */
|
|
418
|
-
permission:
|
|
419
|
+
children: /* @__PURE__ */ h(Fe, { className: `w-4 h-4 ${K || J.loading ? "animate-spin" : ""}` })
|
|
420
|
+
}), Dt ? /* @__PURE__ */ h(Be, {
|
|
421
|
+
permission: we.AGENT_CREATE,
|
|
419
422
|
deniedBehavior: "disable",
|
|
420
423
|
deniedTooltip: S("agentsPage.deniedCreateTooltip", "You don't have permission to create agents"),
|
|
421
|
-
children: /* @__PURE__ */
|
|
422
|
-
onClick:
|
|
424
|
+
children: /* @__PURE__ */ g("button", {
|
|
425
|
+
onClick: $,
|
|
423
426
|
className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
424
|
-
children: [/* @__PURE__ */
|
|
427
|
+
children: [/* @__PURE__ */ h(d, { className: "w-4 h-4" }), S("agentsPage.addAgent", "Add Agent")]
|
|
425
428
|
})
|
|
426
|
-
}) : /* @__PURE__ */
|
|
427
|
-
onClick:
|
|
429
|
+
}) : /* @__PURE__ */ g("button", {
|
|
430
|
+
onClick: $,
|
|
428
431
|
className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
|
|
429
|
-
children: [/* @__PURE__ */
|
|
432
|
+
children: [/* @__PURE__ */ h(d, { className: "w-4 h-4" }), S("agentsPage.addAgent", "Add Agent")]
|
|
430
433
|
})]
|
|
431
434
|
})
|
|
432
435
|
}),
|
|
433
|
-
|
|
436
|
+
Z.length === 0 && !K && /* @__PURE__ */ h(xe, {
|
|
434
437
|
variant: "full",
|
|
435
438
|
dismissKey: "vibecontrols-agents-setup-banner"
|
|
436
439
|
}),
|
|
437
|
-
|
|
440
|
+
Z.length > 0 && /* @__PURE__ */ h(xe, {
|
|
438
441
|
variant: "compact",
|
|
439
442
|
dismissKey: "vibecontrols-agents-compact-banner"
|
|
440
443
|
}),
|
|
441
|
-
/* @__PURE__ */
|
|
444
|
+
/* @__PURE__ */ g("div", {
|
|
442
445
|
className: "space-y-3",
|
|
443
|
-
children: [/* @__PURE__ */
|
|
446
|
+
children: [/* @__PURE__ */ g("div", {
|
|
444
447
|
className: "flex items-center gap-2",
|
|
445
|
-
children: [/* @__PURE__ */
|
|
448
|
+
children: [/* @__PURE__ */ h(ye, {
|
|
446
449
|
value: C,
|
|
447
|
-
onChange:
|
|
450
|
+
onChange: Ye,
|
|
448
451
|
placeholder: S("agentsPage.searchPlaceholder", "Search agents..."),
|
|
449
452
|
className: "flex-1 sm:w-64 sm:flex-none"
|
|
450
|
-
}), /* @__PURE__ */
|
|
453
|
+
}), /* @__PURE__ */ g("div", {
|
|
451
454
|
className: "flex items-center gap-1 bg-bg-sunken rounded-md p-1 flex-shrink-0",
|
|
452
|
-
children: [/* @__PURE__ */
|
|
455
|
+
children: [/* @__PURE__ */ h("button", {
|
|
453
456
|
onClick: () => {
|
|
454
|
-
|
|
457
|
+
$e("grid"), z(/* @__PURE__ */ new Set());
|
|
455
458
|
},
|
|
456
459
|
className: `p-1.5 sm:p-2 rounded ${D === "grid" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
|
|
457
460
|
title: S("agentsPage.gridViewTitle", "Grid view"),
|
|
458
|
-
children: /* @__PURE__ */
|
|
459
|
-
}), /* @__PURE__ */
|
|
461
|
+
children: /* @__PURE__ */ h(Ne, { className: "w-4 h-4 text-text-secondary" })
|
|
462
|
+
}), /* @__PURE__ */ h("button", {
|
|
460
463
|
onClick: () => {
|
|
461
|
-
|
|
464
|
+
$e("list"), z(/* @__PURE__ */ new Set());
|
|
462
465
|
},
|
|
463
466
|
className: `p-1.5 sm:p-2 rounded ${D === "list" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
|
|
464
467
|
title: S("agentsPage.listViewTitle", "List view"),
|
|
465
|
-
children: /* @__PURE__ */
|
|
468
|
+
children: /* @__PURE__ */ h(Pe, { className: "w-4 h-4 text-text-secondary" })
|
|
466
469
|
})]
|
|
467
470
|
})]
|
|
468
|
-
}), /* @__PURE__ */
|
|
471
|
+
}), /* @__PURE__ */ g("div", {
|
|
469
472
|
className: "flex items-center gap-2 sm:gap-3 flex-wrap",
|
|
470
473
|
children: [
|
|
471
|
-
/* @__PURE__ */
|
|
474
|
+
/* @__PURE__ */ h(be, {
|
|
472
475
|
label: S("agentsPage.filterStatus", "Status"),
|
|
473
476
|
value: w,
|
|
474
|
-
options:
|
|
475
|
-
onChange:
|
|
477
|
+
options: Ke,
|
|
478
|
+
onChange: Xe
|
|
476
479
|
}),
|
|
477
|
-
/* @__PURE__ */
|
|
480
|
+
/* @__PURE__ */ h(be, {
|
|
478
481
|
label: S("agentsPage.filterPlatform", "Platform"),
|
|
479
482
|
value: T,
|
|
480
|
-
options:
|
|
481
|
-
onChange:
|
|
483
|
+
options: qe,
|
|
484
|
+
onChange: Ze
|
|
482
485
|
}),
|
|
483
|
-
/* @__PURE__ */
|
|
486
|
+
/* @__PURE__ */ h(Ce, {
|
|
484
487
|
label: S("agentsPage.filterTag", "Tag"),
|
|
485
488
|
value: E,
|
|
486
|
-
onChange:
|
|
489
|
+
onChange: Qe
|
|
487
490
|
})
|
|
488
491
|
]
|
|
489
492
|
})]
|
|
490
493
|
}),
|
|
491
|
-
|
|
494
|
+
Q.length > 0 && /* @__PURE__ */ h("div", {
|
|
492
495
|
className: "flex items-center gap-2 flex-wrap",
|
|
493
|
-
children: /* @__PURE__ */
|
|
496
|
+
children: /* @__PURE__ */ h("div", {
|
|
494
497
|
className: "ml-auto flex items-center gap-2",
|
|
495
|
-
children: /* @__PURE__ */
|
|
496
|
-
onClick:
|
|
498
|
+
children: /* @__PURE__ */ g("button", {
|
|
499
|
+
onClick: Jt ? qt : Kt,
|
|
497
500
|
className: "flex items-center gap-1.5 px-3 py-1.5 text-xs text-text-secondary hover:text-text-primary transition-colors",
|
|
498
|
-
children: [/* @__PURE__ */
|
|
501
|
+
children: [/* @__PURE__ */ h(Me, { className: "w-3.5 h-3.5" }), Jt ? S("agentsPage.deselectAll", "Deselect All") : S("agentsPage.selectAll", "Select All")]
|
|
499
502
|
})
|
|
500
503
|
})
|
|
501
504
|
}),
|
|
502
|
-
|
|
505
|
+
Yt && /* @__PURE__ */ g("div", {
|
|
503
506
|
className: "flex flex-col sm:flex-row items-start sm:items-center gap-3 px-4 py-2 bg-action-primary-bg/10 border border-action-primary-bg/20 rounded-lg",
|
|
504
|
-
children: [/* @__PURE__ */
|
|
507
|
+
children: [/* @__PURE__ */ h("span", {
|
|
505
508
|
className: "text-sm font-medium text-text-primary",
|
|
506
|
-
children: S("agentsPage.selectedCount", "{{count}} agents selected", { count:
|
|
507
|
-
}), /* @__PURE__ */
|
|
509
|
+
children: S("agentsPage.selectedCount", "{{count}} agents selected", { count: R.size })
|
|
510
|
+
}), /* @__PURE__ */ g("div", {
|
|
508
511
|
className: "flex items-center gap-1.5 sm:ml-auto",
|
|
509
|
-
children: [/* @__PURE__ */
|
|
510
|
-
onClick:
|
|
512
|
+
children: [/* @__PURE__ */ g("button", {
|
|
513
|
+
onClick: Xt,
|
|
511
514
|
disabled: lt,
|
|
512
515
|
className: "flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-status-error-text bg-status-error-bg border border-status-error-text/20 rounded-md hover:bg-status-error-bg/80 transition-colors disabled:opacity-50",
|
|
513
516
|
children: [
|
|
514
|
-
/* @__PURE__ */
|
|
517
|
+
/* @__PURE__ */ h(Ie, { className: "w-3 h-3" }),
|
|
515
518
|
" ",
|
|
516
519
|
S("agentsPage.remove", "Remove")
|
|
517
520
|
]
|
|
518
|
-
}), /* @__PURE__ */
|
|
519
|
-
onClick:
|
|
521
|
+
}), /* @__PURE__ */ g("button", {
|
|
522
|
+
onClick: qt,
|
|
520
523
|
className: "flex items-center gap-1.5 px-3 py-1.5 text-xs text-text-secondary hover:text-text-primary transition-colors",
|
|
521
524
|
children: [
|
|
522
|
-
/* @__PURE__ */
|
|
525
|
+
/* @__PURE__ */ h(Le, { className: "w-3 h-3" }),
|
|
523
526
|
" ",
|
|
524
527
|
S("agentsPage.deselect", "Deselect")
|
|
525
528
|
]
|
|
526
529
|
})]
|
|
527
530
|
})]
|
|
528
531
|
}),
|
|
529
|
-
C || w !== "all" || T !== "all" ? /* @__PURE__ */
|
|
532
|
+
C || w !== "all" || T !== "all" ? /* @__PURE__ */ g("p", {
|
|
530
533
|
className: "text-sm text-text-secondary",
|
|
531
534
|
children: [S("agentsPage.showingResults", "Showing {{filtered}} of {{total}} agents", {
|
|
532
|
-
filtered:
|
|
533
|
-
total:
|
|
534
|
-
}),
|
|
535
|
+
filtered: Q.length,
|
|
536
|
+
total: Z.length
|
|
537
|
+
}), K && /* @__PURE__ */ h("span", {
|
|
535
538
|
className: "ml-2 text-text-muted",
|
|
536
539
|
children: S("agentsPage.refreshing", "(refreshing...)")
|
|
537
540
|
})]
|
|
538
541
|
}) : null,
|
|
539
|
-
|
|
542
|
+
K && Z.length === 0 ? /* @__PURE__ */ h(Te, {
|
|
540
543
|
variant: "rows",
|
|
541
544
|
count: 6
|
|
542
|
-
}) :
|
|
545
|
+
}) : Q.length > 0 ? /* @__PURE__ */ h(f, {
|
|
543
546
|
mode: "wait",
|
|
544
|
-
children: D === "grid" ? /* @__PURE__ */
|
|
547
|
+
children: D === "grid" ? /* @__PURE__ */ h(v, {
|
|
545
548
|
stagger: .04,
|
|
546
549
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
547
|
-
children:
|
|
550
|
+
children: Q.map((e) => /* @__PURE__ */ h(_, { children: /* @__PURE__ */ h(Ee, {
|
|
548
551
|
agent: e,
|
|
549
552
|
onSelect: It,
|
|
550
553
|
onStart: Rt,
|
|
551
554
|
onStop: zt,
|
|
552
|
-
onDisconnect:
|
|
553
|
-
onConfigure:
|
|
554
|
-
onEditTunnelUrl:
|
|
555
|
-
selected:
|
|
556
|
-
onToggleSelect: () =>
|
|
555
|
+
onDisconnect: Bt,
|
|
556
|
+
onConfigure: Ht,
|
|
557
|
+
onEditTunnelUrl: Ut,
|
|
558
|
+
selected: R.has(e.id),
|
|
559
|
+
onToggleSelect: () => Gt(e.id),
|
|
557
560
|
healthErrorMessage: e.healthError ?? null
|
|
558
561
|
}) }, e.id))
|
|
559
|
-
}, "grid-view") : /* @__PURE__ */
|
|
562
|
+
}, "grid-view") : /* @__PURE__ */ h(v, {
|
|
560
563
|
stagger: .04,
|
|
561
|
-
children: /* @__PURE__ */
|
|
564
|
+
children: /* @__PURE__ */ h(_, {
|
|
562
565
|
variant: "fadeRight",
|
|
563
|
-
children: /* @__PURE__ */
|
|
564
|
-
agents:
|
|
566
|
+
children: /* @__PURE__ */ h(De, {
|
|
567
|
+
agents: Q,
|
|
565
568
|
onSelect: It,
|
|
566
569
|
onStart: Rt,
|
|
567
570
|
onStop: zt,
|
|
568
|
-
onDisconnect:
|
|
569
|
-
onSettings:
|
|
571
|
+
onDisconnect: Bt,
|
|
572
|
+
onSettings: Ht
|
|
570
573
|
})
|
|
571
574
|
})
|
|
572
575
|
}, "list-view")
|
|
573
|
-
}) : /* @__PURE__ */
|
|
574
|
-
icon: /* @__PURE__ */
|
|
576
|
+
}) : /* @__PURE__ */ h(ve, {
|
|
577
|
+
icon: /* @__PURE__ */ h(je, { className: "w-8 h-8 text-text-secondary" }),
|
|
575
578
|
title: C || w !== "all" || T !== "all" ? S("agentsPage.emptyNoAgentsFound", "No agents found") : S("agentsPage.emptyNoAgentsConfigured", "No agents configured"),
|
|
576
579
|
description: C || w !== "all" || T !== "all" ? S("agentsPage.emptyAdjustSearch", "Try adjusting your search or filters") : S("agentsPage.emptyNoAgentsDescription", "Install the CLI agent on your machine, then add it here. You can create a target inline while adding the agent."),
|
|
577
|
-
action: !C && w === "all" && T === "all" ? /* @__PURE__ */
|
|
580
|
+
action: !C && w === "all" && T === "all" ? /* @__PURE__ */ g("div", {
|
|
578
581
|
className: "flex flex-wrap items-center gap-3",
|
|
579
582
|
children: [
|
|
580
|
-
/* @__PURE__ */
|
|
581
|
-
onClick:
|
|
583
|
+
/* @__PURE__ */ g("button", {
|
|
584
|
+
onClick: $,
|
|
582
585
|
className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
|
|
583
|
-
children: [/* @__PURE__ */
|
|
586
|
+
children: [/* @__PURE__ */ h(d, { className: "w-4 h-4" }), S("agentsPage.addAgent", "Add Agent")]
|
|
584
587
|
}),
|
|
585
|
-
/* @__PURE__ */
|
|
588
|
+
/* @__PURE__ */ h("button", {
|
|
586
589
|
onClick: () => x("/getting-started"),
|
|
587
590
|
className: "flex items-center gap-2 px-4 py-2 border border-border-default text-text-primary rounded-md hover:bg-bg-sunken transition-colors text-sm",
|
|
588
591
|
children: S("agentsPage.setupGuide", "Setup guide")
|
|
589
592
|
}),
|
|
590
|
-
/* @__PURE__ */
|
|
593
|
+
/* @__PURE__ */ h(Se, { prompt: "What is an Agent in VibeControls and how do I add one?" })
|
|
591
594
|
]
|
|
592
595
|
}) : void 0
|
|
593
596
|
}),
|
|
594
|
-
|
|
597
|
+
et && /* @__PURE__ */ h(Oe, {
|
|
595
598
|
onSubmit: Lt,
|
|
596
599
|
onCancel: () => O(!1),
|
|
597
|
-
isLoading:
|
|
600
|
+
isLoading: tt,
|
|
598
601
|
onNavigate: (e) => {
|
|
599
602
|
O(!1), x(e);
|
|
600
603
|
},
|
|
@@ -606,18 +609,18 @@ function y() {
|
|
|
606
609
|
})),
|
|
607
610
|
targetsLoading: Et,
|
|
608
611
|
onCreateTarget: jt,
|
|
609
|
-
extraSection: /* @__PURE__ */
|
|
612
|
+
extraSection: /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h3", {
|
|
610
613
|
className: "text-sm font-medium text-text-secondary mb-2",
|
|
611
614
|
children: S("agents.tags", "Tags")
|
|
612
|
-
}), /* @__PURE__ */
|
|
615
|
+
}), /* @__PURE__ */ h(ge, {
|
|
613
616
|
entityType: "VIBECONTROLS_AGENT",
|
|
614
617
|
onDraftChange: ht
|
|
615
618
|
})] })
|
|
616
619
|
}),
|
|
617
|
-
/* @__PURE__ */
|
|
620
|
+
/* @__PURE__ */ h(f, { children: P && /* @__PURE__ */ h("div", {
|
|
618
621
|
className: "fixed inset-0 bg-bg-overlay flex items-center justify-center z-50 p-4 sm:p-6",
|
|
619
|
-
onClick: () => !
|
|
620
|
-
children: /* @__PURE__ */
|
|
622
|
+
onClick: () => !I && F(null),
|
|
623
|
+
children: /* @__PURE__ */ g(p.div, {
|
|
621
624
|
initial: {
|
|
622
625
|
opacity: 0,
|
|
623
626
|
scale: .95
|
|
@@ -634,44 +637,44 @@ function y() {
|
|
|
634
637
|
className: "bg-bg-surface border border-border-default rounded-lg shadow-xl w-full max-w-sm p-4 sm:p-6",
|
|
635
638
|
onClick: (e) => e.stopPropagation(),
|
|
636
639
|
children: [
|
|
637
|
-
/* @__PURE__ */
|
|
640
|
+
/* @__PURE__ */ h("h3", {
|
|
638
641
|
className: "text-lg font-semibold text-text-primary mb-1",
|
|
639
642
|
children: "Disconnect Agent"
|
|
640
643
|
}),
|
|
641
|
-
/* @__PURE__ */
|
|
644
|
+
/* @__PURE__ */ h("p", {
|
|
642
645
|
className: "text-sm text-text-secondary mb-4",
|
|
643
|
-
children:
|
|
646
|
+
children: ke(P) === "OFFLINE" ? /* @__PURE__ */ g(m, { children: [
|
|
644
647
|
"Clear the stored tunnel connection for",
|
|
645
648
|
" ",
|
|
646
|
-
/* @__PURE__ */
|
|
649
|
+
/* @__PURE__ */ h("strong", { children: P.name }),
|
|
647
650
|
"? This will remove the tunnel URL and API key from this offline agent."
|
|
648
|
-
] }) : /* @__PURE__ */
|
|
651
|
+
] }) : /* @__PURE__ */ g(m, { children: [
|
|
649
652
|
"Mark ",
|
|
650
|
-
/* @__PURE__ */
|
|
653
|
+
/* @__PURE__ */ h("strong", { children: P.name }),
|
|
651
654
|
" as offline and clear its tunnel connection? The agent process will not be stopped automatically — you may need to stop it manually on the host machine."
|
|
652
655
|
] })
|
|
653
656
|
}),
|
|
654
|
-
/* @__PURE__ */
|
|
657
|
+
/* @__PURE__ */ g("div", {
|
|
655
658
|
className: "flex justify-end gap-2",
|
|
656
|
-
children: [/* @__PURE__ */
|
|
657
|
-
onClick: () =>
|
|
658
|
-
disabled:
|
|
659
|
+
children: [/* @__PURE__ */ h("button", {
|
|
660
|
+
onClick: () => F(null),
|
|
661
|
+
disabled: I,
|
|
659
662
|
className: "px-4 py-2 text-sm text-text-secondary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
|
|
660
663
|
children: "Cancel"
|
|
661
|
-
}), /* @__PURE__ */
|
|
662
|
-
onClick:
|
|
663
|
-
disabled:
|
|
664
|
+
}), /* @__PURE__ */ h("button", {
|
|
665
|
+
onClick: Vt,
|
|
666
|
+
disabled: I,
|
|
664
667
|
className: "px-4 py-2 text-sm bg-action-danger-bg text-action-danger-text rounded-md hover:bg-action-danger-bg-hover transition-colors disabled:opacity-50",
|
|
665
|
-
children:
|
|
668
|
+
children: I ? "Disconnecting..." : "Disconnect"
|
|
666
669
|
})]
|
|
667
670
|
})
|
|
668
671
|
]
|
|
669
672
|
})
|
|
670
673
|
}) }),
|
|
671
|
-
/* @__PURE__ */
|
|
674
|
+
/* @__PURE__ */ h(f, { children: k && /* @__PURE__ */ h("div", {
|
|
672
675
|
className: "fixed inset-0 bg-bg-overlay flex items-center justify-center z-50 p-4 sm:p-6",
|
|
673
676
|
onClick: () => A(null),
|
|
674
|
-
children: /* @__PURE__ */
|
|
677
|
+
children: /* @__PURE__ */ g(p.div, {
|
|
675
678
|
initial: {
|
|
676
679
|
opacity: 0,
|
|
677
680
|
scale: .95
|
|
@@ -688,22 +691,22 @@ function y() {
|
|
|
688
691
|
className: "bg-bg-surface border border-border-default rounded-lg shadow-xl w-full max-w-md p-4 sm:p-6",
|
|
689
692
|
onClick: (e) => e.stopPropagation(),
|
|
690
693
|
children: [
|
|
691
|
-
/* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ h("h3", {
|
|
692
695
|
className: "text-lg font-semibold text-text-primary mb-1",
|
|
693
696
|
children: S("agentsPage.editTunnelTitle", "Edit Tunnel")
|
|
694
697
|
}),
|
|
695
|
-
/* @__PURE__ */
|
|
698
|
+
/* @__PURE__ */ h("p", {
|
|
696
699
|
className: "text-sm text-text-secondary mb-4",
|
|
697
700
|
children: S("agentsPage.editTunnelDescription", "Configure the cloudflared tunnel URL and API key for {{name}}.", { name: k.name })
|
|
698
701
|
}),
|
|
699
|
-
/* @__PURE__ */
|
|
702
|
+
/* @__PURE__ */ g("div", {
|
|
700
703
|
className: "space-y-4",
|
|
701
|
-
children: [/* @__PURE__ */
|
|
702
|
-
/* @__PURE__ */
|
|
704
|
+
children: [/* @__PURE__ */ g("div", { children: [
|
|
705
|
+
/* @__PURE__ */ h("label", {
|
|
703
706
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
704
707
|
children: S("agentsPage.tunnelUrlLabel", "Tunnel URL")
|
|
705
708
|
}),
|
|
706
|
-
/* @__PURE__ */
|
|
709
|
+
/* @__PURE__ */ h("input", {
|
|
707
710
|
ref: st,
|
|
708
711
|
type: "url",
|
|
709
712
|
defaultValue: k.tunnelUrl || "",
|
|
@@ -711,49 +714,49 @@ function y() {
|
|
|
711
714
|
className: "w-full px-3 py-2 border border-border-default rounded-md bg-bg-sunken text-text-primary placeholder:text-text-placeholder focus:outline-none focus:border-border-strong",
|
|
712
715
|
autoFocus: !0
|
|
713
716
|
}),
|
|
714
|
-
/* @__PURE__ */
|
|
717
|
+
/* @__PURE__ */ h("p", {
|
|
715
718
|
className: "text-xs text-text-muted mt-1",
|
|
716
719
|
children: S("agentsPage.tunnelUrlHint", "Leave empty to clear. Agents with auto-tunnel report this automatically on startup.")
|
|
717
720
|
})
|
|
718
|
-
] }), /* @__PURE__ */
|
|
719
|
-
/* @__PURE__ */
|
|
721
|
+
] }), /* @__PURE__ */ g("div", { children: [
|
|
722
|
+
/* @__PURE__ */ h("label", {
|
|
720
723
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
721
724
|
children: S("agentsPage.agentApiKeyLabel", "Agent API Key")
|
|
722
725
|
}),
|
|
723
|
-
/* @__PURE__ */
|
|
726
|
+
/* @__PURE__ */ h("input", {
|
|
724
727
|
ref: ct,
|
|
725
728
|
type: "text",
|
|
726
729
|
defaultValue: k.agentApiKey || "",
|
|
727
730
|
placeholder: S("agentsPage.agentApiKeyPlaceholder", "sk-agent-..."),
|
|
728
731
|
className: "w-full px-3 py-2 border border-border-default rounded-md bg-bg-sunken text-text-primary font-mono text-sm placeholder:text-text-placeholder focus:outline-none focus:border-border-strong"
|
|
729
732
|
}),
|
|
730
|
-
/* @__PURE__ */
|
|
733
|
+
/* @__PURE__ */ h("p", {
|
|
731
734
|
className: "text-xs text-text-muted mt-1",
|
|
732
735
|
children: S("agentsPage.agentApiKeyHint", "Authenticates requests to the agent. Typically changes on each agent restart.")
|
|
733
736
|
})
|
|
734
737
|
] })]
|
|
735
738
|
}),
|
|
736
|
-
/* @__PURE__ */
|
|
739
|
+
/* @__PURE__ */ g("div", {
|
|
737
740
|
className: "flex justify-end gap-2 mt-5",
|
|
738
|
-
children: [/* @__PURE__ */
|
|
741
|
+
children: [/* @__PURE__ */ h("button", {
|
|
739
742
|
onClick: () => A(null),
|
|
740
743
|
className: "px-4 py-2 text-sm text-text-secondary hover:bg-bg-sunken rounded-md transition-colors",
|
|
741
744
|
children: S("agentsPage.cancel", "Cancel")
|
|
742
|
-
}), /* @__PURE__ */
|
|
743
|
-
onClick:
|
|
744
|
-
disabled:
|
|
745
|
+
}), /* @__PURE__ */ h("button", {
|
|
746
|
+
onClick: Wt,
|
|
747
|
+
disabled: rt,
|
|
745
748
|
className: "px-4 py-2 text-sm bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50",
|
|
746
|
-
children:
|
|
749
|
+
children: rt ? S("agentsPage.saving", "Saving...") : S("agentsPage.save", "Save")
|
|
747
750
|
})]
|
|
748
751
|
})
|
|
749
752
|
]
|
|
750
753
|
})
|
|
751
754
|
}) }),
|
|
752
|
-
/* @__PURE__ */
|
|
755
|
+
/* @__PURE__ */ h(me, {
|
|
753
756
|
isOpen: pt,
|
|
754
|
-
onClose: () =>
|
|
757
|
+
onClose: () => H(!1),
|
|
755
758
|
onConfirm: () => {
|
|
756
|
-
|
|
759
|
+
H(!1), x("/billing");
|
|
757
760
|
},
|
|
758
761
|
title: "Agent Quota Reached",
|
|
759
762
|
message: "You've used all available agent slots on your current plan. Upgrade your plan to register more agents."
|
|
@@ -762,6 +765,6 @@ function y() {
|
|
|
762
765
|
});
|
|
763
766
|
}
|
|
764
767
|
//#endregion
|
|
765
|
-
export {
|
|
768
|
+
export { Ve as AgentsPage };
|
|
766
769
|
|
|
767
770
|
//# sourceMappingURL=AgentsPage.js.map
|