@burdenoff/microfe-vibecontrols 2026.602.9 → 2026.608.1

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.
@@ -1,11 +1,13 @@
1
1
  import { useTr as e } from "../../shared/hooks/useTr.js";
2
2
  import { RemoteExecutionEnableNotice as t } from "./RemoteExecutionEnableNotice.js";
3
- import { useEffect as n, useRef as r, useState as i } from "react";
4
- import { X as a } from "lucide-react";
5
- import { AnimatePresence as o, motion as s, useReducedMotion as c } from "framer-motion";
6
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
3
+ import { languageForInterpreter as n } from "../common/commandHighlight.js";
4
+ import { CommandEditor as r } from "../common/CommandEditor.js";
5
+ import { useEffect as i, useRef as a, useState as o } from "react";
6
+ import { X as s } from "lucide-react";
7
+ import { AnimatePresence as c, motion as l, useReducedMotion as u } from "framer-motion";
8
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
7
9
  //#region src/components/actions/ActionForm.tsx
8
- var d = {
10
+ var p = {
9
11
  name: "",
10
12
  displayName: "",
11
13
  description: "",
@@ -29,38 +31,38 @@ var d = {
29
31
  retryCount: 0,
30
32
  confirmationRequired: !1
31
33
  };
32
- function f({ title: f, initialData: p, agents: m, onSubmit: h, onCancel: g, isLoading: _ = !1, extraSection: v }) {
33
- let [y, b] = i({
34
- ...d,
35
- ...p
36
- }), [x, S] = i(p?.tags?.join(", ") ?? ""), C = r(null), w = c(), T = e();
37
- n(() => {
38
- C.current?.showModal();
34
+ function m({ title: m, initialData: h, agents: g, onSubmit: _, onCancel: v, isLoading: y = !1, extraSection: b }) {
35
+ let [x, S] = o({
36
+ ...p,
37
+ ...h
38
+ }), [C, w] = o(h?.tags?.join(", ") ?? ""), T = a(null), E = u(), D = e();
39
+ i(() => {
40
+ T.current?.showModal();
39
41
  }, []);
40
- let E = (e, t) => b((n) => ({
42
+ let O = (e, t) => S((n) => ({
41
43
  ...n,
42
44
  [e]: t
43
- })), D = (e) => {
45
+ })), k = (e) => {
44
46
  e.preventDefault();
45
- let t = x.split(",").map((e) => e.trim()).filter(Boolean);
46
- h({
47
- ...y,
47
+ let t = C.split(",").map((e) => e.trim()).filter(Boolean);
48
+ _({
49
+ ...x,
48
50
  tags: t
49
51
  });
50
- }, O = "w-full px-3 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", k = "block text-sm font-medium text-text-secondary mb-1";
51
- return /* @__PURE__ */ l("dialog", {
52
- ref: C,
52
+ }, A = "w-full px-3 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", j = "block text-sm font-medium text-text-secondary mb-1";
53
+ return /* @__PURE__ */ d("dialog", {
54
+ ref: T,
53
55
  className: "fixed inset-0 z-50 m-auto p-0 bg-transparent backdrop:bg-transparent",
54
- onClose: g,
55
- children: /* @__PURE__ */ u(o, { children: [/* @__PURE__ */ l(s.div, {
56
+ onClose: v,
57
+ children: /* @__PURE__ */ f(c, { children: [/* @__PURE__ */ d(l.div, {
56
58
  className: "fixed inset-0 bg-bg-overlay",
57
- initial: w ? void 0 : { opacity: 0 },
59
+ initial: E ? void 0 : { opacity: 0 },
58
60
  animate: { opacity: 1 },
59
61
  exit: { opacity: 0 },
60
- onClick: g
61
- }), /* @__PURE__ */ u(s.div, {
62
+ onClick: v
63
+ }), /* @__PURE__ */ f(l.div, {
62
64
  className: "relative w-full max-w-2xl max-h-[85vh] overflow-y-auto bg-bg-surface rounded-lg shadow-xl",
63
- initial: w ? void 0 : {
65
+ initial: E ? void 0 : {
64
66
  opacity: 0,
65
67
  scale: .95,
66
68
  y: 8
@@ -84,366 +86,372 @@ function f({ title: f, initialData: p, agents: m, onSubmit: h, onCancel: g, isLo
84
86
  1
85
87
  ]
86
88
  },
87
- children: [/* @__PURE__ */ u("div", {
89
+ children: [/* @__PURE__ */ f("div", {
88
90
  className: "flex items-center justify-between p-6 border-b border-border-default sticky top-0 bg-bg-surface z-10",
89
- children: [/* @__PURE__ */ l("h2", {
91
+ children: [/* @__PURE__ */ d("h2", {
90
92
  className: "text-lg font-semibold text-text-primary",
91
- children: f
92
- }), /* @__PURE__ */ l("button", {
93
+ children: m
94
+ }), /* @__PURE__ */ d("button", {
93
95
  type: "button",
94
- onClick: g,
96
+ onClick: v,
95
97
  className: "p-1 rounded hover:bg-bg-sunken transition-colors",
96
- children: /* @__PURE__ */ l(a, { className: "size-5 text-text-secondary" })
98
+ children: /* @__PURE__ */ d(s, { className: "size-5 text-text-secondary" })
97
99
  })]
98
- }), /* @__PURE__ */ u("form", {
99
- onSubmit: D,
100
+ }), /* @__PURE__ */ f("form", {
101
+ onSubmit: k,
100
102
  className: "p-6 space-y-4",
101
103
  children: [
102
- /* @__PURE__ */ u("div", {
104
+ /* @__PURE__ */ f("div", {
103
105
  className: "grid grid-cols-2 gap-4",
104
- children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
105
- className: k,
106
- children: T("vibecontrols.actions.form.nameSlug", "Name (slug)")
107
- }), /* @__PURE__ */ l("input", {
106
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
107
+ className: j,
108
+ children: D("vibecontrols.actions.form.nameSlug", "Name (slug)")
109
+ }), /* @__PURE__ */ d("input", {
108
110
  "aria-label": "my-action",
109
- className: O,
110
- value: y.name,
111
- onChange: (e) => E("name", e.target.value),
111
+ className: A,
112
+ value: x.name,
113
+ onChange: (e) => O("name", e.target.value),
112
114
  placeholder: "my-action",
113
115
  required: !0
114
- })] }), /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
115
- className: k,
116
- children: T("vibecontrols.actions.form.displayName", "Display Name")
117
- }), /* @__PURE__ */ l("input", {
116
+ })] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
117
+ className: j,
118
+ children: D("vibecontrols.actions.form.displayName", "Display Name")
119
+ }), /* @__PURE__ */ d("input", {
118
120
  "aria-label": "My Action",
119
- className: O,
120
- value: y.displayName,
121
- onChange: (e) => E("displayName", e.target.value),
121
+ className: A,
122
+ value: x.displayName,
123
+ onChange: (e) => O("displayName", e.target.value),
122
124
  placeholder: "My Action",
123
125
  required: !0
124
126
  })] })]
125
127
  }),
126
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
127
- className: k,
128
- children: T("vibecontrols.actions.form.description", "Description")
129
- }), /* @__PURE__ */ l("textarea", {
128
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
129
+ className: j,
130
+ children: D("vibecontrols.actions.form.description", "Description")
131
+ }), /* @__PURE__ */ d("textarea", {
130
132
  "aria-label": "What does this action do?",
131
- className: `${O} resize-none`,
133
+ className: `${A} resize-none`,
132
134
  rows: 2,
133
- value: y.description,
134
- onChange: (e) => E("description", e.target.value),
135
+ value: x.description,
136
+ onChange: (e) => O("description", e.target.value),
135
137
  placeholder: "What does this action do?"
136
138
  })] }),
137
- /* @__PURE__ */ u("div", {
139
+ /* @__PURE__ */ f("div", {
138
140
  className: "grid grid-cols-2 gap-4",
139
- children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
140
- className: k,
141
- children: T("vibecontrols.actions.form.actionType", "Action Type")
142
- }), /* @__PURE__ */ u("select", {
143
- className: O,
144
- value: y.actionType,
145
- onChange: (e) => E("actionType", e.target.value),
141
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
142
+ className: j,
143
+ children: D("vibecontrols.actions.form.actionType", "Action Type")
144
+ }), /* @__PURE__ */ f("select", {
145
+ className: A,
146
+ value: x.actionType,
147
+ onChange: (e) => O("actionType", e.target.value),
146
148
  children: [
147
- /* @__PURE__ */ l("option", {
149
+ /* @__PURE__ */ d("option", {
148
150
  value: "COMMAND",
149
151
  children: "Command"
150
152
  }),
151
- /* @__PURE__ */ l("option", {
153
+ /* @__PURE__ */ d("option", {
152
154
  value: "SCRIPT",
153
155
  children: "Script"
154
156
  }),
155
- /* @__PURE__ */ l("option", {
157
+ /* @__PURE__ */ d("option", {
156
158
  value: "WEBHOOK",
157
159
  children: "Webhook"
158
160
  }),
159
- /* @__PURE__ */ l("option", {
161
+ /* @__PURE__ */ d("option", {
160
162
  value: "WORKFLOW",
161
163
  children: "Workflow"
162
164
  })
163
165
  ]
164
- })] }), /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
165
- className: k,
166
- children: T("vibecontrols.actions.form.triggerType", "Trigger Type")
167
- }), /* @__PURE__ */ u("select", {
168
- className: O,
169
- value: y.triggerType,
170
- onChange: (e) => E("triggerType", e.target.value),
166
+ })] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
167
+ className: j,
168
+ children: D("vibecontrols.actions.form.triggerType", "Trigger Type")
169
+ }), /* @__PURE__ */ f("select", {
170
+ className: A,
171
+ value: x.triggerType,
172
+ onChange: (e) => O("triggerType", e.target.value),
171
173
  children: [
172
- /* @__PURE__ */ l("option", {
174
+ /* @__PURE__ */ d("option", {
173
175
  value: "MANUAL",
174
176
  children: "Manual"
175
177
  }),
176
- /* @__PURE__ */ l("option", {
178
+ /* @__PURE__ */ d("option", {
177
179
  value: "SCHEDULED",
178
180
  children: "Scheduled"
179
181
  }),
180
- /* @__PURE__ */ l("option", {
182
+ /* @__PURE__ */ d("option", {
181
183
  value: "EVENT",
182
184
  children: "Event"
183
185
  }),
184
- /* @__PURE__ */ l("option", {
186
+ /* @__PURE__ */ d("option", {
185
187
  value: "ON_DEMAND",
186
188
  children: "On Demand"
187
189
  })
188
190
  ]
189
191
  })] })]
190
192
  }),
191
- y.triggerType === "SCHEDULED" && /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
192
- className: k,
193
- children: T("vibecontrols.actions.form.schedule", "Schedule (cron expression)")
194
- }), /* @__PURE__ */ l("input", {
193
+ x.triggerType === "SCHEDULED" && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
194
+ className: j,
195
+ children: D("vibecontrols.actions.form.schedule", "Schedule (cron expression)")
196
+ }), /* @__PURE__ */ d("input", {
195
197
  "aria-label": "*/5 * * * *",
196
- className: O,
197
- value: y.schedule,
198
- onChange: (e) => E("schedule", e.target.value),
198
+ className: A,
199
+ value: x.schedule,
200
+ onChange: (e) => O("schedule", e.target.value),
199
201
  placeholder: "*/5 * * * *"
200
202
  })] }),
201
- /* @__PURE__ */ u("div", {
203
+ /* @__PURE__ */ f("div", {
202
204
  className: "grid grid-cols-2 gap-4",
203
- children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
204
- className: k,
205
- children: T("vibecontrols.actions.form.category", "Category")
206
- }), /* @__PURE__ */ l("input", {
205
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
206
+ className: j,
207
+ children: D("vibecontrols.actions.form.category", "Category")
208
+ }), /* @__PURE__ */ d("input", {
207
209
  "aria-label": "deployment, testing, etc.",
208
- className: O,
209
- value: y.category,
210
- onChange: (e) => E("category", e.target.value),
210
+ className: A,
211
+ value: x.category,
212
+ onChange: (e) => O("category", e.target.value),
211
213
  placeholder: "deployment, testing, etc."
212
- })] }), /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
213
- className: k,
214
- children: T("vibecontrols.actions.form.tags", "Tags (comma separated)")
215
- }), /* @__PURE__ */ l("input", {
214
+ })] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
215
+ className: j,
216
+ children: D("vibecontrols.actions.form.tags", "Tags (comma separated)")
217
+ }), /* @__PURE__ */ d("input", {
216
218
  "aria-label": "ci, deploy, infra",
217
- className: O,
218
- value: x,
219
- onChange: (e) => S(e.target.value),
219
+ className: A,
220
+ value: C,
221
+ onChange: (e) => w(e.target.value),
220
222
  placeholder: "ci, deploy, infra"
221
223
  })] })]
222
224
  }),
223
- y.actionType === "COMMAND" && /* @__PURE__ */ u("div", {
225
+ x.actionType === "COMMAND" && /* @__PURE__ */ f("div", {
224
226
  className: "space-y-4 p-4 rounded-lg bg-bg-sunken/50 border border-border-default",
225
227
  children: [
226
- /* @__PURE__ */ l("h3", {
228
+ /* @__PURE__ */ d("h3", {
227
229
  className: "text-sm font-semibold text-text-primary",
228
- children: T("vibecontrols.actions.form.commandSettings", "Command Settings")
230
+ children: D("vibecontrols.actions.form.commandSettings", "Command Settings")
229
231
  }),
230
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
231
- className: k,
232
- children: T("vibecontrols.actions.form.command", "Command")
233
- }), /* @__PURE__ */ l("textarea", {
232
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
233
+ className: j,
234
+ children: D("vibecontrols.actions.form.command", "Command")
235
+ }), /* @__PURE__ */ d(r, {
234
236
  "aria-label": "echo 'Hello World'",
235
- className: `${O} font-mono resize-none`,
237
+ language: "shell",
236
238
  rows: 3,
237
- value: y.command,
238
- onChange: (e) => E("command", e.target.value),
239
+ value: x.command,
240
+ onChange: (e) => O("command", e.target.value),
239
241
  placeholder: "echo 'Hello World'",
240
242
  required: !0
241
243
  })] }),
242
- /* @__PURE__ */ u("div", {
244
+ /* @__PURE__ */ f("div", {
243
245
  className: "grid grid-cols-2 gap-4",
244
- children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
245
- className: k,
246
- children: T("vibecontrols.actions.form.workingDirectory", "Working Directory")
247
- }), /* @__PURE__ */ l("input", {
246
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
247
+ className: j,
248
+ children: D("vibecontrols.actions.form.workingDirectory", "Working Directory")
249
+ }), /* @__PURE__ */ d("input", {
248
250
  "aria-label": "/home/user/project",
249
- className: O,
250
- value: y.workingDirectory,
251
- onChange: (e) => E("workingDirectory", e.target.value),
251
+ className: A,
252
+ value: x.workingDirectory,
253
+ onChange: (e) => O("workingDirectory", e.target.value),
252
254
  placeholder: "/home/user/project"
253
- })] }), /* @__PURE__ */ u("div", { children: [
254
- /* @__PURE__ */ l("label", {
255
- className: k,
256
- children: T("vibecontrols.actions.form.targetAgent", "Target Agent")
255
+ })] }), /* @__PURE__ */ f("div", { children: [
256
+ /* @__PURE__ */ d("label", {
257
+ className: j,
258
+ children: D("vibecontrols.actions.form.targetAgent", "Target Agent")
257
259
  }),
258
- /* @__PURE__ */ u("select", {
259
- className: O,
260
- value: y.targetAgentId,
261
- onChange: (e) => E("targetAgentId", e.target.value),
262
- children: [/* @__PURE__ */ l("option", {
260
+ /* @__PURE__ */ f("select", {
261
+ className: A,
262
+ value: x.targetAgentId,
263
+ onChange: (e) => O("targetAgentId", e.target.value),
264
+ children: [/* @__PURE__ */ d("option", {
263
265
  value: "",
264
- children: T("vibecontrols.actions.form.anyAvailableAgent", "Any available agent")
265
- }), m.map((e) => /* @__PURE__ */ u("option", {
266
+ children: D("vibecontrols.actions.form.anyAvailableAgent", "Any available agent")
267
+ }), g.map((e) => /* @__PURE__ */ f("option", {
266
268
  value: e.id,
267
269
  disabled: !e.isActive,
268
270
  children: [
269
271
  e.name,
270
272
  " ",
271
- e.isActive ? "" : T("vibecontrols.actions.form.offline", "(offline)")
273
+ e.isActive ? "" : D("vibecontrols.actions.form.offline", "(offline)")
272
274
  ]
273
275
  }, e.id))]
274
276
  }),
275
- y.targetAgentId ? /* @__PURE__ */ l(t, {
276
- agentId: y.targetAgentId,
277
- agentName: m.find((e) => e.id === y.targetAgentId)?.name
278
- }) : null
277
+ x.targetAgentId ? /* @__PURE__ */ d(t, {
278
+ agentId: x.targetAgentId,
279
+ agentName: g.find((e) => e.id === x.targetAgentId)?.name
280
+ }) : /* @__PURE__ */ d("p", {
281
+ className: "mt-1 text-xs text-text-tertiary",
282
+ children: D("vibecontrols.actions.form.anyAgentHint", "A healthy agent is picked automatically when this action runs.")
283
+ })
279
284
  ] })]
280
285
  })
281
286
  ]
282
287
  }),
283
- y.actionType === "SCRIPT" && /* @__PURE__ */ u("div", {
288
+ x.actionType === "SCRIPT" && /* @__PURE__ */ f("div", {
284
289
  className: "space-y-4 p-4 rounded-lg bg-bg-sunken/50 border border-border-default",
285
290
  children: [
286
- /* @__PURE__ */ l("h3", {
291
+ /* @__PURE__ */ d("h3", {
287
292
  className: "text-sm font-semibold text-text-primary",
288
- children: T("vibecontrols.actions.form.scriptSettings", "Script Settings")
293
+ children: D("vibecontrols.actions.form.scriptSettings", "Script Settings")
289
294
  }),
290
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
291
- className: k,
292
- children: T("vibecontrols.actions.form.script", "Script")
293
- }), /* @__PURE__ */ l("textarea", {
295
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
296
+ className: j,
297
+ children: D("vibecontrols.actions.form.script", "Script")
298
+ }), /* @__PURE__ */ d(r, {
294
299
  "aria-label": "#!/bin/bash\necho 'Hello'",
295
- className: `${O} font-mono resize-none`,
300
+ language: n(x.scriptInterpreter),
296
301
  rows: 6,
297
- value: y.script,
298
- onChange: (e) => E("script", e.target.value),
302
+ value: x.script,
303
+ onChange: (e) => O("script", e.target.value),
299
304
  placeholder: "#!/bin/bash\necho 'Hello'",
300
305
  required: !0
301
306
  })] }),
302
- /* @__PURE__ */ u("div", {
307
+ /* @__PURE__ */ f("div", {
303
308
  className: "grid grid-cols-2 gap-4",
304
- children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
305
- className: k,
306
- children: T("vibecontrols.actions.form.interpreter", "Interpreter")
307
- }), /* @__PURE__ */ u("select", {
308
- className: O,
309
- value: y.scriptInterpreter,
310
- onChange: (e) => E("scriptInterpreter", e.target.value),
309
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
310
+ className: j,
311
+ children: D("vibecontrols.actions.form.interpreter", "Interpreter")
312
+ }), /* @__PURE__ */ f("select", {
313
+ className: A,
314
+ value: x.scriptInterpreter,
315
+ onChange: (e) => O("scriptInterpreter", e.target.value),
311
316
  children: [
312
- /* @__PURE__ */ l("option", {
317
+ /* @__PURE__ */ d("option", {
313
318
  value: "bash",
314
319
  children: "Bash"
315
320
  }),
316
- /* @__PURE__ */ l("option", {
321
+ /* @__PURE__ */ d("option", {
317
322
  value: "python",
318
323
  children: "Python"
319
324
  }),
320
- /* @__PURE__ */ l("option", {
325
+ /* @__PURE__ */ d("option", {
321
326
  value: "node",
322
327
  children: "Node.js"
323
328
  })
324
329
  ]
325
- })] }), /* @__PURE__ */ u("div", { children: [
326
- /* @__PURE__ */ l("label", {
327
- className: k,
328
- children: T("vibecontrols.actions.form.targetAgent", "Target Agent")
330
+ })] }), /* @__PURE__ */ f("div", { children: [
331
+ /* @__PURE__ */ d("label", {
332
+ className: j,
333
+ children: D("vibecontrols.actions.form.targetAgent", "Target Agent")
329
334
  }),
330
- /* @__PURE__ */ u("select", {
331
- className: O,
332
- value: y.targetAgentId,
333
- onChange: (e) => E("targetAgentId", e.target.value),
334
- children: [/* @__PURE__ */ l("option", {
335
+ /* @__PURE__ */ f("select", {
336
+ className: A,
337
+ value: x.targetAgentId,
338
+ onChange: (e) => O("targetAgentId", e.target.value),
339
+ children: [/* @__PURE__ */ d("option", {
335
340
  value: "",
336
- children: T("vibecontrols.actions.form.anyAvailableAgent", "Any available agent")
337
- }), m.map((e) => /* @__PURE__ */ u("option", {
341
+ children: D("vibecontrols.actions.form.anyAvailableAgent", "Any available agent")
342
+ }), g.map((e) => /* @__PURE__ */ f("option", {
338
343
  value: e.id,
339
344
  disabled: !e.isActive,
340
345
  children: [
341
346
  e.name,
342
347
  " ",
343
- e.isActive ? "" : T("vibecontrols.actions.form.offline", "(offline)")
348
+ e.isActive ? "" : D("vibecontrols.actions.form.offline", "(offline)")
344
349
  ]
345
350
  }, e.id))]
346
351
  }),
347
- y.targetAgentId ? /* @__PURE__ */ l(t, {
348
- agentId: y.targetAgentId,
349
- agentName: m.find((e) => e.id === y.targetAgentId)?.name
350
- }) : null
352
+ x.targetAgentId ? /* @__PURE__ */ d(t, {
353
+ agentId: x.targetAgentId,
354
+ agentName: g.find((e) => e.id === x.targetAgentId)?.name
355
+ }) : /* @__PURE__ */ d("p", {
356
+ className: "mt-1 text-xs text-text-tertiary",
357
+ children: D("vibecontrols.actions.form.anyAgentHint", "A healthy agent is picked automatically when this action runs.")
358
+ })
351
359
  ] })]
352
360
  }),
353
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
354
- className: k,
355
- children: T("vibecontrols.actions.form.workingDirectory", "Working Directory")
356
- }), /* @__PURE__ */ l("input", {
361
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
362
+ className: j,
363
+ children: D("vibecontrols.actions.form.workingDirectory", "Working Directory")
364
+ }), /* @__PURE__ */ d("input", {
357
365
  "aria-label": "/home/user/project",
358
- className: O,
359
- value: y.workingDirectory,
360
- onChange: (e) => E("workingDirectory", e.target.value),
366
+ className: A,
367
+ value: x.workingDirectory,
368
+ onChange: (e) => O("workingDirectory", e.target.value),
361
369
  placeholder: "/home/user/project"
362
370
  })] })
363
371
  ]
364
372
  }),
365
- y.actionType === "WEBHOOK" && /* @__PURE__ */ u("div", {
373
+ x.actionType === "WEBHOOK" && /* @__PURE__ */ f("div", {
366
374
  className: "space-y-4 p-4 rounded-lg bg-bg-sunken/50 border border-border-default",
367
375
  children: [
368
- /* @__PURE__ */ l("h3", {
376
+ /* @__PURE__ */ d("h3", {
369
377
  className: "text-sm font-semibold text-text-primary",
370
- children: T("vibecontrols.actions.form.webhookSettings", "Webhook Settings")
378
+ children: D("vibecontrols.actions.form.webhookSettings", "Webhook Settings")
371
379
  }),
372
- /* @__PURE__ */ u("div", {
380
+ /* @__PURE__ */ f("div", {
373
381
  className: "grid grid-cols-[1fr_auto] gap-4",
374
- children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
375
- className: k,
376
- children: T("vibecontrols.actions.form.url", "URL")
377
- }), /* @__PURE__ */ l("input", {
382
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
383
+ className: j,
384
+ children: D("vibecontrols.actions.form.url", "URL")
385
+ }), /* @__PURE__ */ d("input", {
378
386
  "aria-label": "https://api.example.com/hook",
379
- className: O,
380
- value: y.webhookUrl,
381
- onChange: (e) => E("webhookUrl", e.target.value),
387
+ className: A,
388
+ value: x.webhookUrl,
389
+ onChange: (e) => O("webhookUrl", e.target.value),
382
390
  placeholder: "https://api.example.com/hook",
383
391
  required: !0
384
- })] }), /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
385
- className: k,
386
- children: T("vibecontrols.actions.form.method", "Method")
387
- }), /* @__PURE__ */ u("select", {
388
- className: O,
389
- value: y.webhookMethod,
390
- onChange: (e) => E("webhookMethod", e.target.value),
392
+ })] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
393
+ className: j,
394
+ children: D("vibecontrols.actions.form.method", "Method")
395
+ }), /* @__PURE__ */ f("select", {
396
+ className: A,
397
+ value: x.webhookMethod,
398
+ onChange: (e) => O("webhookMethod", e.target.value),
391
399
  children: [
392
- /* @__PURE__ */ l("option", {
400
+ /* @__PURE__ */ d("option", {
393
401
  value: "GET",
394
402
  children: "GET"
395
403
  }),
396
- /* @__PURE__ */ l("option", {
404
+ /* @__PURE__ */ d("option", {
397
405
  value: "POST",
398
406
  children: "POST"
399
407
  }),
400
- /* @__PURE__ */ l("option", {
408
+ /* @__PURE__ */ d("option", {
401
409
  value: "PUT",
402
410
  children: "PUT"
403
411
  }),
404
- /* @__PURE__ */ l("option", {
412
+ /* @__PURE__ */ d("option", {
405
413
  value: "PATCH",
406
414
  children: "PATCH"
407
415
  }),
408
- /* @__PURE__ */ l("option", {
416
+ /* @__PURE__ */ d("option", {
409
417
  value: "DELETE",
410
418
  children: "DELETE"
411
419
  })
412
420
  ]
413
421
  })] })]
414
422
  }),
415
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
416
- className: k,
417
- children: T("vibecontrols.actions.form.bodyJson", "Body (JSON)")
418
- }), /* @__PURE__ */ l("textarea", {
423
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
424
+ className: j,
425
+ children: D("vibecontrols.actions.form.bodyJson", "Body (JSON)")
426
+ }), /* @__PURE__ */ d(r, {
419
427
  "aria-label": "control",
420
- className: `${O} font-mono resize-none`,
428
+ language: "json",
421
429
  rows: 4,
422
- value: y.webhookBody,
423
- onChange: (e) => E("webhookBody", e.target.value),
430
+ value: x.webhookBody,
431
+ onChange: (e) => O("webhookBody", e.target.value),
424
432
  placeholder: "{\"key\": \"value\"}"
425
433
  })] }),
426
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
427
- className: k,
428
- children: T("vibecontrols.actions.form.authType", "Auth Type")
429
- }), /* @__PURE__ */ u("select", {
430
- className: O,
431
- value: y.webhookAuthType,
432
- onChange: (e) => E("webhookAuthType", e.target.value),
434
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
435
+ className: j,
436
+ children: D("vibecontrols.actions.form.authType", "Auth Type")
437
+ }), /* @__PURE__ */ f("select", {
438
+ className: A,
439
+ value: x.webhookAuthType,
440
+ onChange: (e) => O("webhookAuthType", e.target.value),
433
441
  children: [
434
- /* @__PURE__ */ l("option", {
442
+ /* @__PURE__ */ d("option", {
435
443
  value: "",
436
444
  children: "None"
437
445
  }),
438
- /* @__PURE__ */ l("option", {
446
+ /* @__PURE__ */ d("option", {
439
447
  value: "BEARER",
440
448
  children: "Bearer Token"
441
449
  }),
442
- /* @__PURE__ */ l("option", {
450
+ /* @__PURE__ */ d("option", {
443
451
  value: "BASIC",
444
452
  children: "Basic Auth"
445
453
  }),
446
- /* @__PURE__ */ l("option", {
454
+ /* @__PURE__ */ d("option", {
447
455
  value: "API_KEY",
448
456
  children: "API Key"
449
457
  })
@@ -451,65 +459,65 @@ function f({ title: f, initialData: p, agents: m, onSubmit: h, onCancel: g, isLo
451
459
  })] })
452
460
  ]
453
461
  }),
454
- /* @__PURE__ */ u("div", {
462
+ /* @__PURE__ */ f("div", {
455
463
  className: "grid grid-cols-3 gap-4",
456
464
  children: [
457
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
458
- className: k,
459
- children: T("vibecontrols.actions.form.timeout", "Timeout (ms)")
460
- }), /* @__PURE__ */ l("input", {
465
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
466
+ className: j,
467
+ children: D("vibecontrols.actions.form.timeout", "Timeout (ms)")
468
+ }), /* @__PURE__ */ d("input", {
461
469
  "aria-label": "control",
462
- className: O,
470
+ className: A,
463
471
  type: "number",
464
472
  min: 1e3,
465
473
  max: 3e5,
466
- value: y.timeoutMs,
467
- onChange: (e) => E("timeoutMs", parseInt(e.target.value) || 3e4)
474
+ value: x.timeoutMs,
475
+ onChange: (e) => O("timeoutMs", parseInt(e.target.value) || 3e4)
468
476
  })] }),
469
- /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("label", {
470
- className: k,
471
- children: T("vibecontrols.actions.form.retryCount", "Retry Count")
472
- }), /* @__PURE__ */ l("input", {
477
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
478
+ className: j,
479
+ children: D("vibecontrols.actions.form.retryCount", "Retry Count")
480
+ }), /* @__PURE__ */ d("input", {
473
481
  "aria-label": "control",
474
- className: O,
482
+ className: A,
475
483
  type: "number",
476
484
  min: 0,
477
485
  max: 10,
478
- value: y.retryCount,
479
- onChange: (e) => E("retryCount", parseInt(e.target.value) || 0)
486
+ value: x.retryCount,
487
+ onChange: (e) => O("retryCount", parseInt(e.target.value) || 0)
480
488
  })] }),
481
- /* @__PURE__ */ l("div", {
489
+ /* @__PURE__ */ d("div", {
482
490
  className: "flex items-end pb-2",
483
- children: /* @__PURE__ */ u("label", {
491
+ children: /* @__PURE__ */ f("label", {
484
492
  className: "flex items-center gap-2 text-sm text-text-secondary cursor-pointer",
485
- children: [/* @__PURE__ */ l("input", {
493
+ children: [/* @__PURE__ */ d("input", {
486
494
  "aria-label": "control",
487
495
  type: "checkbox",
488
- checked: y.confirmationRequired,
489
- onChange: (e) => E("confirmationRequired", e.target.checked),
496
+ checked: x.confirmationRequired,
497
+ onChange: (e) => O("confirmationRequired", e.target.checked),
490
498
  className: "rounded border-border-default"
491
- }), T("vibecontrols.actions.form.requireConfirmation", "Require confirmation")]
499
+ }), D("vibecontrols.actions.form.requireConfirmation", "Require confirmation")]
492
500
  })
493
501
  })
494
502
  ]
495
503
  }),
496
- v && /* @__PURE__ */ l("div", {
504
+ b && /* @__PURE__ */ d("div", {
497
505
  className: "pt-4 border-t border-border-default",
498
- children: v
506
+ children: b
499
507
  }),
500
- /* @__PURE__ */ u("div", {
508
+ /* @__PURE__ */ f("div", {
501
509
  className: "flex items-center justify-end gap-3 pt-4 border-t border-border-default",
502
- children: [/* @__PURE__ */ l("button", {
510
+ children: [/* @__PURE__ */ d("button", {
503
511
  type: "button",
504
- onClick: g,
505
- disabled: _,
512
+ onClick: v,
513
+ disabled: y,
506
514
  className: "px-4 py-2 text-sm font-medium text-text-primary bg-bg-surface border border-border-default rounded-md hover:bg-bg-elevated transition-colors disabled:opacity-50",
507
- children: T("vibecontrols.actions.form.cancel", "Cancel")
508
- }), /* @__PURE__ */ l("button", {
515
+ children: D("vibecontrols.actions.form.cancel", "Cancel")
516
+ }), /* @__PURE__ */ d("button", {
509
517
  type: "submit",
510
- disabled: _,
518
+ disabled: y,
511
519
  className: "px-4 py-2 text-sm font-medium rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50",
512
- children: _ ? T("vibecontrols.actions.form.saving", "Saving...") : p ? T("vibecontrols.actions.form.updateAction", "Update Action") : T("vibecontrols.actions.form.createAction", "Create Action")
520
+ children: y ? D("vibecontrols.actions.form.saving", "Saving...") : h ? D("vibecontrols.actions.form.updateAction", "Update Action") : D("vibecontrols.actions.form.createAction", "Create Action")
513
521
  })]
514
522
  })
515
523
  ]
@@ -518,6 +526,6 @@ function f({ title: f, initialData: p, agents: m, onSubmit: h, onCancel: g, isLo
518
526
  });
519
527
  }
520
528
  //#endregion
521
- export { f as ActionForm };
529
+ export { m as ActionForm };
522
530
 
523
531
  //# sourceMappingURL=ActionForm.js.map