@onkernel/sdk 0.32.0 → 0.34.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 +32 -0
- package/client.d.mts +0 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +0 -3
- package/client.d.ts.map +1 -1
- package/client.js +7 -3
- package/client.js.map +1 -1
- package/client.mjs +7 -3
- package/client.mjs.map +1 -1
- package/core/streaming.js.map +1 -1
- package/core/streaming.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/auth/auth.d.mts +2 -2
- package/resources/auth/auth.d.mts.map +1 -1
- package/resources/auth/auth.d.ts +2 -2
- package/resources/auth/auth.d.ts.map +1 -1
- package/resources/auth/auth.js.map +1 -1
- package/resources/auth/auth.mjs.map +1 -1
- package/resources/auth/connections.d.mts +172 -59
- package/resources/auth/connections.d.mts.map +1 -1
- package/resources/auth/connections.d.ts +172 -59
- package/resources/auth/connections.d.ts.map +1 -1
- package/resources/auth/connections.js +12 -17
- package/resources/auth/connections.js.map +1 -1
- package/resources/auth/connections.mjs +12 -17
- package/resources/auth/connections.mjs.map +1 -1
- package/resources/auth/index.d.mts +1 -1
- package/resources/auth/index.d.mts.map +1 -1
- package/resources/auth/index.d.ts +1 -1
- package/resources/auth/index.d.ts.map +1 -1
- package/resources/auth/index.js.map +1 -1
- package/resources/auth/index.mjs.map +1 -1
- package/resources/browser-pools.d.mts +28 -28
- package/resources/browser-pools.d.ts +28 -28
- package/resources/browsers/browsers.d.mts +35 -35
- package/resources/browsers/browsers.d.ts +35 -35
- package/resources/credentials.d.mts +4 -0
- package/resources/credentials.d.mts.map +1 -1
- package/resources/credentials.d.ts +4 -0
- package/resources/credentials.d.ts.map +1 -1
- package/resources/index.d.mts +0 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +0 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invocations.d.mts +7 -7
- package/resources/invocations.d.ts +7 -7
- package/resources/shared.d.mts +21 -7
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +21 -7
- package/resources/shared.d.ts.map +1 -1
- package/src/client.ts +9 -6
- package/src/core/streaming.ts +2 -2
- package/src/resources/auth/auth.ts +0 -2
- package/src/resources/auth/connections.ts +195 -60
- package/src/resources/auth/index.ts +0 -1
- package/src/resources/browser-pools.ts +28 -28
- package/src/resources/browsers/browsers.ts +35 -35
- package/src/resources/credentials.ts +5 -0
- package/src/resources/index.ts +0 -1
- package/src/resources/invocations.ts +7 -7
- package/src/resources/shared.ts +19 -7
- 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
- package/resources/agents/agents.d.mts +0 -10
- package/resources/agents/agents.d.mts.map +0 -1
- package/resources/agents/agents.d.ts +0 -10
- package/resources/agents/agents.d.ts.map +0 -1
- package/resources/agents/agents.js +0 -17
- package/resources/agents/agents.js.map +0 -1
- package/resources/agents/agents.mjs +0 -12
- package/resources/agents/agents.mjs.map +0 -1
- package/resources/agents/auth/auth.d.mts +0 -474
- package/resources/agents/auth/auth.d.mts.map +0 -1
- package/resources/agents/auth/auth.d.ts +0 -474
- package/resources/agents/auth/auth.d.ts.map +0 -1
- package/resources/agents/auth/auth.js +0 -66
- package/resources/agents/auth/auth.js.map +0 -1
- package/resources/agents/auth/auth.mjs +0 -61
- package/resources/agents/auth/auth.mjs.map +0 -1
- package/resources/agents/auth/index.d.mts +0 -3
- package/resources/agents/auth/index.d.mts.map +0 -1
- package/resources/agents/auth/index.d.ts +0 -3
- package/resources/agents/auth/index.d.ts.map +0 -1
- package/resources/agents/auth/index.js +0 -9
- package/resources/agents/auth/index.js.map +0 -1
- package/resources/agents/auth/index.mjs +0 -4
- package/resources/agents/auth/index.mjs.map +0 -1
- package/resources/agents/auth/invocations.d.mts +0 -96
- package/resources/agents/auth/invocations.d.mts.map +0 -1
- package/resources/agents/auth/invocations.d.ts +0 -96
- package/resources/agents/auth/invocations.d.ts.map +0 -1
- package/resources/agents/auth/invocations.js +0 -50
- package/resources/agents/auth/invocations.js.map +0 -1
- package/resources/agents/auth/invocations.mjs +0 -46
- package/resources/agents/auth/invocations.mjs.map +0 -1
- package/resources/agents/auth.d.mts +0 -2
- package/resources/agents/auth.d.mts.map +0 -1
- package/resources/agents/auth.d.ts +0 -2
- package/resources/agents/auth.d.ts.map +0 -1
- package/resources/agents/auth.js +0 -6
- package/resources/agents/auth.js.map +0 -1
- package/resources/agents/auth.mjs +0 -3
- package/resources/agents/auth.mjs.map +0 -1
- package/resources/agents/index.d.mts +0 -3
- package/resources/agents/index.d.mts.map +0 -1
- package/resources/agents/index.d.ts +0 -3
- package/resources/agents/index.d.ts.map +0 -1
- package/resources/agents/index.js +0 -9
- package/resources/agents/index.js.map +0 -1
- package/resources/agents/index.mjs +0 -4
- package/resources/agents/index.mjs.map +0 -1
- package/resources/agents.d.mts +0 -2
- package/resources/agents.d.mts.map +0 -1
- package/resources/agents.d.ts +0 -2
- package/resources/agents.d.ts.map +0 -1
- package/resources/agents.js +0 -6
- package/resources/agents.js.map +0 -1
- package/resources/agents.mjs +0 -3
- package/resources/agents.mjs.map +0 -1
- package/src/resources/agents/agents.ts +0 -39
- package/src/resources/agents/auth/auth.ts +0 -599
- package/src/resources/agents/auth/index.ts +0 -22
- package/src/resources/agents/auth/invocations.ts +0 -137
- package/src/resources/agents/auth.ts +0 -3
- package/src/resources/agents/index.ts +0 -16
- package/src/resources/agents.ts +0 -3
|
@@ -364,13 +364,13 @@ export declare namespace InvocationListBrowsersResponse {
|
|
|
364
364
|
proxy_id?: string;
|
|
365
365
|
/**
|
|
366
366
|
* Initial browser window size in pixels with optional refresh rate. If omitted,
|
|
367
|
-
* image defaults apply (1920x1080@25).
|
|
368
|
-
*
|
|
369
|
-
*
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
367
|
+
* image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted,
|
|
368
|
+
* but the following configurations are known-good and fully tested: 2560x1440@10,
|
|
369
|
+
* 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60.
|
|
370
|
+
* Viewports outside this list may exhibit unstable live view or recording
|
|
371
|
+
* behavior. If refresh_rate is not provided, it will be automatically determined
|
|
372
|
+
* based on the resolution (higher resolutions use lower refresh rates to keep
|
|
373
|
+
* bandwidth reasonable).
|
|
374
374
|
*/
|
|
375
375
|
viewport?: Shared.BrowserViewport;
|
|
376
376
|
}
|
|
@@ -364,13 +364,13 @@ export declare namespace InvocationListBrowsersResponse {
|
|
|
364
364
|
proxy_id?: string;
|
|
365
365
|
/**
|
|
366
366
|
* Initial browser window size in pixels with optional refresh rate. If omitted,
|
|
367
|
-
* image defaults apply (1920x1080@25).
|
|
368
|
-
*
|
|
369
|
-
*
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
367
|
+
* image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted,
|
|
368
|
+
* but the following configurations are known-good and fully tested: 2560x1440@10,
|
|
369
|
+
* 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60.
|
|
370
|
+
* Viewports outside this list may exhibit unstable live view or recording
|
|
371
|
+
* behavior. If refresh_rate is not provided, it will be automatically determined
|
|
372
|
+
* based on the resolution (higher resolutions use lower refresh rates to keep
|
|
373
|
+
* bandwidth reasonable).
|
|
374
374
|
*/
|
|
375
375
|
viewport?: Shared.BrowserViewport;
|
|
376
376
|
}
|
package/resources/shared.d.mts
CHANGED
|
@@ -6,6 +6,20 @@ export interface AppAction {
|
|
|
6
6
|
* Name of the action
|
|
7
7
|
*/
|
|
8
8
|
name: string;
|
|
9
|
+
/**
|
|
10
|
+
* JSON Schema (draft-07) describing the expected input payload. Null if schema
|
|
11
|
+
* could not be automatically generated.
|
|
12
|
+
*/
|
|
13
|
+
input_schema?: {
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
} | null;
|
|
16
|
+
/**
|
|
17
|
+
* JSON Schema (draft-07) describing the expected output payload. Null if schema
|
|
18
|
+
* could not be automatically generated.
|
|
19
|
+
*/
|
|
20
|
+
output_schema?: {
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
} | null;
|
|
9
23
|
}
|
|
10
24
|
/**
|
|
11
25
|
* Extension selection for the browser session. Provide either id or name of an
|
|
@@ -45,13 +59,13 @@ export interface BrowserProfile {
|
|
|
45
59
|
}
|
|
46
60
|
/**
|
|
47
61
|
* Initial browser window size in pixels with optional refresh rate. If omitted,
|
|
48
|
-
* image defaults apply (1920x1080@25).
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
62
|
+
* image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted,
|
|
63
|
+
* but the following configurations are known-good and fully tested: 2560x1440@10,
|
|
64
|
+
* 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60.
|
|
65
|
+
* Viewports outside this list may exhibit unstable live view or recording
|
|
66
|
+
* behavior. If refresh_rate is not provided, it will be automatically determined
|
|
67
|
+
* based on the resolution (higher resolutions use lower refresh rates to keep
|
|
68
|
+
* bandwidth reasonable).
|
|
55
69
|
*/
|
|
56
70
|
export interface BrowserViewport {
|
|
57
71
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.mts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"shared.d.mts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,YAAY,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IAEjD;;;OAGG;IACH,aAAa,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;CACnD;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,UAAU,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAE7B,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,KAAK,EAAE,eAAe,CAAC;IAEvB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
package/resources/shared.d.ts
CHANGED
|
@@ -6,6 +6,20 @@ export interface AppAction {
|
|
|
6
6
|
* Name of the action
|
|
7
7
|
*/
|
|
8
8
|
name: string;
|
|
9
|
+
/**
|
|
10
|
+
* JSON Schema (draft-07) describing the expected input payload. Null if schema
|
|
11
|
+
* could not be automatically generated.
|
|
12
|
+
*/
|
|
13
|
+
input_schema?: {
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
} | null;
|
|
16
|
+
/**
|
|
17
|
+
* JSON Schema (draft-07) describing the expected output payload. Null if schema
|
|
18
|
+
* could not be automatically generated.
|
|
19
|
+
*/
|
|
20
|
+
output_schema?: {
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
} | null;
|
|
9
23
|
}
|
|
10
24
|
/**
|
|
11
25
|
* Extension selection for the browser session. Provide either id or name of an
|
|
@@ -45,13 +59,13 @@ export interface BrowserProfile {
|
|
|
45
59
|
}
|
|
46
60
|
/**
|
|
47
61
|
* Initial browser window size in pixels with optional refresh rate. If omitted,
|
|
48
|
-
* image defaults apply (1920x1080@25).
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
62
|
+
* image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted,
|
|
63
|
+
* but the following configurations are known-good and fully tested: 2560x1440@10,
|
|
64
|
+
* 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60.
|
|
65
|
+
* Viewports outside this list may exhibit unstable live view or recording
|
|
66
|
+
* behavior. If refresh_rate is not provided, it will be automatically determined
|
|
67
|
+
* based on the resolution (higher resolutions use lower refresh rates to keep
|
|
68
|
+
* bandwidth reasonable).
|
|
55
69
|
*/
|
|
56
70
|
export interface BrowserViewport {
|
|
57
71
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,YAAY,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IAEjD;;;OAGG;IACH,aAAa,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;CACnD;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,UAAU,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAE7B,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,KAAK,EAAE,eAAe,CAAC;IAEvB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
package/src/client.ts
CHANGED
|
@@ -97,7 +97,6 @@ import {
|
|
|
97
97
|
ProxyListResponse,
|
|
98
98
|
ProxyRetrieveResponse,
|
|
99
99
|
} from './resources/proxies';
|
|
100
|
-
import { Agents } from './resources/agents/agents';
|
|
101
100
|
import { Auth } from './resources/auth/auth';
|
|
102
101
|
import {
|
|
103
102
|
BrowserCreateParams,
|
|
@@ -582,7 +581,7 @@ export class Kernel {
|
|
|
582
581
|
loggerFor(this).info(`${responseInfo} - ${retryMessage}`);
|
|
583
582
|
|
|
584
583
|
const errText = await response.text().catch((err: any) => castToError(err).message);
|
|
585
|
-
const errJSON = safeJSON(errText);
|
|
584
|
+
const errJSON = safeJSON(errText) as any;
|
|
586
585
|
const errMessage = errJSON ? undefined : errText;
|
|
587
586
|
|
|
588
587
|
loggerFor(this).debug(
|
|
@@ -855,6 +854,14 @@ export class Kernel {
|
|
|
855
854
|
(Symbol.iterator in body && 'next' in body && typeof body.next === 'function'))
|
|
856
855
|
) {
|
|
857
856
|
return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body as AsyncIterable<Uint8Array>) };
|
|
857
|
+
} else if (
|
|
858
|
+
typeof body === 'object' &&
|
|
859
|
+
headers.values.get('content-type') === 'application/x-www-form-urlencoded'
|
|
860
|
+
) {
|
|
861
|
+
return {
|
|
862
|
+
bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },
|
|
863
|
+
body: this.stringifyQuery(body as Record<string, unknown>),
|
|
864
|
+
};
|
|
858
865
|
} else {
|
|
859
866
|
return this.#encoder({ body, headers });
|
|
860
867
|
}
|
|
@@ -898,7 +905,6 @@ export class Kernel {
|
|
|
898
905
|
proxies: API.Proxies = new API.Proxies(this);
|
|
899
906
|
extensions: API.Extensions = new API.Extensions(this);
|
|
900
907
|
browserPools: API.BrowserPools = new API.BrowserPools(this);
|
|
901
|
-
agents: API.Agents = new API.Agents(this);
|
|
902
908
|
credentials: API.Credentials = new API.Credentials(this);
|
|
903
909
|
credentialProviders: API.CredentialProviders = new API.CredentialProviders(this);
|
|
904
910
|
}
|
|
@@ -912,7 +918,6 @@ Kernel.Auth = Auth;
|
|
|
912
918
|
Kernel.Proxies = Proxies;
|
|
913
919
|
Kernel.Extensions = Extensions;
|
|
914
920
|
Kernel.BrowserPools = BrowserPools;
|
|
915
|
-
Kernel.Agents = Agents;
|
|
916
921
|
Kernel.Credentials = Credentials;
|
|
917
922
|
Kernel.CredentialProviders = CredentialProviders;
|
|
918
923
|
|
|
@@ -1015,8 +1020,6 @@ export declare namespace Kernel {
|
|
|
1015
1020
|
type BrowserPoolReleaseParams as BrowserPoolReleaseParams,
|
|
1016
1021
|
};
|
|
1017
1022
|
|
|
1018
|
-
export { Agents as Agents };
|
|
1019
|
-
|
|
1020
1023
|
export {
|
|
1021
1024
|
Credentials as Credentials,
|
|
1022
1025
|
type CreateCredentialRequest as CreateCredentialRequest,
|
package/src/core/streaming.ts
CHANGED
|
@@ -46,7 +46,7 @@ export class Stream<Item> implements AsyncIterable<Item> {
|
|
|
46
46
|
try {
|
|
47
47
|
for await (const sse of _iterSSEMessages(response, controller)) {
|
|
48
48
|
try {
|
|
49
|
-
yield JSON.parse(sse.data);
|
|
49
|
+
yield JSON.parse(sse.data) as Item;
|
|
50
50
|
} catch (e) {
|
|
51
51
|
logger.error(`Could not parse message into JSON:`, sse.data);
|
|
52
52
|
logger.error(`From chunk:`, sse.raw);
|
|
@@ -102,7 +102,7 @@ export class Stream<Item> implements AsyncIterable<Item> {
|
|
|
102
102
|
try {
|
|
103
103
|
for await (const line of iterLines()) {
|
|
104
104
|
if (done) continue;
|
|
105
|
-
if (line) yield JSON.parse(line);
|
|
105
|
+
if (line) yield JSON.parse(line) as Item;
|
|
106
106
|
}
|
|
107
107
|
done = true;
|
|
108
108
|
} catch (e) {
|
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
ConnectionLoginParams,
|
|
10
10
|
ConnectionSubmitParams,
|
|
11
11
|
Connections,
|
|
12
|
-
LoginRequest,
|
|
13
12
|
LoginResponse,
|
|
14
13
|
ManagedAuth,
|
|
15
14
|
ManagedAuthCreateRequest,
|
|
@@ -27,7 +26,6 @@ Auth.Connections = Connections;
|
|
|
27
26
|
export declare namespace Auth {
|
|
28
27
|
export {
|
|
29
28
|
Connections as Connections,
|
|
30
|
-
type LoginRequest as LoginRequest,
|
|
31
29
|
type LoginResponse as LoginResponse,
|
|
32
30
|
type ManagedAuth as ManagedAuth,
|
|
33
31
|
type ManagedAuthCreateRequest as ManagedAuthCreateRequest,
|