Skip to content

Added the stream accessors for activities and clients. - #94

Open
moetemp wants to merge 4 commits into
moe/AI-198-s1-py-4-workflow-runtimefrom
moe/AI-198-s1-py-5-accessors
Open

moetemp wants to merge 4 commits into
moe/AI-198-s1-py-4-workflow-runtimefrom
moe/AI-198-s1-py-5-accessors

Conversation

@moetemp

@moetemp moetemp commented Oct 6, 2026

Copy link
Copy Markdown
Owner

This PR lets activities and clients reach a stream the same way workflow code does.

What changed?

  • activity.stream_handle() and Client.get_stream_handle() open a stream by StreamRef or by its owner's ids. Typed topics work on every call.
  • Client.create_stream(stream_id, ...) creates a standalone stream with a retention policy, and its handle's close() seals it.
  • StreamRef names workflow-owned, activity-owned and standalone streams. The memory provider hosts all three.
  • The conformance suite gains the standalone cases, and the activity-stream and accessor suites cover the two entry points.
  • The changelog entry for the stream interface.

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

Why?

A stream is useless if only its owning workflow can touch it. Activities produce into streams, and clients read them to show progress. A ref is plain data, so a stream can be handed to another process, and the accessor it opens with is the same in every context.

The earlier version of this PR also added stream_channel(ref), which named the notification channel a stream notifies. The channel is paused per the 2026-10-05 design review, so that helper waits for phase 2, and nothing in this series calls 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 accessor, activity-stream and standalone conformance cases pass on the memory provider, with the dev server the fixtures start.

activity.stream_handle and client.get_stream_handle open a stream by ref or by topic, and create_stream makes a standalone one, so every context reaches a stream the same way.
Activity and client handles on memory, and the conformance cases for standalone streams.
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.

1 participant