Skip to main content

Module hid

Module hid 

Source
Expand description

Inbound event record ABI for HID/sensors (T41).

Defines the structured event record that inbound HID/sensor data flows through. Depth maps, EEG raw, hand skeletons must never become List<f64> — they need a typed record with a fat-buffer AssetRef.

§Design

  • InboundEvent is the top-level event record.
  • EventKind classifies the event (pointer, keyboard, touch, biosignal, depth, skeleton, etc.).
  • EventPayload carries the event data — either inline (small) or via an AssetRef (fat buffers like depth maps, EEG raw).
  • The timestamp is u64 nanoseconds (monotonic or Unix, depending on source).

§ABI rules

  • Small payloads (pointer position, key code, touch point) are inline in the record.
  • Fat payloads (depth map, EEG raw, hand skeleton) are an AssetRef — the host holds the actual data, VibeScript sees the handle.
  • Every event has a timestamp_ns and a source ID.
  • Biosignal events are capability-leased and DP-filtered (T44).

Reference: docs/vibescript-full-impl-PLAN.md §8.9 T41.

Structs§

InboundEvent
An inbound event record — the structured ABI for HID/sensor data.
OutboundCue
An outbound cue — haptic, audio, visual, or accessibility output.

Enums§

CueKind
Outbound cue kinds for assistive output (T43/T45).
EventKind
The kind of inbound event.
EventPayload
The payload of an inbound event — either inline data or a fat buffer reference.