@burdenoff/microfe-vibecontrols 2026.602.8 → 2026.602.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/components/actions/ActionForm.js +260 -252
  2. package/dist/components/actions/ActionForm.js.map +1 -1
  3. package/dist/components/ai/InstructionFilesManager.js +138 -135
  4. package/dist/components/ai/InstructionFilesManager.js.map +1 -1
  5. package/dist/components/aliases/AliasManager.js +225 -224
  6. package/dist/components/aliases/AliasManager.js.map +1 -1
  7. package/dist/components/common/ActionAgentTargetNotice.js +125 -0
  8. package/dist/components/common/ActionAgentTargetNotice.js.map +1 -0
  9. package/dist/components/common/CommandEditor.js +49 -0
  10. package/dist/components/common/CommandEditor.js.map +1 -0
  11. package/dist/components/common/actionAgentTarget.js +55 -0
  12. package/dist/components/common/actionAgentTarget.js.map +1 -0
  13. package/dist/components/common/commandHighlight.js +190 -0
  14. package/dist/components/common/commandHighlight.js.map +1 -0
  15. package/dist/components/vibecalendar/ScheduleTaskModal.js +151 -149
  16. package/dist/components/vibecalendar/ScheduleTaskModal.js.map +1 -1
  17. package/dist/components/vibedeck/VibeDeckButtonForm.js +231 -219
  18. package/dist/components/vibedeck/VibeDeckButtonForm.js.map +1 -1
  19. package/dist/generated/wspace-operations.js +1 -0
  20. package/dist/generated/wspace-operations.js.map +1 -1
  21. package/dist/generated/wspace-types.js.map +1 -1
  22. package/dist/pages/ActionsPage.js +233 -224
  23. package/dist/pages/ActionsPage.js.map +1 -1
  24. package/dist/pages/AgentDetailsPage.js +490 -489
  25. package/dist/pages/AgentDetailsPage.js.map +1 -1
  26. package/dist/pages/SessionDetailsPage.js +401 -401
  27. package/dist/pages/SessionDetailsPage.js.map +1 -1
  28. package/package.json +1 -1
@@ -28,14 +28,14 @@ import "../components/actions/index.js";
28
28
  import { useCallback as u, useEffect as Oe, useMemo as d, useState as f } from "react";
29
29
  import { useI18n as ke } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
30
30
  import { Copy as Ae, Play as je, Plus as Me, RefreshCw as Ne, Trash2 as Pe } from "lucide-react";
31
- import { useNavigate as Fe } from "react-router-dom";
32
- import { usePermissions as Ie } from "@burdenoff/fe-libs/shared/providers/shell";
31
+ import { useNavigate as Fe, useSearchParams as Ie } from "react-router-dom";
32
+ import { usePermissions as Le } from "@burdenoff/fe-libs/shared/providers/shell";
33
33
  import { AnimatePresence as p } from "framer-motion";
34
34
  import { jsx as m, jsxs as h } from "react/jsx-runtime";
35
- import { AccessDenied as Le } from "@burdenoff/fe-libs/shared/components";
35
+ import { AccessDenied as Re } from "@burdenoff/fe-libs/shared/components";
36
36
  import { MotionPage as g } from "@burdenoff/fe-libs/shared/motion";
37
37
  //#region src/pages/ActionsPage.tsx
38
- var Re = [
38
+ var ze = [
39
39
  {
40
40
  value: "COMMAND",
41
41
  label: "Command"
@@ -52,7 +52,7 @@ var Re = [
52
52
  value: "WORKFLOW",
53
53
  label: "Workflow"
54
54
  }
55
- ], ze = [
55
+ ], Be = [
56
56
  {
57
57
  value: "MANUAL",
58
58
  label: "Manual"
@@ -71,43 +71,43 @@ var Re = [
71
71
  }
72
72
  ];
73
73
  function _() {
74
- let _ = Fe(), { workspaceId: Be } = ae(), { hasPermission: v, isLoading: Ve, permissions: y } = Ie(), b = ((e) => (t, n) => {
74
+ let _ = Fe(), [v, Ve] = Ie(), { workspaceId: He } = ae(), { hasPermission: y, isLoading: Ue, permissions: b } = Le(), x = ((e) => (t, n) => {
75
75
  let r = e.t(t);
76
76
  return r === t ? n : r;
77
- })(ke()), x = (Array.isArray(y) ? y : y?.permissionStrings)?.some?.((e) => e.startsWith("action:")), He = x ? v(l.ACTION_LIST) : !0, Ue = x ? v(l.ACTION_CREATE) : !0, We = x ? v(l.ACTION_UPDATE) : !0, Ge = x ? v(l.ACTION_DELETE) : !0, Ke = x ? v(l.ACTION_EXECUTE) : !0, S = Ve, [C, w] = f({ type: "none" }), [qe, T] = f([]), [E, Je] = f(""), [D, Ye] = f(null), [O, Xe] = f(null), [k, A] = f(null), [j, M] = f(/* @__PURE__ */ new Set()), [Ze, Qe] = f(null), [$e, N] = f(null), [P, F] = f(null), [I, L] = f(null), [R, z] = f(null), [et, tt] = f(!1), { profiles: nt } = ye(R?.agentId ?? null), rt = nt.find((e) => e.isDefault)?.name ?? "default", [B, V] = f(c), [H, it] = f(c), U = u((e, t, n, r = 1e4) => {
77
+ })(ke()), S = (Array.isArray(b) ? b : b?.permissionStrings)?.some?.((e) => e.startsWith("action:")), We = S ? y(l.ACTION_LIST) : !0, Ge = S ? y(l.ACTION_CREATE) : !0, Ke = S ? y(l.ACTION_UPDATE) : !0, qe = S ? y(l.ACTION_DELETE) : !0, Je = S ? y(l.ACTION_EXECUTE) : !0, C = Ue, [w, T] = f({ type: "none" }), [Ye, E] = f([]), [D, Xe] = f(""), [O, Ze] = f(null), [k, Qe] = f(null), [A, j] = f(null), [M, N] = f(/* @__PURE__ */ new Set()), [$e, et] = f(null), [tt, P] = f(null), [F, I] = f(null), [L, R] = f(null), [z, B] = f(null), [nt, rt] = f(!1), { profiles: it } = ye(z?.agentId ?? null), at = it.find((e) => e.isDefault)?.name ?? "default", [V, ot] = f(c), [st, ct] = f(c), H = u((e, t, n, r = 1e4) => {
78
78
  let i = Date.now() + Math.random();
79
- T((r) => [...r, {
79
+ E((r) => [...r, {
80
80
  message: e,
81
81
  variant: t,
82
82
  detail: n,
83
83
  id: i
84
- }]), t === "success" && setTimeout(() => T((e) => e.filter((e) => e.id !== i)), r);
85
- }, []), at = u((e) => {
86
- T((t) => t.filter((t) => t.id !== e));
87
- }, []), { data: ot, loading: st, error: ct, refetch: W } = ee({
84
+ }]), t === "success" && setTimeout(() => E((e) => e.filter((e) => e.id !== i)), r);
85
+ }, []), lt = u((e) => {
86
+ E((t) => t.filter((t) => t.id !== e));
87
+ }, []), { data: ut, loading: dt, error: ft, refetch: U } = ee({
88
88
  variables: {
89
89
  filter: {
90
- ...D && D !== "all" ? { actionType: D } : {},
91
- ...O && O !== "all" ? { triggerType: O } : {},
92
- ...E ? { search: E } : {}
90
+ ...O && O !== "all" ? { actionType: O } : {},
91
+ ...k && k !== "all" ? { triggerType: k } : {},
92
+ ...D ? { search: D } : {}
93
93
  },
94
94
  pagination: { limit: 50 }
95
95
  },
96
- skip: S
97
- }), G = d(() => ot?.actions?.items || [], [ot]), { data: lt } = i({
98
- variables: { id: k },
99
- skip: !k || S
100
- }), K = lt?.action, ut = K?.recentExecutions || [], { data: dt } = te({
96
+ skip: C
97
+ }), W = d(() => ut?.actions?.items || [], [ut]), { data: pt } = i({
98
+ variables: { id: A },
99
+ skip: !A || C
100
+ }), G = pt?.action, mt = G?.recentExecutions || [], { data: ht } = te({
101
101
  variables: { pagination: { limit: 100 } },
102
102
  fetchPolicy: "cache-and-network",
103
- skip: S
104
- }), ft = d(() => (dt?.vibecontrolsAgents ?? []).map((e) => ({
103
+ skip: C
104
+ }), K = d(() => (ht?.vibecontrolsAgents ?? []).map((e) => ({
105
105
  id: e.id,
106
106
  name: e.name,
107
107
  isActive: e.isActive
108
- })), [dt]), [pt, { loading: mt }] = e({ refetchQueries: ["ListActions"] }), { setDraftTagIds: ht, flushTags: gt } = ue("VIBECONTROLS_ACTION"), [_t, { loading: vt }] = ne({ refetchQueries: ["ListActions", "GetAction"] }), [q] = t({ refetchQueries: ["ListActions"] }), [J] = r({ refetchQueries: ["GetAction"] }), [Y] = n({ refetchQueries: ["ListActions"] }), yt = u(async (e) => {
108
+ })), [ht]), [gt, { loading: _t }] = e({ refetchQueries: ["ListActions"] }), { setDraftTagIds: vt, flushTags: yt } = ue("VIBECONTROLS_ACTION"), [bt, { loading: xt }] = ne({ refetchQueries: ["ListActions", "GetAction"] }), [q] = t({ refetchQueries: ["ListActions"] }), [J] = r({ refetchQueries: ["GetAction"] }), [Y] = n({ refetchQueries: ["ListActions"] }), St = u(async (e) => {
109
109
  try {
110
- let t = await pt({ variables: { input: {
110
+ let t = await gt({ variables: { input: {
111
111
  name: e.name,
112
112
  displayName: e.displayName || null,
113
113
  description: e.description || null,
@@ -128,30 +128,30 @@ function _() {
128
128
  timeoutMs: e.timeoutMs,
129
129
  retryCount: e.retryCount,
130
130
  confirmationRequired: e.confirmationRequired,
131
- ...ge(B)
131
+ ...ge(V)
132
132
  } } });
133
133
  if (t.error && o(t.error)) {
134
- w({ type: "none" }), s(), L("action");
134
+ T({ type: "none" }), s(), R("action");
135
135
  return;
136
136
  }
137
137
  let n = t.data?.createAction?.id;
138
- w({ type: "none" }), U("Action created", "success"), V(c), n && await gt(n);
138
+ T({ type: "none" }), H("Action created", "success"), ot(c), n && await yt(n);
139
139
  } catch (e) {
140
140
  if (o(e)) {
141
- w({ type: "none" }), s(), L("action");
141
+ T({ type: "none" }), s(), R("action");
142
142
  return;
143
143
  }
144
- U(e instanceof Error ? e.message : "Failed to create action", "error");
144
+ H(e instanceof Error ? e.message : "Failed to create action", "error");
145
145
  }
146
146
  }, [
147
- pt,
148
147
  gt,
149
- U,
150
- B
151
- ]), bt = u(async (e) => {
152
- if (C.type === "edit") try {
153
- await _t({ variables: {
154
- id: C.actionId,
148
+ yt,
149
+ H,
150
+ V
151
+ ]), Ct = u(async (e) => {
152
+ if (w.type === "edit") try {
153
+ await bt({ variables: {
154
+ id: w.actionId,
155
155
  input: {
156
156
  displayName: e.displayName || null,
157
157
  description: e.description || null,
@@ -172,33 +172,33 @@ function _() {
172
172
  timeoutMs: e.timeoutMs,
173
173
  retryCount: e.retryCount,
174
174
  confirmationRequired: e.confirmationRequired,
175
- ...ge(H)
175
+ ...ge(st)
176
176
  }
177
- } }), w({ type: "none" }), U("Action updated", "success");
177
+ } }), T({ type: "none" }), H("Action updated", "success");
178
178
  } catch (e) {
179
- U(e instanceof Error ? e.message : "Failed to update action", "error");
179
+ H(e instanceof Error ? e.message : "Failed to update action", "error");
180
180
  }
181
181
  }, [
182
- _t,
183
- C,
184
- U,
185
- H
186
- ]), xt = u(async () => {
187
- if (C.type === "confirmDelete") try {
188
- await q({ variables: { id: C.id } }), k === C.id && A(null), w({ type: "none" }), U("Action deleted", "success"), be() && xe("success");
182
+ bt,
183
+ w,
184
+ H,
185
+ st
186
+ ]), wt = u(async () => {
187
+ if (w.type === "confirmDelete") try {
188
+ await q({ variables: { id: w.id } }), A === w.id && j(null), T({ type: "none" }), H("Action deleted", "success"), be() && xe("success");
189
189
  } catch (e) {
190
- U(e instanceof Error ? e.message : "Failed to delete action", "error"), be() && xe("error");
190
+ H(e instanceof Error ? e.message : "Failed to delete action", "error"), be() && xe("error");
191
191
  }
192
192
  }, [
193
- C,
193
+ w,
194
194
  q,
195
- k,
196
- U
197
- ]), St = async (e) => {
198
- let t = G.find((t) => t.id === e);
195
+ A,
196
+ H
197
+ ]), Tt = async (e) => {
198
+ let t = W.find((t) => t.id === e);
199
199
  if (t) {
200
200
  if (t.confirmationRequired) {
201
- w({
201
+ T({
202
202
  type: "confirmExecute",
203
203
  actionId: e,
204
204
  name: t.displayName || t.name
@@ -208,190 +208,199 @@ function _() {
208
208
  await X(e);
209
209
  }
210
210
  }, X = u(async (e, t = !0) => {
211
- Qe(e);
211
+ et(e);
212
212
  try {
213
213
  let n = await J({ variables: { id: e } });
214
214
  if (n.error && o(n.error)) {
215
- s(), L("command-execution");
215
+ s(), R("command-execution");
216
216
  return;
217
217
  }
218
218
  let r = n.data?.executeAction;
219
219
  if (r && we(r) && r.agentId) {
220
- t ? z({
220
+ t ? B({
221
221
  actionId: e,
222
222
  agentId: r.agentId
223
- }) : U("Remote execution still blocked after enabling — check the agent’s Security settings.", "error", r.output || r.errorMessage);
223
+ }) : H("Remote execution still blocked after enabling — check the agent’s Security settings.", "error", r.output || r.errorMessage);
224
224
  return;
225
225
  }
226
- r && U(r.status === "SUCCESS" || r.status === "COMPLETED" ? "Action executed successfully" : "Action execution failed", r.status === "SUCCESS" || r.status === "COMPLETED" ? "success" : "error", r.output || r.errorMessage);
226
+ r && H(r.status === "SUCCESS" || r.status === "COMPLETED" ? "Action executed successfully" : "Action execution failed", r.status === "SUCCESS" || r.status === "COMPLETED" ? "success" : "error", r.output || r.errorMessage);
227
227
  } catch (e) {
228
228
  if (o(e)) {
229
- s(), L("command-execution");
229
+ s(), R("command-execution");
230
230
  return;
231
231
  }
232
- U(e instanceof Error ? e.message : "Execution failed", "error");
232
+ H(e instanceof Error ? e.message : "Execution failed", "error");
233
233
  } finally {
234
- Qe(null);
234
+ et(null);
235
235
  }
236
- }, [J, U]), Ct = u(async () => {
237
- if (C.type !== "confirmExecute") return;
238
- let e = C.actionId;
239
- w({ type: "none" }), await X(e);
240
- }, [C, X]), wt = u(async ({ shell: e, file: t }) => {
241
- if (!R) return;
242
- let { actionId: n, agentId: r } = R;
243
- tt(!0);
236
+ }, [J, H]), Et = u(async () => {
237
+ if (w.type !== "confirmExecute") return;
238
+ let e = w.actionId;
239
+ T({ type: "none" }), await X(e);
240
+ }, [w, X]), Dt = u(async ({ shell: e, file: t }) => {
241
+ if (!z) return;
242
+ let { actionId: n, agentId: r } = z;
243
+ rt(!0);
244
244
  try {
245
245
  await Ce({
246
246
  id: r,
247
- profile: rt
247
+ profile: at
248
248
  }, {
249
249
  shell: e,
250
250
  file: t
251
- }), z(null), await X(n, !1);
251
+ }), B(null), await X(n, !1);
252
252
  } catch (e) {
253
- U(e instanceof Error ? e.message : "Failed to enable remote execution", "error");
253
+ H(e instanceof Error ? e.message : "Failed to enable remote execution", "error");
254
254
  } finally {
255
- tt(!1);
255
+ rt(!1);
256
256
  }
257
257
  }, [
258
- R,
259
- rt,
258
+ z,
259
+ at,
260
260
  X,
261
- U
262
- ]), Tt = u(async (e) => {
263
- let t = G.find((t) => t.id === e);
261
+ H
262
+ ]), Ot = u(async (e) => {
263
+ let t = W.find((t) => t.id === e);
264
264
  if (t) try {
265
265
  await Y({ variables: {
266
266
  id: e,
267
267
  name: `${t.name}-copy`
268
- } }), U("Action duplicated", "success");
268
+ } }), H("Action duplicated", "success");
269
269
  } catch (e) {
270
- U(e instanceof Error ? e.message : "Failed to duplicate action", "error");
270
+ H(e instanceof Error ? e.message : "Failed to duplicate action", "error");
271
271
  }
272
272
  }, [
273
- G,
273
+ W,
274
274
  Y,
275
- U
276
- ]), Z = d(() => C.type === "edit" && G.find((e) => e.id === C.actionId) || null, [C, G]);
275
+ H
276
+ ]), Z = d(() => w.type === "edit" && W.find((e) => e.id === w.actionId) || null, [w, W]);
277
277
  Oe(() => {
278
- if (C.type === "edit" && Z) {
278
+ if (w.type === "edit" && Z) {
279
279
  let e = Z;
280
- it({
280
+ ct({
281
281
  vibeId: e.vibeId ?? null,
282
282
  visibility: e.visibility ?? "PRIVATE"
283
283
  });
284
- } else C.type === "create" && V(c);
285
- }, [C.type, Z]);
286
- let Q = d(() => G.filter((e) => j.has(e.id)), [G, j]), Et = G.length > 0 && G.every((e) => j.has(e.id)), Dt = G.some((e) => j.has(e.id)) && !Et, Ot = u((e, t) => {
287
- M((n) => {
284
+ } else w.type === "create" && ot(c);
285
+ }, [w.type, Z]), Oe(() => {
286
+ let e = v.get("editAction");
287
+ if (!e) return;
288
+ T({
289
+ type: "edit",
290
+ actionId: e
291
+ });
292
+ let t = new URLSearchParams(v);
293
+ t.delete("editAction"), Ve(t, { replace: !0 });
294
+ }, [v, Ve]);
295
+ let Q = d(() => W.filter((e) => M.has(e.id)), [W, M]), kt = W.length > 0 && W.every((e) => M.has(e.id)), At = W.some((e) => M.has(e.id)) && !kt, jt = u((e, t) => {
296
+ N((n) => {
288
297
  let r = new Set(n);
289
298
  return t ? r.add(e) : r.delete(e), r;
290
299
  });
291
- }, []), kt = u((e) => {
292
- M((t) => {
300
+ }, []), Mt = u((e) => {
301
+ N((t) => {
293
302
  let n = new Set(t);
294
- return G.forEach((t) => {
303
+ return W.forEach((t) => {
295
304
  e ? n.add(t.id) : n.delete(t.id);
296
305
  }), n;
297
306
  });
298
- }, [G]), $ = u(() => {
299
- M(/* @__PURE__ */ new Set());
300
- }, []), At = u(async () => {
307
+ }, [W]), $ = u(() => {
308
+ N(/* @__PURE__ */ new Set());
309
+ }, []), Nt = u(async () => {
301
310
  if (Q.length !== 0) {
302
- F("duplicate");
311
+ I("duplicate");
303
312
  try {
304
313
  let e = await Promise.allSettled(Q.map((e) => Y({ variables: {
305
314
  id: e.id,
306
315
  name: `${e.name}-copy`
307
316
  } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
308
- U(`Duplicated ${t} action${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`, n > 0 ? "error" : "success"), $(), await W();
317
+ H(`Duplicated ${t} action${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`, n > 0 ? "error" : "success"), $(), await U();
309
318
  } catch (e) {
310
- U(e instanceof Error ? e.message : "Failed to duplicate actions", "error");
319
+ H(e instanceof Error ? e.message : "Failed to duplicate actions", "error");
311
320
  } finally {
312
- F(null);
321
+ I(null);
313
322
  }
314
323
  }
315
324
  }, [
316
325
  Q,
317
326
  Y,
318
- U,
327
+ H,
319
328
  $,
320
- W
321
- ]), jt = u(async () => {
329
+ U
330
+ ]), Pt = u(async () => {
322
331
  if (Q.length !== 0) {
323
- F("delete");
332
+ I("delete");
324
333
  try {
325
334
  let e = await Promise.allSettled(Q.map((e) => q({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
326
- k && j.has(k) && A(null), U(`Deleted ${t} action${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`, n > 0 ? "error" : "success"), $(), N(null), await W();
335
+ A && M.has(A) && j(null), H(`Deleted ${t} action${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`, n > 0 ? "error" : "success"), $(), P(null), await U();
327
336
  } catch (e) {
328
- U(e instanceof Error ? e.message : "Failed to delete actions", "error");
337
+ H(e instanceof Error ? e.message : "Failed to delete actions", "error");
329
338
  } finally {
330
- F(null);
339
+ I(null);
331
340
  }
332
341
  }
333
342
  }, [
334
343
  Q,
335
344
  q,
336
- k,
337
- j,
338
- U,
345
+ A,
346
+ M,
347
+ H,
339
348
  $,
340
- W
341
- ]), Mt = u(async () => {
349
+ U
350
+ ]), Ft = u(async () => {
342
351
  if (Q.length === 0) return;
343
- F("execute");
352
+ I("execute");
344
353
  let e = 0, t = 0, n = !1;
345
354
  try {
346
355
  for (let r of Q) try {
347
356
  let i = await J({ variables: { id: r.id } });
348
357
  if (i.error && o(i.error)) {
349
- s(), L("command-execution"), n = !0;
358
+ s(), R("command-execution"), n = !0;
350
359
  break;
351
360
  }
352
361
  let ee = i.data?.executeAction;
353
362
  ee?.status === "SUCCESS" || ee?.status === "COMPLETED" ? e += 1 : t += 1;
354
363
  } catch (e) {
355
364
  if (o(e)) {
356
- s(), L("command-execution"), n = !0;
365
+ s(), R("command-execution"), n = !0;
357
366
  break;
358
367
  }
359
368
  t += 1;
360
369
  }
361
- n || U(`Executed ${e} action${e === 1 ? "" : "s"}${t > 0 ? ` • ${t} failed` : ""}`, t > 0 ? "error" : "success"), $(), N(null), k && await W();
370
+ n || H(`Executed ${e} action${e === 1 ? "" : "s"}${t > 0 ? ` • ${t} failed` : ""}`, t > 0 ? "error" : "success"), $(), P(null), A && await U();
362
371
  } catch (e) {
363
- U(e instanceof Error ? e.message : "Failed to execute actions", "error");
372
+ H(e instanceof Error ? e.message : "Failed to execute actions", "error");
364
373
  } finally {
365
- F(null);
374
+ I(null);
366
375
  }
367
376
  }, [
368
377
  Q,
369
378
  J,
370
- U,
379
+ H,
371
380
  $,
372
- k,
373
- W
381
+ A,
382
+ U
374
383
  ]);
375
- return Ve ? /* @__PURE__ */ m(g, { children: /* @__PURE__ */ m(se, { message: "Loading Actions..." }) }) : y && y.permissionStrings?.length > 0 && !He ? /* @__PURE__ */ m(g, { children: /* @__PURE__ */ m(Le, {}) }) : st ? /* @__PURE__ */ m(g, { children: /* @__PURE__ */ m(se, { message: "Loading Actions..." }) }) : ct ? /* @__PURE__ */ m(g, { children: /* @__PURE__ */ m(ce, {
376
- message: ct.message,
377
- onRetry: () => W()
384
+ return Ue ? /* @__PURE__ */ m(g, { children: /* @__PURE__ */ m(se, { message: "Loading Actions..." }) }) : b && b.permissionStrings?.length > 0 && !We ? /* @__PURE__ */ m(g, { children: /* @__PURE__ */ m(Re, {}) }) : dt ? /* @__PURE__ */ m(g, { children: /* @__PURE__ */ m(se, { message: "Loading Actions..." }) }) : ft ? /* @__PURE__ */ m(g, { children: /* @__PURE__ */ m(ce, {
385
+ message: ft.message,
386
+ onRetry: () => U()
378
387
  }) }) : /* @__PURE__ */ h(g, {
379
388
  className: "p-4 sm:p-6 space-y-6",
380
389
  children: [
381
390
  /* @__PURE__ */ m(oe, {
382
- title: b("nav.actions", "Actions"),
391
+ title: x("nav.actions", "Actions"),
383
392
  description: "Automate tasks — run commands, scripts, or trigger webhooks on your agents",
384
393
  actions: /* @__PURE__ */ h("div", {
385
394
  className: "flex items-center gap-2",
386
395
  children: [/* @__PURE__ */ m("button", {
387
396
  type: "button",
388
- onClick: () => W(),
397
+ onClick: () => U(),
389
398
  className: "p-2 rounded-lg hover:bg-bg-tertiary text-text-tertiary hover:text-text-primary transition-colors",
390
399
  title: "Refresh",
391
400
  children: /* @__PURE__ */ m(Ne, { size: 16 })
392
- }), Ue && /* @__PURE__ */ h("button", {
401
+ }), Ge && /* @__PURE__ */ h("button", {
393
402
  type: "button",
394
- onClick: () => w({ type: "create" }),
403
+ onClick: () => T({ type: "create" }),
395
404
  className: "inline-flex items-center gap-1.5 px-4 py-2 rounded-lg bg-action-primary-bg text-action-primary-text hover:opacity-90 text-sm font-medium transition-opacity",
396
405
  children: [/* @__PURE__ */ m(Me, { size: 16 }), "Create Action"]
397
406
  })]
@@ -402,26 +411,26 @@ function _() {
402
411
  className: "flex flex-wrap items-center gap-3",
403
412
  children: [
404
413
  /* @__PURE__ */ m(fe, {
405
- value: E,
406
- onChange: Je,
407
- placeholder: b("actions.searchPlaceholder", "Search actions..."),
414
+ value: D,
415
+ onChange: Xe,
416
+ placeholder: x("actions.searchPlaceholder", "Search actions..."),
408
417
  className: "w-full sm:w-64"
409
418
  }),
410
419
  /* @__PURE__ */ m(pe, {
411
420
  label: "Type",
412
- options: Re,
413
- value: D,
414
- onChange: Ye
421
+ options: ze,
422
+ value: O,
423
+ onChange: Ze
415
424
  }),
416
425
  /* @__PURE__ */ m(pe, {
417
426
  label: "Trigger",
418
- options: ze,
419
- value: O,
420
- onChange: Xe
427
+ options: Be,
428
+ value: k,
429
+ onChange: Qe
421
430
  })
422
431
  ]
423
432
  }),
424
- G.length > 0 && /* @__PURE__ */ m("div", {
433
+ W.length > 0 && /* @__PURE__ */ m("div", {
425
434
  "data-tour": "actions-selection-toolbar",
426
435
  className: "rounded-lg border border-border-default bg-bg-surface p-4",
427
436
  children: /* @__PURE__ */ h("div", {
@@ -431,15 +440,15 @@ function _() {
431
440
  children: [/* @__PURE__ */ h("div", {
432
441
  className: "flex items-center gap-2",
433
442
  children: [/* @__PURE__ */ m(ve, {
434
- checked: Et,
435
- indeterminate: Dt,
436
- onChange: kt,
443
+ checked: kt,
444
+ indeterminate: At,
445
+ onChange: Mt,
437
446
  ariaLabel: "Select all visible actions"
438
447
  }), /* @__PURE__ */ m("span", {
439
448
  className: "text-sm font-medium text-text-primary",
440
449
  children: "Select all visible"
441
450
  })]
442
- }), j.size > 0 && /* @__PURE__ */ m("button", {
451
+ }), M.size > 0 && /* @__PURE__ */ m("button", {
443
452
  type: "button",
444
453
  onClick: $,
445
454
  className: "text-sm text-text-secondary hover:text-text-primary",
@@ -450,12 +459,12 @@ function _() {
450
459
  children: [
451
460
  /* @__PURE__ */ h("span", {
452
461
  className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
453
- children: [j.size, " selected"]
462
+ children: [M.size, " selected"]
454
463
  }),
455
464
  /* @__PURE__ */ m("button", {
456
465
  type: "button",
457
- onClick: () => N("execute"),
458
- disabled: Q.length === 0 || P !== null,
466
+ onClick: () => P("execute"),
467
+ disabled: Q.length === 0 || F !== null,
459
468
  className: "rounded-md border border-status-success-border px-3 py-2 text-sm font-medium text-status-success-text hover:bg-status-success-bg disabled:cursor-not-allowed disabled:opacity-50",
460
469
  children: /* @__PURE__ */ h("span", {
461
470
  className: "inline-flex items-center gap-2",
@@ -468,8 +477,8 @@ function _() {
468
477
  }),
469
478
  /* @__PURE__ */ m("button", {
470
479
  type: "button",
471
- onClick: At,
472
- disabled: Q.length === 0 || P !== null,
480
+ onClick: Nt,
481
+ disabled: Q.length === 0 || F !== null,
473
482
  className: "rounded-md border border-border-default px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-50",
474
483
  children: /* @__PURE__ */ h("span", {
475
484
  className: "inline-flex items-center gap-2",
@@ -482,8 +491,8 @@ function _() {
482
491
  }),
483
492
  /* @__PURE__ */ m("button", {
484
493
  type: "button",
485
- onClick: () => N("delete"),
486
- disabled: Q.length === 0 || P !== null,
494
+ onClick: () => P("delete"),
495
+ disabled: Q.length === 0 || F !== null,
487
496
  className: "rounded-md border border-status-error-border px-3 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg disabled:cursor-not-allowed disabled:opacity-50",
488
497
  children: /* @__PURE__ */ h("span", {
489
498
  className: "inline-flex items-center gap-2",
@@ -500,81 +509,81 @@ function _() {
500
509
  }),
501
510
  /* @__PURE__ */ m(p, {
502
511
  mode: "wait",
503
- children: G.length === 0 && !st && /* @__PURE__ */ m(de, {
512
+ children: W.length === 0 && !dt && /* @__PURE__ */ m(de, {
504
513
  title: "No actions yet",
505
514
  description: "Create your first action to automate commands, scripts, and webhooks",
506
515
  action: /* @__PURE__ */ h("div", {
507
516
  className: "flex items-center gap-2",
508
- children: [Ue && /* @__PURE__ */ m("button", {
517
+ children: [Ge && /* @__PURE__ */ m("button", {
509
518
  type: "button",
510
- onClick: () => w({ type: "create" }),
519
+ onClick: () => T({ type: "create" }),
511
520
  className: "px-4 py-2 rounded-lg bg-action-primary-bg text-action-primary-text hover:opacity-90 text-sm font-medium",
512
521
  children: "Create Action"
513
522
  }), /* @__PURE__ */ m(_e, { prompt: "What is an Action in VibeControls and how do I create one?" })]
514
523
  })
515
524
  })
516
525
  }),
517
- G.length > 0 && /* @__PURE__ */ m("div", {
526
+ W.length > 0 && /* @__PURE__ */ m("div", {
518
527
  "data-tour": "actions-list-container",
519
528
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
520
- children: G.map((e) => /* @__PURE__ */ m("div", {
529
+ children: W.map((e) => /* @__PURE__ */ m("div", {
521
530
  role: "button",
522
531
  tabIndex: 0,
523
- onClick: () => A(e.id),
532
+ onClick: () => j(e.id),
524
533
  onKeyDown: (t) => {
525
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), A(e.id));
534
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), j(e.id));
526
535
  },
527
536
  "aria-label": `Select action ${e.displayName || e.name}`,
528
537
  children: /* @__PURE__ */ m(Se, {
529
538
  action: e,
530
- onExecute: St,
531
- onEdit: (e) => w({
539
+ onExecute: Tt,
540
+ onEdit: (e) => T({
532
541
  type: "edit",
533
542
  actionId: e
534
543
  }),
535
- onDuplicate: Tt,
536
- onDelete: (t) => w({
544
+ onDuplicate: Ot,
545
+ onDelete: (t) => T({
537
546
  type: "confirmDelete",
538
547
  id: t,
539
548
  name: e.displayName || e.name
540
549
  }),
541
550
  onSchedule: (e) => _(`/scheduler?actionId=${encodeURIComponent(e)}`),
542
551
  onAddToCalendar: (e) => _(`/vibecontrols/calendar?actionId=${encodeURIComponent(e)}`),
543
- canUpdate: We,
544
- canDelete: Ge,
545
- canExecute: Ke,
546
- isExecuting: Ze === e.id,
547
- selected: j.has(e.id),
548
- onToggleSelect: (t) => Ot(e.id, t)
552
+ canUpdate: Ke,
553
+ canDelete: qe,
554
+ canExecute: Je,
555
+ isExecuting: $e === e.id,
556
+ selected: M.has(e.id),
557
+ onToggleSelect: (t) => jt(e.id, t)
549
558
  })
550
559
  }, e.id))
551
560
  }),
552
- /* @__PURE__ */ m(p, { children: k && K && /* @__PURE__ */ h("div", {
561
+ /* @__PURE__ */ m(p, { children: A && G && /* @__PURE__ */ h("div", {
553
562
  className: "space-y-3",
554
- children: [Be && /* @__PURE__ */ m(De, {
555
- actionId: k,
556
- workspaceId: Be,
557
- actionName: K.displayName || K.name,
558
- onClose: () => A(null)
563
+ children: [He && /* @__PURE__ */ m(De, {
564
+ actionId: A,
565
+ workspaceId: He,
566
+ actionName: G.displayName || G.name,
567
+ onClose: () => j(null)
559
568
  }), /* @__PURE__ */ m("div", {
560
569
  "data-tour": "actions-execution-history",
561
570
  children: /* @__PURE__ */ m(Ee, {
562
- executions: ut,
563
- actionName: K.displayName || K.name,
564
- onClose: () => A(null)
571
+ executions: mt,
572
+ actionName: G.displayName || G.name,
573
+ onClose: () => j(null)
565
574
  })
566
575
  })]
567
576
  }) }),
568
- /* @__PURE__ */ m(p, { children: qe.length > 0 && /* @__PURE__ */ m("div", {
577
+ /* @__PURE__ */ m(p, { children: Ye.length > 0 && /* @__PURE__ */ m("div", {
569
578
  className: "fixed bottom-4 left-4 right-4 sm:left-auto sm:bottom-6 sm:right-6 z-50 flex flex-col gap-2 max-w-[calc(100vw-2rem)] sm:max-w-md",
570
- children: qe.slice(-3).map((e) => /* @__PURE__ */ h("div", {
579
+ children: Ye.slice(-3).map((e) => /* @__PURE__ */ h("div", {
571
580
  role: "button",
572
581
  tabIndex: 0,
573
582
  onKeyDown: (t) => {
574
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), at(e.id));
583
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), lt(e.id));
575
584
  },
576
585
  className: `p-4 rounded-xl shadow-lg border cursor-pointer ${e.variant === "success" ? "bg-status-success-bg/10 border-status-success-border/30 text-status-success-text" : "bg-status-error-bg/10 border-status-error-border/30 text-status-error-text"}`,
577
- onClick: () => at(e.id),
586
+ onClick: () => lt(e.id),
578
587
  children: [/* @__PURE__ */ m("div", {
579
588
  className: "font-medium text-sm",
580
589
  children: e.message
@@ -584,28 +593,28 @@ function _() {
584
593
  })]
585
594
  }, e.id))
586
595
  }) }),
587
- C.type === "create" && /* @__PURE__ */ m(Te, {
596
+ w.type === "create" && /* @__PURE__ */ m(Te, {
588
597
  title: "Create Action",
589
- agents: ft,
590
- onSubmit: yt,
591
- onCancel: () => w({ type: "none" }),
592
- isLoading: mt,
598
+ agents: K,
599
+ onSubmit: St,
600
+ onCancel: () => T({ type: "none" }),
601
+ isLoading: _t,
593
602
  extraSection: /* @__PURE__ */ h("div", {
594
603
  className: "space-y-4",
595
604
  children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h3", {
596
605
  className: "text-sm font-medium text-text-secondary mb-2",
597
- children: b("actions.tags", "Tags")
606
+ children: x("actions.tags", "Tags")
598
607
  }), /* @__PURE__ */ m(le, {
599
608
  entityType: "VIBECONTROLS_ACTION",
600
- onDraftChange: ht
609
+ onDraftChange: vt
601
610
  })] }), /* @__PURE__ */ m(he, {
602
- value: B,
603
- onChange: V,
604
- disabled: mt
611
+ value: V,
612
+ onChange: ot,
613
+ disabled: _t
605
614
  })]
606
615
  })
607
616
  }),
608
- C.type === "edit" && Z && /* @__PURE__ */ m(Te, {
617
+ w.type === "edit" && Z && /* @__PURE__ */ m(Te, {
609
618
  title: "Edit Action",
610
619
  initialData: {
611
620
  name: Z.name,
@@ -629,78 +638,78 @@ function _() {
629
638
  retryCount: Z.retryCount || 0,
630
639
  confirmationRequired: Z.confirmationRequired ?? !1
631
640
  },
632
- agents: ft,
633
- onSubmit: bt,
634
- onCancel: () => w({ type: "none" }),
635
- isLoading: vt,
641
+ agents: K,
642
+ onSubmit: Ct,
643
+ onCancel: () => T({ type: "none" }),
644
+ isLoading: xt,
636
645
  extraSection: /* @__PURE__ */ h("div", {
637
646
  className: "space-y-4",
638
647
  children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h3", {
639
648
  className: "text-sm font-medium text-text-secondary mb-2",
640
- children: b("actions.tags", "Tags")
649
+ children: x("actions.tags", "Tags")
641
650
  }), /* @__PURE__ */ m(le, {
642
651
  entityType: "VIBECONTROLS_ACTION",
643
652
  entityId: Z.id
644
653
  })] }), /* @__PURE__ */ m(he, {
645
- value: H,
646
- onChange: it,
647
- disabled: vt
654
+ value: st,
655
+ onChange: ct,
656
+ disabled: xt
648
657
  })]
649
658
  })
650
659
  }),
651
- C.type === "confirmDelete" && /* @__PURE__ */ m(a, {
660
+ w.type === "confirmDelete" && /* @__PURE__ */ m(a, {
652
661
  isOpen: !0,
653
662
  title: "Delete Action",
654
- message: `Are you sure you want to delete "${C.name}"? This cannot be undone.`,
663
+ message: `Are you sure you want to delete "${w.name}"? This cannot be undone.`,
655
664
  confirmLabel: "Delete",
656
665
  variant: "danger",
657
- onConfirm: xt,
658
- onClose: () => w({ type: "none" })
666
+ onConfirm: wt,
667
+ onClose: () => T({ type: "none" })
659
668
  }),
660
- C.type === "confirmExecute" && /* @__PURE__ */ m(a, {
669
+ w.type === "confirmExecute" && /* @__PURE__ */ m(a, {
661
670
  isOpen: !0,
662
- title: `Execute: ${C.name}`,
663
- message: `Are you sure you want to execute "${C.name}"?`,
671
+ title: `Execute: ${w.name}`,
672
+ message: `Are you sure you want to execute "${w.name}"?`,
664
673
  confirmLabel: "Execute",
665
674
  variant: "warning",
666
- onConfirm: Ct,
667
- onClose: () => w({ type: "none" })
675
+ onConfirm: Et,
676
+ onClose: () => T({ type: "none" })
668
677
  }),
669
678
  /* @__PURE__ */ m(a, {
670
- isOpen: $e === "delete",
679
+ isOpen: tt === "delete",
671
680
  title: "Delete Selected Actions",
672
681
  message: `Are you sure you want to delete ${Q.length} selected action${Q.length === 1 ? "" : "s"}? This cannot be undone.`,
673
682
  confirmLabel: "Delete Actions",
674
683
  variant: "danger",
675
- onConfirm: jt,
676
- onClose: () => N(null),
677
- isLoading: P === "delete"
684
+ onConfirm: Pt,
685
+ onClose: () => P(null),
686
+ isLoading: F === "delete"
678
687
  }),
679
688
  /* @__PURE__ */ m(a, {
680
- isOpen: $e === "execute",
689
+ isOpen: tt === "execute",
681
690
  title: "Execute Selected Actions",
682
691
  message: `Execute ${Q.length} selected action${Q.length === 1 ? "" : "s"}? This may trigger commands, scripts, or webhooks immediately.`,
683
692
  confirmLabel: "Execute Actions",
684
693
  variant: "warning",
685
- onConfirm: Mt,
686
- onClose: () => N(null),
687
- isLoading: P === "execute"
694
+ onConfirm: Ft,
695
+ onClose: () => P(null),
696
+ isLoading: F === "execute"
688
697
  }),
689
698
  /* @__PURE__ */ m(re, {
690
- isOpen: I !== null,
691
- onClose: () => L(null),
699
+ isOpen: L !== null,
700
+ onClose: () => R(null),
692
701
  onConfirm: () => {
693
- s(), L(null), _("/billing/plans");
702
+ s(), R(null), _("/billing/plans");
694
703
  },
695
- title: I ? ie(I).title : void 0,
696
- message: I ? ie(I).message : ""
704
+ title: L ? ie(L).title : void 0,
705
+ message: L ? ie(L).message : ""
697
706
  }),
698
707
  /* @__PURE__ */ m(me, {
699
- isOpen: R !== null,
700
- agentName: R ? ft.find((e) => e.id === R.agentId)?.name : void 0,
701
- isLoading: et,
702
- onClose: () => z(null),
703
- onConfirm: wt
708
+ isOpen: z !== null,
709
+ agentName: z ? K.find((e) => e.id === z.agentId)?.name : void 0,
710
+ isLoading: nt,
711
+ onClose: () => B(null),
712
+ onConfirm: Dt
704
713
  })
705
714
  ]
706
715
  });