feat(FN-1518): merge fusion/fn-1518
This commit is contained in:
@@ -32,7 +32,11 @@
|
||||
- Retry/complete/error transitions maintain `projectId` through all lifecycle stages
|
||||
- **Background/Resume semantics**: "Send to Background" is non-destructive (closes UI/stream but preserves server session); "Close/Cancel" is explicit abandonment (session deleted). Backgrounding during startup (while "Preparing..." is shown) follows the same pattern—close local stream/UI cleanly without deleting the server session.
|
||||
- **Peer Gossip Protocol (FN-1224)**: Nodes exchange peer information via `POST /api/mesh/sync` endpoint. `PeerExchangeService` runs periodic sync cycles (default 60s interval) with all online remote nodes. `CentralCore.mergePeers()` handles peer data merging — new peers are registered via `registerGossipPeer()`, stale peers are updated with fresher data, and the local node is never overwritten. The service uses single-flight pattern to prevent overlapping syncs and refreshes local metrics before each sync.
|
||||
- **Node Plugin Sync (FN-1246)**: Nodes track version information for plugin synchronization. Central schema v4 adds `versionInfo` and `pluginVersions` columns to the `nodes` table. `getAppVersion()` utility reads from nearest package.json. CentralCore methods: `updateNodeVersionInfo()`, `getNodeVersionInfo()`, `syncPlugins()`, `checkVersionCompatibility()`. Events: `node:version:updated`, `node:plugins:synced`. Key integration points for FN-1247 (API routes, CLI commands).
|
||||
- **Node Plugin Sync (FN-1246/FN-1518)**: Nodes track version information for plugin synchronization. Central schema v4 adds `versionInfo` and `pluginVersions` columns to the `nodes` table. `getAppVersion()` utility reads from nearest package.json. CentralCore methods: `updateNodeVersionInfo()`, `getNodeVersionInfo()`, `syncPlugins()`, `checkVersionCompatibility()`. Events: `node:version:updated`, `node:plugins:synced`.
|
||||
- **Node Plugin Sync Dashboard Routes (FN-1518)**: Dashboard REST API endpoints for node version info and plugin sync:
|
||||
- `GET /api/nodes/:id/version` — Returns `NodeVersionInfo` when present, `null` when not yet stored. Returns 404 if node doesn't exist.
|
||||
- `POST /api/nodes/:id/sync-plugins` — Compares plugins between local and remote nodes. Returns 400 if target is local (sync is remote-only), 400 if no local node registered, 404 if target missing. Calls `syncPlugins(localNodeId, remoteNodeId)` with argument order: `(localNodeId, remoteNodeId)`.
|
||||
- `GET /api/nodes/:id/compatibility` — Checks version compatibility between local and target nodes. Returns 400 if local node missing, 400 if either version info missing, 404 if target missing. Calls `checkVersionCompatibility(localVersion, remoteVersion)` with version strings (not node IDs).
|
||||
- **Plugin Management API Routes (FN-1411)**: Plugin CRUD endpoints implemented in `createApiRoutes` with `getScopedStore(req)` pattern for multi-project support:
|
||||
- **Mode discriminator pattern** for POST /plugins: Deterministic behavior via required `mode` field with `"register"` (explicit manifest) or `"install"` (load from path) values. Missing mode, unknown mode, or ambiguous shapes return 400.
|
||||
- **Error mapping matrix**: Input/validation → 400, not found (ENOENT) → 404, lifecycle conflicts (EEXISTS) → 409, unexpected → 500.
|
||||
|
||||
Reference in New Issue
Block a user