Plugin System Overview
Xenocept’s frontend loads plugins as JavaScript ES modules. A plugin can register a destination, hook into session events, or add UI affordances. The bundled destinations (File, Email, AeorDB, Claude/MCP) are themselves plugins.
The plugin API is largely a frontend concern. The authoritative contract — entry-point names, the API object passed to setup(), the event catalog — lives in the bundled plugins in static/plugins/ and the plugin loader code in the running build.
What the Backend Knows About Plugins
| Endpoint | Purpose |
|---|---|
GET /api/v1/plugins/list | Enumerate installed plugins. |
GET /api/v1/plugins/search | Search npm for installable plugins. |
POST /api/v1/plugins/install | Install a plugin from npm. |
POST /api/v1/plugins/install-from-source | Install a plugin from a local source directory. |
POST /api/v1/plugins/uninstall | Remove an installed plugin. |
GET /api/v1/plugins/{scope}/{plugin_id}/{*file_path} | Read a plugin file (read-only HTTP exposure of the plugin’s static assets). |
PUT /api/v1/plugins/{scope}/{plugin_id}/{*file_path} | Write a plugin file. |
GET / PUT /api/v1/plugins/{scope}/{plugin_id}/config | Read or update plugin-scoped config. |
The backend identifies plugins by a pluginID (camelCase, capital ID) — for example, org.aeor.xenocept.file. The signature verifier reads a top-level pluginId field from the plugin’s package.json when verifying signed builds.
Where Plugins Live
Built-in plugins ship with Xenocept. Installed plugins live in a directory the backend manages (read it via /api/v1/plugins/list to see paths on your specific install). The plugin entry point is loaded by the frontend at app startup or after install.
Plugin Authoring
For the actual write-a-plugin walkthrough, see:
- The bundled built-ins in
static/plugins/of the running build — they are the canonical examples. - The Claude destination plugin’s repo (
xenocept-plugin-aeor-claude/) for a standalone-plugin example. - The frontend plugin loader code (search
static/forplugin_id/pluginID/deliver) for the exact contract.