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.6.2"
".": "0.6.3"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 16
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-2aec229ccf91f7c1ac95aa675ea2a59bd61af9e363a22c3b49677992f1eeb16a.yml
openapi_spec_hash: c80cd5d52a79cd5366a76d4a825bd27a
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-ff8ccba8b5409eaa1128df9027582cb63f66e8accd75e511f70b7c27ef26c9ae.yml
openapi_spec_hash: 1dbacc339695a7c78718f90f791d3f01
config_hash: b8e1fff080fbaa22656ab0a57b591777
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.6.3 (2025-06-25)

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

### Features

* **api:** /browsers no longer requires invocation id ([8875d65](https://github.com/onkernel/kernel-node-sdk/commit/8875d65b89f6a1d8d79bf8b1463b0900247e89b3))

## 0.6.2 (2025-06-24)

Full Changelog: [v0.6.1...v0.6.2](https://github.com/onkernel/kernel-node-sdk/compare/v0.6.1...v0.6.2)
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.6.2",
"version": "0.6.3",
"description": "The official TypeScript library for the Kernel API",
"author": "Kernel <>",
"types": "dist/index.d.ts",
Expand Down
11 changes: 6 additions & 5 deletions src/resources/browsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ export class Browsers extends APIResource {
*
* @example
* ```ts
* const browser = await client.browsers.create({
* invocation_id: 'rr33xuugxj9h0bkf1rdt2bet',
* });
* const browser = await client.browsers.create();
* ```
*/
create(body: BrowserCreateParams, options?: RequestOptions): APIPromise<BrowserCreateResponse> {
create(
body: BrowserCreateParams | null | undefined = {},
options?: RequestOptions,
): APIPromise<BrowserCreateResponse> {
return this._client.post('/browsers', { body, ...options });
}

Expand Down Expand Up @@ -169,7 +170,7 @@ export interface BrowserCreateParams {
/**
* action invocation ID
*/
invocation_id: string;
invocation_id?: string;

/**
* Optional persistence configuration for the browser session.
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.6.2'; // x-release-please-version
export const VERSION = '0.6.3'; // x-release-please-version
22 changes: 14 additions & 8 deletions tests/api-resources/browsers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const client = new Kernel({

describe('resource browsers', () => {
// skipped: tests are disabled for the time being
test.skip('create: only required params', async () => {
const responsePromise = client.browsers.create({ invocation_id: 'rr33xuugxj9h0bkf1rdt2bet' });
test.skip('create', async () => {
const responsePromise = client.browsers.create();
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
Expand All @@ -21,12 +21,18 @@ describe('resource browsers', () => {
});

// skipped: tests are disabled for the time being
test.skip('create: required and optional params', async () => {
const response = await client.browsers.create({
invocation_id: 'rr33xuugxj9h0bkf1rdt2bet',
persistence: { id: 'my-awesome-browser-for-user-1234' },
stealth: true,
});
test.skip('create: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
client.browsers.create(
{
invocation_id: 'rr33xuugxj9h0bkf1rdt2bet',
persistence: { id: 'my-awesome-browser-for-user-1234' },
stealth: true,
},
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Kernel.NotFoundError);
});

// skipped: tests are disabled for the time being
Expand Down