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.81.0"
".": "0.82.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 127
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-1dffe057847b596dd311ce4b6e0e8036126dce3e97d390636c9c8e6d2f4823e1.yml
openapi_spec_hash: c06336c199ee64c222ba3122deae9463
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-477bd1ff6f7053f2bd4687d7c5fc9a6a1d56a584be42f927abc6fc858ff35718.yml
openapi_spec_hash: 3bf4cc824f6497c4ad109abd3187eede
config_hash: 77ee715aa17061166f9a02b264a21b8d
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 0.82.0 (2026-07-23)

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

### Features

* Count project names by Unicode code point ([c8134ef](https://github.com/kernel/kernel-node-sdk/commit/c8134eff380d31547e87ee8b77aac5d3a47a5774))
* Stream profile downloads as tar archives ([cae7386](https://github.com/kernel/kernel-node-sdk/commit/cae7386b5177282c885527ad3a14a6c15a25128a))
* Use format-neutral profile download Accept header ([679c015](https://github.com/kernel/kernel-node-sdk/commit/679c015c3756034fc76a8261ca5c1c507e1f7ec0))

## 0.81.0 (2026-07-21)

Full Changelog: [v0.80.0...v0.81.0](https://github.com/kernel/kernel-node-sdk/compare/v0.80.0...v0.81.0)
Expand Down
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ Methods:
- <code title="patch /profiles/{id_or_name}">client.profiles.<a href="./src/resources/profiles.ts">update</a>(idOrName, { ...params }) -> Profile</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>
- <code title="get /profiles/{id_or_name}/download">client.profiles.<a href="./src/resources/profiles.ts">download</a>(idOrName, { ...params }) -> Response</code>

# Auth

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.81.0",
"version": "0.82.0",
"description": "The official TypeScript library for the Kernel API",
"author": "Kernel <>",
"types": "dist/index.d.ts",
Expand Down
9 changes: 8 additions & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,13 @@ import {
InvocationUpdateResponse,
Invocations,
} from './resources/invocations';
import { ProfileCreateParams, ProfileListParams, ProfileUpdateParams, Profiles } from './resources/profiles';
import {
ProfileCreateParams,
ProfileDownloadParams,
ProfileListParams,
ProfileUpdateParams,
Profiles,
} from './resources/profiles';
import {
Proxies,
ProxyCheckParams,
Expand Down Expand Up @@ -1126,6 +1132,7 @@ export declare namespace Kernel {
type ProfileCreateParams as ProfileCreateParams,
type ProfileUpdateParams as ProfileUpdateParams,
type ProfileListParams as ProfileListParams,
type ProfileDownloadParams as ProfileDownloadParams,
};

export { Auth as Auth };
Expand Down
1 change: 1 addition & 0 deletions src/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export {
type ProfileCreateParams,
type ProfileUpdateParams,
type ProfileListParams,
type ProfileDownloadParams,
} from './profiles';
export {
Projects,
Expand Down
21 changes: 19 additions & 2 deletions src/resources/profiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ export class Profiles extends APIResource {
}

/**
* Returns a zstd-compressed tar file of the full user-data directory.
* Downloads the profile in its stored format by default. Current profiles are
* returned as zstd-compressed tar archives, while legacy profiles remain JSON. Set
* `format=tar` to decompress current profiles during download; legacy profiles
* remain JSON.
*
* @example
* ```ts
Expand All @@ -110,8 +113,13 @@ export class Profiles extends APIResource {
* console.log(content);
* ```
*/
download(idOrName: string, options?: RequestOptions): APIPromise<Response> {
download(
idOrName: string,
query: ProfileDownloadParams | null | undefined = {},
options?: RequestOptions,
): APIPromise<Response> {
return this._client.get(path`/profiles/${idOrName}/download`, {
query,
...options,
headers: buildHeaders([{ Accept: 'application/octet-stream' }, options?.headers]),
__binaryResponse: true,
Expand Down Expand Up @@ -152,11 +160,20 @@ export interface ProfileListParams extends OffsetPaginationParams {
query?: string;
}

export interface ProfileDownloadParams {
/**
* Response format for current profile archives. Legacy profiles are always
* returned as JSON.
*/
format?: 'tar.zst' | 'tar';
}

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

Expand Down
8 changes: 4 additions & 4 deletions src/resources/projects/projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export type ProjectsOffsetPagination = OffsetPagination<Project>;

export interface CreateProjectRequest {
/**
* Project name (1-255 characters)
* Project name (1-255 Unicode code points)
*/
name: string;
}
Expand Down Expand Up @@ -125,7 +125,7 @@ export interface Project {

export interface UpdateProjectRequest {
/**
* New project name
* New project name (1-255 Unicode code points)
*/
name?: string;

Expand All @@ -137,14 +137,14 @@ export interface UpdateProjectRequest {

export interface ProjectCreateParams {
/**
* Project name (1-255 characters)
* Project name (1-255 Unicode code points)
*/
name: string;
}

export interface ProjectUpdateParams {
/**
* New project name
* New project name (1-255 Unicode code points)
*/
name?: string;

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.81.0'; // x-release-please-version
export const VERSION = '0.82.0'; // x-release-please-version
8 changes: 8 additions & 0 deletions tests/api-resources/profiles.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,12 @@ describe('resource profiles', () => {
expect(dataAndResponse.data).toBe(response);
expect(dataAndResponse.response).toBe(rawResponse);
});

// Mock server tests are disabled
test.skip('download: 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.download('id_or_name', { format: 'tar.zst' }, { path: '/_stainless_unknown_path' }),
).rejects.toThrow(Kernel.NotFoundError);
});
});
Loading