Skip to content

fix(streaming): emit termination and resolve close() with it - #214

Merged
ccampbell-aai merged 2 commits into
mainfrom
ccampbell/streaming-termination-event
Nov 17, 2026
Merged

ccampbell-aai merged 2 commits into
mainfrom
ccampbell/streaming-termination-event

Conversation

@ccampbell-aai

@ccampbell-aai ccampbell-aai commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #212.

Test plan

  • New tests in tests/unit/streaming-close.test.ts (5 fail on main)
  • prettier, eslint, tsc --noEmit, publint
  • Full unit suite: only the 3 user-agent tests that also fail on main under Node 26
  • Prod (streaming.assemblyai.com): termination fires once and close() resolves with the same object; close listener fires exactly once for close() (1000), close(false) (resolves undefined) and a server-initiated 3007 close

🤖 Generated with Claude Code

StreamingTranscriber emits a "termination" event with the server's
Termination message, close() resolves with it (undefined when it did not
wait or the frame did not arrive), and close() calls the close listener
once for a client-initiated close before clearing listeners. Bumps to
4.43.3.

Fixes #212

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ccampbell-aai
ccampbell-aai marked this pull request as ready for review November 17, 2026 01:24
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ccampbell-aai
ccampbell-aai merged commit d7788ab into main Nov 17, 2026
4 checks passed
@ccampbell-aai
ccampbell-aai deleted the ccampbell/streaming-termination-event branch November 17, 2026 01:45
ccampbell-aai added a commit that referenced this pull request Nov 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Streaming: no way to observe the Termination message

2 participants