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.0"
".": "0.6.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: 15
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-5d4e11bc46eeecee7363d56a9dfe946acee997d5b352c2b0a50c20e742c54d2d.yml
openapi_spec_hash: 333e53ad9c706296b9afdb8ff73bec8f
config_hash: 0fdf285ddd8dee229fd84ea57df9080f
configured_endpoints: 16
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-b019e469425a59061f37c5fdc7a131a5291c66134ef0627db4f06bb1f4af0b15.yml
openapi_spec_hash: f66a3c2efddb168db9539ba2507b10b8
config_hash: aae6721b2be9ec8565dfc8f7eadfe105
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.1 (2025-06-18)

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

### Features

* **api:** add delete_browsers endpoint ([1f1c4d8](https://github.com/onkernel/kernel-node-sdk/commit/1f1c4d8e8dbe85048bfe91081603538ccc716417))

## 0.6.0 (2025-06-18)

Full Changelog: [v0.5.0...v0.6.0](https://github.com/onkernel/kernel-node-sdk/compare/v0.5.0...v0.6.0)
Expand Down
1 change: 1 addition & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Methods:
- <code title="post /invocations">client.invocations.<a href="./src/resources/invocations.ts">create</a>({ ...params }) -> InvocationCreateResponse</code>
- <code title="get /invocations/{id}">client.invocations.<a href="./src/resources/invocations.ts">retrieve</a>(id) -> InvocationRetrieveResponse</code>
- <code title="patch /invocations/{id}">client.invocations.<a href="./src/resources/invocations.ts">update</a>(id, { ...params }) -> InvocationUpdateResponse</code>
- <code title="delete /invocations/{id}/browsers">client.invocations.<a href="./src/resources/invocations.ts">deleteBrowsers</a>(id) -> void</code>
- <code title="get /invocations/{id}/events">client.invocations.<a href="./src/resources/invocations.ts">follow</a>(id) -> InvocationFollowResponse</code>

# Browsers
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.0",
"version": "0.6.1",
"description": "The official TypeScript library for the Kernel API",
"author": "Kernel <>",
"types": "dist/index.d.ts",
Expand Down
15 changes: 15 additions & 0 deletions src/resources/invocations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,21 @@ export class Invocations extends APIResource {
return this._client.patch(path`/invocations/${id}`, { body, ...options });
}

/**
* Delete all browser sessions created within the specified invocation.
*
* @example
* ```ts
* await client.invocations.deleteBrowsers('id');
* ```
*/
deleteBrowsers(id: string, options?: RequestOptions): APIPromise<void> {
return this._client.delete(path`/invocations/${id}/browsers`, {
...options,
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
});
}

/**
* Establishes a Server-Sent Events (SSE) stream that delivers real-time logs and
* status updates for an invocation. The stream terminates automatically once the
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.0'; // x-release-please-version
export const VERSION = '0.6.1'; // x-release-please-version
12 changes: 12 additions & 0 deletions tests/api-resources/invocations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ describe('resource invocations', () => {
const response = await client.invocations.update('id', { status: 'succeeded', output: 'output' });
});

// skipped: tests are disabled for the time being
test.skip('deleteBrowsers', async () => {
const responsePromise = client.invocations.deleteBrowsers('id');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
expect(response).not.toBeInstanceOf(Response);
const dataAndResponse = await responsePromise.withResponse();
expect(dataAndResponse.data).toBe(response);
expect(dataAndResponse.response).toBe(rawResponse);
});

// skipped: currently no good way to test endpoints with content type text/event-stream, Prism mock server will fail
test.skip('follow', async () => {
const responsePromise = client.invocations.follow('id');
Expand Down