Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.33.0"
".": "0.34.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 100
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-82fd51be8dc9b6ad425425f9eb747dd337df494a030d03d37f101e2236c85548.yml
openapi_spec_hash: ab396816e2b7da9938d42ec5a41cc8e1
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-47ee6a2b624baddb41a681feff758bf1893cd3d65edf3ab51219ebe4d942932b.yml
openapi_spec_hash: 76178c41ede593e76bfacb176057d2f0
config_hash: 27c0ea01aeb797a1767af139851c5b66
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 0.34.0 (2026-02-13)

Full Changelog: [v0.33.0...v0.34.0](https://github.com/kernel/kernel-python-sdk/compare/v0.33.0...v0.34.0)

### Features

* Add error_code field to ManagedAuthSession and related components ([9d160d7](https://github.com/kernel/kernel-python-sdk/commit/9d160d798b25fc5416a2cce84b2ad8e2fc46f801))
* Allow arbitrary viewport dimensions ([6463d9f](https://github.com/kernel/kernel-python-sdk/commit/6463d9fdb94477867d82fd69630688878c79b182))


### Chores

* format all `api.md` files ([c4ea333](https://github.com/kernel/kernel-python-sdk/commit/c4ea333ede664dbaa38911b1f97310e0b8a9618f))
* **internal:** fix lint error on Python 3.14 ([96a4f24](https://github.com/kernel/kernel-python-sdk/commit/96a4f241bdf8dffe57c91140bf33f54a2c21a223))

## 0.33.0 (2026-02-11)

Full Changelog: [v0.32.0...v0.33.0](https://github.com/kernel/kernel-python-sdk/compare/v0.32.0...v0.33.0)
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "kernel"
version = "0.33.0"
version = "0.34.0"
description = "The official Python library for the kernel API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -69,7 +69,7 @@ format = { chain = [
# run formatting again to fix any inconsistencies when imports are stripped
"format:ruff",
]}
"format:docs" = "python scripts/utils/ruffen-docs.py README.md api.md"
"format:docs" = "bash -c 'python scripts/utils/ruffen-docs.py README.md $(find . -type f -name api.md)'"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs formatter now depends on Bash

Medium Severity

The format:docs script now runs through bash -c, which introduces a hard Bash dependency. Environments without Bash (notably common Windows setups) can no longer run format:docs, so local formatting workflows fail even though the previous python-only command worked cross-platform.

Fix in Cursor Fix in Web

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs formatting scans unintended directories

Medium Severity

format:docs now expands $(find . -type f -name api.md) without excluding directories like .venv or build artifacts. This can pass third-party or generated api.md files to ruffen-docs, causing unexpected edits or failures outside the project’s intended docs set.

Fix in Cursor Fix in Web

"format:ruff" = "ruff format"

"lint" = { chain = [
Expand Down
2 changes: 1 addition & 1 deletion src/kernel/_utils/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def is_union(tp: Optional[Type[Any]]) -> bool:
else:
import types

return tp is Union or tp is types.UnionType
return tp is Union or tp is types.UnionType # type: ignore[comparison-overlap]


def is_typeddict(tp: Type[Any]) -> bool:
Expand Down
2 changes: 1 addition & 1 deletion src/kernel/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "kernel"
__version__ = "0.33.0" # x-release-please-version
__version__ = "0.34.0" # x-release-please-version
56 changes: 28 additions & 28 deletions src/kernel/resources/browser_pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ def create(
are destroyed. Defaults to 600 seconds if not specified

viewport: Initial browser window size in pixels with optional refresh rate. If omitted,
image defaults apply (1920x1080@25). Only specific viewport configurations are
supported. The server will reject unsupported combinations. Supported
resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
be automatically determined from the width and height if they match a supported
configuration exactly. Note: Higher resolutions may affect the responsiveness of
live view browser
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.
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
bandwidth reasonable).

extra_headers: Send extra headers

Expand Down Expand Up @@ -240,13 +240,13 @@ def update(
are destroyed. Defaults to 600 seconds if not specified

viewport: Initial browser window size in pixels with optional refresh rate. If omitted,
image defaults apply (1920x1080@25). Only specific viewport configurations are
supported. The server will reject unsupported combinations. Supported
resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
be automatically determined from the width and height if they match a supported
configuration exactly. Note: Higher resolutions may affect the responsiveness of
live view browser
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.
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
bandwidth reasonable).

extra_headers: Send extra headers

Expand Down Expand Up @@ -546,13 +546,13 @@ async def create(
are destroyed. Defaults to 600 seconds if not specified

viewport: Initial browser window size in pixels with optional refresh rate. If omitted,
image defaults apply (1920x1080@25). Only specific viewport configurations are
supported. The server will reject unsupported combinations. Supported
resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
be automatically determined from the width and height if they match a supported
configuration exactly. Note: Higher resolutions may affect the responsiveness of
live view browser
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.
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
bandwidth reasonable).

extra_headers: Send extra headers

Expand Down Expand Up @@ -678,13 +678,13 @@ async def update(
are destroyed. Defaults to 600 seconds if not specified

viewport: Initial browser window size in pixels with optional refresh rate. If omitted,
image defaults apply (1920x1080@25). Only specific viewport configurations are
supported. The server will reject unsupported combinations. Supported
resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
be automatically determined from the width and height if they match a supported
configuration exactly. Note: Higher resolutions may affect the responsiveness of
live view browser
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.
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
bandwidth reasonable).

extra_headers: Send extra headers

Expand Down
28 changes: 14 additions & 14 deletions src/kernel/resources/browsers/browsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,13 @@ def create(
see is +/- 5 seconds around the specified value.

viewport: Initial browser window size in pixels with optional refresh rate. If omitted,
image defaults apply (1920x1080@25). Only specific viewport configurations are
supported. The server will reject unsupported combinations. Supported
resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
be automatically determined from the width and height if they match a supported
configuration exactly. Note: Higher resolutions may affect the responsiveness of
live view browser
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.
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
bandwidth reasonable).

extra_headers: Send extra headers

Expand Down Expand Up @@ -596,13 +596,13 @@ async def create(
see is +/- 5 seconds around the specified value.

viewport: Initial browser window size in pixels with optional refresh rate. If omitted,
image defaults apply (1920x1080@25). Only specific viewport configurations are
supported. The server will reject unsupported combinations. Supported
resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
be automatically determined from the width and height if they match a supported
configuration exactly. Note: Higher resolutions may affect the responsiveness of
live view browser
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.
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
bandwidth reasonable).

extra_headers: Send extra headers

Expand Down
3 changes: 3 additions & 0 deletions src/kernel/types/auth/connection_follow_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ class ManagedAuthStateEvent(BaseModel):
discovered_fields: Optional[List[ManagedAuthStateEventDiscoveredField]] = None
"""Fields awaiting input (present when flow_step=AWAITING_INPUT)."""

error_code: Optional[str] = None
"""Machine-readable error code (present when flow_status=FAILED)."""

error_message: Optional[str] = None
"""Error message (present when flow_status=FAILED)."""

Expand Down
3 changes: 3 additions & 0 deletions src/kernel/types/auth/managed_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ class ManagedAuth(BaseModel):
discovered_fields: Optional[List[DiscoveredField]] = None
"""Fields awaiting input (present when flow_step=awaiting_input)"""

error_code: Optional[str] = None
"""Machine-readable error code (present when flow_status=failed)"""

error_message: Optional[str] = None
"""Error message (present when flow_status=failed)"""

Expand Down
14 changes: 7 additions & 7 deletions src/kernel/types/browser_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ class BrowserCreateParams(TypedDict, total=False):
viewport: BrowserViewport
"""Initial browser window size in pixels with optional refresh rate.

If omitted, image defaults apply (1920x1080@25). Only specific viewport
configurations are supported. The server will reject unsupported combinations.
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not
provided, it will be automatically determined from the width and height if they
match a supported configuration exactly. Note: Higher resolutions may affect the
responsiveness of live view browser
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. 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 bandwidth reasonable).
"""
14 changes: 7 additions & 7 deletions src/kernel/types/browser_create_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ class BrowserCreateResponse(BaseModel):
viewport: Optional[BrowserViewport] = None
"""Initial browser window size in pixels with optional refresh rate.

If omitted, image defaults apply (1920x1080@25). Only specific viewport
configurations are supported. The server will reject unsupported combinations.
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not
provided, it will be automatically determined from the width and height if they
match a supported configuration exactly. Note: Higher resolutions may affect the
responsiveness of live view browser
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. 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 bandwidth reasonable).
"""
14 changes: 7 additions & 7 deletions src/kernel/types/browser_list_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ class BrowserListResponse(BaseModel):
viewport: Optional[BrowserViewport] = None
"""Initial browser window size in pixels with optional refresh rate.

If omitted, image defaults apply (1920x1080@25). Only specific viewport
configurations are supported. The server will reject unsupported combinations.
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not
provided, it will be automatically determined from the width and height if they
match a supported configuration exactly. Note: Higher resolutions may affect the
responsiveness of live view browser
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. 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 bandwidth reasonable).
"""
14 changes: 7 additions & 7 deletions src/kernel/types/browser_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ class BrowserPoolConfig(BaseModel):
viewport: Optional[BrowserViewport] = None
"""Initial browser window size in pixels with optional refresh rate.

If omitted, image defaults apply (1920x1080@25). Only specific viewport
configurations are supported. The server will reject unsupported combinations.
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not
provided, it will be automatically determined from the width and height if they
match a supported configuration exactly. Note: Higher resolutions may affect the
responsiveness of live view browser
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. 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 bandwidth reasonable).
"""


Expand Down
14 changes: 7 additions & 7 deletions src/kernel/types/browser_pool_acquire_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ class BrowserPoolAcquireResponse(BaseModel):
viewport: Optional[BrowserViewport] = None
"""Initial browser window size in pixels with optional refresh rate.

If omitted, image defaults apply (1920x1080@25). Only specific viewport
configurations are supported. The server will reject unsupported combinations.
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not
provided, it will be automatically determined from the width and height if they
match a supported configuration exactly. Note: Higher resolutions may affect the
responsiveness of live view browser
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. 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 bandwidth reasonable).
"""
14 changes: 7 additions & 7 deletions src/kernel/types/browser_pool_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ class BrowserPoolCreateParams(TypedDict, total=False):
viewport: BrowserViewport
"""Initial browser window size in pixels with optional refresh rate.

If omitted, image defaults apply (1920x1080@25). Only specific viewport
configurations are supported. The server will reject unsupported combinations.
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not
provided, it will be automatically determined from the width and height if they
match a supported configuration exactly. Note: Higher resolutions may affect the
responsiveness of live view browser
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. 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 bandwidth reasonable).
"""
Loading