Skip to main content
These four hooks provide access to shell services from within plugin UI components. They are all thin wrappers around 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

See PluginNavigationHelper for the full shape.

Methods

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

See PluginToastAPI for the full shape.

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

See PluginConfigStore for the full shape. Note: The UI-side config store provides synchronous reads (values are preloaded into context). This differs from the background 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

See PluginLogger for the full shape.

Parameters

Both category and message are required. The category should be the component or service name — it appears in the log entry alongside the plugin ID prefix.

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.