@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.
- package/dist/components/agents/AgentForm.js +129 -127
- package/dist/components/agents/AgentForm.js.map +1 -1
- package/dist/components/shared/InstallTabs.js +19 -7
- package/dist/components/shared/InstallTabs.js.map +1 -1
- package/dist/pages/ActionsPage.js +209 -204
- package/dist/pages/ActionsPage.js.map +1 -1
- package/dist/pages/AgentDetailsPage.js +678 -648
- package/dist/pages/AgentDetailsPage.js.map +1 -1
- package/dist/pages/AgentGraphPage.js +112 -108
- package/dist/pages/AgentGraphPage.js.map +1 -1
- package/dist/pages/AgentsPage.js +159 -155
- package/dist/pages/AgentsPage.js.map +1 -1
- package/dist/pages/AnalyticsPage.js +140 -136
- package/dist/pages/AnalyticsPage.js.map +1 -1
- package/dist/pages/CatalogDetailPage.js +249 -244
- package/dist/pages/CatalogDetailPage.js.map +1 -1
- package/dist/pages/CatalogPage.js +73 -68
- package/dist/pages/CatalogPage.js.map +1 -1
- package/dist/pages/ComponentDetailPage.js +195 -164
- package/dist/pages/ComponentDetailPage.js.map +1 -1
- package/dist/pages/ComponentsPage.js +80 -75
- package/dist/pages/ComponentsPage.js.map +1 -1
- package/dist/pages/EnvTopologyPage.js +100 -95
- package/dist/pages/EnvTopologyPage.js.map +1 -1
- package/dist/pages/HealthPage.js +331 -204
- package/dist/pages/HealthPage.js.map +1 -1
- package/dist/pages/LogsPage.js +54 -49
- package/dist/pages/LogsPage.js.map +1 -1
- package/dist/pages/OverviewPage.js +159 -129
- package/dist/pages/OverviewPage.js.map +1 -1
- package/dist/pages/PluginsCatalogPage.js +72 -78
- package/dist/pages/PluginsCatalogPage.js.map +1 -1
- package/dist/pages/SessionDetailsPage.js +517 -512
- package/dist/pages/SessionDetailsPage.js.map +1 -1
- package/dist/pages/SessionsPage.js +1084 -1079
- package/dist/pages/SessionsPage.js.map +1 -1
- package/dist/pages/SettingsPage.js +107 -103
- package/dist/pages/SettingsPage.js.map +1 -1
- package/dist/pages/TargetDetailsPage.js +131 -123
- package/dist/pages/TargetDetailsPage.js.map +1 -1
- package/dist/pages/TargetsPage.js +198 -194
- package/dist/pages/TargetsPage.js.map +1 -1
- package/dist/pages/TemplatesPage.js +77 -71
- package/dist/pages/TemplatesPage.js.map +1 -1
- package/dist/pages/VibeAuditPage.js +83 -78
- package/dist/pages/VibeAuditPage.js.map +1 -1
- package/dist/pages/VibeCalendarPage.js +109 -104
- package/dist/pages/VibeCalendarPage.js.map +1 -1
- package/dist/pages/VibeDeckPage.js +222 -217
- package/dist/pages/VibeDeckPage.js.map +1 -1
- package/dist/pages/VibeDetailsPage.js +532 -501
- package/dist/pages/VibeDetailsPage.js.map +1 -1
- package/dist/pages/VibesPage.js +137 -133
- package/dist/pages/VibesPage.js.map +1 -1
- package/dist/pages/WebhooksPage.js +329 -324
- package/dist/pages/WebhooksPage.js.map +1 -1
- package/dist/pages/ai/AIPage.js +149 -144
- package/dist/pages/ai/AIPage.js.map +1 -1
- 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
|
|
14
|
+
import { SelectionCheckbox as o } from "../components/shared/SelectionCheckbox.js";
|
|
15
15
|
import "../components/shared/index.js";
|
|
16
|
-
import { isNative as
|
|
17
|
-
import { VIBE_PERMISSIONS as
|
|
18
|
-
import { PageSkeleton as
|
|
19
|
-
import { WEBHOOK_EVENTS as
|
|
20
|
-
import { useEffect as
|
|
21
|
-
import { useI18n as
|
|
22
|
-
import { AlertTriangle as
|
|
23
|
-
import { usePermissions as
|
|
24
|
-
import { AnimatePresence as
|
|
25
|
-
import { jsx as
|
|
26
|
-
import { Button as
|
|
27
|
-
import { AccessDenied as
|
|
28
|
-
import { MotionItem as
|
|
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
|
|
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
|
|
48
|
+
function Be() {
|
|
49
49
|
ne();
|
|
50
|
-
let
|
|
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
|
-
},
|
|
54
|
-
|
|
55
|
-
if (!
|
|
56
|
-
let e = window.setTimeout(() =>
|
|
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
|
-
}, [
|
|
59
|
-
if (!
|
|
58
|
+
}, [D]), _e(() => {
|
|
59
|
+
if (!S) return;
|
|
60
60
|
let e = (e) => {
|
|
61
|
-
e.key === "Escape" && !
|
|
61
|
+
e.key === "Escape" && !E && C(!1);
|
|
62
62
|
};
|
|
63
63
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
64
|
-
}, [
|
|
65
|
-
let
|
|
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
|
-
})), [
|
|
68
|
+
})), [st]), { data: lt, loading: G, error: ut, refetch: K } = n({
|
|
69
69
|
variables: {
|
|
70
|
-
filter: { isActive:
|
|
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:
|
|
75
|
-
}), q =
|
|
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
|
-
})), [
|
|
93
|
-
if (
|
|
94
|
-
let t =
|
|
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 !(
|
|
97
|
+
return !(b === "error" && !e.lastError);
|
|
98
98
|
}), [
|
|
99
99
|
q,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
]), Y =
|
|
103
|
-
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
},
|
|
107
|
-
let e =
|
|
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
|
-
|
|
109
|
+
T(v("webhooks.nameRequired", "Name is required"));
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
112
112
|
if (!t) {
|
|
113
|
-
|
|
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
|
-
|
|
119
|
+
T(v("webhooks.urlProtocolRequired", "URL must use http:// or https:// protocol"));
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
122
|
} catch {
|
|
123
|
-
|
|
123
|
+
T(v("webhooks.urlInvalid", "Please enter a valid URL (e.g., https://example.com/webhook)"));
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
|
-
if (
|
|
127
|
-
|
|
126
|
+
if (A.length === 0) {
|
|
127
|
+
T(v("webhooks.eventRequired", "At least one event must be selected"));
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
|
-
|
|
130
|
+
Qe(!0), T(null), k(null);
|
|
131
131
|
try {
|
|
132
|
-
await
|
|
132
|
+
await rt({ variables: { input: {
|
|
133
133
|
name: e,
|
|
134
134
|
url: t,
|
|
135
|
-
events:
|
|
135
|
+
events: A,
|
|
136
136
|
secret: n,
|
|
137
137
|
...r ? { signingKey: r } : {},
|
|
138
|
-
...
|
|
139
|
-
} } }),
|
|
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
|
-
|
|
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
|
-
|
|
148
|
+
T(e instanceof Error ? e.message : v("webhooks.failedCreate", "Failed to create webhook"));
|
|
149
149
|
} finally {
|
|
150
|
-
|
|
150
|
+
Qe(!1);
|
|
151
151
|
}
|
|
152
|
-
},
|
|
152
|
+
}, gt = async (e) => {
|
|
153
153
|
try {
|
|
154
|
-
|
|
154
|
+
k(null), await it({ variables: {
|
|
155
155
|
id: e.id,
|
|
156
156
|
input: { isActive: !e.isActive }
|
|
157
|
-
} }),
|
|
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),
|
|
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
|
-
},
|
|
162
|
-
|
|
161
|
+
}, _t = async (e) => {
|
|
162
|
+
Xe(e.id);
|
|
163
163
|
try {
|
|
164
|
-
|
|
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
|
-
|
|
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),
|
|
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
|
-
|
|
175
|
+
Xe(null);
|
|
176
176
|
}
|
|
177
|
-
},
|
|
177
|
+
}, vt = async (e) => {
|
|
178
178
|
try {
|
|
179
|
-
|
|
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),
|
|
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
|
-
},
|
|
184
|
-
|
|
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
|
-
},
|
|
189
|
-
|
|
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 = () =>
|
|
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) =>
|
|
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
|
-
|
|
203
|
-
},
|
|
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) =>
|
|
206
|
-
|
|
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
|
-
},
|
|
212
|
-
if (!e) return
|
|
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 ?
|
|
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
|
|
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__ */
|
|
218
|
+
children: /* @__PURE__ */ m(he, {
|
|
219
219
|
variant: "rows",
|
|
220
220
|
count: 6
|
|
221
221
|
})
|
|
222
|
-
}) :
|
|
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__ */
|
|
225
|
-
title:
|
|
226
|
-
description:
|
|
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
|
-
}) :
|
|
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__ */
|
|
232
|
-
title:
|
|
233
|
-
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__ */
|
|
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
|
-
|
|
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:
|
|
241
|
+
children: D
|
|
242
242
|
}),
|
|
243
|
-
|
|
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:
|
|
246
|
+
children: $e
|
|
247
247
|
}),
|
|
248
|
-
/* @__PURE__ */
|
|
249
|
-
title:
|
|
248
|
+
/* @__PURE__ */ m(ae, {
|
|
249
|
+
title: v("nav.webhooks", "Webhooks"),
|
|
250
250
|
description: `${$.active} of ${$.total} webhooks active`,
|
|
251
|
-
actions: /* @__PURE__ */
|
|
251
|
+
actions: /* @__PURE__ */ h("div", {
|
|
252
252
|
className: "flex items-center gap-2",
|
|
253
|
-
children: [/* @__PURE__ */
|
|
254
|
-
permission:
|
|
255
|
-
children: /* @__PURE__ */
|
|
253
|
+
children: [/* @__PURE__ */ m(Ie, {
|
|
254
|
+
permission: s.WEBHOOK_CREATE,
|
|
255
|
+
children: /* @__PURE__ */ h(Me, {
|
|
256
256
|
type: "button",
|
|
257
|
-
onClick:
|
|
257
|
+
onClick: pt,
|
|
258
258
|
className: "gap-2",
|
|
259
|
-
children: [/* @__PURE__ */ f
|
|
259
|
+
children: [/* @__PURE__ */ m(f, { className: "size-4" }), v("webhooks.newWebhook", "New Webhook")]
|
|
260
260
|
})
|
|
261
|
-
}), /* @__PURE__ */
|
|
262
|
-
label:
|
|
261
|
+
}), /* @__PURE__ */ m(Ne, { actions: [{
|
|
262
|
+
label: v("webhooks.refreshTitle", "Refresh webhooks"),
|
|
263
263
|
onSelect: () => void K(),
|
|
264
264
|
disabled: G,
|
|
265
|
-
icon: /* @__PURE__ */
|
|
265
|
+
icon: /* @__PURE__ */ m(De, { className: `size-4 ${G ? "animate-spin" : ""}` })
|
|
266
266
|
}] })]
|
|
267
267
|
})
|
|
268
268
|
}),
|
|
269
|
-
/* @__PURE__ */
|
|
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__ */
|
|
275
|
+
children: [/* @__PURE__ */ h("div", {
|
|
272
276
|
className: "flex items-center gap-2",
|
|
273
|
-
children: [/* @__PURE__ */
|
|
274
|
-
value:
|
|
275
|
-
onChange:
|
|
276
|
-
placeholder:
|
|
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__ */
|
|
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__ */
|
|
284
|
+
children: [/* @__PURE__ */ m("button", {
|
|
281
285
|
type: "button",
|
|
282
|
-
onClick: () =>
|
|
283
|
-
className: `p-1.5 sm:p-2 rounded ${
|
|
284
|
-
title:
|
|
285
|
-
children: /* @__PURE__ */
|
|
286
|
-
}), /* @__PURE__ */
|
|
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: () =>
|
|
289
|
-
className: `p-1.5 sm:p-2 rounded ${
|
|
290
|
-
title:
|
|
291
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
298
|
+
}), /* @__PURE__ */ m("div", {
|
|
295
299
|
className: "flex items-center gap-2 sm:gap-3",
|
|
296
|
-
children: /* @__PURE__ */
|
|
297
|
-
label:
|
|
298
|
-
value:
|
|
299
|
-
options:
|
|
300
|
-
onChange:
|
|
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__ */
|
|
308
|
+
$.withErrors > 0 && /* @__PURE__ */ m("div", {
|
|
305
309
|
className: "flex items-center gap-2",
|
|
306
|
-
children: /* @__PURE__ */
|
|
310
|
+
children: /* @__PURE__ */ h("button", {
|
|
307
311
|
type: "button",
|
|
308
|
-
onClick: () =>
|
|
309
|
-
className: `flex items-center gap-2 px-3 py-1.5 text-sm rounded-full transition-colors ${
|
|
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__ */
|
|
312
|
-
|
|
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
|
-
(
|
|
323
|
+
(y || b !== "all") && /* @__PURE__ */ h("p", {
|
|
320
324
|
className: "text-sm text-text-secondary",
|
|
321
325
|
children: [
|
|
322
|
-
|
|
326
|
+
v("webhooks.showingResults", "Showing"),
|
|
323
327
|
" ",
|
|
324
328
|
J.length,
|
|
325
329
|
" ",
|
|
326
|
-
|
|
330
|
+
v("webhooks.of", "of"),
|
|
327
331
|
" ",
|
|
328
332
|
q.length,
|
|
329
333
|
" ",
|
|
330
|
-
|
|
331
|
-
G && /* @__PURE__ */
|
|
334
|
+
v("nav.webhooks", "webhooks"),
|
|
335
|
+
G && /* @__PURE__ */ h("span", {
|
|
332
336
|
className: "ml-2 text-text-muted",
|
|
333
337
|
children: [
|
|
334
338
|
"(",
|
|
335
|
-
|
|
339
|
+
v("webhooks.refreshing", "refreshing..."),
|
|
336
340
|
")"
|
|
337
341
|
]
|
|
338
342
|
})
|
|
339
343
|
]
|
|
340
344
|
}),
|
|
341
|
-
J.length > 0 && /* @__PURE__ */
|
|
345
|
+
J.length > 0 && /* @__PURE__ */ m("div", {
|
|
342
346
|
className: "rounded-lg border border-border-default bg-bg-surface p-4",
|
|
343
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
349
|
+
children: [/* @__PURE__ */ h("div", {
|
|
346
350
|
className: "flex flex-wrap items-center gap-3",
|
|
347
|
-
children: [/* @__PURE__ */
|
|
351
|
+
children: [/* @__PURE__ */ h("div", {
|
|
348
352
|
className: "flex items-center gap-2",
|
|
349
|
-
children: [/* @__PURE__ */
|
|
350
|
-
checked:
|
|
351
|
-
indeterminate:
|
|
352
|
-
onChange:
|
|
353
|
+
children: [/* @__PURE__ */ m(o, {
|
|
354
|
+
checked: dt,
|
|
355
|
+
indeterminate: ft,
|
|
356
|
+
onChange: bt,
|
|
353
357
|
ariaLabel: "Select all visible webhooks"
|
|
354
|
-
}), /* @__PURE__ */
|
|
358
|
+
}), /* @__PURE__ */ m("span", {
|
|
355
359
|
className: "text-sm font-medium text-text-primary",
|
|
356
360
|
children: "Select all visible"
|
|
357
361
|
})]
|
|
358
|
-
}),
|
|
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__ */
|
|
368
|
+
}), /* @__PURE__ */ h("div", {
|
|
365
369
|
className: "flex flex-wrap items-center gap-2",
|
|
366
370
|
children: [
|
|
367
|
-
/* @__PURE__ */
|
|
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: [
|
|
373
|
+
children: [R.size, " selected"]
|
|
370
374
|
}),
|
|
371
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ h("button", {
|
|
372
376
|
type: "button",
|
|
373
|
-
onClick: () =>
|
|
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__ */
|
|
382
|
+
/* @__PURE__ */ h("button", {
|
|
379
383
|
type: "button",
|
|
380
|
-
onClick: () =>
|
|
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__ */
|
|
389
|
+
/* @__PURE__ */ h("button", {
|
|
386
390
|
type: "button",
|
|
387
|
-
onClick: () =>
|
|
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__ */
|
|
400
|
+
/* @__PURE__ */ m(je, {
|
|
397
401
|
mode: "wait",
|
|
398
|
-
children: G && q.length === 0 ? /* @__PURE__ */
|
|
402
|
+
children: G && q.length === 0 ? /* @__PURE__ */ m(he, {
|
|
399
403
|
variant: "rows",
|
|
400
404
|
count: 6
|
|
401
|
-
}) : J.length > 0 ? /* @__PURE__ */
|
|
402
|
-
className:
|
|
403
|
-
children: J.map((e) => /* @__PURE__ */
|
|
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__ */
|
|
409
|
+
children: /* @__PURE__ */ m(ue, {
|
|
406
410
|
className: "p-4",
|
|
407
|
-
children: /* @__PURE__ */
|
|
411
|
+
children: /* @__PURE__ */ h("div", {
|
|
408
412
|
className: "flex flex-col sm:flex-row sm:items-start justify-between gap-4",
|
|
409
|
-
children: [/* @__PURE__ */
|
|
413
|
+
children: [/* @__PURE__ */ h("div", {
|
|
410
414
|
className: "flex items-start gap-4 flex-1 min-w-0",
|
|
411
415
|
children: [
|
|
412
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ m("div", {
|
|
413
417
|
onClick: (e) => e.stopPropagation(),
|
|
414
|
-
children: /* @__PURE__ */
|
|
415
|
-
checked:
|
|
416
|
-
onChange: (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__ */
|
|
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__ */
|
|
427
|
+
children: /* @__PURE__ */ m(p, { className: "size-5" })
|
|
424
428
|
}),
|
|
425
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ h("div", {
|
|
426
430
|
className: "flex-1 min-w-0",
|
|
427
431
|
children: [
|
|
428
|
-
/* @__PURE__ */
|
|
432
|
+
/* @__PURE__ */ h("div", {
|
|
429
433
|
className: "flex items-center gap-2 flex-wrap",
|
|
430
434
|
children: [
|
|
431
|
-
/* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ m("h3", {
|
|
432
436
|
className: "font-semibold text-text-primary",
|
|
433
437
|
children: e.name
|
|
434
438
|
}),
|
|
435
|
-
/* @__PURE__ */
|
|
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 ?
|
|
441
|
+
children: e.isActive ? v("webhooks.active", "Active") : v("webhooks.inactive", "Inactive")
|
|
438
442
|
}),
|
|
439
|
-
e.lastError && /* @__PURE__ */
|
|
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:
|
|
445
|
+
children: v("webhooks.error", "Error")
|
|
442
446
|
})
|
|
443
447
|
]
|
|
444
448
|
}),
|
|
445
|
-
/* @__PURE__ */
|
|
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__ */
|
|
453
|
+
/* @__PURE__ */ m("div", {
|
|
450
454
|
className: "flex flex-wrap gap-1 mt-2",
|
|
451
|
-
children: e.events.map((e) => /* @__PURE__ */
|
|
452
|
-
className: `px-2 py-0.5 text-xs rounded ${
|
|
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__ */
|
|
460
|
+
e.agentIds.length > 0 && /* @__PURE__ */ h("div", {
|
|
457
461
|
className: "flex items-center gap-1 mt-2",
|
|
458
|
-
children: [/* @__PURE__ */
|
|
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
|
-
|
|
465
|
+
v("webhooks.scopedTo", "Scoped to"),
|
|
462
466
|
" ",
|
|
463
467
|
e.agentIds.length,
|
|
464
468
|
" ",
|
|
465
|
-
|
|
469
|
+
v("webhooks.agent", "agent"),
|
|
466
470
|
e.agentIds.length === 1 ? "" : "s"
|
|
467
471
|
]
|
|
468
472
|
})]
|
|
469
473
|
}),
|
|
470
|
-
e.lastError && /* @__PURE__ */
|
|
474
|
+
e.lastError && /* @__PURE__ */ h("p", {
|
|
471
475
|
className: "text-sm text-status-error-text mt-2",
|
|
472
476
|
children: [
|
|
473
|
-
|
|
477
|
+
v("webhooks.lastError", "Last error"),
|
|
474
478
|
": ",
|
|
475
479
|
e.lastError
|
|
476
480
|
]
|
|
477
481
|
}),
|
|
478
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ h("div", {
|
|
479
483
|
className: "flex items-center gap-4 mt-3 text-xs text-text-secondary flex-wrap",
|
|
480
|
-
children: [/* @__PURE__ */
|
|
481
|
-
|
|
484
|
+
children: [/* @__PURE__ */ h("span", { children: [
|
|
485
|
+
v("webhooks.lastDelivery", "Last delivery"),
|
|
482
486
|
":",
|
|
483
487
|
" ",
|
|
484
|
-
|
|
485
|
-
] }), /* @__PURE__ */
|
|
488
|
+
Ct(e.lastDelivery)
|
|
489
|
+
] }), /* @__PURE__ */ h("span", { children: [
|
|
486
490
|
e.deliveryCount,
|
|
487
491
|
" ",
|
|
488
|
-
|
|
492
|
+
v("webhooks.deliveries", "deliveries"),
|
|
489
493
|
",",
|
|
490
494
|
" ",
|
|
491
495
|
e.failureCount,
|
|
492
496
|
" ",
|
|
493
|
-
|
|
497
|
+
v("webhooks.failures", "failures")
|
|
494
498
|
] })]
|
|
495
499
|
})
|
|
496
500
|
]
|
|
497
501
|
})
|
|
498
502
|
]
|
|
499
|
-
}), /* @__PURE__ */
|
|
503
|
+
}), /* @__PURE__ */ h("div", {
|
|
500
504
|
className: "flex items-center gap-2 flex-shrink-0",
|
|
501
505
|
children: [
|
|
502
|
-
/* @__PURE__ */
|
|
506
|
+
/* @__PURE__ */ h("button", {
|
|
503
507
|
type: "button",
|
|
504
|
-
onClick: () =>
|
|
505
|
-
disabled:
|
|
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: [
|
|
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__ */
|
|
513
|
+
/* @__PURE__ */ m("button", {
|
|
510
514
|
type: "button",
|
|
511
|
-
onClick: () =>
|
|
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 ?
|
|
514
|
-
children: e.isActive ? /* @__PURE__ */
|
|
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__ */
|
|
520
|
+
/* @__PURE__ */ m("button", {
|
|
517
521
|
type: "button",
|
|
518
522
|
onClick: () => {
|
|
519
|
-
|
|
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:
|
|
523
|
-
children: /* @__PURE__ */
|
|
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-${
|
|
531
|
-
icon: /* @__PURE__ */
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
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: [
|
|
541
|
+
children: [Ge && /* @__PURE__ */ h("button", {
|
|
537
542
|
type: "button",
|
|
538
|
-
onClick:
|
|
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
|
|
541
|
-
}), /* @__PURE__ */
|
|
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
|
-
|
|
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__ */
|
|
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__ */
|
|
558
|
+
/* @__PURE__ */ m("h2", {
|
|
554
559
|
id: "create-webhook-title",
|
|
555
560
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
556
|
-
children:
|
|
561
|
+
children: v("webhooks.newWebhook", "New Webhook")
|
|
557
562
|
}),
|
|
558
|
-
|
|
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:
|
|
565
|
+
children: Ze
|
|
561
566
|
}),
|
|
562
|
-
/* @__PURE__ */
|
|
567
|
+
/* @__PURE__ */ h("div", {
|
|
563
568
|
className: "space-y-4",
|
|
564
569
|
children: [
|
|
565
|
-
/* @__PURE__ */
|
|
570
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
566
571
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
567
|
-
children:
|
|
568
|
-
}), /* @__PURE__ */
|
|
572
|
+
children: v("webhooks.name", "Name")
|
|
573
|
+
}), /* @__PURE__ */ m("input", {
|
|
569
574
|
"aria-label": "control",
|
|
570
|
-
ref:
|
|
575
|
+
ref: et,
|
|
571
576
|
type: "text",
|
|
572
|
-
placeholder:
|
|
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__ */
|
|
580
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
576
581
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
577
|
-
children:
|
|
578
|
-
}), /* @__PURE__ */
|
|
582
|
+
children: v("webhooks.url", "URL")
|
|
583
|
+
}), /* @__PURE__ */ m("input", {
|
|
579
584
|
"aria-label": "control",
|
|
580
|
-
ref:
|
|
585
|
+
ref: tt,
|
|
581
586
|
type: "url",
|
|
582
|
-
placeholder:
|
|
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__ */
|
|
590
|
+
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
|
|
586
591
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
587
|
-
children:
|
|
588
|
-
}), /* @__PURE__ */
|
|
592
|
+
children: v("webhooks.secret", "Secret")
|
|
593
|
+
}), /* @__PURE__ */ m("input", {
|
|
589
594
|
"aria-label": "control",
|
|
590
|
-
ref:
|
|
595
|
+
ref: nt,
|
|
591
596
|
type: "password",
|
|
592
|
-
placeholder:
|
|
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__ */
|
|
596
|
-
/* @__PURE__ */
|
|
600
|
+
/* @__PURE__ */ h("div", { children: [
|
|
601
|
+
/* @__PURE__ */ m("label", {
|
|
597
602
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
598
|
-
children:
|
|
603
|
+
children: v("webhooks.events", "Events")
|
|
599
604
|
}),
|
|
600
|
-
/* @__PURE__ */
|
|
605
|
+
/* @__PURE__ */ m("div", {
|
|
601
606
|
className: "space-y-2 max-h-40 overflow-y-auto",
|
|
602
|
-
children:
|
|
607
|
+
children: ge.map((e) => /* @__PURE__ */ h("label", {
|
|
603
608
|
className: "flex items-center gap-2",
|
|
604
|
-
children: [/* @__PURE__ */
|
|
609
|
+
children: [/* @__PURE__ */ m("input", {
|
|
605
610
|
"aria-label": "control",
|
|
606
611
|
type: "checkbox",
|
|
607
|
-
checked:
|
|
608
|
-
onChange: () =>
|
|
612
|
+
checked: A.includes(e),
|
|
613
|
+
onChange: () => mt(e),
|
|
609
614
|
className: "size-4 rounded border-border-default"
|
|
610
|
-
}), /* @__PURE__ */
|
|
615
|
+
}), /* @__PURE__ */ m("span", {
|
|
611
616
|
className: "text-sm text-text-primary",
|
|
612
617
|
children: e
|
|
613
618
|
})]
|
|
614
619
|
}, e))
|
|
615
620
|
}),
|
|
616
|
-
|
|
621
|
+
A.filter(c).length > 0 && /* @__PURE__ */ m("div", {
|
|
617
622
|
className: "flex flex-wrap gap-1 mt-2",
|
|
618
|
-
children:
|
|
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__ */
|
|
625
|
+
children: [e, /* @__PURE__ */ m("button", {
|
|
621
626
|
type: "button",
|
|
622
|
-
onClick: () =>
|
|
627
|
+
onClick: () => j((t) => t.filter((t) => t !== e)),
|
|
623
628
|
className: "hover:text-status-error-text",
|
|
624
|
-
children: /* @__PURE__ */
|
|
629
|
+
children: /* @__PURE__ */ m(ke, { className: "size-3" })
|
|
625
630
|
})]
|
|
626
631
|
}, e))
|
|
627
632
|
}),
|
|
628
|
-
/* @__PURE__ */
|
|
633
|
+
/* @__PURE__ */ h("div", {
|
|
629
634
|
className: "flex items-center gap-2 mt-2",
|
|
630
|
-
children: [/* @__PURE__ */
|
|
635
|
+
children: [/* @__PURE__ */ m("input", {
|
|
631
636
|
"aria-label": "control",
|
|
632
637
|
type: "text",
|
|
633
|
-
value:
|
|
634
|
-
onChange: (e) =>
|
|
635
|
-
placeholder:
|
|
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 =
|
|
641
|
-
/^[a-z][a-z0-9_-]*:[a-z][a-z0-9_.-]*$/.test(t) && !
|
|
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__ */
|
|
649
|
+
}), /* @__PURE__ */ m("button", {
|
|
645
650
|
type: "button",
|
|
646
651
|
onClick: () => {
|
|
647
|
-
let e =
|
|
648
|
-
/^[a-z][a-z0-9_-]*:[a-z][a-z0-9_.-]*$/.test(e) && !
|
|
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
|
|
656
|
+
children: /* @__PURE__ */ m(f, { className: "size-4" })
|
|
652
657
|
})]
|
|
653
658
|
}),
|
|
654
|
-
/* @__PURE__ */
|
|
659
|
+
/* @__PURE__ */ m("p", {
|
|
655
660
|
className: "text-xs text-text-muted mt-1",
|
|
656
|
-
children:
|
|
661
|
+
children: v("webhooks.customEventHint", "Add custom events using namespace:event format (e.g., deploy:started)")
|
|
657
662
|
})
|
|
658
663
|
] }),
|
|
659
|
-
/* @__PURE__ */
|
|
660
|
-
/* @__PURE__ */
|
|
664
|
+
/* @__PURE__ */ h("div", { children: [
|
|
665
|
+
/* @__PURE__ */ m("label", {
|
|
661
666
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
662
|
-
children:
|
|
667
|
+
children: v("webhooks.signingKey", "Signing Key")
|
|
663
668
|
}),
|
|
664
|
-
/* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ h("div", {
|
|
665
670
|
className: "relative",
|
|
666
|
-
children: [/* @__PURE__ */
|
|
671
|
+
children: [/* @__PURE__ */ m("input", {
|
|
667
672
|
"aria-label": "control",
|
|
668
|
-
ref:
|
|
669
|
-
type:
|
|
670
|
-
placeholder:
|
|
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__ */
|
|
677
|
+
}), /* @__PURE__ */ m("button", {
|
|
673
678
|
type: "button",
|
|
674
|
-
onClick: () =>
|
|
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:
|
|
681
|
+
children: m(P ? Ce : Se, { className: "size-4 text-text-secondary" })
|
|
677
682
|
})]
|
|
678
683
|
}),
|
|
679
|
-
/* @__PURE__ */
|
|
684
|
+
/* @__PURE__ */ m("p", {
|
|
680
685
|
className: "text-xs text-text-muted mt-1",
|
|
681
|
-
children:
|
|
686
|
+
children: v("webhooks.signingKeyHint", "Used to sign payloads with HMAC-SHA256. Header: X-Webhook-Signature")
|
|
682
687
|
})
|
|
683
688
|
] }),
|
|
684
|
-
|
|
685
|
-
/* @__PURE__ */
|
|
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:
|
|
692
|
+
children: v("webhooks.agentScope", "Agent Scope")
|
|
688
693
|
}),
|
|
689
|
-
/* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ m("p", {
|
|
690
695
|
className: "text-xs text-text-muted mb-2",
|
|
691
|
-
children:
|
|
696
|
+
children: v("webhooks.agentScopeHint", "Only fire for events from selected agents. Leave empty for all agents.")
|
|
692
697
|
}),
|
|
693
|
-
/* @__PURE__ */
|
|
698
|
+
/* @__PURE__ */ m("div", {
|
|
694
699
|
className: "space-y-2 max-h-32 overflow-y-auto",
|
|
695
|
-
children:
|
|
700
|
+
children: ct.map((e) => /* @__PURE__ */ h("label", {
|
|
696
701
|
className: "flex items-center gap-2",
|
|
697
702
|
children: [
|
|
698
|
-
/* @__PURE__ */
|
|
703
|
+
/* @__PURE__ */ m("input", {
|
|
699
704
|
"aria-label": "control",
|
|
700
705
|
type: "checkbox",
|
|
701
|
-
checked:
|
|
702
|
-
onChange: () =>
|
|
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__ */
|
|
706
|
-
/* @__PURE__ */
|
|
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__ */
|
|
721
|
+
/* @__PURE__ */ h("div", {
|
|
717
722
|
className: "flex flex-col-reverse sm:flex-row justify-end gap-3 mt-6",
|
|
718
|
-
children: [/* @__PURE__ */
|
|
723
|
+
children: [/* @__PURE__ */ m("button", {
|
|
719
724
|
type: "button",
|
|
720
|
-
onClick: () =>
|
|
721
|
-
disabled:
|
|
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:
|
|
724
|
-
}), /* @__PURE__ */
|
|
728
|
+
children: v("common.cancel", "Cancel")
|
|
729
|
+
}), /* @__PURE__ */ m("button", {
|
|
725
730
|
type: "button",
|
|
726
|
-
onClick:
|
|
727
|
-
disabled:
|
|
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:
|
|
734
|
+
children: E ? v("webhooks.creating", "Creating...") : v("webhooks.createWebhook", "Create Webhook")
|
|
730
735
|
})]
|
|
731
736
|
})
|
|
732
737
|
]
|
|
733
738
|
})
|
|
734
739
|
}),
|
|
735
|
-
/* @__PURE__ */
|
|
736
|
-
isOpen:
|
|
737
|
-
onClose: () =>
|
|
738
|
-
onConfirm: () =>
|
|
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__ */
|
|
745
|
-
isOpen:
|
|
746
|
-
onClose: () =>
|
|
747
|
-
onConfirm: () =>
|
|
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__ */
|
|
754
|
-
isOpen:
|
|
755
|
-
onClose: () =>
|
|
756
|
-
onConfirm:
|
|
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__ */
|
|
763
|
-
isOpen:
|
|
764
|
-
onClose: () =>
|
|
767
|
+
/* @__PURE__ */ m(ee, {
|
|
768
|
+
isOpen: H !== null,
|
|
769
|
+
onClose: () => U(null),
|
|
765
770
|
onConfirm: () => {
|
|
766
|
-
|
|
771
|
+
U(null), Be("/billing/plans");
|
|
767
772
|
},
|
|
768
|
-
title:
|
|
769
|
-
message:
|
|
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 {
|
|
780
|
+
export { Be as WebhooksPage };
|
|
776
781
|
|
|
777
782
|
//# sourceMappingURL=WebhooksPage.js.map
|