mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-22 23:52:23 +02:00
Annotated[NotRequired[dict[...]], DeltaChannel(reducer)] (the shape used by deepagents' filesystem middleware) fell through type inference to `list`, so the first operator call blew up with "'list' object is not a mapping". `_is_field_channel` now unwraps a parameterized Required[X]/NotRequired[X] before stripping extras, which lets dict/set/mapping outer types reach the abc normalization block. Also type-annotates the `new` locals in DeltaChannel.copy() and from_checkpoint() so mypy can infer them through the abstract return type. Adds tests covering: dict Overwrite in update and in writes replay, snapshot_write with a dict reducer, dict backwards-compat checkpoints, NotRequired type inference, and a filesystem-shaped end-to-end graph. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>