@burdenoff/microfe-vibecontrols 2026.1021.1 → 2026.1022.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/docs/DocsTabPanel.js +63 -63
- package/dist/components/shared/PluginGate.js +76 -76
- package/dist/index.js +4 -3
- package/dist/pages/AgentDetailsPage.js +497 -497
- package/dist/pages/AgentsPage.js +181 -181
- package/dist/pages/CatalogPage.js +99 -99
- package/dist/pages/ComponentDetailPage.js +200 -200
- package/dist/pages/ComponentsPage.js +139 -139
- package/dist/pages/PluginDetailPage.js +64 -64
- package/dist/pages/PluginsCatalogPage.js +119 -119
- package/dist/pages/SessionDetailsPage.js +460 -460
- package/dist/pages/SessionsPage.js +980 -980
- package/dist/pages/TargetsPage.js +571 -571
- package/dist/pages/TemplateDetailPage.js +168 -168
- package/dist/pages/VibeDeckPage.js +236 -236
- package/dist/pages/VibesPage.js +247 -247
- package/dist/pages/WebhooksPage.js +329 -329
- package/dist/providers/QuotaExhaustedProvider.js +24 -24
- package/dist/providers/VibeControlsProvider.js +25 -25
- package/dist/switchRedirectRules.js +14 -0
- package/package.json +4 -1
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { useCompileDocsSiteMutation as e, useCreateDocsPageMutation as t, useCreateDocsSiteMutation as n, useDeleteDocsPageMutation as r, useDeleteDocsSiteMutation as ee, useDocsContentQuery as te, useGenerateDocsSignedUrlMutation as ne, useGetDocsRevisionLazyQuery as re, useGetDocsSiteQuery as
|
|
1
|
+
import { useCompileDocsSiteMutation as e, useCreateDocsPageMutation as t, useCreateDocsSiteMutation as n, useDeleteDocsPageMutation as r, useDeleteDocsSiteMutation as ee, useDocsContentQuery as te, useGenerateDocsSignedUrlMutation as ne, useGetDocsRevisionLazyQuery as re, useGetDocsSiteQuery as ie, useRollbackDocsRevisionMutation as i, useUpdateDocsPageMutation as ae, useUpdateDocsSiteMutation as oe, useUpdateDocsSiteVisibilityMutation as se } from "../../generated/wspace-operations.js";
|
|
2
2
|
import { useTr as ce } from "../../shared/hooks/useTr.js";
|
|
3
3
|
import { QuotaExhaustedDialog as a } from "../shared/QuotaExhaustedDialog.js";
|
|
4
4
|
import { getQuotaDialogContent as o, isQuotaExhaustedError as s, markQuotaHandledLocally as c } from "../../utils/quotaUtils.js";
|
|
5
|
-
import { useVibeNavigate as le } from "../../providers/VibeControlsProvider.js";
|
|
5
|
+
import { BILLING_PLANS_ROUTE as l, useVibeNavigate as le } from "../../providers/VibeControlsProvider.js";
|
|
6
6
|
import { LoadingState as ue } from "../shared/LoadingState.js";
|
|
7
|
-
import { ErrorState as
|
|
7
|
+
import { ErrorState as u } from "../shared/ErrorState.js";
|
|
8
8
|
import "../shared/index.js";
|
|
9
|
-
import { VIBE_PERMISSIONS as
|
|
10
|
-
import { EntityShareButton as
|
|
9
|
+
import { VIBE_PERMISSIONS as d } from "../../constants/permissions.js";
|
|
10
|
+
import { EntityShareButton as f } from "../sharing/EntityShareButton.js";
|
|
11
11
|
import "../sharing/index.js";
|
|
12
|
-
import { DocsEmptyState as
|
|
13
|
-
import { DocsPreviewPanel as
|
|
14
|
-
import { DocsEditPanel as
|
|
15
|
-
import { useEffect as
|
|
16
|
-
import { AlertCircle as
|
|
17
|
-
import { usePermissions as
|
|
12
|
+
import { DocsEmptyState as p } from "./DocsEmptyState.js";
|
|
13
|
+
import { DocsPreviewPanel as m } from "./DocsPreviewPanel.js";
|
|
14
|
+
import { DocsEditPanel as h } from "./DocsEditPanel.js";
|
|
15
|
+
import { useEffect as g, useRef as de, useState as _ } from "react";
|
|
16
|
+
import { AlertCircle as fe, X as pe } from "lucide-react";
|
|
17
|
+
import { usePermissions as me } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
18
18
|
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
19
|
-
import { resolveGatewayUrls as
|
|
19
|
+
import { resolveGatewayUrls as he } from "@burdenoff/fe-libs/shared/config";
|
|
20
20
|
//#region src/components/docs/DocsTabPanel.tsx
|
|
21
|
-
function x({ vibeId: x, ownerType:
|
|
22
|
-
let S = ce(), { hasPermission: C, permissions: w } =
|
|
21
|
+
function x({ vibeId: x, ownerType: ge, ownerId: _e }) {
|
|
22
|
+
let S = ce(), { hasPermission: C, permissions: w } = me(), T = C(d.DOCS_SITE_DELETE), ve = (Array.isArray(w) ? w : w?.permissionStrings)?.some?.((e) => e.startsWith("docs_page:")) ? C(d.DOCS_PAGE_DELETE) : T, E = ge || "VIBE", D = _e || x || "", [O, k] = _("preview"), [A, j] = _(null), [M, N] = _(!1), [P, F] = _(null), [I, L] = _(""), [ye, R] = _(null), z = le(), [B, V] = _(!1), [be, H] = _(!1), { data: xe, loading: Se, error: U, refetch: W } = ie({
|
|
23
23
|
variables: {
|
|
24
24
|
ownerType: E,
|
|
25
25
|
ownerId: D
|
|
26
26
|
},
|
|
27
27
|
skip: !D,
|
|
28
28
|
fetchPolicy: "cache-and-network"
|
|
29
|
-
}), G =
|
|
29
|
+
}), G = xe?.vibecontrolsDocsSiteByOwner ?? null, K = G?.pages || [], { data: Ce, loading: we, refetch: Te } = te({
|
|
30
30
|
variables: {
|
|
31
31
|
siteId: G?.id || "",
|
|
32
32
|
path: I
|
|
33
33
|
},
|
|
34
34
|
skip: !G?.id || !G.currentRevisionId,
|
|
35
35
|
fetchPolicy: "network-only"
|
|
36
|
-
}),
|
|
37
|
-
|
|
36
|
+
}), Ee = Ce?.docsContent?.html ?? null, q = de(void 0);
|
|
37
|
+
g(() => {
|
|
38
38
|
let e = G?.currentRevisionId ?? null;
|
|
39
39
|
if (q.current === void 0) {
|
|
40
40
|
q.current = e;
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
|
-
e && e !== q.current && (q.current = e,
|
|
43
|
+
e && e !== q.current && (q.current = e, Te());
|
|
44
44
|
}, [G?.currentRevisionId]);
|
|
45
|
-
let
|
|
45
|
+
let De = he(), Oe = G?.workspaceId ? `${De.workspaceBaseUrl}/workspaces/static/${G.workspaceId}/docs/${D}/` : null, [ke, { loading: Ae }] = n(), [je] = oe(), [Me] = se(), [Ne, { loading: Pe }] = t(), [Fe] = ae(), [Ie] = r(), [Le] = e(), [Re] = ne(), [ze] = i(), [J] = ee(), [Be] = re({ fetchPolicy: "network-only" }), Ve = async (e = "DOCUSAURUS") => {
|
|
46
46
|
try {
|
|
47
|
-
await
|
|
47
|
+
await ke({
|
|
48
48
|
variables: { input: {
|
|
49
49
|
ownerType: E,
|
|
50
50
|
ownerId: D,
|
|
@@ -61,18 +61,18 @@ function x({ vibeId: x, ownerType: he, ownerId: ge }) {
|
|
|
61
61
|
}
|
|
62
62
|
throw e;
|
|
63
63
|
}
|
|
64
|
-
},
|
|
65
|
-
await
|
|
64
|
+
}, He = async (e, t) => {
|
|
65
|
+
await Fe({
|
|
66
66
|
variables: {
|
|
67
67
|
id: e,
|
|
68
68
|
input: t
|
|
69
69
|
},
|
|
70
70
|
context: { autoRefreshAfterMutation: !1 }
|
|
71
71
|
});
|
|
72
|
-
},
|
|
72
|
+
}, Ue = async (e, t) => {
|
|
73
73
|
if (!G) return;
|
|
74
74
|
let n = K.length, r = `page-${n + 1}`;
|
|
75
|
-
await
|
|
75
|
+
await Ne({ variables: { input: {
|
|
76
76
|
siteId: G.id,
|
|
77
77
|
parentId: e || null,
|
|
78
78
|
slug: r,
|
|
@@ -82,13 +82,13 @@ function x({ vibeId: x, ownerType: he, ownerId: ge }) {
|
|
|
82
82
|
sidebarPosition: n,
|
|
83
83
|
category: t || null
|
|
84
84
|
} } }), await W();
|
|
85
|
-
},
|
|
86
|
-
confirm("Delete this page?") && (await
|
|
85
|
+
}, We = async (e) => {
|
|
86
|
+
confirm("Delete this page?") && (await Ie({ variables: { id: e } }), await W());
|
|
87
87
|
}, Y = async () => {
|
|
88
88
|
if (G) {
|
|
89
89
|
N(!0), F(null);
|
|
90
90
|
try {
|
|
91
|
-
let e = await
|
|
91
|
+
let e = await Le({ variables: {
|
|
92
92
|
siteId: G.id,
|
|
93
93
|
publish: !0
|
|
94
94
|
} });
|
|
@@ -106,15 +106,15 @@ function x({ vibeId: x, ownerType: he, ownerId: ge }) {
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
}, X = async (e) => {
|
|
109
|
-
let { data: t } = await
|
|
109
|
+
let { data: t } = await Be({ variables: { id: e } }), n = t?.docsRevision;
|
|
110
110
|
return n && (j(n), [
|
|
111
111
|
"SUCCEEDED",
|
|
112
112
|
"PUBLISHED",
|
|
113
113
|
"FAILED"
|
|
114
114
|
].includes(n.status) && (N(!1), (n.status === "PUBLISHED" || n.status === "SUCCEEDED") && (L(""), await W()))), n;
|
|
115
|
-
},
|
|
115
|
+
}, Ge = async (e) => {
|
|
116
116
|
if (!G) return;
|
|
117
|
-
e.visibility && e.visibility !== G.visibility && await
|
|
117
|
+
e.visibility && e.visibility !== G.visibility && await Me({ variables: {
|
|
118
118
|
id: G.id,
|
|
119
119
|
visibility: e.visibility
|
|
120
120
|
} });
|
|
@@ -123,23 +123,23 @@ function x({ vibeId: x, ownerType: he, ownerId: ge }) {
|
|
|
123
123
|
provider: e.provider,
|
|
124
124
|
providerConfig: e.providerConfig
|
|
125
125
|
};
|
|
126
|
-
Object.keys(t).length > 0 && await
|
|
126
|
+
Object.keys(t).length > 0 && await je({ variables: {
|
|
127
127
|
id: G.id,
|
|
128
128
|
input: t
|
|
129
129
|
} }), await W();
|
|
130
|
-
},
|
|
130
|
+
}, Ke = async () => {
|
|
131
131
|
if (!G?.currentRevisionId) return null;
|
|
132
132
|
try {
|
|
133
|
-
let { data: e } = await
|
|
133
|
+
let { data: e } = await Re({ variables: { siteId: G.id } });
|
|
134
134
|
return e?.generateDocsSignedUrl?.url ?? null;
|
|
135
135
|
} catch {
|
|
136
136
|
return null;
|
|
137
137
|
}
|
|
138
|
-
},
|
|
138
|
+
}, qe = async (e) => {
|
|
139
139
|
if (G && confirm("Roll back to this revision? The current published docs will be replaced.")) {
|
|
140
140
|
R(e);
|
|
141
141
|
try {
|
|
142
|
-
await
|
|
142
|
+
await ze({ variables: {
|
|
143
143
|
siteId: G.id,
|
|
144
144
|
revisionId: e
|
|
145
145
|
} }), await W();
|
|
@@ -147,23 +147,23 @@ function x({ vibeId: x, ownerType: he, ownerId: ge }) {
|
|
|
147
147
|
R(null);
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
},
|
|
151
|
-
G && confirm("Delete this docs site and all its pages and revisions? This cannot be undone.") && (await
|
|
150
|
+
}, Je = async () => {
|
|
151
|
+
G && confirm("Delete this docs site and all its pages and revisions? This cannot be undone.") && (await J({ variables: { id: G.id } }), await W());
|
|
152
152
|
};
|
|
153
|
-
if (
|
|
154
|
-
if (U && !G) return /* @__PURE__ */ y(
|
|
153
|
+
if (Se && !G) return /* @__PURE__ */ y(ue, { message: S("vibecontrols.docs.tab.loading", "Loading documentation...") });
|
|
154
|
+
if (U && !G) return /* @__PURE__ */ y(u, {
|
|
155
155
|
title: S("vibecontrols.docs.tab.loadFailed", "Failed to load docs"),
|
|
156
156
|
message: U.message,
|
|
157
157
|
onRetry: () => W()
|
|
158
158
|
});
|
|
159
|
-
if (!G) return /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(
|
|
160
|
-
onCreate:
|
|
161
|
-
loading:
|
|
159
|
+
if (!G) return /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(p, {
|
|
160
|
+
onCreate: Ve,
|
|
161
|
+
loading: Ae
|
|
162
162
|
}), /* @__PURE__ */ y(a, {
|
|
163
163
|
isOpen: B,
|
|
164
164
|
onClose: () => V(!1),
|
|
165
165
|
onConfirm: () => {
|
|
166
|
-
V(!1), z(
|
|
166
|
+
V(!1), z(l);
|
|
167
167
|
},
|
|
168
168
|
title: "Docs Site Quota Reached",
|
|
169
169
|
message: "You have reached the documentation site limit for your current plan. Upgrade to create more docs sites."
|
|
@@ -171,7 +171,7 @@ function x({ vibeId: x, ownerType: he, ownerId: ge }) {
|
|
|
171
171
|
let Z = P ? /* @__PURE__ */ b("div", {
|
|
172
172
|
className: "flex items-center gap-2 px-4 py-2 mb-2 bg-status-error-bg-subtle text-status-error-text text-sm rounded-md",
|
|
173
173
|
children: [
|
|
174
|
-
/* @__PURE__ */ y(
|
|
174
|
+
/* @__PURE__ */ y(fe, { className: "size-4 shrink-0" }),
|
|
175
175
|
/* @__PURE__ */ y("span", {
|
|
176
176
|
className: "flex-1",
|
|
177
177
|
children: P
|
|
@@ -180,18 +180,18 @@ function x({ vibeId: x, ownerType: he, ownerId: ge }) {
|
|
|
180
180
|
type: "button",
|
|
181
181
|
onClick: () => F(null),
|
|
182
182
|
className: "p-0.5 hover:opacity-70",
|
|
183
|
-
children: /* @__PURE__ */ y(
|
|
183
|
+
children: /* @__PURE__ */ y(pe, { className: "size-3.5" })
|
|
184
184
|
})
|
|
185
185
|
]
|
|
186
186
|
}) : null, Q = /* @__PURE__ */ y(a, {
|
|
187
|
-
isOpen:
|
|
187
|
+
isOpen: be,
|
|
188
188
|
onClose: () => H(!1),
|
|
189
189
|
onConfirm: () => {
|
|
190
|
-
H(!1), z(
|
|
190
|
+
H(!1), z(l);
|
|
191
191
|
},
|
|
192
192
|
title: o("docs-compilation").title,
|
|
193
193
|
message: o("docs-compilation").message
|
|
194
|
-
}), $ = /* @__PURE__ */ y(
|
|
194
|
+
}), $ = /* @__PURE__ */ y(f, {
|
|
195
195
|
entity: "docs",
|
|
196
196
|
resource: {
|
|
197
197
|
id: G.id,
|
|
@@ -207,20 +207,20 @@ function x({ vibeId: x, ownerType: he, ownerId: ge }) {
|
|
|
207
207
|
return O === "edit" ? /* @__PURE__ */ b(v, { children: [
|
|
208
208
|
Z,
|
|
209
209
|
Q,
|
|
210
|
-
/* @__PURE__ */ y(
|
|
210
|
+
/* @__PURE__ */ y(h, {
|
|
211
211
|
site: G,
|
|
212
212
|
pages: K,
|
|
213
213
|
shareSlot: $,
|
|
214
214
|
onBack: () => k("preview"),
|
|
215
|
-
onSavePage:
|
|
216
|
-
onAddPage:
|
|
217
|
-
pageAdding:
|
|
218
|
-
onDeletePage:
|
|
215
|
+
onSavePage: He,
|
|
216
|
+
onAddPage: Ue,
|
|
217
|
+
pageAdding: Pe,
|
|
218
|
+
onDeletePage: ve ? We : void 0,
|
|
219
219
|
onCompile: Y,
|
|
220
|
-
onSaveSettings:
|
|
221
|
-
onRollback:
|
|
222
|
-
onDeleteSite: T ?
|
|
223
|
-
rollingBack:
|
|
220
|
+
onSaveSettings: Ge,
|
|
221
|
+
onRollback: qe,
|
|
222
|
+
onDeleteSite: T ? Je : void 0,
|
|
223
|
+
rollingBack: ye,
|
|
224
224
|
compileRevision: A,
|
|
225
225
|
onPollRevision: X,
|
|
226
226
|
compiling: M
|
|
@@ -228,19 +228,19 @@ function x({ vibeId: x, ownerType: he, ownerId: ge }) {
|
|
|
228
228
|
] }) : /* @__PURE__ */ b(v, { children: [
|
|
229
229
|
Z,
|
|
230
230
|
Q,
|
|
231
|
-
/* @__PURE__ */ y(
|
|
231
|
+
/* @__PURE__ */ y(m, {
|
|
232
232
|
site: G,
|
|
233
233
|
pages: K,
|
|
234
234
|
shareSlot: $,
|
|
235
235
|
selectedPageSlug: I,
|
|
236
236
|
onSelectPage: L,
|
|
237
|
-
docsBaseUrl: G.currentRevisionId ?
|
|
238
|
-
docsHtml: G.currentRevisionId ?
|
|
239
|
-
docsContentLoading:
|
|
237
|
+
docsBaseUrl: G.currentRevisionId ? Oe ?? null : null,
|
|
238
|
+
docsHtml: G.currentRevisionId ? Ee : null,
|
|
239
|
+
docsContentLoading: we,
|
|
240
240
|
onEdit: () => k("edit"),
|
|
241
241
|
onCompile: Y,
|
|
242
242
|
onSettings: () => k("edit"),
|
|
243
|
-
onGetShareUrl:
|
|
243
|
+
onGetShareUrl: Ke,
|
|
244
244
|
onOpenFullScreen: () => {
|
|
245
245
|
z(`/${{
|
|
246
246
|
VIBE: "vibes",
|
|
@@ -256,7 +256,7 @@ function x({ vibeId: x, ownerType: he, ownerId: ge }) {
|
|
|
256
256
|
isOpen: B,
|
|
257
257
|
onClose: () => V(!1),
|
|
258
258
|
onConfirm: () => {
|
|
259
|
-
V(!1), z(
|
|
259
|
+
V(!1), z(l);
|
|
260
260
|
},
|
|
261
261
|
title: "Docs Site Quota Reached",
|
|
262
262
|
message: "You have reached the documentation site limit for your current plan. Upgrade to create more docs sites."
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { QuotaExhaustedDialog as e } from "./QuotaExhaustedDialog.js";
|
|
2
|
-
import {
|
|
3
|
-
import { usePluginAvailability as
|
|
4
|
-
import { getPluginMeta as
|
|
5
|
-
import { useCallback as
|
|
6
|
-
import { AlertCircle as
|
|
7
|
-
import { Fragment as
|
|
2
|
+
import { BILLING_PLANS_ROUTE as t, useVibeNavigate as n } from "../../providers/VibeControlsProvider.js";
|
|
3
|
+
import { usePluginAvailability as r } from "../../hooks/usePluginAvailability.js";
|
|
4
|
+
import { getPluginMeta as i } from "../../constants/pluginCatalog.js";
|
|
5
|
+
import { useCallback as a, useEffect as o, useMemo as s, useRef as c } from "react";
|
|
6
|
+
import { AlertCircle as l, Clock as u, Download as d, Loader2 as f, Puzzle as p, RefreshCw as m, Server as h } from "lucide-react";
|
|
7
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/shared/PluginGate.tsx
|
|
9
|
-
function
|
|
9
|
+
function y(e) {
|
|
10
10
|
return e.requirements && e.requirements.length > 0 ? e.requirements.map((e) => ({
|
|
11
11
|
packages: e.packages,
|
|
12
12
|
mode: e.mode ?? "all",
|
|
@@ -21,56 +21,56 @@ function v(e) {
|
|
|
21
21
|
description: e.description
|
|
22
22
|
}] : [];
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
let { agentId:
|
|
24
|
+
function b(b) {
|
|
25
|
+
let { agentId: x, compact: S = !1, onInstalled: C, children: w } = b, T = s(() => y(b), [b]), { loading: E, initialLoading: D, installed: O, installing: k, install: A, error: j, errorIsAgentState: M, quotaExhausted: N, clearQuotaExhausted: P, refetch: F } = r(s(() => {
|
|
26
26
|
let e = /* @__PURE__ */ new Set();
|
|
27
|
-
for (let t of
|
|
27
|
+
for (let t of T) for (let n of t.packages) e.add(n);
|
|
28
28
|
return [...e];
|
|
29
|
-
}, [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}, [
|
|
33
|
-
let
|
|
34
|
-
await
|
|
35
|
-
}, [
|
|
36
|
-
return
|
|
37
|
-
className: `rounded-lg border border-border-default bg-bg-surface ${
|
|
29
|
+
}, [T]), x), I = n(), L = s(() => T.map((e) => e.mode === "any" ? e.packages.some((e) => !!O[e]) : e.packages.every((e) => !!O[e])), [T, O]), R = T.length > 0 && L.every(Boolean), z = c(R);
|
|
30
|
+
o(() => {
|
|
31
|
+
R && !z.current && C?.(), z.current = R;
|
|
32
|
+
}, [R, C]);
|
|
33
|
+
let B = a(async (e) => {
|
|
34
|
+
await A(e);
|
|
35
|
+
}, [A]);
|
|
36
|
+
return x ? R ? /* @__PURE__ */ _(g, { children: w }) : D ? /* @__PURE__ */ _("div", {
|
|
37
|
+
className: `rounded-lg border border-border-default bg-bg-surface ${S ? "p-4" : "p-6"}`,
|
|
38
38
|
"data-testid": "plugin-gate-initial-loading",
|
|
39
|
-
children: /* @__PURE__ */
|
|
39
|
+
children: /* @__PURE__ */ v("div", {
|
|
40
40
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
41
|
-
children: [/* @__PURE__ */
|
|
41
|
+
children: [/* @__PURE__ */ _(f, { className: "size-4 animate-spin" }), "Checking plugin availability on the agent…"]
|
|
42
42
|
})
|
|
43
|
-
}) :
|
|
44
|
-
className: `rounded-lg border border-border-default bg-bg-surface ${
|
|
45
|
-
children: /* @__PURE__ */
|
|
43
|
+
}) : M ? /* @__PURE__ */ _("div", {
|
|
44
|
+
className: `rounded-lg border border-border-default bg-bg-surface ${S ? "p-4" : "p-6"}`,
|
|
45
|
+
children: /* @__PURE__ */ v("div", {
|
|
46
46
|
className: "flex items-start gap-3",
|
|
47
|
-
children: [/* @__PURE__ */
|
|
47
|
+
children: [/* @__PURE__ */ _(u, { className: "size-5 text-status-warning-text shrink-0 mt-0.5" }), /* @__PURE__ */ v("div", {
|
|
48
48
|
className: "flex-1 min-w-0 space-y-2",
|
|
49
49
|
children: [
|
|
50
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ _("p", {
|
|
51
51
|
className: "text-sm font-semibold text-text-primary",
|
|
52
52
|
children: "Agent is not ready yet"
|
|
53
53
|
}),
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ _("p", {
|
|
55
55
|
className: "text-sm text-text-secondary",
|
|
56
56
|
children: "Your agent is still starting up or waiting for gateway credentials. Plugin install is only available once the agent reaches the ready state."
|
|
57
57
|
}),
|
|
58
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ _("p", {
|
|
59
59
|
className: "text-xs font-mono text-text-placeholder break-all",
|
|
60
|
-
children:
|
|
60
|
+
children: j
|
|
61
61
|
}),
|
|
62
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ v("div", {
|
|
63
63
|
className: "flex flex-wrap items-center gap-2 pt-1",
|
|
64
|
-
children: [/* @__PURE__ */
|
|
64
|
+
children: [/* @__PURE__ */ v("button", {
|
|
65
65
|
type: "button",
|
|
66
|
-
onClick: () => void
|
|
67
|
-
disabled:
|
|
66
|
+
onClick: () => void F(),
|
|
67
|
+
disabled: E,
|
|
68
68
|
className: "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50",
|
|
69
69
|
"data-testid": "plugin-gate-retry",
|
|
70
|
-
children: [/* @__PURE__ */
|
|
71
|
-
}), /* @__PURE__ */
|
|
70
|
+
children: [/* @__PURE__ */ _(m, { className: `size-3.5 ${E ? "animate-spin" : ""}` }), "Retry"]
|
|
71
|
+
}), /* @__PURE__ */ _("button", {
|
|
72
72
|
type: "button",
|
|
73
|
-
onClick: () =>
|
|
73
|
+
onClick: () => I("/agents"),
|
|
74
74
|
className: "rounded-md border border-border-default px-3 py-1.5 text-xs font-medium text-text-secondary hover:text-text-primary hover:border-border-strong transition-colors",
|
|
75
75
|
children: "Manage agents"
|
|
76
76
|
})]
|
|
@@ -78,104 +78,104 @@ function y(y) {
|
|
|
78
78
|
]
|
|
79
79
|
})]
|
|
80
80
|
})
|
|
81
|
-
}) : /* @__PURE__ */
|
|
81
|
+
}) : /* @__PURE__ */ v("div", {
|
|
82
82
|
className: "space-y-3",
|
|
83
|
-
children: [
|
|
84
|
-
if (
|
|
85
|
-
let n = (e.mode, e.packages.filter((e) => !
|
|
86
|
-
return /* @__PURE__ */
|
|
87
|
-
className: `rounded-lg border border-border-default bg-bg-surface ${
|
|
88
|
-
children: /* @__PURE__ */
|
|
83
|
+
children: [T.map((e, t) => {
|
|
84
|
+
if (L[t]) return null;
|
|
85
|
+
let n = (e.mode, e.packages.filter((e) => !O[e])), r = e.mode === "any" ? "Install a plugin to continue" : e.packages.length === 1 ? "Plugin required" : "Plugins required", a = e.mode === "any" ? "Pick any one of the plugins below. Once installed, this surface will render automatically." : e.packages.length === 1 ? "This surface needs the following agent plugin installed." : "This surface needs the following agent plugins installed.";
|
|
86
|
+
return /* @__PURE__ */ _("div", {
|
|
87
|
+
className: `rounded-lg border border-border-default bg-bg-surface ${S ? "p-4" : "p-6"}`,
|
|
88
|
+
children: /* @__PURE__ */ v("div", {
|
|
89
89
|
className: "flex items-start gap-3",
|
|
90
|
-
children: [/* @__PURE__ */
|
|
90
|
+
children: [/* @__PURE__ */ _(p, { className: "size-5 text-action-primary-bg shrink-0 mt-0.5" }), /* @__PURE__ */ v("div", {
|
|
91
91
|
className: "flex-1 min-w-0",
|
|
92
92
|
children: [
|
|
93
|
-
e.eyebrow && /* @__PURE__ */
|
|
93
|
+
e.eyebrow && /* @__PURE__ */ _("p", {
|
|
94
94
|
className: "text-xs uppercase tracking-wide text-text-secondary mb-1",
|
|
95
95
|
children: e.eyebrow
|
|
96
96
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ _("p", {
|
|
98
98
|
className: "text-sm font-semibold text-text-primary",
|
|
99
|
-
children: e.title ??
|
|
99
|
+
children: e.title ?? r
|
|
100
100
|
}),
|
|
101
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ _("p", {
|
|
102
102
|
className: "mt-1 text-sm text-text-secondary",
|
|
103
103
|
children: e.description ?? a
|
|
104
104
|
}),
|
|
105
|
-
|
|
105
|
+
j && /* @__PURE__ */ v("div", {
|
|
106
106
|
role: "alert",
|
|
107
107
|
className: "mt-3 flex items-start gap-2 rounded-md border border-status-error-border bg-status-error-bg px-3 py-2 text-xs text-status-error-text",
|
|
108
|
-
children: [/* @__PURE__ */
|
|
108
|
+
children: [/* @__PURE__ */ _(l, { className: "size-3.5 mt-0.5 shrink-0" }), /* @__PURE__ */ _("span", { children: j })]
|
|
109
109
|
}),
|
|
110
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ _("ul", {
|
|
111
111
|
className: "mt-4 space-y-2",
|
|
112
112
|
children: n.map((e) => {
|
|
113
|
-
let t =
|
|
114
|
-
return /* @__PURE__ */
|
|
113
|
+
let t = i(e), n = k === e, r = k !== null;
|
|
114
|
+
return /* @__PURE__ */ v("li", {
|
|
115
115
|
className: "flex items-center justify-between gap-3 rounded-md border border-border-default bg-bg-sunken px-3 py-2",
|
|
116
|
-
children: [/* @__PURE__ */
|
|
116
|
+
children: [/* @__PURE__ */ v("div", {
|
|
117
117
|
className: "min-w-0",
|
|
118
118
|
children: [
|
|
119
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ _("p", {
|
|
120
120
|
className: "text-sm font-medium text-text-primary truncate",
|
|
121
121
|
children: t.displayName
|
|
122
122
|
}),
|
|
123
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ _("p", {
|
|
124
124
|
className: "text-xs text-text-secondary truncate",
|
|
125
125
|
children: t.description
|
|
126
126
|
}),
|
|
127
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ _("p", {
|
|
128
128
|
className: "text-[10px] font-mono text-text-placeholder truncate",
|
|
129
129
|
title: e,
|
|
130
130
|
children: e
|
|
131
131
|
})
|
|
132
132
|
]
|
|
133
|
-
}), /* @__PURE__ */
|
|
133
|
+
}), /* @__PURE__ */ _("button", {
|
|
134
134
|
type: "button",
|
|
135
|
-
onClick: () => void
|
|
136
|
-
disabled:
|
|
135
|
+
onClick: () => void B(e),
|
|
136
|
+
disabled: r || E,
|
|
137
137
|
className: "inline-flex items-center gap-1.5 whitespace-nowrap rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
138
138
|
"data-testid": `plugin-install-${e}`,
|
|
139
|
-
children: n ? /* @__PURE__ */
|
|
139
|
+
children: n ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(f, { className: "size-3.5 animate-spin" }), "Installing…"] }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(d, { className: "size-3.5" }), "Install"] })
|
|
140
140
|
})]
|
|
141
141
|
}, e);
|
|
142
142
|
})
|
|
143
143
|
}),
|
|
144
|
-
|
|
144
|
+
E && n.length === 0 && /* @__PURE__ */ v("div", {
|
|
145
145
|
className: "mt-4 flex items-center gap-2 text-xs text-text-secondary",
|
|
146
|
-
children: [/* @__PURE__ */
|
|
146
|
+
children: [/* @__PURE__ */ _(f, { className: "size-3.5 animate-spin" }), "Checking plugins…"]
|
|
147
147
|
})
|
|
148
148
|
]
|
|
149
149
|
})]
|
|
150
150
|
})
|
|
151
151
|
}, t);
|
|
152
|
-
}), /* @__PURE__ */
|
|
153
|
-
isOpen:
|
|
154
|
-
onClose:
|
|
152
|
+
}), /* @__PURE__ */ _(e, {
|
|
153
|
+
isOpen: N,
|
|
154
|
+
onClose: P,
|
|
155
155
|
onConfirm: () => {
|
|
156
|
-
|
|
156
|
+
P(), I(t);
|
|
157
157
|
},
|
|
158
158
|
title: "Plugin quota reached",
|
|
159
159
|
message: "You've used all plugin install quota on your current plan. Upgrade to install more plugins."
|
|
160
160
|
})]
|
|
161
|
-
}) : /* @__PURE__ */
|
|
162
|
-
className: `rounded-lg border border-border-default bg-bg-surface ${
|
|
163
|
-
children: /* @__PURE__ */
|
|
161
|
+
}) : /* @__PURE__ */ _("div", {
|
|
162
|
+
className: `rounded-lg border border-border-default bg-bg-surface ${S ? "p-4" : "p-6"}`,
|
|
163
|
+
children: /* @__PURE__ */ v("div", {
|
|
164
164
|
className: "flex items-start gap-3",
|
|
165
|
-
children: [/* @__PURE__ */
|
|
165
|
+
children: [/* @__PURE__ */ _(h, { className: "size-5 text-text-secondary shrink-0 mt-0.5" }), /* @__PURE__ */ v("div", {
|
|
166
166
|
className: "flex-1 space-y-2",
|
|
167
167
|
children: [
|
|
168
|
-
/* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ _("p", {
|
|
169
169
|
className: "text-sm font-semibold text-text-primary",
|
|
170
170
|
children: "No active agent"
|
|
171
171
|
}),
|
|
172
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ _("p", {
|
|
173
173
|
className: "text-sm text-text-secondary",
|
|
174
174
|
children: "This surface needs an active vibecontrols agent with a tunnel URL and API key."
|
|
175
175
|
}),
|
|
176
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ _("button", {
|
|
177
177
|
type: "button",
|
|
178
|
-
onClick: () =>
|
|
178
|
+
onClick: () => I("/agents"),
|
|
179
179
|
className: "px-3 py-1.5 text-xs font-medium rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg-hover transition-colors",
|
|
180
180
|
children: "Go to Agents"
|
|
181
181
|
})
|
|
@@ -185,4 +185,4 @@ function y(y) {
|
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
187
|
//#endregion
|
|
188
|
-
export {
|
|
188
|
+
export { b as PluginGate };
|