clearcote 0.41.0 → 0.42.0

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.
package/README.md CHANGED
@@ -155,6 +155,23 @@ On an older engine each of these is skipped with a warning; the launch still wor
155
155
 
156
156
  `stockRuntime: true` (or `CLEARCOTE_STOCK_RUNTIME=1`) gives Playwright the browser's stock DevTools behaviour back: `page.on("console")` and `page.on("pageerror")` receive events, `page.setContent()` works, and `exposeFunction()` / `exposeBinding()` keep working after a navigation. It is off by default because pages can observe some of what it restores. It needs an engine from r32 on; an older engine launches without it and the SDK warns once. It applies to local and Docker launches, not to cloud browsers.
157
157
 
158
+ ### On engines from r32 (`personaEnv`, light or dark)
159
+
160
+ Two more things change on an engine that supports them (the licensed build from r32). The SDK checks the binary
161
+ for each one first, so an older engine launches exactly as before.
162
+
163
+ - **The persona stays off the command line** (`personaEnv`, on by default). The seed, every persona override,
164
+ proxy credentials and the canvas-bridge token reach the browser in the `CLEARCOTE_PERSONA_ARGS` environment
165
+ variable instead of on its command line, which any local user can read (`/proc/<pid>/cmdline` on Linux, the
166
+ process details on Windows). `personaEnv: false` or `CLEARCOTE_PERSONA_ENV=0` keeps them on the command line. A
167
+ Docker launch hands the choice to the container.
168
+ - **Light or dark comes from the persona.** The engine picks the persona's colour scheme (about one persona in
169
+ three is dark; `--fingerprint-color-scheme=light|dark` in `args` forces one), and CSS, `matchMedia`, the
170
+ `Sec-CH-Prefers-Color-Scheme` header and system colours follow it. Playwright emulates light in every context it
171
+ creates, which a dark persona would contradict, so on such an engine `launch()` and
172
+ `launchPersistentContext()` leave the colour scheme unemulated (`colorScheme: null`). Pass `colorScheme`
173
+ yourself to emulate one anyway. Docker and cloud launches are unchanged.
174
+
158
175
  Also: `licenseThroughProxy: true` (or `CLEARCOTE_LICENSE_THROUGH_PROXY=1`) sends the licence calls through the launch proxy; `releaseChannel: "preview"` (or `CLEARCOTE_RELEASE_CHANNEL`) picks up PRO preview builds; `getSessionSeats()` reports seats in use.
159
176
 
160
177
  ### Through a proxy (report the proxy's IP, not your host's)
@@ -190,7 +207,7 @@ Geo data comes from the offline [geoip-all-in-one](https://github.com/daijro/geo
190
207
 
191
208
  ### Humanized input (`humanize`, `showCursor`)
192
209
 
193
- `humanize: true` installs **one consistent human-input standard** across every Playwright surface (`page.click`/`hover`/`dblclick`/`type`/`fill`/`press`/`selectOption`, `page.mouse.*`, `page.keyboard.type`/`press`, and the `Locator` equivalents incl. `dragTo`), dispatched as **native trusted input** (`isTrusted === true`, `navigator.webdriver` stays `false`). Mouse paths are slightly bowed cubic-beziers from the *last* cursor position (no snap to the corner), walked as a **sum of sub-movements with a min-jerk velocity profile** (a ballistic primary + corrective move — multi-peak velocity, not one symmetric bell); a held `mouse.down()` stays pressed across the move so `down → move → up` is a real drag. Typing is key-by-key with **gaussian inter-key timing** + word-boundary pauses + the occasional fat-finger correction (bulk values over 200 chars stay atomic). Scrolling uses **ease-out inertia** with the occasional reading pause, and moves the pointer over the content first when it isn't already there (a wheel event carries the cursor position). `<select>` options are chosen by stepping the focused, closed dropdown with the arrow keys, so the browser — not a script — emits the `change` event. `showCursor: true` injects a cursor dot for headed runs. Both default off.
210
+ `humanize: true` installs **one consistent human-input standard** across every Playwright surface (`page.click`/`hover`/`dblclick`/`type`/`fill`/`press`/`selectOption`, `page.mouse.*`, `page.keyboard.type`/`press`, and the `Locator` equivalents incl. `dragTo`), dispatched as **native trusted input** (`isTrusted === true`, `navigator.webdriver` stays `false`). Mouse paths are slightly bowed cubic-beziers from the *last* cursor position (no snap to the corner), walked as a **sum of sub-movements with a min-jerk velocity profile** (a ballistic primary + corrective move — multi-peak velocity, not one symmetric bell); a held `mouse.down()` stays pressed across the move so `down → move → up` is a real drag. Typing is key-by-key with **gaussian inter-key timing** + word-boundary pauses + the occasional fat-finger correction + **key rollover** (on some fast pairs the next key goes down before the previous one comes up, at a rate fixed per identity; bulk values over 200 chars stay atomic). Scrolling moves in **whole wheel notches** (100 px on a Windows identity, 120 on Linux, 40 on macOS; the requested distance is rounded to the nearest notch, at least one), because a browser reports every wheel event as one full notch, in short flicks with the occasional reading pause, and moves the pointer over the content first when it isn't already there (a wheel event carries the cursor position). `<select>` options are chosen by stepping the focused, closed dropdown with the arrow keys, so the browser — not a script — emits the `change` event. `showCursor: true` injects a cursor dot for headed runs. Both default off.
194
211
 
195
212
  ### Render-backend coherence check (`checkRenderCoherence`)
196
213
 
@@ -213,7 +230,38 @@ On a Linux host the SDK picks the software backend that matches the GPU the pers
213
230
 
214
231
  ### Hardened launch defaults
215
232
 
216
- Every `launch()` already, with no extra options: **drops Playwright's `--enable-automation`** (so the engine's `AutomationControlled` feature stays off — pass your own `ignoreDefaultArgs` to override); **disables QUIC/HTTP-3 when a proxy is set** (a SOCKS5/HTTP proxy carries only TCP, so no UDP egresses around it); and prints a one-line **coherence warning** to stderr for incoherent option combos (silence with `quiet: true` or `CLEARCOTE_NO_WARN=1`).
233
+ Every `launch()` already, with no extra options: **drops Playwright's `--enable-automation`** (so the engine's `AutomationControlled` feature stays off — pass your own `ignoreDefaultArgs` to override); **disables QUIC/HTTP-3 when a proxy is set** (a SOCKS5/HTTP proxy carries only TCP, so no UDP egresses around it); and prints a one-line **coherence warning** to stderr for incoherent option combos (silence with `quiet: true` or `CLEARCOTE_NO_WARN=1`). That includes a one-time warning when a launch claims Linux on a Windows host: Direct3D caps the WebGL and WebGPU limits there, and a persona can lower a limit but never raise one past the driver's, so a Linux persona reports limits no Linux machine has (claim `platform: "windows"` on Windows, or run Linux personas on Linux or in Docker with `docker: true`). On Linux a headless launch's display is sized to the persona's screen (`--screen-info`; your own wins), so full-screen, pop-ups and moved windows stay inside the screen the page is told about.
234
+
235
+ ### Your own fonts on Linux (`fontDirs`)
236
+
237
+ On Linux the browser sees only the fonts the SDK points it at: the release's bundle of Windows metric-compatible
238
+ lookalikes (Arial→Arimo, Segoe UI→Selawik, Times New Roman→Tinos, …). Fonts installed on the host never reach it,
239
+ so nothing on the machine changes what a page measures. Two settings add directories (`launch()`, persistent
240
+ contexts and `serve()`):
241
+
242
+ - `fontDirs: [...]`, or `CLEARCOTE_FONT_DIRS` (directories separated by `:`): your own fonts, typically a copy of a
243
+ Windows machine's `C:\Windows\Fonts`, listed ahead of the bundle. On an engine that lets a genuine face win over
244
+ its lookalike (the licensed build from r32), every family they provide renders as itself, and the names that
245
+ stand for it on Windows follow: Helvetica, Times and Courier, and the CSS generics (`sans-serif` → Arial, `serif` →
246
+ Times New Roman, `monospace` → Consolas, `system-ui` → Segoe UI). An older engine keeps its lookalikes for the
247
+ families a persona lists and uses the directories only for characters nothing else covers. A path that is not a
248
+ directory throws before the licence lease.
249
+ - `CLEARCOTE_FALLBACK_FONT_DIRS`: fonts used only for characters nothing else covers (CJK, Indic scripts, emoji,
250
+ …), listed after the bundle; they take no family over. The Docker image sets it to the script fonts it ships.
251
+
252
+ ```js
253
+ import { launch } from "clearcote";
254
+
255
+ // a copy of a Windows machine's C:\Windows\Fonts on the Linux host
256
+ const browser = await launch({ fingerprint: "acct-1", platform: "windows", fontDirs: ["/srv/windows-fonts"] });
257
+ ```
258
+
259
+ `npx clearcote info` reports which of 29 writing systems the fonts a launch would see can draw, your font directories,
260
+ and which of the key Windows families they provide for real. Never point either setting at all of
261
+ `/usr/share/fonts`: the host's Latin families then compete with the bundle and change the widths a Windows persona
262
+ reports. `--disable-genuine-font-faces` in `args` (r32+) keeps the lookalikes even with your fonts listed, and the
263
+ SDK then leaves its font rules alone. Ignored on Windows and macOS, which use their own fonts; refused for cloud and
264
+ Docker launches (in your own container, set `CLEARCOTE_FONT_DIRS` there). Only use fonts you are licensed to use.
217
265
 
218
266
  ### Persistent profile
219
267
 
@@ -254,6 +302,10 @@ await ctx.close();
254
302
 
255
303
  - Requires a **persistent** context (the CDM lives in `userDataDir`) — not the incognito `launch()`.
256
304
  - The CDM is cached under `~/.clearcote/WidevineCdm`; fetch it ahead of time with `fetchWidevine()`.
305
+ - On an engine from r32 the SDK also passes `--widevine-cdm-path`, pointing at the fetched CDM, so the browser
306
+ registers it at startup in every profile without waiting for the component updater. Older engines keep the
307
+ seeded-profile route. For a launch the option does not cover, add `--widevine-cdm-path=<dir>` to `args` yourself,
308
+ with the directory `fetchWidevine()` returns.
257
309
  - It's **opt-in**: the clearcote package never distributes Google's CDM — *you* trigger the download.
258
310
  - Software-secure (L3) playback. Hardware-secure (L1) paths are out of scope.
259
311
 
@@ -21,13 +21,30 @@ export interface HeadlessGeometry {
21
21
  viewport: Size;
22
22
  }
23
23
  /**
24
- * Whether `--fingerprint=<seed>` is on the command line, i.e. the engine spoofs screen/avail itself
25
- * (regime 1). `lightStealth` drops that switch on purpose, so this is false for it even though a
26
- * seed was passed to the SDK.
24
+ * Whether a persona is active for this launch, i.e. the engine spoofs screen/avail itself (regime 1):
25
+ * `--fingerprint=<seed>` on the command line, or the persona transport's `--persona-from-env` marker
26
+ * when the seed already moved to the environment (./personaenv.ts). `lightStealth` drops the seed on
27
+ * purpose, so this is false for it even though a seed was passed to the SDK.
27
28
  */
28
29
  export declare function personaActive(args?: readonly string[] | null): boolean;
29
- /** True when the caller passed their own window geometry flag. */
30
+ /**
31
+ * True when the caller passed their own window geometry flag (size, position or maximize): the
32
+ * window is theirs, so the SDK neither moves nor fits it.
33
+ */
30
34
  export declare function callerSizedTheWindow(args?: readonly string[] | null): boolean;
35
+ /**
36
+ * True when the caller fixed the window's SIZE (`--window-size` / `--start-maximized`), as opposed
37
+ * to only placing it with `--window-position`.
38
+ */
39
+ export declare function callerFixedTheSize(args?: readonly string[] | null): boolean;
40
+ /**
41
+ * Whether a HEADED launch gets the first-page window fit: a Linux host (no window manager under
42
+ * Xvfb/Docker, so nothing else maximizes the window) and no window switch of the caller's own.
43
+ * Measured (SC 180): `--start-maximized` is a no-op there; CDP `Browser.setWindowBounds` before the
44
+ * first navigation gives `outer == avail` at (0,0) with zero resize events. Other headed platforms
45
+ * keep the plain `viewport: null`: their window manager sizes the window.
46
+ */
47
+ export declare function headedLinuxFit(args?: readonly string[] | null, platform?: NodeJS.Platform): boolean;
31
48
  /**
32
49
  * The imported profile's own screen, or null.
33
50
  *
@@ -60,7 +77,8 @@ export interface DisplayFingerprint {
60
77
  availHeight?: number;
61
78
  }
62
79
  export type AppliedGeometry =
63
- /** On Linux, args carries the persona's real headless display (`--screen-info`). */
80
+ /** args carries the seed's fallback headless display (`--screen-info`) on every platform (the
81
+ * engine's own persona display wins over it); empty when the caller set the display. */
64
82
  {
65
83
  mode: "persona";
66
84
  args: string[];
@@ -75,9 +93,12 @@ export type AppliedGeometry =
75
93
  * Default a headless launch's geometry; returns what was applied, or null.
76
94
  *
77
95
  * Both regimes set `viewport: null` in `opts` (so innerWidth tracks the real window) and leave the
78
- * window to be fitted to the work area on the first page (see {@link installWindowFixup}). Regime 2
79
- * also returns the switches that give the browser its headless display — `args`, to append to the
80
- * command line; the fit and skip checks keep reading the caller's own `args`, not these.
96
+ * window to be fitted to the work area on the first page (see {@link installWindowFixup}). Both also
97
+ * return the switches that give the browser its headless display — `args`, to append to the command
98
+ * line; the fit and skip checks keep reading the caller's own `args`, not these. Under a persona the
99
+ * engine's own display wins over `--screen-info` (measured on r32 Linux and r33 Windows: the seed's
100
+ * screen shows, the switch is ignored), so that row is a fallback for a persona that does not
101
+ * engage, never a contradiction — it keeps such a launch off the 800x600 headless surface (SC 180).
81
102
  *
82
103
  * Skipped when headed (the real window is already coherent) and when the caller expressed ANY
83
104
  * geometry intent — `viewport` (including an explicit null) or `screen`. `headless` unset means
@@ -102,12 +123,15 @@ export declare function applyHeadlessGeometry(opts: Record<string, unknown>, see
102
123
  */
103
124
  export declare function fitPlan(avail: number[], outer: number[], room?: readonly number[] | null): [number, number] | null;
104
125
  /**
105
- * Size the headless window to the display's work area — the persona's (regime 1) or the one
106
- * `--screen-info` set (regime 2) — so the page reports a maximized window (outer == avail) instead
107
- * of the headless default window sitting inside a much larger screen.
126
+ * Size the window to the display's work area — the persona's (regime 1) or the one `--screen-info`
127
+ * set (regime 2) — so the page reports a maximized window (outer == avail) instead of the default
128
+ * window sitting inside a much larger screen.
108
129
  *
109
- * `--start-maximized` and CDP `windowState: "maximized"` are both no-ops in headless (measured — the
110
- * window stays at its default size), which is why this sets explicit bounds.
130
+ * Headless, and headed on Linux without a window manager (Xvfb, every Docker/VPS headful run; see
131
+ * {@link headedLinuxFit}): there `--start-maximized` and CDP `windowState: "maximized"` are both
132
+ * no-ops (measured — the window stays Chrome's 945x1060 default at (10,10)), which is why this sets
133
+ * explicit bounds. Skipped for ANY caller window flag, a bare `--window-position` included: a placed
134
+ * window is theirs to keep.
111
135
  *
112
136
  * Never throws: a geometry improvement must not be able to fail a launch.
113
137
  */
@@ -132,10 +156,12 @@ export interface Display {
132
156
  export interface ServedGeometry {
133
157
  /** true: the persona owns the display, which is matched after launch (see fitServedWindow). */
134
158
  persona: boolean;
135
- /** Regime 2: the display serve() launches with. null under a persona. */
136
- display: Display | null;
159
+ /** The display `--screen-info` sets: regime 2's own, or the fallback row under a persona. */
160
+ display: Display;
137
161
  /** Switches for the command line. */
138
162
  args: string[];
163
+ /** false when the caller placed the window (`--window-position`): serve() skips the window fit. */
164
+ fit: boolean;
139
165
  }
140
166
  export declare function callerSetTheDisplay(args?: readonly string[] | null): boolean;
141
167
  /**
@@ -159,8 +185,16 @@ export declare function servedDisplay(o: {
159
185
  export declare function screenInfoSwitch(d: Display): string;
160
186
  /**
161
187
  * What serve() adds for a headless launch, or null to leave geometry alone: headed (a real display),
162
- * or the caller passed a window or display switch of their own. The SDK's own android
188
+ * or the caller passed a display switch or fixed the window's size. The SDK's own android
163
189
  * `--window-size` counts as one: a phone persona sizes itself.
190
+ *
191
+ * A caller who only PLACED the window (`--window-position`) still gets the display: the switch says
192
+ * where the window goes, not how big the screen is. Only the fit is skipped then (`fit: false`), so
193
+ * their position holds.
194
+ *
195
+ * Both regimes pass `--screen-info`: under a persona the engine's own display wins over it (measured
196
+ * on r32 Linux and r33 Windows), so the row is a fallback for a persona that does not engage rather
197
+ * than a contradiction; without one it IS the display.
164
198
  */
165
199
  export declare function servedGeometry(engineArgs: readonly string[], fp: {
166
200
  fingerprint?: string | number | null;
@@ -1 +1 @@
1
- {"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../src/geometry.ts"],"names":[],"mappings":"AAsDA,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAI5D;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,6FAA6F;AAC7F,eAAO,MAAM,wBAAwB,EAAE,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAS7F,CAAC;AAKF,MAAM,WAAW,IAAI;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AACvD,MAAM,WAAW,gBAAgB;IAAG,MAAM,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,IAAI,CAAA;CAAE;AAElE;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,GAAG,OAAO,CAEtE;AAED,kEAAkE;AAClE,wBAAgB,oBAAoB,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,GAAG,OAAO,CAE7E;AA8BD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAiB9F;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,gBAAgB,CAGhF;AAED,8DAA8D;AAC9D,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;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AAe,CACnC,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,IAAI,EAAE;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GACvE,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAY3B"}
package/dist/geometry.js CHANGED
@@ -7,7 +7,8 @@
7
7
  * and what it reports depends on whether the engine's persona machinery is running. Regime 1 was
8
8
  * measured on 149.0.7827.114/linux-x64, regime 2 on win-x64 149 and 153 (below).
9
9
  *
10
- * REGIME 1 — a persona is active (`--fingerprint=<seed>` on the command line). The engine spoofs
10
+ * REGIME 1 — a persona is active (`--fingerprint=<seed>` on the command line, or the persona
11
+ * transport's `--persona-from-env` marker once the seed moved to the environment). The engine spoofs
11
12
  * screen AND avail from the seed, including a taskbar (seed A -> 1920x1080 / avail 1920x1040, seed B
12
13
  * -> 2560x1440 / 1400, seed C -> 1600x900 / 860), and its values BEAT a CDP screen override — so the
13
14
  * SDK must not try to set screen here, it would silently lose. Leaving Playwright's emulated viewport
@@ -76,20 +77,52 @@ export const HEADLESS_SCREEN_PROFILES = [
76
77
  [3840, 2160, 2, "windows"],
77
78
  [1680, 1050, 2, "windows"],
78
79
  ];
79
- /** Window flags that mean the caller sized the window themselves. */
80
+ /** Window flags that mean the caller sized the window themselves (the fit skips its resize). */
80
81
  const CALLER_WINDOW_FLAGS = ["--window-size", "--window-position", "--start-maximized"];
81
82
  /**
82
- * Whether `--fingerprint=<seed>` is on the command line, i.e. the engine spoofs screen/avail itself
83
- * (regime 1). `lightStealth` drops that switch on purpose, so this is false for it even though a
84
- * seed was passed to the SDK.
83
+ * The subset that fixes the window's SIZE. A bare `--window-position` only places it: the SDK still
84
+ * gives the browser a realistic display and skips only the fit (SC 180: the hosted gateway passed
85
+ * `--window-position=10,10` and lost the display with it, so every session showed the 800x600 surface).
86
+ */
87
+ const CALLER_SIZE_FLAGS = ["--window-size", "--start-maximized"];
88
+ /** The persona transport's marker (./personaenv.ts, SDK 0.41+): the seed left argv for the environment. */
89
+ const PERSONA_ENV_SWITCH = "--persona-from-env";
90
+ /**
91
+ * Whether a persona is active for this launch, i.e. the engine spoofs screen/avail itself (regime 1):
92
+ * `--fingerprint=<seed>` on the command line, or the persona transport's `--persona-from-env` marker
93
+ * when the seed already moved to the environment (./personaenv.ts). `lightStealth` drops the seed on
94
+ * purpose, so this is false for it even though a seed was passed to the SDK.
85
95
  */
86
96
  export function personaActive(args) {
87
- return (args ?? []).some((a) => String(a).startsWith("--fingerprint="));
97
+ return (args ?? []).some((a) => {
98
+ const s = String(a);
99
+ return s.startsWith("--fingerprint=") || s === PERSONA_ENV_SWITCH || s.startsWith(PERSONA_ENV_SWITCH + "=");
100
+ });
88
101
  }
89
- /** True when the caller passed their own window geometry flag. */
102
+ /**
103
+ * True when the caller passed their own window geometry flag (size, position or maximize): the
104
+ * window is theirs, so the SDK neither moves nor fits it.
105
+ */
90
106
  export function callerSizedTheWindow(args) {
91
107
  return (args ?? []).some((a) => CALLER_WINDOW_FLAGS.includes(String(a).split("=")[0]));
92
108
  }
109
+ /**
110
+ * True when the caller fixed the window's SIZE (`--window-size` / `--start-maximized`), as opposed
111
+ * to only placing it with `--window-position`.
112
+ */
113
+ export function callerFixedTheSize(args) {
114
+ return (args ?? []).some((a) => CALLER_SIZE_FLAGS.includes(String(a).split("=")[0]));
115
+ }
116
+ /**
117
+ * Whether a HEADED launch gets the first-page window fit: a Linux host (no window manager under
118
+ * Xvfb/Docker, so nothing else maximizes the window) and no window switch of the caller's own.
119
+ * Measured (SC 180): `--start-maximized` is a no-op there; CDP `Browser.setWindowBounds` before the
120
+ * first navigation gives `outer == avail` at (0,0) with zero resize events. Other headed platforms
121
+ * keep the plain `viewport: null`: their window manager sizes the window.
122
+ */
123
+ export function headedLinuxFit(args, platform = process.platform) {
124
+ return platform === "linux" && !callerSizedTheWindow(args);
125
+ }
93
126
  /**
94
127
  * Weighted, deterministic choice from {@link HEADLESS_SCREEN_PROFILES}. Same construction as
95
128
  * `lightStealthValues`: the full sha256 digest as a big integer, so Python, Node and .NET select the
@@ -167,9 +200,12 @@ export function headlessGeometry(seed) {
167
200
  * Default a headless launch's geometry; returns what was applied, or null.
168
201
  *
169
202
  * Both regimes set `viewport: null` in `opts` (so innerWidth tracks the real window) and leave the
170
- * window to be fitted to the work area on the first page (see {@link installWindowFixup}). Regime 2
171
- * also returns the switches that give the browser its headless display — `args`, to append to the
172
- * command line; the fit and skip checks keep reading the caller's own `args`, not these.
203
+ * window to be fitted to the work area on the first page (see {@link installWindowFixup}). Both also
204
+ * return the switches that give the browser its headless display — `args`, to append to the command
205
+ * line; the fit and skip checks keep reading the caller's own `args`, not these. Under a persona the
206
+ * engine's own display wins over `--screen-info` (measured on r32 Linux and r33 Windows: the seed's
207
+ * screen shows, the switch is ignored), so that row is a fallback for a persona that does not
208
+ * engage, never a contradiction — it keeps such a launch off the 800x600 headless surface (SC 180).
173
209
  *
174
210
  * Skipped when headed (the real window is already coherent) and when the caller expressed ANY
175
211
  * geometry intent — `viewport` (including an explicit null) or `screen`. `headless` unset means
@@ -183,9 +219,9 @@ export function applyHeadlessGeometry(opts, seed, args, fp = {}) {
183
219
  return null;
184
220
  opts.viewport = null;
185
221
  if (personaActive(args)) {
186
- const display = process.platform === "linux" && !callerSetTheDisplay(args)
187
- ? servedDisplay({ ...fp, seed, args, lightStealth: false })
188
- : null;
222
+ // The persona's own display wins over --screen-info on every platform (SC 180), so the SDK's row
223
+ // is a fallback for a persona that does not engage, never a contradiction.
224
+ const display = callerSetTheDisplay(args) ? null : servedDisplay({ ...fp, seed, args, lightStealth: false });
189
225
  return { mode: "persona", args: display ? [screenInfoSwitch(display)] : [] };
190
226
  }
191
227
  // Not lightStealth's own row, unlike serve(): launch() keeps the seed -> screen row the Python and
@@ -285,12 +321,15 @@ async function fitWindow(setBounds, read, target, room, settleMs) {
285
321
  return (await settledOuter(read, fixed.outer, target, settleMs)).outer;
286
322
  }
287
323
  /**
288
- * Size the headless window to the display's work area — the persona's (regime 1) or the one
289
- * `--screen-info` set (regime 2) — so the page reports a maximized window (outer == avail) instead
290
- * of the headless default window sitting inside a much larger screen.
324
+ * Size the window to the display's work area — the persona's (regime 1) or the one `--screen-info`
325
+ * set (regime 2) — so the page reports a maximized window (outer == avail) instead of the default
326
+ * window sitting inside a much larger screen.
291
327
  *
292
- * `--start-maximized` and CDP `windowState: "maximized"` are both no-ops in headless (measured — the
293
- * window stays at its default size), which is why this sets explicit bounds.
328
+ * Headless, and headed on Linux without a window manager (Xvfb, every Docker/VPS headful run; see
329
+ * {@link headedLinuxFit}): there `--start-maximized` and CDP `windowState: "maximized"` are both
330
+ * no-ops (measured — the window stays Chrome's 945x1060 default at (10,10)), which is why this sets
331
+ * explicit bounds. Skipped for ANY caller window flag, a bare `--window-position` included: a placed
332
+ * window is theirs to keep.
294
333
  *
295
334
  * Never throws: a geometry improvement must not be able to fail a launch.
296
335
  */
@@ -324,13 +363,18 @@ export async function installWindowFixup(context, args) {
324
363
  await fitWindowToWorkArea(page, args);
325
364
  return page;
326
365
  };
327
- const existing = context.pages();
328
- if (existing.length) {
329
- await fix(existing[0]);
330
- return;
366
+ try {
367
+ const existing = context.pages();
368
+ if (existing.length) {
369
+ await fix(existing[0]);
370
+ return;
371
+ }
372
+ const origNewPage = context.newPage.bind(context);
373
+ context.newPage = async () => fix(await origNewPage());
374
+ }
375
+ catch {
376
+ // deliberately silent: a geometry improvement must not be able to fail a launch
331
377
  }
332
- const origNewPage = context.newPage.bind(context);
333
- context.newPage = async () => fix(await origNewPage());
334
378
  }
335
379
  /** `inner <= outer <= avail <= screen` on both axes — the chain a real window satisfies. */
336
380
  export function geometryIsCoherent(screen, avail, inner, outer) {
@@ -360,10 +404,15 @@ export function geometryIsCoherent(screen, avail, inner, outer) {
360
404
  // REGIME 1 (persona): the persona picks its display inside the engine, so it is only known once a
361
405
  // page can be asked. `Emulation.updateScreen` (headless-only, browser-level, outlives the session
362
406
  // that sent it) then resizes the headless display to match. A fixed larger stand-in display would
363
- // let the window grow, but lets a big popup overhang the persona's screen.
407
+ // let the window grow, but lets a big popup overhang the persona's screen. The seed's `--screen-info`
408
+ // row still goes on the command line as a FALLBACK: the engine's persona display wins over it
409
+ // (measured on r32 Linux and r33 Windows), so a persona that does not engage never leaves the
410
+ // browser on the 800x600 surface (SC 180).
364
411
  //
365
412
  // BOTH: one `Browser.setWindowBounds` puts the first window on the work area, and
366
- // `--window-position` puts later windows at the work-area origin. Deliberately no `--window-size`:
413
+ // `--window-position` puts later windows at the work-area origin — unless the caller placed the
414
+ // window themselves (`--window-position`): their position holds, the display is still set and only
415
+ // the fit is skipped (`fit: false`). Deliberately no `--window-size`:
367
416
  // it forces every popup to that size, ignoring the window.open() features real Chrome honours.
368
417
  // Measured after the fitting connection closed, both regimes: first tab, second tab, a 500x400
369
418
  // popup, a 4000x3000 popup (clamped to the work area) and a new context's window all coherent.
@@ -413,17 +462,28 @@ export function screenInfoSwitch(d) {
413
462
  }
414
463
  /**
415
464
  * What serve() adds for a headless launch, or null to leave geometry alone: headed (a real display),
416
- * or the caller passed a window or display switch of their own. The SDK's own android
465
+ * or the caller passed a display switch or fixed the window's size. The SDK's own android
417
466
  * `--window-size` counts as one: a phone persona sizes itself.
467
+ *
468
+ * A caller who only PLACED the window (`--window-position`) still gets the display: the switch says
469
+ * where the window goes, not how big the screen is. Only the fit is skipped then (`fit: false`), so
470
+ * their position holds.
471
+ *
472
+ * Both regimes pass `--screen-info`: under a persona the engine's own display wins over it (measured
473
+ * on r32 Linux and r33 Windows), so the row is a fallback for a persona that does not engage rather
474
+ * than a contradiction; without one it IS the display.
418
475
  */
419
476
  export function servedGeometry(engineArgs, fp, headless = true) {
420
- if (!headless || callerSizedTheWindow(engineArgs) || callerSetTheDisplay(engineArgs))
477
+ if (!headless || callerFixedTheSize(engineArgs) || callerSetTheDisplay(engineArgs))
421
478
  return null;
422
- const origin = "--window-position=0,0";
423
- if (personaActive(engineArgs))
424
- return { persona: true, display: null, args: [origin] };
479
+ const placed = callerSizedTheWindow(engineArgs); // a bare --window-position: keep theirs, skip the fit
425
480
  const display = servedDisplay({ ...fp, seed: fp.fingerprint, args: engineArgs });
426
- return { persona: false, display, args: [screenInfoSwitch(display), origin] };
481
+ return {
482
+ persona: personaActive(engineArgs),
483
+ display,
484
+ args: [screenInfoSwitch(display), ...(placed ? [] : ["--window-position=0,0"])],
485
+ fit: !placed,
486
+ };
427
487
  }
428
488
  const DISPLAY_JS = "[screen.width, screen.height, screen.availLeft, screen.availTop, screen.availWidth, screen.availHeight]";
429
489
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"geometry.js","sourceRoot":"","sources":["../src/geometry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,EAAE,UAAU,EAAsB,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AACpC,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEvC,6FAA6F;AAC7F,MAAM,CAAC,MAAM,wBAAwB,GAA6D;IAChG,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,CAAC;IAC3B,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,CAAC;IAC3B,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,CAAC;IACxB,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,SAAS,CAAC;IACzB,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,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AE,GAAG,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC,EAAE,IAAI,CAAC,QAAQ,IAAI,SAAS,CAAC,CAAC;QAC/D,OAAO,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9G,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;YAAS,CAAC;QACT,IAAI,SAAS;YAAE,MAAM,GAAG,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IAC1F,CAAC;AACH,CAAC;AAED,oGAAoG;AACpG,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,KAAyB,EACzB,IAAwE;IAExE,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,IAAI,GAAG,GAAyB,IAAI,CAAC;IACrC,IAAI,CAAC;QACH,2FAA2F;QAC3F,GAAG,GAAG,MAAM,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC;QACtD,OAAO,MAAM,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC3C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;YAAS,CAAC;QACT,GAAG,EAAE,KAAK,EAAE,CAAC;IACf,CAAC;AACH,CAAC"}
@@ -12,6 +12,17 @@ export interface HumanizeOptions {
12
12
  * an addInitScript source string AND when passed to page.evaluate. */
13
13
  export declare const CURSOR_OVERLAY = "(() => {\n if (window.__clearcoteCursor) return; window.__clearcoteCursor = 1;\n const make = () => {\n if (document.getElementById('__clearcote_cursor')) return;\n const d = document.createElement('div'); d.id = '__clearcote_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('__clearcote_cursor');\n if (d) { d.style.left = e.clientX + 'px'; d.style.top = e.clientY + 'px'; }\n }, true);\n})();";
14
14
  /** @internal exported for tests */
15
+ export declare const POINTER_PATH = "Browser.dispatchPointerPath";
16
+ /** @internal exported for tests */
17
+ export declare const POINTER_PATH_LEGACY = "Browser.humanizedClick";
18
+ /** @internal exported for tests. Send `method`, or `legacy` when the engine predates the rename, and
19
+ * remember per `cacheKey` (a Browser, or the context when there is none) which one answered. Any
20
+ * error other than method-not-found propagates as-is: retrying a real failure under the old name
21
+ * would only replay it. */
22
+ export declare function sendEngineCommand(session: {
23
+ send(method: string, params?: any): Promise<any>;
24
+ }, cacheKey: object, method: string, legacy: string, params: Record<string, unknown>): Promise<any>;
25
+ /** @internal exported for tests */
15
26
  export declare const needsShift: (ch: string) => boolean;
16
27
  /** Wrap a single page's input methods + (optionally) inject the cursor overlay. */
17
28
  export declare function attachHumanize(browser: Browser, page: Page, opts: HumanizeOptions): Promise<void>;
@@ -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;AAI9E,MAAM,WAAW,eAAe;IAC9B,iFAAiF;IACjF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oEAAoE;IACpE,UAAU,CAAC,EAAE,OA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