Getting started
Introduction
Learn what comark-arrow is, how ArrowJS sandboxes work in Comark, and why agent-authored widgets run in QuickJS instead of the host page.
comark-arrow is a Comark plugin for ArrowJS sandboxed widgets. It turns a ```arrow fence or ::arrow directive into a live, interactive widget — with no upfront component registration.
Agent-authored source runs inside @arrow-js/sandbox (QuickJS/WASM), not in the host page realm. The host renders an ArrowSandbox component; the sandbox boots only when the frame is complete and the target is interactive.
What you get
- Parse-only mode — add
comark-arrowtoparseMarkdownand emit['ArrowSandbox', attrs]AST nodes without Vue. - Interactive Vue renderer — import from
comark-arrow/vue, registerArrowSandbox, and mount sandboxes in the browser. - Two authoring forms — fenced
```arrowblocks (with optional adjacent```arrow-css) and bound::arrowdirectives. - Streaming support — incomplete frames stay pending while content streams; the VM never boots on partial source.
- Host bridge — allowlisted functions from the app, imported inside the sandbox as
host-bridge:*modules. - Static fallbacks — non-executing targets (HTML, PDF, email) render source, a placeholder, or a caption instead of booting QuickJS.
What it is not
- Not a general JavaScript runner in the host page. All agent-authored logic stays inside the sandbox.
- Not a replacement for
@comark/vue. You still render Comark with your chosen target; this plugin adds Arrow widgets to that pipeline. - Not correctness by isolation alone. Review generated widgets the way you review generated numbers or SQL.