From 8420adf51d637f06986a97e161010f6c2ab56de0 Mon Sep 17 00:00:00 2001 From: sharon-d-id Date: Wed, 11 Feb 2026 12:06:32 +0200 Subject: [PATCH 1/7] Merge pull request #323 from de-id/feature/update-upload-token Use Workflow's OIDC token to upload node package to NpmJS --- .github/workflows/publish-on-merge.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/publish-on-merge.yml b/.github/workflows/publish-on-merge.yml index 5a1db44d..62718ab3 100644 --- a/.github/workflows/publish-on-merge.yml +++ b/.github/workflows/publish-on-merge.yml @@ -12,6 +12,7 @@ on: type: boolean permissions: + id-token: write # Use for genenrate OIDC token to upload to NpmJS contents: write jobs: @@ -112,8 +113,6 @@ jobs: logger -l info -m "Updated package.json version to: ${{ steps.version.outputs.version }}" - name: Publish to NPM - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: | if [ "${{ github.event.inputs.dry_run }}" = "true" ]; then logger -l info -m "🔍 DRY RUN MODE: Would publish version ${{ steps.version.outputs.version }} with tag ${{ steps.version.outputs.tag }}" From a6b34eb7a7bd19061e63d1de182a126320e46720 Mon Sep 17 00:00:00 2001 From: sharon-d-id Date: Wed, 11 Feb 2026 12:28:52 +0200 Subject: [PATCH 2/7] Clear the NODE_AUTH_TOKEN env variable so it will use the OIDC token insead --- .github/workflows/publish-on-merge.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish-on-merge.yml b/.github/workflows/publish-on-merge.yml index 62718ab3..2b68ec5f 100644 --- a/.github/workflows/publish-on-merge.yml +++ b/.github/workflows/publish-on-merge.yml @@ -113,6 +113,8 @@ jobs: logger -l info -m "Updated package.json version to: ${{ steps.version.outputs.version }}" - name: Publish to NPM + env: + NODE_AUTH_TOKEN: "" # Clear default auth token for OIDC usage - it will use the OIDC token of the github action insead run: | if [ "${{ github.event.inputs.dry_run }}" = "true" ]; then logger -l info -m "🔍 DRY RUN MODE: Would publish version ${{ steps.version.outputs.version }} with tag ${{ steps.version.outputs.tag }}" From c58f32cb27fd9732d1a3cc8e28f5c3101ee05d19 Mon Sep 17 00:00:00 2001 From: sharon-d-id Date: Wed, 11 Feb 2026 12:31:27 +0200 Subject: [PATCH 3/7] Clear the NODE_AUTH_TOKEN env variable so it will use the OIDC token insead --- .github/workflows/publish-on-merge.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-on-merge.yml b/.github/workflows/publish-on-merge.yml index 2b68ec5f..f3be7c69 100644 --- a/.github/workflows/publish-on-merge.yml +++ b/.github/workflows/publish-on-merge.yml @@ -42,7 +42,7 @@ jobs: sudo chmod +x /usr/local/bin/logger - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: 20 registry-url: "https://registry.npmjs.org" @@ -113,8 +113,8 @@ jobs: logger -l info -m "Updated package.json version to: ${{ steps.version.outputs.version }}" - name: Publish to NPM - env: - NODE_AUTH_TOKEN: "" # Clear default auth token for OIDC usage - it will use the OIDC token of the github action insead + #env: + # NODE_AUTH_TOKEN: "" # Clear default auth token for OIDC usage - it will use the OIDC token of the github action insead run: | if [ "${{ github.event.inputs.dry_run }}" = "true" ]; then logger -l info -m "🔍 DRY RUN MODE: Would publish version ${{ steps.version.outputs.version }} with tag ${{ steps.version.outputs.tag }}" From b54b374019038a53751fd8bae3b9efba089bfa20 Mon Sep 17 00:00:00 2001 From: sharon-d-id Date: Wed, 11 Feb 2026 12:32:48 +0200 Subject: [PATCH 4/7] Clean the NODE AUTH TOKEN env variable --- .github/workflows/publish-on-merge.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-on-merge.yml b/.github/workflows/publish-on-merge.yml index f3be7c69..cdc39715 100644 --- a/.github/workflows/publish-on-merge.yml +++ b/.github/workflows/publish-on-merge.yml @@ -113,8 +113,8 @@ jobs: logger -l info -m "Updated package.json version to: ${{ steps.version.outputs.version }}" - name: Publish to NPM - #env: - # NODE_AUTH_TOKEN: "" # Clear default auth token for OIDC usage - it will use the OIDC token of the github action insead + env: + NODE_AUTH_TOKEN: "" # Clear default auth token for OIDC usage - it will use the OIDC token of the github action insead run: | if [ "${{ github.event.inputs.dry_run }}" = "true" ]; then logger -l info -m "🔍 DRY RUN MODE: Would publish version ${{ steps.version.outputs.version }} with tag ${{ steps.version.outputs.tag }}" From 120dc9723aebf58481594b447bbfb9531f55c403 Mon Sep 17 00:00:00 2001 From: sharon-d-id Date: Wed, 11 Feb 2026 14:07:41 +0200 Subject: [PATCH 5/7] Return to work with NPM Token --- .github/workflows/publish-on-merge.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/publish-on-merge.yml b/.github/workflows/publish-on-merge.yml index cdc39715..e185290e 100644 --- a/.github/workflows/publish-on-merge.yml +++ b/.github/workflows/publish-on-merge.yml @@ -12,7 +12,6 @@ on: type: boolean permissions: - id-token: write # Use for genenrate OIDC token to upload to NpmJS contents: write jobs: @@ -114,7 +113,7 @@ jobs: - name: Publish to NPM env: - NODE_AUTH_TOKEN: "" # Clear default auth token for OIDC usage - it will use the OIDC token of the github action insead + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: | if [ "${{ github.event.inputs.dry_run }}" = "true" ]; then logger -l info -m "🔍 DRY RUN MODE: Would publish version ${{ steps.version.outputs.version }} with tag ${{ steps.version.outputs.tag }}" From b31d9303888581715073d5bf8efc049bfc19222c Mon Sep 17 00:00:00 2001 From: sharon-d-id Date: Wed, 11 Feb 2026 15:07:35 +0200 Subject: [PATCH 6/7] Change NPM token to work with org secret --- .github/workflows/manual-e2e.yml | 2 +- .github/workflows/pr-main-e2e.yml | 2 +- .github/workflows/pr-prod-e2e.yml | 4 ++-- .github/workflows/publish-on-merge.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/manual-e2e.yml b/.github/workflows/manual-e2e.yml index b460e69d..8294f152 100644 --- a/.github/workflows/manual-e2e.yml +++ b/.github/workflows/manual-e2e.yml @@ -86,7 +86,7 @@ jobs: working-directory: agents-ui run: | if [ -f .npmrc.template ]; then - sed "s/\$NPM_AUTH_TOKEN/${{ secrets.NPM_TOKEN }}/g" .npmrc.template > .npmrc + sed "s/\$NPM_AUTH_TOKEN/${{ secrets.NPM_PACKAGE_UPLOAD_TOKEN }}/g" .npmrc.template > .npmrc fi - name: Install local SDK build in agents-ui diff --git a/.github/workflows/pr-main-e2e.yml b/.github/workflows/pr-main-e2e.yml index 5e77a59b..e3dafec2 100644 --- a/.github/workflows/pr-main-e2e.yml +++ b/.github/workflows/pr-main-e2e.yml @@ -82,7 +82,7 @@ jobs: working-directory: agents-ui run: | if [ -f .npmrc.template ]; then - sed "s/\$NPM_AUTH_TOKEN/${{ secrets.NPM_TOKEN }}/g" .npmrc.template > .npmrc + sed "s/\$NPM_AUTH_TOKEN/${{ secrets.NPM_PACKAGE_UPLOAD_TOKEN }}/g" .npmrc.template > .npmrc fi - name: Install local SDK build in agents-ui diff --git a/.github/workflows/pr-prod-e2e.yml b/.github/workflows/pr-prod-e2e.yml index 12f9dfb9..fd9e82df 100644 --- a/.github/workflows/pr-prod-e2e.yml +++ b/.github/workflows/pr-prod-e2e.yml @@ -52,12 +52,12 @@ jobs: - name: Render .npmrc for agents-ui working-directory: agents-ui + env: + NPM_AUTH_TOKEN: ${{ secrets.NPM_PACKAGE_UPLOAD_TOKEN }} run: | if [ -f .npmrc.template ]; then envsubst < .npmrc.template > .npmrc fi - env: - NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Install staging SDK version working-directory: agents-ui diff --git a/.github/workflows/publish-on-merge.yml b/.github/workflows/publish-on-merge.yml index e185290e..79bf3c60 100644 --- a/.github/workflows/publish-on-merge.yml +++ b/.github/workflows/publish-on-merge.yml @@ -113,7 +113,7 @@ jobs: - name: Publish to NPM env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_PACKAGE_UPLOAD_TOKEN }} run: | if [ "${{ github.event.inputs.dry_run }}" = "true" ]; then logger -l info -m "🔍 DRY RUN MODE: Would publish version ${{ steps.version.outputs.version }} with tag ${{ steps.version.outputs.tag }}" From 9560ba1677e3e90a28c7eededede84452c32ebdc Mon Sep 17 00:00:00 2001 From: Arik Sfaradi Date: Thu, 19 Feb 2026 11:37:21 +0200 Subject: [PATCH 7/7] Merge pull request #325 from de-id/bugfix/subscription-timeout Bugfix/subscription timeout --- .../streaming-manager/livekit-manager.ts | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/services/streaming-manager/livekit-manager.ts b/src/services/streaming-manager/livekit-manager.ts index 822437ff..f082e323 100644 --- a/src/services/streaming-manager/livekit-manager.ts +++ b/src/services/streaming-manager/livekit-manager.ts @@ -35,6 +35,8 @@ import type { import { createVideoStatsMonitor } from './stats/poll'; import { VideoRTCStatsReport } from './stats/report'; +const TRACK_SUBSCRIPTION_TIMEOUT_MS = 20000; + async function importLiveKit(): Promise<{ Room: typeof Room; RoomEvent: typeof RoomEvent; @@ -93,7 +95,7 @@ export async function createLiveKitStreamingManager | null = null; - const TRACK_SUBSCRIPTION_TIMEOUT_MS = 20000; let currentActivityState: AgentActivityState = AgentActivityState.Idle; const streamApi = createStreamApiV2(auth, baseURL || didApiUrl, agentId, callbacks.onError); @@ -166,7 +167,9 @@ export async function createLiveKitStreamingManager { - log('Track subscription timeout - no track subscribed within 30 seconds after connect'); + log( + `Track subscription timeout - no track subscribed within ${TRACK_SUBSCRIPTION_TIMEOUT_MS / 1000} seconds after connect` + ); trackSubscriptionTimeoutId = null; analytics.track('connectivity-error', { error: 'Track subscription timeout', @@ -252,12 +255,6 @@ export async function createLiveKitStreamingManager { log(`Video state change: ${state}`); if (state === StreamingState.Start) { + if (trackSubscriptionTimeoutId) { + clearTimeout(trackSubscriptionTimeoutId); + trackSubscriptionTimeoutId = null; + log('Track subscription timeout cleared'); + } handleVideoStarted(); } else if (state === StreamingState.Stop) { handleVideoStopped(report);