Completes FN-4315 by adding a patch changeset for `@runfusion/fusion` and updating project documentation (AGENTS.md and settings reference) to cover the audit recovery pipeline feature. Fusion-Task-Id: FN-4315 Fusion-Task-Lineage: 2646fd86-e525-4b62-a041-616fa7789e84
fusion-plugin-roadmap
@fusion-plugin-examples/roadmap is the workspace package for the bundled fusion-plugin-roadmap plugin.
Plugin identity
- Manifest id:
fusion-plugin-roadmap - Route namespace:
/api/plugins/fusion-plugin-roadmap/* - Dashboard view id:
plugin:fusion-plugin-roadmap:roadmaps
Package layout
manifest.json— plugin metadata and dashboard view declarationsrc/index.ts— plugin definition (onSchemaInit, routes, dashboard view metadata)src/roadmap-schema.ts— canonical roadmap DDL used byhooks.onSchemaInitsrc/server/index.ts— backend server exportssrc/dashboard-view.tsx— dashboard view entry export for host registrationsrc/dashboard/RoadmapsView.tsx— plugin-owned roadmap planner pagesrc/dashboard/useRoadmaps.ts— plugin-owned roadmap CRUD/reorder/suggestions/handoff hooksrc/dashboard/RoadmapsView.css— plugin-owned roadmap stylessrc/dashboard/api.ts— plugin-local client for/api/plugins/fusion-plugin-roadmap/*src/roadmap-types.ts+src/store/*— roadmap domain types/store
Exported surfaces
- Root export: plugin default + roadmap domain helpers/types
./server: roadmap route + AI suggestion service exports./dashboard-view: Roadmaps dashboard view export for host registry wiring
Regression test ownership
Roadmap behavior regression tests live in this plugin package and should stay here (not in @fusion/core or @fusion/dashboard):
src/store/__tests__/roadmap-store.test.tssrc/store/__tests__/roadmap-ordering.test.tssrc/store/__tests__/roadmap-handoff.test.tssrc/__tests__/index.test.ts(plugin contract:hooks.onSchemaInit, dashboard view metadata registration)src/__tests__/roadmap-routes.test.tssrc/__tests__/roadmap-suggestions.test.ts(AI suggestion flow uses injectedPluginContext.createAiSession()and session lifecycle handling)src/__tests__/api-client.test.tssrc/dashboard/__tests__/useRoadmaps.test.tssrc/dashboard/__tests__/RoadmapsView.test.tsx
Prefer canonical package exports in tests:
- plugin/server surface:
@fusion-plugin-examples/roadmapor@fusion-plugin-examples/roadmap/server - dashboard view surface:
@fusion-plugin-examples/roadmap/dashboard-view
Use deep source imports only when no package export exists for the target module.
Host vs plugin capability boundaries
Plugin-owned responsibilities:
- Define roadmap schema DDL in
src/roadmap-schema.tsand register it viahooks.onSchemaInitinsrc/index.ts. - Implement roadmap AI suggestion behavior through the injected
PluginContext.createAiSession()seam. - Declare plugin dashboard view metadata (
dashboardViews) and export the real view entrypoint (./dashboard-view).
Host-owned responsibilities:
- Execute plugin schema hooks during DB startup and expose resulting tables/indexes to plugin routes.
- Inject
createAiSession()into plugin runtime/route context. - Discover plugin dashboard views via
/api/plugins/dashboard-viewsand resolve plugin view IDs (for roadmap:plugin:fusion-plugin-roadmap:roadmaps) through the host view registry.
Notes
Roadmap tables are plugin-owned and created via hooks.onSchemaInit in src/index.ts, which delegates to src/roadmap-schema.ts. Core database bootstrap no longer creates roadmap tables/indexes.
Roadmap AI suggestion generation is plugin-owned (src/roadmap-suggestions.ts / src/roadmap-routes.ts) and uses PluginContext.createAiSession() when available. The plugin must not import @fusion/engine directly for suggestion generation.
The plugin keeps a single canonical dashboard entrypoint (./dashboard-view) and accepts host-supplied dashboard context (projectId, optional addToast). Do not deep-import dashboard internals from this plugin.