From 43aba7779654d3b435fc0d7e7f8ef3ceb45db5f9 Mon Sep 17 00:00:00 2001 From: ohgeeceee <259193421+ohgeeceee@users.noreply.github.com> Date: Fri, 27 Nov 2026 02:53:00 -0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20marketplace=20plugins=20=E2=80=94?= =?UTF-8?q?=20browse,=20verify,=20install=20and=20manage=20in=20the=20Plug?= =?UTF-8?q?ins=20tab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a Marketplace section to the existing Plugins tab backed by plugins.beemuu.com/registry.json: - marketplace_registry.js: validates registry entries (marketplace schema), semver compare, update detection - marketplace_zip.js: downloads are sha256-verified against the registry before extraction; bounded zip reader (stored + deflate); plugin.json must match the registry entry (id + version) or install is refused - marketplace_store.js: bounded localStorage persistence, separate from the v1/v2 package store - marketplace_runner.js: marketplace plugins (activate/deactivate lifecycle, context.vehicle/ui/fs per PLUGIN_FORMAT.md) run in a sandboxed iframe (allow-scripts allow-downloads, opaque origin, CSP connect-src 'none'). Vehicle reads are gated per declared capability through the existing plugin_capabilities bridge + plugin_host read-only surface; ui renders inside the frame; filesystem is a download-only writeFile; network and all ECU-write capabilities are refused with reasons shown at install - marketplace_ui.js + marketplace_boot.js: cards with capability previews, consent step before install (sha + source inspection), enable/disable, open/stop, update badges, remove; host fed from the read-only v3 bridge Tests: 17 new tests (registry, zip, store, runner policy). Full frontend suite: 1165/1166 pass — the one failure (frontend/version_surface 'Cargo.lock version') reproduces on clean main and is unrelated. --- src/css/plugins.css | 3 + src/index.html | 11 + src/js/marketplace_boot.js | 32 +++ src/js/marketplace_registry.js | 120 ++++++++++ src/js/marketplace_registry.test.js | 67 ++++++ src/js/marketplace_runner.js | 333 ++++++++++++++++++++++++++++ src/js/marketplace_runner.test.js | 56 +++++ src/js/marketplace_store.js | 77 +++++++ src/js/marketplace_store.test.js | 51 +++++ src/js/marketplace_ui.js | 263 ++++++++++++++++++++++ src/js/marketplace_zip.js | 148 +++++++++++++ src/js/marketplace_zip.test.js | 106 +++++++++ 12 files changed, 1267 insertions(+) create mode 100644 src/js/marketplace_boot.js create mode 100644 src/js/marketplace_registry.js create mode 100644 src/js/marketplace_registry.test.js create mode 100644 src/js/marketplace_runner.js create mode 100644 src/js/marketplace_runner.test.js create mode 100644 src/js/marketplace_store.js create mode 100644 src/js/marketplace_store.test.js create mode 100644 src/js/marketplace_ui.js create mode 100644 src/js/marketplace_zip.js create mode 100644 src/js/marketplace_zip.test.js diff --git a/src/css/plugins.css b/src/css/plugins.css index 5f03692..c3c97b6 100644 --- a/src/css/plugins.css +++ b/src/css/plugins.css @@ -11,3 +11,6 @@ .plugin-trust-center, .plugin-trust-detail { border:1px solid #8886; border-left:4px solid #4da3ff; border-radius:6px; padding:10px 14px; margin:12px 0; } .plugin-trust-center p, .plugin-trust-detail p { margin:5px 0; } .plugin-trust-detail { background:var(--panel); } +.plugin-badge { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 10px; background: #4da3ff; color: #fff; font-size: 11px; font-weight: 600; vertical-align: middle; } +.plugin-update { color: #e65100; font-weight: 600; } +.plugin-marketplace-frame { display: block; width: 100%; min-height: 320px; border: 1px solid #8886; border-radius: 8px; background: transparent; } diff --git a/src/index.html b/src/index.html index 14a1bfc..520a5a8 100644 --- a/src/index.html +++ b/src/index.html @@ -86,6 +86,10 @@
Reviewed community packages hosted on the Beemuu API. Install a package to review it before enabling.
Community plugins from plugins.beemuu.com, verified against the registry by SHA-256 before install. Panels run in an isolated frame with no network access; vehicle writes are never granted.