Plugin Model
The architecture and lifecycle model for Storyden plugins.
Plugins in Storyden are installed resources with a manifest contract, a runtime mode, and an authenticated RPC session.
Manifest is source of truth
A plugin manifest defines:
- Identity (
id,name,author,version) - Event subscriptions (
events_consumed) - Optional API identity requirements (
access) - Optional configuration contract (
configuration_schema) - If the plugin is supervised:
- Runtime entrypoint (
command, and optionalargs)
- Runtime entrypoint (
Storyden uses this as the primary contract for install and runtime behaviour for both supervised and external plugins. See Manifest -> top-level fields for the generated schema reference.
Two plugin modes
Supervised
Supervised plugins are packaged and run by Storyden itself.
- Installed from an archive (
.sdx/.zippayload) - Process lifecycle managed by Storyden itself, supervised plugins cannot reconnect on their own
- Runtime provider is configurable:
- Storyden can enable and disable
- Logs are collected and viewable in the Plugins section of Settings
External
External plugins run outside Storyden and connect in over authenticated WebSocket RPC.
- Installed/updated via pasting a manifest YAML/JSON
- No process management by Storyden
- No host-managed log stream
- Connection authenticated with an external RPC token
- Token lifecycle and security model are documented in Security -> RPC authentication model
External mode is the easiest way to iterate during plugin development because the plugin process and debugger are fully under your control.

Session lifecycle
At runtime, plugins attach as sessions.
High-level flow:
- Plugin installed
- (If supervised) Plugin is activated and started on the configured runtime provider
- Plugin connects and authenticates over RPC
- Host marks session as connected/active
- RPC requests and events flow in both directions
- Disconnect, unload, token cycle, or state change tears session down
For protocol-level details, see API Overview -> How the two layers fit and RPC Reference.
Event delivery model
Event subscriptions are explicit.
A plugin receives only what it declares in events_consumed, and event delivery is done via typed host-to-plugin RPC methods.
See Manifest -> events_consumed and RPC -> Host to Plugin -> event.
Configuration model
Plugin configuration has two layers:
configuration_schemain the manifest (shape contract for UI + validation)- Stored config values (runtime data)
When config changes, Storyden validates and sends configure RPC to the plugin.
Plugins can also call get_config RPC when needed.
See Manifest -> configuration_schema, RPC -> configure, and RPC -> get_config.