@burdenoff/microfe-vibecontrols 2026.625.3 → 2026.626.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/components/agents/AgentForm.js +129 -127
  2. package/dist/components/agents/AgentForm.js.map +1 -1
  3. package/dist/components/shared/InstallTabs.js +19 -7
  4. package/dist/components/shared/InstallTabs.js.map +1 -1
  5. package/dist/pages/ActionsPage.js +209 -204
  6. package/dist/pages/ActionsPage.js.map +1 -1
  7. package/dist/pages/AgentDetailsPage.js +678 -648
  8. package/dist/pages/AgentDetailsPage.js.map +1 -1
  9. package/dist/pages/AgentGraphPage.js +112 -108
  10. package/dist/pages/AgentGraphPage.js.map +1 -1
  11. package/dist/pages/AgentsPage.js +159 -155
  12. package/dist/pages/AgentsPage.js.map +1 -1
  13. package/dist/pages/AnalyticsPage.js +140 -136
  14. package/dist/pages/AnalyticsPage.js.map +1 -1
  15. package/dist/pages/CatalogDetailPage.js +249 -244
  16. package/dist/pages/CatalogDetailPage.js.map +1 -1
  17. package/dist/pages/CatalogPage.js +73 -68
  18. package/dist/pages/CatalogPage.js.map +1 -1
  19. package/dist/pages/ComponentDetailPage.js +195 -164
  20. package/dist/pages/ComponentDetailPage.js.map +1 -1
  21. package/dist/pages/ComponentsPage.js +80 -75
  22. package/dist/pages/ComponentsPage.js.map +1 -1
  23. package/dist/pages/EnvTopologyPage.js +100 -95
  24. package/dist/pages/EnvTopologyPage.js.map +1 -1
  25. package/dist/pages/HealthPage.js +331 -204
  26. package/dist/pages/HealthPage.js.map +1 -1
  27. package/dist/pages/LogsPage.js +54 -49
  28. package/dist/pages/LogsPage.js.map +1 -1
  29. package/dist/pages/OverviewPage.js +159 -129
  30. package/dist/pages/OverviewPage.js.map +1 -1
  31. package/dist/pages/PluginsCatalogPage.js +72 -78
  32. package/dist/pages/PluginsCatalogPage.js.map +1 -1
  33. package/dist/pages/SessionDetailsPage.js +517 -512
  34. package/dist/pages/SessionDetailsPage.js.map +1 -1
  35. package/dist/pages/SessionsPage.js +1084 -1079
  36. package/dist/pages/SessionsPage.js.map +1 -1
  37. package/dist/pages/SettingsPage.js +107 -103
  38. package/dist/pages/SettingsPage.js.map +1 -1
  39. package/dist/pages/TargetDetailsPage.js +131 -123
  40. package/dist/pages/TargetDetailsPage.js.map +1 -1
  41. package/dist/pages/TargetsPage.js +198 -194
  42. package/dist/pages/TargetsPage.js.map +1 -1
  43. package/dist/pages/TemplatesPage.js +77 -71
  44. package/dist/pages/TemplatesPage.js.map +1 -1
  45. package/dist/pages/VibeAuditPage.js +83 -78
  46. package/dist/pages/VibeAuditPage.js.map +1 -1
  47. package/dist/pages/VibeCalendarPage.js +109 -104
  48. package/dist/pages/VibeCalendarPage.js.map +1 -1
  49. package/dist/pages/VibeDeckPage.js +222 -217
  50. package/dist/pages/VibeDeckPage.js.map +1 -1
  51. package/dist/pages/VibeDetailsPage.js +532 -501
  52. package/dist/pages/VibeDetailsPage.js.map +1 -1
  53. package/dist/pages/VibesPage.js +137 -133
  54. package/dist/pages/VibesPage.js.map +1 -1
  55. package/dist/pages/WebhooksPage.js +329 -324
  56. package/dist/pages/WebhooksPage.js.map +1 -1
  57. package/dist/pages/ai/AIPage.js +149 -144
  58. package/dist/pages/ai/AIPage.js.map +1 -1
  59. package/package.json +2 -2
@@ -11,23 +11,23 @@ import { SearchInput as ce } from "../components/shared/SearchInput.js";
11
11
  import { FilterDropdown as le } from "../components/shared/FilterDropdown.js";
12
12
  import { Card as ue } from "../components/shared/Card.js";
13
13
  import { GetHelpButton as de } from "../components/shared/GetHelpButton.js";
14
- import { SelectionCheckbox as fe } from "../components/shared/SelectionCheckbox.js";
14
+ import { SelectionCheckbox as o } from "../components/shared/SelectionCheckbox.js";
15
15
  import "../components/shared/index.js";
16
- import { isNative as pe, nativeImpact as me, nativeNotify as he } from "../utils/nativeBridge.js";
17
- import { VIBE_PERMISSIONS as o } from "../constants/permissions.js";
18
- import { PageSkeleton as ge } from "../components/shared/PageSkeleton.js";
19
- import { WEBHOOK_EVENTS as _e, isCustomEvent as s } from "../components/webhooks/types.js";
20
- import { useEffect as ve, useMemo as c, useRef as l, useState as u } from "react";
21
- import { useI18n as ye } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
22
- import { AlertTriangle as be, Bot as xe, Check as Se, Eye as Ce, EyeOff as we, Grid as Te, List as Ee, Play as De, Plus as d, RefreshCw as Oe, Trash2 as ke, Webhook as Ae, X as je } from "lucide-react";
23
- import { usePermissions as Me } from "@burdenoff/fe-libs/shared/providers/shell";
24
- import { AnimatePresence as Ne } from "framer-motion";
25
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
26
- import { Button as Pe, CTAOverflowMenu as Fe } from "@burdenoff/fe-libs/ui";
27
- import { AccessDenied as Ie, PermissionButton as Le } from "@burdenoff/fe-libs/shared/components";
28
- import { MotionItem as Re, MotionList as ze, MotionPage as m } from "@burdenoff/fe-libs/shared/motion";
16
+ import { isNative as fe, nativeImpact as pe, nativeNotify as me } from "../utils/nativeBridge.js";
17
+ import { VIBE_PERMISSIONS as s } from "../constants/permissions.js";
18
+ import { PageSkeleton as he } from "../components/shared/PageSkeleton.js";
19
+ import { WEBHOOK_EVENTS as ge, isCustomEvent as c } from "../components/webhooks/types.js";
20
+ import { useEffect as _e, useMemo as l, useRef as u, useState as d } from "react";
21
+ import { useI18n as ve } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
22
+ import { AlertTriangle as ye, Bot as be, Check as xe, Eye as Se, EyeOff as Ce, Grid as we, List as Te, Play as Ee, Plus as f, RefreshCw as De, Trash2 as Oe, Webhook as p, X as ke } from "lucide-react";
23
+ import { usePermissions as Ae } from "@burdenoff/fe-libs/shared/providers/shell";
24
+ import { AnimatePresence as je } from "framer-motion";
25
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
26
+ import { Button as Me, CTAOverflowMenu as Ne, PagePurpose as Pe } from "@burdenoff/fe-libs/ui";
27
+ import { AccessDenied as Fe, PermissionButton as Ie } from "@burdenoff/fe-libs/shared/components";
28
+ import { MotionItem as Le, MotionList as Re, MotionPage as g } from "@burdenoff/fe-libs/shared/motion";
29
29
  //#region src/pages/WebhooksPage.tsx
30
- var Be = [
30
+ var ze = [
31
31
  {
32
32
  value: "all",
33
33
  label: "All Statuses"
@@ -45,34 +45,34 @@ var Be = [
45
45
  label: "Has Errors"
46
46
  }
47
47
  ];
48
- function h() {
48
+ function Be() {
49
49
  ne();
50
- let h = re(), { t: Ve } = ye(), { hasPermission: g, isLoading: _, permissions: v } = Me(), y = (e, t) => {
50
+ let Be = re(), { t: Ve } = ve(), { hasPermission: _, isLoading: He, permissions: Ue } = Ae(), v = (e, t) => {
51
51
  let n = Ve(e);
52
52
  return n === e ? t : n;
53
- }, b = g(o.WEBHOOK_LIST), He = g(o.WEBHOOK_CREATE), Ue = _ || !b, [x, We] = u(""), [S, C] = u("all"), [w, Ge] = u("list"), [T, E] = u(!1), [Ke, qe] = u(null), [Je, D] = u(null), [O, k] = u(!1), [A, j] = u(null), [Ye, M] = u(null), [N, P] = u([]), [F, Xe] = u([]), [I, Ze] = u(!1), [L, R] = u(""), [z, B] = u(/* @__PURE__ */ new Set()), [V, H] = u(null), [U, W] = u(null);
54
- ve(() => {
55
- if (!A) return;
56
- let e = window.setTimeout(() => j(null), 4e3);
53
+ }, We = _(s.WEBHOOK_LIST), Ge = _(s.WEBHOOK_CREATE), Ke = He || !We, [y, qe] = d(""), [b, Je] = d("all"), [x, Ye] = d("list"), [S, C] = d(!1), [w, Xe] = d(null), [Ze, T] = d(null), [E, Qe] = d(!1), [D, O] = d(null), [$e, k] = d(null), [A, j] = d([]), [M, N] = d([]), [P, F] = d(!1), [I, L] = d(""), [R, z] = d(/* @__PURE__ */ new Set()), [B, V] = d(null), [H, U] = d(null);
54
+ _e(() => {
55
+ if (!D) return;
56
+ let e = window.setTimeout(() => O(null), 4e3);
57
57
  return () => window.clearTimeout(e);
58
- }, [A]), ve(() => {
59
- if (!T) return;
58
+ }, [D]), _e(() => {
59
+ if (!S) return;
60
60
  let e = (e) => {
61
- e.key === "Escape" && !O && E(!1);
61
+ e.key === "Escape" && !E && C(!1);
62
62
  };
63
63
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
64
- }, [O, T]);
65
- let Qe = l(null), $e = l(null), et = l(null), tt = l(null), [nt] = e({ refetchQueries: ["ListWebhooks"] }), [rt] = i({ refetchQueries: ["ListWebhooks"] }), [it] = r({ refetchQueries: ["ListWebhooks"] }), [at] = t({ refetchQueries: ["ListWebhooks"] }), { agents: ot } = ie(), st = c(() => ot.map((e) => ({
64
+ }, [E, S]);
65
+ let et = u(null), tt = u(null), nt = u(null), W = u(null), [rt] = e({ refetchQueries: ["ListWebhooks"] }), [it] = i({ refetchQueries: ["ListWebhooks"] }), [at] = r({ refetchQueries: ["ListWebhooks"] }), [ot] = t({ refetchQueries: ["ListWebhooks"] }), { agents: st } = ie(), ct = l(() => st.map((e) => ({
66
66
  id: e.id,
67
67
  name: e.name
68
- })), [ot]), { data: ct, loading: G, error: lt, refetch: K } = n({
68
+ })), [st]), { data: lt, loading: G, error: ut, refetch: K } = n({
69
69
  variables: {
70
- filter: { isActive: S === "active" ? !0 : S === "inactive" ? !1 : void 0 },
70
+ filter: { isActive: b === "active" ? !0 : b === "inactive" ? !1 : void 0 },
71
71
  pagination: { limit: 50 }
72
72
  },
73
73
  fetchPolicy: "cache-and-network",
74
- skip: Ue
75
- }), q = c(() => (ct?.webhooks?.items ?? []).map((e) => ({
74
+ skip: Ke
75
+ }), q = l(() => (lt?.webhooks?.items ?? []).map((e) => ({
76
76
  id: e.id,
77
77
  workspaceId: e.workspaceId,
78
78
  name: e.name,
@@ -89,302 +89,306 @@ function h() {
89
89
  metadata: {},
90
90
  createdAt: e.createdAt,
91
91
  updatedAt: e.updatedAt
92
- })), [ct?.webhooks?.items]), J = c(() => q.filter((e) => {
93
- if (x) {
94
- let t = x.toLowerCase();
92
+ })), [lt?.webhooks?.items]), J = l(() => q.filter((e) => {
93
+ if (y) {
94
+ let t = y.toLowerCase();
95
95
  if (!(e.name.toLowerCase().includes(t) || e.url.toLowerCase().includes(t) || e.events.some((e) => e.toLowerCase().includes(t)))) return !1;
96
96
  }
97
- return !(S === "error" && !e.lastError);
97
+ return !(b === "error" && !e.lastError);
98
98
  }), [
99
99
  q,
100
- x,
101
- S
102
- ]), Y = c(() => q.filter((e) => z.has(e.id)), [q, z]), X = Y.filter((e) => e.isActive), Z = Y.filter((e) => !e.isActive), ut = J.length > 0 && J.every((e) => z.has(e.id)), dt = J.some((e) => z.has(e.id)) && !ut, ft = () => {
103
- D(null), M(null), P([]), Xe([]), Ze(!1), R(""), E(!0);
104
- }, pt = (e) => {
105
- P((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
106
- }, mt = async () => {
107
- let e = Qe.current?.value?.trim(), t = $e.current?.value?.trim(), n = et.current?.value?.trim() || void 0, r = tt.current?.value?.trim() || void 0;
100
+ y,
101
+ b
102
+ ]), Y = l(() => q.filter((e) => R.has(e.id)), [q, R]), X = Y.filter((e) => e.isActive), Z = Y.filter((e) => !e.isActive), dt = J.length > 0 && J.every((e) => R.has(e.id)), ft = J.some((e) => R.has(e.id)) && !dt, pt = () => {
103
+ T(null), k(null), j([]), N([]), F(!1), L(""), C(!0);
104
+ }, mt = (e) => {
105
+ j((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
106
+ }, ht = async () => {
107
+ let e = et.current?.value?.trim(), t = tt.current?.value?.trim(), n = nt.current?.value?.trim() || void 0, r = W.current?.value?.trim() || void 0;
108
108
  if (!e) {
109
- D(y("webhooks.nameRequired", "Name is required"));
109
+ T(v("webhooks.nameRequired", "Name is required"));
110
110
  return;
111
111
  }
112
112
  if (!t) {
113
- D(y("webhooks.urlRequired", "URL is required"));
113
+ T(v("webhooks.urlRequired", "URL is required"));
114
114
  return;
115
115
  }
116
116
  try {
117
117
  let e = new URL(t);
118
118
  if (!["http:", "https:"].includes(e.protocol)) {
119
- D(y("webhooks.urlProtocolRequired", "URL must use http:// or https:// protocol"));
119
+ T(v("webhooks.urlProtocolRequired", "URL must use http:// or https:// protocol"));
120
120
  return;
121
121
  }
122
122
  } catch {
123
- D(y("webhooks.urlInvalid", "Please enter a valid URL (e.g., https://example.com/webhook)"));
123
+ T(v("webhooks.urlInvalid", "Please enter a valid URL (e.g., https://example.com/webhook)"));
124
124
  return;
125
125
  }
126
- if (N.length === 0) {
127
- D(y("webhooks.eventRequired", "At least one event must be selected"));
126
+ if (A.length === 0) {
127
+ T(v("webhooks.eventRequired", "At least one event must be selected"));
128
128
  return;
129
129
  }
130
- k(!0), D(null), M(null);
130
+ Qe(!0), T(null), k(null);
131
131
  try {
132
- await nt({ variables: { input: {
132
+ await rt({ variables: { input: {
133
133
  name: e,
134
134
  url: t,
135
- events: N,
135
+ events: A,
136
136
  secret: n,
137
137
  ...r ? { signingKey: r } : {},
138
- ...F.length > 0 ? { agentIds: F } : {}
139
- } } }), E(!1), j(y("webhooks.createdSuccess", "Webhook created successfully")), setTimeout(() => j(null), 3e3);
138
+ ...M.length > 0 ? { agentIds: M } : {}
139
+ } } }), C(!1), O(v("webhooks.createdSuccess", "Webhook created successfully")), setTimeout(() => O(null), 3e3);
140
140
  } catch (e) {
141
141
  if (te(e)) {
142
- E(!1), W({
142
+ C(!1), U({
143
143
  title: "Webhook Quota Reached",
144
144
  message: "You have reached the webhook limit for your current plan. Upgrade to create more webhooks."
145
145
  });
146
146
  return;
147
147
  }
148
- D(e instanceof Error ? e.message : y("webhooks.failedCreate", "Failed to create webhook"));
148
+ T(e instanceof Error ? e.message : v("webhooks.failedCreate", "Failed to create webhook"));
149
149
  } finally {
150
- k(!1);
150
+ Qe(!1);
151
151
  }
152
- }, ht = async (e) => {
152
+ }, gt = async (e) => {
153
153
  try {
154
- M(null), await rt({ variables: {
154
+ k(null), await it({ variables: {
155
155
  id: e.id,
156
156
  input: { isActive: !e.isActive }
157
- } }), j(e.isActive ? y("webhooks.disabledSuccess", "Webhook disabled successfully") : y("webhooks.enabledSuccess", "Webhook enabled successfully"));
157
+ } }), O(e.isActive ? v("webhooks.disabledSuccess", "Webhook disabled successfully") : v("webhooks.enabledSuccess", "Webhook enabled successfully"));
158
158
  } catch (e) {
159
- console.error("Failed to toggle webhook:", e), M(e instanceof Error ? e.message : y("webhooks.failedToggle", "Failed to update webhook state"));
159
+ console.error("Failed to toggle webhook:", e), k(e instanceof Error ? e.message : v("webhooks.failedToggle", "Failed to update webhook state"));
160
160
  }
161
- }, gt = async (e) => {
162
- qe(e.id);
161
+ }, _t = async (e) => {
162
+ Xe(e.id);
163
163
  try {
164
- M(null), await it({ variables: { id: e.id } }), j(y("webhooks.testSuccess", "Webhook test delivery completed"));
164
+ k(null), await at({ variables: { id: e.id } }), O(v("webhooks.testSuccess", "Webhook test delivery completed"));
165
165
  } catch (e) {
166
166
  if (te(e)) {
167
- W({
167
+ U({
168
168
  title: "Webhook Test Quota Reached",
169
169
  message: "You have used the webhook test quota for your current plan. Upgrade to continue testing deliveries."
170
170
  });
171
171
  return;
172
172
  }
173
- console.error("Failed to test webhook:", e), M(e instanceof Error ? e.message : y("webhooks.failedTest", "Failed to test webhook"));
173
+ console.error("Failed to test webhook:", e), k(e instanceof Error ? e.message : v("webhooks.failedTest", "Failed to test webhook"));
174
174
  } finally {
175
- qe(null);
175
+ Xe(null);
176
176
  }
177
- }, _t = async (e) => {
177
+ }, vt = async (e) => {
178
178
  try {
179
- M(null), await at({ variables: { id: e.id } }), j(y("webhooks.deletedSuccess", "Webhook deleted successfully")), pe() && he("success");
179
+ k(null), await ot({ variables: { id: e.id } }), O(v("webhooks.deletedSuccess", "Webhook deleted successfully")), fe() && me("success");
180
180
  } catch (e) {
181
- console.error("Failed to delete webhook:", e), M(e instanceof Error ? e.message : y("webhooks.failedDelete", "Failed to delete webhook")), pe() && he("error");
181
+ console.error("Failed to delete webhook:", e), k(e instanceof Error ? e.message : v("webhooks.failedDelete", "Failed to delete webhook")), fe() && me("error");
182
182
  }
183
- }, vt = (e, t) => {
184
- B((n) => {
183
+ }, yt = (e, t) => {
184
+ z((n) => {
185
185
  let r = new Set(n);
186
186
  return t ? r.add(e) : r.delete(e), r;
187
187
  });
188
- }, yt = (e) => {
189
- B((t) => {
188
+ }, bt = (e) => {
189
+ z((t) => {
190
190
  let n = new Set(t);
191
191
  return J.forEach((t) => {
192
192
  e ? n.add(t.id) : n.delete(t.id);
193
193
  }), n;
194
194
  });
195
- }, Q = () => B(/* @__PURE__ */ new Set()), bt = async (e) => {
195
+ }, Q = () => z(/* @__PURE__ */ new Set()), xt = async (e) => {
196
196
  let t = e ? Z : X;
197
197
  if (t.length === 0) return;
198
- let n = await Promise.allSettled(t.map((t) => rt({ variables: {
198
+ let n = await Promise.allSettled(t.map((t) => it({ variables: {
199
199
  id: t.id,
200
200
  input: { isActive: e }
201
201
  } }))), r = n.filter((e) => e.status === "fulfilled").length, i = n.length - r;
202
- j(`${e ? "Enabled" : "Disabled"} ${r} webhook${r === 1 ? "" : "s"}${i > 0 ? ` • ${i} failed` : ""}`), setTimeout(() => j(null), 4e3), H(null), Q(), await K();
203
- }, xt = async () => {
202
+ O(`${e ? "Enabled" : "Disabled"} ${r} webhook${r === 1 ? "" : "s"}${i > 0 ? ` • ${i} failed` : ""}`), setTimeout(() => O(null), 4e3), V(null), Q(), await K();
203
+ }, St = async () => {
204
204
  if (Y.length === 0) return;
205
- let e = await Promise.allSettled(Y.map((e) => at({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
206
- j(`Deleted ${t} webhook${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), setTimeout(() => j(null), 4e3), H(null), Q(), await K();
205
+ let e = await Promise.allSettled(Y.map((e) => ot({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
206
+ O(`Deleted ${t} webhook${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), setTimeout(() => O(null), 4e3), V(null), Q(), await K();
207
207
  }, $ = {
208
208
  total: q.length,
209
209
  active: q.filter((e) => e.isActive).length,
210
210
  withErrors: q.filter((e) => e.lastError).length
211
- }, St = (e) => {
212
- if (!e) return y("webhooks.never", "Never");
211
+ }, Ct = (e) => {
212
+ if (!e) return v("webhooks.never", "Never");
213
213
  let t = Date.now() - new Date(e).getTime();
214
- return t < 6e4 ? y("webhooks.justNow", "Just now") : t < 36e5 ? `${Math.floor(t / 6e4)}m ago` : t < 864e5 ? `${Math.floor(t / 36e5)}h ago` : `${Math.floor(t / 864e5)}d ago`;
214
+ return t < 6e4 ? v("webhooks.justNow", "Just now") : t < 36e5 ? `${Math.floor(t / 6e4)}m ago` : t < 864e5 ? `${Math.floor(t / 36e5)}h ago` : `${Math.floor(t / 864e5)}d ago`;
215
215
  };
216
- return _ ? /* @__PURE__ */ f(m, {
216
+ return He ? /* @__PURE__ */ m(g, {
217
217
  className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-screen",
218
- children: /* @__PURE__ */ f(ge, {
218
+ children: /* @__PURE__ */ m(he, {
219
219
  variant: "rows",
220
220
  count: 6
221
221
  })
222
- }) : v && v.permissionStrings?.length > 0 && !b ? /* @__PURE__ */ f(m, {
222
+ }) : Ue && Ue.permissionStrings?.length > 0 && !We ? /* @__PURE__ */ m(g, {
223
223
  className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-screen",
224
- children: /* @__PURE__ */ f(Ie, {
225
- title: y("common.accessDeniedTitle", "Access Denied"),
226
- description: y("webhooks.accessDeniedDescription", "You don't have permission to view webhooks."),
224
+ children: /* @__PURE__ */ m(Fe, {
225
+ title: v("common.accessDeniedTitle", "Access Denied"),
226
+ description: v("webhooks.accessDeniedDescription", "You don't have permission to view webhooks."),
227
227
  details: "Required permission: webhook:list"
228
228
  })
229
- }) : lt && q.length === 0 ? /* @__PURE__ */ f(m, {
229
+ }) : ut && q.length === 0 ? /* @__PURE__ */ m(g, {
230
230
  className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-screen",
231
- children: /* @__PURE__ */ f(oe, {
232
- title: y("webhooks.failedLoad", "Failed to load webhooks"),
233
- message: lt.message,
231
+ children: /* @__PURE__ */ m(oe, {
232
+ title: v("webhooks.failedLoad", "Failed to load webhooks"),
233
+ message: ut.message,
234
234
  onRetry: () => K()
235
235
  })
236
- }) : /* @__PURE__ */ p(m, {
236
+ }) : /* @__PURE__ */ h(g, {
237
237
  className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-screen",
238
238
  children: [
239
- A && /* @__PURE__ */ f("div", {
239
+ D && /* @__PURE__ */ m("div", {
240
240
  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",
241
- children: A
241
+ children: D
242
242
  }),
243
- Ye && /* @__PURE__ */ f("div", {
243
+ $e && /* @__PURE__ */ m("div", {
244
244
  role: "alert",
245
245
  className: "rounded-card border border-status-error-border bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
246
- children: Ye
246
+ children: $e
247
247
  }),
248
- /* @__PURE__ */ f(ae, {
249
- title: y("nav.webhooks", "Webhooks"),
248
+ /* @__PURE__ */ m(ae, {
249
+ title: v("nav.webhooks", "Webhooks"),
250
250
  description: `${$.active} of ${$.total} webhooks active`,
251
- actions: /* @__PURE__ */ p("div", {
251
+ actions: /* @__PURE__ */ h("div", {
252
252
  className: "flex items-center gap-2",
253
- children: [/* @__PURE__ */ f(Le, {
254
- permission: o.WEBHOOK_CREATE,
255
- children: /* @__PURE__ */ p(Pe, {
253
+ children: [/* @__PURE__ */ m(Ie, {
254
+ permission: s.WEBHOOK_CREATE,
255
+ children: /* @__PURE__ */ h(Me, {
256
256
  type: "button",
257
- onClick: ft,
257
+ onClick: pt,
258
258
  className: "gap-2",
259
- children: [/* @__PURE__ */ f(d, { className: "size-4" }), y("webhooks.newWebhook", "New Webhook")]
259
+ children: [/* @__PURE__ */ m(f, { className: "size-4" }), v("webhooks.newWebhook", "New Webhook")]
260
260
  })
261
- }), /* @__PURE__ */ f(Fe, { actions: [{
262
- label: y("webhooks.refreshTitle", "Refresh webhooks"),
261
+ }), /* @__PURE__ */ m(Ne, { actions: [{
262
+ label: v("webhooks.refreshTitle", "Refresh webhooks"),
263
263
  onSelect: () => void K(),
264
264
  disabled: G,
265
- icon: /* @__PURE__ */ f(Oe, { className: `size-4 ${G ? "animate-spin" : ""}` })
265
+ icon: /* @__PURE__ */ m(De, { className: `size-4 ${G ? "animate-spin" : ""}` })
266
266
  }] })]
267
267
  })
268
268
  }),
269
- /* @__PURE__ */ p("div", {
269
+ /* @__PURE__ */ m(Pe, {
270
+ icon: /* @__PURE__ */ m(p, { className: "size-4" }),
271
+ children: v("webhooks.purpose", "Webhooks let outside systems notify VibeControls when something happens — a push to your repo, a CI build, an alert from another tool — and have it kick off work automatically. Add a webhook to wire an external event to an action or session, so your agents react to the rest of your stack without anyone clicking a button.")
272
+ }),
273
+ /* @__PURE__ */ h("div", {
270
274
  className: "space-y-3",
271
- children: [/* @__PURE__ */ p("div", {
275
+ children: [/* @__PURE__ */ h("div", {
272
276
  className: "flex items-center gap-2",
273
- children: [/* @__PURE__ */ f(ce, {
274
- value: x,
275
- onChange: We,
276
- placeholder: y("webhooks.searchPlaceholder", "Search webhooks..."),
277
+ children: [/* @__PURE__ */ m(ce, {
278
+ value: y,
279
+ onChange: qe,
280
+ placeholder: v("webhooks.searchPlaceholder", "Search webhooks..."),
277
281
  className: "flex-1 sm:w-64 sm:flex-none"
278
- }), /* @__PURE__ */ p("div", {
282
+ }), /* @__PURE__ */ h("div", {
279
283
  className: "flex items-center gap-1 bg-bg-sunken rounded-md p-1 flex-shrink-0",
280
- children: [/* @__PURE__ */ f("button", {
284
+ children: [/* @__PURE__ */ m("button", {
281
285
  type: "button",
282
- onClick: () => Ge("grid"),
283
- className: `p-1.5 sm:p-2 rounded ${w === "grid" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
284
- title: y("webhooks.gridViewTitle", "Grid view"),
285
- children: /* @__PURE__ */ f(Te, { className: "size-4 text-text-secondary" })
286
- }), /* @__PURE__ */ f("button", {
286
+ onClick: () => Ye("grid"),
287
+ className: `p-1.5 sm:p-2 rounded ${x === "grid" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
288
+ title: v("webhooks.gridViewTitle", "Grid view"),
289
+ children: /* @__PURE__ */ m(we, { className: "size-4 text-text-secondary" })
290
+ }), /* @__PURE__ */ m("button", {
287
291
  type: "button",
288
- onClick: () => Ge("list"),
289
- className: `p-1.5 sm:p-2 rounded ${w === "list" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
290
- title: y("webhooks.listViewTitle", "List view"),
291
- children: /* @__PURE__ */ f(Ee, { className: "size-4 text-text-secondary" })
292
+ onClick: () => Ye("list"),
293
+ className: `p-1.5 sm:p-2 rounded ${x === "list" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
294
+ title: v("webhooks.listViewTitle", "List view"),
295
+ children: /* @__PURE__ */ m(Te, { className: "size-4 text-text-secondary" })
292
296
  })]
293
297
  })]
294
- }), /* @__PURE__ */ f("div", {
298
+ }), /* @__PURE__ */ m("div", {
295
299
  className: "flex items-center gap-2 sm:gap-3",
296
- children: /* @__PURE__ */ f(le, {
297
- label: y("webhooks.status", "Status"),
298
- value: S,
299
- options: Be,
300
- onChange: C
300
+ children: /* @__PURE__ */ m(le, {
301
+ label: v("webhooks.status", "Status"),
302
+ value: b,
303
+ options: ze,
304
+ onChange: Je
301
305
  })
302
306
  })]
303
307
  }),
304
- $.withErrors > 0 && /* @__PURE__ */ f("div", {
308
+ $.withErrors > 0 && /* @__PURE__ */ m("div", {
305
309
  className: "flex items-center gap-2",
306
- children: /* @__PURE__ */ p("button", {
310
+ children: /* @__PURE__ */ h("button", {
307
311
  type: "button",
308
- onClick: () => C("error"),
309
- className: `flex items-center gap-2 px-3 py-1.5 text-sm rounded-full transition-colors ${S === "error" ? "bg-status-error-bg text-status-error-text" : "bg-bg-sunken text-text-secondary hover:bg-action-secondary-bg-hover"}`,
312
+ onClick: () => Je("error"),
313
+ className: `flex items-center gap-2 px-3 py-1.5 text-sm rounded-full transition-colors ${b === "error" ? "bg-status-error-bg text-status-error-text" : "bg-bg-sunken text-text-secondary hover:bg-action-secondary-bg-hover"}`,
310
314
  children: [
311
- /* @__PURE__ */ f(be, { className: "size-3" }),
312
- y("webhooks.withErrors", "With Errors"),
315
+ /* @__PURE__ */ m(ye, { className: "size-3" }),
316
+ v("webhooks.withErrors", "With Errors"),
313
317
  " (",
314
318
  $.withErrors,
315
319
  ")"
316
320
  ]
317
321
  })
318
322
  }),
319
- (x || S !== "all") && /* @__PURE__ */ p("p", {
323
+ (y || b !== "all") && /* @__PURE__ */ h("p", {
320
324
  className: "text-sm text-text-secondary",
321
325
  children: [
322
- y("webhooks.showingResults", "Showing"),
326
+ v("webhooks.showingResults", "Showing"),
323
327
  " ",
324
328
  J.length,
325
329
  " ",
326
- y("webhooks.of", "of"),
330
+ v("webhooks.of", "of"),
327
331
  " ",
328
332
  q.length,
329
333
  " ",
330
- y("nav.webhooks", "webhooks"),
331
- G && /* @__PURE__ */ p("span", {
334
+ v("nav.webhooks", "webhooks"),
335
+ G && /* @__PURE__ */ h("span", {
332
336
  className: "ml-2 text-text-muted",
333
337
  children: [
334
338
  "(",
335
- y("webhooks.refreshing", "refreshing..."),
339
+ v("webhooks.refreshing", "refreshing..."),
336
340
  ")"
337
341
  ]
338
342
  })
339
343
  ]
340
344
  }),
341
- J.length > 0 && /* @__PURE__ */ f("div", {
345
+ J.length > 0 && /* @__PURE__ */ m("div", {
342
346
  className: "rounded-lg border border-border-default bg-bg-surface p-4",
343
- children: /* @__PURE__ */ p("div", {
347
+ children: /* @__PURE__ */ h("div", {
344
348
  className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
345
- children: [/* @__PURE__ */ p("div", {
349
+ children: [/* @__PURE__ */ h("div", {
346
350
  className: "flex flex-wrap items-center gap-3",
347
- children: [/* @__PURE__ */ p("div", {
351
+ children: [/* @__PURE__ */ h("div", {
348
352
  className: "flex items-center gap-2",
349
- children: [/* @__PURE__ */ f(fe, {
350
- checked: ut,
351
- indeterminate: dt,
352
- onChange: yt,
353
+ children: [/* @__PURE__ */ m(o, {
354
+ checked: dt,
355
+ indeterminate: ft,
356
+ onChange: bt,
353
357
  ariaLabel: "Select all visible webhooks"
354
- }), /* @__PURE__ */ f("span", {
358
+ }), /* @__PURE__ */ m("span", {
355
359
  className: "text-sm font-medium text-text-primary",
356
360
  children: "Select all visible"
357
361
  })]
358
- }), z.size > 0 && /* @__PURE__ */ f("button", {
362
+ }), R.size > 0 && /* @__PURE__ */ m("button", {
359
363
  type: "button",
360
364
  onClick: Q,
361
365
  className: "text-sm text-text-secondary hover:text-text-primary",
362
366
  children: "Clear selection"
363
367
  })]
364
- }), /* @__PURE__ */ p("div", {
368
+ }), /* @__PURE__ */ h("div", {
365
369
  className: "flex flex-wrap items-center gap-2",
366
370
  children: [
367
- /* @__PURE__ */ p("span", {
371
+ /* @__PURE__ */ h("span", {
368
372
  className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
369
- children: [z.size, " selected"]
373
+ children: [R.size, " selected"]
370
374
  }),
371
- /* @__PURE__ */ p("button", {
375
+ /* @__PURE__ */ h("button", {
372
376
  type: "button",
373
- onClick: () => H("enable"),
377
+ onClick: () => V("enable"),
374
378
  disabled: Z.length === 0,
375
379
  className: "rounded-md border border-status-success-border px-3 py-2 text-sm font-medium text-status-success-text hover:bg-status-success-bg disabled:cursor-not-allowed disabled:opacity-50",
376
380
  children: ["Enable Selected", Z.length > 0 ? ` (${Z.length})` : ""]
377
381
  }),
378
- /* @__PURE__ */ p("button", {
382
+ /* @__PURE__ */ h("button", {
379
383
  type: "button",
380
- onClick: () => H("disable"),
384
+ onClick: () => V("disable"),
381
385
  disabled: X.length === 0,
382
386
  className: "rounded-md border border-status-warning-border px-3 py-2 text-sm font-medium text-status-warning-text hover:bg-status-warning-bg disabled:cursor-not-allowed disabled:opacity-50",
383
387
  children: ["Disable Selected", X.length > 0 ? ` (${X.length})` : ""]
384
388
  }),
385
- /* @__PURE__ */ p("button", {
389
+ /* @__PURE__ */ h("button", {
386
390
  type: "button",
387
- onClick: () => H("delete"),
391
+ onClick: () => V("delete"),
388
392
  disabled: Y.length === 0,
389
393
  className: "rounded-md border border-status-error-bg px-3 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg disabled:cursor-not-allowed disabled:opacity-50",
390
394
  children: ["Delete Selected", Y.length > 0 ? ` (${Y.length})` : ""]
@@ -393,317 +397,318 @@ function h() {
393
397
  })]
394
398
  })
395
399
  }),
396
- /* @__PURE__ */ f(Ne, {
400
+ /* @__PURE__ */ m(je, {
397
401
  mode: "wait",
398
- children: G && q.length === 0 ? /* @__PURE__ */ f(ge, {
402
+ children: G && q.length === 0 ? /* @__PURE__ */ m(he, {
399
403
  variant: "rows",
400
404
  count: 6
401
- }) : J.length > 0 ? /* @__PURE__ */ f(ze, {
402
- className: w === "grid" ? "grid grid-cols-1 gap-4 xl:grid-cols-2" : "space-y-4",
403
- children: J.map((e) => /* @__PURE__ */ f(Re, {
405
+ }) : J.length > 0 ? /* @__PURE__ */ m(Re, {
406
+ className: x === "grid" ? "grid grid-cols-1 gap-4 xl:grid-cols-2" : "space-y-4",
407
+ children: J.map((e) => /* @__PURE__ */ m(Le, {
404
408
  variant: "fadeRight",
405
- children: /* @__PURE__ */ f(ue, {
409
+ children: /* @__PURE__ */ m(ue, {
406
410
  className: "p-4",
407
- children: /* @__PURE__ */ p("div", {
411
+ children: /* @__PURE__ */ h("div", {
408
412
  className: "flex flex-col sm:flex-row sm:items-start justify-between gap-4",
409
- children: [/* @__PURE__ */ p("div", {
413
+ children: [/* @__PURE__ */ h("div", {
410
414
  className: "flex items-start gap-4 flex-1 min-w-0",
411
415
  children: [
412
- /* @__PURE__ */ f("div", {
416
+ /* @__PURE__ */ m("div", {
413
417
  onClick: (e) => e.stopPropagation(),
414
- children: /* @__PURE__ */ f(fe, {
415
- checked: z.has(e.id),
416
- onChange: (t) => vt(e.id, t),
418
+ children: /* @__PURE__ */ m(o, {
419
+ checked: R.has(e.id),
420
+ onChange: (t) => yt(e.id, t),
417
421
  ariaLabel: `Select webhook ${e.name}`,
418
422
  className: "mt-2"
419
423
  })
420
424
  }),
421
- /* @__PURE__ */ f("div", {
425
+ /* @__PURE__ */ m("div", {
422
426
  className: `size-10 rounded-lg flex items-center justify-center flex-shrink-0 ${e.isActive ? "bg-status-success-bg text-status-success-text" : "bg-bg-sunken text-text-secondary"}`,
423
- children: /* @__PURE__ */ f(Ae, { className: "size-5" })
427
+ children: /* @__PURE__ */ m(p, { className: "size-5" })
424
428
  }),
425
- /* @__PURE__ */ p("div", {
429
+ /* @__PURE__ */ h("div", {
426
430
  className: "flex-1 min-w-0",
427
431
  children: [
428
- /* @__PURE__ */ p("div", {
432
+ /* @__PURE__ */ h("div", {
429
433
  className: "flex items-center gap-2 flex-wrap",
430
434
  children: [
431
- /* @__PURE__ */ f("h3", {
435
+ /* @__PURE__ */ m("h3", {
432
436
  className: "font-semibold text-text-primary",
433
437
  children: e.name
434
438
  }),
435
- /* @__PURE__ */ f("span", {
439
+ /* @__PURE__ */ m("span", {
436
440
  className: `px-2 py-0.5 text-xs rounded-full ${e.isActive ? "bg-status-success-bg text-status-success-text" : "bg-bg-sunken text-text-secondary"}`,
437
- children: e.isActive ? y("webhooks.active", "Active") : y("webhooks.inactive", "Inactive")
441
+ children: e.isActive ? v("webhooks.active", "Active") : v("webhooks.inactive", "Inactive")
438
442
  }),
439
- e.lastError && /* @__PURE__ */ f("span", {
443
+ e.lastError && /* @__PURE__ */ m("span", {
440
444
  className: "px-2 py-0.5 text-xs rounded-full bg-status-error-bg text-status-error-text",
441
- children: y("webhooks.error", "Error")
445
+ children: v("webhooks.error", "Error")
442
446
  })
443
447
  ]
444
448
  }),
445
- /* @__PURE__ */ f("p", {
449
+ /* @__PURE__ */ m("p", {
446
450
  className: "text-sm text-text-secondary mt-1 font-mono truncate",
447
451
  children: e.url
448
452
  }),
449
- /* @__PURE__ */ f("div", {
453
+ /* @__PURE__ */ m("div", {
450
454
  className: "flex flex-wrap gap-1 mt-2",
451
- children: e.events.map((e) => /* @__PURE__ */ f("span", {
452
- className: `px-2 py-0.5 text-xs rounded ${s(e) ? "bg-[var(--color-accent-soft)] text-text-primary border border-dashed border-border-strong" : "bg-bg-sunken text-text-secondary"}`,
455
+ children: e.events.map((e) => /* @__PURE__ */ m("span", {
456
+ className: `px-2 py-0.5 text-xs rounded ${c(e) ? "bg-[var(--color-accent-soft)] text-text-primary border border-dashed border-border-strong" : "bg-bg-sunken text-text-secondary"}`,
453
457
  children: e
454
458
  }, e))
455
459
  }),
456
- e.agentIds.length > 0 && /* @__PURE__ */ p("div", {
460
+ e.agentIds.length > 0 && /* @__PURE__ */ h("div", {
457
461
  className: "flex items-center gap-1 mt-2",
458
- children: [/* @__PURE__ */ f(xe, { className: "size-3 text-text-muted" }), /* @__PURE__ */ p("span", {
462
+ children: [/* @__PURE__ */ m(be, { className: "size-3 text-text-muted" }), /* @__PURE__ */ h("span", {
459
463
  className: "text-xs text-text-muted",
460
464
  children: [
461
- y("webhooks.scopedTo", "Scoped to"),
465
+ v("webhooks.scopedTo", "Scoped to"),
462
466
  " ",
463
467
  e.agentIds.length,
464
468
  " ",
465
- y("webhooks.agent", "agent"),
469
+ v("webhooks.agent", "agent"),
466
470
  e.agentIds.length === 1 ? "" : "s"
467
471
  ]
468
472
  })]
469
473
  }),
470
- e.lastError && /* @__PURE__ */ p("p", {
474
+ e.lastError && /* @__PURE__ */ h("p", {
471
475
  className: "text-sm text-status-error-text mt-2",
472
476
  children: [
473
- y("webhooks.lastError", "Last error"),
477
+ v("webhooks.lastError", "Last error"),
474
478
  ": ",
475
479
  e.lastError
476
480
  ]
477
481
  }),
478
- /* @__PURE__ */ p("div", {
482
+ /* @__PURE__ */ h("div", {
479
483
  className: "flex items-center gap-4 mt-3 text-xs text-text-secondary flex-wrap",
480
- children: [/* @__PURE__ */ p("span", { children: [
481
- y("webhooks.lastDelivery", "Last delivery"),
484
+ children: [/* @__PURE__ */ h("span", { children: [
485
+ v("webhooks.lastDelivery", "Last delivery"),
482
486
  ":",
483
487
  " ",
484
- St(e.lastDelivery)
485
- ] }), /* @__PURE__ */ p("span", { children: [
488
+ Ct(e.lastDelivery)
489
+ ] }), /* @__PURE__ */ h("span", { children: [
486
490
  e.deliveryCount,
487
491
  " ",
488
- y("webhooks.deliveries", "deliveries"),
492
+ v("webhooks.deliveries", "deliveries"),
489
493
  ",",
490
494
  " ",
491
495
  e.failureCount,
492
496
  " ",
493
- y("webhooks.failures", "failures")
497
+ v("webhooks.failures", "failures")
494
498
  ] })]
495
499
  })
496
500
  ]
497
501
  })
498
502
  ]
499
- }), /* @__PURE__ */ p("div", {
503
+ }), /* @__PURE__ */ h("div", {
500
504
  className: "flex items-center gap-2 flex-shrink-0",
501
505
  children: [
502
- /* @__PURE__ */ p("button", {
506
+ /* @__PURE__ */ h("button", {
503
507
  type: "button",
504
- onClick: () => gt(e),
505
- disabled: Ke === e.id,
508
+ onClick: () => _t(e),
509
+ disabled: w === e.id,
506
510
  className: "flex items-center gap-1 px-3 py-1.5 text-sm bg-bg-sunken text-text-primary hover:bg-action-secondary-bg-hover rounded-md transition-colors disabled:opacity-50",
507
- children: [Ke === e.id ? /* @__PURE__ */ f(Oe, { className: "size-4 animate-spin" }) : /* @__PURE__ */ f(De, { className: "size-4" }), y("webhooks.test", "Test")]
511
+ children: [w === e.id ? /* @__PURE__ */ m(De, { className: "size-4 animate-spin" }) : /* @__PURE__ */ m(Ee, { className: "size-4" }), v("webhooks.test", "Test")]
508
512
  }),
509
- /* @__PURE__ */ f("button", {
513
+ /* @__PURE__ */ m("button", {
510
514
  type: "button",
511
- onClick: () => ht(e),
515
+ onClick: () => gt(e),
512
516
  className: `p-2 rounded-button transition-colors ${e.isActive ? "bg-status-success-bg-subtle text-status-success-text hover:bg-bg-sunken" : "bg-bg-sunken text-text-secondary hover:bg-action-secondary-bg-hover"}`,
513
- title: e.isActive ? y("webhooks.disable", "Disable") : y("webhooks.enable", "Enable"),
514
- children: e.isActive ? /* @__PURE__ */ f(Se, { className: "size-4" }) : /* @__PURE__ */ f(je, { className: "size-4" })
517
+ title: e.isActive ? v("webhooks.disable", "Disable") : v("webhooks.enable", "Enable"),
518
+ children: e.isActive ? /* @__PURE__ */ m(xe, { className: "size-4" }) : /* @__PURE__ */ m(ke, { className: "size-4" })
515
519
  }),
516
- /* @__PURE__ */ f("button", {
520
+ /* @__PURE__ */ m("button", {
517
521
  type: "button",
518
522
  onClick: () => {
519
- me("medium"), _t(e);
523
+ pe("medium"), vt(e);
520
524
  },
521
525
  className: "p-2 text-status-error-text hover:bg-status-error-bg rounded-md transition-colors",
522
- title: y("common.delete", "Delete"),
523
- children: /* @__PURE__ */ f(ke, { className: "size-4" })
526
+ title: v("common.delete", "Delete"),
527
+ children: /* @__PURE__ */ m(Oe, { className: "size-4" })
524
528
  })
525
529
  ]
526
530
  })]
527
531
  })
528
532
  })
529
533
  }, e.id))
530
- }, `webhook-list-${w}`) : /* @__PURE__ */ f(se, {
531
- icon: /* @__PURE__ */ f(Ae, { className: "size-8 text-text-secondary" }),
532
- title: x || S !== "all" ? y("webhooks.emptyFound", "No webhooks found") : y("webhooks.emptyConfigured", "No webhooks configured"),
533
- description: x || S !== "all" ? y("webhooks.emptyAdjustSearch", "Try adjusting your search or filters") : y("webhooks.emptyDescription", "Create a webhook to receive notifications about events in your workspace"),
534
- action: !x && S === "all" ? /* @__PURE__ */ p("div", {
534
+ }, `webhook-list-${x}`) : /* @__PURE__ */ m(se, {
535
+ icon: /* @__PURE__ */ m(p, { className: "size-8 text-text-secondary" }),
536
+ illustration: y || b !== "all" ? "empty-search" : "empty-data",
537
+ title: y || b !== "all" ? v("webhooks.emptyFound", "No webhooks found") : v("webhooks.emptyConfigured", "No webhooks configured"),
538
+ description: y || b !== "all" ? v("webhooks.emptyAdjustSearch", "Try adjusting your search or filters") : v("webhooks.emptyDescription", "Create a webhook to receive notifications about events in your workspace"),
539
+ action: !y && b === "all" ? /* @__PURE__ */ h("div", {
535
540
  className: "flex items-center gap-2",
536
- children: [He && /* @__PURE__ */ p("button", {
541
+ children: [Ge && /* @__PURE__ */ h("button", {
537
542
  type: "button",
538
- onClick: ft,
543
+ onClick: pt,
539
544
  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",
540
- children: [/* @__PURE__ */ f(d, { className: "size-4" }), y("webhooks.newWebhook", "New Webhook")]
541
- }), /* @__PURE__ */ f(de, { prompt: "What is a Webhook in VibeControls and how do I configure one?" })]
545
+ children: [/* @__PURE__ */ m(f, { className: "size-4" }), v("webhooks.newWebhook", "New Webhook")]
546
+ }), /* @__PURE__ */ m(de, { prompt: "What is a Webhook in VibeControls and how do I configure one?" })]
542
547
  }) : void 0
543
548
  })
544
549
  }),
545
- T && /* @__PURE__ */ f("div", {
550
+ S && /* @__PURE__ */ m("div", {
546
551
  className: "fixed inset-0 bg-bg-overlay flex items-center justify-center z-50 p-4",
547
- children: /* @__PURE__ */ p("div", {
552
+ children: /* @__PURE__ */ h("div", {
548
553
  role: "dialog",
549
554
  "aria-modal": "true",
550
555
  "aria-labelledby": "create-webhook-title",
551
556
  className: "bg-bg-surface rounded-lg p-6 w-full max-w-lg max-h-[90vh] overflow-y-auto",
552
557
  children: [
553
- /* @__PURE__ */ f("h2", {
558
+ /* @__PURE__ */ m("h2", {
554
559
  id: "create-webhook-title",
555
560
  className: "text-lg font-semibold text-text-primary mb-4",
556
- children: y("webhooks.newWebhook", "New Webhook")
561
+ children: v("webhooks.newWebhook", "New Webhook")
557
562
  }),
558
- Je && /* @__PURE__ */ f("div", {
563
+ Ze && /* @__PURE__ */ m("div", {
559
564
  className: "mb-4 p-3 bg-status-error-bg text-status-error-text rounded-md text-sm",
560
- children: Je
565
+ children: Ze
561
566
  }),
562
- /* @__PURE__ */ p("div", {
567
+ /* @__PURE__ */ h("div", {
563
568
  className: "space-y-4",
564
569
  children: [
565
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
570
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
566
571
  className: "block text-sm font-medium text-text-primary mb-1",
567
- children: y("webhooks.name", "Name")
568
- }), /* @__PURE__ */ f("input", {
572
+ children: v("webhooks.name", "Name")
573
+ }), /* @__PURE__ */ m("input", {
569
574
  "aria-label": "control",
570
- ref: Qe,
575
+ ref: et,
571
576
  type: "text",
572
- placeholder: y("webhooks.namePlaceholder", "Slack Notifications"),
577
+ placeholder: v("webhooks.namePlaceholder", "Slack Notifications"),
573
578
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder"
574
579
  })] }),
575
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
580
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
576
581
  className: "block text-sm font-medium text-text-primary mb-1",
577
- children: y("webhooks.url", "URL")
578
- }), /* @__PURE__ */ f("input", {
582
+ children: v("webhooks.url", "URL")
583
+ }), /* @__PURE__ */ m("input", {
579
584
  "aria-label": "control",
580
- ref: $e,
585
+ ref: tt,
581
586
  type: "url",
582
- placeholder: y("webhooks.urlPlaceholder", "https://hooks.slack.com/services/..."),
587
+ placeholder: v("webhooks.urlPlaceholder", "https://hooks.slack.com/services/..."),
583
588
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder"
584
589
  })] }),
585
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
590
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
586
591
  className: "block text-sm font-medium text-text-primary mb-1",
587
- children: y("webhooks.secret", "Secret")
588
- }), /* @__PURE__ */ f("input", {
592
+ children: v("webhooks.secret", "Secret")
593
+ }), /* @__PURE__ */ m("input", {
589
594
  "aria-label": "control",
590
- ref: et,
595
+ ref: nt,
591
596
  type: "password",
592
- placeholder: y("webhooks.secretPlaceholder", "Optional signing secret"),
597
+ placeholder: v("webhooks.secretPlaceholder", "Optional signing secret"),
593
598
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder"
594
599
  })] }),
595
- /* @__PURE__ */ p("div", { children: [
596
- /* @__PURE__ */ f("label", {
600
+ /* @__PURE__ */ h("div", { children: [
601
+ /* @__PURE__ */ m("label", {
597
602
  className: "block text-sm font-medium text-text-primary mb-2",
598
- children: y("webhooks.events", "Events")
603
+ children: v("webhooks.events", "Events")
599
604
  }),
600
- /* @__PURE__ */ f("div", {
605
+ /* @__PURE__ */ m("div", {
601
606
  className: "space-y-2 max-h-40 overflow-y-auto",
602
- children: _e.map((e) => /* @__PURE__ */ p("label", {
607
+ children: ge.map((e) => /* @__PURE__ */ h("label", {
603
608
  className: "flex items-center gap-2",
604
- children: [/* @__PURE__ */ f("input", {
609
+ children: [/* @__PURE__ */ m("input", {
605
610
  "aria-label": "control",
606
611
  type: "checkbox",
607
- checked: N.includes(e),
608
- onChange: () => pt(e),
612
+ checked: A.includes(e),
613
+ onChange: () => mt(e),
609
614
  className: "size-4 rounded border-border-default"
610
- }), /* @__PURE__ */ f("span", {
615
+ }), /* @__PURE__ */ m("span", {
611
616
  className: "text-sm text-text-primary",
612
617
  children: e
613
618
  })]
614
619
  }, e))
615
620
  }),
616
- N.filter(s).length > 0 && /* @__PURE__ */ f("div", {
621
+ A.filter(c).length > 0 && /* @__PURE__ */ m("div", {
617
622
  className: "flex flex-wrap gap-1 mt-2",
618
- children: N.filter(s).map((e) => /* @__PURE__ */ p("span", {
623
+ children: A.filter(c).map((e) => /* @__PURE__ */ h("span", {
619
624
  className: "inline-flex items-center gap-1 px-2 py-0.5 text-xs bg-[var(--color-accent-soft)] text-text-primary border border-dashed border-border-strong rounded",
620
- children: [e, /* @__PURE__ */ f("button", {
625
+ children: [e, /* @__PURE__ */ m("button", {
621
626
  type: "button",
622
- onClick: () => P((t) => t.filter((t) => t !== e)),
627
+ onClick: () => j((t) => t.filter((t) => t !== e)),
623
628
  className: "hover:text-status-error-text",
624
- children: /* @__PURE__ */ f(je, { className: "size-3" })
629
+ children: /* @__PURE__ */ m(ke, { className: "size-3" })
625
630
  })]
626
631
  }, e))
627
632
  }),
628
- /* @__PURE__ */ p("div", {
633
+ /* @__PURE__ */ h("div", {
629
634
  className: "flex items-center gap-2 mt-2",
630
- children: [/* @__PURE__ */ f("input", {
635
+ children: [/* @__PURE__ */ m("input", {
631
636
  "aria-label": "control",
632
637
  type: "text",
633
- value: L,
634
- onChange: (e) => R(e.target.value),
635
- placeholder: y("webhooks.customEventPlaceholder", "custom:event-name"),
638
+ value: I,
639
+ onChange: (e) => L(e.target.value),
640
+ placeholder: v("webhooks.customEventPlaceholder", "custom:event-name"),
636
641
  className: "flex-1 px-3 py-1.5 text-sm bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder font-mono",
637
642
  onKeyDown: (e) => {
638
643
  if (e.key === "Enter") {
639
644
  e.preventDefault();
640
- let t = L.trim();
641
- /^[a-z][a-z0-9_-]*:[a-z][a-z0-9_.-]*$/.test(t) && !N.includes(t) && (P((e) => [...e, t]), R(""));
645
+ let t = I.trim();
646
+ /^[a-z][a-z0-9_-]*:[a-z][a-z0-9_.-]*$/.test(t) && !A.includes(t) && (j((e) => [...e, t]), L(""));
642
647
  }
643
648
  }
644
- }), /* @__PURE__ */ f("button", {
649
+ }), /* @__PURE__ */ m("button", {
645
650
  type: "button",
646
651
  onClick: () => {
647
- let e = L.trim();
648
- /^[a-z][a-z0-9_-]*:[a-z][a-z0-9_.-]*$/.test(e) && !N.includes(e) && (P((t) => [...t, e]), R(""));
652
+ let e = I.trim();
653
+ /^[a-z][a-z0-9_-]*:[a-z][a-z0-9_.-]*$/.test(e) && !A.includes(e) && (j((t) => [...t, e]), L(""));
649
654
  },
650
655
  className: "px-3 py-1.5 text-sm bg-bg-sunken text-text-primary hover:bg-action-secondary-bg-hover rounded-md transition-colors",
651
- children: /* @__PURE__ */ f(d, { className: "size-4" })
656
+ children: /* @__PURE__ */ m(f, { className: "size-4" })
652
657
  })]
653
658
  }),
654
- /* @__PURE__ */ f("p", {
659
+ /* @__PURE__ */ m("p", {
655
660
  className: "text-xs text-text-muted mt-1",
656
- children: y("webhooks.customEventHint", "Add custom events using namespace:event format (e.g., deploy:started)")
661
+ children: v("webhooks.customEventHint", "Add custom events using namespace:event format (e.g., deploy:started)")
657
662
  })
658
663
  ] }),
659
- /* @__PURE__ */ p("div", { children: [
660
- /* @__PURE__ */ f("label", {
664
+ /* @__PURE__ */ h("div", { children: [
665
+ /* @__PURE__ */ m("label", {
661
666
  className: "block text-sm font-medium text-text-primary mb-1",
662
- children: y("webhooks.signingKey", "Signing Key")
667
+ children: v("webhooks.signingKey", "Signing Key")
663
668
  }),
664
- /* @__PURE__ */ p("div", {
669
+ /* @__PURE__ */ h("div", {
665
670
  className: "relative",
666
- children: [/* @__PURE__ */ f("input", {
671
+ children: [/* @__PURE__ */ m("input", {
667
672
  "aria-label": "control",
668
- ref: tt,
669
- type: I ? "text" : "password",
670
- placeholder: y("webhooks.signingKeyPlaceholder", "HMAC signing key for delivery verification"),
673
+ ref: W,
674
+ type: P ? "text" : "password",
675
+ placeholder: v("webhooks.signingKeyPlaceholder", "HMAC signing key for delivery verification"),
671
676
  className: "w-full px-3 py-2 pr-10 bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder font-mono text-sm"
672
- }), /* @__PURE__ */ f("button", {
677
+ }), /* @__PURE__ */ m("button", {
673
678
  type: "button",
674
- onClick: () => Ze(!I),
679
+ onClick: () => F(!P),
675
680
  className: "absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-bg-elevated transition-colors",
676
- children: f(I ? we : Ce, { className: "size-4 text-text-secondary" })
681
+ children: m(P ? Ce : Se, { className: "size-4 text-text-secondary" })
677
682
  })]
678
683
  }),
679
- /* @__PURE__ */ f("p", {
684
+ /* @__PURE__ */ m("p", {
680
685
  className: "text-xs text-text-muted mt-1",
681
- children: y("webhooks.signingKeyHint", "Used to sign payloads with HMAC-SHA256. Header: X-Webhook-Signature")
686
+ children: v("webhooks.signingKeyHint", "Used to sign payloads with HMAC-SHA256. Header: X-Webhook-Signature")
682
687
  })
683
688
  ] }),
684
- st.length > 0 && /* @__PURE__ */ p("div", { children: [
685
- /* @__PURE__ */ f("label", {
689
+ ct.length > 0 && /* @__PURE__ */ h("div", { children: [
690
+ /* @__PURE__ */ m("label", {
686
691
  className: "block text-sm font-medium text-text-primary mb-2",
687
- children: y("webhooks.agentScope", "Agent Scope")
692
+ children: v("webhooks.agentScope", "Agent Scope")
688
693
  }),
689
- /* @__PURE__ */ f("p", {
694
+ /* @__PURE__ */ m("p", {
690
695
  className: "text-xs text-text-muted mb-2",
691
- children: y("webhooks.agentScopeHint", "Only fire for events from selected agents. Leave empty for all agents.")
696
+ children: v("webhooks.agentScopeHint", "Only fire for events from selected agents. Leave empty for all agents.")
692
697
  }),
693
- /* @__PURE__ */ f("div", {
698
+ /* @__PURE__ */ m("div", {
694
699
  className: "space-y-2 max-h-32 overflow-y-auto",
695
- children: st.map((e) => /* @__PURE__ */ p("label", {
700
+ children: ct.map((e) => /* @__PURE__ */ h("label", {
696
701
  className: "flex items-center gap-2",
697
702
  children: [
698
- /* @__PURE__ */ f("input", {
703
+ /* @__PURE__ */ m("input", {
699
704
  "aria-label": "control",
700
705
  type: "checkbox",
701
- checked: F.includes(e.id),
702
- onChange: () => Xe((t) => t.includes(e.id) ? t.filter((t) => t !== e.id) : [...t, e.id]),
706
+ checked: M.includes(e.id),
707
+ onChange: () => N((t) => t.includes(e.id) ? t.filter((t) => t !== e.id) : [...t, e.id]),
703
708
  className: "size-4 rounded border-border-default"
704
709
  }),
705
- /* @__PURE__ */ f(xe, { className: "size-3.5 text-text-secondary" }),
706
- /* @__PURE__ */ f("span", {
710
+ /* @__PURE__ */ m(be, { className: "size-3.5 text-text-secondary" }),
711
+ /* @__PURE__ */ m("span", {
707
712
  className: "text-sm text-text-primary",
708
713
  children: e.name
709
714
  })
@@ -713,65 +718,65 @@ function h() {
713
718
  ] })
714
719
  ]
715
720
  }),
716
- /* @__PURE__ */ p("div", {
721
+ /* @__PURE__ */ h("div", {
717
722
  className: "flex flex-col-reverse sm:flex-row justify-end gap-3 mt-6",
718
- children: [/* @__PURE__ */ f("button", {
723
+ children: [/* @__PURE__ */ m("button", {
719
724
  type: "button",
720
- onClick: () => E(!1),
721
- disabled: O,
725
+ onClick: () => C(!1),
726
+ disabled: E,
722
727
  className: "px-4 py-2 text-text-primary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
723
- children: y("common.cancel", "Cancel")
724
- }), /* @__PURE__ */ f("button", {
728
+ children: v("common.cancel", "Cancel")
729
+ }), /* @__PURE__ */ m("button", {
725
730
  type: "button",
726
- onClick: mt,
727
- disabled: O,
731
+ onClick: ht,
732
+ disabled: E,
728
733
  className: "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",
729
- children: O ? y("webhooks.creating", "Creating...") : y("webhooks.createWebhook", "Create Webhook")
734
+ children: E ? v("webhooks.creating", "Creating...") : v("webhooks.createWebhook", "Create Webhook")
730
735
  })]
731
736
  })
732
737
  ]
733
738
  })
734
739
  }),
735
- /* @__PURE__ */ f(a, {
736
- isOpen: V === "enable",
737
- onClose: () => H(null),
738
- onConfirm: () => bt(!0),
740
+ /* @__PURE__ */ m(a, {
741
+ isOpen: B === "enable",
742
+ onClose: () => V(null),
743
+ onConfirm: () => xt(!0),
739
744
  title: "Enable selected webhooks",
740
745
  message: `Enable ${Z.length} selected webhook${Z.length === 1 ? "" : "s"}?`,
741
746
  confirmLabel: "Enable",
742
747
  variant: "default"
743
748
  }),
744
- /* @__PURE__ */ f(a, {
745
- isOpen: V === "disable",
746
- onClose: () => H(null),
747
- onConfirm: () => bt(!1),
749
+ /* @__PURE__ */ m(a, {
750
+ isOpen: B === "disable",
751
+ onClose: () => V(null),
752
+ onConfirm: () => xt(!1),
748
753
  title: "Disable selected webhooks",
749
754
  message: `Disable ${X.length} selected webhook${X.length === 1 ? "" : "s"}?`,
750
755
  confirmLabel: "Disable",
751
756
  variant: "warning"
752
757
  }),
753
- /* @__PURE__ */ f(a, {
754
- isOpen: V === "delete",
755
- onClose: () => H(null),
756
- onConfirm: xt,
758
+ /* @__PURE__ */ m(a, {
759
+ isOpen: B === "delete",
760
+ onClose: () => V(null),
761
+ onConfirm: St,
757
762
  title: "Delete selected webhooks",
758
763
  message: `Delete ${Y.length} selected webhook${Y.length === 1 ? "" : "s"}? This cannot be undone.`,
759
764
  confirmLabel: "Delete",
760
765
  variant: "danger"
761
766
  }),
762
- /* @__PURE__ */ f(ee, {
763
- isOpen: U !== null,
764
- onClose: () => W(null),
767
+ /* @__PURE__ */ m(ee, {
768
+ isOpen: H !== null,
769
+ onClose: () => U(null),
765
770
  onConfirm: () => {
766
- W(null), h("/billing/plans");
771
+ U(null), Be("/billing/plans");
767
772
  },
768
- title: U?.title || "Quota Reached",
769
- message: U?.message || "Upgrade your plan to continue."
773
+ title: H?.title || "Quota Reached",
774
+ message: H?.message || "Upgrade your plan to continue."
770
775
  })
771
776
  ]
772
777
  });
773
778
  }
774
779
  //#endregion
775
- export { h as WebhooksPage };
780
+ export { Be as WebhooksPage };
776
781
 
777
782
  //# sourceMappingURL=WebhooksPage.js.map