> ## 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.

# Plugin Context

> The ctx object passed to a background module's onStart and onStop — every accessor at a glance.

Every background module's [`onStart(ctx)` and `onStop(ctx)`](/sdk/background/overview#the-pluginbackgroundmodule-contract) 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

| Accessor                                           | What it does                                            |
| -------------------------------------------------- | ------------------------------------------------------- |
| [`ctx.logger`](/sdk/background/context/logger)     | Scoped logging, prefixed with your plugin ID            |
| [`ctx.config`](/sdk/background/context/config)     | Persistent key-value store, namespaced to your plugin   |
| [`ctx.ipc`](/sdk/background/context/ipc)           | Register IPC handlers and push messages to the renderer |
| [`ctx.auth`](/sdk/background/context/auth)         | Read-only auth state (`token`, `isAuthenticated`)       |
| [`ctx.airline`](/sdk/background/context/airline)   | The bound airline + a refresh-aware HTTP client         |
| [`ctx.database`](/sdk/background/context/database) | Per-plugin SQLite database                              |
| [`ctx.server`](/sdk/background/context/server)     | Mount Express routes on the shell's local server        |

## Flight & Pilot

| Accessor                                       | What it does                                                       |
| ---------------------------------------------- | ------------------------------------------------------------------ |
| [`ctx.flight`](/sdk/background/context/flight) | Live flight state, subscriptions, the flight log, and start guards |
| [`ctx.notify`](/sdk/background/context/notify) | Fire-and-forget toasts and sounds                                  |
| [`ctx.dialog`](/sdk/background/context/dialog) | Blocking acknowledgement / confirmation dialogs                    |
| [`ctx.prompt`](/sdk/background/context/prompt) | Blocking prompts that return a value the pilot enters              |
