@onkernel/sdk 0.126.0 → 0.127.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/package.json +1 -1
  3. package/resources/browser-pools.d.mts +15 -5
  4. package/resources/browser-pools.d.mts.map +1 -1
  5. package/resources/browser-pools.d.ts +15 -5
  6. package/resources/browser-pools.d.ts.map +1 -1
  7. package/resources/browsers/browsers.d.mts +6 -4
  8. package/resources/browsers/browsers.d.mts.map +1 -1
  9. package/resources/browsers/browsers.d.ts +6 -4
  10. package/resources/browsers/browsers.d.ts.map +1 -1
  11. package/resources/browsers/browsers.js.map +1 -1
  12. package/resources/browsers/browsers.mjs.map +1 -1
  13. package/resources/browsers/telemetry.d.mts +14 -6
  14. package/resources/browsers/telemetry.d.mts.map +1 -1
  15. package/resources/browsers/telemetry.d.ts +14 -6
  16. package/resources/browsers/telemetry.d.ts.map +1 -1
  17. package/resources/vaults/index.d.mts +1 -1
  18. package/resources/vaults/index.d.mts.map +1 -1
  19. package/resources/vaults/index.d.ts +1 -1
  20. package/resources/vaults/index.d.ts.map +1 -1
  21. package/resources/vaults/index.js.map +1 -1
  22. package/resources/vaults/index.mjs.map +1 -1
  23. package/resources/vaults/items.d.mts +231 -139
  24. package/resources/vaults/items.d.mts.map +1 -1
  25. package/resources/vaults/items.d.ts +231 -139
  26. package/resources/vaults/items.d.ts.map +1 -1
  27. package/resources/vaults/items.js +13 -9
  28. package/resources/vaults/items.js.map +1 -1
  29. package/resources/vaults/items.mjs +13 -9
  30. package/resources/vaults/items.mjs.map +1 -1
  31. package/resources/vaults/vaults.d.mts +2 -2
  32. package/resources/vaults/vaults.d.mts.map +1 -1
  33. package/resources/vaults/vaults.d.ts +2 -2
  34. package/resources/vaults/vaults.d.ts.map +1 -1
  35. package/resources/vaults/vaults.js.map +1 -1
  36. package/resources/vaults/vaults.mjs.map +1 -1
  37. package/src/resources/browser-pools.ts +16 -5
  38. package/src/resources/browsers/browsers.ts +6 -4
  39. package/src/resources/browsers/telemetry.ts +16 -3
  40. package/src/resources/vaults/index.ts +1 -0
  41. package/src/resources/vaults/items.ts +238 -139
  42. package/src/resources/vaults/vaults.ts +2 -0
  43. package/src/version.ts +1 -1
  44. package/version.d.mts +1 -1
  45. package/version.d.ts +1 -1
  46. package/version.js +1 -1
  47. package/version.mjs +1 -1
@@ -33,10 +33,10 @@ export declare class Items extends APIResource {
33
33
  * request, subject to atomic provider approval checks; omitted optional fields
34
34
  * remain unchanged and explicit empty lists clear them. Wallet/provider binding
35
35
  * and unsupported fields cannot change after authorization starts. An uncertain
36
- * update enters recovery_required and must not be retried. Checkout cards may be
37
- * edited between authorizations. A Link card authorized with browser_id and
38
- * page_url cannot be changed; delete it and create a new card with the updated
39
- * details.
36
+ * update enters recovery_required; delete the card and create a new one rather
37
+ * than retrying the update. Checkout cards may be edited between authorizations. A
38
+ * Link card authorized with browser_id and page_url cannot be changed; delete it
39
+ * and create a new card with the updated details.
40
40
  *
41
41
  * @example
42
42
  * ```ts
@@ -75,11 +75,12 @@ export declare class Items extends APIResource {
75
75
  * Unresolved payment operations normally block deletion, including operations on
76
76
  * child cards of a wallet. Deleting a connected Kernel wallet first blocks new
77
77
  * payments on it, then removes its enrolled card. If that fails, the wallet is
78
- * kept and keeps refusing payments; retry the deletion. An AgentCard card in
79
- * recovery_required whose checkout create response returned no authorization ID
80
- * may be explicitly abandoned by deleting that card directly; deleting its wallet
81
- * or vault remains blocked. Deleting or recreating an item is not proof that a
82
- * payment did not occur. Deleting a managed auth credential item leaves the
78
+ * kept and keeps refusing payments; retry the deletion. A Link or Kernel card in
79
+ * recovery_required for issuance, or an AgentCard card in recovery_required whose
80
+ * checkout create response returned no authorization ID, may be explicitly
81
+ * abandoned by deleting that card directly; deleting its wallet or vault remains
82
+ * blocked until the card is deleted. Deleting or recreating an item is not proof
83
+ * that a payment did not occur. Deleting a managed auth credential item leaves the
83
84
  * connection and its saved credential unchanged.
84
85
  *
85
86
  * @example
@@ -118,6 +119,9 @@ export declare class Items extends APIResource {
118
119
  * return HTTP 429 and retain the card item; stop, back off, and retry the same
119
120
  * authorize operation.
120
121
  *
122
+ * Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
123
+ * submit checkout promptly after filling. A repeated fill is safe.
124
+ *
121
125
  * Fill returns a value-free execution result. Validation failures before writing
122
126
  * return 400 (invalid request or targets), 403 (access or destination denied), 404
123
127
  * (resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -295,7 +299,6 @@ export declare namespace CardVaultItemSpec {
295
299
  * Connected Link wallet item key.
296
300
  */
297
301
  wallet: string;
298
- expires_at?: number;
299
302
  line_items?: Array<LinkCardVaultItemSpec.LineItem>;
300
303
  metadata?: {
301
304
  [key: string]: string;
@@ -389,11 +392,12 @@ export declare namespace CardVaultItemState {
389
392
  interface LinkCardState {
390
393
  provider: 'link';
391
394
  /**
392
- * recovery_required means an original provider operation has an unresolved
393
- * outcome. Do not retry, delete, or replace it. Known references may be observed
394
- * safely, but unknown creation without an ID and uncertain card-material retrieval
395
- * require manual reconciliation with the provider or support. There is no reset or
396
- * caller-asserted reconciliation operation.
395
+ * recovery_required means an original provider operation has an unresolved outcome
396
+ * and the card cannot be used. Reads keep observing a known provider request and
397
+ * may clear the recovery. To continue, delete this card and create a new one;
398
+ * deleting cancels the original request when its ID is known and keeps the
399
+ * recovery evidence. The user may see an approval request for the original card
400
+ * and should approve only the new one.
397
401
  */
398
402
  status: 'requested' | 'pending_authorization' | 'ready' | 'consumed' | 'expired' | 'declined' | 'recovery_required';
399
403
  domains?: Array<string>;
@@ -457,16 +461,16 @@ export declare namespace CardVaultItemState {
457
461
  /**
458
462
  * Return the credential item with its collection action. Supported for ready and
459
463
  * pending_collection credential items. Always render the same form from every
460
- * form-supported field; totp fields have no form input and are omitted. No
461
- * caller-selected field subsets or form overrides are accepted. Reuse an active
462
- * Kernel-hosted session or renew an expired session atomically. Customer-hosted
463
- * forms use their own backend and ordinary item GET/PATCH. Opening the form does
464
- * not clear values or change readiness or item version. To observe edits on a
465
- * ready item, record its version and poll GET without wait until the version
466
- * changes, then reconcile the returned state. Version changes may also come from
467
- * PATCH; they do not identify a particular form submission. Customer-hosted apps
468
- * use their own submission callback, including for unchanged forms. The wait
469
- * parameter waits for readiness, not edits.
464
+ * form-supported field; totp and passkey fields have no form input and are
465
+ * omitted. No caller-selected field subsets or form overrides are accepted. Reuse
466
+ * an active Kernel-hosted session or renew an expired session atomically.
467
+ * Customer-hosted forms use their own backend and ordinary item GET/PATCH. Opening
468
+ * the form does not clear values or change readiness or item version. To observe
469
+ * edits on a ready item, record its version and poll GET without wait until the
470
+ * version changes, then reconcile the returned state. Version changes may also
471
+ * come from PATCH; they do not identify a particular form submission.
472
+ * Customer-hosted apps use their own submission callback, including for unchanged
473
+ * forms. The wait parameter waits for readiness, not edits.
470
474
  */
471
475
  export interface CollectVaultItemOperationRequest {
472
476
  type: 'collect';
@@ -540,30 +544,31 @@ export interface CredentialAccountVaultItemRequest {
540
544
  }
541
545
  /**
542
546
  * One schema-derived form for the item, available in ready or pending_collection
543
- * state. Render every form-supported field as editable; omit totp fields and
544
- * preserve their stored seeds. Prefill non-sensitive values, and allow existing
545
- * sensitive values to be preserved or replaced without ever revealing them. No
546
- * field subsets or per-request form configuration exist. Validate required fields
547
- * against the resulting values, including preserved secrets. Submit changed values
548
- * only, using the version used to render the form. Scoped hosted submission
549
- * rejects totp edits; seed writes require the ordinary authenticated item API.
550
- * Customer forms likewise omit totp from their payloads. Save edits atomically. A
551
- * successful hosted submission increments the version, marks ready, and consumes
552
- * the session; an empty edit may complete collection while preserving values. A
553
- * customer form uses PATCH for changed values and does not send an empty PATCH
554
- * when nothing changed. Kernel-hosted bearer sessions require no Kernel account
555
- * and are bound to the item version. Expired, superseded, consumed, or
556
- * deleted-item sessions cannot submit. Authenticated item GET renews expired
557
- * active sessions for ready or pending items; pending items always receive an
558
- * action. A ready item with no active session omits the action until collect is
559
- * invoked. Concurrent renewals return the same link. Renewal changes neither
560
- * values nor item version. An expired link cannot renew itself. The hosted form
561
- * handles its collection protocol; callers only open the returned URL and do not
562
- * extract or submit its token through the public API. For customer-hosted forms,
563
- * use @onkernel/vault-react and an authenticated customer backend calling the
564
- * ordinary item GET/PATCH API. Kernel does not store customer collection URLs or
565
- * authenticate the customer's end users. Treat URLs and submitted values as
566
- * secrets and exclude them from logs, traces, and errors.
547
+ * state. Render every form-supported field as editable; omit totp and passkey
548
+ * fields and preserve their stored values. Prefill non-sensitive values, and allow
549
+ * existing sensitive values to be preserved or replaced without ever revealing
550
+ * them. No field subsets or per-request form configuration exist. Validate
551
+ * required fields against the resulting values, including preserved secrets.
552
+ * Submit changed values only, using the version used to render the form. Scoped
553
+ * hosted submission rejects totp and passkey edits; those writes require the
554
+ * ordinary authenticated item API. Customer forms likewise omit them from their
555
+ * payloads. Save edits atomically. A successful hosted submission increments the
556
+ * version, marks ready, and consumes the session; an empty edit may complete
557
+ * collection while preserving values. A customer form uses PATCH for changed
558
+ * values and does not send an empty PATCH when nothing changed. Kernel-hosted
559
+ * bearer sessions require no Kernel account and are bound to the item version.
560
+ * Expired, superseded, consumed, or deleted-item sessions cannot submit.
561
+ * Authenticated item GET renews expired active sessions for ready or pending
562
+ * items; pending items always receive an action. A ready item with no active
563
+ * session omits the action until collect is invoked. Concurrent renewals return
564
+ * the same link. Renewal changes neither values nor item version. An expired link
565
+ * cannot renew itself. The hosted form handles its collection protocol; callers
566
+ * only open the returned URL and do not extract or submit its token through the
567
+ * public API. For customer-hosted forms, use @onkernel/vault-react and an
568
+ * authenticated customer backend calling the ordinary item GET/PATCH API. Kernel
569
+ * does not store customer collection URLs or authenticate the customer's end
570
+ * users. Treat URLs and submitted values as secrets and exclude them from logs,
571
+ * traces, and errors.
567
572
  */
568
573
  export interface CredentialCollectionAction {
569
574
  /**
@@ -593,14 +598,52 @@ export interface CredentialVaultFieldDefinition {
593
598
  */
594
599
  sensitive: boolean;
595
600
  /**
596
- * Text, email, and password have form inputs; totp does not and is omitted from
597
- * both Kernel-hosted and customer React forms. Password and totp must be
598
- * sensitive. A totp value is an RFC 4648 Base32 generator seed (case-insensitive,
599
- * optional trailing padding), not an otpauth URI or current code. Reject invalid
600
- * or empty decoded seeds. Browser fill generates an RFC 6238 code at execution
601
- * time using HMAC-SHA1, 6 digits, and a 30-second period. Preserve leading zeros;
602
- * never fill the seed. Custom algorithms, digits, periods, and form enrollment are
603
- * unsupported.
601
+ * Text, email, and password have form inputs; totp and passkey do not and are
602
+ * omitted from both Kernel-hosted and customer React forms. Password, totp, and
603
+ * passkey must be sensitive. A totp value is an RFC 4648 Base32 generator seed
604
+ * (case-insensitive, optional trailing padding), not an otpauth URI or current
605
+ * code. Reject invalid or empty decoded seeds. Browser fill generates an RFC 6238
606
+ * code at execution time using HMAC-SHA1, 6 digits, and a 30-second period.
607
+ * Preserve leading zeros; never fill the seed. Custom algorithms, digits, periods,
608
+ * and form enrollment are unsupported. A passkey value is a JSON-encoded FIDO
609
+ * Credential Exchange Format passkey object with unpadded base64url
610
+ * `credentialId`, `userHandle` (at most 64 bytes), and `key` (a PKCS#8 ECDSA P-256
611
+ * private key), a lowercase `rpId` domain, and optional `username` and
612
+ * `userDisplayName`. Other CXF members are ignored. Passkeys are never filled into
613
+ * pages.
614
+ */
615
+ type: CredentialVaultFieldType;
616
+ /**
617
+ * Optional human-readable display label. It is returned as non-secret metadata and
618
+ * never affects value keys, updates, or browser fills. Use single-line, trimmed
619
+ * display text without control or formatting characters. The server enforces a
620
+ * 128-byte UTF-8 limit.
621
+ */
622
+ label?: string;
623
+ }
624
+ /**
625
+ * A field definition without a value. Field updates add fields with this shape and
626
+ * set their values in `fields`.
627
+ */
628
+ export interface CredentialVaultFieldDefinitionInput {
629
+ /**
630
+ * Unique stable field name used to key values, updates, and browser fills.
631
+ */
632
+ name: string;
633
+ /**
634
+ * Text, email, and password have form inputs; totp and passkey do not and are
635
+ * omitted from both Kernel-hosted and customer React forms. Password, totp, and
636
+ * passkey must be sensitive. A totp value is an RFC 4648 Base32 generator seed
637
+ * (case-insensitive, optional trailing padding), not an otpauth URI or current
638
+ * code. Reject invalid or empty decoded seeds. Browser fill generates an RFC 6238
639
+ * code at execution time using HMAC-SHA1, 6 digits, and a 30-second period.
640
+ * Preserve leading zeros; never fill the seed. Custom algorithms, digits, periods,
641
+ * and form enrollment are unsupported. A passkey value is a JSON-encoded FIDO
642
+ * Credential Exchange Format passkey object with unpadded base64url
643
+ * `credentialId`, `userHandle` (at most 64 bytes), and `key` (a PKCS#8 ECDSA P-256
644
+ * private key), a lowercase `rpId` domain, and optional `username` and
645
+ * `userDisplayName`. Other CXF members are ignored. Passkeys are never filled into
646
+ * pages.
604
647
  */
605
648
  type: CredentialVaultFieldType;
606
649
  /**
@@ -610,6 +653,15 @@ export interface CredentialVaultFieldDefinition {
610
653
  * 128-byte UTF-8 limit.
611
654
  */
612
655
  label?: string;
656
+ required?: boolean;
657
+ /**
658
+ * Set false explicitly for ordinary usernames, email addresses, and other
659
+ * non-secret identifiers. Reserve true for secrets such as passwords, API tokens,
660
+ * and TOTP seeds. Password, totp, and passkey fields must be true. Omission
661
+ * defaults to true for safety; do not rely on that default for every field. False
662
+ * permits API reads and form prefilling.
663
+ */
664
+ sensitive?: boolean;
613
665
  }
614
666
  export interface CredentialVaultFieldInput {
615
667
  /**
@@ -617,14 +669,19 @@ export interface CredentialVaultFieldInput {
617
669
  */
618
670
  name: string;
619
671
  /**
620
- * Text, email, and password have form inputs; totp does not and is omitted from
621
- * both Kernel-hosted and customer React forms. Password and totp must be
622
- * sensitive. A totp value is an RFC 4648 Base32 generator seed (case-insensitive,
623
- * optional trailing padding), not an otpauth URI or current code. Reject invalid
624
- * or empty decoded seeds. Browser fill generates an RFC 6238 code at execution
625
- * time using HMAC-SHA1, 6 digits, and a 30-second period. Preserve leading zeros;
626
- * never fill the seed. Custom algorithms, digits, periods, and form enrollment are
627
- * unsupported.
672
+ * Text, email, and password have form inputs; totp and passkey do not and are
673
+ * omitted from both Kernel-hosted and customer React forms. Password, totp, and
674
+ * passkey must be sensitive. A totp value is an RFC 4648 Base32 generator seed
675
+ * (case-insensitive, optional trailing padding), not an otpauth URI or current
676
+ * code. Reject invalid or empty decoded seeds. Browser fill generates an RFC 6238
677
+ * code at execution time using HMAC-SHA1, 6 digits, and a 30-second period.
678
+ * Preserve leading zeros; never fill the seed. Custom algorithms, digits, periods,
679
+ * and form enrollment are unsupported. A passkey value is a JSON-encoded FIDO
680
+ * Credential Exchange Format passkey object with unpadded base64url
681
+ * `credentialId`, `userHandle` (at most 64 bytes), and `key` (a PKCS#8 ECDSA P-256
682
+ * private key), a lowercase `rpId` domain, and optional `username` and
683
+ * `userDisplayName`. Other CXF members are ignored. Passkeys are never filled into
684
+ * pages.
628
685
  */
629
686
  type: CredentialVaultFieldType;
630
687
  /**
@@ -653,9 +710,9 @@ export interface CredentialVaultFieldInput {
653
710
  /**
654
711
  * Set false explicitly for ordinary usernames, email addresses, and other
655
712
  * non-secret identifiers. Reserve true for secrets such as passwords, API tokens,
656
- * and TOTP seeds. Password and totp fields must be true. Omission defaults to true
657
- * for safety; do not rely on that default for every field. False permits API reads
658
- * and form prefilling.
713
+ * and TOTP seeds. Password, totp, and passkey fields must be true. Omission
714
+ * defaults to true for safety; do not rely on that default for every field. False
715
+ * permits API reads and form prefilling.
659
716
  */
660
717
  sensitive?: boolean;
661
718
  /**
@@ -677,16 +734,21 @@ export interface CredentialVaultFieldState {
677
734
  value?: string;
678
735
  }
679
736
  /**
680
- * Text, email, and password have form inputs; totp does not and is omitted from
681
- * both Kernel-hosted and customer React forms. Password and totp must be
682
- * sensitive. A totp value is an RFC 4648 Base32 generator seed (case-insensitive,
683
- * optional trailing padding), not an otpauth URI or current code. Reject invalid
684
- * or empty decoded seeds. Browser fill generates an RFC 6238 code at execution
685
- * time using HMAC-SHA1, 6 digits, and a 30-second period. Preserve leading zeros;
686
- * never fill the seed. Custom algorithms, digits, periods, and form enrollment are
687
- * unsupported.
737
+ * Text, email, and password have form inputs; totp and passkey do not and are
738
+ * omitted from both Kernel-hosted and customer React forms. Password, totp, and
739
+ * passkey must be sensitive. A totp value is an RFC 4648 Base32 generator seed
740
+ * (case-insensitive, optional trailing padding), not an otpauth URI or current
741
+ * code. Reject invalid or empty decoded seeds. Browser fill generates an RFC 6238
742
+ * code at execution time using HMAC-SHA1, 6 digits, and a 30-second period.
743
+ * Preserve leading zeros; never fill the seed. Custom algorithms, digits, periods,
744
+ * and form enrollment are unsupported. A passkey value is a JSON-encoded FIDO
745
+ * Credential Exchange Format passkey object with unpadded base64url
746
+ * `credentialId`, `userHandle` (at most 64 bytes), and `key` (a PKCS#8 ECDSA P-256
747
+ * private key), a lowercase `rpId` domain, and optional `username` and
748
+ * `userDisplayName`. Other CXF members are ignored. Passkeys are never filled into
749
+ * pages.
688
750
  */
689
- export type CredentialVaultFieldType = 'text' | 'email' | 'password' | 'totp';
751
+ export type CredentialVaultFieldType = 'text' | 'email' | 'password' | 'totp' | 'passkey';
690
752
  /**
691
753
  * Set exactly one of value or encrypted_value. Use value unless the update comes
692
754
  * from your own credential collection web app that encrypts values in the browser;
@@ -713,8 +775,9 @@ export interface CredentialVaultFieldUpdate {
713
775
  * immediately clear the stored value. Clearing a required form-supported field
714
776
  * reopens collection; clearing an optional field does not prevent readiness.
715
777
  * Values must satisfy the declared field type. For totp, value is the generator
716
- * seed, never a current code. Clearing a required totp field returns 400 because
717
- * it cannot be collected in a form.
778
+ * seed, never a current code. For passkey, value is the JSON-encoded CXF passkey
779
+ * object. Clearing a required totp or passkey field returns 400 because it cannot
780
+ * be collected in a form.
718
781
  */
719
782
  value?: string | null;
720
783
  }
@@ -750,30 +813,31 @@ export interface CredentialVaultItem {
750
813
  version: number;
751
814
  /**
752
815
  * One schema-derived form for the item, available in ready or pending_collection
753
- * state. Render every form-supported field as editable; omit totp fields and
754
- * preserve their stored seeds. Prefill non-sensitive values, and allow existing
755
- * sensitive values to be preserved or replaced without ever revealing them. No
756
- * field subsets or per-request form configuration exist. Validate required fields
757
- * against the resulting values, including preserved secrets. Submit changed values
758
- * only, using the version used to render the form. Scoped hosted submission
759
- * rejects totp edits; seed writes require the ordinary authenticated item API.
760
- * Customer forms likewise omit totp from their payloads. Save edits atomically. A
761
- * successful hosted submission increments the version, marks ready, and consumes
762
- * the session; an empty edit may complete collection while preserving values. A
763
- * customer form uses PATCH for changed values and does not send an empty PATCH
764
- * when nothing changed. Kernel-hosted bearer sessions require no Kernel account
765
- * and are bound to the item version. Expired, superseded, consumed, or
766
- * deleted-item sessions cannot submit. Authenticated item GET renews expired
767
- * active sessions for ready or pending items; pending items always receive an
768
- * action. A ready item with no active session omits the action until collect is
769
- * invoked. Concurrent renewals return the same link. Renewal changes neither
770
- * values nor item version. An expired link cannot renew itself. The hosted form
771
- * handles its collection protocol; callers only open the returned URL and do not
772
- * extract or submit its token through the public API. For customer-hosted forms,
773
- * use @onkernel/vault-react and an authenticated customer backend calling the
774
- * ordinary item GET/PATCH API. Kernel does not store customer collection URLs or
775
- * authenticate the customer's end users. Treat URLs and submitted values as
776
- * secrets and exclude them from logs, traces, and errors.
816
+ * state. Render every form-supported field as editable; omit totp and passkey
817
+ * fields and preserve their stored values. Prefill non-sensitive values, and allow
818
+ * existing sensitive values to be preserved or replaced without ever revealing
819
+ * them. No field subsets or per-request form configuration exist. Validate
820
+ * required fields against the resulting values, including preserved secrets.
821
+ * Submit changed values only, using the version used to render the form. Scoped
822
+ * hosted submission rejects totp and passkey edits; those writes require the
823
+ * ordinary authenticated item API. Customer forms likewise omit them from their
824
+ * payloads. Save edits atomically. A successful hosted submission increments the
825
+ * version, marks ready, and consumes the session; an empty edit may complete
826
+ * collection while preserving values. A customer form uses PATCH for changed
827
+ * values and does not send an empty PATCH when nothing changed. Kernel-hosted
828
+ * bearer sessions require no Kernel account and are bound to the item version.
829
+ * Expired, superseded, consumed, or deleted-item sessions cannot submit.
830
+ * Authenticated item GET renews expired active sessions for ready or pending
831
+ * items; pending items always receive an action. A ready item with no active
832
+ * session omits the action until collect is invoked. Concurrent renewals return
833
+ * the same link. Renewal changes neither values nor item version. An expired link
834
+ * cannot renew itself. The hosted form handles its collection protocol; callers
835
+ * only open the returned URL and do not extract or submit its token through the
836
+ * public API. For customer-hosted forms, use @onkernel/vault-react and an
837
+ * authenticated customer backend calling the ordinary item GET/PATCH API. Kernel
838
+ * does not store customer collection URLs or authenticate the customer's end
839
+ * users. Treat URLs and submitted values as secrets and exclude them from logs,
840
+ * traces, and errors.
777
841
  */
778
842
  action?: CredentialCollectionAction | CredentialVaultItem.OnePasswordAccessApprovalAction;
779
843
  }
@@ -849,6 +913,13 @@ export type CredentialVaultItemSpec = KernelCredentialVaultItemSpec | OnePasswor
849
913
  */
850
914
  export type CredentialVaultItemSpecInput = KernelCredentialVaultItemSpecInput | OnePasswordCredentialVaultItemSpecInput | ManagedAuthCredentialVaultItemSpecInput;
851
915
  export interface CredentialVaultItemSpecUpdate {
916
+ /**
917
+ * Field definitions to append, with the same defaults as creation. Set their
918
+ * values in `fields` in the same update. Names must be unique after removals; at
919
+ * most 32 fields may result. A required totp or passkey field needs a value in
920
+ * `fields`.
921
+ */
922
+ add_fields?: Array<CredentialVaultFieldDefinitionInput>;
852
923
  /**
853
924
  * Recognizable site or service name used as the form title, without suffixes such
854
925
  * as sign-in credentials. An empty string clears it. Display text only, not an
@@ -858,18 +929,26 @@ export interface CredentialVaultItemSpecUpdate {
858
929
  fields?: {
859
930
  [key: string]: CredentialVaultFieldUpdate;
860
931
  };
932
+ /**
933
+ * Names of fields to delete with their values. Unknown names return 400. At least
934
+ * one field must remain.
935
+ */
936
+ remove_fields?: Array<string>;
861
937
  }
862
938
  export type CredentialVaultItemState = KernelCredentialVaultItemState | OnePasswordCredentialVaultItemState | ManagedAuthCredentialVaultItemState;
863
939
  /**
864
- * Atomically update description and selected values. Omitted properties are
865
- * preserved. Field names, types, required flags, and sensitivity cannot change.
866
- * Unknown field names return 400; stale versions or mismatched item types return
867
- * 409 without changing the item. A successful update increments version and
868
- * invalidates outstanding Kernel-hosted collection sessions. If required values
869
- * remain missing, return pending_collection and a fresh collection action.
870
- * Otherwise return ready without an action; collect can open the form again
871
- * without clearing values. Customer URLs have no Kernel-managed expiry. 1Password
872
- * and managed auth credentials return 409.
940
+ * Atomically update description, field definitions, and selected values. Omitted
941
+ * properties are preserved. `remove_fields` deletes definitions and their values,
942
+ * then `add_fields` appends definitions, then `fields` sets values, including for
943
+ * added fields. An existing field's definition cannot be edited in place; to
944
+ * change it, remove the field and add it again, in the same update or a later one.
945
+ * The old value is deleted with it. Unknown field names return 400; stale versions
946
+ * or mismatched item types return 409 without changing the item. A successful
947
+ * update increments version and invalidates outstanding Kernel-hosted collection
948
+ * sessions. If required values remain missing, return pending_collection and a
949
+ * fresh collection action. Otherwise return ready without an action; collect can
950
+ * open the form again without clearing values. Customer URLs have no
951
+ * Kernel-managed expiry. 1Password and managed auth credentials return 409.
873
952
  */
874
953
  export interface CredentialVaultItemUpdateRequest {
875
954
  spec: CredentialVaultItemSpecUpdate;
@@ -950,13 +1029,13 @@ export interface FillVaultItemOperationResult {
950
1029
  type: 'fill';
951
1030
  }
952
1031
  /**
953
- * A ready Kernel card retains its encrypted network token and one-time code for
954
- * the fill operation until the item's expires_at. Fill and submit checkout before
955
- * then. Visa purchases require a spend_approval action before the code is issued;
956
- * Mastercard purchases need no hosted approval. masks.last4 is the enrolled card's
957
- * last four digits; masks.token_last4 is the network token's last four digits
958
- * shown to the merchant. Kernel cards do not expose aliases or support egress
959
- * substitution. Kernel does not observe whether the merchant charged the card.
1032
+ * A ready Kernel card supports authorize, fill, then submit checkout. Card details
1033
+ * are delivered for a few minutes after fill; submit promptly. Repeated fill is
1034
+ * safe and never submits checkout. Visa purchases require a spend_approval action
1035
+ * before details are issued; Mastercard purchases need no hosted approval.
1036
+ * masks.last4 is the enrolled card's last four digits; masks.token_last4, when
1037
+ * present, is the token's last four digits shown to the merchant. Kernel does not
1038
+ * observe whether the merchant charged the card.
960
1039
  */
961
1040
  export interface KernelCardState {
962
1041
  provider: 'kernel';
@@ -969,10 +1048,12 @@ export interface KernelCardState {
969
1048
  * fresh local verification link; this does not approve spending or replay any
970
1049
  * provider request. Unclassified legacy recovery and uncertain intent creation
971
1050
  * cannot restart. Kernel never approves again or issues another code for the item
972
- * automatically, and the item cannot be deleted or replaced until the original
973
- * attempt is reconciled with support. When status_reason says the provider refused
974
- * retrieval before acceptance, no code was issued and a later read retries.
975
- * declined means the card network refused to issue a code.
1051
+ * automatically. To continue, delete this card and create a new purchase; the
1052
+ * cardholder approves the new purchase separately. Recovery while reporting a
1053
+ * merchant transaction cannot be deleted and must be reconciled with support. When
1054
+ * status_reason says the provider refused retrieval before acceptance, no code was
1055
+ * issued and a later read retries. declined means the card network refused to
1056
+ * issue a code.
976
1057
  */
977
1058
  status: 'requested' | 'pending_authorization' | 'ready' | 'consumed' | 'expired' | 'declined' | 'recovery_required';
978
1059
  /**
@@ -1002,12 +1083,17 @@ export declare namespace KernelCardState {
1002
1083
  * Mastercard purchases need no cardholder approval. A Visa purchase returns a
1003
1084
  * spend_approval action: the cardholder approves it with a Visa passkey, and
1004
1085
  * Kernel registers a Visa intent for one transaction up to the amount before
1005
- * issuing the code. Card updates are not supported; delete and create a new item
1006
- * instead.
1086
+ * issuing the code. For supported cards whose network cannot be enrolled for
1087
+ * agentic tokens, authorize prepares checkout details without issuing a one-time
1088
+ * code. The card can be filled into one checkout before its expires_at, one hour
1089
+ * after authorization. Fill types those details on merchant_url's origin. The
1090
+ * amount, merchant_url and merchant_country are recorded but do not restrict
1091
+ * payment requests sent by the browser. Card updates are not supported; delete and
1092
+ * create a new item instead.
1007
1093
  */
1008
1094
  export interface KernelCardVaultItemSpec {
1009
1095
  /**
1010
- * Integer amount in minor currency units (at most 50000), bound to the one-time
1096
+ * Integer amount in minor currency units (at most 1000000), bound to the one-time
1011
1097
  * code.
1012
1098
  */
1013
1099
  amount: number;
@@ -1111,23 +1197,29 @@ export interface KernelWalletState {
1111
1197
  * number never reaches Kernel. The connected wallet's payment_methods expansion
1112
1198
  * lists the card; capabilities.single_use_card.eligible is false, with a
1113
1199
  * network_token*\* reason, until the card has a network token, and authorize
1114
- * returns 400 for such a card. Visa purchases require the cardholder to complete a
1115
- * spend_approval action before Kernel issues a one-time code; Mastercard purchases
1116
- * need no hosted approval.
1200
+ * returns 400 for such a card unless Kernel supports checkout delivery without a
1201
+ * network token for that card. In that case, fill types the checkout details. Visa
1202
+ * purchases require the cardholder to complete a spend_approval action before
1203
+ * Kernel issues a one-time code; Mastercard purchases need no hosted approval.
1117
1204
  */
1118
1205
  export interface KernelWalletVaultItemSpec {
1119
1206
  provider: 'kernel';
1120
1207
  }
1121
1208
  export interface ManagedAuthCredentialVaultField {
1122
1209
  /**
1123
- * Text, email, and password have form inputs; totp does not and is omitted from
1124
- * both Kernel-hosted and customer React forms. Password and totp must be
1125
- * sensitive. A totp value is an RFC 4648 Base32 generator seed (case-insensitive,
1126
- * optional trailing padding), not an otpauth URI or current code. Reject invalid
1127
- * or empty decoded seeds. Browser fill generates an RFC 6238 code at execution
1128
- * time using HMAC-SHA1, 6 digits, and a 30-second period. Preserve leading zeros;
1129
- * never fill the seed. Custom algorithms, digits, periods, and form enrollment are
1130
- * unsupported.
1210
+ * Text, email, and password have form inputs; totp and passkey do not and are
1211
+ * omitted from both Kernel-hosted and customer React forms. Password, totp, and
1212
+ * passkey must be sensitive. A totp value is an RFC 4648 Base32 generator seed
1213
+ * (case-insensitive, optional trailing padding), not an otpauth URI or current
1214
+ * code. Reject invalid or empty decoded seeds. Browser fill generates an RFC 6238
1215
+ * code at execution time using HMAC-SHA1, 6 digits, and a 30-second period.
1216
+ * Preserve leading zeros; never fill the seed. Custom algorithms, digits, periods,
1217
+ * and form enrollment are unsupported. A passkey value is a JSON-encoded FIDO
1218
+ * Credential Exchange Format passkey object with unpadded base64url
1219
+ * `credentialId`, `userHandle` (at most 64 bytes), and `key` (a PKCS#8 ECDSA P-256
1220
+ * private key), a lowercase `rpId` domain, and optional `username` and
1221
+ * `userDisplayName`. Other CXF members are ignored. Passkeys are never filled into
1222
+ * pages.
1131
1223
  */
1132
1224
  type: CredentialVaultFieldType;
1133
1225
  }
@@ -1936,7 +2028,7 @@ export declare namespace VaultPaymentMethod {
1936
2028
  export interface VaultWebmcpBinding {
1937
2029
  /**
1938
2030
  * A declared, populated credential field or supported card field. A TOTP field
1939
- * supplies a fresh code, never its seed.
2031
+ * supplies a fresh code, never its seed. Passkey fields cannot be filled.
1940
2032
  */
1941
2033
  field: string;
1942
2034
  /**
@@ -2654,6 +2746,6 @@ export declare namespace ItemUpsertParams {
2654
2746
  }
2655
2747
  }
2656
2748
  export declare namespace Items {
2657
- export { type AgentcardCheckoutAuthorization as AgentcardCheckoutAuthorization, type AgentcardCheckoutPreparation as AgentcardCheckoutPreparation, type AgentcardPreparedProcessor as AgentcardPreparedProcessor, type AuthorizeVaultItemOperationRequest as AuthorizeVaultItemOperationRequest, type CardVaultItemSpec as CardVaultItemSpec, type CardVaultItemState as CardVaultItemState, type CollectVaultItemOperationRequest as CollectVaultItemOperationRequest, type ConfirmTransactionVaultItemOperationRequest as ConfirmTransactionVaultItemOperationRequest, type CredentialAccountVaultItem as CredentialAccountVaultItem, type CredentialAccountVaultItemRequest as CredentialAccountVaultItemRequest, type CredentialCollectionAction as CredentialCollectionAction, type CredentialVaultFieldDefinition as CredentialVaultFieldDefinition, type CredentialVaultFieldInput as CredentialVaultFieldInput, type CredentialVaultFieldState as CredentialVaultFieldState, type CredentialVaultFieldType as CredentialVaultFieldType, type CredentialVaultFieldUpdate as CredentialVaultFieldUpdate, type CredentialVaultItem as CredentialVaultItem, type CredentialVaultItemRequest as CredentialVaultItemRequest, type CredentialVaultItemSpec as CredentialVaultItemSpec, type CredentialVaultItemSpecInput as CredentialVaultItemSpecInput, type CredentialVaultItemSpecUpdate as CredentialVaultItemSpecUpdate, type CredentialVaultItemState as CredentialVaultItemState, type CredentialVaultItemUpdateRequest as CredentialVaultItemUpdateRequest, type FillVaultItemOperationRequest as FillVaultItemOperationRequest, type FillVaultItemOperationResult as FillVaultItemOperationResult, type KernelCardState as KernelCardState, type KernelCardVaultItemSpec as KernelCardVaultItemSpec, type KernelCredentialVaultItemSpec as KernelCredentialVaultItemSpec, type KernelCredentialVaultItemSpecInput as KernelCredentialVaultItemSpecInput, type KernelCredentialVaultItemState as KernelCredentialVaultItemState, type KernelWalletState as KernelWalletState, type KernelWalletVaultItemSpec as KernelWalletVaultItemSpec, type ManagedAuthCredentialVaultField as ManagedAuthCredentialVaultField, type ManagedAuthCredentialVaultItemSpec as ManagedAuthCredentialVaultItemSpec, type ManagedAuthCredentialVaultItemSpecInput as ManagedAuthCredentialVaultItemSpecInput, type ManagedAuthCredentialVaultItemState as ManagedAuthCredentialVaultItemState, type OnePasswordCredentialAccountSpec as OnePasswordCredentialAccountSpec, type OnePasswordCredentialAccountState as OnePasswordCredentialAccountState, type OnePasswordCredentialVaultItemSpec as OnePasswordCredentialVaultItemSpec, type OnePasswordCredentialVaultItemSpecInput as OnePasswordCredentialVaultItemSpecInput, type OnePasswordCredentialVaultItemState as OnePasswordCredentialVaultItemState, type OnePasswordFillVaultItemOperationRequest as OnePasswordFillVaultItemOperationRequest, type OnePasswordFillVaultItemOperationResult as OnePasswordFillVaultItemOperationResult, type OnePasswordOAuthAction as OnePasswordOAuthAction, type OnePasswordRecoverVaultItemOperationRequest as OnePasswordRecoverVaultItemOperationRequest, type OnePasswordRequestAccessVaultItemOperationRequest as OnePasswordRequestAccessVaultItemOperationRequest, type PrepareCheckoutVaultItemOperationRequest as PrepareCheckoutVaultItemOperationRequest, type RestartVerificationVaultItemOperationRequest as RestartVerificationVaultItemOperationRequest, type VaultCardAliases as VaultCardAliases, type VaultCardFillField as VaultCardFillField, type VaultCheckoutContext as VaultCheckoutContext, type VaultFillField as VaultFillField, type VaultFillFieldResult as VaultFillFieldResult, type VaultItem as VaultItem, type VaultItemAction as VaultItemAction, type VaultItemEvent as VaultItemEvent, type VaultItemOperationResponse as VaultItemOperationResponse, type VaultPaymentMethod as VaultPaymentMethod, type VaultWebmcpBinding as VaultWebmcpBinding, type WalletVaultItemSpec as WalletVaultItemSpec, type WalletVaultItemState as WalletVaultItemState, type WebmcpInvokeVaultItemOperationRequest as WebmcpInvokeVaultItemOperationRequest, type WebmcpInvokeVaultItemOperationResult as WebmcpInvokeVaultItemOperationResult, type ItemListResponse as ItemListResponse, type ItemEventsResponse as ItemEventsResponse, type ItemRetrieveParams as ItemRetrieveParams, type ItemUpdateParams as ItemUpdateParams, type ItemDeleteParams as ItemDeleteParams, type ItemEventsParams as ItemEventsParams, type ItemPerformOperationParams as ItemPerformOperationParams, type ItemUpsertParams as ItemUpsertParams, };
2749
+ export { type AgentcardCheckoutAuthorization as AgentcardCheckoutAuthorization, type AgentcardCheckoutPreparation as AgentcardCheckoutPreparation, type AgentcardPreparedProcessor as AgentcardPreparedProcessor, type AuthorizeVaultItemOperationRequest as AuthorizeVaultItemOperationRequest, type CardVaultItemSpec as CardVaultItemSpec, type CardVaultItemState as CardVaultItemState, type CollectVaultItemOperationRequest as CollectVaultItemOperationRequest, type ConfirmTransactionVaultItemOperationRequest as ConfirmTransactionVaultItemOperationRequest, type CredentialAccountVaultItem as CredentialAccountVaultItem, 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, type CredentialVaultFieldUpdate as CredentialVaultFieldUpdate, type CredentialVaultItem as CredentialVaultItem, type CredentialVaultItemRequest as CredentialVaultItemRequest, type CredentialVaultItemSpec as CredentialVaultItemSpec, type CredentialVaultItemSpecInput as CredentialVaultItemSpecInput, type CredentialVaultItemSpecUpdate as CredentialVaultItemSpecUpdate, type CredentialVaultItemState as CredentialVaultItemState, type CredentialVaultItemUpdateRequest as CredentialVaultItemUpdateRequest, type FillVaultItemOperationRequest as FillVaultItemOperationRequest, type FillVaultItemOperationResult as FillVaultItemOperationResult, type KernelCardState as KernelCardState, type KernelCardVaultItemSpec as KernelCardVaultItemSpec, type KernelCredentialVaultItemSpec as KernelCredentialVaultItemSpec, type KernelCredentialVaultItemSpecInput as KernelCredentialVaultItemSpecInput, type KernelCredentialVaultItemState as KernelCredentialVaultItemState, type KernelWalletState as KernelWalletState, type KernelWalletVaultItemSpec as KernelWalletVaultItemSpec, type ManagedAuthCredentialVaultField as ManagedAuthCredentialVaultField, type ManagedAuthCredentialVaultItemSpec as ManagedAuthCredentialVaultItemSpec, type ManagedAuthCredentialVaultItemSpecInput as ManagedAuthCredentialVaultItemSpecInput, type ManagedAuthCredentialVaultItemState as ManagedAuthCredentialVaultItemState, type OnePasswordCredentialAccountSpec as OnePasswordCredentialAccountSpec, type OnePasswordCredentialAccountState as OnePasswordCredentialAccountState, type OnePasswordCredentialVaultItemSpec as OnePasswordCredentialVaultItemSpec, type OnePasswordCredentialVaultItemSpecInput as OnePasswordCredentialVaultItemSpecInput, type OnePasswordCredentialVaultItemState as OnePasswordCredentialVaultItemState, type OnePasswordFillVaultItemOperationRequest as OnePasswordFillVaultItemOperationRequest, type OnePasswordFillVaultItemOperationResult as OnePasswordFillVaultItemOperationResult, type OnePasswordOAuthAction as OnePasswordOAuthAction, type OnePasswordRecoverVaultItemOperationRequest as OnePasswordRecoverVaultItemOperationRequest, type OnePasswordRequestAccessVaultItemOperationRequest as OnePasswordRequestAccessVaultItemOperationRequest, type PrepareCheckoutVaultItemOperationRequest as PrepareCheckoutVaultItemOperationRequest, type RestartVerificationVaultItemOperationRequest as RestartVerificationVaultItemOperationRequest, type VaultCardAliases as VaultCardAliases, type VaultCardFillField as VaultCardFillField, type VaultCheckoutContext as VaultCheckoutContext, type VaultFillField as VaultFillField, type VaultFillFieldResult as VaultFillFieldResult, type VaultItem as VaultItem, type VaultItemAction as VaultItemAction, type VaultItemEvent as VaultItemEvent, type VaultItemOperationResponse as VaultItemOperationResponse, type VaultPaymentMethod as VaultPaymentMethod, type VaultWebmcpBinding as VaultWebmcpBinding, type WalletVaultItemSpec as WalletVaultItemSpec, type WalletVaultItemState as WalletVaultItemState, type WebmcpInvokeVaultItemOperationRequest as WebmcpInvokeVaultItemOperationRequest, type WebmcpInvokeVaultItemOperationResult as WebmcpInvokeVaultItemOperationResult, type ItemListResponse as ItemListResponse, type ItemEventsResponse as ItemEventsResponse, type ItemRetrieveParams as ItemRetrieveParams, type ItemUpdateParams as ItemUpdateParams, type ItemDeleteParams as ItemDeleteParams, type ItemEventsParams as ItemEventsParams, type ItemPerformOperationParams as ItemPerformOperationParams, type ItemUpsertParams as ItemUpsertParams, };
2658
2750
  }
2659
2751
  //# sourceMappingURL=items.d.mts.map