You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
workflow_streams: parametrize WorkflowStreamItem on decoded data type
Make WorkflowStreamItem generic in T so subscribers get a typed
data field that matches the result_type passed to subscribe:
- subscribe(result_type=T) -> WorkflowStreamItem[T]
- subscribe() -> WorkflowStreamItem[Any]
- subscribe(result_type=RawValue) -> WorkflowStreamItem[RawValue]
Adds def-style overloads to WorkflowStreamClient.subscribe (matching
the existing TopicHandle/WorkflowTopicHandle generic style) and
tightens TopicHandle.subscribe to AsyncIterator[WorkflowStreamItem[T]].
The internal workflow-side _log is annotated as
list[WorkflowStreamItem[Payload]] since the workflow does not decode.
No runtime behavior change; existing tests (which use unparameterized
WorkflowStreamItem) continue to type-check as WorkflowStreamItem[Any].
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
0 commit comments