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
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 112
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-5d96fec7a84722f300bd99db7352d6284141826f3412f6d370ac0926edf03d42.yml
openapi_spec_hash: d4e1a29ac06f9543e0ef69372eb3ff35
config_hash: ae3dea7997fb5d36fa41979f9585ed78
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-e9c99662d29710f105847d461f8919e06f6aa2e43b0e1a6285d0b137643a7907.yml
openapi_spec_hash: 4415cb4790c7a5ec892f4e3521217cb4
config_hash: 27b38657d9a3b33328be930eeb319628
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.57.0 (2026-05-26)

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

### Features

* api: dual-route /projects under /org/projects, deprecate /projects ([c5f21ec](https://github.com/kernel/kernel-python-sdk/commit/c5f21ecf3e1081c774ba58ad32b10e8cd5b0a94a))
* Support telemetry enabled request config ([f48cbee](https://github.com/kernel/kernel-python-sdk/commit/f48cbee40aee158615972e6f39b92179e06efbce))

## 0.57.0 (2026-05-22)

Full Changelog: [v0.56.0...v0.57.0](https://github.com/kernel/kernel-python-sdk/compare/v0.56.0...v0.57.0)
Expand Down
15 changes: 8 additions & 7 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ from kernel.types.browsers import (
BrowserTelemetryCategoryConfig,
BrowserTelemetryConfig,
BrowserTelemetryEvent,
BrowserTelemetryRequestConfig,
TelemetryStreamResponse,
)
```
Expand Down Expand Up @@ -395,11 +396,11 @@ from kernel.types import CreateProjectRequest, Project, UpdateProjectRequest

Methods:

- <code title="post /projects">client.projects.<a href="./src/kernel/resources/projects/projects.py">create</a>(\*\*<a href="src/kernel/types/project_create_params.py">params</a>) -> <a href="./src/kernel/types/project.py">Project</a></code>
- <code title="get /projects/{id}">client.projects.<a href="./src/kernel/resources/projects/projects.py">retrieve</a>(id) -> <a href="./src/kernel/types/project.py">Project</a></code>
- <code title="patch /projects/{id}">client.projects.<a href="./src/kernel/resources/projects/projects.py">update</a>(id, \*\*<a href="src/kernel/types/project_update_params.py">params</a>) -> <a href="./src/kernel/types/project.py">Project</a></code>
- <code title="get /projects">client.projects.<a href="./src/kernel/resources/projects/projects.py">list</a>(\*\*<a href="src/kernel/types/project_list_params.py">params</a>) -> <a href="./src/kernel/types/project.py">SyncOffsetPagination[Project]</a></code>
- <code title="delete /projects/{id}">client.projects.<a href="./src/kernel/resources/projects/projects.py">delete</a>(id) -> None</code>
- <code title="post /org/projects">client.projects.<a href="./src/kernel/resources/projects/projects.py">create</a>(\*\*<a href="src/kernel/types/project_create_params.py">params</a>) -> <a href="./src/kernel/types/project.py">Project</a></code>
- <code title="get /org/projects/{id}">client.projects.<a href="./src/kernel/resources/projects/projects.py">retrieve</a>(id) -> <a href="./src/kernel/types/project.py">Project</a></code>
- <code title="patch /org/projects/{id}">client.projects.<a href="./src/kernel/resources/projects/projects.py">update</a>(id, \*\*<a href="src/kernel/types/project_update_params.py">params</a>) -> <a href="./src/kernel/types/project.py">Project</a></code>
- <code title="get /org/projects">client.projects.<a href="./src/kernel/resources/projects/projects.py">list</a>(\*\*<a href="src/kernel/types/project_list_params.py">params</a>) -> <a href="./src/kernel/types/project.py">SyncOffsetPagination[Project]</a></code>
- <code title="delete /org/projects/{id}">client.projects.<a href="./src/kernel/resources/projects/projects.py">delete</a>(id) -> None</code>

## Limits

Expand All @@ -411,8 +412,8 @@ from kernel.types.projects import ProjectLimits, UpdateProjectLimitsRequest

Methods:

- <code title="get /projects/{id}/limits">client.projects.limits.<a href="./src/kernel/resources/projects/limits.py">retrieve</a>(id) -> <a href="./src/kernel/types/projects/project_limits.py">ProjectLimits</a></code>
- <code title="patch /projects/{id}/limits">client.projects.limits.<a href="./src/kernel/resources/projects/limits.py">update</a>(id, \*\*<a href="src/kernel/types/projects/limit_update_params.py">params</a>) -> <a href="./src/kernel/types/projects/project_limits.py">ProjectLimits</a></code>
- <code title="get /org/projects/{id}/limits">client.projects.limits.<a href="./src/kernel/resources/projects/limits.py">retrieve</a>(id) -> <a href="./src/kernel/types/projects/project_limits.py">ProjectLimits</a></code>
- <code title="patch /org/projects/{id}/limits">client.projects.limits.<a href="./src/kernel/resources/projects/limits.py">update</a>(id, \*\*<a href="src/kernel/types/projects/limit_update_params.py">params</a>) -> <a href="./src/kernel/types/projects/project_limits.py">ProjectLimits</a></code>

# CredentialProviders

Expand Down
40 changes: 23 additions & 17 deletions src/kernel/resources/browsers/browsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
from ...types.shared_params.browser_profile import BrowserProfile
from ...types.shared_params.browser_viewport import BrowserViewport
from ...types.shared_params.browser_extension import BrowserExtension
from ...types.browsers.browser_telemetry_config_param import BrowserTelemetryConfigParam
from ...types.browsers.browser_telemetry_request_config_param import BrowserTelemetryRequestConfigParam

__all__ = ["BrowsersResource", "AsyncBrowsersResource"]

Expand Down Expand Up @@ -173,7 +173,7 @@ def create(
proxy_id: str | Omit = omit,
start_url: str | Omit = omit,
stealth: bool | Omit = omit,
telemetry: Optional[BrowserTelemetryConfigParam] | Omit = omit,
telemetry: Optional[BrowserTelemetryRequestConfigParam] | Omit = omit,
timeout_seconds: int | 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.
Expand Down Expand Up @@ -219,9 +219,11 @@ def create(
stealth: If true, launches the browser in stealth mode to reduce detection by anti-bot
mechanisms.

telemetry: Telemetry configuration for the browser session. If provided, telemetry capture
starts with the specified category filter when the session is created. If
omitted, no telemetry capture is started.
telemetry: Telemetry configuration for the browser session. Set enabled to true to start
capture using VM defaults, or provide browser category settings. If omitted,
null, set to an empty object ({}), set to enabled: false without browser
category settings, or all four categories are explicitly disabled, capture is
not started.

timeout_seconds: The number of seconds of inactivity before the browser session is terminated.
Activity includes CDP connections and live view connections. Defaults to 60
Expand Down Expand Up @@ -325,7 +327,7 @@ def update(
disable_default_proxy: bool | Omit = omit,
profile: BrowserProfile | Omit = omit,
proxy_id: Optional[str] | Omit = omit,
telemetry: Optional[BrowserTelemetryConfigParam] | Omit = omit,
telemetry: Optional[BrowserTelemetryRequestConfigParam] | Omit = omit,
viewport: browser_update_params.Viewport | 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 @@ -348,9 +350,10 @@ def update(
proxy.

telemetry: Telemetry configuration. Omit, set to null, or set to an empty object ({}) to
leave the existing configuration unchanged (no-op). To enable capture for all
categories using VM defaults, set browser to an empty object ({"browser": {}}).
To stop capture, set every category's enabled to false.
leave the existing configuration unchanged. Set enabled to true to enable
capture using VM defaults. Set enabled to false to stop capture. Provide browser
category settings for per-category updates. Explicitly disabling all four
categories also stops capture.

viewport: Viewport configuration to apply to the browser session.

Expand Down Expand Up @@ -717,7 +720,7 @@ async def create(
proxy_id: str | Omit = omit,
start_url: str | Omit = omit,
stealth: bool | Omit = omit,
telemetry: Optional[BrowserTelemetryConfigParam] | Omit = omit,
telemetry: Optional[BrowserTelemetryRequestConfigParam] | Omit = omit,
timeout_seconds: int | 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.
Expand Down Expand Up @@ -763,9 +766,11 @@ async def create(
stealth: If true, launches the browser in stealth mode to reduce detection by anti-bot
mechanisms.

telemetry: Telemetry configuration for the browser session. If provided, telemetry capture
starts with the specified category filter when the session is created. If
omitted, no telemetry capture is started.
telemetry: Telemetry configuration for the browser session. Set enabled to true to start
capture using VM defaults, or provide browser category settings. If omitted,
null, set to an empty object ({}), set to enabled: false without browser
category settings, or all four categories are explicitly disabled, capture is
not started.

timeout_seconds: The number of seconds of inactivity before the browser session is terminated.
Activity includes CDP connections and live view connections. Defaults to 60
Expand Down Expand Up @@ -869,7 +874,7 @@ async def update(
disable_default_proxy: bool | Omit = omit,
profile: BrowserProfile | Omit = omit,
proxy_id: Optional[str] | Omit = omit,
telemetry: Optional[BrowserTelemetryConfigParam] | Omit = omit,
telemetry: Optional[BrowserTelemetryRequestConfigParam] | Omit = omit,
viewport: browser_update_params.Viewport | 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 @@ -892,9 +897,10 @@ async def update(
proxy.

telemetry: Telemetry configuration. Omit, set to null, or set to an empty object ({}) to
leave the existing configuration unchanged (no-op). To enable capture for all
categories using VM defaults, set browser to an empty object ({"browser": {}}).
To stop capture, set every category's enabled to false.
leave the existing configuration unchanged. Set enabled to true to enable
capture using VM defaults. Set enabled to false to stop capture. Provide browser
category settings for per-category updates. Explicitly disabling all four
categories also stops capture.

viewport: Viewport configuration to apply to the browser session.

Expand Down
8 changes: 4 additions & 4 deletions src/kernel/resources/projects/limits.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def retrieve(
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return self._get(
path_template("/projects/{id}/limits", id=id),
path_template("/org/projects/{id}/limits", id=id),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
Expand Down Expand Up @@ -121,7 +121,7 @@ def update(
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return self._patch(
path_template("/projects/{id}/limits", id=id),
path_template("/org/projects/{id}/limits", id=id),
body=maybe_transform(
{
"max_concurrent_invocations": max_concurrent_invocations,
Expand Down Expand Up @@ -187,7 +187,7 @@ async def retrieve(
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return await self._get(
path_template("/projects/{id}/limits", id=id),
path_template("/org/projects/{id}/limits", id=id),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
Expand Down Expand Up @@ -235,7 +235,7 @@ async def update(
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return await self._patch(
path_template("/projects/{id}/limits", id=id),
path_template("/org/projects/{id}/limits", id=id),
body=await async_maybe_transform(
{
"max_concurrent_invocations": max_concurrent_invocations,
Expand Down
20 changes: 10 additions & 10 deletions src/kernel/resources/projects/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def create(
timeout: Override the client-level default timeout for this request, in seconds
"""
return self._post(
"/projects",
"/org/projects",
body=maybe_transform({"name": name}, project_create_params.ProjectCreateParams),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
Expand Down Expand Up @@ -119,7 +119,7 @@ def retrieve(
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return self._get(
path_template("/projects/{id}", id=id),
path_template("/org/projects/{id}", id=id),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
Expand Down Expand Up @@ -158,7 +158,7 @@ def update(
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return self._patch(
path_template("/projects/{id}", id=id),
path_template("/org/projects/{id}", id=id),
body=maybe_transform(
{
"name": name,
Expand Down Expand Up @@ -204,7 +204,7 @@ def list(
timeout: Override the client-level default timeout for this request, in seconds
"""
return self._get_api_list(
"/projects",
"/org/projects",
page=SyncOffsetPagination[Project],
options=make_request_options(
extra_headers=extra_headers,
Expand Down Expand Up @@ -251,7 +251,7 @@ def delete(
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
return self._delete(
path_template("/projects/{id}", id=id),
path_template("/org/projects/{id}", id=id),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
Expand Down Expand Up @@ -312,7 +312,7 @@ async def create(
timeout: Override the client-level default timeout for this request, in seconds
"""
return await self._post(
"/projects",
"/org/projects",
body=await async_maybe_transform({"name": name}, project_create_params.ProjectCreateParams),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
Expand Down Expand Up @@ -346,7 +346,7 @@ async def retrieve(
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return await self._get(
path_template("/projects/{id}", id=id),
path_template("/org/projects/{id}", id=id),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
Expand Down Expand Up @@ -385,7 +385,7 @@ async def update(
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return await self._patch(
path_template("/projects/{id}", id=id),
path_template("/org/projects/{id}", id=id),
body=await async_maybe_transform(
{
"name": name,
Expand Down Expand Up @@ -431,7 +431,7 @@ def list(
timeout: Override the client-level default timeout for this request, in seconds
"""
return self._get_api_list(
"/projects",
"/org/projects",
page=AsyncOffsetPagination[Project],
options=make_request_options(
extra_headers=extra_headers,
Expand Down Expand Up @@ -478,7 +478,7 @@ async def delete(
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
return await self._delete(
path_template("/projects/{id}", id=id),
path_template("/org/projects/{id}", id=id),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
Expand Down
10 changes: 6 additions & 4 deletions src/kernel/types/browser_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from .shared_params.browser_profile import BrowserProfile
from .shared_params.browser_viewport import BrowserViewport
from .shared_params.browser_extension import BrowserExtension
from .browsers.browser_telemetry_config_param import BrowserTelemetryConfigParam
from .browsers.browser_telemetry_request_config_param import BrowserTelemetryRequestConfigParam

__all__ = ["BrowserCreateParams"]

Expand Down Expand Up @@ -75,11 +75,13 @@ class BrowserCreateParams(TypedDict, total=False):
mechanisms.
"""

telemetry: Optional[BrowserTelemetryConfigParam]
telemetry: Optional[BrowserTelemetryRequestConfigParam]
"""Telemetry configuration for the browser session.
If provided, telemetry capture starts with the specified category filter when
the session is created. If omitted, no telemetry capture is started.
Set enabled to true to start capture using VM defaults, or provide browser
category settings. If omitted, null, set to an empty object ({}), set to
enabled: false without browser category settings, or all four categories are
explicitly disabled, capture is not started.
"""

timeout_seconds: int
Expand Down
11 changes: 6 additions & 5 deletions src/kernel/types/browser_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from .shared_params.browser_profile import BrowserProfile
from .shared_params.browser_viewport import BrowserViewport
from .browsers.browser_telemetry_config_param import BrowserTelemetryConfigParam
from .browsers.browser_telemetry_request_config_param import BrowserTelemetryRequestConfigParam

__all__ = ["BrowserUpdateParams", "Viewport"]

Expand All @@ -31,13 +31,14 @@ class BrowserUpdateParams(TypedDict, total=False):
Omit to leave unchanged, set to empty string to remove proxy.
"""

telemetry: Optional[BrowserTelemetryConfigParam]
telemetry: Optional[BrowserTelemetryRequestConfigParam]
"""Telemetry configuration.

Omit, set to null, or set to an empty object ({}) to leave the existing
configuration unchanged (no-op). To enable capture for all categories using VM
defaults, set browser to an empty object ({"browser": {}}). To stop capture, set
every category's enabled to false.
configuration unchanged. Set enabled to true to enable capture using VM
defaults. Set enabled to false to stop capture. Provide browser category
settings for per-category updates. Explicitly disabling all four categories also
stops capture.
"""

viewport: Viewport
Expand Down
Loading
Loading