* fix(sync): add process.env replacement, inlineDynamicImports, and CSS copy to syncToPublic
- Inline replace-process-env Rollup plugin transforms process.env.NODE_ENV to "production"
to prevent ReferenceError in browser bundles that lack a Node.js environment
- Switch codeSplitting to inlineDynamicImports: true so the build produces a single
self-contained ES module with no bare chunk specifiers that the browser cannot resolve
- Add rollup-plugin-external-globals to remap shared host deps (react, cesium, zustand, SDK)
to globalThis.__WWV_HOST__.* at bundle time
- syncToPublic now copies any .css files emitted alongside the .mjs bundle (e.g. from
gridstack or other CSS-importing libs) into public/plugins-local/<id>/
* docs(plugin): add bundle footguns -- CSP/CSS, inlineDynamicImports, process.env, CORS
* fix(ws): exponential backoff + jitter on WsClient reconnect
Replaces the fixed 5-second reconnect delay with an exponential backoff
(5s→10s→20s→40s→60s cap, +4s random jitter) so simultaneous browser
sessions don't thunder-herd the engine on restart.
- Backoff resets only after a stable 5-second connection, not on every
successful open, so rapid reconnect cycles don't mask the retry.
- Stale-timer bookkeeping added to the cleanup/unsubscribe path.
Also bundles two companion fixes discovered during the same session:
fix(scripts): BOM-safe JSON parsing in sync/watch-local-plugins (Fix)
PowerShell 5.1 emits a UTF-8 BOM that Node's JSON.parse rejects;
readJsonFile() strips U+FEFF before parsing, matching pnpm behavior.
docs(agents): add UTF-8 BOM troubleshooting entry (Fix)
Documents diagnosis, fix, and prevention for the BOM crash.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
* test(ws): pin Math.random to 0 so reconnect backoff test is deterministic
With jitter (Math.random()*4000), advancing timers by exactly 5000ms no
longer guaranteed to trigger the reconnect. Mocking Math.random to 0 in
beforeEach makes the delay deterministic (base only, no jitter) across
the full test suite.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
---------
Co-authored-by: Claude Opus 4.7 <[email protected]>
* refactor(marketplace): drive auto-seeding from signed verified registry
Retires the hard-coded DEFAULT_PLUGIN_IDS list and makes the signed
verified registry the single source of truth for what lands in a fresh
install. Publishing a plugin to the verified registry now auto-seeds
it; no code change required to add new defaults.
Also fixes the diagnosed plugins-404: fortiguard and nz-traffic-cameras
were in the static list but not published to npm, causing every fresh
boot to hit manifest 404s. Those entries are gone with the list.
- Delete src/lib/marketplace/defaultPlugins.ts (legacy static list).
- Seeder iterates getVerifiedPluginIds() from registryClient.
- Skip markSeeded when the verified set is empty so a registry outage
doesn't lock fresh installs into zero plugins; the next request
retries (5-min cache in registryClient bounds the request rate).
- Stamp every seeded plugin as trust=verified by definition.
- Tests rewritten against a fake verified set; new test asserts
empty-registry deferral.
- Sync marketplace-architecture rule + migrate-legacy-plugin skill
with the new model.
- Patch bump: 2.15.15 -> 2.15.16.
* fix(engine): resolve plugin 404s and local engine routing (#fix/diagnose-plugins-404)
- fix: engineManifest + resolveEngineUrl: port 5001→5000 to match docker-compose
binding; removed NEXT_PUBLIC_WWV_PLUGIN_DATA_ENGINE_URL from local engine
detection — it was poisoning local routing with the production engine URL (Patch)
- fix: WsClient: added normalizePluginId() converting underscore IDs to kebab-case
so engine WebSocket messages route to the correct frontend plugin (Patch)
- fix: docker-compose: added ./local-seeders:/app/seeders volume mount to
wwv-data-engine so locally-developed seeders are visible to the engine (Patch)
- feat: sync-local-plugins: added wwvHostRedirectPlugin — Vite plugin that
intercepts @/ host-app imports in local plugin builds and redirects them to
runtime host globals, preventing full app tree from being bundled into plugins (Minor)
- docs: plugin-architecture.md: added Plugin Data Delivery Types section (REST-only,
WS-only, hybrid), peerDependencies rule, .tsx extension rule, mapWebsocketPayload
signature contract (Patch)
- docs: data-engine-architecture.md: added §7 WebSocket Payload Format Contract
documenting WsClient's three payload handling cases and the silent-drop footgun
for plugins that send object payloads without mapWebsocketPayload (Patch)
- docs: worldwideview-plugin-creation SKILL.md: fixed ISS example which was missing
mapWebsocketPayload and would have silently dropped all WS data; clarified
mapWebsocketPayload requirement for non-array payloads; fixed architecture
decision tree (Patch)
- docs: cesium-rendering.md: added Sizing Conventions table with defaults/ranges
for point/billboard/model, cross-plugin parity rules, and silent-ignore footgun
warning for size on billboard entities (Patch)
- docs: added ADR-0002 documenting seeder exported name as canonical plugin ID (Patch)
Version bumps: fix × 3 (Patch), feat × 1 (Minor) → 2.15.16 → 2.16.0
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
* test(engine): update resolveEngineUrl test assertion from port 5001 to 5000
Follows the port correction in engineManifest.ts and resolveEngineUrl.ts.
The test was asserting the old default (5001) instead of the corrected
local engine port (5000), causing the Unit Tests CI check to fail.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
---------
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
This commit includes the work done by the Flash subagent to add comprehensive TSDoc comments to src/components/panels, src/core/state, and src/core/plugins, improving IDE intellisense and codebase maintainability.
- Migrated wwv-plugin-gps-jamming to local-plugins and fixed WebSocket payload handling (Patch)
- Migrated wwv-plugin-fortiguard to local-plugins and refactored API proxy fetch logic (Patch)
- Migrated wwv-plugin-nz-traffic-cameras to local-plugins (Patch)
- Cleaned up tutorial plugin wwv-plugin-iss from tree (Patch)
- Added scripts/migrate-plugin.mjs for automation (Patch)