1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! Pure-math input synthesis for vibesurfer's three input modes.
//!
//! The crate is intentionally narrow: given a start and end point,
//! some text to type, or a scroll delta, return a sequence of
//! discrete `Step`s tagged with relative time. The engine crate
//! consumes that sequence and translates each step into a
//! platform-native event (`NSEvent` on macOS, `GdkEvent` on Linux,
//! `Input.dispatchMouseEvent` over CDP on Windows).
//!
//! The split keeps the math testable without WebKit and the
//! per-platform code testable without doing humanization math. It
//! also concentrates the realism work in one place: improving the
//! Bezier sampler or the keystroke distribution lifts every backend
//! at once.
//!
//! ## Modes
//!
//! | Mode | Sequence shape |
//! |---------|-----------------------------------------------|
//! | Human | Bezier path, Fitts arrival, digraph keys |
//! | Careful | Single-shot dispatch, no path or per-key delay|
//! | Robotic | Empty sequence — caller falls back to JS path |
//!
//! See [`InputMode`] for details.
//!
//! ## Determinism
//!
//! Every entry point takes a `seed: u64`. Same seed + same inputs
//! produce byte-identical output. This lets tests assert exact
//! sequences and lets the daemon persist a per-session seed so a
//! given agent produces consistent typing patterns across runs
//! against the same site.
pub use ;
pub use ;
pub use ;
/// Which input style to synthesize.
///
/// `Human` produces multi-event sequences with realistic timing.
/// `Careful` produces single-shot sequences with no behavioral
/// synthesis but still uses the trusted-event dispatch path on the
/// engine side. `Robotic` produces an empty sequence — the engine
/// reads the empty vector as a signal to fall back to JS synthetic
/// dispatch (the historical vibesurfer behavior).