@synergenius/flow-weaver-pack-weaver 0.9.86 → 0.9.88

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.
@@ -1613,6 +1613,7 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }) {
1613
1613
  const [newDep, setNewDep] = useState5("");
1614
1614
  const [taskData, setTaskData] = useState5(null);
1615
1615
  const [profiles, setProfiles] = useState5([]);
1616
+ const [availableTasks, setAvailableTasks] = useState5([]);
1616
1617
  const [loading, setLoading] = useState5(mode === "edit");
1617
1618
  useEffect3(() => {
1618
1619
  (async () => {
@@ -1627,6 +1628,17 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }) {
1627
1628
  }
1628
1629
  } catch {
1629
1630
  }
1631
+ try {
1632
+ const taskRaw = await callTool("fw_weaver_task_list", {});
1633
+ const taskData2 = typeof taskRaw === "string" ? JSON.parse(taskRaw) : taskRaw;
1634
+ if (Array.isArray(taskData2)) {
1635
+ setAvailableTasks(taskData2.map((t) => ({
1636
+ id: t.id,
1637
+ title: t.title || t.id
1638
+ })));
1639
+ }
1640
+ } catch {
1641
+ }
1630
1642
  })();
1631
1643
  }, [callTool]);
1632
1644
  useEffect3(() => {
@@ -1928,9 +1940,7 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }) {
1928
1940
  size: "small",
1929
1941
  placeholder: "3",
1930
1942
  value: maxAttempts,
1931
- onChange: (v) => setMaxAttempts(v),
1932
- defaultBoxStyle: { flex: 1, minWidth: 0 },
1933
- inputBoxStyle: { maxWidth: "none" }
1943
+ onChange: (v) => setMaxAttempts(v)
1934
1944
  })
1935
1945
  ),
1936
1946
  // -- Budget Tokens --
@@ -1942,9 +1952,7 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }) {
1942
1952
  size: "small",
1943
1953
  placeholder: "Optional token limit",
1944
1954
  value: budgetTokens,
1945
- onChange: (v) => setBudgetTokens(v),
1946
- defaultBoxStyle: { flex: 1, minWidth: 0 },
1947
- inputBoxStyle: { maxWidth: "none" }
1955
+ onChange: (v) => setBudgetTokens(v)
1948
1956
  })
1949
1957
  ),
1950
1958
  // -- Budget Cost --
@@ -1956,18 +1964,17 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }) {
1956
1964
  size: "small",
1957
1965
  placeholder: "Optional cost limit (USD)",
1958
1966
  value: budgetCost,
1959
- onChange: (v) => setBudgetCost(v),
1960
- defaultBoxStyle: { flex: 1, minWidth: 0 },
1961
- inputBoxStyle: { maxWidth: "none" }
1967
+ onChange: (v) => setBudgetCost(v)
1962
1968
  })
1963
1969
  ),
1964
1970
  // -- Notes --
1965
1971
  React7.createElement(
1966
1972
  Field,
1967
- { label: "Notes" },
1973
+ { label: "Notes", align: "start" },
1968
1974
  React7.createElement(Input, {
1969
1975
  type: "text",
1970
1976
  size: "small",
1977
+ multiline: true,
1971
1978
  placeholder: "Optional notes for context",
1972
1979
  value: notes,
1973
1980
  onChange: (v) => setNotes(v),
@@ -1982,29 +1989,23 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }) {
1982
1989
  React7.createElement(
1983
1990
  Flex6,
1984
1991
  { variant: "column-stretch-start-nowrap-6" },
1985
- // Add file row
1986
- React7.createElement(
1987
- Flex6,
1988
- { variant: "row-center-start-nowrap-4", style: { overflow: "hidden" } },
1989
- React7.createElement(Input, {
1990
- type: "text",
1991
- size: "small",
1992
- placeholder: "File path",
1993
- value: newFile,
1994
- onChange: (v) => setNewFile(v),
1995
- onEnter: handleAddFile,
1996
- defaultBoxStyle: { flex: 1, minWidth: 0 },
1997
- inputBoxStyle: { maxWidth: "none" }
1998
- }),
1999
- React7.createElement(IconButton4, {
2000
- icon: "add",
2001
- size: "sm",
2002
- variant: "outlined",
2003
- color: "primary",
2004
- onClick: handleAddFile,
2005
- disabled: !newFile.trim()
2006
- })
2007
- ),
1992
+ // File picker
1993
+ React7.createElement(Input, {
1994
+ type: "path",
1995
+ size: "small",
1996
+ placeholder: "Click to browse files",
1997
+ value: "",
1998
+ onClick: async () => {
1999
+ const selected = await ctx.browseFiles({ title: "Select Files", multiple: true });
2000
+ if (selected.length > 0) {
2001
+ setFiles((prev) => {
2002
+ const unique = selected.filter((f) => !prev.includes(f));
2003
+ return [...prev, ...unique];
2004
+ });
2005
+ }
2006
+ },
2007
+ defaultBoxStyle: { flex: 1, minWidth: 0 }
2008
+ }),
2008
2009
  ...files.map(
2009
2010
  (file, idx) => React7.createElement(
2010
2011
  Flex6,
@@ -2039,16 +2040,15 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }) {
2039
2040
  // Add dependency row (create mode only)
2040
2041
  mode === "create" && React7.createElement(
2041
2042
  Flex6,
2042
- { variant: "row-center-start-nowrap-4", style: { overflow: "hidden" } },
2043
+ { variant: "row-center-start-nowrap-4" },
2043
2044
  React7.createElement(Input, {
2044
- type: "text",
2045
+ type: "select",
2045
2046
  size: "small",
2046
- placeholder: "Task ID",
2047
- value: newDep,
2047
+ placeholder: "Select a task",
2048
+ options: availableTasks.filter((t) => !deps.includes(t.id) && t.id !== taskId).map((t) => ({ id: t.id, label: t.title })),
2049
+ optionId: newDep,
2048
2050
  onChange: (v) => setNewDep(v),
2049
- onEnter: handleAddDep,
2050
- defaultBoxStyle: { flex: 1, minWidth: 0 },
2051
- inputBoxStyle: { maxWidth: "none" }
2051
+ defaultBoxStyle: { flex: 1, minWidth: 0 }
2052
2052
  }),
2053
2053
  React7.createElement(IconButton4, {
2054
2054
  icon: "add",
@@ -2074,8 +2074,11 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }) {
2074
2074
  React7.createElement(Typography6, {
2075
2075
  variant: "smallCaption-regular",
2076
2076
  color: "color-text-high",
2077
- style: { flex: 1, minWidth: 0, fontFamily: "var(--font-mono, monospace)" }
2078
- }, dep),
2077
+ style: { flex: 1, minWidth: 0 }
2078
+ }, (() => {
2079
+ const t = availableTasks.find((t2) => t2.id === dep);
2080
+ return t ? t.title : dep;
2081
+ })()),
2079
2082
  mode === "create" && React7.createElement(IconButton4, {
2080
2083
  icon: "close",
2081
2084
  size: "xs",
@@ -76,6 +76,7 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }) {
76
76
  const [newDep, setNewDep] = useState("");
77
77
  const [taskData, setTaskData] = useState(null);
78
78
  const [profiles, setProfiles] = useState([]);
79
+ const [availableTasks, setAvailableTasks] = useState([]);
79
80
  const [loading, setLoading] = useState(mode === "edit");
80
81
  useEffect(() => {
81
82
  (async () => {
@@ -90,6 +91,17 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }) {
90
91
  }
91
92
  } catch {
92
93
  }
94
+ try {
95
+ const taskRaw = await callTool("fw_weaver_task_list", {});
96
+ const taskData2 = typeof taskRaw === "string" ? JSON.parse(taskRaw) : taskRaw;
97
+ if (Array.isArray(taskData2)) {
98
+ setAvailableTasks(taskData2.map((t) => ({
99
+ id: t.id,
100
+ title: t.title || t.id
101
+ })));
102
+ }
103
+ } catch {
104
+ }
93
105
  })();
94
106
  }, [callTool]);
95
107
  useEffect(() => {
@@ -391,9 +403,7 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }) {
391
403
  size: "small",
392
404
  placeholder: "3",
393
405
  value: maxAttempts,
394
- onChange: (v) => setMaxAttempts(v),
395
- defaultBoxStyle: { flex: 1, minWidth: 0 },
396
- inputBoxStyle: { maxWidth: "none" }
406
+ onChange: (v) => setMaxAttempts(v)
397
407
  })
398
408
  ),
399
409
  // -- Budget Tokens --
@@ -405,9 +415,7 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }) {
405
415
  size: "small",
406
416
  placeholder: "Optional token limit",
407
417
  value: budgetTokens,
408
- onChange: (v) => setBudgetTokens(v),
409
- defaultBoxStyle: { flex: 1, minWidth: 0 },
410
- inputBoxStyle: { maxWidth: "none" }
418
+ onChange: (v) => setBudgetTokens(v)
411
419
  })
412
420
  ),
413
421
  // -- Budget Cost --
@@ -419,18 +427,17 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }) {
419
427
  size: "small",
420
428
  placeholder: "Optional cost limit (USD)",
421
429
  value: budgetCost,
422
- onChange: (v) => setBudgetCost(v),
423
- defaultBoxStyle: { flex: 1, minWidth: 0 },
424
- inputBoxStyle: { maxWidth: "none" }
430
+ onChange: (v) => setBudgetCost(v)
425
431
  })
426
432
  ),
427
433
  // -- Notes --
428
434
  React.createElement(
429
435
  Field,
430
- { label: "Notes" },
436
+ { label: "Notes", align: "start" },
431
437
  React.createElement(Input, {
432
438
  type: "text",
433
439
  size: "small",
440
+ multiline: true,
434
441
  placeholder: "Optional notes for context",
435
442
  value: notes,
436
443
  onChange: (v) => setNotes(v),
@@ -445,29 +452,23 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }) {
445
452
  React.createElement(
446
453
  Flex,
447
454
  { 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
- ),
455
+ // File picker
456
+ React.createElement(Input, {
457
+ type: "path",
458
+ size: "small",
459
+ placeholder: "Click to browse files",
460
+ value: "",
461
+ onClick: async () => {
462
+ const selected = await ctx.browseFiles({ title: "Select Files", multiple: true });
463
+ if (selected.length > 0) {
464
+ setFiles((prev) => {
465
+ const unique = selected.filter((f) => !prev.includes(f));
466
+ return [...prev, ...unique];
467
+ });
468
+ }
469
+ },
470
+ defaultBoxStyle: { flex: 1, minWidth: 0 }
471
+ }),
471
472
  ...files.map(
472
473
  (file, idx) => React.createElement(
473
474
  Flex,
@@ -502,16 +503,15 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }) {
502
503
  // Add dependency row (create mode only)
503
504
  mode === "create" && React.createElement(
504
505
  Flex,
505
- { variant: "row-center-start-nowrap-4", style: { overflow: "hidden" } },
506
+ { variant: "row-center-start-nowrap-4" },
506
507
  React.createElement(Input, {
507
- type: "text",
508
+ type: "select",
508
509
  size: "small",
509
- placeholder: "Task ID",
510
- value: newDep,
510
+ placeholder: "Select a task",
511
+ options: availableTasks.filter((t) => !deps.includes(t.id) && t.id !== taskId).map((t) => ({ id: t.id, label: t.title })),
512
+ optionId: newDep,
511
513
  onChange: (v) => setNewDep(v),
512
- onEnter: handleAddDep,
513
- defaultBoxStyle: { flex: 1, minWidth: 0 },
514
- inputBoxStyle: { maxWidth: "none" }
514
+ defaultBoxStyle: { flex: 1, minWidth: 0 }
515
515
  }),
516
516
  React.createElement(IconButton, {
517
517
  icon: "add",
@@ -537,8 +537,11 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }) {
537
537
  React.createElement(Typography, {
538
538
  variant: "smallCaption-regular",
539
539
  color: "color-text-high",
540
- style: { flex: 1, minWidth: 0, fontFamily: "var(--font-mono, monospace)" }
541
- }, dep),
540
+ style: { flex: 1, minWidth: 0 }
541
+ }, (() => {
542
+ const t = availableTasks.find((t2) => t2.id === dep);
543
+ return t ? t.title : dep;
544
+ })()),
542
545
  mode === "create" && React.createElement(IconButton, {
543
546
  icon: "close",
544
547
  size: "xs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synergenius/flow-weaver-pack-weaver",
3
- "version": "0.9.86",
3
+ "version": "0.9.88",
4
4
  "description": "AI bot for Flow Weaver. Execute tasks, run workflows, evolve autonomously.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -113,6 +113,8 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }: TaskEditorProp
113
113
 
114
114
  // --- Profiles for select ---
115
115
  const [profiles, setProfiles] = useState<Array<{ id: string; name: string }>>([]);
116
+ // --- Tasks for dependency select ---
117
+ const [availableTasks, setAvailableTasks] = useState<Array<{ id: string; title: string }>>([]);
116
118
 
117
119
  const [loading, setLoading] = useState(mode === 'edit');
118
120
 
@@ -129,6 +131,17 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }: TaskEditorProp
129
131
  })));
130
132
  }
131
133
  } catch { /* non-fatal */ }
134
+ // Also fetch task list for dependency picker
135
+ try {
136
+ const taskRaw = await callTool('fw_weaver_task_list', {});
137
+ const taskData = typeof taskRaw === 'string' ? JSON.parse(taskRaw) : taskRaw;
138
+ if (Array.isArray(taskData)) {
139
+ setAvailableTasks(taskData.map((t: Record<string, unknown>) => ({
140
+ id: t.id as string,
141
+ title: (t.title as string) || (t.id as string),
142
+ })));
143
+ }
144
+ } catch { /* non-fatal */ }
132
145
  })();
133
146
  }, [callTool]);
134
147
 
@@ -443,8 +456,6 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }: TaskEditorProp
443
456
  placeholder: '3',
444
457
  value: maxAttempts,
445
458
  onChange: (v: string) => setMaxAttempts(v),
446
- defaultBoxStyle: { flex: 1, minWidth: 0 },
447
- inputBoxStyle: { maxWidth: 'none' },
448
459
  }),
449
460
  ),
450
461
 
@@ -455,8 +466,6 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }: TaskEditorProp
455
466
  placeholder: 'Optional token limit',
456
467
  value: budgetTokens,
457
468
  onChange: (v: string) => setBudgetTokens(v),
458
- defaultBoxStyle: { flex: 1, minWidth: 0 },
459
- inputBoxStyle: { maxWidth: 'none' },
460
469
  }),
461
470
  ),
462
471
 
@@ -467,15 +476,14 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }: TaskEditorProp
467
476
  placeholder: 'Optional cost limit (USD)',
468
477
  value: budgetCost,
469
478
  onChange: (v: string) => setBudgetCost(v),
470
- defaultBoxStyle: { flex: 1, minWidth: 0 },
471
- inputBoxStyle: { maxWidth: 'none' },
472
479
  }),
473
480
  ),
474
481
 
475
482
  // -- Notes --
476
- React.createElement(Field, { label: 'Notes' },
483
+ React.createElement(Field, { label: 'Notes', align: 'start' },
477
484
  React.createElement(Input, {
478
485
  type: 'text', size: 'small',
486
+ multiline: true,
479
487
  placeholder: 'Optional notes for context',
480
488
  value: notes,
481
489
  onChange: (v: string) => setNotes(v),
@@ -487,23 +495,22 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }: TaskEditorProp
487
495
  // -- Files --
488
496
  React.createElement(Field, { label: 'Files', align: 'start' },
489
497
  React.createElement(Flex, { variant: 'column-stretch-start-nowrap-6' },
490
- // Add file row
491
- React.createElement(Flex, { variant: 'row-center-start-nowrap-4', style: { overflow: 'hidden' } },
492
- React.createElement(Input, {
493
- type: 'text', size: 'small',
494
- placeholder: 'File path',
495
- value: newFile,
496
- onChange: (v: string) => setNewFile(v),
497
- onEnter: handleAddFile,
498
- defaultBoxStyle: { flex: 1, minWidth: 0 },
499
- inputBoxStyle: { maxWidth: 'none' },
500
- }),
501
- React.createElement(IconButton, {
502
- icon: 'add', size: 'sm', variant: 'outlined', color: 'primary',
503
- onClick: handleAddFile,
504
- disabled: !newFile.trim(),
505
- }),
506
- ),
498
+ // File picker
499
+ React.createElement(Input, {
500
+ type: 'path', size: 'small',
501
+ placeholder: 'Click to browse files',
502
+ value: '',
503
+ onClick: async () => {
504
+ const selected = await ctx.browseFiles({ title: 'Select Files', multiple: true });
505
+ if (selected.length > 0) {
506
+ setFiles((prev: string[]) => {
507
+ const unique = selected.filter((f: string) => !prev.includes(f));
508
+ return [...prev, ...unique];
509
+ });
510
+ }
511
+ },
512
+ defaultBoxStyle: { flex: 1, minWidth: 0 },
513
+ }),
507
514
  // File list
508
515
  ...files.map((file: string, idx: number) =>
509
516
  React.createElement(Flex, {
@@ -528,15 +535,16 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }: TaskEditorProp
528
535
  React.createElement(Field, { label: 'Dependencies', align: 'start' },
529
536
  React.createElement(Flex, { variant: 'column-stretch-start-nowrap-6' },
530
537
  // Add dependency row (create mode only)
531
- mode === 'create' && React.createElement(Flex, { variant: 'row-center-start-nowrap-4', style: { overflow: 'hidden' } },
538
+ mode === 'create' && React.createElement(Flex, { variant: 'row-center-start-nowrap-4' },
532
539
  React.createElement(Input, {
533
- type: 'text', size: 'small',
534
- placeholder: 'Task ID',
535
- value: newDep,
540
+ type: 'select', size: 'small',
541
+ placeholder: 'Select a task',
542
+ options: availableTasks
543
+ .filter((t: { id: string }) => !deps.includes(t.id) && t.id !== taskId)
544
+ .map((t: { id: string; title: string }) => ({ id: t.id, label: t.title })),
545
+ optionId: newDep,
536
546
  onChange: (v: string) => setNewDep(v),
537
- onEnter: handleAddDep,
538
547
  defaultBoxStyle: { flex: 1, minWidth: 0 },
539
- inputBoxStyle: { maxWidth: 'none' },
540
548
  }),
541
549
  React.createElement(IconButton, {
542
550
  icon: 'add', size: 'sm', variant: 'outlined', color: 'primary',
@@ -555,8 +563,8 @@ function TaskEditor({ mode, taskId, onSave, onCancel, onDelete }: TaskEditorProp
555
563
  },
556
564
  React.createElement(Typography, {
557
565
  variant: 'smallCaption-regular', color: 'color-text-high',
558
- style: { flex: 1, minWidth: 0, fontFamily: 'var(--font-mono, monospace)' },
559
- }, dep),
566
+ style: { flex: 1, minWidth: 0 },
567
+ }, (() => { const t = availableTasks.find((t: { id: string }) => t.id === dep); return t ? t.title : dep; })()),
560
568
  mode === 'create' && React.createElement(IconButton, {
561
569
  icon: 'close', size: 'xs', variant: 'clear', color: 'danger',
562
570
  onClick: () => handleRemoveDep(idx),