usePluginContext() fields, exported as focused hooks for readability.
Import
useShellNavigation
Access the shell’s navigation helpers. All navigation is handled by the shell’s router — plugins do not manage their own history.
Signature
Methods
| Method | Description |
|---|---|
navigateTo(path) | Navigate to a route within the current plugin (e.g. "history", "settings") |
navigateToPlugin(pluginId, path) | Navigate to a route in another plugin |
navigateToShell(path) | Navigate to a shell-level route (e.g. "settings", "debug") |
getCurrentPath() | Return the current route path string |
Usage
useShellToast
Trigger toast notifications using the shell’s toast system. All toasts appear in the shell’s notification area — plugins do not render their own toast containers.
Signature
Usage
useShellConfig
Read plugin-namespaced config values synchronously. The config store is namespaced to the current plugin — two plugins using the same key will not conflict.
Signature
PluginContext.config, which has async get, set, delete, and getAll methods.
Usage
usePluginLogger
Access a scoped logger that routes log output to the shell’s logging infrastructure. Log entries are prefixed with the plugin ID and written to the daily log file alongside all other Stratos logs.
Signature
Parameters
Bothcategory and message are required. The category should be the component or service name — it appears in the log entry alongside the plugin ID prefix.
| Parameter | Description |
|---|---|
category | Component or service name (e.g. "FlightMapPage") |
message | Human-readable log message |
...args | Optional additional values appended to the log entry |
Usage
Never use console.* directly
Plugin components must use usePluginLogger rather than console.log, console.error, etc. The logger writes to the structured log file, applies secret sanitization, and includes the plugin ID prefix for easy filtering.