Files
fusion/plugins/fusion-plugin-roadmap
gsxdsm abd596b700 fix: pack full desktop dependency closure + resolve bun/desktop plugin loading on Windows
Desktop "Local" mode crashed with ERR_MODULE_NOT_FOUND because electron-builder's
pnpm collector drops `deduped` subtrees, so engine's transitive closure
(@modelcontextprotocol/sdk, pi-ai provider SDKs, etc.) was never packed. Stage the
complete flat prod closure with `pnpm deploy --legacy --config.node-linker=hoisted`
and package it via `electron-builder --projectDir deploy`, bypassing the lossy
collector entirely.

Also make the dashboard-imported example plugins loadable under plain Node (the
Electron main runtime): cursor/droid/roadmap now expose compiled `dist` on the
`import` condition (keeping `source`→src for the bun CLI) and are built during the
desktop build. Add `source` conditions to paperclip/agent-browser/even-cards/
even-realities-glasses/whatsapp-chat so the bun `--conditions=source` Windows CLI
compile resolves them from source.

Validated on macOS: @fusion/core|engine|dashboard import cleanly from the staged
deploy; packing yields a complete 705-package asar; bun-windows-x64 cross-compiles
with all plugin dist removed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 20:40:02 -07:00
..
2026-07-01 19:38:51 -07:00

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: none; the former Roadmaps dashboard view was removed from the app surface.

Package layout

  • manifest.json — plugin metadata
  • src/index.ts — plugin definition (onSchemaInit, routes)
  • src/roadmap-schema.ts — canonical roadmap DDL used by hooks.onSchemaInit
  • src/server/index.ts — backend server exports
  • src/dashboard-view.tsx — legacy source file retained for compatibility while no package export or dashboard metadata points at it
  • src/dashboard/RoadmapsView.tsx — plugin-owned roadmap planner page
  • src/dashboard/useRoadmaps.ts — plugin-owned roadmap CRUD/reorder/suggestions/handoff hook
  • src/dashboard/RoadmapsView.css — plugin-owned roadmap styles
  • src/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

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.ts
  • src/store/__tests__/roadmap-ordering.test.ts
  • src/store/__tests__/roadmap-handoff.test.ts
  • src/__tests__/index.test.ts (plugin contract: hooks.onSchemaInit, no dashboard view metadata registration)
  • src/__tests__/roadmap-routes.test.ts
  • src/__tests__/roadmap-suggestions.test.ts (AI suggestion flow uses injected PluginContext.createAiSession() and session lifecycle handling)
  • src/__tests__/api-client.test.ts
  • src/dashboard/__tests__/useRoadmaps.test.ts
  • src/dashboard/__tests__/RoadmapsView.test.tsx

Prefer canonical package exports in tests:

  • plugin/server surface: @fusion-plugin-examples/roadmap or @fusion-plugin-examples/roadmap/server

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.ts and register it via hooks.onSchemaInit in src/index.ts.
  • Implement roadmap AI suggestion behavior through the injected PluginContext.createAiSession() seam.

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.
  • Keep the roadmap dashboard view hidden if stale plugin dashboard-view metadata appears in persisted data.

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.