diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95e91fd..129e87b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,14 @@ name: CI on: push: - branches-ignore: - - 'generated' - - 'codegen/**' - - 'integrated/**' - - 'stl-preview-head/**' - - 'stl-preview-base/**' + branches: + - '**' + - '!integrated/**' + - '!stl-preview-head/**' + - '!stl-preview-base/**' + - '!generated' + - '!codegen/**' + - 'codegen/stl/**' pull_request: branches-ignore: - 'stl-preview-head/**' diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2ff8218..b470c2a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.43.0" + ".": "0.44.0" } diff --git a/.stats.yml b/.stats.yml index ae22a71..ad84265 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 103 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-bda5e58fa0bbd08761f27a1e0edbc602c44141ac9483bf6c96d52b7f4d10d9a7.yml -openapi_spec_hash: 10833b36358e8cda023e5bb0abeab0ba +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-17e50cf93d8052ff655c160fc0f156621d9029b041526d4e2e3317b13f80822f.yml +openapi_spec_hash: f7dadc8d93e77983936eb18a8080ce15 config_hash: cff4d43372b6fa66b64e2d4150f6aa76 diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ae0911..5eb6f6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## 0.44.0 (2026-03-17) + +Full Changelog: [v0.43.0...v0.44.0](https://github.com/kernel/kernel-node-sdk/compare/v0.43.0...v0.44.0) + +### Features + +* Add GPU viewport presets and GPU encoder defaults ([693e4f6](https://github.com/kernel/kernel-node-sdk/commit/693e4f6cdd4d2db7524c2ff22ec99c2013cf6279)) +* Adds description to OAS spec for docs about delta_x, delta_y ([7aa9d1e](https://github.com/kernel/kernel-node-sdk/commit/7aa9d1eed6890de62f92edac3bbccff8565b1d57)) +* Drop headless GPU support and disable pooling ([762670e](https://github.com/kernel/kernel-node-sdk/commit/762670ef4e3c6126a4c541eb67f49b2565504e40)) +* expose smooth drag mouse movement via public API ([b9911dd](https://github.com/kernel/kernel-node-sdk/commit/b9911dd1c37610192c9ef70e1344f7b93a191f24)) +* Rename hardware acceleration UI/docs wording to GPU acceleration ([1d22910](https://github.com/kernel/kernel-node-sdk/commit/1d22910d61a9baec560384fd0485fc0bb9216371)) + + +### Chores + +* **internal:** tweak CI branches ([256d3ff](https://github.com/kernel/kernel-node-sdk/commit/256d3ff87c9744a8017a4fa93e21ec05118dbfca)) + ## 0.43.0 (2026-03-10) Full Changelog: [v0.42.1...v0.43.0](https://github.com/kernel/kernel-node-sdk/compare/v0.42.1...v0.43.0) diff --git a/package-lock.json b/package-lock.json index 6efba2a..dd614ae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@onkernel/sdk", - "version": "0.43.0", + "version": "0.44.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@onkernel/sdk", - "version": "0.43.0", + "version": "0.44.0", "license": "Apache-2.0", "devDependencies": { "@arethetypeswrong/cli": "^0.17.0", diff --git a/package.json b/package.json index af7875f..de4caad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@onkernel/sdk", - "version": "0.43.0", + "version": "0.44.0", "description": "The official TypeScript library for the Kernel API", "author": "Kernel <>", "types": "dist/index.d.ts", diff --git a/src/resources/browser-pools.ts b/src/resources/browser-pools.ts index 16a8c72..adae577 100644 --- a/src/resources/browser-pools.ts +++ b/src/resources/browser-pools.ts @@ -243,9 +243,13 @@ export namespace BrowserPool { /** * Initial browser window size in pixels with optional refresh rate. If omitted, - * image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted, - * but the following configurations are known-good and fully tested: 2560x1440@10, - * 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60. + * image defaults apply (1920x1080@25). For GPU images, the default is + * 1920x1080@60. Arbitrary viewport dimensions and refresh rates are accepted. + * Known-good presets include: 2560x1440@10, 1920x1080@25, 1920x1200@25, + * 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60. For GPU images, recommended + * presets use one of these resolutions with refresh rates 60, 30, 25, or 10: + * 800x600, 960x720, 1024x576, 1024x768, 1152x648, 1200x800, 1280x720, 1368x768, + * 1440x900, 1600x900, 1920x1080, 1920x1200, 390x844, 360x250, 768x1024, 800x1600. * Viewports outside this list may exhibit unstable live view or recording * behavior. If refresh_rate is not provided, it will be automatically determined * based on the resolution (higher resolutions use lower refresh rates to keep @@ -305,7 +309,8 @@ export interface BrowserPoolAcquireResponse { deleted_at?: string; /** - * Whether the browser session has hardware-accelerated GPU rendering. + * Whether GPU acceleration is enabled for the browser session (only supported for + * headful sessions). */ gpu?: boolean; @@ -342,9 +347,13 @@ export interface BrowserPoolAcquireResponse { /** * Initial browser window size in pixels with optional refresh rate. If omitted, - * image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted, - * but the following configurations are known-good and fully tested: 2560x1440@10, - * 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60. + * image defaults apply (1920x1080@25). For GPU images, the default is + * 1920x1080@60. Arbitrary viewport dimensions and refresh rates are accepted. + * Known-good presets include: 2560x1440@10, 1920x1080@25, 1920x1200@25, + * 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60. For GPU images, recommended + * presets use one of these resolutions with refresh rates 60, 30, 25, or 10: + * 800x600, 960x720, 1024x576, 1024x768, 1152x648, 1200x800, 1280x720, 1368x768, + * 1440x900, 1600x900, 1920x1080, 1920x1200, 390x844, 360x250, 768x1024, 800x1600. * Viewports outside this list may exhibit unstable live view or recording * behavior. If refresh_rate is not provided, it will be automatically determined * based on the resolution (higher resolutions use lower refresh rates to keep @@ -414,9 +423,13 @@ export interface BrowserPoolCreateParams { /** * Initial browser window size in pixels with optional refresh rate. If omitted, - * image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted, - * but the following configurations are known-good and fully tested: 2560x1440@10, - * 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60. + * image defaults apply (1920x1080@25). For GPU images, the default is + * 1920x1080@60. Arbitrary viewport dimensions and refresh rates are accepted. + * Known-good presets include: 2560x1440@10, 1920x1080@25, 1920x1200@25, + * 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60. For GPU images, recommended + * presets use one of these resolutions with refresh rates 60, 30, 25, or 10: + * 800x600, 960x720, 1024x576, 1024x768, 1152x648, 1200x800, 1280x720, 1368x768, + * 1440x900, 1600x900, 1920x1080, 1920x1200, 390x844, 360x250, 768x1024, 800x1600. * Viewports outside this list may exhibit unstable live view or recording * behavior. If refresh_rate is not provided, it will be automatically determined * based on the resolution (higher resolutions use lower refresh rates to keep @@ -492,9 +505,13 @@ export interface BrowserPoolUpdateParams { /** * Initial browser window size in pixels with optional refresh rate. If omitted, - * image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted, - * but the following configurations are known-good and fully tested: 2560x1440@10, - * 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60. + * image defaults apply (1920x1080@25). For GPU images, the default is + * 1920x1080@60. Arbitrary viewport dimensions and refresh rates are accepted. + * Known-good presets include: 2560x1440@10, 1920x1080@25, 1920x1200@25, + * 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60. For GPU images, recommended + * presets use one of these resolutions with refresh rates 60, 30, 25, or 10: + * 800x600, 960x720, 1024x576, 1024x768, 1152x648, 1200x800, 1280x720, 1368x768, + * 1440x900, 1600x900, 1920x1080, 1920x1200, 390x844, 360x250, 768x1024, 800x1600. * Viewports outside this list may exhibit unstable live view or recording * behavior. If refresh_rate is not provided, it will be automatically determined * based on the resolution (higher resolutions use lower refresh rates to keep diff --git a/src/resources/browsers/browsers.ts b/src/resources/browsers/browsers.ts index 756dbdd..99b9d28 100644 --- a/src/resources/browsers/browsers.ts +++ b/src/resources/browsers/browsers.ts @@ -330,7 +330,8 @@ export interface BrowserCreateResponse { deleted_at?: string; /** - * Whether the browser session has hardware-accelerated GPU rendering. + * Whether GPU acceleration is enabled for the browser session (only supported for + * headful sessions). */ gpu?: boolean; @@ -367,9 +368,13 @@ export interface BrowserCreateResponse { /** * Initial browser window size in pixels with optional refresh rate. If omitted, - * image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted, - * but the following configurations are known-good and fully tested: 2560x1440@10, - * 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60. + * image defaults apply (1920x1080@25). For GPU images, the default is + * 1920x1080@60. Arbitrary viewport dimensions and refresh rates are accepted. + * Known-good presets include: 2560x1440@10, 1920x1080@25, 1920x1200@25, + * 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60. For GPU images, recommended + * presets use one of these resolutions with refresh rates 60, 30, 25, or 10: + * 800x600, 960x720, 1024x576, 1024x768, 1152x648, 1200x800, 1280x720, 1368x768, + * 1440x900, 1600x900, 1920x1080, 1920x1200, 390x844, 360x250, 768x1024, 800x1600. * Viewports outside this list may exhibit unstable live view or recording * behavior. If refresh_rate is not provided, it will be automatically determined * based on the resolution (higher resolutions use lower refresh rates to keep @@ -426,7 +431,8 @@ export interface BrowserRetrieveResponse { deleted_at?: string; /** - * Whether the browser session has hardware-accelerated GPU rendering. + * Whether GPU acceleration is enabled for the browser session (only supported for + * headful sessions). */ gpu?: boolean; @@ -463,9 +469,13 @@ export interface BrowserRetrieveResponse { /** * Initial browser window size in pixels with optional refresh rate. If omitted, - * image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted, - * but the following configurations are known-good and fully tested: 2560x1440@10, - * 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60. + * image defaults apply (1920x1080@25). For GPU images, the default is + * 1920x1080@60. Arbitrary viewport dimensions and refresh rates are accepted. + * Known-good presets include: 2560x1440@10, 1920x1080@25, 1920x1200@25, + * 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60. For GPU images, recommended + * presets use one of these resolutions with refresh rates 60, 30, 25, or 10: + * 800x600, 960x720, 1024x576, 1024x768, 1152x648, 1200x800, 1280x720, 1368x768, + * 1440x900, 1600x900, 1920x1080, 1920x1200, 390x844, 360x250, 768x1024, 800x1600. * Viewports outside this list may exhibit unstable live view or recording * behavior. If refresh_rate is not provided, it will be automatically determined * based on the resolution (higher resolutions use lower refresh rates to keep @@ -522,7 +532,8 @@ export interface BrowserUpdateResponse { deleted_at?: string; /** - * Whether the browser session has hardware-accelerated GPU rendering. + * Whether GPU acceleration is enabled for the browser session (only supported for + * headful sessions). */ gpu?: boolean; @@ -559,9 +570,13 @@ export interface BrowserUpdateResponse { /** * Initial browser window size in pixels with optional refresh rate. If omitted, - * image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted, - * but the following configurations are known-good and fully tested: 2560x1440@10, - * 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60. + * image defaults apply (1920x1080@25). For GPU images, the default is + * 1920x1080@60. Arbitrary viewport dimensions and refresh rates are accepted. + * Known-good presets include: 2560x1440@10, 1920x1080@25, 1920x1200@25, + * 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60. For GPU images, recommended + * presets use one of these resolutions with refresh rates 60, 30, 25, or 10: + * 800x600, 960x720, 1024x576, 1024x768, 1152x648, 1200x800, 1280x720, 1368x768, + * 1440x900, 1600x900, 1920x1080, 1920x1200, 390x844, 360x250, 768x1024, 800x1600. * Viewports outside this list may exhibit unstable live view or recording * behavior. If refresh_rate is not provided, it will be automatically determined * based on the resolution (higher resolutions use lower refresh rates to keep @@ -618,7 +633,8 @@ export interface BrowserListResponse { deleted_at?: string; /** - * Whether the browser session has hardware-accelerated GPU rendering. + * Whether GPU acceleration is enabled for the browser session (only supported for + * headful sessions). */ gpu?: boolean; @@ -655,9 +671,13 @@ export interface BrowserListResponse { /** * Initial browser window size in pixels with optional refresh rate. If omitted, - * image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted, - * but the following configurations are known-good and fully tested: 2560x1440@10, - * 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60. + * image defaults apply (1920x1080@25). For GPU images, the default is + * 1920x1080@60. Arbitrary viewport dimensions and refresh rates are accepted. + * Known-good presets include: 2560x1440@10, 1920x1080@25, 1920x1200@25, + * 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60. For GPU images, recommended + * presets use one of these resolutions with refresh rates 60, 30, 25, or 10: + * 800x600, 960x720, 1024x576, 1024x768, 1152x648, 1200x800, 1280x720, 1368x768, + * 1440x900, 1600x900, 1920x1080, 1920x1200, 390x844, 360x250, 768x1024, 800x1600. * Viewports outside this list may exhibit unstable live view or recording * behavior. If refresh_rate is not provided, it will be automatically determined * based on the resolution (higher resolutions use lower refresh rates to keep @@ -673,8 +693,8 @@ export interface BrowserCreateParams { extensions?: Array; /** - * If true, launches a hardware-accelerated browser with GPU rendering. Requires - * Start-Up or Enterprise plan. + * If true, enables GPU acceleration for the browser session. Requires Start-Up or + * Enterprise plan and headless=false. */ gpu?: boolean; @@ -731,9 +751,13 @@ export interface BrowserCreateParams { /** * Initial browser window size in pixels with optional refresh rate. If omitted, - * image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted, - * but the following configurations are known-good and fully tested: 2560x1440@10, - * 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60. + * image defaults apply (1920x1080@25). For GPU images, the default is + * 1920x1080@60. Arbitrary viewport dimensions and refresh rates are accepted. + * Known-good presets include: 2560x1440@10, 1920x1080@25, 1920x1200@25, + * 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60. For GPU images, recommended + * presets use one of these resolutions with refresh rates 60, 30, 25, or 10: + * 800x600, 960x720, 1024x576, 1024x768, 1152x648, 1200x800, 1280x720, 1368x768, + * 1440x900, 1600x900, 1920x1080, 1920x1200, 390x844, 360x250, 768x1024, 800x1600. * Viewports outside this list may exhibit unstable live view or recording * behavior. If refresh_rate is not provided, it will be automatically determined * based on the resolution (higher resolutions use lower refresh rates to keep diff --git a/src/resources/browsers/computer.ts b/src/resources/browsers/computer.ts index f5ed4d3..d67dac6 100644 --- a/src/resources/browsers/computer.ts +++ b/src/resources/browsers/computer.ts @@ -353,11 +353,23 @@ export namespace ComputerBatchParams { */ delay?: number; + /** + * Target total duration in milliseconds for the entire drag movement when + * smooth=true. Omit for automatic timing based on total path length. + */ + duration_ms?: number; + /** * Modifier keys to hold during the drag */ hold_keys?: Array; + /** + * Use human-like Bezier curves between path waypoints instead of linear + * interpolation. When true, steps_per_segment and step_delay_ms are ignored. + */ + smooth?: boolean; + /** * Delay in milliseconds between relative steps while dragging (not the initial * delay). @@ -431,12 +443,14 @@ export namespace ComputerBatchParams { y: number; /** - * Horizontal scroll amount. Positive scrolls right, negative scrolls left. + * Horizontal scroll amount in xdotool "wheel units." Positive scrolls right, + * negative scrolls left. */ delta_x?: number; /** - * Vertical scroll amount. Positive scrolls down, negative scrolls up. + * Vertical scroll amount in xdotool "wheel units." Positive scrolls down, negative + * scrolls up. */ delta_y?: number; @@ -554,11 +568,23 @@ export interface ComputerDragMouseParams { */ delay?: number; + /** + * Target total duration in milliseconds for the entire drag movement when + * smooth=true. Omit for automatic timing based on total path length. + */ + duration_ms?: number; + /** * Modifier keys to hold during the drag */ hold_keys?: Array; + /** + * Use human-like Bezier curves between path waypoints instead of linear + * interpolation. When true, steps_per_segment and step_delay_ms are ignored. + */ + smooth?: boolean; + /** * Delay in milliseconds between relative steps while dragging (not the initial * delay). @@ -632,12 +658,14 @@ export interface ComputerScrollParams { y: number; /** - * Horizontal scroll amount. Positive scrolls right, negative scrolls left. + * Horizontal scroll amount in xdotool "wheel units." Positive scrolls right, + * negative scrolls left. */ delta_x?: number; /** - * Vertical scroll amount. Positive scrolls down, negative scrolls up. + * Vertical scroll amount in xdotool "wheel units." Positive scrolls down, negative + * scrolls up. */ delta_y?: number; diff --git a/src/resources/invocations.ts b/src/resources/invocations.ts index 8699ffe..e567574 100644 --- a/src/resources/invocations.ts +++ b/src/resources/invocations.ts @@ -465,7 +465,8 @@ export namespace InvocationListBrowsersResponse { deleted_at?: string; /** - * Whether the browser session has hardware-accelerated GPU rendering. + * Whether GPU acceleration is enabled for the browser session (only supported for + * headful sessions). */ gpu?: boolean; @@ -502,9 +503,13 @@ export namespace InvocationListBrowsersResponse { /** * Initial browser window size in pixels with optional refresh rate. If omitted, - * image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted, - * but the following configurations are known-good and fully tested: 2560x1440@10, - * 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60. + * image defaults apply (1920x1080@25). For GPU images, the default is + * 1920x1080@60. Arbitrary viewport dimensions and refresh rates are accepted. + * Known-good presets include: 2560x1440@10, 1920x1080@25, 1920x1200@25, + * 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60. For GPU images, recommended + * presets use one of these resolutions with refresh rates 60, 30, 25, or 10: + * 800x600, 960x720, 1024x576, 1024x768, 1152x648, 1200x800, 1280x720, 1368x768, + * 1440x900, 1600x900, 1920x1080, 1920x1200, 390x844, 360x250, 768x1024, 800x1600. * Viewports outside this list may exhibit unstable live view or recording * behavior. If refresh_rate is not provided, it will be automatically determined * based on the resolution (higher resolutions use lower refresh rates to keep diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 0c26a74..8666f8a 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -65,9 +65,13 @@ export interface BrowserProfile { /** * Initial browser window size in pixels with optional refresh rate. If omitted, - * image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted, - * but the following configurations are known-good and fully tested: 2560x1440@10, - * 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60. + * image defaults apply (1920x1080@25). For GPU images, the default is + * 1920x1080@60. Arbitrary viewport dimensions and refresh rates are accepted. + * Known-good presets include: 2560x1440@10, 1920x1080@25, 1920x1200@25, + * 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60. For GPU images, recommended + * presets use one of these resolutions with refresh rates 60, 30, 25, or 10: + * 800x600, 960x720, 1024x576, 1024x768, 1152x648, 1200x800, 1280x720, 1368x768, + * 1440x900, 1600x900, 1920x1080, 1920x1200, 390x844, 360x250, 768x1024, 800x1600. * Viewports outside this list may exhibit unstable live view or recording * behavior. If refresh_rate is not provided, it will be automatically determined * based on the resolution (higher resolutions use lower refresh rates to keep diff --git a/src/version.ts b/src/version.ts index 771efed..6a69b90 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.43.0'; // x-release-please-version +export const VERSION = '0.44.0'; // x-release-please-version diff --git a/tests/api-resources/browsers/computer.test.ts b/tests/api-resources/browsers/computer.test.ts index ffb2b7d..807834d 100644 --- a/tests/api-resources/browsers/computer.test.ts +++ b/tests/api-resources/browsers/computer.test.ts @@ -41,7 +41,9 @@ describe('resource computer', () => { ], button: 'left', delay: 0, + duration_ms: 50, hold_keys: ['string'], + smooth: true, step_delay_ms: 0, steps_per_segment: 1, }, @@ -141,7 +143,9 @@ describe('resource computer', () => { ], button: 'left', delay: 0, + duration_ms: 50, hold_keys: ['string'], + smooth: true, step_delay_ms: 0, steps_per_segment: 1, });