Releases: langchain-ai/langgraphjs
@langchain/vue@1.0.22
Patch Changes
-
#2522
3855985Thanks @christian-bromann! - feat(stream): add per-event side-effect selectorAdd
useChannelEffect(React/Svelte/Vue) /injectChannelEffect(Angular), a side-effect counterpart touseChannelthat invokes anonEventcallback once per raw protocol event without re-rendering. This is the idiomatic v1 replacement for the oldonLangChainEvent/onCustomEventcallbacks for analytics and logging. Backed by a new framework-agnosticacquireChannelEffecthelper in@langchain/langgraph-sdk/streamthat shares a ref-counted subscription with matchinguseChannelconsumers. -
Updated dependencies [
3855985,7c3e9e9,17c44a3]:- @langchain/langgraph-sdk@1.9.21
@langchain/svelte@1.0.22
Patch Changes
-
#2522
3855985Thanks @christian-bromann! - feat(stream): add per-event side-effect selectorAdd
useChannelEffect(React/Svelte/Vue) /injectChannelEffect(Angular), a side-effect counterpart touseChannelthat invokes anonEventcallback once per raw protocol event without re-rendering. This is the idiomatic v1 replacement for the oldonLangChainEvent/onCustomEventcallbacks for analytics and logging. Backed by a new framework-agnosticacquireChannelEffecthelper in@langchain/langgraph-sdk/streamthat shares a ref-counted subscription with matchinguseChannelconsumers. -
Updated dependencies [
3855985,7c3e9e9,17c44a3]:- @langchain/langgraph-sdk@1.9.21
@langchain/react@1.0.22
Patch Changes
-
#2522
3855985Thanks @christian-bromann! - feat(stream): add per-event side-effect selectorAdd
useChannelEffect(React/Svelte/Vue) /injectChannelEffect(Angular), a side-effect counterpart touseChannelthat invokes anonEventcallback once per raw protocol event without re-rendering. This is the idiomatic v1 replacement for the oldonLangChainEvent/onCustomEventcallbacks for analytics and logging. Backed by a new framework-agnosticacquireChannelEffecthelper in@langchain/langgraph-sdk/streamthat shares a ref-counted subscription with matchinguseChannelconsumers. -
Updated dependencies [
3855985,7c3e9e9,17c44a3]:- @langchain/langgraph-sdk@1.9.21
@langchain/langgraph@1.4.1
Patch Changes
-
#2520
2da5c33Thanks @christian-bromann! - fix(state): validate Zod state updates from nodesValidate node return values and Command updates against Zod state schema
constraints before applying them to graph state.Fixes #2519
-
#2511
ef04db3Thanks @christian-bromann! - feat(ToolNode): forward graph state to tools viaruntime.stateToolNodenow forwards its input to each tool through the second argument asruntime.state. When usingToolNodeas a node in a LangGraph graph, this gives tools access to the current graph state for workflows that need tool-call support in LangGraph proper. Tools can type the second parameter asToolRuntime<StateType>from@langchain/core/toolsand readruntime.statedirectly. This works in every runtime, including web browsers, and removes the need forgetCurrentTaskInput()(which relies onnode:async_hooks/AsyncLocalStorage).getCurrentTaskInput(config)continues to work for backwards compatibility. -
Updated dependencies [
3855985,7c3e9e9,17c44a3]:- @langchain/langgraph-sdk@1.9.21
@langchain/langgraph-supervisor@1.1.0
Minor Changes
-
#2521
56682a6Thanks @open-swe! - feat(langgraph-supervisor): AddaddHandoffMessagestocreateSupervisorandcreateHandoffTool, allowing supervisor-to-agent handoff bookkeeping messages to be omitted from the expert agent's message history. WhenaddHandoffBackMessagesis not provided, it now defaults to the same value asaddHandoffMessages, matching the Python package behavior.createHandoffToolnow also acceptsdescriptionas the preferred option name while continuing to support the existingagentDescriptionoption as deprecated for backwards compatibility.
Patch Changes
- #2407
59d4765Thanks @pragnyanramtha! - Normalize all whitespace in supervisor handoff tool names.
@langchain/langgraph-sdk@1.9.21
Patch Changes
-
#2522
3855985Thanks @christian-bromann! - feat(stream): add per-event side-effect selectorAdd
useChannelEffect(React/Svelte/Vue) /injectChannelEffect(Angular), a side-effect counterpart touseChannelthat invokes anonEventcallback once per raw protocol event without re-rendering. This is the idiomatic v1 replacement for the oldonLangChainEvent/onCustomEventcallbacks for analytics and logging. Backed by a new framework-agnosticacquireChannelEffecthelper in@langchain/langgraph-sdk/streamthat shares a ref-counted subscription with matchinguseChannelconsumers. -
#2523
7c3e9e9Thanks @christian-bromann! - fix(sdk): stop re-streaming seeded messages on idle-thread submitAn idle (finished) thread defers its root SSE pump, so the first
submit()brings it up and the transport replays the finished run fromseq=0. The replayedmessageschannel carries no step (unlikevalues, guarded bymaxStep), so it rebuilt each already-complete message from an emptymessage-startand re-streamed the whole turn token-by-token — a visible "messages replay" of the existing conversation. Seal the message ids seeded from the idlegetState()snapshot so replayed deltas can't downgrade the complete tail; the seal lifts once a newer checkpoint advances the timeline or on thread rebind, and ids from the next run are never sealed. -
#2462
17c44a3Thanks @christian-bromann! - fix(sdk): reconnect v2 SSE and WebSocket thread streams after disconnectAdd automatic reconnect with resume (
sincefor SSE) for protocol transports,
wireAsyncCallerthroughclient.threads.stream, and expose optional
reconnect tuning onThreadStreamOptions. Includes integration tests against
an in-process mock langgraph-api server.
@langchain/angular@1.0.22
Patch Changes
-
#2522
3855985Thanks @christian-bromann! - feat(stream): add per-event side-effect selectorAdd
useChannelEffect(React/Svelte/Vue) /injectChannelEffect(Angular), a side-effect counterpart touseChannelthat invokes anonEventcallback once per raw protocol event without re-rendering. This is the idiomatic v1 replacement for the oldonLangChainEvent/onCustomEventcallbacks for analytics and logging. Backed by a new framework-agnosticacquireChannelEffecthelper in@langchain/langgraph-sdk/streamthat shares a ref-counted subscription with matchinguseChannelconsumers. -
Updated dependencies [
3855985,7c3e9e9,17c44a3]:- @langchain/langgraph-sdk@1.9.21
@langchain/vue@1.0.21
Patch Changes
-
#2515
49b8c1aThanks @christian-bromann! - fix: make AnyStream a true supertype so selector hooks need no castA concrete
useStream<typeof agent>()handle was not assignable to
AnyStreambecause generic-computed covariant members (toolCalls,
values) don't widen underany—InferToolCalls<any>[]resolves to
AssembledToolCall<…, never>[], narrower than a concrete handle. Override
those members with their widest forms (preserving each framework's
reactivity wrapper — plain arrays for React/Svelte,ShallowReffor Vue,
Signalfor Angular) so the message/tool/value selector hooks accept a
fully-typed stream without anas AnyStreamcast.
@langchain/svelte@1.0.21
Patch Changes
-
#2515
49b8c1aThanks @christian-bromann! - fix: make AnyStream a true supertype so selector hooks need no castA concrete
useStream<typeof agent>()handle was not assignable to
AnyStreambecause generic-computed covariant members (toolCalls,
values) don't widen underany—InferToolCalls<any>[]resolves to
AssembledToolCall<…, never>[], narrower than a concrete handle. Override
those members with their widest forms (preserving each framework's
reactivity wrapper — plain arrays for React/Svelte,ShallowReffor Vue,
Signalfor Angular) so the message/tool/value selector hooks accept a
fully-typed stream without anas AnyStreamcast.
@langchain/react@1.0.21
Patch Changes
-
#2515
49b8c1aThanks @christian-bromann! - fix: make AnyStream a true supertype so selector hooks need no castA concrete
useStream<typeof agent>()handle was not assignable to
AnyStreambecause generic-computed covariant members (toolCalls,
values) don't widen underany—InferToolCalls<any>[]resolves to
AssembledToolCall<…, never>[], narrower than a concrete handle. Override
those members with their widest forms (preserving each framework's
reactivity wrapper — plain arrays for React/Svelte,ShallowReffor Vue,
Signalfor Angular) so the message/tool/value selector hooks accept a
fully-typed stream without anas AnyStreamcast.