@burdenoff/microfe-vibecontrols 2026.709.2 → 2026.710.1

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 (45) hide show
  1. package/dist/components/agent-manager/AgentManagerBookmarksDrawer.js +87 -85
  2. package/dist/components/agent-manager/AgentManagerBookmarksDrawer.js.map +1 -1
  3. package/dist/components/ai/InstructionFilesManager.js +138 -136
  4. package/dist/components/ai/InstructionFilesManager.js.map +1 -1
  5. package/dist/components/ai/PluginHarnessPicker.js +70 -64
  6. package/dist/components/ai/PluginHarnessPicker.js.map +1 -1
  7. package/dist/components/docs/DocsEditPanel.js +1 -1
  8. package/dist/components/docs/DocsEditPanel.js.map +1 -1
  9. package/dist/components/docs/DocsPageTree.js +1 -1
  10. package/dist/components/docs/DocsPageTree.js.map +1 -1
  11. package/dist/components/docs/DocsTabPanel.js +108 -106
  12. package/dist/components/docs/DocsTabPanel.js.map +1 -1
  13. package/dist/components/notes/NotesTabPanel.js +99 -99
  14. package/dist/components/notes/NotesTabPanel.js.map +1 -1
  15. package/dist/components/scorecard/ScorecardPanel.js +309 -308
  16. package/dist/components/scorecard/ScorecardPanel.js.map +1 -1
  17. package/dist/components/sessions/SessionPublicLinkPanel.js +104 -102
  18. package/dist/components/sessions/SessionPublicLinkPanel.js.map +1 -1
  19. package/dist/components/settings/AdvancedSection.js +92 -90
  20. package/dist/components/settings/AdvancedSection.js.map +1 -1
  21. package/dist/components/vibedeck/VibeDeckPublicLinkPanel.js +104 -102
  22. package/dist/components/vibedeck/VibeDeckPublicLinkPanel.js.map +1 -1
  23. package/dist/constants/permissions.js +7 -0
  24. package/dist/constants/permissions.js.map +1 -1
  25. package/dist/pages/ActionsPage.js +303 -303
  26. package/dist/pages/ActionsPage.js.map +1 -1
  27. package/dist/pages/AgentDetailsPage.js +520 -516
  28. package/dist/pages/AgentDetailsPage.js.map +1 -1
  29. package/dist/pages/AgentsPage.js +287 -283
  30. package/dist/pages/AgentsPage.js.map +1 -1
  31. package/dist/pages/TargetsPage.js +554 -549
  32. package/dist/pages/TargetsPage.js.map +1 -1
  33. package/dist/pages/VibeAuditPage.js +2 -2
  34. package/dist/pages/VibeAuditPage.js.map +1 -1
  35. package/dist/pages/VibeDeckPage.js +257 -257
  36. package/dist/pages/VibeDeckPage.js.map +1 -1
  37. package/dist/pages/VibeDetailsPage.js +688 -693
  38. package/dist/pages/VibeDetailsPage.js.map +1 -1
  39. package/dist/pages/VibesPage.js +49 -41
  40. package/dist/pages/VibesPage.js.map +1 -1
  41. package/dist/pages/WebhooksPage.js +162 -138
  42. package/dist/pages/WebhooksPage.js.map +1 -1
  43. package/dist/pages/tunnels/DomainsTab.js +54 -47
  44. package/dist/pages/tunnels/DomainsTab.js.map +1 -1
  45. package/package.json +1 -1
@@ -11,9 +11,9 @@ 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 o } from "../components/shared/SelectionCheckbox.js";
14
+ import { SelectionCheckbox as fe } from "../components/shared/SelectionCheckbox.js";
15
15
  import "../components/shared/index.js";
16
- import { isNative as fe, nativeImpact as pe, nativeNotify as me } from "../utils/nativeBridge.js";
16
+ import { isNative as o, nativeImpact as pe, nativeNotify as me } from "../utils/nativeBridge.js";
17
17
  import { VIBE_PERMISSIONS as s } from "../constants/permissions.js";
18
18
  import { PageSkeleton as he } from "../components/shared/PageSkeleton.js";
19
19
  import { WEBHOOK_EVENTS as ge, isCustomEvent as c } from "../components/webhooks/types.js";
@@ -24,10 +24,10 @@ import { usePermissions as Ae } from "@burdenoff/fe-libs/shared/providers/shell"
24
24
  import { AnimatePresence as je } from "framer-motion";
25
25
  import { jsx as m, jsxs as h } from "react/jsx-runtime";
26
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";
27
+ import { AccessDenied as Fe, PermissionButton as g } from "@burdenoff/fe-libs/shared/components";
28
+ import { MotionItem as Ie, MotionList as Le, MotionPage as _ } from "@burdenoff/fe-libs/shared/motion";
29
29
  //#region src/pages/WebhooksPage.tsx
30
- var ze = [
30
+ var Re = [
31
31
  {
32
32
  value: "all",
33
33
  label: "All Statuses"
@@ -45,24 +45,24 @@ var ze = [
45
45
  label: "Has Errors"
46
46
  }
47
47
  ];
48
- function Be() {
48
+ function ze() {
49
49
  ne();
50
- let Be = re(), { t: Ve } = ve(), { hasPermission: _, isLoading: He, permissions: Ue } = Ae(), v = (e, t) => {
51
- let n = Ve(e);
50
+ let ze = re(), { t: Be } = ve(), { hasPermission: Ve, isLoading: He, permissions: Ue } = Ae(), v = (e, t) => {
51
+ let n = Be(e);
52
52
  return n === e ? t : n;
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);
53
+ }, We = Ve(s.WEBHOOK_LIST), Ge = Ve(s.WEBHOOK_CREATE), Ke = He || !We, [y, qe] = d(""), [b, Je] = d("all"), [x, Ye] = d("list"), [S, C] = d(!1), [w, T] = d(null), [Xe, E] = d(null), [D, Ze] = d(!1), [O, k] = d(null), [Qe, A] = d(null), [j, M] = d([]), [N, P] = d([]), [F, I] = d(!1), [L, R] = d(""), [z, B] = d(/* @__PURE__ */ new Set()), [V, H] = d(null), [U, W] = d(null);
54
54
  _e(() => {
55
- if (!D) return;
56
- let e = window.setTimeout(() => O(null), 4e3);
55
+ if (!O) return;
56
+ let e = window.setTimeout(() => k(null), 4e3);
57
57
  return () => window.clearTimeout(e);
58
- }, [D]), _e(() => {
58
+ }, [O]), _e(() => {
59
59
  if (!S) return;
60
60
  let e = (e) => {
61
- e.key === "Escape" && !E && C(!1);
61
+ e.key === "Escape" && !D && C(!1);
62
62
  };
63
63
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", 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) => ({
64
+ }, [D, S]);
65
+ let $e = u(null), et = u(null), tt = u(null), nt = 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
68
  })), [st]), { data: lt, loading: G, error: ut, refetch: K } = n({
@@ -99,111 +99,111 @@ function Be() {
99
99
  q,
100
100
  y,
101
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);
102
+ ]), Y = l(() => q.filter((e) => z.has(e.id)), [q, z]), X = Y.filter((e) => e.isActive), Z = Y.filter((e) => !e.isActive), dt = J.length > 0 && J.every((e) => z.has(e.id)), ft = J.some((e) => z.has(e.id)) && !dt, pt = () => {
103
+ E(null), A(null), M([]), P([]), I(!1), R(""), C(!0);
104
104
  }, mt = (e) => {
105
- j((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
105
+ M((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
106
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;
107
+ let e = $e.current?.value?.trim(), t = et.current?.value?.trim(), n = tt.current?.value?.trim() || void 0, r = nt.current?.value?.trim() || void 0;
108
108
  if (!e) {
109
- T(v("webhooks.nameRequired", "Name is required"));
109
+ E(v("webhooks.nameRequired", "Name is required"));
110
110
  return;
111
111
  }
112
112
  if (!t) {
113
- T(v("webhooks.urlRequired", "URL is required"));
113
+ E(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
- T(v("webhooks.urlProtocolRequired", "URL must use http:// or https:// protocol"));
119
+ E(v("webhooks.urlProtocolRequired", "URL must use http:// or https:// protocol"));
120
120
  return;
121
121
  }
122
122
  } catch {
123
- T(v("webhooks.urlInvalid", "Please enter a valid URL (e.g., https://example.com/webhook)"));
123
+ E(v("webhooks.urlInvalid", "Please enter a valid URL (e.g., https://example.com/webhook)"));
124
124
  return;
125
125
  }
126
- if (A.length === 0) {
127
- T(v("webhooks.eventRequired", "At least one event must be selected"));
126
+ if (j.length === 0) {
127
+ E(v("webhooks.eventRequired", "At least one event must be selected"));
128
128
  return;
129
129
  }
130
- Qe(!0), T(null), k(null);
130
+ Ze(!0), E(null), A(null);
131
131
  try {
132
132
  await rt({ variables: { input: {
133
133
  name: e,
134
134
  url: t,
135
- events: A,
135
+ events: j,
136
136
  secret: n,
137
137
  ...r ? { signingKey: r } : {},
138
- ...M.length > 0 ? { agentIds: M } : {}
139
- } } }), C(!1), O(v("webhooks.createdSuccess", "Webhook created successfully")), setTimeout(() => O(null), 3e3);
138
+ ...N.length > 0 ? { agentIds: N } : {}
139
+ } } }), C(!1), k(v("webhooks.createdSuccess", "Webhook created successfully")), setTimeout(() => k(null), 3e3);
140
140
  } catch (e) {
141
141
  if (te(e)) {
142
- C(!1), U({
142
+ C(!1), W({
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
- T(e instanceof Error ? e.message : v("webhooks.failedCreate", "Failed to create webhook"));
148
+ E(e instanceof Error ? e.message : v("webhooks.failedCreate", "Failed to create webhook"));
149
149
  } finally {
150
- Qe(!1);
150
+ Ze(!1);
151
151
  }
152
152
  }, gt = async (e) => {
153
153
  try {
154
- k(null), await it({ variables: {
154
+ A(null), await it({ variables: {
155
155
  id: e.id,
156
156
  input: { isActive: !e.isActive }
157
- } }), O(e.isActive ? v("webhooks.disabledSuccess", "Webhook disabled successfully") : v("webhooks.enabledSuccess", "Webhook enabled successfully"));
157
+ } }), k(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), k(e instanceof Error ? e.message : v("webhooks.failedToggle", "Failed to update webhook state"));
159
+ console.error("Failed to toggle webhook:", e), A(e instanceof Error ? e.message : v("webhooks.failedToggle", "Failed to update webhook state"));
160
160
  }
161
161
  }, _t = async (e) => {
162
- Xe(e.id);
162
+ T(e.id);
163
163
  try {
164
- k(null), await at({ variables: { id: e.id } }), O(v("webhooks.testSuccess", "Webhook test delivery completed"));
164
+ A(null), await at({ variables: { id: e.id } }), k(v("webhooks.testSuccess", "Webhook test delivery completed"));
165
165
  } catch (e) {
166
166
  if (te(e)) {
167
- U({
167
+ W({
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), k(e instanceof Error ? e.message : v("webhooks.failedTest", "Failed to test webhook"));
173
+ console.error("Failed to test webhook:", e), A(e instanceof Error ? e.message : v("webhooks.failedTest", "Failed to test webhook"));
174
174
  } finally {
175
- Xe(null);
175
+ T(null);
176
176
  }
177
177
  }, vt = async (e) => {
178
178
  try {
179
- k(null), await ot({ variables: { id: e.id } }), O(v("webhooks.deletedSuccess", "Webhook deleted successfully")), fe() && me("success");
179
+ A(null), await ot({ variables: { id: e.id } }), k(v("webhooks.deletedSuccess", "Webhook deleted successfully")), o() && me("success");
180
180
  } catch (e) {
181
- console.error("Failed to delete webhook:", e), k(e instanceof Error ? e.message : v("webhooks.failedDelete", "Failed to delete webhook")), fe() && me("error");
181
+ console.error("Failed to delete webhook:", e), A(e instanceof Error ? e.message : v("webhooks.failedDelete", "Failed to delete webhook")), o() && me("error");
182
182
  }
183
183
  }, yt = (e, t) => {
184
- z((n) => {
184
+ B((n) => {
185
185
  let r = new Set(n);
186
186
  return t ? r.add(e) : r.delete(e), r;
187
187
  });
188
188
  }, bt = (e) => {
189
- z((t) => {
189
+ B((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 = () => z(/* @__PURE__ */ new Set()), xt = async (e) => {
195
+ }, Q = () => B(/* @__PURE__ */ new Set()), xt = async (e) => {
196
196
  let t = e ? Z : X;
197
197
  if (t.length === 0) return;
198
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
- O(`${e ? "Enabled" : "Disabled"} ${r} webhook${r === 1 ? "" : "s"}${i > 0 ? ` • ${i} failed` : ""}`), setTimeout(() => O(null), 4e3), V(null), Q(), await K();
202
+ k(`${e ? "Enabled" : "Disabled"} ${r} webhook${r === 1 ? "" : "s"}${i > 0 ? ` • ${i} failed` : ""}`), setTimeout(() => k(null), 4e3), H(null), Q(), await K();
203
203
  }, St = async () => {
204
204
  if (Y.length === 0) return;
205
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();
206
+ k(`Deleted ${t} webhook${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), setTimeout(() => k(null), 4e3), H(null), Q(), await K();
207
207
  }, $ = {
208
208
  total: q.length,
209
209
  active: q.filter((e) => e.isActive).length,
@@ -213,44 +213,44 @@ function Be() {
213
213
  let t = Date.now() - new Date(e).getTime();
214
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 He ? /* @__PURE__ */ m(g, {
216
+ return He ? /* @__PURE__ */ m(_, {
217
217
  className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-screen",
218
218
  children: /* @__PURE__ */ m(he, {
219
219
  variant: "rows",
220
220
  count: 6
221
221
  })
222
- }) : Ue && Ue.permissionStrings?.length > 0 && !We ? /* @__PURE__ */ m(g, {
222
+ }) : Ue && Ue.permissionStrings?.length > 0 && !We ? /* @__PURE__ */ m(_, {
223
223
  className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-screen",
224
224
  children: /* @__PURE__ */ m(Fe, {
225
225
  title: v("common.accessDeniedTitle", "Access Denied"),
226
226
  description: v("webhooks.accessDeniedDescription", "You don't have permission to view webhooks."),
227
227
  details: "Required permission: webhook:list"
228
228
  })
229
- }) : ut && q.length === 0 ? /* @__PURE__ */ m(g, {
229
+ }) : ut && q.length === 0 ? /* @__PURE__ */ m(_, {
230
230
  className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-screen",
231
231
  children: /* @__PURE__ */ m(oe, {
232
232
  title: v("webhooks.failedLoad", "Failed to load webhooks"),
233
233
  message: ut.message,
234
234
  onRetry: () => K()
235
235
  })
236
- }) : /* @__PURE__ */ h(g, {
236
+ }) : /* @__PURE__ */ h(_, {
237
237
  className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-screen",
238
238
  children: [
239
- D && /* @__PURE__ */ m("div", {
239
+ O && /* @__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: D
241
+ children: O
242
242
  }),
243
- $e && /* @__PURE__ */ m("div", {
243
+ Qe && /* @__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: $e
246
+ children: Qe
247
247
  }),
248
248
  /* @__PURE__ */ m(ae, {
249
249
  title: v("nav.webhooks", "Webhooks"),
250
250
  description: `${$.active} of ${$.total} webhooks active`,
251
251
  actions: /* @__PURE__ */ h("div", {
252
252
  className: "flex items-center gap-2",
253
- children: [/* @__PURE__ */ m(Ie, {
253
+ children: [/* @__PURE__ */ m(g, {
254
254
  permission: s.WEBHOOK_CREATE,
255
255
  children: /* @__PURE__ */ h(Me, {
256
256
  type: "button",
@@ -300,7 +300,7 @@ function Be() {
300
300
  children: /* @__PURE__ */ m(le, {
301
301
  label: v("webhooks.status", "Status"),
302
302
  value: b,
303
- options: ze,
303
+ options: Re,
304
304
  onChange: Je
305
305
  })
306
306
  })]
@@ -350,7 +350,7 @@ function Be() {
350
350
  className: "flex flex-wrap items-center gap-3",
351
351
  children: [/* @__PURE__ */ h("div", {
352
352
  className: "flex items-center gap-2",
353
- children: [/* @__PURE__ */ m(o, {
353
+ children: [/* @__PURE__ */ m(fe, {
354
354
  checked: dt,
355
355
  indeterminate: ft,
356
356
  onChange: bt,
@@ -359,7 +359,7 @@ function Be() {
359
359
  className: "text-sm font-medium text-text-primary",
360
360
  children: "Select all visible"
361
361
  })]
362
- }), R.size > 0 && /* @__PURE__ */ m("button", {
362
+ }), z.size > 0 && /* @__PURE__ */ m("button", {
363
363
  type: "button",
364
364
  onClick: Q,
365
365
  className: "text-sm text-text-secondary hover:text-text-primary",
@@ -370,28 +370,40 @@ function Be() {
370
370
  children: [
371
371
  /* @__PURE__ */ h("span", {
372
372
  className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
373
- children: [R.size, " selected"]
373
+ children: [z.size, " selected"]
374
374
  }),
375
- /* @__PURE__ */ h("button", {
376
- type: "button",
377
- onClick: () => V("enable"),
378
- disabled: Z.length === 0,
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",
380
- children: ["Enable Selected", Z.length > 0 ? ` (${Z.length})` : ""]
375
+ /* @__PURE__ */ m(g, {
376
+ permission: s.WEBHOOK_UPDATE,
377
+ deniedBehavior: "hide",
378
+ children: /* @__PURE__ */ h("button", {
379
+ type: "button",
380
+ onClick: () => H("enable"),
381
+ disabled: Z.length === 0,
382
+ 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",
383
+ children: ["Enable Selected", Z.length > 0 ? ` (${Z.length})` : ""]
384
+ })
381
385
  }),
382
- /* @__PURE__ */ h("button", {
383
- type: "button",
384
- onClick: () => V("disable"),
385
- disabled: X.length === 0,
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",
387
- children: ["Disable Selected", X.length > 0 ? ` (${X.length})` : ""]
386
+ /* @__PURE__ */ m(g, {
387
+ permission: s.WEBHOOK_UPDATE,
388
+ deniedBehavior: "hide",
389
+ children: /* @__PURE__ */ h("button", {
390
+ type: "button",
391
+ onClick: () => H("disable"),
392
+ disabled: X.length === 0,
393
+ 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",
394
+ children: ["Disable Selected", X.length > 0 ? ` (${X.length})` : ""]
395
+ })
388
396
  }),
389
- /* @__PURE__ */ h("button", {
390
- type: "button",
391
- onClick: () => V("delete"),
392
- disabled: Y.length === 0,
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",
394
- children: ["Delete Selected", Y.length > 0 ? ` (${Y.length})` : ""]
397
+ /* @__PURE__ */ m(g, {
398
+ permission: s.WEBHOOK_DELETE,
399
+ deniedBehavior: "hide",
400
+ children: /* @__PURE__ */ h("button", {
401
+ type: "button",
402
+ onClick: () => H("delete"),
403
+ disabled: Y.length === 0,
404
+ 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",
405
+ children: ["Delete Selected", Y.length > 0 ? ` (${Y.length})` : ""]
406
+ })
395
407
  })
396
408
  ]
397
409
  })]
@@ -402,9 +414,9 @@ function Be() {
402
414
  children: G && q.length === 0 ? /* @__PURE__ */ m(he, {
403
415
  variant: "rows",
404
416
  count: 6
405
- }) : J.length > 0 ? /* @__PURE__ */ m(Re, {
417
+ }) : J.length > 0 ? /* @__PURE__ */ m(Le, {
406
418
  className: x === "grid" ? "grid grid-cols-1 gap-4 xl:grid-cols-2" : "space-y-4",
407
- children: J.map((e) => /* @__PURE__ */ m(Le, {
419
+ children: J.map((e) => /* @__PURE__ */ m(Ie, {
408
420
  variant: "fadeRight",
409
421
  children: /* @__PURE__ */ m(ue, {
410
422
  className: "p-4",
@@ -415,8 +427,8 @@ function Be() {
415
427
  children: [
416
428
  /* @__PURE__ */ m("div", {
417
429
  onClick: (e) => e.stopPropagation(),
418
- children: /* @__PURE__ */ m(o, {
419
- checked: R.has(e.id),
430
+ children: /* @__PURE__ */ m(fe, {
431
+ checked: z.has(e.id),
420
432
  onChange: (t) => yt(e.id, t),
421
433
  ariaLabel: `Select webhook ${e.name}`,
422
434
  className: "mt-2"
@@ -503,28 +515,40 @@ function Be() {
503
515
  }), /* @__PURE__ */ h("div", {
504
516
  className: "flex items-center gap-2 flex-shrink-0",
505
517
  children: [
506
- /* @__PURE__ */ h("button", {
507
- type: "button",
508
- onClick: () => _t(e),
509
- disabled: w === e.id,
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",
511
- children: [w === e.id ? /* @__PURE__ */ m(De, { className: "size-4 animate-spin" }) : /* @__PURE__ */ m(Ee, { className: "size-4" }), v("webhooks.test", "Test")]
518
+ /* @__PURE__ */ m(g, {
519
+ permission: s.WEBHOOK_EXECUTE,
520
+ deniedBehavior: "hide",
521
+ children: /* @__PURE__ */ h("button", {
522
+ type: "button",
523
+ onClick: () => _t(e),
524
+ disabled: w === e.id,
525
+ 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",
526
+ children: [w === e.id ? /* @__PURE__ */ m(De, { className: "size-4 animate-spin" }) : /* @__PURE__ */ m(Ee, { className: "size-4" }), v("webhooks.test", "Test")]
527
+ })
512
528
  }),
513
- /* @__PURE__ */ m("button", {
514
- type: "button",
515
- onClick: () => gt(e),
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"}`,
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" })
529
+ /* @__PURE__ */ m(g, {
530
+ permission: s.WEBHOOK_UPDATE,
531
+ deniedBehavior: "hide",
532
+ children: /* @__PURE__ */ m("button", {
533
+ type: "button",
534
+ onClick: () => gt(e),
535
+ 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"}`,
536
+ title: e.isActive ? v("webhooks.disable", "Disable") : v("webhooks.enable", "Enable"),
537
+ children: e.isActive ? /* @__PURE__ */ m(xe, { className: "size-4" }) : /* @__PURE__ */ m(ke, { className: "size-4" })
538
+ })
519
539
  }),
520
- /* @__PURE__ */ m("button", {
521
- type: "button",
522
- onClick: () => {
523
- pe("medium"), vt(e);
524
- },
525
- className: "p-2 text-status-error-text hover:bg-status-error-bg rounded-md transition-colors",
526
- title: v("common.delete", "Delete"),
527
- children: /* @__PURE__ */ m(Oe, { className: "size-4" })
540
+ /* @__PURE__ */ m(g, {
541
+ permission: s.WEBHOOK_DELETE,
542
+ deniedBehavior: "hide",
543
+ children: /* @__PURE__ */ m("button", {
544
+ type: "button",
545
+ onClick: () => {
546
+ pe("medium"), vt(e);
547
+ },
548
+ className: "p-2 text-status-error-text hover:bg-status-error-bg rounded-md transition-colors",
549
+ title: v("common.delete", "Delete"),
550
+ children: /* @__PURE__ */ m(Oe, { className: "size-4" })
551
+ })
528
552
  })
529
553
  ]
530
554
  })]
@@ -560,9 +584,9 @@ function Be() {
560
584
  className: "text-lg font-semibold text-text-primary mb-4",
561
585
  children: v("webhooks.newWebhook", "New Webhook")
562
586
  }),
563
- Ze && /* @__PURE__ */ m("div", {
587
+ Xe && /* @__PURE__ */ m("div", {
564
588
  className: "mb-4 p-3 bg-status-error-bg text-status-error-text rounded-md text-sm",
565
- children: Ze
589
+ children: Xe
566
590
  }),
567
591
  /* @__PURE__ */ h("div", {
568
592
  className: "space-y-4",
@@ -572,7 +596,7 @@ function Be() {
572
596
  children: v("webhooks.name", "Name")
573
597
  }), /* @__PURE__ */ m("input", {
574
598
  "aria-label": "control",
575
- ref: et,
599
+ ref: $e,
576
600
  type: "text",
577
601
  placeholder: v("webhooks.namePlaceholder", "Slack Notifications"),
578
602
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder"
@@ -582,7 +606,7 @@ function Be() {
582
606
  children: v("webhooks.url", "URL")
583
607
  }), /* @__PURE__ */ m("input", {
584
608
  "aria-label": "control",
585
- ref: tt,
609
+ ref: et,
586
610
  type: "url",
587
611
  placeholder: v("webhooks.urlPlaceholder", "https://hooks.slack.com/services/..."),
588
612
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder"
@@ -592,7 +616,7 @@ function Be() {
592
616
  children: v("webhooks.secret", "Secret")
593
617
  }), /* @__PURE__ */ m("input", {
594
618
  "aria-label": "control",
595
- ref: nt,
619
+ ref: tt,
596
620
  type: "password",
597
621
  placeholder: v("webhooks.secretPlaceholder", "Optional signing secret"),
598
622
  className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder"
@@ -609,7 +633,7 @@ function Be() {
609
633
  children: [/* @__PURE__ */ m("input", {
610
634
  "aria-label": "control",
611
635
  type: "checkbox",
612
- checked: A.includes(e),
636
+ checked: j.includes(e),
613
637
  onChange: () => mt(e),
614
638
  className: "size-4 rounded border-border-default"
615
639
  }), /* @__PURE__ */ m("span", {
@@ -618,13 +642,13 @@ function Be() {
618
642
  })]
619
643
  }, e))
620
644
  }),
621
- A.filter(c).length > 0 && /* @__PURE__ */ m("div", {
645
+ j.filter(c).length > 0 && /* @__PURE__ */ m("div", {
622
646
  className: "flex flex-wrap gap-1 mt-2",
623
- children: A.filter(c).map((e) => /* @__PURE__ */ h("span", {
647
+ children: j.filter(c).map((e) => /* @__PURE__ */ h("span", {
624
648
  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",
625
649
  children: [e, /* @__PURE__ */ m("button", {
626
650
  type: "button",
627
- onClick: () => j((t) => t.filter((t) => t !== e)),
651
+ onClick: () => M((t) => t.filter((t) => t !== e)),
628
652
  className: "hover:text-status-error-text",
629
653
  children: /* @__PURE__ */ m(ke, { className: "size-3" })
630
654
  })]
@@ -635,22 +659,22 @@ function Be() {
635
659
  children: [/* @__PURE__ */ m("input", {
636
660
  "aria-label": "control",
637
661
  type: "text",
638
- value: I,
639
- onChange: (e) => L(e.target.value),
662
+ value: L,
663
+ onChange: (e) => R(e.target.value),
640
664
  placeholder: v("webhooks.customEventPlaceholder", "custom:event-name"),
641
665
  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",
642
666
  onKeyDown: (e) => {
643
667
  if (e.key === "Enter") {
644
668
  e.preventDefault();
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(""));
669
+ let t = L.trim();
670
+ /^[a-z][a-z0-9_-]*:[a-z][a-z0-9_.-]*$/.test(t) && !j.includes(t) && (M((e) => [...e, t]), R(""));
647
671
  }
648
672
  }
649
673
  }), /* @__PURE__ */ m("button", {
650
674
  type: "button",
651
675
  onClick: () => {
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(""));
676
+ let e = L.trim();
677
+ /^[a-z][a-z0-9_-]*:[a-z][a-z0-9_.-]*$/.test(e) && !j.includes(e) && (M((t) => [...t, e]), R(""));
654
678
  },
655
679
  className: "px-3 py-1.5 text-sm bg-bg-sunken text-text-primary hover:bg-action-secondary-bg-hover rounded-md transition-colors",
656
680
  children: /* @__PURE__ */ m(f, { className: "size-4" })
@@ -670,15 +694,15 @@ function Be() {
670
694
  className: "relative",
671
695
  children: [/* @__PURE__ */ m("input", {
672
696
  "aria-label": "control",
673
- ref: W,
674
- type: P ? "text" : "password",
697
+ ref: nt,
698
+ type: F ? "text" : "password",
675
699
  placeholder: v("webhooks.signingKeyPlaceholder", "HMAC signing key for delivery verification"),
676
700
  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"
677
701
  }), /* @__PURE__ */ m("button", {
678
702
  type: "button",
679
- onClick: () => F(!P),
703
+ onClick: () => I(!F),
680
704
  className: "absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-bg-elevated transition-colors",
681
- children: m(P ? Ce : Se, { className: "size-4 text-text-secondary" })
705
+ children: m(F ? Ce : Se, { className: "size-4 text-text-secondary" })
682
706
  })]
683
707
  }),
684
708
  /* @__PURE__ */ m("p", {
@@ -703,8 +727,8 @@ function Be() {
703
727
  /* @__PURE__ */ m("input", {
704
728
  "aria-label": "control",
705
729
  type: "checkbox",
706
- checked: M.includes(e.id),
707
- onChange: () => N((t) => t.includes(e.id) ? t.filter((t) => t !== e.id) : [...t, e.id]),
730
+ checked: N.includes(e.id),
731
+ onChange: () => P((t) => t.includes(e.id) ? t.filter((t) => t !== e.id) : [...t, e.id]),
708
732
  className: "size-4 rounded border-border-default"
709
733
  }),
710
734
  /* @__PURE__ */ m(be, { className: "size-3.5 text-text-secondary" }),
@@ -723,23 +747,23 @@ function Be() {
723
747
  children: [/* @__PURE__ */ m("button", {
724
748
  type: "button",
725
749
  onClick: () => C(!1),
726
- disabled: E,
750
+ disabled: D,
727
751
  className: "px-4 py-2 text-text-primary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
728
752
  children: v("common.cancel", "Cancel")
729
753
  }), /* @__PURE__ */ m("button", {
730
754
  type: "button",
731
755
  onClick: ht,
732
- disabled: E,
756
+ disabled: D,
733
757
  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",
734
- children: E ? v("webhooks.creating", "Creating...") : v("webhooks.createWebhook", "Create Webhook")
758
+ children: D ? v("webhooks.creating", "Creating...") : v("webhooks.createWebhook", "Create Webhook")
735
759
  })]
736
760
  })
737
761
  ]
738
762
  })
739
763
  }),
740
764
  /* @__PURE__ */ m(a, {
741
- isOpen: B === "enable",
742
- onClose: () => V(null),
765
+ isOpen: V === "enable",
766
+ onClose: () => H(null),
743
767
  onConfirm: () => xt(!0),
744
768
  title: "Enable selected webhooks",
745
769
  message: `Enable ${Z.length} selected webhook${Z.length === 1 ? "" : "s"}?`,
@@ -747,8 +771,8 @@ function Be() {
747
771
  variant: "default"
748
772
  }),
749
773
  /* @__PURE__ */ m(a, {
750
- isOpen: B === "disable",
751
- onClose: () => V(null),
774
+ isOpen: V === "disable",
775
+ onClose: () => H(null),
752
776
  onConfirm: () => xt(!1),
753
777
  title: "Disable selected webhooks",
754
778
  message: `Disable ${X.length} selected webhook${X.length === 1 ? "" : "s"}?`,
@@ -756,8 +780,8 @@ function Be() {
756
780
  variant: "warning"
757
781
  }),
758
782
  /* @__PURE__ */ m(a, {
759
- isOpen: B === "delete",
760
- onClose: () => V(null),
783
+ isOpen: V === "delete",
784
+ onClose: () => H(null),
761
785
  onConfirm: St,
762
786
  title: "Delete selected webhooks",
763
787
  message: `Delete ${Y.length} selected webhook${Y.length === 1 ? "" : "s"}? This cannot be undone.`,
@@ -765,18 +789,18 @@ function Be() {
765
789
  variant: "danger"
766
790
  }),
767
791
  /* @__PURE__ */ m(ee, {
768
- isOpen: H !== null,
769
- onClose: () => U(null),
792
+ isOpen: U !== null,
793
+ onClose: () => W(null),
770
794
  onConfirm: () => {
771
- U(null), Be("/billing/plans");
795
+ W(null), ze("/billing/plans");
772
796
  },
773
- title: H?.title || "Quota Reached",
774
- message: H?.message || "Upgrade your plan to continue."
797
+ title: U?.title || "Quota Reached",
798
+ message: U?.message || "Upgrade your plan to continue."
775
799
  })
776
800
  ]
777
801
  });
778
802
  }
779
803
  //#endregion
780
- export { Be as WebhooksPage };
804
+ export { ze as WebhooksPage };
781
805
 
782
806
  //# sourceMappingURL=WebhooksPage.js.map