Skip to content

Added a client for the server-side stream service. - #52

Open
moedash wants to merge 4 commits into
moe/AI-198-st-py-1-core-pinfrom
moe/AI-198-st-py-2-native-wire
Open

moedash wants to merge 4 commits into
moe/AI-198-st-py-1-core-pinfrom
moe/AI-198-st-py-2-native-wire

Conversation

@moedash

@moedash moedash commented Oct 3, 2026

Copy link
Copy Markdown
Owner

This PR adds temporalio.client_stream, a Python client for the server's native stream service.

What changed?

  • scripts/gen_stream_protos.py copies the stream service protos out of a server checkout and compiles them into temporalio.api.streamservice.v1. They're vendored because the service is still defined in the server, not in the api repo.
  • temporalio.client_stream opens, appends to, reads and closes a native stream through that service. It maps the service's errors onto the stream error family.
  • Live tests for the client, the stream owner and the record encoding.

Part of AI-198 (epic AI-37).

Why?

Native streams live on the server, so Python needs a way to talk to them before a provider or a workflow can. This is that wire, kept apart from the provider and the workflow runtime that build on it.

How did you test it?

Link to a test plan if any -

  • Unit Tests
  • Staging
  • End to End Tests

poe lint is clean. The client, owner and record cases pass against a local server built from the stream server PRs, with TEMPORAL_STREAM_TARGET set. Without it they skip. The vendored protos match what the script produces from the server's stream service, except for two StreamState fields the stream-to-channel bridge adds later on the server. The client doesn't read them.

The stream service is still defined in the server, so its protos are copied in and compiled by a script rather than taken from the api submodule.
temporalio.client_stream opens, appends to, reads and closes a native stream on the server, with the service's errors mapped onto the stream error family.
Live cases run when TEMPORAL_STREAM_TARGET names a server with the stream service, and skip otherwise.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Changelog entry rides another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant