@onkernel/sdk 0.55.0 → 0.58.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 (263) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/api-promise.d.mts +1 -0
  3. package/api-promise.d.mts.map +1 -1
  4. package/api-promise.d.ts +1 -0
  5. package/api-promise.d.ts.map +1 -1
  6. package/api-promise.mjs +1 -0
  7. package/api-promise.mjs.map +1 -1
  8. package/client.d.mts +8 -2
  9. package/client.d.mts.map +1 -1
  10. package/client.d.ts +8 -2
  11. package/client.d.ts.map +1 -1
  12. package/client.js +6 -0
  13. package/client.js.map +1 -1
  14. package/client.mjs +6 -0
  15. package/client.mjs.map +1 -1
  16. package/core/api-promise.d.mts.map +1 -1
  17. package/core/api-promise.d.ts.map +1 -1
  18. package/core/api-promise.mjs.map +1 -1
  19. package/core/error.mjs.map +1 -1
  20. package/core/pagination.d.mts.map +1 -1
  21. package/core/pagination.d.ts.map +1 -1
  22. package/core/pagination.mjs.map +1 -1
  23. package/core/resource.d.mts.map +1 -1
  24. package/core/resource.d.ts.map +1 -1
  25. package/core/streaming.d.mts.map +1 -1
  26. package/core/streaming.d.ts.map +1 -1
  27. package/core/streaming.mjs.map +1 -1
  28. package/core/uploads.d.mts.map +1 -1
  29. package/core/uploads.d.ts.map +1 -1
  30. package/core/uploads.mjs.map +1 -1
  31. package/error.d.mts +1 -0
  32. package/error.d.mts.map +1 -1
  33. package/error.d.ts +1 -0
  34. package/error.d.ts.map +1 -1
  35. package/error.mjs +1 -0
  36. package/error.mjs.map +1 -1
  37. package/index.d.mts.map +1 -1
  38. package/index.d.ts.map +1 -1
  39. package/index.mjs.map +1 -1
  40. package/internal/decoders/line.mjs.map +1 -1
  41. package/internal/detect-platform.mjs.map +1 -1
  42. package/internal/headers.mjs.map +1 -1
  43. package/internal/parse.d.mts.map +1 -1
  44. package/internal/parse.d.ts.map +1 -1
  45. package/internal/parse.mjs.map +1 -1
  46. package/internal/request-options.d.mts.map +1 -1
  47. package/internal/request-options.d.ts.map +1 -1
  48. package/internal/shims.d.mts +6 -0
  49. package/internal/shims.d.mts.map +1 -1
  50. package/internal/shims.d.ts +6 -0
  51. package/internal/shims.d.ts.map +1 -1
  52. package/internal/to-file.d.mts.map +1 -1
  53. package/internal/to-file.d.ts.map +1 -1
  54. package/internal/to-file.mjs.map +1 -1
  55. package/internal/types.d.mts +4 -4
  56. package/internal/types.d.mts.map +1 -1
  57. package/internal/types.d.ts +4 -4
  58. package/internal/types.d.ts.map +1 -1
  59. package/internal/uploads.d.mts.map +1 -1
  60. package/internal/uploads.d.ts.map +1 -1
  61. package/internal/uploads.mjs.map +1 -1
  62. package/internal/utils/base64.mjs.map +1 -1
  63. package/internal/utils/log.d.mts.map +1 -1
  64. package/internal/utils/log.d.ts.map +1 -1
  65. package/internal/utils/log.mjs.map +1 -1
  66. package/internal/utils/path.mjs.map +1 -1
  67. package/internal/utils/query.mjs.map +1 -1
  68. package/internal/utils/values.mjs.map +1 -1
  69. package/internal/utils.d.mts.map +1 -1
  70. package/internal/utils.d.ts.map +1 -1
  71. package/internal/utils.mjs.map +1 -1
  72. package/lib/browser-fetch.d.mts.map +1 -1
  73. package/lib/browser-fetch.d.ts.map +1 -1
  74. package/lib/browser-fetch.mjs.map +1 -1
  75. package/lib/browser-routing.d.mts.map +1 -1
  76. package/lib/browser-routing.d.ts.map +1 -1
  77. package/lib/browser-routing.mjs.map +1 -1
  78. package/package.json +1 -1
  79. package/pagination.d.mts +1 -0
  80. package/pagination.d.mts.map +1 -1
  81. package/pagination.d.ts +1 -0
  82. package/pagination.d.ts.map +1 -1
  83. package/pagination.mjs +1 -0
  84. package/pagination.mjs.map +1 -1
  85. package/resource.d.mts +1 -0
  86. package/resource.d.mts.map +1 -1
  87. package/resource.d.ts +1 -0
  88. package/resource.d.ts.map +1 -1
  89. package/resource.mjs +1 -0
  90. package/resource.mjs.map +1 -1
  91. package/resources/api-keys.d.mts +146 -0
  92. package/resources/api-keys.d.mts.map +1 -0
  93. package/resources/api-keys.d.ts +146 -0
  94. package/resources/api-keys.d.ts.map +1 -0
  95. package/resources/api-keys.js +81 -0
  96. package/resources/api-keys.js.map +1 -0
  97. package/resources/api-keys.mjs +77 -0
  98. package/resources/api-keys.mjs.map +1 -0
  99. package/resources/apps.d.mts.map +1 -1
  100. package/resources/apps.d.ts.map +1 -1
  101. package/resources/apps.mjs.map +1 -1
  102. package/resources/auth/auth.d.mts.map +1 -1
  103. package/resources/auth/auth.d.ts.map +1 -1
  104. package/resources/auth/auth.mjs.map +1 -1
  105. package/resources/auth/connections.d.mts +35 -5
  106. package/resources/auth/connections.d.mts.map +1 -1
  107. package/resources/auth/connections.d.ts +35 -5
  108. package/resources/auth/connections.d.ts.map +1 -1
  109. package/resources/auth/connections.mjs.map +1 -1
  110. package/resources/auth/index.d.mts.map +1 -1
  111. package/resources/auth/index.d.ts.map +1 -1
  112. package/resources/auth/index.mjs.map +1 -1
  113. package/resources/auth.d.mts.map +1 -1
  114. package/resources/auth.d.ts.map +1 -1
  115. package/resources/auth.mjs.map +1 -1
  116. package/resources/browser-pools.d.mts +33 -15
  117. package/resources/browser-pools.d.mts.map +1 -1
  118. package/resources/browser-pools.d.ts +33 -15
  119. package/resources/browser-pools.d.ts.map +1 -1
  120. package/resources/browser-pools.js.map +1 -1
  121. package/resources/browser-pools.mjs.map +1 -1
  122. package/resources/browsers/browsers.d.mts +144 -53
  123. package/resources/browsers/browsers.d.mts.map +1 -1
  124. package/resources/browsers/browsers.d.ts +144 -53
  125. package/resources/browsers/browsers.d.ts.map +1 -1
  126. package/resources/browsers/browsers.js +4 -14
  127. package/resources/browsers/browsers.js.map +1 -1
  128. package/resources/browsers/browsers.mjs +4 -14
  129. package/resources/browsers/browsers.mjs.map +1 -1
  130. package/resources/browsers/computer.d.mts.map +1 -1
  131. package/resources/browsers/computer.d.ts.map +1 -1
  132. package/resources/browsers/computer.mjs.map +1 -1
  133. package/resources/browsers/fs/fs.d.mts.map +1 -1
  134. package/resources/browsers/fs/fs.d.ts.map +1 -1
  135. package/resources/browsers/fs/fs.mjs.map +1 -1
  136. package/resources/browsers/fs/index.d.mts.map +1 -1
  137. package/resources/browsers/fs/index.d.ts.map +1 -1
  138. package/resources/browsers/fs/index.mjs.map +1 -1
  139. package/resources/browsers/fs/watch.d.mts.map +1 -1
  140. package/resources/browsers/fs/watch.d.ts.map +1 -1
  141. package/resources/browsers/fs/watch.mjs.map +1 -1
  142. package/resources/browsers/fs.d.mts.map +1 -1
  143. package/resources/browsers/fs.d.ts.map +1 -1
  144. package/resources/browsers/fs.mjs.map +1 -1
  145. package/resources/browsers/index.d.mts +2 -1
  146. package/resources/browsers/index.d.mts.map +1 -1
  147. package/resources/browsers/index.d.ts +2 -1
  148. package/resources/browsers/index.d.ts.map +1 -1
  149. package/resources/browsers/index.js +3 -1
  150. package/resources/browsers/index.js.map +1 -1
  151. package/resources/browsers/index.mjs +1 -0
  152. package/resources/browsers/index.mjs.map +1 -1
  153. package/resources/browsers/logs.d.mts.map +1 -1
  154. package/resources/browsers/logs.d.ts.map +1 -1
  155. package/resources/browsers/logs.mjs.map +1 -1
  156. package/resources/browsers/playwright.d.mts.map +1 -1
  157. package/resources/browsers/playwright.d.ts.map +1 -1
  158. package/resources/browsers/playwright.mjs.map +1 -1
  159. package/resources/browsers/process.d.mts.map +1 -1
  160. package/resources/browsers/process.d.ts.map +1 -1
  161. package/resources/browsers/process.mjs.map +1 -1
  162. package/resources/browsers/replays.d.mts.map +1 -1
  163. package/resources/browsers/replays.d.ts.map +1 -1
  164. package/resources/browsers/replays.mjs.map +1 -1
  165. package/resources/browsers/telemetry.d.mts +1230 -0
  166. package/resources/browsers/telemetry.d.mts.map +1 -0
  167. package/resources/browsers/telemetry.d.ts +1230 -0
  168. package/resources/browsers/telemetry.d.ts.map +1 -0
  169. package/resources/browsers/telemetry.js +45 -0
  170. package/resources/browsers/telemetry.js.map +1 -0
  171. package/resources/browsers/telemetry.mjs +41 -0
  172. package/resources/browsers/telemetry.mjs.map +1 -0
  173. package/resources/browsers.d.mts.map +1 -1
  174. package/resources/browsers.d.ts.map +1 -1
  175. package/resources/browsers.mjs.map +1 -1
  176. package/resources/credential-providers.d.mts.map +1 -1
  177. package/resources/credential-providers.d.ts.map +1 -1
  178. package/resources/credential-providers.mjs.map +1 -1
  179. package/resources/credentials.d.mts.map +1 -1
  180. package/resources/credentials.d.ts.map +1 -1
  181. package/resources/credentials.mjs.map +1 -1
  182. package/resources/deployments.d.mts.map +1 -1
  183. package/resources/deployments.d.ts.map +1 -1
  184. package/resources/deployments.mjs.map +1 -1
  185. package/resources/extensions.d.mts.map +1 -1
  186. package/resources/extensions.d.ts.map +1 -1
  187. package/resources/extensions.mjs.map +1 -1
  188. package/resources/index.d.mts +2 -1
  189. package/resources/index.d.mts.map +1 -1
  190. package/resources/index.d.ts +2 -1
  191. package/resources/index.d.ts.map +1 -1
  192. package/resources/index.js +3 -1
  193. package/resources/index.js.map +1 -1
  194. package/resources/index.mjs +1 -0
  195. package/resources/index.mjs.map +1 -1
  196. package/resources/invocations.d.mts +18 -6
  197. package/resources/invocations.d.mts.map +1 -1
  198. package/resources/invocations.d.ts +18 -6
  199. package/resources/invocations.d.ts.map +1 -1
  200. package/resources/invocations.js.map +1 -1
  201. package/resources/invocations.mjs.map +1 -1
  202. package/resources/profiles.d.mts.map +1 -1
  203. package/resources/profiles.d.ts.map +1 -1
  204. package/resources/profiles.mjs.map +1 -1
  205. package/resources/projects/index.d.mts.map +1 -1
  206. package/resources/projects/index.d.ts.map +1 -1
  207. package/resources/projects/index.mjs.map +1 -1
  208. package/resources/projects/limits.d.mts +0 -15
  209. package/resources/projects/limits.d.mts.map +1 -1
  210. package/resources/projects/limits.d.ts +0 -15
  211. package/resources/projects/limits.d.ts.map +1 -1
  212. package/resources/projects/limits.js +2 -2
  213. package/resources/projects/limits.js.map +1 -1
  214. package/resources/projects/limits.mjs +2 -2
  215. package/resources/projects/limits.mjs.map +1 -1
  216. package/resources/projects/projects.d.mts +1 -2
  217. package/resources/projects/projects.d.mts.map +1 -1
  218. package/resources/projects/projects.d.ts +1 -2
  219. package/resources/projects/projects.d.ts.map +1 -1
  220. package/resources/projects/projects.js +6 -7
  221. package/resources/projects/projects.js.map +1 -1
  222. package/resources/projects/projects.mjs +6 -7
  223. package/resources/projects/projects.mjs.map +1 -1
  224. package/resources/projects.d.mts.map +1 -1
  225. package/resources/projects.d.ts.map +1 -1
  226. package/resources/projects.mjs.map +1 -1
  227. package/resources/proxies.d.mts +3 -1
  228. package/resources/proxies.d.mts.map +1 -1
  229. package/resources/proxies.d.ts +3 -1
  230. package/resources/proxies.d.ts.map +1 -1
  231. package/resources/proxies.mjs.map +1 -1
  232. package/resources.d.mts.map +1 -1
  233. package/resources.d.ts.map +1 -1
  234. package/resources.mjs.map +1 -1
  235. package/src/client.ts +24 -4
  236. package/src/resources/api-keys.ts +195 -0
  237. package/src/resources/auth/connections.ts +49 -5
  238. package/src/resources/browser-pools.ts +33 -16
  239. package/src/resources/browsers/browsers.ts +218 -69
  240. package/src/resources/browsers/index.ts +35 -2
  241. package/src/resources/browsers/telemetry.ts +1521 -0
  242. package/src/resources/index.ts +9 -2
  243. package/src/resources/invocations.ts +18 -7
  244. package/src/resources/projects/limits.ts +2 -20
  245. package/src/resources/projects/projects.ts +6 -7
  246. package/src/resources/proxies.ts +3 -1
  247. package/src/version.ts +1 -1
  248. package/streaming.d.mts +1 -0
  249. package/streaming.d.mts.map +1 -1
  250. package/streaming.d.ts +1 -0
  251. package/streaming.d.ts.map +1 -1
  252. package/streaming.mjs +1 -0
  253. package/streaming.mjs.map +1 -1
  254. package/uploads.d.mts +1 -0
  255. package/uploads.d.mts.map +1 -1
  256. package/uploads.d.ts +1 -0
  257. package/uploads.d.ts.map +1 -1
  258. package/uploads.mjs +1 -0
  259. package/uploads.mjs.map +1 -1
  260. package/version.d.mts +1 -1
  261. package/version.d.ts +1 -1
  262. package/version.js +1 -1
  263. package/version.mjs +1 -1
package/src/client.ts CHANGED
@@ -19,6 +19,15 @@ import { AbstractPage, type OffsetPaginationParams, OffsetPaginationResponse } f
19
19
  import * as Uploads from './core/uploads';
20
20
  import * as API from './resources/index';
21
21
  import { APIPromise } from './core/api-promise';
22
+ import {
23
+ APIKey,
24
+ APIKeyCreateParams,
25
+ APIKeyListParams,
26
+ APIKeyUpdateParams,
27
+ APIKeys,
28
+ APIKeysOffsetPagination,
29
+ CreatedAPIKey,
30
+ } from './resources/api-keys';
22
31
  import { AppListParams, AppListResponse, AppListResponsesOffsetPagination, Apps } from './resources/apps';
23
32
  import {
24
33
  BrowserRouteCache,
@@ -110,12 +119,10 @@ import {
110
119
  BrowserCreateResponse,
111
120
  BrowserCurlParams,
112
121
  BrowserCurlResponse,
113
- BrowserDeleteParams,
114
122
  BrowserListParams,
115
123
  BrowserListResponse,
116
124
  BrowserListResponsesOffsetPagination,
117
125
  BrowserLoadExtensionsParams,
118
- BrowserPersistence,
119
126
  BrowserPoolRef,
120
127
  BrowserRetrieveParams,
121
128
  BrowserRetrieveResponse,
@@ -972,6 +979,10 @@ export class Kernel {
972
979
  * Create and manage projects for resource isolation within an organization.
973
980
  */
974
981
  projects: API.Projects = new API.Projects(this);
982
+ /**
983
+ * Create and manage API keys for organization and project-scoped access.
984
+ */
985
+ apiKeys: API.APIKeys = new API.APIKeys(this);
975
986
  /**
976
987
  * Configure external credential providers like 1Password.
977
988
  */
@@ -989,6 +1000,7 @@ Kernel.Extensions = Extensions;
989
1000
  Kernel.BrowserPools = BrowserPools;
990
1001
  Kernel.Credentials = Credentials;
991
1002
  Kernel.Projects = Projects;
1003
+ Kernel.APIKeys = APIKeys;
992
1004
  Kernel.CredentialProviders = CredentialProviders;
993
1005
 
994
1006
  export declare namespace Kernel {
@@ -1038,7 +1050,6 @@ export declare namespace Kernel {
1038
1050
 
1039
1051
  export {
1040
1052
  Browsers as Browsers,
1041
- type BrowserPersistence as BrowserPersistence,
1042
1053
  type BrowserPoolRef as BrowserPoolRef,
1043
1054
  type BrowserUsage as BrowserUsage,
1044
1055
  type Profile as Profile,
@@ -1052,7 +1063,6 @@ export declare namespace Kernel {
1052
1063
  type BrowserRetrieveParams as BrowserRetrieveParams,
1053
1064
  type BrowserUpdateParams as BrowserUpdateParams,
1054
1065
  type BrowserListParams as BrowserListParams,
1055
- type BrowserDeleteParams as BrowserDeleteParams,
1056
1066
  type BrowserCurlParams as BrowserCurlParams,
1057
1067
  type BrowserLoadExtensionsParams as BrowserLoadExtensionsParams,
1058
1068
  };
@@ -1118,6 +1128,16 @@ export declare namespace Kernel {
1118
1128
  type ProjectListParams as ProjectListParams,
1119
1129
  };
1120
1130
 
1131
+ export {
1132
+ APIKeys as APIKeys,
1133
+ type APIKey as APIKey,
1134
+ type CreatedAPIKey as CreatedAPIKey,
1135
+ type APIKeysOffsetPagination as APIKeysOffsetPagination,
1136
+ type APIKeyCreateParams as APIKeyCreateParams,
1137
+ type APIKeyUpdateParams as APIKeyUpdateParams,
1138
+ type APIKeyListParams as APIKeyListParams,
1139
+ };
1140
+
1121
1141
  export {
1122
1142
  CredentialProviders as CredentialProviders,
1123
1143
  type CreateCredentialProviderRequest as CreateCredentialProviderRequest,
@@ -0,0 +1,195 @@
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 { OffsetPagination, type OffsetPaginationParams, PagePromise } from '../core/pagination';
6
+ import { buildHeaders } from '../internal/headers';
7
+ import { RequestOptions } from '../internal/request-options';
8
+ import { path } from '../internal/utils/path';
9
+
10
+ /**
11
+ * Create and manage API keys for organization and project-scoped access.
12
+ */
13
+ export class APIKeys extends APIResource {
14
+ /**
15
+ * Create a new API key within the authenticated organization.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * const createdAPIKey = await client.apiKeys.create({
20
+ * name: 'staging',
21
+ * });
22
+ * ```
23
+ */
24
+ create(body: APIKeyCreateParams, options?: RequestOptions): APIPromise<CreatedAPIKey> {
25
+ return this._client.post('/org/api_keys', { body, ...options });
26
+ }
27
+
28
+ /**
29
+ * Retrieve an API key by ID for the authenticated organization. API keys are
30
+ * masked.
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const apiKey = await client.apiKeys.retrieve('id');
35
+ * ```
36
+ */
37
+ retrieve(id: string, options?: RequestOptions): APIPromise<APIKey> {
38
+ return this._client.get(path`/org/api_keys/${id}`, options);
39
+ }
40
+
41
+ /**
42
+ * Update an API key's name.
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * const apiKey = await client.apiKeys.update('id', {
47
+ * name: 'new-api-name',
48
+ * });
49
+ * ```
50
+ */
51
+ update(id: string, body: APIKeyUpdateParams, options?: RequestOptions): APIPromise<APIKey> {
52
+ return this._client.patch(path`/org/api_keys/${id}`, { body, ...options });
53
+ }
54
+
55
+ /**
56
+ * List API keys for the authenticated organization. API keys are masked.
57
+ *
58
+ * @example
59
+ * ```ts
60
+ * // Automatically fetches more pages as needed.
61
+ * for await (const apiKey of client.apiKeys.list()) {
62
+ * // ...
63
+ * }
64
+ * ```
65
+ */
66
+ list(
67
+ query: APIKeyListParams | null | undefined = {},
68
+ options?: RequestOptions,
69
+ ): PagePromise<APIKeysOffsetPagination, APIKey> {
70
+ return this._client.getAPIList('/org/api_keys', OffsetPagination<APIKey>, { query, ...options });
71
+ }
72
+
73
+ /**
74
+ * Delete an API key.
75
+ *
76
+ * @example
77
+ * ```ts
78
+ * await client.apiKeys.delete('id');
79
+ * ```
80
+ */
81
+ delete(id: string, options?: RequestOptions): APIPromise<void> {
82
+ return this._client.delete(path`/org/api_keys/${id}`, {
83
+ ...options,
84
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
85
+ });
86
+ }
87
+ }
88
+
89
+ export type APIKeysOffsetPagination = OffsetPagination<APIKey>;
90
+
91
+ export interface APIKey {
92
+ /**
93
+ * Unique API key identifier
94
+ */
95
+ id: string;
96
+
97
+ /**
98
+ * When the API key was created
99
+ */
100
+ created_at: string;
101
+
102
+ created_by: APIKey.CreatedBy;
103
+
104
+ /**
105
+ * When the API key expires
106
+ */
107
+ expires_at: string | null;
108
+
109
+ /**
110
+ * Masked version of the API key
111
+ */
112
+ masked_key: string;
113
+
114
+ /**
115
+ * API key name
116
+ */
117
+ name: string;
118
+
119
+ /**
120
+ * Project identifier for project-scoped API keys. Null means org-wide.
121
+ */
122
+ project_id: string | null;
123
+
124
+ /**
125
+ * Project name for project-scoped API keys. Null means the key is org-wide or the
126
+ * project name is unavailable.
127
+ */
128
+ project_name: string | null;
129
+ }
130
+
131
+ export namespace APIKey {
132
+ export interface CreatedBy {
133
+ /**
134
+ * Kernel user ID of the creator.
135
+ */
136
+ id: string;
137
+
138
+ /**
139
+ * Email address of the creator.
140
+ */
141
+ email: string;
142
+
143
+ /**
144
+ * Display name of the creator, if available.
145
+ */
146
+ name: string | null;
147
+ }
148
+ }
149
+
150
+ /**
151
+ * API key returned immediately after creation. Includes the plaintext key once.
152
+ */
153
+ export interface CreatedAPIKey extends APIKey {
154
+ /**
155
+ * Plaintext API key. Only returned once when the key is created.
156
+ */
157
+ key: string;
158
+ }
159
+
160
+ export interface APIKeyCreateParams {
161
+ /**
162
+ * API key name (1-255 characters)
163
+ */
164
+ name: string;
165
+
166
+ /**
167
+ * Number of days until expiry, up to 3650. Use null for never.
168
+ */
169
+ days_to_expire?: number | null;
170
+
171
+ /**
172
+ * Unique project identifier
173
+ */
174
+ project_id?: string | null;
175
+ }
176
+
177
+ export interface APIKeyUpdateParams {
178
+ /**
179
+ * New API key name
180
+ */
181
+ name: string;
182
+ }
183
+
184
+ export interface APIKeyListParams extends OffsetPaginationParams {}
185
+
186
+ export declare namespace APIKeys {
187
+ export {
188
+ type APIKey as APIKey,
189
+ type CreatedAPIKey as CreatedAPIKey,
190
+ type APIKeysOffsetPagination as APIKeysOffsetPagination,
191
+ type APIKeyCreateParams as APIKeyCreateParams,
192
+ type APIKeyUpdateParams as APIKeyUpdateParams,
193
+ type APIKeyListParams as APIKeyListParams,
194
+ };
195
+ }
@@ -269,15 +269,59 @@ export interface ManagedAuth {
269
269
  browser_session_id?: string | null;
270
270
 
271
271
  /**
272
- * Whether automatic re-authentication is possible (has credential, selectors, and
273
- * login_url)
272
+ * Whether Kernel can automatically re-authenticate this connection when the
273
+ * session expires. Requires a prior successful login plus either a Kernel
274
+ * credential or an external credential reference. See `can_reauth_reason` for the
275
+ * specific outcome.
274
276
  */
275
277
  can_reauth?: boolean;
276
278
 
277
279
  /**
278
- * Reason why automatic re-authentication is or is not possible
279
- */
280
- can_reauth_reason?: string;
280
+ * Machine-readable reason for the current value of `can_reauth`. Affirmative
281
+ * values (re-auth is possible):
282
+ *
283
+ * - `external_credential` — an external credential provider is attached
284
+ * - `cua_has_credential` — CUA flow with a stored credential
285
+ * - `has_credential` — Kernel credential is attached (optimistic; plan viability
286
+ * not checked)
287
+ * - `viable_plans_found` — at least one stored login plan can be replayed
288
+ * - `no_requirements_recorded` — no recorded credential requirements to fail
289
+ * against
290
+ * - `requirements_satisfiable` — recorded requirements can be met by the attached
291
+ * credential
292
+ *
293
+ * Negative values (a human must complete the login flow):
294
+ *
295
+ * - `no_prior_successful_login` — connection has never completed a successful
296
+ * login
297
+ * - `no_credential` — no Kernel or external credential attached
298
+ * - `no_viable_plans` — credential attached but no replayable login plan exists
299
+ * yet
300
+ * - `viable_plans_require_external_action` — stored plans need an external step
301
+ * (email link, push, etc.)
302
+ * - `requires_external_action` — recorded requirements include an external step
303
+ * - `requires_totp_without_secret` — flow needs a TOTP code but no TOTP secret is
304
+ * stored
305
+ * - `requires_sms_code` — flow needs an SMS code that cannot be received
306
+ * automatically
307
+ * - `requires_email_code` — flow needs an email code that cannot be received
308
+ * automatically
309
+ */
310
+ can_reauth_reason?:
311
+ | 'external_credential'
312
+ | 'cua_has_credential'
313
+ | 'has_credential'
314
+ | 'viable_plans_found'
315
+ | 'no_requirements_recorded'
316
+ | 'requirements_satisfiable'
317
+ | 'no_prior_successful_login'
318
+ | 'no_credential'
319
+ | 'no_viable_plans'
320
+ | 'viable_plans_require_external_action'
321
+ | 'requires_external_action'
322
+ | 'requires_totp_without_secret'
323
+ | 'requires_sms_code'
324
+ | 'requires_email_code';
281
325
 
282
326
  /**
283
327
  * Reference to credentials for the auth connection. Use one of:
@@ -3,6 +3,7 @@
3
3
  import { APIResource } from '../core/resource';
4
4
  import * as Shared from './shared';
5
5
  import * as BrowsersAPI from './browsers/browsers';
6
+ import * as TelemetryAPI from './browsers/telemetry';
6
7
  import { APIPromise } from '../core/api-promise';
7
8
  import { buildHeaders } from '../internal/headers';
8
9
  import { RequestOptions } from '../internal/request-options';
@@ -238,9 +239,11 @@ export namespace BrowserPool {
238
239
  proxy_id?: string;
239
240
 
240
241
  /**
241
- * Optional URL to open when a browser is created for the pool. Navigation is
242
- * best-effort, so navigation failures do not prevent the pool from filling. Reused
243
- * browsers keep the page left by the previous lease.
242
+ * Optional URL to navigate to when a new browser is warmed into the pool.
243
+ * Best-effort: failures to navigate do not fail pool fill. Only applied to
244
+ * newly-warmed browsers; browsers reused via release/acquire keep whatever URL the
245
+ * previous lease left them on. Accepts any URL Chromium can resolve, including
246
+ * chrome:// pages.
244
247
  */
245
248
  start_url?: string;
246
249
 
@@ -323,6 +326,13 @@ export interface BrowserPoolAcquireResponse {
323
326
  */
324
327
  browser_live_view_url?: string;
325
328
 
329
+ /**
330
+ * Custom Chrome enterprise policy overrides that were applied to this browser
331
+ * session, if any. Echoed back for verification. Keys are Chrome enterprise policy
332
+ * names.
333
+ */
334
+ chrome_policy?: { [key: string]: unknown };
335
+
326
336
  /**
327
337
  * When the browser session was soft-deleted. Only present for deleted sessions.
328
338
  */
@@ -339,12 +349,6 @@ export interface BrowserPoolAcquireResponse {
339
349
  */
340
350
  kiosk_mode?: boolean;
341
351
 
342
- /**
343
- * @deprecated DEPRECATED: Use timeout_seconds (up to 72 hours) and Profiles
344
- * instead.
345
- */
346
- persistence?: BrowsersAPI.BrowserPersistence;
347
-
348
352
  /**
349
353
  * Browser pool this session was acquired from, if any.
350
354
  */
@@ -361,10 +365,19 @@ export interface BrowserPoolAcquireResponse {
361
365
  proxy_id?: string;
362
366
 
363
367
  /**
364
- * Start URL requested for the session, if provided.
368
+ * URL the session was asked to navigate to on creation, if any. Recorded for
369
+ * debugging. Navigation is fire-and-forget — the URL is dispatched to the browser
370
+ * without waiting for it to load, and any errors (DNS failure, bad status,
371
+ * timeout) are silently dropped. Captures what was requested, not what the browser
372
+ * actually loaded.
365
373
  */
366
374
  start_url?: string;
367
375
 
376
+ /**
377
+ * Active telemetry configuration for the session, if any.
378
+ */
379
+ telemetry?: TelemetryAPI.BrowserTelemetryConfig | null;
380
+
368
381
  /**
369
382
  * Session usage metrics.
370
383
  */
@@ -443,9 +456,11 @@ export interface BrowserPoolCreateParams {
443
456
  proxy_id?: string;
444
457
 
445
458
  /**
446
- * Optional URL to open when a browser is created for the pool. Navigation is
447
- * best-effort, so navigation failures do not prevent the pool from filling. Reused
448
- * browsers keep the page left by the previous lease.
459
+ * Optional URL to navigate to when a new browser is warmed into the pool.
460
+ * Best-effort: failures to navigate do not fail pool fill. Only applied to
461
+ * newly-warmed browsers; browsers reused via release/acquire keep whatever URL the
462
+ * previous lease left them on. Accepts any URL Chromium can resolve, including
463
+ * chrome:// pages.
449
464
  */
450
465
  start_url?: string;
451
466
 
@@ -540,9 +555,11 @@ export interface BrowserPoolUpdateParams {
540
555
  proxy_id?: string;
541
556
 
542
557
  /**
543
- * Optional URL to open when a browser is created for the pool. Navigation is
544
- * best-effort, so navigation failures do not prevent the pool from filling. Reused
545
- * browsers keep the page left by the previous lease.
558
+ * Optional URL to navigate to when a new browser is warmed into the pool.
559
+ * Best-effort: failures to navigate do not fail pool fill. Only applied to
560
+ * newly-warmed browsers; browsers reused via release/acquire keep whatever URL the
561
+ * previous lease left them on. Accepts any URL Chromium can resolve, including
562
+ * chrome:// pages.
546
563
  */
547
564
  start_url?: string;
548
565