@synergenius/flow-weaver-pack-weaver 0.9.18 → 0.9.19
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/ui/bot-config.js
CHANGED
|
@@ -47,18 +47,18 @@ function BotConfig({ packName, botId }) {
|
|
|
47
47
|
useEffect(() => {
|
|
48
48
|
fetchData();
|
|
49
49
|
}, [fetchData]);
|
|
50
|
-
if (loading) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoadingSpinner, { size: "
|
|
51
|
-
if (error) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { padding: "8px 12px" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Banner, {
|
|
50
|
+
if (loading) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoadingSpinner, { size: "small" });
|
|
51
|
+
if (error) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { padding: "8px 12px" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Banner, { status: "danger", size: "small", children: error }) });
|
|
52
52
|
const bot = data?.bots?.find((b) => b.name === botId) ?? data?.bots?.[0];
|
|
53
53
|
const provider = bot?.provider ?? "Not configured";
|
|
54
54
|
const approval = bot?.approvalMode ?? "auto";
|
|
55
55
|
const hasBots = (data?.bots?.length ?? 0) > 0;
|
|
56
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsibleSection, { title: "Configuration",
|
|
57
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(KeyValueRow, {
|
|
58
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(KeyValueRow, {
|
|
59
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(KeyValueRow, {
|
|
56
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsibleSection, { title: "Configuration", defaultExpanded: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: "4px 12px 12px" }, children: [
|
|
57
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(KeyValueRow, { keyName: "Provider", value: provider }),
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(KeyValueRow, { keyName: "Approval", value: approval }),
|
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(KeyValueRow, { keyName: "Trust Phase", value: `P${data?.trust?.phase ?? "?"} (${data?.trust?.score ?? 0}/100)` }),
|
|
60
60
|
!hasBots && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { marginTop: 12 }, children: [
|
|
61
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Banner, {
|
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Banner, { status: "info", size: "small", children: "No .weaver.json detected. Create one to configure providers and approval modes." }),
|
|
62
62
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Typography, { variant: "caption-regular", color: "color-text-subtle", style: { marginTop: 6, fontFamily: "var(--typography-family-mono)" }, children: "npx flow-weaver weaver init" })
|
|
63
63
|
] }),
|
|
64
64
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { marginTop: 10, display: "flex", justifyContent: "flex-end" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconButton, { icon: "refresh", size: "xs", variant: "clear", onClick: fetchData, title: "Refresh" }) })
|
package/dist/ui/bot-dashboard.js
CHANGED
|
@@ -23,7 +23,11 @@ function callTool(tool, body = {}) {
|
|
|
23
23
|
if (!res.ok) throw new Error("Request failed");
|
|
24
24
|
const json = await res.json();
|
|
25
25
|
if (json.isError) throw new Error(json.result);
|
|
26
|
-
|
|
26
|
+
try {
|
|
27
|
+
return JSON.parse(json.result);
|
|
28
|
+
} catch {
|
|
29
|
+
return json.result;
|
|
30
|
+
}
|
|
27
31
|
});
|
|
28
32
|
}
|
|
29
33
|
var KpiRow = styled.div({
|
|
@@ -71,9 +75,9 @@ function healthColor(score) {
|
|
|
71
75
|
return "var(--color-status-negative)";
|
|
72
76
|
}
|
|
73
77
|
var severityToVariant = {
|
|
74
|
-
critical: "
|
|
75
|
-
warning: "
|
|
76
|
-
info: "
|
|
78
|
+
critical: "error",
|
|
79
|
+
warning: "warning",
|
|
80
|
+
info: "default"
|
|
77
81
|
};
|
|
78
82
|
var outcomeToIcon = {
|
|
79
83
|
completed: { name: "taskAlt", color: "color-status-positive" },
|
|
@@ -125,15 +129,15 @@ function BotDashboard({ packName, botId }) {
|
|
|
125
129
|
timerRef.current = setInterval(fetchData, 3e4);
|
|
126
130
|
return () => clearInterval(timerRef.current);
|
|
127
131
|
}, [fetchData]);
|
|
128
|
-
if (loading) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { padding: 16, textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoadingSpinner, { size: "
|
|
129
|
-
if (error && !insights) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Banner, {
|
|
132
|
+
if (loading) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { padding: 16, textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoadingSpinner, { size: "small" }) });
|
|
133
|
+
if (error && !insights) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { padding: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Banner, { status: "danger", size: "small", children: error }) });
|
|
130
134
|
if (!insights) return null;
|
|
131
135
|
const healthScore = insights.health?.overall ?? 0;
|
|
132
136
|
const trust = insights.trust ?? { phase: 1, score: 0 };
|
|
133
137
|
const cost = insights.cost ?? { last7Days: 0, trend: "stable" };
|
|
134
138
|
const topInsights = (insights.insights ?? []).slice(0, 3);
|
|
135
139
|
const recentRuns = history.slice(0, 5);
|
|
136
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsibleSection, { title: "Dashboard",
|
|
140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsibleSection, { title: "Dashboard", defaultExpanded: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: "4px 12px 12px" }, children: [
|
|
137
141
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(KpiRow, { children: [
|
|
138
142
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(KpiCard, { children: [
|
|
139
143
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(KpiValue, { style: { color: healthColor(healthScore) }, children: healthScore }),
|
|
@@ -161,7 +165,7 @@ function BotDashboard({ packName, botId }) {
|
|
|
161
165
|
topInsights.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { marginBottom: 12 }, children: [
|
|
162
166
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Typography, { variant: "smallCaption-bold", color: "color-text-subtle", style: { marginBottom: 6, textTransform: "uppercase", letterSpacing: "0.04em" }, children: "Insights" }),
|
|
163
167
|
topInsights.map((ins, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(InsightRow, { children: [
|
|
164
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Badge, { variant: severityToVariant[ins.severity] ?? "
|
|
168
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Badge, { variant: severityToVariant[ins.severity] ?? "default", children: ins.severity }),
|
|
165
169
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Typography, { variant: "caption-regular", color: "color-text-medium", style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: ins.title })
|
|
166
170
|
] }, i))
|
|
167
171
|
] }),
|
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.19",
|
|
5
5
|
"description": "AI bot for Flow Weaver. Execute tasks, run workflows, evolve autonomously.",
|
|
6
6
|
"engineVersion": ">=0.22.10",
|
|
7
7
|
"categories": [
|
package/package.json
CHANGED
package/src/ui/bot-config.tsx
CHANGED
|
@@ -48,11 +48,11 @@ function BotConfig({ packName, botId }: { packName: string; botId: string }) {
|
|
|
48
48
|
|
|
49
49
|
useEffect(() => { fetchData(); }, [fetchData]);
|
|
50
50
|
|
|
51
|
-
if (loading) return <LoadingSpinner size="
|
|
51
|
+
if (loading) return <LoadingSpinner size="small" />;
|
|
52
52
|
|
|
53
53
|
if (error) return (
|
|
54
54
|
<div style={{ padding: '8px 12px' }}>
|
|
55
|
-
<Banner
|
|
55
|
+
<Banner status="danger" size="small">{error}</Banner>
|
|
56
56
|
</div>
|
|
57
57
|
);
|
|
58
58
|
|
|
@@ -62,15 +62,15 @@ function BotConfig({ packName, botId }: { packName: string; botId: string }) {
|
|
|
62
62
|
const hasBots = (data?.bots?.length ?? 0) > 0;
|
|
63
63
|
|
|
64
64
|
return (
|
|
65
|
-
<CollapsibleSection title="Configuration"
|
|
65
|
+
<CollapsibleSection title="Configuration" defaultExpanded>
|
|
66
66
|
<div style={{ padding: '4px 12px 12px' }}>
|
|
67
|
-
<KeyValueRow
|
|
68
|
-
<KeyValueRow
|
|
69
|
-
<KeyValueRow
|
|
67
|
+
<KeyValueRow keyName="Provider" value={provider} />
|
|
68
|
+
<KeyValueRow keyName="Approval" value={approval} />
|
|
69
|
+
<KeyValueRow keyName="Trust Phase" value={`P${data?.trust?.phase ?? '?'} (${data?.trust?.score ?? 0}/100)`} />
|
|
70
70
|
|
|
71
71
|
{!hasBots && (
|
|
72
72
|
<div style={{ marginTop: 12 }}>
|
|
73
|
-
<Banner
|
|
73
|
+
<Banner status="info" size="small">
|
|
74
74
|
No .weaver.json detected. Create one to configure providers and approval modes.
|
|
75
75
|
</Banner>
|
|
76
76
|
<Typography variant="caption-regular" color="color-text-subtle" style={{ marginTop: 6, fontFamily: 'var(--typography-family-mono)' }}>
|
package/src/ui/bot-dashboard.tsx
CHANGED
|
@@ -43,7 +43,7 @@ function callTool(tool: string, body: Record<string, unknown> = {}) {
|
|
|
43
43
|
if (!res.ok) throw new Error('Request failed');
|
|
44
44
|
const json = await res.json();
|
|
45
45
|
if (json.isError) throw new Error(json.result);
|
|
46
|
-
return JSON.parse(json.result);
|
|
46
|
+
try { return JSON.parse(json.result); } catch { return json.result; }
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -105,9 +105,9 @@ function healthColor(score: number): string {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
const severityToVariant: Record<string, string> = {
|
|
108
|
-
critical: '
|
|
109
|
-
warning: '
|
|
110
|
-
info: '
|
|
108
|
+
critical: 'error',
|
|
109
|
+
warning: 'warning',
|
|
110
|
+
info: 'default',
|
|
111
111
|
};
|
|
112
112
|
|
|
113
113
|
const outcomeToIcon: Record<string, { name: TIconNameType; color: string }> = {
|
|
@@ -163,11 +163,11 @@ function BotDashboard({ packName, botId }: { packName: string; botId: string })
|
|
|
163
163
|
return () => clearInterval(timerRef.current);
|
|
164
164
|
}, [fetchData]);
|
|
165
165
|
|
|
166
|
-
if (loading) return <div style={{ padding: 16, textAlign: 'center' }}><LoadingSpinner size="
|
|
166
|
+
if (loading) return <div style={{ padding: 16, textAlign: 'center' }}><LoadingSpinner size="small" /></div>;
|
|
167
167
|
|
|
168
168
|
if (error && !insights) return (
|
|
169
169
|
<div style={{ padding: 12 }}>
|
|
170
|
-
<Banner
|
|
170
|
+
<Banner status="danger" size="small">{error}</Banner>
|
|
171
171
|
</div>
|
|
172
172
|
);
|
|
173
173
|
|
|
@@ -180,7 +180,7 @@ function BotDashboard({ packName, botId }: { packName: string; botId: string })
|
|
|
180
180
|
const recentRuns = history.slice(0, 5);
|
|
181
181
|
|
|
182
182
|
return (
|
|
183
|
-
<CollapsibleSection title="Dashboard"
|
|
183
|
+
<CollapsibleSection title="Dashboard" defaultExpanded>
|
|
184
184
|
<div style={{ padding: '4px 12px 12px' }}>
|
|
185
185
|
{/* KPI cards */}
|
|
186
186
|
<KpiRow>
|
|
@@ -206,7 +206,7 @@ function BotDashboard({ packName, botId }: { packName: string; botId: string })
|
|
|
206
206
|
</Typography>
|
|
207
207
|
{topInsights.map((ins, i) => (
|
|
208
208
|
<InsightRow key={i}>
|
|
209
|
-
<Badge variant={(severityToVariant[ins.severity] ?? '
|
|
209
|
+
<Badge variant={(severityToVariant[ins.severity] ?? 'default') as any}>
|
|
210
210
|
{ins.severity}
|
|
211
211
|
</Badge>
|
|
212
212
|
<Typography variant="caption-regular" color="color-text-medium" style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>
|