@synergenius/flow-weaver-pack-weaver 0.9.12 → 0.9.14
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/evolution-panel.js +96 -0
- package/dist/ui/insights-widget.js +85 -0
- package/flowweaver.manifest.json +2 -17
- package/package.json +3 -2
|
@@ -0,0 +1,96 @@
|
|
|
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/evolution-panel.tsx
|
|
21
|
+
var evolution_panel_exports = {};
|
|
22
|
+
__export(evolution_panel_exports, {
|
|
23
|
+
WeaverEvolutionPanel: () => WeaverEvolutionPanel,
|
|
24
|
+
default: () => evolution_panel_default
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(evolution_panel_exports);
|
|
27
|
+
var import_react = require("react");
|
|
28
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
function WeaverEvolutionPanel({ projectDir }) {
|
|
30
|
+
const [data, setData] = (0, import_react.useState)(null);
|
|
31
|
+
const [error, setError] = (0, import_react.useState)(null);
|
|
32
|
+
(0, import_react.useEffect)(() => {
|
|
33
|
+
if (!projectDir) return;
|
|
34
|
+
fetch(`/api/mcp/fw_weaver_insights?projectDir=${encodeURIComponent(projectDir)}`).then((r) => r.json()).then(setData).catch((e) => setError(e.message));
|
|
35
|
+
}, [projectDir]);
|
|
36
|
+
if (error) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: 16, color: "#ef4444" }, children: [
|
|
37
|
+
"Error: ",
|
|
38
|
+
error
|
|
39
|
+
] });
|
|
40
|
+
if (!data) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { padding: 16, opacity: 0.5 }, children: "Loading evolution data..." });
|
|
41
|
+
const { evolution, trust } = data;
|
|
42
|
+
const outcomeColor = {
|
|
43
|
+
applied: "#22c55e",
|
|
44
|
+
"rolled-back": "#ef4444",
|
|
45
|
+
rejected: "#f59e0b",
|
|
46
|
+
"no-change": "#6b7280",
|
|
47
|
+
error: "#ef4444"
|
|
48
|
+
};
|
|
49
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: 16, fontFamily: "system-ui, sans-serif", fontSize: 13 }, children: [
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { marginBottom: 16 }, children: [
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { fontWeight: 600, marginBottom: 4 }, children: "Trust Level" }),
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", alignItems: "baseline", gap: 8 }, children: [
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { style: { fontSize: 20, fontWeight: 700 }, children: [
|
|
54
|
+
"Phase ",
|
|
55
|
+
trust.phase
|
|
56
|
+
] }),
|
|
57
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { style: { opacity: 0.5 }, children: [
|
|
58
|
+
"Score: ",
|
|
59
|
+
trust.score,
|
|
60
|
+
"/100"
|
|
61
|
+
] })
|
|
62
|
+
] })
|
|
63
|
+
] }),
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { fontWeight: 600, marginBottom: 4 }, children: [
|
|
65
|
+
"Genesis Cycles: ",
|
|
66
|
+
evolution.totalCycles,
|
|
67
|
+
" (",
|
|
68
|
+
evolution.totalCycles > 0 ? Math.round(evolution.successRate * 100) : 0,
|
|
69
|
+
"% success)"
|
|
70
|
+
] }) }),
|
|
71
|
+
Object.keys(evolution.byOperationType).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { marginBottom: 16 }, children: [
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { fontWeight: 600, marginBottom: 4 }, children: "Operation Effectiveness" }),
|
|
73
|
+
Object.entries(evolution.byOperationType).map(([op, stats]) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: "2px 0", display: "flex", justifyContent: "space-between" }, children: [
|
|
74
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: op }),
|
|
75
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { style: { opacity: 0.7 }, children: [
|
|
76
|
+
Math.round(stats.effectiveness * 100),
|
|
77
|
+
"% (",
|
|
78
|
+
stats.applied,
|
|
79
|
+
"/",
|
|
80
|
+
stats.proposed,
|
|
81
|
+
")"
|
|
82
|
+
] })
|
|
83
|
+
] }, op))
|
|
84
|
+
] }),
|
|
85
|
+
evolution.recentCycles.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
86
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { fontWeight: 600, marginBottom: 4 }, children: "Recent Cycles" }),
|
|
87
|
+
evolution.recentCycles.slice(-5).reverse().map((cycle) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: "4px 0", borderBottom: "1px solid rgba(128,128,128,0.1)" }, children: [
|
|
88
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { color: outcomeColor[cycle.outcome] ?? "#6b7280", fontWeight: 600, marginRight: 8 }, children: cycle.outcome }),
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { opacity: 0.7 }, children: cycle.id }),
|
|
90
|
+
cycle.proposal && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { opacity: 0.6, paddingLeft: 8 }, children: cycle.proposal.summary })
|
|
91
|
+
] }, cycle.id))
|
|
92
|
+
] }),
|
|
93
|
+
evolution.totalCycles === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { opacity: 0.5, textAlign: "center", padding: 20 }, children: "No genesis cycles yet. Use /genesis in the assistant to start evolving bot workflows." })
|
|
94
|
+
] });
|
|
95
|
+
}
|
|
96
|
+
var evolution_panel_default = WeaverEvolutionPanel;
|
|
@@ -0,0 +1,85 @@
|
|
|
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/insights-widget.tsx
|
|
21
|
+
var insights_widget_exports = {};
|
|
22
|
+
__export(insights_widget_exports, {
|
|
23
|
+
WeaverInsightsWidget: () => WeaverInsightsWidget,
|
|
24
|
+
default: () => insights_widget_default
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(insights_widget_exports);
|
|
27
|
+
var import_react = require("react");
|
|
28
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
function WeaverInsightsWidget({ projectDir }) {
|
|
30
|
+
const [data, setData] = (0, import_react.useState)(null);
|
|
31
|
+
const [error, setError] = (0, import_react.useState)(null);
|
|
32
|
+
(0, import_react.useEffect)(() => {
|
|
33
|
+
if (!projectDir) return;
|
|
34
|
+
fetch(`/api/mcp/fw_weaver_insights?projectDir=${encodeURIComponent(projectDir)}`).then((r) => r.json()).then(setData).catch((e) => setError(e.message));
|
|
35
|
+
}, [projectDir]);
|
|
36
|
+
if (error) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: 16, color: "#ef4444" }, children: [
|
|
37
|
+
"Error: ",
|
|
38
|
+
error
|
|
39
|
+
] });
|
|
40
|
+
if (!data) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { padding: 16, opacity: 0.5 }, children: "Loading insights..." });
|
|
41
|
+
const severityColor = {
|
|
42
|
+
critical: "#ef4444",
|
|
43
|
+
warning: "#f59e0b",
|
|
44
|
+
info: "#6b7280"
|
|
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: [
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { fontSize: 28, fontWeight: 700 }, children: data.health.overall }),
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { opacity: 0.6 }, children: "/100 health" }),
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { style: { marginLeft: "auto", opacity: 0.5 }, children: [
|
|
51
|
+
"Phase ",
|
|
52
|
+
data.trust.phase,
|
|
53
|
+
" \xB7 $",
|
|
54
|
+
data.cost.last7Days.toFixed(2),
|
|
55
|
+
"/7d (",
|
|
56
|
+
data.cost.trend,
|
|
57
|
+
")"
|
|
58
|
+
] })
|
|
59
|
+
] }),
|
|
60
|
+
data.insights.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { marginBottom: 12 }, children: [
|
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { fontWeight: 600, marginBottom: 6 }, children: "Insights" }),
|
|
62
|
+
data.insights.slice(0, 3).map((insight, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: "4px 0", borderBottom: "1px solid rgba(128,128,128,0.1)" }, children: [
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { color: severityColor[insight.severity] ?? "#6b7280", fontWeight: 600, marginRight: 8 }, children: insight.severity.toUpperCase() }),
|
|
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
|
+
] })
|
|
69
|
+
] }, i))
|
|
70
|
+
] }),
|
|
71
|
+
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: "2px 0" }, children: [
|
|
74
|
+
bot.name,
|
|
75
|
+
": ",
|
|
76
|
+
Math.round(bot.successRate * 100),
|
|
77
|
+
"% success (",
|
|
78
|
+
bot.totalTasksRun,
|
|
79
|
+
" tasks)",
|
|
80
|
+
bot.ejected && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { opacity: 0.5 }, children: " \xB7 ejected" })
|
|
81
|
+
] }, i))
|
|
82
|
+
] })
|
|
83
|
+
] });
|
|
84
|
+
}
|
|
85
|
+
var insights_widget_default = WeaverInsightsWidget;
|
package/flowweaver.manifest.json
CHANGED
|
@@ -949,7 +949,7 @@
|
|
|
949
949
|
},
|
|
950
950
|
{
|
|
951
951
|
"name": "improve",
|
|
952
|
-
"description": "Autonomous codebase improvement
|
|
952
|
+
"description": "Autonomous codebase improvement \u2014 finds issues, fixes with tests, commits or rolls back"
|
|
953
953
|
},
|
|
954
954
|
{
|
|
955
955
|
"name": "status",
|
|
@@ -1073,21 +1073,6 @@
|
|
|
1073
1073
|
}
|
|
1074
1074
|
],
|
|
1075
1075
|
"uiContributions": [
|
|
1076
|
-
{
|
|
1077
|
-
"type": "dashboard-widget",
|
|
1078
|
-
"id": "weaver-status",
|
|
1079
|
-
"name": "Weaver Bot Status",
|
|
1080
|
-
"component": "dist/ui/status-widget.js",
|
|
1081
|
-
"area": "dashboard",
|
|
1082
|
-
"size": "medium"
|
|
1083
|
-
},
|
|
1084
|
-
{
|
|
1085
|
-
"type": "result-renderer",
|
|
1086
|
-
"id": "weaver-report",
|
|
1087
|
-
"name": "Weaver Report View",
|
|
1088
|
-
"component": "dist/ui/report-renderer.js",
|
|
1089
|
-
"mimeType": "application/x-weaver-report"
|
|
1090
|
-
},
|
|
1091
1076
|
{
|
|
1092
1077
|
"type": "dashboard-widget",
|
|
1093
1078
|
"id": "weaver-insights",
|
|
@@ -1137,4 +1122,4 @@
|
|
|
1137
1122
|
"file": "dist/docs/weaver-config.md"
|
|
1138
1123
|
}
|
|
1139
1124
|
]
|
|
1140
|
-
}
|
|
1125
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synergenius/flow-weaver-pack-weaver",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.14",
|
|
4
4
|
"description": "AI bot for Flow Weaver. Execute tasks, run workflows, evolve autonomously.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"LICENSE"
|
|
58
58
|
],
|
|
59
59
|
"scripts": {
|
|
60
|
-
"build": "tsc && cp -r src/docs dist/docs && node -e \"require('fs').writeFileSync('templates.js','export{workflowTemplates}from\\\"./dist/templates/index.js\\\";\\n')\"",
|
|
60
|
+
"build": "tsc && cp -r src/docs dist/docs && node scripts/bundle-ui.mjs && node -e \"require('fs').writeFileSync('templates.js','export{workflowTemplates}from\\\"./dist/templates/index.js\\\";\\n')\"",
|
|
61
61
|
"prepublishOnly": "npm run build",
|
|
62
62
|
"test": "vitest run",
|
|
63
63
|
"test:watch": "vitest",
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@synergenius/flow-weaver": "^0.23.1",
|
|
71
71
|
"@types/node": "^25.3.5",
|
|
72
|
+
"esbuild": "^0.27.4",
|
|
72
73
|
"tsx": "^4.0.0",
|
|
73
74
|
"typescript": "^5.0.0",
|
|
74
75
|
"vitest": "^4.0.18"
|