Skip to content
Open
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.24.0"
".": "0.25.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 89
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-13214b99e392aab631aa1ca99b6a51a58df81e34156d21b8d639bea779566123.yml
openapi_spec_hash: a88d175fc3980de3097ac1411d8dcbff
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-2cf104c4b88159c6a50713b019188f83983748b9cacec598089cf9068dc5b1cd.yml
openapi_spec_hash: 84ea30ae65ad7ebcc04d2f3907d1e73b
config_hash: 179f33af31ece83563163d5b3d751d13
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## 0.25.0 (2025-12-20)

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

### Features

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

## 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)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "kernel"
version = "0.24.0"
version = "0.25.0"
description = "The official Python library for the kernel API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
9 changes: 7 additions & 2 deletions scripts/lint
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ set -e

cd "$(dirname "$0")/.."

echo "==> Running lints"
rye run lint
if [ "$1" = "--fix" ]; then
echo "==> Running lints with --fix"
rye run fix:ruff
else
echo "==> Running lints"
rye run lint
fi

echo "==> Making sure it imports"
rye run python -c 'import kernel'
2 changes: 1 addition & 1 deletion src/kernel/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1774,7 +1774,7 @@ async def patch(
options: RequestOptions = {},
) -> ResponseT:
opts = FinalRequestOptions.construct(
method="patch", url=path, json_data=body, files=to_httpx_files(files), **options
method="patch", url=path, json_data=body, files=await async_to_httpx_files(files), **options
)
return await self.request(cast_to, opts)

Expand Down
2 changes: 1 addition & 1 deletion src/kernel/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "kernel"
__version__ = "0.24.0" # x-release-please-version
__version__ = "0.25.0" # x-release-please-version
24 changes: 12 additions & 12 deletions src/kernel/resources/agents/auth/invocations.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,9 @@ def retrieve(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AgentAuthInvocationResponse:
"""Returns invocation details including app_name and target_domain.

Uses the JWT
returned by the exchange endpoint, or standard API key or JWT authentication.
"""
Returns invocation details including status, app_name, and target_domain.
Supports both API key and JWT (from exchange endpoint) authentication.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -155,7 +154,7 @@ def discover(
"""
Inspects the target site to detect logged-in state or discover required fields.
Returns 200 with success: true when fields are found, or 4xx/5xx for failures.
Requires the JWT returned by the exchange endpoint.
Supports both API key and JWT (from exchange endpoint) authentication.

Args:
login_url: Optional login page URL. If provided, will override the stored login URL for
Expand Down Expand Up @@ -233,7 +232,8 @@ def submit(
) -> AgentAuthSubmitResponse:
"""
Submits field values for the discovered login form and may return additional
auth fields or success. Requires the JWT returned by the exchange endpoint.
auth fields or success. Supports both API key and JWT (from exchange endpoint)
authentication.

Args:
field_values: Values for the discovered login fields
Expand Down Expand Up @@ -342,10 +342,9 @@ async def retrieve(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AgentAuthInvocationResponse:
"""Returns invocation details including app_name and target_domain.

Uses the JWT
returned by the exchange endpoint, or standard API key or JWT authentication.
"""
Returns invocation details including status, app_name, and target_domain.
Supports both API key and JWT (from exchange endpoint) authentication.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -381,7 +380,7 @@ async def discover(
"""
Inspects the target site to detect logged-in state or discover required fields.
Returns 200 with success: true when fields are found, or 4xx/5xx for failures.
Requires the JWT returned by the exchange endpoint.
Supports both API key and JWT (from exchange endpoint) authentication.

Args:
login_url: Optional login page URL. If provided, will override the stored login URL for
Expand Down Expand Up @@ -461,7 +460,8 @@ async def submit(
) -> AgentAuthSubmitResponse:
"""
Submits field values for the discovered login form and may return additional
auth fields or success. Requires the JWT returned by the exchange endpoint.
auth fields or success. Supports both API key and JWT (from exchange endpoint)
authentication.

Args:
field_values: Values for the discovered login fields
Expand Down
3 changes: 3 additions & 0 deletions src/kernel/types/agents/agent_auth_invocation_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@ class AgentAuthInvocationResponse(BaseModel):
status: Literal["IN_PROGRESS", "SUCCESS", "EXPIRED", "CANCELED"]
"""Invocation status"""

step: Literal["initialized", "discovering", "awaiting_input", "submitting", "completed", "expired"]
"""Current step in the invocation workflow"""

target_domain: str
"""Target domain for authentication"""
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class AuthAgentAlreadyAuthenticated(BaseModel):
"""Response when the agent is already authenticated."""

status: Literal["already_authenticated"]
status: Literal["ALREADY_AUTHENTICATED"]
"""Indicates the agent is already authenticated and no invocation was created."""


Expand All @@ -32,7 +32,7 @@ class AuthAgentInvocationCreated(BaseModel):
invocation_id: str
"""Unique identifier for the invocation."""

status: Literal["invocation_created"]
status: Literal["INVOCATION_CREATED"]
"""Indicates an invocation was created."""


Expand Down
2 changes: 1 addition & 1 deletion src/kernel/types/agents/reauth_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class ReauthResponse(BaseModel):
"""Response from triggering re-authentication"""

status: Literal["reauth_started", "already_authenticated", "cannot_reauth"]
status: Literal["REAUTH_STARTED", "ALREADY_AUTHENTICATED", "CANNOT_REAUTH"]
"""Result of the re-authentication attempt"""

invocation_id: Optional[str] = None
Expand Down