@synergenius/flow-weaver-pack-weaver 0.9.57 → 0.9.59
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.
- package/dist/ai-chat-provider.d.ts.map +1 -1
- package/dist/ai-chat-provider.js +96 -4
- package/dist/ai-chat-provider.js.map +1 -1
- package/dist/bot/bot-registry.d.ts +33 -0
- package/dist/bot/bot-registry.d.ts.map +1 -0
- package/dist/bot/bot-registry.js +98 -0
- package/dist/bot/bot-registry.js.map +1 -0
- package/dist/bot/runner.d.ts.map +1 -1
- package/dist/bot/runner.js +11 -5
- package/dist/bot/runner.js.map +1 -1
- package/dist/ui/bot-panel.js +388 -0
- package/dist/ui/bot-workspace.js +76 -153
- package/dist/ui/chat-bot-result.js +71 -0
- package/flowweaver.manifest.json +128 -1
- package/package.json +1 -1
- package/src/ai-chat-provider.ts +101 -7
- package/src/bot/bot-registry.ts +116 -0
- package/src/bot/runner.ts +8 -5
- package/src/ui/bot-panel.tsx +382 -0
- package/src/ui/bot-workspace.tsx +42 -6
- package/src/ui/chat-bot-result.tsx +81 -0
package/dist/ui/bot-workspace.js
CHANGED
|
@@ -415,120 +415,11 @@ function GenesisBlock({ cycle, callTool }) {
|
|
|
415
415
|
);
|
|
416
416
|
}
|
|
417
417
|
|
|
418
|
-
// src/ui/approval-card.tsx
|
|
419
|
-
var React5 = require("react");
|
|
420
|
-
var { useState: useState5, useCallback: useCallback5 } = React5;
|
|
421
|
-
var {
|
|
422
|
-
CollapsibleBlock: CollapsibleBlock2,
|
|
423
|
-
Flex: Flex5,
|
|
424
|
-
Typography: Typography4,
|
|
425
|
-
Badge: Badge3,
|
|
426
|
-
Tag: Tag2,
|
|
427
|
-
Button: Button4,
|
|
428
|
-
toast: toast5
|
|
429
|
-
} = require("@fw/plugin-ui-kit");
|
|
430
|
-
function ApprovalCard({ plan, callTool, onDecision }) {
|
|
431
|
-
const [deciding, setDeciding] = useState5(false);
|
|
432
|
-
const [decided, setDecided] = useState5(null);
|
|
433
|
-
const handleDecision = useCallback5(
|
|
434
|
-
async (approved) => {
|
|
435
|
-
setDeciding(true);
|
|
436
|
-
try {
|
|
437
|
-
await callTool("fw_weaver_approve", { approved });
|
|
438
|
-
setDecided(approved);
|
|
439
|
-
onDecision?.(approved);
|
|
440
|
-
toast5(approved ? "Plan approved" : "Plan rejected", {
|
|
441
|
-
type: approved ? "success" : "info"
|
|
442
|
-
});
|
|
443
|
-
} catch (err) {
|
|
444
|
-
toast5(err instanceof Error ? err.message : "Failed to send decision", { type: "error" });
|
|
445
|
-
} finally {
|
|
446
|
-
setDeciding(false);
|
|
447
|
-
}
|
|
448
|
-
},
|
|
449
|
-
[callTool, onDecision]
|
|
450
|
-
);
|
|
451
|
-
if (decided !== null) {
|
|
452
|
-
return React5.createElement(CollapsibleBlock2, {
|
|
453
|
-
status: decided ? "completed" : "error",
|
|
454
|
-
label: React5.createElement(Typography4, {
|
|
455
|
-
variant: "caption-bold",
|
|
456
|
-
color: decided ? "color-status-positive" : "color-status-negative"
|
|
457
|
-
}, decided ? "Plan Approved" : "Plan Rejected"),
|
|
458
|
-
expanded: false,
|
|
459
|
-
canExpand: false
|
|
460
|
-
});
|
|
461
|
-
}
|
|
462
|
-
return React5.createElement(
|
|
463
|
-
CollapsibleBlock2,
|
|
464
|
-
{
|
|
465
|
-
status: "pending",
|
|
466
|
-
label: React5.createElement(
|
|
467
|
-
Flex5,
|
|
468
|
-
{ variant: "row-center-start-nowrap-8" },
|
|
469
|
-
React5.createElement(Badge3, { variant: "warning" }, "Approval Needed"),
|
|
470
|
-
React5.createElement(
|
|
471
|
-
Typography4,
|
|
472
|
-
{ variant: "caption-bold", color: "color-text-high" },
|
|
473
|
-
plan.summary || `${plan.steps.length} step plan`
|
|
474
|
-
)
|
|
475
|
-
),
|
|
476
|
-
expanded: true,
|
|
477
|
-
canExpand: false
|
|
478
|
-
},
|
|
479
|
-
React5.createElement(
|
|
480
|
-
Flex5,
|
|
481
|
-
{
|
|
482
|
-
variant: "column-start-start-nowrap-6",
|
|
483
|
-
style: { padding: "10px 12px" }
|
|
484
|
-
},
|
|
485
|
-
...plan.steps.map(
|
|
486
|
-
(step, i) => React5.createElement(
|
|
487
|
-
Flex5,
|
|
488
|
-
{
|
|
489
|
-
key: step.id || i,
|
|
490
|
-
variant: "row-center-start-nowrap-6",
|
|
491
|
-
style: { fontSize: "11px" }
|
|
492
|
-
},
|
|
493
|
-
React5.createElement(Tag2, { size: "small", color: "info" }, step.operation),
|
|
494
|
-
React5.createElement(Typography4, {
|
|
495
|
-
variant: "smallCaption-regular",
|
|
496
|
-
color: "color-text-medium"
|
|
497
|
-
}, step.description)
|
|
498
|
-
)
|
|
499
|
-
)
|
|
500
|
-
),
|
|
501
|
-
React5.createElement(
|
|
502
|
-
Flex5,
|
|
503
|
-
{
|
|
504
|
-
variant: "row-center-start-nowrap-8",
|
|
505
|
-
style: { padding: "10px 12px", borderTop: "1px solid var(--color-border-default)" }
|
|
506
|
-
},
|
|
507
|
-
React5.createElement(Button4, {
|
|
508
|
-
variant: "fill",
|
|
509
|
-
color: "primary",
|
|
510
|
-
size: "xs",
|
|
511
|
-
onClick: () => handleDecision(true),
|
|
512
|
-
loading: deciding,
|
|
513
|
-
disabled: deciding
|
|
514
|
-
}, "Approve"),
|
|
515
|
-
React5.createElement(Button4, {
|
|
516
|
-
variant: "outlined",
|
|
517
|
-
color: "danger",
|
|
518
|
-
size: "xs",
|
|
519
|
-
onClick: () => handleDecision(false),
|
|
520
|
-
loading: deciding,
|
|
521
|
-
disabled: deciding
|
|
522
|
-
}, "Reject")
|
|
523
|
-
)
|
|
524
|
-
);
|
|
525
|
-
}
|
|
526
|
-
|
|
527
418
|
// src/ui/use-stream-timeline.ts
|
|
528
|
-
var
|
|
529
|
-
var { useMemo, useState:
|
|
419
|
+
var React5 = require("react");
|
|
420
|
+
var { useMemo, useState: useState5, useEffect: useEffect3, useRef: useRef2 } = React5;
|
|
530
421
|
function useStreamTimeline(events, isDone) {
|
|
531
|
-
const [elapsed, setElapsed] =
|
|
422
|
+
const [elapsed, setElapsed] = useState5(0);
|
|
532
423
|
const startTimeRef = useRef2(null);
|
|
533
424
|
useEffect3(() => {
|
|
534
425
|
if (events.length === 0) {
|
|
@@ -793,14 +684,14 @@ async function sendSteerCommand(callTool, command, payload) {
|
|
|
793
684
|
}
|
|
794
685
|
|
|
795
686
|
// src/ui/bot-workspace.tsx
|
|
796
|
-
var
|
|
797
|
-
var { useRef: useRef3, useEffect: useEffect4, useState:
|
|
687
|
+
var React6 = require("react");
|
|
688
|
+
var { useRef: useRef3, useEffect: useEffect4, useState: useState6, useCallback: useCallback5, useMemo: useMemo2 } = React6;
|
|
798
689
|
var {
|
|
799
|
-
Flex:
|
|
690
|
+
Flex: Flex5,
|
|
800
691
|
ScrollArea,
|
|
801
692
|
EmptyState,
|
|
802
693
|
TaskBlock,
|
|
803
|
-
toast:
|
|
694
|
+
toast: toast5,
|
|
804
695
|
usePackWorkspace,
|
|
805
696
|
useEventStream
|
|
806
697
|
} = require("@fw/plugin-ui-kit");
|
|
@@ -825,7 +716,7 @@ function BotWorkspace() {
|
|
|
825
716
|
stream.start(packId, "fw_weaver_events", windowData.runId);
|
|
826
717
|
return () => stream.stop();
|
|
827
718
|
}, [isLive, packId, windowData?.runId]);
|
|
828
|
-
const [sessionRunId, setSessionRunId] =
|
|
719
|
+
const [sessionRunId, setSessionRunId] = useState6(null);
|
|
829
720
|
useEffect4(() => {
|
|
830
721
|
if (isLive) return;
|
|
831
722
|
const poll = async () => {
|
|
@@ -855,37 +746,37 @@ function BotWorkspace() {
|
|
|
855
746
|
const el = scrollRef.current;
|
|
856
747
|
if (el) el.scrollTop = el.scrollHeight;
|
|
857
748
|
}, [liveTimeline.length, stream.events.length]);
|
|
858
|
-
const [pausing, setPausing] =
|
|
859
|
-
const [stopping, setStopping] =
|
|
860
|
-
const handlePause =
|
|
749
|
+
const [pausing, setPausing] = useState6(false);
|
|
750
|
+
const [stopping, setStopping] = useState6(false);
|
|
751
|
+
const handlePause = useCallback5(async () => {
|
|
861
752
|
setPausing(true);
|
|
862
753
|
try {
|
|
863
754
|
await sendSteerCommand(callTool, "pause");
|
|
864
|
-
|
|
755
|
+
toast5("Pause signal sent", { type: "info" });
|
|
865
756
|
} catch (err) {
|
|
866
|
-
|
|
757
|
+
toast5(err instanceof Error ? err.message : "Failed to pause", { type: "error" });
|
|
867
758
|
}
|
|
868
759
|
setPausing(false);
|
|
869
760
|
}, [callTool]);
|
|
870
|
-
const handleStop =
|
|
761
|
+
const handleStop = useCallback5(async () => {
|
|
871
762
|
setStopping(true);
|
|
872
763
|
try {
|
|
873
764
|
await sendSteerCommand(callTool, "cancel");
|
|
874
|
-
|
|
765
|
+
toast5("Stopping \u2014 will take effect after current node completes", { type: "info" });
|
|
875
766
|
} catch (err) {
|
|
876
|
-
|
|
767
|
+
toast5(err instanceof Error ? err.message : "Failed to stop", { type: "error" });
|
|
877
768
|
setStopping(false);
|
|
878
769
|
}
|
|
879
770
|
}, [callTool]);
|
|
880
|
-
const [history, setHistory] =
|
|
881
|
-
const [genesisCycles, setGenesisCycles] =
|
|
882
|
-
const [queuedTasks, setQueuedTasks] =
|
|
883
|
-
const [removingIds, setRemovingIds] =
|
|
884
|
-
const [expandedRunId, setExpandedRunId] =
|
|
771
|
+
const [history, setHistory] = useState6([]);
|
|
772
|
+
const [genesisCycles, setGenesisCycles] = useState6([]);
|
|
773
|
+
const [queuedTasks, setQueuedTasks] = useState6([]);
|
|
774
|
+
const [removingIds, setRemovingIds] = useState6(/* @__PURE__ */ new Set());
|
|
775
|
+
const [expandedRunId, setExpandedRunId] = useState6(
|
|
885
776
|
highlightRunId && !isLive ? highlightRunId : null
|
|
886
777
|
);
|
|
887
|
-
const [liveExpanded, setLiveExpanded] =
|
|
888
|
-
const refreshData =
|
|
778
|
+
const [liveExpanded, setLiveExpanded] = useState6(true);
|
|
779
|
+
const refreshData = useCallback5(() => {
|
|
889
780
|
callTool("fw_weaver_history", { limit: 20 }).then((data) => {
|
|
890
781
|
if (Array.isArray(data)) {
|
|
891
782
|
setHistory(
|
|
@@ -934,14 +825,14 @@ function BotWorkspace() {
|
|
|
934
825
|
useEffect4(() => {
|
|
935
826
|
if (sessionRunId !== null) refreshData();
|
|
936
827
|
}, [sessionRunId, refreshData]);
|
|
937
|
-
const handleRemoveTask =
|
|
828
|
+
const handleRemoveTask = useCallback5(async (id) => {
|
|
938
829
|
setRemovingIds((prev) => new Set(prev).add(id));
|
|
939
830
|
try {
|
|
940
831
|
await callTool("fw_weaver_queue", { action: "remove", id });
|
|
941
832
|
refreshData();
|
|
942
|
-
|
|
833
|
+
toast5("Task removed", { type: "warning" });
|
|
943
834
|
} catch (err) {
|
|
944
|
-
|
|
835
|
+
toast5(err instanceof Error ? err.message : "Failed to remove task", { type: "error" });
|
|
945
836
|
}
|
|
946
837
|
setRemovingIds((prev) => {
|
|
947
838
|
const next = new Set(prev);
|
|
@@ -960,7 +851,7 @@ function BotWorkspace() {
|
|
|
960
851
|
items.sort((a, b) => a.timestamp - b.timestamp);
|
|
961
852
|
return items;
|
|
962
853
|
}, [history, genesisCycles]);
|
|
963
|
-
const toggleExpand =
|
|
854
|
+
const toggleExpand = useCallback5((id) => {
|
|
964
855
|
setExpandedRunId((prev) => prev === id ? null : id);
|
|
965
856
|
}, []);
|
|
966
857
|
const isStreaming = isLive || !!sessionRunId;
|
|
@@ -1000,36 +891,65 @@ function BotWorkspace() {
|
|
|
1000
891
|
if (text.length > 120) text = text.slice(0, 117) + "...";
|
|
1001
892
|
return text;
|
|
1002
893
|
}
|
|
1003
|
-
const
|
|
1004
|
-
|
|
1005
|
-
|
|
894
|
+
const [approvalStatus, setApprovalStatus] = useState6(null);
|
|
895
|
+
const [approvalLoading, setApprovalLoading] = useState6(false);
|
|
896
|
+
useEffect4(() => {
|
|
897
|
+
if (awaitingApproval) setApprovalStatus("pending");
|
|
898
|
+
}, [awaitingApproval]);
|
|
899
|
+
useEffect4(() => {
|
|
900
|
+
if (stream.events.length === 0) setApprovalStatus(null);
|
|
901
|
+
}, [stream.events.length]);
|
|
902
|
+
const handleApprove = useCallback5(async () => {
|
|
903
|
+
setApprovalLoading(true);
|
|
904
|
+
try {
|
|
905
|
+
await callTool("fw_weaver_approve", { approved: true });
|
|
906
|
+
setApprovalStatus("approved");
|
|
907
|
+
toast5("Plan approved", { type: "success" });
|
|
908
|
+
} catch (err) {
|
|
909
|
+
toast5(err instanceof Error ? err.message : "Failed to approve", { type: "error" });
|
|
910
|
+
}
|
|
911
|
+
setApprovalLoading(false);
|
|
912
|
+
}, [callTool]);
|
|
913
|
+
const handleReject = useCallback5(async () => {
|
|
914
|
+
setApprovalLoading(true);
|
|
915
|
+
try {
|
|
916
|
+
await callTool("fw_weaver_approve", { approved: false });
|
|
917
|
+
setApprovalStatus("rejected");
|
|
918
|
+
toast5("Plan rejected", { type: "info" });
|
|
919
|
+
} catch (err) {
|
|
920
|
+
toast5(err instanceof Error ? err.message : "Failed to reject", { type: "error" });
|
|
921
|
+
}
|
|
922
|
+
setApprovalLoading(false);
|
|
923
|
+
}, [callTool]);
|
|
924
|
+
return React6.createElement(
|
|
925
|
+
Flex5,
|
|
1006
926
|
{
|
|
1007
927
|
variant: "column-stretch-start-nowrap-0",
|
|
1008
928
|
style: { width: "100%", height: "100%", overflow: "hidden" }
|
|
1009
929
|
},
|
|
1010
930
|
// Session bar
|
|
1011
|
-
|
|
931
|
+
React6.createElement(SessionBar, { callTool, dispatchEvent }),
|
|
1012
932
|
// Settings
|
|
1013
|
-
|
|
933
|
+
React6.createElement(SettingsSection, { callTool, dispatchEvent }),
|
|
1014
934
|
// Main scrollable timeline
|
|
1015
|
-
|
|
1016
|
-
|
|
935
|
+
React6.createElement(
|
|
936
|
+
Flex5,
|
|
1017
937
|
{ variant: "column-stretch-start-nowrap-0", style: { flex: 1, minHeight: 0 } },
|
|
1018
|
-
|
|
938
|
+
React6.createElement(
|
|
1019
939
|
ScrollArea,
|
|
1020
940
|
{ ref: scrollRef },
|
|
1021
|
-
|
|
1022
|
-
|
|
941
|
+
React6.createElement(
|
|
942
|
+
Flex5,
|
|
1023
943
|
{ variant: "column-stretch-start-nowrap-8", style: { padding: "12px 16px" } },
|
|
1024
944
|
// Empty state
|
|
1025
|
-
!hasContent &&
|
|
945
|
+
!hasContent && React6.createElement(EmptyState, {
|
|
1026
946
|
icon: "smartToy",
|
|
1027
947
|
message: "No bot runs yet",
|
|
1028
948
|
description: "Ask the AI assistant to run a task, or add tasks below."
|
|
1029
949
|
}),
|
|
1030
950
|
...timelineItems.map((item) => {
|
|
1031
951
|
if (item.kind === "genesis" && item.genesis) {
|
|
1032
|
-
return
|
|
952
|
+
return React6.createElement(GenesisBlock, {
|
|
1033
953
|
key: `genesis-${item.genesis.id}`,
|
|
1034
954
|
cycle: item.genesis,
|
|
1035
955
|
callTool
|
|
@@ -1040,7 +960,7 @@ function BotWorkspace() {
|
|
|
1040
960
|
const runId = run.id;
|
|
1041
961
|
const isExpanded = expandedRunId === runId;
|
|
1042
962
|
const isSuccess = run.outcome === "completed" || run.success === true;
|
|
1043
|
-
return
|
|
963
|
+
return React6.createElement(TaskBlock, {
|
|
1044
964
|
key: `run-${runId}`,
|
|
1045
965
|
state: isSuccess ? "completed" : "failed",
|
|
1046
966
|
instruction: extractInstruction(run),
|
|
@@ -1056,7 +976,7 @@ function BotWorkspace() {
|
|
|
1056
976
|
return null;
|
|
1057
977
|
}),
|
|
1058
978
|
// Live execution
|
|
1059
|
-
isStreaming &&
|
|
979
|
+
isStreaming && React6.createElement(TaskBlock, {
|
|
1060
980
|
state: "running",
|
|
1061
981
|
instruction: liveInstruction ?? windowData?.instruction ?? "Running...",
|
|
1062
982
|
timeline: liveTimeline,
|
|
@@ -1065,7 +985,10 @@ function BotWorkspace() {
|
|
|
1065
985
|
cost,
|
|
1066
986
|
plan,
|
|
1067
987
|
error: stream.error,
|
|
1068
|
-
|
|
988
|
+
approval: approvalStatus ?? void 0,
|
|
989
|
+
approvalLoading,
|
|
990
|
+
onApprove: handleApprove,
|
|
991
|
+
onReject: handleReject,
|
|
1069
992
|
onPause: handlePause,
|
|
1070
993
|
onStop: handleStop,
|
|
1071
994
|
pauseLoading: pausing,
|
|
@@ -1074,7 +997,7 @@ function BotWorkspace() {
|
|
|
1074
997
|
onToggleExpand: () => setLiveExpanded((v) => !v)
|
|
1075
998
|
}),
|
|
1076
999
|
...(isStreaming ? queuedTasks.filter((t) => t.status !== "running") : queuedTasks).map(
|
|
1077
|
-
(task) =>
|
|
1000
|
+
(task) => React6.createElement(TaskBlock, {
|
|
1078
1001
|
key: task.id,
|
|
1079
1002
|
state: "pending",
|
|
1080
1003
|
instruction: task.instruction,
|
|
@@ -1086,7 +1009,7 @@ function BotWorkspace() {
|
|
|
1086
1009
|
)
|
|
1087
1010
|
),
|
|
1088
1011
|
// Input bar
|
|
1089
|
-
|
|
1012
|
+
React6.createElement(QueueInput, { callTool, onTaskAdded: refreshData })
|
|
1090
1013
|
);
|
|
1091
1014
|
}
|
|
1092
1015
|
module.exports = BotWorkspace;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// src/ui/chat-bot-result.tsx
|
|
4
|
+
var React = require("react");
|
|
5
|
+
var { useState, useEffect, useCallback } = React;
|
|
6
|
+
var { Flex, Typography, StatusIcon, Button, toast } = require("@fw/plugin-ui-kit");
|
|
7
|
+
function ChatBotResult({ result, args, callTool, openWorkspace }) {
|
|
8
|
+
const [status, setStatus] = useState("running");
|
|
9
|
+
const [summary, setSummary] = useState(null);
|
|
10
|
+
const parsed = typeof result === "string" ? JSON.parse(result) : result;
|
|
11
|
+
const runId = parsed?.runId;
|
|
12
|
+
const instruction = parsed?.instruction || args?.task || "Bot task";
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
if (!runId || status !== "running") return;
|
|
15
|
+
const poll = async () => {
|
|
16
|
+
try {
|
|
17
|
+
const s = await callTool("fw_weaver_status");
|
|
18
|
+
if (s?.currentRunId !== runId) {
|
|
19
|
+
const history = await callTool("fw_weaver_history", { id: runId });
|
|
20
|
+
if (Array.isArray(history) && history.length > 0) {
|
|
21
|
+
const run = history[0];
|
|
22
|
+
setStatus(run.success ? "completed" : "failed");
|
|
23
|
+
setSummary(run.summary || null);
|
|
24
|
+
} else {
|
|
25
|
+
setStatus("completed");
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
} catch {
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const interval = setInterval(poll, 3e3);
|
|
32
|
+
poll();
|
|
33
|
+
return () => clearInterval(interval);
|
|
34
|
+
}, [runId, status, callTool]);
|
|
35
|
+
return React.createElement(
|
|
36
|
+
Flex,
|
|
37
|
+
{
|
|
38
|
+
variant: "row-center-start-nowrap-10",
|
|
39
|
+
style: {
|
|
40
|
+
padding: "8px 12px",
|
|
41
|
+
borderRadius: "var(--border-radius-regular)",
|
|
42
|
+
border: "1px solid var(--color-border-default)",
|
|
43
|
+
backgroundColor: "var(--color-surface-low)"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
React.createElement(StatusIcon, {
|
|
47
|
+
status: status === "running" ? "running" : status === "completed" ? "completed" : "failed",
|
|
48
|
+
size: "sm"
|
|
49
|
+
}),
|
|
50
|
+
React.createElement(
|
|
51
|
+
Flex,
|
|
52
|
+
{ variant: "column-start-start-nowrap-2", style: { flex: 1, minWidth: 0 } },
|
|
53
|
+
React.createElement(Typography, {
|
|
54
|
+
variant: "caption-thick",
|
|
55
|
+
color: "color-text-high",
|
|
56
|
+
style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }
|
|
57
|
+
}, instruction),
|
|
58
|
+
summary && React.createElement(Typography, {
|
|
59
|
+
variant: "smallCaption-regular",
|
|
60
|
+
color: "color-text-medium"
|
|
61
|
+
}, summary)
|
|
62
|
+
),
|
|
63
|
+
React.createElement(Button, {
|
|
64
|
+
size: "xs",
|
|
65
|
+
variant: "clear",
|
|
66
|
+
color: "secondary",
|
|
67
|
+
onClick: () => openWorkspace({ runId, packId: "@synergenius/flow-weaver-pack-weaver", live: status === "running" })
|
|
68
|
+
}, "Open")
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
module.exports = ChatBotResult;
|
package/flowweaver.manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifestVersion": 2,
|
|
3
3
|
"name": "@synergenius/flow-weaver-pack-weaver",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.59",
|
|
5
5
|
"description": "AI bot for Flow Weaver. Execute tasks, run workflows, evolve autonomously.",
|
|
6
6
|
"engineVersion": ">=0.22.10",
|
|
7
7
|
"categories": [
|
|
@@ -1080,6 +1080,15 @@
|
|
|
1080
1080
|
"dashboard": "dist/ui/bot-dashboard.js",
|
|
1081
1081
|
"workspace": "dist/ui/bot-workspace.js"
|
|
1082
1082
|
},
|
|
1083
|
+
"sidebarPanel": {
|
|
1084
|
+
"component": "dist/ui/bot-panel.js",
|
|
1085
|
+
"title": "Bots",
|
|
1086
|
+
"icon": "smartToy",
|
|
1087
|
+
"color": "color-brand-main",
|
|
1088
|
+
"dockZone": "right",
|
|
1089
|
+
"activityBarSection": "start",
|
|
1090
|
+
"requiredTier": "pro"
|
|
1091
|
+
},
|
|
1083
1092
|
"openWorkspaceOnTool": "fw_weaver_bot",
|
|
1084
1093
|
"sandboxCapabilities": [
|
|
1085
1094
|
"fetch:hooks.slack.com",
|
|
@@ -1121,6 +1130,9 @@
|
|
|
1121
1130
|
"icon": "psychology",
|
|
1122
1131
|
"description": "Hands-on AI assistant for Flow Weaver projects. Builds, validates, debugs, and manages workflows. Spawns autonomous bots for long-running tasks."
|
|
1123
1132
|
},
|
|
1133
|
+
"toolResultRenderers": {
|
|
1134
|
+
"fw_weaver_bot": "dist/ui/chat-bot-result.js"
|
|
1135
|
+
},
|
|
1124
1136
|
"tools": [
|
|
1125
1137
|
{
|
|
1126
1138
|
"name": "fw_weaver_run",
|
|
@@ -1216,6 +1228,10 @@
|
|
|
1216
1228
|
"type": "string",
|
|
1217
1229
|
"description": "Natural language task description"
|
|
1218
1230
|
},
|
|
1231
|
+
"botId": {
|
|
1232
|
+
"type": "string",
|
|
1233
|
+
"description": "ID of a registered bot to run. If omitted, runs the default Weaver Bot."
|
|
1234
|
+
},
|
|
1219
1235
|
"projectDir": {
|
|
1220
1236
|
"type": "string",
|
|
1221
1237
|
"description": "Project directory"
|
|
@@ -1414,6 +1430,117 @@
|
|
|
1414
1430
|
"projectDir"
|
|
1415
1431
|
]
|
|
1416
1432
|
}
|
|
1433
|
+
},
|
|
1434
|
+
{
|
|
1435
|
+
"name": "fw_weaver_list_bots",
|
|
1436
|
+
"description": "List all registered bots with their validation status, file paths, and metadata.",
|
|
1437
|
+
"parameters": {
|
|
1438
|
+
"type": "object",
|
|
1439
|
+
"properties": {}
|
|
1440
|
+
}
|
|
1441
|
+
},
|
|
1442
|
+
{
|
|
1443
|
+
"name": "fw_weaver_register_bot",
|
|
1444
|
+
"description": "Register a new bot workflow in the project's bot registry.",
|
|
1445
|
+
"parameters": {
|
|
1446
|
+
"type": "object",
|
|
1447
|
+
"properties": {
|
|
1448
|
+
"name": {
|
|
1449
|
+
"type": "string",
|
|
1450
|
+
"description": "Display name for the bot"
|
|
1451
|
+
},
|
|
1452
|
+
"filePath": {
|
|
1453
|
+
"type": "string",
|
|
1454
|
+
"description": "Path to the workflow file (relative to project root)"
|
|
1455
|
+
},
|
|
1456
|
+
"workflowExport": {
|
|
1457
|
+
"type": "string",
|
|
1458
|
+
"description": "Named export from the workflow file"
|
|
1459
|
+
},
|
|
1460
|
+
"paramName": {
|
|
1461
|
+
"type": "string",
|
|
1462
|
+
"description": "Input parameter name for the bot task (default: taskJson)"
|
|
1463
|
+
},
|
|
1464
|
+
"description": {
|
|
1465
|
+
"type": "string",
|
|
1466
|
+
"description": "Short description of what the bot does"
|
|
1467
|
+
},
|
|
1468
|
+
"icon": {
|
|
1469
|
+
"type": "string",
|
|
1470
|
+
"description": "Material icon name"
|
|
1471
|
+
},
|
|
1472
|
+
"color": {
|
|
1473
|
+
"type": "string",
|
|
1474
|
+
"description": "Hex color for the bot badge"
|
|
1475
|
+
},
|
|
1476
|
+
"packId": {
|
|
1477
|
+
"type": "string",
|
|
1478
|
+
"description": "Pack ID if bot belongs to a pack"
|
|
1479
|
+
},
|
|
1480
|
+
"id": {
|
|
1481
|
+
"type": "string",
|
|
1482
|
+
"description": "Custom bot ID (auto-generated if omitted)"
|
|
1483
|
+
}
|
|
1484
|
+
},
|
|
1485
|
+
"required": [
|
|
1486
|
+
"name",
|
|
1487
|
+
"filePath",
|
|
1488
|
+
"workflowExport"
|
|
1489
|
+
]
|
|
1490
|
+
}
|
|
1491
|
+
},
|
|
1492
|
+
{
|
|
1493
|
+
"name": "fw_weaver_unregister_bot",
|
|
1494
|
+
"description": "Remove a bot from the project's bot registry.",
|
|
1495
|
+
"parameters": {
|
|
1496
|
+
"type": "object",
|
|
1497
|
+
"properties": {
|
|
1498
|
+
"id": {
|
|
1499
|
+
"type": "string",
|
|
1500
|
+
"description": "Bot ID to unregister"
|
|
1501
|
+
}
|
|
1502
|
+
},
|
|
1503
|
+
"required": [
|
|
1504
|
+
"id"
|
|
1505
|
+
]
|
|
1506
|
+
}
|
|
1507
|
+
},
|
|
1508
|
+
{
|
|
1509
|
+
"name": "fw_weaver_validate_bot",
|
|
1510
|
+
"description": "Validate a registered bot's workflow file exists and exports the expected function.",
|
|
1511
|
+
"parameters": {
|
|
1512
|
+
"type": "object",
|
|
1513
|
+
"properties": {
|
|
1514
|
+
"id": {
|
|
1515
|
+
"type": "string",
|
|
1516
|
+
"description": "Bot ID to validate"
|
|
1517
|
+
}
|
|
1518
|
+
},
|
|
1519
|
+
"required": [
|
|
1520
|
+
"id"
|
|
1521
|
+
]
|
|
1522
|
+
}
|
|
1523
|
+
},
|
|
1524
|
+
{
|
|
1525
|
+
"name": "fw_weaver_eject_bot",
|
|
1526
|
+
"description": "Mark a bot as ejected and copy its workflow to a new file path for customization.",
|
|
1527
|
+
"parameters": {
|
|
1528
|
+
"type": "object",
|
|
1529
|
+
"properties": {
|
|
1530
|
+
"id": {
|
|
1531
|
+
"type": "string",
|
|
1532
|
+
"description": "Bot ID to eject"
|
|
1533
|
+
},
|
|
1534
|
+
"filePath": {
|
|
1535
|
+
"type": "string",
|
|
1536
|
+
"description": "New file path for the ejected workflow"
|
|
1537
|
+
}
|
|
1538
|
+
},
|
|
1539
|
+
"required": [
|
|
1540
|
+
"id",
|
|
1541
|
+
"filePath"
|
|
1542
|
+
]
|
|
1543
|
+
}
|
|
1417
1544
|
}
|
|
1418
1545
|
],
|
|
1419
1546
|
"docTopics": [
|
package/package.json
CHANGED