Helpers for attaching Hooks v2 session identity to graph context.
Attach Hooks v2 snapshot identity and server event gates to context.
Client-facing builder for the per-run graph context payload.
Callers populate this and pass it via context= to astream/ainvoke.
ConfigurableModelMiddleware and the interrupt_on when predicate read
it from request.runtime.context. In-process LangGraph coerces it into
CLIContextSchema (the registered context_schema); over the API it stays
a plain dict — which is why consumers handle both shapes.
Client-owned session runtime around an immutable Hooks snapshot.
Owns configuration snapshot identity, transcript materialization, and the
HookEngine. Server-owned lifecycle events reach this runtime through the
interrupt fulfill path in hooks.client.