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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/kernel-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up Node
uses: actions/setup-node@v4
Expand All @@ -41,7 +41,7 @@ jobs:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up Node
uses: actions/setup-node@v4
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/kernel-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up Node
uses: actions/setup-node@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up Node
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: github.repository == 'kernel/kernel-node-sdk' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Check release environment
run: |
Expand Down
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 91
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-4f5307643555b7917e8681b1966ae0b99f770cf59805e2f917ec7528edf11ba8.yml
openapi_spec_hash: 873a9aa3a88b6cec1ad94f848eeb1c45
config_hash: 20337f7888852c165d099faa7589c90a
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-fc2c80b398a8dd511010ae7cda5e21c353e388ee130aa288974b47af4208b5b8.yml
openapi_spec_hash: 5e06586dbbb9fce12b907f4e32497006
config_hash: cc7fdd701d995d4b3456d77041c604cf
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## 0.26.0 (2026-01-17)

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

### Features

* Auth agents auth check URL ([7c75e74](https://github.com/kernel/kernel-node-sdk/commit/7c75e7439229cb1a699d0eb25fd830ed72053fda))


### Bug Fixes

* **stainless:** use @onkernel/sdk package name for TypeScript SDK ([0cf8ce1](https://github.com/kernel/kernel-node-sdk/commit/0cf8ce1528ace2106d2dd4f80cf7722aa871409a))


### Chores

* **internal:** update `actions/checkout` version ([1ddf4de](https://github.com/kernel/kernel-node-sdk/commit/1ddf4de47a73022e392459109d17d25f80f38db9))

## 0.26.0 (2026-01-16)

Full Changelog: [v0.24.0...v0.26.0](https://github.com/kernel/kernel-node-sdk/compare/v0.24.0...v0.26.0)
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ $ cd kernel-node-sdk
# With yarn
$ yarn link
$ cd ../my-package
$ yarn link @kernel/sdk
$ yarn link @onkernel/sdk

# With pnpm
$ pnpm link --global
$ cd ../my-package
$ pnpm link -—global @kernel/sdk
$ pnpm link -—global @onkernel/sdk
```

## Running tests
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Kernel TypeScript API Library

[![NPM version](<https://img.shields.io/npm/v/@kernel/sdk.svg?label=npm%20(stable)>)](https://npmjs.org/package/@kernel/sdk) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@kernel/sdk)
[![NPM version](<https://img.shields.io/npm/v/@onkernel/sdk.svg?label=npm%20(stable)>)](https://npmjs.org/package/@onkernel/sdk) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@onkernel/sdk)

This library provides convenient access to the Kernel REST API from server-side TypeScript or JavaScript.

The REST API documentation can be found on [docs.onkernel.com](https://www.kernel.sh/docs/api-reference). The full API of this library can be found in [api.md](api.md).
The REST API documentation can be found on [kernel.sh](https://kernel.sh/docs). The full API of this library can be found in [api.md](api.md).

It is generated with [Stainless](https://www.stainless.com/).

## Installation

```sh
npm install @kernel/sdk
npm install @onkernel/sdk
```

## Usage
Expand All @@ -20,7 +20,7 @@ The full API of this library can be found in [api.md](api.md).

<!-- prettier-ignore -->
```js
import Kernel from '@kernel/sdk';
import Kernel from '@onkernel/sdk';

const client = new Kernel({
apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
Expand All @@ -38,7 +38,7 @@ This library includes TypeScript definitions for all request params and response

<!-- prettier-ignore -->
```ts
import Kernel from '@kernel/sdk';
import Kernel from '@onkernel/sdk';

const client = new Kernel({
apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
Expand All @@ -62,7 +62,7 @@ Request parameters that correspond to file uploads can be passed in many differe

```ts
import fs from 'fs';
import Kernel, { toFile } from '@kernel/sdk';
import Kernel, { toFile } from '@onkernel/sdk';

const client = new Kernel();

Expand Down Expand Up @@ -227,7 +227,7 @@ The log level can be configured in two ways:
2. Using the `logLevel` client option (overrides the environment variable if set)

```ts
import Kernel from '@kernel/sdk';
import Kernel from '@onkernel/sdk';

const client = new Kernel({
logLevel: 'debug', // Show all log messages
Expand Down Expand Up @@ -255,7 +255,7 @@ When providing a custom logger, the `logLevel` option still controls which messa
below the configured level will not be sent to your logger.

```ts
import Kernel from '@kernel/sdk';
import Kernel from '@onkernel/sdk';
import pino from 'pino';

const logger = pino();
Expand Down Expand Up @@ -324,7 +324,7 @@ globalThis.fetch = fetch;
Or pass it to the client:

```ts
import Kernel from '@kernel/sdk';
import Kernel from '@onkernel/sdk';
import fetch from 'my-fetch';

const client = new Kernel({ fetch });
Expand All @@ -335,7 +335,7 @@ const client = new Kernel({ fetch });
If you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)

```ts
import Kernel from '@kernel/sdk';
import Kernel from '@onkernel/sdk';

const client = new Kernel({
fetchOptions: {
Expand All @@ -352,7 +352,7 @@ options to requests:
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg" align="top" width="18" height="21"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>

```ts
import Kernel from '@kernel/sdk';
import Kernel from '@onkernel/sdk';
import * as undici from 'undici';

const proxyAgent = new undici.ProxyAgent('http://localhost:8888');
Expand All @@ -366,7 +366,7 @@ const client = new Kernel({
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg" align="top" width="18" height="21"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>

```ts
import Kernel from '@kernel/sdk';
import Kernel from '@onkernel/sdk';

const client = new Kernel({
fetchOptions: {
Expand All @@ -378,7 +378,7 @@ const client = new Kernel({
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg" align="top" width="18" height="21"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>

```ts
import Kernel from 'npm:@kernel/sdk';
import Kernel from 'npm:@onkernel/sdk';

const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });
const client = new Kernel({
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default tseslint.config(
{
patterns: [
{
regex: '^@kernel/sdk(/.*)?',
regex: '^@onkernel/sdk(/.*)?',
message: 'Use a relative import, not a package import.',
},
],
Expand Down
4 changes: 2 additions & 2 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const config: JestConfigWithTsJest = {
'^.+\\.(t|j)sx?$': ['@swc/jest', { sourceMaps: 'inline' }],
},
moduleNameMapper: {
'^@kernel/sdk$': '<rootDir>/src/index.ts',
'^@kernel/sdk/(.*)$': '<rootDir>/src/$1',
'^@onkernel/sdk$': '<rootDir>/src/index.ts',
'^@onkernel/sdk/(.*)$': '<rootDir>/src/$1',
},
modulePathIgnorePatterns: [
'<rootDir>/ecosystem-tests/',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@kernel/sdk",
"name": "@onkernel/sdk",
"version": "0.26.0",
"description": "The official TypeScript library for the Kernel API",
"author": "Kernel <>",
Expand Down
6 changes: 3 additions & 3 deletions scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ node scripts/utils/check-version.cjs

# Build into dist and will publish the package from there,
# so that src/resources/foo.ts becomes <package root>/resources/foo.js
# This way importing from `"@kernel/sdk/resources/foo"` works
# This way importing from `"@onkernel/sdk/resources/foo"` works
# even with `"moduleResolution": "node"`

rm -rf dist; mkdir dist
Expand Down Expand Up @@ -42,8 +42,8 @@ node scripts/utils/postprocess-files.cjs

# make sure that nothing crashes when we require the output CJS or
# import the output ESM
(cd dist && node -e 'require("@kernel/sdk")')
(cd dist && node -e 'import("@kernel/sdk")' --input-type=module)
(cd dist && node -e 'require("@onkernel/sdk")')
(cd dist && node -e 'import("@onkernel/sdk")' --input-type=module)

if [ -e ./scripts/build-deno ]
then
Expand Down
6 changes: 6 additions & 0 deletions src/resources/agents/auth/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,12 @@ export interface AuthAgent {
* When the last authentication check was performed
*/
last_auth_check_at?: string;

/**
* URL where the browser landed after successful login. Query parameters and
* fragments are stripped for privacy.
*/
post_login_url?: string;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/agents/auth/auth.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import Kernel from '@kernel/sdk';
import Kernel from '@onkernel/sdk';

const client = new Kernel({
apiKey: 'My API Key',
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/agents/auth/invocations.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import Kernel from '@kernel/sdk';
import Kernel from '@onkernel/sdk';

const client = new Kernel({
apiKey: 'My API Key',
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/apps.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import Kernel from '@kernel/sdk';
import Kernel from '@onkernel/sdk';

const client = new Kernel({
apiKey: 'My API Key',
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/browser-pools.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import Kernel from '@kernel/sdk';
import Kernel from '@onkernel/sdk';

const client = new Kernel({
apiKey: 'My API Key',
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/browsers/browsers.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import Kernel, { toFile } from '@kernel/sdk';
import Kernel, { toFile } from '@onkernel/sdk';

const client = new Kernel({
apiKey: 'My API Key',
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/browsers/computer.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import Kernel from '@kernel/sdk';
import Kernel from '@onkernel/sdk';

const client = new Kernel({
apiKey: 'My API Key',
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/browsers/fs/fs.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import Kernel, { toFile } from '@kernel/sdk';
import Kernel, { toFile } from '@onkernel/sdk';

const client = new Kernel({
apiKey: 'My API Key',
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/browsers/fs/watch.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import Kernel from '@kernel/sdk';
import Kernel from '@onkernel/sdk';

const client = new Kernel({
apiKey: 'My API Key',
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/browsers/logs.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import Kernel from '@kernel/sdk';
import Kernel from '@onkernel/sdk';

const client = new Kernel({
apiKey: 'My API Key',
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/browsers/playwright.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import Kernel from '@kernel/sdk';
import Kernel from '@onkernel/sdk';

const client = new Kernel({
apiKey: 'My API Key',
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/browsers/process.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import Kernel from '@kernel/sdk';
import Kernel from '@onkernel/sdk';

const client = new Kernel({
apiKey: 'My API Key',
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/browsers/replays.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import Kernel from '@kernel/sdk';
import Kernel from '@onkernel/sdk';

const client = new Kernel({
apiKey: 'My API Key',
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/credentials.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import Kernel from '@kernel/sdk';
import Kernel from '@onkernel/sdk';

const client = new Kernel({
apiKey: 'My API Key',
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/deployments.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import Kernel from '@kernel/sdk';
import Kernel from '@onkernel/sdk';

const client = new Kernel({
apiKey: 'My API Key',
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/extensions.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import Kernel, { toFile } from '@kernel/sdk';
import Kernel, { toFile } from '@onkernel/sdk';

const client = new Kernel({
apiKey: 'My API Key',
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/invocations.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import Kernel from '@kernel/sdk';
import Kernel from '@onkernel/sdk';

const client = new Kernel({
apiKey: 'My API Key',
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/profiles.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import Kernel from '@kernel/sdk';
import Kernel from '@onkernel/sdk';

const client = new Kernel({
apiKey: 'My API Key',
Expand Down
Loading