@synergenius/flow-weaver-pack-weaver 0.9.81 → 0.9.83

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.
@@ -0,0 +1,644 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/ui/task-editor.tsx
21
+ var task_editor_exports = {};
22
+ __export(task_editor_exports, {
23
+ default: () => task_editor_default
24
+ });
25
+ module.exports = __toCommonJS(task_editor_exports);
26
+ var React = require("react");
27
+ var { useState, useEffect, useCallback } = React;
28
+ var {
29
+ Flex,
30
+ Typography,
31
+ Input,
32
+ Button,
33
+ IconButton,
34
+ Tag,
35
+ Field,
36
+ toast,
37
+ usePackWorkspace
38
+ } = require("@fw/plugin-ui-kit");
39
+ var PRIORITY_OPTIONS = [
40
+ { id: "0", label: "0 - None" },
41
+ { id: "1", label: "1 - Low" },
42
+ { id: "2", label: "2 - Medium" },
43
+ { id: "3", label: "3 - High" },
44
+ { id: "4", label: "4 - Critical" }
45
+ ];
46
+ var COMPLEXITY_OPTIONS = [
47
+ { id: "", label: "Not set" },
48
+ { id: "trivial", label: "Trivial" },
49
+ { id: "simple", label: "Simple" },
50
+ { id: "moderate", label: "Moderate" },
51
+ { id: "complex", label: "Complex" }
52
+ ];
53
+ var STATUS_COLOR = {
54
+ "pending": "secondary",
55
+ "in-progress": "info",
56
+ "blocked": "caution",
57
+ "done": "positive",
58
+ "failed": "negative",
59
+ "cancelled": "negative"
60
+ };
61
+ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }) {
62
+ const ctx = usePackWorkspace();
63
+ const { callTool } = ctx;
64
+ const [title, setTitle] = useState("");
65
+ const [description, setDescription] = useState("");
66
+ const [priority, setPriority] = useState("0");
67
+ const [complexity, setComplexity] = useState("");
68
+ const [assignedProfile, setAssignedProfile] = useState("");
69
+ const [maxAttempts, setMaxAttempts] = useState("3");
70
+ const [budgetTokens, setBudgetTokens] = useState("");
71
+ const [budgetCost, setBudgetCost] = useState("");
72
+ const [notes, setNotes] = useState("");
73
+ const [files, setFiles] = useState([]);
74
+ const [newFile, setNewFile] = useState("");
75
+ const [dependsOn, setDependsOn] = useState([]);
76
+ const [newDep, setNewDep] = useState("");
77
+ const [taskData, setTaskData] = useState(null);
78
+ const [profiles, setProfiles] = useState([]);
79
+ const [loading, setLoading] = useState(mode === "edit");
80
+ useEffect(() => {
81
+ (async () => {
82
+ try {
83
+ const raw = await callTool("fw_weaver_profile_list", {});
84
+ const data = typeof raw === "string" ? JSON.parse(raw) : raw;
85
+ if (Array.isArray(data)) {
86
+ setProfiles(data.map((p) => ({
87
+ id: p.id,
88
+ name: p.name || p.id
89
+ })));
90
+ }
91
+ } catch {
92
+ }
93
+ })();
94
+ }, [callTool]);
95
+ useEffect(() => {
96
+ if (mode !== "edit" || !taskId) return;
97
+ let cancelled = false;
98
+ (async () => {
99
+ try {
100
+ const raw = await callTool("fw_weaver_task_get", { id: taskId });
101
+ if (cancelled) return;
102
+ const data = typeof raw === "string" ? JSON.parse(raw) : raw;
103
+ const t = data?.task ?? data;
104
+ if (!t || !t.id) {
105
+ toast("Task not found", { type: "error" });
106
+ onCancel();
107
+ return;
108
+ }
109
+ setTaskData(t);
110
+ setTitle(t.title || "");
111
+ setDescription(t.description || "");
112
+ setPriority(String(t.priority ?? 0));
113
+ setComplexity(t.complexity || "");
114
+ setAssignedProfile(t.assignedProfile || "");
115
+ setMaxAttempts(String(t.maxAttempts ?? 3));
116
+ setBudgetTokens(t.budgetTokens != null ? String(t.budgetTokens) : "");
117
+ setBudgetCost(t.budgetCost != null ? String(t.budgetCost) : "");
118
+ setNotes(t.context?.notes || "");
119
+ setFiles(t.context?.files || []);
120
+ setDependsOn(t.dependsOn || []);
121
+ } catch {
122
+ toast("Failed to load task", { type: "error" });
123
+ onCancel();
124
+ } finally {
125
+ if (!cancelled) setLoading(false);
126
+ }
127
+ })();
128
+ return () => {
129
+ cancelled = true;
130
+ };
131
+ }, [mode, taskId, callTool]);
132
+ const isDirty = useCallback(() => {
133
+ if (mode === "create") {
134
+ return !!(title.trim() || description.trim() || notes.trim() || files.length > 0 || dependsOn.length > 0 || priority !== "0" || complexity || assignedProfile || maxAttempts !== "3" || budgetTokens || budgetCost);
135
+ }
136
+ if (!taskData) return false;
137
+ return title.trim() !== (taskData.title || "") || description.trim() !== (taskData.description || "") || notes.trim() !== (taskData.context?.notes || "") || JSON.stringify(files) !== JSON.stringify(taskData.context?.files || []) || priority !== String(taskData.priority ?? 0) || complexity !== (taskData.complexity || "") || assignedProfile !== (taskData.assignedProfile || "") || maxAttempts !== String(taskData.maxAttempts ?? 3) || budgetTokens !== (taskData.budgetTokens != null ? String(taskData.budgetTokens) : "") || budgetCost !== (taskData.budgetCost != null ? String(taskData.budgetCost) : "");
138
+ }, [mode, title, description, notes, files, dependsOn, priority, complexity, assignedProfile, maxAttempts, budgetTokens, budgetCost, taskData]);
139
+ const handleBack = useCallback(async () => {
140
+ if (isDirty()) {
141
+ const ok = await ctx.confirm("Discard unsaved changes?", {
142
+ title: "Unsaved Changes",
143
+ state: "warning"
144
+ });
145
+ if (!ok) return;
146
+ }
147
+ onCancel();
148
+ }, [isDirty, ctx, onCancel]);
149
+ const handleAddFile = useCallback(() => {
150
+ const trimmed = newFile.trim();
151
+ if (!trimmed) return;
152
+ setFiles((prev) => [...prev, trimmed]);
153
+ setNewFile("");
154
+ }, [newFile]);
155
+ const handleRemoveFile = useCallback((index) => {
156
+ setFiles((prev) => prev.filter((_, i) => i !== index));
157
+ }, []);
158
+ const handleAddDep = useCallback(() => {
159
+ const trimmed = newDep.trim();
160
+ if (!trimmed) return;
161
+ setDependsOn((prev) => [...prev, trimmed]);
162
+ setNewDep("");
163
+ }, [newDep]);
164
+ const handleRemoveDep = useCallback((index) => {
165
+ setDependsOn((prev) => prev.filter((_, i) => i !== index));
166
+ }, []);
167
+ const handleSave = useCallback(async () => {
168
+ if (!title.trim()) {
169
+ toast("Title is required", { type: "error" });
170
+ return;
171
+ }
172
+ try {
173
+ if (mode === "create") {
174
+ const args = {
175
+ title: title.trim(),
176
+ description: description.trim(),
177
+ priority: parseInt(priority, 10) || 0,
178
+ maxAttempts: parseInt(maxAttempts, 10) || 3
179
+ };
180
+ if (complexity) args.complexity = complexity;
181
+ if (assignedProfile) args.assignedProfile = assignedProfile;
182
+ if (budgetTokens) args.budgetTokens = parseInt(budgetTokens, 10);
183
+ if (budgetCost) args.budgetCost = parseFloat(budgetCost);
184
+ if (dependsOn.length > 0) args.dependsOn = dependsOn;
185
+ const result = await callTool("fw_weaver_task_create", args);
186
+ const createData = typeof result === "string" ? JSON.parse(result) : result;
187
+ const createdId = createData?.task?.id;
188
+ if (createdId && (notes.trim() || files.length > 0)) {
189
+ await callTool("fw_weaver_task_update", {
190
+ id: createdId,
191
+ context: {
192
+ notes: notes.trim(),
193
+ files,
194
+ runSummaries: []
195
+ }
196
+ });
197
+ }
198
+ toast("Task created", { type: "success" });
199
+ } else {
200
+ const patch = {
201
+ id: taskId,
202
+ title: title.trim(),
203
+ description: description.trim(),
204
+ priority: parseInt(priority, 10) || 0,
205
+ maxAttempts: parseInt(maxAttempts, 10) || 3,
206
+ complexity: complexity || void 0,
207
+ assignedProfile: assignedProfile || null
208
+ };
209
+ if (budgetTokens) {
210
+ patch.budgetTokens = parseInt(budgetTokens, 10);
211
+ } else {
212
+ patch.budgetTokens = void 0;
213
+ }
214
+ if (budgetCost) {
215
+ patch.budgetCost = parseFloat(budgetCost);
216
+ } else {
217
+ patch.budgetCost = void 0;
218
+ }
219
+ patch.context = {
220
+ files,
221
+ notes: notes.trim(),
222
+ runSummaries: taskData?.context?.runSummaries || [],
223
+ lastError: taskData?.context?.lastError
224
+ };
225
+ await callTool("fw_weaver_task_update", patch);
226
+ toast("Task updated", { type: "success" });
227
+ }
228
+ onSave();
229
+ } catch (err) {
230
+ toast(err instanceof Error ? err.message : `Failed to ${mode} task`, { type: "error" });
231
+ }
232
+ }, [mode, taskId, title, description, priority, complexity, assignedProfile, maxAttempts, budgetTokens, budgetCost, notes, files, dependsOn, taskData, callTool, onSave]);
233
+ const handleDelete = useCallback(async () => {
234
+ if (!taskId) return;
235
+ const ok = await ctx.confirm("Are you sure you want to cancel this task?", {
236
+ title: "Cancel Task",
237
+ confirmLabel: "Cancel Task",
238
+ state: "danger"
239
+ });
240
+ if (!ok) return;
241
+ try {
242
+ await callTool("fw_weaver_task_cancel", { id: taskId });
243
+ toast("Task cancelled", { type: "success" });
244
+ if (onDelete) onDelete();
245
+ } catch (err) {
246
+ toast(err instanceof Error ? err.message : "Failed to cancel task", { type: "error" });
247
+ }
248
+ }, [taskId, callTool, onDelete, ctx]);
249
+ if (loading) {
250
+ return React.createElement(
251
+ Flex,
252
+ {
253
+ variant: "column-center-center-nowrap-12",
254
+ style: { padding: "24px 16px" }
255
+ },
256
+ React.createElement(Typography, { variant: "caption-regular", color: "color-text-subtle" }, "Loading task...")
257
+ );
258
+ }
259
+ const profileOptions = [
260
+ { id: "", label: "Not assigned" },
261
+ ...profiles.map((p) => ({ id: p.id, label: p.name }))
262
+ ];
263
+ return React.createElement(
264
+ Flex,
265
+ {
266
+ variant: "column-stretch-start-nowrap-0",
267
+ style: { width: "100%", height: "100%", overflow: "hidden" }
268
+ },
269
+ // -- Header bar --
270
+ React.createElement(
271
+ Flex,
272
+ {
273
+ variant: "row-center-space-between-nowrap-8",
274
+ style: { padding: "8px 16px", flexShrink: 0, borderBottom: "1px solid var(--color-border-default)" }
275
+ },
276
+ React.createElement(
277
+ Flex,
278
+ { variant: "row-center-start-nowrap-8" },
279
+ React.createElement(IconButton, {
280
+ icon: "back",
281
+ size: "xs",
282
+ variant: "clear",
283
+ onClick: handleBack,
284
+ title: "Back"
285
+ }),
286
+ React.createElement(
287
+ Typography,
288
+ { variant: "caption-thick", color: "color-text-high" },
289
+ mode === "create" ? "Create Task" : "Edit Task"
290
+ )
291
+ ),
292
+ mode === "edit" && onDelete && React.createElement(IconButton, {
293
+ icon: "outlinedDelete",
294
+ size: "sm",
295
+ variant: "clear",
296
+ color: "danger",
297
+ onClick: handleDelete,
298
+ title: "Cancel task"
299
+ })
300
+ ),
301
+ // -- Scrollable form body --
302
+ React.createElement(
303
+ Flex,
304
+ {
305
+ variant: "column-stretch-start-nowrap-10",
306
+ style: { flex: 1, minHeight: 0, overflow: "auto", padding: "12px 16px" }
307
+ },
308
+ // -- Edit-only: Status tag --
309
+ mode === "edit" && taskData && React.createElement(
310
+ Field,
311
+ { label: "Status" },
312
+ React.createElement(Tag, {
313
+ size: "small",
314
+ color: STATUS_COLOR[taskData.status] || "secondary"
315
+ }, taskData.status)
316
+ ),
317
+ // -- Title --
318
+ React.createElement(
319
+ Field,
320
+ { label: "Title" },
321
+ React.createElement(Input, {
322
+ type: "text",
323
+ size: "small",
324
+ placeholder: "Task title (required)",
325
+ value: title,
326
+ onChange: (v) => setTitle(v),
327
+ defaultBoxStyle: { flex: 1, minWidth: 0 },
328
+ inputBoxStyle: { maxWidth: "none" }
329
+ })
330
+ ),
331
+ // -- Description --
332
+ React.createElement(
333
+ Field,
334
+ { label: "Description" },
335
+ React.createElement(Input, {
336
+ type: "text",
337
+ size: "small",
338
+ placeholder: "Detailed task description",
339
+ value: description,
340
+ onChange: (v) => setDescription(v),
341
+ defaultBoxStyle: { flex: 1, minWidth: 0 },
342
+ inputBoxStyle: { maxWidth: "none" }
343
+ })
344
+ ),
345
+ // -- Priority --
346
+ React.createElement(
347
+ Field,
348
+ { label: "Priority" },
349
+ React.createElement(Input, {
350
+ type: "select",
351
+ size: "small",
352
+ options: PRIORITY_OPTIONS,
353
+ optionId: priority,
354
+ onChange: (id) => setPriority(id),
355
+ defaultBoxStyle: { flex: 1, minWidth: 0 }
356
+ })
357
+ ),
358
+ // -- Complexity --
359
+ React.createElement(
360
+ Field,
361
+ { label: "Complexity" },
362
+ React.createElement(Input, {
363
+ type: "select",
364
+ size: "small",
365
+ options: COMPLEXITY_OPTIONS,
366
+ optionId: complexity,
367
+ onChange: (id) => setComplexity(id),
368
+ defaultBoxStyle: { flex: 1, minWidth: 0 }
369
+ })
370
+ ),
371
+ // -- Assigned Profile --
372
+ React.createElement(
373
+ Field,
374
+ { label: "Profile" },
375
+ React.createElement(Input, {
376
+ type: "select",
377
+ size: "small",
378
+ options: profileOptions,
379
+ optionId: assignedProfile,
380
+ onChange: (id) => setAssignedProfile(id),
381
+ placeholder: "Select profile",
382
+ defaultBoxStyle: { flex: 1, minWidth: 0 }
383
+ })
384
+ ),
385
+ // -- Max Attempts --
386
+ React.createElement(
387
+ Field,
388
+ { label: "Max Attempts" },
389
+ React.createElement(Input, {
390
+ type: "number",
391
+ size: "small",
392
+ placeholder: "3",
393
+ value: maxAttempts,
394
+ onChange: (v) => setMaxAttempts(v),
395
+ defaultBoxStyle: { flex: 1, minWidth: 0 },
396
+ inputBoxStyle: { maxWidth: "none" }
397
+ })
398
+ ),
399
+ // -- Budget Tokens --
400
+ React.createElement(
401
+ Field,
402
+ { label: "Budget Tokens" },
403
+ React.createElement(Input, {
404
+ type: "number",
405
+ size: "small",
406
+ placeholder: "Optional token limit",
407
+ value: budgetTokens,
408
+ onChange: (v) => setBudgetTokens(v),
409
+ defaultBoxStyle: { flex: 1, minWidth: 0 },
410
+ inputBoxStyle: { maxWidth: "none" }
411
+ })
412
+ ),
413
+ // -- Budget Cost --
414
+ React.createElement(
415
+ Field,
416
+ { label: "Budget Cost" },
417
+ React.createElement(Input, {
418
+ type: "number",
419
+ size: "small",
420
+ placeholder: "Optional cost limit (USD)",
421
+ value: budgetCost,
422
+ onChange: (v) => setBudgetCost(v),
423
+ defaultBoxStyle: { flex: 1, minWidth: 0 },
424
+ inputBoxStyle: { maxWidth: "none" }
425
+ })
426
+ ),
427
+ // -- Notes --
428
+ React.createElement(
429
+ Field,
430
+ { label: "Notes" },
431
+ React.createElement(Input, {
432
+ type: "text",
433
+ size: "small",
434
+ placeholder: "Optional notes for context",
435
+ value: notes,
436
+ onChange: (v) => setNotes(v),
437
+ defaultBoxStyle: { flex: 1, minWidth: 0 },
438
+ inputBoxStyle: { maxWidth: "none" }
439
+ })
440
+ ),
441
+ // -- Files --
442
+ React.createElement(
443
+ Field,
444
+ { label: "Files", align: "start" },
445
+ React.createElement(
446
+ Flex,
447
+ { variant: "column-stretch-start-nowrap-6" },
448
+ // Add file row
449
+ React.createElement(
450
+ Flex,
451
+ { variant: "row-center-start-nowrap-4", style: { overflow: "hidden" } },
452
+ React.createElement(Input, {
453
+ type: "text",
454
+ size: "small",
455
+ placeholder: "File path",
456
+ value: newFile,
457
+ onChange: (v) => setNewFile(v),
458
+ onEnter: handleAddFile,
459
+ defaultBoxStyle: { flex: 1, minWidth: 0 },
460
+ inputBoxStyle: { maxWidth: "none" }
461
+ }),
462
+ React.createElement(IconButton, {
463
+ icon: "add",
464
+ size: "sm",
465
+ variant: "outlined",
466
+ color: "primary",
467
+ onClick: handleAddFile,
468
+ disabled: !newFile.trim()
469
+ })
470
+ ),
471
+ ...files.map(
472
+ (file, idx) => React.createElement(
473
+ Flex,
474
+ {
475
+ key: `file-${idx}`,
476
+ variant: "row-center-start-nowrap-6",
477
+ style: { paddingLeft: "4px" }
478
+ },
479
+ React.createElement(Typography, {
480
+ variant: "smallCaption-regular",
481
+ color: "color-text-high",
482
+ style: { flex: 1, minWidth: 0, fontFamily: "var(--font-mono, monospace)" }
483
+ }, file),
484
+ React.createElement(IconButton, {
485
+ icon: "close",
486
+ size: "xs",
487
+ variant: "clear",
488
+ color: "danger",
489
+ onClick: () => handleRemoveFile(idx)
490
+ })
491
+ )
492
+ )
493
+ )
494
+ ),
495
+ // -- Dependencies --
496
+ React.createElement(
497
+ Field,
498
+ { label: "Dependencies", align: "start" },
499
+ React.createElement(
500
+ Flex,
501
+ { variant: "column-stretch-start-nowrap-6" },
502
+ // Add dependency row (create mode only)
503
+ mode === "create" && React.createElement(
504
+ Flex,
505
+ { variant: "row-center-start-nowrap-4", style: { overflow: "hidden" } },
506
+ React.createElement(Input, {
507
+ type: "text",
508
+ size: "small",
509
+ placeholder: "Task ID",
510
+ value: newDep,
511
+ onChange: (v) => setNewDep(v),
512
+ onEnter: handleAddDep,
513
+ defaultBoxStyle: { flex: 1, minWidth: 0 },
514
+ inputBoxStyle: { maxWidth: "none" }
515
+ }),
516
+ React.createElement(IconButton, {
517
+ icon: "add",
518
+ size: "sm",
519
+ variant: "outlined",
520
+ color: "primary",
521
+ onClick: handleAddDep,
522
+ disabled: !newDep.trim()
523
+ })
524
+ ),
525
+ // Dependency list
526
+ dependsOn.length > 0 ? React.createElement(
527
+ Flex,
528
+ { variant: "column-stretch-start-nowrap-4" },
529
+ ...dependsOn.map(
530
+ (dep, idx) => React.createElement(
531
+ Flex,
532
+ {
533
+ key: `dep-${idx}`,
534
+ variant: "row-center-start-nowrap-6",
535
+ style: { paddingLeft: "4px" }
536
+ },
537
+ React.createElement(Typography, {
538
+ variant: "smallCaption-regular",
539
+ color: "color-text-high",
540
+ style: { flex: 1, minWidth: 0, fontFamily: "var(--font-mono, monospace)" }
541
+ }, dep),
542
+ mode === "create" && React.createElement(IconButton, {
543
+ icon: "close",
544
+ size: "xs",
545
+ variant: "clear",
546
+ color: "danger",
547
+ onClick: () => handleRemoveDep(idx)
548
+ })
549
+ )
550
+ )
551
+ ) : React.createElement(Typography, {
552
+ variant: "smallCaption-regular",
553
+ color: "color-text-subtle",
554
+ style: { paddingLeft: "4px" }
555
+ }, "None"),
556
+ mode === "edit" && React.createElement(Typography, {
557
+ variant: "smallCaption-regular",
558
+ color: "color-text-subtle",
559
+ style: { paddingLeft: "4px", fontStyle: "italic" }
560
+ }, "Dependencies cannot be changed after creation")
561
+ )
562
+ ),
563
+ // -- Edit-only: read-only metadata --
564
+ mode === "edit" && taskData && React.createElement(
565
+ Flex,
566
+ {
567
+ variant: "column-stretch-start-nowrap-10",
568
+ style: { marginTop: 8, paddingTop: 12, borderTop: "1px solid var(--color-border-default)" }
569
+ },
570
+ React.createElement(
571
+ Field,
572
+ { label: "Created by" },
573
+ React.createElement(
574
+ Typography,
575
+ { variant: "smallCaption-regular", color: "color-text-medium" },
576
+ taskData.createdBy || "unknown"
577
+ )
578
+ ),
579
+ React.createElement(
580
+ Field,
581
+ { label: "Created at" },
582
+ React.createElement(
583
+ Typography,
584
+ { variant: "smallCaption-regular", color: "color-text-medium" },
585
+ taskData.createdAt ? new Date(taskData.createdAt).toLocaleString() : "-"
586
+ )
587
+ ),
588
+ React.createElement(
589
+ Field,
590
+ { label: "Updated at" },
591
+ React.createElement(
592
+ Typography,
593
+ { variant: "smallCaption-regular", color: "color-text-medium" },
594
+ taskData.updatedAt ? new Date(taskData.updatedAt).toLocaleString() : "-"
595
+ )
596
+ ),
597
+ React.createElement(
598
+ Field,
599
+ { label: "Tokens used" },
600
+ React.createElement(
601
+ Typography,
602
+ { variant: "smallCaption-regular", color: "color-text-medium" },
603
+ (taskData.tokensUsed ?? 0).toLocaleString()
604
+ )
605
+ ),
606
+ React.createElement(
607
+ Field,
608
+ { label: "Cost used" },
609
+ React.createElement(
610
+ Typography,
611
+ { variant: "smallCaption-regular", color: "color-text-medium" },
612
+ `$${(taskData.costUsed ?? 0).toFixed(3)}`
613
+ )
614
+ ),
615
+ taskData.context?.lastError && React.createElement(
616
+ Field,
617
+ { label: "Last error", align: "start" },
618
+ React.createElement(Typography, {
619
+ variant: "smallCaption-regular",
620
+ color: "color-status-negative",
621
+ style: { fontFamily: "var(--font-mono, monospace)", whiteSpace: "pre-wrap" }
622
+ }, taskData.context.lastError)
623
+ )
624
+ )
625
+ ),
626
+ // -- Footer bar with save button --
627
+ React.createElement(
628
+ Flex,
629
+ {
630
+ variant: "row-center-end-nowrap-8",
631
+ style: { padding: "8px 16px", flexShrink: 0, borderTop: "1px solid var(--color-border-default)" }
632
+ },
633
+ React.createElement(Button, {
634
+ size: "xs",
635
+ variant: "fill",
636
+ color: "primary",
637
+ onClick: handleSave,
638
+ disabled: !title.trim()
639
+ }, mode === "create" ? "Create" : "Save")
640
+ )
641
+ );
642
+ }
643
+ var task_editor_default = TaskEditor;
644
+ module.exports = TaskEditor;
@@ -913,8 +913,9 @@
913
913
  "usage": "<task>"
914
914
  },
915
915
  {
916
- "name": "session",
917
- "description": "Start interactive bot session"
916
+ "name": "swarm",
917
+ "description": "Manage the swarm: start, stop, pause, status, config",
918
+ "usage": "weaver swarm <start|stop|pause|status|config> [options]"
918
919
  },
919
920
  {
920
921
  "name": "steer",
@@ -922,9 +923,19 @@
922
923
  "usage": "<pause|resume|cancel|redirect|queue> [payload]"
923
924
  },
924
925
  {
925
- "name": "queue",
926
- "description": "Manage bot task queue",
927
- "usage": "<add|list|clear|remove> [task|id]"
926
+ "name": "task",
927
+ "description": "Manage tasks: create, list, get, clear, cancel, retry",
928
+ "usage": "weaver task <create|list|get|clear|cancel|retry> [options]"
929
+ },
930
+ {
931
+ "name": "profile",
932
+ "description": "Manage profiles: list, create, delete",
933
+ "usage": "weaver profile <list|create|delete> [options]"
934
+ },
935
+ {
936
+ "name": "reset",
937
+ "description": "Full reset: stop swarm, clear all data, recreate defaults",
938
+ "usage": "weaver reset --confirm"
928
939
  },
929
940
  {
930
941
  "name": "genesis",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synergenius/flow-weaver-pack-weaver",
3
- "version": "0.9.81",
3
+ "version": "0.9.83",
4
4
  "description": "AI bot for Flow Weaver. Execute tasks, run workflows, evolve autonomously.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",