ctx.flight (PluginFlightAccessor) lets you read live flight state, subscribe to flight-lifecycle events, write to the flight log, and gate flight starts.
ctx.flight.log — PluginFlightLogWriter
Add, remove, and update flight-log events. Events added here are authoritative flight-log telemetry — they appear in the Flight Log and are submitted to the VA like any other event.
ctx.flight.registerStartGuard(guard) — gate flight starts
A guard runs inside startFlight before the flight is created or persisted, covering both manual and auto-start. Returning { allow: false, reason } vetoes the start: it appears in the pre-flight check dialog as a check titled with your plugin’s name and described by the reason, shown alongside the built-in checks (and any other plugins’ guards). The pilot can still Start Anyway, which bypasses every check, guards included. Guards are fail-open: a throw or a >5s hang allows the start with a loud warning.
useFlightPhase, useSimData, useTrackingSession) are usually simpler.