getDisplayState
Read the current DisplayNode tree and selectable node IDs from a simulated glasses session. Use to verify what's on the display and discover actionable elements before driving them with injectInput.
Instructions
Read what's currently rendered on the simulated glasses DISPLAY (track 5 — the native glasses.display.* capability). Returns the DisplayNode tree the app most recently rendered via glasses.display.show { column { text(); button(...) } } (or shown: false after glasses.display.clear() / before any show), the flat list of selectable node ids (button ids + clickable container ids), the node count, and the root kind. This is how the agent verifies what's on the glasses screen without pixels, and discovers which ids it can drive with injectInput. Source is the live in-memory hub snapshot (the latest show frame), so it's exact + immediate — no event-log redaction. Pairs with injectInput to close the agent-driven E2E loop for display flows: createSimulatorSession → (app calls display.show) → getDisplayState (read the tree + ids) → injectInput({ action: 'select', targetId }) → the dev's onClick runs → getDisplayState again to see the re-render. USE to confirm a display rendered, read its structure, or find selectable ids before injectInput. DON'T USE for the display event history (use getEventLog(filter: 'display')) or non-display session state (use getSimulatorStatus).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes |