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.111.0"
".": "0.112.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 169
configured_endpoints: 172
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## [0.112.0](https://github.com/kernel/kernel-node-sdk/compare/v0.111.0...v0.112.0) (2026-09-24)


### Features

* Add profiles to browser pool acquire ([0b0f348](https://github.com/kernel/kernel-node-sdk/commit/0b0f348c33f9e9c372b31dbcfd19b505a26057ef))
* Correct monitor_disconnected description on computed state ([809b9c8](https://github.com/kernel/kernel-node-sdk/commit/809b9c8be2eb8919389bc5369e8a8a3cc5590182))
* Expose Search rollout access in org entitlements ([68ff158](https://github.com/kernel/kernel-node-sdk/commit/68ff158188ce06e5f7526a324217d945e1970cc3))
* Filter archived telemetry events by type ([dc46ab2](https://github.com/kernel/kernel-node-sdk/commit/dc46ab213c0333cd16510c789a3fc10cb4bc0383))
* Proxy custom WebMCP tools in the control plane ([44e5665](https://github.com/kernel/kernel-node-sdk/commit/44e5665b3edd75f94605cca72479e89029225b38))
* Publish iframe and worker browser target types ([3d555d7](https://github.com/kernel/kernel-node-sdk/commit/3d555d700e9854a2ec1d095d484d916abea4541e))
* Route browser destinations through selected proxies ([27108aa](https://github.com/kernel/kernel-node-sdk/commit/27108aa04eb3be3f307a696421e33c45071a5584))

## [0.111.0](https://github.com/kernel/kernel-node-sdk/compare/v0.110.0...v0.111.0) (2026-09-22)


Expand Down
37 changes: 27 additions & 10 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,19 +307,36 @@ Methods:

Types:

- <code><a href="./src/resources/browsers/webmcp.ts">InvocationFailure</a></code>
- <code><a href="./src/resources/browsers/webmcp.ts">InvocationResult</a></code>
- <code><a href="./src/resources/browsers/webmcp.ts">InvokeRequest</a></code>
- <code><a href="./src/resources/browsers/webmcp.ts">Tool</a></code>
- <code><a href="./src/resources/browsers/webmcp.ts">ToolAnnotations</a></code>
- <code><a href="./src/resources/browsers/webmcp.ts">ToolFrame</a></code>
- <code><a href="./src/resources/browsers/webmcp.ts">ToolSource</a></code>
- <code><a href="./src/resources/browsers/webmcp.ts">ToolsResponse</a></code>
- <code><a href="./src/resources/browsers/webmcp/webmcp.ts">CustomToolSource</a></code>
- <code><a href="./src/resources/browsers/webmcp/webmcp.ts">InvocationFailure</a></code>
- <code><a href="./src/resources/browsers/webmcp/webmcp.ts">InvocationResult</a></code>
- <code><a href="./src/resources/browsers/webmcp/webmcp.ts">InvokeRequest</a></code>
- <code><a href="./src/resources/browsers/webmcp/webmcp.ts">Tool</a></code>
- <code><a href="./src/resources/browsers/webmcp/webmcp.ts">ToolAnnotations</a></code>
- <code><a href="./src/resources/browsers/webmcp/webmcp.ts">ToolFrame</a></code>
- <code><a href="./src/resources/browsers/webmcp/webmcp.ts">ToolMetadata</a></code>
- <code><a href="./src/resources/browsers/webmcp/webmcp.ts">ToolSource</a></code>
- <code><a href="./src/resources/browsers/webmcp/webmcp.ts">ToolsResponse</a></code>

Methods:

- <code title="post /browsers/{id_or_name}/webmcp/invoke">client.browsers.webmcp.<a href="./src/resources/browsers/webmcp.ts">invokeTool</a>(idOrName, { ...params }) -> InvocationResult</code>
- <code title="get /browsers/{id_or_name}/webmcp/tools">client.browsers.webmcp.<a href="./src/resources/browsers/webmcp.ts">listTools</a>(idOrName) -> ToolsResponse</code>
- <code title="post /browsers/{id_or_name}/webmcp/invoke">client.browsers.webmcp.<a href="./src/resources/browsers/webmcp/webmcp.ts">invokeTool</a>(idOrName, { ...params }) -> InvocationResult</code>
- <code title="get /browsers/{id_or_name}/webmcp/tools">client.browsers.webmcp.<a href="./src/resources/browsers/webmcp/webmcp.ts">listTools</a>(idOrName, { ...params }) -> ToolsResponse</code>

### CustomTools

Types:

- <code><a href="./src/resources/browsers/webmcp/custom-tools.ts">AddRequest</a></code>
- <code><a href="./src/resources/browsers/webmcp/custom-tools.ts">CustomToolsResponse</a></code>
- <code><a href="./src/resources/browsers/webmcp/custom-tools.ts">Definition</a></code>
- <code><a href="./src/resources/browsers/webmcp/custom-tools.ts">Match</a></code>

Methods:

- <code title="get /browsers/{id_or_name}/webmcp/custom-tools">client.browsers.webmcp.customTools.<a href="./src/resources/browsers/webmcp/custom-tools.ts">list</a>(idOrName) -> CustomToolsResponse</code>
- <code title="post /browsers/{id_or_name}/webmcp/custom-tools">client.browsers.webmcp.customTools.<a href="./src/resources/browsers/webmcp/custom-tools.ts">add</a>(idOrName, { ...params }) -> CustomToolsResponse</code>
- <code title="delete /browsers/{id_or_name}/webmcp/custom-tools/{id}">client.browsers.webmcp.customTools.<a href="./src/resources/browsers/webmcp/custom-tools.ts">remove</a>(id, { ...params }) -> void</code>

# Profiles

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.111.0",
"version": "0.112.0",
"description": "The official TypeScript library for the Kernel API",
"author": "Kernel <>",
"types": "dist/index.d.ts",
Expand Down
10 changes: 9 additions & 1 deletion src/resources/browser-pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,13 @@ export interface BrowserPoolAcquireParams {
*/
name?: string;

/**
* Profile selection for the browser session. Provide either id or name. If
* specified, the matching profile will be loaded into the browser session.
* Profiles must be created beforehand.
*/
profile?: Shared.BrowserProfile;

/**
* Optional URL to navigate the acquired browser to. Overrides the pool's start_url
* for this acquire only. Best-effort: failures to navigate do not fail the
Expand Down Expand Up @@ -1200,7 +1207,8 @@ export interface BrowserPoolReleaseParams {
* Defaults to true. A reused browser keeps the configuration it was created with,
* so it does not pick up pool configuration changes made while it was in use.
* Release with `reuse: false`, or flush the pool afterward, to rebuild it with the
* current configuration.
* current configuration. Browsers loaded with an acquire-time profile are always
* destroyed and replaced, even when reuse is true.
*/
reuse?: boolean;
}
Expand Down
78 changes: 65 additions & 13 deletions src/resources/browsers/browsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,6 @@ import {
TelemetryStreamParams,
TelemetryStreamResponse,
} from './telemetry';
import * as WebmcpAPI from './webmcp';
import {
InvocationFailure,
InvocationResult,
InvokeRequest,
Tool,
ToolAnnotations,
ToolFrame,
ToolSource,
ToolsResponse,
Webmcp,
WebmcpInvokeToolParams,
} from './webmcp';
import * as FsAPI from './fs/fs';
import {
FCreateDirectoryParams,
Expand All @@ -140,6 +127,22 @@ import {
FWriteFileParams,
Fs,
} from './fs/fs';
import * as WebmcpAPI from './webmcp/webmcp';
import {
CustomToolSource,
InvocationFailure,
InvocationResult,
InvokeRequest,
Tool,
ToolAnnotations,
ToolFrame,
ToolMetadata,
ToolSource,
ToolsResponse,
Webmcp,
WebmcpInvokeToolParams,
WebmcpListToolsParams,
} from './webmcp/webmcp';
import { APIPromise } from '../../core/api-promise';
import { OffsetPagination, type OffsetPaginationParams, PagePromise } from '../../core/pagination';
import { type Uploadable } from '../../core/uploads';
Expand Down Expand Up @@ -375,6 +378,52 @@ export interface BrowserNetworkConfig {
* upstream-proxy and Kernel-managed direct egress and cannot reach into a VPN.
*/
private_hosts?: Array<string>;

/**
* Per-destination proxy routes for a browser session. After setup, a destination
* hostname is matched against every route's hosts, regardless of port; route order
* does not matter. An exact hostname beats a wildcard, and a longer wildcard
* suffix beats a shorter one (for a.b.example.com: "a.b.example.com" >
* "_.b.example.com" > "_.example.com"). A host pattern may appear in only one
* route. "\*.example.com" matches subdomains only, not example.com. A matched
* request selects the route's proxy instead of the session's top-level proxy
* (including mode: direct); the route proxy's own bypass_hosts still apply. If the
* route proxy becomes unavailable, matched requests fail closed without falling
* back. Requests that match no route use the session's default egress from the
* top-level proxy field (or the browser default when proxy is omitted: stealth
* proxy or direct egress). Routes take effect once the session is created;
* start_url and other traffic during browser setup use the top-level proxy.
* Setting routes requires proxy v3. Not supported on browser pools.
*/
proxy_routes?: Array<BrowserNetworkConfig.ProxyRoute>;
}

export namespace BrowserNetworkConfig {
export interface ProxyRoute {
/**
* Exact hostnames or leading \*. wildcard patterns (subdomains only); patterns
* cannot include ports, and matching ignores the destination port. Hosts not
* matched by any route use the session's top-level proxy (or the browser default
* when proxy is omitted).
*/
hosts: Array<string>;

/**
* Select an active non-direct proxy by ID or name. Responses always use ID.
*/
proxy: ProxyRoute.Proxy;
}

export namespace ProxyRoute {
/**
* Select an active non-direct proxy by ID or name. Responses always use ID.
*/
export interface Proxy {
id?: string;

name?: string;
}
}
}

/**
Expand Down Expand Up @@ -2019,14 +2068,17 @@ export declare namespace Browsers {

export {
Webmcp as Webmcp,
type CustomToolSource as CustomToolSource,
type InvocationFailure as InvocationFailure,
type InvocationResult as InvocationResult,
type InvokeRequest as InvokeRequest,
type Tool as Tool,
type ToolAnnotations as ToolAnnotations,
type ToolFrame as ToolFrame,
type ToolMetadata as ToolMetadata,
type ToolSource as ToolSource,
type ToolsResponse as ToolsResponse,
type WebmcpInvokeToolParams as WebmcpInvokeToolParams,
type WebmcpListToolsParams as WebmcpListToolsParams,
};
}
5 changes: 4 additions & 1 deletion src/resources/browsers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,16 @@ export {
} from './telemetry';
export {
Webmcp,
type CustomToolSource,
type InvocationFailure,
type InvocationResult,
type InvokeRequest,
type Tool,
type ToolAnnotations,
type ToolFrame,
type ToolMetadata,
type ToolSource,
type ToolsResponse,
type WebmcpInvokeToolParams,
} from './webmcp';
type WebmcpListToolsParams,
} from './webmcp/index';
73 changes: 56 additions & 17 deletions src/resources/browsers/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ export class Telemetry extends APIResource {
/**
* Reads a page of telemetry events for the browser session. To page through
* results, pass the X-Next-Offset value from the previous response as offset and
* repeat while X-Has-More is true. Returns an empty list when telemetry data is
* unavailable.
* repeat while X-Has-More is true. The category and type filters apply within each
* page, so a filtered page may be empty while X-Has-More is true. Returns an empty
* list when telemetry data is unavailable.
*
* @example
* ```ts
Expand Down Expand Up @@ -2979,7 +2980,14 @@ export interface BrowserEventContext {
/**
* CDP target type of the page that produced the event.
*/
target_type?: 'page' | 'background_page' | 'service_worker' | 'shared_worker' | 'other';
target_type?:
| 'page'
| 'iframe'
| 'worker'
| 'background_page'
| 'service_worker'
| 'shared_worker'
| 'other';

/**
* URL relevant to this event — page URL for navigation and page events, request
Expand Down Expand Up @@ -3283,8 +3291,12 @@ export namespace BrowserLiveViewDisconnectEvent {

/**
* The CDP connection to Chrome was lost. Telemetry events may be dropped until
* monitor_reconnected arrives. Treat any in-progress computed state (network_idle,
* page_layout_settled) as unreliable until then.
* monitor_reconnected arrives. In-progress computed state is discarded rather than
* paused, so computed events still pending for the current navigation
* (network_idle, page_layout_settled, page_navigation_settled) never fire.
* monitor_reconnected does not restore them. After reattachment a fresh state
* machine starts, so computed events can resume before the next navigation and
* carry empty navigation context until one occurs.
*/
export interface BrowserMonitorDisconnectedEvent {
category: 'monitor';
Expand Down Expand Up @@ -3769,7 +3781,14 @@ export namespace BrowserPageCrashedEvent {
/**
* CDP target type of the page that produced the event.
*/
target_type: 'page' | 'background_page' | 'service_worker' | 'shared_worker' | 'other';
target_type:
| 'page'
| 'iframe'
| 'worker'
| 'background_page'
| 'service_worker'
| 'shared_worker'
| 'other';

/**
* URL the page was on when its renderer process crashed.
Expand Down Expand Up @@ -4135,7 +4154,14 @@ export namespace BrowserPageNavigationEvent {
/**
* CDP target type of the page that produced the event.
*/
target_type?: 'page' | 'background_page' | 'service_worker' | 'shared_worker' | 'other';
target_type?:
| 'page'
| 'iframe'
| 'worker'
| 'background_page'
| 'service_worker'
| 'shared_worker'
| 'other';

/**
* URL navigated to.
Expand Down Expand Up @@ -4222,7 +4248,14 @@ export namespace BrowserPageTabOpenedEvent {
/**
* CDP target type of the page that produced the event.
*/
target_type?: 'page' | 'background_page' | 'service_worker' | 'shared_worker' | 'other';
target_type?:
| 'page'
| 'iframe'
| 'worker'
| 'background_page'
| 'service_worker'
| 'shared_worker'
| 'other';

/**
* Initial page title of the new tab.
Expand Down Expand Up @@ -4337,15 +4370,16 @@ export namespace BrowserProxyErrorEvent {
/**
* Proxy-layer error code: the X-Kernel-Proxy-Error response header value from a
* branded 5xx error page served by the metro egress host-proxy. Values mirror what
* the proxy emits: destination_blocked, provider_blacklisted,
* provider_unreachable, provider_rejected, origin_tls_timeout,
* origin_response_incomplete, proxy_unavailable, restricted_route_unavailable,
* upstream_timeout, upstream_dns_failure, upstream_connect_failed. A header value
* the browser image does not recognize is reported as unknown, with the header
* value in raw_code.
* the proxy emits: destination_blocked, destination_route_unavailable,
* provider_blacklisted, provider_unreachable, provider_rejected,
* origin_tls_timeout, origin_response_incomplete, proxy_unavailable,
* restricted_route_unavailable, upstream_timeout, upstream_dns_failure,
* upstream_connect_failed. A header value the browser image does not recognize is
* reported as unknown, with the header value in raw_code.
*/
code:
| 'destination_blocked'
| 'destination_route_unavailable'
| 'provider_blacklisted'
| 'provider_unreachable'
| 'provider_rejected'
Expand Down Expand Up @@ -4830,9 +4864,7 @@ export interface TelemetryEventsParams extends OffsetPaginationParams {
* Read direction. asc (default) reads oldest first, starting from since or the
* offset cursor. desc reads newest first: each request returns one page of up to
* limit records ending at the offset cursor (or until, or the newest archived
* event); combining desc with since is rejected with a 400. In either direction
* the category filter applies within the page, so a filtered page may be empty
* while X-Has-More is true.
* event); combining desc with since is rejected with a 400.
*/
order?: string;

Expand All @@ -4842,6 +4874,13 @@ export interface TelemetryEventsParams extends OffsetPaginationParams {
*/
since?: string;

/**
* Restrict results to these event types, such as page_crashed or
* captcha_challenge_result. Repeat the parameter for multiple values. Combines
* with category: when both are set an event must match both.
*/
type?: Array<string>;

/**
* End of the window (exclusive): an RFC-3339 timestamp, or a duration like 5m
* meaning that long ago.
Expand Down
Loading
Loading