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
5 changes: 3 additions & 2 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
publish:
name: publish
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v6
Expand All @@ -28,5 +31,3 @@ jobs:
- name: Publish to NPM
run: |
bash ./bin/publish-npm
env:
NPM_TOKEN: ${{ secrets.KERNEL_NPM_TOKEN || secrets.NPM_TOKEN }}
2 changes: 0 additions & 2 deletions .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@ jobs:
- name: Check release environment
run: |
bash ./bin/check-release-environment
env:
NPM_TOKEN: ${{ secrets.KERNEL_NPM_TOKEN || secrets.NPM_TOKEN }}

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.31.2"
".": "0.32.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 108
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-3fbe762c99e8a120c426ac22bc1fa257c9127d631b12a38a6440a37f52935543.yml
openapi_spec_hash: 5a190df210ed90b20a71c5061ff43917
config_hash: 38c9b3b355025daf9bb643040e4af94e
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-f967d3024897a6125d5d18c4577dbb2cc22d742d487e6a43165198685f992379.yml
openapi_spec_hash: e1c40ef0aee3a79168eb9cc854a9e403
config_hash: 3b1fbbb6bda0dac7e8b42e155cd7da56
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.32.0 (2026-02-07)

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

### Features

* **auth:** add reauth circuit breaker logic ([917dc3d](https://github.com/kernel/kernel-node-sdk/commit/917dc3d4ed691b16b969fb4f723d45dc0324d896))


### Chores

* switch npm publish to OIDC auth in stainless config ([403d222](https://github.com/kernel/kernel-node-sdk/commit/403d2223481c5217fa5cd126c41b2182b0a23f4a))

## 0.31.2 (2026-02-06)

Full Changelog: [v0.31.1...v0.31.2](https://github.com/kernel/kernel-node-sdk/compare/v0.31.1...v0.31.2)
Expand Down
4 changes: 0 additions & 4 deletions bin/check-release-environment
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

errors=()

if [ -z "${NPM_TOKEN}" ]; then
errors+=("The NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Release environment check script now performs no validation

Low Severity

The check-release-environment script now creates an empty errors array, checks if it has elements (it never will), and always outputs "The environment is ready to push releases!" without validating anything. This is dead code that provides false assurance. The release doctor workflow still invokes this script expecting it to catch configuration issues, but it will always succeed regardless of the actual environment state. The script either needs OIDC-related checks or removal.

Fix in Cursor Fix in Web

lenErrors=${#errors[@]}

if [[ lenErrors -gt 0 ]]; then
Expand Down
13 changes: 11 additions & 2 deletions bin/publish-npm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

set -eux

npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN"
if [[ ${NPM_TOKEN:-} ]]; then
npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN"
elif [[ ! ${ACTIONS_ID_TOKEN_REQUEST_TOKEN:-} ]]; then
echo "ERROR: NPM_TOKEN must be set if not running in a Github Action with id-token permission"
exit 1
fi

yarn build
cd dist
Expand Down Expand Up @@ -57,5 +62,9 @@ else
TAG="latest"
fi

# Install OIDC compatible npm version
npm install --prefix ../oidc/ npm@11.6.2

# Publish with the appropriate tag
yarn publish --tag "$TAG"
export npm_config_registry='https://registry.npmjs.org'
../oidc/node_modules/.bin/npm publish --tag "$TAG"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing --provenance flag breaks OIDC npm publishing

High Severity

The npm publish command is missing the --provenance flag required for OIDC-based authentication. When NPM_TOKEN is not set, the script falls through to OIDC mode but the publish command on line 70 doesn't include --provenance. Without this flag, npm won't use the OIDC token for authentication, causing the publish to fail with an authentication error. The comment on line 65 says "Install OIDC compatible npm version" but the actual publish command doesn't enable OIDC authentication.

Fix in Cursor Fix in Web

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.31.2",
"version": "0.32.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/resources/agents/auth/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,11 @@ export interface AuthAgent {
*/
can_reauth?: boolean;

/**
* Reason why automatic re-authentication is or is not possible
*/
can_reauth_reason?: string;

/**
* Reference to credentials for managed auth. Use one of:
*
Expand Down
5 changes: 5 additions & 0 deletions src/resources/auth/connections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@ export interface ManagedAuth {
*/
can_reauth?: boolean;

/**
* Reason why automatic re-authentication is or is not possible
*/
can_reauth_reason?: string;

/**
* Reference to credentials for managed auth. Use one of:
*
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.31.2'; // x-release-please-version
export const VERSION = '0.32.0'; // x-release-please-version