Preflight
preflightCheck that Aseprite is connected and report what the session can do before editing pixel art, and stop if Aseprite is not ready. Choose live or headless mode only when the task requires it.
Instructions
Check that Aseprite is connected and report what this session can do. Call this FIRST in any pixel-art task and stop if ready is false — every editing tool writes into the user's open Aseprite window ('live') or into a batch Aseprite this server owns ('headless'), and there is no useful fallback when that Aseprite is not there. Pass mode to choose which one the session works with from now on — only because the user asked (e.g. --headless) or the request plainly needs no window (files for CI, a batch of assets). Never switch to get around a live session that is not ready: ask the user instead. Switching loses nothing; each side keeps its documents.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Switch the session to this Aseprite before checking. Omit to keep the current one. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | 'live' = the user's open window. 'headless' = a batch Aseprite with no window; nothing is on disk until you save or export. | |
| ready | Yes | True only when Aseprite is attached and accepting commands. | |
| features | Yes | Optional capabilities this extension build supports. | |
| switched | Yes | True when this call changed the session's mode. | |
| directive | Yes | What to do next, in one sentence. | |
| activeSprite | No | ||
| asepriteVersion | No | ||
| bridgeConnected | Yes | ||
| pluginConnected | Yes | ||
| extensionVersion | No |