From b6bcaffc75908fa8417908841a0506e02468047c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 7 Jan 2026 18:05:28 +0000 Subject: [PATCH 1/6] chore: sync repo --- .release-please-manifest.json | 2 +- CHANGELOG.md | 21 --------------------- pyproject.toml | 2 +- src/kernel/_version.py | 2 +- 4 files changed, 3 insertions(+), 24 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a36746b..d2d60a3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.25.0" + ".": "0.24.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e8130e5..dbcf083 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,26 +1,5 @@ # Changelog -## 0.25.0 (2026-01-07) - -Full Changelog: [v0.24.0...v0.25.0](https://github.com/onkernel/kernel-python-sdk/compare/v0.24.0...v0.25.0) - -### Features - -* **api:** add health check endpoint for proxies ([105801c](https://github.com/onkernel/kernel-python-sdk/commit/105801ca8028df379b2f79a8a5bd4c4e9f43c3cc)) -* **auth:** add auto_login credential flow ([e941d0f](https://github.com/onkernel/kernel-python-sdk/commit/e941d0fb0a62cb8a1aad2424577c825bd6764df4)) -* Enhance AuthAgentInvocation with step and last activity tracking ([99b8057](https://github.com/onkernel/kernel-python-sdk/commit/99b80574482322b22a5bd1ce79762471330f4945)) - - -### Bug Fixes - -* use async_to_httpx_files in patch method ([b103991](https://github.com/onkernel/kernel-python-sdk/commit/b1039911a4b2b47df0087821aae2cb0ddc374de2)) - - -### Chores - -* **internal:** add `--fix` argument to lint script ([73e0e46](https://github.com/onkernel/kernel-python-sdk/commit/73e0e4621186edb18b05514b14a638d62a0e5d14)) -* **internal:** codegen related update ([6f18d40](https://github.com/onkernel/kernel-python-sdk/commit/6f18d40b0f1f98b0f50ffb64b7fe858aaefb872f)) - ## 0.24.0 (2025-12-17) Full Changelog: [v0.23.0...v0.24.0](https://github.com/onkernel/kernel-python-sdk/compare/v0.23.0...v0.24.0) diff --git a/pyproject.toml b/pyproject.toml index 716de1f..770392c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "kernel" -version = "0.25.0" +version = "0.24.0" description = "The official Python library for the kernel API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/kernel/_version.py b/src/kernel/_version.py index d65bad2..17d46b5 100644 --- a/src/kernel/_version.py +++ b/src/kernel/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "kernel" -__version__ = "0.25.0" # x-release-please-version +__version__ = "0.24.0" # x-release-please-version From 1831cd4c21dadcbca6a8a871f957a673c0c54953 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 7 Jan 2026 18:05:46 +0000 Subject: [PATCH 2/6] feat(api): update production repos --- .github/workflows/publish-pypi.yml | 2 +- .github/workflows/release-doctor.yml | 2 +- .stats.yml | 2 +- CONTRIBUTING.md | 4 ++-- README.md | 6 +++--- pyproject.toml | 6 +++--- src/kernel/_files.py | 2 +- src/kernel/resources/agents/agents.py | 8 ++++---- src/kernel/resources/agents/auth/auth.py | 8 ++++---- src/kernel/resources/agents/auth/invocations.py | 8 ++++---- src/kernel/resources/apps.py | 8 ++++---- src/kernel/resources/browser_pools.py | 8 ++++---- src/kernel/resources/browsers/browsers.py | 8 ++++---- src/kernel/resources/browsers/computer.py | 8 ++++---- src/kernel/resources/browsers/fs/fs.py | 8 ++++---- src/kernel/resources/browsers/fs/watch.py | 8 ++++---- src/kernel/resources/browsers/logs.py | 8 ++++---- src/kernel/resources/browsers/playwright.py | 8 ++++---- src/kernel/resources/browsers/process.py | 8 ++++---- src/kernel/resources/browsers/replays.py | 8 ++++---- src/kernel/resources/credentials.py | 8 ++++---- src/kernel/resources/deployments.py | 8 ++++---- src/kernel/resources/extensions.py | 8 ++++---- src/kernel/resources/invocations.py | 8 ++++---- src/kernel/resources/profiles.py | 8 ++++---- src/kernel/resources/proxies.py | 8 ++++---- 26 files changed, 88 insertions(+), 88 deletions(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 120241d..994e625 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -1,6 +1,6 @@ # This workflow is triggered when a GitHub release is created. # It can also be run manually to re-publish to PyPI in case it failed for some reason. -# You can run this workflow by navigating to https://www.github.com/onkernel/kernel-python-sdk/actions/workflows/publish-pypi.yml +# You can run this workflow by navigating to https://www.github.com/kernel/kernel-python-sdk/actions/workflows/publish-pypi.yml name: Publish PyPI on: workflow_dispatch: diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 5e7787d..ba1be2c 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -9,7 +9,7 @@ jobs: release_doctor: name: release doctor runs-on: ubuntu-latest - if: github.repository == 'onkernel/kernel-python-sdk' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') + if: github.repository == 'kernel/kernel-python-sdk' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - uses: actions/checkout@v4 diff --git a/.stats.yml b/.stats.yml index 434275e..9ab4346 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 89 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-8d66dbedea5b240936b338809f272568ca84a452fc13dbda835479f2ec068b41.yml openapi_spec_hash: 7c499bfce2e996f1fff5e7791cea390e -config_hash: fcc2db3ed48ab4e8d1b588d31d394a23 +config_hash: 2ee8c7057fa9b05cd0dabd23247c40ec diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f05c930..9cb624f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -62,7 +62,7 @@ If you’d like to use the repository from source, you can either install from g To install via git: ```sh -$ pip install git+ssh://git@github.com/onkernel/kernel-python-sdk.git +$ pip install git+ssh://git@github.com/kernel/kernel-python-sdk.git ``` Alternatively, you can build from source and install the wheel file: @@ -120,7 +120,7 @@ the changes aren't made through the automated pipeline, you may want to make rel ### Publish with a GitHub workflow -You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/onkernel/kernel-python-sdk/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up. +You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/kernel/kernel-python-sdk/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up. ### Publish manually diff --git a/README.md b/README.md index 6d1dd19..d3e4341 100644 --- a/README.md +++ b/README.md @@ -363,9 +363,9 @@ browser = response.parse() # get the object that `browsers.create()` would have print(browser.session_id) ``` -These methods return an [`APIResponse`](https://github.com/onkernel/kernel-python-sdk/tree/main/src/kernel/_response.py) object. +These methods return an [`APIResponse`](https://github.com/kernel/kernel-python-sdk/tree/main/src/kernel/_response.py) object. -The async client returns an [`AsyncAPIResponse`](https://github.com/onkernel/kernel-python-sdk/tree/main/src/kernel/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. +The async client returns an [`AsyncAPIResponse`](https://github.com/kernel/kernel-python-sdk/tree/main/src/kernel/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. #### `.with_streaming_response` @@ -471,7 +471,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience. -We are keen for your feedback; please open an [issue](https://www.github.com/onkernel/kernel-python-sdk/issues) with questions, bugs, or suggestions. +We are keen for your feedback; please open an [issue](https://www.github.com/kernel/kernel-python-sdk/issues) with questions, bugs, or suggestions. ### Determining the installed version diff --git a/pyproject.toml b/pyproject.toml index 770392c..22aadee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,8 +37,8 @@ classifiers = [ ] [project.urls] -Homepage = "https://github.com/onkernel/kernel-python-sdk" -Repository = "https://github.com/onkernel/kernel-python-sdk" +Homepage = "https://github.com/kernel/kernel-python-sdk" +Repository = "https://github.com/kernel/kernel-python-sdk" [project.optional-dependencies] aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"] @@ -126,7 +126,7 @@ path = "README.md" [[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] # replace relative links with absolute links pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)' -replacement = '[\1](https://github.com/onkernel/kernel-python-sdk/tree/main/\g<2>)' +replacement = '[\1](https://github.com/kernel/kernel-python-sdk/tree/main/\g<2>)' [tool.pytest.ini_options] testpaths = ["tests"] diff --git a/src/kernel/_files.py b/src/kernel/_files.py index 9a6dd19..bbef8bf 100644 --- a/src/kernel/_files.py +++ b/src/kernel/_files.py @@ -34,7 +34,7 @@ def assert_is_file_content(obj: object, *, key: str | None = None) -> None: if not is_file_content(obj): prefix = f"Expected entry at `{key}`" if key is not None else f"Expected file input `{obj!r}`" raise RuntimeError( - f"{prefix} to be bytes, an io.IOBase instance, PathLike or a tuple but received {type(obj)} instead. See https://github.com/onkernel/kernel-python-sdk/tree/main#file-uploads" + f"{prefix} to be bytes, an io.IOBase instance, PathLike or a tuple but received {type(obj)} instead. See https://github.com/kernel/kernel-python-sdk/tree/main#file-uploads" ) from None diff --git a/src/kernel/resources/agents/agents.py b/src/kernel/resources/agents/agents.py index b7bb580..6999bd5 100644 --- a/src/kernel/resources/agents/agents.py +++ b/src/kernel/resources/agents/agents.py @@ -27,7 +27,7 @@ def with_raw_response(self) -> AgentsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return AgentsResourceWithRawResponse(self) @@ -36,7 +36,7 @@ def with_streaming_response(self) -> AgentsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return AgentsResourceWithStreamingResponse(self) @@ -52,7 +52,7 @@ def with_raw_response(self) -> AsyncAgentsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return AsyncAgentsResourceWithRawResponse(self) @@ -61,7 +61,7 @@ def with_streaming_response(self) -> AsyncAgentsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return AsyncAgentsResourceWithStreamingResponse(self) diff --git a/src/kernel/resources/agents/auth/auth.py b/src/kernel/resources/agents/auth/auth.py index f4a0276..4a541f7 100644 --- a/src/kernel/resources/agents/auth/auth.py +++ b/src/kernel/resources/agents/auth/auth.py @@ -41,7 +41,7 @@ def with_raw_response(self) -> AuthResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return AuthResourceWithRawResponse(self) @@ -50,7 +50,7 @@ def with_streaming_response(self) -> AuthResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return AuthResourceWithStreamingResponse(self) @@ -262,7 +262,7 @@ def with_raw_response(self) -> AsyncAuthResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return AsyncAuthResourceWithRawResponse(self) @@ -271,7 +271,7 @@ def with_streaming_response(self) -> AsyncAuthResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return AsyncAuthResourceWithStreamingResponse(self) diff --git a/src/kernel/resources/agents/auth/invocations.py b/src/kernel/resources/agents/auth/invocations.py index 34ab614..aa1c4da 100644 --- a/src/kernel/resources/agents/auth/invocations.py +++ b/src/kernel/resources/agents/auth/invocations.py @@ -34,7 +34,7 @@ def with_raw_response(self) -> InvocationsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return InvocationsResourceWithRawResponse(self) @@ -43,7 +43,7 @@ def with_streaming_response(self) -> InvocationsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return InvocationsResourceWithStreamingResponse(self) @@ -272,7 +272,7 @@ def with_raw_response(self) -> AsyncInvocationsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return AsyncInvocationsResourceWithRawResponse(self) @@ -281,7 +281,7 @@ def with_streaming_response(self) -> AsyncInvocationsResourceWithStreamingRespon """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return AsyncInvocationsResourceWithStreamingResponse(self) diff --git a/src/kernel/resources/apps.py b/src/kernel/resources/apps.py index b803299..0443e73 100644 --- a/src/kernel/resources/apps.py +++ b/src/kernel/resources/apps.py @@ -29,7 +29,7 @@ def with_raw_response(self) -> AppsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return AppsResourceWithRawResponse(self) @@ -38,7 +38,7 @@ def with_streaming_response(self) -> AppsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return AppsResourceWithStreamingResponse(self) @@ -106,7 +106,7 @@ def with_raw_response(self) -> AsyncAppsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return AsyncAppsResourceWithRawResponse(self) @@ -115,7 +115,7 @@ def with_streaming_response(self) -> AsyncAppsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return AsyncAppsResourceWithStreamingResponse(self) diff --git a/src/kernel/resources/browser_pools.py b/src/kernel/resources/browser_pools.py index 8c480ed..5a4bf61 100644 --- a/src/kernel/resources/browser_pools.py +++ b/src/kernel/resources/browser_pools.py @@ -41,7 +41,7 @@ def with_raw_response(self) -> BrowserPoolsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return BrowserPoolsResourceWithRawResponse(self) @@ -50,7 +50,7 @@ def with_streaming_response(self) -> BrowserPoolsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return BrowserPoolsResourceWithStreamingResponse(self) @@ -475,7 +475,7 @@ def with_raw_response(self) -> AsyncBrowserPoolsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return AsyncBrowserPoolsResourceWithRawResponse(self) @@ -484,7 +484,7 @@ def with_streaming_response(self) -> AsyncBrowserPoolsResourceWithStreamingRespo """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return AsyncBrowserPoolsResourceWithStreamingResponse(self) diff --git a/src/kernel/resources/browsers/browsers.py b/src/kernel/resources/browsers/browsers.py index cbd1773..8050a7d 100644 --- a/src/kernel/resources/browsers/browsers.py +++ b/src/kernel/resources/browsers/browsers.py @@ -115,7 +115,7 @@ def with_raw_response(self) -> BrowsersResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return BrowsersResourceWithRawResponse(self) @@ -124,7 +124,7 @@ def with_streaming_response(self) -> BrowsersResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return BrowsersResourceWithStreamingResponse(self) @@ -460,7 +460,7 @@ def with_raw_response(self) -> AsyncBrowsersResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return AsyncBrowsersResourceWithRawResponse(self) @@ -469,7 +469,7 @@ def with_streaming_response(self) -> AsyncBrowsersResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return AsyncBrowsersResourceWithStreamingResponse(self) diff --git a/src/kernel/resources/browsers/computer.py b/src/kernel/resources/browsers/computer.py index 87d377f..c23dd3d 100644 --- a/src/kernel/resources/browsers/computer.py +++ b/src/kernel/resources/browsers/computer.py @@ -48,7 +48,7 @@ def with_raw_response(self) -> ComputerResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return ComputerResourceWithRawResponse(self) @@ -57,7 +57,7 @@ def with_streaming_response(self) -> ComputerResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return ComputerResourceWithStreamingResponse(self) @@ -486,7 +486,7 @@ def with_raw_response(self) -> AsyncComputerResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return AsyncComputerResourceWithRawResponse(self) @@ -495,7 +495,7 @@ def with_streaming_response(self) -> AsyncComputerResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return AsyncComputerResourceWithStreamingResponse(self) diff --git a/src/kernel/resources/browsers/fs/fs.py b/src/kernel/resources/browsers/fs/fs.py index ff0cc48..0da0bdd 100644 --- a/src/kernel/resources/browsers/fs/fs.py +++ b/src/kernel/resources/browsers/fs/fs.py @@ -65,7 +65,7 @@ def with_raw_response(self) -> FsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return FsResourceWithRawResponse(self) @@ -74,7 +74,7 @@ def with_streaming_response(self) -> FsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return FsResourceWithStreamingResponse(self) @@ -624,7 +624,7 @@ def with_raw_response(self) -> AsyncFsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return AsyncFsResourceWithRawResponse(self) @@ -633,7 +633,7 @@ def with_streaming_response(self) -> AsyncFsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return AsyncFsResourceWithStreamingResponse(self) diff --git a/src/kernel/resources/browsers/fs/watch.py b/src/kernel/resources/browsers/fs/watch.py index ad26f2a..2a5c1e3 100644 --- a/src/kernel/resources/browsers/fs/watch.py +++ b/src/kernel/resources/browsers/fs/watch.py @@ -30,7 +30,7 @@ def with_raw_response(self) -> WatchResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return WatchResourceWithRawResponse(self) @@ -39,7 +39,7 @@ def with_streaming_response(self) -> WatchResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return WatchResourceWithStreamingResponse(self) @@ -173,7 +173,7 @@ def with_raw_response(self) -> AsyncWatchResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return AsyncWatchResourceWithRawResponse(self) @@ -182,7 +182,7 @@ def with_streaming_response(self) -> AsyncWatchResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return AsyncWatchResourceWithStreamingResponse(self) diff --git a/src/kernel/resources/browsers/logs.py b/src/kernel/resources/browsers/logs.py index 1fd291d..ab97a70 100644 --- a/src/kernel/resources/browsers/logs.py +++ b/src/kernel/resources/browsers/logs.py @@ -31,7 +31,7 @@ def with_raw_response(self) -> LogsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return LogsResourceWithRawResponse(self) @@ -40,7 +40,7 @@ def with_streaming_response(self) -> LogsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return LogsResourceWithStreamingResponse(self) @@ -108,7 +108,7 @@ def with_raw_response(self) -> AsyncLogsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return AsyncLogsResourceWithRawResponse(self) @@ -117,7 +117,7 @@ def with_streaming_response(self) -> AsyncLogsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return AsyncLogsResourceWithStreamingResponse(self) diff --git a/src/kernel/resources/browsers/playwright.py b/src/kernel/resources/browsers/playwright.py index c168a4a..5c47e3b 100644 --- a/src/kernel/resources/browsers/playwright.py +++ b/src/kernel/resources/browsers/playwright.py @@ -28,7 +28,7 @@ def with_raw_response(self) -> PlaywrightResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return PlaywrightResourceWithRawResponse(self) @@ -37,7 +37,7 @@ def with_streaming_response(self) -> PlaywrightResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return PlaywrightResourceWithStreamingResponse(self) @@ -102,7 +102,7 @@ def with_raw_response(self) -> AsyncPlaywrightResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return AsyncPlaywrightResourceWithRawResponse(self) @@ -111,7 +111,7 @@ def with_streaming_response(self) -> AsyncPlaywrightResourceWithStreamingRespons """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return AsyncPlaywrightResourceWithStreamingResponse(self) diff --git a/src/kernel/resources/browsers/process.py b/src/kernel/resources/browsers/process.py index 2bdaeeb..f5c4341 100644 --- a/src/kernel/resources/browsers/process.py +++ b/src/kernel/resources/browsers/process.py @@ -37,7 +37,7 @@ def with_raw_response(self) -> ProcessResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return ProcessResourceWithRawResponse(self) @@ -46,7 +46,7 @@ def with_streaming_response(self) -> ProcessResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return ProcessResourceWithStreamingResponse(self) @@ -345,7 +345,7 @@ def with_raw_response(self) -> AsyncProcessResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return AsyncProcessResourceWithRawResponse(self) @@ -354,7 +354,7 @@ def with_streaming_response(self) -> AsyncProcessResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return AsyncProcessResourceWithStreamingResponse(self) diff --git a/src/kernel/resources/browsers/replays.py b/src/kernel/resources/browsers/replays.py index 9f15554..8a1d199 100644 --- a/src/kernel/resources/browsers/replays.py +++ b/src/kernel/resources/browsers/replays.py @@ -37,7 +37,7 @@ def with_raw_response(self) -> ReplaysResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return ReplaysResourceWithRawResponse(self) @@ -46,7 +46,7 @@ def with_streaming_response(self) -> ReplaysResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return ReplaysResourceWithStreamingResponse(self) @@ -211,7 +211,7 @@ def with_raw_response(self) -> AsyncReplaysResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return AsyncReplaysResourceWithRawResponse(self) @@ -220,7 +220,7 @@ def with_streaming_response(self) -> AsyncReplaysResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return AsyncReplaysResourceWithStreamingResponse(self) diff --git a/src/kernel/resources/credentials.py b/src/kernel/resources/credentials.py index 85e0c8a..30e72e8 100644 --- a/src/kernel/resources/credentials.py +++ b/src/kernel/resources/credentials.py @@ -32,7 +32,7 @@ def with_raw_response(self) -> CredentialsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return CredentialsResourceWithRawResponse(self) @@ -41,7 +41,7 @@ def with_streaming_response(self) -> CredentialsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return CredentialsResourceWithStreamingResponse(self) @@ -327,7 +327,7 @@ def with_raw_response(self) -> AsyncCredentialsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return AsyncCredentialsResourceWithRawResponse(self) @@ -336,7 +336,7 @@ def with_streaming_response(self) -> AsyncCredentialsResourceWithStreamingRespon """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return AsyncCredentialsResourceWithStreamingResponse(self) diff --git a/src/kernel/resources/deployments.py b/src/kernel/resources/deployments.py index bdc200f..f924531 100644 --- a/src/kernel/resources/deployments.py +++ b/src/kernel/resources/deployments.py @@ -36,7 +36,7 @@ def with_raw_response(self) -> DeploymentsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return DeploymentsResourceWithRawResponse(self) @@ -45,7 +45,7 @@ def with_streaming_response(self) -> DeploymentsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return DeploymentsResourceWithStreamingResponse(self) @@ -259,7 +259,7 @@ def with_raw_response(self) -> AsyncDeploymentsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return AsyncDeploymentsResourceWithRawResponse(self) @@ -268,7 +268,7 @@ def with_streaming_response(self) -> AsyncDeploymentsResourceWithStreamingRespon """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return AsyncDeploymentsResourceWithStreamingResponse(self) diff --git a/src/kernel/resources/extensions.py b/src/kernel/resources/extensions.py index 2f86871..69497b1 100644 --- a/src/kernel/resources/extensions.py +++ b/src/kernel/resources/extensions.py @@ -40,7 +40,7 @@ def with_raw_response(self) -> ExtensionsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return ExtensionsResourceWithRawResponse(self) @@ -49,7 +49,7 @@ def with_streaming_response(self) -> ExtensionsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return ExtensionsResourceWithStreamingResponse(self) @@ -247,7 +247,7 @@ def with_raw_response(self) -> AsyncExtensionsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return AsyncExtensionsResourceWithRawResponse(self) @@ -256,7 +256,7 @@ def with_streaming_response(self) -> AsyncExtensionsResourceWithStreamingRespons """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return AsyncExtensionsResourceWithStreamingResponse(self) diff --git a/src/kernel/resources/invocations.py b/src/kernel/resources/invocations.py index fa808dd..3b812d4 100644 --- a/src/kernel/resources/invocations.py +++ b/src/kernel/resources/invocations.py @@ -37,7 +37,7 @@ def with_raw_response(self) -> InvocationsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return InvocationsResourceWithRawResponse(self) @@ -46,7 +46,7 @@ def with_streaming_response(self) -> InvocationsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return InvocationsResourceWithStreamingResponse(self) @@ -355,7 +355,7 @@ def with_raw_response(self) -> AsyncInvocationsResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return AsyncInvocationsResourceWithRawResponse(self) @@ -364,7 +364,7 @@ def with_streaming_response(self) -> AsyncInvocationsResourceWithStreamingRespon """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return AsyncInvocationsResourceWithStreamingResponse(self) diff --git a/src/kernel/resources/profiles.py b/src/kernel/resources/profiles.py index 8d51da3..86064d5 100644 --- a/src/kernel/resources/profiles.py +++ b/src/kernel/resources/profiles.py @@ -37,7 +37,7 @@ def with_raw_response(self) -> ProfilesResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return ProfilesResourceWithRawResponse(self) @@ -46,7 +46,7 @@ def with_streaming_response(self) -> ProfilesResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return ProfilesResourceWithStreamingResponse(self) @@ -215,7 +215,7 @@ def with_raw_response(self) -> AsyncProfilesResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return AsyncProfilesResourceWithRawResponse(self) @@ -224,7 +224,7 @@ def with_streaming_response(self) -> AsyncProfilesResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return AsyncProfilesResourceWithStreamingResponse(self) diff --git a/src/kernel/resources/proxies.py b/src/kernel/resources/proxies.py index 4908ab7..6574a25 100644 --- a/src/kernel/resources/proxies.py +++ b/src/kernel/resources/proxies.py @@ -33,7 +33,7 @@ def with_raw_response(self) -> ProxiesResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return ProxiesResourceWithRawResponse(self) @@ -42,7 +42,7 @@ def with_streaming_response(self) -> ProxiesResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return ProxiesResourceWithStreamingResponse(self) @@ -226,7 +226,7 @@ def with_raw_response(self) -> AsyncProxiesResourceWithRawResponse: This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#accessing-raw-response-data-eg-headers + For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers """ return AsyncProxiesResourceWithRawResponse(self) @@ -235,7 +235,7 @@ def with_streaming_response(self) -> AsyncProxiesResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. - For more information, see https://www.github.com/onkernel/kernel-python-sdk#with_streaming_response + For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response """ return AsyncProxiesResourceWithStreamingResponse(self) From a716ef68dd086e4b37ac2e2bb3c8cb4667f03ba7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 20:40:41 +0000 Subject: [PATCH 3/6] feat: add MFA options to agent authentication workflow --- .stats.yml | 6 +- README.md | 2 +- src/kernel/_client.py | 2 +- .../resources/agents/auth/invocations.py | 74 ++++++++++++++- .../agents/agent_auth_invocation_response.py | 24 ++++- .../agents/auth/invocation_submit_params.py | 11 ++- .../agents/auth/test_invocations.py | 92 +++++++++++++++++++ tests/test_client.py | 4 +- 8 files changed, 201 insertions(+), 14 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9ab4346..ce759c0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 89 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-8d66dbedea5b240936b338809f272568ca84a452fc13dbda835479f2ec068b41.yml -openapi_spec_hash: 7c499bfce2e996f1fff5e7791cea390e -config_hash: 2ee8c7057fa9b05cd0dabd23247c40ec +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-8e4a29d23d2882fcb0864606091790fd58bffa4f5d5c8d081052b72ad47b215b.yml +openapi_spec_hash: fc82d930dad739ac01e3c2bddba7bf61 +config_hash: 3a5e36dfb245210cfd978f679b3641d2 diff --git a/README.md b/README.md index d3e4341..2826e5c 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ It is generated with [Stainless](https://www.stainless.com/). ## Documentation -The REST API documentation can be found on [docs.onkernel.com](https://docs.onkernel.com). The full API of this library can be found in [api.md](api.md). +The REST API documentation can be found on [docs.kernel.com](https://docs.kernel.com). The full API of this library can be found in [api.md](api.md). ## Installation diff --git a/src/kernel/_client.py b/src/kernel/_client.py index 166ecdb..79410d0 100644 --- a/src/kernel/_client.py +++ b/src/kernel/_client.py @@ -67,7 +67,7 @@ ] ENVIRONMENTS: Dict[str, str] = { - "production": "https://api.onkernel.com/", + "production": "https://api.kernel.com/", "development": "https://localhost:3001/", } diff --git a/src/kernel/resources/agents/auth/invocations.py b/src/kernel/resources/agents/auth/invocations.py index aa1c4da..fcd5e3a 100644 --- a/src/kernel/resources/agents/auth/invocations.py +++ b/src/kernel/resources/agents/auth/invocations.py @@ -3,7 +3,7 @@ from __future__ import annotations from typing import Dict -from typing_extensions import overload +from typing_extensions import Literal, overload import httpx @@ -233,13 +233,46 @@ def submit( """ ... - @required_args(["field_values"], ["sso_button"]) + @overload + def submit( + self, + invocation_id: str, + *, + selected_mfa_type: Literal["sms", "call", "email", "totp", "push", "security_key"], + # 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AgentAuthSubmitResponse: + """Submits field values for the discovered login form. + + Returns immediately after + submission is accepted. Poll the invocation endpoint to track progress and get + results. + + Args: + selected_mfa_type: The MFA delivery method type + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @required_args(["field_values"], ["sso_button"], ["selected_mfa_type"]) def submit( self, invocation_id: str, *, field_values: Dict[str, str] | Omit = omit, sso_button: str | Omit = omit, + selected_mfa_type: Literal["sms", "call", "email", "totp", "push", "security_key"] | 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. extra_headers: Headers | None = None, @@ -255,6 +288,7 @@ def submit( { "field_values": field_values, "sso_button": sso_button, + "selected_mfa_type": selected_mfa_type, }, invocation_submit_params.InvocationSubmitParams, ), @@ -471,13 +505,46 @@ async def submit( """ ... - @required_args(["field_values"], ["sso_button"]) + @overload + async def submit( + self, + invocation_id: str, + *, + selected_mfa_type: Literal["sms", "call", "email", "totp", "push", "security_key"], + # 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. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AgentAuthSubmitResponse: + """Submits field values for the discovered login form. + + Returns immediately after + submission is accepted. Poll the invocation endpoint to track progress and get + results. + + Args: + selected_mfa_type: The MFA delivery method type + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + ... + + @required_args(["field_values"], ["sso_button"], ["selected_mfa_type"]) async def submit( self, invocation_id: str, *, field_values: Dict[str, str] | Omit = omit, sso_button: str | Omit = omit, + selected_mfa_type: Literal["sms", "call", "email", "totp", "push", "security_key"] | 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. extra_headers: Headers | None = None, @@ -493,6 +560,7 @@ async def submit( { "field_values": field_values, "sso_button": sso_button, + "selected_mfa_type": selected_mfa_type, }, invocation_submit_params.InvocationSubmitParams, ), diff --git a/src/kernel/types/agents/agent_auth_invocation_response.py b/src/kernel/types/agents/agent_auth_invocation_response.py index 42b54a4..2731290 100644 --- a/src/kernel/types/agents/agent_auth_invocation_response.py +++ b/src/kernel/types/agents/agent_auth_invocation_response.py @@ -7,7 +7,23 @@ from ..._models import BaseModel from .discovered_field import DiscoveredField -__all__ = ["AgentAuthInvocationResponse", "PendingSSOButton"] +__all__ = ["AgentAuthInvocationResponse", "MfaOption", "PendingSSOButton"] + + +class MfaOption(BaseModel): + """An MFA method option for verification""" + + label: str + """The visible option text""" + + type: Literal["sms", "call", "email", "totp", "push", "security_key"] + """The MFA delivery method type""" + + description: Optional[str] = None + """Additional instructions from the site""" + + target: Optional[str] = None + """The masked destination (phone/email) if shown""" class PendingSSOButton(BaseModel): @@ -63,6 +79,12 @@ class AgentAuthInvocationResponse(BaseModel): live_view_url: Optional[str] = None """Browser live view URL for debugging the invocation""" + mfa_options: Optional[List[MfaOption]] = None + """ + MFA method options to choose from (present when step=awaiting_input and MFA + selection is required) + """ + pending_fields: Optional[List[DiscoveredField]] = None """Fields currently awaiting input (present when step=awaiting_input)""" diff --git a/src/kernel/types/agents/auth/invocation_submit_params.py b/src/kernel/types/agents/auth/invocation_submit_params.py index ad9f9c1..7a9c5ac 100644 --- a/src/kernel/types/agents/auth/invocation_submit_params.py +++ b/src/kernel/types/agents/auth/invocation_submit_params.py @@ -3,9 +3,9 @@ from __future__ import annotations from typing import Dict, Union -from typing_extensions import Required, TypeAlias, TypedDict +from typing_extensions import Literal, Required, TypeAlias, TypedDict -__all__ = ["InvocationSubmitParams", "Variant0", "Variant1"] +__all__ = ["InvocationSubmitParams", "Variant0", "Variant1", "Variant2"] class Variant0(TypedDict, total=False): @@ -18,4 +18,9 @@ class Variant1(TypedDict, total=False): """Selector of SSO button to click""" -InvocationSubmitParams: TypeAlias = Union[Variant0, Variant1] +class Variant2(TypedDict, total=False): + selected_mfa_type: Required[Literal["sms", "call", "email", "totp", "push", "security_key"]] + """The MFA delivery method type""" + + +InvocationSubmitParams: TypeAlias = Union[Variant0, Variant1, Variant2] diff --git a/tests/api_resources/agents/auth/test_invocations.py b/tests/api_resources/agents/auth/test_invocations.py index 1bae66d..6d70dfa 100644 --- a/tests/api_resources/agents/auth/test_invocations.py +++ b/tests/api_resources/agents/auth/test_invocations.py @@ -255,6 +255,52 @@ def test_path_params_submit_overload_2(self, client: Kernel) -> None: sso_button="xpath=//button[contains(text(), 'Continue with Google')]", ) + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_method_submit_overload_3(self, client: Kernel) -> None: + invocation = client.agents.auth.invocations.submit( + invocation_id="invocation_id", + selected_mfa_type="sms", + ) + assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_raw_response_submit_overload_3(self, client: Kernel) -> None: + response = client.agents.auth.invocations.with_raw_response.submit( + invocation_id="invocation_id", + selected_mfa_type="sms", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + invocation = response.parse() + assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_streaming_response_submit_overload_3(self, client: Kernel) -> None: + with client.agents.auth.invocations.with_streaming_response.submit( + invocation_id="invocation_id", + selected_mfa_type="sms", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + invocation = response.parse() + assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_path_params_submit_overload_3(self, client: Kernel) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `invocation_id` but received ''"): + client.agents.auth.invocations.with_raw_response.submit( + invocation_id="", + selected_mfa_type="sms", + ) + class TestAsyncInvocations: parametrize = pytest.mark.parametrize( @@ -495,3 +541,49 @@ async def test_path_params_submit_overload_2(self, async_client: AsyncKernel) -> invocation_id="", sso_button="xpath=//button[contains(text(), 'Continue with Google')]", ) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_method_submit_overload_3(self, async_client: AsyncKernel) -> None: + invocation = await async_client.agents.auth.invocations.submit( + invocation_id="invocation_id", + selected_mfa_type="sms", + ) + assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_raw_response_submit_overload_3(self, async_client: AsyncKernel) -> None: + response = await async_client.agents.auth.invocations.with_raw_response.submit( + invocation_id="invocation_id", + selected_mfa_type="sms", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + invocation = await response.parse() + assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_streaming_response_submit_overload_3(self, async_client: AsyncKernel) -> None: + async with async_client.agents.auth.invocations.with_streaming_response.submit( + invocation_id="invocation_id", + selected_mfa_type="sms", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + invocation = await response.parse() + assert_matches_type(AgentAuthSubmitResponse, invocation, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_path_params_submit_overload_3(self, async_client: AsyncKernel) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `invocation_id` but received ''"): + await async_client.agents.auth.invocations.with_raw_response.submit( + invocation_id="", + selected_mfa_type="sms", + ) diff --git a/tests/test_client.py b/tests/test_client.py index 6425811..d2a4e51 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -578,7 +578,7 @@ def test_base_url_env(self) -> None: Kernel(api_key=api_key, _strict_response_validation=True, environment="production") client = Kernel(base_url=None, api_key=api_key, _strict_response_validation=True, environment="production") - assert str(client.base_url).startswith("https://api.onkernel.com/") + assert str(client.base_url).startswith("https://api.kernel.com/") client.close() @@ -1415,7 +1415,7 @@ async def test_base_url_env(self) -> None: client = AsyncKernel( base_url=None, api_key=api_key, _strict_response_validation=True, environment="production" ) - assert str(client.base_url).startswith("https://api.onkernel.com/") + assert str(client.base_url).startswith("https://api.kernel.com/") await client.close() From 8dcd3aa5fd2b04374831e32fb3ee1ae2d23474e6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 14 Jan 2026 05:26:12 +0000 Subject: [PATCH 4/6] feat(client): add support for binary request streaming --- src/kernel/_base_client.py | 145 +++++++++++++++++-- src/kernel/_models.py | 17 ++- src/kernel/_types.py | 9 ++ src/kernel/resources/browsers/fs/fs.py | 24 +++- tests/test_client.py | 187 ++++++++++++++++++++++++- 5 files changed, 363 insertions(+), 19 deletions(-) diff --git a/src/kernel/_base_client.py b/src/kernel/_base_client.py index 787be54..07809c5 100644 --- a/src/kernel/_base_client.py +++ b/src/kernel/_base_client.py @@ -9,6 +9,7 @@ import inspect import logging import platform +import warnings import email.utils from types import TracebackType from random import random @@ -51,9 +52,11 @@ ResponseT, AnyMapping, PostParser, + BinaryTypes, RequestFiles, HttpxSendArgs, RequestOptions, + AsyncBinaryTypes, HttpxRequestFiles, ModelBuilderProtocol, not_given, @@ -477,8 +480,19 @@ def _build_request( retries_taken: int = 0, ) -> httpx.Request: if log.isEnabledFor(logging.DEBUG): - log.debug("Request options: %s", model_dump(options, exclude_unset=True)) - + log.debug( + "Request options: %s", + model_dump( + options, + exclude_unset=True, + # Pydantic v1 can't dump every type we support in content, so we exclude it for now. + exclude={ + "content", + } + if PYDANTIC_V1 + else {}, + ), + ) kwargs: dict[str, Any] = {} json_data = options.json_data @@ -532,7 +546,13 @@ def _build_request( is_body_allowed = options.method.lower() != "get" if is_body_allowed: - if isinstance(json_data, bytes): + if options.content is not None and json_data is not None: + raise TypeError("Passing both `content` and `json_data` is not supported") + if options.content is not None and files is not None: + raise TypeError("Passing both `content` and `files` is not supported") + if options.content is not None: + kwargs["content"] = options.content + elif isinstance(json_data, bytes): kwargs["content"] = json_data else: kwargs["json"] = json_data if is_given(json_data) else None @@ -1194,6 +1214,7 @@ def post( *, cast_to: Type[ResponseT], body: Body | None = None, + content: BinaryTypes | None = None, options: RequestOptions = {}, files: RequestFiles | None = None, stream: Literal[False] = False, @@ -1206,6 +1227,7 @@ def post( *, cast_to: Type[ResponseT], body: Body | None = None, + content: BinaryTypes | None = None, options: RequestOptions = {}, files: RequestFiles | None = None, stream: Literal[True], @@ -1219,6 +1241,7 @@ def post( *, cast_to: Type[ResponseT], body: Body | None = None, + content: BinaryTypes | None = None, options: RequestOptions = {}, files: RequestFiles | None = None, stream: bool, @@ -1231,13 +1254,25 @@ def post( *, cast_to: Type[ResponseT], body: Body | None = None, + content: BinaryTypes | None = None, options: RequestOptions = {}, files: RequestFiles | None = None, stream: bool = False, stream_cls: type[_StreamT] | None = None, ) -> ResponseT | _StreamT: + if body is not None and content is not None: + raise TypeError("Passing both `body` and `content` is not supported") + if files is not None and content is not None: + raise TypeError("Passing both `files` and `content` is not supported") + if isinstance(body, bytes): + warnings.warn( + "Passing raw bytes as `body` is deprecated and will be removed in a future version. " + "Please pass raw bytes via the `content` parameter instead.", + DeprecationWarning, + stacklevel=2, + ) opts = FinalRequestOptions.construct( - method="post", url=path, json_data=body, files=to_httpx_files(files), **options + method="post", url=path, json_data=body, content=content, files=to_httpx_files(files), **options ) return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) @@ -1247,11 +1282,23 @@ def patch( *, cast_to: Type[ResponseT], body: Body | None = None, + content: BinaryTypes | None = None, files: RequestFiles | None = None, options: RequestOptions = {}, ) -> ResponseT: + if body is not None and content is not None: + raise TypeError("Passing both `body` and `content` is not supported") + if files is not None and content is not None: + raise TypeError("Passing both `files` and `content` is not supported") + if isinstance(body, bytes): + warnings.warn( + "Passing raw bytes as `body` is deprecated and will be removed in a future version. " + "Please pass raw bytes via the `content` parameter instead.", + DeprecationWarning, + stacklevel=2, + ) opts = FinalRequestOptions.construct( - method="patch", url=path, json_data=body, files=to_httpx_files(files), **options + method="patch", url=path, json_data=body, content=content, files=to_httpx_files(files), **options ) return self.request(cast_to, opts) @@ -1261,11 +1308,23 @@ def put( *, cast_to: Type[ResponseT], body: Body | None = None, + content: BinaryTypes | None = None, files: RequestFiles | None = None, options: RequestOptions = {}, ) -> ResponseT: + if body is not None and content is not None: + raise TypeError("Passing both `body` and `content` is not supported") + if files is not None and content is not None: + raise TypeError("Passing both `files` and `content` is not supported") + if isinstance(body, bytes): + warnings.warn( + "Passing raw bytes as `body` is deprecated and will be removed in a future version. " + "Please pass raw bytes via the `content` parameter instead.", + DeprecationWarning, + stacklevel=2, + ) opts = FinalRequestOptions.construct( - method="put", url=path, json_data=body, files=to_httpx_files(files), **options + method="put", url=path, json_data=body, content=content, files=to_httpx_files(files), **options ) return self.request(cast_to, opts) @@ -1275,9 +1334,19 @@ def delete( *, cast_to: Type[ResponseT], body: Body | None = None, + content: BinaryTypes | None = None, options: RequestOptions = {}, ) -> ResponseT: - opts = FinalRequestOptions.construct(method="delete", url=path, json_data=body, **options) + if body is not None and content is not None: + raise TypeError("Passing both `body` and `content` is not supported") + if isinstance(body, bytes): + warnings.warn( + "Passing raw bytes as `body` is deprecated and will be removed in a future version. " + "Please pass raw bytes via the `content` parameter instead.", + DeprecationWarning, + stacklevel=2, + ) + opts = FinalRequestOptions.construct(method="delete", url=path, json_data=body, content=content, **options) return self.request(cast_to, opts) def get_api_list( @@ -1717,6 +1786,7 @@ async def post( *, cast_to: Type[ResponseT], body: Body | None = None, + content: AsyncBinaryTypes | None = None, files: RequestFiles | None = None, options: RequestOptions = {}, stream: Literal[False] = False, @@ -1729,6 +1799,7 @@ async def post( *, cast_to: Type[ResponseT], body: Body | None = None, + content: AsyncBinaryTypes | None = None, files: RequestFiles | None = None, options: RequestOptions = {}, stream: Literal[True], @@ -1742,6 +1813,7 @@ async def post( *, cast_to: Type[ResponseT], body: Body | None = None, + content: AsyncBinaryTypes | None = None, files: RequestFiles | None = None, options: RequestOptions = {}, stream: bool, @@ -1754,13 +1826,25 @@ async def post( *, cast_to: Type[ResponseT], body: Body | None = None, + content: AsyncBinaryTypes | None = None, files: RequestFiles | None = None, options: RequestOptions = {}, stream: bool = False, stream_cls: type[_AsyncStreamT] | None = None, ) -> ResponseT | _AsyncStreamT: + if body is not None and content is not None: + raise TypeError("Passing both `body` and `content` is not supported") + if files is not None and content is not None: + raise TypeError("Passing both `files` and `content` is not supported") + if isinstance(body, bytes): + warnings.warn( + "Passing raw bytes as `body` is deprecated and will be removed in a future version. " + "Please pass raw bytes via the `content` parameter instead.", + DeprecationWarning, + stacklevel=2, + ) opts = FinalRequestOptions.construct( - method="post", url=path, json_data=body, files=await async_to_httpx_files(files), **options + method="post", url=path, json_data=body, content=content, files=await async_to_httpx_files(files), **options ) return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls) @@ -1770,11 +1854,28 @@ async def patch( *, cast_to: Type[ResponseT], body: Body | None = None, + content: AsyncBinaryTypes | None = None, files: RequestFiles | None = None, options: RequestOptions = {}, ) -> ResponseT: + if body is not None and content is not None: + raise TypeError("Passing both `body` and `content` is not supported") + if files is not None and content is not None: + raise TypeError("Passing both `files` and `content` is not supported") + if isinstance(body, bytes): + warnings.warn( + "Passing raw bytes as `body` is deprecated and will be removed in a future version. " + "Please pass raw bytes via the `content` parameter instead.", + DeprecationWarning, + stacklevel=2, + ) opts = FinalRequestOptions.construct( - method="patch", url=path, json_data=body, files=await async_to_httpx_files(files), **options + method="patch", + url=path, + json_data=body, + content=content, + files=await async_to_httpx_files(files), + **options, ) return await self.request(cast_to, opts) @@ -1784,11 +1885,23 @@ async def put( *, cast_to: Type[ResponseT], body: Body | None = None, + content: AsyncBinaryTypes | None = None, files: RequestFiles | None = None, options: RequestOptions = {}, ) -> ResponseT: + if body is not None and content is not None: + raise TypeError("Passing both `body` and `content` is not supported") + if files is not None and content is not None: + raise TypeError("Passing both `files` and `content` is not supported") + if isinstance(body, bytes): + warnings.warn( + "Passing raw bytes as `body` is deprecated and will be removed in a future version. " + "Please pass raw bytes via the `content` parameter instead.", + DeprecationWarning, + stacklevel=2, + ) opts = FinalRequestOptions.construct( - method="put", url=path, json_data=body, files=await async_to_httpx_files(files), **options + method="put", url=path, json_data=body, content=content, files=await async_to_httpx_files(files), **options ) return await self.request(cast_to, opts) @@ -1798,9 +1911,19 @@ async def delete( *, cast_to: Type[ResponseT], body: Body | None = None, + content: AsyncBinaryTypes | None = None, options: RequestOptions = {}, ) -> ResponseT: - opts = FinalRequestOptions.construct(method="delete", url=path, json_data=body, **options) + if body is not None and content is not None: + raise TypeError("Passing both `body` and `content` is not supported") + if isinstance(body, bytes): + warnings.warn( + "Passing raw bytes as `body` is deprecated and will be removed in a future version. " + "Please pass raw bytes via the `content` parameter instead.", + DeprecationWarning, + stacklevel=2, + ) + opts = FinalRequestOptions.construct(method="delete", url=path, json_data=body, content=content, **options) return await self.request(cast_to, opts) def get_api_list( diff --git a/src/kernel/_models.py b/src/kernel/_models.py index ca9500b..29070e0 100644 --- a/src/kernel/_models.py +++ b/src/kernel/_models.py @@ -3,7 +3,20 @@ import os import inspect import weakref -from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast +from typing import ( + IO, + TYPE_CHECKING, + Any, + Type, + Union, + Generic, + TypeVar, + Callable, + Iterable, + Optional, + AsyncIterable, + cast, +) from datetime import date, datetime from typing_extensions import ( List, @@ -787,6 +800,7 @@ class FinalRequestOptionsInput(TypedDict, total=False): timeout: float | Timeout | None files: HttpxRequestFiles | None idempotency_key: str + content: Union[bytes, bytearray, IO[bytes], Iterable[bytes], AsyncIterable[bytes], None] json_data: Body extra_json: AnyMapping follow_redirects: bool @@ -805,6 +819,7 @@ class FinalRequestOptions(pydantic.BaseModel): post_parser: Union[Callable[[Any], Any], NotGiven] = NotGiven() follow_redirects: Union[bool, None] = None + content: Union[bytes, bytearray, IO[bytes], Iterable[bytes], AsyncIterable[bytes], None] = None # It should be noted that we cannot use `json` here as that would override # a BaseModel method in an incompatible fashion. json_data: Union[Body, None] = None diff --git a/src/kernel/_types.py b/src/kernel/_types.py index 275ffbb..28254f9 100644 --- a/src/kernel/_types.py +++ b/src/kernel/_types.py @@ -13,9 +13,11 @@ Mapping, TypeVar, Callable, + Iterable, Iterator, Optional, Sequence, + AsyncIterable, ) from typing_extensions import ( Set, @@ -56,6 +58,13 @@ else: Base64FileInput = Union[IO[bytes], PathLike] FileContent = Union[IO[bytes], bytes, PathLike] # PathLike is not subscriptable in Python 3.8. + + +# Used for sending raw binary data / streaming data in request bodies +# e.g. for file uploads without multipart encoding +BinaryTypes = Union[bytes, bytearray, IO[bytes], Iterable[bytes]] +AsyncBinaryTypes = Union[bytes, bytearray, IO[bytes], AsyncIterable[bytes]] + FileTypes = Union[ # file (or bytes) FileContent, diff --git a/src/kernel/resources/browsers/fs/fs.py b/src/kernel/resources/browsers/fs/fs.py index 0da0bdd..3501a2a 100644 --- a/src/kernel/resources/browsers/fs/fs.py +++ b/src/kernel/resources/browsers/fs/fs.py @@ -2,6 +2,7 @@ from __future__ import annotations +import os from typing import Mapping, Iterable, cast import httpx @@ -15,7 +16,20 @@ AsyncWatchResourceWithStreamingResponse, ) from ...._files import read_file_content, async_read_file_content -from ...._types import Body, Omit, Query, Headers, NoneType, NotGiven, FileTypes, FileContent, omit, not_given +from ...._types import ( + Body, + Omit, + Query, + Headers, + NoneType, + NotGiven, + FileTypes, + BinaryTypes, + FileContent, + AsyncBinaryTypes, + omit, + not_given, +) from ...._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -562,7 +576,7 @@ def upload_zip( def write_file( self, id: str, - contents: FileContent, + contents: FileContent | BinaryTypes, *, path: str, mode: str | Omit = omit, @@ -595,7 +609,7 @@ def write_file( extra_headers["Content-Type"] = "application/octet-stream" return self._put( f"/browsers/{id}/fs/write_file", - body=read_file_content(contents), + content=read_file_content(contents) if isinstance(contents, os.PathLike) else contents, options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -1121,7 +1135,7 @@ async def upload_zip( async def write_file( self, id: str, - contents: FileContent, + contents: FileContent | AsyncBinaryTypes, *, path: str, mode: str | Omit = omit, @@ -1154,7 +1168,7 @@ async def write_file( extra_headers["Content-Type"] = "application/octet-stream" return await self._put( f"/browsers/{id}/fs/write_file", - body=await async_read_file_content(contents), + content=await async_read_file_content(contents) if isinstance(contents, os.PathLike) else contents, options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/tests/test_client.py b/tests/test_client.py index d2a4e51..dca5da1 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -8,10 +8,11 @@ import json import asyncio import inspect +import dataclasses import tracemalloc -from typing import Any, Union, cast +from typing import Any, Union, TypeVar, Callable, Iterable, Iterator, Optional, Coroutine, cast from unittest import mock -from typing_extensions import Literal +from typing_extensions import Literal, AsyncIterator, override import httpx import pytest @@ -36,6 +37,7 @@ from .utils import update_env +T = TypeVar("T") base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") api_key = "My API Key" @@ -50,6 +52,57 @@ def _low_retry_timeout(*_args: Any, **_kwargs: Any) -> float: return 0.1 +def mirror_request_content(request: httpx.Request) -> httpx.Response: + return httpx.Response(200, content=request.content) + + +# note: we can't use the httpx.MockTransport class as it consumes the request +# body itself, which means we can't test that the body is read lazily +class MockTransport(httpx.BaseTransport, httpx.AsyncBaseTransport): + def __init__( + self, + handler: Callable[[httpx.Request], httpx.Response] + | Callable[[httpx.Request], Coroutine[Any, Any, httpx.Response]], + ) -> None: + self.handler = handler + + @override + def handle_request( + self, + request: httpx.Request, + ) -> httpx.Response: + assert not inspect.iscoroutinefunction(self.handler), "handler must not be a coroutine function" + assert inspect.isfunction(self.handler), "handler must be a function" + return self.handler(request) + + @override + async def handle_async_request( + self, + request: httpx.Request, + ) -> httpx.Response: + assert inspect.iscoroutinefunction(self.handler), "handler must be a coroutine function" + return await self.handler(request) + + +@dataclasses.dataclass +class Counter: + value: int = 0 + + +def _make_sync_iterator(iterable: Iterable[T], counter: Optional[Counter] = None) -> Iterator[T]: + for item in iterable: + if counter: + counter.value += 1 + yield item + + +async def _make_async_iterator(iterable: Iterable[T], counter: Optional[Counter] = None) -> AsyncIterator[T]: + for item in iterable: + if counter: + counter.value += 1 + yield item + + def _get_open_connections(client: Kernel | AsyncKernel) -> int: transport = client._client._transport assert isinstance(transport, httpx.HTTPTransport) or isinstance(transport, httpx.AsyncHTTPTransport) @@ -500,6 +553,70 @@ def test_multipart_repeating_array(self, client: Kernel) -> None: b"", ] + @pytest.mark.respx(base_url=base_url) + def test_binary_content_upload(self, respx_mock: MockRouter, client: Kernel) -> None: + respx_mock.post("/upload").mock(side_effect=mirror_request_content) + + file_content = b"Hello, this is a test file." + + response = client.post( + "/upload", + content=file_content, + cast_to=httpx.Response, + options={"headers": {"Content-Type": "application/octet-stream"}}, + ) + + assert response.status_code == 200 + assert response.request.headers["Content-Type"] == "application/octet-stream" + assert response.content == file_content + + def test_binary_content_upload_with_iterator(self) -> None: + file_content = b"Hello, this is a test file." + counter = Counter() + iterator = _make_sync_iterator([file_content], counter=counter) + + def mock_handler(request: httpx.Request) -> httpx.Response: + assert counter.value == 0, "the request body should not have been read" + return httpx.Response(200, content=request.read()) + + with Kernel( + base_url=base_url, + api_key=api_key, + _strict_response_validation=True, + http_client=httpx.Client(transport=MockTransport(handler=mock_handler)), + ) as client: + response = client.post( + "/upload", + content=iterator, + cast_to=httpx.Response, + options={"headers": {"Content-Type": "application/octet-stream"}}, + ) + + assert response.status_code == 200 + assert response.request.headers["Content-Type"] == "application/octet-stream" + assert response.content == file_content + assert counter.value == 1 + + @pytest.mark.respx(base_url=base_url) + def test_binary_content_upload_with_body_is_deprecated(self, respx_mock: MockRouter, client: Kernel) -> None: + respx_mock.post("/upload").mock(side_effect=mirror_request_content) + + file_content = b"Hello, this is a test file." + + with pytest.deprecated_call( + match="Passing raw bytes as `body` is deprecated and will be removed in a future version. Please pass raw bytes via the `content` parameter instead." + ): + response = client.post( + "/upload", + body=file_content, + cast_to=httpx.Response, + options={"headers": {"Content-Type": "application/octet-stream"}}, + ) + + assert response.status_code == 200 + assert response.request.headers["Content-Type"] == "application/octet-stream" + assert response.content == file_content + @pytest.mark.respx(base_url=base_url) def test_basic_union_response(self, respx_mock: MockRouter, client: Kernel) -> None: class Model1(BaseModel): @@ -1331,6 +1448,72 @@ def test_multipart_repeating_array(self, async_client: AsyncKernel) -> None: b"", ] + @pytest.mark.respx(base_url=base_url) + async def test_binary_content_upload(self, respx_mock: MockRouter, async_client: AsyncKernel) -> None: + respx_mock.post("/upload").mock(side_effect=mirror_request_content) + + file_content = b"Hello, this is a test file." + + response = await async_client.post( + "/upload", + content=file_content, + cast_to=httpx.Response, + options={"headers": {"Content-Type": "application/octet-stream"}}, + ) + + assert response.status_code == 200 + assert response.request.headers["Content-Type"] == "application/octet-stream" + assert response.content == file_content + + async def test_binary_content_upload_with_asynciterator(self) -> None: + file_content = b"Hello, this is a test file." + counter = Counter() + iterator = _make_async_iterator([file_content], counter=counter) + + async def mock_handler(request: httpx.Request) -> httpx.Response: + assert counter.value == 0, "the request body should not have been read" + return httpx.Response(200, content=await request.aread()) + + async with AsyncKernel( + base_url=base_url, + api_key=api_key, + _strict_response_validation=True, + http_client=httpx.AsyncClient(transport=MockTransport(handler=mock_handler)), + ) as client: + response = await client.post( + "/upload", + content=iterator, + cast_to=httpx.Response, + options={"headers": {"Content-Type": "application/octet-stream"}}, + ) + + assert response.status_code == 200 + assert response.request.headers["Content-Type"] == "application/octet-stream" + assert response.content == file_content + assert counter.value == 1 + + @pytest.mark.respx(base_url=base_url) + async def test_binary_content_upload_with_body_is_deprecated( + self, respx_mock: MockRouter, async_client: AsyncKernel + ) -> None: + respx_mock.post("/upload").mock(side_effect=mirror_request_content) + + file_content = b"Hello, this is a test file." + + with pytest.deprecated_call( + match="Passing raw bytes as `body` is deprecated and will be removed in a future version. Please pass raw bytes via the `content` parameter instead." + ): + response = await async_client.post( + "/upload", + body=file_content, + cast_to=httpx.Response, + options={"headers": {"Content-Type": "application/octet-stream"}}, + ) + + assert response.status_code == 200 + assert response.request.headers["Content-Type"] == "application/octet-stream" + assert response.content == file_content + @pytest.mark.respx(base_url=base_url) async def test_basic_union_response(self, respx_mock: MockRouter, async_client: AsyncKernel) -> None: class Model1(BaseModel): From 3c9bfc13b7320df9fcb7434a7e5a08cc0f508979 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 14 Jan 2026 15:19:41 +0000 Subject: [PATCH 5/6] feat(api): manual updates Updated TypeScript package name and API URL to correct values. --- .stats.yml | 2 +- src/kernel/_client.py | 2 +- tests/test_client.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index ce759c0..8bd6c68 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 89 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-8e4a29d23d2882fcb0864606091790fd58bffa4f5d5c8d081052b72ad47b215b.yml openapi_spec_hash: fc82d930dad739ac01e3c2bddba7bf61 -config_hash: 3a5e36dfb245210cfd978f679b3641d2 +config_hash: d0585c44724cd7deecea60a5ffae69df diff --git a/src/kernel/_client.py b/src/kernel/_client.py index 79410d0..166ecdb 100644 --- a/src/kernel/_client.py +++ b/src/kernel/_client.py @@ -67,7 +67,7 @@ ] ENVIRONMENTS: Dict[str, str] = { - "production": "https://api.kernel.com/", + "production": "https://api.onkernel.com/", "development": "https://localhost:3001/", } diff --git a/tests/test_client.py b/tests/test_client.py index dca5da1..6f4213a 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -695,7 +695,7 @@ def test_base_url_env(self) -> None: Kernel(api_key=api_key, _strict_response_validation=True, environment="production") client = Kernel(base_url=None, api_key=api_key, _strict_response_validation=True, environment="production") - assert str(client.base_url).startswith("https://api.kernel.com/") + assert str(client.base_url).startswith("https://api.onkernel.com/") client.close() @@ -1598,7 +1598,7 @@ async def test_base_url_env(self) -> None: client = AsyncKernel( base_url=None, api_key=api_key, _strict_response_validation=True, environment="production" ) - assert str(client.base_url).startswith("https://api.kernel.com/") + assert str(client.base_url).startswith("https://api.onkernel.com/") await client.close() From 6b3944d16a33fdedb62827a1aa1ee12f5f14a7a0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 14 Jan 2026 15:20:28 +0000 Subject: [PATCH 6/6] release: 0.25.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 16 ++++++++++++++++ pyproject.toml | 2 +- src/kernel/_version.py | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d2d60a3..a36746b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.24.0" + ".": "0.25.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index dbcf083..c6a48e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## 0.25.0 (2026-01-14) + +Full Changelog: [v0.24.0...v0.25.0](https://github.com/kernel/kernel-python-sdk/compare/v0.24.0...v0.25.0) + +### Features + +* add MFA options to agent authentication workflow ([a716ef6](https://github.com/kernel/kernel-python-sdk/commit/a716ef68dd086e4b37ac2e2bb3c8cb4667f03ba7)) +* **api:** manual updates ([3c9bfc1](https://github.com/kernel/kernel-python-sdk/commit/3c9bfc13b7320df9fcb7434a7e5a08cc0f508979)) +* **api:** update production repos ([1831cd4](https://github.com/kernel/kernel-python-sdk/commit/1831cd4c21dadcbca6a8a871f957a673c0c54953)) +* **client:** add support for binary request streaming ([8dcd3aa](https://github.com/kernel/kernel-python-sdk/commit/8dcd3aa5fd2b04374831e32fb3ee1ae2d23474e6)) + + +### Chores + +* sync repo ([b6bcaff](https://github.com/kernel/kernel-python-sdk/commit/b6bcaffc75908fa8417908841a0506e02468047c)) + ## 0.24.0 (2025-12-17) Full Changelog: [v0.23.0...v0.24.0](https://github.com/onkernel/kernel-python-sdk/compare/v0.23.0...v0.24.0) diff --git a/pyproject.toml b/pyproject.toml index 22aadee..011e9f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "kernel" -version = "0.24.0" +version = "0.25.0" description = "The official Python library for the kernel API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/kernel/_version.py b/src/kernel/_version.py index 17d46b5..d65bad2 100644 --- a/src/kernel/_version.py +++ b/src/kernel/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "kernel" -__version__ = "0.24.0" # x-release-please-version +__version__ = "0.25.0" # x-release-please-version