diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a579a434..97d8dbba 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.99.0" + ".": "0.100.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c0c8bf7..7a14e35a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.100.0](https://github.com/kernel/kernel-python-sdk/compare/v0.99.0...v0.100.0) (2026-09-04) + + +### Features + +* Fix vault provider errors and remove test card mode ([043d252](https://github.com/kernel/kernel-python-sdk/commit/043d2521509d4e44a4b3e43694db3a77bd6fe546)) + ## [0.99.0](https://github.com/kernel/kernel-python-sdk/compare/v0.98.0...v0.99.0) (2026-09-04) diff --git a/pyproject.toml b/pyproject.toml index dc940a7b..84718a85 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "kernel" -version = "0.99.0" +version = "0.100.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 18073be8..2fba39cd 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.99.0" # x-release-please-version +__version__ = "0.100.0" # x-release-please-version diff --git a/src/kernel/resources/vaults/items.py b/src/kernel/resources/vaults/items.py index 17bef3c6..b87d67cb 100644 --- a/src/kernel/resources/vaults/items.py +++ b/src/kernel/resources/vaults/items.py @@ -131,8 +131,7 @@ def update( Update a card specification before or between authorizations Args: - spec: AgentCard reusable card. Each checkout creates an approval-gated authorization - for spec.merchant / spec.amount. The card stays ready after each authorization. + spec: Live payment card. Test-mode card creation is not supported. extra_headers: Send extra headers @@ -296,7 +295,9 @@ def perform_operation( """ Retrieve the item first and invoke only an operation listed in `available_operations`, following its natural-language description. Operations - may call an external provider and can return the item's updated state. + may call an external provider and can return the item's updated state. If the + provider rate limits spend-request creation, returns HTTP 429 with code + `spend_request_rate_limited`; stop and back off before retrying. Args: extra_headers: Send extra headers @@ -375,8 +376,7 @@ def upsert( Create or retrieve an identical vault item by immutable key Args: - spec: AgentCard reusable card. Each checkout creates an approval-gated authorization - for spec.merchant / spec.amount. The card stays ready after each authorization. + spec: Live payment card. Test-mode card creation is not supported. extra_headers: Send extra headers @@ -523,8 +523,7 @@ async def update( Update a card specification before or between authorizations Args: - spec: AgentCard reusable card. Each checkout creates an approval-gated authorization - for spec.merchant / spec.amount. The card stays ready after each authorization. + spec: Live payment card. Test-mode card creation is not supported. extra_headers: Send extra headers @@ -688,7 +687,9 @@ async def perform_operation( """ Retrieve the item first and invoke only an operation listed in `available_operations`, following its natural-language description. Operations - may call an external provider and can return the item's updated state. + may call an external provider and can return the item's updated state. If the + provider rate limits spend-request creation, returns HTTP 429 with code + `spend_request_rate_limited`; stop and back off before retrying. Args: extra_headers: Send extra headers @@ -769,8 +770,7 @@ async def upsert( Create or retrieve an identical vault item by immutable key Args: - spec: AgentCard reusable card. Each checkout creates an approval-gated authorization - for spec.merchant / spec.amount. The card stays ready after each authorization. + spec: Live payment card. Test-mode card creation is not supported. extra_headers: Send extra headers diff --git a/src/kernel/types/vaults/card_vault_item_spec.py b/src/kernel/types/vaults/card_vault_item_spec.py index 65eebebd..d66a5453 100644 --- a/src/kernel/types/vaults/card_vault_item_spec.py +++ b/src/kernel/types/vaults/card_vault_item_spec.py @@ -56,6 +56,8 @@ class LinkCardVaultItemSpecTotal(BaseModel): class LinkCardVaultItemSpec(BaseModel): + """Live payment card. Test-mode card creation is not supported.""" + amount: int """Integer amount in minor currency units.""" @@ -76,12 +78,6 @@ class LinkCardVaultItemSpec(BaseModel): provider: Literal["link"] - test: bool - """ - Whether Link should return test credentials instead of a live payment - credential. - """ - wallet: str """Wallet item key used to mint this card.""" @@ -95,9 +91,9 @@ class LinkCardVaultItemSpec(BaseModel): class AgentCardCardVaultItemSpec(BaseModel): - """AgentCard reusable card. + """AgentCard reusable live payment card. - Each checkout creates an approval-gated authorization for spec.merchant / spec.amount. The card stays ready after each authorization. + Test-mode card creation is not supported. Each checkout creates an approval-gated authorization for spec.merchant / spec.amount. The card stays ready after each authorization. """ amount: int diff --git a/src/kernel/types/vaults/card_vault_item_spec_param.py b/src/kernel/types/vaults/card_vault_item_spec_param.py index 22b81433..3cced6ea 100644 --- a/src/kernel/types/vaults/card_vault_item_spec_param.py +++ b/src/kernel/types/vaults/card_vault_item_spec_param.py @@ -55,6 +55,8 @@ class LinkCardVaultItemSpecTotal(TypedDict, total=False): class LinkCardVaultItemSpec(TypedDict, total=False): + """Live payment card. Test-mode card creation is not supported.""" + amount: Required[int] """Integer amount in minor currency units.""" @@ -75,12 +77,6 @@ class LinkCardVaultItemSpec(TypedDict, total=False): provider: Required[Literal["link"]] - test: Required[bool] - """ - Whether Link should return test credentials instead of a live payment - credential. - """ - wallet: Required[str] """Wallet item key used to mint this card.""" @@ -94,9 +90,9 @@ class LinkCardVaultItemSpec(TypedDict, total=False): class AgentCardCardVaultItemSpec(TypedDict, total=False): - """AgentCard reusable card. + """AgentCard reusable live payment card. - Each checkout creates an approval-gated authorization for spec.merchant / spec.amount. The card stays ready after each authorization. + Test-mode card creation is not supported. Each checkout creates an approval-gated authorization for spec.merchant / spec.amount. The card stays ready after each authorization. """ amount: Required[int] diff --git a/src/kernel/types/vaults/item_update_params.py b/src/kernel/types/vaults/item_update_params.py index 38604305..1ea45428 100644 --- a/src/kernel/types/vaults/item_update_params.py +++ b/src/kernel/types/vaults/item_update_params.py @@ -13,8 +13,4 @@ class ItemUpdateParams(TypedDict, total=False): id_or_name: Required[str] spec: Required[CardVaultItemSpecParam] - """AgentCard reusable card. - - Each checkout creates an approval-gated authorization for spec.merchant / - spec.amount. The card stays ready after each authorization. - """ + """Live payment card. Test-mode card creation is not supported.""" diff --git a/src/kernel/types/vaults/item_upsert_params.py b/src/kernel/types/vaults/item_upsert_params.py index 5f1a4b0e..c3fe00e8 100644 --- a/src/kernel/types/vaults/item_upsert_params.py +++ b/src/kernel/types/vaults/item_upsert_params.py @@ -29,11 +29,7 @@ class CardVaultItemRequest(TypedDict, total=False): id_or_name: Required[str] spec: Required[CardVaultItemSpecParam] - """AgentCard reusable card. - - Each checkout creates an approval-gated authorization for spec.merchant / - spec.amount. The card stays ready after each authorization. - """ + """Live payment card. Test-mode card creation is not supported.""" type: Required[Literal["card"]] diff --git a/src/kernel/types/vaults/vault_item.py b/src/kernel/types/vaults/vault_item.py index 8418f0bc..7f4c9b81 100644 --- a/src/kernel/types/vaults/vault_item.py +++ b/src/kernel/types/vaults/vault_item.py @@ -120,11 +120,7 @@ class CardVaultItem(BaseModel): """Immutable item key assigned when the item is created.""" spec: CardVaultItemSpec - """AgentCard reusable card. - - Each checkout creates an approval-gated authorization for spec.merchant / - spec.amount. The card stays ready after each authorization. - """ + """Live payment card. Test-mode card creation is not supported.""" state: CardVaultItemState diff --git a/tests/api_resources/vaults/test_items.py b/tests/api_resources/vaults/test_items.py index 9d0f9ec6..51759529 100644 --- a/tests/api_resources/vaults/test_items.py +++ b/tests/api_resources/vaults/test_items.py @@ -98,7 +98,6 @@ def test_method_update(self, client: Kernel) -> None: "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", }, ) @@ -118,7 +117,6 @@ def test_method_update_with_all_params(self, client: Kernel) -> None: "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", "expires_at": 0, "line_items": [ @@ -166,7 +164,6 @@ def test_raw_response_update(self, client: Kernel) -> None: "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", }, ) @@ -190,7 +187,6 @@ def test_streaming_response_update(self, client: Kernel) -> None: "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", }, ) as response: @@ -217,7 +213,6 @@ def test_path_params_update(self, client: Kernel) -> None: "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", }, ) @@ -234,7 +229,6 @@ def test_path_params_update(self, client: Kernel) -> None: "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", }, ) @@ -576,7 +570,6 @@ def test_method_upsert_overload_2(self, client: Kernel) -> None: "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", }, type="card", @@ -597,7 +590,6 @@ def test_method_upsert_with_all_params_overload_2(self, client: Kernel) -> None: "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", "expires_at": 0, "line_items": [ @@ -646,7 +638,6 @@ def test_raw_response_upsert_overload_2(self, client: Kernel) -> None: "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", }, type="card", @@ -671,7 +662,6 @@ def test_streaming_response_upsert_overload_2(self, client: Kernel) -> None: "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", }, type="card", @@ -699,7 +689,6 @@ def test_path_params_upsert_overload_2(self, client: Kernel) -> None: "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", }, type="card", @@ -717,7 +706,6 @@ def test_path_params_upsert_overload_2(self, client: Kernel) -> None: "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", }, type="card", @@ -806,7 +794,6 @@ async def test_method_update(self, async_client: AsyncKernel) -> None: "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", }, ) @@ -826,7 +813,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncKernel) -> "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", "expires_at": 0, "line_items": [ @@ -874,7 +860,6 @@ async def test_raw_response_update(self, async_client: AsyncKernel) -> None: "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", }, ) @@ -898,7 +883,6 @@ async def test_streaming_response_update(self, async_client: AsyncKernel) -> Non "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", }, ) as response: @@ -925,7 +909,6 @@ async def test_path_params_update(self, async_client: AsyncKernel) -> None: "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", }, ) @@ -942,7 +925,6 @@ async def test_path_params_update(self, async_client: AsyncKernel) -> None: "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", }, ) @@ -1284,7 +1266,6 @@ async def test_method_upsert_overload_2(self, async_client: AsyncKernel) -> None "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", }, type="card", @@ -1305,7 +1286,6 @@ async def test_method_upsert_with_all_params_overload_2(self, async_client: Asyn "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", "expires_at": 0, "line_items": [ @@ -1354,7 +1334,6 @@ async def test_raw_response_upsert_overload_2(self, async_client: AsyncKernel) - "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", }, type="card", @@ -1379,7 +1358,6 @@ async def test_streaming_response_upsert_overload_2(self, async_client: AsyncKer "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", }, type="card", @@ -1407,7 +1385,6 @@ async def test_path_params_upsert_overload_2(self, async_client: AsyncKernel) -> "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", }, type="card", @@ -1425,7 +1402,6 @@ async def test_path_params_upsert_overload_2(self, async_client: AsyncKernel) -> "merchant_url": "https://example.com", "payment_method_id": "x", "provider": "link", - "test": True, "wallet": "wallet", }, type="card",