Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.23.0"
".": "0.24.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 82
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-dac11bdb857e700a8c39d183e753ddd1ebaaca69fd9fc5ee57d6b56b70b00e6e.yml
openapi_spec_hash: 78fbc50dd0b61cdc87564fbea278ee23
config_hash: a4b4d14bdf6af723b235a6981977627c
configured_endpoints: 89
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-13214b99e392aab631aa1ca99b6a51a58df81e34156d21b8d639bea779566123.yml
openapi_spec_hash: a88d175fc3980de3097ac1411d8dcbff
config_hash: 179f33af31ece83563163d5b3d751d13
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 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)

### Features

* Enhance AuthAgentInvocationCreateResponse to include already_authenti… ([2db6fed](https://github.com/onkernel/kernel-python-sdk/commit/2db6fed3d39462b8cbde477a8b396fbbde5c63f2))
* Fix browser pool sdk types ([6e0b8a3](https://github.com/onkernel/kernel-python-sdk/commit/6e0b8a39f8ca11297417479994e475c149155967))


### Chores

* **internal:** add missing files argument to base client ([1dce21b](https://github.com/onkernel/kernel-python-sdk/commit/1dce21b40ee87045724d9fbfd6f2ecd6da5ccb2e))
* speedup initial import ([74ccf15](https://github.com/onkernel/kernel-python-sdk/commit/74ccf15f4f7d3d9ab15b9cca92e5ec9f644780fb))

## 0.23.0 (2025-12-11)

Full Changelog: [v0.22.0...v0.23.0](https://github.com/onkernel/kernel-python-sdk/compare/v0.22.0...v0.23.0)
Expand Down
29 changes: 20 additions & 9 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,7 @@ Methods:
Types:

```python
from kernel.types import (
BrowserPool,
BrowserPoolAcquireRequest,
BrowserPoolReleaseRequest,
BrowserPoolRequest,
BrowserPoolUpdateRequest,
BrowserPoolListResponse,
BrowserPoolAcquireResponse,
)
from kernel.types import BrowserPool, BrowserPoolListResponse, BrowserPoolAcquireResponse
```

Methods:
Expand Down Expand Up @@ -297,6 +289,7 @@ from kernel.types.agents import (
AuthAgentInvocationCreateRequest,
AuthAgentInvocationCreateResponse,
DiscoveredField,
ReauthResponse,
)
```

Expand All @@ -305,6 +298,8 @@ Methods:
- <code title="post /agents/auth">client.agents.auth.<a href="./src/kernel/resources/agents/auth/auth.py">create</a>(\*\*<a href="src/kernel/types/agents/auth_create_params.py">params</a>) -> <a href="./src/kernel/types/agents/auth_agent.py">AuthAgent</a></code>
- <code title="get /agents/auth/{id}">client.agents.auth.<a href="./src/kernel/resources/agents/auth/auth.py">retrieve</a>(id) -> <a href="./src/kernel/types/agents/auth_agent.py">AuthAgent</a></code>
- <code title="get /agents/auth">client.agents.auth.<a href="./src/kernel/resources/agents/auth/auth.py">list</a>(\*\*<a href="src/kernel/types/agents/auth_list_params.py">params</a>) -> <a href="./src/kernel/types/agents/auth_agent.py">SyncOffsetPagination[AuthAgent]</a></code>
- <code title="delete /agents/auth/{id}">client.agents.auth.<a href="./src/kernel/resources/agents/auth/auth.py">delete</a>(id) -> None</code>
- <code title="post /agents/auth/{id}/reauth">client.agents.auth.<a href="./src/kernel/resources/agents/auth/auth.py">reauth</a>(id) -> <a href="./src/kernel/types/agents/reauth_response.py">ReauthResponse</a></code>

### Invocations

Expand All @@ -321,3 +316,19 @@ Methods:
- <code title="post /agents/auth/invocations/{invocation_id}/discover">client.agents.auth.invocations.<a href="./src/kernel/resources/agents/auth/invocations.py">discover</a>(invocation_id, \*\*<a href="src/kernel/types/agents/auth/invocation_discover_params.py">params</a>) -> <a href="./src/kernel/types/agents/agent_auth_discover_response.py">AgentAuthDiscoverResponse</a></code>
- <code title="post /agents/auth/invocations/{invocation_id}/exchange">client.agents.auth.invocations.<a href="./src/kernel/resources/agents/auth/invocations.py">exchange</a>(invocation_id, \*\*<a href="src/kernel/types/agents/auth/invocation_exchange_params.py">params</a>) -> <a href="./src/kernel/types/agents/auth/invocation_exchange_response.py">InvocationExchangeResponse</a></code>
- <code title="post /agents/auth/invocations/{invocation_id}/submit">client.agents.auth.invocations.<a href="./src/kernel/resources/agents/auth/invocations.py">submit</a>(invocation_id, \*\*<a href="src/kernel/types/agents/auth/invocation_submit_params.py">params</a>) -> <a href="./src/kernel/types/agents/agent_auth_submit_response.py">AgentAuthSubmitResponse</a></code>

# Credentials

Types:

```python
from kernel.types import CreateCredentialRequest, Credential, UpdateCredentialRequest
```

Methods:

- <code title="post /credentials">client.credentials.<a href="./src/kernel/resources/credentials.py">create</a>(\*\*<a href="src/kernel/types/credential_create_params.py">params</a>) -> <a href="./src/kernel/types/credential.py">Credential</a></code>
- <code title="get /credentials/{id}">client.credentials.<a href="./src/kernel/resources/credentials.py">retrieve</a>(id) -> <a href="./src/kernel/types/credential.py">Credential</a></code>
- <code title="patch /credentials/{id}">client.credentials.<a href="./src/kernel/resources/credentials.py">update</a>(id, \*\*<a href="src/kernel/types/credential_update_params.py">params</a>) -> <a href="./src/kernel/types/credential.py">Credential</a></code>
- <code title="get /credentials">client.credentials.<a href="./src/kernel/resources/credentials.py">list</a>(\*\*<a href="src/kernel/types/credential_list_params.py">params</a>) -> <a href="./src/kernel/types/credential.py">SyncOffsetPagination[Credential]</a></code>
- <code title="delete /credentials/{id}">client.credentials.<a href="./src/kernel/resources/credentials.py">delete</a>(id) -> None</code>
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "kernel"
version = "0.23.0"
version = "0.24.0"
description = "The official Python library for the kernel API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
10 changes: 8 additions & 2 deletions src/kernel/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1247,9 +1247,12 @@ def patch(
*,
cast_to: Type[ResponseT],
body: Body | None = None,
files: RequestFiles | None = None,
options: RequestOptions = {},
) -> ResponseT:
opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options)
opts = FinalRequestOptions.construct(
method="patch", url=path, json_data=body, files=to_httpx_files(files), **options
)
return self.request(cast_to, opts)

def put(
Expand Down Expand Up @@ -1767,9 +1770,12 @@ async def patch(
*,
cast_to: Type[ResponseT],
body: Body | None = None,
files: RequestFiles | None = None,
options: RequestOptions = {},
) -> ResponseT:
opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options)
opts = FinalRequestOptions.construct(
method="patch", url=path, json_data=body, files=to_httpx_files(files), **options
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Async patch method uses sync file handling function

The async patch method incorrectly uses the synchronous to_httpx_files(files) instead of await async_to_httpx_files(files). The async post method (line 1763) and async put method (line 1791) both correctly use await async_to_httpx_files(files). When files contain PathLike objects, the sync version will perform blocking I/O (path.read_bytes()) in an async context, potentially blocking the event loop.

Fix in Cursor Fix in Web

)
return await self.request(cast_to, opts)

async def put(
Expand Down
Loading