Commit Graph
344 Commits
Author SHA1 Message Date
CloakHQ e439d89214 feat(humanize): element reads and dispatch_event run in the humanize world
page.input_value / text_content / inner_text / inner_html / get_attribute and
dispatch_event now resolve and read through the humanize isolated world, like
every other humanized call, for page, frame, locator and element handle (sync
and async). The raw Playwright path stays reachable through page._original /
Original / Humanize.Unwrap.

- shared world helper library gains the inputValue / textContent / innerText /
  innerHTML / getAttribute / dispatchEvent ops (byte-identical across the
  Python, JS and .NET ports)
- engine read() / dispatch() (Python), read / dispatch (JS),
  ReadAsync / DispatchAsync (.NET): deadline, resolve-until-match, one world
  call, {value} / {error} mapping, Playwright error labels
- wrappers expose the six APIs on Page, Frame, Locator and ElementHandle;
  generator delegation guards updated so they stay hand-written
- an ElementHandle read / dispatch on a hidden element, or one sharing its box
  with another element, and a dispatch whose event_init holds a JSHandle, run
  Playwright's own call, as before
- tests: Python unit and real-browser tests, JS real-browser engine tests,
  .NET HumanReadsTests (values, late selector, null / world error / timeout
  mapping, dispatch event shape, frame reads, hidden / same-box handles,
  JSHandle event_init)
2026-10-11 03:46:56 +02:00
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
berce 9dd63a27f0 fix(humanize): accept a compiled Playwright in the internals check (#583)
_check_playwright() looked for `_frame` in
ElementHandle.__init__.__code__.co_names. In a compiled build (e.g.
Nuitka) that code object is a placeholder, so a supported Playwright was
reported as "missing internals: ElementHandle._frame" and every
humanized launch failed.

Only read bytecode from plain Python functions; anything else is left to
the version check.
2026-10-10 23:40:09 +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 v0.6.0 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 3c842adc9f test: run real-browser tests against the real binary cache
Tests marked slow or real_browser skip the per-test temp cache and use
~/.cloakbrowser like a real install: the developer's key and latest
binary at a stable path. The temp cache re-downloaded the keyless
binary for every test under a new path, which path-keyed firewalls
re-prompt for. Unit tests stay isolated.
2026-10-08 08:30:49 +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 a2172a3607 docs: credit @dstosch for cloakserve idle cleanup (#558), ignore agent/ 2026-10-07 23:39:16 +02:00
dstosch a4713cf163 fix(cloakserve): schedule idle cleanup on launch when no WebSocket connects (#558) 2026-10-07 23:19:34 +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].
chromium-v154.0.8037.57.1-pro
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 v0.5.12 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
CloakHQ f44864b6ed ci: run JS tests on Node 22 (vitest 5 engine requirement) 2026-09-29 23:28:36 +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
dependabot[bot] a7b9e1ae62 chore(deps): bump the actions group across 1 directory with 3 updates (#551)
Bumps the actions group with 3 updates in the / directory: [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action), [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) and [docker/build-push-action](https://github.com/docker/build-push-action).


Updates `docker/setup-qemu-action` from 4.2.0 to 4.4.0
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/96fe6ef7f33517b61c61be40b68a1882f3264fb8...99012661954931238ded8c8b007157a8430204e1)

Updates `docker/setup-buildx-action` from 4.2.0 to 4.4.1
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/bb05f3f5519dd87d3ba754cc423b652a5edd6d2c...f87e5991a6d7451dcb8d9637bfbc97413f497069)

Updates `docker/build-push-action` from 7.3.0 to 7.4.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/53b7df96c91f9c12dcc8a07bcb9ccacbed38856a...c3c9e263c25d99ce0380d002d59b67737d91b0dc)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: 7.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: docker/setup-buildx-action
  dependency-version: 4.4.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: docker/setup-qemu-action
  dependency-version: 4.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

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:19 +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 v0.5.11 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 11c76ebe75 fix(dotnet): unwrap HumanizedLocator for Playwright APIs that down-cast ILocator (#549)
Under humanize, page.GetByText(...) returns our HumanizedLocator decorator. Playwright
APIs that internally down-cast an ILocator arg to the concrete Locator (as Locator)
threw NullReferenceException on it. Unwrap to the raw locator before delegating, matching
the existing DragTo/Or/And/SelectOption pattern.

Covers AddLocatorHandlerAsync (both overloads, callback re-wrapped), RemoveLocatorHandlerAsync,
Locator.Filter (Has/HasNot), and Page/ElementHandle ScreenshotAsync (Mask). Also adds
HumanizedLocator to LicenseGuard.Unwrap and a public Humanize.Unwrap(ILocator) escape hatch.
Python/JS unaffected (they monkey-patch in place, no wrapper type).
chromium-v152.0.7977.82.1-pro
2026-09-18 19:48:08 +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
chromium-v151.0.7922.108.6-pro
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 v0.5.10 chromium-v151.0.7922.108.4-pro 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.
chromium-v151.0.7922.108.3-pro
2026-08-27 00:22:05 +02:00
CloakHQ 0811704e7f release: v0.5.9 — humanize selector fixes + info seat reporting v0.5.9 2026-08-25 16:16:33 +02:00
CloakHQ a853517e4c fix(test): run the .NET resolver check from a script file
The test inlines the resolver once per builder call, so adding the selector
engines took the script past 110 KB. Linux caps a single argv entry at
MAX_ARG_STRLEN (128 KB), so "node -e <script>" failed with E2BIG on CI while
passing on macOS, which allows a larger argument.

Write the script to a temp file and pass the path instead, which has no size
ceiling.
2026-08-25 01:48:35 +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 2496cf35e3 fix(dotnet): align humanized selector behavior
Port the proven selector resolution and actionability behavior to the .NET wrapper.

- preserve exact targets across delayed interactions
- align supported locator semantics and legacy fallbacks
- add regression coverage for ordering, mutation races, and scrolling
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 89b2ac0021 Match Playwright ordering across Shadow DOM
Collect light-DOM matches before recursively merging open Shadow Root
matches, preserving Playwright order for broad selectors using first or nth.

Add resolver and real-browser coverage for mixed and nested Shadow Roots.
2026-08-25 01:48:34 +02:00
CloakHQ 5c82b2fa54 Fix humanized selector resolution and actionability
Resolve #512 by ignoring non-rendered document content during text
matching and selecting the same visible target as Playwright.

Improve text, structural, selector-list, and open shadow-root handling.
Align element state checks and forced-click behavior, and prevent pointer
dispatch when the original target is detached or replaced during mouse
movement.

Add sync, async, and real-browser regression coverage.
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 fac70ae84f docs: add CloakBrowser Manager section to README
Self-hosted profile manager, placed after the Pro section so the shared-key
story lands. Links to the site instead of pinning installer versions here.
2026-08-22 17:34:11 +02:00
CloakHQ 7b08984976 build(docker): declare fonts-urw-base35 explicitly
The image already ships these fonts, but only as a transitive dependency of
openbox (openbox -> libimlib2 -> libspectre -> libgs10 -> fonts-urw-base35).
They are what Verdana, Georgia, Trebuchet MS and Tahoma fall back to; without
them fontconfig resolves those families to the CJK font instead of a Latin one.

Listing the package directly means a future change to the window manager or
X stack cannot silently drop the Latin fallback. No runtime change.
2026-08-21 23:39:37 +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 be75a9b9e4 docs: clarify cloakserve CDP session cleanup 2026-08-20 23:07:57 +02:00