AI Focus

malleable worker plugin shell

Users increasingly generate custom widgets and extensions for the software they use every day, yet letting untrusted plugin code share the main window exposes every cookie, token, and DOM API to arbitrary JavaScript. Running user plugins inside networkless Web Workers that can only emit typed JSON patches into explicitly declared host UI slots lets apps stay malleable without sacrificing origin security.

Hypothesis

Executing user-edited or model-generated plugins inside networkless Blob URL Web Workers emitting typed JSON slot patches lets users extend web software safely without exposing host DOM, cookies, or storage.

What confirms it: Valid Worker plugins populate declared host UI slots cleanly while undeclared host:* calls, network egress under strict worker CSP, and injected raw HTML strings fail closed.

What falsifies or bounds it: Plugin authoring hits expressiveness limits when every visual interaction has to serialize through declarative JSON slot messages rather than direct DOM APIs.

Host shell exposing three typed JSON UI slots to isolated Built-in and Blob URL Worker plugins while blocking undeclared host:storage calls and raw HTML patches. Open malleable worker plugin shell full screen ↗

What this lab tests

Malleable Worker Shell (GitHub) mounts built-in and live user-edited Blob URL Dedicated Workers (worker-src 'self' blob:) against three versioned JSON UI slots while rejecting undeclared host:* calls and raw HTML patches.

Open questions

  • How rich can declarative slot schemas become (lists, streaming diffs, form controls) before recreating a fragile mini-DOM protocol?
  • Can OPFS + Worker ES modules persist signed user plugins cleanly across sessions?

Iteration log

  • — Deployed 3 typed JSON UI slots with built-in and live Blob URL Worker editor enforcing capability manifests.
  • — Reordered 3-slot Worker shell above setup docs, fixed manifest snippet, added CSP-safe DOM syntax highlighting for code/wire/JSON views, hardened 700px embed responsiveness, and routed static assets through the Worker with no-cache headers.

Primitives tested: Dedicated Workers, Blob URL Workers, Typed UI Slot Registry, CSP worker-src.

This is an active lab under /labs/ and stays off the main RSS feed until graduated into a full essay.

More in peer-to-peer coordination, pip surfaces & malleable plugins

Connected labs

← peer-to-peer coordination, pip surfaces & malleable plugins · All labs