Skip to main content
ctx.config (PluginConfigStore) is a persistent key-value store namespaced to your plugin. All methods are async, and values survive shell restarts.
Note: config.get() is async in the background context. In the UI context (via usePluginContext()), it’s synchronous. When to use it: store small amounts of plugin state that must outlive a restart — sync cursors, cached metadata, user-set preferences. For larger or relational data, reach for ctx.database instead.

Reacting to airline changes

Airline-scoped settings are written into the same store, and the airline can change them while Stratos is running. Subscribe with onChange to hear about it: the listener receives the keys that changed, and get() already returns the new values when it fires.
  • Never mid-flight. While a flight is in progress, or a crashed flight is waiting to be recovered, Stratos holds the airline’s change and applies it (and fires onChange) when the flight ends. A flight runs on one set of settings from start to finish.
  • Cleaned up for you. Listeners are removed when your plugin stops; call the returned function to stop listening sooner.
  • Optional. onChange is undefined on Stratos cores older than 2.49.0, so call it as ctx.config.onChange?.(...) and fall back to reading settings when you need them.
onChange fires for changes the airline makes, not for your own set() or delete() calls.