@burdenoff/microfe-vibecontrols 2026.1114.1 → 2026.1115.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.
@@ -2,23 +2,24 @@ import { useTr as e } from "../../shared/hooks/useTr.js";
2
2
  import { useVibeControls as t } from "../../providers/VibeControlsProvider.js";
3
3
  import { PageHeader as n } from "../shared/PageHeader.js";
4
4
  import { LoadingState as r } from "../shared/LoadingState.js";
5
- import { ErrorState as ee } from "../shared/ErrorState.js";
6
- import { QuotaExhaustedDialog as i } from "../shared/QuotaExhaustedDialog.js";
5
+ import { ErrorState as i } from "../shared/ErrorState.js";
6
+ import { QuotaExhaustedDialog as ee } from "../shared/QuotaExhaustedDialog.js";
7
7
  import { TunnelEnvironment as a, TunnelProtocol as o, TunnelProviderKey as s } from "../../generated/wspace-types.js";
8
- import { useCreateTunnelMutation as c, useListAgentsQuery as l, useListTunnelProvidersQuery as u } from "../../generated/wspace-operations.js";
9
- import { getQuotaDialogContent as te, isQuotaExhaustedError as d, markQuotaHandledLocally as f } from "../../utils/quotaUtils.js";
10
- import { EntityTagPicker as p } from "../shared/EntityTagPicker.js";
11
- import { useDraftEntityTags as ne } from "../../hooks/useDraftEntityTags.js";
12
- import { LINK_TO_VIBE_DEFAULT as re, LinkToVibePanel as m, linkToVibeInput as h } from "../shared/LinkToVibePanel.js";
8
+ import { useCreateTunnelMutation as c, useListAgentsQuery as te, useListTunnelProvidersQuery as ne } from "../../generated/wspace-operations.js";
9
+ import { getQuotaDialogContent as l, isQuotaExhaustedError as u, markQuotaHandledLocally as d } from "../../utils/quotaUtils.js";
10
+ import { EntityTagPicker as f } from "../shared/EntityTagPicker.js";
11
+ import { useDraftEntityTags as re } from "../../hooks/useDraftEntityTags.js";
12
+ import { LINK_TO_VIBE_DEFAULT as ie, LinkToVibePanel as ae, linkToVibeInput as p } from "../shared/LinkToVibePanel.js";
13
13
  import "../shared/index.js";
14
- import { useCallback as g, useMemo as _, useState as v } from "react";
15
- import { useNavigate as y } from "react-router";
16
- import { AnimatePresence as b, motion as x } from "framer-motion";
17
- import { Fragment as ie, jsx as S, jsxs as C } from "react/jsx-runtime";
18
- import { useEventBus as w } from "@burdenoff/fe-libs/shared/events";
19
- import { Stepper as ae } from "@burdenoff/fe-libs/ui";
14
+ import { agentIdFromSearch as oe, resolvePrefilledAgentId as se } from "./tunnelWizardPrefill.js";
15
+ import { useCallback as m, useMemo as h, useState as g } from "react";
16
+ import { useNavigate as ce, useSearchParams as le } from "react-router";
17
+ import { AnimatePresence as _, motion as v } from "framer-motion";
18
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
19
+ import { useEventBus as S } from "@burdenoff/fe-libs/shared/events";
20
+ import { Stepper as C } from "@burdenoff/fe-libs/ui";
20
21
  // src/components/tunnels/TunnelCreateWizard.tsx
21
- var oe = /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/, T = {
22
+ var w = /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/, T = {
22
23
  providerKey: s.Vibetunnels,
23
24
  agentId: "",
24
25
  name: "",
@@ -55,51 +56,55 @@ var oe = /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/, T = {
55
56
  }
56
57
  ];
57
58
  function D() {
58
- let D = e(), A = y(), j = w(), { workspaceId: M } = t(), [N, P] = v(0), [F, I] = v(T), [L, R] = v(null), [z, B] = v(!1), [V, H] = v(!1), [U, W] = v(re), { setDraftTagIds: G, flushTags: K } = ne("VIBECONTROLS_TUNNEL"), { data: q, loading: se, error: J } = u(), { data: ce } = l({ variables: { pagination: { limit: 100 } } }), [le, { loading: Y }] = c(), X = g((e, t) => {
59
- I((n) => ({
59
+ let D = e(), A = ce(), j = S(), { workspaceId: M } = t(), [N, P] = g(0), [F] = le(), [I, L] = g(() => ({
60
+ ...T,
61
+ agentId: oe(F)
62
+ })), [R, z] = g(null), [B, V] = g(!1), [H, U] = g(!1), [W, ue] = g(ie), { setDraftTagIds: de, flushTags: fe } = re("VIBECONTROLS_TUNNEL"), { data: G, loading: pe, error: K } = ne(), { data: q } = te({ variables: { pagination: { limit: 100 } } }), [me, { loading: J }] = c(), he = q?.vibecontrolsAgents, Y = se(I.agentId, he), X = m((e, t) => {
63
+ L((n) => ({
60
64
  ...n,
61
65
  [e]: t
62
66
  }));
63
- }, []), ue = g((e) => {
64
- I((t) => ({
67
+ }, []), ge = m((e) => {
68
+ L((t) => ({
65
69
  ...t,
66
70
  providerKey: e,
67
71
  hostnameKind: e === s.Cloudflare ? "auto" : "managed"
68
72
  }));
69
- }, []), Z = _(() => [...q?.tunnelProviders ?? []].sort((e, t) => {
73
+ }, []), Z = h(() => [...G?.tunnelProviders ?? []].sort((e, t) => {
70
74
  let n = (e) => e === "VIBETUNNELS" ? 0 : e === "CLOUDFLARE" ? 1 : 2, r = n(e.key) - n(t.key);
71
75
  return r === 0 ? e.key.localeCompare(t.key) : r;
72
- }), [q]), Q = _(() => Z.find((e) => e.key === F.providerKey), [Z, F.providerKey])?.capabilities, $ = F.providerKey === s.Cloudflare, de = _(() => {
76
+ }), [G]), Q = h(() => Z.find((e) => e.key === I.providerKey), [Z, I.providerKey])?.capabilities, $ = I.providerKey === s.Cloudflare, _e = h(() => {
73
77
  if (!Q) return [o.Http];
74
78
  let e = [];
75
79
  return Q.supportsHttp && e.push(o.Http), Q.supportsHttps && e.push(o.Https), Q.supportsTcp && e.push(o.Tcp), e;
76
- }, [Q]), fe = _(() => N === 0 ? !!(F.providerKey && F.agentId && F.name.trim()) : N === 1 ? F.localPort > 0 && F.localPort < 65536 : N === 2 ? F.hostnameKind === "managed" ? !!(F.subdomain && oe.test(F.subdomain)) : F.hostnameKind === "custom" ? F.customDomain.trim().includes(".") : $ : !0, [
80
+ }, [Q]), ve = h(() => N === 0 ? !!(I.providerKey && Y && I.name.trim()) : N === 1 ? I.localPort > 0 && I.localPort < 65536 : N === 2 ? I.hostnameKind === "managed" ? !!(I.subdomain && w.test(I.subdomain)) : I.hostnameKind === "custom" ? I.customDomain.trim().includes(".") : $ : !0, [
77
81
  N,
78
- F,
82
+ I,
83
+ Y,
79
84
  $
80
- ]), pe = () => P((e) => Math.min(e + 1, E.length - 1)), me = () => P((e) => Math.max(e - 1, 0)), he = async () => {
81
- R(null);
85
+ ]), ye = () => P((e) => Math.min(e + 1, E.length - 1)), be = () => P((e) => Math.max(e - 1, 0)), xe = async () => {
86
+ z(null);
82
87
  try {
83
88
  let e = {
84
- agentId: F.agentId,
85
- name: F.name,
86
- description: F.description || void 0,
87
- providerKey: F.providerKey,
88
- protocol: F.protocol,
89
- localHost: F.localHost,
90
- localPort: F.localPort,
91
- environment: F.environment,
92
- basicAuthUser: F.basicAuthUser || void 0,
93
- basicAuthPassword: F.basicAuthPassword || void 0,
94
- managedSubdomain: F.hostnameKind === "managed" ? F.subdomain : void 0,
95
- ...h(U)
96
- }, t = await le({ variables: { input: e } });
89
+ agentId: Y,
90
+ name: I.name,
91
+ description: I.description || void 0,
92
+ providerKey: I.providerKey,
93
+ protocol: I.protocol,
94
+ localHost: I.localHost,
95
+ localPort: I.localPort,
96
+ environment: I.environment,
97
+ basicAuthUser: I.basicAuthUser || void 0,
98
+ basicAuthPassword: I.basicAuthPassword || void 0,
99
+ managedSubdomain: I.hostnameKind === "managed" ? I.subdomain : void 0,
100
+ ...p(W)
101
+ }, t = await me({ variables: { input: e } });
97
102
  if (t.error) {
98
- if (d(t.error)) {
99
- f(), H(!0), j.emitCustom("vibecontrols.quota.tunnel_limit_hit", { workspaceId: M ?? void 0 });
103
+ if (u(t.error)) {
104
+ d(), U(!0), j.emitCustom("vibecontrols.quota.tunnel_limit_hit", { workspaceId: M ?? void 0 });
100
105
  return;
101
106
  }
102
- R(t.error.message);
107
+ z(t.error.message);
103
108
  return;
104
109
  }
105
110
  let n = t.data?.createTunnel.id;
@@ -107,30 +112,30 @@ function D() {
107
112
  j.emitCustom("vibecontrols.tunnel.created", {
108
113
  workspaceId: M ?? void 0,
109
114
  tunnelId: n
110
- }), B(!0);
115
+ }), V(!0);
111
116
  try {
112
- await K(n);
117
+ await fe(n);
113
118
  } finally {
114
- B(!1);
119
+ V(!1);
115
120
  }
116
121
  A(`/vibecontrols/tunnels/${n}`, { state: { autoPromptStart: !0 } });
117
122
  }
118
123
  } catch (e) {
119
- if (d(e)) {
120
- R(null), f(), H(!0), j.emitCustom("vibecontrols.quota.tunnel_limit_hit", { workspaceId: M ?? void 0 });
124
+ if (u(e)) {
125
+ z(null), d(), U(!0), j.emitCustom("vibecontrols.quota.tunnel_limit_hit", { workspaceId: M ?? void 0 });
121
126
  return;
122
127
  }
123
- R(e instanceof Error ? e.message : String(e));
128
+ z(e instanceof Error ? e.message : String(e));
124
129
  }
125
130
  };
126
- return se ? /* @__PURE__ */ S(r, { message: "Loading providers" }) : J ? /* @__PURE__ */ S(ee, {
131
+ return pe ? /* @__PURE__ */ b(r, { message: "Loading providers" }) : K ? /* @__PURE__ */ b(i, {
127
132
  title: "Failed to load providers",
128
- message: J.message,
133
+ message: K.message,
129
134
  onRetry: () => window.location.reload()
130
- }) : /* @__PURE__ */ C("div", {
135
+ }) : /* @__PURE__ */ x("div", {
131
136
  className: "p-6 max-w-3xl mx-auto",
132
137
  children: [
133
- /* @__PURE__ */ S(n, {
138
+ /* @__PURE__ */ b(n, {
134
139
  breadcrumb: [{
135
140
  label: "Tunnels",
136
141
  path: "/vibecontrols/tunnels"
@@ -138,7 +143,7 @@ function D() {
138
143
  title: D("vibecontrols.tunnels.createTitle", "Create tunnel"),
139
144
  description: D("vibecontrols.tunnels.createDescription", "Expose a local service through a managed tunnel.")
140
145
  }),
141
- /* @__PURE__ */ S(ae, {
146
+ /* @__PURE__ */ b(C, {
142
147
  className: "mb-6",
143
148
  active: N,
144
149
  onStepClick: (e) => e <= N && P(e),
@@ -147,9 +152,9 @@ function D() {
147
152
  label: e.label
148
153
  }))
149
154
  }),
150
- /* @__PURE__ */ S(b, {
155
+ /* @__PURE__ */ b(_, {
151
156
  mode: "wait",
152
- children: /* @__PURE__ */ C(x.div, {
157
+ children: /* @__PURE__ */ x(v.div, {
153
158
  initial: {
154
159
  opacity: 0,
155
160
  x: 6
@@ -165,108 +170,108 @@ function D() {
165
170
  transition: { duration: .15 },
166
171
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
167
172
  children: [
168
- N === 0 && /* @__PURE__ */ C("div", {
173
+ N === 0 && /* @__PURE__ */ x("div", {
169
174
  className: "space-y-4",
170
175
  children: [
171
- /* @__PURE__ */ S("h3", {
176
+ /* @__PURE__ */ b("h3", {
172
177
  className: "text-sm font-semibold text-text-primary",
173
178
  children: "Provider"
174
179
  }),
175
- /* @__PURE__ */ S("div", {
180
+ /* @__PURE__ */ b("div", {
176
181
  className: "grid gap-3 sm:grid-cols-2",
177
- children: Z.map((e) => /* @__PURE__ */ C("button", {
182
+ children: Z.map((e) => /* @__PURE__ */ x("button", {
178
183
  type: "button",
179
- onClick: () => ue(e.key),
180
- className: `rounded-lg border p-4 text-left transition-colors ${F.providerKey === e.key ? "border-action-primary-bg bg-bg-sunken" : "border-border-subtle hover:border-border-default"}`,
184
+ onClick: () => ge(e.key),
185
+ className: `rounded-lg border p-4 text-left transition-colors ${I.providerKey === e.key ? "border-action-primary-bg bg-bg-sunken" : "border-border-subtle hover:border-border-default"}`,
181
186
  children: [
182
- /* @__PURE__ */ S("div", {
187
+ /* @__PURE__ */ b("div", {
183
188
  className: "font-semibold text-text-primary",
184
189
  children: e.displayName
185
190
  }),
186
- /* @__PURE__ */ S("div", {
191
+ /* @__PURE__ */ b("div", {
187
192
  className: "text-xs text-text-muted mt-1",
188
193
  children: e.key
189
194
  }),
190
- e.description && /* @__PURE__ */ S("div", {
195
+ e.description && /* @__PURE__ */ b("div", {
191
196
  className: "text-xs text-text-secondary mt-2",
192
197
  children: e.description
193
198
  })
194
199
  ]
195
200
  }, e.id))
196
201
  }),
197
- /* @__PURE__ */ S(O, {
202
+ /* @__PURE__ */ b(O, {
198
203
  label: "Agent",
199
- children: /* @__PURE__ */ C("select", {
200
- value: F.agentId,
204
+ children: /* @__PURE__ */ x("select", {
205
+ value: Y,
201
206
  onChange: (e) => X("agentId", e.target.value),
202
207
  className: "w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary",
203
- children: [/* @__PURE__ */ S("option", {
208
+ children: [/* @__PURE__ */ b("option", {
204
209
  value: "",
205
210
  children: "Select agent"
206
- }), (ce?.vibecontrolsAgents ?? []).map((e) => /* @__PURE__ */ S("option", {
211
+ }), (q?.vibecontrolsAgents ?? []).map((e) => /* @__PURE__ */ b("option", {
207
212
  value: e.id,
208
213
  children: e.name
209
214
  }, e.id))]
210
215
  })
211
216
  }),
212
- /* @__PURE__ */ S(O, {
217
+ /* @__PURE__ */ b(O, {
213
218
  label: "Name",
214
- children: /* @__PURE__ */ S("input", {
219
+ children: /* @__PURE__ */ b("input", {
215
220
  "aria-label": "My dev tunnel",
216
221
  type: "text",
217
- value: F.name,
222
+ value: I.name,
218
223
  onChange: (e) => X("name", e.target.value),
219
224
  placeholder: "My dev tunnel",
220
225
  className: "w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-muted"
221
226
  })
222
227
  }),
223
- /* @__PURE__ */ S(O, {
228
+ /* @__PURE__ */ b(O, {
224
229
  label: "Description (optional)",
225
- children: /* @__PURE__ */ S("input", {
230
+ children: /* @__PURE__ */ b("input", {
226
231
  "aria-label": "control",
227
232
  type: "text",
228
- value: F.description,
233
+ value: I.description,
229
234
  onChange: (e) => X("description", e.target.value),
230
235
  className: "w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-muted"
231
236
  })
232
237
  })
233
238
  ]
234
239
  }),
235
- N === 1 && /* @__PURE__ */ C("div", {
240
+ N === 1 && /* @__PURE__ */ x("div", {
236
241
  className: "space-y-4",
237
242
  children: [
238
- /* @__PURE__ */ S("h3", {
243
+ /* @__PURE__ */ b("h3", {
239
244
  className: "text-sm font-semibold text-text-primary",
240
245
  children: "Protocol & target"
241
246
  }),
242
- /* @__PURE__ */ S(O, {
247
+ /* @__PURE__ */ b(O, {
243
248
  label: "Protocol",
244
- children: /* @__PURE__ */ S("div", {
249
+ children: /* @__PURE__ */ b("div", {
245
250
  className: "flex gap-2",
246
- children: de.map((e) => /* @__PURE__ */ S("button", {
251
+ children: _e.map((e) => /* @__PURE__ */ b("button", {
247
252
  type: "button",
248
253
  onClick: () => X("protocol", e),
249
- className: `rounded-md border px-4 py-2 text-sm ${F.protocol === e ? "border-action-primary-bg bg-bg-sunken text-text-primary" : "border-border-subtle text-text-secondary hover:border-border-default"}`,
254
+ className: `rounded-md border px-4 py-2 text-sm ${I.protocol === e ? "border-action-primary-bg bg-bg-sunken text-text-primary" : "border-border-subtle text-text-secondary hover:border-border-default"}`,
250
255
  children: e
251
256
  }, e))
252
257
  })
253
258
  }),
254
- /* @__PURE__ */ S(O, {
259
+ /* @__PURE__ */ b(O, {
255
260
  label: "Local host",
256
- children: /* @__PURE__ */ S("input", {
261
+ children: /* @__PURE__ */ b("input", {
257
262
  "aria-label": "control",
258
263
  type: "text",
259
- value: F.localHost,
264
+ value: I.localHost,
260
265
  onChange: (e) => X("localHost", e.target.value),
261
266
  className: "w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary"
262
267
  })
263
268
  }),
264
- /* @__PURE__ */ S(O, {
269
+ /* @__PURE__ */ b(O, {
265
270
  label: "Local port",
266
- children: /* @__PURE__ */ S("input", {
271
+ children: /* @__PURE__ */ b("input", {
267
272
  "aria-label": "control",
268
273
  type: "number",
269
- value: F.localPort,
274
+ value: I.localPort,
270
275
  onChange: (e) => X("localPort", parseInt(e.target.value, 10) || 0),
271
276
  min: 1,
272
277
  max: 65535,
@@ -275,272 +280,272 @@ function D() {
275
280
  })
276
281
  ]
277
282
  }),
278
- N === 2 && /* @__PURE__ */ C("div", {
283
+ N === 2 && /* @__PURE__ */ x("div", {
279
284
  className: "space-y-4",
280
285
  children: [
281
- /* @__PURE__ */ S("h3", {
286
+ /* @__PURE__ */ b("h3", {
282
287
  className: "text-sm font-semibold text-text-primary",
283
288
  children: "Hostname"
284
289
  }),
285
- /* @__PURE__ */ C("div", {
290
+ /* @__PURE__ */ x("div", {
286
291
  className: "flex gap-2",
287
292
  children: [
288
- Q?.supportsManagedSubdomains && /* @__PURE__ */ S(k, {
289
- active: F.hostnameKind === "managed",
293
+ Q?.supportsManagedSubdomains && /* @__PURE__ */ b(k, {
294
+ active: I.hostnameKind === "managed",
290
295
  onClick: () => X("hostnameKind", "managed"),
291
296
  label: "Managed subdomain",
292
297
  hint: "*.vibetunnels.com"
293
298
  }),
294
- Q?.supportsCustomDomains && /* @__PURE__ */ S(k, {
295
- active: F.hostnameKind === "custom",
299
+ Q?.supportsCustomDomains && /* @__PURE__ */ b(k, {
300
+ active: I.hostnameKind === "custom",
296
301
  onClick: () => X("hostnameKind", "custom"),
297
302
  label: "Custom domain",
298
303
  hint: "TXT verification"
299
304
  }),
300
- $ && /* @__PURE__ */ S(k, {
301
- active: F.hostnameKind === "auto",
305
+ $ && /* @__PURE__ */ b(k, {
306
+ active: I.hostnameKind === "auto",
302
307
  onClick: () => X("hostnameKind", "auto"),
303
308
  label: "Auto",
304
309
  hint: "assigned by Cloudflare"
305
310
  })
306
311
  ]
307
312
  }),
308
- F.hostnameKind === "managed" && /* @__PURE__ */ C(ie, { children: [
309
- /* @__PURE__ */ S(O, {
313
+ I.hostnameKind === "managed" && /* @__PURE__ */ x(y, { children: [
314
+ /* @__PURE__ */ b(O, {
310
315
  label: "Environment",
311
- children: /* @__PURE__ */ C("div", {
316
+ children: /* @__PURE__ */ x("div", {
312
317
  className: "flex gap-2",
313
- children: [/* @__PURE__ */ S("button", {
318
+ children: [/* @__PURE__ */ b("button", {
314
319
  type: "button",
315
320
  onClick: () => X("environment", a.Prod),
316
- className: `rounded-md border px-4 py-2 text-sm ${F.environment === a.Prod ? "border-action-primary-bg bg-bg-sunken text-text-primary" : "border-border-subtle text-text-secondary hover:border-border-default"}`,
321
+ className: `rounded-md border px-4 py-2 text-sm ${I.environment === a.Prod ? "border-action-primary-bg bg-bg-sunken text-text-primary" : "border-border-subtle text-text-secondary hover:border-border-default"}`,
317
322
  children: "Prod (vibetunnels.com)"
318
- }), /* @__PURE__ */ S("button", {
323
+ }), /* @__PURE__ */ b("button", {
319
324
  type: "button",
320
325
  onClick: () => X("environment", a.Alpha),
321
- className: `rounded-md border px-4 py-2 text-sm ${F.environment === a.Alpha ? "border-action-primary-bg bg-bg-sunken text-text-primary" : "border-border-subtle text-text-secondary hover:border-border-default"}`,
326
+ className: `rounded-md border px-4 py-2 text-sm ${I.environment === a.Alpha ? "border-action-primary-bg bg-bg-sunken text-text-primary" : "border-border-subtle text-text-secondary hover:border-border-default"}`,
322
327
  children: "Alpha"
323
328
  })]
324
329
  })
325
330
  }),
326
- /* @__PURE__ */ S(O, {
331
+ /* @__PURE__ */ b(O, {
327
332
  label: "Subdomain label",
328
- children: /* @__PURE__ */ S("input", {
333
+ children: /* @__PURE__ */ b("input", {
329
334
  "aria-label": "demo",
330
335
  type: "text",
331
- value: F.subdomain,
336
+ value: I.subdomain,
332
337
  onChange: (e) => X("subdomain", e.target.value.toLowerCase()),
333
338
  placeholder: "demo",
334
339
  className: "w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary"
335
340
  })
336
341
  }),
337
- F.subdomain && /* @__PURE__ */ C("p", {
342
+ I.subdomain && /* @__PURE__ */ x("p", {
338
343
  className: "text-xs text-text-secondary",
339
344
  children: [
340
345
  "Will be reserved as",
341
346
  " ",
342
- /* @__PURE__ */ C("span", {
347
+ /* @__PURE__ */ x("span", {
343
348
  className: "font-mono text-text-primary",
344
- children: [F.subdomain, F.environment === a.Alpha ? ".alpha.vibetunnels.com" : ".vibetunnels.com"]
349
+ children: [I.subdomain, I.environment === a.Alpha ? ".alpha.vibetunnels.com" : ".vibetunnels.com"]
345
350
  })
346
351
  ]
347
352
  })
348
353
  ] }),
349
- F.hostnameKind === "custom" && /* @__PURE__ */ C(O, {
354
+ I.hostnameKind === "custom" && /* @__PURE__ */ x(O, {
350
355
  label: "Custom domain",
351
- children: [/* @__PURE__ */ S("input", {
356
+ children: [/* @__PURE__ */ b("input", {
352
357
  "aria-label": "preview.example.com",
353
358
  type: "text",
354
- value: F.customDomain,
359
+ value: I.customDomain,
355
360
  onChange: (e) => X("customDomain", e.target.value.toLowerCase()),
356
361
  placeholder: "preview.example.com",
357
362
  className: "w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary"
358
- }), /* @__PURE__ */ S("p", {
363
+ }), /* @__PURE__ */ b("p", {
359
364
  className: "text-xs text-text-muted mt-2",
360
365
  children: "Custom domains are registered on create but must be verified via a TXT record before they can be attached. You'll see the verification challenge in the Domains tab after creation."
361
366
  })]
362
367
  })
363
368
  ]
364
369
  }),
365
- N === 3 && /* @__PURE__ */ C("div", {
370
+ N === 3 && /* @__PURE__ */ x("div", {
366
371
  className: "space-y-4",
367
372
  children: [
368
- /* @__PURE__ */ S("h3", {
373
+ /* @__PURE__ */ b("h3", {
369
374
  className: "text-sm font-semibold text-text-primary",
370
375
  children: "Policies (optional)"
371
376
  }),
372
- /* @__PURE__ */ S(O, {
377
+ /* @__PURE__ */ b(O, {
373
378
  label: "Basic auth user",
374
- children: /* @__PURE__ */ S("input", {
379
+ children: /* @__PURE__ */ b("input", {
375
380
  "aria-label": "control",
376
381
  type: "text",
377
- value: F.basicAuthUser,
382
+ value: I.basicAuthUser,
378
383
  onChange: (e) => X("basicAuthUser", e.target.value),
379
384
  className: "w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary"
380
385
  })
381
386
  }),
382
- /* @__PURE__ */ S(O, {
387
+ /* @__PURE__ */ b(O, {
383
388
  label: "Basic auth password",
384
- children: /* @__PURE__ */ S("input", {
389
+ children: /* @__PURE__ */ b("input", {
385
390
  "aria-label": "control",
386
391
  type: "password",
387
- value: F.basicAuthPassword,
392
+ value: I.basicAuthPassword,
388
393
  onChange: (e) => X("basicAuthPassword", e.target.value),
389
394
  className: "w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary"
390
395
  })
391
396
  }),
392
- /* @__PURE__ */ S(m, {
393
- value: U,
394
- onChange: W,
395
- disabled: Y
397
+ /* @__PURE__ */ b(ae, {
398
+ value: W,
399
+ onChange: ue,
400
+ disabled: J
396
401
  })
397
402
  ]
398
403
  }),
399
- N === 4 && /* @__PURE__ */ C("div", {
404
+ N === 4 && /* @__PURE__ */ x("div", {
400
405
  className: "space-y-3",
401
406
  children: [
402
- /* @__PURE__ */ S("h3", {
407
+ /* @__PURE__ */ b("h3", {
403
408
  className: "text-sm font-semibold text-text-primary",
404
409
  children: D("vibecontrols.tunnels.review", "Review")
405
410
  }),
406
- /* @__PURE__ */ C("dl", {
411
+ /* @__PURE__ */ x("dl", {
407
412
  className: "grid grid-cols-[auto_1fr] gap-x-4 gap-y-2 text-sm",
408
413
  children: [
409
- /* @__PURE__ */ S("dt", {
414
+ /* @__PURE__ */ b("dt", {
410
415
  className: "text-text-muted",
411
416
  children: "Provider"
412
417
  }),
413
- /* @__PURE__ */ S("dd", {
418
+ /* @__PURE__ */ b("dd", {
414
419
  className: "text-text-primary",
415
- children: F.providerKey
420
+ children: I.providerKey
416
421
  }),
417
- /* @__PURE__ */ S("dt", {
422
+ /* @__PURE__ */ b("dt", {
418
423
  className: "text-text-muted",
419
424
  children: "Name"
420
425
  }),
421
- /* @__PURE__ */ S("dd", {
426
+ /* @__PURE__ */ b("dd", {
422
427
  className: "text-text-primary",
423
- children: F.name
428
+ children: I.name
424
429
  }),
425
- /* @__PURE__ */ S("dt", {
430
+ /* @__PURE__ */ b("dt", {
426
431
  className: "text-text-muted",
427
432
  children: "Agent"
428
433
  }),
429
- /* @__PURE__ */ S("dd", {
434
+ /* @__PURE__ */ b("dd", {
430
435
  className: "text-text-primary font-mono",
431
- children: F.agentId
436
+ children: Y
432
437
  }),
433
- /* @__PURE__ */ S("dt", {
438
+ /* @__PURE__ */ b("dt", {
434
439
  className: "text-text-muted",
435
440
  children: "Protocol"
436
441
  }),
437
- /* @__PURE__ */ S("dd", {
442
+ /* @__PURE__ */ b("dd", {
438
443
  className: "text-text-primary",
439
- children: F.protocol
444
+ children: I.protocol
440
445
  }),
441
- /* @__PURE__ */ S("dt", {
446
+ /* @__PURE__ */ b("dt", {
442
447
  className: "text-text-muted",
443
448
  children: "Target"
444
449
  }),
445
- /* @__PURE__ */ C("dd", {
450
+ /* @__PURE__ */ x("dd", {
446
451
  className: "text-text-primary font-mono",
447
452
  children: [
448
- F.localHost,
453
+ I.localHost,
449
454
  ":",
450
- F.localPort
455
+ I.localPort
451
456
  ]
452
457
  }),
453
- /* @__PURE__ */ S("dt", {
458
+ /* @__PURE__ */ b("dt", {
454
459
  className: "text-text-muted",
455
460
  children: "Hostname"
456
461
  }),
457
- /* @__PURE__ */ S("dd", {
462
+ /* @__PURE__ */ b("dd", {
458
463
  className: "text-text-primary",
459
- children: F.hostnameKind === "managed" ? `${F.subdomain}.${F.environment === "ALPHA" ? "alpha." : ""}vibetunnels.com` : F.hostnameKind === "custom" ? F.customDomain : "auto-assigned"
464
+ children: I.hostnameKind === "managed" ? `${I.subdomain}.${I.environment === "ALPHA" ? "alpha." : ""}vibetunnels.com` : I.hostnameKind === "custom" ? I.customDomain : "auto-assigned"
460
465
  }),
461
- /* @__PURE__ */ S("dt", {
466
+ /* @__PURE__ */ b("dt", {
462
467
  className: "text-text-muted",
463
468
  children: "Basic auth"
464
469
  }),
465
- /* @__PURE__ */ S("dd", {
470
+ /* @__PURE__ */ b("dd", {
466
471
  className: "text-text-primary",
467
- children: F.basicAuthUser ? "yes" : "no"
472
+ children: I.basicAuthUser ? "yes" : "no"
468
473
  })
469
474
  ]
470
475
  }),
471
- /* @__PURE__ */ C("div", {
476
+ /* @__PURE__ */ x("div", {
472
477
  className: "border-t border-border-subtle pt-3",
473
- children: [/* @__PURE__ */ S("h4", {
478
+ children: [/* @__PURE__ */ b("h4", {
474
479
  className: "mb-2 text-sm font-medium text-text-secondary",
475
480
  children: D("vibecontrols.tunnels.tags", "Tags")
476
- }), /* @__PURE__ */ S(p, {
481
+ }), /* @__PURE__ */ b(f, {
477
482
  entityType: "VIBECONTROLS_TUNNEL",
478
- onDraftChange: G
483
+ onDraftChange: de
479
484
  })]
480
485
  }),
481
- L && /* @__PURE__ */ S("div", {
486
+ R && /* @__PURE__ */ b("div", {
482
487
  className: "rounded-card border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-status-error-text",
483
- children: L
488
+ children: R
484
489
  })
485
490
  ]
486
491
  })
487
492
  ]
488
493
  }, N)
489
494
  }),
490
- /* @__PURE__ */ C("div", {
495
+ /* @__PURE__ */ x("div", {
491
496
  className: "flex items-center justify-between mt-4",
492
- children: [/* @__PURE__ */ S("button", {
497
+ children: [/* @__PURE__ */ b("button", {
493
498
  type: "button",
494
499
  disabled: N === 0,
495
- onClick: me,
500
+ onClick: be,
496
501
  className: "rounded-md border border-border-default px-4 py-2 text-sm text-text-primary hover:bg-bg-elevated disabled:opacity-50",
497
502
  children: D("vibecontrols.tunnels.back", "Back")
498
- }), N < E.length - 1 ? /* @__PURE__ */ S("button", {
503
+ }), N < E.length - 1 ? /* @__PURE__ */ b("button", {
499
504
  type: "button",
500
- disabled: !fe,
501
- onClick: pe,
505
+ disabled: !ve,
506
+ onClick: ye,
502
507
  className: "rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-fg hover:bg-action-primary-bg-hover disabled:opacity-50",
503
508
  children: D("vibecontrols.tunnels.next", "Next")
504
- }) : /* @__PURE__ */ S("button", {
509
+ }) : /* @__PURE__ */ b("button", {
505
510
  type: "button",
506
- disabled: Y || z,
507
- onClick: () => void he(),
511
+ disabled: J || B,
512
+ onClick: () => void xe(),
508
513
  className: "rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-fg hover:bg-action-primary-bg-hover disabled:opacity-50",
509
- children: Y ? D("vibecontrols.tunnels.creating", "Creating...") : D("vibecontrols.tunnels.createTunnel", "Create tunnel")
514
+ children: J ? D("vibecontrols.tunnels.creating", "Creating...") : D("vibecontrols.tunnels.createTunnel", "Create tunnel")
510
515
  })]
511
516
  }),
512
- /* @__PURE__ */ S(i, {
513
- isOpen: V,
514
- onClose: () => H(!1),
517
+ /* @__PURE__ */ b(ee, {
518
+ isOpen: H,
519
+ onClose: () => U(!1),
515
520
  onConfirm: () => {
516
- H(!1), A("/billing/plans");
521
+ U(!1), A("/billing/plans");
517
522
  },
518
- ...te("tunnel-subdomain")
523
+ ...l("tunnel-subdomain")
519
524
  })
520
525
  ]
521
526
  });
522
527
  }
523
528
  function O({ label: e, children: t }) {
524
- return /* @__PURE__ */ C("label", {
529
+ return /* @__PURE__ */ x("label", {
525
530
  className: "block",
526
- children: [/* @__PURE__ */ S("span", {
531
+ children: [/* @__PURE__ */ b("span", {
527
532
  className: "text-xs font-medium text-text-secondary",
528
533
  children: e
529
- }), /* @__PURE__ */ S("div", {
534
+ }), /* @__PURE__ */ b("div", {
530
535
  className: "mt-1",
531
536
  children: t
532
537
  })]
533
538
  });
534
539
  }
535
540
  function k({ active: e, onClick: t, label: n, hint: r }) {
536
- return /* @__PURE__ */ C("button", {
541
+ return /* @__PURE__ */ x("button", {
537
542
  type: "button",
538
543
  onClick: t,
539
544
  className: `flex-1 rounded-md border p-3 text-left transition-colors ${e ? "border-action-primary-bg bg-bg-sunken" : "border-border-subtle hover:border-border-default"}`,
540
- children: [/* @__PURE__ */ S("div", {
545
+ children: [/* @__PURE__ */ b("div", {
541
546
  className: "text-sm font-medium text-text-primary",
542
547
  children: n
543
- }), /* @__PURE__ */ S("div", {
548
+ }), /* @__PURE__ */ b("div", {
544
549
  className: "text-xs text-text-muted mt-0.5",
545
550
  children: r
546
551
  })]
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Prefill for the tunnel create wizard (BOFF-7056).
3
+ *
4
+ * The VibeControls browser extension's "Share localhost" action opens
5
+ * `/vibecontrols/tunnels/new?agentId=<id>` so the wizard starts with that
6
+ * agent selected. The id is only kept when it names an agent the workspace
7
+ * actually has; anything else falls back to "Select agent".
8
+ */
9
+ /** Query parameter the wizard reads the agent from. */
10
+ export declare const AGENT_ID_PARAM = "agentId";
11
+ /** The agent id requested in the URL, trimmed; empty when absent. */
12
+ export declare function agentIdFromSearch(params: URLSearchParams): string;
13
+ /**
14
+ * The agent id to keep once the agent list has loaded: the requested id when
15
+ * it is one of the workspace's agents, otherwise empty. While the list is
16
+ * still loading (`agents` undefined) the requested id is kept as is.
17
+ */
18
+ export declare function resolvePrefilledAgentId(requested: string, agents: ReadonlyArray<{
19
+ id: string;
20
+ }> | undefined): string;
@@ -0,0 +1,9 @@
1
+ // src/components/tunnels/tunnelWizardPrefill.ts
2
+ var e = "agentId";
3
+ function t(e) {
4
+ return e.get("agentId")?.trim() ?? "";
5
+ }
6
+ function n(e, t) {
7
+ return !e || !t || t.some((t) => t.id === e) ? e : "";
8
+ }
9
+ export { e as AGENT_ID_PARAM, t as agentIdFromSearch, n as resolvePrefilledAgentId };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Route of a plugin's detail page under the VibeControls base path
3
+ * (BOFF-4057). The detail route is a splat (`plugins/*`), so the scoped npm
4
+ * name keeps its slash: `/plugins/@vibecontrols/vibe-plugin-ai-claude`.
5
+ * Pass the result to `useVibeNavigate()`, which adds the base path.
6
+ */
7
+ export declare function pluginDetailPath(packageName: string): string;
@@ -0,0 +1,5 @@
1
+ // src/constants/pluginRoutes.ts
2
+ function e(e) {
3
+ return `/plugins/${e}`;
4
+ }
5
+ export { e as pluginDetailPath };
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * PluginDetailPage — identity + per-agent install matrix for ONE plugin.
3
3
  *
4
- * Route (owned by the integrator): `plugins/pkg/*`
4
+ * Route: `plugins/*` (the catalog cards link here via `pluginDetailPath`).
5
5
  * The splat carries the raw package name, scope slash included, e.g.
6
- * `/vibecontrols/plugins/pkg/@vibecontrols/vibe-plugin-tunnel-cloudflare`.
6
+ * `/vibecontrols/plugins/@vibecontrols/vibe-plugin-tunnel-cloudflare`.
7
7
  *
8
8
  * Everything rendered here comes from something that exists:
9
9
  * - identity/description → the local `PLUGIN_CATALOG` metadata, with the
@@ -1,19 +1,20 @@
1
1
  import { PLUGIN_CATALOG as e } from "../constants/pluginCatalog.js";
2
- import { AgentSelector as t } from "../components/shared/AgentSelector.js";
3
- import { QuotaExhaustedDialog as n } from "../components/shared/QuotaExhaustedDialog.js";
4
- import { usePluginAvailability as r } from "../hooks/usePluginAvailability.js";
5
- import { useVibeControlsStore as i } from "../store/vibeControlsStore.js";
6
- import { BILLING_PLANS_ROUTE as a, useVibeNavigate as o } from "../providers/VibeControlsProvider.js";
7
- import { useTr as s } from "../shared/hooks/useTr.js";
8
- import { useCallback as c, useMemo as l, useState as u } from "react";
9
- import { Check as d, ChevronDown as f, Copy as p, Download as m, Loader2 as h, Plug as g, Search as _, X as v } from "lucide-react";
10
- import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
11
- import { Card as S, IllustratedEmptyState as C, PageContainer as w, PagePurpose as T } from "@burdenoff/fe-libs/ui";
12
- import { MotionPage as E } from "@burdenoff/fe-libs/shared/motion";
13
- import { useAssistantPageControls as D } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
14
- import { searchOf as O, tabsOf as k } from "@burdenoff/fe-libs/shared/assistant/appControls/pageAdapters";
2
+ import { pluginDetailPath as t } from "../constants/pluginRoutes.js";
3
+ import { AgentSelector as n } from "../components/shared/AgentSelector.js";
4
+ import { QuotaExhaustedDialog as r } from "../components/shared/QuotaExhaustedDialog.js";
5
+ import { usePluginAvailability as i } from "../hooks/usePluginAvailability.js";
6
+ import { useVibeControlsStore as a } from "../store/vibeControlsStore.js";
7
+ import { BILLING_PLANS_ROUTE as o, useVibeNavigate as s } from "../providers/VibeControlsProvider.js";
8
+ import { useTr as c } from "../shared/hooks/useTr.js";
9
+ import { useCallback as l, useMemo as u, useState as d } from "react";
10
+ import { ArrowRight as f, Check as p, ChevronDown as m, Copy as h, Download as g, Loader2 as _, Plug as v, Search as y, X as b } from "lucide-react";
11
+ import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
12
+ import { Card as w, IllustratedEmptyState as T, PageContainer as E, PagePurpose as D } from "@burdenoff/fe-libs/ui";
13
+ import { MotionPage as O } from "@burdenoff/fe-libs/shared/motion";
14
+ import { useAssistantPageControls as k } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
15
+ import { searchOf as A, tabsOf as j } from "@burdenoff/fe-libs/shared/assistant/appControls/pageAdapters";
15
16
  // src/pages/PluginsCatalogPage.tsx
16
- var A = [
17
+ var M = [
17
18
  {
18
19
  value: "all",
19
20
  labelKey: "vibecontrols.plugins.category.all",
@@ -90,122 +91,129 @@ var A = [
90
91
  labelFallback: "Tools"
91
92
  }
92
93
  ];
93
- function j(e) {
94
+ function N(e) {
94
95
  return e.endsWith("-core") ? "Meta" : e.endsWith("-provider") ? "Provider" : "Plugin";
95
96
  }
96
- function M(e) {
97
+ function P(e) {
97
98
  switch (e) {
98
99
  case "Meta": return "bg-accent-purple-subtle text-text-primary border-accent-purple/30";
99
100
  case "Provider": return "bg-status-info-bg text-status-info-text border-status-info-border";
100
101
  default: return "bg-bg-sunken text-text-secondary border-border-default";
101
102
  }
102
103
  }
103
- function N({ text: e, ariaLabel: t }) {
104
- let [n, r] = u(!1), i = c(async () => {
104
+ function F({ text: e, ariaLabel: t }) {
105
+ let [n, r] = d(!1), i = l(async () => {
105
106
  try {
106
107
  typeof navigator < "u" && navigator.clipboard && await navigator.clipboard.writeText(e), r(!0), window.setTimeout(() => r(!1), 1500);
107
108
  } catch {
108
109
  r(!1);
109
110
  }
110
111
  }, [e]);
111
- return /* @__PURE__ */ b("button", {
112
+ return /* @__PURE__ */ S("button", {
112
113
  type: "button",
113
114
  onClick: i,
114
115
  "aria-label": t,
115
116
  className: "inline-flex items-center justify-center size-7 rounded border border-border-default bg-bg-surface text-text-secondary hover:text-text-primary hover:bg-bg-elevated transition-colors flex-shrink-0",
116
- children: b(n ? d : p, { className: "size-3.5" })
117
+ children: S(n ? p : h, { className: "size-3.5" })
117
118
  });
118
119
  }
119
- function P({ plugin: e, agentId: t, installed: n, installing: r, installBusy: i, onInstall: a }) {
120
- let o = s(), c = j(e.category), l = `npm install ${e.packageName}`, p = `import plugin from '${e.packageName}';`, [g, _] = u(!1), [v, C] = u(!1);
121
- return /* @__PURE__ */ b(S, {
120
+ function I({ plugin: e, agentId: t, installed: n, installing: r, installBusy: i, onInstall: a, onOpenDetails: o }) {
121
+ let s = c(), l = N(e.category), u = `npm install ${e.packageName}`, h = `import plugin from '${e.packageName}';`, [v, y] = d(!1), [b, T] = d(!1);
122
+ return /* @__PURE__ */ S(w, {
122
123
  className: "flex flex-col h-full p-0 bg-bg-surface border-border-default",
123
- children: /* @__PURE__ */ x("div", {
124
+ children: /* @__PURE__ */ C("div", {
124
125
  className: "flex flex-col gap-3 p-4",
125
126
  children: [
126
- /* @__PURE__ */ x("div", {
127
+ /* @__PURE__ */ C("div", {
127
128
  className: "flex items-start justify-between gap-3",
128
- children: [/* @__PURE__ */ x("div", {
129
+ children: [/* @__PURE__ */ C("div", {
129
130
  className: "min-w-0 flex-1",
130
- children: [/* @__PURE__ */ b("h3", {
131
+ children: [/* @__PURE__ */ S("h3", {
131
132
  className: "text-base font-semibold text-text-primary truncate",
132
133
  children: e.displayName
133
- }), /* @__PURE__ */ b("p", {
134
+ }), /* @__PURE__ */ S("p", {
134
135
  className: "text-xs text-text-secondary font-mono truncate mt-1",
135
136
  children: e.packageName
136
137
  })]
137
- }), /* @__PURE__ */ b("span", {
138
- className: `inline-flex items-center gap-1 px-2 py-0.5 text-[10px] uppercase tracking-wide font-semibold rounded-full border ${M(c)} flex-shrink-0`,
139
- children: c
138
+ }), /* @__PURE__ */ S("span", {
139
+ className: `inline-flex items-center gap-1 px-2 py-0.5 text-[10px] uppercase tracking-wide font-semibold rounded-full border ${P(l)} flex-shrink-0`,
140
+ children: l
140
141
  })]
141
142
  }),
142
- /* @__PURE__ */ b("p", {
143
+ /* @__PURE__ */ S("p", {
143
144
  className: "text-sm text-text-secondary leading-snug",
144
145
  children: e.description
145
146
  }),
146
- n ? /* @__PURE__ */ x("div", {
147
+ /* @__PURE__ */ C("button", {
148
+ type: "button",
149
+ onClick: () => o(e.packageName),
150
+ className: "inline-flex items-center gap-1 self-start text-xs font-medium text-text-link hover:text-text-linkHover hover:underline",
151
+ "data-testid": `plugin-details-${e.packageName}`,
152
+ children: [s("vibecontrols.plugins.viewFleet", "Agents and fleet rollout"), /* @__PURE__ */ S(f, { className: "size-3.5" })]
153
+ }),
154
+ n ? /* @__PURE__ */ C("div", {
147
155
  className: "flex items-center gap-1.5 rounded-md border border-status-success-border bg-status-success-bg px-2.5 py-1.5 text-xs font-medium text-status-success-text",
148
156
  "data-testid": `plugin-installed-${e.packageName}`,
149
- children: [/* @__PURE__ */ b(d, { className: "size-3.5 flex-shrink-0" }), o("vibecontrols.plugins.installedOnAgent", "Installed on this agent")]
150
- }) : t ? /* @__PURE__ */ b("button", {
157
+ children: [/* @__PURE__ */ S(p, { className: "size-3.5 flex-shrink-0" }), s("vibecontrols.plugins.installedOnAgent", "Installed on this agent")]
158
+ }) : t ? /* @__PURE__ */ S("button", {
151
159
  type: "button",
152
160
  onClick: () => a(e.packageName),
153
161
  disabled: i,
154
162
  className: "inline-flex items-center justify-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 disabled:cursor-not-allowed",
155
163
  "data-testid": `plugin-install-${e.packageName}`,
156
- children: r ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(h, { className: "size-3.5 animate-spin" }), o("vibecontrols.plugins.installing", "Installing…")] }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(m, { className: "size-3.5" }), o("vibecontrols.plugins.installToAgent", "Install to agent")] })
157
- }) : /* @__PURE__ */ b("p", {
164
+ children: r ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(_, { className: "size-3.5 animate-spin" }), s("vibecontrols.plugins.installing", "Installing…")] }) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(g, { className: "size-3.5" }), s("vibecontrols.plugins.installToAgent", "Install to agent")] })
165
+ }) : /* @__PURE__ */ S("p", {
158
166
  className: "text-xs text-text-placeholder",
159
- children: o("vibecontrols.plugins.selectAgentHint", "Select an agent above to install this with one click.")
167
+ children: s("vibecontrols.plugins.selectAgentHint", "Select an agent above to install this with one click.")
160
168
  }),
161
- /* @__PURE__ */ x("div", {
169
+ /* @__PURE__ */ C("div", {
162
170
  className: "mt-1 space-y-1.5",
163
- children: [/* @__PURE__ */ b("p", {
171
+ children: [/* @__PURE__ */ S("p", {
164
172
  className: "text-[11px] font-medium uppercase tracking-wide text-text-secondary",
165
- children: o("vibecontrols.plugins.installCli", "Or install via CLI")
166
- }), /* @__PURE__ */ x("div", {
173
+ children: s("vibecontrols.plugins.installCli", "Or install via CLI")
174
+ }), /* @__PURE__ */ C("div", {
167
175
  className: "flex items-center gap-2 rounded-md border border-border-default bg-bg-sunken px-2.5 py-1.5",
168
- children: [/* @__PURE__ */ b("code", {
176
+ children: [/* @__PURE__ */ S("code", {
169
177
  className: "flex-1 text-xs font-mono text-text-primary truncate",
170
- children: l
171
- }), /* @__PURE__ */ b(N, {
172
- text: l,
173
- ariaLabel: o("vibecontrols.plugins.copyInstall", "Copy install command for {{name}}", { name: e.displayName })
178
+ children: u
179
+ }), /* @__PURE__ */ S(F, {
180
+ text: u,
181
+ ariaLabel: s("vibecontrols.plugins.copyInstall", "Copy install command for {{name}}", { name: e.displayName })
174
182
  })]
175
183
  })]
176
184
  }),
177
- /* @__PURE__ */ x("div", {
185
+ /* @__PURE__ */ C("div", {
178
186
  className: "space-y-2",
179
- children: [/* @__PURE__ */ x("button", {
187
+ children: [/* @__PURE__ */ C("button", {
180
188
  type: "button",
181
- onClick: () => _((e) => !e),
189
+ onClick: () => y((e) => !e),
182
190
  className: "w-full flex items-center justify-between gap-2 text-left text-xs font-medium text-text-secondary hover:text-text-primary transition-colors",
183
- "aria-expanded": g,
184
- children: [/* @__PURE__ */ b("span", { children: o("vibecontrols.plugins.usage", "Usage") }), /* @__PURE__ */ b(f, { className: `size-3.5 transition-transform ${g ? "rotate-180" : ""}` })]
185
- }), g && /* @__PURE__ */ x("div", {
191
+ "aria-expanded": v,
192
+ children: [/* @__PURE__ */ S("span", { children: s("vibecontrols.plugins.usage", "Usage") }), /* @__PURE__ */ S(m, { className: `size-3.5 transition-transform ${v ? "rotate-180" : ""}` })]
193
+ }), v && /* @__PURE__ */ C("div", {
186
194
  className: "flex items-start gap-2 rounded-md border border-border-default bg-bg-sunken px-2.5 py-2",
187
- children: [/* @__PURE__ */ b("code", {
195
+ children: [/* @__PURE__ */ S("code", {
188
196
  className: "flex-1 text-xs font-mono text-text-primary whitespace-pre-wrap break-all",
189
- children: p
190
- }), /* @__PURE__ */ b(N, {
191
- text: p,
192
- ariaLabel: o("vibecontrols.plugins.copyUsage", "Copy usage snippet for {{name}}", { name: e.displayName })
197
+ children: h
198
+ }), /* @__PURE__ */ S(F, {
199
+ text: h,
200
+ ariaLabel: s("vibecontrols.plugins.copyUsage", "Copy usage snippet for {{name}}", { name: e.displayName })
193
201
  })]
194
202
  })]
195
203
  }),
196
- /* @__PURE__ */ x("div", {
204
+ /* @__PURE__ */ C("div", {
197
205
  className: "space-y-2",
198
- children: [/* @__PURE__ */ x("button", {
206
+ children: [/* @__PURE__ */ C("button", {
199
207
  type: "button",
200
- onClick: () => C((e) => !e),
208
+ onClick: () => T((e) => !e),
201
209
  className: "w-full flex items-center justify-between gap-2 text-left text-xs font-medium text-text-secondary hover:text-text-primary transition-colors",
202
- "aria-expanded": v,
203
- children: [/* @__PURE__ */ b("span", { children: o("vibecontrols.plugins.commands", "Command reference") }), /* @__PURE__ */ b(f, { className: `size-3.5 transition-transform ${v ? "rotate-180" : ""}` })]
204
- }), v && /* @__PURE__ */ b("div", {
210
+ "aria-expanded": b,
211
+ children: [/* @__PURE__ */ S("span", { children: s("vibecontrols.plugins.commands", "Command reference") }), /* @__PURE__ */ S(m, { className: `size-3.5 transition-transform ${b ? "rotate-180" : ""}` })]
212
+ }), b && /* @__PURE__ */ S("div", {
205
213
  className: "rounded-md border border-border-default bg-bg-sunken px-2.5 py-2",
206
- children: /* @__PURE__ */ b("p", {
214
+ children: /* @__PURE__ */ S("p", {
207
215
  className: "text-xs text-text-secondary",
208
- children: o("vibecontrols.plugins.commandsHint", "See the agent admin sub-panel or the plugin README for the documented command list.")
216
+ children: s("vibecontrols.plugins.commandsHint", "See the agent admin sub-panel or the plugin README for the documented command list.")
209
217
  })
210
218
  })]
211
219
  })
@@ -213,137 +221,138 @@ function P({ plugin: e, agentId: t, installed: n, installing: r, installBusy: i,
213
221
  })
214
222
  });
215
223
  }
216
- function F() {
217
- let d = s(), f = o(), [p, m] = u(""), [h, y] = u("all"), S = l(() => ({
218
- page: d("vibecontrols.plugins.title", "Plugins"),
219
- tabs: k({
220
- items: A.map((e) => ({
224
+ function L() {
225
+ let f = c(), p = s(), m = l((e) => p(t(e)), [p]), [h, g] = d(""), [_, x] = d("all"), w = u(() => ({
226
+ page: f("vibecontrols.plugins.title", "Plugins"),
227
+ tabs: j({
228
+ items: M.map((e) => ({
221
229
  id: e.value,
222
- label: d(e.labelKey, e.labelFallback)
230
+ label: f(e.labelKey, e.labelFallback)
223
231
  })),
224
- value: h,
225
- set: y
232
+ value: _,
233
+ set: x
226
234
  }),
227
- search: O(m)
228
- }), [d, h]);
229
- D(S);
230
- let j = l(() => Object.values(e).sort((e, t) => e.displayName.localeCompare(t.displayName)), []), M = l(() => j.map((e) => e.packageName), [j]), N = i((e) => e.activeAgentId), { installed: F, installing: I, install: L, loading: R, error: z, errorIsAgentState: B, quotaExhausted: V, clearQuotaExhausted: H } = r(M, N), U = c((e) => {
231
- L(e);
232
- }, [L]), W = l(() => {
233
- let e = p.trim().toLowerCase();
234
- return j.filter((t) => h !== "all" && t.category !== h ? !1 : !e || `${t.displayName} ${t.description} ${t.packageName}`.toLowerCase().includes(e));
235
+ search: A(g)
236
+ }), [f, _]);
237
+ k(w);
238
+ let N = u(() => Object.values(e).sort((e, t) => e.displayName.localeCompare(t.displayName)), []), P = u(() => N.map((e) => e.packageName), [N]), F = a((e) => e.activeAgentId), { installed: L, installing: R, install: z, loading: B, error: V, errorIsAgentState: H, quotaExhausted: U, clearQuotaExhausted: W } = i(P, F), G = l((e) => {
239
+ z(e);
240
+ }, [z]), K = u(() => {
241
+ let e = h.trim().toLowerCase();
242
+ return N.filter((t) => _ !== "all" && t.category !== _ ? !1 : !e || `${t.displayName} ${t.description} ${t.packageName}`.toLowerCase().includes(e));
235
243
  }, [
236
- j,
237
- p,
238
- h
244
+ N,
245
+ h,
246
+ _
239
247
  ]);
240
- return /* @__PURE__ */ x(w, {
248
+ return /* @__PURE__ */ C(E, {
241
249
  padded: !1,
242
- children: [/* @__PURE__ */ x(E, {
250
+ children: [/* @__PURE__ */ C(O, {
243
251
  className: "flex flex-col h-full",
244
- children: [/* @__PURE__ */ x("div", {
252
+ children: [/* @__PURE__ */ C("div", {
245
253
  className: "sticky top-0 z-10 border-b border-border-subtle bg-bg-surface px-6 lg:px-8 pt-5 pb-4 space-y-3",
246
254
  children: [
247
- /* @__PURE__ */ x("div", {
255
+ /* @__PURE__ */ C("div", {
248
256
  className: "flex items-start gap-3",
249
257
  children: [
250
- /* @__PURE__ */ b("div", {
258
+ /* @__PURE__ */ S("div", {
251
259
  className: "flex size-9 flex-shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)]",
252
- children: /* @__PURE__ */ b(g, { className: "size-5 text-action-primary-bg" })
260
+ children: /* @__PURE__ */ S(v, { className: "size-5 text-action-primary-bg" })
253
261
  }),
254
- /* @__PURE__ */ x("div", {
262
+ /* @__PURE__ */ C("div", {
255
263
  className: "min-w-0 flex-1",
256
- children: [/* @__PURE__ */ b("h1", {
264
+ children: [/* @__PURE__ */ S("h1", {
257
265
  className: "text-2xl font-semibold tracking-tight text-text-primary",
258
- children: d("vibecontrols.plugins.title", "Plugins")
259
- }), /* @__PURE__ */ b("p", {
266
+ children: f("vibecontrols.plugins.title", "Plugins")
267
+ }), /* @__PURE__ */ S("p", {
260
268
  className: "text-sm text-text-secondary mt-0.5",
261
- children: d("vibecontrols.plugins.description", "Browse and install plugins to extend your VibeControls agents.")
269
+ children: f("vibecontrols.plugins.description", "Browse and install plugins to extend your VibeControls agents.")
262
270
  })]
263
271
  }),
264
- /* @__PURE__ */ b(t, {
272
+ /* @__PURE__ */ S(n, {
265
273
  compact: !0,
266
274
  className: "w-56 flex-shrink-0"
267
275
  })
268
276
  ]
269
277
  }),
270
- z && !B && /* @__PURE__ */ b("div", {
278
+ V && !H && /* @__PURE__ */ S("div", {
271
279
  role: "alert",
272
280
  className: "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",
273
- children: /* @__PURE__ */ b("span", { children: z })
281
+ children: /* @__PURE__ */ S("span", { children: V })
274
282
  }),
275
- z && B && /* @__PURE__ */ b("div", {
283
+ V && H && /* @__PURE__ */ S("div", {
276
284
  className: "flex items-start gap-2 rounded-md border border-status-warning-border bg-status-warning-bg px-3 py-2 text-xs text-status-warning-text",
277
- children: /* @__PURE__ */ b("span", { children: z })
285
+ children: /* @__PURE__ */ S("span", { children: V })
278
286
  }),
279
- /* @__PURE__ */ x("div", {
287
+ /* @__PURE__ */ C("div", {
280
288
  className: "relative",
281
289
  children: [
282
- /* @__PURE__ */ b(_, { className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-text-secondary" }),
283
- /* @__PURE__ */ b("input", {
290
+ /* @__PURE__ */ S(y, { className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-text-secondary" }),
291
+ /* @__PURE__ */ S("input", {
284
292
  type: "search",
285
- value: p,
286
- onChange: (e) => m(e.target.value),
287
- placeholder: d("vibecontrols.plugins.searchPlaceholder", "Search by name, description, or package…"),
288
- "aria-label": d("vibecontrols.plugins.searchLabel", "Search plugins"),
293
+ value: h,
294
+ onChange: (e) => g(e.target.value),
295
+ placeholder: f("vibecontrols.plugins.searchPlaceholder", "Search by name, description, or package…"),
296
+ "aria-label": f("vibecontrols.plugins.searchLabel", "Search plugins"),
289
297
  className: "w-full pl-10 pr-10 py-2 text-sm bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-action-primary-bg focus:border-transparent transition-all"
290
298
  }),
291
- p && /* @__PURE__ */ b("button", {
299
+ h && /* @__PURE__ */ S("button", {
292
300
  type: "button",
293
- onClick: () => m(""),
294
- "aria-label": d("vibecontrols.plugins.clearSearch", "Clear search"),
301
+ onClick: () => g(""),
302
+ "aria-label": f("vibecontrols.plugins.clearSearch", "Clear search"),
295
303
  className: "absolute right-3 top-1/2 -translate-y-1/2 p-0.5 rounded hover:bg-bg-elevated transition-colors",
296
- children: /* @__PURE__ */ b(v, { className: "size-4 text-text-secondary" })
304
+ children: /* @__PURE__ */ S(b, { className: "size-4 text-text-secondary" })
297
305
  })
298
306
  ]
299
307
  }),
300
- /* @__PURE__ */ b("div", {
308
+ /* @__PURE__ */ S("div", {
301
309
  className: "flex flex-wrap gap-2",
302
310
  role: "tablist",
303
- "aria-label": d("vibecontrols.plugins.categories", "Plugin categories"),
304
- children: A.map((e) => {
305
- let t = h === e.value;
306
- return /* @__PURE__ */ b("button", {
311
+ "aria-label": f("vibecontrols.plugins.categories", "Plugin categories"),
312
+ children: M.map((e) => {
313
+ let t = _ === e.value;
314
+ return /* @__PURE__ */ S("button", {
307
315
  type: "button",
308
316
  role: "tab",
309
317
  "aria-selected": t,
310
- onClick: () => y(e.value),
318
+ onClick: () => x(e.value),
311
319
  className: `px-3 py-1 text-xs rounded-full border transition-colors ${t ? "bg-action-primary-bg text-action-primary-text border-action-primary-bg" : "bg-bg-surface text-text-secondary border-border-default hover:bg-bg-sunken hover:text-text-primary"}`,
312
- children: d(e.labelKey, e.labelFallback)
320
+ children: f(e.labelKey, e.labelFallback)
313
321
  }, e.value);
314
322
  })
315
323
  })
316
324
  ]
317
- }), /* @__PURE__ */ x("div", {
325
+ }), /* @__PURE__ */ C("div", {
318
326
  className: "flex-1 px-4 sm:px-6 py-4 space-y-4",
319
- children: [/* @__PURE__ */ b(T, {
320
- icon: /* @__PURE__ */ b(g, { className: "size-4" }),
321
- children: d("vibecontrols.plugins.purpose", "Plugins extend what your agents can do — adding capabilities like Git, a GraphQL playground, or session providers. Browse this catalog to find a capability you need, install it onto an agent, and unlock new tabs and actions across VibeControls without writing any glue code yourself.")
322
- }), W.length === 0 ? /* @__PURE__ */ b(C, {
327
+ children: [/* @__PURE__ */ S(D, {
328
+ icon: /* @__PURE__ */ S(v, { className: "size-4" }),
329
+ children: f("vibecontrols.plugins.purpose", "Plugins extend what your agents can do — adding capabilities like Git, a GraphQL playground, or session providers. Browse this catalog to find a capability you need, install it onto an agent, and unlock new tabs and actions across VibeControls without writing any glue code yourself.")
330
+ }), K.length === 0 ? /* @__PURE__ */ S(T, {
323
331
  illustration: "empty-search",
324
- title: d("vibecontrols.plugins.empty.title", "No matching plugins"),
325
- description: d("vibecontrols.plugins.empty.description", "Try a different search term or category.")
326
- }) : /* @__PURE__ */ b("div", {
332
+ title: f("vibecontrols.plugins.empty.title", "No matching plugins"),
333
+ description: f("vibecontrols.plugins.empty.description", "Try a different search term or category.")
334
+ }) : /* @__PURE__ */ S("div", {
327
335
  className: "grid gap-3 grid-cols-1 sm:grid-cols-2 xl:grid-cols-3",
328
- children: W.map((e) => /* @__PURE__ */ b(P, {
336
+ children: K.map((e) => /* @__PURE__ */ S(I, {
329
337
  plugin: e,
330
- agentId: N,
331
- installed: !!F[e.packageName],
332
- installing: I === e.packageName,
333
- installBusy: R || I !== null,
334
- onInstall: U
338
+ agentId: F,
339
+ installed: !!L[e.packageName],
340
+ installing: R === e.packageName,
341
+ installBusy: B || R !== null,
342
+ onInstall: G,
343
+ onOpenDetails: m
335
344
  }, e.packageName))
336
345
  })]
337
346
  })]
338
- }), /* @__PURE__ */ b(n, {
339
- isOpen: V,
340
- onClose: H,
347
+ }), /* @__PURE__ */ S(r, {
348
+ isOpen: U,
349
+ onClose: W,
341
350
  onConfirm: () => {
342
- H(), f(a);
351
+ W(), p(o);
343
352
  },
344
- title: d("vibecontrols.plugins.quotaTitle", "Plugin quota reached"),
345
- message: d("vibecontrols.plugins.quotaMessage", "You've used all plugin install quota on your current plan. Upgrade to install more plugins.")
353
+ title: f("vibecontrols.plugins.quotaTitle", "Plugin quota reached"),
354
+ message: f("vibecontrols.plugins.quotaMessage", "You've used all plugin install quota on your current plan. Upgrade to install more plugins.")
346
355
  })]
347
356
  });
348
357
  }
349
- export { F as PluginsCatalogPage };
358
+ export { L as PluginsCatalogPage };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-vibecontrols",
3
- "version": "2026.1114.1",
3
+ "version": "2026.1115.2",
4
4
  "description": "VibeControls microfrontend for Burdenoff products",
5
5
  "type": "module",
6
6
  "files": [