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.75.0"
".": "0.76.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: 125
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-f0486d0b8e34ddf8ba34e36ff97856cf973e0797e021ff621e04e4840970966e.yml
openapi_spec_hash: 12a71ce5ac80fc65f6a8779f0ca29223
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-ba32039d3975da7aa6d28e5184f0a44c9fbfe36ab7dbc71985d14e2ecc0867b9.yml
openapi_spec_hash: a9f32fc90c2add2ae85af828c298e35b
config_hash: 06186eb40e0058a2a87ac251fc07415d
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.76.0 (2026-07-09)

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

### Features

* Layer telemetry request config onto the default set ([c6d6b65](https://github.com/kernel/kernel-python-sdk/commit/c6d6b651a377d4283af20ab631f2adf25354954f))
* Return credential value keys and support removing values on update ([1c4af8e](https://github.com/kernel/kernel-python-sdk/commit/1c4af8ea100bd288182b38792ad87abab4136543))

## 0.75.0 (2026-07-08)

Full Changelog: [v0.74.0...v0.75.0](https://github.com/kernel/kernel-python-sdk/compare/v0.74.0...v0.75.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.75.0"
version = "0.76.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.75.0" # x-release-please-version
__version__ = "0.76.0" # x-release-please-version
12 changes: 11 additions & 1 deletion src/kernel/resources/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import httpx

from ..types import credential_list_params, credential_create_params, credential_update_params
from .._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
from .._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given
from .._utils import path_template, maybe_transform, async_maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
Expand Down Expand Up @@ -145,6 +145,7 @@ def update(
id_or_name: str,
*,
name: str | Omit = omit,
remove_value_keys: SequenceNotStr[str] | Omit = omit,
sso_provider: Optional[str] | Omit = omit,
totp_secret: str | Omit = omit,
values: Dict[str, str] | Omit = omit,
Expand All @@ -163,6 +164,9 @@ def update(
Args:
name: New name for the credential

remove_value_keys: Field names to remove from the credential's stored values. Removals are applied
before `values` are merged, so a key present in both is kept with its new value.

sso_provider: If set, indicates this credential should be used with the specified SSO
provider. Set to empty string or null to remove.

Expand All @@ -187,6 +191,7 @@ def update(
body=maybe_transform(
{
"name": name,
"remove_value_keys": remove_value_keys,
"sso_provider": sso_provider,
"totp_secret": totp_secret,
"values": values,
Expand Down Expand Up @@ -445,6 +450,7 @@ async def update(
id_or_name: str,
*,
name: str | Omit = omit,
remove_value_keys: SequenceNotStr[str] | Omit = omit,
sso_provider: Optional[str] | Omit = omit,
totp_secret: str | Omit = omit,
values: Dict[str, str] | Omit = omit,
Expand All @@ -463,6 +469,9 @@ async def update(
Args:
name: New name for the credential

remove_value_keys: Field names to remove from the credential's stored values. Removals are applied
before `values` are merged, so a key present in both is kept with its new value.

sso_provider: If set, indicates this credential should be used with the specified SSO
provider. Set to empty string or null to remove.

Expand All @@ -487,6 +496,7 @@ async def update(
body=await async_maybe_transform(
{
"name": name,
"remove_value_keys": remove_value_keys,
"sso_provider": sso_provider,
"totp_secret": totp_secret,
"values": values,
Expand Down
24 changes: 17 additions & 7 deletions src/kernel/types/browser_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,26 @@ class Telemetry(TypedDict, total=False):
browser: BrowserTelemetryCategoriesConfigParam
"""Per-category capture flags.

Selection is opt-in: only the categories set to enabled=true are captured;
anything omitted is off. If enabled is true and browser is omitted or empty, the
default category set is used. A browser config that enables nothing stops
capture on update and starts no capture on create.
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 using the default category set unless browser category
settings are provided. False stops capture on update and starts no capture on
create. enabled=false cannot be combined with browser category settings.
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.
"""
24 changes: 17 additions & 7 deletions src/kernel/types/browser_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,28 @@ class Telemetry(TypedDict, total=False):
browser: BrowserTelemetryCategoriesConfigParam
"""Per-category capture flags.

Selection is opt-in: only the categories set to enabled=true are captured;
anything omitted is off. If enabled is true and browser is omitted or empty, the
default category set is used. A browser config that enables nothing stops
capture on update and starts no capture on create.
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 using the default category set unless browser category
settings are provided. False stops capture on update and starts no capture on
create. enabled=false cannot be combined with browser category settings.
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.
"""


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@


class BrowserTelemetryCategoriesConfig(BaseModel):
"""Per-category telemetry capture settings.
"""Per-category telemetry capture settings layered onto the default set.

Selection is opt-in: set a category to enabled=true to capture it; anything omitted is off. The default set (used by enabled=true with no per-category settings) is the lightweight operational signals: control, connection, system, captcha. The CDP categories (console, network, page, interaction) and screenshot are off by default and must be opted into.
The operational signals (control, connection, system, captcha) are on by default and are opt-out: set one to enabled=false to stop capturing it. The CDP categories (console, network, page, interaction) and screenshot are off by default and are opt-in: set enabled=true to capture them.
"""

captcha: Optional[BrowserTelemetryCategoryConfig] = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@


class BrowserTelemetryCategoriesConfigParam(TypedDict, total=False):
"""Per-category telemetry capture settings.
"""Per-category telemetry capture settings layered onto the default set.

Selection is opt-in: set a category to enabled=true to capture it; anything omitted is off. The default set (used by enabled=true with no per-category settings) is the lightweight operational signals: control, connection, system, captcha. The CDP categories (console, network, page, interaction) and screenshot are off by default and must be opted into.
The operational signals (control, connection, system, captcha) are on by default and are opt-out: set one to enabled=false to stop capturing it. The CDP categories (console, network, page, interaction) and screenshot are off by default and are opt-in: set enabled=true to capture them.
"""

captcha: BrowserTelemetryCategoryConfigParam
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ class BrowserTelemetryCategoryConfig(BaseModel):
enabled: Optional[bool] = None
"""Whether this category is captured.

Selection is opt-in, so an omitted category is not captured.
Operational categories (control, connection, system, captcha) default to true;
set false to opt out. CDP categories (console, network, page, interaction) and
screenshot default to false; set true to opt in.
"""
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ class BrowserTelemetryCategoryConfigParam(TypedDict, total=False):
enabled: bool
"""Whether this category is captured.

Selection is opt-in, so an omitted category is not captured.
Operational categories (control, connection, system, captcha) default to true;
set false to opt out. CDP categories (console, network, page, interaction) and
screenshot default to false; set true to opt in.
"""
9 changes: 8 additions & 1 deletion src/kernel/types/credential.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional
from typing import List, Optional
from datetime import datetime

from .._models import BaseModel
Expand Down Expand Up @@ -48,3 +48,10 @@ class Credential(BaseModel):

totp_code_expires_at: Optional[datetime] = None
"""When the totp_code expires. Only included when totp_code is present."""

value_keys: Optional[List[str]] = None
"""The field names stored in this credential's values (e.g., username, password).

Values themselves are never returned. Included on single-credential responses
(create, get by id or name, update); omitted from list responses.
"""
9 changes: 9 additions & 0 deletions src/kernel/types/credential_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,22 @@
from typing import Dict, Optional
from typing_extensions import TypedDict

from .._types import SequenceNotStr

__all__ = ["CredentialUpdateParams"]


class CredentialUpdateParams(TypedDict, total=False):
name: str
"""New name for the credential"""

remove_value_keys: SequenceNotStr[str]
"""Field names to remove from the credential's stored values.

Removals are applied before `values` are merged, so a key present in both is
kept with its new value.
"""

sso_provider: Optional[str]
"""If set, indicates this credential should be used with the specified SSO
provider.
Expand Down
2 changes: 2 additions & 0 deletions tests/api_resources/test_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def test_method_update_with_all_params(self, client: Kernel) -> None:
credential = client.credentials.update(
id_or_name="id_or_name",
name="my-updated-login",
remove_value_keys=["old_field"],
sso_provider="google",
totp_secret="JBSWY3DPEHPK3PXP",
values={
Expand Down Expand Up @@ -433,6 +434,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncKernel) ->
credential = await async_client.credentials.update(
id_or_name="id_or_name",
name="my-updated-login",
remove_value_keys=["old_field"],
sso_provider="google",
totp_secret="JBSWY3DPEHPK3PXP",
values={
Expand Down
Loading