The Plugin API
The plugin API is small on purpose. A plugin is a prebuilt module plus a signed manifest that declares what it extends. This page sketches the surface — the full contract lives in the SDK.
A hook
Plugins subscribe to typed hooks. The v1 walking-skeleton ships one, so you can see the shape:
export default definePlugin({
id: "acme/word-count",
hooks: {
"content.entry.beforeSave": (entry) => {
entry.ext["acme/word-count"] = countWords(entry.bodyJson);
return entry;
},
},
});Extension fields, not schema changes
A plugin never owns your schema. It writes into a namespaced ext bag keyed by plugin id, so two plugins can never collide and uninstalling one never corrupts your tables.
definePlugin(...)— declare id, hooks, and requested capabilities.content.entry.beforeSave— the first typed hook; more land as the surface grows.ext.{pluginId}— where a plugin's data lives, namespaced and safe.
This is a preview of a thin slice; the API is not yet stable.