On September 28, 2026, EmDash 1.0, the Astro-native CMS built by Cloudflare, was officially released. Version 1.1 followed on October 2, and 1.2 on October 7, with updates arriving in quick succession within just two weeks.
We wrote about upgrading our internal blog, "Yuru Log," from 0.22 to 1.2 in this article. This time, we look at the plugin system, which changed the most in 1.0.
For an overview of what EmDash is, please see the first article.
In short, it is WordPress rebuilt with Astro and Cloudflare.
How Plugins Changed in 1.0
In the 0.x era, plugins were, put simply, npm packages declared in Astro's configuration file. Because they ran in the same process as the site, they had the same privileges as the site's code, and could access the database and environment variables just like WordPress plugins could.
In 1.0, sandboxing and a distributed registry were introduced.
This is the most significant improvement.
- By default, plugins run in an isolated environment and cannot access site content, media, users, secrets, or the network.
- Plugins declare the capabilities they need, and site administrators approve them at install time.
- Approved capabilities are not merely declared; the runtime actually enforces them.
- Plugins can be installed from the admin panel with a single click. They are distributed through a decentralized registry on the AT Protocol.
The Cloudflare blog explains this by contrasting it with WordPress's model, in which all plugins share the same process.
I think this will resonate most with anyone who remembers the incidents caused by WordPress plugins.
There are two ways to run plugins
First, it's important to understand that the same plugin code can run in two execution modes: Trusted and Sandboxed.
Trusted | Sandboxed | |
|---|---|---|
Where to register | In |
|
Execution environment | Same process as the site | Isolated V8 isolate |
Capability | Declaration only (not enforced) | Enforced by runtime |
Network | Unrestricted | Blocked. Only hosts listed in |
Data access | Full DB access | Own storage / KV, plus approved scopes only |
Node.js API | Available | Not available (Web API only) |
Resource limits | None | CPU 50ms, 10 subrequests, 30 seconds, approx. 128MB |
Best suited for | In-house code and npm packages that have been reviewed | Third-party code, distributed via registry |
"Isolation" means running each plugin in its own small dedicated execution environment, separate from the main site.
On Cloudflare Workers, Dynamic Workers launches a Worker for each plugin at request time.
Since version 1.0, you can also run on Node.js: a workerd process, the same runtime used by Workers, is started as a separate process to host plugins. This means sandboxing is no longer limited to Cloudflare.
The key point is that plugin code is identical in both modes, which makes it straightforward to develop in Trusted mode locally and deploy into a sandbox in production.
Plugin structure: separating build-time and runtime files
EmDash plugins are divided into two parts that run at different times.
- Descriptor: metadata such as
id,version, required capabilities, and storage definitions. It is imported fromastro.config.mjs, so it runs during the build inside Vite. It must not have side effects. - Definition: The contents of hooks and routes. They run on the server at request time.
my-plugin/
├── src/
│ ├── index.ts # descriptor。astro.config.mjs から import される
│ └── sandbox-entry.ts # definePlugin({ hooks, routes })。実行時にロードされる
└── package.json # "." と "./sandbox" を exports で分ける
// src/index.ts
import type { PluginDescriptor } from "emdash";
export function myPlugin(): PluginDescriptor {
return {
id: "my-plugin",
version: "1.0.0",
format: "standard",
entrypoint: "@my-org/my-plugin/sandbox",
capabilities: ["content:read", "network:request"],
allowedHosts: ["api.example.com"],
options: {},
};
}
// src/sandbox-entry.ts
import { definePlugin, type PluginContext } from "emdash";
export default definePlugin({
hooks: {
"content:afterSave": async (event, ctx: PluginContext) => {
ctx.log.info(`saved ${event.collection}/${event.content.id}`);
},
},
});
In the descriptor, you specify the module path of the definition in the entrypoint field, and EmDash loads it at runtime. It may be tempting to combine them in the same file, but since runtime code would get pulled into the Vite build, keeping them separate is the right approach.
Standard and Native
Another axis is that plugins come in two formats: Standard and Native.
- Standard: Plugins with the structure described above. Admin UI is written in Block Kit (JSON), covered below. They work in both Trusted and Sandboxed modes and can be published to the registry.
- Native: Plugins can bundle a React-based admin UI, custom blocks for the Portable Text (rich text) editor, and Astro components for site-side rendering. In exchange, they only run in Trusted mode and cannot be published to the registry.
The general approach is to write in Standard by default, and use Native only when you want to add custom blocks to the editor or inject components into the site's HTML.
Yuruolog implements its Amazon product card and video embed as Native plugins. Both add dedicated blocks to the editor and render through Astro components. This is fundamentally impossible in the sandbox, because plugins installed at runtime cannot bring along the Astro components they need at build time.
Capability: The permission vocabulary
The core of the sandbox is the Capability. A plugin declares what it wants to access as a string, and the administrator reviews and approves it in a dialog during installation.
In 1.x, the vocabulary has been organized into the form :. Here are some commonly used examples.
Capability | Capabilities |
|---|---|
| Read articles / Create, update, delete |
| Publish, unpublish, schedule |
| Read media / Upload and delete |
| Outbound HTTP requests, limited to hosts listed in |
| Read unsaved edits in progress / Suggest fixes |
| Review content and block publishing |
There are 27 permission types in total, including taxonomies, comments, redirects, users, and email sending.
storage and KV are always available without declaration. They are scoped per plugin, so data from other plugins is not visible.
The 0.x names (such as read:content and network:fetch) are deprecated but still work as aliases. The runtime normalizes them to the current names, so existing plugins keep working, and a warning is shown at bundle time.
Hooks: What Plugins Can React To
The 1.2.0 runtime defines 30 hooks. They cover saving, publishing, scheduling, and deleting content; uploading media; sending email; posting and approving comments; installing and activating plugins themselves; and periodic execution via cron. Compared to 0.x, the number has grown considerably. The biggest change is that the pre- and post-publish points are now separate hooks: content:beforePublish and afterPublish.
You can cancel a save by calling throw inside content:beforeSave, so validation plugins belong here. If you want to block publishing itself, declare hooks.content-policy:register and then use a pre-publish hook.
A change in 1.2 that is easy to overlook: on the first launch after an upgrade, plugin:install and plugin:activate are re-run for existing plugins. If a plugin seeds initial data in its install hook, it needs to be written so that running it twice does not break anything.
Block Kit: Admin UI Without Running JavaScript
In the sandbox, a plugin's JavaScript cannot run in the browser. Instead, admin screens are described in JSON using Block Kit. A plugin returns an array of blocks such as headers, tables, forms, and toggles, and EmDash renders them.
Here is the flow. When a user opens a plugin page, EmDash sends the plugin a "page opened" request, and the plugin returns an array of blocks. When the user submits a form, a request carrying the input values arrives; the plugin saves them and returns a new array of blocks. Because the UI is built entirely from request and response exchanges, the design fits well with the sandbox's constraints.
In addition to admin pages and dashboard widgets, version 1.x lets you build editor side panels (editorPanels) with Block Kit. They are meant for showing per-post state and actions in the editing screen. Examples include translation status, SEO and writing checks, broken link detection, and excerpt generation from the body. Features that target the article you are currently writing belong here.
Decentralized Registry: A Design Without a Central Marketplace
The plugin distribution mechanism also changed in 1.0. From the user's side, all you see is being able to search for plugins in the admin screen and install them with one click. Behind the scenes, however, it is built on the AT Protocol, the foundation of Bluesky, and has a somewhat unusual structure.
- Plugin information lives in the author's account. Authors log in with a Bluesky-based account, sign the package and release information, and store it in their own account data area. It is not deposited on the registry operator's server.
- The Cloudflare registry is just "one catalog."
plugins.emdashcms.comonly collects the information published by each author so it can be searched. Anyone can gather the same information and build a different catalog. - Contents are verified at install time. EmDash checks whether a downloaded plugin matches what the author signed and published. It verifies that the file hash, package name and version, and requested capabilities match the signed information. If the plugin was built with GitHub Actions, it also verifies the build record. Anything the catalog side replaced or tampered with is rejected at this step.
- Moderation can only hide. The Cloudflare catalog uses an AI model (Clef) to review descriptions, links, and images, and if there is a problem, it does not list the plugin in the catalog. However, it cannot alter a plugin's contents or take ownership away from its author.
In short, the model is that "even if the registry operator disappears, distribution continues as long as the information remains in the author's account" and "the operator can hide plugins from the catalog but cannot tamper with them."
It is distinctive in being designed on the premise that there is no central marketplace like npm or WordPress.org.
At present, only free plugins are supported. According to reports, paid plugins will follow the same distributed model, with the approach depending on progress on the AT Protocol side.
The translation mechanism could become a plugin.
Yurulog runs a system that uses an LLM to create English draft versions of Japanese articles (the story of building a multilingual blog with EmDash). Currently, a Node script reads the EmDash API token and the translation API key from .env, fetches a Japanese article, translates it, and creates an English draft with translationOf attached.
Applied to the 1.x plugin specification, this would almost directly become a Standard plugin.
- Trigger: a
content:afterPublishhook. It runs when a Japanese article is published. - Read and write articles:
content:readandcontent:write. Translation results are created as drafts - Calling the translation API:
network:request, with one API host listed inallowedHosts - API key: the
secretfield insettingsSchema. Entered from the admin screen and stored encrypted..envfiles and API token issuance are no longer needed - Translation status: storage tracks which revision of the source article was translated, and
editorPanelsshows "English version available" or "Source updated, re-translation needed" on the article editing screen
Scripts that used to be run by hand now run once an administrator approves the capability. The runtime also guarantees that data cannot leave for any host other than the translation API. I think the best part of this mechanism is that the question of "where to put code that handles API keys" structurally disappears.
One design point to watch: each time a sandboxed plugin asks the host for something (reading settings, fetching an article, writing to storage), it counts as one subrequest, and the default limit is 10. Translating a single article should fit, but batch jobs like "translate all untranslated articles" will hit the limit quickly if you call ctx.content.get() inside a loop. A design that processes items incrementally via a cron hook seems necessary.
Also, site-side UI such as a language switcher cannot be provided from the sandbox, so it has to be written in the theme.
Summary
- Plugins in EmDash 1.0 are sandboxed by default. They declare capabilities, the administrator approves them, and the runtime enforces them.
- The same code runs in both Trusted and Sandboxed modes. The basic approach is to develop in Trusted mode and deploy in Sandboxed mode.
- If you need custom editor blocks or Astro components, use Native (Trusted only).
- The descriptor (build time) and the definition (runtime) must always be placed in separate files.
- Capability names changed to the
content:readformat in 1.x. The old names still work as aliases, but they are deprecated. - The registry is decentralized and runs on AT Protocol. Catalogs can be hidden, but they cannot be tampered with.
- In the sandbox, "one host call = one subrequest," with a limit of 10. Design with this count in mind.
With WordPress, every time you install a plugin, you accept that "this plugin has full control over the site."
If even one plugin has a vulnerability, the entire site is at risk.
With EmDash 1.0, sandboxed plugins show the permissions they request at install time, and the runtime only allows the scope you approve.
For anyone looking for a migration path from WordPress, plugin security is likely to be one of the reasons to choose EmDash.
There are still few plugins, and we are far from the WordPress situation where "if you look, you'll find something." Still, I hope the ecosystem grows from here.
Since we have already built up operating experience on our own site, we plan to add it to our services.
Starting out in DTP and moving into the web, he now handles markup, frontend, direction, and accessibility alike. A "master of all trades" who has been versatile since Liberogic's early days and is now a walking encyclopedia of the company. Lately he has been hooked on exploring efficiency through prompts, asking, "Can't we rely more on AI for accessibility work?" Both his skills and his thinking are still evolving.
Ayumu Futamata
IAAP Certified Web Accessibility Specialist (WAS) / Markup Engineer / Frontend Engineer / Web Director