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.36.1"
".": "0.37.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 101
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-ea5c9cb25c29fa5a8758bbf8732eb306783bb6f13b4df29bf1ad5ad3cb32da1e.yml
openapi_spec_hash: 597031840469b011f5cf22a4d8b9d750
config_hash: 147340811dd6fbb9c2d80515a7e31f9a
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-fc4a441d80d9a26574ef8af390a0c76265f5d4190daf90a04b6b353b128bbd97.yml
openapi_spec_hash: 192987649d3797c3a80e6ef201667b64
config_hash: 8af430e19f4af86c05f2987241cae72f
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.37.0 (2026-02-23)

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

### Features

* Neil/kernel 1017 profile pagination query parameter ([5f46e36](https://github.com/kernel/kernel-node-sdk/commit/5f46e36d3b1f48fcaeaa346acc8fd080dafb1830))

## 0.36.1 (2026-02-21)

Full Changelog: [v0.36.0...v0.36.1](https://github.com/kernel/kernel-node-sdk/compare/v0.36.0...v0.36.1)
Expand Down
6 changes: 1 addition & 5 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,11 @@ Methods:

# Profiles

Types:

- <code><a href="./src/resources/profiles.ts">ProfileListResponse</a></code>

Methods:

- <code title="post /profiles">client.profiles.<a href="./src/resources/profiles.ts">create</a>({ ...params }) -> Profile</code>
- <code title="get /profiles/{id_or_name}">client.profiles.<a href="./src/resources/profiles.ts">retrieve</a>(idOrName) -> Profile</code>
- <code title="get /profiles">client.profiles.<a href="./src/resources/profiles.ts">list</a>() -> ProfileListResponse</code>
- <code title="get /profiles">client.profiles.<a href="./src/resources/profiles.ts">list</a>({ ...params }) -> ProfilesOffsetPagination</code>
- <code title="delete /profiles/{id_or_name}">client.profiles.<a href="./src/resources/profiles.ts">delete</a>(idOrName) -> void</code>
- <code title="get /profiles/{id_or_name}/download">client.profiles.<a href="./src/resources/profiles.ts">download</a>(idOrName) -> Response</code>

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.36.1",
"version": "0.37.0",
"description": "The official TypeScript library for the Kernel API",
"author": "Kernel <>",
"types": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ import {
InvocationUpdateResponse,
Invocations,
} from './resources/invocations';
import { ProfileCreateParams, ProfileListResponse, Profiles } from './resources/profiles';
import { ProfileCreateParams, ProfileListParams, Profiles } from './resources/profiles';
import {
Proxies,
ProxyCheckResponse,
Expand Down Expand Up @@ -985,8 +985,8 @@ export declare namespace Kernel {

export {
Profiles as Profiles,
type ProfileListResponse as ProfileListResponse,
type ProfileCreateParams as ProfileCreateParams,
type ProfileListParams as ProfileListParams,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing ProfilesOffsetPagination export from client.ts

Low Severity

ProfilesOffsetPagination is not imported or re-exported from client.ts, unlike every other pagination type in the SDK. BrowserListResponsesOffsetPagination and InvocationListResponsesOffsetPagination are all imported into client.ts and re-exported from the Kernel namespace, but ProfilesOffsetPagination is missing from both the import on line 91 and the Profiles export block. SDK consumers accessing types through the main Kernel namespace won't be able to reference this pagination type.

Additional Locations (1)

Fix in Cursor Fix in Web

};

export { Auth as Auth };
Expand Down
2 changes: 2 additions & 0 deletions src/resources/browsers/browsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ export class Browsers extends APIResource {

export type BrowserListResponsesOffsetPagination = OffsetPagination<BrowserListResponse>;

export type ProfilesOffsetPagination = OffsetPagination<Profile>;

/**
* @deprecated DEPRECATED: Use timeout_seconds (up to 72 hours) and Profiles
* instead.
Expand Down
1 change: 1 addition & 0 deletions src/resources/browsers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export {
type BrowserListParams,
type BrowserDeleteParams,
type BrowserLoadExtensionsParams,
type ProfilesOffsetPagination,
type BrowserListResponsesOffsetPagination,
} from './browsers';
export {
Expand Down
3 changes: 2 additions & 1 deletion src/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export {
type BrowserListParams,
type BrowserDeleteParams,
type BrowserLoadExtensionsParams,
type ProfilesOffsetPagination,
type BrowserListResponsesOffsetPagination,
} from './browsers/browsers';
export {
Expand Down Expand Up @@ -92,7 +93,7 @@ export {
type InvocationFollowParams,
type InvocationListResponsesOffsetPagination,
} from './invocations';
export { Profiles, type ProfileListResponse, type ProfileCreateParams } from './profiles';
export { Profiles, type ProfileCreateParams, type ProfileListParams } from './profiles';
export {
Proxies,
type ProxyCreateResponse,
Expand Down
22 changes: 17 additions & 5 deletions src/resources/profiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

import { APIResource } from '../core/resource';
import * as BrowsersAPI from './browsers/browsers';
import { ProfilesOffsetPagination } from './browsers/browsers';
import { APIPromise } from '../core/api-promise';
import { OffsetPagination, type OffsetPaginationParams, PagePromise } from '../core/pagination';
import { buildHeaders } from '../internal/headers';
import { RequestOptions } from '../internal/request-options';
import { path } from '../internal/utils/path';
Expand All @@ -26,8 +28,11 @@ export class Profiles extends APIResource {
/**
* List profiles with optional filtering and pagination.
*/
list(options?: RequestOptions): APIPromise<ProfileListResponse> {
return this._client.get('/profiles', options);
list(
query: ProfileListParams | null | undefined = {},
options?: RequestOptions,
): PagePromise<ProfilesOffsetPagination, BrowsersAPI.Profile> {
return this._client.getAPIList('/profiles', OffsetPagination<BrowsersAPI.Profile>, { query, ...options });
}

/**
Expand All @@ -53,15 +58,22 @@ export class Profiles extends APIResource {
}
}

export type ProfileListResponse = Array<BrowsersAPI.Profile>;

export interface ProfileCreateParams {
/**
* Optional name of the profile. Must be unique within the organization.
*/
name?: string;
}

export interface ProfileListParams extends OffsetPaginationParams {
/**
* Search profiles by name or ID.
*/
query?: string;
}

export declare namespace Profiles {
export { type ProfileListResponse as ProfileListResponse, type ProfileCreateParams as ProfileCreateParams };
export { type ProfileCreateParams as ProfileCreateParams, type ProfileListParams as ProfileListParams };
}

export { type ProfilesOffsetPagination };
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.36.1'; // x-release-please-version
export const VERSION = '0.37.0'; // x-release-please-version
15 changes: 15 additions & 0 deletions tests/api-resources/profiles.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,21 @@ describe('resource profiles', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// Mock server 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(
client.profiles.list(
{
limit: 1,
offset: 0,
query: 'query',
},
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Kernel.NotFoundError);
});

// Mock server tests are disabled
test.skip('delete', async () => {
const responsePromise = client.profiles.delete('id_or_name');
Expand Down