Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.33.0"
".": "0.34.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 100
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-82fd51be8dc9b6ad425425f9eb747dd337df494a030d03d37f101e2236c85548.yml
openapi_spec_hash: ab396816e2b7da9938d42ec5a41cc8e1
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-47ee6a2b624baddb41a681feff758bf1893cd3d65edf3ab51219ebe4d942932b.yml
openapi_spec_hash: 76178c41ede593e76bfacb176057d2f0
config_hash: 27c0ea01aeb797a1767af139851c5b66
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 0.34.0 (2026-02-13)

Full Changelog: [v0.33.0...v0.34.0](https://github.com/kernel/kernel-node-sdk/compare/v0.33.0...v0.34.0)

### Features

* Add error_code field to ManagedAuthSession and related components ([1adbca7](https://github.com/kernel/kernel-node-sdk/commit/1adbca7f07a5f2b0af05fa5c4c3a284b68f36455))
* Allow arbitrary viewport dimensions ([7860190](https://github.com/kernel/kernel-node-sdk/commit/7860190991d770a0299b188720e47e5eb2745626))


### Chores

* **internal:** avoid type checking errors with ts-reset ([8ca1d54](https://github.com/kernel/kernel-node-sdk/commit/8ca1d5422ec00b6042ee742c5d306f1ef81d0503))

## 0.33.0 (2026-02-11)

Full Changelog: [v0.32.0...v0.33.0](https://github.com/kernel/kernel-node-sdk/compare/v0.32.0...v0.33.0)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onkernel/sdk",
"version": "0.33.0",
"version": "0.34.0",
"description": "The official TypeScript library for the Kernel API",
"author": "Kernel <>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ export class Kernel {
loggerFor(this).info(`${responseInfo} - ${retryMessage}`);

const errText = await response.text().catch((err: any) => castToError(err).message);
const errJSON = safeJSON(errText);
const errJSON = safeJSON(errText) as any;
const errMessage = errJSON ? undefined : errText;

loggerFor(this).debug(
Expand Down
4 changes: 2 additions & 2 deletions src/core/streaming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class Stream<Item> implements AsyncIterable<Item> {
try {
for await (const sse of _iterSSEMessages(response, controller)) {
try {
yield JSON.parse(sse.data);
yield JSON.parse(sse.data) as Item;
} catch (e) {
logger.error(`Could not parse message into JSON:`, sse.data);
logger.error(`From chunk:`, sse.raw);
Expand Down Expand Up @@ -102,7 +102,7 @@ export class Stream<Item> implements AsyncIterable<Item> {
try {
for await (const line of iterLines()) {
if (done) continue;
if (line) yield JSON.parse(line);
if (line) yield JSON.parse(line) as Item;
}
done = true;
} catch (e) {
Expand Down
10 changes: 10 additions & 0 deletions src/resources/auth/connections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,11 @@ export interface ManagedAuth {
*/
discovered_fields?: Array<ManagedAuth.DiscoveredField> | null;

/**
* Machine-readable error code (present when flow_status=failed)
*/
error_code?: string | null;

/**
* Error message (present when flow_status=failed)
*/
Expand Down Expand Up @@ -648,6 +653,11 @@ export namespace ConnectionFollowResponse {
*/
discovered_fields?: Array<ManagedAuthStateEvent.DiscoveredField>;

/**
* Machine-readable error code (present when flow_status=FAILED).
*/
error_code?: string;

/**
* Error message (present when flow_status=FAILED).
*/
Expand Down
56 changes: 28 additions & 28 deletions src/resources/browser-pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,13 @@ export namespace BrowserPool {

/**
* Initial browser window size in pixels with optional refresh rate. If omitted,
* image defaults apply (1920x1080@25). Only specific viewport configurations are
* supported. The server will reject unsupported combinations. Supported
* resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
* 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
* be automatically determined from the width and height if they match a supported
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
* live view browser
* image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted,
* but the following configurations are known-good and fully tested: 2560x1440@10,
* 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60.
* Viewports outside this list may exhibit unstable live view or recording
* behavior. If refresh_rate is not provided, it will be automatically determined
* based on the resolution (higher resolutions use lower refresh rates to keep
* bandwidth reasonable).
*/
viewport?: Shared.BrowserViewport;
}
Expand Down Expand Up @@ -319,13 +319,13 @@ export interface BrowserPoolAcquireResponse {

/**
* Initial browser window size in pixels with optional refresh rate. If omitted,
* image defaults apply (1920x1080@25). Only specific viewport configurations are
* supported. The server will reject unsupported combinations. Supported
* resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
* 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
* be automatically determined from the width and height if they match a supported
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
* live view browser
* image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted,
* but the following configurations are known-good and fully tested: 2560x1440@10,
* 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60.
* Viewports outside this list may exhibit unstable live view or recording
* behavior. If refresh_rate is not provided, it will be automatically determined
* based on the resolution (higher resolutions use lower refresh rates to keep
* bandwidth reasonable).
*/
viewport?: Shared.BrowserViewport;
}
Expand Down Expand Up @@ -391,13 +391,13 @@ export interface BrowserPoolCreateParams {

/**
* Initial browser window size in pixels with optional refresh rate. If omitted,
* image defaults apply (1920x1080@25). Only specific viewport configurations are
* supported. The server will reject unsupported combinations. Supported
* resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
* 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
* be automatically determined from the width and height if they match a supported
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
* live view browser
* image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted,
* but the following configurations are known-good and fully tested: 2560x1440@10,
* 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60.
* Viewports outside this list may exhibit unstable live view or recording
* behavior. If refresh_rate is not provided, it will be automatically determined
* based on the resolution (higher resolutions use lower refresh rates to keep
* bandwidth reasonable).
*/
viewport?: Shared.BrowserViewport;
}
Expand Down Expand Up @@ -469,13 +469,13 @@ export interface BrowserPoolUpdateParams {

/**
* Initial browser window size in pixels with optional refresh rate. If omitted,
* image defaults apply (1920x1080@25). Only specific viewport configurations are
* supported. The server will reject unsupported combinations. Supported
* resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
* 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
* be automatically determined from the width and height if they match a supported
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
* live view browser
* image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted,
* but the following configurations are known-good and fully tested: 2560x1440@10,
* 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60.
* Viewports outside this list may exhibit unstable live view or recording
* behavior. If refresh_rate is not provided, it will be automatically determined
* based on the resolution (higher resolutions use lower refresh rates to keep
* bandwidth reasonable).
*/
viewport?: Shared.BrowserViewport;
}
Expand Down
70 changes: 35 additions & 35 deletions src/resources/browsers/browsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,13 @@ export interface BrowserCreateResponse {

/**
* Initial browser window size in pixels with optional refresh rate. If omitted,
* image defaults apply (1920x1080@25). Only specific viewport configurations are
* supported. The server will reject unsupported combinations. Supported
* resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
* 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
* be automatically determined from the width and height if they match a supported
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
* live view browser
* image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted,
* but the following configurations are known-good and fully tested: 2560x1440@10,
* 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60.
* Viewports outside this list may exhibit unstable live view or recording
* behavior. If refresh_rate is not provided, it will be automatically determined
* based on the resolution (higher resolutions use lower refresh rates to keep
* bandwidth reasonable).
*/
viewport?: Shared.BrowserViewport;
}
Expand Down Expand Up @@ -391,13 +391,13 @@ export interface BrowserRetrieveResponse {

/**
* Initial browser window size in pixels with optional refresh rate. If omitted,
* image defaults apply (1920x1080@25). Only specific viewport configurations are
* supported. The server will reject unsupported combinations. Supported
* resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
* 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
* be automatically determined from the width and height if they match a supported
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
* live view browser
* image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted,
* but the following configurations are known-good and fully tested: 2560x1440@10,
* 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60.
* Viewports outside this list may exhibit unstable live view or recording
* behavior. If refresh_rate is not provided, it will be automatically determined
* based on the resolution (higher resolutions use lower refresh rates to keep
* bandwidth reasonable).
*/
viewport?: Shared.BrowserViewport;
}
Expand Down Expand Up @@ -467,13 +467,13 @@ export interface BrowserUpdateResponse {

/**
* Initial browser window size in pixels with optional refresh rate. If omitted,
* image defaults apply (1920x1080@25). Only specific viewport configurations are
* supported. The server will reject unsupported combinations. Supported
* resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
* 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
* be automatically determined from the width and height if they match a supported
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
* live view browser
* image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted,
* but the following configurations are known-good and fully tested: 2560x1440@10,
* 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60.
* Viewports outside this list may exhibit unstable live view or recording
* behavior. If refresh_rate is not provided, it will be automatically determined
* based on the resolution (higher resolutions use lower refresh rates to keep
* bandwidth reasonable).
*/
viewport?: Shared.BrowserViewport;
}
Expand Down Expand Up @@ -543,13 +543,13 @@ export interface BrowserListResponse {

/**
* Initial browser window size in pixels with optional refresh rate. If omitted,
* image defaults apply (1920x1080@25). Only specific viewport configurations are
* supported. The server will reject unsupported combinations. Supported
* resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
* 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
* be automatically determined from the width and height if they match a supported
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
* live view browser
* image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted,
* but the following configurations are known-good and fully tested: 2560x1440@10,
* 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60.
* Viewports outside this list may exhibit unstable live view or recording
* behavior. If refresh_rate is not provided, it will be automatically determined
* based on the resolution (higher resolutions use lower refresh rates to keep
* bandwidth reasonable).
*/
viewport?: Shared.BrowserViewport;
}
Expand Down Expand Up @@ -613,13 +613,13 @@ export interface BrowserCreateParams {

/**
* Initial browser window size in pixels with optional refresh rate. If omitted,
* image defaults apply (1920x1080@25). Only specific viewport configurations are
* supported. The server will reject unsupported combinations. Supported
* resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
* 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
* be automatically determined from the width and height if they match a supported
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
* live view browser
* image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted,
* but the following configurations are known-good and fully tested: 2560x1440@10,
* 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60.
* Viewports outside this list may exhibit unstable live view or recording
* behavior. If refresh_rate is not provided, it will be automatically determined
* based on the resolution (higher resolutions use lower refresh rates to keep
* bandwidth reasonable).
*/
viewport?: Shared.BrowserViewport;
}
Expand Down
14 changes: 7 additions & 7 deletions src/resources/invocations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,13 +479,13 @@ export namespace InvocationListBrowsersResponse {

/**
* Initial browser window size in pixels with optional refresh rate. If omitted,
* image defaults apply (1920x1080@25). Only specific viewport configurations are
* supported. The server will reject unsupported combinations. Supported
* resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
* 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
* be automatically determined from the width and height if they match a supported
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
* live view browser
* image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted,
* but the following configurations are known-good and fully tested: 2560x1440@10,
* 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60.
* Viewports outside this list may exhibit unstable live view or recording
* behavior. If refresh_rate is not provided, it will be automatically determined
* based on the resolution (higher resolutions use lower refresh rates to keep
* bandwidth reasonable).
*/
viewport?: Shared.BrowserViewport;
}
Expand Down
14 changes: 7 additions & 7 deletions src/resources/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ export interface BrowserProfile {

/**
* Initial browser window size in pixels with optional refresh rate. If omitted,
* image defaults apply (1920x1080@25). Only specific viewport configurations are
* supported. The server will reject unsupported combinations. Supported
* resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
* 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
* be automatically determined from the width and height if they match a supported
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
* live view browser
* image defaults apply (1920x1080@25). Arbitrary viewport dimensions are accepted,
* but the following configurations are known-good and fully tested: 2560x1440@10,
* 1920x1080@25, 1920x1200@25, 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60.
* Viewports outside this list may exhibit unstable live view or recording
* behavior. If refresh_rate is not provided, it will be automatically determined
* based on the resolution (higher resolutions use lower refresh rates to keep
* bandwidth reasonable).
*/
export interface BrowserViewport {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.33.0'; // x-release-please-version
export const VERSION = '0.34.0'; // x-release-please-version