feat(actions): human Bézier cursor motion before clicks (humanMode)#64
Merged
Conversation
Behavioral anti-bots (ML on mouse velocity/curvature/timing) flag the teleport-to-element that locator.click produces. In humanMode, smartClick now moves the cursor to the target along a cubic Bézier path with ease-in-out, random control points, per-step jitter and variable timing before hovering/clicking — a human reach, not a straight teleport. New human-mouse module: pure cubicBezier + easeInOutCubic (unit-tested) + humanMoveTo (drives page.mouse.move step-by-step with sleeps; no-op when the element has no box). Only active when humanMode=true; default click path unchanged. tsc clean, 194 unit (+5 bezier) + 20 integration green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pourquoi
Les anti-bots comportementaux (ML sur vélocité/courbure/timing souris) repèrent la téléportation vers l'élément que produit
locator.click. Tell instantané.Fix
En
humanMode,smartClickdéplace le curseur vers la cible le long d'une courbe de Bézier cubique (ease-in-out + points de contrôle aléatoires + jitter par pas + timing variable) avant hover/clic — une vraie main humaine, pas une ligne droite instantanée.Nouveau module
human-mouse:cubicBezier+easeInOutCubicpurs (testés unit) +humanMoveTo(enchaînepage.mouse.move+ sleeps ; no-op si pas de boundingBox). Actif uniquement sihumanMode=true; chemin de clic par défaut inchangé.Validation
tsc clean · 194 unit (+5 Bézier : endpoints, midpoint, monotonie de l'easing) · 20 intégration. Fichiers <100 lignes.