@burdenoff/microfe-vibecontrols 2026.602.2 → 2026.602.3

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.
@@ -18,17 +18,19 @@ import { useActiveAgentProfile as we } from "../hooks/useActiveAgentProfile.js";
18
18
  import "../components/shared/index.js";
19
19
  import { isNative as Te, nativeNotify as Ee } from "../utils/nativeBridge.js";
20
20
  import { VIBE_PERMISSIONS as c } from "../constants/permissions.js";
21
- import { enableRemoteTaskExecution as De, isRemoteTaskDeniedError as Oe } from "../services/agentRemoteTaskGates.js";
22
- import { VibeDeckGrid as ke } from "../components/vibedeck/VibeDeckGrid.js";
23
- import { VibeDeckSwitcher as Ae } from "../components/vibedeck/VibeDeckSwitcher.js";
24
- import { VibeDeckForm as je } from "../components/vibedeck/VibeDeckForm.js";
25
- import { VibeDeckButtonForm as Me } from "../components/vibedeck/VibeDeckButtonForm.js";
26
- import { VibeDeckShareDialog as Ne } from "../components/vibedeck/VibeDeckShareDialog.js";
27
- import { VibeDeckExecutionLog as Pe } from "../components/vibedeck/VibeDeckExecutionLog.js";
21
+ import { EntityShareButton as De } from "../components/sharing/EntityShareButton.js";
22
+ import "../components/sharing/index.js";
23
+ import { enableRemoteTaskExecution as Oe, isRemoteTaskDeniedError as ke } from "../services/agentRemoteTaskGates.js";
24
+ import { VibeDeckGrid as Ae } from "../components/vibedeck/VibeDeckGrid.js";
25
+ import { VibeDeckSwitcher as je } from "../components/vibedeck/VibeDeckSwitcher.js";
26
+ import { VibeDeckForm as Me } from "../components/vibedeck/VibeDeckForm.js";
27
+ import { VibeDeckButtonForm as Ne } from "../components/vibedeck/VibeDeckButtonForm.js";
28
+ import { VibeDeckShareDialog as Pe } from "../components/vibedeck/VibeDeckShareDialog.js";
29
+ import { VibeDeckExecutionLog as Fe } from "../components/vibedeck/VibeDeckExecutionLog.js";
28
30
  import "../components/vibedeck/index.js";
29
- import { useCallback as l, useEffect as Fe, useMemo as Ie, useRef as Le, useState as u } from "react";
30
- import { useI18n as Re } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
31
- import { Copy as ze, Eye as Be, Pencil as Ve, Play as He, RefreshCw as Ue, Share2 as We, Star as Ge, Trash2 as Ke } from "lucide-react";
31
+ import { useCallback as l, useEffect as Ie, useMemo as Le, useRef as Re, useState as u } from "react";
32
+ import { useI18n as ze } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
33
+ import { Copy as Be, Eye as Ve, Pencil as He, Play as Ue, RefreshCw as We, Star as Ge, Trash2 as Ke } from "lucide-react";
32
34
  import { usePermissions as qe } from "@burdenoff/fe-libs/shared/providers/shell";
33
35
  import { AnimatePresence as Je } from "framer-motion";
34
36
  import { jsx as d, jsxs as f } from "react/jsx-runtime";
@@ -40,8 +42,8 @@ function Ze() {
40
42
  let Ze = de(), { workspaceId: m } = ue(), h = Ye(), { hasPermission: g, isLoading: Qe, permissions: _ } = qe(), v = ((e) => (t, n) => {
41
43
  let r = e.t(t);
42
44
  return r === t ? n : r;
43
- })(Re()), y = (Array.isArray(_) ? _ : _?.permissionStrings)?.some?.((e) => e.startsWith("vibedeck:")), $e = y ? g(c.VIBEDECK_LIST) : !0, et = y ? g(c.VIBEDECK_CREATE) : !0, tt = y ? g(c.VIBEDECK_UPDATE) : !0, nt = y ? g(c.VIBEDECK_DELETE) : !0, rt = y ? g(c.VIBEDECK_EXECUTE) : !0, it = Qe, { activeVibeDeckId: b, setActiveVibeDeckId: x, vibeDeckMode: at, setVibeDeckMode: ot } = fe(), S = at === "preview", st = S ? !1 : et, ct = S ? !1 : tt, lt = S ? !1 : nt, [C, w] = u({ type: "none" }), [ut, dt] = u(null), [T, ft] = u(/* @__PURE__ */ new Set()), [E, D] = u(/* @__PURE__ */ new Set()), [pt, mt] = u(null), [ht, O] = u(null), [k, A] = u(null), [gt, _t] = u([]), j = Le(/* @__PURE__ */ new Map()), [vt, yt] = u(ye), [bt, xt] = u([]), [St, Ct] = u(!0), [wt, Tt] = u(/* @__PURE__ */ new Map()), [Et, Dt] = u(null), [M, Ot] = u(null), [kt, At] = u(!1), { profiles: jt } = we(M?.agentId ?? null), Mt = jt.find((e) => e.isDefault)?.name ?? "default", N = Le(/* @__PURE__ */ new Map());
44
- Fe(() => {
45
+ })(ze()), y = (Array.isArray(_) ? _ : _?.permissionStrings)?.some?.((e) => e.startsWith("vibedeck:")), $e = y ? g(c.VIBEDECK_LIST) : !0, et = y ? g(c.VIBEDECK_CREATE) : !0, tt = y ? g(c.VIBEDECK_UPDATE) : !0, nt = y ? g(c.VIBEDECK_DELETE) : !0, rt = y ? g(c.VIBEDECK_EXECUTE) : !0, it = Qe, { activeVibeDeckId: b, setActiveVibeDeckId: x, vibeDeckMode: at, setVibeDeckMode: ot } = fe(), S = at === "preview", st = S ? !1 : et, ct = S ? !1 : tt, lt = S ? !1 : nt, [C, w] = u({ type: "none" }), [ut, dt] = u(null), [T, ft] = u(/* @__PURE__ */ new Set()), [E, D] = u(/* @__PURE__ */ new Set()), [pt, mt] = u(null), [ht, O] = u(null), [k, A] = u(null), [gt, _t] = u([]), j = Re(/* @__PURE__ */ new Map()), [vt, yt] = u(ye), [bt, xt] = u([]), [St, Ct] = u(!0), [wt, Tt] = u(/* @__PURE__ */ new Map()), [Et, Dt] = u(null), [M, Ot] = u(null), [kt, At] = u(!1), { profiles: jt } = we(M?.agentId ?? null), Mt = jt.find((e) => e.isDefault)?.name ?? "default", N = Re(/* @__PURE__ */ new Map());
46
+ Ie(() => {
45
47
  let e = N.current;
46
48
  return () => {
47
49
  for (let t of e.values()) clearTimeout(t);
@@ -72,7 +74,7 @@ function Ze() {
72
74
  r && clearTimeout(r), N.current.set(e, n);
73
75
  }
74
76
  }, []);
75
- Fe(() => {
77
+ Ie(() => {
76
78
  let e = j.current;
77
79
  return () => {
78
80
  for (let t of e.values()) clearTimeout(t);
@@ -102,10 +104,10 @@ function Ze() {
102
104
  }, []), { data: Ft, loading: It, error: Lt, refetch: R } = re({
103
105
  variables: { pagination: { limit: 50 } },
104
106
  skip: it
105
- }), z = Ie(() => Ft?.vibeDecks?.items || [], [Ft]), B = b || z.find((e) => e.isDefault)?.id || z[0]?.id || null, { data: Rt, loading: zt, refetch: Bt } = te({
107
+ }), z = Le(() => Ft?.vibeDecks?.items || [], [Ft]), B = b || z.find((e) => e.isDefault)?.id || z[0]?.id || null, { data: Rt, loading: zt, refetch: Bt } = te({
106
108
  variables: { id: B },
107
109
  skip: !B || it
108
- }), V = Rt?.vibeDeck, H = Ie(() => z.filter((e) => T.has(e.id)), [z, T]), U = Ie(() => V?.buttons?.filter((e) => E.has(e.id)) ?? [], [V?.buttons, E]), Vt = z.length > 0 && z.every((e) => T.has(e.id)), Ht = z.some((e) => T.has(e.id)) && !Vt, Ut = (V?.buttons?.length ?? 0) > 0 && (V?.buttons ?? []).every((e) => E.has(e.id)), Wt = (V?.buttons ?? []).some((e) => E.has(e.id)) && !Ut, { data: Gt } = ne({
110
+ }), V = Rt?.vibeDeck, H = Le(() => z.filter((e) => T.has(e.id)), [z, T]), U = Le(() => V?.buttons?.filter((e) => E.has(e.id)) ?? [], [V?.buttons, E]), Vt = z.length > 0 && z.every((e) => T.has(e.id)), Ht = z.some((e) => T.has(e.id)) && !Vt, Ut = (V?.buttons?.length ?? 0) > 0 && (V?.buttons ?? []).every((e) => E.has(e.id)), Wt = (V?.buttons ?? []).some((e) => E.has(e.id)) && !Ut, { data: Gt } = ne({
109
111
  variables: { pagination: { limit: 100 } },
110
112
  fetchPolicy: "cache-and-network",
111
113
  skip: it
@@ -114,7 +116,7 @@ function Ze() {
114
116
  name: e.name,
115
117
  isActive: e.isActive
116
118
  })), [qt, { loading: Jt }] = t({ refetchQueries: ["ListVibeDecks"] }), { setDraftTagIds: Yt, flushTags: Xt } = ge("VIBECONTROLS_VIBEDECK"), [Zt, { loading: Qt }] = se({ refetchQueries: ["ListVibeDecks", "GetVibeDeck"] }), [W] = r({ refetchQueries: ["ListVibeDecks"] }), [G] = ae({ refetchQueries: ["ListVibeDecks", "GetVibeDeck"] }), [K] = i({ refetchQueries: ["ListVibeDecks"] }), [$t, { loading: en }] = e({ refetchQueries: ["GetVibeDeck"] }), [tn, { loading: nn }] = oe({ refetchQueries: ["GetVibeDeck"] }), [q] = n({ refetchQueries: ["GetVibeDeck"] }), [rn] = ie({ refetchQueries: ["GetVibeDeck"] }), [J] = ee();
117
- Fe(() => {
119
+ Ie(() => {
118
120
  D(/* @__PURE__ */ new Set());
119
121
  }, [B]);
120
122
  let an = l((e, t) => {
@@ -217,7 +219,7 @@ function Ze() {
217
219
  dt(e), F(e, "executing");
218
220
  try {
219
221
  let n = (await J({ variables: { id: e } })).data?.executeVibeDeckButton;
220
- if (n && Oe(n) && n.agentId) {
222
+ if (n && ke(n) && n.agentId) {
221
223
  F(e, "error"), P(i, {
222
224
  status: "error",
223
225
  error: t ? "Remote task execution is disabled on this agent." : "Remote execution still blocked after enabling — check the agent’s Security settings.",
@@ -276,7 +278,7 @@ function Ze() {
276
278
  let { buttonId: n, agentId: r } = M;
277
279
  At(!0);
278
280
  try {
279
- await De({
281
+ await Oe({
280
282
  id: r,
281
283
  profile: Mt
282
284
  }, {
@@ -543,26 +545,23 @@ function Ze() {
543
545
  className: `flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-all ${S ? "bg-action-primary-bg text-action-primary-text shadow-sm" : "text-text-tertiary hover:text-text-primary"}`,
544
546
  title: S ? "Preview mode — execute only" : "Switch to Preview mode",
545
547
  "aria-pressed": S,
546
- children: [/* @__PURE__ */ d(Be, { size: 14 }), "Preview"]
548
+ children: [/* @__PURE__ */ d(Ve, { size: 14 }), "Preview"]
547
549
  }), /* @__PURE__ */ f("button", {
548
550
  type: "button",
549
551
  onClick: () => ot("edit"),
550
552
  className: `flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-all ${S ? "text-text-tertiary hover:text-text-primary" : "bg-action-primary-bg text-action-primary-text shadow-sm"}`,
551
553
  title: S ? "Switch to Edit mode" : "Edit mode — full editing",
552
554
  "aria-pressed": !S,
553
- children: [/* @__PURE__ */ d(Ve, { size: 14 }), "Edit"]
555
+ children: [/* @__PURE__ */ d(He, { size: 14 }), "Edit"]
554
556
  })]
555
557
  }),
556
- B && V && tt && /* @__PURE__ */ d("button", {
557
- type: "button",
558
- onClick: () => w({
559
- type: "shareDeck",
560
- deckId: B,
561
- deckName: V.name
562
- }),
563
- className: "p-2 rounded-lg hover:bg-bg-tertiary text-text-tertiary hover:text-text-primary transition-colors",
564
- title: "Share deck",
565
- children: /* @__PURE__ */ d(We, { size: 16 })
558
+ B && V && /* @__PURE__ */ d(De, {
559
+ entity: "vibedeck",
560
+ resource: {
561
+ id: B,
562
+ name: V.name
563
+ },
564
+ label: v("vibecontrols.vibedeck.share.shareDeck", "Share deck")
566
565
  }),
567
566
  /* @__PURE__ */ d("button", {
568
567
  type: "button",
@@ -571,7 +570,7 @@ function Ze() {
571
570
  },
572
571
  className: "p-2 rounded-lg hover:bg-bg-tertiary text-text-tertiary hover:text-text-primary transition-colors",
573
572
  title: "Refresh",
574
- children: /* @__PURE__ */ d(Ue, { size: 16 })
573
+ children: /* @__PURE__ */ d(We, { size: 16 })
575
574
  })
576
575
  ]
577
576
  })
@@ -624,7 +623,7 @@ function Ze() {
624
623
  children: /* @__PURE__ */ f("span", {
625
624
  className: "inline-flex items-center gap-2",
626
625
  children: [
627
- /* @__PURE__ */ d(ze, { size: 14 }),
626
+ /* @__PURE__ */ d(Be, { size: 14 }),
628
627
  "Duplicate Selected",
629
628
  H.length > 0 ? ` (${H.length})` : ""
630
629
  ]
@@ -650,7 +649,7 @@ function Ze() {
650
649
  }),
651
650
  /* @__PURE__ */ d("div", {
652
651
  "data-tour": "vibedeck-switcher",
653
- children: /* @__PURE__ */ d(Ae, {
652
+ children: /* @__PURE__ */ d(je, {
654
653
  decks: z.map((e) => ({
655
654
  id: e.id,
656
655
  name: e.name,
@@ -746,7 +745,7 @@ function Ze() {
746
745
  children: /* @__PURE__ */ f("span", {
747
746
  className: "inline-flex items-center gap-2",
748
747
  children: [
749
- /* @__PURE__ */ d(He, { size: 14 }),
748
+ /* @__PURE__ */ d(Ue, { size: 14 }),
750
749
  "Execute Selected",
751
750
  U.length > 0 ? ` (${U.length})` : ""
752
751
  ]
@@ -772,7 +771,7 @@ function Ze() {
772
771
  }), /* @__PURE__ */ f("div", {
773
772
  "data-tour": "vibedeck-grid",
774
773
  className: "relative",
775
- children: [/* @__PURE__ */ d(ke, {
774
+ children: [/* @__PURE__ */ d(Ae, {
776
775
  gridColumns: V.gridColumns,
777
776
  gridRows: V.gridRows,
778
777
  buttons: (V.buttons || []).map((e) => ({
@@ -851,7 +850,7 @@ function Ze() {
851
850
  }),
852
851
  bt.length > 0 && /* @__PURE__ */ d("div", {
853
852
  "data-tour": "vibedeck-execution-log",
854
- children: /* @__PURE__ */ d(Pe, {
853
+ children: /* @__PURE__ */ d(Fe, {
855
854
  entries: bt,
856
855
  expanded: St,
857
856
  onToggleExpanded: () => Ct((e) => !e),
@@ -877,7 +876,7 @@ function Ze() {
877
876
  })]
878
877
  }, e.id))
879
878
  }) }),
880
- C.type === "createDeck" && /* @__PURE__ */ d(je, {
879
+ C.type === "createDeck" && /* @__PURE__ */ d(Me, {
881
880
  title: "Create Vibe Deck",
882
881
  onSubmit: cn,
883
882
  onCancel: () => {
@@ -898,7 +897,7 @@ function Ze() {
898
897
  })]
899
898
  })
900
899
  }),
901
- C.type === "editDeck" && $ && /* @__PURE__ */ d(je, {
900
+ C.type === "editDeck" && $ && /* @__PURE__ */ d(Me, {
902
901
  title: "Edit Vibe Deck",
903
902
  initialData: {
904
903
  name: $.name,
@@ -918,7 +917,7 @@ function Ze() {
918
917
  entityId: $.id
919
918
  })] })
920
919
  }),
921
- C.type === "createButton" && /* @__PURE__ */ d(Me, {
920
+ C.type === "createButton" && /* @__PURE__ */ d(Ne, {
922
921
  title: "Add Button",
923
922
  agents: Kt,
924
923
  onSubmit: mn,
@@ -929,7 +928,7 @@ function Ze() {
929
928
  buttonRow: C.row,
930
929
  buttonColumn: C.column
931
930
  }),
932
- C.type === "editButton" && Q && /* @__PURE__ */ d(Me, {
931
+ C.type === "editButton" && Q && /* @__PURE__ */ d(Ne, {
933
932
  title: "Edit Button",
934
933
  initialData: {
935
934
  label: Q.label,
@@ -998,7 +997,7 @@ function Ze() {
998
997
  onClose: () => O(null),
999
998
  isLoading: k === "deleteButton"
1000
999
  }),
1001
- C.type === "shareDeck" && /* @__PURE__ */ d(Ne, {
1000
+ C.type === "shareDeck" && /* @__PURE__ */ d(Pe, {
1002
1001
  vibeDeckId: C.deckId,
1003
1002
  vibeDeckName: C.deckName,
1004
1003
  onClose: () => w({ type: "none" })