@synergenius/flow-weaver-pack-weaver 0.9.14 → 0.9.16
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 +34 -0
- package/dist/ai-chat-provider.d.ts.map +1 -0
- package/dist/ai-chat-provider.js +256 -0
- package/dist/ai-chat-provider.js.map +1 -0
- package/dist/docs/docs/weaver-bot-usage.md +34 -0
- package/dist/docs/docs/weaver-genesis.md +32 -0
- package/dist/docs/docs/weaver-task-queue.md +34 -0
- package/dist/docs/weaver-bot-usage.md +34 -0
- package/dist/docs/weaver-config.md +9 -15
- package/dist/docs/weaver-genesis.md +32 -0
- package/dist/docs/weaver-task-queue.md +34 -0
- package/dist/ui/evolution-panel.js +129 -56
- package/dist/ui/insights-widget.js +69 -37
- package/flowweaver.manifest.json +281 -4
- package/package.json +1 -1
- package/src/ai-chat-provider.ts +300 -0
- package/src/docs/weaver-bot-usage.md +34 -0
- package/src/docs/weaver-genesis.md +32 -0
- package/src/docs/weaver-task-queue.md +34 -0
- package/src/ui/evolution-panel.tsx +155 -70
- package/src/ui/insights-widget.tsx +86 -33
- package/dist/bot/agent-loop.d.ts +0 -20
- package/dist/bot/agent-loop.d.ts.map +0 -1
- package/dist/bot/agent-loop.js +0 -331
- package/dist/bot/agent-loop.js.map +0 -1
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -749
- package/dist/cli.js.map +0 -1
- package/dist/templates/weaver-template.d.ts +0 -11
- package/dist/templates/weaver-template.d.ts.map +0 -1
- package/dist/templates/weaver-template.js +0 -53
- package/dist/templates/weaver-template.js.map +0 -1
- package/dist/workflows/weaver-bot-session.d.ts +0 -65
- package/dist/workflows/weaver-bot-session.d.ts.map +0 -1
- package/dist/workflows/weaver-bot-session.js +0 -68
- package/dist/workflows/weaver-bot-session.js.map +0 -1
- package/dist/workflows/weaver.d.ts +0 -24
- package/dist/workflows/weaver.d.ts.map +0 -1
- package/dist/workflows/weaver.js +0 -28
- package/dist/workflows/weaver.js.map +0 -1
|
@@ -26,71 +26,144 @@ __export(evolution_panel_exports, {
|
|
|
26
26
|
module.exports = __toCommonJS(evolution_panel_exports);
|
|
27
27
|
var import_react = require("react");
|
|
28
28
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
-
function WeaverEvolutionPanel(
|
|
30
|
-
const [
|
|
29
|
+
function WeaverEvolutionPanel() {
|
|
30
|
+
const [health, setHealth] = (0, import_react.useState)(null);
|
|
31
|
+
const [improve, setImprove] = (0, import_react.useState)(null);
|
|
31
32
|
const [error, setError] = (0, import_react.useState)(null);
|
|
33
|
+
const [loading, setLoading] = (0, import_react.useState)(true);
|
|
34
|
+
const [deviceId, setDeviceId] = (0, import_react.useState)(null);
|
|
35
|
+
const [deviceName, setDeviceName] = (0, import_react.useState)("");
|
|
36
|
+
const [improving, setImproving] = (0, import_react.useState)(false);
|
|
37
|
+
const fetchData = (0, import_react.useCallback)(async () => {
|
|
38
|
+
try {
|
|
39
|
+
const devRes = await fetch("/api/devices", { credentials: "include" });
|
|
40
|
+
if (!devRes.ok) {
|
|
41
|
+
setError("Not connected");
|
|
42
|
+
setLoading(false);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const devices = await devRes.json();
|
|
46
|
+
const device = devices.find((d) => d.capabilities?.includes("improve"));
|
|
47
|
+
if (!device) {
|
|
48
|
+
setError("No device with improve capability");
|
|
49
|
+
setLoading(false);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
setDeviceId(device.id);
|
|
53
|
+
setDeviceName(device.name);
|
|
54
|
+
const [healthRes, improveRes] = await Promise.allSettled([
|
|
55
|
+
fetch(`/api/devices/${device.id}/health`, { credentials: "include" }),
|
|
56
|
+
fetch(`/api/devices/${device.id}/improve/status`, { credentials: "include" })
|
|
57
|
+
]);
|
|
58
|
+
if (healthRes.status === "fulfilled" && healthRes.value.ok) {
|
|
59
|
+
setHealth(await healthRes.value.json());
|
|
60
|
+
}
|
|
61
|
+
if (improveRes.status === "fulfilled" && improveRes.value.ok) {
|
|
62
|
+
const data = await improveRes.value.json();
|
|
63
|
+
setImprove(data);
|
|
64
|
+
setImproving(data.running ?? false);
|
|
65
|
+
}
|
|
66
|
+
setError(null);
|
|
67
|
+
} catch (e) {
|
|
68
|
+
setError(e instanceof Error ? e.message : "Failed to load");
|
|
69
|
+
} finally {
|
|
70
|
+
setLoading(false);
|
|
71
|
+
}
|
|
72
|
+
}, []);
|
|
32
73
|
(0, import_react.useEffect)(() => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
74
|
+
fetchData();
|
|
75
|
+
const interval = setInterval(fetchData, 15e3);
|
|
76
|
+
return () => clearInterval(interval);
|
|
77
|
+
}, [fetchData]);
|
|
78
|
+
const startImprove = async () => {
|
|
79
|
+
if (!deviceId) return;
|
|
80
|
+
setImproving(true);
|
|
81
|
+
try {
|
|
82
|
+
await fetch(`/api/devices/${deviceId}/improve`, {
|
|
83
|
+
method: "POST",
|
|
84
|
+
headers: { "Content-Type": "application/json" },
|
|
85
|
+
credentials: "include",
|
|
86
|
+
body: JSON.stringify({ maxCycles: 5 })
|
|
87
|
+
});
|
|
88
|
+
} catch {
|
|
89
|
+
}
|
|
48
90
|
};
|
|
49
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
91
|
+
if (loading) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { padding: 16, opacity: 0.5 }, children: "Loading..." });
|
|
92
|
+
if (error) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: 16 }, children: [
|
|
93
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { color: "#ef4444", marginBottom: 8 }, children: error }),
|
|
94
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { onClick: fetchData, style: { fontSize: 12, color: "#6b7280", background: "none", border: "1px solid #333", borderRadius: 4, padding: "4px 8px", cursor: "pointer" }, children: "Retry" })
|
|
95
|
+
] });
|
|
96
|
+
const trustPhase = health?.trust?.phase ?? 1;
|
|
97
|
+
const trustScore = health?.trust?.score ?? 0;
|
|
98
|
+
const healthScore = health?.health?.overall ?? 0;
|
|
99
|
+
const outcomeIcon = { success: "\u2713", failure: "\u2717" };
|
|
100
|
+
const outcomeColor = { success: "#22c55e", failure: "#ef4444" };
|
|
101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: 16, fontFamily: "system-ui, sans-serif", fontSize: 13, color: "var(--color-text-high, #e5e5e5)" }, children: [
|
|
102
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { fontSize: 10, textTransform: "uppercase", letterSpacing: "0.05em", opacity: 0.5, marginBottom: 12 }, children: deviceName }),
|
|
103
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", gap: 16, marginBottom: 16 }, children: [
|
|
104
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { flex: 1, padding: 12, border: "1px solid rgba(128,128,128,0.2)", borderRadius: 6 }, children: [
|
|
105
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { fontSize: 20, fontWeight: 700 }, children: [
|
|
106
|
+
"P",
|
|
107
|
+
trustPhase
|
|
56
108
|
] }),
|
|
57
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("
|
|
58
|
-
"
|
|
59
|
-
|
|
109
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { fontSize: 10, opacity: 0.5, textTransform: "uppercase", marginTop: 2 }, children: [
|
|
110
|
+
"Trust \xB7 ",
|
|
111
|
+
trustScore,
|
|
60
112
|
"/100"
|
|
61
113
|
] })
|
|
114
|
+
] }),
|
|
115
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { flex: 1, padding: 12, border: "1px solid rgba(128,128,128,0.2)", borderRadius: 6 }, children: [
|
|
116
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { fontSize: 20, fontWeight: 700 }, children: healthScore }),
|
|
117
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { fontSize: 10, opacity: 0.5, textTransform: "uppercase", marginTop: 2 }, children: "Health" })
|
|
62
118
|
] })
|
|
63
119
|
] }),
|
|
64
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
120
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { marginBottom: 16 }, children: [
|
|
121
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: 8 }, children: [
|
|
122
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { fontWeight: 600, fontSize: 11, textTransform: "uppercase", letterSpacing: "0.04em", opacity: 0.6 }, children: "Improve" }),
|
|
123
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
124
|
+
"button",
|
|
125
|
+
{
|
|
126
|
+
onClick: startImprove,
|
|
127
|
+
disabled: improving,
|
|
128
|
+
style: {
|
|
129
|
+
fontSize: 11,
|
|
130
|
+
fontWeight: 500,
|
|
131
|
+
padding: "3px 10px",
|
|
132
|
+
borderRadius: 4,
|
|
133
|
+
border: "1px solid rgba(128,128,128,0.3)",
|
|
134
|
+
background: improving ? "rgba(34,197,94,0.1)" : "transparent",
|
|
135
|
+
color: improving ? "#22c55e" : "var(--color-text-medium, #999)",
|
|
136
|
+
cursor: improving ? "default" : "pointer",
|
|
137
|
+
opacity: improving ? 0.8 : 1
|
|
138
|
+
},
|
|
139
|
+
children: improving ? "Running..." : "Start Improve"
|
|
140
|
+
}
|
|
141
|
+
)
|
|
142
|
+
] }),
|
|
143
|
+
improve?.lastRun && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
144
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", gap: 8, marginBottom: 8 }, children: [
|
|
145
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { style: { color: "#22c55e", fontWeight: 600 }, children: [
|
|
146
|
+
improve.lastRun.successes,
|
|
147
|
+
" committed"
|
|
148
|
+
] }),
|
|
149
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { style: { color: "#ef4444", fontWeight: 600 }, children: [
|
|
150
|
+
improve.lastRun.failures,
|
|
151
|
+
" rolled back"
|
|
152
|
+
] }),
|
|
153
|
+
improve.lastRun.skips > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { style: { opacity: 0.5 }, children: [
|
|
154
|
+
improve.lastRun.skips,
|
|
155
|
+
" skipped"
|
|
156
|
+
] })
|
|
157
|
+
] }),
|
|
158
|
+
improve.lastRun.cycles.slice(-5).reverse().map((cy) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: "4px 0", borderBottom: "1px solid rgba(128,128,128,0.1)", display: "flex", alignItems: "flex-start", gap: 6 }, children: [
|
|
159
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { color: outcomeColor[cy.outcome] ?? "#6b7280", fontWeight: 700, fontSize: 12, width: 14, textAlign: "center", flexShrink: 0 }, children: outcomeIcon[cy.outcome] ?? "\u25CB" }),
|
|
160
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { flex: 1, opacity: 0.8 }, children: cy.description.slice(0, 80) }),
|
|
161
|
+
cy.commitHash && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { fontFamily: "monospace", fontSize: 10, opacity: 0.4 }, children: cy.commitHash })
|
|
162
|
+
] }, cy.cycle))
|
|
163
|
+
] }),
|
|
164
|
+
!improve?.lastRun && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { opacity: 0.5, textAlign: "center", padding: 16 }, children: 'No improve runs yet. Click "Start Improve" to begin.' })
|
|
92
165
|
] }),
|
|
93
|
-
|
|
166
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { textAlign: "right" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { onClick: fetchData, style: { fontSize: 11, color: "#6b7280", background: "none", border: "none", cursor: "pointer" }, children: "Refresh" }) })
|
|
94
167
|
] });
|
|
95
168
|
}
|
|
96
169
|
var evolution_panel_default = WeaverEvolutionPanel;
|
|
@@ -26,58 +26,90 @@ __export(insights_widget_exports, {
|
|
|
26
26
|
module.exports = __toCommonJS(insights_widget_exports);
|
|
27
27
|
var import_react = require("react");
|
|
28
28
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
-
function WeaverInsightsWidget(
|
|
29
|
+
function WeaverInsightsWidget() {
|
|
30
30
|
const [data, setData] = (0, import_react.useState)(null);
|
|
31
31
|
const [error, setError] = (0, import_react.useState)(null);
|
|
32
|
+
const [loading, setLoading] = (0, import_react.useState)(true);
|
|
33
|
+
const [deviceName, setDeviceName] = (0, import_react.useState)("");
|
|
34
|
+
const fetchData = (0, import_react.useCallback)(async () => {
|
|
35
|
+
try {
|
|
36
|
+
const devRes = await fetch("/api/devices", { credentials: "include" });
|
|
37
|
+
if (!devRes.ok) {
|
|
38
|
+
setError("Not connected");
|
|
39
|
+
setLoading(false);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const devices = await devRes.json();
|
|
43
|
+
const device = devices.find((d) => d.capabilities?.includes("insights"));
|
|
44
|
+
if (!device) {
|
|
45
|
+
setError("No device with insights capability");
|
|
46
|
+
setLoading(false);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
setDeviceName(device.name);
|
|
50
|
+
const [healthRes, insightsRes] = await Promise.allSettled([
|
|
51
|
+
fetch(`/api/devices/${device.id}/health`, { credentials: "include" }),
|
|
52
|
+
fetch(`/api/devices/${device.id}/insights`, { credentials: "include" })
|
|
53
|
+
]);
|
|
54
|
+
const health = healthRes.status === "fulfilled" && healthRes.value.ok ? await healthRes.value.json() : null;
|
|
55
|
+
const insights = insightsRes.status === "fulfilled" && insightsRes.value.ok ? await insightsRes.value.json() : [];
|
|
56
|
+
setData({
|
|
57
|
+
health: health?.health ?? { overall: 0, workflows: [] },
|
|
58
|
+
bots: health?.bots ?? [],
|
|
59
|
+
insights: Array.isArray(insights) ? insights : [],
|
|
60
|
+
cost: health?.cost ?? { last7Days: 0, trend: "stable" },
|
|
61
|
+
trust: health?.trust ?? { phase: 1, score: 0 }
|
|
62
|
+
});
|
|
63
|
+
setError(null);
|
|
64
|
+
} catch (e) {
|
|
65
|
+
setError(e instanceof Error ? e.message : "Failed to load");
|
|
66
|
+
} finally {
|
|
67
|
+
setLoading(false);
|
|
68
|
+
}
|
|
69
|
+
}, []);
|
|
32
70
|
(0, import_react.useEffect)(() => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
71
|
+
fetchData();
|
|
72
|
+
const interval = setInterval(fetchData, 3e4);
|
|
73
|
+
return () => clearInterval(interval);
|
|
74
|
+
}, [fetchData]);
|
|
75
|
+
if (loading) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { padding: 16, opacity: 0.5 }, children: "Loading insights..." });
|
|
76
|
+
if (error) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: 16 }, children: [
|
|
77
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { color: "#ef4444", marginBottom: 8 }, children: error }),
|
|
78
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { onClick: fetchData, style: { fontSize: 12, color: "#6b7280", background: "none", border: "1px solid #333", borderRadius: 4, padding: "4px 8px", cursor: "pointer" }, children: "Retry" })
|
|
39
79
|
] });
|
|
40
|
-
if (!data) return
|
|
41
|
-
const severityColor = {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
46
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: 16, fontFamily: "system-ui, sans-serif", fontSize: 13 }, children: [
|
|
47
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", alignItems: "baseline", gap: 12, marginBottom: 12 }, children: [
|
|
80
|
+
if (!data) return null;
|
|
81
|
+
const severityColor = { critical: "#ef4444", warning: "#f59e0b", info: "#6b7280" };
|
|
82
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: 16, fontFamily: "system-ui, sans-serif", fontSize: 13, color: "var(--color-text-high, #e5e5e5)" }, children: [
|
|
83
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { fontSize: 10, textTransform: "uppercase", letterSpacing: "0.05em", opacity: 0.5, marginBottom: 12 }, children: deviceName }),
|
|
84
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", alignItems: "baseline", gap: 12, marginBottom: 16 }, children: [
|
|
48
85
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { fontSize: 28, fontWeight: 700 }, children: data.health.overall }),
|
|
49
86
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { opacity: 0.6 }, children: "/100 health" }),
|
|
50
87
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { style: { marginLeft: "auto", opacity: 0.5 }, children: [
|
|
51
|
-
"
|
|
88
|
+
"P",
|
|
52
89
|
data.trust.phase,
|
|
53
90
|
" \xB7 $",
|
|
54
91
|
data.cost.last7Days.toFixed(2),
|
|
55
|
-
"/7d
|
|
56
|
-
data.cost.trend,
|
|
57
|
-
")"
|
|
92
|
+
"/7d"
|
|
58
93
|
] })
|
|
59
94
|
] }),
|
|
60
|
-
data.insights.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { marginBottom:
|
|
61
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { fontWeight: 600, marginBottom: 6 }, children: "Insights" }),
|
|
62
|
-
data.insights.slice(0,
|
|
63
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { color: severityColor[insight.severity] ?? "#6b7280", fontWeight: 600, marginRight: 8 }, children: insight.severity
|
|
64
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: insight.title })
|
|
65
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { style: { opacity: 0.5, marginLeft: 8 }, children: [
|
|
66
|
-
Math.round(insight.confidence * 100),
|
|
67
|
-
"%"
|
|
68
|
-
] })
|
|
95
|
+
data.insights.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { marginBottom: 16 }, children: [
|
|
96
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { fontWeight: 600, marginBottom: 6, fontSize: 11, textTransform: "uppercase", letterSpacing: "0.04em", opacity: 0.6 }, children: "Insights" }),
|
|
97
|
+
data.insights.slice(0, 5).map((insight, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: "6px 0", borderBottom: "1px solid rgba(128,128,128,0.15)" }, children: [
|
|
98
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { color: severityColor[insight.severity] ?? "#6b7280", fontWeight: 600, marginRight: 8, fontSize: 10, textTransform: "uppercase" }, children: insight.severity }),
|
|
99
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: insight.title })
|
|
69
100
|
] }, i))
|
|
70
101
|
] }),
|
|
102
|
+
data.insights.length === 0 && data.health.overall === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { opacity: 0.5, textAlign: "center", padding: 20 }, children: "No data yet. Connect a device and run some workflows." }),
|
|
71
103
|
data.bots.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
72
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { fontWeight: 600, marginBottom: 6 }, children: "Bots" }),
|
|
73
|
-
data.bots.map((bot, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: "
|
|
74
|
-
bot.name,
|
|
75
|
-
":
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
104
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { fontWeight: 600, marginBottom: 6, fontSize: 11, textTransform: "uppercase", letterSpacing: "0.04em", opacity: 0.6 }, children: "Bots" }),
|
|
105
|
+
data.bots.map((bot, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: "4px 0", display: "flex", justifyContent: "space-between" }, children: [
|
|
106
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: bot.name }),
|
|
107
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { style: { opacity: 0.6 }, children: [
|
|
108
|
+
Math.round(bot.successRate * 100),
|
|
109
|
+
"% (",
|
|
110
|
+
bot.totalTasksRun,
|
|
111
|
+
")"
|
|
112
|
+
] })
|
|
81
113
|
] }, i))
|
|
82
114
|
] })
|
|
83
115
|
] });
|
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.16",
|
|
5
5
|
"description": "AI bot for Flow Weaver. Execute tasks, run workflows, evolve autonomously.",
|
|
6
6
|
"engineVersion": ">=0.22.10",
|
|
7
7
|
"categories": [
|
|
@@ -949,7 +949,7 @@
|
|
|
949
949
|
},
|
|
950
950
|
{
|
|
951
951
|
"name": "improve",
|
|
952
|
-
"description": "Autonomous codebase improvement
|
|
952
|
+
"description": "Autonomous codebase improvement — finds issues, fixes with tests, commits or rolls back"
|
|
953
953
|
},
|
|
954
954
|
{
|
|
955
955
|
"name": "status",
|
|
@@ -1121,5 +1121,282 @@
|
|
|
1121
1121
|
],
|
|
1122
1122
|
"file": "dist/docs/weaver-config.md"
|
|
1123
1123
|
}
|
|
1124
|
-
]
|
|
1125
|
-
|
|
1124
|
+
],
|
|
1125
|
+
"aiChat": {
|
|
1126
|
+
"identity": {
|
|
1127
|
+
"name": "Weaver",
|
|
1128
|
+
"icon": "psychology",
|
|
1129
|
+
"description": "Hands-on AI assistant for Flow Weaver projects. Builds, validates, debugs, and manages workflows. Spawns autonomous bots for long-running tasks."
|
|
1130
|
+
},
|
|
1131
|
+
"tools": [
|
|
1132
|
+
{
|
|
1133
|
+
"name": "fw_weaver_run",
|
|
1134
|
+
"description": "Execute a Flow Weaver workflow with the AI runner. Returns the result summary, outcome, and cost.",
|
|
1135
|
+
"parameters": {
|
|
1136
|
+
"type": "object",
|
|
1137
|
+
"properties": {
|
|
1138
|
+
"file": {
|
|
1139
|
+
"type": "string",
|
|
1140
|
+
"description": "Path to the workflow file"
|
|
1141
|
+
},
|
|
1142
|
+
"params": {
|
|
1143
|
+
"type": "object",
|
|
1144
|
+
"description": "Input parameters as key-value pairs"
|
|
1145
|
+
},
|
|
1146
|
+
"verbose": {
|
|
1147
|
+
"type": "boolean",
|
|
1148
|
+
"description": "Show detailed execution info"
|
|
1149
|
+
},
|
|
1150
|
+
"dryRun": {
|
|
1151
|
+
"type": "boolean",
|
|
1152
|
+
"description": "Preview without executing"
|
|
1153
|
+
}
|
|
1154
|
+
},
|
|
1155
|
+
"required": [
|
|
1156
|
+
"file"
|
|
1157
|
+
]
|
|
1158
|
+
}
|
|
1159
|
+
},
|
|
1160
|
+
{
|
|
1161
|
+
"name": "fw_weaver_history",
|
|
1162
|
+
"description": "Query weaver run history. Returns recent workflow executions with outcome, duration, and summary.",
|
|
1163
|
+
"parameters": {
|
|
1164
|
+
"type": "object",
|
|
1165
|
+
"properties": {
|
|
1166
|
+
"id": {
|
|
1167
|
+
"type": "string",
|
|
1168
|
+
"description": "Specific run ID to look up"
|
|
1169
|
+
},
|
|
1170
|
+
"limit": {
|
|
1171
|
+
"type": "number",
|
|
1172
|
+
"description": "Max number of entries (default 20)"
|
|
1173
|
+
},
|
|
1174
|
+
"outcome": {
|
|
1175
|
+
"type": "string",
|
|
1176
|
+
"enum": [
|
|
1177
|
+
"completed",
|
|
1178
|
+
"failed",
|
|
1179
|
+
"error",
|
|
1180
|
+
"skipped"
|
|
1181
|
+
],
|
|
1182
|
+
"description": "Filter by outcome"
|
|
1183
|
+
},
|
|
1184
|
+
"workflowFile": {
|
|
1185
|
+
"type": "string",
|
|
1186
|
+
"description": "Filter by workflow file path"
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
},
|
|
1191
|
+
{
|
|
1192
|
+
"name": "fw_weaver_costs",
|
|
1193
|
+
"description": "Get AI cost summary across weaver runs. Shows total tokens, estimated cost, and breakdown by model.",
|
|
1194
|
+
"parameters": {
|
|
1195
|
+
"type": "object",
|
|
1196
|
+
"properties": {
|
|
1197
|
+
"since": {
|
|
1198
|
+
"type": "string",
|
|
1199
|
+
"description": "Filter: duration like \"7d\", \"30d\", or ISO-8601 date"
|
|
1200
|
+
},
|
|
1201
|
+
"model": {
|
|
1202
|
+
"type": "string",
|
|
1203
|
+
"description": "Filter by model name"
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
},
|
|
1208
|
+
{
|
|
1209
|
+
"name": "fw_weaver_providers",
|
|
1210
|
+
"description": "List available AI providers for weaver workflow execution.",
|
|
1211
|
+
"parameters": {
|
|
1212
|
+
"type": "object",
|
|
1213
|
+
"properties": {}
|
|
1214
|
+
}
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
"name": "fw_weaver_bot",
|
|
1218
|
+
"description": "Run the autonomous bot to create or modify a Flow Weaver workflow. Provide a natural language task description.",
|
|
1219
|
+
"parameters": {
|
|
1220
|
+
"type": "object",
|
|
1221
|
+
"properties": {
|
|
1222
|
+
"task": {
|
|
1223
|
+
"type": "string",
|
|
1224
|
+
"description": "Natural language task description"
|
|
1225
|
+
},
|
|
1226
|
+
"projectDir": {
|
|
1227
|
+
"type": "string",
|
|
1228
|
+
"description": "Project directory"
|
|
1229
|
+
},
|
|
1230
|
+
"mode": {
|
|
1231
|
+
"type": "string",
|
|
1232
|
+
"enum": [
|
|
1233
|
+
"create",
|
|
1234
|
+
"modify",
|
|
1235
|
+
"read",
|
|
1236
|
+
"batch"
|
|
1237
|
+
],
|
|
1238
|
+
"description": "Task mode"
|
|
1239
|
+
},
|
|
1240
|
+
"targets": {
|
|
1241
|
+
"type": "array",
|
|
1242
|
+
"description": "Target files for modify/read"
|
|
1243
|
+
},
|
|
1244
|
+
"template": {
|
|
1245
|
+
"type": "string",
|
|
1246
|
+
"description": "Template to use for scaffolding"
|
|
1247
|
+
},
|
|
1248
|
+
"dryRun": {
|
|
1249
|
+
"type": "boolean",
|
|
1250
|
+
"description": "Preview without executing"
|
|
1251
|
+
},
|
|
1252
|
+
"autoApprove": {
|
|
1253
|
+
"type": "boolean",
|
|
1254
|
+
"description": "Skip approval gate"
|
|
1255
|
+
}
|
|
1256
|
+
},
|
|
1257
|
+
"required": [
|
|
1258
|
+
"task"
|
|
1259
|
+
]
|
|
1260
|
+
}
|
|
1261
|
+
},
|
|
1262
|
+
{
|
|
1263
|
+
"name": "fw_weaver_steer",
|
|
1264
|
+
"description": "Send a steering command to a running bot (pause, resume, cancel, redirect, queue).",
|
|
1265
|
+
"parameters": {
|
|
1266
|
+
"type": "object",
|
|
1267
|
+
"properties": {
|
|
1268
|
+
"command": {
|
|
1269
|
+
"type": "string",
|
|
1270
|
+
"enum": [
|
|
1271
|
+
"pause",
|
|
1272
|
+
"resume",
|
|
1273
|
+
"cancel",
|
|
1274
|
+
"redirect",
|
|
1275
|
+
"queue"
|
|
1276
|
+
],
|
|
1277
|
+
"description": "Steering command"
|
|
1278
|
+
},
|
|
1279
|
+
"payload": {
|
|
1280
|
+
"type": "string",
|
|
1281
|
+
"description": "Payload for redirect/queue commands"
|
|
1282
|
+
}
|
|
1283
|
+
},
|
|
1284
|
+
"required": [
|
|
1285
|
+
"command"
|
|
1286
|
+
]
|
|
1287
|
+
}
|
|
1288
|
+
},
|
|
1289
|
+
{
|
|
1290
|
+
"name": "fw_weaver_queue",
|
|
1291
|
+
"description": "Manage the bot task queue (add, list, clear, remove tasks).",
|
|
1292
|
+
"parameters": {
|
|
1293
|
+
"type": "object",
|
|
1294
|
+
"properties": {
|
|
1295
|
+
"action": {
|
|
1296
|
+
"type": "string",
|
|
1297
|
+
"enum": [
|
|
1298
|
+
"add",
|
|
1299
|
+
"list",
|
|
1300
|
+
"clear",
|
|
1301
|
+
"remove"
|
|
1302
|
+
],
|
|
1303
|
+
"description": "Queue action"
|
|
1304
|
+
},
|
|
1305
|
+
"task": {
|
|
1306
|
+
"type": "string",
|
|
1307
|
+
"description": "Task instruction (for add)"
|
|
1308
|
+
},
|
|
1309
|
+
"id": {
|
|
1310
|
+
"type": "string",
|
|
1311
|
+
"description": "Task ID (for remove)"
|
|
1312
|
+
}
|
|
1313
|
+
},
|
|
1314
|
+
"required": [
|
|
1315
|
+
"action"
|
|
1316
|
+
]
|
|
1317
|
+
}
|
|
1318
|
+
},
|
|
1319
|
+
{
|
|
1320
|
+
"name": "fw_weaver_status",
|
|
1321
|
+
"description": "Get current bot session status (idle/planning/executing/etc), current task, completed count.",
|
|
1322
|
+
"parameters": {
|
|
1323
|
+
"type": "object",
|
|
1324
|
+
"properties": {}
|
|
1325
|
+
}
|
|
1326
|
+
},
|
|
1327
|
+
{
|
|
1328
|
+
"name": "fw_weaver_genesis",
|
|
1329
|
+
"description": "Run a single Genesis self-evolution cycle on a target workflow.",
|
|
1330
|
+
"parameters": {
|
|
1331
|
+
"type": "object",
|
|
1332
|
+
"properties": {
|
|
1333
|
+
"projectDir": {
|
|
1334
|
+
"type": "string",
|
|
1335
|
+
"description": "Project directory (defaults to cwd)"
|
|
1336
|
+
},
|
|
1337
|
+
"dryRun": {
|
|
1338
|
+
"type": "boolean",
|
|
1339
|
+
"description": "Preview without executing"
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
},
|
|
1344
|
+
{
|
|
1345
|
+
"name": "fw_weaver_insights",
|
|
1346
|
+
"description": "Get project health, insights, trust level, and cost summary with actionable recommendations.",
|
|
1347
|
+
"parameters": {
|
|
1348
|
+
"type": "object",
|
|
1349
|
+
"properties": {
|
|
1350
|
+
"projectDir": {
|
|
1351
|
+
"type": "string",
|
|
1352
|
+
"description": "Project directory path"
|
|
1353
|
+
}
|
|
1354
|
+
},
|
|
1355
|
+
"required": [
|
|
1356
|
+
"projectDir"
|
|
1357
|
+
]
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
],
|
|
1361
|
+
"docTopics": [
|
|
1362
|
+
{
|
|
1363
|
+
"id": "weaver-bot-usage",
|
|
1364
|
+
"keywords": [
|
|
1365
|
+
"weaver",
|
|
1366
|
+
"bot",
|
|
1367
|
+
"autonomous",
|
|
1368
|
+
"task",
|
|
1369
|
+
"run bot",
|
|
1370
|
+
"spawn bot",
|
|
1371
|
+
"weaver bot"
|
|
1372
|
+
],
|
|
1373
|
+
"contentFile": "dist/docs/weaver-bot-usage.md"
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
"id": "weaver-genesis",
|
|
1377
|
+
"keywords": [
|
|
1378
|
+
"genesis",
|
|
1379
|
+
"self-evolution",
|
|
1380
|
+
"evolve",
|
|
1381
|
+
"improve",
|
|
1382
|
+
"auto-improve"
|
|
1383
|
+
],
|
|
1384
|
+
"contentFile": "dist/docs/weaver-genesis.md"
|
|
1385
|
+
},
|
|
1386
|
+
{
|
|
1387
|
+
"id": "weaver-task-queue",
|
|
1388
|
+
"keywords": [
|
|
1389
|
+
"queue",
|
|
1390
|
+
"task queue",
|
|
1391
|
+
"batch",
|
|
1392
|
+
"schedule",
|
|
1393
|
+
"steering",
|
|
1394
|
+
"pause",
|
|
1395
|
+
"resume"
|
|
1396
|
+
],
|
|
1397
|
+
"contentFile": "dist/docs/weaver-task-queue.md"
|
|
1398
|
+
}
|
|
1399
|
+
],
|
|
1400
|
+
"provider": "dist/ai-chat-provider.js"
|
|
1401
|
+
}
|
|
1402
|
+
}
|
package/package.json
CHANGED