fix(FN-2698): load plugins during CLI runtime startup

- Load configured plugins during dashboard startup before launching the UI flow
- Load plugins during serve and daemon startup so runtime hooks are available immediately
- Add targeted CLI command tests for dashboard, serve, and daemon auto-load behavior at startup
- Add a changeset documenting the plugin runtime startup fix for @runfusion/fusion
This commit is contained in:
Fusion
2026-04-27 09:10:14 -07:00
committed by gsxdsm
parent 5033114625
commit 41015b2d73
7 changed files with 157 additions and 0 deletions

View File

@@ -1023,6 +1023,18 @@ export async function runDashboard(port: number, opts: { paused?: boolean; dev?:
taskStore: store,
});
// Auto-load all enabled plugins so runtime UI (NewAgentDialog, AgentDetailView)
// can discover installed runtimes like Hermes and OpenClaw.
try {
const { loaded, errors } = await pluginLoader.loadAllPlugins();
logSink.log(`Loaded ${loaded} plugins (${errors} errors)`, "plugins");
} catch (err) {
logSink.log(
`Failed to load plugins: ${err instanceof Error ? err.message : err}`,
"plugins"
);
}
// ── HeartbeatMonitor + HeartbeatTriggerScheduler ──────────────────────
//
// In non-dev mode: obtained from ProjectEngine after engine.start(), which