Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Writing a Plugin

The precise plugin authoring API is a frontend concern; the bundled plugins in static/plugins/ of the running build are the authoritative reference for entry-point shape, lifecycle hooks, and the API object surfaced to plugins.

The Minimum You Need

A plugin is a JavaScript ES module with a package.json. The package.json carries identity (plugin id, version) and references the entry-point module. The entry-point module exports a deliver function (for destination plugins) and may also export lifecycle / event hooks if the frontend plugin host supports them.

The frontend plugin host is the source of truth for:

  • The exact name and shape of the entry-point export(s)
  • What’s passed to the deliver function
  • Which lifecycle hooks (if any) are called and in what order
  • The shape of any API object surfaced to the plugin
  • Configuration schemas / Settings UI integration

To author a plugin today, the practical workflow is:

  1. Copy one of the built-in plugins as a starting point (read what it exports, mimic the pattern).
  2. Use the delivery primitives (/api/v1/deliver/http, /api/v1/deliver/file, /api/v1/deliver/command) to do the actual work.
  3. Install from source via POST /api/v1/plugins/install-from-source for fast iteration.

Distribution

There is no centralized plugin registry yet. You can:

  • Publish to npm and install via POST /api/v1/plugins/install.
  • Distribute a tarball / git URL for install-from-source.

If your plugin is going to be installed in hardened deployments, signing it (with the field the backend’s verifier reads — top-level pluginId in package.json) lets it pass the signature check.