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.104.0"
".": "0.106.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 163
configured_endpoints: 164
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 0.106.0 (2026-09-16)

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

### Features

* Add processor-bound AgentCard preparation contracts ([37d5e9c](https://github.com/kernel/kernel-python-sdk/commit/37d5e9c3d5db76bece8f8ba8d5358b939bc79315))
* Add start_url to browser session updates ([82a475d](https://github.com/kernel/kernel-python-sdk/commit/82a475dae250abce535476386be88033a5314656))
* Polish and publish the Config Registry API ([afe2fea](https://github.com/kernel/kernel-python-sdk/commit/afe2feaf2dcea1f4fc160d66cfe9f3711b61a447))
* Square UKP and Hypeman placement load factors ([76dee03](https://github.com/kernel/kernel-python-sdk/commit/76dee03d215481de6ee42b2cba631b5f5893c1a3))

## [0.104.0](https://github.com/kernel/kernel-python-sdk/compare/v0.103.0...v0.104.0) (2026-09-15)


Expand Down
2 changes: 2 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ Methods:

- <code title="get /config-registry/analyses/{id}">client.config_registry.analyses.<a href="./src/kernel/resources/config_registry/analyses.py">retrieve</a>(id) -> <a href="./src/kernel/types/config_registry_response.py">ConfigRegistryResponse</a></code>
- <code title="get /config-registry/analyses">client.config_registry.analyses.<a href="./src/kernel/resources/config_registry/analyses.py">list</a>(\*\*<a href="src/kernel/types/config_registry/analysis_list_params.py">params</a>) -> <a href="./src/kernel/types/analysis_summary.py">SyncOffsetPagination[AnalysisSummary]</a></code>
- <code title="post /config-registry/analyses/{id}/cancel">client.config_registry.analyses.<a href="./src/kernel/resources/config_registry/analyses.py">cancel</a>(id) -> <a href="./src/kernel/types/config_registry_response.py">ConfigRegistryResponse</a></code>

# Browsers

Expand Down Expand Up @@ -526,6 +527,7 @@ Types:
from kernel.types.vaults import (
AgentcardCheckoutAuthorization,
AgentcardCheckoutPreparation,
AgentcardPreparedProcessor,
AuthorizeVaultItemOperationRequest,
CardVaultItemSpec,
CardVaultItemState,
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.104.0"
version = "0.106.0"
description = "The official Python library for the kernel API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/kernel/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "kernel"
__version__ = "0.104.0" # x-release-please-version
__version__ = "0.106.0" # x-release-please-version
14 changes: 14 additions & 0 deletions src/kernel/resources/browsers/browsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ def update(
profile: BrowserProfile | Omit = omit,
proxy: BrowserProxyConfigParam | Omit = omit,
proxy_id: Optional[str] | Omit = omit,
start_url: str | Omit = omit,
tags: Optional[TagsParam] | Omit = omit,
telemetry: Optional[browser_update_params.Telemetry] | Omit = omit,
viewport: browser_update_params.Viewport | Omit = omit,
Expand Down Expand Up @@ -428,6 +429,11 @@ def update(
proxy_id: ID of the proxy to use. Omit to leave unchanged, set to empty string to remove
proxy. Deprecated in favor of proxy.

start_url: Optional URL to navigate the browser to after applying this update. When a
profile is loaded in the same update, this overrides the profile's restored
tabs. Navigation is best-effort, so failures do not fail the update. Omit or set
to an empty string to leave the current page unchanged.

tags: User-defined key-value tags for the browser session. Omit to leave unchanged.
Provide a map to replace the entire tag set (full replace, not a merge). Set to
an empty object ({}) to clear all tags. Up to 50 pairs.
Expand Down Expand Up @@ -459,6 +465,7 @@ def update(
"profile": profile,
"proxy": proxy,
"proxy_id": proxy_id,
"start_url": start_url,
"tags": tags,
"telemetry": telemetry,
"viewport": viewport,
Expand Down Expand Up @@ -1024,6 +1031,7 @@ async def update(
profile: BrowserProfile | Omit = omit,
proxy: BrowserProxyConfigParam | Omit = omit,
proxy_id: Optional[str] | Omit = omit,
start_url: str | Omit = omit,
tags: Optional[TagsParam] | Omit = omit,
telemetry: Optional[browser_update_params.Telemetry] | Omit = omit,
viewport: browser_update_params.Viewport | Omit = omit,
Expand Down Expand Up @@ -1058,6 +1066,11 @@ async def update(
proxy_id: ID of the proxy to use. Omit to leave unchanged, set to empty string to remove
proxy. Deprecated in favor of proxy.

start_url: Optional URL to navigate the browser to after applying this update. When a
profile is loaded in the same update, this overrides the profile's restored
tabs. Navigation is best-effort, so failures do not fail the update. Omit or set
to an empty string to leave the current page unchanged.

tags: User-defined key-value tags for the browser session. Omit to leave unchanged.
Provide a map to replace the entire tag set (full replace, not a merge). Set to
an empty object ({}) to clear all tags. Up to 50 pairs.
Expand Down Expand Up @@ -1089,6 +1102,7 @@ async def update(
"profile": profile,
"proxy": proxy,
"proxy_id": proxy_id,
"start_url": start_url,
"tags": tags,
"telemetry": telemetry,
"viewport": viewport,
Expand Down
86 changes: 86 additions & 0 deletions src/kernel/resources/config_registry/analyses.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,43 @@ def list(
model=AnalysisSummary,
)

def cancel(
self,
id: str,
*,
# 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,
) -> ConfigRegistryResponse:
"""Requests cancellation of a running project-scoped analysis.

Cancellation is
asynchronous; poll the analysis until its status becomes canceled. Repeating the
request after the analysis reaches a terminal state returns the existing
outcome.

Args:
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
"""
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return self._post(
path_template("/config-registry/analyses/{id}/cancel", id=id),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=ConfigRegistryResponse,
)


class AsyncAnalysesResource(AsyncAPIResource):
"""Resolve browser and proxy recommendations for bot-protected sites."""
Expand Down Expand Up @@ -230,6 +267,43 @@ def list(
model=AnalysisSummary,
)

async def cancel(
self,
id: str,
*,
# 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,
) -> ConfigRegistryResponse:
"""Requests cancellation of a running project-scoped analysis.

Cancellation is
asynchronous; poll the analysis until its status becomes canceled. Repeating the
request after the analysis reaches a terminal state returns the existing
outcome.

Args:
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
"""
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return await self._post(
path_template("/config-registry/analyses/{id}/cancel", id=id),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=ConfigRegistryResponse,
)


class AnalysesResourceWithRawResponse:
def __init__(self, analyses: AnalysesResource) -> None:
Expand All @@ -241,6 +315,9 @@ def __init__(self, analyses: AnalysesResource) -> None:
self.list = to_raw_response_wrapper(
analyses.list,
)
self.cancel = to_raw_response_wrapper(
analyses.cancel,
)


class AsyncAnalysesResourceWithRawResponse:
Expand All @@ -253,6 +330,9 @@ def __init__(self, analyses: AsyncAnalysesResource) -> None:
self.list = async_to_raw_response_wrapper(
analyses.list,
)
self.cancel = async_to_raw_response_wrapper(
analyses.cancel,
)


class AnalysesResourceWithStreamingResponse:
Expand All @@ -265,6 +345,9 @@ def __init__(self, analyses: AnalysesResource) -> None:
self.list = to_streamed_response_wrapper(
analyses.list,
)
self.cancel = to_streamed_response_wrapper(
analyses.cancel,
)


class AsyncAnalysesResourceWithStreamingResponse:
Expand All @@ -277,3 +360,6 @@ def __init__(self, analyses: AsyncAnalysesResource) -> None:
self.list = async_to_streamed_response_wrapper(
analyses.list,
)
self.cancel = async_to_streamed_response_wrapper(
analyses.cancel,
)
10 changes: 6 additions & 4 deletions src/kernel/resources/config_registry/config_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,9 @@ def resolve(
any non-HTTPS destination as off-site and will not drive an http one. Kernel
uses it to drive the browser further into the site, where it can observe
protections that only appear once a session interacts. When this target already
has a verified configuration, the run confirms that one instead of re-deriving
the whole matrix, so supplying an intent narrows what can be recommended.
has a recommended configuration, the run confirms that one instead of
re-deriving the whole matrix, so supplying an intent narrows what can be
recommended.

extra_headers: Send extra headers

Expand Down Expand Up @@ -374,8 +375,9 @@ async def resolve(
any non-HTTPS destination as off-site and will not drive an http one. Kernel
uses it to drive the browser further into the site, where it can observe
protections that only appear once a session interacts. When this target already
has a verified configuration, the run confirms that one instead of re-deriving
the whole matrix, so supplying an intent narrows what can be recommended.
has a recommended configuration, the run confirms that one instead of
re-deriving the whole matrix, so supplying an intent narrows what can be
recommended.

extra_headers: Send extra headers

Expand Down
20 changes: 10 additions & 10 deletions src/kernel/resources/vaults/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,11 +511,11 @@ def perform_operation(
leave the outcome unknown; do not automatically retry.

Args:
checkout: Required when preparing an unused AgentCard card for Square. Consent is bound to
this browser and declared merchant origin, not a tab. Wait for the item's
ready_to_submit status before native Pay and submit within its readiness
deadline. Unused preparations expire automatically; every preparation is
single-use, including after failure or expiry.
checkout: Required when preparing an unused AgentCard card for a supported tokenization
processor. Consent is bound to this browser and declared merchant origin, not a
tab. Wait for the item's ready_to_submit status before native Pay and submit
within its readiness deadline. Unused preparations expire automatically; every
preparation is single-use, including after failure or expiry.

extra_headers: Send extra headers

Expand Down Expand Up @@ -1274,11 +1274,11 @@ async def perform_operation(
leave the outcome unknown; do not automatically retry.

Args:
checkout: Required when preparing an unused AgentCard card for Square. Consent is bound to
this browser and declared merchant origin, not a tab. Wait for the item's
ready_to_submit status before native Pay and submit within its readiness
deadline. Unused preparations expire automatically; every preparation is
single-use, including after failure or expiry.
checkout: Required when preparing an unused AgentCard card for a supported tokenization
processor. Consent is bound to this browser and declared merchant origin, not a
tab. Wait for the item's ready_to_submit status before native Pay and submit
within its readiness deadline. Unused preparations expire automatically; every
preparation is single-use, including after failure or expiry.

extra_headers: Send extra headers

Expand Down
6 changes: 6 additions & 0 deletions src/kernel/types/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ class Analysis(BaseModel):

status: Literal["running", "completed", "failed", "canceled", "expired"]
"""Lifecycle status of a background analysis."""

intent: Optional[str] = None
"""The workload description supplied for this analysis.

Null when the analysis only tested connectivity.
"""
2 changes: 1 addition & 1 deletion src/kernel/types/browser_create_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class BrowserCreateResponse(BaseModel):
"""

start_url: Optional[str] = None
"""URL the session was asked to navigate to on creation, if any.
"""URL the session was most recently asked to navigate to, if any.

Recorded for debugging. Navigation is fire-and-forget — the URL is dispatched to
the browser without waiting for it to load, and any errors (DNS failure, bad
Expand Down
2 changes: 1 addition & 1 deletion src/kernel/types/browser_list_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class BrowserListResponse(BaseModel):
"""

start_url: Optional[str] = None
"""URL the session was asked to navigate to on creation, if any.
"""URL the session was most recently asked to navigate to, if any.

Recorded for debugging. Navigation is fire-and-forget — the URL is dispatched to
the browser without waiting for it to load, and any errors (DNS failure, bad
Expand Down
2 changes: 1 addition & 1 deletion src/kernel/types/browser_pool_acquire_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class BrowserPoolAcquireResponse(BaseModel):
"""

start_url: Optional[str] = None
"""URL the session was asked to navigate to on creation, if any.
"""URL the session was most recently asked to navigate to, if any.

Recorded for debugging. Navigation is fire-and-forget — the URL is dispatched to
the browser without waiting for it to load, and any errors (DNS failure, bad
Expand Down
2 changes: 1 addition & 1 deletion src/kernel/types/browser_retrieve_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class BrowserRetrieveResponse(BaseModel):
"""

start_url: Optional[str] = None
"""URL the session was asked to navigate to on creation, if any.
"""URL the session was most recently asked to navigate to, if any.

Recorded for debugging. Navigation is fire-and-forget — the URL is dispatched to
the browser without waiting for it to load, and any errors (DNS failure, bad
Expand Down
8 changes: 8 additions & 0 deletions src/kernel/types/browser_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ class BrowserUpdateParams(TypedDict, total=False):
favor of proxy.
"""

start_url: str
"""Optional URL to navigate the browser to after applying this update.

When a profile is loaded in the same update, this overrides the profile's
restored tabs. Navigation is best-effort, so failures do not fail the update.
Omit or set to an empty string to leave the current page unchanged.
"""

tags: Optional[TagsParam]
"""User-defined key-value tags for the browser session.

Expand Down
2 changes: 1 addition & 1 deletion src/kernel/types/browser_update_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class BrowserUpdateResponse(BaseModel):
"""

start_url: Optional[str] = None
"""URL the session was asked to navigate to on creation, if any.
"""URL the session was most recently asked to navigate to, if any.

Recorded for debugging. Navigation is fire-and-forget — the URL is dispatched to
the browser without waiting for it to load, and any errors (DNS failure, bad
Expand Down
5 changes: 3 additions & 2 deletions src/kernel/types/config_registry_resolve_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class ConfigRegistryResolveParams(TypedDict, total=False):
any non-HTTPS destination as off-site and will not drive an http one. Kernel
uses it to drive the browser further into the site, where it can observe
protections that only appear once a session interacts. When this target already
has a verified configuration, the run confirms that one instead of re-deriving
the whole matrix, so supplying an intent narrows what can be recommended.
has a recommended configuration, the run confirms that one instead of
re-deriving the whole matrix, so supplying an intent narrows what can be
recommended.
"""
10 changes: 5 additions & 5 deletions src/kernel/types/evidence.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class Evidence(BaseModel):
success_rate: float
"""Accessed trials divided by judged trials. Inconclusive trials are excluded."""

last_verified_at: Optional[datetime] = None
"""Most recent contributing run where this config met the success threshold.

Omitted for knowledge assembled from runs that did not independently meet the
threshold.
last_supported_at: Optional[datetime] = None
"""
Most recent contributing run whose evidence supported recommending this
configuration. Omitted when no individual run independently met the
recommendation threshold.
"""
2 changes: 1 addition & 1 deletion src/kernel/types/invocation_list_browsers_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class Browser(BaseModel):
"""

start_url: Optional[str] = None
"""URL the session was asked to navigate to on creation, if any.
"""URL the session was most recently asked to navigate to, if any.

Recorded for debugging. Navigation is fire-and-forget — the URL is dispatched to
the browser without waiting for it to load, and any errors (DNS failure, bad
Expand Down
Loading
Loading