Action Capture

Every operator action — commands, UI interactions, Reality mutations — is captured by the ActionStreamCollector, segmented into sessions, and persisted for pattern mining.

ActionType

VariantFieldsSource
Commandlabel, fields: Vec<(String, f64)>ControlBus command issuance
RealityActionaction_id: u64Reality action execution
UiInteractionkind: UiInteractionKindegui frame loop

UI Interaction Kinds

PaneOpened
PaneClosed
FilterApplied
EntitySelected
LayerToggled
ConfigLoaded
MapNavigation
AlertAcknowledged

ActionStreamCollector

  • Buffer capacity: 100 events before forced flush
  • UI sequence offset: 1,000,000,000 to avoid collisions with ChangeEvent sequences
  • Methods: record_command(), record_reality_action(), record_ui_interaction()
  • SessionSegmenter assigns session IDs with 5-minute inactivity gap

tai_bridge

Non-blocking capture functions using crossbeam::Sender. Drops silently if channel full.

Rust
// From tai_bridge.rs — called from UI code
capture_command(tx, "operator", "set_setpoint", fields, target, "hvac", seq);
capture_ui(tx, "operator", UiInteractionKind::PaneOpened { pane_type: "Control" });
capture_alert_action(tx, "operator", "rule_id", "entity_id", "acknowledge");
capture_tool_call(tx, "list_patterns", args_json);

Questions?

Reach out for help with integration, deployment, or custom domain codecs.