feat(stream): document and publicly export readStream and toStream#1828
feat(stream): document and publicly export readStream and toStream#1828toubatbrian wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 5083033 The changes in this PR will be included in the next version bump. This PR includes changesets to release 35 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Surface the readStream/toStream helpers under the `stream` namespace alongside the other stream utilities, and add full TSDoc describing their abort/cancel semantics so they are discoverable and supported for user code. Co-authored-by: Cursor <cursoragent@cursor.com>
b85c3d5 to
5083033
Compare
💡 Codex Reviewagents-js/agents/src/llm/async_toolset.ts Lines 17 to 18 in b85c3d5 Because agents-js/agents/src/voice/agent_session.ts Lines 1665 to 1669 in b85c3d5 When session-level tools contain a nested ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
readStreamandtoStreaminagents/src/utils.ts, documenting their behavior including the abort (readStream) and cancel (toStream) semantics, type params, params, returns, and usage examples.streamnamespace (agents/src/stream/index.ts) alongsidemergeReadableStreams,MultiInputStream,createStreamChannel, etc., so they're cleanly importable and discoverable for user code (stream.readStream/stream.toStream, plus the existing top-level re-export).@livekit/agentspatch).readStreamconsumes aReadableStreamas an abortable async generator;toStreamis its inverse, adapting anyAsyncIterableinto aReadableStream.Test plan
pnpm build:agentssucceeds and the generateddist/utils.d.ts/dist/stream/index.d.tsinclude the documented, exported helpers.pnpm --filter @livekit/agents lintreports only pre-existing warnings (none in the edited files).pnpm exec prettier --checkpasses on the edited files.