@onkernel/sdk 0.126.0 → 0.128.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 (82) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/browser-pools.d.mts +19 -5
  10. package/resources/browser-pools.d.mts.map +1 -1
  11. package/resources/browser-pools.d.ts +19 -5
  12. package/resources/browser-pools.d.ts.map +1 -1
  13. package/resources/browsers/browsers.d.mts +130 -5
  14. package/resources/browsers/browsers.d.mts.map +1 -1
  15. package/resources/browsers/browsers.d.ts +130 -5
  16. package/resources/browsers/browsers.d.ts.map +1 -1
  17. package/resources/browsers/browsers.js.map +1 -1
  18. package/resources/browsers/browsers.mjs.map +1 -1
  19. package/resources/browsers/index.d.mts +1 -1
  20. package/resources/browsers/index.d.mts.map +1 -1
  21. package/resources/browsers/index.d.ts +1 -1
  22. package/resources/browsers/index.d.ts.map +1 -1
  23. package/resources/browsers/index.js.map +1 -1
  24. package/resources/browsers/index.mjs.map +1 -1
  25. package/resources/browsers/telemetry.d.mts +14 -6
  26. package/resources/browsers/telemetry.d.mts.map +1 -1
  27. package/resources/browsers/telemetry.d.ts +14 -6
  28. package/resources/browsers/telemetry.d.ts.map +1 -1
  29. package/resources/index.d.mts +1 -1
  30. package/resources/index.d.mts.map +1 -1
  31. package/resources/index.d.ts +1 -1
  32. package/resources/index.d.ts.map +1 -1
  33. package/resources/index.js.map +1 -1
  34. package/resources/index.mjs.map +1 -1
  35. package/resources/invocations.d.mts +4 -0
  36. package/resources/invocations.d.mts.map +1 -1
  37. package/resources/invocations.d.ts +4 -0
  38. package/resources/invocations.d.ts.map +1 -1
  39. package/resources/proxies.d.mts +14 -13
  40. package/resources/proxies.d.mts.map +1 -1
  41. package/resources/proxies.d.ts +14 -13
  42. package/resources/proxies.d.ts.map +1 -1
  43. package/resources/proxies.js +18 -17
  44. package/resources/proxies.js.map +1 -1
  45. package/resources/proxies.mjs +18 -17
  46. package/resources/proxies.mjs.map +1 -1
  47. package/resources/vaults/index.d.mts +1 -1
  48. package/resources/vaults/index.d.mts.map +1 -1
  49. package/resources/vaults/index.d.ts +1 -1
  50. package/resources/vaults/index.d.ts.map +1 -1
  51. package/resources/vaults/index.js.map +1 -1
  52. package/resources/vaults/index.mjs.map +1 -1
  53. package/resources/vaults/items.d.mts +292 -154
  54. package/resources/vaults/items.d.mts.map +1 -1
  55. package/resources/vaults/items.d.ts +292 -154
  56. package/resources/vaults/items.d.ts.map +1 -1
  57. package/resources/vaults/items.js +13 -9
  58. package/resources/vaults/items.js.map +1 -1
  59. package/resources/vaults/items.mjs +13 -9
  60. package/resources/vaults/items.mjs.map +1 -1
  61. package/resources/vaults/vaults.d.mts +2 -2
  62. package/resources/vaults/vaults.d.mts.map +1 -1
  63. package/resources/vaults/vaults.d.ts +2 -2
  64. package/resources/vaults/vaults.d.ts.map +1 -1
  65. package/resources/vaults/vaults.js.map +1 -1
  66. package/resources/vaults/vaults.mjs.map +1 -1
  67. package/src/client.ts +10 -0
  68. package/src/resources/browser-pools.ts +21 -5
  69. package/src/resources/browsers/browsers.ts +155 -4
  70. package/src/resources/browsers/index.ts +5 -0
  71. package/src/resources/browsers/telemetry.ts +16 -3
  72. package/src/resources/index.ts +5 -0
  73. package/src/resources/invocations.ts +5 -0
  74. package/src/resources/proxies.ts +22 -17
  75. package/src/resources/vaults/index.ts +1 -0
  76. package/src/resources/vaults/items.ts +299 -154
  77. package/src/resources/vaults/vaults.ts +2 -0
  78. package/src/version.ts +1 -1
  79. package/version.d.mts +1 -1
  80. package/version.d.ts +1 -1
  81. package/version.js +1 -1
  82. package/version.mjs +1 -1
@@ -42,10 +42,10 @@ export class Items extends APIResource {
42
42
  * request, subject to atomic provider approval checks; omitted optional fields
43
43
  * remain unchanged and explicit empty lists clear them. Wallet/provider binding
44
44
  * and unsupported fields cannot change after authorization starts. An uncertain
45
- * update enters recovery_required and must not be retried. Checkout cards may be
46
- * edited between authorizations. A Link card authorized with browser_id and
47
- * page_url cannot be changed; delete it and create a new card with the updated
48
- * details.
45
+ * update enters recovery_required; delete the card and create a new one rather
46
+ * than retrying the update. Checkout cards may be edited between authorizations. A
47
+ * Link card authorized with browser_id and page_url cannot be changed; delete it
48
+ * and create a new card with the updated details.
49
49
  *
50
50
  * @example
51
51
  * ```ts
@@ -91,11 +91,12 @@ export class Items extends APIResource {
91
91
  * Unresolved payment operations normally block deletion, including operations on
92
92
  * child cards of a wallet. Deleting a connected Kernel wallet first blocks new
93
93
  * payments on it, then removes its enrolled card. If that fails, the wallet is
94
- * kept and keeps refusing payments; retry the deletion. An AgentCard card in
95
- * recovery_required whose checkout create response returned no authorization ID
96
- * may be explicitly abandoned by deleting that card directly; deleting its wallet
97
- * or vault remains blocked. Deleting or recreating an item is not proof that a
98
- * payment did not occur. Deleting a managed auth credential item leaves the
94
+ * kept and keeps refusing payments; retry the deletion. A Link or Kernel card in
95
+ * recovery_required for issuance, or an AgentCard card in recovery_required whose
96
+ * checkout create response returned no authorization ID, may be explicitly
97
+ * abandoned by deleting that card directly; deleting its wallet or vault remains
98
+ * blocked until the card is deleted. Deleting or recreating an item is not proof
99
+ * that a payment did not occur. Deleting a managed auth credential item leaves the
99
100
  * connection and its saved credential unchanged.
100
101
  *
101
102
  * @example
@@ -145,6 +146,9 @@ export class Items extends APIResource {
145
146
  * return HTTP 429 and retain the card item; stop, back off, and retry the same
146
147
  * authorize operation.
147
148
  *
149
+ * Ready Kernel cards advertise fill. Fill delivers card details for a few minutes;
150
+ * submit checkout promptly after filling. A repeated fill is safe.
151
+ *
148
152
  * Fill returns a value-free execution result. Validation failures before writing
149
153
  * return 400 (invalid request or targets), 403 (access or destination denied), 404
150
154
  * (resource not found), or 409 (item or browser not ready). Once writing starts,
@@ -364,9 +368,7 @@ export namespace CardVaultItemSpec {
364
368
  */
365
369
  export interface LinkCardVaultItemSpec {
366
370
  /**
367
- * Integer amount in minor currency units. Link Pay Token execution permits at most
368
- * 500000; virtual-card execution permits at most 50000. Authorization rejects a
369
- * larger amount when the checkout requires a virtual card.
371
+ * Integer amount in minor currency units, at most 50000.
370
372
  */
371
373
  amount: number;
372
374
 
@@ -392,8 +394,6 @@ export namespace CardVaultItemSpec {
392
394
  */
393
395
  wallet: string;
394
396
 
395
- expires_at?: number;
396
-
397
397
  line_items?: Array<LinkCardVaultItemSpec.LineItem>;
398
398
 
399
399
  metadata?: { [key: string]: string };
@@ -515,11 +515,12 @@ export namespace CardVaultItemState {
515
515
  provider: 'link';
516
516
 
517
517
  /**
518
- * recovery_required means an original provider operation has an unresolved
519
- * outcome. Do not retry, delete, or replace it. Known references may be observed
520
- * safely, but unknown creation without an ID and uncertain card-material retrieval
521
- * require manual reconciliation with the provider or support. There is no reset or
522
- * caller-asserted reconciliation operation.
518
+ * recovery_required means an original provider operation has an unresolved outcome
519
+ * and the card cannot be used. Reads keep observing a known provider request and
520
+ * may clear the recovery. To continue, delete this card and create a new one;
521
+ * deleting cancels the original request when its ID is known and keeps the
522
+ * recovery evidence. The user may see an approval request for the original card
523
+ * and should approve only the new one.
523
524
  */
524
525
  status:
525
526
  | 'requested'
@@ -619,16 +620,16 @@ export namespace CardVaultItemState {
619
620
  /**
620
621
  * Return the credential item with its collection action. Supported for ready and
621
622
  * pending_collection credential items. Always render the same form from every
622
- * form-supported field; totp fields have no form input and are omitted. No
623
- * caller-selected field subsets or form overrides are accepted. Reuse an active
624
- * Kernel-hosted session or renew an expired session atomically. Customer-hosted
625
- * forms use their own backend and ordinary item GET/PATCH. Opening the form does
626
- * not clear values or change readiness or item version. To observe edits on a
627
- * ready item, record its version and poll GET without wait until the version
628
- * changes, then reconcile the returned state. Version changes may also come from
629
- * PATCH; they do not identify a particular form submission. Customer-hosted apps
630
- * use their own submission callback, including for unchanged forms. The wait
631
- * parameter waits for readiness, not edits.
623
+ * form-supported field; totp and passkey fields have no form input and are
624
+ * omitted. No caller-selected field subsets or form overrides are accepted. Reuse
625
+ * an active Kernel-hosted session or renew an expired session atomically.
626
+ * Customer-hosted forms use their own backend and ordinary item GET/PATCH. Opening
627
+ * the form does not clear values or change readiness or item version. To observe
628
+ * edits on a ready item, record its version and poll GET without wait until the
629
+ * version changes, then reconcile the returned state. Version changes may also
630
+ * come from PATCH; they do not identify a particular form submission.
631
+ * Customer-hosted apps use their own submission callback, including for unchanged
632
+ * forms. The wait parameter waits for readiness, not edits.
632
633
  */
633
634
  export interface CollectVaultItemOperationRequest {
634
635
  type: 'collect';
@@ -746,30 +747,31 @@ export interface CredentialAccountVaultItemRequest {
746
747
 
747
748
  /**
748
749
  * One schema-derived form for the item, available in ready or pending_collection
749
- * state. Render every form-supported field as editable; omit totp fields and
750
- * preserve their stored seeds. Prefill non-sensitive values, and allow existing
751
- * sensitive values to be preserved or replaced without ever revealing them. No
752
- * field subsets or per-request form configuration exist. Validate required fields
753
- * against the resulting values, including preserved secrets. Submit changed values
754
- * only, using the version used to render the form. Scoped hosted submission
755
- * rejects totp edits; seed writes require the ordinary authenticated item API.
756
- * Customer forms likewise omit totp from their payloads. Save edits atomically. A
757
- * successful hosted submission increments the version, marks ready, and consumes
758
- * the session; an empty edit may complete collection while preserving values. A
759
- * customer form uses PATCH for changed values and does not send an empty PATCH
760
- * when nothing changed. Kernel-hosted bearer sessions require no Kernel account
761
- * and are bound to the item version. Expired, superseded, consumed, or
762
- * deleted-item sessions cannot submit. Authenticated item GET renews expired
763
- * active sessions for ready or pending items; pending items always receive an
764
- * action. A ready item with no active session omits the action until collect is
765
- * invoked. Concurrent renewals return the same link. Renewal changes neither
766
- * values nor item version. An expired link cannot renew itself. The hosted form
767
- * handles its collection protocol; callers only open the returned URL and do not
768
- * extract or submit its token through the public API. For customer-hosted forms,
769
- * use @onkernel/vault-react and an authenticated customer backend calling the
770
- * ordinary item GET/PATCH API. Kernel does not store customer collection URLs or
771
- * authenticate the customer's end users. Treat URLs and submitted values as
772
- * secrets and exclude them from logs, traces, and errors.
750
+ * state. Render every form-supported field as editable; omit totp and passkey
751
+ * fields and preserve their stored values. Prefill non-sensitive values, and allow
752
+ * existing sensitive values to be preserved or replaced without ever revealing
753
+ * them. No field subsets or per-request form configuration exist. Validate
754
+ * required fields against the resulting values, including preserved secrets.
755
+ * Submit changed values only, using the version used to render the form. Scoped
756
+ * hosted submission rejects totp and passkey edits; those writes require the
757
+ * ordinary authenticated item API. Customer forms likewise omit them from their
758
+ * payloads. Save edits atomically. A successful hosted submission increments the
759
+ * version, marks ready, and consumes the session; an empty edit may complete
760
+ * collection while preserving values. A customer form uses PATCH for changed
761
+ * values and does not send an empty PATCH when nothing changed. Kernel-hosted
762
+ * bearer sessions require no Kernel account and are bound to the item version.
763
+ * Expired, superseded, consumed, or deleted-item sessions cannot submit.
764
+ * Authenticated item GET renews expired active sessions for ready or pending
765
+ * items; pending items always receive an action. A ready item with no active
766
+ * session omits the action until collect is invoked. Concurrent renewals return
767
+ * the same link. Renewal changes neither values nor item version. An expired link
768
+ * cannot renew itself. The hosted form handles its collection protocol; callers
769
+ * only open the returned URL and do not extract or submit its token through the
770
+ * public API. For customer-hosted forms, use @onkernel/vault-react and an
771
+ * authenticated customer backend calling the ordinary item GET/PATCH API. Kernel
772
+ * does not store customer collection URLs or authenticate the customer's end
773
+ * users. Treat URLs and submitted values as secrets and exclude them from logs,
774
+ * traces, and errors.
773
775
  */
774
776
  export interface CredentialCollectionAction {
775
777
  /**
@@ -805,14 +807,55 @@ export interface CredentialVaultFieldDefinition {
805
807
  sensitive: boolean;
806
808
 
807
809
  /**
808
- * Text, email, and password have form inputs; totp does not and is omitted from
809
- * both Kernel-hosted and customer React forms. Password and totp must be
810
- * sensitive. A totp value is an RFC 4648 Base32 generator seed (case-insensitive,
811
- * optional trailing padding), not an otpauth URI or current code. Reject invalid
812
- * or empty decoded seeds. Browser fill generates an RFC 6238 code at execution
813
- * time using HMAC-SHA1, 6 digits, and a 30-second period. Preserve leading zeros;
814
- * never fill the seed. Custom algorithms, digits, periods, and form enrollment are
815
- * unsupported.
810
+ * Text, email, and password have form inputs; totp and passkey do not and are
811
+ * omitted from both Kernel-hosted and customer React forms. Password, totp, and
812
+ * passkey must be sensitive. A totp value is an RFC 4648 Base32 generator seed
813
+ * (case-insensitive, optional trailing padding), not an otpauth URI or current
814
+ * code. Reject invalid or empty decoded seeds. Browser fill generates an RFC 6238
815
+ * code at execution time using HMAC-SHA1, 6 digits, and a 30-second period.
816
+ * Preserve leading zeros; never fill the seed. Custom algorithms, digits, periods,
817
+ * and form enrollment are unsupported. A passkey value is a JSON-encoded FIDO
818
+ * Credential Exchange Format passkey object with unpadded base64url
819
+ * `credentialId`, `userHandle` (at most 64 bytes), and `key` (a PKCS#8 ECDSA P-256
820
+ * private key), a lowercase `rpId` domain, and optional `username` and
821
+ * `userDisplayName`. Other CXF members are ignored. Passkeys are never filled into
822
+ * pages.
823
+ */
824
+ type: CredentialVaultFieldType;
825
+
826
+ /**
827
+ * Optional human-readable display label. It is returned as non-secret metadata and
828
+ * never affects value keys, updates, or browser fills. Use single-line, trimmed
829
+ * display text without control or formatting characters. The server enforces a
830
+ * 128-byte UTF-8 limit.
831
+ */
832
+ label?: string;
833
+ }
834
+
835
+ /**
836
+ * A field definition without a value. Field updates add fields with this shape and
837
+ * set their values in `fields`.
838
+ */
839
+ export interface CredentialVaultFieldDefinitionInput {
840
+ /**
841
+ * Unique stable field name used to key values, updates, and browser fills.
842
+ */
843
+ name: string;
844
+
845
+ /**
846
+ * Text, email, and password have form inputs; totp and passkey do not and are
847
+ * omitted from both Kernel-hosted and customer React forms. Password, totp, and
848
+ * passkey must be sensitive. A totp value is an RFC 4648 Base32 generator seed
849
+ * (case-insensitive, optional trailing padding), not an otpauth URI or current
850
+ * code. Reject invalid or empty decoded seeds. Browser fill generates an RFC 6238
851
+ * code at execution time using HMAC-SHA1, 6 digits, and a 30-second period.
852
+ * Preserve leading zeros; never fill the seed. Custom algorithms, digits, periods,
853
+ * and form enrollment are unsupported. A passkey value is a JSON-encoded FIDO
854
+ * Credential Exchange Format passkey object with unpadded base64url
855
+ * `credentialId`, `userHandle` (at most 64 bytes), and `key` (a PKCS#8 ECDSA P-256
856
+ * private key), a lowercase `rpId` domain, and optional `username` and
857
+ * `userDisplayName`. Other CXF members are ignored. Passkeys are never filled into
858
+ * pages.
816
859
  */
817
860
  type: CredentialVaultFieldType;
818
861
 
@@ -823,6 +866,17 @@ export interface CredentialVaultFieldDefinition {
823
866
  * 128-byte UTF-8 limit.
824
867
  */
825
868
  label?: string;
869
+
870
+ required?: boolean;
871
+
872
+ /**
873
+ * Set false explicitly for ordinary usernames, email addresses, and other
874
+ * non-secret identifiers. Reserve true for secrets such as passwords, API tokens,
875
+ * and TOTP seeds. Password, totp, and passkey fields must be true. Omission
876
+ * defaults to true for safety; do not rely on that default for every field. False
877
+ * permits API reads and form prefilling.
878
+ */
879
+ sensitive?: boolean;
826
880
  }
827
881
 
828
882
  export interface CredentialVaultFieldInput {
@@ -832,14 +886,19 @@ export interface CredentialVaultFieldInput {
832
886
  name: string;
833
887
 
834
888
  /**
835
- * Text, email, and password have form inputs; totp does not and is omitted from
836
- * both Kernel-hosted and customer React forms. Password and totp must be
837
- * sensitive. A totp value is an RFC 4648 Base32 generator seed (case-insensitive,
838
- * optional trailing padding), not an otpauth URI or current code. Reject invalid
839
- * or empty decoded seeds. Browser fill generates an RFC 6238 code at execution
840
- * time using HMAC-SHA1, 6 digits, and a 30-second period. Preserve leading zeros;
841
- * never fill the seed. Custom algorithms, digits, periods, and form enrollment are
842
- * unsupported.
889
+ * Text, email, and password have form inputs; totp and passkey do not and are
890
+ * omitted from both Kernel-hosted and customer React forms. Password, totp, and
891
+ * passkey must be sensitive. A totp value is an RFC 4648 Base32 generator seed
892
+ * (case-insensitive, optional trailing padding), not an otpauth URI or current
893
+ * code. Reject invalid or empty decoded seeds. Browser fill generates an RFC 6238
894
+ * code at execution time using HMAC-SHA1, 6 digits, and a 30-second period.
895
+ * Preserve leading zeros; never fill the seed. Custom algorithms, digits, periods,
896
+ * and form enrollment are unsupported. A passkey value is a JSON-encoded FIDO
897
+ * Credential Exchange Format passkey object with unpadded base64url
898
+ * `credentialId`, `userHandle` (at most 64 bytes), and `key` (a PKCS#8 ECDSA P-256
899
+ * private key), a lowercase `rpId` domain, and optional `username` and
900
+ * `userDisplayName`. Other CXF members are ignored. Passkeys are never filled into
901
+ * pages.
843
902
  */
844
903
  type: CredentialVaultFieldType;
845
904
 
@@ -872,9 +931,9 @@ export interface CredentialVaultFieldInput {
872
931
  /**
873
932
  * Set false explicitly for ordinary usernames, email addresses, and other
874
933
  * non-secret identifiers. Reserve true for secrets such as passwords, API tokens,
875
- * and TOTP seeds. Password and totp fields must be true. Omission defaults to true
876
- * for safety; do not rely on that default for every field. False permits API reads
877
- * and form prefilling.
934
+ * and TOTP seeds. Password, totp, and passkey fields must be true. Omission
935
+ * defaults to true for safety; do not rely on that default for every field. False
936
+ * permits API reads and form prefilling.
878
937
  */
879
938
  sensitive?: boolean;
880
939
 
@@ -900,16 +959,21 @@ export interface CredentialVaultFieldState {
900
959
  }
901
960
 
902
961
  /**
903
- * Text, email, and password have form inputs; totp does not and is omitted from
904
- * both Kernel-hosted and customer React forms. Password and totp must be
905
- * sensitive. A totp value is an RFC 4648 Base32 generator seed (case-insensitive,
906
- * optional trailing padding), not an otpauth URI or current code. Reject invalid
907
- * or empty decoded seeds. Browser fill generates an RFC 6238 code at execution
908
- * time using HMAC-SHA1, 6 digits, and a 30-second period. Preserve leading zeros;
909
- * never fill the seed. Custom algorithms, digits, periods, and form enrollment are
910
- * unsupported.
962
+ * Text, email, and password have form inputs; totp and passkey do not and are
963
+ * omitted from both Kernel-hosted and customer React forms. Password, totp, and
964
+ * passkey must be sensitive. A totp value is an RFC 4648 Base32 generator seed
965
+ * (case-insensitive, optional trailing padding), not an otpauth URI or current
966
+ * code. Reject invalid or empty decoded seeds. Browser fill generates an RFC 6238
967
+ * code at execution time using HMAC-SHA1, 6 digits, and a 30-second period.
968
+ * Preserve leading zeros; never fill the seed. Custom algorithms, digits, periods,
969
+ * and form enrollment are unsupported. A passkey value is a JSON-encoded FIDO
970
+ * Credential Exchange Format passkey object with unpadded base64url
971
+ * `credentialId`, `userHandle` (at most 64 bytes), and `key` (a PKCS#8 ECDSA P-256
972
+ * private key), a lowercase `rpId` domain, and optional `username` and
973
+ * `userDisplayName`. Other CXF members are ignored. Passkeys are never filled into
974
+ * pages.
911
975
  */
912
- export type CredentialVaultFieldType = 'text' | 'email' | 'password' | 'totp';
976
+ export type CredentialVaultFieldType = 'text' | 'email' | 'password' | 'totp' | 'passkey';
913
977
 
914
978
  /**
915
979
  * Set exactly one of value or encrypted_value. Use value unless the update comes
@@ -938,8 +1002,9 @@ export interface CredentialVaultFieldUpdate {
938
1002
  * immediately clear the stored value. Clearing a required form-supported field
939
1003
  * reopens collection; clearing an optional field does not prevent readiness.
940
1004
  * Values must satisfy the declared field type. For totp, value is the generator
941
- * seed, never a current code. Clearing a required totp field returns 400 because
942
- * it cannot be collected in a form.
1005
+ * seed, never a current code. For passkey, value is the JSON-encoded CXF passkey
1006
+ * object. Clearing a required totp or passkey field returns 400 because it cannot
1007
+ * be collected in a form.
943
1008
  */
944
1009
  value?: string | null;
945
1010
  }
@@ -986,30 +1051,31 @@ export interface CredentialVaultItem {
986
1051
 
987
1052
  /**
988
1053
  * One schema-derived form for the item, available in ready or pending_collection
989
- * state. Render every form-supported field as editable; omit totp fields and
990
- * preserve their stored seeds. Prefill non-sensitive values, and allow existing
991
- * sensitive values to be preserved or replaced without ever revealing them. No
992
- * field subsets or per-request form configuration exist. Validate required fields
993
- * against the resulting values, including preserved secrets. Submit changed values
994
- * only, using the version used to render the form. Scoped hosted submission
995
- * rejects totp edits; seed writes require the ordinary authenticated item API.
996
- * Customer forms likewise omit totp from their payloads. Save edits atomically. A
997
- * successful hosted submission increments the version, marks ready, and consumes
998
- * the session; an empty edit may complete collection while preserving values. A
999
- * customer form uses PATCH for changed values and does not send an empty PATCH
1000
- * when nothing changed. Kernel-hosted bearer sessions require no Kernel account
1001
- * and are bound to the item version. Expired, superseded, consumed, or
1002
- * deleted-item sessions cannot submit. Authenticated item GET renews expired
1003
- * active sessions for ready or pending items; pending items always receive an
1004
- * action. A ready item with no active session omits the action until collect is
1005
- * invoked. Concurrent renewals return the same link. Renewal changes neither
1006
- * values nor item version. An expired link cannot renew itself. The hosted form
1007
- * handles its collection protocol; callers only open the returned URL and do not
1008
- * extract or submit its token through the public API. For customer-hosted forms,
1009
- * use @onkernel/vault-react and an authenticated customer backend calling the
1010
- * ordinary item GET/PATCH API. Kernel does not store customer collection URLs or
1011
- * authenticate the customer's end users. Treat URLs and submitted values as
1012
- * secrets and exclude them from logs, traces, and errors.
1054
+ * state. Render every form-supported field as editable; omit totp and passkey
1055
+ * fields and preserve their stored values. Prefill non-sensitive values, and allow
1056
+ * existing sensitive values to be preserved or replaced without ever revealing
1057
+ * them. No field subsets or per-request form configuration exist. Validate
1058
+ * required fields against the resulting values, including preserved secrets.
1059
+ * Submit changed values only, using the version used to render the form. Scoped
1060
+ * hosted submission rejects totp and passkey edits; those writes require the
1061
+ * ordinary authenticated item API. Customer forms likewise omit them from their
1062
+ * payloads. Save edits atomically. A successful hosted submission increments the
1063
+ * version, marks ready, and consumes the session; an empty edit may complete
1064
+ * collection while preserving values. A customer form uses PATCH for changed
1065
+ * values and does not send an empty PATCH when nothing changed. Kernel-hosted
1066
+ * bearer sessions require no Kernel account and are bound to the item version.
1067
+ * Expired, superseded, consumed, or deleted-item sessions cannot submit.
1068
+ * Authenticated item GET renews expired active sessions for ready or pending
1069
+ * items; pending items always receive an action. A ready item with no active
1070
+ * session omits the action until collect is invoked. Concurrent renewals return
1071
+ * the same link. Renewal changes neither values nor item version. An expired link
1072
+ * cannot renew itself. The hosted form handles its collection protocol; callers
1073
+ * only open the returned URL and do not extract or submit its token through the
1074
+ * public API. For customer-hosted forms, use @onkernel/vault-react and an
1075
+ * authenticated customer backend calling the ordinary item GET/PATCH API. Kernel
1076
+ * does not store customer collection URLs or authenticate the customer's end
1077
+ * users. Treat URLs and submitted values as secrets and exclude them from logs,
1078
+ * traces, and errors.
1013
1079
  */
1014
1080
  action?: CredentialCollectionAction | CredentialVaultItem.OnePasswordAccessApprovalAction;
1015
1081
  }
@@ -1115,6 +1181,14 @@ export type CredentialVaultItemSpecInput =
1115
1181
  | ManagedAuthCredentialVaultItemSpecInput;
1116
1182
 
1117
1183
  export interface CredentialVaultItemSpecUpdate {
1184
+ /**
1185
+ * Field definitions to append, with the same defaults as creation. Set their
1186
+ * values in `fields` in the same update. Names must be unique after removals; at
1187
+ * most 32 fields may result. A required totp or passkey field needs a value in
1188
+ * `fields`.
1189
+ */
1190
+ add_fields?: Array<CredentialVaultFieldDefinitionInput>;
1191
+
1118
1192
  /**
1119
1193
  * Recognizable site or service name used as the form title, without suffixes such
1120
1194
  * as sign-in credentials. An empty string clears it. Display text only, not an
@@ -1123,6 +1197,12 @@ export interface CredentialVaultItemSpecUpdate {
1123
1197
  description?: string;
1124
1198
 
1125
1199
  fields?: { [key: string]: CredentialVaultFieldUpdate };
1200
+
1201
+ /**
1202
+ * Names of fields to delete with their values. Unknown names return 400. At least
1203
+ * one field must remain.
1204
+ */
1205
+ remove_fields?: Array<string>;
1126
1206
  }
1127
1207
 
1128
1208
  export type CredentialVaultItemState =
@@ -1131,15 +1211,18 @@ export type CredentialVaultItemState =
1131
1211
  | ManagedAuthCredentialVaultItemState;
1132
1212
 
1133
1213
  /**
1134
- * Atomically update description and selected values. Omitted properties are
1135
- * preserved. Field names, types, required flags, and sensitivity cannot change.
1136
- * Unknown field names return 400; stale versions or mismatched item types return
1137
- * 409 without changing the item. A successful update increments version and
1138
- * invalidates outstanding Kernel-hosted collection sessions. If required values
1139
- * remain missing, return pending_collection and a fresh collection action.
1140
- * Otherwise return ready without an action; collect can open the form again
1141
- * without clearing values. Customer URLs have no Kernel-managed expiry. 1Password
1142
- * and managed auth credentials return 409.
1214
+ * Atomically update description, field definitions, and selected values. Omitted
1215
+ * properties are preserved. `remove_fields` deletes definitions and their values,
1216
+ * then `add_fields` appends definitions, then `fields` sets values, including for
1217
+ * added fields. An existing field's definition cannot be edited in place; to
1218
+ * change it, remove the field and add it again, in the same update or a later one.
1219
+ * The old value is deleted with it. Unknown field names return 400; stale versions
1220
+ * or mismatched item types return 409 without changing the item. A successful
1221
+ * update increments version and invalidates outstanding Kernel-hosted collection
1222
+ * sessions. If required values remain missing, return pending_collection and a
1223
+ * fresh collection action. Otherwise return ready without an action; collect can
1224
+ * open the form again without clearing values. Customer URLs have no
1225
+ * Kernel-managed expiry. 1Password and managed auth credentials return 409.
1143
1226
  */
1144
1227
  export interface CredentialVaultItemUpdateRequest {
1145
1228
  spec: CredentialVaultItemSpecUpdate;
@@ -1232,13 +1315,13 @@ export interface FillVaultItemOperationResult {
1232
1315
  }
1233
1316
 
1234
1317
  /**
1235
- * A ready Kernel card retains its encrypted network token and one-time code for
1236
- * the fill operation until the item's expires_at. Fill and submit checkout before
1237
- * then. Visa purchases require a spend_approval action before the code is issued;
1238
- * Mastercard purchases need no hosted approval. masks.last4 is the enrolled card's
1239
- * last four digits; masks.token_last4 is the network token's last four digits
1240
- * shown to the merchant. Kernel cards do not expose aliases or support egress
1241
- * substitution. Kernel does not observe whether the merchant charged the card.
1318
+ * A ready Kernel card supports authorize, fill, then submit checkout. Card details
1319
+ * are delivered for a few minutes after fill; submit promptly. Repeated fill is
1320
+ * safe and never submits checkout. Visa purchases require a spend_approval action
1321
+ * before details are issued; Mastercard purchases need no hosted approval.
1322
+ * masks.last4 is the enrolled card's last four digits; masks.token_last4, when
1323
+ * present, is the token's last four digits shown to the merchant. Kernel does not
1324
+ * observe whether the merchant charged the card.
1242
1325
  */
1243
1326
  export interface KernelCardState {
1244
1327
  provider: 'kernel';
@@ -1252,10 +1335,12 @@ export interface KernelCardState {
1252
1335
  * fresh local verification link; this does not approve spending or replay any
1253
1336
  * provider request. Unclassified legacy recovery and uncertain intent creation
1254
1337
  * cannot restart. Kernel never approves again or issues another code for the item
1255
- * automatically, and the item cannot be deleted or replaced until the original
1256
- * attempt is reconciled with support. When status_reason says the provider refused
1257
- * retrieval before acceptance, no code was issued and a later read retries.
1258
- * declined means the card network refused to issue a code.
1338
+ * automatically. To continue, delete this card and create a new purchase; the
1339
+ * cardholder approves the new purchase separately. Recovery while reporting a
1340
+ * merchant transaction cannot be deleted and must be reconciled with support. When
1341
+ * status_reason says the provider refused retrieval before acceptance, no code was
1342
+ * issued and a later read retries. declined means the card network refused to
1343
+ * issue a code.
1259
1344
  */
1260
1345
  status:
1261
1346
  | 'requested'
@@ -1300,12 +1385,17 @@ export namespace KernelCardState {
1300
1385
  * Mastercard purchases need no cardholder approval. A Visa purchase returns a
1301
1386
  * spend_approval action: the cardholder approves it with a Visa passkey, and
1302
1387
  * Kernel registers a Visa intent for one transaction up to the amount before
1303
- * issuing the code. Card updates are not supported; delete and create a new item
1304
- * instead.
1388
+ * issuing the code. For supported cards whose network cannot be enrolled for
1389
+ * agentic tokens, authorize prepares checkout details without issuing a one-time
1390
+ * code. The card can be filled into one checkout before its expires_at, one hour
1391
+ * after authorization. Fill types those details on merchant_url's origin. The
1392
+ * amount, merchant_url and merchant_country are recorded but do not restrict
1393
+ * payment requests sent by the browser. Card updates are not supported; delete and
1394
+ * create a new item instead.
1305
1395
  */
1306
1396
  export interface KernelCardVaultItemSpec {
1307
1397
  /**
1308
- * Integer amount in minor currency units (at most 50000), bound to the one-time
1398
+ * Integer amount in minor currency units (at most 1000000), bound to the one-time
1309
1399
  * code.
1310
1400
  */
1311
1401
  amount: number;
@@ -1428,9 +1518,10 @@ export interface KernelWalletState {
1428
1518
  * number never reaches Kernel. The connected wallet's payment_methods expansion
1429
1519
  * lists the card; capabilities.single_use_card.eligible is false, with a
1430
1520
  * network_token*\* reason, until the card has a network token, and authorize
1431
- * returns 400 for such a card. Visa purchases require the cardholder to complete a
1432
- * spend_approval action before Kernel issues a one-time code; Mastercard purchases
1433
- * need no hosted approval.
1521
+ * returns 400 for such a card unless Kernel supports checkout delivery without a
1522
+ * network token for that card. In that case, fill types the checkout details. Visa
1523
+ * purchases require the cardholder to complete a spend_approval action before
1524
+ * Kernel issues a one-time code; Mastercard purchases need no hosted approval.
1434
1525
  */
1435
1526
  export interface KernelWalletVaultItemSpec {
1436
1527
  provider: 'kernel';
@@ -1438,14 +1529,19 @@ export interface KernelWalletVaultItemSpec {
1438
1529
 
1439
1530
  export interface ManagedAuthCredentialVaultField {
1440
1531
  /**
1441
- * Text, email, and password have form inputs; totp does not and is omitted from
1442
- * both Kernel-hosted and customer React forms. Password and totp must be
1443
- * sensitive. A totp value is an RFC 4648 Base32 generator seed (case-insensitive,
1444
- * optional trailing padding), not an otpauth URI or current code. Reject invalid
1445
- * or empty decoded seeds. Browser fill generates an RFC 6238 code at execution
1446
- * time using HMAC-SHA1, 6 digits, and a 30-second period. Preserve leading zeros;
1447
- * never fill the seed. Custom algorithms, digits, periods, and form enrollment are
1448
- * unsupported.
1532
+ * Text, email, and password have form inputs; totp and passkey do not and are
1533
+ * omitted from both Kernel-hosted and customer React forms. Password, totp, and
1534
+ * passkey must be sensitive. A totp value is an RFC 4648 Base32 generator seed
1535
+ * (case-insensitive, optional trailing padding), not an otpauth URI or current
1536
+ * code. Reject invalid or empty decoded seeds. Browser fill generates an RFC 6238
1537
+ * code at execution time using HMAC-SHA1, 6 digits, and a 30-second period.
1538
+ * Preserve leading zeros; never fill the seed. Custom algorithms, digits, periods,
1539
+ * and form enrollment are unsupported. A passkey value is a JSON-encoded FIDO
1540
+ * Credential Exchange Format passkey object with unpadded base64url
1541
+ * `credentialId`, `userHandle` (at most 64 bytes), and `key` (a PKCS#8 ECDSA P-256
1542
+ * private key), a lowercase `rpId` domain, and optional `username` and
1543
+ * `userDisplayName`. Other CXF members are ignored. Passkeys are never filled into
1544
+ * pages.
1449
1545
  */
1450
1546
  type: CredentialVaultFieldType;
1451
1547
  }
@@ -2117,8 +2213,16 @@ export namespace VaultItem {
2117
2213
  * select a customer-owned configuration. Mode (sandbox vs live) is determined by
2118
2214
  * the selected credential; there is no per-item test flag. Without user_id,
2119
2215
  * creation returns a hosted enrollment action and Kernel polls until the user
2120
- * connects. user_id may only reference a user already enrolled by a wallet in this
2121
- * organization under the same configuration.
2216
+ * connects. With a customer-owned provider_config, user_id imports an existing
2217
+ * connection after verifying access with the selected credentials in their sandbox
2218
+ * or live mode; no hosted enrollment is needed, even if the connected user has no
2219
+ * stored cards. With Kernel-managed credentials, user_id may only reference a user
2220
+ * already enrolled by a wallet in this organization under the same configuration.
2221
+ * The user and configuration bindings cannot be changed after creation. Import
2222
+ * validation is read-only and runs before creation: a failed validation leaves no
2223
+ * wallet or reserved key, so the user_id can be corrected and retried. Concurrent
2224
+ * imports of the same key may both validate, but create at most one wallet and
2225
+ * connected event.
2122
2226
  */
2123
2227
  spec: ItemsAPI.WalletVaultItemSpec;
2124
2228
 
@@ -2353,8 +2457,16 @@ export namespace VaultItemOperationResponse {
2353
2457
  * select a customer-owned configuration. Mode (sandbox vs live) is determined by
2354
2458
  * the selected credential; there is no per-item test flag. Without user_id,
2355
2459
  * creation returns a hosted enrollment action and Kernel polls until the user
2356
- * connects. user_id may only reference a user already enrolled by a wallet in this
2357
- * organization under the same configuration.
2460
+ * connects. With a customer-owned provider_config, user_id imports an existing
2461
+ * connection after verifying access with the selected credentials in their sandbox
2462
+ * or live mode; no hosted enrollment is needed, even if the connected user has no
2463
+ * stored cards. With Kernel-managed credentials, user_id may only reference a user
2464
+ * already enrolled by a wallet in this organization under the same configuration.
2465
+ * The user and configuration bindings cannot be changed after creation. Import
2466
+ * validation is read-only and runs before creation: a failed validation leaves no
2467
+ * wallet or reserved key, so the user_id can be corrected and retried. Concurrent
2468
+ * imports of the same key may both validate, but create at most one wallet and
2469
+ * connected event.
2358
2470
  */
2359
2471
  spec: ItemsAPI.WalletVaultItemSpec;
2360
2472
 
@@ -2547,7 +2659,7 @@ export namespace VaultPaymentMethod {
2547
2659
  export interface VaultWebmcpBinding {
2548
2660
  /**
2549
2661
  * A declared, populated credential field or supported card field. A TOTP field
2550
- * supplies a fresh code, never its seed.
2662
+ * supplies a fresh code, never its seed. Passkey fields cannot be filled.
2551
2663
  */
2552
2664
  field: string;
2553
2665
 
@@ -2570,8 +2682,16 @@ export interface VaultWebmcpBinding {
2570
2682
  * select a customer-owned configuration. Mode (sandbox vs live) is determined by
2571
2683
  * the selected credential; there is no per-item test flag. Without user_id,
2572
2684
  * creation returns a hosted enrollment action and Kernel polls until the user
2573
- * connects. user_id may only reference a user already enrolled by a wallet in this
2574
- * organization under the same configuration.
2685
+ * connects. With a customer-owned provider_config, user_id imports an existing
2686
+ * connection after verifying access with the selected credentials in their sandbox
2687
+ * or live mode; no hosted enrollment is needed, even if the connected user has no
2688
+ * stored cards. With Kernel-managed credentials, user_id may only reference a user
2689
+ * already enrolled by a wallet in this organization under the same configuration.
2690
+ * The user and configuration bindings cannot be changed after creation. Import
2691
+ * validation is read-only and runs before creation: a failed validation leaves no
2692
+ * wallet or reserved key, so the user_id can be corrected and retried. Concurrent
2693
+ * imports of the same key may both validate, but create at most one wallet and
2694
+ * connected event.
2575
2695
  */
2576
2696
  export type WalletVaultItemSpec =
2577
2697
  | WalletVaultItemSpec.LinkWalletVaultItemSpec
@@ -2628,8 +2748,16 @@ export namespace WalletVaultItemSpec {
2628
2748
  * select a customer-owned configuration. Mode (sandbox vs live) is determined by
2629
2749
  * the selected credential; there is no per-item test flag. Without user_id,
2630
2750
  * creation returns a hosted enrollment action and Kernel polls until the user
2631
- * connects. user_id may only reference a user already enrolled by a wallet in this
2632
- * organization under the same configuration.
2751
+ * connects. With a customer-owned provider_config, user_id imports an existing
2752
+ * connection after verifying access with the selected credentials in their sandbox
2753
+ * or live mode; no hosted enrollment is needed, even if the connected user has no
2754
+ * stored cards. With Kernel-managed credentials, user_id may only reference a user
2755
+ * already enrolled by a wallet in this organization under the same configuration.
2756
+ * The user and configuration bindings cannot be changed after creation. Import
2757
+ * validation is read-only and runs before creation: a failed validation leaves no
2758
+ * wallet or reserved key, so the user_id can be corrected and retried. Concurrent
2759
+ * imports of the same key may both validate, but create at most one wallet and
2760
+ * connected event.
2633
2761
  */
2634
2762
  export interface AgentCardWalletVaultItemSpec {
2635
2763
  provider: 'agentcard';
@@ -3219,8 +3347,16 @@ export declare namespace ItemUpsertParams {
3219
3347
  * credentials, or select a customer-owned configuration. Mode (sandbox vs live) is
3220
3348
  * determined by the selected credential; there is no per-item test flag. Without
3221
3349
  * user_id, creation returns a hosted enrollment action and Kernel polls until the
3222
- * user connects. user_id may only reference a user already enrolled by a wallet in
3223
- * this organization under the same configuration.
3350
+ * user connects. With a customer-owned provider_config, user_id imports an
3351
+ * existing connection after verifying access with the selected credentials in
3352
+ * their sandbox or live mode; no hosted enrollment is needed, even if the
3353
+ * connected user has no stored cards. With Kernel-managed credentials, user_id may
3354
+ * only reference a user already enrolled by a wallet in this organization under
3355
+ * the same configuration. The user and configuration bindings cannot be changed
3356
+ * after creation. Import validation is read-only and runs before creation: a
3357
+ * failed validation leaves no wallet or reserved key, so the user_id can be
3358
+ * corrected and retried. Concurrent imports of the same key may both validate, but
3359
+ * create at most one wallet and connected event.
3224
3360
  */
3225
3361
  spec:
3226
3362
  | WalletVaultItemRequest.LinkWalletVaultItemRequestSpec
@@ -3349,8 +3485,16 @@ export declare namespace ItemUpsertParams {
3349
3485
  * select a customer-owned configuration. Mode (sandbox vs live) is determined by
3350
3486
  * the selected credential; there is no per-item test flag. Without user_id,
3351
3487
  * creation returns a hosted enrollment action and Kernel polls until the user
3352
- * connects. user_id may only reference a user already enrolled by a wallet in this
3353
- * organization under the same configuration.
3488
+ * connects. With a customer-owned provider_config, user_id imports an existing
3489
+ * connection after verifying access with the selected credentials in their sandbox
3490
+ * or live mode; no hosted enrollment is needed, even if the connected user has no
3491
+ * stored cards. With Kernel-managed credentials, user_id may only reference a user
3492
+ * already enrolled by a wallet in this organization under the same configuration.
3493
+ * The user and configuration bindings cannot be changed after creation. Import
3494
+ * validation is read-only and runs before creation: a failed validation leaves no
3495
+ * wallet or reserved key, so the user_id can be corrected and retried. Concurrent
3496
+ * imports of the same key may both validate, but create at most one wallet and
3497
+ * connected event.
3354
3498
  */
3355
3499
  export interface AgentCardWalletVaultItemSpec {
3356
3500
  provider: 'agentcard';
@@ -3452,6 +3596,7 @@ export declare namespace Items {
3452
3596
  type CredentialAccountVaultItemRequest as CredentialAccountVaultItemRequest,
3453
3597
  type CredentialCollectionAction as CredentialCollectionAction,
3454
3598
  type CredentialVaultFieldDefinition as CredentialVaultFieldDefinition,
3599
+ type CredentialVaultFieldDefinitionInput as CredentialVaultFieldDefinitionInput,
3455
3600
  type CredentialVaultFieldInput as CredentialVaultFieldInput,
3456
3601
  type CredentialVaultFieldState as CredentialVaultFieldState,
3457
3602
  type CredentialVaultFieldType as CredentialVaultFieldType,