crosspad_snapshot
Capture a full device or simulator state snapshot in one call. Inspect apps, UI focus, kit, LEDs, pads, memory, BLE, and console; compare with an earlier snapshot to see what changed.
Instructions
[ESP HW | PC sim] One-call state snapshot (~300 tokens): apps {running, available}, ui {focus {ref,label}, group [{ref,label}], drawer, theme, app}, kit, leds, pads, mem, ble, console counters. Refs e<i> are ENC_GROUP indices for crosspad_ui focus — any UI action invalidates them and the next snapshot re-mints them. diff_from= adds changed. target=sim maps the simulator's stats onto the same shape (ui null).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | No | Device id or port; omit when exactly one CrossPad is connected. Ignored for sim. | |
| target | No | Defaults to the attached board — the common case, and a snapshot with no arguments should not be a validation error. device = a connected CrossPad via the daemon; sim = the running PC simulator (ui is null there) | device |
| include | No | Sections to fill (default all). Fewer sections = fewer CDC round-trips. | |
| diff_from | No | Earlier snapshot_id; result.changed lists the top-level keys that differ. Unknown id → full snapshot. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ts | No | ||
| ui | No | ||
| ble | No | ||
| kit | No | ||
| mem | No | ||
| apps | No | ||
| leds | No | ||
| pads | No | ||
| error | No | ||
| device | No | ||
| changed | No | ||
| console | No | ||
| details | No | ||
| success | Yes | ||
| usb_mode | No | ||
| snapshot_id | No |