Skip to content

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

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

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

Conversation

@moedash

@moedash moedash commented Oct 3, 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 topic. 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.
  • stream_channel(ref) names the notification channel a stream notifies, derived the way the server derives it. A listener needs no lookup.
  • 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. stream_channel sits here because it maps a ref to an address, and the Nexus consumer uses it later as its default.

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, standalone conformance and stream_channel 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.
The server derives the channel from the stream's identity, and the client derives the same one, so a listener needs no lookup.
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