ant0-browser 0.2.2 → 0.2.3-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/LICENSE +0 -6
  2. package/README.md +10 -8
  3. package/dist/chromium-version.d.ts +2 -11
  4. package/dist/chromium-version.d.ts.map +1 -1
  5. package/dist/chromium-version.js +2 -11
  6. package/dist/chromium-version.js.map +1 -1
  7. package/dist/claim-hints.d.ts +2 -2
  8. package/dist/claim-hints.js +2 -2
  9. package/dist/content.js +1 -1
  10. package/dist/content.js.map +1 -1
  11. package/dist/fingerprint.d.ts +30 -21
  12. package/dist/fingerprint.d.ts.map +1 -1
  13. package/dist/fingerprint.js +41 -18
  14. package/dist/fingerprint.js.map +1 -1
  15. package/dist/fonts.d.ts +2 -2
  16. package/dist/fonts.d.ts.map +1 -1
  17. package/dist/fonts.js +9 -5
  18. package/dist/fonts.js.map +1 -1
  19. package/dist/geoip.d.ts.map +1 -1
  20. package/dist/geoip.js +1 -2
  21. package/dist/geoip.js.map +1 -1
  22. package/dist/humanize.d.ts +33 -0
  23. package/dist/humanize.d.ts.map +1 -1
  24. package/dist/humanize.js +136 -106
  25. package/dist/humanize.js.map +1 -1
  26. package/dist/identity-persistence.d.ts +6 -0
  27. package/dist/identity-persistence.d.ts.map +1 -1
  28. package/dist/identity-persistence.js +19 -1
  29. package/dist/identity-persistence.js.map +1 -1
  30. package/dist/identity.d.ts +11 -3
  31. package/dist/identity.d.ts.map +1 -1
  32. package/dist/identity.js +59 -17
  33. package/dist/identity.js.map +1 -1
  34. package/dist/index.d.ts +12 -17
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +32 -24
  37. package/dist/index.js.map +1 -1
  38. package/dist/launch-ticket.d.ts +2 -2
  39. package/dist/launch-ticket.d.ts.map +1 -1
  40. package/dist/launch-ticket.js +4 -4
  41. package/dist/launch-ticket.js.map +1 -1
  42. package/dist/launchopts.d.ts +23 -12
  43. package/dist/launchopts.d.ts.map +1 -1
  44. package/dist/launchopts.js +28 -12
  45. package/dist/launchopts.js.map +1 -1
  46. package/dist/linux-population-table.d.ts +2 -0
  47. package/dist/linux-population-table.d.ts.map +1 -0
  48. package/dist/linux-population-table.js +4 -0
  49. package/dist/linux-population-table.js.map +1 -0
  50. package/dist/linux-population.d.ts +39 -0
  51. package/dist/linux-population.d.ts.map +1 -0
  52. package/dist/linux-population.js +206 -0
  53. package/dist/linux-population.js.map +1 -0
  54. package/dist/motion.d.ts +51 -7
  55. package/dist/motion.d.ts.map +1 -1
  56. package/dist/motion.js +192 -29
  57. package/dist/motion.js.map +1 -1
  58. package/dist/motionscore.js +1 -1
  59. package/dist/motionscore.js.map +1 -1
  60. package/dist/native/linux-x64/ant0_runtime.node +0 -0
  61. package/dist/native/windows-x64/ant0_runtime.node +0 -0
  62. package/dist/persona-migration.d.ts +2 -5
  63. package/dist/persona-migration.d.ts.map +1 -1
  64. package/dist/persona-migration.js +2 -5
  65. package/dist/persona-migration.js.map +1 -1
  66. package/dist/persona-profile-v4.d.ts +1 -1
  67. package/dist/persona-profile-v4.js +1 -1
  68. package/dist/persona-rejected.d.ts +1 -1
  69. package/dist/persona-rejected.js +1 -1
  70. package/dist/persona-rejected.js.map +1 -1
  71. package/dist/population-model.d.ts +13 -1
  72. package/dist/population-model.d.ts.map +1 -1
  73. package/dist/population-model.js +6 -6
  74. package/dist/population-model.js.map +1 -1
  75. package/dist/profile-file.d.ts +1 -2
  76. package/dist/profile-file.d.ts.map +1 -1
  77. package/dist/profile-file.js +3 -4
  78. package/dist/profile-file.js.map +1 -1
  79. package/dist/render.d.ts +1 -1
  80. package/dist/render.d.ts.map +1 -1
  81. package/dist/render.js +4 -5
  82. package/dist/render.js.map +1 -1
  83. package/dist/scale.d.ts +1 -1
  84. package/dist/scale.js +2 -2
  85. package/dist/scale.js.map +1 -1
  86. package/dist/shaderdialect.d.ts +12 -12
  87. package/dist/shaderdialect.d.ts.map +1 -1
  88. package/dist/shaderdialect.js +16 -19
  89. package/dist/shaderdialect.js.map +1 -1
  90. package/dist/speech-coherence.d.ts +17 -5
  91. package/dist/speech-coherence.d.ts.map +1 -1
  92. package/dist/speech-coherence.js +43 -6
  93. package/dist/speech-coherence.js.map +1 -1
  94. package/dist/warnings.d.ts +29 -0
  95. package/dist/warnings.d.ts.map +1 -1
  96. package/dist/warnings.js +94 -5
  97. package/dist/warnings.js.map +1 -1
  98. package/dist/webgl-coherence.d.ts +1 -1
  99. package/dist/webgl-coherence.js +1 -1
  100. package/dist/webgpu-override.d.ts.map +1 -1
  101. package/dist/webgpu-override.js +4 -5
  102. package/dist/webgpu-override.js.map +1 -1
  103. package/dist/windows-coherence.d.ts +1 -1
  104. package/dist/windows-coherence.js +1 -1
  105. package/package.json +1 -2
package/dist/geoip.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"geoip.js","sourceRoot":"","sources":["../src/geoip.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,uFAAuF;AACvF,8FAA8F;AAC9F,kGAAkG;AAClG,gGAAgG;AAChG,kGAAkG;AAClG,sFAAsF;AACtF,EAAE;AACF,+DAA+D;AAC/D,oGAAoG;AACpG,oGAAoG;AACpG,+FAA+F;AAC/F,kFAAkF;AAClF,EAAE;AACF,gGAAgG;AAChG,wEAAwE;AACxE,oGAAoG;AACpG,6CAA6C;AAE7C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAClG,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,OAAwB,MAA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E,gBAAgB,EAAE,EAAE,EAAE,aAAa;IAC1D,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa;IAC1E,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa;IACvD,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,gBAAgB;IAC7E,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa;IAC1E,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa;IAC1E,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa;IAC1E,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa;IACvD,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa;IACvD,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa;IACvD,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,cAAc;CACtC,CAAC;AAEF,MAAM,UAAU,wBAAwB,CAAC,EAAW;IAClD,IAAI,CAAC,EAAE;QAAE,OAAO,UAAU,CAAC;IAC3B,OAAO,YAAY,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,IAAI,UAAU,CAAC;AACtD,CAAC"}
@@ -1,4 +1,9 @@
1
1
  import type { Browser, BrowserContext, Page } from "playwright-core";
2
+ import { type Rng, type Step, type TypeEvent } from "./motion.js";
3
+ /** The LIVE input stream: a mulberry32 seeded from OS crypto randomness, so playback (paths, holds,
4
+ * typing timeline, wheel gaps) differs on every page/launch even for the same profile. Persona TRAITS
5
+ * stay seeded (makePersona); only what is consumed while playing input is unseeded. */
6
+ export declare function liveRng(): Rng;
2
7
  export interface HumanizeOptions {
3
8
  /** Humanize all input (move/click/drag/scroll/type) as native trusted events. */
4
9
  humanize?: boolean;
@@ -7,10 +12,38 @@ export interface HumanizeOptions {
7
12
  /** @internal Fingerprint seed → a stable per-identity motor persona (cadence, tremor, overshoot,
8
13
  * handedness). Threaded from `fingerprint` by launch(); unset ⇒ a random persona per session. */
9
14
  seed?: string | number;
15
+ /** @internal Test hook: the live input stream. Default is an unseeded crypto-seeded stream per page. */
16
+ rng?: Rng;
10
17
  }
11
18
  /** Overlay: a red dot that follows real mousemove events. Idempotent IIFE so it works both as
12
19
  * an addInitScript source string AND when passed to page.evaluate. */
13
20
  export declare const CURSOR_OVERLAY = "(() => {\n if (window.__ant0BrowserCursor) return; window.__ant0BrowserCursor = 1;\n const make = () => {\n if (document.getElementById('__ant0-browser_cursor')) return;\n const d = document.createElement('div'); d.id = '__ant0-browser_cursor';\n d.style.cssText = 'position:fixed;left:0;top:0;width:20px;height:20px;margin:-10px 0 0 -10px;' +\n 'border-radius:50%;border:2px solid #ff3b3b;background:rgba(255,59,59,.22);' +\n 'box-shadow:0 0 10px rgba(255,59,59,.6);pointer-events:none;z-index:2147483647';\n (document.body || document.documentElement).appendChild(d);\n };\n if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', make); else make();\n document.addEventListener('mousemove', (e) => {\n const d = document.getElementById('__ant0-browser_cursor');\n if (d) { d.style.left = e.clientX + 'px'; d.style.top = e.clientY + 'px'; }\n }, true);\n})();";
21
+ /** Injectable clock for the playback helpers (tests drive a fake one; production uses the real one). */
22
+ export interface PlayClock {
23
+ now: () => number;
24
+ sleep: (ms: number) => Promise<void>;
25
+ }
26
+ /** One display frame (ms). Real Chrome coalesces mousemove to ~60 Hz, so dispatches are paced to it. */
27
+ export declare const FRAME_MS = 16;
28
+ /**
29
+ * Play a motion plan against the WALL CLOCK. Sample i is due at the sum of the earlier `sleepMs`.
30
+ * Each native mouse.move is acknowledged only about once per frame (~16.7 ms) while the planner emits
31
+ * a sample every ~7.7 ms, so walking every sample stretched a plan 2-3x. Here a sample already in the
32
+ * past is skipped, the LAST sample is always delivered, and we sleep only when ahead of the plan.
33
+ * Dispatches are at least FRAME_MS apart (the final landing included: it waits for the frame gap,
34
+ * so the total may run up to one frame past the plan); samples due inside one frame are collapsed
35
+ * to the latest.
36
+ * `move` returns false/throws to abort. Returns the number of samples actually delivered.
37
+ */
38
+ export declare function playSteps(steps: Step[], move: (s: Step) => Promise<unknown>, clock?: PlayClock): Promise<number>;
39
+ /** Play a typing timeline (motion.ts planTyping) on the wall clock through down/up. A key whose `down`
40
+ * fails (no US-layout mapping, e.g. "é") is typed with `type` instead and its `up` is skipped; every
41
+ * key still down at the end (or on error) is released, so a stuck Shift/key is impossible. */
42
+ export declare function playTyping(events: TypeEvent[], kb: {
43
+ down: (k: string) => Promise<unknown>;
44
+ up: (k: string) => Promise<unknown>;
45
+ type: (t: string) => Promise<unknown>;
46
+ }, clock?: PlayClock): Promise<void>;
14
47
  /** Wrap a single page's input methods + (optionally) inject the cursor overlay. */
15
48
  export declare function attachHumanize(browser: Browser, page: Page, opts: HumanizeOptions): Promise<void>;
16
49
  /** Install humanize/showCursor on a browser: wraps newPage/newContext so every page is covered. */
@@ -1 +1 @@
1
- {"version":3,"file":"humanize.d.ts","sourceRoot":"","sources":["../src/humanize.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAW,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAG9E,MAAM,WAAW,eAAe;IAC9B,iFAAiF;IACjF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oEAAoE;IACpE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;qGACiG;IACjG,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AAED;sEACsE;AACtE,eAAO,MAAM,cAA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;;GASG;AACH,wBAAsB,SAAS,CAC7B,KAAK,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,GAAE,SAAqB,GAC/E,OAAO,CAAC,MAAM,CAAC,CAoBjB;AAED;;8FAE8F;AAC9F,wBAAsB,UAAU,CAC9B,MAAM,EAAE,SAAS,EAAE,EACnB,EAAE,EAAE;IAAE,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAAC,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAAC,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;CAAE,EACzH,KAAK,GAAE,SAAqB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAkBf;AAID,mFAAmF;AACnF,wBAAsB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAkevG;AAwKD,mGAAmG;AACnG,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,GAAG,IAAI,CAc7E;AAED,0FAA0F;AAC1F,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,GACvE,IAAI,CAQN"}
package/dist/humanize.js CHANGED
@@ -19,7 +19,14 @@
19
19
  // (slider captchas work) with no separate CDP channel to desync. Typing goes key-by-key through
20
20
  // the native keyboard (trusted; shift handled by the engine) with human inter-key timing. No
21
21
  // special binary command required.
22
- import { makePersona, planMove, dragDwell, clickHold, keyDwell, clickPoint, planAmbient, gaussFrom } from "./motion.js";
22
+ import { randomBytes } from "node:crypto";
23
+ import { makePersona, planMove, dragDwell, clickHold, keyDwell, clickPoint, planAmbient, gaussFrom, mulberry32, planWheel, planTyping, } from "./motion.js";
24
+ /** The LIVE input stream: a mulberry32 seeded from OS crypto randomness, so playback (paths, holds,
25
+ * typing timeline, wheel gaps) differs on every page/launch even for the same profile. Persona TRAITS
26
+ * stay seeded (makePersona); only what is consumed while playing input is unseeded. */
27
+ export function liveRng() {
28
+ return mulberry32(randomBytes(4).readUInt32LE(0));
29
+ }
23
30
  /** Overlay: a red dot that follows real mousemove events. Idempotent IIFE so it works both as
24
31
  * an addInitScript source string AND when passed to page.evaluate. */
25
32
  export const CURSOR_OVERLAY = `(() => {
@@ -44,21 +51,93 @@ const clamp = (v, lo, hi) => Math.max(lo, Math.min(hi, v));
44
51
  // for placing a point in a plausible spread instead of on an exact landmark.
45
52
  const gauss = () => gaussFrom(Math.random);
46
53
  const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
47
- // Compact keyboard-adjacency map for realistic fat-finger typos.
48
- const NEARBY = {
49
- a: "sqwz", b: "vghn", c: "xdfv", d: "sfecx", e: "wrsdf", f: "dgrtcv",
50
- g: "fhtyb", h: "gjybn", i: "ujko", j: "hkunm", k: "jloi", l: "kop",
51
- m: "njk", n: "bhjm", o: "iklp", p: "ol", q: "wa", r: "edft",
52
- s: "awedxz", t: "rfgy", u: "yhji", v: "cfgb", w: "qase", x: "zsdc",
53
- y: "tghu", z: "asx",
54
- };
55
- function nearbyKey(ch) {
56
- const lo = ch.toLowerCase();
57
- const n = NEARBY[lo];
58
- if (!n)
59
- return ch;
60
- const w = n[Math.floor(Math.random() * n.length)];
61
- return ch === ch.toUpperCase() && ch !== ch.toLowerCase() ? w.toUpperCase() : w;
54
+ /** One display frame (ms). Real Chrome coalesces mousemove to ~60 Hz, so dispatches are paced to it. */
55
+ export const FRAME_MS = 16;
56
+ const realClock = { now: () => performance.now(), sleep };
57
+ /**
58
+ * Play a motion plan against the WALL CLOCK. Sample i is due at the sum of the earlier `sleepMs`.
59
+ * Each native mouse.move is acknowledged only about once per frame (~16.7 ms) while the planner emits
60
+ * a sample every ~7.7 ms, so walking every sample stretched a plan 2-3x. Here a sample already in the
61
+ * past is skipped, the LAST sample is always delivered, and we sleep only when ahead of the plan.
62
+ * Dispatches are at least FRAME_MS apart (the final landing included: it waits for the frame gap,
63
+ * so the total may run up to one frame past the plan); samples due inside one frame are collapsed
64
+ * to the latest.
65
+ * `move` returns false/throws to abort. Returns the number of samples actually delivered.
66
+ */
67
+ export async function playSteps(steps, move, clock = realClock) {
68
+ if (!steps.length)
69
+ return 0;
70
+ const due = [];
71
+ let acc = 0;
72
+ for (const s of steps) {
73
+ due.push(acc);
74
+ acc += s.sleepMs;
75
+ }
76
+ const t0 = clock.now();
77
+ let i = 0, sent = 0, lastAt = -Infinity;
78
+ while (i < steps.length) {
79
+ // never dispatch sooner than one frame after the previous dispatch, nor before the sample is due
80
+ const wait = Math.max(t0 + due[i], lastAt + FRAME_MS) - clock.now();
81
+ if (wait > 0)
82
+ await clock.sleep(wait);
83
+ const el = clock.now() - t0;
84
+ while (i < steps.length - 1 && due[i + 1] <= el)
85
+ i++; // several due inside one frame: send only the latest
86
+ lastAt = clock.now();
87
+ try {
88
+ await move(steps[i]);
89
+ }
90
+ catch {
91
+ return sent;
92
+ }
93
+ sent++;
94
+ i++;
95
+ }
96
+ const tail = steps[steps.length - 1].sleepMs; // the last sample's own dwell
97
+ if (tail > 0)
98
+ await clock.sleep(tail);
99
+ return sent;
100
+ }
101
+ /** Play a typing timeline (motion.ts planTyping) on the wall clock through down/up. A key whose `down`
102
+ * fails (no US-layout mapping, e.g. "é") is typed with `type` instead and its `up` is skipped; every
103
+ * key still down at the end (or on error) is released, so a stuck Shift/key is impossible. */
104
+ export async function playTyping(events, kb, clock = realClock) {
105
+ const t0 = clock.now();
106
+ const held = new Set();
107
+ try {
108
+ for (const e of events) {
109
+ const wait = t0 + e.at - clock.now();
110
+ if (wait > 1)
111
+ await clock.sleep(wait);
112
+ if (e.kind === "down") {
113
+ try {
114
+ await kb.down(e.key);
115
+ held.add(e.key);
116
+ }
117
+ catch {
118
+ try {
119
+ await kb.type(e.key);
120
+ }
121
+ catch { /* best-effort */ }
122
+ }
123
+ }
124
+ else if (held.has(e.key)) {
125
+ held.delete(e.key);
126
+ try {
127
+ await kb.up(e.key);
128
+ }
129
+ catch { /* best-effort */ }
130
+ }
131
+ }
132
+ }
133
+ finally {
134
+ for (const k of [...held]) {
135
+ try {
136
+ await kb.up(k);
137
+ }
138
+ catch { /* best-effort */ }
139
+ }
140
+ }
62
141
  }
63
142
  const SELECT_ALL = "Control+a"; // Ant0 Browser ships a Windows binary; Control is correct.
64
143
  /** Wrap a single page's input methods + (optionally) inject the cursor overlay. */
@@ -93,6 +172,11 @@ export async function attachHumanize(browser, page, opts) {
93
172
  // seeds. Stored on the page so the module-level Locator.dragTo patch can reach it too.
94
173
  const persona = makePersona(opts.seed);
95
174
  page._ant0BrowserPersona = persona;
175
+ // LIVE stream for every drawn quantity in the humanize path (holds, wheel gaps, typing timeline,
176
+ // path shape): unseeded (crypto) per page, so the same script on the same profile never replays
177
+ // identical timing. Only the persona traits above are seeded.
178
+ const prng = opts.rng ?? liveRng();
179
+ page._ant0BrowserRng = prng;
96
180
  // Tracked cursor position so each move continues from where the last one ended.
97
181
  // `held` tracks whether a mouse button is currently down — see mouse.move below.
98
182
  // `placed` records whether the engine's cursor has actually been moved yet. A page starts with the
@@ -110,21 +194,12 @@ export async function attachHumanize(browser, page, opts) {
110
194
  // Native input carries the button state, so a button pressed via mouse.down() stays held across
111
195
  // the whole path — the same code powers a free move AND a held-button drag.
112
196
  const dispatch = async (steps) => {
113
- for (const s of steps) {
114
- try {
115
- await nativeMove(s.x, s.y);
116
- }
117
- catch {
118
- break;
119
- }
120
- st.placed = true;
121
- await sleep(s.sleepMs);
122
- }
197
+ await playSteps(steps, async (m) => { await nativeMove(m.x, m.y); st.placed = true; });
123
198
  };
124
199
  // Move to (x, y) as a minimum-jerk sum-of-submovements path (primary ballistic + corrective homing)
125
200
  // with colored sub-pixel noise and Fitts-scaled duration. `settle` adds a seating jiggle (drag).
126
201
  const glide = async (x, y, o = {}) => {
127
- await dispatch(planMove(st, { x, y }, persona, { settle: o.settle, targetW: o.targetW }));
202
+ await dispatch(planMove(st, { x, y }, persona, { settle: o.settle, targetW: o.targetW, rng: prng }));
128
203
  st.x = x;
129
204
  st.y = y;
130
205
  };
@@ -196,7 +271,7 @@ export async function attachHumanize(browser, page, opts) {
196
271
  // an action needs one but names no coordinates.
197
272
  const ambient = async (ms) => {
198
273
  try {
199
- const steps = planAmbient(st, await viewport(), persona, ms);
274
+ const steps = planAmbient(st, await viewport(), persona, ms, prng);
200
275
  await dispatch(steps);
201
276
  if (steps.length) {
202
277
  st.x = steps[steps.length - 1].x;
@@ -290,7 +365,7 @@ export async function attachHumanize(browser, page, opts) {
290
365
  await sleep(rand(40, 130)); // brief dwell before pressing, like a human
291
366
  // delay = the mousedown→mouseup HOLD (human ~60–150 ms); without it Playwright releases in ~2 ms.
292
367
  try {
293
- await nativeClick(x, y, { delay: clickHold(persona) });
368
+ await nativeClick(x, y, { delay: clickHold(persona, prng) });
294
369
  }
295
370
  catch { /* best-effort */ }
296
371
  };
@@ -332,84 +407,38 @@ export async function attachHumanize(browser, page, opts) {
332
407
  }
333
408
  catch { /* best-effort: scroll from wherever the cursor is */ }
334
409
  };
335
- // scroll easing: break into eased chunks of native wheel deltas
410
+ // A wheel is a stream of detents: one native event per 100 px notch with log-normal gaps (median
411
+ // 47 ms), the remainder on the last event (motion.ts planWheel) — not eased fractions of arbitrary size.
412
+ // sleep() is local, NOT page.waitForTimeout (a CDP round-trip per call is protocol traffic scripts can score).
336
413
  mouse.wheel = async (dx, dy) => {
337
414
  await scrollAnchor();
338
- const steps = Math.max(5, Math.min(24, Math.round((Math.abs(dx) + Math.abs(dy)) / 60)));
339
- const ease = (u) => 1 - Math.pow(1 - u, 2.2); // ease-OUT: fast flick -> slow inertial settle
340
- let px = 0, py = 0;
341
- for (let i = 1; i <= steps; i++) {
342
- const f = ease(i / steps);
343
- const nxw = Math.round(dx * f), nyw = Math.round(dy * f);
344
- await nativeWheel(nxw - px, nyw - py);
345
- px = nxw;
346
- py = nyw;
347
- // local sleep, NOT page.waitForTimeout: the latter is a CDP round-trip per call, so it
348
- // emits protocol traffic bot-detectors (e.g. reCAPTCHA) can score — a self-inflicted tell
349
- // inside the humanize path. setTimeout is off-protocol.
350
- await sleep(rand(10, 38));
351
- if (Math.random() < 0.07)
352
- await sleep(rand(40, 120)); // occasional mid-scroll pause (reading)
353
- // A hand resting on the mouse does not hold it perfectly still through a long scroll. Without
354
- // this a wheel burst is the one input where the pointer coordinate never changes at all.
355
- if (steps >= 10 && i > 2 && i < steps && Math.random() < 0.06) {
415
+ const evs = planWheel(dx, dy, prng);
416
+ for (let i = 0; i < evs.length; i++) {
417
+ await nativeWheel(evs[i].dx, evs[i].dy);
418
+ if (evs[i].sleepMs > 0)
419
+ await sleep(evs[i].sleepMs);
420
+ // A hand resting on the mouse does not hold it perfectly still through a long scroll; without this
421
+ // a wheel burst is the one input where the pointer coordinate never changes at all.
422
+ if (evs.length >= 10 && i > 1 && i < evs.length - 1 && prng() < 0.06) {
356
423
  try {
357
- await glide(st.x + gauss() * 3.5, st.y + gauss() * 2.5);
424
+ await glide(st.x + gaussFrom(prng) * 3.5, st.y + gaussFrom(prng) * 2.5);
358
425
  }
359
426
  catch { /* drift is cosmetic */ }
360
427
  }
361
428
  }
362
- if (px !== dx || py !== dy)
363
- await nativeWheel(dx - px, dy - py);
364
429
  };
365
430
  // ----------------------------------------------------------------- keyboard
366
431
  const keyboard = page.keyboard;
367
432
  const nativeKbType = keyboard.type.bind(keyboard);
368
433
  const nativeKbPress = keyboard.press.bind(keyboard);
369
- // Emit one character with a human keydown→keyup DWELL. keyboard.press's `delay` IS the hold
370
- // (keyboard.type's delay is only inter-key flight), so per-char press gives the missing dwell.
371
- // Fall back to type() for anything press can't map (some symbols / composed chars).
372
- const emitKey = async (ch) => {
373
- try {
374
- await nativeKbPress(ch, { delay: keyDwell(persona) });
375
- }
376
- catch {
377
- try {
378
- await nativeKbType(ch);
379
- }
380
- catch { /* best-effort */ }
381
- }
382
- };
383
- // Type text key-by-key with human timing. Each char goes through the native keyboard (trusted;
384
- // shift/symbols handled by the engine), so this stays isTrusted===true.
434
+ const nativeKbDown = keyboard.down.bind(keyboard);
435
+ const nativeKbUp = keyboard.up.bind(keyboard);
436
+ // Type text on a key down/up TIMELINE (motion.ts planTyping): log-normal gaps with bigram factors and a
437
+ // per-identity speed, log-normal dwell, so a key can go down before the previous one is up (rollover).
438
+ // Uppercase / shifted symbols carry a real Shift down/up and nothing else is down while it is held.
439
+ // Everything is native (trusted) keyboard input; a char with no layout mapping falls back to type().
385
440
  const humanTypeText = async (text) => {
386
- const n = text.length;
387
- for (let i = 0; i < n; i++) {
388
- const ch = text[i];
389
- if (/[a-zA-Z0-9]/.test(ch) && Math.random() < 0.02) {
390
- try {
391
- await emitKey(nearbyKey(ch));
392
- await sleep(rand(120, 300));
393
- await nativeKbPress("Backspace", { delay: keyDwell(persona) });
394
- await sleep(rand(80, 200));
395
- }
396
- catch { /* typo path best-effort */ }
397
- }
398
- try {
399
- await emitKey(ch);
400
- }
401
- catch {
402
- break;
403
- }
404
- if (i < n - 1) {
405
- if (Math.random() < 0.06)
406
- await sleep(rand(180, 450)); // brief thinking pause
407
- else
408
- await sleep(rand(45, 150));
409
- if (/\s/.test(ch))
410
- await sleep(rand(20, 100)); // slight extra pause at word boundaries
411
- }
412
- }
441
+ await playTyping(planTyping(text, persona, prng), { down: nativeKbDown, up: nativeKbUp, type: nativeKbType });
413
442
  };
414
443
  // Keystrokes from a session in which the mouse never existed. Selector-based typing glides to the
415
444
  // field first (focusClick), but page.keyboard.type/press names no target, and on a page focused by
@@ -434,7 +463,7 @@ export async function attachHumanize(browser, page, opts) {
434
463
  // left the most common single-key call in any script — Enter, Tab, Escape, arrow keys — emitting
435
464
  // a keydown and keyUp in the same instant. Measured with humanize ON, before this wrapper:
436
465
  // keyboard.type held keys 58–107ms while keyboard.press held them 1.4–3.8ms. A finger cannot
437
- // press and release a key in under a millisecond, and a detector reading the SHORTEST dwell in a
466
+ // press and release a key in under a millisecond, and a script reading the SHORTEST dwell in a
438
467
  // session sees the press path — so one un-humanised call undid the whole keyboard persona.
439
468
  //
440
469
  // The caller's own `delay` wins: press(key, {delay}) is the documented way to hold a key for a
@@ -443,7 +472,7 @@ export async function attachHumanize(browser, page, opts) {
443
472
  await keyboardWarmup();
444
473
  const opts = options && typeof options === "object" ? options : {};
445
474
  if (opts.delay === undefined)
446
- opts.delay = keyDwell(persona);
475
+ opts.delay = keyDwell(persona, prng);
447
476
  return nativeKbPress(key, opts);
448
477
  };
449
478
  // ------------------------------------------------------- page-level targeted helpers
@@ -472,15 +501,16 @@ export async function attachHumanize(browser, page, opts) {
472
501
  if (!box2 || Math.abs(box2.x - box.x) > 1 || Math.abs(box2.y - box.y) > 1)
473
502
  return null;
474
503
  box = box2;
475
- return clickPoint(box, st, persona); // 2D gaussian toward center, nudged to the approach side
504
+ // `w` is the REAL target size for Fitts's law (min side), not the planner's 24 px default.
505
+ return { ...clickPoint(box, st, persona, prng), w: Math.min(box.width, box.height) };
476
506
  };
477
507
  const focusClick = async (selector, timeout) => {
478
508
  const pt = await pointFor(selector, timeout);
479
509
  if (!pt)
480
510
  return false;
481
- await glide(pt.x, pt.y);
511
+ await glide(pt.x, pt.y, { targetW: pt.w });
482
512
  await sleep(rand(40, 130));
483
- await nativeClick(pt.x, pt.y, { delay: clickHold(persona) });
513
+ await nativeClick(pt.x, pt.y, { delay: clickHold(persona, prng) });
484
514
  return true;
485
515
  };
486
516
  const nativePageType = page.type ? page.type.bind(page) : null;
@@ -530,7 +560,7 @@ export async function attachHumanize(browser, page, opts) {
530
560
  const pt = await pointFor(selector, timeout);
531
561
  if (!pt)
532
562
  return nativePageDblclick(selector, options);
533
- await glide(pt.x, pt.y);
563
+ await glide(pt.x, pt.y, { targetW: pt.w });
534
564
  await sleep(rand(40, 130));
535
565
  await nativeClick(pt.x, pt.y, { clickCount: 2, delay: rand(40, 90) });
536
566
  }
@@ -549,7 +579,7 @@ export async function attachHumanize(browser, page, opts) {
549
579
  // The persona's hold, for the same reason keyboard.press above carries one: this is the
550
580
  // path locator.press() delegates to, so without it every locator.press in a script emitted
551
581
  // a zero-length keypress while the typed text around it looked human.
552
- await nativeKbPress(key, { delay: keyDwell(persona) });
582
+ await nativeKbPress(key, { delay: keyDwell(persona, prng) });
553
583
  }
554
584
  catch {
555
585
  return nativePagePress(selector, key, options);
@@ -570,7 +600,7 @@ export async function attachHumanize(browser, page, opts) {
570
600
  try {
571
601
  const pt = await pointFor(selector, timeout);
572
602
  if (pt) {
573
- await glide(pt.x, pt.y);
603
+ await glide(pt.x, pt.y, { targetW: pt.w });
574
604
  await sleep(rand(50, 150));
575
605
  }
576
606
  }
@@ -605,7 +635,7 @@ export async function attachHumanize(browser, page, opts) {
605
635
  return orig(selector, options);
606
636
  }
607
637
  box = box2;
608
- const cp = clickPoint(box, st, persona);
638
+ const cp = clickPoint(box, st, persona, prng);
609
639
  const x = cp.x, y = cp.y;
610
640
  try {
611
641
  const handle = await loc.elementHandle();
@@ -618,10 +648,10 @@ export async function attachHumanize(browser, page, opts) {
618
648
  return orig(selector, options); // covered -> let PW wait for it on top
619
649
  }
620
650
  catch { /* covered-by check best-effort */ }
621
- await glide(x, y);
651
+ await glide(x, y, { targetW: Math.min(box.width, box.height) });
622
652
  if (!noClick) {
623
653
  await sleep(rand(40, 130));
624
- await nativeClick(x, y, { delay: clickHold(persona) });
654
+ await nativeClick(x, y, { delay: clickHold(persona, prng) });
625
655
  }
626
656
  return;
627
657
  }
@@ -867,7 +897,7 @@ function patchLocatorClass(sample) {
867
897
  // Human endpoint dynamics (the two worst slider tells): a grab hesitation AFTER pressing and
868
898
  // a settle dwell BEFORE releasing, drawn from the page's motor persona.
869
899
  const persona = pg._ant0BrowserPersona;
870
- const { grabMs, releaseMs } = persona ? dragDwell(persona) : { grabMs: rand(130, 360), releaseMs: rand(90, 230) };
900
+ const { grabMs, releaseMs } = persona ? dragDwell(persona, pg._ant0BrowserRng) : { grabMs: rand(130, 360), releaseMs: rand(90, 230) };
871
901
  await pg.mouse.move(sx, sy);
872
902
  await sleep(rand(100, 200));
873
903
  await pg.mouse.down();