@onkernel/sdk 0.93.0 → 0.95.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 (88) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +6 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/lib/browser-routing.d.mts +1 -0
  11. package/lib/browser-routing.d.mts.map +1 -1
  12. package/lib/browser-routing.d.ts +1 -0
  13. package/lib/browser-routing.d.ts.map +1 -1
  14. package/lib/browser-routing.js +23 -2
  15. package/lib/browser-routing.js.map +1 -1
  16. package/lib/browser-routing.mjs +23 -2
  17. package/lib/browser-routing.mjs.map +1 -1
  18. package/package.json +1 -1
  19. package/resources/auth/connections.d.mts +62 -50
  20. package/resources/auth/connections.d.mts.map +1 -1
  21. package/resources/auth/connections.d.ts +62 -50
  22. package/resources/auth/connections.d.ts.map +1 -1
  23. package/resources/browser-pools.d.mts +22 -22
  24. package/resources/browser-pools.d.mts.map +1 -1
  25. package/resources/browser-pools.d.ts +22 -22
  26. package/resources/browser-pools.d.ts.map +1 -1
  27. package/resources/browsers/browsers.d.mts +23 -23
  28. package/resources/browsers/browsers.d.mts.map +1 -1
  29. package/resources/browsers/browsers.d.ts +23 -23
  30. package/resources/browsers/browsers.d.ts.map +1 -1
  31. package/resources/browsers/browsers.js +2 -2
  32. package/resources/browsers/browsers.js.map +1 -1
  33. package/resources/browsers/browsers.mjs +2 -2
  34. package/resources/browsers/browsers.mjs.map +1 -1
  35. package/resources/browsers/index.d.mts +1 -1
  36. package/resources/browsers/index.d.mts.map +1 -1
  37. package/resources/browsers/index.d.ts +1 -1
  38. package/resources/browsers/index.d.ts.map +1 -1
  39. package/resources/browsers/index.js.map +1 -1
  40. package/resources/browsers/index.mjs.map +1 -1
  41. package/resources/browsers/telemetry.d.mts +2019 -73
  42. package/resources/browsers/telemetry.d.mts.map +1 -1
  43. package/resources/browsers/telemetry.d.ts +2019 -73
  44. package/resources/browsers/telemetry.d.ts.map +1 -1
  45. package/resources/index.d.mts +1 -0
  46. package/resources/index.d.mts.map +1 -1
  47. package/resources/index.d.ts +1 -0
  48. package/resources/index.d.ts.map +1 -1
  49. package/resources/index.js +3 -1
  50. package/resources/index.js.map +1 -1
  51. package/resources/index.mjs +1 -0
  52. package/resources/index.mjs.map +1 -1
  53. package/resources/invocations.d.mts +1 -1
  54. package/resources/invocations.d.mts.map +1 -1
  55. package/resources/invocations.d.ts +1 -1
  56. package/resources/invocations.d.ts.map +1 -1
  57. package/resources/proxies.d.mts +4 -1
  58. package/resources/proxies.d.mts.map +1 -1
  59. package/resources/proxies.d.ts +4 -1
  60. package/resources/proxies.d.ts.map +1 -1
  61. package/resources/proxies.js +4 -1
  62. package/resources/proxies.js.map +1 -1
  63. package/resources/proxies.mjs +4 -1
  64. package/resources/proxies.mjs.map +1 -1
  65. package/resources/site-configs.d.mts +445 -0
  66. package/resources/site-configs.d.mts.map +1 -0
  67. package/resources/site-configs.d.ts +445 -0
  68. package/resources/site-configs.d.ts.map +1 -0
  69. package/resources/site-configs.js +88 -0
  70. package/resources/site-configs.js.map +1 -0
  71. package/resources/site-configs.mjs +84 -0
  72. package/resources/site-configs.mjs.map +1 -0
  73. package/src/client.ts +52 -0
  74. package/src/lib/browser-routing.ts +24 -2
  75. package/src/resources/auth/connections.ts +62 -50
  76. package/src/resources/browser-pools.ts +22 -22
  77. package/src/resources/browsers/browsers.ts +33 -21
  78. package/src/resources/browsers/index.ts +6 -0
  79. package/src/resources/browsers/telemetry.ts +2503 -74
  80. package/src/resources/index.ts +23 -0
  81. package/src/resources/invocations.ts +1 -1
  82. package/src/resources/proxies.ts +4 -1
  83. package/src/resources/site-configs.ts +578 -0
  84. package/src/version.ts +1 -1
  85. package/version.d.mts +1 -1
  86. package/version.d.ts +1 -1
  87. package/version.js +1 -1
  88. package/version.mjs +1 -1
package/src/client.ts CHANGED
@@ -136,6 +136,29 @@ import {
136
136
  ProxyUpdateParams,
137
137
  ProxyUpdateResponse,
138
138
  } from './resources/proxies';
139
+ import {
140
+ Analysis,
141
+ AnalysisSummariesOffsetPagination,
142
+ AnalysisSummary,
143
+ Browser,
144
+ Evidence,
145
+ LookupRequest,
146
+ LookupResponse,
147
+ NoRecommendation,
148
+ Proxy,
149
+ Recommendation,
150
+ RecommendationResult,
151
+ RecommendationSummariesOffsetPagination,
152
+ RecommendationSummary,
153
+ ResolveRequest,
154
+ SiteConfigListParams,
155
+ SiteConfigListRecommendationsParams,
156
+ SiteConfigLookupParams,
157
+ SiteConfigResolveParams,
158
+ SiteConfigResponse,
159
+ SiteConfigs,
160
+ Target,
161
+ } from './resources/site-configs';
139
162
  import {
140
163
  AuditLogEntriesPageTokenPagination,
141
164
  AuditLogEntry,
@@ -1012,6 +1035,10 @@ export class Kernel {
1012
1035
  * Invoke actions and stream or query invocation status and events.
1013
1036
  */
1014
1037
  invocations: API.Invocations = new API.Invocations(this);
1038
+ /**
1039
+ * Resolve browser and proxy recommendations for bot-protected sites.
1040
+ */
1041
+ siteConfigs: API.SiteConfigs = new API.SiteConfigs(this);
1015
1042
  /**
1016
1043
  * Create and manage browser sessions.
1017
1044
  */
@@ -1063,6 +1090,7 @@ export class Kernel {
1063
1090
  Kernel.Deployments = Deployments;
1064
1091
  Kernel.Apps = Apps;
1065
1092
  Kernel.Invocations = Invocations;
1093
+ Kernel.SiteConfigs = SiteConfigs;
1066
1094
  Kernel.Browsers = Browsers;
1067
1095
  Kernel.Profiles = Profiles;
1068
1096
  Kernel.Auth = Auth;
@@ -1128,6 +1156,30 @@ export declare namespace Kernel {
1128
1156
  type InvocationFollowParams as InvocationFollowParams,
1129
1157
  };
1130
1158
 
1159
+ export {
1160
+ SiteConfigs as SiteConfigs,
1161
+ type Analysis as Analysis,
1162
+ type AnalysisSummary as AnalysisSummary,
1163
+ type Browser as Browser,
1164
+ type Evidence as Evidence,
1165
+ type LookupRequest as LookupRequest,
1166
+ type LookupResponse as LookupResponse,
1167
+ type NoRecommendation as NoRecommendation,
1168
+ type Proxy as Proxy,
1169
+ type Recommendation as Recommendation,
1170
+ type RecommendationResult as RecommendationResult,
1171
+ type RecommendationSummary as RecommendationSummary,
1172
+ type ResolveRequest as ResolveRequest,
1173
+ type SiteConfigResponse as SiteConfigResponse,
1174
+ type Target as Target,
1175
+ type AnalysisSummariesOffsetPagination as AnalysisSummariesOffsetPagination,
1176
+ type RecommendationSummariesOffsetPagination as RecommendationSummariesOffsetPagination,
1177
+ type SiteConfigListParams as SiteConfigListParams,
1178
+ type SiteConfigListRecommendationsParams as SiteConfigListRecommendationsParams,
1179
+ type SiteConfigLookupParams as SiteConfigLookupParams,
1180
+ type SiteConfigResolveParams as SiteConfigResolveParams,
1181
+ };
1182
+
1131
1183
  export {
1132
1184
  Browsers as Browsers,
1133
1185
  type BrowserMemory as BrowserMemory,
@@ -1,4 +1,5 @@
1
1
  import type { Fetch, RequestInfo, RequestInit } from '../internal/builtin-types';
2
+ import { CancelReadableStream } from '../internal/shims';
2
3
  import { joinURL } from './join-url';
3
4
 
4
5
  export type BrowserRoute = {
@@ -22,6 +23,15 @@ export class BrowserRouteCache {
22
23
  this.entries.delete(sessionId);
23
24
  }
24
25
 
26
+ deleteIfJwt(sessionId: string, jwt: string): boolean {
27
+ const route = this.entries.get(sessionId);
28
+ if (!route || route.jwt !== jwt) {
29
+ return false;
30
+ }
31
+ this.entries.delete(sessionId);
32
+ return true;
33
+ }
34
+
25
35
  clear(): void {
26
36
  this.entries.clear();
27
37
  }
@@ -31,7 +41,13 @@ const BROWSER_ROUTING_SUBRESOURCES_ENV = 'KERNEL_BROWSER_ROUTING_SUBRESOURCES';
31
41
  // Path prefixes eligible for direct-to-VM routing. "telemetry/stream" is the live
32
42
  // SSE endpoint (served by the VM); "telemetry/events" is a historical read served
33
43
  // by the control plane (S2) and must NOT be here.
34
- const DEFAULT_BROWSER_ROUTING_SUBRESOURCES = ['curl', 'telemetry/stream'];
44
+ const DEFAULT_BROWSER_ROUTING_SUBRESOURCES = [
45
+ 'curl',
46
+ 'telemetry/stream',
47
+ 'computer',
48
+ 'playwright',
49
+ 'process',
50
+ ];
35
51
  const BROWSER_ROUTE_CACHEABLE_PATH = /^\/(?:v\d+\/)?browsers(?:\/[^/]+)?\/?$/;
36
52
  const BROWSER_POOL_ACQUIRE_PATH = /^\/(?:v\d+\/)?browser_pools\/[^/]+\/acquire\/?$/;
37
53
  const BROWSER_DELETE_BY_ID_PATH = /^\/(?:v\d+\/)?browsers\/([^/]+)\/?$/;
@@ -262,7 +278,13 @@ async function routeRequest(
262
278
 
263
279
  const headers = new Headers(request.headers);
264
280
  headers.delete('authorization');
265
- return innerFetch(target.toString(), buildRoutedInit(input, request, init, headers));
281
+ const routed = await innerFetch(target.toString(), buildRoutedInit(input, request, init, headers));
282
+ if ((routed.status === 401 || routed.status === 403) && target.searchParams.get('jwt')) {
283
+ cache.deleteIfJwt(sessionId, target.searchParams.get('jwt') ?? '');
284
+ await CancelReadableStream(routed.body);
285
+ return innerFetch(input, init);
286
+ }
287
+ return routed;
266
288
  }
267
289
 
268
290
  function buildRoutedInit(
@@ -261,8 +261,10 @@ export interface ManagedAuth {
261
261
  status: 'AUTHENTICATED' | 'NEEDS_AUTH';
262
262
 
263
263
  /**
264
- * Additional domains that are valid for this auth flow (besides the primary
265
- * domain). Useful when login pages redirect to different domains.
264
+ * Additional hostname roots valid for this auth flow, besides the primary domain.
265
+ * Each value allows credential entry on that exact hostname and its subdomains.
266
+ * Leading `www.` and `*.` labels are normalized away. When omitted or empty,
267
+ * credential entry is unrestricted.
266
268
  *
267
269
  * The following SSO/OAuth provider domains are automatically allowed by default
268
270
  * and do not need to be specified:
@@ -549,12 +551,12 @@ export namespace ManagedAuth {
549
551
  * Per-category capture flags. The operational categories (control, connection,
550
552
  * system, captcha) are captured whenever telemetry is enabled; set one to
551
553
  * enabled=false to opt out. The CDP categories (console, network, page,
552
- * interaction) and screenshot are off by default; set enabled=true to opt in. On
553
- * create, provided categories layer onto the default set. On update, provided
554
- * categories merge onto the session's current config; when no telemetry is active
555
- * this falls back to the default set (matching create). If browser is omitted or
556
- * empty, the default set is used. A browser config that disables every category
557
- * stops capture on update and starts no capture on create.
554
+ * interaction), screenshot and platform are off by default; set enabled=true to
555
+ * opt in. On create, provided categories layer onto the default set. On update,
556
+ * provided categories merge onto the session's current config; when no telemetry
557
+ * is active this falls back to the default set (matching create). If browser is
558
+ * omitted or empty, the default set is used. A browser config that disables every
559
+ * category stops capture on update and starts no capture on create.
558
560
  */
559
561
  browser?: TelemetryAPI.BrowserTelemetryCategoriesConfig;
560
562
 
@@ -920,12 +922,12 @@ export namespace ManagedAuthBrowserConfig {
920
922
  * Per-category capture flags. The operational categories (control, connection,
921
923
  * system, captcha) are captured whenever telemetry is enabled; set one to
922
924
  * enabled=false to opt out. The CDP categories (console, network, page,
923
- * interaction) and screenshot are off by default; set enabled=true to opt in. On
924
- * create, provided categories layer onto the default set. On update, provided
925
- * categories merge onto the session's current config; when no telemetry is active
926
- * this falls back to the default set (matching create). If browser is omitted or
927
- * empty, the default set is used. A browser config that disables every category
928
- * stops capture on update and starts no capture on create.
925
+ * interaction), screenshot and platform are off by default; set enabled=true to
926
+ * opt in. On create, provided categories layer onto the default set. On update,
927
+ * provided categories merge onto the session's current config; when no telemetry
928
+ * is active this falls back to the default set (matching create). If browser is
929
+ * omitted or empty, the default set is used. A browser config that disables every
930
+ * category stops capture on update and starts no capture on create.
929
931
  */
930
932
  browser?: TelemetryAPI.BrowserTelemetryCategoriesConfig;
931
933
 
@@ -1016,8 +1018,10 @@ export interface ManagedAuthCreateRequest {
1016
1018
  profile_name: string;
1017
1019
 
1018
1020
  /**
1019
- * Additional domains valid for this auth flow (besides the primary domain). Useful
1020
- * when login pages redirect to different domains.
1021
+ * Additional hostname roots valid for this auth flow, besides the primary domain.
1022
+ * Each value allows credential entry on that exact hostname and its subdomains.
1023
+ * Leading `www.` and `*.` labels are normalized away. When omitted or empty,
1024
+ * credential entry is unrestricted.
1021
1025
  *
1022
1026
  * The following SSO/OAuth provider domains are automatically allowed by default
1023
1027
  * and do not need to be specified:
@@ -1121,12 +1125,12 @@ export namespace ManagedAuthCreateRequest {
1121
1125
  * Per-category capture flags. The operational categories (control, connection,
1122
1126
  * system, captcha) are captured whenever telemetry is enabled; set one to
1123
1127
  * enabled=false to opt out. The CDP categories (console, network, page,
1124
- * interaction) and screenshot are off by default; set enabled=true to opt in. On
1125
- * create, provided categories layer onto the default set. On update, provided
1126
- * categories merge onto the session's current config; when no telemetry is active
1127
- * this falls back to the default set (matching create). If browser is omitted or
1128
- * empty, the default set is used. A browser config that disables every category
1129
- * stops capture on update and starts no capture on create.
1128
+ * interaction), screenshot and platform are off by default; set enabled=true to
1129
+ * opt in. On create, provided categories layer onto the default set. On update,
1130
+ * provided categories merge onto the session's current config; when no telemetry
1131
+ * is active this falls back to the default set (matching create). If browser is
1132
+ * omitted or empty, the default set is used. A browser config that disables every
1133
+ * category stops capture on update and starts no capture on create.
1130
1134
  */
1131
1135
  browser?: TelemetryAPI.BrowserTelemetryCategoriesConfig;
1132
1136
 
@@ -1336,7 +1340,10 @@ export interface ManagedAuthTimelineEvent {
1336
1340
  */
1337
1341
  export interface ManagedAuthUpdateRequest {
1338
1342
  /**
1339
- * Additional domains valid for this auth flow (replaces existing list)
1343
+ * Additional hostname roots valid for this auth flow. Each value allows credential
1344
+ * entry on that exact hostname and its subdomains; leading `www.` and `*.` labels
1345
+ * are normalized away. An empty list leaves credential entry unrestricted.
1346
+ * Replaces the existing list.
1340
1347
  */
1341
1348
  allowed_domains?: Array<string>;
1342
1349
 
@@ -1417,12 +1424,12 @@ export namespace ManagedAuthUpdateRequest {
1417
1424
  * Per-category capture flags. The operational categories (control, connection,
1418
1425
  * system, captcha) are captured whenever telemetry is enabled; set one to
1419
1426
  * enabled=false to opt out. The CDP categories (console, network, page,
1420
- * interaction) and screenshot are off by default; set enabled=true to opt in. On
1421
- * create, provided categories layer onto the default set. On update, provided
1422
- * categories merge onto the session's current config; when no telemetry is active
1423
- * this falls back to the default set (matching create). If browser is omitted or
1424
- * empty, the default set is used. A browser config that disables every category
1425
- * stops capture on update and starts no capture on create.
1427
+ * interaction), screenshot and platform are off by default; set enabled=true to
1428
+ * opt in. On create, provided categories layer onto the default set. On update,
1429
+ * provided categories merge onto the session's current config; when no telemetry
1430
+ * is active this falls back to the default set (matching create). If browser is
1431
+ * omitted or empty, the default set is used. A browser config that disables every
1432
+ * category stops capture on update and starts no capture on create.
1426
1433
  */
1427
1434
  browser?: TelemetryAPI.BrowserTelemetryCategoriesConfig;
1428
1435
 
@@ -1967,8 +1974,10 @@ export interface ConnectionCreateParams {
1967
1974
  profile_name: string;
1968
1975
 
1969
1976
  /**
1970
- * Additional domains valid for this auth flow (besides the primary domain). Useful
1971
- * when login pages redirect to different domains.
1977
+ * Additional hostname roots valid for this auth flow, besides the primary domain.
1978
+ * Each value allows credential entry on that exact hostname and its subdomains.
1979
+ * Leading `www.` and `*.` labels are normalized away. When omitted or empty,
1980
+ * credential entry is unrestricted.
1972
1981
  *
1973
1982
  * The following SSO/OAuth provider domains are automatically allowed by default
1974
1983
  * and do not need to be specified:
@@ -2072,12 +2081,12 @@ export namespace ConnectionCreateParams {
2072
2081
  * Per-category capture flags. The operational categories (control, connection,
2073
2082
  * system, captcha) are captured whenever telemetry is enabled; set one to
2074
2083
  * enabled=false to opt out. The CDP categories (console, network, page,
2075
- * interaction) and screenshot are off by default; set enabled=true to opt in. On
2076
- * create, provided categories layer onto the default set. On update, provided
2077
- * categories merge onto the session's current config; when no telemetry is active
2078
- * this falls back to the default set (matching create). If browser is omitted or
2079
- * empty, the default set is used. A browser config that disables every category
2080
- * stops capture on update and starts no capture on create.
2084
+ * interaction), screenshot and platform are off by default; set enabled=true to
2085
+ * opt in. On create, provided categories layer onto the default set. On update,
2086
+ * provided categories merge onto the session's current config; when no telemetry
2087
+ * is active this falls back to the default set (matching create). If browser is
2088
+ * omitted or empty, the default set is used. A browser config that disables every
2089
+ * category stops capture on update and starts no capture on create.
2081
2090
  */
2082
2091
  browser?: TelemetryAPI.BrowserTelemetryCategoriesConfig;
2083
2092
 
@@ -2199,7 +2208,10 @@ export namespace ConnectionCreateParams {
2199
2208
 
2200
2209
  export interface ConnectionUpdateParams {
2201
2210
  /**
2202
- * Additional domains valid for this auth flow (replaces existing list)
2211
+ * Additional hostname roots valid for this auth flow. Each value allows credential
2212
+ * entry on that exact hostname and its subdomains; leading `www.` and `*.` labels
2213
+ * are normalized away. An empty list leaves credential entry unrestricted.
2214
+ * Replaces the existing list.
2203
2215
  */
2204
2216
  allowed_domains?: Array<string>;
2205
2217
 
@@ -2280,12 +2292,12 @@ export namespace ConnectionUpdateParams {
2280
2292
  * Per-category capture flags. The operational categories (control, connection,
2281
2293
  * system, captcha) are captured whenever telemetry is enabled; set one to
2282
2294
  * enabled=false to opt out. The CDP categories (console, network, page,
2283
- * interaction) and screenshot are off by default; set enabled=true to opt in. On
2284
- * create, provided categories layer onto the default set. On update, provided
2285
- * categories merge onto the session's current config; when no telemetry is active
2286
- * this falls back to the default set (matching create). If browser is omitted or
2287
- * empty, the default set is used. A browser config that disables every category
2288
- * stops capture on update and starts no capture on create.
2295
+ * interaction), screenshot and platform are off by default; set enabled=true to
2296
+ * opt in. On create, provided categories layer onto the default set. On update,
2297
+ * provided categories merge onto the session's current config; when no telemetry
2298
+ * is active this falls back to the default set (matching create). If browser is
2299
+ * omitted or empty, the default set is used. A browser config that disables every
2300
+ * category stops capture on update and starts no capture on create.
2289
2301
  */
2290
2302
  browser?: TelemetryAPI.BrowserTelemetryCategoriesConfig;
2291
2303
 
@@ -2458,12 +2470,12 @@ export namespace ConnectionLoginParams {
2458
2470
  * Per-category capture flags. The operational categories (control, connection,
2459
2471
  * system, captcha) are captured whenever telemetry is enabled; set one to
2460
2472
  * enabled=false to opt out. The CDP categories (console, network, page,
2461
- * interaction) and screenshot are off by default; set enabled=true to opt in. On
2462
- * create, provided categories layer onto the default set. On update, provided
2463
- * categories merge onto the session's current config; when no telemetry is active
2464
- * this falls back to the default set (matching create). If browser is omitted or
2465
- * empty, the default set is used. A browser config that disables every category
2466
- * stops capture on update and starts no capture on create.
2473
+ * interaction), screenshot and platform are off by default; set enabled=true to
2474
+ * opt in. On create, provided categories layer onto the default set. On update,
2475
+ * provided categories merge onto the session's current config; when no telemetry
2476
+ * is active this falls back to the default set (matching create). If browser is
2477
+ * omitted or empty, the default set is used. A browser config that disables every
2478
+ * category stops capture on update and starts no capture on create.
2467
2479
  */
2468
2480
  browser?: TelemetryAPI.BrowserTelemetryCategoriesConfig;
2469
2481
 
@@ -199,7 +199,7 @@ export interface BrowserPool {
199
199
  /**
200
200
  * Geographic region of the browser pool. Fixed once the pool is created.
201
201
  */
202
- region: 'us-east' | 'eu-west';
202
+ region: 'us-east' | 'eu-west' | 'ap-southeast';
203
203
 
204
204
  /**
205
205
  * Browser pool name, if set
@@ -382,7 +382,7 @@ export interface BrowserPoolAcquireResponse {
382
382
  /**
383
383
  * Geographic region of the browser session. Fixed once the session is created.
384
384
  */
385
- region: 'us-east' | 'eu-west';
385
+ region: 'us-east' | 'eu-west' | 'ap-southeast';
386
386
 
387
387
  /**
388
388
  * Unique identifier for the browser session
@@ -595,7 +595,7 @@ export interface BrowserPoolCreateParams {
595
595
  * Region selection requires a Start-Up or Enterprise plan, defaults to us-east
596
596
  * when omitted on create.
597
597
  */
598
- region?: 'us-east' | 'eu-west';
598
+ region?: 'us-east' | 'eu-west' | 'ap-southeast';
599
599
 
600
600
  /**
601
601
  * Optional URL to navigate to when a new browser is warmed into the pool.
@@ -679,12 +679,12 @@ export namespace BrowserPoolCreateParams {
679
679
  * Per-category capture flags. The operational categories (control, connection,
680
680
  * system, captcha) are captured whenever telemetry is enabled; set one to
681
681
  * enabled=false to opt out. The CDP categories (console, network, page,
682
- * interaction) and screenshot are off by default; set enabled=true to opt in. On
683
- * create, provided categories layer onto the default set. On update, provided
684
- * categories merge onto the session's current config; when no telemetry is active
685
- * this falls back to the default set (matching create). If browser is omitted or
686
- * empty, the default set is used. A browser config that disables every category
687
- * stops capture on update and starts no capture on create.
682
+ * interaction), screenshot and platform are off by default; set enabled=true to
683
+ * opt in. On create, provided categories layer onto the default set. On update,
684
+ * provided categories merge onto the session's current config; when no telemetry
685
+ * is active this falls back to the default set (matching create). If browser is
686
+ * omitted or empty, the default set is used. A browser config that disables every
687
+ * category stops capture on update and starts no capture on create.
688
688
  */
689
689
  browser?: TelemetryAPI.BrowserTelemetryCategoriesConfig;
690
690
 
@@ -930,12 +930,12 @@ export namespace BrowserPoolUpdateParams {
930
930
  * Per-category capture flags. The operational categories (control, connection,
931
931
  * system, captcha) are captured whenever telemetry is enabled; set one to
932
932
  * enabled=false to opt out. The CDP categories (console, network, page,
933
- * interaction) and screenshot are off by default; set enabled=true to opt in. On
934
- * create, provided categories layer onto the default set. On update, provided
935
- * categories merge onto the session's current config; when no telemetry is active
936
- * this falls back to the default set (matching create). If browser is omitted or
937
- * empty, the default set is used. A browser config that disables every category
938
- * stops capture on update and starts no capture on create.
933
+ * interaction), screenshot and platform are off by default; set enabled=true to
934
+ * opt in. On create, provided categories layer onto the default set. On update,
935
+ * provided categories merge onto the session's current config; when no telemetry
936
+ * is active this falls back to the default set (matching create). If browser is
937
+ * omitted or empty, the default set is used. A browser config that disables every
938
+ * category stops capture on update and starts no capture on create.
939
939
  */
940
940
  browser?: TelemetryAPI.BrowserTelemetryCategoriesConfig;
941
941
 
@@ -1028,7 +1028,7 @@ export interface BrowserPoolListParams extends OffsetPaginationParams {
1028
1028
  /**
1029
1029
  * Filter pools by geographic region. Omit to list pools in all regions.
1030
1030
  */
1031
- region?: 'us-east' | 'eu-west';
1031
+ region?: 'us-east' | 'eu-west' | 'ap-southeast';
1032
1032
  }
1033
1033
 
1034
1034
  export interface BrowserPoolDeleteParams {
@@ -1098,12 +1098,12 @@ export namespace BrowserPoolAcquireParams {
1098
1098
  * Per-category capture flags. The operational categories (control, connection,
1099
1099
  * system, captcha) are captured whenever telemetry is enabled; set one to
1100
1100
  * enabled=false to opt out. The CDP categories (console, network, page,
1101
- * interaction) and screenshot are off by default; set enabled=true to opt in. On
1102
- * create, provided categories layer onto the default set. On update, provided
1103
- * categories merge onto the session's current config; when no telemetry is active
1104
- * this falls back to the default set (matching create). If browser is omitted or
1105
- * empty, the default set is used. A browser config that disables every category
1106
- * stops capture on update and starts no capture on create.
1101
+ * interaction), screenshot and platform are off by default; set enabled=true to
1102
+ * opt in. On create, provided categories layer onto the default set. On update,
1103
+ * provided categories merge onto the session's current config; when no telemetry
1104
+ * is active this falls back to the default set (matching create). If browser is
1105
+ * omitted or empty, the default set is used. A browser config that disables every
1106
+ * category stops capture on update and starts no capture on create.
1107
1107
  */
1108
1108
  browser?: TelemetryAPI.BrowserTelemetryCategoriesConfig;
1109
1109
 
@@ -56,6 +56,8 @@ import {
56
56
  BrowserAPICallEvent,
57
57
  BrowserCallStack,
58
58
  BrowserCaptchaSolveResultEvent,
59
+ BrowserCdpCommandEvent,
60
+ BrowserCdpCommandMethod,
59
61
  BrowserCdpConnectEvent,
60
62
  BrowserCdpDisconnectEvent,
61
63
  BrowserConsoleErrorEvent,
@@ -77,6 +79,7 @@ import {
77
79
  BrowserNetworkLoadingFailedEvent,
78
80
  BrowserNetworkRequestEvent,
79
81
  BrowserNetworkResponseEvent,
82
+ BrowserPageCrashedEvent,
80
83
  BrowserPageDomContentLoadedEvent,
81
84
  BrowserPageLayoutSettledEvent,
82
85
  BrowserPageLayoutShiftEvent,
@@ -85,12 +88,15 @@ import {
85
88
  BrowserPageNavigationEvent,
86
89
  BrowserPageNavigationSettledEvent,
87
90
  BrowserPageTabOpenedEvent,
91
+ BrowserPlatformAPICallEvent,
88
92
  BrowserProxyErrorEvent,
89
93
  BrowserServiceCrashedEvent,
90
94
  BrowserSystemOomKillEvent,
91
95
  BrowserTelemetryCategoriesConfig,
92
96
  BrowserTelemetryCategoryConfig,
97
+ BrowserTelemetryCdpControlConfig,
93
98
  BrowserTelemetryConfig,
99
+ BrowserTelemetryControlConfig,
94
100
  BrowserTelemetryEvent,
95
101
  BrowserTelemetryExportConfig,
96
102
  BrowserTelemetryOtlpExportConfig,
@@ -252,8 +258,8 @@ export class Browsers extends APIResource {
252
258
  }
253
259
 
254
260
  /**
255
- * Loads one or more unpacked extensions and restarts Chromium on the browser
256
- * instance.
261
+ * Loads one or more unpacked extensions using live CDP activation when eligible.
262
+ * Chromium restarts when enterprise policy requires it or live activation fails.
257
263
  *
258
264
  * @example
259
265
  * ```ts
@@ -473,7 +479,7 @@ export interface BrowserCreateResponse {
473
479
  /**
474
480
  * Geographic region of the browser session. Fixed once the session is created.
475
481
  */
476
- region: 'us-east' | 'eu-west';
482
+ region: 'us-east' | 'eu-west' | 'ap-southeast';
477
483
 
478
484
  /**
479
485
  * Unique identifier for the browser session
@@ -633,7 +639,7 @@ export interface BrowserRetrieveResponse {
633
639
  /**
634
640
  * Geographic region of the browser session. Fixed once the session is created.
635
641
  */
636
- region: 'us-east' | 'eu-west';
642
+ region: 'us-east' | 'eu-west' | 'ap-southeast';
637
643
 
638
644
  /**
639
645
  * Unique identifier for the browser session
@@ -793,7 +799,7 @@ export interface BrowserUpdateResponse {
793
799
  /**
794
800
  * Geographic region of the browser session. Fixed once the session is created.
795
801
  */
796
- region: 'us-east' | 'eu-west';
802
+ region: 'us-east' | 'eu-west' | 'ap-southeast';
797
803
 
798
804
  /**
799
805
  * Unique identifier for the browser session
@@ -953,7 +959,7 @@ export interface BrowserListResponse {
953
959
  /**
954
960
  * Geographic region of the browser session. Fixed once the session is created.
955
961
  */
956
- region: 'us-east' | 'eu-west';
962
+ region: 'us-east' | 'eu-west' | 'ap-southeast';
957
963
 
958
964
  /**
959
965
  * Unique identifier for the browser session
@@ -1130,7 +1136,7 @@ export interface BrowserCreateParams {
1130
1136
 
1131
1137
  /**
1132
1138
  * If true, enables GPU acceleration for the browser session. Requires Start-Up or
1133
- * Enterprise plan and headless=false.
1139
+ * Enterprise plan, headless=false, and region=us-east.
1134
1140
  */
1135
1141
  gpu?: boolean;
1136
1142
 
@@ -1197,7 +1203,7 @@ export interface BrowserCreateParams {
1197
1203
  * created. Region selection requires a Start-Up or Enterprise plan, defaults to
1198
1204
  * us-east when omitted on create.
1199
1205
  */
1200
- region?: 'us-east' | 'eu-west';
1206
+ region?: 'us-east' | 'eu-west' | 'ap-southeast';
1201
1207
 
1202
1208
  /**
1203
1209
  * Optional URL to open when the browser session is created. Navigation is
@@ -1270,12 +1276,12 @@ export namespace BrowserCreateParams {
1270
1276
  * Per-category capture flags. The operational categories (control, connection,
1271
1277
  * system, captcha) are captured whenever telemetry is enabled; set one to
1272
1278
  * enabled=false to opt out. The CDP categories (console, network, page,
1273
- * interaction) and screenshot are off by default; set enabled=true to opt in. On
1274
- * create, provided categories layer onto the default set. On update, provided
1275
- * categories merge onto the session's current config; when no telemetry is active
1276
- * this falls back to the default set (matching create). If browser is omitted or
1277
- * empty, the default set is used. A browser config that disables every category
1278
- * stops capture on update and starts no capture on create.
1279
+ * interaction), screenshot and platform are off by default; set enabled=true to
1280
+ * opt in. On create, provided categories layer onto the default set. On update,
1281
+ * provided categories merge onto the session's current config; when no telemetry
1282
+ * is active this falls back to the default set (matching create). If browser is
1283
+ * omitted or empty, the default set is used. A browser config that disables every
1284
+ * category stops capture on update and starts no capture on create.
1279
1285
  */
1280
1286
  browser?: TelemetryAPI.BrowserTelemetryCategoriesConfig;
1281
1287
 
@@ -1428,12 +1434,12 @@ export namespace BrowserUpdateParams {
1428
1434
  * Per-category capture flags. The operational categories (control, connection,
1429
1435
  * system, captcha) are captured whenever telemetry is enabled; set one to
1430
1436
  * enabled=false to opt out. The CDP categories (console, network, page,
1431
- * interaction) and screenshot are off by default; set enabled=true to opt in. On
1432
- * create, provided categories layer onto the default set. On update, provided
1433
- * categories merge onto the session's current config; when no telemetry is active
1434
- * this falls back to the default set (matching create). If browser is omitted or
1435
- * empty, the default set is used. A browser config that disables every category
1436
- * stops capture on update and starts no capture on create.
1437
+ * interaction), screenshot and platform are off by default; set enabled=true to
1438
+ * opt in. On create, provided categories layer onto the default set. On update,
1439
+ * provided categories merge onto the session's current config; when no telemetry
1440
+ * is active this falls back to the default set (matching create). If browser is
1441
+ * omitted or empty, the default set is used. A browser config that disables every
1442
+ * category stops capture on update and starts no capture on create.
1437
1443
  */
1438
1444
  browser?: TelemetryAPI.BrowserTelemetryCategoriesConfig;
1439
1445
 
@@ -1536,7 +1542,7 @@ export interface BrowserListParams extends OffsetPaginationParams {
1536
1542
  /**
1537
1543
  * Filter sessions by geographic region. Omit to list sessions in all regions.
1538
1544
  */
1539
- region?: 'us-east' | 'eu-west';
1545
+ region?: 'us-east' | 'eu-west' | 'ap-southeast';
1540
1546
 
1541
1547
  /**
1542
1548
  * Filter sessions by status. "active" returns only active sessions (default),
@@ -1645,6 +1651,8 @@ export declare namespace Browsers {
1645
1651
  type BrowserAPICallEvent as BrowserAPICallEvent,
1646
1652
  type BrowserCallStack as BrowserCallStack,
1647
1653
  type BrowserCaptchaSolveResultEvent as BrowserCaptchaSolveResultEvent,
1654
+ type BrowserCdpCommandEvent as BrowserCdpCommandEvent,
1655
+ type BrowserCdpCommandMethod as BrowserCdpCommandMethod,
1648
1656
  type BrowserCdpConnectEvent as BrowserCdpConnectEvent,
1649
1657
  type BrowserCdpDisconnectEvent as BrowserCdpDisconnectEvent,
1650
1658
  type BrowserConsoleErrorEvent as BrowserConsoleErrorEvent,
@@ -1666,6 +1674,7 @@ export declare namespace Browsers {
1666
1674
  type BrowserNetworkLoadingFailedEvent as BrowserNetworkLoadingFailedEvent,
1667
1675
  type BrowserNetworkRequestEvent as BrowserNetworkRequestEvent,
1668
1676
  type BrowserNetworkResponseEvent as BrowserNetworkResponseEvent,
1677
+ type BrowserPageCrashedEvent as BrowserPageCrashedEvent,
1669
1678
  type BrowserPageDomContentLoadedEvent as BrowserPageDomContentLoadedEvent,
1670
1679
  type BrowserPageLayoutSettledEvent as BrowserPageLayoutSettledEvent,
1671
1680
  type BrowserPageLayoutShiftEvent as BrowserPageLayoutShiftEvent,
@@ -1674,12 +1683,15 @@ export declare namespace Browsers {
1674
1683
  type BrowserPageNavigationEvent as BrowserPageNavigationEvent,
1675
1684
  type BrowserPageNavigationSettledEvent as BrowserPageNavigationSettledEvent,
1676
1685
  type BrowserPageTabOpenedEvent as BrowserPageTabOpenedEvent,
1686
+ type BrowserPlatformAPICallEvent as BrowserPlatformAPICallEvent,
1677
1687
  type BrowserProxyErrorEvent as BrowserProxyErrorEvent,
1678
1688
  type BrowserServiceCrashedEvent as BrowserServiceCrashedEvent,
1679
1689
  type BrowserSystemOomKillEvent as BrowserSystemOomKillEvent,
1680
1690
  type BrowserTelemetryCategoriesConfig as BrowserTelemetryCategoriesConfig,
1681
1691
  type BrowserTelemetryCategoryConfig as BrowserTelemetryCategoryConfig,
1692
+ type BrowserTelemetryCdpControlConfig as BrowserTelemetryCdpControlConfig,
1682
1693
  type BrowserTelemetryConfig as BrowserTelemetryConfig,
1694
+ type BrowserTelemetryControlConfig as BrowserTelemetryControlConfig,
1683
1695
  type BrowserTelemetryEvent as BrowserTelemetryEvent,
1684
1696
  type BrowserTelemetryExportConfig as BrowserTelemetryExportConfig,
1685
1697
  type BrowserTelemetryOtlpExportConfig as BrowserTelemetryOtlpExportConfig,
@@ -91,6 +91,8 @@ export {
91
91
  type BrowserAPICallEvent,
92
92
  type BrowserCallStack,
93
93
  type BrowserCaptchaSolveResultEvent,
94
+ type BrowserCdpCommandEvent,
95
+ type BrowserCdpCommandMethod,
94
96
  type BrowserCdpConnectEvent,
95
97
  type BrowserCdpDisconnectEvent,
96
98
  type BrowserConsoleErrorEvent,
@@ -112,6 +114,7 @@ export {
112
114
  type BrowserNetworkLoadingFailedEvent,
113
115
  type BrowserNetworkRequestEvent,
114
116
  type BrowserNetworkResponseEvent,
117
+ type BrowserPageCrashedEvent,
115
118
  type BrowserPageDomContentLoadedEvent,
116
119
  type BrowserPageLayoutSettledEvent,
117
120
  type BrowserPageLayoutShiftEvent,
@@ -120,12 +123,15 @@ export {
120
123
  type BrowserPageNavigationEvent,
121
124
  type BrowserPageNavigationSettledEvent,
122
125
  type BrowserPageTabOpenedEvent,
126
+ type BrowserPlatformAPICallEvent,
123
127
  type BrowserProxyErrorEvent,
124
128
  type BrowserServiceCrashedEvent,
125
129
  type BrowserSystemOomKillEvent,
126
130
  type BrowserTelemetryCategoriesConfig,
127
131
  type BrowserTelemetryCategoryConfig,
132
+ type BrowserTelemetryCdpControlConfig,
128
133
  type BrowserTelemetryConfig,
134
+ type BrowserTelemetryControlConfig,
129
135
  type BrowserTelemetryEvent,
130
136
  type BrowserTelemetryExportConfig,
131
137
  type BrowserTelemetryOtlpExportConfig,