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.82.0"
".": "0.83.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: 127
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-477bd1ff6f7053f2bd4687d7c5fc9a6a1d56a584be42f927abc6fc858ff35718.yml
openapi_spec_hash: 3bf4cc824f6497c4ad109abd3187eede
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-a4b8f40deaf572d0dab92ebe0cafa865e1357a18f8720c3f003810da89aa4203.yml
openapi_spec_hash: d06e9bf804151f7d9f7fab77f2e1669c
config_hash: 77ee715aa17061166f9a02b264a21b8d
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.83.0 (2026-07-24)

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

### Features

* Add browser telemetry to managed auth connections ([c19bfbe](https://github.com/kernel/kernel-python-sdk/commit/c19bfbed5eed67758e735fb477c8c6c2afff9e7a))

## 0.82.0 (2026-07-23)

Full Changelog: [v0.81.0...v0.82.0](https://github.com/kernel/kernel-python-sdk/compare/v0.81.0...v0.82.0)
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.82.0"
version = "0.83.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.82.0" # x-release-please-version
__version__ = "0.83.0" # x-release-please-version
38 changes: 37 additions & 1 deletion src/kernel/resources/auth/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Any, Dict, cast
from typing import Any, Dict, Optional, cast
from typing_extensions import Literal

import httpx
Expand Down Expand Up @@ -66,6 +66,7 @@ def create(
profile_name: str,
allowed_domains: SequenceNotStr[str] | Omit = omit,
auto_reauth: bool | Omit = omit,
browser_telemetry: Optional[connection_create_params.BrowserTelemetry] | Omit = omit,
credential: connection_create_params.Credential | Omit = omit,
health_check_interval: int | Omit = omit,
health_checks: bool | Omit = omit,
Expand Down Expand Up @@ -119,6 +120,10 @@ def create(
false, expired sessions are marked as `NEEDS_AUTH` instead of attempting
re-auth. Defaults to true.

browser_telemetry: Browser telemetry configuration used by this connection's browser sessions by
default. Uses the exact create-browser configuration. Can be overridden
per-login.

credential:
Reference to credentials for the auth connection. Use one of:

Expand Down Expand Up @@ -166,6 +171,7 @@ def create(
"profile_name": profile_name,
"allowed_domains": allowed_domains,
"auto_reauth": auto_reauth,
"browser_telemetry": browser_telemetry,
"credential": credential,
"health_check_interval": health_check_interval,
"health_checks": health_checks,
Expand Down Expand Up @@ -223,6 +229,7 @@ def update(
*,
allowed_domains: SequenceNotStr[str] | Omit = omit,
auto_reauth: bool | Omit = omit,
browser_telemetry: Optional[connection_update_params.BrowserTelemetry] | Omit = omit,
credential: connection_update_params.Credential | Omit = omit,
health_check_interval: int | Omit = omit,
health_checks: bool | Omit = omit,
Expand Down Expand Up @@ -253,6 +260,10 @@ def update(
when `health_checks` is false. When false, expired sessions detected by a health
check are marked as `NEEDS_AUTH` instead of attempting re-auth.

browser_telemetry: Browser telemetry configuration used by future browser sessions for this
connection. Uses the exact create-browser configuration. Set enabled to false to
disable telemetry.

credential:
Reference to credentials for the auth connection. Use one of:

Expand Down Expand Up @@ -294,6 +305,7 @@ def update(
{
"allowed_domains": allowed_domains,
"auto_reauth": auto_reauth,
"browser_telemetry": browser_telemetry,
"credential": credential,
"health_check_interval": health_check_interval,
"health_checks": health_checks,
Expand Down Expand Up @@ -452,6 +464,7 @@ def login(
self,
id: str,
*,
browser_telemetry: Optional[connection_login_params.BrowserTelemetry] | Omit = omit,
proxy: connection_login_params.Proxy | Omit = omit,
record_session: bool | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -468,6 +481,10 @@ def login(
credentials are stored.

Args:
browser_telemetry: Override the connection's default browser telemetry configuration for this
login. When omitted, the connection's browser_telemetry default is used. Uses
the exact create-browser configuration.

proxy: Proxy selection. Provide either id or name. The proxy must be in the same
project as the resource referencing it. When selecting by name, the name must
match exactly one active proxy in the project. Ambiguous names return a 400; use
Expand All @@ -490,6 +507,7 @@ def login(
path_template("/auth/connections/{id}/login", id=id),
body=maybe_transform(
{
"browser_telemetry": browser_telemetry,
"proxy": proxy,
"record_session": record_session,
},
Expand Down Expand Up @@ -657,6 +675,7 @@ async def create(
profile_name: str,
allowed_domains: SequenceNotStr[str] | Omit = omit,
auto_reauth: bool | Omit = omit,
browser_telemetry: Optional[connection_create_params.BrowserTelemetry] | Omit = omit,
credential: connection_create_params.Credential | Omit = omit,
health_check_interval: int | Omit = omit,
health_checks: bool | Omit = omit,
Expand Down Expand Up @@ -710,6 +729,10 @@ async def create(
false, expired sessions are marked as `NEEDS_AUTH` instead of attempting
re-auth. Defaults to true.

browser_telemetry: Browser telemetry configuration used by this connection's browser sessions by
default. Uses the exact create-browser configuration. Can be overridden
per-login.

credential:
Reference to credentials for the auth connection. Use one of:

Expand Down Expand Up @@ -757,6 +780,7 @@ async def create(
"profile_name": profile_name,
"allowed_domains": allowed_domains,
"auto_reauth": auto_reauth,
"browser_telemetry": browser_telemetry,
"credential": credential,
"health_check_interval": health_check_interval,
"health_checks": health_checks,
Expand Down Expand Up @@ -814,6 +838,7 @@ async def update(
*,
allowed_domains: SequenceNotStr[str] | Omit = omit,
auto_reauth: bool | Omit = omit,
browser_telemetry: Optional[connection_update_params.BrowserTelemetry] | Omit = omit,
credential: connection_update_params.Credential | Omit = omit,
health_check_interval: int | Omit = omit,
health_checks: bool | Omit = omit,
Expand Down Expand Up @@ -844,6 +869,10 @@ async def update(
when `health_checks` is false. When false, expired sessions detected by a health
check are marked as `NEEDS_AUTH` instead of attempting re-auth.

browser_telemetry: Browser telemetry configuration used by future browser sessions for this
connection. Uses the exact create-browser configuration. Set enabled to false to
disable telemetry.

credential:
Reference to credentials for the auth connection. Use one of:

Expand Down Expand Up @@ -885,6 +914,7 @@ async def update(
{
"allowed_domains": allowed_domains,
"auto_reauth": auto_reauth,
"browser_telemetry": browser_telemetry,
"credential": credential,
"health_check_interval": health_check_interval,
"health_checks": health_checks,
Expand Down Expand Up @@ -1043,6 +1073,7 @@ async def login(
self,
id: str,
*,
browser_telemetry: Optional[connection_login_params.BrowserTelemetry] | Omit = omit,
proxy: connection_login_params.Proxy | Omit = omit,
record_session: bool | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -1059,6 +1090,10 @@ async def login(
credentials are stored.

Args:
browser_telemetry: Override the connection's default browser telemetry configuration for this
login. When omitted, the connection's browser_telemetry default is used. Uses
the exact create-browser configuration.

proxy: Proxy selection. Provide either id or name. The proxy must be in the same
project as the resource referencing it. When selecting by name, the name must
match exactly one active proxy in the project. Ambiguous names return a 400; use
Expand All @@ -1081,6 +1116,7 @@ async def login(
path_template("/auth/connections/{id}/login", id=id),
body=await async_maybe_transform(
{
"browser_telemetry": browser_telemetry,
"proxy": proxy,
"record_session": record_session,
},
Expand Down
44 changes: 43 additions & 1 deletion src/kernel/types/auth/connection_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

from __future__ import annotations

from typing import Optional
from typing_extensions import Required, TypedDict

from ..._types import SequenceNotStr
from ..browsers.browser_telemetry_categories_config_param import BrowserTelemetryCategoriesConfigParam

__all__ = ["ConnectionCreateParams", "Credential", "Proxy"]
__all__ = ["ConnectionCreateParams", "BrowserTelemetry", "Credential", "Proxy"]


class ConnectionCreateParams(TypedDict, total=False):
Expand Down Expand Up @@ -52,6 +54,13 @@ class ConnectionCreateParams(TypedDict, total=False):
re-auth. Defaults to true.
"""

browser_telemetry: Optional[BrowserTelemetry]
"""
Browser telemetry configuration used by this connection's browser sessions by
default. Uses the exact create-browser configuration. Can be overridden
per-login.
"""

credential: Credential
"""Reference to credentials for the auth connection. Use one of:

Expand Down Expand Up @@ -102,6 +111,39 @@ class ConnectionCreateParams(TypedDict, total=False):
"""


class BrowserTelemetry(TypedDict, total=False):
"""
Browser telemetry configuration used by this connection's browser sessions by default. Uses the exact create-browser configuration. Can be overridden per-login.
"""

browser: BrowserTelemetryCategoriesConfigParam
"""Per-category capture flags.

The operational categories (control, connection, system, captcha) are captured
whenever telemetry is enabled; set one to enabled=false to opt out. The CDP
categories (console, network, page, interaction) and screenshot are off by
default; set enabled=true to opt in. On create, provided categories layer onto
the default set. On update, provided categories merge onto the session's current
config; when no telemetry is active this falls back to the default set (matching
create). If browser is omitted or empty, the default set is used. A browser
config that disables every category stops capture on update and starts no
capture on create.
"""

enabled: bool
"""Request shortcut for browser telemetry capture.

True enables capture; with no browser category settings it captures the default
set (control, connection, system, captcha), and any browser category settings
are layered onto that default set. On update, enabled=true resolves the config
fresh from the default set plus any provided categories, replacing the session's
current selection rather than merging onto it; omit enabled to merge categories
onto the current selection instead. False stops capture on update and starts no
capture on create. enabled=false cannot be combined with browser category
settings.
"""


class Credential(TypedDict, total=False):
"""Reference to credentials for the auth connection.

Expand Down
47 changes: 46 additions & 1 deletion src/kernel/types/auth/connection_login_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@

from __future__ import annotations

from typing import Optional
from typing_extensions import TypedDict

__all__ = ["ConnectionLoginParams", "Proxy"]
from ..browsers.browser_telemetry_categories_config_param import BrowserTelemetryCategoriesConfigParam

__all__ = ["ConnectionLoginParams", "BrowserTelemetry", "Proxy"]


class ConnectionLoginParams(TypedDict, total=False):
browser_telemetry: Optional[BrowserTelemetry]
"""Override the connection's default browser telemetry configuration for this
login.

When omitted, the connection's browser_telemetry default is used. Uses the exact
create-browser configuration.
"""

proxy: Proxy
"""Proxy selection.

Expand All @@ -24,6 +35,40 @@ class ConnectionLoginParams(TypedDict, total=False):
"""


class BrowserTelemetry(TypedDict, total=False):
"""Override the connection's default browser telemetry configuration for this login.

When omitted, the connection's browser_telemetry default is used. Uses the exact create-browser configuration.
"""

browser: BrowserTelemetryCategoriesConfigParam
"""Per-category capture flags.

The operational categories (control, connection, system, captcha) are captured
whenever telemetry is enabled; set one to enabled=false to opt out. The CDP
categories (console, network, page, interaction) and screenshot are off by
default; set enabled=true to opt in. On create, provided categories layer onto
the default set. On update, provided categories merge onto the session's current
config; when no telemetry is active this falls back to the default set (matching
create). If browser is omitted or empty, the default set is used. A browser
config that disables every category stops capture on update and starts no
capture on create.
"""

enabled: bool
"""Request shortcut for browser telemetry capture.

True enables capture; with no browser category settings it captures the default
set (control, connection, system, captcha), and any browser category settings
are layered onto that default set. On update, enabled=true resolves the config
fresh from the default set plus any provided categories, replacing the session's
current selection rather than merging onto it; omit enabled to merge categories
onto the current selection instead. False stops capture on update and starts no
capture on create. enabled=false cannot be combined with browser category
settings.
"""


class Proxy(TypedDict, total=False):
"""Proxy selection.

Expand Down
Loading
Loading