Skip to main content
Every background module’s onStart(ctx) and onStop(ctx) receive a single ctx object: the plugin’s scoped gateway to shell infrastructure, live flight state, and the pilot. Each accessor is documented on its own page below.

Services

AccessorWhat it does
ctx.loggerScoped logging, prefixed with your plugin ID
ctx.configPersistent key-value store, namespaced to your plugin
ctx.ipcRegister IPC handlers and push messages to the renderer
ctx.authRead-only auth state (token, isAuthenticated)
ctx.airlineThe bound airline + a refresh-aware HTTP client
ctx.databasePer-plugin SQLite database
ctx.serverMount Express routes on the shell’s local server

Flight & Pilot

AccessorWhat it does
ctx.flightLive flight state, subscriptions, the flight log, and start guards
ctx.notifyFire-and-forget toasts and sounds
ctx.dialogBlocking acknowledgement / confirmation dialogs
ctx.promptBlocking prompts that return a value the pilot enters