@onkernel/sdk 0.97.0 → 0.99.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/client.d.mts +5 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -2
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/browser-pools.d.mts +9 -0
- package/resources/browser-pools.d.mts.map +1 -1
- package/resources/browser-pools.d.ts +9 -0
- package/resources/browser-pools.d.ts.map +1 -1
- package/resources/browsers/browsers.d.mts +70 -14
- package/resources/browsers/browsers.d.mts.map +1 -1
- package/resources/browsers/browsers.d.ts +70 -14
- 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 +4 -4
- package/resources/browsers/telemetry.d.mts.map +1 -1
- package/resources/browsers/telemetry.d.ts +4 -4
- 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/config-registry/config-registry.d.mts +14 -11
- package/resources/config-registry/config-registry.d.mts.map +1 -1
- package/resources/config-registry/config-registry.d.ts +14 -11
- package/resources/config-registry/config-registry.d.ts.map +1 -1
- package/resources/config-registry/config-registry.js +2 -2
- package/resources/config-registry/config-registry.js.map +1 -1
- package/resources/config-registry/config-registry.mjs +2 -2
- package/resources/config-registry/config-registry.mjs.map +1 -1
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/invocations.d.mts +9 -0
- package/resources/invocations.d.mts.map +1 -1
- package/resources/invocations.d.ts +9 -0
- package/resources/invocations.d.ts.map +1 -1
- package/resources/telemetry/destinations.d.mts +46 -12
- package/resources/telemetry/destinations.d.mts.map +1 -1
- package/resources/telemetry/destinations.d.ts +46 -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/resources/vaults/index.d.mts +3 -0
- package/resources/vaults/index.d.mts.map +1 -0
- package/resources/vaults/index.d.ts +3 -0
- package/resources/vaults/index.d.ts.map +1 -0
- package/resources/vaults/index.js +9 -0
- package/resources/vaults/index.js.map +1 -0
- package/resources/vaults/index.mjs +4 -0
- package/resources/vaults/index.mjs.map +1 -0
- package/resources/vaults/items.d.mts +534 -0
- package/resources/vaults/items.d.mts.map +1 -0
- package/resources/vaults/items.d.ts +534 -0
- package/resources/vaults/items.d.ts.map +1 -0
- package/resources/vaults/items.js +68 -0
- package/resources/vaults/items.js.map +1 -0
- package/resources/vaults/items.mjs +64 -0
- package/resources/vaults/items.mjs.map +1 -0
- package/resources/vaults/vaults.d.mts +48 -0
- package/resources/vaults/vaults.d.mts.map +1 -0
- package/resources/vaults/vaults.d.ts +48 -0
- package/resources/vaults/vaults.d.ts.map +1 -0
- package/resources/vaults/vaults.js +47 -0
- package/resources/vaults/vaults.js.map +1 -0
- package/resources/vaults/vaults.mjs +42 -0
- package/resources/vaults/vaults.mjs.map +1 -0
- package/resources/vaults.d.mts +2 -0
- package/resources/vaults.d.mts.map +1 -0
- package/resources/vaults.d.ts +2 -0
- package/resources/vaults.d.ts.map +1 -0
- package/resources/vaults.js +6 -0
- package/resources/vaults.js.map +1 -0
- package/resources/vaults.mjs +3 -0
- package/resources/vaults.mjs.map +1 -0
- package/src/client.ts +19 -0
- package/src/resources/browser-pools.ts +11 -0
- package/src/resources/browsers/browsers.ts +111 -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 +13 -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 +6 -6
- package/src/resources/browsers/webmcp.ts +196 -0
- package/src/resources/config-registry/config-registry.ts +14 -11
- package/src/resources/index.ts +8 -0
- package/src/resources/invocations.ts +11 -0
- package/src/resources/telemetry/destinations.ts +50 -12
- package/src/resources/vaults/index.ts +30 -0
- package/src/resources/vaults/items.ts +780 -0
- package/src/resources/vaults/vaults.ts +125 -0
- package/src/resources/vaults.ts +3 -0
- 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
|
@@ -12,23 +12,26 @@ export class Playwright extends APIResource {
|
|
|
12
12
|
/**
|
|
13
13
|
* Execute arbitrary Playwright code in a fresh execution context against the
|
|
14
14
|
* browser. The code runs in the same VM as the browser, minimizing latency and
|
|
15
|
-
* maximizing throughput. It has access to 'page', 'context',
|
|
16
|
-
* variables.
|
|
15
|
+
* maximizing throughput. It has access to 'page', 'context', 'browser', and
|
|
16
|
+
* 'webmcp' variables. Use 'webmcp.listTools()' to discover browser-wide WebMCP
|
|
17
|
+
* tools and 'webmcp.invokeTool(toolRef, input?, { timeoutSec? })' to invoke an
|
|
18
|
+
* exact registration. It can `return` a value, and this value is returned in the
|
|
19
|
+
* response.
|
|
17
20
|
*
|
|
18
21
|
* @example
|
|
19
22
|
* ```ts
|
|
20
23
|
* const response = await client.browsers.playwright.execute(
|
|
21
|
-
* '
|
|
24
|
+
* 'htzv5orfit78e1m2biiifpbv',
|
|
22
25
|
* { code: 'code' },
|
|
23
26
|
* );
|
|
24
27
|
* ```
|
|
25
28
|
*/
|
|
26
29
|
execute(
|
|
27
|
-
|
|
30
|
+
idOrName: string,
|
|
28
31
|
body: PlaywrightExecuteParams,
|
|
29
32
|
options?: RequestOptions,
|
|
30
33
|
): APIPromise<PlaywrightExecuteResponse> {
|
|
31
|
-
return this._client.post(path`/browsers/${
|
|
34
|
+
return this._client.post(path`/browsers/${idOrName}/playwright/execute`, { body, ...options });
|
|
32
35
|
}
|
|
33
36
|
}
|
|
34
37
|
|
|
@@ -16,13 +16,14 @@ export class Process extends APIResource {
|
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
18
|
* ```ts
|
|
19
|
-
* const response = await client.browsers.process.exec(
|
|
20
|
-
*
|
|
21
|
-
* }
|
|
19
|
+
* const response = await client.browsers.process.exec(
|
|
20
|
+
* 'htzv5orfit78e1m2biiifpbv',
|
|
21
|
+
* { command: 'command' },
|
|
22
|
+
* );
|
|
22
23
|
* ```
|
|
23
24
|
*/
|
|
24
|
-
exec(
|
|
25
|
-
return this._client.post(path`/browsers/${
|
|
25
|
+
exec(idOrName: string, body: ProcessExecParams, options?: RequestOptions): APIPromise<ProcessExecResponse> {
|
|
26
|
+
return this._client.post(path`/browsers/${idOrName}/process/exec`, { body, ...options });
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
/**
|
|
@@ -32,7 +33,10 @@ export class Process extends APIResource {
|
|
|
32
33
|
* ```ts
|
|
33
34
|
* const response = await client.browsers.process.kill(
|
|
34
35
|
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
35
|
-
* {
|
|
36
|
+
* {
|
|
37
|
+
* id_or_name: 'htzv5orfit78e1m2biiifpbv',
|
|
38
|
+
* signal: 'TERM',
|
|
39
|
+
* },
|
|
36
40
|
* );
|
|
37
41
|
* ```
|
|
38
42
|
*/
|
|
@@ -41,8 +45,8 @@ export class Process extends APIResource {
|
|
|
41
45
|
params: ProcessKillParams,
|
|
42
46
|
options?: RequestOptions,
|
|
43
47
|
): APIPromise<ProcessKillResponse> {
|
|
44
|
-
const {
|
|
45
|
-
return this._client.post(path`/browsers/${
|
|
48
|
+
const { id_or_name, ...body } = params;
|
|
49
|
+
return this._client.post(path`/browsers/${id_or_name}/process/${processID}/kill`, { body, ...options });
|
|
46
50
|
}
|
|
47
51
|
|
|
48
52
|
/**
|
|
@@ -53,7 +57,7 @@ export class Process extends APIResource {
|
|
|
53
57
|
* const response = await client.browsers.process.resize(
|
|
54
58
|
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
55
59
|
* {
|
|
56
|
-
*
|
|
60
|
+
* id_or_name: 'htzv5orfit78e1m2biiifpbv',
|
|
57
61
|
* cols: 1,
|
|
58
62
|
* rows: 1,
|
|
59
63
|
* },
|
|
@@ -65,8 +69,8 @@ export class Process extends APIResource {
|
|
|
65
69
|
params: ProcessResizeParams,
|
|
66
70
|
options?: RequestOptions,
|
|
67
71
|
): APIPromise<ProcessResizeResponse> {
|
|
68
|
-
const {
|
|
69
|
-
return this._client.post(path`/browsers/${
|
|
72
|
+
const { id_or_name, ...body } = params;
|
|
73
|
+
return this._client.post(path`/browsers/${id_or_name}/process/${processID}/resize`, { body, ...options });
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
/**
|
|
@@ -74,13 +78,18 @@ export class Process extends APIResource {
|
|
|
74
78
|
*
|
|
75
79
|
* @example
|
|
76
80
|
* ```ts
|
|
77
|
-
* const response = await client.browsers.process.spawn(
|
|
78
|
-
*
|
|
79
|
-
* }
|
|
81
|
+
* const response = await client.browsers.process.spawn(
|
|
82
|
+
* 'htzv5orfit78e1m2biiifpbv',
|
|
83
|
+
* { command: 'command' },
|
|
84
|
+
* );
|
|
80
85
|
* ```
|
|
81
86
|
*/
|
|
82
|
-
spawn(
|
|
83
|
-
|
|
87
|
+
spawn(
|
|
88
|
+
idOrName: string,
|
|
89
|
+
body: ProcessSpawnParams,
|
|
90
|
+
options?: RequestOptions,
|
|
91
|
+
): APIPromise<ProcessSpawnResponse> {
|
|
92
|
+
return this._client.post(path`/browsers/${idOrName}/process/spawn`, { body, ...options });
|
|
84
93
|
}
|
|
85
94
|
|
|
86
95
|
/**
|
|
@@ -90,7 +99,7 @@ export class Process extends APIResource {
|
|
|
90
99
|
* ```ts
|
|
91
100
|
* const response = await client.browsers.process.status(
|
|
92
101
|
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
93
|
-
* {
|
|
102
|
+
* { id_or_name: 'htzv5orfit78e1m2biiifpbv' },
|
|
94
103
|
* );
|
|
95
104
|
* ```
|
|
96
105
|
*/
|
|
@@ -99,8 +108,8 @@ export class Process extends APIResource {
|
|
|
99
108
|
params: ProcessStatusParams,
|
|
100
109
|
options?: RequestOptions,
|
|
101
110
|
): APIPromise<ProcessStatusResponse> {
|
|
102
|
-
const {
|
|
103
|
-
return this._client.get(path`/browsers/${
|
|
111
|
+
const { id_or_name } = params;
|
|
112
|
+
return this._client.get(path`/browsers/${id_or_name}/process/${processID}/status`, options);
|
|
104
113
|
}
|
|
105
114
|
|
|
106
115
|
/**
|
|
@@ -110,7 +119,10 @@ export class Process extends APIResource {
|
|
|
110
119
|
* ```ts
|
|
111
120
|
* const response = await client.browsers.process.stdin(
|
|
112
121
|
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
113
|
-
* {
|
|
122
|
+
* {
|
|
123
|
+
* id_or_name: 'htzv5orfit78e1m2biiifpbv',
|
|
124
|
+
* data_b64: 'data_b64',
|
|
125
|
+
* },
|
|
114
126
|
* );
|
|
115
127
|
* ```
|
|
116
128
|
*/
|
|
@@ -119,8 +131,8 @@ export class Process extends APIResource {
|
|
|
119
131
|
params: ProcessStdinParams,
|
|
120
132
|
options?: RequestOptions,
|
|
121
133
|
): APIPromise<ProcessStdinResponse> {
|
|
122
|
-
const {
|
|
123
|
-
return this._client.post(path`/browsers/${
|
|
134
|
+
const { id_or_name, ...body } = params;
|
|
135
|
+
return this._client.post(path`/browsers/${id_or_name}/process/${processID}/stdin`, { body, ...options });
|
|
124
136
|
}
|
|
125
137
|
|
|
126
138
|
/**
|
|
@@ -130,7 +142,7 @@ export class Process extends APIResource {
|
|
|
130
142
|
* ```ts
|
|
131
143
|
* const response = await client.browsers.process.stdoutStream(
|
|
132
144
|
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
133
|
-
* {
|
|
145
|
+
* { id_or_name: 'htzv5orfit78e1m2biiifpbv' },
|
|
134
146
|
* );
|
|
135
147
|
* ```
|
|
136
148
|
*/
|
|
@@ -139,8 +151,8 @@ export class Process extends APIResource {
|
|
|
139
151
|
params: ProcessStdoutStreamParams,
|
|
140
152
|
options?: RequestOptions,
|
|
141
153
|
): APIPromise<Stream<ProcessStdoutStreamResponse>> {
|
|
142
|
-
const {
|
|
143
|
-
return this._client.get(path`/browsers/${
|
|
154
|
+
const { id_or_name } = params;
|
|
155
|
+
return this._client.get(path`/browsers/${id_or_name}/process/${processID}/stdout/stream`, {
|
|
144
156
|
...options,
|
|
145
157
|
headers: buildHeaders([{ Accept: 'text/event-stream' }, options?.headers]),
|
|
146
158
|
stream: true,
|
|
@@ -312,9 +324,9 @@ export interface ProcessExecParams {
|
|
|
312
324
|
|
|
313
325
|
export interface ProcessKillParams {
|
|
314
326
|
/**
|
|
315
|
-
* Path param: Browser session ID
|
|
327
|
+
* Path param: Browser session ID or name
|
|
316
328
|
*/
|
|
317
|
-
|
|
329
|
+
id_or_name: string;
|
|
318
330
|
|
|
319
331
|
/**
|
|
320
332
|
* Body param: Signal to send.
|
|
@@ -324,9 +336,9 @@ export interface ProcessKillParams {
|
|
|
324
336
|
|
|
325
337
|
export interface ProcessResizeParams {
|
|
326
338
|
/**
|
|
327
|
-
* Path param: Browser session ID
|
|
339
|
+
* Path param: Browser session ID or name
|
|
328
340
|
*/
|
|
329
|
-
|
|
341
|
+
id_or_name: string;
|
|
330
342
|
|
|
331
343
|
/**
|
|
332
344
|
* Body param: New terminal columns.
|
|
@@ -393,16 +405,16 @@ export interface ProcessSpawnParams {
|
|
|
393
405
|
|
|
394
406
|
export interface ProcessStatusParams {
|
|
395
407
|
/**
|
|
396
|
-
* Browser session ID
|
|
408
|
+
* Browser session ID or name
|
|
397
409
|
*/
|
|
398
|
-
|
|
410
|
+
id_or_name: string;
|
|
399
411
|
}
|
|
400
412
|
|
|
401
413
|
export interface ProcessStdinParams {
|
|
402
414
|
/**
|
|
403
|
-
* Path param: Browser session ID
|
|
415
|
+
* Path param: Browser session ID or name
|
|
404
416
|
*/
|
|
405
|
-
|
|
417
|
+
id_or_name: string;
|
|
406
418
|
|
|
407
419
|
/**
|
|
408
420
|
* Body param: Base64-encoded data to write.
|
|
@@ -412,9 +424,9 @@ export interface ProcessStdinParams {
|
|
|
412
424
|
|
|
413
425
|
export interface ProcessStdoutStreamParams {
|
|
414
426
|
/**
|
|
415
|
-
* Browser session ID
|
|
427
|
+
* Browser session ID or name
|
|
416
428
|
*/
|
|
417
|
-
|
|
429
|
+
id_or_name: string;
|
|
418
430
|
}
|
|
419
431
|
|
|
420
432
|
export declare namespace Process {
|
|
@@ -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([
|
|
@@ -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
|
+
}
|
|
@@ -15,8 +15,8 @@ export class ConfigRegistry extends APIResource {
|
|
|
15
15
|
analyses: AnalysesAPI.Analyses = new AnalysesAPI.Analyses(this._client);
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* Lists unique
|
|
19
|
-
*
|
|
18
|
+
* Lists unique exact targets previously analyzed by the selected project with the
|
|
19
|
+
* recommendation produced by each target's latest analysis.
|
|
20
20
|
*
|
|
21
21
|
* @example
|
|
22
22
|
* ```ts
|
|
@@ -431,22 +431,24 @@ export type RecommendationResult = Recommendation | NoRecommendation;
|
|
|
431
431
|
|
|
432
432
|
export interface RecommendationSummary {
|
|
433
433
|
/**
|
|
434
|
-
* ID of the most recently requested analysis for this
|
|
434
|
+
* ID of the most recently requested analysis for this exact target.
|
|
435
435
|
*/
|
|
436
436
|
analysis_id: string;
|
|
437
437
|
|
|
438
438
|
/**
|
|
439
|
-
* Lifecycle status of the most recently requested analysis for this
|
|
439
|
+
* Lifecycle status of the most recently requested analysis for this exact target.
|
|
440
440
|
*/
|
|
441
441
|
analysis_status: 'running' | 'completed' | 'failed' | 'canceled';
|
|
442
442
|
|
|
443
443
|
/**
|
|
444
|
-
* Most recent time the selected project requested an analysis for this
|
|
444
|
+
* Most recent time the selected project requested an analysis for this exact
|
|
445
|
+
* target.
|
|
445
446
|
*/
|
|
446
447
|
last_requested_at: string;
|
|
447
448
|
|
|
448
449
|
/**
|
|
449
|
-
*
|
|
450
|
+
* Recommendation produced by the latest analysis. Null when that analysis did not
|
|
451
|
+
* produce one.
|
|
450
452
|
*/
|
|
451
453
|
recommendation: Recommendation | null;
|
|
452
454
|
|
|
@@ -456,13 +458,14 @@ export interface RecommendationSummary {
|
|
|
456
458
|
recommended_config_label: string | null;
|
|
457
459
|
|
|
458
460
|
/**
|
|
459
|
-
* Success rate for the recommended configuration. Null when
|
|
460
|
-
*
|
|
461
|
+
* Success rate for the recommended configuration. Null when the latest analysis
|
|
462
|
+
* did not produce one.
|
|
461
463
|
*/
|
|
462
464
|
success_rate: number | null;
|
|
463
465
|
|
|
464
466
|
/**
|
|
465
|
-
*
|
|
467
|
+
* Normalized exact target previously analyzed by the selected project, including
|
|
468
|
+
* scheme, host, port, and path.
|
|
466
469
|
*/
|
|
467
470
|
target: string;
|
|
468
471
|
}
|
|
@@ -500,8 +503,8 @@ export interface Target {
|
|
|
500
503
|
|
|
501
504
|
export interface ConfigRegistryListParams extends OffsetPaginationParams {
|
|
502
505
|
/**
|
|
503
|
-
* Case-insensitive
|
|
504
|
-
*
|
|
506
|
+
* Case-insensitive substring search over normalized targets, including domain,
|
|
507
|
+
* subdomain, and path.
|
|
505
508
|
*/
|
|
506
509
|
search?: string;
|
|
507
510
|
|
package/src/resources/index.ts
CHANGED
|
@@ -50,6 +50,7 @@ export {
|
|
|
50
50
|
type BrowserUsage,
|
|
51
51
|
type Profile,
|
|
52
52
|
type Tags,
|
|
53
|
+
type VaultReference,
|
|
53
54
|
type BrowserCreateResponse,
|
|
54
55
|
type BrowserRetrieveResponse,
|
|
55
56
|
type BrowserUpdateResponse,
|
|
@@ -179,3 +180,10 @@ export {
|
|
|
179
180
|
type ProxyListResponsesOffsetPagination,
|
|
180
181
|
} from './proxies';
|
|
181
182
|
export { Telemetry } from './telemetry/telemetry';
|
|
183
|
+
export {
|
|
184
|
+
Vaults,
|
|
185
|
+
type Vault,
|
|
186
|
+
type VaultListParams,
|
|
187
|
+
type VaultUpsertParams,
|
|
188
|
+
type VaultsOffsetPagination,
|
|
189
|
+
} from './vaults/vaults';
|
|
@@ -561,6 +561,17 @@ export namespace InvocationListBrowsersResponse {
|
|
|
561
561
|
*/
|
|
562
562
|
usage?: BrowsersAPI.BrowserUsage;
|
|
563
563
|
|
|
564
|
+
/**
|
|
565
|
+
* Whether final usage billing is still pending or complete. Only present for
|
|
566
|
+
* deleted sessions.
|
|
567
|
+
*/
|
|
568
|
+
usage_status?: 'pending' | 'ready';
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* Vaults linked when the browser session was created.
|
|
572
|
+
*/
|
|
573
|
+
vaults?: Array<BrowsersAPI.VaultReference>;
|
|
574
|
+
|
|
564
575
|
/**
|
|
565
576
|
* Initial browser window size in pixels with optional refresh rate. If omitted,
|
|
566
577
|
* image defaults apply (1920x1080@25). For GPU images, the default is
|