Files
langgraph/libs
Nick HollonandGitHub 1e1ca88dad feat(langgraph): type v3 stream_events return and native projections (#8389)
The `version="v3"` overloads of `stream_events`/`astream_events`
returned `Any`, and `GraphRunStream`/`AsyncGraphRunStream` attached
native projections via a runtime `setattr` loop invisible to type
checkers.

- Return `GraphRunStream` / `Awaitable[AsyncGraphRunStream]` from the v3
overloads.
- Declare the always-registered native projections (`values`,
`messages`, `lifecycle`, `subgraphs`) as typed class attributes on both
run streams.
- Add `assert_type` checks in `test_stream_events_v3.py`.

Opt-in native projections (`updates`, `custom`, `checkpoints`, `debug`,
`tasks`) are only present when their transformer is registered, so they
remain reached via `extensions[...]` rather than annotated as
always-present.
2026-07-24 13:16:41 -04:00
..