@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.
Files changed (111) hide show
  1. package/dist/node_modules/@apollo/client/errors/ServerError.js +17 -0
  2. package/dist/node_modules/@apollo/client/errors/ServerError.js.map +1 -0
  3. package/dist/node_modules/@apollo/client/errors/ServerParseError.js +17 -0
  4. package/dist/node_modules/@apollo/client/errors/ServerParseError.js.map +1 -0
  5. package/dist/node_modules/@apollo/client/link/batch/batchLink.js +28 -0
  6. package/dist/node_modules/@apollo/client/link/batch/batchLink.js.map +1 -0
  7. package/dist/node_modules/@apollo/client/link/batch/batching.js +70 -0
  8. package/dist/node_modules/@apollo/client/link/batch/batching.js.map +1 -0
  9. package/dist/node_modules/@apollo/client/link/batch-http/BaseBatchHttpLink.js +74 -0
  10. package/dist/node_modules/@apollo/client/link/batch-http/BaseBatchHttpLink.js.map +1 -0
  11. package/dist/node_modules/@apollo/client/link/batch-http/batchHttpLink.js +17 -0
  12. package/dist/node_modules/@apollo/client/link/batch-http/batchHttpLink.js.map +1 -0
  13. package/dist/node_modules/@apollo/client/link/client-awareness/ClientAwarenessLink.js +32 -0
  14. package/dist/node_modules/@apollo/client/link/client-awareness/ClientAwarenessLink.js.map +1 -0
  15. package/dist/node_modules/@apollo/client/link/core/ApolloLink.js +52 -0
  16. package/dist/node_modules/@apollo/client/link/core/ApolloLink.js.map +1 -0
  17. package/dist/node_modules/@apollo/client/link/http/checkFetcher.js +9 -0
  18. package/dist/node_modules/@apollo/client/link/http/checkFetcher.js.map +1 -0
  19. package/dist/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js +45 -0
  20. package/dist/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js.map +1 -0
  21. package/dist/node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js +60 -0
  22. package/dist/node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js.map +1 -0
  23. package/dist/node_modules/@apollo/client/link/http/selectURI.js +6 -0
  24. package/dist/node_modules/@apollo/client/link/http/selectURI.js.map +1 -0
  25. package/dist/node_modules/@apollo/client/link/utils/createOperation.js +34 -0
  26. package/dist/node_modules/@apollo/client/link/utils/createOperation.js.map +1 -0
  27. package/dist/node_modules/@apollo/client/link/utils/filterOperationVariables.js +14 -0
  28. package/dist/node_modules/@apollo/client/link/utils/filterOperationVariables.js.map +1 -0
  29. package/dist/node_modules/@apollo/client/utilities/caching/sizes.js +6 -0
  30. package/dist/node_modules/@apollo/client/utilities/caching/sizes.js.map +1 -0
  31. package/dist/node_modules/@apollo/client/utilities/graphql/print.js +16 -0
  32. package/dist/node_modules/@apollo/client/utilities/graphql/print.js.map +1 -0
  33. package/dist/node_modules/@apollo/client/utilities/internal/caches.js +19 -0
  34. package/dist/node_modules/@apollo/client/utilities/internal/caches.js.map +1 -0
  35. package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js +21 -0
  36. package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +1 -0
  37. package/dist/node_modules/@apollo/client/utilities/internal/compact.js +14 -0
  38. package/dist/node_modules/@apollo/client/utilities/internal/compact.js.map +1 -0
  39. package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js +9 -0
  40. package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js.map +1 -0
  41. package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js +9 -0
  42. package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js.map +1 -0
  43. package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js +8 -0
  44. package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js.map +1 -0
  45. package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js +9 -0
  46. package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js.map +1 -0
  47. package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js +10 -0
  48. package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +1 -0
  49. package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js +10 -0
  50. package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +1 -0
  51. package/dist/node_modules/@apollo/client/utilities/internal/memoize.js +23 -0
  52. package/dist/node_modules/@apollo/client/utilities/internal/memoize.js.map +1 -0
  53. package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js +10 -0
  54. package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +1 -0
  55. package/dist/node_modules/@apollo/client/utilities/invariant/index.js +57 -0
  56. package/dist/node_modules/@apollo/client/utilities/invariant/index.js.map +1 -0
  57. package/dist/node_modules/@apollo/client/version.js +6 -0
  58. package/dist/node_modules/@apollo/client/version.js.map +1 -0
  59. package/dist/node_modules/@wry/caches/lib/weak.js +67 -0
  60. package/dist/node_modules/@wry/caches/lib/weak.js.map +1 -0
  61. package/dist/node_modules/@wry/trie/lib/index.js +53 -0
  62. package/dist/node_modules/@wry/trie/lib/index.js.map +1 -0
  63. package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js +21 -0
  64. package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +1 -0
  65. package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js +78 -0
  66. package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js.map +1 -0
  67. package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js +117 -0
  68. package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -0
  69. package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js +93 -0
  70. package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -0
  71. package/dist/node_modules/rxjs/dist/esm5/internal/config.js +12 -0
  72. package/dist/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -0
  73. package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js +9 -0
  74. package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +1 -0
  75. package/dist/node_modules/rxjs/dist/esm5/internal/observable/throwError.js +17 -0
  76. package/dist/node_modules/rxjs/dist/esm5/internal/observable/throwError.js.map +1 -0
  77. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +16 -0
  78. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -0
  79. package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +8 -0
  80. package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -0
  81. package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +13 -0
  82. package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -0
  83. package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +11 -0
  84. package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -0
  85. package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +11 -0
  86. package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -0
  87. package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +22 -0
  88. package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -0
  89. package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js +8 -0
  90. package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js.map +1 -0
  91. package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +8 -0
  92. package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -0
  93. package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js +6 -0
  94. package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -0
  95. package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js +13 -0
  96. package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +1 -0
  97. package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +14 -0
  98. package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -0
  99. package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js +52 -0
  100. package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js.map +1 -0
  101. package/dist/pages/AgentsPage.js +242 -239
  102. package/dist/pages/AgentsPage.js.map +1 -1
  103. package/dist/pages/CatalogPage.js +146 -98
  104. package/dist/pages/CatalogPage.js.map +1 -1
  105. package/dist/pages/ComponentsPage.js +163 -117
  106. package/dist/pages/ComponentsPage.js.map +1 -1
  107. package/dist/pages/TemplatesPage.js +74 -26
  108. package/dist/pages/TemplatesPage.js.map +1 -1
  109. package/dist/providers/VibeControlsProvider.js +35 -30
  110. package/dist/providers/VibeControlsProvider.js.map +1 -1
  111. package/package.json +1 -1
@@ -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 se, useVibeNavigate as ce } from "../providers/VibeControlsProvider.js";
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 le from "../hooks/useCachedInitialData.js";
5
- import { PageHeader as ue } from "../components/shared/PageHeader.js";
6
- import { LoadingState as de } from "../components/shared/LoadingState.js";
7
- import { ErrorState as fe } from "../components/shared/ErrorState.js";
8
- import { QuotaExhaustedDialog as pe } from "../components/shared/QuotaExhaustedDialog.js";
9
- import { isQuotaExhaustedError as me } from "../utils/quotaUtils.js";
10
- import { EntityTagPicker as he } from "../components/shared/EntityTagPicker.js";
11
- import { useDraftEntityTags as ge } from "../hooks/useDraftEntityTags.js";
12
- import { EmptyState as _e } from "../components/shared/EmptyState.js";
13
- import { SearchInput as ve } from "../components/shared/SearchInput.js";
14
- import { FilterDropdown as ye } from "../components/shared/FilterDropdown.js";
15
- import { AgentSetupBanner as be } from "../components/shared/AgentSetupBanner.js";
16
- import { GetHelpButton as xe } from "../components/shared/GetHelpButton.js";
17
- import { TagFilter as Se } from "../components/shared/TagFilter.js";
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 Ce } from "../constants/permissions.js";
20
- import { PageSkeleton as we } from "../components/shared/PageSkeleton.js";
21
- import { AgentCard as Te } from "../components/agents/AgentCard.js";
22
- import { AgentList as Ee } from "../components/agents/AgentList.js";
23
- import { AgentForm as De } from "../components/agents/AgentForm.js";
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 Oe } from "../utils/agentStatus.js";
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 ke } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
28
- import { Bot as Ae, CheckSquare as je, Grid as Me, List as Ne, Plus as d, RefreshCw as Pe, Trash2 as Fe, XSquare as Ie } from "lucide-react";
29
- import { usePermissions as Le } from "@burdenoff/fe-libs/shared/providers/shell";
30
- import { AnimatePresence as f, motion as Re } from "framer-motion";
31
- import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
32
- import { MotionItem as g, MotionList as _, MotionPage as v } from "@burdenoff/fe-libs/shared/motion";
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 y() {
36
- let { onAgentSelect: y, workspaceId: b } = se(), x = ce(), { hasPermission: Ve, isLoading: He, permissions: Ue } = Le(), { t: We } = ke(), S = o((e, t, n) => {
37
- let r = We(e, n), i = r === e ? t : 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
- }, [We]), Ge = [
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
- ], Ke = [
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
- ], qe = Ve(Ce.AGENT_LIST), [C, Je] = u(""), [w, Ye] = u("all"), [T, Xe] = u("all"), [E, Ze] = u("all"), [D, Qe] = u("grid"), [$e, O] = u(!1), [et, tt] = u(!1), [k, A] = u(null), [nt, rt] = u(!1), j = a((e) => e.connectingAgents), it = a((e) => e.markAgentConnecting), M = a((e) => e.clearAgentConnecting), at = c(() => new Set(Object.keys(j)), [j]), ot = l(/* @__PURE__ */ new Map());
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 = ot.current;
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 = ot.current;
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 [N, P] = u(null), [F, I] = u(!1), st = l(null), ct = l(null), [L, R] = u(/* @__PURE__ */ new Set()), [lt, ut] = u(!1), [dt, z] = u(null), [ft, B] = u(null), [pt, V] = u(!1), H = l(null);
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
- H.current && clearTimeout(H.current);
93
+ U.current && clearTimeout(U.current);
94
94
  }, []);
95
- let U = o((e) => {
96
- H.current && clearTimeout(H.current), B(null), z(e), H.current = setTimeout(() => z(null), 3e3);
97
- }, []), W = o((e) => {
98
- H.current && clearTimeout(H.current), z(null), B(e), H.current = setTimeout(() => B(null), 5e3);
99
- }, []), [mt] = n({ refetchQueries: ["ListAgents"] }), { setDraftTagIds: ht, flushTags: gt } = ge("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 } = le(), Tt = St, Et = Ct, Dt = Tt.length > 0, [Ot] = ie({ refetchQueries: ["ListAgents"] }), [kt] = ee({ refetchQueries: ["ListAgents"] }), [At] = r({
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: G, error: Nt, refetch: K } = te({
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
- }), [Pt, q] = oe({
136
- fetchPolicy: "network-only",
137
- notifyOnNetworkStatusChange: !0
138
- }), { data: J } = ae({ skip: !b }), Ft = q.data === void 0 && J === void 0, Y = c(() => {
139
- let e = /* @__PURE__ */ new Map(), t = J?.vibecontrolsAgentHealthProbeStream ?? q.data?.vibecontrolsAgentHealthProbes ?? [];
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
- }, [q.data, J]), X = c(() => (Mt?.vibecontrolsAgents ?? []).map((e) => ({
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: at.has(e.id) ? "CONNECTING" : Oe({
158
+ status: ot.has(e.id) ? "CONNECTING" : ke({
156
159
  id: e.id,
157
160
  isActive: e.isActive,
158
161
  metadata: e.metadata
159
- }, Y, { probesLoading: Ft }),
160
- healthError: Y.get(e.id)?.errorMessage ?? (e.lastGatewayAuthPushStatus === "failed" ? e.lastGatewayAuthPushError ?? "Gateway-auth push failed" : null),
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
- Y,
188
+ X,
186
189
  Ft,
187
- at
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 && (Y.get(r)?.healthy === !0 && t >= e ? M(r) : e < n && (n = e));
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 && Y.get(t)?.healthy === !0 && Date.now() >= n && M(t);
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
- Y,
210
+ X,
208
211
  j,
209
212
  M
210
213
  ]);
211
- let Z = c(() => X.filter((e) => {
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
- X,
221
+ Z,
219
222
  C,
220
223
  E
221
224
  ]);
222
225
  s(() => () => {
223
- H.current && clearTimeout(H.current);
226
+ U.current && clearTimeout(U.current);
224
227
  }, []);
225
228
  let It = (e) => {
226
- x(`/agents/${e.id}`), y?.({
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
- }, Q = () => {
235
+ }, $ = () => {
233
236
  O(!0);
234
237
  }, Lt = async (e) => {
235
238
  try {
236
- tt(!0);
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 (me(e)) {
265
- V(!0), O(!1);
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
- tt(!1);
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 } }), U(`Agent "${e.name}" started`);
279
+ await vt({ variables: { id: e.id } }), W(`Agent "${e.name}" started`);
277
280
  } catch (e) {
278
- console.error("Failed to start agent:", e), W(e instanceof Error ? e.message : "Failed to start agent");
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 } }), U(`Agent "${e.name}" stopped`);
287
+ await yt({ variables: { id: e.id } }), W(`Agent "${e.name}" stopped`);
285
288
  } catch (e) {
286
- console.error("Failed to stop agent:", e), W(e instanceof Error ? e.message : "Failed to stop agent");
289
+ console.error("Failed to stop agent:", e), G(e instanceof Error ? e.message : "Failed to stop agent");
287
290
  }
288
- }, $ = (e) => {
289
- P(e);
290
- }, Bt = async () => {
291
- if (!N) return;
292
- let e = N;
293
- I(!0);
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), W(e instanceof Error ? e.message : "Failed to disconnect agent"), I(!1), P(null), await K();
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
- }), U(`Agent "${e.name}" disconnected`);
317
+ }), W(`Agent "${e.name}" disconnected`);
315
318
  } catch (e) {
316
- console.error("Failed to clear tunnel fields:", e), W("Agent marked offline, but failed to clear connection fields — clear them manually in Settings.");
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
- I(!1), P(null), await K();
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
- }, Ut = async () => {
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
- rt(!0), await Ot({
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 && it(e), A(null);
340
+ }), t && at(e), A(null);
338
341
  } catch (e) {
339
342
  console.error("Failed to update tunnel settings:", e);
340
343
  } finally {
341
- rt(!1);
344
+ it(!1);
342
345
  }
343
- }, Wt = o((e) => {
344
- R((t) => {
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
- }, []), Gt = o(() => {
349
- R(new Set(Z.map((e) => e.id)));
350
- }, [Z]), Kt = o(() => {
351
- R(/* @__PURE__ */ new Set());
352
- }, []), qt = Z.length > 0 && L.size === Z.length, Jt = L.size > 0, Yt = o(async () => {
353
- if (L.size !== 0 && window.confirm(S("agentsPage.bulkDeleteConfirm", "Are you sure you want to remove {{count}} agent(s)? This cannot be undone.", { count: L.size }))) {
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(L).map((e) => kt({ variables: { id: e } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.filter((e) => e.status === "rejected").length;
357
- n > 0 ? W(`Removed ${t}, failed to remove ${n} agent${n === 1 ? "" : "s"}`) : U(`Removed ${t} agent${t === 1 ? "" : "s"}`), R(/* @__PURE__ */ new Set());
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
- W(e instanceof Error ? e.message : "Failed to remove agents");
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
- L,
368
+ R,
366
369
  kt,
367
- W,
368
- U
369
- ]), Xt = {
370
- total: X.length,
371
- active: X.filter((e) => e.isActive).length,
372
- offline: X.filter((e) => !e.isActive).length
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 He ? /* @__PURE__ */ m(v, {
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__ */ m(de, { message: S("agentsPage.loadingPermissions", "Loading permissions...") })
377
- }) : Ue && Ue.permissionStrings?.length > 0 && !qe ? /* @__PURE__ */ m(v, {
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__ */ m(ze, {
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 && X.length === 0 ? /* @__PURE__ */ m(v, {
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__ */ m(fe, {
388
+ children: /* @__PURE__ */ h(pe, {
386
389
  title: S("agentsPage.failedLoad", "Failed to load agents"),
387
390
  message: Nt.message,
388
- onRetry: () => K()
391
+ onRetry: () => q()
389
392
  })
390
- }) : /* @__PURE__ */ h(v, {
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__ */ m("div", {
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__ */ m("div", {
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__ */ m(ue, {
404
+ /* @__PURE__ */ h(de, {
402
405
  title: S("agentsPage.title", "Agents"),
403
406
  description: S("agentsPage.descriptionOnline", "{{active}} of {{total}} agents online", {
404
- active: Xt.active,
405
- total: Xt.total
407
+ active: Zt.active,
408
+ total: Zt.total
406
409
  }),
407
- actions: /* @__PURE__ */ h("div", {
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__ */ m("button", {
412
+ children: [/* @__PURE__ */ h("button", {
410
413
  onClick: () => {
411
- K(), Pt();
414
+ q(), Pt();
412
415
  },
413
- disabled: G || q.loading,
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__ */ m(Pe, { className: `w-4 h-4 ${G || q.loading ? "animate-spin" : ""}` })
417
- }), Dt ? /* @__PURE__ */ m(Be, {
418
- permission: Ce.AGENT_CREATE,
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__ */ h("button", {
422
- onClick: Q,
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__ */ m(d, { className: "w-4 h-4" }), S("agentsPage.addAgent", "Add Agent")]
427
+ children: [/* @__PURE__ */ h(d, { className: "w-4 h-4" }), S("agentsPage.addAgent", "Add Agent")]
425
428
  })
426
- }) : /* @__PURE__ */ h("button", {
427
- onClick: Q,
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__ */ m(d, { className: "w-4 h-4" }), S("agentsPage.addAgent", "Add Agent")]
432
+ children: [/* @__PURE__ */ h(d, { className: "w-4 h-4" }), S("agentsPage.addAgent", "Add Agent")]
430
433
  })]
431
434
  })
432
435
  }),
433
- X.length === 0 && !G && /* @__PURE__ */ m(be, {
436
+ Z.length === 0 && !K && /* @__PURE__ */ h(xe, {
434
437
  variant: "full",
435
438
  dismissKey: "vibecontrols-agents-setup-banner"
436
439
  }),
437
- X.length > 0 && /* @__PURE__ */ m(be, {
440
+ Z.length > 0 && /* @__PURE__ */ h(xe, {
438
441
  variant: "compact",
439
442
  dismissKey: "vibecontrols-agents-compact-banner"
440
443
  }),
441
- /* @__PURE__ */ h("div", {
444
+ /* @__PURE__ */ g("div", {
442
445
  className: "space-y-3",
443
- children: [/* @__PURE__ */ h("div", {
446
+ children: [/* @__PURE__ */ g("div", {
444
447
  className: "flex items-center gap-2",
445
- children: [/* @__PURE__ */ m(ve, {
448
+ children: [/* @__PURE__ */ h(ye, {
446
449
  value: C,
447
- onChange: Je,
450
+ onChange: Ye,
448
451
  placeholder: S("agentsPage.searchPlaceholder", "Search agents..."),
449
452
  className: "flex-1 sm:w-64 sm:flex-none"
450
- }), /* @__PURE__ */ h("div", {
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__ */ m("button", {
455
+ children: [/* @__PURE__ */ h("button", {
453
456
  onClick: () => {
454
- Qe("grid"), R(/* @__PURE__ */ new Set());
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__ */ m(Me, { className: "w-4 h-4 text-text-secondary" })
459
- }), /* @__PURE__ */ m("button", {
461
+ children: /* @__PURE__ */ h(Ne, { className: "w-4 h-4 text-text-secondary" })
462
+ }), /* @__PURE__ */ h("button", {
460
463
  onClick: () => {
461
- Qe("list"), R(/* @__PURE__ */ new Set());
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__ */ m(Ne, { className: "w-4 h-4 text-text-secondary" })
468
+ children: /* @__PURE__ */ h(Pe, { className: "w-4 h-4 text-text-secondary" })
466
469
  })]
467
470
  })]
468
- }), /* @__PURE__ */ h("div", {
471
+ }), /* @__PURE__ */ g("div", {
469
472
  className: "flex items-center gap-2 sm:gap-3 flex-wrap",
470
473
  children: [
471
- /* @__PURE__ */ m(ye, {
474
+ /* @__PURE__ */ h(be, {
472
475
  label: S("agentsPage.filterStatus", "Status"),
473
476
  value: w,
474
- options: Ge,
475
- onChange: Ye
477
+ options: Ke,
478
+ onChange: Xe
476
479
  }),
477
- /* @__PURE__ */ m(ye, {
480
+ /* @__PURE__ */ h(be, {
478
481
  label: S("agentsPage.filterPlatform", "Platform"),
479
482
  value: T,
480
- options: Ke,
481
- onChange: Xe
483
+ options: qe,
484
+ onChange: Ze
482
485
  }),
483
- /* @__PURE__ */ m(Se, {
486
+ /* @__PURE__ */ h(Ce, {
484
487
  label: S("agentsPage.filterTag", "Tag"),
485
488
  value: E,
486
- onChange: Ze
489
+ onChange: Qe
487
490
  })
488
491
  ]
489
492
  })]
490
493
  }),
491
- Z.length > 0 && /* @__PURE__ */ m("div", {
494
+ Q.length > 0 && /* @__PURE__ */ h("div", {
492
495
  className: "flex items-center gap-2 flex-wrap",
493
- children: /* @__PURE__ */ m("div", {
496
+ children: /* @__PURE__ */ h("div", {
494
497
  className: "ml-auto flex items-center gap-2",
495
- children: /* @__PURE__ */ h("button", {
496
- onClick: qt ? Kt : Gt,
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__ */ m(je, { className: "w-3.5 h-3.5" }), qt ? S("agentsPage.deselectAll", "Deselect All") : S("agentsPage.selectAll", "Select All")]
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
- Jt && /* @__PURE__ */ h("div", {
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__ */ m("span", {
507
+ children: [/* @__PURE__ */ h("span", {
505
508
  className: "text-sm font-medium text-text-primary",
506
- children: S("agentsPage.selectedCount", "{{count}} agents selected", { count: L.size })
507
- }), /* @__PURE__ */ h("div", {
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__ */ h("button", {
510
- onClick: Yt,
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__ */ m(Fe, { className: "w-3 h-3" }),
517
+ /* @__PURE__ */ h(Ie, { className: "w-3 h-3" }),
515
518
  " ",
516
519
  S("agentsPage.remove", "Remove")
517
520
  ]
518
- }), /* @__PURE__ */ h("button", {
519
- onClick: Kt,
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__ */ m(Ie, { className: "w-3 h-3" }),
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__ */ h("p", {
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: Z.length,
533
- total: X.length
534
- }), G && /* @__PURE__ */ m("span", {
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
- G && X.length === 0 ? /* @__PURE__ */ m(we, {
542
+ K && Z.length === 0 ? /* @__PURE__ */ h(Te, {
540
543
  variant: "rows",
541
544
  count: 6
542
- }) : Z.length > 0 ? /* @__PURE__ */ m(f, {
545
+ }) : Q.length > 0 ? /* @__PURE__ */ h(f, {
543
546
  mode: "wait",
544
- children: D === "grid" ? /* @__PURE__ */ m(_, {
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: Z.map((e) => /* @__PURE__ */ m(g, { children: /* @__PURE__ */ m(Te, {
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: Vt,
554
- onEditTunnelUrl: Ht,
555
- selected: L.has(e.id),
556
- onToggleSelect: () => Wt(e.id),
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__ */ m(_, {
562
+ }, "grid-view") : /* @__PURE__ */ h(v, {
560
563
  stagger: .04,
561
- children: /* @__PURE__ */ m(g, {
564
+ children: /* @__PURE__ */ h(_, {
562
565
  variant: "fadeRight",
563
- children: /* @__PURE__ */ m(Ee, {
564
- agents: Z,
566
+ children: /* @__PURE__ */ h(De, {
567
+ agents: Q,
565
568
  onSelect: It,
566
569
  onStart: Rt,
567
570
  onStop: zt,
568
- onDisconnect: $,
569
- onSettings: Vt
571
+ onDisconnect: Bt,
572
+ onSettings: Ht
570
573
  })
571
574
  })
572
575
  }, "list-view")
573
- }) : /* @__PURE__ */ m(_e, {
574
- icon: /* @__PURE__ */ m(Ae, { className: "w-8 h-8 text-text-secondary" }),
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__ */ h("div", {
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__ */ h("button", {
581
- onClick: Q,
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__ */ m(d, { className: "w-4 h-4" }), S("agentsPage.addAgent", "Add Agent")]
586
+ children: [/* @__PURE__ */ h(d, { className: "w-4 h-4" }), S("agentsPage.addAgent", "Add Agent")]
584
587
  }),
585
- /* @__PURE__ */ m("button", {
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__ */ m(xe, { prompt: "What is an Agent in VibeControls and how do I add one?" })
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
- $e && /* @__PURE__ */ m(De, {
597
+ et && /* @__PURE__ */ h(Oe, {
595
598
  onSubmit: Lt,
596
599
  onCancel: () => O(!1),
597
- isLoading: et,
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__ */ h("div", { children: [/* @__PURE__ */ m("h3", {
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__ */ m(he, {
615
+ }), /* @__PURE__ */ h(ge, {
613
616
  entityType: "VIBECONTROLS_AGENT",
614
617
  onDraftChange: ht
615
618
  })] })
616
619
  }),
617
- /* @__PURE__ */ m(f, { children: N && /* @__PURE__ */ m("div", {
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: () => !F && P(null),
620
- children: /* @__PURE__ */ h(Re.div, {
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__ */ m("h3", {
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__ */ m("p", {
644
+ /* @__PURE__ */ h("p", {
642
645
  className: "text-sm text-text-secondary mb-4",
643
- children: Oe(N) === "OFFLINE" ? /* @__PURE__ */ h(p, { children: [
646
+ children: ke(P) === "OFFLINE" ? /* @__PURE__ */ g(m, { children: [
644
647
  "Clear the stored tunnel connection for",
645
648
  " ",
646
- /* @__PURE__ */ m("strong", { children: N.name }),
649
+ /* @__PURE__ */ h("strong", { children: P.name }),
647
650
  "? This will remove the tunnel URL and API key from this offline agent."
648
- ] }) : /* @__PURE__ */ h(p, { children: [
651
+ ] }) : /* @__PURE__ */ g(m, { children: [
649
652
  "Mark ",
650
- /* @__PURE__ */ m("strong", { children: N.name }),
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__ */ h("div", {
657
+ /* @__PURE__ */ g("div", {
655
658
  className: "flex justify-end gap-2",
656
- children: [/* @__PURE__ */ m("button", {
657
- onClick: () => P(null),
658
- disabled: F,
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__ */ m("button", {
662
- onClick: Bt,
663
- disabled: F,
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: F ? "Disconnecting..." : "Disconnect"
668
+ children: I ? "Disconnecting..." : "Disconnect"
666
669
  })]
667
670
  })
668
671
  ]
669
672
  })
670
673
  }) }),
671
- /* @__PURE__ */ m(f, { children: k && /* @__PURE__ */ m("div", {
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__ */ h(Re.div, {
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__ */ m("h3", {
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__ */ m("p", {
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__ */ h("div", {
702
+ /* @__PURE__ */ g("div", {
700
703
  className: "space-y-4",
701
- children: [/* @__PURE__ */ h("div", { children: [
702
- /* @__PURE__ */ m("label", {
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__ */ m("input", {
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__ */ m("p", {
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__ */ h("div", { children: [
719
- /* @__PURE__ */ m("label", {
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__ */ m("input", {
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__ */ m("p", {
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__ */ h("div", {
739
+ /* @__PURE__ */ g("div", {
737
740
  className: "flex justify-end gap-2 mt-5",
738
- children: [/* @__PURE__ */ m("button", {
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__ */ m("button", {
743
- onClick: Ut,
744
- disabled: nt,
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: nt ? S("agentsPage.saving", "Saving...") : S("agentsPage.save", "Save")
749
+ children: rt ? S("agentsPage.saving", "Saving...") : S("agentsPage.save", "Save")
747
750
  })]
748
751
  })
749
752
  ]
750
753
  })
751
754
  }) }),
752
- /* @__PURE__ */ m(pe, {
755
+ /* @__PURE__ */ h(me, {
753
756
  isOpen: pt,
754
- onClose: () => V(!1),
757
+ onClose: () => H(!1),
755
758
  onConfirm: () => {
756
- V(!1), x("/billing");
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 { y as AgentsPage };
768
+ export { Ve as AgentsPage };
766
769
 
767
770
  //# sourceMappingURL=AgentsPage.js.map