@onkernel/sdk 0.96.0 → 0.98.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.
- package/CHANGELOG.md +15 -0
- package/package.json +1 -1
- package/resources/auth/connections.d.mts +5 -3
- package/resources/auth/connections.d.mts.map +1 -1
- package/resources/auth/connections.d.ts +5 -3
- package/resources/auth/connections.d.ts.map +1 -1
- package/resources/browsers/browsers.d.mts +23 -15
- package/resources/browsers/browsers.d.mts.map +1 -1
- package/resources/browsers/browsers.d.ts +23 -15
- package/resources/browsers/browsers.d.ts.map +1 -1
- package/resources/browsers/browsers.js +23 -15
- package/resources/browsers/browsers.js.map +1 -1
- package/resources/browsers/browsers.mjs +23 -15
- package/resources/browsers/browsers.mjs.map +1 -1
- package/resources/browsers/computer.d.mts +62 -45
- package/resources/browsers/computer.d.mts.map +1 -1
- package/resources/browsers/computer.d.ts +62 -45
- package/resources/browsers/computer.d.ts.map +1 -1
- package/resources/browsers/computer.js +74 -57
- package/resources/browsers/computer.js.map +1 -1
- package/resources/browsers/computer.mjs +74 -57
- package/resources/browsers/computer.mjs.map +1 -1
- package/resources/browsers/fs/fs.d.mts +61 -47
- package/resources/browsers/fs/fs.d.mts.map +1 -1
- package/resources/browsers/fs/fs.d.ts +61 -47
- package/resources/browsers/fs/fs.d.ts.map +1 -1
- package/resources/browsers/fs/fs.js +73 -59
- package/resources/browsers/fs/fs.js.map +1 -1
- package/resources/browsers/fs/fs.mjs +73 -59
- package/resources/browsers/fs/fs.mjs.map +1 -1
- package/resources/browsers/fs/watch.d.mts +8 -8
- package/resources/browsers/fs/watch.d.mts.map +1 -1
- package/resources/browsers/fs/watch.d.ts +8 -8
- package/resources/browsers/fs/watch.d.ts.map +1 -1
- package/resources/browsers/fs/watch.js +9 -9
- package/resources/browsers/fs/watch.js.map +1 -1
- package/resources/browsers/fs/watch.mjs +9 -9
- package/resources/browsers/fs/watch.mjs.map +1 -1
- package/resources/browsers/index.d.mts +2 -1
- package/resources/browsers/index.d.mts.map +1 -1
- package/resources/browsers/index.d.ts +2 -1
- package/resources/browsers/index.d.ts.map +1 -1
- package/resources/browsers/index.js +3 -1
- package/resources/browsers/index.js.map +1 -1
- package/resources/browsers/index.mjs +1 -0
- package/resources/browsers/index.mjs.map +1 -1
- package/resources/browsers/logs.d.mts +5 -4
- package/resources/browsers/logs.d.mts.map +1 -1
- package/resources/browsers/logs.d.ts +5 -4
- package/resources/browsers/logs.d.ts.map +1 -1
- package/resources/browsers/logs.js +6 -5
- package/resources/browsers/logs.js.map +1 -1
- package/resources/browsers/logs.mjs +6 -5
- package/resources/browsers/logs.mjs.map +1 -1
- package/resources/browsers/playwright.d.mts +7 -4
- package/resources/browsers/playwright.d.mts.map +1 -1
- package/resources/browsers/playwright.d.ts +7 -4
- package/resources/browsers/playwright.d.ts.map +1 -1
- package/resources/browsers/playwright.js +8 -5
- package/resources/browsers/playwright.js.map +1 -1
- package/resources/browsers/playwright.mjs +8 -5
- package/resources/browsers/playwright.mjs.map +1 -1
- package/resources/browsers/process.d.mts +31 -23
- package/resources/browsers/process.d.mts.map +1 -1
- package/resources/browsers/process.d.ts +31 -23
- package/resources/browsers/process.d.ts.map +1 -1
- package/resources/browsers/process.js +33 -25
- package/resources/browsers/process.js.map +1 -1
- package/resources/browsers/process.mjs +33 -25
- package/resources/browsers/process.mjs.map +1 -1
- package/resources/browsers/replays.d.mts +14 -10
- package/resources/browsers/replays.d.mts.map +1 -1
- package/resources/browsers/replays.d.ts +14 -10
- package/resources/browsers/replays.d.ts.map +1 -1
- package/resources/browsers/replays.js +16 -12
- package/resources/browsers/replays.js.map +1 -1
- package/resources/browsers/replays.mjs +16 -12
- package/resources/browsers/replays.mjs.map +1 -1
- package/resources/browsers/telemetry.d.mts +158 -12
- package/resources/browsers/telemetry.d.mts.map +1 -1
- package/resources/browsers/telemetry.d.ts +158 -12
- package/resources/browsers/telemetry.d.ts.map +1 -1
- package/resources/browsers/telemetry.js +6 -6
- package/resources/browsers/telemetry.js.map +1 -1
- package/resources/browsers/telemetry.mjs +6 -6
- package/resources/browsers/telemetry.mjs.map +1 -1
- package/resources/browsers/webmcp.d.mts +148 -0
- package/resources/browsers/webmcp.d.mts.map +1 -0
- package/resources/browsers/webmcp.d.ts +148 -0
- package/resources/browsers/webmcp.d.ts.map +1 -0
- package/resources/browsers/webmcp.js +51 -0
- package/resources/browsers/webmcp.js.map +1 -0
- package/resources/browsers/webmcp.mjs +47 -0
- package/resources/browsers/webmcp.mjs.map +1 -0
- package/resources/telemetry/destinations.d.mts +23 -12
- package/resources/telemetry/destinations.d.mts.map +1 -1
- package/resources/telemetry/destinations.d.ts +23 -12
- package/resources/telemetry/destinations.d.ts.map +1 -1
- package/resources/telemetry/destinations.js +18 -8
- package/resources/telemetry/destinations.js.map +1 -1
- package/resources/telemetry/destinations.mjs +18 -8
- package/resources/telemetry/destinations.mjs.map +1 -1
- package/src/resources/auth/connections.ts +5 -2
- package/src/resources/browsers/browsers.ts +55 -15
- package/src/resources/browsers/computer.ts +78 -57
- package/src/resources/browsers/fs/fs.ts +93 -59
- package/src/resources/browsers/fs/watch.ts +13 -13
- package/src/resources/browsers/index.ts +14 -0
- package/src/resources/browsers/logs.ts +10 -5
- package/src/resources/browsers/playwright.ts +8 -5
- package/src/resources/browsers/process.ts +47 -35
- package/src/resources/browsers/replays.ts +20 -16
- package/src/resources/browsers/telemetry.ts +208 -13
- package/src/resources/browsers/webmcp.ts +196 -0
- package/src/resources/telemetry/destinations.ts +23 -12
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -15,11 +15,13 @@ export class Replays extends APIResource {
|
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* ```ts
|
|
18
|
-
* const replays = await client.browsers.replays.list(
|
|
18
|
+
* const replays = await client.browsers.replays.list(
|
|
19
|
+
* 'htzv5orfit78e1m2biiifpbv',
|
|
20
|
+
* );
|
|
19
21
|
* ```
|
|
20
22
|
*/
|
|
21
|
-
list(
|
|
22
|
-
return this._client.get(path`/browsers/${
|
|
23
|
+
list(idOrName: string, options?: RequestOptions): APIPromise<ReplayListResponse> {
|
|
24
|
+
return this._client.get(path`/browsers/${idOrName}/replays`, options);
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
/**
|
|
@@ -29,7 +31,7 @@ export class Replays extends APIResource {
|
|
|
29
31
|
* ```ts
|
|
30
32
|
* const response = await client.browsers.replays.download(
|
|
31
33
|
* 'replay_id',
|
|
32
|
-
* {
|
|
34
|
+
* { id_or_name: 'htzv5orfit78e1m2biiifpbv' },
|
|
33
35
|
* );
|
|
34
36
|
*
|
|
35
37
|
* const content = await response.blob();
|
|
@@ -37,8 +39,8 @@ export class Replays extends APIResource {
|
|
|
37
39
|
* ```
|
|
38
40
|
*/
|
|
39
41
|
download(replayID: string, params: ReplayDownloadParams, options?: RequestOptions): APIPromise<Response> {
|
|
40
|
-
const {
|
|
41
|
-
return this._client.get(path`/browsers/${
|
|
42
|
+
const { id_or_name } = params;
|
|
43
|
+
return this._client.get(path`/browsers/${id_or_name}/replays/${replayID}`, {
|
|
42
44
|
...options,
|
|
43
45
|
headers: buildHeaders([{ Accept: 'video/mp4' }, options?.headers]),
|
|
44
46
|
__binaryResponse: true,
|
|
@@ -50,15 +52,17 @@ export class Replays extends APIResource {
|
|
|
50
52
|
*
|
|
51
53
|
* @example
|
|
52
54
|
* ```ts
|
|
53
|
-
* const response = await client.browsers.replays.start(
|
|
55
|
+
* const response = await client.browsers.replays.start(
|
|
56
|
+
* 'htzv5orfit78e1m2biiifpbv',
|
|
57
|
+
* );
|
|
54
58
|
* ```
|
|
55
59
|
*/
|
|
56
60
|
start(
|
|
57
|
-
|
|
61
|
+
idOrName: string,
|
|
58
62
|
body: ReplayStartParams | null | undefined = {},
|
|
59
63
|
options?: RequestOptions,
|
|
60
64
|
): APIPromise<ReplayStartResponse> {
|
|
61
|
-
return this._client.post(path`/browsers/${
|
|
65
|
+
return this._client.post(path`/browsers/${idOrName}/replays`, { body, ...options });
|
|
62
66
|
}
|
|
63
67
|
|
|
64
68
|
/**
|
|
@@ -67,13 +71,13 @@ export class Replays extends APIResource {
|
|
|
67
71
|
* @example
|
|
68
72
|
* ```ts
|
|
69
73
|
* await client.browsers.replays.stop('replay_id', {
|
|
70
|
-
*
|
|
74
|
+
* id_or_name: 'htzv5orfit78e1m2biiifpbv',
|
|
71
75
|
* });
|
|
72
76
|
* ```
|
|
73
77
|
*/
|
|
74
78
|
stop(replayID: string, params: ReplayStopParams, options?: RequestOptions): APIPromise<void> {
|
|
75
|
-
const {
|
|
76
|
-
return this._client.post(path`/browsers/${
|
|
79
|
+
const { id_or_name } = params;
|
|
80
|
+
return this._client.post(path`/browsers/${id_or_name}/replays/${replayID}/stop`, {
|
|
77
81
|
...options,
|
|
78
82
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
79
83
|
});
|
|
@@ -136,9 +140,9 @@ export interface ReplayStartResponse {
|
|
|
136
140
|
|
|
137
141
|
export interface ReplayDownloadParams {
|
|
138
142
|
/**
|
|
139
|
-
* Browser session ID
|
|
143
|
+
* Browser session ID or name
|
|
140
144
|
*/
|
|
141
|
-
|
|
145
|
+
id_or_name: string;
|
|
142
146
|
}
|
|
143
147
|
|
|
144
148
|
export interface ReplayStartParams {
|
|
@@ -162,9 +166,9 @@ export interface ReplayStartParams {
|
|
|
162
166
|
|
|
163
167
|
export interface ReplayStopParams {
|
|
164
168
|
/**
|
|
165
|
-
* Browser session ID
|
|
169
|
+
* Browser session ID or name
|
|
166
170
|
*/
|
|
167
|
-
|
|
171
|
+
id_or_name: string;
|
|
168
172
|
}
|
|
169
173
|
|
|
170
174
|
export declare namespace Replays {
|
|
@@ -23,19 +23,19 @@ export class Telemetry extends APIResource {
|
|
|
23
23
|
* ```ts
|
|
24
24
|
* // Automatically fetches more pages as needed.
|
|
25
25
|
* for await (const telemetryEventsResponse of client.browsers.telemetry.events(
|
|
26
|
-
* '
|
|
26
|
+
* 'htzv5orfit78e1m2biiifpbv',
|
|
27
27
|
* )) {
|
|
28
28
|
* // ...
|
|
29
29
|
* }
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
32
|
events(
|
|
33
|
-
|
|
33
|
+
idOrName: string,
|
|
34
34
|
query: TelemetryEventsParams | null | undefined = {},
|
|
35
35
|
options?: RequestOptions,
|
|
36
36
|
): PagePromise<TelemetryEventsResponsesOffsetPagination, TelemetryEventsResponse> {
|
|
37
37
|
return this._client.getAPIList(
|
|
38
|
-
path`/browsers/${
|
|
38
|
+
path`/browsers/${idOrName}/telemetry/events`,
|
|
39
39
|
OffsetPagination<TelemetryEventsResponse>,
|
|
40
40
|
{ query, ...options },
|
|
41
41
|
);
|
|
@@ -55,17 +55,17 @@ export class Telemetry extends APIResource {
|
|
|
55
55
|
* @example
|
|
56
56
|
* ```ts
|
|
57
57
|
* const response = await client.browsers.telemetry.stream(
|
|
58
|
-
* '
|
|
58
|
+
* 'htzv5orfit78e1m2biiifpbv',
|
|
59
59
|
* );
|
|
60
60
|
* ```
|
|
61
61
|
*/
|
|
62
62
|
stream(
|
|
63
|
-
|
|
63
|
+
idOrName: string,
|
|
64
64
|
params: TelemetryStreamParams | undefined = {},
|
|
65
65
|
options?: RequestOptions,
|
|
66
66
|
): APIPromise<Stream<TelemetryStreamResponse>> {
|
|
67
67
|
const { 'Last-Event-ID': lastEventID, ...query } = params ?? {};
|
|
68
|
-
return this._client.get(path`/browsers/${
|
|
68
|
+
return this._client.get(path`/browsers/${idOrName}/telemetry/stream`, {
|
|
69
69
|
query,
|
|
70
70
|
...options,
|
|
71
71
|
headers: buildHeaders([
|
|
@@ -192,6 +192,99 @@ export namespace BrowserCallStack {
|
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
+
/**
|
|
196
|
+
* A visible captcha challenge reached a terminal outcome.
|
|
197
|
+
*/
|
|
198
|
+
export interface BrowserCaptchaChallengeResultEvent {
|
|
199
|
+
category: 'captcha';
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Per-challenge payload. This event is emitted once per challenge and determines
|
|
203
|
+
* its overall outcome; captcha_solve_started and captcha_solve_result describe
|
|
204
|
+
* individual tasks and may occur multiple times within the challenge.
|
|
205
|
+
*/
|
|
206
|
+
data: BrowserCaptchaChallengeResultEvent.Data;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
210
|
+
*/
|
|
211
|
+
source: BrowserEventSource;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Event timestamp in Unix microseconds.
|
|
215
|
+
*/
|
|
216
|
+
ts: number;
|
|
217
|
+
|
|
218
|
+
type: 'captcha_challenge_result';
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* True if the data field was truncated due to size limits.
|
|
222
|
+
*/
|
|
223
|
+
truncated?: boolean;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export namespace BrowserCaptchaChallengeResultEvent {
|
|
227
|
+
/**
|
|
228
|
+
* Per-challenge payload. This event is emitted once per challenge and determines
|
|
229
|
+
* its overall outcome; captcha_solve_started and captcha_solve_result describe
|
|
230
|
+
* individual tasks and may occur multiple times within the challenge.
|
|
231
|
+
*/
|
|
232
|
+
export interface Data {
|
|
233
|
+
/**
|
|
234
|
+
* Captcha kind. Enterprise reCAPTCHA variants are grouped into their version
|
|
235
|
+
* bucket (recaptcha_v2 or recaptcha_v3), press-and-hold challenges use
|
|
236
|
+
* press_and_hold, and unlisted kinds use other.
|
|
237
|
+
*/
|
|
238
|
+
captcha_type:
|
|
239
|
+
| 'hcaptcha'
|
|
240
|
+
| 'recaptcha_v2'
|
|
241
|
+
| 'recaptcha_v3'
|
|
242
|
+
| 'turnstile'
|
|
243
|
+
| 'geetest'
|
|
244
|
+
| 'press_and_hold'
|
|
245
|
+
| 'other';
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Opaque identifier shared by events for one visible challenge. An image-grid
|
|
249
|
+
* captcha may create multiple task_id values for one challenge_id. The same value
|
|
250
|
+
* may continue across a page reload when the challenge episode continues. It does
|
|
251
|
+
* not indicate task ordering or challenge completion.
|
|
252
|
+
*/
|
|
253
|
+
challenge_id: string;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Wall-clock duration from the challenge appearing to its terminal outcome,
|
|
257
|
+
* covering every solver attempt in between.
|
|
258
|
+
*/
|
|
259
|
+
duration_ms: number;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Terminal outcome of the visible challenge. solved: the page observed the
|
|
263
|
+
* challenge clear after a solver attempt. failure: a terminal solver failure
|
|
264
|
+
* occurred, or all attempts ended while the challenge remained. timeout: the
|
|
265
|
+
* challenge-level wait budget expired while the challenge remained. abandoned:
|
|
266
|
+
* observation ended without an attributable terminal challenge outcome. This
|
|
267
|
+
* includes a dismissed widget or page unload without a solved signal or terminal
|
|
268
|
+
* solver outcome, and a token appearing while multiple same-provider challenges
|
|
269
|
+
* are open, because the producer cannot attribute that token to this visible
|
|
270
|
+
* challenge. A captcha_solve_result with the same challenge_id may therefore
|
|
271
|
+
* report success while the challenge result reports abandoned. A solved challenge
|
|
272
|
+
* does not prove the site accepted the token or that the guarded action succeeded.
|
|
273
|
+
*/
|
|
274
|
+
status: 'solved' | 'failure' | 'timeout' | 'abandoned';
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Host of the page where the challenge appeared.
|
|
278
|
+
*/
|
|
279
|
+
website_host?: string;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Path of the page where the challenge appeared. Query string excluded.
|
|
283
|
+
*/
|
|
284
|
+
website_path?: string;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
195
288
|
/**
|
|
196
289
|
* A captcha solve attempt reached a terminal outcome.
|
|
197
290
|
*/
|
|
@@ -221,13 +314,23 @@ export interface BrowserCaptchaSolveResultEvent {
|
|
|
221
314
|
export namespace BrowserCaptchaSolveResultEvent {
|
|
222
315
|
export interface Data {
|
|
223
316
|
/**
|
|
224
|
-
* Captcha
|
|
225
|
-
*
|
|
226
|
-
|
|
227
|
-
|
|
317
|
+
* Captcha kind. Enterprise reCAPTCHA variants are grouped into their version
|
|
318
|
+
* bucket (recaptcha_v2 or recaptcha_v3), press-and-hold challenges use
|
|
319
|
+
* press_and_hold, and unlisted kinds use other.
|
|
320
|
+
*/
|
|
321
|
+
captcha_type:
|
|
322
|
+
| 'hcaptcha'
|
|
323
|
+
| 'recaptcha_v2'
|
|
324
|
+
| 'recaptcha_v3'
|
|
325
|
+
| 'turnstile'
|
|
326
|
+
| 'geetest'
|
|
327
|
+
| 'press_and_hold'
|
|
328
|
+
| 'other';
|
|
228
329
|
|
|
229
330
|
/**
|
|
230
|
-
* Wall-clock duration from solve start to terminal outcome.
|
|
331
|
+
* Wall-clock duration from solve start to terminal outcome. Authoritative solve
|
|
332
|
+
* timing; do not derive it from the gap to a captcha_solve_started event, whose
|
|
333
|
+
* delivery and ordering are not guaranteed.
|
|
231
334
|
*/
|
|
232
335
|
duration_ms: number;
|
|
233
336
|
|
|
@@ -239,6 +342,14 @@ export namespace BrowserCaptchaSolveResultEvent {
|
|
|
239
342
|
*/
|
|
240
343
|
status: 'success' | 'failure' | 'timeout' | 'abandoned';
|
|
241
344
|
|
|
345
|
+
/**
|
|
346
|
+
* Opaque identifier shared by events for one visible challenge. An image-grid
|
|
347
|
+
* captcha may create multiple task_id values for one challenge_id. The same value
|
|
348
|
+
* may continue across a page reload when the challenge episode continues. It does
|
|
349
|
+
* not indicate task ordering or challenge completion.
|
|
350
|
+
*/
|
|
351
|
+
challenge_id?: string;
|
|
352
|
+
|
|
242
353
|
/**
|
|
243
354
|
* Solver-specific error code on failure (e.g. ERROR_CAPTCHA_UNSOLVABLE). Absent on
|
|
244
355
|
* success.
|
|
@@ -246,7 +357,7 @@ export namespace BrowserCaptchaSolveResultEvent {
|
|
|
246
357
|
error_code?: string;
|
|
247
358
|
|
|
248
359
|
/**
|
|
249
|
-
*
|
|
360
|
+
* Opaque identifier shared with the matching captcha_solve_started.
|
|
250
361
|
*/
|
|
251
362
|
task_id?: string;
|
|
252
363
|
|
|
@@ -262,6 +373,86 @@ export namespace BrowserCaptchaSolveResultEvent {
|
|
|
262
373
|
}
|
|
263
374
|
}
|
|
264
375
|
|
|
376
|
+
/**
|
|
377
|
+
* A captcha solver accepted a task.
|
|
378
|
+
*/
|
|
379
|
+
export interface BrowserCaptchaSolveStartedEvent {
|
|
380
|
+
category: 'captcha';
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* Per-task payload. A visible challenge may create multiple tasks. When present,
|
|
384
|
+
* task_id correlates this event with a captcha_solve_result, while challenge_id
|
|
385
|
+
* groups tasks from the same challenge. Events may arrive out of order or be
|
|
386
|
+
* absent, so their arrival does not indicate current solve state.
|
|
387
|
+
*/
|
|
388
|
+
data: BrowserCaptchaSolveStartedEvent.Data;
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Provenance metadata identifying which producer emitted the event.
|
|
392
|
+
*/
|
|
393
|
+
source: BrowserEventSource;
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Event timestamp in Unix microseconds.
|
|
397
|
+
*/
|
|
398
|
+
ts: number;
|
|
399
|
+
|
|
400
|
+
type: 'captcha_solve_started';
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* True if the data field was truncated due to size limits.
|
|
404
|
+
*/
|
|
405
|
+
truncated?: boolean;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
export namespace BrowserCaptchaSolveStartedEvent {
|
|
409
|
+
/**
|
|
410
|
+
* Per-task payload. A visible challenge may create multiple tasks. When present,
|
|
411
|
+
* task_id correlates this event with a captcha_solve_result, while challenge_id
|
|
412
|
+
* groups tasks from the same challenge. Events may arrive out of order or be
|
|
413
|
+
* absent, so their arrival does not indicate current solve state.
|
|
414
|
+
*/
|
|
415
|
+
export interface Data {
|
|
416
|
+
/**
|
|
417
|
+
* Captcha kind. Enterprise reCAPTCHA variants are grouped into their version
|
|
418
|
+
* bucket (recaptcha_v2 or recaptcha_v3), press-and-hold challenges use
|
|
419
|
+
* press_and_hold, and unlisted kinds use other.
|
|
420
|
+
*/
|
|
421
|
+
captcha_type:
|
|
422
|
+
| 'hcaptcha'
|
|
423
|
+
| 'recaptcha_v2'
|
|
424
|
+
| 'recaptcha_v3'
|
|
425
|
+
| 'turnstile'
|
|
426
|
+
| 'geetest'
|
|
427
|
+
| 'press_and_hold'
|
|
428
|
+
| 'other';
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Opaque identifier shared by events for one visible challenge. An image-grid
|
|
432
|
+
* captcha may create multiple task_id values for one challenge_id. The same value
|
|
433
|
+
* may continue across a page reload when the challenge episode continues. It does
|
|
434
|
+
* not indicate task ordering or challenge completion.
|
|
435
|
+
*/
|
|
436
|
+
challenge_id?: string;
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Opaque identifier shared with the matching captcha_solve_result.
|
|
440
|
+
*/
|
|
441
|
+
task_id?: string;
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Host of the page where the captcha is being solved. May be empty for solver
|
|
445
|
+
* tasks that carry no page URL.
|
|
446
|
+
*/
|
|
447
|
+
website_host?: string;
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Path of the page where the captcha is being solved. Query string excluded.
|
|
451
|
+
*/
|
|
452
|
+
website_path?: string;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
265
456
|
/**
|
|
266
457
|
* A browser-control command a client sent over the CDP WebSocket proxy: input
|
|
267
458
|
* gestures, navigation, dialog handling, file selection and screenshots.
|
|
@@ -4346,7 +4537,7 @@ export namespace BrowserSystemOomKillEvent {
|
|
|
4346
4537
|
*/
|
|
4347
4538
|
export interface BrowserTelemetryCategoriesConfig {
|
|
4348
4539
|
/**
|
|
4349
|
-
* Captcha
|
|
4540
|
+
* Captcha solver tasks and visible challenge outcomes. On by default.
|
|
4350
4541
|
*/
|
|
4351
4542
|
captcha?: BrowserTelemetryCategoryConfig;
|
|
4352
4543
|
|
|
@@ -4516,7 +4707,9 @@ export type BrowserTelemetryEvent =
|
|
|
4516
4707
|
| BrowserCdpDisconnectEvent
|
|
4517
4708
|
| BrowserLiveViewConnectEvent
|
|
4518
4709
|
| BrowserLiveViewDisconnectEvent
|
|
4710
|
+
| BrowserCaptchaSolveStartedEvent
|
|
4519
4711
|
| BrowserCaptchaSolveResultEvent
|
|
4712
|
+
| BrowserCaptchaChallengeResultEvent
|
|
4520
4713
|
| BrowserSystemOomKillEvent
|
|
4521
4714
|
| BrowserServiceCrashedEvent;
|
|
4522
4715
|
|
|
@@ -4660,7 +4853,9 @@ export declare namespace Telemetry {
|
|
|
4660
4853
|
export {
|
|
4661
4854
|
type BrowserAPICallEvent as BrowserAPICallEvent,
|
|
4662
4855
|
type BrowserCallStack as BrowserCallStack,
|
|
4856
|
+
type BrowserCaptchaChallengeResultEvent as BrowserCaptchaChallengeResultEvent,
|
|
4663
4857
|
type BrowserCaptchaSolveResultEvent as BrowserCaptchaSolveResultEvent,
|
|
4858
|
+
type BrowserCaptchaSolveStartedEvent as BrowserCaptchaSolveStartedEvent,
|
|
4664
4859
|
type BrowserCdpCommandEvent as BrowserCdpCommandEvent,
|
|
4665
4860
|
type BrowserCdpCommandMethod as BrowserCdpCommandMethod,
|
|
4666
4861
|
type BrowserCdpConnectEvent as BrowserCdpConnectEvent,
|
|
@@ -0,0 +1,196 @@
|
|
|
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
|
+
import { path } from '../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Discover and invoke native page tools across the browser instance.
|
|
10
|
+
*/
|
|
11
|
+
export class Webmcp extends APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* Invokes the exact live registration identified by tool_ref and waits
|
|
14
|
+
* synchronously for its result. Navigation during execution is allowed. If the tab
|
|
15
|
+
* or embedded frame disappears, or the request times out after invocation begins,
|
|
16
|
+
* the response reports outcome_unknown and the tool is not retried.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const invocationResult =
|
|
21
|
+
* await client.browsers.webmcp.invokeTool(
|
|
22
|
+
* 'htzv5orfit78e1m2biiifpbv',
|
|
23
|
+
* {
|
|
24
|
+
* input: { foo: 'bar' },
|
|
25
|
+
* tool_ref: 'x',
|
|
26
|
+
* },
|
|
27
|
+
* );
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
invokeTool(
|
|
31
|
+
idOrName: string,
|
|
32
|
+
body: WebmcpInvokeToolParams,
|
|
33
|
+
options?: RequestOptions,
|
|
34
|
+
): APIPromise<InvocationResult> {
|
|
35
|
+
return this._client.post(path`/browsers/${idOrName}/webmcp/invoke`, { body, ...options });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Returns a snapshot of native WebMCP tools available across every open tab and
|
|
40
|
+
* embedded frame in the browser. Each tool includes an opaque tool_ref for
|
|
41
|
+
* invoking that exact live registration. Tools disappear when their document
|
|
42
|
+
* closes or navigates away.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const toolsResponse =
|
|
47
|
+
* await client.browsers.webmcp.listTools(
|
|
48
|
+
* 'htzv5orfit78e1m2biiifpbv',
|
|
49
|
+
* );
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
listTools(idOrName: string, options?: RequestOptions): APIPromise<ToolsResponse> {
|
|
53
|
+
return this._client.get(path`/browsers/${idOrName}/webmcp/tools`, options);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface InvocationFailure {
|
|
58
|
+
code: 'outcome_unknown';
|
|
59
|
+
|
|
60
|
+
message: string;
|
|
61
|
+
|
|
62
|
+
invocation_id?: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface InvocationResult {
|
|
66
|
+
invocation_id: string;
|
|
67
|
+
|
|
68
|
+
status: 'completed' | 'canceled' | 'error';
|
|
69
|
+
|
|
70
|
+
error_text?: string;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Untrusted page-provided output. Callers must treat it as potentially malicious
|
|
74
|
+
* input.
|
|
75
|
+
*/
|
|
76
|
+
output?: unknown;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface InvokeRequest {
|
|
80
|
+
/**
|
|
81
|
+
* Tool input, limited to 1 MiB after JSON serialization.
|
|
82
|
+
*/
|
|
83
|
+
input: { [key: string]: unknown };
|
|
84
|
+
|
|
85
|
+
tool_ref: string;
|
|
86
|
+
|
|
87
|
+
timeout_sec?: number;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface Tool {
|
|
91
|
+
description: string;
|
|
92
|
+
|
|
93
|
+
input_schema: { [key: string]: unknown };
|
|
94
|
+
|
|
95
|
+
name: string;
|
|
96
|
+
|
|
97
|
+
source: ToolSource;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Opaque reference for invoking this exact live registration. It becomes invalid
|
|
101
|
+
* when its document or browser process is replaced.
|
|
102
|
+
*/
|
|
103
|
+
tool_ref: string;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Page-provided behavioral hints. These values are untrusted and are not enforced
|
|
107
|
+
* by Kernel.
|
|
108
|
+
*/
|
|
109
|
+
annotations?: ToolAnnotations;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Page-provided behavioral hints. These values are untrusted and are not enforced
|
|
114
|
+
* by Kernel.
|
|
115
|
+
*/
|
|
116
|
+
export interface ToolAnnotations {
|
|
117
|
+
autosubmit: boolean;
|
|
118
|
+
|
|
119
|
+
consequential: boolean;
|
|
120
|
+
|
|
121
|
+
read_only: boolean;
|
|
122
|
+
|
|
123
|
+
untrusted_content: boolean;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface ToolFrame {
|
|
127
|
+
/**
|
|
128
|
+
* Monotonically increasing identifier for this embedded frame during the current
|
|
129
|
+
* browser process.
|
|
130
|
+
*/
|
|
131
|
+
frame_id: number;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Current frame URL with the fragment omitted.
|
|
135
|
+
*/
|
|
136
|
+
url: string;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface ToolSource {
|
|
140
|
+
/**
|
|
141
|
+
* Embedded frame that registered the tool, or null when the top-level page
|
|
142
|
+
* registered it.
|
|
143
|
+
*/
|
|
144
|
+
frame: ToolFrame | null;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Current title of the top-level page.
|
|
148
|
+
*/
|
|
149
|
+
page_title: string;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Current URL of the top-level page with the fragment omitted.
|
|
153
|
+
*/
|
|
154
|
+
page_url: string;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Monotonically increasing identifier for the tab during the current browser
|
|
158
|
+
* process.
|
|
159
|
+
*/
|
|
160
|
+
tab_id: number;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Monotonically increasing identifier for the browser window during the current
|
|
164
|
+
* browser process.
|
|
165
|
+
*/
|
|
166
|
+
window_id: number;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export interface ToolsResponse {
|
|
170
|
+
tools: Array<Tool>;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface WebmcpInvokeToolParams {
|
|
174
|
+
/**
|
|
175
|
+
* Tool input, limited to 1 MiB after JSON serialization.
|
|
176
|
+
*/
|
|
177
|
+
input: { [key: string]: unknown };
|
|
178
|
+
|
|
179
|
+
tool_ref: string;
|
|
180
|
+
|
|
181
|
+
timeout_sec?: number;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export declare namespace Webmcp {
|
|
185
|
+
export {
|
|
186
|
+
type InvocationFailure as InvocationFailure,
|
|
187
|
+
type InvocationResult as InvocationResult,
|
|
188
|
+
type InvokeRequest as InvokeRequest,
|
|
189
|
+
type Tool as Tool,
|
|
190
|
+
type ToolAnnotations as ToolAnnotations,
|
|
191
|
+
type ToolFrame as ToolFrame,
|
|
192
|
+
type ToolSource as ToolSource,
|
|
193
|
+
type ToolsResponse as ToolsResponse,
|
|
194
|
+
type WebmcpInvokeToolParams as WebmcpInvokeToolParams,
|
|
195
|
+
};
|
|
196
|
+
}
|
|
@@ -12,15 +12,19 @@ import { path } from '../../internal/utils/path';
|
|
|
12
12
|
*/
|
|
13
13
|
export class Destinations extends APIResource {
|
|
14
14
|
/**
|
|
15
|
-
* Create an OTLP export destination in the
|
|
16
|
-
* within the
|
|
15
|
+
* Create an OTLP export destination in the authenticated organization. Names must
|
|
16
|
+
* be unique within the organization. Requires an organization-scoped credential or
|
|
17
|
+
* dashboard authentication; project-scoped credentials receive a 403.
|
|
17
18
|
*/
|
|
18
19
|
create(body: DestinationCreateParams, options?: RequestOptions): APIPromise<OtlpDestination> {
|
|
19
20
|
return this._client.post('/telemetry/destinations', { body, ...options });
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
|
-
* Retrieve a
|
|
24
|
+
* Retrieve a customer-visible OTLP destination in the authenticated organization
|
|
25
|
+
* by its ID or name. Project-scoped credentials can retrieve these destinations
|
|
26
|
+
* for selection by workloads in their project. Non-dashboard reads return header
|
|
27
|
+
* values redacted.
|
|
24
28
|
*/
|
|
25
29
|
retrieve(idOrName: string, options?: RequestOptions): APIPromise<OtlpDestination> {
|
|
26
30
|
return this._client.get(path`/telemetry/destinations/${idOrName}`, options);
|
|
@@ -31,10 +35,11 @@ export class Destinations extends APIResource {
|
|
|
31
35
|
* values without restarting, which makes this the way to rotate credentials
|
|
32
36
|
* without interrupting export.
|
|
33
37
|
*
|
|
34
|
-
* Names must be unique within the
|
|
35
|
-
* managed auth connection selects this destination by name, since that
|
|
36
|
-
* resolves the name on every login. Every other field, including
|
|
37
|
-
* editable.
|
|
38
|
+
* Names must be unique within the organization. Renaming is refused with a 409
|
|
39
|
+
* while a managed auth connection selects this destination by name, since that
|
|
40
|
+
* connection resolves the name on every login. Every other field, including
|
|
41
|
+
* `headers`, stays editable. Requires an organization-scoped credential or
|
|
42
|
+
* dashboard authentication; project-scoped credentials receive a 403.
|
|
38
43
|
*/
|
|
39
44
|
update(
|
|
40
45
|
idOrName: string,
|
|
@@ -45,7 +50,10 @@ export class Destinations extends APIResource {
|
|
|
45
50
|
}
|
|
46
51
|
|
|
47
52
|
/**
|
|
48
|
-
* List OTLP export destinations in the
|
|
53
|
+
* List customer-visible OTLP export destinations in the authenticated
|
|
54
|
+
* organization. Project-scoped credentials can list these destinations for
|
|
55
|
+
* selection by workloads in their project. Non-dashboard reads return header
|
|
56
|
+
* values redacted.
|
|
49
57
|
*/
|
|
50
58
|
list(
|
|
51
59
|
query: DestinationListParams | null | undefined = {},
|
|
@@ -63,6 +71,8 @@ export class Destinations extends APIResource {
|
|
|
63
71
|
* end or delete them first. It is refused the same way while a managed auth
|
|
64
72
|
* connection still selects it, because that connection re-resolves the destination
|
|
65
73
|
* on every login, and while a managed auth login using it is still in progress.
|
|
74
|
+
* Requires an organization-scoped credential or dashboard authentication;
|
|
75
|
+
* project-scoped credentials receive a 403.
|
|
66
76
|
*/
|
|
67
77
|
delete(idOrName: string, options?: RequestOptions): APIPromise<void> {
|
|
68
78
|
return this._client.delete(path`/telemetry/destinations/${idOrName}`, {
|
|
@@ -91,13 +101,14 @@ export interface OtlpDestination {
|
|
|
91
101
|
|
|
92
102
|
/**
|
|
93
103
|
* Headers sent with each export request. Names are returned in canonical form
|
|
94
|
-
* (`Authorization`, not `authorization`).
|
|
95
|
-
* strings, so the keys are visible but the credentials are not.
|
|
104
|
+
* (`Authorization`, not `authorization`). Non-dashboard reads return values
|
|
105
|
+
* redacted as empty strings, so the keys are visible but the credentials are not.
|
|
106
|
+
* Dashboard reads return the stored values.
|
|
96
107
|
*/
|
|
97
108
|
headers: { [key: string]: string };
|
|
98
109
|
|
|
99
110
|
/**
|
|
100
|
-
* Unique within the
|
|
111
|
+
* Unique within the organization. Usable in place of the ID when selecting a
|
|
101
112
|
* destination, so it cannot be shaped like an ID.
|
|
102
113
|
*/
|
|
103
114
|
name: string;
|
|
@@ -124,7 +135,7 @@ export interface DestinationCreateParams {
|
|
|
124
135
|
endpoint: string;
|
|
125
136
|
|
|
126
137
|
/**
|
|
127
|
-
* Unique within the
|
|
138
|
+
* Unique within the organization.
|
|
128
139
|
*/
|
|
129
140
|
name: string;
|
|
130
141
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.98.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.98.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|