Commit Graph
223 Commits
Author SHA1 Message Date
CloakHQ 29ef0639a3 fix(license): explain held seats in the session-limit error
A free user whose browser crashed sees "close another running session"
with nothing left to close. The message now says how to close cleanly
and how long a crashed session holds its seat per plan.
2026-10-11 01:20:41 +02:00
CloakHQ 3c7f1ac843 fix(license): surface license exits on Puppeteer and .NET launch failures (#584)
Puppeteer reports a failed launch as 'Code: N' and .NET Playwright carries
no exit code at all, so an over-cap launch surfaced as a raw crash instead
of CloakBrowserLicenseError. Match Puppeteer's real wording and fall back
to the launch's denial file in the launch catch.
2026-10-11 00:33:49 +02:00
CloakHQ a2e77639d7 fix(humanize): select_option on emoji labels uses arrows; refuse on macOS
The dropdown search reads one UTF-16 unit per key and drops a surrogate, so
a typed emoji never moves it. The type-ahead plan no longer types one: Linux
and Windows reach such options with arrows. A macOS dropdown ignores arrows
too, so there the option raises a clear error before the popup opens.
The long-dropdown test now allows one input/change per letter on macOS.
2026-10-11 00:05:39 +02:00
lilos 117b60229b fix(humanize): select_option types ahead instead of walking every row (#580, #581) (#582)
A dropdown is now picked the way a person picks from a long list: open it,
type the first letters of the option, add a few arrow keys when that is
shorter, press Enter.

- The plan comes from a new __cloakH helper (typeAheadPlan), shared byte for
  byte by Python, JS and .NET. It picks the shortest prefix that matches
  exactly one enabled option, so the result does not depend on which row the
  open popup highlights. That row cannot be read from the page, and on headed
  Linux it can be the one under the OS pointer (#580). Prefixes of the
  option's own name win; a neighbour's prefix plus up to 3 arrows is used only
  when it is shorter. Runs of one letter ("aa") are avoided because Blink
  cycles on them.
- Blink joins letters typed within 1s into one search, so a second
  select_option on the same page waits for the previous search to lapse.
- The deadline is checked before every key; on timeout the popup is closed
  with Escape and a TimeoutError is raised (#581: timeout= was ignored).
- macOS hosts (no arrow keys in the native popup) type the shortest unique
  prefix instead of the whole label.
- Labels with no unique prefix (duplicates) fall back to Home + arrows, or the
  full label on macOS.

Measured on headed Linux (Xvfb), humanize defaults: #581's 205-option list
1.5-2s per pick (was 20-30s); 166-country list and #580's page with the OS
pointer parked over the popup, 144/144 correct.
2026-10-10 23:29:16 +02:00
CloakHQ 37d81bce9b release: v0.6.0 — unified humanize engine, persistent profile seeds, safe concurrent downloads 2026-10-08 20:51:59 +02:00
CloakHQ 89d2c27bad feat(proxy): warn when Playwright's request client skips the proxy (#579)
SOCKS5 and credentialed HTTP proxies are set on the browser, so
context.request / page.request / route.fetch() send from the real IP.
Warn once on first use (Python + JS) and document in-page fetch.
2026-10-08 20:19:34 +02:00
CloakHQ 15cb83e303 refactor(humanize): remove unused helpers and code left after #578 2026-10-08 19:53:08 +02:00
lilos d4924d9575 fix(humanize): one engine for every action (Python, JS, .NET) + Puppeteer fixes (#578)
Humanized actions in the Playwright wrappers (Python, JS, .NET) now run through a
single shared engine built on Playwright's own selector engine: full locator support
(roles, chains, filters, frame locators, strict mode), Playwright options honoured,
value inputs operated with real input, persona-aware keys, and errors instead of
silent fallbacks. Puppeteer: frame-scoped actions, button/count, Shift on typos.

Follow-ups: macOS dropdowns via type-ahead, nested same-box element handles,
stale handles fail fast, CI fails on a missing test binary.
2026-10-08 18:58:10 +02:00
CloakHQ 5fb230d644 feat: persist the fingerprint seed per persistent profile
launch_persistent_context() now stores its seed in <user_data_dir>/.cloakbrowser-seed
on first launch and reuses it, so a profile keeps one identity across sessions.
Same file format in Python, JS and .NET. An explicit --fingerprint in args wins
and leaves the file alone; stealth_args=False skips it; non-persistent launches
stay random. Concurrent first launches publish without overwriting (link), so
they agree on one seed. Filesystems without hard links (FAT/exFAT, some network
mounts) fall back to an exclusive create, and an empty file is re-read briefly
as in-progress. A corrupt file is logged and regenerated.
2026-10-08 05:00:29 +02:00
CloakHQ 58eead89d2 feat(js): support CommonJS require() via a default export condition
Exports used only "import", so require('cloakbrowser') failed with ERR_PACKAGE_PATH_NOT_EXPORTED. A "default" condition lets Node's built-in require(esm) load all three subpaths. engines raised to ^20.19.0 || >=22.12.0, where require(esm) is on by default.
2026-10-08 02:39:23 +02:00
CloakHQ a7a6c1913f fix(js): write download and GeoIP status lines to stderr, not stdout
Stdout status lines corrupted MCP stdio servers and any caller parsing stdout on first run. Matches the banner, Python, and .NET. Tests assert nothing reaches stdout.
2026-10-08 02:37:19 +02:00
ShubhamandCloakHQ 9fb05e0fc8 fix(download): make concurrent first-run downloads safe (#555)
* fix(download): make concurrent first-run downloads safe

_extract_archive deleted the install dir and then extracted into it in
place. When several processes or threads start on an empty cache, a
second caller can delete the first caller's install mid-extraction, or
pass the "binary exists and is executable" check on a binary that is
still being written. On Linux that surfaces as ETXTBSY on spawn; on
macOS as dlopen failures and "Directory not empty", and the cache can
be left permanently incomplete.

Extract into a uniquely named sibling staging dir and rename it into
place. If the destination already holds a complete install, another
caller won and the staged copy is discarded; an incomplete leftover is
still replaced as before.

* fix(js): make concurrent first-run downloads safe

Same race as the Python wrapper: extractArchive deleted the install dir
and extracted into it in place, so concurrent ensureBinary() calls on an
empty cache could delete each other's install or return a binary that
was still being written (spawn ETXTBSY on Linux).

Extract into a uniquely named sibling staging dir and rename it into
place, keeping an existing complete install if another caller won.
Also name the temporary archive with randomUUID() instead of
Date.now(), which collided for calls made in the same millisecond.

* fix(dotnet): make concurrent first-run downloads safe

Same race as the Python and JS wrappers: ExtractArchive deleted the
install dir and extracted into it in place, so concurrent
EnsureBinaryAsync() calls on an empty cache failed with "already
exists" / DirectoryNotFoundException or saw a half-written install.

Extract into a uniquely named sibling staging dir and move it into
place, keeping an existing complete install if another caller won.

* fix(download): replace a partial install safely under concurrent callers

When an incomplete install dir was left over from an interrupted run,
every concurrent caller saw it as incomplete and deleted it in place.
The first to finish renamed its staging dir into place; the others'
unguarded second rename then failed (ENOTEMPTY, FileNotFoundError,
DirectoryNotFoundException), and a late delete could remove files from
an install another caller had just moved in. With 8 concurrent callers,
7 raised in each round.

Rename the leftover aside to a unique <install>.stale-<id> dir and
delete it from there, then retry the staging rename a bounded number
of times, keeping a complete install if another caller got there
first. Applies to the Python, JS and .NET clients, each with a
regression test that starts several concurrent callers on a partial
install. The JS test uses separate processes, since callers in one
process cannot interleave inside the synchronous rename block.

* fix(download): retry directory renames Windows transiently denies

Antivirus and indexers on Windows briefly hold freshly extracted files
open, which fails the directory rename with access denied. Retry that
rename for about 2.5 seconds while the destination does not exist, in
all three clients. Cleanup of the staging and stale dirs is now best
effort so a failed delete never masks the error being raised.

---------

Co-authored-by: CloakHQ <cloakhq@pm.me>
2026-10-08 00:53:57 +02:00
CloakHQ 5fa65172f0 docs: Pro Stable is now Chromium 154 on every platform
README versions, test date, and pin examples moved to 154.0.8037.57.1; Pro banner names v154; CHANGELOG [Unreleased].
2026-10-06 20:09:34 +02:00
CloakHQ faffd76f7b test(js): zero random delays in the SecurePass humanType test to stop CI timeouts 2026-10-04 23:55:39 +02:00
dependabot[bot] 6dcfa264dd chore(deps-dev): bump the javascript group in /js with 2 updates (#574)
Bumps the javascript group in /js with 2 updates: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest).


Updates `@types/node` from 26.6.2 to 26.6.3
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `vitest` from 5.0.1 to 5.0.3
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md)
- [Commits](https://github.com/vitest-dev/vitest/commits/v5.0.3/packages/vitest)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 26.6.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: javascript
- dependency-name: vitest
  dependency-version: 5.0.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: javascript
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-04 23:40:31 +02:00
CloakHQ 1c867a7046 release: v0.5.12 — humanize x-axis scroll-into-view, digit-safe typos on number inputs 2026-10-04 20:15:16 +02:00
CloakHQ 0739ca5324 fix(humanize): keep digit mistypes on digits (#573)
A letter typo on a digit is rejected by <input type=number>, so the
correcting Backspace deleted the previous real digit (1999 -> 999).
Digit neighbors are now digit-only in the Python, JS (Playwright +
Puppeteer) and .NET wrappers.
2026-10-04 19:42:07 +02:00
dependabot[bot] 68f9239bbf chore(deps-dev): bump the javascript group across 1 directory with 4 updates (#542)
Bumps the javascript group with 4 updates in the /js directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [playwright-core](https://github.com/microsoft/playwright), [puppeteer-core](https://github.com/puppeteer/puppeteer) and [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest).


Updates `@types/node` from 26.2.0 to 26.6.2
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `playwright-core` from 1.62.1 to 1.63.0
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.62.1...v1.63.0)

Updates `puppeteer-core` from 25.7.0 to 25.12.0
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v25.7.0...puppeteer-core-v25.12.0)

Updates `vitest` from 3.2.7 to 5.0.1
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md)
- [Commits](https://github.com/vitest-dev/vitest/commits/v5.0.1/packages/vitest)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 26.5.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: javascript
- dependency-name: playwright-core
  dependency-version: 1.63.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: javascript
- dependency-name: puppeteer-core
  dependency-version: 25.10.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: javascript
- dependency-name: vitest
  dependency-version: 5.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: javascript
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-29 23:27:23 +02:00
CloakHQ 0e43a341ef fix(humanize): tolerate sub-pixel box edges in the scroll-into-view pinned check
Layout can report a top edge of -1/64 px on an unscrolled page, which skipped
the pinned-at-top check and sent a pointless upward scroll burst before the
click. Allow 1px slack in Python, JS and .NET, with regression tests.

Also credit @Shub3am in README contributors (#554).
2026-09-29 23:05:00 +02:00
Shubham 65b23cac51 fix(humanize): scroll the x axis in scroll-into-view (#521) (#554)
* fix(humanize): scroll the x axis in scroll-into-view (#521)

humanScrollIntoView only measured and scrolled the y axis. A target past
the right edge of a horizontally overflowing page counted as in view, so
no wheel events were sent, the click point landed offscreen and the
pointer check failed with "element is covered by <none>" after the full
timeout.

After the vertical pass, a horizontal pass now checks that the box fits
inside the viewport width and, if not, centres it with the same
humanized wheel burst on the x axis. It skips the scroll when the page
is already pinned at the needed horizontal boundary, mirroring the y
pinned check. Applied to Python (sync and async), JS Playwright,
Puppeteer and .NET.

.NET: IRawScrollPage.GetScrollStateAsync now also returns X and MaxX.

Fixes #521

* fix(humanize): handle RTL scrollX in the horizontal pinned check (#521)

In right-to-left documents Chrome's window.scrollX runs from 0 down to
-(scrollWidth - clientWidth). The x pass treated "scrollX <= 0" as pinned
at the left edge, so on an RTL page at its start a target in the left
overflow was never scrolled into view and the click failed with "covered
by <none>".

The scroll-state script now also reads the viewport direction (taken from
<body> when present, as Chrome does) and returns an RTL-aware minX and
maxX. Python, JS Playwright and .NET compare against those. The .NET
adapter shifts X and MaxX by minX so IRawScrollPage keeps its tuple shape
and X still runs 0..MaxX.

Puppeteer has no pinned check on the x axis and is unchanged.

* fix(humanize): skip the x pass for sub-pixel distances

A box wider than the viewport never passes the containment check, so
every action on it ran the x pass even when it was already centred: a
mouse move to the scroll area and a 0 or 1px wheel. Skip the pass when
the distance to centre is under 1px. Applied to Python (sync and async),
JS Playwright, Puppeteer and .NET.

* test(humanize): reword the set_content note on the #521 browser tests

The comment stated as fact that set_content never settles in
CloakBrowser. What I observed is narrower: it timed out in local runs of
these tests, so say that instead.
2026-09-29 22:43:02 +02:00
CloakHQ 9bc5e374d7 release: v0.5.11 — Pro banner v152, macOS font check in info, direct archive unpack, .NET #549 fix 2026-09-25 00:03:16 +02:00
CloakHQ 9639bba2dc docs(readme): Chromium 152.0.7977.82.1 stable on Linux and Windows; bump Pro major banner to 152 2026-09-23 20:47:42 +02:00
CloakHQ ba6e2c5e3b docs(readme): Chromium 151.0.7922.108.6 stable, 87 patches, macOS persona + new flags
- Pro Stable to 151.0.7922.108.6 (Linux + Windows); macOS on 151.0.7922.108.3
- Patch count to 87; platform tables to Chromium 151 across all rows
- Document macOS persona and --fingerprint-transparent-proxy / --fingerprint-portable-cookies
- Font Setup: add Mac fonts block and Docker (/usr/local/share/fonts) paths
2026-09-12 19:12:56 +02:00
CloakHQ 5010f99556 refactor(download): unpack verified archives directly
The download is signature/checksum-verified before extraction, so the
per-member path/symlink sanitization was redundant. Extract archives as-is
across all three wrappers (Python, JS, .NET), tar and zip.

- Python: filter="fully_trusted" (pins legacy behavior; 3.14 defaults to
  "data"), plain zip extractall
- JS: drop the tar filter callback; inline the one-line extractTar
- .NET: TarFile/ZipFile.ExtractToDirectory; remove orphan ResolveSafeEntryPath
- Drop the obsolete traversal/symlink tests
2026-09-10 23:58:58 +02:00
CloakHQ f0c0eedb2f feat(info): report macOS persona font completeness
Add a Mac fonts count to `cloakbrowser info` next to the existing Windows
font check, in the Python, JS, and .NET wrappers. Counts the macOS core
font set via fc-list on Linux and prints Mac fonts: n/20 with a conditional
nudge when incomplete. Tests added in all three wrappers.
2026-09-10 20:55:42 +02:00
CloakHQ f04c23da28 release: v0.5.10 — Windows console banner + geoip/license launch-abort fixes 2026-08-30 05:53:19 +02:00
CloakHQ bb6f2f00e4 fix(wrapper): ASCII-safe welcome banner for legacy Windows consoles
The banner wrote '->' and em dashes straight to stderr. On a cp1252/strict
console (UK/EU-locale Windows) that raised UnicodeEncodeError and aborted the
binary-download path, blocking license apply and profile launch in the Manager.

Swap the banner glyphs to ASCII and route the writes through a swallow-all
helper so a cosmetic banner can never abort a launch. Same treatment in the JS
and .NET wrappers plus the Windows-font warning. Regression tests added across
all three (ASCII-only + cp1252-no-crash).
2026-08-28 21:00:28 +02:00
CloakHQ d6bad5de26 fix(geoip): abort launch when resolution fails
Increase the default GeoIP resolution timeout from 5 to 20 seconds across the Python, JavaScript, and .NET wrappers.

Fail the launch when requested GeoIP resolution times out, cannot load its database, cannot complete a lookup, or leaves timezone or locale unresolved. Explicit timezone and locale overrides remain valid without an egress-IP result.

Add parity coverage for the new timeout and failure behavior.
2026-08-28 02:20:04 +02:00
CloakHQ 8fb3350dd1 fix(license): abort on invalid or unvalidatable key instead of silent free fallback
A supplied license key the server rejects, or one that cannot be validated
(server unreachable, no cache), now raises instead of silently downloading the
free binary. No-key (keyless) and valid-key (Pro) paths unchanged. Python, JS,
and .NET, with mirror tests in each.
2026-08-27 00:22:05 +02:00
CloakHQ 0811704e7f release: v0.5.9 — humanize selector fixes + info seat reporting 2026-08-25 16:16:33 +02:00
CloakHQ 1164eca332 fix(humanize): restore get_by_* selectors and harden isolated-world reads
Removing the Playwright fallback closed a main-world read leak but left every
get_by_* locator raising UnsupportedHumanizeSelectorError. Reimplement the four
cheap engines in the isolated-world resolver so those locators work again.

Selector engines (shared resolver, byte-identical in all three wrappers):
- internal:testid and internal:attr (placeholder/alt/title). The i flag is a
  case-insensitive substring on the raw attribute value; test ids stay strict.
- internal:text. Exact compares the full normalized subtree text, unlike the
  public text= engine which compares immediate fragments.
- internal:label, resolving aria-labelledby, then aria-label, then .labels.
- internal:role and >> chaining stay unsupported; the error now names what is
  supported and the workaround.

Text parity fixes in __elementText, checked against playwright-core:
- drop a <br> to newline branch Playwright does not have
- concatenate shadow-root text into the host, which Playwright does
- give the public text= engine Playwright's self/selfAndChildren rule, since
  contains() cannot see into a shadow root and kept the host as a match

Target identity: payloads carry a per-world generation (protocol v2). The world
is rebuilt on navigation and its id counter restarts, so an id alone could name
a different element. Generation is bounded to Int32, which the .NET wrapper
requires.

force=True now skips the pointer check entirely, matching Playwright, instead of
suppressing only the coverage rejection.

Also: drop dead _BOX_OP, _ACTIONABLE_OP and readSnapshot, and add a test
asserting the three hand-copied resolver literals stay identical and free of
characters that would terminate their host string literals.

Verified against Playwright's own locator resolution in a real browser:
20/20 engine parity, 7/7 text parity.
2026-08-25 01:48:35 +02:00
CloakHQ f7ca311516 fix(humanize): support display contents targets
Derive actionable geometry from rendered text and visible descendants when an element has no box of its own. Preserve existing geometry behavior for normal elements and exclude hidden descendant content. Add Python, JavaScript, and .NET unit and browser regressions covering text, nested content, visibility, and humanized clicks.
2026-08-25 01:48:35 +02:00
CloakHQ f12e47d657 fix(js): align humanized selector behavior
Port the proven Python interaction behavior to the JavaScript wrapper.

- align selector resolution and actionability semantics
- preserve exact targets across delayed interactions
- improve text, state, and open shadow tree consistency
- add regression coverage for ordering, mutation races, and force behavior
2026-08-25 01:48:34 +02:00
CloakHQ b90c6702fe fix(banner): bump PRO_MAJOR to 151 2026-08-24 03:37:46 +02:00
CloakHQ c2421da06d feat(info): report session seats as used/limit with real failure reasons
`cloakbrowser info` printed a bare seat count with no denominator, so a
customer could not tell whether they were at capacity (#513). It also
collapsed six distinct outcomes into one "unavailable": unreachable,
timeout, invalid key, inactive licence, rate limited, and the server
reporting the count as unknown while degraded.

Adds SessionSeats (active, limit, state, reason) and getSessionSeats to
all three wrappers; get_active_session_count keeps its signature and
delegates. The limit is read from the server, never derived from the plan
name, and falls back to the old bare count when absent.

Python, JS and .NET renderers verified byte-identical.
2026-08-21 20:22:48 +02:00
CloakHQ 2e5d493416 release: v0.5.8 — humanize post-nav, selectOption, and scroll fixes 2026-08-18 20:25:57 +02:00
CloakHQ a91d105d4d fix(humanize): refresh pre-action element checks after click/form navigation (#507)
Humanized actions could fail with an element-not-attached error after a
navigation driven by a click or form submit, since the checks only refreshed
on goto. Now refresh on any main-frame navigation. Python, JS
Playwright/Puppeteer, and .NET. Regression from 0.5.6.
2026-08-17 21:00:02 +02:00
dependabot[bot] cf194eba26 chore(deps-dev): bump the javascript group across 1 directory with 2 updates (#506)
Bumps the javascript group with 2 updates in the /js directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [puppeteer-core](https://github.com/puppeteer/puppeteer).


Updates `@types/node` from 26.1.2 to 26.2.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `puppeteer-core` from 25.4.0 to 25.7.0
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v25.4.0...puppeteer-core-v25.7.0)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 26.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: javascript
- dependency-name: puppeteer-core
  dependency-version: 25.7.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: javascript
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-17 20:32:01 +02:00
CloakHQ 5494ac14e9 fix(humanize): skip futile scroll for fully-visible boundary elements
A fully-visible element above/below the target zone on a page pinned at
that boundary can never reach the zone, so the scroll loop ran the full
budget (~7s/click) doing nothing. Bail when it's fully visible and the
page can't scroll toward the zone. Ported to JS, Python (sync+async),
and .NET with regression tests.
2026-08-14 08:42:30 +02:00
CloakHQ b27ccd9eae fix(humanize): stop selectOption infinite recursion in JS wrapper
page.selectOption re-dispatches to the main frame's selectOption, which
patchSingleFrame routes back to page.selectOption. Binding the saved
original to the page looped forever; bind it to the main frame's native
method instead. Adds a regression test.
2026-08-14 04:43:48 +02:00
CloakHQ 289c8205b6 release: v0.5.7 — humanize input fixes 2026-08-11 04:14:02 +02:00
CloakHQ ec88026723 fix(humanize): humanize frames nested below the first level
_iter_frames / iterFrames only walked the main frame and its direct
children, so a frame nested 2+ levels deep that already existed when
patching ran was never humanized. The frameattached listener covers
frames added after patching, so this only affected pre-existing deep
frames (e.g. manual patch_page/patch_context on a loaded page).

Recurse the full frame tree; the _human_patched guard keeps it
idempotent. Python + JS; .NET wraps frames lazily and is unaffected.
2026-08-08 18:33:42 +02:00
CloakHQ 2442c32478 fix(humanize): preserve keyboard press timing
Forward caller-provided press delays through humanized page, frame, locator, element handle, and keyboard paths across Python, JavaScript, and .NET.

Use each automation library's native press operation for shortcut chords while retaining the existing humanized pre-press timing and focus behavior.
2026-08-08 01:47:24 +02:00
CloakHQ caf21e9e51 release: v0.5.6 — humanize stealth fixes 2026-08-08 00:12:48 +02:00
CloakHQ 9fa247231b refactor(humanize): route pre-click element reads through a shared DOM helper
Python + JS wrappers. Add a stealth_dom / stealthDom module: reimplements the
common Playwright selector grammar (css, :has-text, text=, xpath=, trailing
>> nth=N) for direct DOM resolution in the isolated execution context, with a
fallback to the regular Playwright read for grammar it can't resolve. World
reads are wrapped so a world/CDP failure falls back rather than propagating out
of the humanized action.

ensure_actionable, ensure_stable, scroll geometry (_get_element_box + the
no_viewport window-size read), and check_pointer_events now read through it,
sync and async. Selector-based main-page actions (click/dblclick/hover/type/
fill/focus/press) are covered; ElementHandle and sub-frame paths unchanged.

JS routes Locator actions through frame methods, so main-frame locator clicks
now delegate to the humanized page methods (which use the shared helpers)
instead of the frame-scoped Playwright reads; sub-frames unchanged.

Tests: builders + parse, the rewired helpers' branching via a mock isolated
world, a Node-driven check of the shipped resolver JS selector semantics, and a
guard that main-frame locator clicks delegate to the humanized page path.
2026-08-07 23:17:59 +02:00
CloakHQ 7f19b2fc0e fix(humanize): preserve behavior in dynamic frames
- humanize frames created after page load across Python and JavaScript\n- keep sync, async, Playwright, and Puppeteer paths idempotent\n- wrap .NET frame lifecycle event payloads without raw frame leaks\n- add cross-wrapper unit and browser regression coverage
2026-08-07 19:52:03 +02:00
CloakHQ c1dd58902a release: v0.5.5 — info --proxy geoip resolution + Python 3.14 humanize fix 2026-08-05 17:35:33 +02:00
CloakHQ 9021e0c07f feat(cli): info --proxy resolves exit IP + timezone + locale
Wire the existing launch()-time geoip resolver into the info/doctor command
across Python, JS, and .NET. With --proxy, info resolves the exit IP and the
timezone/locale a launch would apply (caching the GeoIP DB if absent) and prints
them in text and --json. Plain info is unchanged (no network) and now hints at
the flag. Adds diagnostics tests in all three suites.
2026-08-05 17:32:33 +02:00
dependabot[bot] 306261a2f8 chore(deps): bump the javascript group across 1 directory with 5 updates (#482)
Bumps the javascript group with 5 updates in the /js directory:

| Package | From | To |
| --- | --- | --- |
| [tar](https://github.com/isaacs/node-tar) | `7.5.21` | `7.5.22` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `26.1.1` | `26.1.2` |
| [mmdb-lib](https://github.com/runk/mmdb-lib) | `3.0.2` | `3.0.3` |
| [playwright-core](https://github.com/microsoft/playwright) | `1.61.1` | `1.62.1` |
| [puppeteer-core](https://github.com/puppeteer/puppeteer) | `25.3.0` | `25.4.0` |



Updates `tar` from 7.5.21 to 7.5.22
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.21...v7.5.22)

Updates `@types/node` from 26.1.1 to 26.1.2
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `mmdb-lib` from 3.0.2 to 3.0.3
- [Release notes](https://github.com/runk/mmdb-lib/releases)
- [Commits](https://github.com/runk/mmdb-lib/compare/v3.0.2...v3.0.3)

Updates `playwright-core` from 1.61.1 to 1.62.1
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.61.1...v1.62.1)

Updates `puppeteer-core` from 25.3.0 to 25.4.0
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v25.3.0...puppeteer-core-v25.4.0)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 26.1.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: javascript
- dependency-name: mmdb-lib
  dependency-version: 3.0.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: javascript
- dependency-name: playwright-core
  dependency-version: 1.62.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: javascript
- dependency-name: puppeteer-core
  dependency-version: 25.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: javascript
- dependency-name: tar
  dependency-version: 7.5.22
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: javascript
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-05 16:56:34 +02:00
CloakHQ e4d4c680c9 fix(humanize): re-scroll after the settle wait so clicks land
An element scrolled into view can be pushed off screen again while we wait
for a reflowing page to settle. Nothing scrolled a second time, so the click
was dispatched outside the viewport and hit nothing, with no error raised.

Also stop the pointer-events check from turning a confirmed miss back into
'undetermined' when a late probe times out, which let that click through.

Measured on a page reflowing 10-25s: silent miss at ~32s before, clean click
now. Static pages and pages reflowing past the timeout are unchanged.
2026-08-05 16:29:07 +02:00