Skip to content

Plugin SDK ​

Plugin SDK

Write sova-* plugins against sova_core::extend and the Plugin trait. App users: use the Plugins catalog and Concepts (core API: streaming, upgrades, events, limits, …).

How pages are built: guides in plugin-sdk-guides → sova-docs-gen → docs/api/plugin-sdk*.

Pages ​

PageSummary
OverviewMental model, import surfaces, and install checklist for plugin authors.
Plugin traitid, meta, requires, install, closure plugins, and SDK versioning.
Middlewarenamed, with_leaked, with_state, MwEntry — when to use each.
State & dependenciesapp.state, markers, Needs, hard requires vs soft has_plugin / try_state.
ConfigToml unset-fill, env precedence, parse_duration / parse_bytes, features.
Lifecycle & serviceson_startup / on_shutdown, pool pattern, BackgroundService, CLI mode.
Checks & CLIregister_check vs register_audit, probes, register_cli commands.
Routes & introspectionPlugin routes, path helpers, RouteValue / MetaMap, match captures.
Extractors & Problem+Path/Json/State handlers, EventBus, API problem+json errors.
EventsEventBus listen/dispatch + catalog of first-party plugin events.
HTML & log hooksHTML inject, logger_skip_path, add_log_event_hook for DevTools-style sinks.
ErrorsStartup Err vs panic, ErrorResponse, soft degradation.
RecipesPatterns copied from in-tree plugins (cookies→csrf, pools, tasks, store).
extend APISymbol table for sova_core::extend — what it is and who uses it.
TestingIn-process TestClient, ResponseAssert, TestApp/sqlite, cookies, auth hooks, real examples.