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.91.0"
".": "0.92.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 139
configured_endpoints: 140
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [0.92.0](https://github.com/kernel/kernel-node-sdk/compare/v0.91.0...v0.92.0) (2026-08-17)


### Features

* chore(stlc): seal custom-code tracking files ([dddaa2a](https://github.com/kernel/kernel-node-sdk/commit/dddaa2aaabe3e31c71ed960ab0b117c452b657a6))

## [0.91.0](https://github.com/kernel/kernel-node-sdk/compare/v0.90.0...v0.91.0) (2026-08-14)


Expand Down
10 changes: 10 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,16 @@ Methods:

# Organization

## Entitlements

Types:

- <code><a href="./src/resources/organization/entitlements.ts">OrgEntitlements</a></code>

Methods:

- <code title="get /org/entitlements">client.organization.entitlements.<a href="./src/resources/organization/entitlements.ts">retrieve</a>() -> OrgEntitlements</code>

## Limits

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.91.0",
"version": "0.92.0",
"description": "The official TypeScript library for the Kernel API",
"author": "Kernel <>",
"types": "dist/index.d.ts",
Expand Down
234 changes: 234 additions & 0 deletions src/resources/organization/entitlements.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
// 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 Entitlements extends APIResource {
/**
* Get the authenticated organization's effective feature access and constraints
* after applying its plan, active trial treatment, plan status, and
* organization-specific overrides. Null constraint values mean unlimited.
*/
retrieve(options?: RequestOptions): APIPromise<OrgEntitlements> {
return this._client.get('/org/entitlements', options);
}
}

/**
* Effective feature access and constraints for the authenticated organization.
* Values already include trial treatment, plan status, and organization-specific
* overrides; consumers should use these resolved values instead of comparing plan
* IDs.
*/
export interface OrgEntitlements {
features: OrgEntitlements.Features;

limits: OrgEntitlements.Limits;

plan: OrgEntitlements.Plan;
}

export namespace OrgEntitlements {
export interface Features {
browser_extensions: Features.BrowserExtensions;

browser_pools: Features.BrowserPools;

browser_replays: Features.BrowserReplays;

credential_providers: Features.CredentialProviders;

credentials: Features.Credentials;

custom_proxies: Features.CustomProxies;

file_io: Features.FileIo;

gpu: Features.GPU;

managed_auth: Features.ManagedAuth;

managed_proxies: Features.ManagedProxies;

profiles: Features.Profiles;

proxy_bypass_hosts: Features.ProxyBypassHosts;
}

export namespace Features {
export interface BrowserExtensions {
/**
* Whether browser extensions are available.
*/
enabled: boolean;

/**
* Maximum active custom extensions the organization may store. Null means
* unlimited. Loading stored extensions into a browser is not plan-limited.
*/
max_stored_per_org: number | null;
}

export interface BrowserPools {
/**
* Whether the organization is entitled to use this feature.
*/
enabled: boolean;
}

export interface BrowserReplays {
/**
* Whether browser replay recording is available.
*/
enabled: boolean;

/**
* Number of days browser replays are retained, matching the replay reaper policy.
*/
retention_days: number;
}

export interface CredentialProviders {
/**
* Whether the organization is entitled to use this feature.
*/
enabled: boolean;
}

export interface Credentials {
/**
* Whether the organization is entitled to use this feature.
*/
enabled: boolean;
}

export interface CustomProxies {
/**
* Whether the organization is entitled to use this feature.
*/
enabled: boolean;
}

export interface FileIo {
/**
* Whether the organization is entitled to use this feature.
*/
enabled: boolean;
}

export interface GPU {
/**
* Whether the organization is entitled to use this feature.
*/
enabled: boolean;
}

export interface ManagedAuth {
/**
* Whether managed auth is available.
*/
enabled: boolean;

/**
* Effective interval in seconds used when a connection is created without an
* explicit health-check interval.
*/
health_check_interval_default_seconds: number;

/**
* Maximum accepted managed auth health-check interval in seconds.
*/
health_check_interval_max_seconds: number;

/**
* Minimum accepted managed auth health-check interval in seconds.
*/
health_check_interval_min_seconds: number;

/**
* Maximum active managed auth connections in the organization. Null means
* unlimited.
*/
max_connections: number | null;
}

export interface ManagedProxies {
/**
* Whether the organization is entitled to use this feature.
*/
enabled: boolean;
}

export interface Profiles {
/**
* Whether the organization is entitled to use this feature.
*/
enabled: boolean;
}

export interface ProxyBypassHosts {
/**
* Whether the organization is entitled to use this feature.
*/
enabled: boolean;
}
}

export interface Limits {
/**
* Effective org-level default concurrent invocation ceiling for apps without an
* app-specific override. App-specific overrides are not represented here.
*/
default_max_concurrent_invocations_per_app: number;

/**
* Effective organization-wide ceiling shared by on-demand browsers and browser
* pool reservations.
*/
max_concurrent_browsers: number;

/**
* Effective organization-wide concurrent app invocation ceiling.
*/
max_concurrent_invocations: number;
}

export interface Plan {
/**
* The organization's contractual plan identifier. Use the resolved feature and
* limit values, not this field, for access decisions.
*/
id: 'FREE' | 'HOBBYIST' | 'START_UP' | 'ENTERPRISE';

/**
* The plan used to resolve plan-based access. Active trials resolve to START_UP
* regardless of the contractual plan.
*/
effective_id: 'FREE' | 'HOBBYIST' | 'START_UP' | 'ENTERPRISE';

/**
* Whether the organization is currently within its trial period.
*/
is_trialing: boolean;

/**
* Current billing status of the contractual plan, or null when no billing status
* is recorded. Status-sensitive feature values already account for it.
*/
status: 'NEEDS_PAYMENT_METHOD' | 'ACTIVE' | 'CANCELED' | 'UNPAID' | null;

/**
* Configured trial end timestamp, or null when the organization has no trial. A
* past timestamp may be returned when is_trialing is false.
*/
trial_ends_at: string | null;
}
}

export declare namespace Entitlements {
export { type OrgEntitlements as OrgEntitlements };
}
1 change: 1 addition & 0 deletions src/resources/organization/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

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

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

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

Organization.Entitlements = Entitlements;
Organization.Limits = Limits;

export declare namespace Organization {
export { Entitlements as Entitlements, type OrgEntitlements as OrgEntitlements };

export {
Limits as Limits,
type OrgLimits as OrgLimits,
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.91.0'; // x-release-please-version
export const VERSION = '0.92.0'; // x-release-please-version
22 changes: 22 additions & 0 deletions tests/api-resources/organization/entitlements.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// 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 entitlements', () => {
// Mock server tests are disabled
test.skip('retrieve', async () => {
const responsePromise = client.organization.entitlements.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);
});
});
Loading