Skip to content
Merged
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.14.0"
".": "0.14.1"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 57
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-936db268b3dcae5d64bd5d590506d8134304ffcbf67389eb9b1555b3febfd4cb.yml
openapi_spec_hash: 145485087adf1b28c052bacb4df68462
config_hash: 15cd063f8e308686ac71bf9ee9634625
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-1cd328ccf61f0e888d6df27b091c30b38c392ab9ca8ce7fd0ead8f10aaf71ffa.yml
openapi_spec_hash: af761c48d1955f11822f3b95f9c46750
config_hash: deadfc4d2b0a947673bcf559b5db6e1b
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.14.1 (2025-10-13)

Full Changelog: [v0.14.0...v0.14.1](https://github.com/onkernel/kernel-node-sdk/compare/v0.14.0...v0.14.1)

### Features

* Hide and deprecate mobile proxy type ([54dae63](https://github.com/onkernel/kernel-node-sdk/commit/54dae631f02ce14c75222677ffa171895f4cb0ca))
* WIP: Configurable Viewport ([2a85d81](https://github.com/onkernel/kernel-node-sdk/commit/2a85d8110a918d62a528401e278758cf5eeb9b82))

## 0.14.0 (2025-10-07)

Full Changelog: [v0.13.0...v0.14.0](https://github.com/onkernel/kernel-node-sdk/compare/v0.13.0...v0.14.0)
Expand Down
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Methods:
- <code title="get /browsers">client.browsers.<a href="./src/resources/browsers/browsers.ts">list</a>() -> BrowserListResponse</code>
- <code title="delete /browsers">client.browsers.<a href="./src/resources/browsers/browsers.ts">delete</a>({ ...params }) -> void</code>
- <code title="delete /browsers/{id}">client.browsers.<a href="./src/resources/browsers/browsers.ts">deleteByID</a>(id) -> void</code>
- <code title="post /browsers/{id}/extensions">client.browsers.<a href="./src/resources/browsers/browsers.ts">uploadExtensions</a>(id, { ...params }) -> void</code>
- <code title="post /browsers/{id}/extensions">client.browsers.<a href="./src/resources/browsers/browsers.ts">loadExtensions</a>(id, { ...params }) -> void</code>

## Replays

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.14.0",
"version": "0.14.1",
"description": "The official TypeScript library for the Kernel API",
"author": "Kernel <>",
"types": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ import {
BrowserCreateResponse,
BrowserDeleteParams,
BrowserListResponse,
BrowserLoadExtensionsParams,
BrowserPersistence,
BrowserRetrieveResponse,
BrowserUploadExtensionsParams,
Browsers,
Profile,
} from './resources/browsers/browsers';
Expand Down Expand Up @@ -899,7 +899,7 @@ export declare namespace Kernel {
type BrowserListResponse as BrowserListResponse,
type BrowserCreateParams as BrowserCreateParams,
type BrowserDeleteParams as BrowserDeleteParams,
type BrowserUploadExtensionsParams as BrowserUploadExtensionsParams,
type BrowserLoadExtensionsParams as BrowserLoadExtensionsParams,
};

export {
Expand Down
182 changes: 172 additions & 10 deletions src/resources/browsers/browsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export class Browsers extends APIResource {
*
* @example
* ```ts
* await client.browsers.uploadExtensions('id', {
* await client.browsers.loadExtensions('id', {
* extensions: [
* {
* name: 'name',
Expand All @@ -153,11 +153,7 @@ export class Browsers extends APIResource {
* });
* ```
*/
uploadExtensions(
id: string,
body: BrowserUploadExtensionsParams,
options?: RequestOptions,
): APIPromise<void> {
loadExtensions(id: string, body: BrowserLoadExtensionsParams, options?: RequestOptions): APIPromise<void> {
return this._client.post(
path`/browsers/${id}/extensions`,
multipartFormRequestOptions(
Expand Down Expand Up @@ -259,6 +255,48 @@ export interface BrowserCreateResponse {
* ID of the proxy associated with this browser session, if any.
*/
proxy_id?: string;

/**
* Initial browser window size in pixels with optional refresh rate. If omitted,
* image defaults apply (commonly 1024x768@60). Only specific viewport
* configurations are supported. The server will reject unsupported combinations.
* Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
* 1440x900@25, 1024x768@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
*/
viewport?: BrowserCreateResponse.Viewport;
}

export namespace BrowserCreateResponse {
/**
* Initial browser window size in pixels with optional refresh rate. If omitted,
* image defaults apply (commonly 1024x768@60). Only specific viewport
* configurations are supported. The server will reject unsupported combinations.
* Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
* 1440x900@25, 1024x768@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
*/
export interface Viewport {
/**
* Browser window height in pixels.
*/
height: number;

/**
* Browser window width in pixels.
*/
width: number;

/**
* Display refresh rate in Hz. If omitted, automatically determined from width and
* height.
*/
refresh_rate?: number;
}
}

export interface BrowserRetrieveResponse {
Expand Down Expand Up @@ -312,6 +350,48 @@ export interface BrowserRetrieveResponse {
* ID of the proxy associated with this browser session, if any.
*/
proxy_id?: string;

/**
* Initial browser window size in pixels with optional refresh rate. If omitted,
* image defaults apply (commonly 1024x768@60). Only specific viewport
* configurations are supported. The server will reject unsupported combinations.
* Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
* 1440x900@25, 1024x768@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
*/
viewport?: BrowserRetrieveResponse.Viewport;
}

export namespace BrowserRetrieveResponse {
/**
* Initial browser window size in pixels with optional refresh rate. If omitted,
* image defaults apply (commonly 1024x768@60). Only specific viewport
* configurations are supported. The server will reject unsupported combinations.
* Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
* 1440x900@25, 1024x768@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
*/
export interface Viewport {
/**
* Browser window height in pixels.
*/
height: number;

/**
* Browser window width in pixels.
*/
width: number;

/**
* Display refresh rate in Hz. If omitted, automatically determined from width and
* height.
*/
refresh_rate?: number;
}
}

export type BrowserListResponse = Array<BrowserListResponse.BrowserListResponseItem>;
Expand Down Expand Up @@ -368,6 +448,48 @@ export namespace BrowserListResponse {
* ID of the proxy associated with this browser session, if any.
*/
proxy_id?: string;

/**
* Initial browser window size in pixels with optional refresh rate. If omitted,
* image defaults apply (commonly 1024x768@60). Only specific viewport
* configurations are supported. The server will reject unsupported combinations.
* Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
* 1440x900@25, 1024x768@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
*/
viewport?: BrowserListResponseItem.Viewport;
}

export namespace BrowserListResponseItem {
/**
* Initial browser window size in pixels with optional refresh rate. If omitted,
* image defaults apply (commonly 1024x768@60). Only specific viewport
* configurations are supported. The server will reject unsupported combinations.
* Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
* 1440x900@25, 1024x768@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
*/
export interface Viewport {
/**
* Browser window height in pixels.
*/
height: number;

/**
* Browser window width in pixels.
*/
width: number;

/**
* Display refresh rate in Hz. If omitted, automatically determined from width and
* height.
*/
refresh_rate?: number;
}
}
}

Expand Down Expand Up @@ -421,6 +543,18 @@ export interface BrowserCreateParams {
* specified value.
*/
timeout_seconds?: number;

/**
* Initial browser window size in pixels with optional refresh rate. If omitted,
* image defaults apply (commonly 1024x768@60). Only specific viewport
* configurations are supported. The server will reject unsupported combinations.
* Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
* 1440x900@25, 1024x768@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
*/
viewport?: BrowserCreateParams.Viewport;
}

export namespace BrowserCreateParams {
Expand Down Expand Up @@ -464,6 +598,34 @@ export namespace BrowserCreateParams {
*/
save_changes?: boolean;
}

/**
* Initial browser window size in pixels with optional refresh rate. If omitted,
* image defaults apply (commonly 1024x768@60). Only specific viewport
* configurations are supported. The server will reject unsupported combinations.
* Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
* 1440x900@25, 1024x768@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
*/
export interface Viewport {
/**
* Browser window height in pixels.
*/
height: number;

/**
* Browser window width in pixels.
*/
width: number;

/**
* Display refresh rate in Hz. If omitted, automatically determined from width and
* height.
*/
refresh_rate?: number;
}
}

export interface BrowserDeleteParams {
Expand All @@ -473,14 +635,14 @@ export interface BrowserDeleteParams {
persistent_id: string;
}

export interface BrowserUploadExtensionsParams {
export interface BrowserLoadExtensionsParams {
/**
* List of extensions to upload and activate
*/
extensions: Array<BrowserUploadExtensionsParams.Extension>;
extensions: Array<BrowserLoadExtensionsParams.Extension>;
}

export namespace BrowserUploadExtensionsParams {
export namespace BrowserLoadExtensionsParams {
export interface Extension {
/**
* Folder name to place the extension under /home/kernel/extensions/<name>
Expand Down Expand Up @@ -509,7 +671,7 @@ export declare namespace Browsers {
type BrowserListResponse as BrowserListResponse,
type BrowserCreateParams as BrowserCreateParams,
type BrowserDeleteParams as BrowserDeleteParams,
type BrowserUploadExtensionsParams as BrowserUploadExtensionsParams,
type BrowserLoadExtensionsParams as BrowserLoadExtensionsParams,
};

export {
Expand Down
2 changes: 1 addition & 1 deletion src/resources/browsers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export {
type BrowserListResponse,
type BrowserCreateParams,
type BrowserDeleteParams,
type BrowserUploadExtensionsParams,
type BrowserLoadExtensionsParams,
} from './browsers';
export {
Fs,
Expand Down
2 changes: 1 addition & 1 deletion src/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export {
type BrowserListResponse,
type BrowserCreateParams,
type BrowserDeleteParams,
type BrowserUploadExtensionsParams,
type BrowserLoadExtensionsParams,
} from './browsers/browsers';
export {
Deployments,
Expand Down
Loading