From a350912d2e3caf91808a69defbb596aca493c283 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 25 Nov 2026 21:53:45 +0000 Subject: [PATCH 1/3] Add operatingSystem and disableSoftwareWebGL browser params Fetch, batch fetch and crawl browser options accept operatingSystem (single OperatingSystem value) and disableSoftwareWebGL. Session creation accepts disableSoftwareWebGL, which makes Ultra drop software WebGL. Bump version to 1.5.7. Co-authored-by: Nikhil Shahi --- package.json | 2 +- src/types/session.ts | 2 ++ src/types/web/common.ts | 10 +++++++++- tests/unit/public-types-contract.test.ts | 20 ++++++++++++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 93ab44d..aa3d43a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hyperbrowser/sdk", - "version": "1.5.6", + "version": "1.5.7", "description": "Node SDK for Hyperbrowser API", "author": "", "repository": { diff --git a/src/types/session.ts b/src/types/session.ts index d7f4f5b..2280c80 100644 --- a/src/types/session.ts +++ b/src/types/session.ts @@ -274,6 +274,8 @@ export interface CreateSessionParams { liveViewTtlSeconds?: number; replaceNativeElements?: boolean; disablePostQuantumKeyAgreement?: boolean; + /** When true, Ultra sessions drop software (SwiftShader) WebGL. Defaults to false. */ + disableSoftwareWebGL?: boolean; browserMemorySize?: BrowserMemorySize; startFromSnapshot?: StartSessionFromSnapshotParams; /** diff --git a/src/types/web/common.ts b/src/types/web/common.ts index 76c72ce..22fdf60 100644 --- a/src/types/web/common.ts +++ b/src/types/web/common.ts @@ -1,4 +1,4 @@ -import { Country, State } from "../constants"; +import { Country, OperatingSystem, State } from "../constants"; import { ScreenConfig } from "../session"; import { BrandingProfile } from "./branding"; @@ -104,6 +104,14 @@ export interface FetchBrowserOptions { screen?: ScreenConfig; profileId?: string; solveCaptchas?: boolean; + /** Operating system the browser fingerprint claims. Defaults to the platform default. */ + operatingSystem?: OperatingSystem; + /** + * Skip forced SwiftShader (software) WebGL rendering. Defaults to false. On + * machines without a GPU, WebGL content may be unavailable, including in + * screenshots. + */ + disableSoftwareWebGL?: boolean; location?: FetchBrowserLocationOptions; } diff --git a/tests/unit/public-types-contract.test.ts b/tests/unit/public-types-contract.test.ts index d846b85..71ca493 100644 --- a/tests/unit/public-types-contract.test.ts +++ b/tests/unit/public-types-contract.test.ts @@ -13,7 +13,10 @@ import type { ComputerActionResponseDataCursorPosition, CompleteSandboxImageBuildParams, CreateSandboxImageBuildParams, + CreateSessionParams, CreateSessionProfile, + FetchBrowserOptions, + OperatingSystem, GetBatchScrapeJobParams, GetWebCrawlJobParams, PageData, @@ -183,6 +186,23 @@ describe("public type compatibility", () => { expectTypeOf().toEqualTypeOf(); }); + test("exposes operatingSystem and disableSoftwareWebGL on fetch browser options and session creation", () => { + const browser: FetchBrowserOptions = { operatingSystem: "macos", disableSoftwareWebGL: true }; + const session: CreateSessionParams = { disableSoftwareWebGL: true }; + + expect(browser.operatingSystem).toBe("macos"); + expect(session.disableSoftwareWebGL).toBe(true); + expectTypeOf().toEqualTypeOf< + OperatingSystem | undefined + >(); + expectTypeOf().toEqualTypeOf< + boolean | undefined + >(); + expectTypeOf().toEqualTypeOf< + boolean | undefined + >(); + }); + test("includes public server region and status values", () => { const region: SessionRegion = "us"; const status: SessionStatus = "close-error"; From da1be37a840a36408c6017c9409f497175a74171 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 25 Nov 2026 22:05:15 +0000 Subject: [PATCH 2/3] Add disableSoftwareWebGL to session launch state Co-authored-by: Nikhil Shahi --- src/types/session.ts | 1 + tests/unit/public-types-contract.test.ts | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/types/session.ts b/src/types/session.ts index 2280c80..ee27a4b 100644 --- a/src/types/session.ts +++ b/src/types/session.ts @@ -64,6 +64,7 @@ export interface SessionLaunchState { enableAlwaysOpenPdfExternally?: boolean; appendTimestampToDownloads?: boolean; disablePostQuantumKeyAgreement?: boolean; + disableSoftwareWebGL?: boolean; /** @deprecated Discontinued: WebGL fingerprinting was removed from the browser, and the server ignores this option. Kept so existing code still type-checks. */ enableWebglFingerprinting?: boolean; } diff --git a/tests/unit/public-types-contract.test.ts b/tests/unit/public-types-contract.test.ts index 71ca493..f9d192f 100644 --- a/tests/unit/public-types-contract.test.ts +++ b/tests/unit/public-types-contract.test.ts @@ -20,6 +20,7 @@ import type { GetBatchScrapeJobParams, GetWebCrawlJobParams, PageData, + SessionLaunchState, Sandbox, SandboxExecParams, SandboxImageBuildInputFormat, @@ -83,7 +84,9 @@ function actionConsumer(params: ComputerActionParams): string { describe("public type compatibility", () => { test("accepts sandbox and snapshot objects created before secrets metadata existed", () => { expectTypeOf>().toExtend(); - expectTypeOf>().toExtend(); + expectTypeOf< + Omit + >().toExtend(); }); test("exports cursor-position requests and typed coordinates with optional pointer modifiers", () => { @@ -186,12 +189,14 @@ describe("public type compatibility", () => { expectTypeOf().toEqualTypeOf(); }); - test("exposes operatingSystem and disableSoftwareWebGL on fetch browser options and session creation", () => { + test("exposes operatingSystem and disableSoftwareWebGL on fetch browser options, session creation and launch state", () => { const browser: FetchBrowserOptions = { operatingSystem: "macos", disableSoftwareWebGL: true }; const session: CreateSessionParams = { disableSoftwareWebGL: true }; + const launchState: SessionLaunchState = { disableSoftwareWebGL: true }; expect(browser.operatingSystem).toBe("macos"); expect(session.disableSoftwareWebGL).toBe(true); + expect(launchState.disableSoftwareWebGL).toBe(true); expectTypeOf().toEqualTypeOf< OperatingSystem | undefined >(); @@ -201,6 +206,7 @@ describe("public type compatibility", () => { expectTypeOf().toEqualTypeOf< boolean | undefined >(); + expectTypeOf().toEqualTypeOf(); }); test("includes public server region and status values", () => { From ddc24eb2dd1898b983cdfa394a49cbbe0802ffb4 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 25 Nov 2026 23:12:29 +0000 Subject: [PATCH 3/3] Remove doc comments from WebGL and operating system params Co-authored-by: Nikhil Shahi --- src/types/session.ts | 1 - src/types/web/common.ts | 6 ------ 2 files changed, 7 deletions(-) diff --git a/src/types/session.ts b/src/types/session.ts index ee27a4b..087492c 100644 --- a/src/types/session.ts +++ b/src/types/session.ts @@ -275,7 +275,6 @@ export interface CreateSessionParams { liveViewTtlSeconds?: number; replaceNativeElements?: boolean; disablePostQuantumKeyAgreement?: boolean; - /** When true, Ultra sessions drop software (SwiftShader) WebGL. Defaults to false. */ disableSoftwareWebGL?: boolean; browserMemorySize?: BrowserMemorySize; startFromSnapshot?: StartSessionFromSnapshotParams; diff --git a/src/types/web/common.ts b/src/types/web/common.ts index 22fdf60..bfc9fd8 100644 --- a/src/types/web/common.ts +++ b/src/types/web/common.ts @@ -104,13 +104,7 @@ export interface FetchBrowserOptions { screen?: ScreenConfig; profileId?: string; solveCaptchas?: boolean; - /** Operating system the browser fingerprint claims. Defaults to the platform default. */ operatingSystem?: OperatingSystem; - /** - * Skip forced SwiftShader (software) WebGL rendering. Defaults to false. On - * machines without a GPU, WebGL content may be unavailable, including in - * screenshots. - */ disableSoftwareWebGL?: boolean; location?: FetchBrowserLocationOptions; }