injectInput
Drive simulated glasses display: select items to fire onClick, navigate focus, or send back. Enables end-to-end testing of display handlers without hardware.
Instructions
Drive the simulated glasses' DISPLAY input — the agent's way to "click" the display with no human and no hardware (track 5). Three actions: select (+ targetId) fires that node's onClick, running the developer's handler exactly as a Neural-Band index-pinch would on real glasses — THE action that closes the display E2E loop; navigate (+ optional targetId) moves the focus highlight (to a specific id, or the next selectable node when omitted); back emits a back gesture. The frame is delivered to the simulator browser tab (the display surrogate that owns the rendered tree + focus), which routes the selection back to the app — so an agent-injected select and a human clicking the sim's gesture panel are identical downstream (selection flows browser → backend → app, mirroring real hardware). Requires the simulator browser tab connected — the display only exists while the browser renders it; call ensureSimulatorBrowser({ sessionId }) first or this returns browser_not_connected. Discover targetId values from getDisplayState.interactiveIds. Typical loop: createSimulatorSession → ensureSimulatorBrowser → (app shows a display) → getDisplayState → injectInput({ action: 'select', targetId: 'end-run' }) → getEventLog(filter: 'display') shows display_select then the re-render (display_show). Mirrors injectTranscript (voice) / setSimVideo (camera) for the display capability. USE to exercise display button handlers + navigation end-to-end. DON'T USE for voice flows (injectTranscript / injectAssistantUtterance) or to read display state (getDisplayState).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | 'select' fires the target (or focused) node's onClick — pass targetId (from getDisplayState.interactiveIds) for a deterministic click. 'navigate' moves the focus highlight to targetId, or to the next selectable node when targetId is omitted. 'back' emits a back gesture (an event; the dev owns 'views' via successive show() calls). | |
| targetId | No | The node id to target. For 'select', the button/container id whose onClick should fire (strongly recommended — get it from getDisplayState.interactiveIds; omit to select the currently-focused node). For 'navigate', the id to focus (omit to advance to the next focusable). Ignored for 'back'. | |
| sessionId | Yes |