Skip to content

Commit 31e11ee

Browse files
authored
Merge pull request #210 from kernel/release-please--branches--main--changes--next
release: 0.140.0
2 parents 29433e1 + 06f1a77 commit 31e11ee

26 files changed

Lines changed: 533 additions & 61 deletions

‎.release-please-manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.139.0"
2+
".": "0.140.0"
33
}

‎CHANGELOG.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## [0.140.0](https://github.com/kernel/kernel-python-sdk/compare/v0.139.0...v0.140.0) (2026-11-04)
4+
5+
6+
### Features
7+
8+
* Add single-use Kernel cards to vaults ([c11d264](https://github.com/kernel/kernel-python-sdk/commit/c11d2644383af967ddcb8b892b325ea4421eb956))
9+
* Drop Kernel's origin gate from 1Password fill ([e5454cb](https://github.com/kernel/kernel-python-sdk/commit/e5454cb02a33599e81ec5ca3c764e2522ad2cd76))
10+
* Let customers keep refreshing imported Link wallet grants ([f67de9c](https://github.com/kernel/kernel-python-sdk/commit/f67de9c930a43bc3f1b8db04a93bf13831b7d8cb))
11+
* Pass through tool_page_unloaded and disable SDK retries for WebMCP invoke failures ([56c9983](https://github.com/kernel/kernel-python-sdk/commit/56c998338b3f885d4d8276e5d038d9612bf0d1fd))
12+
313
## [0.139.0](https://github.com/kernel/kernel-python-sdk/compare/v0.138.0...v0.139.0) (2026-10-30)
414

515

‎api.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,7 @@ from kernel.types.vaults import (
608608
KernelCredentialVaultItemSpecInput,
609609
KernelCredentialVaultItemState,
610610
KernelPaymentRequestVaultItemSpec,
611+
KernelSingleUseCard,
611612
KernelWalletState,
612613
KernelWalletVaultItemSpec,
613614
LinkShippingAddress,
@@ -639,6 +640,7 @@ from kernel.types.vaults import (
639640
ShopPayCardVaultItemSpec,
640641
ShopPayWalletState,
641642
ShopPayWalletVaultItemSpec,
643+
SingleUseCardBillingAddress,
642644
VaultCardAliases,
643645
VaultCardFillField,
644646
VaultCheckoutContext,

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "kernel"
3-
version = "0.139.0"
3+
version = "0.140.0"
44
description = "The official Python library for the kernel API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

‎src/kernel/_version.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "kernel"
4-
__version__ = "0.139.0" # x-release-please-version
4+
__version__ = "0.140.0" # x-release-please-version

‎src/kernel/resources/browsers/webmcp/webmcp.py‎

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,16 @@ def invoke_tool(
8282
across navigation. Inspect a populated form, obtain any required confirmation,
8383
then submit through Playwright or computer interaction without invoking the tool
8484
again. If the tab or embedded frame disappears, or the request times out after
85-
invocation begins, the response reports outcome_unknown and the tool is not
86-
retried. CDP-backed custom tool outputs above 240 KiB return an error rather
87-
than a truncated result.
85+
invocation begins, the response reports outcome_unknown. If the tool's page is
86+
reloaded or replaced by a navigation the tool did not start, and the tool never
87+
responds, the response reports tool_page_unloaded once the replacement page
88+
loads, or right away if the tool's tab crashes. Neither failure is retried, and
89+
both set X-Should-Retry to false because the tool may have had side effects.
90+
CDP-backed custom tool outputs above 240 KiB return an error rather than a
91+
truncated result.
8892
8993
Args:
90-
input: Tool input, limited to 1 MiB after JSON serialization.
94+
input: Tool input, limited to 4 MiB after JSON serialization.
9195
9296
extra_headers: Send extra headers
9397
@@ -219,12 +223,16 @@ async def invoke_tool(
219223
across navigation. Inspect a populated form, obtain any required confirmation,
220224
then submit through Playwright or computer interaction without invoking the tool
221225
again. If the tab or embedded frame disappears, or the request times out after
222-
invocation begins, the response reports outcome_unknown and the tool is not
223-
retried. CDP-backed custom tool outputs above 240 KiB return an error rather
224-
than a truncated result.
226+
invocation begins, the response reports outcome_unknown. If the tool's page is
227+
reloaded or replaced by a navigation the tool did not start, and the tool never
228+
responds, the response reports tool_page_unloaded once the replacement page
229+
loads, or right away if the tool's tab crashes. Neither failure is retried, and
230+
both set X-Should-Retry to false because the tool may have had side effects.
231+
CDP-backed custom tool outputs above 240 KiB return an error rather than a
232+
truncated result.
225233
226234
Args:
227-
input: Tool input, limited to 1 MiB after JSON serialization.
235+
input: Tool input, limited to 4 MiB after JSON serialization.
228236
229237
extra_headers: Send extra headers
230238

‎src/kernel/resources/vaults/items.py‎

Lines changed: 128 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,8 +1280,8 @@ def perform_operation(
12801280
page_url: Exact current top-level page URL. Must match exactly one open page in the
12811281
browser unless target_id is supplied.
12821282
1283-
entry_id: ID of an approved request entry. Required when several approved entries have the
1284-
page's origin.
1283+
entry_id: ID of an approved request entry. Required when several entries are approved and
1284+
the page's origin does not match exactly one of them.
12851285
12861286
target_id: CDP target ID of the page to fill, such as tab.target_id from
12871287
playwright.execute. Use it when several open pages have page_url. The page's
@@ -1424,6 +1424,67 @@ def perform_operation(
14241424
"""
14251425
...
14261426

1427+
@overload
1428+
def perform_operation(
1429+
self,
1430+
key: str,
1431+
*,
1432+
id_or_name: str,
1433+
access_token: str,
1434+
type: Literal["update_access_token"],
1435+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1436+
# The extra values given here take precedence over values defined on the client or passed to this method.
1437+
extra_headers: Headers | None = None,
1438+
extra_query: Query | None = None,
1439+
extra_body: Body | None = None,
1440+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
1441+
idempotency_key: str | None = None,
1442+
) -> VaultItemOperationResponse:
1443+
"""
1444+
Retrieve the item first and invoke only an operation listed in
1445+
`available_operations`, following its natural-language description. Availability
1446+
is rechecked at execution time; unavailable operations return 409. Authorization
1447+
and preparation may call an external provider and return updated state. Link
1448+
cards advertise authorize; pass browser_id and page_url from the final checkout
1449+
page so Kernel can inspect the checkout. Eligible unused AgentCard cards
1450+
advertise prepare_checkout, which requires checkout context and obtains device
1451+
approval before native Square Pay. Keep the returned approval page open, poll
1452+
until ready_to_submit, then submit before preparation.expires_at. Unused
1453+
preparations expire automatically and cannot be reused. If spend-request
1454+
creation is rejected with a non-retryable provider error, the card item is
1455+
deleted and the provider's error code and message are returned. Rate limits
1456+
return HTTP 429 and retain the card item; stop, back off, and retry the same
1457+
authorize operation.
1458+
1459+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
1460+
submit checkout promptly after filling. A repeated fill is safe.
1461+
1462+
Fill returns a value-free execution result. Validation failures before writing
1463+
return 400 (invalid request or targets), 403 (access or destination denied), 404
1464+
(resource not found), or 409 (item or browser not ready). Once writing starts,
1465+
known partial failures and indeterminate field outcomes return 200 with status
1466+
`failed` or `unknown`. Fill never submits the page, so it is safe to retry after
1467+
a failure, an `unknown` outcome, or a transport error.
1468+
1469+
Connected Kernel wallets may advertise add_payment_method, which returns a
1470+
single-use hosted card_enrollment link for a card, and remove_payment_method,
1471+
which removes one card without affecting the others. Both operations require
1472+
vaults:write in addition to vaults:use on the vault for scoped API keys, and
1473+
return 403 without both permissions.
1474+
1475+
Args:
1476+
extra_headers: Send extra headers
1477+
1478+
extra_query: Add additional query parameters to the request
1479+
1480+
extra_body: Add additional JSON properties to the request
1481+
1482+
timeout: Override the client-level default timeout for this request, in seconds
1483+
1484+
idempotency_key: Specify a custom idempotency key for this request
1485+
"""
1486+
...
1487+
14271488
@overload
14281489
def perform_operation(
14291490
self,
@@ -1656,6 +1717,7 @@ def perform_operation(
16561717
| Literal["1pw_fill"]
16571718
| Literal["1pw_recover"]
16581719
| Literal["1pw_update_access_token"]
1720+
| Literal["update_access_token"]
16591721
| Literal["webmcp_invoke"]
16601722
| Literal["add_payment_method"]
16611723
| Literal["remove_payment_method"],
@@ -3285,8 +3347,8 @@ async def perform_operation(
32853347
page_url: Exact current top-level page URL. Must match exactly one open page in the
32863348
browser unless target_id is supplied.
32873349
3288-
entry_id: ID of an approved request entry. Required when several approved entries have the
3289-
page's origin.
3350+
entry_id: ID of an approved request entry. Required when several entries are approved and
3351+
the page's origin does not match exactly one of them.
32903352
32913353
target_id: CDP target ID of the page to fill, such as tab.target_id from
32923354
playwright.execute. Use it when several open pages have page_url. The page's
@@ -3429,6 +3491,67 @@ async def perform_operation(
34293491
"""
34303492
...
34313493

3494+
@overload
3495+
async def perform_operation(
3496+
self,
3497+
key: str,
3498+
*,
3499+
id_or_name: str,
3500+
access_token: str,
3501+
type: Literal["update_access_token"],
3502+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
3503+
# The extra values given here take precedence over values defined on the client or passed to this method.
3504+
extra_headers: Headers | None = None,
3505+
extra_query: Query | None = None,
3506+
extra_body: Body | None = None,
3507+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
3508+
idempotency_key: str | None = None,
3509+
) -> VaultItemOperationResponse:
3510+
"""
3511+
Retrieve the item first and invoke only an operation listed in
3512+
`available_operations`, following its natural-language description. Availability
3513+
is rechecked at execution time; unavailable operations return 409. Authorization
3514+
and preparation may call an external provider and return updated state. Link
3515+
cards advertise authorize; pass browser_id and page_url from the final checkout
3516+
page so Kernel can inspect the checkout. Eligible unused AgentCard cards
3517+
advertise prepare_checkout, which requires checkout context and obtains device
3518+
approval before native Square Pay. Keep the returned approval page open, poll
3519+
until ready_to_submit, then submit before preparation.expires_at. Unused
3520+
preparations expire automatically and cannot be reused. If spend-request
3521+
creation is rejected with a non-retryable provider error, the card item is
3522+
deleted and the provider's error code and message are returned. Rate limits
3523+
return HTTP 429 and retain the card item; stop, back off, and retry the same
3524+
authorize operation.
3525+
3526+
Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
3527+
submit checkout promptly after filling. A repeated fill is safe.
3528+
3529+
Fill returns a value-free execution result. Validation failures before writing
3530+
return 400 (invalid request or targets), 403 (access or destination denied), 404
3531+
(resource not found), or 409 (item or browser not ready). Once writing starts,
3532+
known partial failures and indeterminate field outcomes return 200 with status
3533+
`failed` or `unknown`. Fill never submits the page, so it is safe to retry after
3534+
a failure, an `unknown` outcome, or a transport error.
3535+
3536+
Connected Kernel wallets may advertise add_payment_method, which returns a
3537+
single-use hosted card_enrollment link for a card, and remove_payment_method,
3538+
which removes one card without affecting the others. Both operations require
3539+
vaults:write in addition to vaults:use on the vault for scoped API keys, and
3540+
return 403 without both permissions.
3541+
3542+
Args:
3543+
extra_headers: Send extra headers
3544+
3545+
extra_query: Add additional query parameters to the request
3546+
3547+
extra_body: Add additional JSON properties to the request
3548+
3549+
timeout: Override the client-level default timeout for this request, in seconds
3550+
3551+
idempotency_key: Specify a custom idempotency key for this request
3552+
"""
3553+
...
3554+
34323555
@overload
34333556
async def perform_operation(
34343557
self,
@@ -3661,6 +3784,7 @@ async def perform_operation(
36613784
| Literal["1pw_fill"]
36623785
| Literal["1pw_recover"]
36633786
| Literal["1pw_update_access_token"]
3787+
| Literal["update_access_token"]
36643788
| Literal["webmcp_invoke"]
36653789
| Literal["add_payment_method"]
36663790
| Literal["remove_payment_method"],

‎src/kernel/types/browsers/webmcp_invoke_tool_params.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class WebmcpInvokeToolParams(TypedDict, total=False):
1212
input: Required[Dict[str, object]]
13-
"""Tool input, limited to 1 MiB after JSON serialization."""
13+
"""Tool input, limited to 4 MiB after JSON serialization."""
1414

1515
tool_ref: Required[str]
1616

‎src/kernel/types/vaults/__init__.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from .credential_vault_item import CredentialVaultItem as CredentialVaultItem
2323
from .link_shipping_address import LinkShippingAddress as LinkShippingAddress
2424
from .shop_pay_wallet_state import ShopPayWalletState as ShopPayWalletState
25+
from .kernel_single_use_card import KernelSingleUseCard as KernelSingleUseCard
2526
from .vault_fill_field_param import VaultFillFieldParam as VaultFillFieldParam
2627
from .wallet_vault_item_spec import WalletVaultItemSpec as WalletVaultItemSpec
2728
from .vault_fill_field_result import VaultFillFieldResult as VaultFillFieldResult
@@ -37,6 +38,7 @@
3738
from .agentcard_prepared_processor import AgentcardPreparedProcessor as AgentcardPreparedProcessor
3839
from .credential_collection_action import CredentialCollectionAction as CredentialCollectionAction
3940
from .credential_vault_field_state import CredentialVaultFieldState as CredentialVaultFieldState
41+
from .kernel_single_use_card_param import KernelSingleUseCardParam as KernelSingleUseCardParam
4042
from .vault_checkout_context_param import VaultCheckoutContextParam as VaultCheckoutContextParam
4143
from .credential_account_vault_item import CredentialAccountVaultItem as CredentialAccountVaultItem
4244
from .item_perform_operation_params import ItemPerformOperationParams as ItemPerformOperationParams
@@ -46,6 +48,7 @@
4648
from .agentcard_checkout_preparation import AgentcardCheckoutPreparation as AgentcardCheckoutPreparation
4749
from .payment_request_vault_item_spec import PaymentRequestVaultItemSpec as PaymentRequestVaultItemSpec
4850
from .shop_pay_wallet_vault_item_spec import ShopPayWalletVaultItemSpec as ShopPayWalletVaultItemSpec
51+
from .single_use_card_billing_address import SingleUseCardBillingAddress as SingleUseCardBillingAddress
4952
from .agentcard_checkout_authorization import AgentcardCheckoutAuthorization as AgentcardCheckoutAuthorization
5053
from .fill_vault_item_operation_result import FillVaultItemOperationResult as FillVaultItemOperationResult
5154
from .payment_request_vault_item_state import PaymentRequestVaultItemState as PaymentRequestVaultItemState
@@ -66,6 +69,7 @@
6669
)
6770
from .payment_request_vault_item_spec_param import PaymentRequestVaultItemSpecParam as PaymentRequestVaultItemSpecParam
6871
from .shop_pay_wallet_vault_item_spec_param import ShopPayWalletVaultItemSpecParam as ShopPayWalletVaultItemSpecParam
72+
from .single_use_card_billing_address_param import SingleUseCardBillingAddressParam as SingleUseCardBillingAddressParam
6973
from .credential_vault_item_spec_input_param import (
7074
CredentialVaultItemSpecInputParam as CredentialVaultItemSpecInputParam,
7175
)

‎src/kernel/types/vaults/credential_account_vault_item.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class AvailableOperation(BaseModel):
4545
"1pw_fill",
4646
"1pw_recover",
4747
"1pw_update_access_token",
48+
"update_access_token",
4849
"webmcp_invoke",
4950
"add_payment_method",
5051
"remove_payment_method",

0 commit comments

Comments
 (0)