Skip to content

Humanize all computer endpoints#169

Open
ulziibay-kernel wants to merge 6 commits intomainfrom
ulziibay-kernel/humanize-computer-endpoints
Open

Humanize all computer endpoints#169
ulziibay-kernel wants to merge 6 commits intomainfrom
ulziibay-kernel/humanize-computer-endpoints

Conversation

@ulziibay-kernel
Copy link
Copy Markdown
Contributor

@ulziibay-kernel ulziibay-kernel commented Mar 2, 2026

This is a plan to implement human like interactions for all Computer Controls. https://www.kernel.sh/docs/browsers/computer-controls#computer-controls.
#148 added human like mouse movements. However, there are other movements like clicking, scrolling, typing, pressing that could use human like improvements.


Note

Low Risk
Documentation-only change that adds an implementation plan; no runtime code, APIs, or generated artifacts are modified in this PR.

Overview
Adds plans/humanize-computer-endpoints.md, a detailed performance-focused design plan for humanizing all computer interaction endpoints (click, type, press key, scroll, drag) while minimizing xdotool process spawns.

The document proposes new smooth flags and typing options (e.g., optional typo injection), plus a small shared humanize helper library and related OpenAPI/type regeneration steps, but these are not implemented here.

Written by Cursor Bugbot for commit b8fb87c. This will update automatically on new commits. Configure here.

Covers click, type, press key, scroll, and drag mouse with
performance-first algorithms (zero additional xdotool process spawns).
Includes the existing Bezier curve mouse movement as reference.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ulziibay-kernel ulziibay-kernel force-pushed the ulziibay-kernel/humanize-computer-endpoints branch from 6b34ba9 to f508bfa Compare March 2, 2026 18:06
@ulziibay-kernel ulziibay-kernel requested a review from rgarcia March 4, 2026 16:16
- Type text: use O(words) separate xdotool calls with Go-side sleeps
  instead of single-call chaining, since xdotool type consumes rest
  of argv and can't be chained with sleep.
- Type text: keep trailing delimiters (space, punctuation) with the
  preceding chunk so pauses happen after word boundaries.
- Scroll: use bounded total duration (default 200ms) instead of fixed
  per-tick slowMs/fastMs, so large tick counts don't block input.

Made-with: Cursor
Introduces optional typo_chance parameter for realistic typing errors.
Uses geometric gap sampling (O(typos) random calls, not O(chars)) with
QWERTY adjacency lookup for adjacent-key substitution. Includes
correction sequence with "realization" pause before backspace.

Made-with: Cursor
Adds smooth typing mode to POST /computer/type that types text in
word-sized chunks with variable intra-word delays and natural
inter-word pauses via xdotool, following the same Go-side sleep
pattern as doMoveMouseSmooth.

Optionally injects realistic typos (adjacent-key, doubling, transpose)
using geometric gap sampling (O(typos) random calls, not O(chars))
with QWERTY adjacency lookup, then corrects them with backspace
after a "realization" pause.

New API fields on TypeTextRequest:
- smooth: boolean (default false) - enable human-like timing
- typo_chance: number 0.0-0.10 (default 0) - per-char typo rate

New package: server/lib/typinghumanizer with word chunking,
QWERTY adjacency map, and typo position generation.

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants