From d1001f3ada17f6951453337d61a66054d46ada91 Mon Sep 17 00:00:00 2001 From: "kernel-internal[bot]" <260533166+kernel-internal[bot]@users.noreply.github.com> Date: Wed, 14 Oct 2026 23:56:48 +0000 Subject: [PATCH 1/9] feat: Add passkey credential fields and PATCH field add/remove Stainless-Generated-From: 1292414748a8411d6756116b4fd1589bf3350d2c --- api.md | 1 + src/resources/vaults/index.ts | 1 + src/resources/vaults/items.ts | 300 +++++++++++++++++++++------------ src/resources/vaults/vaults.ts | 2 + 4 files changed, 198 insertions(+), 106 deletions(-) diff --git a/api.md b/api.md index 0f9b9939..6bf04bb1 100644 --- a/api.md +++ b/api.md @@ -519,6 +519,7 @@ Types: - CredentialAccountVaultItemRequest - CredentialCollectionAction - CredentialVaultFieldDefinition +- CredentialVaultFieldDefinitionInput - CredentialVaultFieldInput - CredentialVaultFieldState - CredentialVaultFieldType diff --git a/src/resources/vaults/index.ts b/src/resources/vaults/index.ts index d5a6e930..b0de68f1 100644 --- a/src/resources/vaults/index.ts +++ b/src/resources/vaults/index.ts @@ -14,6 +14,7 @@ export { type CredentialAccountVaultItemRequest, type CredentialCollectionAction, type CredentialVaultFieldDefinition, + type CredentialVaultFieldDefinitionInput, type CredentialVaultFieldInput, type CredentialVaultFieldState, type CredentialVaultFieldType, diff --git a/src/resources/vaults/items.ts b/src/resources/vaults/items.ts index 05f8c2d7..d69fb355 100644 --- a/src/resources/vaults/items.ts +++ b/src/resources/vaults/items.ts @@ -619,16 +619,16 @@ export namespace CardVaultItemState { /** * Return the credential item with its collection action. Supported for ready and * pending_collection credential items. Always render the same form from every - * form-supported field; totp fields have no form input and are omitted. No - * caller-selected field subsets or form overrides are accepted. Reuse an active - * Kernel-hosted session or renew an expired session atomically. Customer-hosted - * forms use their own backend and ordinary item GET/PATCH. Opening the form does - * not clear values or change readiness or item version. To observe edits on a - * ready item, record its version and poll GET without wait until the version - * changes, then reconcile the returned state. Version changes may also come from - * PATCH; they do not identify a particular form submission. Customer-hosted apps - * use their own submission callback, including for unchanged forms. The wait - * parameter waits for readiness, not edits. + * form-supported field; totp and passkey fields have no form input and are + * omitted. No caller-selected field subsets or form overrides are accepted. Reuse + * an active Kernel-hosted session or renew an expired session atomically. + * Customer-hosted forms use their own backend and ordinary item GET/PATCH. Opening + * the form does not clear values or change readiness or item version. To observe + * edits on a ready item, record its version and poll GET without wait until the + * version changes, then reconcile the returned state. Version changes may also + * come from PATCH; they do not identify a particular form submission. + * Customer-hosted apps use their own submission callback, including for unchanged + * forms. The wait parameter waits for readiness, not edits. */ export interface CollectVaultItemOperationRequest { type: 'collect'; @@ -746,30 +746,31 @@ export interface CredentialAccountVaultItemRequest { /** * One schema-derived form for the item, available in ready or pending_collection - * state. Render every form-supported field as editable; omit totp fields and - * preserve their stored seeds. Prefill non-sensitive values, and allow existing - * sensitive values to be preserved or replaced without ever revealing them. No - * field subsets or per-request form configuration exist. Validate required fields - * against the resulting values, including preserved secrets. Submit changed values - * only, using the version used to render the form. Scoped hosted submission - * rejects totp edits; seed writes require the ordinary authenticated item API. - * Customer forms likewise omit totp from their payloads. Save edits atomically. A - * successful hosted submission increments the version, marks ready, and consumes - * the session; an empty edit may complete collection while preserving values. A - * customer form uses PATCH for changed values and does not send an empty PATCH - * when nothing changed. Kernel-hosted bearer sessions require no Kernel account - * and are bound to the item version. Expired, superseded, consumed, or - * deleted-item sessions cannot submit. Authenticated item GET renews expired - * active sessions for ready or pending items; pending items always receive an - * action. A ready item with no active session omits the action until collect is - * invoked. Concurrent renewals return the same link. Renewal changes neither - * values nor item version. An expired link cannot renew itself. The hosted form - * handles its collection protocol; callers only open the returned URL and do not - * extract or submit its token through the public API. For customer-hosted forms, - * use @onkernel/vault-react and an authenticated customer backend calling the - * ordinary item GET/PATCH API. Kernel does not store customer collection URLs or - * authenticate the customer's end users. Treat URLs and submitted values as - * secrets and exclude them from logs, traces, and errors. + * state. Render every form-supported field as editable; omit totp and passkey + * fields and preserve their stored values. Prefill non-sensitive values, and allow + * existing sensitive values to be preserved or replaced without ever revealing + * them. No field subsets or per-request form configuration exist. Validate + * required fields against the resulting values, including preserved secrets. + * Submit changed values only, using the version used to render the form. Scoped + * hosted submission rejects totp and passkey edits; those writes require the + * ordinary authenticated item API. Customer forms likewise omit them from their + * payloads. Save edits atomically. A successful hosted submission increments the + * version, marks ready, and consumes the session; an empty edit may complete + * collection while preserving values. A customer form uses PATCH for changed + * values and does not send an empty PATCH when nothing changed. Kernel-hosted + * bearer sessions require no Kernel account and are bound to the item version. + * Expired, superseded, consumed, or deleted-item sessions cannot submit. + * Authenticated item GET renews expired active sessions for ready or pending + * items; pending items always receive an action. A ready item with no active + * session omits the action until collect is invoked. Concurrent renewals return + * the same link. Renewal changes neither values nor item version. An expired link + * cannot renew itself. The hosted form handles its collection protocol; callers + * only open the returned URL and do not extract or submit its token through the + * public API. For customer-hosted forms, use @onkernel/vault-react and an + * authenticated customer backend calling the ordinary item GET/PATCH API. Kernel + * does not store customer collection URLs or authenticate the customer's end + * users. Treat URLs and submitted values as secrets and exclude them from logs, + * traces, and errors. */ export interface CredentialCollectionAction { /** @@ -805,14 +806,19 @@ export interface CredentialVaultFieldDefinition { sensitive: boolean; /** - * Text, email, and password have form inputs; totp does not and is omitted from - * both Kernel-hosted and customer React forms. Password and totp must be - * sensitive. A totp value is an RFC 4648 Base32 generator seed (case-insensitive, - * optional trailing padding), not an otpauth URI or current code. Reject invalid - * or empty decoded seeds. Browser fill generates an RFC 6238 code at execution - * time using HMAC-SHA1, 6 digits, and a 30-second period. Preserve leading zeros; - * never fill the seed. Custom algorithms, digits, periods, and form enrollment are - * unsupported. + * Text, email, and password have form inputs; totp and passkey do not and are + * omitted from both Kernel-hosted and customer React forms. Password, totp, and + * passkey must be sensitive. A totp value is an RFC 4648 Base32 generator seed + * (case-insensitive, optional trailing padding), not an otpauth URI or current + * code. Reject invalid or empty decoded seeds. Browser fill generates an RFC 6238 + * code at execution time using HMAC-SHA1, 6 digits, and a 30-second period. + * Preserve leading zeros; never fill the seed. Custom algorithms, digits, periods, + * and form enrollment are unsupported. A passkey value is a JSON-encoded FIDO + * Credential Exchange Format passkey object with unpadded base64url + * `credentialId`, `userHandle` (at most 64 bytes), and `key` (a PKCS#8 ECDSA P-256 + * private key), a lowercase `rpId` domain, and optional `username` and + * `userDisplayName`. Other CXF members are ignored. Passkeys are never filled into + * pages. */ type: CredentialVaultFieldType; @@ -825,6 +831,53 @@ export interface CredentialVaultFieldDefinition { label?: string; } +/** + * A field definition without a value. Field updates add fields with this shape and + * set their values in `fields`. + */ +export interface CredentialVaultFieldDefinitionInput { + /** + * Unique stable field name used to key values, updates, and browser fills. + */ + name: string; + + /** + * Text, email, and password have form inputs; totp and passkey do not and are + * omitted from both Kernel-hosted and customer React forms. Password, totp, and + * passkey must be sensitive. A totp value is an RFC 4648 Base32 generator seed + * (case-insensitive, optional trailing padding), not an otpauth URI or current + * code. Reject invalid or empty decoded seeds. Browser fill generates an RFC 6238 + * code at execution time using HMAC-SHA1, 6 digits, and a 30-second period. + * Preserve leading zeros; never fill the seed. Custom algorithms, digits, periods, + * and form enrollment are unsupported. A passkey value is a JSON-encoded FIDO + * Credential Exchange Format passkey object with unpadded base64url + * `credentialId`, `userHandle` (at most 64 bytes), and `key` (a PKCS#8 ECDSA P-256 + * private key), a lowercase `rpId` domain, and optional `username` and + * `userDisplayName`. Other CXF members are ignored. Passkeys are never filled into + * pages. + */ + type: CredentialVaultFieldType; + + /** + * Optional human-readable display label. It is returned as non-secret metadata and + * never affects value keys, updates, or browser fills. Use single-line, trimmed + * display text without control or formatting characters. The server enforces a + * 128-byte UTF-8 limit. + */ + label?: string; + + required?: boolean; + + /** + * Set false explicitly for ordinary usernames, email addresses, and other + * non-secret identifiers. Reserve true for secrets such as passwords, API tokens, + * and TOTP seeds. Password, totp, and passkey fields must be true. Omission + * defaults to true for safety; do not rely on that default for every field. False + * permits API reads and form prefilling. + */ + sensitive?: boolean; +} + export interface CredentialVaultFieldInput { /** * Unique stable field name used to key values, updates, and browser fills. @@ -832,14 +885,19 @@ export interface CredentialVaultFieldInput { name: string; /** - * Text, email, and password have form inputs; totp does not and is omitted from - * both Kernel-hosted and customer React forms. Password and totp must be - * sensitive. A totp value is an RFC 4648 Base32 generator seed (case-insensitive, - * optional trailing padding), not an otpauth URI or current code. Reject invalid - * or empty decoded seeds. Browser fill generates an RFC 6238 code at execution - * time using HMAC-SHA1, 6 digits, and a 30-second period. Preserve leading zeros; - * never fill the seed. Custom algorithms, digits, periods, and form enrollment are - * unsupported. + * Text, email, and password have form inputs; totp and passkey do not and are + * omitted from both Kernel-hosted and customer React forms. Password, totp, and + * passkey must be sensitive. A totp value is an RFC 4648 Base32 generator seed + * (case-insensitive, optional trailing padding), not an otpauth URI or current + * code. Reject invalid or empty decoded seeds. Browser fill generates an RFC 6238 + * code at execution time using HMAC-SHA1, 6 digits, and a 30-second period. + * Preserve leading zeros; never fill the seed. Custom algorithms, digits, periods, + * and form enrollment are unsupported. A passkey value is a JSON-encoded FIDO + * Credential Exchange Format passkey object with unpadded base64url + * `credentialId`, `userHandle` (at most 64 bytes), and `key` (a PKCS#8 ECDSA P-256 + * private key), a lowercase `rpId` domain, and optional `username` and + * `userDisplayName`. Other CXF members are ignored. Passkeys are never filled into + * pages. */ type: CredentialVaultFieldType; @@ -872,9 +930,9 @@ export interface CredentialVaultFieldInput { /** * Set false explicitly for ordinary usernames, email addresses, and other * non-secret identifiers. Reserve true for secrets such as passwords, API tokens, - * and TOTP seeds. Password and totp fields must be true. Omission defaults to true - * for safety; do not rely on that default for every field. False permits API reads - * and form prefilling. + * and TOTP seeds. Password, totp, and passkey fields must be true. Omission + * defaults to true for safety; do not rely on that default for every field. False + * permits API reads and form prefilling. */ sensitive?: boolean; @@ -900,16 +958,21 @@ export interface CredentialVaultFieldState { } /** - * Text, email, and password have form inputs; totp does not and is omitted from - * both Kernel-hosted and customer React forms. Password and totp must be - * sensitive. A totp value is an RFC 4648 Base32 generator seed (case-insensitive, - * optional trailing padding), not an otpauth URI or current code. Reject invalid - * or empty decoded seeds. Browser fill generates an RFC 6238 code at execution - * time using HMAC-SHA1, 6 digits, and a 30-second period. Preserve leading zeros; - * never fill the seed. Custom algorithms, digits, periods, and form enrollment are - * unsupported. + * Text, email, and password have form inputs; totp and passkey do not and are + * omitted from both Kernel-hosted and customer React forms. Password, totp, and + * passkey must be sensitive. A totp value is an RFC 4648 Base32 generator seed + * (case-insensitive, optional trailing padding), not an otpauth URI or current + * code. Reject invalid or empty decoded seeds. Browser fill generates an RFC 6238 + * code at execution time using HMAC-SHA1, 6 digits, and a 30-second period. + * Preserve leading zeros; never fill the seed. Custom algorithms, digits, periods, + * and form enrollment are unsupported. A passkey value is a JSON-encoded FIDO + * Credential Exchange Format passkey object with unpadded base64url + * `credentialId`, `userHandle` (at most 64 bytes), and `key` (a PKCS#8 ECDSA P-256 + * private key), a lowercase `rpId` domain, and optional `username` and + * `userDisplayName`. Other CXF members are ignored. Passkeys are never filled into + * pages. */ -export type CredentialVaultFieldType = 'text' | 'email' | 'password' | 'totp'; +export type CredentialVaultFieldType = 'text' | 'email' | 'password' | 'totp' | 'passkey'; /** * Set exactly one of value or encrypted_value. Use value unless the update comes @@ -938,8 +1001,9 @@ export interface CredentialVaultFieldUpdate { * immediately clear the stored value. Clearing a required form-supported field * reopens collection; clearing an optional field does not prevent readiness. * Values must satisfy the declared field type. For totp, value is the generator - * seed, never a current code. Clearing a required totp field returns 400 because - * it cannot be collected in a form. + * seed, never a current code. For passkey, value is the JSON-encoded CXF passkey + * object. Clearing a required totp or passkey field returns 400 because it cannot + * be collected in a form. */ value?: string | null; } @@ -986,30 +1050,31 @@ export interface CredentialVaultItem { /** * One schema-derived form for the item, available in ready or pending_collection - * state. Render every form-supported field as editable; omit totp fields and - * preserve their stored seeds. Prefill non-sensitive values, and allow existing - * sensitive values to be preserved or replaced without ever revealing them. No - * field subsets or per-request form configuration exist. Validate required fields - * against the resulting values, including preserved secrets. Submit changed values - * only, using the version used to render the form. Scoped hosted submission - * rejects totp edits; seed writes require the ordinary authenticated item API. - * Customer forms likewise omit totp from their payloads. Save edits atomically. A - * successful hosted submission increments the version, marks ready, and consumes - * the session; an empty edit may complete collection while preserving values. A - * customer form uses PATCH for changed values and does not send an empty PATCH - * when nothing changed. Kernel-hosted bearer sessions require no Kernel account - * and are bound to the item version. Expired, superseded, consumed, or - * deleted-item sessions cannot submit. Authenticated item GET renews expired - * active sessions for ready or pending items; pending items always receive an - * action. A ready item with no active session omits the action until collect is - * invoked. Concurrent renewals return the same link. Renewal changes neither - * values nor item version. An expired link cannot renew itself. The hosted form - * handles its collection protocol; callers only open the returned URL and do not - * extract or submit its token through the public API. For customer-hosted forms, - * use @onkernel/vault-react and an authenticated customer backend calling the - * ordinary item GET/PATCH API. Kernel does not store customer collection URLs or - * authenticate the customer's end users. Treat URLs and submitted values as - * secrets and exclude them from logs, traces, and errors. + * state. Render every form-supported field as editable; omit totp and passkey + * fields and preserve their stored values. Prefill non-sensitive values, and allow + * existing sensitive values to be preserved or replaced without ever revealing + * them. No field subsets or per-request form configuration exist. Validate + * required fields against the resulting values, including preserved secrets. + * Submit changed values only, using the version used to render the form. Scoped + * hosted submission rejects totp and passkey edits; those writes require the + * ordinary authenticated item API. Customer forms likewise omit them from their + * payloads. Save edits atomically. A successful hosted submission increments the + * version, marks ready, and consumes the session; an empty edit may complete + * collection while preserving values. A customer form uses PATCH for changed + * values and does not send an empty PATCH when nothing changed. Kernel-hosted + * bearer sessions require no Kernel account and are bound to the item version. + * Expired, superseded, consumed, or deleted-item sessions cannot submit. + * Authenticated item GET renews expired active sessions for ready or pending + * items; pending items always receive an action. A ready item with no active + * session omits the action until collect is invoked. Concurrent renewals return + * the same link. Renewal changes neither values nor item version. An expired link + * cannot renew itself. The hosted form handles its collection protocol; callers + * only open the returned URL and do not extract or submit its token through the + * public API. For customer-hosted forms, use @onkernel/vault-react and an + * authenticated customer backend calling the ordinary item GET/PATCH API. Kernel + * does not store customer collection URLs or authenticate the customer's end + * users. Treat URLs and submitted values as secrets and exclude them from logs, + * traces, and errors. */ action?: CredentialCollectionAction | CredentialVaultItem.OnePasswordAccessApprovalAction; } @@ -1115,6 +1180,14 @@ export type CredentialVaultItemSpecInput = | ManagedAuthCredentialVaultItemSpecInput; export interface CredentialVaultItemSpecUpdate { + /** + * Field definitions to append, with the same defaults as creation. Set their + * values in `fields` in the same update. Names must be unique after removals; at + * most 32 fields may result. A required totp or passkey field needs a value in + * `fields`. + */ + add_fields?: Array; + /** * Recognizable site or service name used as the form title, without suffixes such * as sign-in credentials. An empty string clears it. Display text only, not an @@ -1123,6 +1196,12 @@ export interface CredentialVaultItemSpecUpdate { description?: string; fields?: { [key: string]: CredentialVaultFieldUpdate }; + + /** + * Names of fields to delete with their values. Unknown names return 400. At least + * one field must remain. + */ + remove_fields?: Array; } export type CredentialVaultItemState = @@ -1131,15 +1210,18 @@ export type CredentialVaultItemState = | ManagedAuthCredentialVaultItemState; /** - * Atomically update description and selected values. Omitted properties are - * preserved. Field names, types, required flags, and sensitivity cannot change. - * Unknown field names return 400; stale versions or mismatched item types return - * 409 without changing the item. A successful update increments version and - * invalidates outstanding Kernel-hosted collection sessions. If required values - * remain missing, return pending_collection and a fresh collection action. - * Otherwise return ready without an action; collect can open the form again - * without clearing values. Customer URLs have no Kernel-managed expiry. 1Password - * and managed auth credentials return 409. + * Atomically update description, field definitions, and selected values. Omitted + * properties are preserved. `remove_fields` deletes definitions and their values, + * then `add_fields` appends definitions, then `fields` sets values, including for + * added fields. An existing field's definition cannot be edited in place; to + * change it, remove the field and add it again, in the same update or a later one. + * The old value is deleted with it. Unknown field names return 400; stale versions + * or mismatched item types return 409 without changing the item. A successful + * update increments version and invalidates outstanding Kernel-hosted collection + * sessions. If required values remain missing, return pending_collection and a + * fresh collection action. Otherwise return ready without an action; collect can + * open the form again without clearing values. Customer URLs have no + * Kernel-managed expiry. 1Password and managed auth credentials return 409. */ export interface CredentialVaultItemUpdateRequest { spec: CredentialVaultItemSpecUpdate; @@ -1438,14 +1520,19 @@ export interface KernelWalletVaultItemSpec { export interface ManagedAuthCredentialVaultField { /** - * Text, email, and password have form inputs; totp does not and is omitted from - * both Kernel-hosted and customer React forms. Password and totp must be - * sensitive. A totp value is an RFC 4648 Base32 generator seed (case-insensitive, - * optional trailing padding), not an otpauth URI or current code. Reject invalid - * or empty decoded seeds. Browser fill generates an RFC 6238 code at execution - * time using HMAC-SHA1, 6 digits, and a 30-second period. Preserve leading zeros; - * never fill the seed. Custom algorithms, digits, periods, and form enrollment are - * unsupported. + * Text, email, and password have form inputs; totp and passkey do not and are + * omitted from both Kernel-hosted and customer React forms. Password, totp, and + * passkey must be sensitive. A totp value is an RFC 4648 Base32 generator seed + * (case-insensitive, optional trailing padding), not an otpauth URI or current + * code. Reject invalid or empty decoded seeds. Browser fill generates an RFC 6238 + * code at execution time using HMAC-SHA1, 6 digits, and a 30-second period. + * Preserve leading zeros; never fill the seed. Custom algorithms, digits, periods, + * and form enrollment are unsupported. A passkey value is a JSON-encoded FIDO + * Credential Exchange Format passkey object with unpadded base64url + * `credentialId`, `userHandle` (at most 64 bytes), and `key` (a PKCS#8 ECDSA P-256 + * private key), a lowercase `rpId` domain, and optional `username` and + * `userDisplayName`. Other CXF members are ignored. Passkeys are never filled into + * pages. */ type: CredentialVaultFieldType; } @@ -2547,7 +2634,7 @@ export namespace VaultPaymentMethod { export interface VaultWebmcpBinding { /** * A declared, populated credential field or supported card field. A TOTP field - * supplies a fresh code, never its seed. + * supplies a fresh code, never its seed. Passkey fields cannot be filled. */ field: string; @@ -3452,6 +3539,7 @@ export declare namespace Items { type CredentialAccountVaultItemRequest as CredentialAccountVaultItemRequest, type CredentialCollectionAction as CredentialCollectionAction, type CredentialVaultFieldDefinition as CredentialVaultFieldDefinition, + type CredentialVaultFieldDefinitionInput as CredentialVaultFieldDefinitionInput, type CredentialVaultFieldInput as CredentialVaultFieldInput, type CredentialVaultFieldState as CredentialVaultFieldState, type CredentialVaultFieldType as CredentialVaultFieldType, diff --git a/src/resources/vaults/vaults.ts b/src/resources/vaults/vaults.ts index d3ca0ca2..a2cc8814 100644 --- a/src/resources/vaults/vaults.ts +++ b/src/resources/vaults/vaults.ts @@ -15,6 +15,7 @@ import { CredentialAccountVaultItemRequest, CredentialCollectionAction, CredentialVaultFieldDefinition, + CredentialVaultFieldDefinitionInput, CredentialVaultFieldInput, CredentialVaultFieldState, CredentialVaultFieldType, @@ -277,6 +278,7 @@ export declare namespace Vaults { type CredentialAccountVaultItemRequest as CredentialAccountVaultItemRequest, type CredentialCollectionAction as CredentialCollectionAction, type CredentialVaultFieldDefinition as CredentialVaultFieldDefinition, + type CredentialVaultFieldDefinitionInput as CredentialVaultFieldDefinitionInput, type CredentialVaultFieldInput as CredentialVaultFieldInput, type CredentialVaultFieldState as CredentialVaultFieldState, type CredentialVaultFieldType as CredentialVaultFieldType, From 03d2609d2f0694f9a50988d476b5eb1ff0efeb0b Mon Sep 17 00:00:00 2001 From: "kernel-internal[bot]" <260533166+kernel-internal[bot]@users.noreply.github.com> Date: Thu, 15 Oct 2026 00:26:20 +0000 Subject: [PATCH 2/9] feat: Deliver Kernel card details through fill Stainless-Generated-From: 3b69ee24af3d16ac39b0d28febbf3a6a07f8c4d6 --- src/resources/vaults/items.ts | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/src/resources/vaults/items.ts b/src/resources/vaults/items.ts index d69fb355..f9abd8db 100644 --- a/src/resources/vaults/items.ts +++ b/src/resources/vaults/items.ts @@ -145,6 +145,9 @@ export class Items extends APIResource { * return HTTP 429 and retain the card item; stop, back off, and retry the same * authorize operation. * + * Ready Kernel cards advertise fill. Fill delivers card details for a few minutes; + * submit checkout promptly after filling. A repeated fill is safe. + * * Fill returns a value-free execution result. Validation failures before writing * return 400 (invalid request or targets), 403 (access or destination denied), 404 * (resource not found), or 409 (item or browser not ready). Once writing starts, @@ -1314,13 +1317,13 @@ export interface FillVaultItemOperationResult { } /** - * A ready Kernel card retains its encrypted network token and one-time code for - * the fill operation until the item's expires_at. Fill and submit checkout before - * then. Visa purchases require a spend_approval action before the code is issued; - * Mastercard purchases need no hosted approval. masks.last4 is the enrolled card's - * last four digits; masks.token_last4 is the network token's last four digits - * shown to the merchant. Kernel cards do not expose aliases or support egress - * substitution. Kernel does not observe whether the merchant charged the card. + * A ready Kernel card supports authorize, fill, then submit checkout. Card details + * are delivered for a few minutes after fill; submit promptly. Repeated fill is + * safe and never submits checkout. Visa purchases require a spend_approval action + * before details are issued; Mastercard purchases need no hosted approval. + * masks.last4 is the enrolled card's last four digits; masks.token_last4, when + * present, is the token's last four digits shown to the merchant. Kernel does not + * observe whether the merchant charged the card. */ export interface KernelCardState { provider: 'kernel'; @@ -1382,8 +1385,13 @@ export namespace KernelCardState { * Mastercard purchases need no cardholder approval. A Visa purchase returns a * spend_approval action: the cardholder approves it with a Visa passkey, and * Kernel registers a Visa intent for one transaction up to the amount before - * issuing the code. Card updates are not supported; delete and create a new item - * instead. + * issuing the code. For supported cards whose network cannot be enrolled for + * agentic tokens, authorize prepares checkout details without issuing a one-time + * code. The card can be filled into one checkout before its expires_at, one hour + * after authorization. Fill types those details on merchant_url's origin. The + * amount, merchant_url and merchant_country are recorded but do not restrict + * payment requests sent by the browser. Card updates are not supported; delete and + * create a new item instead. */ export interface KernelCardVaultItemSpec { /** @@ -1510,9 +1518,10 @@ export interface KernelWalletState { * number never reaches Kernel. The connected wallet's payment_methods expansion * lists the card; capabilities.single_use_card.eligible is false, with a * network_token*\* reason, until the card has a network token, and authorize - * returns 400 for such a card. Visa purchases require the cardholder to complete a - * spend_approval action before Kernel issues a one-time code; Mastercard purchases - * need no hosted approval. + * returns 400 for such a card unless Kernel supports checkout delivery without a + * network token for that card. In that case, fill types the checkout details. Visa + * purchases require the cardholder to complete a spend_approval action before + * Kernel issues a one-time code; Mastercard purchases need no hosted approval. */ export interface KernelWalletVaultItemSpec { provider: 'kernel'; From 8dea4a0085460718baf7cc210b74875138065407 Mon Sep 17 00:00:00 2001 From: "kernel-internal[bot]" <260533166+kernel-internal[bot]@users.noreply.github.com> Date: Thu, 15 Oct 2026 17:54:31 +0000 Subject: [PATCH 3/9] feat: Remove Link expires_at, return 400 for missing credential values, and log fill failures Stainless-Generated-From: 2f50aaa6b1b29c7ecefee020eee9a270922b2a9c --- src/resources/vaults/items.ts | 2 -- tests/api-resources/vaults/items.test.ts | 1 - 2 files changed, 3 deletions(-) diff --git a/src/resources/vaults/items.ts b/src/resources/vaults/items.ts index f9abd8db..eeb7b38b 100644 --- a/src/resources/vaults/items.ts +++ b/src/resources/vaults/items.ts @@ -395,8 +395,6 @@ export namespace CardVaultItemSpec { */ wallet: string; - expires_at?: number; - line_items?: Array; metadata?: { [key: string]: string }; diff --git a/tests/api-resources/vaults/items.test.ts b/tests/api-resources/vaults/items.test.ts index ce9fc03a..8f128c86 100644 --- a/tests/api-resources/vaults/items.test.ts +++ b/tests/api-resources/vaults/items.test.ts @@ -68,7 +68,6 @@ describe('resource items', () => { payment_method_id: 'x', provider: 'link', wallet: 'wallet', - expires_at: 0, line_items: [ { name: 'name', From 1f992aaadfef30a8d8ddc2abd7105b855866d051 Mon Sep 17 00:00:00 2001 From: "kernel-internal[bot]" <260533166+kernel-internal[bot]@users.noreply.github.com> Date: Thu, 15 Oct 2026 20:17:25 +0000 Subject: [PATCH 4/9] feat: Raise Kernel card amount cap to $10,000 Stainless-Generated-From: 2418236f8c469b3da19163f0fbe5bbf943f0c07a --- src/resources/vaults/items.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resources/vaults/items.ts b/src/resources/vaults/items.ts index eeb7b38b..9fa16fac 100644 --- a/src/resources/vaults/items.ts +++ b/src/resources/vaults/items.ts @@ -1393,7 +1393,7 @@ export namespace KernelCardState { */ export interface KernelCardVaultItemSpec { /** - * Integer amount in minor currency units (at most 50000), bound to the one-time + * Integer amount in minor currency units (at most 1000000), bound to the one-time * code. */ amount: number; From 50d68f4a37942f828a5ed2e1484d9f4e3f0604ec Mon Sep 17 00:00:00 2001 From: "kernel-internal[bot]" <260533166+kernel-internal[bot]@users.noreply.github.com> Date: Thu, 15 Oct 2026 22:08:35 +0000 Subject: [PATCH 5/9] feat: Add atomic preconditions to pool network updates Stainless-Generated-From: 8b7fe4dd6078b8e717269e1f8ae791b9ebd08c5a --- src/resources/browser-pools.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/resources/browser-pools.ts b/src/resources/browser-pools.ts index 5b4c1bac..fc6d0c82 100644 --- a/src/resources/browser-pools.ts +++ b/src/resources/browser-pools.ts @@ -827,6 +827,16 @@ export interface BrowserPoolUpdateParams { */ discard_all_idle?: boolean; + /** + * Optional optimistic concurrency precondition. Send the network configuration + * from the last pool response, or {} when it has no network configuration. The + * entire update is rejected with 409 stale_network if the saved network differs, + * checked atomically with the write. Omit for unconditional updates. Explicit + * empty lists differ from omitted lists; route targets must match the saved + * references (resolved IDs, not equivalent proxy names). + */ + expected_network?: BrowsersAPI.BrowserNetworkConfig; + /** * If provided, replaces the extension list. Empty array clears all * previously-selected extensions. Omit this field to leave extensions unchanged. From 060038b80d7bdc0a3feb63c5bb8a9dc9624b6308 Mon Sep 17 00:00:00 2001 From: "kernel-internal[bot]" <260533166+kernel-internal[bot]@users.noreply.github.com> Date: Thu, 15 Oct 2026 22:52:37 +0000 Subject: [PATCH 6/9] feat: Allow replacing vault cards whose provider outcome is unknown Stainless-Generated-From: b5c6981f7b9338e1e1c8534463e179b56b546aa8 --- src/resources/vaults/items.ts | 40 +++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/src/resources/vaults/items.ts b/src/resources/vaults/items.ts index 9fa16fac..13627f2c 100644 --- a/src/resources/vaults/items.ts +++ b/src/resources/vaults/items.ts @@ -42,10 +42,10 @@ export class Items extends APIResource { * request, subject to atomic provider approval checks; omitted optional fields * remain unchanged and explicit empty lists clear them. Wallet/provider binding * and unsupported fields cannot change after authorization starts. An uncertain - * update enters recovery_required and must not be retried. Checkout cards may be - * edited between authorizations. A Link card authorized with browser_id and - * page_url cannot be changed; delete it and create a new card with the updated - * details. + * update enters recovery_required; delete the card and create a new one rather + * than retrying the update. Checkout cards may be edited between authorizations. A + * Link card authorized with browser_id and page_url cannot be changed; delete it + * and create a new card with the updated details. * * @example * ```ts @@ -91,11 +91,12 @@ export class Items extends APIResource { * Unresolved payment operations normally block deletion, including operations on * child cards of a wallet. Deleting a connected Kernel wallet first blocks new * payments on it, then removes its enrolled card. If that fails, the wallet is - * kept and keeps refusing payments; retry the deletion. An AgentCard card in - * recovery_required whose checkout create response returned no authorization ID - * may be explicitly abandoned by deleting that card directly; deleting its wallet - * or vault remains blocked. Deleting or recreating an item is not proof that a - * payment did not occur. Deleting a managed auth credential item leaves the + * kept and keeps refusing payments; retry the deletion. A Link or Kernel card in + * recovery_required for issuance, or an AgentCard card in recovery_required whose + * checkout create response returned no authorization ID, may be explicitly + * abandoned by deleting that card directly; deleting its wallet or vault remains + * blocked until the card is deleted. Deleting or recreating an item is not proof + * that a payment did not occur. Deleting a managed auth credential item leaves the * connection and its saved credential unchanged. * * @example @@ -516,11 +517,12 @@ export namespace CardVaultItemState { provider: 'link'; /** - * recovery_required means an original provider operation has an unresolved - * outcome. Do not retry, delete, or replace it. Known references may be observed - * safely, but unknown creation without an ID and uncertain card-material retrieval - * require manual reconciliation with the provider or support. There is no reset or - * caller-asserted reconciliation operation. + * recovery_required means an original provider operation has an unresolved outcome + * and the card cannot be used. Reads keep observing a known provider request and + * may clear the recovery. To continue, delete this card and create a new one; + * deleting cancels the original request when its ID is known and keeps the + * recovery evidence. The user may see an approval request for the original card + * and should approve only the new one. */ status: | 'requested' @@ -1335,10 +1337,12 @@ export interface KernelCardState { * fresh local verification link; this does not approve spending or replay any * provider request. Unclassified legacy recovery and uncertain intent creation * cannot restart. Kernel never approves again or issues another code for the item - * automatically, and the item cannot be deleted or replaced until the original - * attempt is reconciled with support. When status_reason says the provider refused - * retrieval before acceptance, no code was issued and a later read retries. - * declined means the card network refused to issue a code. + * automatically. To continue, delete this card and create a new purchase; the + * cardholder approves the new purchase separately. Recovery while reporting a + * merchant transaction cannot be deleted and must be reconciled with support. When + * status_reason says the provider refused retrieval before acceptance, no code was + * issued and a later read retries. declined means the card network refused to + * issue a code. */ status: | 'requested' From 0974d4f31fa6104d5a7be2cfbb9b0fcdd1766559 Mon Sep 17 00:00:00 2001 From: "kernel-internal[bot]" <260533166+kernel-internal[bot]@users.noreply.github.com> Date: Thu, 15 Oct 2026 23:21:42 +0000 Subject: [PATCH 7/9] feat: Classify text captchas as token tasks and Binance as a provider Stainless-Generated-From: 1be2d4af5cb4b835a3cc292dfad904f1525ed130 --- src/resources/browsers/telemetry.ts | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/resources/browsers/telemetry.ts b/src/resources/browsers/telemetry.ts index e1e2dac3..a559c23d 100644 --- a/src/resources/browsers/telemetry.ts +++ b/src/resources/browsers/telemetry.ts @@ -282,7 +282,7 @@ export namespace BrowserCaptchaChallengeResultEvent { * Enterprise reCAPTCHA variants are grouped into their version bucket * (recaptcha_v2 or recaptcha_v3), FunCaptcha uses arkose, press-and-hold * challenges served by HUMAN (formerly PerimeterX) use human, and unlisted - * products use other. + * products, including text captchas a site draws itself, use other. */ captcha_provider?: | 'hcaptcha' @@ -292,6 +292,7 @@ export namespace BrowserCaptchaChallengeResultEvent { | 'geetest' | 'arkose' | 'human' + | 'binance' | 'other'; /** @@ -388,7 +389,7 @@ export namespace BrowserCaptchaSolveResultEvent { * Enterprise reCAPTCHA variants are grouped into their version bucket * (recaptcha_v2 or recaptcha_v3), FunCaptcha uses arkose, press-and-hold * challenges served by HUMAN (formerly PerimeterX) use human, and unlisted - * products use other. + * products, including text captchas a site draws itself, use other. */ captcha_provider?: | 'hcaptcha' @@ -398,6 +399,7 @@ export namespace BrowserCaptchaSolveResultEvent { | 'geetest' | 'arkose' | 'human' + | 'binance' | 'other'; /** @@ -414,6 +416,11 @@ export namespace BrowserCaptchaSolveResultEvent { */ error_code?: string; + /** + * Captured hCaptcha recognition media, when known. + */ + media?: 'image' | 'video'; + /** * Opaque identifier shared with the matching captcha_solve_started. */ @@ -493,7 +500,7 @@ export namespace BrowserCaptchaSolveStartedEvent { * Enterprise reCAPTCHA variants are grouped into their version bucket * (recaptcha_v2 or recaptcha_v3), FunCaptcha uses arkose, press-and-hold * challenges served by HUMAN (formerly PerimeterX) use human, and unlisted - * products use other. + * products, including text captchas a site draws itself, use other. */ captcha_provider?: | 'hcaptcha' @@ -503,6 +510,7 @@ export namespace BrowserCaptchaSolveStartedEvent { | 'geetest' | 'arkose' | 'human' + | 'binance' | 'other'; /** @@ -513,6 +521,11 @@ export namespace BrowserCaptchaSolveStartedEvent { */ challenge_id?: string; + /** + * Captured hCaptcha recognition media, when known. + */ + media?: 'image' | 'video'; + /** * Opaque identifier shared with the matching captcha_solve_result. */ From 2b47c615b08d72fb5ea27120cbc6509d22d9931f Mon Sep 17 00:00:00 2001 From: "kernel-internal[bot]" <260533166+kernel-internal[bot]@users.noreply.github.com> Date: Fri, 16 Oct 2026 17:57:12 +0000 Subject: [PATCH 8/9] feat: chore(stlc): seal custom-code tracking files Stainless-Generated-From: 544e1bdd12e104656aae2f8672bee5922d0a228c --- src/resources/browser-pools.ts | 11 ++++++----- src/resources/browsers/browsers.ts | 10 ++++++---- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/resources/browser-pools.ts b/src/resources/browser-pools.ts index fc6d0c82..dfa0283c 100644 --- a/src/resources/browser-pools.ts +++ b/src/resources/browser-pools.ts @@ -580,7 +580,8 @@ export interface BrowserPoolCreateParams { kiosk_mode?: boolean; /** - * Memory requested for headful browsers in this pool. + * Memory for browsers in this pool. Headless: 1GiB (default), 2GiB, or 4GiB. + * Headful: 8GiB (default) or 16GiB. */ memory?: BrowsersAPI.BrowserMemoryRequest; @@ -861,11 +862,11 @@ export interface BrowserPoolUpdateParams { kiosk_mode?: boolean; /** - * Memory requested for newly-warmed headful browsers in this pool. Existing - * browsers retain their original allocation. Use discard_all_idle to replace idle - * browsers. + * Memory requested for newly-warmed browsers in this pool: 1GiB, 2GiB, or 4GiB for + * headless, 8GiB or 16GiB for headful. Existing browsers retain their original + * allocation. Use discard_all_idle to replace idle browsers. */ - memory?: '8GiB' | '16GiB'; + memory?: '1GiB' | '2GiB' | '4GiB' | '8GiB' | '16GiB'; /** * If provided, replaces the pool name. Empty string is a no-op; the pool name diff --git a/src/resources/browsers/browsers.ts b/src/resources/browsers/browsers.ts index f3c40ec6..cdcee533 100644 --- a/src/resources/browsers/browsers.ts +++ b/src/resources/browsers/browsers.ts @@ -349,12 +349,13 @@ export type ProfilesOffsetPagination = OffsetPagination; /** * Memory allocated to the browser session. */ -export type BrowserMemory = '1GiB' | '2GiB' | '6GiB' | '8GiB' | '12GiB' | '16GiB'; +export type BrowserMemory = '1GiB' | '2GiB' | '4GiB' | '6GiB' | '8GiB' | '12GiB' | '16GiB'; /** - * Memory requested for a headful, non-GPU browser session. + * Memory requested for a non-GPU browser. Headless browsers support 1GiB + * (default), 2GiB, or 4GiB; headful browsers support 8GiB (default) or 16GiB. */ -export type BrowserMemoryRequest = '8GiB' | '16GiB'; +export type BrowserMemoryRequest = '1GiB' | '2GiB' | '4GiB' | '8GiB' | '16GiB'; /** * Network configuration for a browser session or browser pool. @@ -1491,7 +1492,8 @@ export interface BrowserCreateParams { kiosk_mode?: boolean; /** - * Memory for a headful, non-GPU browser session. Defaults to 8GiB. + * Memory for a non-GPU browser. Headless: 1GiB (default), 2GiB, or 4GiB. Headful: + * 8GiB (default) or 16GiB. */ memory?: BrowserMemoryRequest; From f83fc34d088ebbdd37913fb54ab1f3e6a27f4c10 Mon Sep 17 00:00:00 2001 From: "kernel-internal[bot]" <260533166+kernel-internal[bot]@users.noreply.github.com> Date: Fri, 16 Oct 2026 18:01:35 +0000 Subject: [PATCH 9/9] release: 0.127.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 14 ++++++++++++++ package.json | 2 +- src/version.ts | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0ad84350..88624072 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.126.0" + ".": "0.127.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 785963d8..65435303 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [0.127.0](https://github.com/kernel/kernel-node-sdk/compare/v0.126.0...v0.127.0) (2026-10-16) + + +### Features + +* Add atomic preconditions to pool network updates ([50d68f4](https://github.com/kernel/kernel-node-sdk/commit/50d68f4a37942f828a5ed2e1484d9f4e3f0604ec)) +* Add passkey credential fields and PATCH field add/remove ([d1001f3](https://github.com/kernel/kernel-node-sdk/commit/d1001f3ada17f6951453337d61a66054d46ada91)) +* Allow replacing vault cards whose provider outcome is unknown ([060038b](https://github.com/kernel/kernel-node-sdk/commit/060038b80d7bdc0a3feb63c5bb8a9dc9624b6308)) +* chore(stlc): seal custom-code tracking files ([2b47c61](https://github.com/kernel/kernel-node-sdk/commit/2b47c615b08d72fb5ea27120cbc6509d22d9931f)) +* Classify text captchas as token tasks and Binance as a provider ([0974d4f](https://github.com/kernel/kernel-node-sdk/commit/0974d4f31fa6104d5a7be2cfbb9b0fcdd1766559)) +* Deliver Kernel card details through fill ([03d2609](https://github.com/kernel/kernel-node-sdk/commit/03d2609d2f0694f9a50988d476b5eb1ff0efeb0b)) +* Raise Kernel card amount cap to $10,000 ([1f992aa](https://github.com/kernel/kernel-node-sdk/commit/1f992aaadfef30a8d8ddc2abd7105b855866d051)) +* Remove Link expires_at, return 400 for missing credential values, and log fill failures ([8dea4a0](https://github.com/kernel/kernel-node-sdk/commit/8dea4a0085460718baf7cc210b74875138065407)) + ## [0.126.0](https://github.com/kernel/kernel-node-sdk/compare/v0.125.0...v0.126.0) (2026-10-14) diff --git a/package.json b/package.json index 185e6007..5ed7034e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@onkernel/sdk", - "version": "0.126.0", + "version": "0.127.0", "description": "The official TypeScript library for the Kernel API", "author": "Kernel <>", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index dc70112b..d6d8f1ad 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.126.0'; // x-release-please-version +export const VERSION = '0.127.0'; // x-release-please-version