@onkernel/sdk 0.156.0 → 0.158.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 (110) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +2 -3
  3. package/client.d.mts +2 -2
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +2 -2
  6. package/client.d.ts.map +1 -1
  7. package/client.js +8 -15
  8. package/client.js.map +1 -1
  9. package/client.mjs +9 -16
  10. package/client.mjs.map +1 -1
  11. package/core/streaming.d.mts.map +1 -1
  12. package/core/streaming.d.ts.map +1 -1
  13. package/core/streaming.js +1 -2
  14. package/core/streaming.js.map +1 -1
  15. package/core/streaming.mjs +1 -2
  16. package/core/streaming.mjs.map +1 -1
  17. package/internal/parse.d.mts.map +1 -1
  18. package/internal/parse.d.ts.map +1 -1
  19. package/internal/parse.js +0 -3
  20. package/internal/parse.js.map +1 -1
  21. package/internal/parse.mjs +0 -3
  22. package/internal/parse.mjs.map +1 -1
  23. package/internal/utils/log.d.mts +9 -14
  24. package/internal/utils/log.d.mts.map +1 -1
  25. package/internal/utils/log.d.ts +9 -14
  26. package/internal/utils/log.d.ts.map +1 -1
  27. package/internal/utils/log.js +13 -25
  28. package/internal/utils/log.js.map +1 -1
  29. package/internal/utils/log.mjs +10 -23
  30. package/internal/utils/log.mjs.map +1 -1
  31. package/package.json +1 -1
  32. package/resources/auth/connections.d.mts +5 -1
  33. package/resources/auth/connections.d.mts.map +1 -1
  34. package/resources/auth/connections.d.ts +5 -1
  35. package/resources/auth/connections.d.ts.map +1 -1
  36. package/resources/auth/connections.js +5 -1
  37. package/resources/auth/connections.js.map +1 -1
  38. package/resources/auth/connections.mjs +5 -1
  39. package/resources/auth/connections.mjs.map +1 -1
  40. package/resources/auth/context.d.mts +3 -2
  41. package/resources/auth/context.d.mts.map +1 -1
  42. package/resources/auth/context.d.ts +3 -2
  43. package/resources/auth/context.d.ts.map +1 -1
  44. package/resources/browser-pools.d.mts +5 -0
  45. package/resources/browser-pools.d.mts.map +1 -1
  46. package/resources/browser-pools.d.ts +5 -0
  47. package/resources/browser-pools.d.ts.map +1 -1
  48. package/resources/browser-pools.js +5 -0
  49. package/resources/browser-pools.js.map +1 -1
  50. package/resources/browser-pools.mjs +5 -0
  51. package/resources/browser-pools.mjs.map +1 -1
  52. package/resources/browsers/browsers.d.mts +56 -12
  53. package/resources/browsers/browsers.d.mts.map +1 -1
  54. package/resources/browsers/browsers.d.ts +56 -12
  55. package/resources/browsers/browsers.d.ts.map +1 -1
  56. package/resources/browsers/browsers.js +16 -2
  57. package/resources/browsers/browsers.js.map +1 -1
  58. package/resources/browsers/browsers.mjs +16 -2
  59. package/resources/browsers/browsers.mjs.map +1 -1
  60. package/resources/browsers/index.d.mts +1 -1
  61. package/resources/browsers/index.d.mts.map +1 -1
  62. package/resources/browsers/index.d.ts +1 -1
  63. package/resources/browsers/index.d.ts.map +1 -1
  64. package/resources/browsers/index.js.map +1 -1
  65. package/resources/browsers/index.mjs.map +1 -1
  66. package/resources/deployments.d.mts +12 -8
  67. package/resources/deployments.d.mts.map +1 -1
  68. package/resources/deployments.d.ts +12 -8
  69. package/resources/deployments.d.ts.map +1 -1
  70. package/resources/index.d.mts +1 -1
  71. package/resources/index.d.mts.map +1 -1
  72. package/resources/index.d.ts +1 -1
  73. package/resources/index.d.ts.map +1 -1
  74. package/resources/index.js.map +1 -1
  75. package/resources/index.mjs.map +1 -1
  76. package/resources/profiles.d.mts +9 -1
  77. package/resources/profiles.d.mts.map +1 -1
  78. package/resources/profiles.d.ts +9 -1
  79. package/resources/profiles.d.ts.map +1 -1
  80. package/resources/profiles.js +9 -1
  81. package/resources/profiles.js.map +1 -1
  82. package/resources/profiles.mjs +9 -1
  83. package/resources/profiles.mjs.map +1 -1
  84. package/resources/proxies.d.mts +11 -10
  85. package/resources/proxies.d.mts.map +1 -1
  86. package/resources/proxies.d.ts +11 -10
  87. package/resources/proxies.d.ts.map +1 -1
  88. package/resources/vaults/items.d.mts +25 -23
  89. package/resources/vaults/items.d.mts.map +1 -1
  90. package/resources/vaults/items.d.ts +25 -23
  91. package/resources/vaults/items.d.ts.map +1 -1
  92. package/src/client.ts +11 -15
  93. package/src/core/streaming.ts +1 -2
  94. package/src/internal/parse.ts +0 -4
  95. package/src/internal/utils/log.ts +13 -38
  96. package/src/resources/auth/connections.ts +5 -1
  97. package/src/resources/auth/context.ts +3 -2
  98. package/src/resources/browser-pools.ts +5 -0
  99. package/src/resources/browsers/browsers.ts +60 -11
  100. package/src/resources/browsers/index.ts +1 -0
  101. package/src/resources/deployments.ts +12 -8
  102. package/src/resources/index.ts +1 -0
  103. package/src/resources/profiles.ts +9 -1
  104. package/src/resources/proxies.ts +11 -10
  105. package/src/resources/vaults/items.ts +25 -23
  106. package/src/version.ts +1 -1
  107. package/version.d.mts +1 -1
  108. package/version.d.ts +1 -1
  109. package/version.js +1 -1
  110. package/version.mjs +1 -1
@@ -543,10 +543,12 @@ export interface DeploymentCreateParams {
543
543
  * It cannot include api_keys:issue_beyond_expiry. Exact resource IDs must exist.
544
544
  * The policy outlives the deploying credential; each invocation gets a fresh key
545
545
  * valid for 65 minutes from issuance. When the caller has a policy, omission
546
- * grants only project-wide invocations:write for runtime callbacks. A supplied
547
- * policy must explicitly include that permission; it is never added automatically.
548
- * Callers without a policy keep an unrestricted runtime key when this field is
549
- * omitted. Scoped invokers must cover the runtime policy.
546
+ * grants project-wide invocations:write for runtime callbacks, plus project-wide
547
+ * browsers:create, browsers:use, and browsers:delete for each of those the caller
548
+ * holds. A supplied policy must explicitly include invocations:write; it is never
549
+ * added automatically. To keep callback-only behavior, send a runtime_policy with
550
+ * just that grant. Callers without a policy keep an unrestricted runtime key when
551
+ * this field is omitted. Scoped invokers must cover the runtime policy.
550
552
  */
551
553
  runtime_policy?: DeploymentCreateParams.RuntimePolicy;
552
554
 
@@ -570,10 +572,12 @@ export namespace DeploymentCreateParams {
570
572
  * It cannot include api_keys:issue_beyond_expiry. Exact resource IDs must exist.
571
573
  * The policy outlives the deploying credential; each invocation gets a fresh key
572
574
  * valid for 65 minutes from issuance. When the caller has a policy, omission
573
- * grants only project-wide invocations:write for runtime callbacks. A supplied
574
- * policy must explicitly include that permission; it is never added automatically.
575
- * Callers without a policy keep an unrestricted runtime key when this field is
576
- * omitted. Scoped invokers must cover the runtime policy.
575
+ * grants project-wide invocations:write for runtime callbacks, plus project-wide
576
+ * browsers:create, browsers:use, and browsers:delete for each of those the caller
577
+ * holds. A supplied policy must explicitly include invocations:write; it is never
578
+ * added automatically. To keep callback-only behavior, send a runtime_policy with
579
+ * just that grant. Callers without a policy keep an unrestricted runtime key when
580
+ * this field is omitted. Scoped invokers must cover the runtime policy.
577
581
  */
578
582
  export interface RuntimePolicy {
579
583
  /**
@@ -42,6 +42,7 @@ export {
42
42
  export {
43
43
  Browsers,
44
44
  type BrowserAllowlistState,
45
+ type BrowserBandwidth,
45
46
  type BrowserCaptchaSolver,
46
47
  type BrowserCost,
47
48
  type BrowserFingerprint,
@@ -15,7 +15,9 @@ import { path } from '../internal/utils/path';
15
15
  export class Profiles extends APIResource {
16
16
  /**
17
17
  * Create a browser profile that can be used to load state into future browser
18
- * sessions.
18
+ * sessions. Returns 409 with code `profile_storage_unavailable` if the profile
19
+ * would be stored in the organization's own storage bucket and that storage is
20
+ * paused.
19
21
  *
20
22
  * @example
21
23
  * ```ts
@@ -103,6 +105,12 @@ export class Profiles extends APIResource {
103
105
  * `format=tar` to decompress current profiles during download; legacy profiles
104
106
  * remain JSON.
105
107
  *
108
+ * Returns 409 with code `profile_storage_unavailable` if the profile is stored in
109
+ * the organization's own storage bucket and that storage is paused or Kernel can't
110
+ * reach it, or the object there doesn't start with a profile archive's header or
111
+ * is larger than 512 MiB. With `format=tar`, it also returns 409 if the archive
112
+ * can't be decompressed; without it, the archive is returned as stored.
113
+ *
106
114
  * @example
107
115
  * ```ts
108
116
  * const response = await client.profiles.download(
@@ -1123,16 +1123,17 @@ export interface ProxyCheckParams {
1123
1123
  /**
1124
1124
  * An optional URL to test reachability against. If provided, the proxy check will
1125
1125
  * test connectivity to this URL instead of the default test URLs. Only HTTP and
1126
- * HTTPS schemes are allowed, and the URL must resolve to a public IP address. For
1127
- * ISP proxies, the exit IP is stable, so a successful check reliably indicates
1128
- * that subsequent browser sessions will reach the target site with the same IP.
1129
- * For residential and mobile proxies, the exit node changes between requests, so a
1130
- * successful check validates proxy configuration but does not guarantee that a
1131
- * subsequent browser session will use the same exit IP or reach the same site — it
1132
- * is useful for verifying credentials and connectivity, not for predicting
1133
- * site-specific behavior. When provided, the check result does not update the
1134
- * proxy's health status, since a failure may indicate a problem with the target
1135
- * site rather than the proxy itself.
1126
+ * HTTPS schemes are allowed. The hostname is resolved by the proxy, not by Kernel;
1127
+ * a URL that names an IP address directly must use a public one. For ISP proxies,
1128
+ * the exit IP is stable, so a successful check reliably indicates that subsequent
1129
+ * browser sessions will reach the target site with the same IP. For residential
1130
+ * and mobile proxies, the exit node changes between requests, so a successful
1131
+ * check validates proxy configuration but does not guarantee that a subsequent
1132
+ * browser session will use the same exit IP or reach the same site — it is useful
1133
+ * for verifying credentials and connectivity, not for predicting site-specific
1134
+ * behavior. When provided, the check result does not update the proxy's health
1135
+ * status, since a failure may indicate a problem with the target site rather than
1136
+ * the proxy itself.
1136
1137
  */
1137
1138
  url?: string;
1138
1139
  }
@@ -1652,13 +1652,14 @@ export interface KernelCardState {
1652
1652
  * security-code collection on alias-mode purchases through the spend_approval
1653
1653
  * action; an unused link expires after 30 minutes. Alias-mode cards become ready
1654
1654
  * after collection and expire at the temporary security-code alias deadline, by
1655
- * default five minutes later. An expired alias purchase requires a new card.
1656
- * recovery_required means verification, approving the purchase or issuing the
1657
- * one-time code has an unresolved outcome. A server-classified initial attestation
1658
- * failure before intent dispatch may advertise restart_verification to prepare a
1659
- * fresh local verification link; this does not approve spending or replay any
1660
- * provider request. Unclassified legacy recovery and uncertain intent creation
1661
- * cannot restart. Kernel never approves again or issues another code for the item
1655
+ * default five or fifteen minutes later, depending on the card's storage backend.
1656
+ * An expired alias purchase requires a new card. recovery_required means
1657
+ * verification, approving the purchase or issuing the one-time code has an
1658
+ * unresolved outcome. A server-classified initial attestation failure before
1659
+ * intent dispatch may advertise restart_verification to prepare a fresh local
1660
+ * verification link; this does not approve spending or replay any provider
1661
+ * request. Unclassified legacy recovery and uncertain intent creation cannot
1662
+ * restart. Kernel never approves again or issues another code for the item
1662
1663
  * automatically. To continue, delete this card and create a new purchase; the
1663
1664
  * cardholder approves the new purchase separately. Recovery while reporting a
1664
1665
  * merchant transaction cannot be deleted and must be reconciled with support. When
@@ -1731,22 +1732,23 @@ export namespace KernelCardState {
1731
1732
  * issuing the code. For supported cards whose network cannot be enrolled for
1732
1733
  * agentic tokens, authorize returns pending_authorization with a spend_approval
1733
1734
  * action to collect a fresh security code in a hosted field. Once collected, the
1734
- * card is ready and can be filled before its expires_at, by default five minutes
1735
- * after collection. An expired card requires a new purchase. Fill types those
1736
- * details on merchant_url's origin. The amount, merchant_url and merchant_country
1737
- * are recorded but do not restrict payment requests sent by the browser. Card
1738
- * updates are not supported; delete and create a new item instead. With
1739
- * single_use_card the item is instead a single-use card whose details the caller
1740
- * supplies, such as a virtual card from its issuer. It is not funded by a payment
1741
- * method, is ready on creation, and supports only fill: Kernel stores the details
1742
- * encrypted, never returns them, and fills them on any https page whose
1743
- * registrable domain (state.domains) is merchant_url's, including its subdomains.
1744
- * Fill does not consume it. From expires_at it is expired and can no longer be
1745
- * filled; Kernel deletes its stored details shortly after expires_at. Deleting the
1746
- * card, its wallet or its vault deletes them immediately. amount, currency and the
1747
- * merchant fields are recorded but not enforced. Repeating the identical request
1748
- * returns the existing card; any other request with the same key returns 409, as
1749
- * does repeating it once the expired card's details have been deleted.
1735
+ * card is ready and can be filled before its expires_at, by default five or
1736
+ * fifteen minutes after collection, depending on the card's storage backend. An
1737
+ * expired card requires a new purchase. Fill types those details on merchant_url's
1738
+ * origin. The amount, merchant_url and merchant_country are recorded but do not
1739
+ * restrict payment requests sent by the browser. Card updates are not supported;
1740
+ * delete and create a new item instead. With single_use_card the item is instead a
1741
+ * single-use card whose details the caller supplies, such as a virtual card from
1742
+ * its issuer. It is not funded by a payment method, is ready on creation, and
1743
+ * supports only fill: Kernel stores the details encrypted, never returns them, and
1744
+ * fills them on any https page whose registrable domain (state.domains) is
1745
+ * merchant_url's, including its subdomains. Fill does not consume it. From
1746
+ * expires_at it is expired and can no longer be filled; Kernel deletes its stored
1747
+ * details shortly after expires_at. Deleting the card, its wallet or its vault
1748
+ * deletes them immediately. amount, currency and the merchant fields are recorded
1749
+ * but not enforced. Repeating the identical request returns the existing card; any
1750
+ * other request with the same key returns 409, as does repeating it once the
1751
+ * expired card's details have been deleted.
1750
1752
  */
1751
1753
  export interface KernelCardVaultItemSpec {
1752
1754
  /**
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.156.0'; // x-release-please-version
1
+ export const VERSION = '0.158.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.156.0";
1
+ export declare const VERSION = "0.158.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.156.0";
1
+ export declare const VERSION = "0.158.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.156.0'; // x-release-please-version
4
+ exports.VERSION = '0.158.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.156.0'; // x-release-please-version
1
+ export const VERSION = '0.158.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map