# ADR 0008: Sandboxed iframe plugins with a message-based API - Status: accepted - Date: 2026-07-04 ## Context The vision requires plugins that range from simple styling (colored section backgrounds) to complex features (table of contents, page index, diagrams, embedding blocks from other pages), installable at runtime (directory upload or GUI) without redeploying. Kickoff decision: only Site Admins install plugins, and plugins run **sandboxed** — an uploaded plugin must not be able to compromise the server or exfiltrate data beyond what the viewing user may see. ## Decision - **Plugins are client-side packages only** (v1). No plugin code executes on the server. A plugin is a ZIP containing: - `manifest.json` — id, name, version, `apiVersion`, declared extension points, declared permissions, i18n strings; - `plugin.js` — a single ES module bundle; - optional assets (CSS, images). - **Two plugin classes, by trust needs:** 1. **Declarative style plugins** — manifest + CSS only, no JavaScript. They define named "section styles" (e.g. colored background boxes) applied as attributes on standard container nodes. No sandbox needed; CSS is served sanitized and scoped. 2. **Code plugins** — run inside a **sandboxed `