Documentation Index
Fetch the complete documentation index at: https://docs.skyvexsoftware.com/llms.txt
Use this file to discover all available pages before exploring further.
The Stratos Plugin SDK provides a set of React hooks that give plugin components access to real-time flight data, shell services, and socket communication. All hooks must be called inside a component tree wrapped by the shell’s 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 hook for flight tracking state with derived metadata and recovery handling |
Shell Integration
| Hook | Description |
|---|
useShellAuth | VA auth state (isAuthenticated, token, user: PluginPilotUser) |
useVaApi | Singleton axios instance for the bound airline’s API with auto-refresh on 401 |
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:
import {
usePluginContext,
useSimData,
useFlightPhase,
useFlightEvents,
useFlightManager,
useTrackingSession,
useLandingAnalysis,
useShellAuth,
useVaApi,
useShellConfig,
useShellNavigation,
useShellToast,
usePluginLogger,
useSocket,
useSimulatorData,
useProtocolUrl,
useNotifications,
useSystemMetrics,
} from "@skyvexsoftware/stratos-sdk";
Common Patterns
Selecting a subset of data
Most data hooks accept a select option. The component only re-renders when the selected value changes — not on every simulator tick.
const { data: altitude } = useSimData({
select: (s) => s.data?.altitude ?? 0,
});
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.
function MyPlugin() {
const { isTracking, phase, currentFlight } = useTrackingSession();
const { landingRate } = useLandingAnalysis();
const toast = useShellToast();
// ...
}