diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3f0c280..b6d685d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.81.0" + ".": "0.82.0" } diff --git a/.stats.yml b/.stats.yml index c189c7a..c912225 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index bb2e596..b33dab0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/api.md b/api.md index f7950f3..d5d74e8 100644 --- a/api.md +++ b/api.md @@ -255,7 +255,7 @@ Methods: - client.profiles.update(idOrName, { ...params }) -> Profile - client.profiles.list({ ...params }) -> ProfilesOffsetPagination - client.profiles.delete(idOrName) -> void -- client.profiles.download(idOrName) -> Response +- client.profiles.download(idOrName, { ...params }) -> Response # Auth diff --git a/package.json b/package.json index 171dc84..17967d9 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/client.ts b/src/client.ts index 7dd7a57..1b9a833 100644 --- a/src/client.ts +++ b/src/client.ts @@ -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, @@ -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 }; diff --git a/src/resources/index.ts b/src/resources/index.ts index 797de87..8afbadf 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -125,6 +125,7 @@ export { type ProfileCreateParams, type ProfileUpdateParams, type ProfileListParams, + type ProfileDownloadParams, } from './profiles'; export { Projects, diff --git a/src/resources/profiles.ts b/src/resources/profiles.ts index 5254623..3249beb 100644 --- a/src/resources/profiles.ts +++ b/src/resources/profiles.ts @@ -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 @@ -110,8 +113,13 @@ export class Profiles extends APIResource { * console.log(content); * ``` */ - download(idOrName: string, options?: RequestOptions): APIPromise { + download( + idOrName: string, + query: ProfileDownloadParams | null | undefined = {}, + options?: RequestOptions, + ): APIPromise { return this._client.get(path`/profiles/${idOrName}/download`, { + query, ...options, headers: buildHeaders([{ Accept: 'application/octet-stream' }, options?.headers]), __binaryResponse: true, @@ -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, }; } diff --git a/src/resources/projects/projects.ts b/src/resources/projects/projects.ts index 9fbc1f4..0480b72 100644 --- a/src/resources/projects/projects.ts +++ b/src/resources/projects/projects.ts @@ -91,7 +91,7 @@ export type ProjectsOffsetPagination = OffsetPagination; export interface CreateProjectRequest { /** - * Project name (1-255 characters) + * Project name (1-255 Unicode code points) */ name: string; } @@ -125,7 +125,7 @@ export interface Project { export interface UpdateProjectRequest { /** - * New project name + * New project name (1-255 Unicode code points) */ name?: string; @@ -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; diff --git a/src/version.ts b/src/version.ts index 3446cca..79ea53a 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.81.0'; // x-release-please-version +export const VERSION = '0.82.0'; // x-release-please-version diff --git a/tests/api-resources/profiles.test.ts b/tests/api-resources/profiles.test.ts index 13ff21e..8544948 100644 --- a/tests/api-resources/profiles.test.ts +++ b/tests/api-resources/profiles.test.ts @@ -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); + }); });