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.42.0"
".": "0.42.1"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 101
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-a935c8aae21f8ddb83ea5e289034df12cbde88d432fa2b287629814bb3f58bb6.yml
openapi_spec_hash: df3189b9728372f01662a19c060bcbc5
config_hash: 81f143f4bee47ae7b0b8357551babadf
configured_endpoints: 103
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-ef24d4bf172555bcbe8e3b432c644a25a1c6afd99c958a2eda8c3b1ea9568113.yml
openapi_spec_hash: b603c5a983e837928fa7d1100ed64fc9
config_hash: cff4d43372b6fa66b64e2d4150f6aa76
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## 0.42.1 (2026-03-05)

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

### Features

* [kernel-1028] add api clipboard support ([1ff017f](https://github.com/kernel/kernel-node-sdk/commit/1ff017f131009649dfc46318e351cb8d8ea07fff))
* add force flag to viewport resize to bypass live view/recording check ([0a65b3a](https://github.com/kernel/kernel-node-sdk/commit/0a65b3a32d1b3c970580c0673b226c0f4cd63721))
* expose smooth mouse movement via public API ([070c915](https://github.com/kernel/kernel-node-sdk/commit/070c9156259bfdb5e33f0809adc6f70f7ce1a37e))


### Bug Fixes

* use indexed bracket notation for multipart array encoding ([e2a7664](https://github.com/kernel/kernel-node-sdk/commit/e2a766470f90573d351c8507344b8e98c1f13cb6))


### Chores

* **internal:** codegen related update ([d55e6f5](https://github.com/kernel/kernel-node-sdk/commit/d55e6f590bf52a54ab1de762eb729fba2ce77c9a))

## 0.42.0 (2026-03-02)

Full Changelog: [v0.41.0...v0.42.0](https://github.com/kernel/kernel-node-sdk/compare/v0.41.0...v0.42.0)
Expand Down
3 changes: 3 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ Methods:
Types:

- <code><a href="./src/resources/browsers/computer.ts">ComputerGetMousePositionResponse</a></code>
- <code><a href="./src/resources/browsers/computer.ts">ComputerReadClipboardResponse</a></code>
- <code><a href="./src/resources/browsers/computer.ts">ComputerSetCursorVisibilityResponse</a></code>

Methods:
Expand All @@ -178,9 +179,11 @@ Methods:
- <code title="post /browsers/{id}/computer/get_mouse_position">client.browsers.computer.<a href="./src/resources/browsers/computer.ts">getMousePosition</a>(id) -> ComputerGetMousePositionResponse</code>
- <code title="post /browsers/{id}/computer/move_mouse">client.browsers.computer.<a href="./src/resources/browsers/computer.ts">moveMouse</a>(id, { ...params }) -> void</code>
- <code title="post /browsers/{id}/computer/press_key">client.browsers.computer.<a href="./src/resources/browsers/computer.ts">pressKey</a>(id, { ...params }) -> void</code>
- <code title="post /browsers/{id}/computer/clipboard/read">client.browsers.computer.<a href="./src/resources/browsers/computer.ts">readClipboard</a>(id) -> ComputerReadClipboardResponse</code>
- <code title="post /browsers/{id}/computer/scroll">client.browsers.computer.<a href="./src/resources/browsers/computer.ts">scroll</a>(id, { ...params }) -> void</code>
- <code title="post /browsers/{id}/computer/cursor">client.browsers.computer.<a href="./src/resources/browsers/computer.ts">setCursorVisibility</a>(id, { ...params }) -> ComputerSetCursorVisibilityResponse</code>
- <code title="post /browsers/{id}/computer/type">client.browsers.computer.<a href="./src/resources/browsers/computer.ts">typeText</a>(id, { ...params }) -> void</code>
- <code title="post /browsers/{id}/computer/clipboard/write">client.browsers.computer.<a href="./src/resources/browsers/computer.ts">writeClipboard</a>(id, { ...params }) -> void</code>

## Playwright

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.42.0",
"version": "0.42.1",
"description": "The official TypeScript library for the Kernel API",
"author": "Kernel <>",
"types": "dist/index.d.ts",
Expand Down
30 changes: 30 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -886,16 +886,46 @@ export class Kernel {

static toFile = Uploads.toFile;

/**
* Create and manage app deployments and stream deployment events.
*/
deployments: API.Deployments = new API.Deployments(this);
/**
* List applications and versions.
*/
apps: API.Apps = new API.Apps(this);
/**
* Invoke actions and stream or query invocation status and events.
*/
invocations: API.Invocations = new API.Invocations(this);
/**
* Create and manage browser sessions.
*/
browsers: API.Browsers = new API.Browsers(this);
/**
* Create, list, retrieve, and delete browser profiles.
*/
profiles: API.Profiles = new API.Profiles(this);
auth: API.Auth = new API.Auth(this);
/**
* Create and manage proxy configurations for routing browser traffic.
*/
proxies: API.Proxies = new API.Proxies(this);
/**
* Create, list, retrieve, and delete browser extensions.
*/
extensions: API.Extensions = new API.Extensions(this);
/**
* Create and manage browser pools for acquiring and releasing browsers.
*/
browserPools: API.BrowserPools = new API.BrowserPools(this);
/**
* Create and manage credentials for authentication.
*/
credentials: API.Credentials = new API.Credentials(this);
/**
* Configure external credential providers like 1Password.
*/
credentialProviders: API.CredentialProviders = new API.CredentialProviders(this);
}

Expand Down
3 changes: 3 additions & 0 deletions src/resources/apps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import * as Shared from './shared';
import { OffsetPagination, type OffsetPaginationParams, PagePromise } from '../core/pagination';
import { RequestOptions } from '../internal/request-options';

/**
* List applications and versions.
*/
export class Apps extends APIResource {
/**
* List applications. Optionally filter by app name and/or version label.
Expand Down
3 changes: 3 additions & 0 deletions src/resources/auth/connections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import { buildHeaders } from '../../internal/headers';
import { RequestOptions } from '../../internal/request-options';
import { path } from '../../internal/utils/path';

/**
* Create and manage auth connections for automated credential capture and login.
*/
export class Connections extends APIResource {
/**
* Creates an auth connection for a profile and domain combination. Returns 409
Expand Down
3 changes: 3 additions & 0 deletions src/resources/browser-pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import { buildHeaders } from '../internal/headers';
import { RequestOptions } from '../internal/request-options';
import { path } from '../internal/utils/path';

/**
* Create and manage browser pools for acquiring and releasing browsers.
*/
export class BrowserPools extends APIResource {
/**
* Create a new browser pool with the specified configuration and size.
Expand Down
24 changes: 23 additions & 1 deletion src/resources/browsers/browsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ import {
ComputerGetMousePositionResponse,
ComputerMoveMouseParams,
ComputerPressKeyParams,
ComputerReadClipboardResponse,
ComputerScrollParams,
ComputerSetCursorVisibilityParams,
ComputerSetCursorVisibilityResponse,
ComputerTypeTextParams,
ComputerWriteClipboardParams,
} from './computer';
import * as LogsAPI from './logs';
import { LogStreamParams, Logs } from './logs';
Expand Down Expand Up @@ -74,6 +76,9 @@ import { RequestOptions } from '../../internal/request-options';
import { multipartFormRequestOptions } from '../../internal/uploads';
import { path } from '../../internal/utils/path';

/**
* Create and manage browser sessions.
*/
export class Browsers extends APIResource {
replays: ReplaysAPI.Replays = new ReplaysAPI.Replays(this._client);
fs: FsAPI.Fs = new FsAPI.Fs(this._client);
Expand Down Expand Up @@ -740,7 +745,22 @@ export interface BrowserUpdateParams {
/**
* Viewport configuration to apply to the browser session.
*/
viewport?: Shared.BrowserViewport;
viewport?: BrowserUpdateParams.Viewport;
}

export namespace BrowserUpdateParams {
/**
* Viewport configuration to apply to the browser session.
*/
export interface Viewport extends Shared.BrowserViewport {
/**
* If true, allow the viewport change even when a live view or recording/replay is
* active. Active recordings will be gracefully stopped and restarted at the new
* resolution as separate segments. If false (default), the resize is refused when
* a live view or recording is active.
*/
force?: boolean;
}
}

export interface BrowserListParams extends OffsetPaginationParams {
Expand Down Expand Up @@ -867,6 +887,7 @@ export declare namespace Browsers {
export {
Computer as Computer,
type ComputerGetMousePositionResponse as ComputerGetMousePositionResponse,
type ComputerReadClipboardResponse as ComputerReadClipboardResponse,
type ComputerSetCursorVisibilityResponse as ComputerSetCursorVisibilityResponse,
type ComputerBatchParams as ComputerBatchParams,
type ComputerCaptureScreenshotParams as ComputerCaptureScreenshotParams,
Expand All @@ -877,6 +898,7 @@ export declare namespace Browsers {
type ComputerScrollParams as ComputerScrollParams,
type ComputerSetCursorVisibilityParams as ComputerSetCursorVisibilityParams,
type ComputerTypeTextParams as ComputerTypeTextParams,
type ComputerWriteClipboardParams as ComputerWriteClipboardParams,
};

export {
Expand Down
69 changes: 69 additions & 0 deletions src/resources/browsers/computer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,19 @@ export class Computer extends APIResource {
});
}

/**
* Read text from the clipboard on the browser instance
*
* @example
* ```ts
* const response =
* await client.browsers.computer.readClipboard('id');
* ```
*/
readClipboard(id: string, options?: RequestOptions): APIPromise<ComputerReadClipboardResponse> {
return this._client.post(path`/browsers/${id}/computer/clipboard/read`, options);
}

/**
* Scroll the mouse wheel at a position on the host computer
*
Expand Down Expand Up @@ -194,6 +207,24 @@ export class Computer extends APIResource {
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
});
}

/**
* Write text to the clipboard on the browser instance
*
* @example
* ```ts
* await client.browsers.computer.writeClipboard('id', {
* text: 'text',
* });
* ```
*/
writeClipboard(id: string, body: ComputerWriteClipboardParams, options?: RequestOptions): APIPromise<void> {
return this._client.post(path`/browsers/${id}/computer/clipboard/write`, {
body,
...options,
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
});
}
}

export interface ComputerGetMousePositionResponse {
Expand All @@ -208,6 +239,13 @@ export interface ComputerGetMousePositionResponse {
y: number;
}

export interface ComputerReadClipboardResponse {
/**
* Current clipboard text content
*/
text: string;
}

/**
* Generic OK response.
*/
Expand Down Expand Up @@ -343,10 +381,21 @@ export namespace ComputerBatchParams {
*/
y: number;

/**
* Target total duration in milliseconds for the mouse movement when smooth=true.
* Omit for automatic timing based on distance.
*/
duration_ms?: number;

/**
* Modifier keys to hold during the move
*/
hold_keys?: Array<string>;

/**
* Use human-like Bezier curve path instead of instant mouse movement.
*/
smooth?: boolean;
}

export interface PressKey {
Expand Down Expand Up @@ -533,10 +582,21 @@ export interface ComputerMoveMouseParams {
*/
y: number;

/**
* Target total duration in milliseconds for the mouse movement when smooth=true.
* Omit for automatic timing based on distance.
*/
duration_ms?: number;

/**
* Modifier keys to hold during the move
*/
hold_keys?: Array<string>;

/**
* Use human-like Bezier curve path instead of instant mouse movement.
*/
smooth?: boolean;
}

export interface ComputerPressKeyParams {
Expand Down Expand Up @@ -606,9 +666,17 @@ export interface ComputerTypeTextParams {
delay?: number;
}

export interface ComputerWriteClipboardParams {
/**
* Text to write to the system clipboard
*/
text: string;
}

export declare namespace Computer {
export {
type ComputerGetMousePositionResponse as ComputerGetMousePositionResponse,
type ComputerReadClipboardResponse as ComputerReadClipboardResponse,
type ComputerSetCursorVisibilityResponse as ComputerSetCursorVisibilityResponse,
type ComputerBatchParams as ComputerBatchParams,
type ComputerCaptureScreenshotParams as ComputerCaptureScreenshotParams,
Expand All @@ -619,5 +687,6 @@ export declare namespace Computer {
type ComputerScrollParams as ComputerScrollParams,
type ComputerSetCursorVisibilityParams as ComputerSetCursorVisibilityParams,
type ComputerTypeTextParams as ComputerTypeTextParams,
type ComputerWriteClipboardParams as ComputerWriteClipboardParams,
};
}
3 changes: 3 additions & 0 deletions src/resources/browsers/fs/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ import { RequestOptions } from '../../../internal/request-options';
import { multipartFormRequestOptions } from '../../../internal/uploads';
import { path } from '../../../internal/utils/path';

/**
* Read, write, and manage files on the browser instance.
*/
export class Fs extends APIResource {
watch: WatchAPI.Watch = new WatchAPI.Watch(this._client);

Expand Down
3 changes: 3 additions & 0 deletions src/resources/browsers/fs/watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import { buildHeaders } from '../../../internal/headers';
import { RequestOptions } from '../../../internal/request-options';
import { path } from '../../../internal/utils/path';

/**
* Read, write, and manage files on the browser instance.
*/
export class Watch extends APIResource {
/**
* Stream filesystem events for a watch
Expand Down
2 changes: 2 additions & 0 deletions src/resources/browsers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export {
export {
Computer,
type ComputerGetMousePositionResponse,
type ComputerReadClipboardResponse,
type ComputerSetCursorVisibilityResponse,
type ComputerBatchParams,
type ComputerCaptureScreenshotParams,
Expand All @@ -32,6 +33,7 @@ export {
type ComputerScrollParams,
type ComputerSetCursorVisibilityParams,
type ComputerTypeTextParams,
type ComputerWriteClipboardParams,
} from './computer';
export {
Fs,
Expand Down
3 changes: 3 additions & 0 deletions src/resources/browsers/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import { buildHeaders } from '../../internal/headers';
import { RequestOptions } from '../../internal/request-options';
import { path } from '../../internal/utils/path';

/**
* Stream logs from the browser instance.
*/
export class Logs extends APIResource {
/**
* Stream log files on the browser instance via SSE
Expand Down
Loading