Skip to content
Merged
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.145.0"
".": "0.146.0"
}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [0.146.0](https://github.com/kernel/kernel-python-sdk/compare/v0.145.0...v0.146.0) (2026-11-10)


### Features

* Allow auto-starting replays during browser creation and pool acquire ([8c46a0d](https://github.com/kernel/kernel-python-sdk/commit/8c46a0dc889d19867400a5eeb26812658790c1cb))

## [0.145.0](https://github.com/kernel/kernel-python-sdk/compare/v0.144.0...v0.145.0) (2026-11-10)


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "kernel"
version = "0.145.0"
version = "0.146.0"
description = "The official Python library for the kernel API"
dynamic = ["readme"]
license = "Apache-2.0"
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.145.0" # x-release-please-version
__version__ = "0.146.0" # x-release-please-version
28 changes: 28 additions & 0 deletions src/kernel/resources/browser_pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def create(
proxy_id: str | Omit = omit,
refresh_on_profile_update: bool | Omit = omit,
region: Literal["us-east", "us-west", "eu-west", "ap-southeast"] | Omit = omit,
start_replay: bool | Omit = omit,
start_url: str | Omit = omit,
stealth: bool | Omit = omit,
telemetry: Optional[browser_pool_create_params.Telemetry] | Omit = omit,
Expand Down Expand Up @@ -146,6 +147,8 @@ def create(
Region selection requires a Start-Up or Enterprise plan, defaults to us-east
when omitted on create.
start_replay: Start replay recording automatically when a browser is acquired from this pool.
start_url: Optional URL to navigate to when a new browser is warmed into the pool.
Best-effort: failures to navigate do not fail pool fill. Only applied to
newly-warmed browsers; browsers reused via release/acquire keep whatever URL the
Expand Down Expand Up @@ -205,6 +208,7 @@ def create(
"proxy_id": proxy_id,
"refresh_on_profile_update": refresh_on_profile_update,
"region": region,
"start_replay": start_replay,
"start_url": start_url,
"stealth": stealth,
"telemetry": telemetry,
Expand Down Expand Up @@ -274,6 +278,7 @@ def update(
proxy_id: str | Omit = omit,
refresh_on_profile_update: bool | Omit = omit,
size: int | Omit = omit,
start_replay: bool | Omit = omit,
start_url: str | Omit = omit,
stealth: bool | Omit = omit,
telemetry: Optional[browser_pool_update_params.Telemetry] | Omit = omit,
Expand Down Expand Up @@ -368,6 +373,9 @@ def update(
maximum size is determined by your organization's pooled sessions limit (the sum
of all pool sizes cannot exceed your limit).
start_replay: If provided, replaces whether replay recording starts automatically for future
acquired browsers.
start_url: If provided, replaces the URL to navigate to when a new browser is warmed into
the pool. Empty string clears the previously-set URL. Omit this field to leave
it unchanged.
Expand Down Expand Up @@ -428,6 +436,7 @@ def update(
"proxy_id": proxy_id,
"refresh_on_profile_update": refresh_on_profile_update,
"size": size,
"start_replay": start_replay,
"start_url": start_url,
"stealth": stealth,
"telemetry": telemetry,
Expand Down Expand Up @@ -564,6 +573,7 @@ def acquire(
acquire_timeout_seconds: int | Omit = omit,
name: str | Omit = omit,
profile: BrowserProfile | Omit = omit,
start_replay: bool | Omit = omit,
start_url: str | Omit = omit,
tags: TagsParam | Omit = omit,
telemetry: Optional[browser_pool_acquire_params.Telemetry] | Omit = omit,
Expand Down Expand Up @@ -596,6 +606,9 @@ def acquire(
specified, the matching profile will be loaded into the browser session.
Profiles must be created beforehand.
start_replay: Start replay recording immediately for the acquired browser. Omit to use the
pool's configured default.
start_url: Optional URL to navigate the acquired browser to. Overrides the pool's start_url
for this acquire only. Best-effort: failures to navigate do not fail the
acquire.
Expand Down Expand Up @@ -632,6 +645,7 @@ def acquire(
"acquire_timeout_seconds": acquire_timeout_seconds,
"name": name,
"profile": profile,
"start_replay": start_replay,
"start_url": start_url,
"tags": tags,
"telemetry": telemetry,
Expand Down Expand Up @@ -787,6 +801,7 @@ async def create(
proxy_id: str | Omit = omit,
refresh_on_profile_update: bool | Omit = omit,
region: Literal["us-east", "us-west", "eu-west", "ap-southeast"] | Omit = omit,
start_replay: bool | Omit = omit,
start_url: str | Omit = omit,
stealth: bool | Omit = omit,
telemetry: Optional[browser_pool_create_params.Telemetry] | Omit = omit,
Expand Down Expand Up @@ -855,6 +870,8 @@ async def create(
Region selection requires a Start-Up or Enterprise plan, defaults to us-east
when omitted on create.
start_replay: Start replay recording automatically when a browser is acquired from this pool.
start_url: Optional URL to navigate to when a new browser is warmed into the pool.
Best-effort: failures to navigate do not fail pool fill. Only applied to
newly-warmed browsers; browsers reused via release/acquire keep whatever URL the
Expand Down Expand Up @@ -914,6 +931,7 @@ async def create(
"proxy_id": proxy_id,
"refresh_on_profile_update": refresh_on_profile_update,
"region": region,
"start_replay": start_replay,
"start_url": start_url,
"stealth": stealth,
"telemetry": telemetry,
Expand Down Expand Up @@ -983,6 +1001,7 @@ async def update(
proxy_id: str | Omit = omit,
refresh_on_profile_update: bool | Omit = omit,
size: int | Omit = omit,
start_replay: bool | Omit = omit,
start_url: str | Omit = omit,
stealth: bool | Omit = omit,
telemetry: Optional[browser_pool_update_params.Telemetry] | Omit = omit,
Expand Down Expand Up @@ -1077,6 +1096,9 @@ async def update(
maximum size is determined by your organization's pooled sessions limit (the sum
of all pool sizes cannot exceed your limit).
start_replay: If provided, replaces whether replay recording starts automatically for future
acquired browsers.
start_url: If provided, replaces the URL to navigate to when a new browser is warmed into
the pool. Empty string clears the previously-set URL. Omit this field to leave
it unchanged.
Expand Down Expand Up @@ -1137,6 +1159,7 @@ async def update(
"proxy_id": proxy_id,
"refresh_on_profile_update": refresh_on_profile_update,
"size": size,
"start_replay": start_replay,
"start_url": start_url,
"stealth": stealth,
"telemetry": telemetry,
Expand Down Expand Up @@ -1273,6 +1296,7 @@ async def acquire(
acquire_timeout_seconds: int | Omit = omit,
name: str | Omit = omit,
profile: BrowserProfile | Omit = omit,
start_replay: bool | Omit = omit,
start_url: str | Omit = omit,
tags: TagsParam | Omit = omit,
telemetry: Optional[browser_pool_acquire_params.Telemetry] | Omit = omit,
Expand Down Expand Up @@ -1305,6 +1329,9 @@ async def acquire(
specified, the matching profile will be loaded into the browser session.
Profiles must be created beforehand.
start_replay: Start replay recording immediately for the acquired browser. Omit to use the
pool's configured default.
start_url: Optional URL to navigate the acquired browser to. Overrides the pool's start_url
for this acquire only. Best-effort: failures to navigate do not fail the
acquire.
Expand Down Expand Up @@ -1341,6 +1368,7 @@ async def acquire(
"acquire_timeout_seconds": acquire_timeout_seconds,
"name": name,
"profile": profile,
"start_replay": start_replay,
"start_url": start_url,
"tags": tags,
"telemetry": telemetry,
Expand Down
8 changes: 8 additions & 0 deletions src/kernel/resources/browsers/browsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ def create(
proxy: BrowserProxyConfigParam | Omit = omit,
proxy_id: str | Omit = omit,
region: Literal["us-east", "us-west", "eu-west", "ap-southeast"] | Omit = omit,
start_replay: bool | Omit = omit,
start_url: str | Omit = omit,
stealth: bool | Omit = omit,
tags: TagsParam | Omit = omit,
Expand Down Expand Up @@ -285,6 +286,8 @@ def create(
created. Region selection requires a Start-Up or Enterprise plan, defaults to
us-east when omitted on create.
start_replay: Start replay recording as part of creating this browser session.
start_url: Optional URL to open when the browser session is created. Navigation is
best-effort, so navigation failures do not prevent the session from being
created.
Expand Down Expand Up @@ -360,6 +363,7 @@ def create(
"proxy": proxy,
"proxy_id": proxy_id,
"region": region,
"start_replay": start_replay,
"start_url": start_url,
"stealth": stealth,
"tags": tags,
Expand Down Expand Up @@ -1070,6 +1074,7 @@ async def create(
proxy: BrowserProxyConfigParam | Omit = omit,
proxy_id: str | Omit = omit,
region: Literal["us-east", "us-west", "eu-west", "ap-southeast"] | Omit = omit,
start_replay: bool | Omit = omit,
start_url: str | Omit = omit,
stealth: bool | Omit = omit,
tags: TagsParam | Omit = omit,
Expand Down Expand Up @@ -1146,6 +1151,8 @@ async def create(
created. Region selection requires a Start-Up or Enterprise plan, defaults to
us-east when omitted on create.
start_replay: Start replay recording as part of creating this browser session.
start_url: Optional URL to open when the browser session is created. Navigation is
best-effort, so navigation failures do not prevent the session from being
created.
Expand Down Expand Up @@ -1221,6 +1228,7 @@ async def create(
"proxy": proxy,
"proxy_id": proxy_id,
"region": region,
"start_replay": start_replay,
"start_url": start_url,
"stealth": stealth,
"tags": tags,
Expand Down
3 changes: 3 additions & 0 deletions src/kernel/types/browser_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ class BrowserCreateParams(TypedDict, total=False):
Enterprise plan, defaults to us-east when omitted on create.
"""

start_replay: bool
"""Start replay recording as part of creating this browser session."""

start_url: str
"""Optional URL to open when the browser session is created.
Expand Down
3 changes: 3 additions & 0 deletions src/kernel/types/browser_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ class BrowserPoolConfig(BaseModel):
creation, this defaults to true. Requires a profile to be set on the pool.
"""

start_replay: Optional[bool] = None
"""Start replay recording automatically when a browser is acquired from this pool."""

start_url: Optional[str] = None
"""Optional URL to navigate to when a new browser is warmed into the pool.
Expand Down
6 changes: 6 additions & 0 deletions src/kernel/types/browser_pool_acquire_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ class BrowserPoolAcquireParams(TypedDict, total=False):
into the browser session. Profiles must be created beforehand.
"""

start_replay: bool
"""Start replay recording immediately for the acquired browser.
Omit to use the pool's configured default.
"""

start_url: str
"""Optional URL to navigate the acquired browser to.
Expand Down
3 changes: 3 additions & 0 deletions src/kernel/types/browser_pool_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ class BrowserPoolCreateParams(TypedDict, total=False):
Enterprise plan, defaults to us-east when omitted on create.
"""

start_replay: bool
"""Start replay recording automatically when a browser is acquired from this pool."""

start_url: str
"""Optional URL to navigate to when a new browser is warmed into the pool.
Expand Down
6 changes: 6 additions & 0 deletions src/kernel/types/browser_pool_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ class BrowserPoolUpdateParams(TypedDict, total=False):
sum of all pool sizes cannot exceed your limit).
"""

start_replay: bool
"""
If provided, replaces whether replay recording starts automatically for future
acquired browsers.
"""

start_url: str
"""
If provided, replaces the URL to navigate to when a new browser is warmed into
Expand Down
6 changes: 6 additions & 0 deletions tests/api_resources/test_browser_pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def test_method_create_with_all_params(self, client: Kernel) -> None:
proxy_id="proxy_id",
refresh_on_profile_update=True,
region="us-east",
start_replay=True,
start_url="https://example.com",
stealth=True,
telemetry={
Expand Down Expand Up @@ -232,6 +233,7 @@ def test_method_update_with_all_params(self, client: Kernel) -> None:
proxy_id="proxy_id",
refresh_on_profile_update=True,
size=10,
start_replay=True,
start_url="https://example.com",
stealth=True,
telemetry={
Expand Down Expand Up @@ -416,6 +418,7 @@ def test_method_acquire_with_all_params(self, client: Kernel) -> None:
"name": "name",
"save_changes": True,
},
start_replay=True,
start_url="https://example.com",
tags={
"team": "backend",
Expand Down Expand Up @@ -635,6 +638,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncKernel) ->
proxy_id="proxy_id",
refresh_on_profile_update=True,
region="us-east",
start_replay=True,
start_url="https://example.com",
stealth=True,
telemetry={
Expand Down Expand Up @@ -801,6 +805,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncKernel) ->
proxy_id="proxy_id",
refresh_on_profile_update=True,
size=10,
start_replay=True,
start_url="https://example.com",
stealth=True,
telemetry={
Expand Down Expand Up @@ -985,6 +990,7 @@ async def test_method_acquire_with_all_params(self, async_client: AsyncKernel) -
"name": "name",
"save_changes": True,
},
start_replay=True,
start_url="https://example.com",
tags={
"team": "backend",
Expand Down
2 changes: 2 additions & 0 deletions tests/api_resources/test_browsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def test_method_create_with_all_params(self, client: Kernel) -> None:
},
proxy_id="proxy_id",
region="us-east",
start_replay=True,
start_url="https://example.com",
stealth=True,
tags={
Expand Down Expand Up @@ -691,6 +692,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncKernel) ->
},
proxy_id="proxy_id",
region="us-east",
start_replay=True,
start_url="https://example.com",
stealth=True,
tags={
Expand Down
Loading