@onkernel/sdk 0.91.0 → 0.93.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 (58) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/package.json +1 -1
  3. package/resources/auth/connections.d.mts +28 -10
  4. package/resources/auth/connections.d.mts.map +1 -1
  5. package/resources/auth/connections.d.ts +28 -10
  6. package/resources/auth/connections.d.ts.map +1 -1
  7. package/resources/browsers/browsers.d.mts +2 -2
  8. package/resources/browsers/browsers.d.mts.map +1 -1
  9. package/resources/browsers/browsers.d.ts +2 -2
  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/index.d.mts +1 -1
  14. package/resources/browsers/index.d.mts.map +1 -1
  15. package/resources/browsers/index.d.ts +1 -1
  16. package/resources/browsers/index.d.ts.map +1 -1
  17. package/resources/browsers/index.js.map +1 -1
  18. package/resources/browsers/index.mjs.map +1 -1
  19. package/resources/browsers/telemetry.d.mts +66 -2
  20. package/resources/browsers/telemetry.d.mts.map +1 -1
  21. package/resources/browsers/telemetry.d.ts +66 -2
  22. package/resources/browsers/telemetry.d.ts.map +1 -1
  23. package/resources/organization/entitlements.d.mts +188 -0
  24. package/resources/organization/entitlements.d.mts.map +1 -0
  25. package/resources/organization/entitlements.d.ts +188 -0
  26. package/resources/organization/entitlements.d.ts.map +1 -0
  27. package/resources/organization/entitlements.js +20 -0
  28. package/resources/organization/entitlements.js.map +1 -0
  29. package/resources/organization/entitlements.mjs +16 -0
  30. package/resources/organization/entitlements.mjs.map +1 -0
  31. package/resources/organization/index.d.mts +1 -0
  32. package/resources/organization/index.d.mts.map +1 -1
  33. package/resources/organization/index.d.ts +1 -0
  34. package/resources/organization/index.d.ts.map +1 -1
  35. package/resources/organization/index.js +3 -1
  36. package/resources/organization/index.js.map +1 -1
  37. package/resources/organization/index.mjs +1 -0
  38. package/resources/organization/index.mjs.map +1 -1
  39. package/resources/organization/organization.d.mts +4 -0
  40. package/resources/organization/organization.d.mts.map +1 -1
  41. package/resources/organization/organization.d.ts +4 -0
  42. package/resources/organization/organization.d.ts.map +1 -1
  43. package/resources/organization/organization.js +4 -0
  44. package/resources/organization/organization.js.map +1 -1
  45. package/resources/organization/organization.mjs +4 -0
  46. package/resources/organization/organization.mjs.map +1 -1
  47. package/src/resources/auth/connections.ts +34 -12
  48. package/src/resources/browsers/browsers.ts +2 -0
  49. package/src/resources/browsers/index.ts +1 -0
  50. package/src/resources/browsers/telemetry.ts +84 -0
  51. package/src/resources/organization/entitlements.ts +234 -0
  52. package/src/resources/organization/index.ts +1 -0
  53. package/src/resources/organization/organization.ts +6 -0
  54. package/src/version.ts +1 -1
  55. package/version.d.mts +1 -1
  56. package/version.d.ts +1 -1
  57. package/version.js +1 -1
  58. package/version.mjs +1 -1
@@ -465,6 +465,12 @@ export interface ManagedAuth {
465
465
  */
466
466
  hosted_url?: string | null;
467
467
 
468
+ /**
469
+ * Opaque identifier for the current canonical interaction. Required when
470
+ * submitting fields or choices and changes for each new actionable pause.
471
+ */
472
+ interaction_id?: string | null;
473
+
468
474
  /**
469
475
  * @deprecated Deprecated alias for `last_auth_check_at`. Despite the name, this is
470
476
  * the last health-check timestamp, not the last successful authentication. Use
@@ -775,6 +781,11 @@ export namespace ManagedAuth {
775
781
  */
776
782
  id: string;
777
783
 
784
+ /**
785
+ * Why the field requires user input.
786
+ */
787
+ reason: 'missing' | 'rejected';
788
+
778
789
  /**
779
790
  * Credential reference name to store the submitted value under.
780
791
  */
@@ -800,12 +811,6 @@ export namespace ManagedAuth {
800
811
  */
801
812
  observed_selector?: string | null;
802
813
 
803
- /**
804
- * Whether the submitted value must replace an existing credential after explicit
805
- * rejection.
806
- */
807
- replace_existing?: boolean;
808
-
809
814
  /**
810
815
  * Whether this field is required.
811
816
  */
@@ -1555,6 +1560,12 @@ export interface SubmitFieldsRequest {
1555
1560
  */
1556
1561
  fields?: { [key: string]: string };
1557
1562
 
1563
+ /**
1564
+ * Opaque interaction ID returned with canonical fields and choices. Required for
1565
+ * canonical submissions.
1566
+ */
1567
+ interaction_id?: string;
1568
+
1558
1569
  /**
1559
1570
  * The MFA method type to select (when mfa_options were returned)
1560
1571
  */
@@ -1670,6 +1681,12 @@ export namespace ConnectionFollowResponse {
1670
1681
  */
1671
1682
  hosted_url?: string;
1672
1683
 
1684
+ /**
1685
+ * Opaque identifier for the current canonical interaction. Required when
1686
+ * submitting fields or choices and changes for each new actionable pause.
1687
+ */
1688
+ interaction_id?: string;
1689
+
1673
1690
  /**
1674
1691
  * Browser live view URL for debugging.
1675
1692
  */
@@ -1831,6 +1848,11 @@ export namespace ConnectionFollowResponse {
1831
1848
  */
1832
1849
  id: string;
1833
1850
 
1851
+ /**
1852
+ * Why the field requires user input.
1853
+ */
1854
+ reason: 'missing' | 'rejected';
1855
+
1834
1856
  /**
1835
1857
  * Credential reference name to store the submitted value under.
1836
1858
  */
@@ -1856,12 +1878,6 @@ export namespace ConnectionFollowResponse {
1856
1878
  */
1857
1879
  observed_selector?: string | null;
1858
1880
 
1859
- /**
1860
- * Whether the submitted value must replace an existing credential after explicit
1861
- * rejection.
1862
- */
1863
- replace_existing?: boolean;
1864
-
1865
1881
  /**
1866
1882
  * Whether this field is required.
1867
1883
  */
@@ -2549,6 +2565,12 @@ export interface ConnectionSubmitParams {
2549
2565
  */
2550
2566
  fields?: { [key: string]: string };
2551
2567
 
2568
+ /**
2569
+ * Opaque interaction ID returned with canonical fields and choices. Required for
2570
+ * canonical submissions.
2571
+ */
2572
+ interaction_id?: string;
2573
+
2552
2574
  /**
2553
2575
  * The MFA method type to select (when mfa_options were returned)
2554
2576
  */
@@ -85,6 +85,7 @@ import {
85
85
  BrowserPageNavigationEvent,
86
86
  BrowserPageNavigationSettledEvent,
87
87
  BrowserPageTabOpenedEvent,
88
+ BrowserProxyErrorEvent,
88
89
  BrowserServiceCrashedEvent,
89
90
  BrowserSystemOomKillEvent,
90
91
  BrowserTelemetryCategoriesConfig,
@@ -1673,6 +1674,7 @@ export declare namespace Browsers {
1673
1674
  type BrowserPageNavigationEvent as BrowserPageNavigationEvent,
1674
1675
  type BrowserPageNavigationSettledEvent as BrowserPageNavigationSettledEvent,
1675
1676
  type BrowserPageTabOpenedEvent as BrowserPageTabOpenedEvent,
1677
+ type BrowserProxyErrorEvent as BrowserProxyErrorEvent,
1676
1678
  type BrowserServiceCrashedEvent as BrowserServiceCrashedEvent,
1677
1679
  type BrowserSystemOomKillEvent as BrowserSystemOomKillEvent,
1678
1680
  type BrowserTelemetryCategoriesConfig as BrowserTelemetryCategoriesConfig,
@@ -120,6 +120,7 @@ export {
120
120
  type BrowserPageNavigationEvent,
121
121
  type BrowserPageNavigationSettledEvent,
122
122
  type BrowserPageTabOpenedEvent,
123
+ type BrowserProxyErrorEvent,
123
124
  type BrowserServiceCrashedEvent,
124
125
  type BrowserSystemOomKillEvent,
125
126
  type BrowserTelemetryCategoriesConfig,
@@ -1725,6 +1725,88 @@ export namespace BrowserPageTabOpenedEvent {
1725
1725
  }
1726
1726
  }
1727
1727
 
1728
+ /**
1729
+ * A branded proxy-layer failure observed by the browser. Emitted when the metro
1730
+ * egress host-proxy serves a branded 5xx error page whose response carries the
1731
+ * X-Kernel-Proxy-Error header. Low-volume and carries a typed code. Its value is
1732
+ * per-session and per-URL attribution for sessions that already capture the
1733
+ * network stream: proxy failures are only observable while the CDP network
1734
+ * collector is running, so this is an opt-in refinement of the raw network events
1735
+ * rather than a default-on alerting signal.
1736
+ */
1737
+ export interface BrowserProxyErrorEvent {
1738
+ category: 'network';
1739
+
1740
+ /**
1741
+ * Provenance metadata identifying which producer emitted the event.
1742
+ */
1743
+ source: BrowserEventSource;
1744
+
1745
+ /**
1746
+ * Event timestamp in Unix microseconds.
1747
+ */
1748
+ ts: number;
1749
+
1750
+ type: 'proxy_error';
1751
+
1752
+ /**
1753
+ * Browser event context stamped by the browser monitor onto all CDP-sourced
1754
+ * events. Identifies the target, frame, and navigation epoch in which the event
1755
+ * occurred.
1756
+ */
1757
+ data?: BrowserProxyErrorEvent.Data;
1758
+
1759
+ /**
1760
+ * True if the data field was truncated due to size limits.
1761
+ */
1762
+ truncated?: boolean;
1763
+ }
1764
+
1765
+ export namespace BrowserProxyErrorEvent {
1766
+ /**
1767
+ * Browser event context stamped by the browser monitor onto all CDP-sourced
1768
+ * events. Identifies the target, frame, and navigation epoch in which the event
1769
+ * occurred.
1770
+ */
1771
+ export interface Data extends TelemetryAPI.BrowserEventContext {
1772
+ /**
1773
+ * Proxy-layer error code: the X-Kernel-Proxy-Error response header value from a
1774
+ * branded 5xx error page served by the metro egress host-proxy. Values mirror what
1775
+ * the proxy emits: destination_blocked, provider_blacklisted,
1776
+ * provider_unreachable, proxy_unavailable, upstream_timeout, upstream_dns_failure,
1777
+ * upstream_connect_failed. Unknown header values are dropped.
1778
+ */
1779
+ code:
1780
+ | 'destination_blocked'
1781
+ | 'provider_blacklisted'
1782
+ | 'provider_unreachable'
1783
+ | 'proxy_unavailable'
1784
+ | 'upstream_timeout'
1785
+ | 'upstream_dns_failure'
1786
+ | 'upstream_connect_failed';
1787
+
1788
+ /**
1789
+ * CDP request identifier matching the originating request.
1790
+ */
1791
+ request_id: string;
1792
+
1793
+ /**
1794
+ * HTTP response status of the branded error page (502).
1795
+ */
1796
+ status: number;
1797
+
1798
+ /**
1799
+ * HTTP method of the failed request, when known.
1800
+ */
1801
+ method?: string;
1802
+
1803
+ /**
1804
+ * CDP Network.ResourceType for the request, when known.
1805
+ */
1806
+ resource_type?: string;
1807
+ }
1808
+ }
1809
+
1728
1810
  /**
1729
1811
  * A managed service exited unexpectedly. Intentional stops do not produce this
1730
1812
  * event; only unexpected exits and terminal restart-give-up transitions do.
@@ -1990,6 +2072,7 @@ export type BrowserTelemetryEvent =
1990
2072
  | BrowserNetworkResponseEvent
1991
2073
  | BrowserNetworkLoadingFailedEvent
1992
2074
  | BrowserNetworkIdleEvent
2075
+ | BrowserProxyErrorEvent
1993
2076
  | BrowserPageNavigationEvent
1994
2077
  | BrowserPageDomContentLoadedEvent
1995
2078
  | BrowserPageLoadEvent
@@ -2184,6 +2267,7 @@ export declare namespace Telemetry {
2184
2267
  type BrowserPageNavigationEvent as BrowserPageNavigationEvent,
2185
2268
  type BrowserPageNavigationSettledEvent as BrowserPageNavigationSettledEvent,
2186
2269
  type BrowserPageTabOpenedEvent as BrowserPageTabOpenedEvent,
2270
+ type BrowserProxyErrorEvent as BrowserProxyErrorEvent,
2187
2271
  type BrowserServiceCrashedEvent as BrowserServiceCrashedEvent,
2188
2272
  type BrowserSystemOomKillEvent as BrowserSystemOomKillEvent,
2189
2273
  type BrowserTelemetryCategoriesConfig as BrowserTelemetryCategoriesConfig,
@@ -0,0 +1,234 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { APIPromise } from '../../core/api-promise';
5
+ import { RequestOptions } from '../../internal/request-options';
6
+
7
+ /**
8
+ * Read and manage organization-level limits.
9
+ */
10
+ export class Entitlements extends APIResource {
11
+ /**
12
+ * Get the authenticated organization's effective feature access and constraints
13
+ * after applying its plan, active trial treatment, plan status, and
14
+ * organization-specific overrides. Null constraint values mean unlimited.
15
+ */
16
+ retrieve(options?: RequestOptions): APIPromise<OrgEntitlements> {
17
+ return this._client.get('/org/entitlements', options);
18
+ }
19
+ }
20
+
21
+ /**
22
+ * Effective feature access and constraints for the authenticated organization.
23
+ * Values already include trial treatment, plan status, and organization-specific
24
+ * overrides; consumers should use these resolved values instead of comparing plan
25
+ * IDs.
26
+ */
27
+ export interface OrgEntitlements {
28
+ features: OrgEntitlements.Features;
29
+
30
+ limits: OrgEntitlements.Limits;
31
+
32
+ plan: OrgEntitlements.Plan;
33
+ }
34
+
35
+ export namespace OrgEntitlements {
36
+ export interface Features {
37
+ browser_extensions: Features.BrowserExtensions;
38
+
39
+ browser_pools: Features.BrowserPools;
40
+
41
+ browser_replays: Features.BrowserReplays;
42
+
43
+ credential_providers: Features.CredentialProviders;
44
+
45
+ credentials: Features.Credentials;
46
+
47
+ custom_proxies: Features.CustomProxies;
48
+
49
+ file_io: Features.FileIo;
50
+
51
+ gpu: Features.GPU;
52
+
53
+ managed_auth: Features.ManagedAuth;
54
+
55
+ managed_proxies: Features.ManagedProxies;
56
+
57
+ profiles: Features.Profiles;
58
+
59
+ proxy_bypass_hosts: Features.ProxyBypassHosts;
60
+ }
61
+
62
+ export namespace Features {
63
+ export interface BrowserExtensions {
64
+ /**
65
+ * Whether browser extensions are available.
66
+ */
67
+ enabled: boolean;
68
+
69
+ /**
70
+ * Maximum active custom extensions the organization may store. Null means
71
+ * unlimited. Loading stored extensions into a browser is not plan-limited.
72
+ */
73
+ max_stored_per_org: number | null;
74
+ }
75
+
76
+ export interface BrowserPools {
77
+ /**
78
+ * Whether the organization is entitled to use this feature.
79
+ */
80
+ enabled: boolean;
81
+ }
82
+
83
+ export interface BrowserReplays {
84
+ /**
85
+ * Whether browser replay recording is available.
86
+ */
87
+ enabled: boolean;
88
+
89
+ /**
90
+ * Number of days browser replays are retained, matching the replay reaper policy.
91
+ */
92
+ retention_days: number;
93
+ }
94
+
95
+ export interface CredentialProviders {
96
+ /**
97
+ * Whether the organization is entitled to use this feature.
98
+ */
99
+ enabled: boolean;
100
+ }
101
+
102
+ export interface Credentials {
103
+ /**
104
+ * Whether the organization is entitled to use this feature.
105
+ */
106
+ enabled: boolean;
107
+ }
108
+
109
+ export interface CustomProxies {
110
+ /**
111
+ * Whether the organization is entitled to use this feature.
112
+ */
113
+ enabled: boolean;
114
+ }
115
+
116
+ export interface FileIo {
117
+ /**
118
+ * Whether the organization is entitled to use this feature.
119
+ */
120
+ enabled: boolean;
121
+ }
122
+
123
+ export interface GPU {
124
+ /**
125
+ * Whether the organization is entitled to use this feature.
126
+ */
127
+ enabled: boolean;
128
+ }
129
+
130
+ export interface ManagedAuth {
131
+ /**
132
+ * Whether managed auth is available.
133
+ */
134
+ enabled: boolean;
135
+
136
+ /**
137
+ * Effective interval in seconds used when a connection is created without an
138
+ * explicit health-check interval.
139
+ */
140
+ health_check_interval_default_seconds: number;
141
+
142
+ /**
143
+ * Maximum accepted managed auth health-check interval in seconds.
144
+ */
145
+ health_check_interval_max_seconds: number;
146
+
147
+ /**
148
+ * Minimum accepted managed auth health-check interval in seconds.
149
+ */
150
+ health_check_interval_min_seconds: number;
151
+
152
+ /**
153
+ * Maximum active managed auth connections in the organization. Null means
154
+ * unlimited.
155
+ */
156
+ max_connections: number | null;
157
+ }
158
+
159
+ export interface ManagedProxies {
160
+ /**
161
+ * Whether the organization is entitled to use this feature.
162
+ */
163
+ enabled: boolean;
164
+ }
165
+
166
+ export interface Profiles {
167
+ /**
168
+ * Whether the organization is entitled to use this feature.
169
+ */
170
+ enabled: boolean;
171
+ }
172
+
173
+ export interface ProxyBypassHosts {
174
+ /**
175
+ * Whether the organization is entitled to use this feature.
176
+ */
177
+ enabled: boolean;
178
+ }
179
+ }
180
+
181
+ export interface Limits {
182
+ /**
183
+ * Effective org-level default concurrent invocation ceiling for apps without an
184
+ * app-specific override. App-specific overrides are not represented here.
185
+ */
186
+ default_max_concurrent_invocations_per_app: number;
187
+
188
+ /**
189
+ * Effective organization-wide ceiling shared by on-demand browsers and browser
190
+ * pool reservations.
191
+ */
192
+ max_concurrent_browsers: number;
193
+
194
+ /**
195
+ * Effective organization-wide concurrent app invocation ceiling.
196
+ */
197
+ max_concurrent_invocations: number;
198
+ }
199
+
200
+ export interface Plan {
201
+ /**
202
+ * The organization's contractual plan identifier. Use the resolved feature and
203
+ * limit values, not this field, for access decisions.
204
+ */
205
+ id: 'FREE' | 'HOBBYIST' | 'START_UP' | 'ENTERPRISE';
206
+
207
+ /**
208
+ * The plan used to resolve plan-based access. Active trials resolve to START_UP
209
+ * regardless of the contractual plan.
210
+ */
211
+ effective_id: 'FREE' | 'HOBBYIST' | 'START_UP' | 'ENTERPRISE';
212
+
213
+ /**
214
+ * Whether the organization is currently within its trial period.
215
+ */
216
+ is_trialing: boolean;
217
+
218
+ /**
219
+ * Current billing status of the contractual plan, or null when no billing status
220
+ * is recorded. Status-sensitive feature values already account for it.
221
+ */
222
+ status: 'NEEDS_PAYMENT_METHOD' | 'ACTIVE' | 'CANCELED' | 'UNPAID' | null;
223
+
224
+ /**
225
+ * Configured trial end timestamp, or null when the organization has no trial. A
226
+ * past timestamp may be returned when is_trialing is false.
227
+ */
228
+ trial_ends_at: string | null;
229
+ }
230
+ }
231
+
232
+ export declare namespace Entitlements {
233
+ export { type OrgEntitlements as OrgEntitlements };
234
+ }
@@ -1,4 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ export { Entitlements, type OrgEntitlements } from './entitlements';
3
4
  export { Limits, type OrgLimits, type UpdateOrgLimitsRequest, type LimitUpdateParams } from './limits';
4
5
  export { Organization } from './organization';
@@ -1,16 +1,22 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
+ import * as EntitlementsAPI from './entitlements';
5
+ import { Entitlements, OrgEntitlements } from './entitlements';
4
6
  import * as LimitsAPI from './limits';
5
7
  import { LimitUpdateParams, Limits, OrgLimits, UpdateOrgLimitsRequest } from './limits';
6
8
 
7
9
  export class Organization extends APIResource {
10
+ entitlements: EntitlementsAPI.Entitlements = new EntitlementsAPI.Entitlements(this._client);
8
11
  limits: LimitsAPI.Limits = new LimitsAPI.Limits(this._client);
9
12
  }
10
13
 
14
+ Organization.Entitlements = Entitlements;
11
15
  Organization.Limits = Limits;
12
16
 
13
17
  export declare namespace Organization {
18
+ export { Entitlements as Entitlements, type OrgEntitlements as OrgEntitlements };
19
+
14
20
  export {
15
21
  Limits as Limits,
16
22
  type OrgLimits as OrgLimits,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.91.0'; // x-release-please-version
1
+ export const VERSION = '0.93.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.91.0";
1
+ export declare const VERSION = "0.93.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.91.0";
1
+ export declare const VERSION = "0.93.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.91.0'; // x-release-please-version
4
+ exports.VERSION = '0.93.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.91.0'; // x-release-please-version
1
+ export const VERSION = '0.93.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map