PluginShellProvider.
Categories
Core
| Hook | Description |
|---|---|
usePluginContext | Access the full plugin UI context (auth, config, socket, navigation, toast) |
Flight Data
| Hook | Description |
|---|---|
useSimData | TanStack Query + Socket.io hook for RAF-throttled real-time simulator data |
useFlightPhase | Track the current flight phase with optional field selector |
useFlightEvents | Access the live flight event log with comment mutations |
useLandingAnalysis | Landing rate, bounce count, touchdown data, and settled analysis |
Flight Management
| Hook | Description |
|---|---|
useFlightManager | Low-level flight lifecycle control (start, pause, resume, end) |
useTrackingSession | High-level convenience hook combining flight state + derived metadata |
Shell Integration
| Hook | Description |
|---|---|
useShellAuth | Read authentication state (isAuthenticated, token, user) |
useShellConfig | Read plugin-namespaced config values synchronously |
useShellNavigation | Navigate within and between plugins and shell routes |
useShellToast | Trigger success, error, warning, and info toast notifications |
usePluginLogger | Scoped logger that routes to the shell’s logging infrastructure |
Socket & Real-Time
| Hook | Description |
|---|---|
useSocket | Core Socket.io connection singleton with connection state |
useSimulatorData | Raw event streaming for simulator data and status |
useProtocolUrl | Deep link events via the stratos:// protocol handler |
useNotifications | Shell notification events |
useSystemMetrics | System metrics streaming (CPU, memory, etc.) |
Import
All hooks are exported from the SDK root:Common Patterns
Selecting a subset of data
Most data hooks accept aselect option. The component only re-renders when the selected value changes — not on every simulator tick.
Combining hooks
Hooks are designed to be composed.useTrackingSession is the most ergonomic entry point for tracking-aware plugins; reach for lower-level hooks only when you need finer control.