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.122.0"
".": "0.123.0"
}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## [0.123.0](https://github.com/kernel/kernel-python-sdk/compare/v0.122.0...v0.123.0) (2026-10-09)


### Features

* Add video_memory to request the 4GiB VRAM GPU browser tier ([31b7bda](https://github.com/kernel/kernel-python-sdk/commit/31b7bda620f53bc6026b5eb3fac34d50859fa1df))
* Filter the telemetry SSE stream by event type ([f7daa04](https://github.com/kernel/kernel-python-sdk/commit/f7daa043513d08f6cc6aefec7b058d5bd57f2590))
* Fix 1Password fill classification for repeat fills and unconfirmed submits ([d387aab](https://github.com/kernel/kernel-python-sdk/commit/d387aab4847329eb4405318a20ee93a372399f70))
* Support egress allowlists on browser pools ([541fb3f](https://github.com/kernel/kernel-python-sdk/commit/541fb3fc033b8b9542838a116684578cab18fba0))

## [0.122.0](https://github.com/kernel/kernel-python-sdk/compare/v0.121.0...v0.122.0) (2026-10-09)


Expand Down
1 change: 1 addition & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ from kernel.types import (
BrowserReplResult,
BrowserReplTextContent,
BrowserUsage,
BrowserVideoMemory,
Profile,
Tags,
VaultReference,
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.122.0"
version = "0.123.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.122.0" # x-release-please-version
__version__ = "0.123.0" # x-release-please-version
52 changes: 32 additions & 20 deletions src/kernel/resources/browser_pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ def create(

name: Optional name for the browser pool. Must be unique within the project.

network: Network configuration applied to browsers in this pool. Proxy routes require
proxy-v3; the pool will not provision browsers through Envoy if proxy-v3 is
unavailable.
network: Network configuration applied to browsers in this pool. Egress allowlists and
proxy routes require proxy-v3; the pool will not provision browsers through
Envoy if proxy-v3 is unavailable.

profile: Profile configuration for browsers in a pool. Provide either id or name.
Profiles must be created beforehand. Unlike single browser sessions, pools load
Expand Down Expand Up @@ -296,9 +296,11 @@ def update(
discard_all_idle: Whether to discard all idle browsers and rebuild them immediately with the new
configuration. Defaults to false. Only browsers that are idle when the update
runs are rebuilt. A browser that is in use during the update keeps its original
configuration, and if it is later released with `reuse: true` it returns to the
pool with that stale configuration until it is discarded (by this flag on a
later update, or by flushing the pool).
configuration, except that its allowlist is reset to the current pool baseline
on release or the browser is replaced. For other configuration fields, if it is
later released with `reuse: true` it returns to the pool with that stale
configuration until it is discarded (by this flag on a later update, or by
flushing the pool).

extensions: If provided, replaces the extension list. Empty array clears all
previously-selected extensions. Omit this field to leave extensions unchanged.
Expand All @@ -321,10 +323,14 @@ def update(
network: If provided, replaces the pool's network configuration. Omit to leave the
existing configuration unchanged; an empty object ({}) removes it, while
network: {private_hosts: []} or network: {proxy_routes: []} sets an explicit
empty list. Proxy routes require proxy-v3; the pool will not provision browsers
through Envoy if proxy-v3 is unavailable. Only applied to browsers created in
the pool after the update; browsers already in the pool keep their configuration
until discarded (see discard_all_idle).
empty list; allowed_hosts must be non-empty when supplied. Egress allowlists and
proxy routes require proxy-v3; the pool will not provision browsers through
Envoy if proxy-v3 is unavailable. Changing allowed_hosts automatically replaces
idle browsers. Leased browsers retain their allowlist until release, when it is
reset to the current pool baseline or the browser is replaced if it cannot
safely receive that baseline. Stale browsers cannot be acquired. Other network
fields only apply to browsers created after the update; existing browsers keep
those fields until discarded (see discard_all_idle).

profile: Profile configuration for browsers in a pool. Provide either id or name.
Profiles must be created beforehand. Unlike single browser sessions, pools load
Expand Down Expand Up @@ -774,9 +780,9 @@ async def create(

name: Optional name for the browser pool. Must be unique within the project.

network: Network configuration applied to browsers in this pool. Proxy routes require
proxy-v3; the pool will not provision browsers through Envoy if proxy-v3 is
unavailable.
network: Network configuration applied to browsers in this pool. Egress allowlists and
proxy routes require proxy-v3; the pool will not provision browsers through
Envoy if proxy-v3 is unavailable.

profile: Profile configuration for browsers in a pool. Provide either id or name.
Profiles must be created beforehand. Unlike single browser sessions, pools load
Expand Down Expand Up @@ -947,9 +953,11 @@ async def update(
discard_all_idle: Whether to discard all idle browsers and rebuild them immediately with the new
configuration. Defaults to false. Only browsers that are idle when the update
runs are rebuilt. A browser that is in use during the update keeps its original
configuration, and if it is later released with `reuse: true` it returns to the
pool with that stale configuration until it is discarded (by this flag on a
later update, or by flushing the pool).
configuration, except that its allowlist is reset to the current pool baseline
on release or the browser is replaced. For other configuration fields, if it is
later released with `reuse: true` it returns to the pool with that stale
configuration until it is discarded (by this flag on a later update, or by
flushing the pool).

extensions: If provided, replaces the extension list. Empty array clears all
previously-selected extensions. Omit this field to leave extensions unchanged.
Expand All @@ -972,10 +980,14 @@ async def update(
network: If provided, replaces the pool's network configuration. Omit to leave the
existing configuration unchanged; an empty object ({}) removes it, while
network: {private_hosts: []} or network: {proxy_routes: []} sets an explicit
empty list. Proxy routes require proxy-v3; the pool will not provision browsers
through Envoy if proxy-v3 is unavailable. Only applied to browsers created in
the pool after the update; browsers already in the pool keep their configuration
until discarded (see discard_all_idle).
empty list; allowed_hosts must be non-empty when supplied. Egress allowlists and
proxy routes require proxy-v3; the pool will not provision browsers through
Envoy if proxy-v3 is unavailable. Changing allowed_hosts automatically replaces
idle browsers. Leased browsers retain their allowlist until release, when it is
reset to the current pool baseline or the browser is replaced if it cannot
safely receive that baseline. Stale browsers cannot be acquired. Other network
fields only apply to browsers created after the update; existing browsers keep
those fields until discarded (see discard_all_idle).

profile: Profile configuration for browsers in a pool. Provide either id or name.
Profiles must be created beforehand. Unlike single browser sessions, pools load
Expand Down
14 changes: 14 additions & 0 deletions src/kernel/resources/browsers/browsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
AsyncFsResourceWithStreamingResponse,
)
from ...types import (
BrowserVideoMemory,
BrowserMemoryRequest,
browser_curl_params,
browser_list_params,
Expand Down Expand Up @@ -97,6 +98,7 @@
AsyncPlaywrightResourceWithStreamingResponse,
)
from ...types.browser_repl_result import BrowserReplResult
from ...types.browser_video_memory import BrowserVideoMemory
from ...types.browser_curl_response import BrowserCurlResponse
from ...types.browser_list_response import BrowserListResponse
from ...types.vault_reference_param import VaultReferenceParam
Expand Down Expand Up @@ -206,6 +208,7 @@ def create(
telemetry: Optional[browser_create_params.Telemetry] | Omit = omit,
timeout_seconds: int | Omit = omit,
vaults: Iterable[VaultReferenceParam] | Omit = omit,
video_memory: BrowserVideoMemory | Omit = omit,
viewport: BrowserViewport | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down Expand Up @@ -293,6 +296,10 @@ def create(
vaults: Project-scoped vaults to link to the browser session. Links are immutable after
creation.

video_memory: Video memory (VRAM) for a GPU browser session. Requires gpu=true. Defaults to
2GiB, which comes with 4 vCPU and 6GiB memory. 4GiB comes with 8 vCPU and 12GiB
memory.

viewport: Initial browser window size in pixels with optional refresh rate. If omitted,
image defaults apply (1920x1080@25). For GPU images, the default is
1920x1080@60. Arbitrary viewport dimensions and refresh rates are accepted.
Expand Down Expand Up @@ -337,6 +344,7 @@ def create(
"telemetry": telemetry,
"timeout_seconds": timeout_seconds,
"vaults": vaults,
"video_memory": video_memory,
"viewport": viewport,
},
browser_create_params.BrowserCreateParams,
Expand Down Expand Up @@ -915,6 +923,7 @@ async def create(
telemetry: Optional[browser_create_params.Telemetry] | Omit = omit,
timeout_seconds: int | Omit = omit,
vaults: Iterable[VaultReferenceParam] | Omit = omit,
video_memory: BrowserVideoMemory | Omit = omit,
viewport: BrowserViewport | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down Expand Up @@ -1002,6 +1011,10 @@ async def create(
vaults: Project-scoped vaults to link to the browser session. Links are immutable after
creation.

video_memory: Video memory (VRAM) for a GPU browser session. Requires gpu=true. Defaults to
2GiB, which comes with 4 vCPU and 6GiB memory. 4GiB comes with 8 vCPU and 12GiB
memory.

viewport: Initial browser window size in pixels with optional refresh rate. If omitted,
image defaults apply (1920x1080@25). For GPU images, the default is
1920x1080@60. Arbitrary viewport dimensions and refresh rates are accepted.
Expand Down Expand Up @@ -1046,6 +1059,7 @@ async def create(
"telemetry": telemetry,
"timeout_seconds": timeout_seconds,
"vaults": vaults,
"video_memory": video_memory,
"viewport": viewport,
},
browser_create_params.BrowserCreateParams,
Expand Down
44 changes: 40 additions & 4 deletions src/kernel/resources/browsers/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ def stream(
id_or_name: str,
*,
replay: str | Omit = omit,
type: SequenceNotStr[str] | Omit = omit,
last_event_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand All @@ -171,7 +172,10 @@ def stream(
stream closes when the browser session terminates. Each event frame includes an
id: field containing a monotonically increasing sequence number; pass it as
Last-Event-ID on reconnect to resume without gaps. The event: field is never
set; all frames carry JSON in the data: field. A keepalive comment frame is sent
set; event frames carry JSON in the data: field. A frame with an id: field and
no data: field moves Last-Event-ID past events that were not delivered, because
a type filter excluded them or they could not be decoded or exceeded the size
limit; SSE clients dispatch no event for it. A keepalive comment frame is sent
every 15 seconds when no events arrive. Returns 404 if the browser session does
not exist. If telemetry was not enabled on the session, the stream opens but no
events are delivered. Fresh connections only see new events; pass replay=all to
Expand All @@ -182,6 +186,14 @@ def stream(
any other value is treated as from-now. The buffer is bounded, so the first
event id may be greater than 1 if older events were evicted.

type: Deliver only these event types, such as captcha_solve_started or
captcha_challenge_result. Repeat the parameter or pass comma-separated values
for multiple types. Keepalive frames are always delivered. Filtered-out events
are not sent. An id-only frame carrying the latest skipped id is sent about
every 15 seconds while skipped events keep arriving, and otherwise with the next
keepalive or when the stream ends, so the connection stays active and
Last-Event-ID moves past them; a reconnect resumes after the skipped events.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -201,7 +213,13 @@ def stream(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform({"replay": replay}, telemetry_stream_params.TelemetryStreamParams),
query=maybe_transform(
{
"replay": replay,
"type": type,
},
telemetry_stream_params.TelemetryStreamParams,
),
),
cast_to=TelemetryStreamResponse,
stream=True,
Expand Down Expand Up @@ -339,6 +357,7 @@ async def stream(
id_or_name: str,
*,
replay: str | Omit = omit,
type: SequenceNotStr[str] | Omit = omit,
last_event_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand All @@ -353,7 +372,10 @@ async def stream(
stream closes when the browser session terminates. Each event frame includes an
id: field containing a monotonically increasing sequence number; pass it as
Last-Event-ID on reconnect to resume without gaps. The event: field is never
set; all frames carry JSON in the data: field. A keepalive comment frame is sent
set; event frames carry JSON in the data: field. A frame with an id: field and
no data: field moves Last-Event-ID past events that were not delivered, because
a type filter excluded them or they could not be decoded or exceeded the size
limit; SSE clients dispatch no event for it. A keepalive comment frame is sent
every 15 seconds when no events arrive. Returns 404 if the browser session does
not exist. If telemetry was not enabled on the session, the stream opens but no
events are delivered. Fresh connections only see new events; pass replay=all to
Expand All @@ -364,6 +386,14 @@ async def stream(
any other value is treated as from-now. The buffer is bounded, so the first
event id may be greater than 1 if older events were evicted.

type: Deliver only these event types, such as captcha_solve_started or
captcha_challenge_result. Repeat the parameter or pass comma-separated values
for multiple types. Keepalive frames are always delivered. Filtered-out events
are not sent. An id-only frame carrying the latest skipped id is sent about
every 15 seconds while skipped events keep arriving, and otherwise with the next
keepalive or when the stream ends, so the connection stays active and
Last-Event-ID moves past them; a reconnect resumes after the skipped events.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -383,7 +413,13 @@ async def stream(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=await async_maybe_transform({"replay": replay}, telemetry_stream_params.TelemetryStreamParams),
query=await async_maybe_transform(
{
"replay": replay,
"type": type,
},
telemetry_stream_params.TelemetryStreamParams,
),
),
cast_to=TelemetryStreamResponse,
stream=True,
Expand Down
1 change: 1 addition & 0 deletions src/kernel/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
from .vault_upsert_params import VaultUpsertParams as VaultUpsertParams
from .browser_proxy_config import BrowserProxyConfig as BrowserProxyConfig
from .browser_repl_content import BrowserReplContent as BrowserReplContent
from .browser_video_memory import BrowserVideoMemory as BrowserVideoMemory
from .proxy_check_response import ProxyCheckResponse as ProxyCheckResponse
from .search_create_params import SearchCreateParams as SearchCreateParams
from .vault_encryption_key import VaultEncryptionKey as VaultEncryptionKey
Expand Down
8 changes: 8 additions & 0 deletions src/kernel/types/browser_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from typing_extensions import Literal, TypedDict

from .tags_param import TagsParam
from .browser_video_memory import BrowserVideoMemory
from .vault_reference_param import VaultReferenceParam
from .browser_memory_request import BrowserMemoryRequest
from .browser_proxy_config_param import BrowserProxyConfigParam
Expand Down Expand Up @@ -158,6 +159,13 @@ class BrowserCreateParams(TypedDict, total=False):
Links are immutable after creation.
"""

video_memory: BrowserVideoMemory
"""Video memory (VRAM) for a GPU browser session.

Requires gpu=true. Defaults to 2GiB, which comes with 4 vCPU and 6GiB memory.
4GiB comes with 8 vCPU and 12GiB memory.
"""

viewport: BrowserViewport
"""
Initial browser window size in pixels with optional refresh rate. If omitted,
Expand Down
Loading
Loading