Skip to content

release: 0.9.1 #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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.9.0"
".": "0.9.1"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 31
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-e907afeabfeea49dedd783112ac3fd29267bc86f3d594f89ba9a2abf2bcbc9d8.yml
openapi_spec_hash: 060ca6288c1a09b6d1bdf207a0011165
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-b55c3e0424fa7733487139488b9fff00ad8949ff02ee3160ee36b9334e84b134.yml
openapi_spec_hash: 17f36677e3dc0a3aeb419654c8d5cae3
config_hash: f67e4b33b2fb30c1405ee2fff8096320
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 0.9.1 (2025-08-15)

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

### Features

* **api:** add browser timeouts ([a7cf6cd](https://github.com/onkernel/kernel-node-sdk/commit/a7cf6cdc4b35728bbdf85469d4212e90e5241b78))

### Chores

* **internal:** codegen related update ([0665717](https://github.com/onkernel/kernel-node-sdk/commit/0665717e9f8831133ccec9cb24e29a0db800c86f))
* **internal:** update comment in script ([c435fb5](https://github.com/onkernel/kernel-node-sdk/commit/c435fb5125da065d4a5d36777506a8924c7fb02e))
* update @stainless-api/prism-cli to v5.15.0 ([391384a](https://github.com/onkernel/kernel-node-sdk/commit/391384a0c5cc64b4bc4f4e8f717e11ae4cf7bce5))

## 0.9.0 (2025-08-08)

Full Changelog: [v0.8.3...v0.9.0](https://github.com/onkernel/kernel-node-sdk/compare/v0.8.3...v0.9.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.9.0",
"version": "0.9.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 scripts/mock
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}"

# Run prism mock on the given spec
if [ "$1" == "--daemon" ]; then
npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" &> .prism.log &
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &

# Wait for server to come online
echo -n "Waiting for server"
Expand All @@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then

echo
else
npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL"
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL"
fi
2 changes: 1 addition & 1 deletion scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ elif ! prism_is_running ; then
echo -e "To run the server, pass in the path or url of your OpenAPI"
echo -e "spec to the prism command:"
echo
echo -e " \$ ${YELLOW}npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock path/to/your.openapi.yml${NC}"
echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}"
echo

exit 1
Expand Down
67 changes: 67 additions & 0 deletions src/resources/browsers/browsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,31 @@ export interface BrowserCreateResponse {
*/
cdp_ws_url: string;

/**
* When the browser session was created.
*/
created_at: string;

/**
* Whether the browser session is running in headless mode.
*/
headless: boolean;

/**
* Unique identifier for the browser session
*/
session_id: string;

/**
* Whether the browser session is running in stealth mode.
*/
stealth: boolean;

/**
* The number of seconds of inactivity before the browser session is terminated.
*/
timeout_seconds: number;

/**
* Remote URL for live viewing the browser session. Only available for non-headless
* browsers.
Expand All @@ -152,11 +172,31 @@ export interface BrowserRetrieveResponse {
*/
cdp_ws_url: string;

/**
* When the browser session was created.
*/
created_at: string;

/**
* Whether the browser session is running in headless mode.
*/
headless: boolean;

/**
* Unique identifier for the browser session
*/
session_id: string;

/**
* Whether the browser session is running in stealth mode.
*/
stealth: boolean;

/**
* The number of seconds of inactivity before the browser session is terminated.
*/
timeout_seconds: number;

/**
* Remote URL for live viewing the browser session. Only available for non-headless
* browsers.
Expand All @@ -178,11 +218,31 @@ export namespace BrowserListResponse {
*/
cdp_ws_url: string;

/**
* When the browser session was created.
*/
created_at: string;

/**
* Whether the browser session is running in headless mode.
*/
headless: boolean;

/**
* Unique identifier for the browser session
*/
session_id: string;

/**
* Whether the browser session is running in stealth mode.
*/
stealth: boolean;

/**
* The number of seconds of inactivity before the browser session is terminated.
*/
timeout_seconds: number;

/**
* Remote URL for live viewing the browser session. Only available for non-headless
* browsers.
Expand Down Expand Up @@ -218,6 +278,13 @@ export interface BrowserCreateParams {
* mechanisms.
*/
stealth?: boolean;

/**
* The number of seconds of inactivity before the browser session is terminated.
* Only applicable to non-persistent browsers. Activity includes CDP connections
* and live view connections. Defaults to 60 seconds.
*/
timeout_seconds?: number;
}

export interface BrowserDeleteParams {
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.9.0'; // x-release-please-version
export const VERSION = '0.9.1'; // x-release-please-version
4 changes: 2 additions & 2 deletions tests/api-resources/apps.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const client = new Kernel({
});

describe('resource apps', () => {
// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('list', async () => {
const responsePromise = client.apps.list();
const rawResponse = await responsePromise.asResponse();
Expand All @@ -20,7 +20,7 @@ describe('resource apps', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('list: 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(
Expand Down
15 changes: 8 additions & 7 deletions tests/api-resources/browsers/browsers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const client = new Kernel({
});

describe('resource browsers', () => {
// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('create', async () => {
const responsePromise = client.browsers.create();
const rawResponse = await responsePromise.asResponse();
Expand All @@ -20,7 +20,7 @@ describe('resource browsers', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
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(
Expand All @@ -30,13 +30,14 @@ describe('resource browsers', () => {
invocation_id: 'rr33xuugxj9h0bkf1rdt2bet',
persistence: { id: 'my-awesome-browser-for-user-1234' },
stealth: true,
timeout_seconds: 0,
},
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Kernel.NotFoundError);
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('retrieve', async () => {
const responsePromise = client.browsers.retrieve('htzv5orfit78e1m2biiifpbv');
const rawResponse = await responsePromise.asResponse();
Expand All @@ -48,7 +49,7 @@ describe('resource browsers', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('list', async () => {
const responsePromise = client.browsers.list();
const rawResponse = await responsePromise.asResponse();
Expand All @@ -60,7 +61,7 @@ describe('resource browsers', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('delete: only required params', async () => {
const responsePromise = client.browsers.delete({ persistent_id: 'persistent_id' });
const rawResponse = await responsePromise.asResponse();
Expand All @@ -72,12 +73,12 @@ describe('resource browsers', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('delete: required and optional params', async () => {
const response = await client.browsers.delete({ persistent_id: 'persistent_id' });
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('deleteByID', async () => {
const responsePromise = client.browsers.deleteByID('htzv5orfit78e1m2biiifpbv');
const rawResponse = await responsePromise.asResponse();
Expand Down
35 changes: 17 additions & 18 deletions tests/api-resources/browsers/fs/fs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const client = new Kernel({
});

describe('resource fs', () => {
// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('createDirectory: only required params', async () => {
const responsePromise = client.browsers.fs.createDirectory('id', { path: '/J!' });
const rawResponse = await responsePromise.asResponse();
Expand All @@ -20,12 +20,12 @@ describe('resource fs', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('createDirectory: required and optional params', async () => {
const response = await client.browsers.fs.createDirectory('id', { path: '/J!', mode: '0611' });
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('deleteDirectory: only required params', async () => {
const responsePromise = client.browsers.fs.deleteDirectory('id', { path: '/J!' });
const rawResponse = await responsePromise.asResponse();
Expand All @@ -37,12 +37,12 @@ describe('resource fs', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('deleteDirectory: required and optional params', async () => {
const response = await client.browsers.fs.deleteDirectory('id', { path: '/J!' });
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('deleteFile: only required params', async () => {
const responsePromise = client.browsers.fs.deleteFile('id', { path: '/J!' });
const rawResponse = await responsePromise.asResponse();
Expand All @@ -54,12 +54,12 @@ describe('resource fs', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('deleteFile: required and optional params', async () => {
const response = await client.browsers.fs.deleteFile('id', { path: '/J!' });
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('fileInfo: only required params', async () => {
const responsePromise = client.browsers.fs.fileInfo('id', { path: '/J!' });
const rawResponse = await responsePromise.asResponse();
Expand All @@ -71,12 +71,12 @@ describe('resource fs', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('fileInfo: required and optional params', async () => {
const response = await client.browsers.fs.fileInfo('id', { path: '/J!' });
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('listFiles: only required params', async () => {
const responsePromise = client.browsers.fs.listFiles('id', { path: '/J!' });
const rawResponse = await responsePromise.asResponse();
Expand All @@ -88,12 +88,12 @@ describe('resource fs', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('listFiles: required and optional params', async () => {
const response = await client.browsers.fs.listFiles('id', { path: '/J!' });
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('move: only required params', async () => {
const responsePromise = client.browsers.fs.move('id', { dest_path: '/J!', src_path: '/J!' });
const rawResponse = await responsePromise.asResponse();
Expand All @@ -105,17 +105,16 @@ describe('resource fs', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('move: required and optional params', async () => {
const response = await client.browsers.fs.move('id', { dest_path: '/J!', src_path: '/J!' });
});

// skipped: tests are disabled for the time being
test.skip('readFile: required and optional params', async () => {
test('readFile: required and optional params', async () => {
const response = await client.browsers.fs.readFile('id', { path: '/J!' });
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('setFilePermissions: only required params', async () => {
const responsePromise = client.browsers.fs.setFilePermissions('id', { mode: '0611', path: '/J!' });
const rawResponse = await responsePromise.asResponse();
Expand All @@ -127,7 +126,7 @@ describe('resource fs', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('setFilePermissions: required and optional params', async () => {
const response = await client.browsers.fs.setFilePermissions('id', {
mode: '0611',
Expand All @@ -137,7 +136,7 @@ describe('resource fs', () => {
});
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('writeFile: only required params', async () => {
const responsePromise = client.browsers.fs.writeFile(
'id',
Expand All @@ -153,7 +152,7 @@ describe('resource fs', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// skipped: tests are disabled for the time being
// Prism tests are disabled
test.skip('writeFile: required and optional params', async () => {
const response = await client.browsers.fs.writeFile(
'id',
Expand Down
Loading