Skip to main content

Module events

Module events 

Source
Expand description

Synthetic event collector. Produces the JSON event batch the sensor encryptor consumes.

The exact mapping from PX event tags to data fields is still partially opaque (it needs a captured XHR-hook trace to confirm — see ADR-0024 N3 follow-up). What we model here is the shape: a Vec<SensorEvent> where each event carries a t tag string and a BTreeMap of base64-keyed fields. The encoder needs only that structure; per-tenant population is a profile concern (N5).

Re-exports§

pub use batch::default_batch;
pub use identity::SyntheticIdentity;
pub use model::EventField;
pub use model::SensorEvent;

Modules§

batch
Compose a default event batch from a SyntheticIdentity.
identity
Inputs to the event collector that come from the synthetic-user pool (see px-camoufox/src/infrastructure/synthetic_user.rs). Kept as a standalone struct so px-native doesn’t depend on the camoufox crate.
model
Data model for a single sensor event. The runtime emits arrays of these and the encryptor JSON-stringifies the array before XOR.