Problem
0.2.0 supports async def boundaries but not async generators (SSE streaming). And wrap(client) does not handle stream=True (a streamed response is an iterator, not one object).
Proposal
@boundary on an async def that yields: pass items straight through, record the assembled stream when exhausted, record a failed envelope on early close / error.
wrap(..., stream=True): tee the stream, record the concatenated completion at the end; on replay, yield the recorded chunks.
Acceptance
- An async-generator boundary records and replays.
- A streamed
wrap call records the full completion and replays the chunks.
- Tests for both.
Problem
0.2.0 supports
async defboundaries but not async generators (SSE streaming). Andwrap(client)does not handlestream=True(a streamed response is an iterator, not one object).Proposal
@boundaryon anasync defthatyields: pass items straight through, record the assembled stream when exhausted, record a failed envelope on early close / error.wrap(..., stream=True): tee the stream, record the concatenated completion at the end; on replay, yield the recorded chunks.Acceptance
wrapcall records the full completion and replays the chunks.