@synergenius/flow-weaver-pack-weaver 0.9.80 → 0.9.82
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 +40 -1
- package/dist/ai-chat-provider.js.map +1 -1
- package/dist/cli-bridge.d.ts.map +1 -1
- package/dist/cli-bridge.js +5 -3
- package/dist/cli-bridge.js.map +1 -1
- package/dist/cli-handlers.d.ts +16 -7
- package/dist/cli-handlers.d.ts.map +1 -1
- package/dist/cli-handlers.js +293 -416
- package/dist/cli-handlers.js.map +1 -1
- package/dist/ui/swarm-dashboard.js +906 -323
- package/dist/ui/task-detail-view.js +27 -16
- package/dist/ui/task-editor.js +613 -0
- package/flowweaver.manifest.json +16 -5
- package/package.json +1 -1
- package/src/ai-chat-provider.ts +39 -1
- package/src/cli-bridge.ts +6 -3
- package/src/cli-handlers.ts +280 -433
- package/src/ui/swarm-dashboard.tsx +41 -12
- package/src/ui/task-detail-view.tsx +23 -15
- package/src/ui/task-editor.tsx +591 -0
- package/src/ui/task-create-form.tsx +0 -87
package/flowweaver.manifest.json
CHANGED
|
@@ -913,8 +913,9 @@
|
|
|
913
913
|
"usage": "<task>"
|
|
914
914
|
},
|
|
915
915
|
{
|
|
916
|
-
"name": "
|
|
917
|
-
"description": "
|
|
916
|
+
"name": "swarm",
|
|
917
|
+
"description": "Manage the swarm: start, stop, pause, status, config",
|
|
918
|
+
"usage": "weaver swarm <start|stop|pause|status|config> [options]"
|
|
918
919
|
},
|
|
919
920
|
{
|
|
920
921
|
"name": "steer",
|
|
@@ -922,9 +923,19 @@
|
|
|
922
923
|
"usage": "<pause|resume|cancel|redirect|queue> [payload]"
|
|
923
924
|
},
|
|
924
925
|
{
|
|
925
|
-
"name": "
|
|
926
|
-
"description": "Manage
|
|
927
|
-
"usage": "<
|
|
926
|
+
"name": "task",
|
|
927
|
+
"description": "Manage tasks: create, list, get, clear, cancel, retry",
|
|
928
|
+
"usage": "weaver task <create|list|get|clear|cancel|retry> [options]"
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
"name": "profile",
|
|
932
|
+
"description": "Manage profiles: list, create, delete",
|
|
933
|
+
"usage": "weaver profile <list|create|delete> [options]"
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
"name": "reset",
|
|
937
|
+
"description": "Full reset: stop swarm, clear all data, recreate defaults",
|
|
938
|
+
"usage": "weaver reset --confirm"
|
|
928
939
|
},
|
|
929
940
|
{
|
|
930
941
|
"name": "genesis",
|
package/package.json
CHANGED
package/src/ai-chat-provider.ts
CHANGED
|
@@ -616,7 +616,45 @@ const toolHandlers: Record<
|
|
|
616
616
|
// Clear the singleton so next getInstance() starts fresh
|
|
617
617
|
SwarmController.clearInstances();
|
|
618
618
|
|
|
619
|
-
|
|
619
|
+
// 7. Re-register default bots from manifest
|
|
620
|
+
let botsRegistered = 0;
|
|
621
|
+
try {
|
|
622
|
+
const manifestPath = path.join(path.dirname(new URL(import.meta.url).pathname), '..', 'flowweaver.manifest.json');
|
|
623
|
+
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf-8'));
|
|
624
|
+
if (Array.isArray(manifest.botRegistrations)) {
|
|
625
|
+
const registry = new BotRegistry(ctx.workspacePath);
|
|
626
|
+
for (const reg of manifest.botRegistrations) {
|
|
627
|
+
const id = reg.id as string;
|
|
628
|
+
if (!id) continue;
|
|
629
|
+
const slug = (reg.sourceTemplateId || id) as string;
|
|
630
|
+
registry.register({
|
|
631
|
+
id,
|
|
632
|
+
name: reg.name ?? id,
|
|
633
|
+
description: reg.description ?? '',
|
|
634
|
+
icon: reg.icon,
|
|
635
|
+
color: reg.color,
|
|
636
|
+
filePath: path.join('node_modules', '@synergenius', 'flow-weaver-pack-weaver', 'src', 'workflows', `${slug}.ts`),
|
|
637
|
+
workflowExport: reg.workflowExport ?? id,
|
|
638
|
+
paramName: reg.paramName ?? 'taskJson',
|
|
639
|
+
sourceTemplateId: reg.sourceTemplateId,
|
|
640
|
+
packId: manifest.name,
|
|
641
|
+
});
|
|
642
|
+
botsRegistered++;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
} catch { /* non-fatal — bots can be re-registered manually */ }
|
|
646
|
+
|
|
647
|
+
// 8. Re-create default profiles from registered bots
|
|
648
|
+
let profilesCreated = 0;
|
|
649
|
+
try {
|
|
650
|
+
const freshProfileStore = new ProfileStore(ctx.workspacePath);
|
|
651
|
+
const freshRegistry = new BotRegistry(ctx.workspacePath);
|
|
652
|
+
const bots = freshRegistry.list();
|
|
653
|
+
freshProfileStore.ensureDefaultProfiles(bots);
|
|
654
|
+
profilesCreated = freshProfileStore.list().length;
|
|
655
|
+
} catch { /* non-fatal */ }
|
|
656
|
+
|
|
657
|
+
return JSON.stringify({ reset: true, tasksCleared, profilesCleared, botsRegistered, profilesCreated });
|
|
620
658
|
},
|
|
621
659
|
};
|
|
622
660
|
|
package/src/cli-bridge.ts
CHANGED
|
@@ -2,7 +2,8 @@ import type { ParsedArgs } from './cli-handlers.js';
|
|
|
2
2
|
import {
|
|
3
3
|
handleRun, handleHistory, handleCosts, handleWatch,
|
|
4
4
|
handleCron, handlePipeline, handleDashboard, handleProviders,
|
|
5
|
-
handleEject, handleBot,
|
|
5
|
+
handleEject, handleBot, handleSwarm, handleSteer, handleTask,
|
|
6
|
+
handleProfile, handleReset,
|
|
6
7
|
handleStatus, handleGenesis, handleAudit, handleInit, handleAssistant,
|
|
7
8
|
handleExamples, handleDoctor, handleImprove,
|
|
8
9
|
printHelp,
|
|
@@ -19,9 +20,11 @@ const handlers: Record<string, (opts: ParsedArgs) => Promise<void>> = {
|
|
|
19
20
|
providers: handleProviders,
|
|
20
21
|
eject: handleEject,
|
|
21
22
|
bot: handleBot,
|
|
22
|
-
|
|
23
|
+
swarm: handleSwarm,
|
|
23
24
|
steer: handleSteer,
|
|
24
|
-
|
|
25
|
+
task: handleTask,
|
|
26
|
+
profile: handleProfile,
|
|
27
|
+
reset: handleReset,
|
|
25
28
|
status: handleStatus,
|
|
26
29
|
genesis: handleGenesis,
|
|
27
30
|
audit: handleAudit,
|