feat(FN-3079): add plugin dashboard views and dependency graph plugin

- Add plugin dashboard view registration and hosting across core, dashboard routes, and plugin SDK exports
- Integrate plugin-provided views into app navigation, mobile/header UI, and view state hooks with coverage
- Add fusion-plugin-dependency-graph example plugin with persisted storage, dashboard view UI, and manifest wiring
- Update plugin authoring and architecture docs for dashboard view extension points
- Add a changeset for @runfusion/fusion covering plugin dashboard view support

Fusion-Task-Id: FN-3079
This commit is contained in:
Fusion
2026-05-01 23:32:32 -07:00
committed by gsxdsm
parent a284138167
commit 0597b34eea
38 changed files with 1264 additions and 16 deletions

View File

@@ -486,7 +486,39 @@ export default function CiBadge() {
---
## 8. Registering Agent Runtimes
## 8. Registering Top-Level Dashboard Views
Top-level views are a **sibling contribution type** to `uiSlots`.
- `uiSlots` are embedded surfaces (task detail tab, header action, etc.)
- `dashboardViews` are full-screen destinations in dashboard navigation
Register `dashboardViews` on the plugin definition:
```ts
import type { PluginDashboardViewDefinition } from "@fusion/plugin-sdk";
const dashboardViews: PluginDashboardViewDefinition[] = [
{
viewId: "graph",
label: "Graph",
componentPath: "./src/DependencyGraphView.tsx",
icon: "Network",
order: 40,
placement: "more",
},
];
```
Current host constraints:
- Discovery API: `GET /api/plugins/dashboard-views`
- The dashboard **does not eval or filesystem-load plugin code in-browser**
- `componentPath` is stored for authoring symmetry/future expansion, but render resolution is currently done through a host-side static registry (`pluginId + viewId`)
- Use stable IDs; runtime view key format is `plugin:${pluginId}:${viewId}`
---
## 9. Registering Agent Runtimes
Plugins can provide custom agent runtime implementations that extend the Fusion engine's ability to execute agent sessions. Runtimes are discovered through the plugin discovery pipeline and can be used by the engine to route agent session creation.

View File

@@ -163,6 +163,10 @@ Concrete references:
- `PluginStore` (`plugin-store.ts`) stores plugin installation state and settings (`plugins` table)
- `PluginLoader` (`plugin-loader.ts`) loads/unloads plugin modules and emits lifecycle events
- Plugin contributions now include both embedded `uiSlots` and top-level `dashboardViews`
- Discovery endpoints:
- `GET /api/plugins/ui-slots`
- `GET /api/plugins/dashboard-views`
- Dashboard management routes are implemented in `packages/dashboard/src/plugin-routes.ts`
### Prompt Overrides