From 403d2223481c5217fa5cd126c41b2182b0a23f4a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 7 Feb 2026 18:15:11 +0000 Subject: [PATCH 1/3] chore: switch npm publish to OIDC auth in stainless config --- .github/workflows/publish-npm.yml | 5 +++-- .github/workflows/release-doctor.yml | 2 -- .stats.yml | 2 +- bin/check-release-environment | 4 ---- bin/publish-npm | 13 +++++++++++-- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index a660478..8984e27 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -12,6 +12,9 @@ jobs: publish: name: publish runs-on: ubuntu-latest + permissions: + contents: read + id-token: write steps: - uses: actions/checkout@v6 @@ -28,5 +31,3 @@ jobs: - name: Publish to NPM run: | bash ./bin/publish-npm - env: - NPM_TOKEN: ${{ secrets.KERNEL_NPM_TOKEN || secrets.NPM_TOKEN }} diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 588ae1b..2d0c931 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -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 }} diff --git a/.stats.yml b/.stats.yml index 2964321..0edbaa2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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 +config_hash: 3b1fbbb6bda0dac7e8b42e155cd7da56 diff --git a/bin/check-release-environment b/bin/check-release-environment index e4b6d58..6b43775 100644 --- a/bin/check-release-environment +++ b/bin/check-release-environment @@ -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 - lenErrors=${#errors[@]} if [[ lenErrors -gt 0 ]]; then diff --git a/bin/publish-npm b/bin/publish-npm index 45e8aa8..3d05c0b 100644 --- a/bin/publish-npm +++ b/bin/publish-npm @@ -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 @@ -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" From 917dc3d4ed691b16b969fb4f723d45dc0324d896 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 7 Feb 2026 18:15:45 +0000 Subject: [PATCH 2/3] feat(auth): add reauth circuit breaker logic --- .stats.yml | 4 ++-- src/resources/agents/auth/auth.ts | 5 +++++ src/resources/auth/connections.ts | 5 +++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0edbaa2..ad62343 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-f967d3024897a6125d5d18c4577dbb2cc22d742d487e6a43165198685f992379.yml +openapi_spec_hash: e1c40ef0aee3a79168eb9cc854a9e403 config_hash: 3b1fbbb6bda0dac7e8b42e155cd7da56 diff --git a/src/resources/agents/auth/auth.ts b/src/resources/agents/auth/auth.ts index e4de6ba..c812518 100644 --- a/src/resources/agents/auth/auth.ts +++ b/src/resources/agents/auth/auth.ts @@ -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: * diff --git a/src/resources/auth/connections.ts b/src/resources/auth/connections.ts index 3479a5e..8925092 100644 --- a/src/resources/auth/connections.ts +++ b/src/resources/auth/connections.ts @@ -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: * From 6a8bd0cb70e0e44096c7821ac9e51554c0734fd2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 7 Feb 2026 18:16:21 +0000 Subject: [PATCH 3/3] release: 0.32.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ package.json | 2 +- src/version.ts | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6fef4e5..4758222 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.31.2" + ".": "0.32.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index c6aa6c1..a4620f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/package.json b/package.json index 8604823..6409714 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/version.ts b/src/version.ts index a942d18..b413d15 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.31.2'; // x-release-please-version +export const VERSION = '0.32.0'; // x-release-please-version