Skip to content
Open
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.65.0"
".": "0.66.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 117
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-08c2d6a44f4cdcbfb6803a3043fdc1a3e33911dec4652cb3a870f01bc584421f.yml
openapi_spec_hash: c816491451347eb93b793cddf6a78648
config_hash: 9e45c27425021d49b5391f5cc980b046
configured_endpoints: 119
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-f9a96fe14f0b3c93230a26f9b64827a35a19a28d4e7cd2719315c4d76cce78fc.yml
openapi_spec_hash: 852e2a64b850f759ccbcf81b1579497a
config_hash: 80eef1b592110714ea55cd26c470fabb
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.66.0 (2026-06-09)

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

### Features

* Add org-level default per-project concurrency cap ([b5aa208](https://github.com/kernel/kernel-node-sdk/commit/b5aa208786bf91940ba8e9efec4eaa34c2e9f547))

## 0.65.0 (2026-06-08)

Full Changelog: [v0.64.0...v0.65.0](https://github.com/kernel/kernel-node-sdk/compare/v0.64.0...v0.65.0)
Expand Down
14 changes: 14 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,20 @@ Methods:
- <code title="get /org/projects/{id}/limits">client.projects.limits.<a href="./src/resources/projects/limits.ts">retrieve</a>(id) -> ProjectLimits</code>
- <code title="patch /org/projects/{id}/limits">client.projects.limits.<a href="./src/resources/projects/limits.ts">update</a>(id, { ...params }) -> ProjectLimits</code>

# Organization

## Limits

Types:

- <code><a href="./src/resources/organization/limits.ts">OrgLimits</a></code>
- <code><a href="./src/resources/organization/limits.ts">UpdateOrgLimitsRequest</a></code>

Methods:

- <code title="get /org/limits">client.organization.limits.<a href="./src/resources/organization/limits.ts">retrieve</a>() -> OrgLimits</code>
- <code title="patch /org/limits">client.organization.limits.<a href="./src/resources/organization/limits.ts">update</a>({ ...params }) -> OrgLimits</code>

# APIKeys

Types:
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.65.0",
"version": "0.66.0",
"description": "The official TypeScript library for the Kernel API",
"author": "Kernel <>",
"types": "dist/index.d.ts",
Expand Down
5 changes: 5 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ import {
Profile,
Tags,
} from './resources/browsers/browsers';
import { Organization } from './resources/organization/organization';
import {
CreateProjectRequest,
Project,
Expand Down Expand Up @@ -983,6 +984,7 @@ export class Kernel {
* Create and manage projects for resource isolation within an organization.
*/
projects: API.Projects = new API.Projects(this);
organization: API.Organization = new API.Organization(this);
/**
* Create and manage API keys for organization and project-scoped access.
*/
Expand All @@ -1004,6 +1006,7 @@ Kernel.Extensions = Extensions;
Kernel.BrowserPools = BrowserPools;
Kernel.Credentials = Credentials;
Kernel.Projects = Projects;
Kernel.Organization = Organization;
Kernel.APIKeys = APIKeys;
Kernel.CredentialProviders = CredentialProviders;

Expand Down Expand Up @@ -1138,6 +1141,8 @@ export declare namespace Kernel {
type ProjectListParams as ProjectListParams,
};

export { Organization as Organization };

export {
APIKeys as APIKeys,
type APIKey as APIKey,
Expand Down
1 change: 1 addition & 0 deletions src/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ export {
type InvocationFollowParams,
type InvocationListResponsesOffsetPagination,
} from './invocations';
export { Organization } from './organization/organization';
export { Profiles, type ProfileCreateParams, type ProfileListParams } from './profiles';
export {
Projects,
Expand Down
3 changes: 3 additions & 0 deletions src/resources/organization.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export * from './organization/index';
4 changes: 4 additions & 0 deletions src/resources/organization/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export { Limits, type OrgLimits, type UpdateOrgLimitsRequest, type LimitUpdateParams } from './limits';
export { Organization } from './organization';
71 changes: 71 additions & 0 deletions src/resources/organization/limits.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import { APIResource } from '../../core/resource';
import { APIPromise } from '../../core/api-promise';
import { RequestOptions } from '../../internal/request-options';

/**
* Read and manage organization-level limits.
*/
export class Limits extends APIResource {
/**
* Get the organization's concurrent session ceiling and the default per-project
* concurrency cap applied to projects without an explicit override.
*/
retrieve(options?: RequestOptions): APIPromise<OrgLimits> {
return this._client.get('/org/limits', options);
}

/**
* Set the default per-project concurrency cap applied to projects without an
* explicit override. Set the value to 0 to remove the default; omit to leave it
* unchanged. The default cannot exceed the organization's concurrent session
* ceiling.
*/
update(body: LimitUpdateParams, options?: RequestOptions): APIPromise<OrgLimits> {
return this._client.patch('/org/limits', { body, ...options });
}
}

export interface OrgLimits {
/**
* Default maximum concurrent browser sessions applied to every project that has no
* explicit per-project override. Null means no org-level default, so such projects
* are uncapped (only the org-wide limit applies). Applies to existing and newly
* created projects.
*/
default_project_max_concurrent_sessions?: number | null;

/**
* The organization's effective concurrent browser session ceiling, from its plan
* or an override. Read-only and shared across all projects in the org; a
* per-project default cannot exceed it.
*/
max_concurrent_sessions?: number;
}

export interface UpdateOrgLimitsRequest {
/**
* Default maximum concurrent browser sessions for projects without an explicit
* override. Set to 0 to remove the default; omit to leave unchanged. Cannot exceed
* the organization's concurrent session ceiling.
*/
default_project_max_concurrent_sessions?: number | null;
}

export interface LimitUpdateParams {
/**
* Default maximum concurrent browser sessions for projects without an explicit
* override. Set to 0 to remove the default; omit to leave unchanged. Cannot exceed
* the organization's concurrent session ceiling.
*/
default_project_max_concurrent_sessions?: number | null;
}

export declare namespace Limits {
export {
type OrgLimits as OrgLimits,
type UpdateOrgLimitsRequest as UpdateOrgLimitsRequest,
type LimitUpdateParams as LimitUpdateParams,
};
}
20 changes: 20 additions & 0 deletions src/resources/organization/organization.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import { APIResource } from '../../core/resource';
import * as LimitsAPI from './limits';
import { LimitUpdateParams, Limits, OrgLimits, UpdateOrgLimitsRequest } from './limits';

export class Organization extends APIResource {
limits: LimitsAPI.Limits = new LimitsAPI.Limits(this._client);
}

Organization.Limits = Limits;

export declare namespace Organization {
export {
Limits as Limits,
type OrgLimits as OrgLimits,
type UpdateOrgLimitsRequest as UpdateOrgLimitsRequest,
type LimitUpdateParams as LimitUpdateParams,
};
}
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.65.0'; // x-release-please-version
export const VERSION = '0.66.0'; // x-release-please-version
34 changes: 34 additions & 0 deletions tests/api-resources/organization/limits.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import Kernel from '@onkernel/sdk';

const client = new Kernel({
apiKey: 'My API Key',
baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
});

describe('resource limits', () => {
// Mock server tests are disabled
test.skip('retrieve', async () => {
const responsePromise = client.organization.limits.retrieve();
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);
});

// Mock server tests are disabled
test.skip('update', async () => {
const responsePromise = client.organization.limits.update({});
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);
});
});
Loading