feat: expose LangGraph state through native snapshots - #1118
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved blocking issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
Adds immutable, read-only LangGraph application values to runtime snapshots while preserving concrete snapshot types in Angular and React bindings.
Changes:
- Adds values projection, ownership, structural sharing, and atomic publication.
- Updates native bindings, transport normalization, fixtures, and documentation.
- Expands runtime, browser, type, and verification coverage.
| File | Summary |
|---|---|
scripts/react-parity/verify-angular-package.mjs |
Orders declaration generation before type checks. |
scripts/react-parity/runtime-consumer.spec.mjs |
Tests persisted and ignored values. |
scripts/react-parity/runtime-consumer.mjs |
Adds values fixtures and assertions. |
scripts/react-parity/dispositions.json |
Updates inventory metadata. |
scripts/react-parity/baseline.json |
Updates verification baseline. |
libs/react/src/use-agent.type-test.ts |
Verifies concrete snapshot inference. |
libs/react/src/use-agent.ts |
Preserves snapshot extensions. |
libs/react/src/use-agent.spec.tsx |
Tests values observation and identity. |
libs/react/README.md |
Documents extended snapshots. |
libs/langgraph/src/runtime/values.type-test.ts |
Verifies values typing. |
libs/langgraph/src/runtime/values.spec.ts |
Tests values lifecycle and atomicity. |
libs/langgraph/src/runtime/values-projection.ts |
Projects authoritative application values. |
libs/langgraph/src/runtime/values-projection.spec.ts |
Tests projection and ownership. |
libs/langgraph/src/runtime/transport.integration.spec.ts |
Tests transport routing and collisions. |
libs/langgraph/src/runtime/testing/binding-fixture.ts |
Extends fixtures with values. |
libs/langgraph/src/runtime/stream-projection.ts |
Restricts delta handling to message events. |
libs/langgraph/src/runtime/publication.ts |
Publishes extended snapshots. |
libs/langgraph/src/runtime/publication.spec.ts |
Tests immutable publication. |
libs/langgraph/src/runtime/ownership.ts |
Adds immutable values ownership and sharing. |
libs/langgraph/src/runtime/langgraph-snapshot.ts |
Defines the private snapshot extension. |
libs/langgraph/src/runtime/create-session.ts |
Integrates values into session state. |
libs/langgraph/src/lib/transport/fetch-stream.transport.ts |
Protects protocol fields from collisions. |
libs/langgraph/src/lib/transport/fetch-stream.transport.spec.ts |
Tests event normalization. |
libs/angular/src/observe-agent.type-test.ts |
Verifies Angular snapshot inference. |
libs/angular/src/observe-agent.ts |
Preserves concrete snapshot types. |
libs/angular/src/observe-agent.spec.ts |
Tests values observation. |
libs/angular/README.md |
Documents extended snapshots. |
fixtures/react-parity/runtime/scenarios.ts |
Adds fixture snapshot values. |
fixtures/react-parity/runtime/runtime-entry.ts |
Exposes concrete fixture snapshot types. |
fixtures/react-parity/runtime/README.md |
Documents values coverage. |
fixtures/react-parity/runtime/react-app.tsx |
Displays application values. |
fixtures/react-parity/runtime/installed-types.ts |
Adds installed type probes. |
fixtures/react-parity/runtime/evidence.json |
Records verification evidence. |
fixtures/react-parity/runtime/angular-app.ts |
Displays application values. |
fixtures/react-parity/README.md |
Updates parity scope and inventory. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The shared LangGraph runtime now exposes read-only backend values in the same immutable snapshot as messages and tools. Previously publication discarded backend fields and both native binding signatures erased concrete snapshot extensions. Angular and React now preserve those extensions without importing backend types into core or creating a second store.
Root full-state events, checkpoints, loaded history and conclusive correlated recovery replace values atomically with their related message projection. Missing keys disappear, equal data retains identity, and unchanged nested branches are shared. Message chunks, node updates, child events and live interrupt control envelopes preserve existing application values. Construction stays inert; this adds no network operations or state writes.
The private snapshot distinguishes unobserved values (
undefined) from an observed empty object. Values are owned readonly plain data, not a schema-validated application DTO. The existing tool inference and borrowed lifecycle remain intact. Interrupt/resume, join/reconnect, state writes, SSR and public LangGraph package cutover remain outside this increment.Verification
Local verification includes red/green regression coverage and independent spec/quality reviews. One Angular verifier attempt overlapped a dependency rebuild and failed on a temporarily absent artifact; its ordered rerun passed. Exact commands, log hashes, source fingerprint and limitations: verification evidence.
Based directly on merged #1117. Required CI 35683101055 passed on
78df2f1de21825c760eb53d74728f7abafae3c30. Copilot reviewed the same head with no findings. Merged asdb867f83be6cb6f9735de41f6aadddf64a0d9937on 2026-09-22.