[loader] Add Web/PWA plugin asset server #5

Open
opened 2026-06-02 08:21:12 +00:00 by steve · 0 comments
Owner

Source: Lapis plugin module loading plan, 2026-06-02.

Goal: make installed plugin files URL-addressable in web/PWA so dynamic import() can load verified ESM assets.

Scope:

  • Add PluginAssetServer interface shared by renderer hosts.
  • Add a service-worker backed web implementation for /__lapis/plugins/[vault-id]/[plugin-id]/[version-or-hash]/[path].
  • Mirror verified plugin assets into Cache Storage as needed.
  • Serve correct MIME types for JS, CSS, JSON, and WASM.
  • Add path traversal, installed-plugin, provenance, and hash verification checks.
  • Define a dev-only single-file Blob fallback policy if needed.

Acceptance:

  • Web can import /__lapis/plugins/.../main.mjs.
  • Relative ESM imports work once asset serving supports them.
  • Updated plugin versions use new module URLs.
  • Unsafe paths and missing/modified files fail safely.
Source: Lapis plugin module loading plan, 2026-06-02. Goal: make installed plugin files URL-addressable in web/PWA so dynamic import() can load verified ESM assets. Scope: - Add PluginAssetServer interface shared by renderer hosts. - Add a service-worker backed web implementation for `/__lapis/plugins/[vault-id]/[plugin-id]/[version-or-hash]/[path]`. - Mirror verified plugin assets into Cache Storage as needed. - Serve correct MIME types for JS, CSS, JSON, and WASM. - Add path traversal, installed-plugin, provenance, and hash verification checks. - Define a dev-only single-file Blob fallback policy if needed. Acceptance: - Web can import `/__lapis/plugins/.../main.mjs`. - Relative ESM imports work once asset serving supports them. - Updated plugin versions use new module URLs. - Unsafe paths and missing/modified files fail safely.
Sign in to join this conversation.
No labels
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lapis-notes/plugin-registry#5
No description provided.