Conversation
The external chain gets the same stream interface the main chain defines: the record and topic types, the provider protocols, the memory provider, the workflow reader and writer, the activity and client accessors, and the stream_provider option on client, worker and replayer.
The suite runs every provider case against the same contract. The byte-cap case now also covers a store that refuses an append past its cap, which a provider declares with refuses_appends_past_byte_cap.
One agent loop runs against whichever provider the setup names, so the demo shows the interface rather than one store.
This was referenced Oct 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR brings the
temporalio.streamsinterface to the external-streams branch, so a workflow, an activity and a client open streams the same way on both SDK chains.What changed?
temporalio/streams: records, typed topics, cursors, the error family, the provider protocols,ProviderPlugin,StreamRef, the body helpers andMemoryStreams.workflow.stream_reader()andworkflow.stream_writer(),activity.stream_handle(),Client.get_stream_handle()andcreate_stream(), and thestream_provideroption on client, worker and replayer.tests/streams, including the wake and leaving cases a provider opts into with capability flags.refuses_appends_past_byte_capcapability on the byte-cap case, for a store that refuses an append past its cap rather than dropping old records. No provider on this branch sets it yet.streams_demoagent loop and its changelog entry.Part of AI-198 (epic AI-37).
Why?
The external runtime is one way to back the stream interface. Without the interface on this branch, the Redis provider in the next PRs would have nothing to implement. This mirrors the main chain's interface, so the eventual union has one copy. The byte-cap flag keeps the suite valid for a store that refuses rather than trims, which the native provider on the main chain is.
How did you test it?
Link to a test plan if any -
poe lintis clean at each commit. The streams suite and the external stream suite pass on the dev server. Against a channel server the streams suite passes too. The wake and leaving cases skip on the memory provider, which doesn't declare them. They run once the Redis provider lands.