From b5aa208786bf91940ba8e9efec4eaa34c2e9f547 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Jun 2026 18:59:17 +0000 Subject: [PATCH 1/4] feat: Add org-level default per-project concurrency cap --- .stats.yml | 8 +-- api.md | 14 ++++ src/client.ts | 5 ++ src/resources/index.ts | 1 + src/resources/organization.ts | 3 + src/resources/organization/index.ts | 4 ++ src/resources/organization/limits.ts | 71 +++++++++++++++++++ src/resources/organization/organization.ts | 20 ++++++ .../api-resources/organization/limits.test.ts | 34 +++++++++ 9 files changed, 156 insertions(+), 4 deletions(-) create mode 100644 src/resources/organization.ts create mode 100644 src/resources/organization/index.ts create mode 100644 src/resources/organization/limits.ts create mode 100644 src/resources/organization/organization.ts create mode 100644 tests/api-resources/organization/limits.test.ts diff --git a/.stats.yml b/.stats.yml index dcde96d..fc334e1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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-76f6c461ca9fd01958f3315a4f5d558ef80896c8aa0496e38caef55d4bd51dbd.yml +openapi_spec_hash: bb8124b6016b73022c52e6ef5b7220a4 +config_hash: 80eef1b592110714ea55cd26c470fabb diff --git a/api.md b/api.md index 1568486..79b9205 100644 --- a/api.md +++ b/api.md @@ -375,6 +375,20 @@ Methods: - client.projects.limits.retrieve(id) -> ProjectLimits - client.projects.limits.update(id, { ...params }) -> ProjectLimits +# Organization + +## Limits + +Types: + +- OrgLimits +- UpdateOrgLimitsRequest + +Methods: + +- client.organization.limits.retrieve() -> OrgLimits +- client.organization.limits.update({ ...params }) -> OrgLimits + # APIKeys Types: diff --git a/src/client.ts b/src/client.ts index cd979e3..a396c79 100644 --- a/src/client.ts +++ b/src/client.ts @@ -139,6 +139,7 @@ import { Profile, Tags, } from './resources/browsers/browsers'; +import { Organization } from './resources/organization/organization'; import { CreateProjectRequest, Project, @@ -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. */ @@ -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; @@ -1138,6 +1141,8 @@ export declare namespace Kernel { type ProjectListParams as ProjectListParams, }; + export { Organization as Organization }; + export { APIKeys as APIKeys, type APIKey as APIKey, diff --git a/src/resources/index.ts b/src/resources/index.ts index d92fde2..491319d 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -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, diff --git a/src/resources/organization.ts b/src/resources/organization.ts new file mode 100644 index 0000000..4e74c0d --- /dev/null +++ b/src/resources/organization.ts @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export * from './organization/index'; diff --git a/src/resources/organization/index.ts b/src/resources/organization/index.ts new file mode 100644 index 0000000..48c5622 --- /dev/null +++ b/src/resources/organization/index.ts @@ -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'; diff --git a/src/resources/organization/limits.ts b/src/resources/organization/limits.ts new file mode 100644 index 0000000..53f2f5c --- /dev/null +++ b/src/resources/organization/limits.ts @@ -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 { + 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 { + 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, + }; +} diff --git a/src/resources/organization/organization.ts b/src/resources/organization/organization.ts new file mode 100644 index 0000000..4f29b5b --- /dev/null +++ b/src/resources/organization/organization.ts @@ -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, + }; +} diff --git a/tests/api-resources/organization/limits.test.ts b/tests/api-resources/organization/limits.test.ts new file mode 100644 index 0000000..9fe090a --- /dev/null +++ b/tests/api-resources/organization/limits.test.ts @@ -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); + }); +}); From e7b4ea2ed10442723b5cb6812839a224336a85d9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Jun 2026 21:31:42 +0000 Subject: [PATCH 2/4] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index fc334e1..17293bf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 119 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-76f6c461ca9fd01958f3315a4f5d558ef80896c8aa0496e38caef55d4bd51dbd.yml -openapi_spec_hash: bb8124b6016b73022c52e6ef5b7220a4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-f9a96fe14f0b3c93230a26f9b64827a35a19a28d4e7cd2719315c4d76cce78fc.yml +openapi_spec_hash: 852e2a64b850f759ccbcf81b1579497a config_hash: 80eef1b592110714ea55cd26c470fabb From 608cb360a226f5968f253ea3ab928231f649c12e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 10 Jun 2026 20:41:49 +0000 Subject: [PATCH 3/4] feat: Support updating browser session name and tags via PATCH --- .stats.yml | 4 ++-- src/resources/browsers/browsers.ts | 21 ++++++++++++++++++--- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index 17293bf..5ad6924 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 119 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-f9a96fe14f0b3c93230a26f9b64827a35a19a28d4e7cd2719315c4d76cce78fc.yml -openapi_spec_hash: 852e2a64b850f759ccbcf81b1579497a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-e66c3f8aedccc39104386a3ec619f3fdcef7e8b00d9e5aa82e414a1b387351c2.yml +openapi_spec_hash: afeddf18ebc3da1521b3e6f6739411fa config_hash: 80eef1b592110714ea55cd26c470fabb diff --git a/src/resources/browsers/browsers.ts b/src/resources/browsers/browsers.ts index 3fb4c6e..26fdfe9 100644 --- a/src/resources/browsers/browsers.ts +++ b/src/resources/browsers/browsers.ts @@ -928,8 +928,8 @@ export interface BrowserCreateParams { /** * Optional human-readable name for the browser session, used to find it later in - * the dashboard. Must be unique among active sessions within the project. Set at - * creation time only. + * the dashboard. Must be unique among active sessions within the project. Can be + * changed later via PATCH /browsers/{id_or_name}. */ name?: string; @@ -961,7 +961,8 @@ export interface BrowserCreateParams { /** * Optional user-defined key-value tags for the browser session, used to find and - * group sessions later. Set at creation time only. Up to 50 pairs. + * group sessions later. Can be changed later via PATCH /browsers/{id_or_name}. Up + * to 50 pairs. */ tags?: Tags; @@ -1041,6 +1042,13 @@ export interface BrowserUpdateParams { */ disable_default_proxy?: boolean; + /** + * Human-readable name for the browser session. Omit to leave unchanged, set to an + * empty string to clear the name. When set, must be unique among active sessions + * within the project. + */ + name?: string | null; + /** * Profile to load into the browser session. Only allowed if the session does not * already have a profile loaded. @@ -1053,6 +1061,13 @@ export interface BrowserUpdateParams { */ proxy_id?: string | null; + /** + * User-defined key-value tags for the browser session. Omit to leave unchanged. + * Provide a map to replace the entire tag set (full replace, not a merge). Set to + * an empty object ({}) to clear all tags. Up to 50 pairs. + */ + tags?: Tags | null; + /** * Telemetry configuration. Omit, set to null, or set to an empty object ({}) to * leave the existing configuration unchanged. Set enabled to true to enable From ba1575fdd502377e3ccf93a0aba656116f496863 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 10 Jun 2026 20:42:18 +0000 Subject: [PATCH 4/4] release: 0.66.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 9 +++++++++ package.json | 2 +- src/version.ts | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 59cbd40..7b24d85 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.65.0" + ".": "0.66.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d9d0a7..f03865d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.66.0 (2026-06-10) + +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)) +* Support updating browser session name and tags via PATCH ([608cb36](https://github.com/kernel/kernel-node-sdk/commit/608cb360a226f5968f253ea3ab928231f649c12e)) + ## 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) diff --git a/package.json b/package.json index f25f479..76c2e9b 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/version.ts b/src/version.ts index 7ebe654..9826986 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.65.0'; // x-release-please-version +export const VERSION = '0.66.0'; // x-release-please-version