Skip to content

Releases: langchain-ai/langgraphjs

@langchain/vue@1.0.22

11 Jun 00:12
34a0125

Choose a tag to compare

Patch Changes

  • #2522 3855985 Thanks @christian-bromann! - feat(stream): add per-event side-effect selector

    Add useChannelEffect (React/Svelte/Vue) / injectChannelEffect (Angular), a side-effect counterpart to useChannel that invokes an onEvent callback once per raw protocol event without re-rendering. This is the idiomatic v1 replacement for the old onLangChainEvent / onCustomEvent callbacks for analytics and logging. Backed by a new framework-agnostic acquireChannelEffect helper in @langchain/langgraph-sdk/stream that shares a ref-counted subscription with matching useChannel consumers.

  • Updated dependencies [3855985, 7c3e9e9, 17c44a3]:

    • @langchain/langgraph-sdk@1.9.21

@langchain/svelte@1.0.22

11 Jun 00:12
34a0125

Choose a tag to compare

Patch Changes

  • #2522 3855985 Thanks @christian-bromann! - feat(stream): add per-event side-effect selector

    Add useChannelEffect (React/Svelte/Vue) / injectChannelEffect (Angular), a side-effect counterpart to useChannel that invokes an onEvent callback once per raw protocol event without re-rendering. This is the idiomatic v1 replacement for the old onLangChainEvent / onCustomEvent callbacks for analytics and logging. Backed by a new framework-agnostic acquireChannelEffect helper in @langchain/langgraph-sdk/stream that shares a ref-counted subscription with matching useChannel consumers.

  • Updated dependencies [3855985, 7c3e9e9, 17c44a3]:

    • @langchain/langgraph-sdk@1.9.21

@langchain/react@1.0.22

11 Jun 00:12
34a0125

Choose a tag to compare

Patch Changes

  • #2522 3855985 Thanks @christian-bromann! - feat(stream): add per-event side-effect selector

    Add useChannelEffect (React/Svelte/Vue) / injectChannelEffect (Angular), a side-effect counterpart to useChannel that invokes an onEvent callback once per raw protocol event without re-rendering. This is the idiomatic v1 replacement for the old onLangChainEvent / onCustomEvent callbacks for analytics and logging. Backed by a new framework-agnostic acquireChannelEffect helper in @langchain/langgraph-sdk/stream that shares a ref-counted subscription with matching useChannel consumers.

  • Updated dependencies [3855985, 7c3e9e9, 17c44a3]:

    • @langchain/langgraph-sdk@1.9.21

@langchain/langgraph@1.4.1

11 Jun 00:11
34a0125

Choose a tag to compare

Patch Changes

  • #2520 2da5c33 Thanks @christian-bromann! - fix(state): validate Zod state updates from nodes

    Validate node return values and Command updates against Zod state schema
    constraints before applying them to graph state.

    Fixes #2519

  • #2511 ef04db3 Thanks @christian-bromann! - feat(ToolNode): forward graph state to tools via runtime.state

    ToolNode now forwards its input to each tool through the second argument as runtime.state. When using ToolNode as 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 as ToolRuntime<StateType> from @langchain/core/tools and read runtime.state directly. This works in every runtime, including web browsers, and removes the need for getCurrentTaskInput() (which relies on node: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

11 Jun 00:12
34a0125

Choose a tag to compare

Minor Changes

  • #2521 56682a6 Thanks @open-swe! - feat(langgraph-supervisor): Add addHandoffMessages to createSupervisor and createHandoffTool, allowing supervisor-to-agent handoff bookkeeping messages to be omitted from the expert agent's message history. When addHandoffBackMessages is not provided, it now defaults to the same value as addHandoffMessages, matching the Python package behavior.

    createHandoffTool now also accepts description as the preferred option name while continuing to support the existing agentDescription option as deprecated for backwards compatibility.

Patch Changes

@langchain/langgraph-sdk@1.9.21

11 Jun 00:12
34a0125

Choose a tag to compare

Patch Changes

  • #2522 3855985 Thanks @christian-bromann! - feat(stream): add per-event side-effect selector

    Add useChannelEffect (React/Svelte/Vue) / injectChannelEffect (Angular), a side-effect counterpart to useChannel that invokes an onEvent callback once per raw protocol event without re-rendering. This is the idiomatic v1 replacement for the old onLangChainEvent / onCustomEvent callbacks for analytics and logging. Backed by a new framework-agnostic acquireChannelEffect helper in @langchain/langgraph-sdk/stream that shares a ref-counted subscription with matching useChannel consumers.

  • #2523 7c3e9e9 Thanks @christian-bromann! - fix(sdk): stop re-streaming seeded messages on idle-thread submit

    An idle (finished) thread defers its root SSE pump, so the first submit() brings it up and the transport replays the finished run from seq=0. The replayed messages channel carries no step (unlike values, guarded by maxStep), so it rebuilt each already-complete message from an empty message-start and re-streamed the whole turn token-by-token — a visible "messages replay" of the existing conversation. Seal the message ids seeded from the idle getState() 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 17c44a3 Thanks @christian-bromann! - fix(sdk): reconnect v2 SSE and WebSocket thread streams after disconnect

    Add automatic reconnect with resume (since for SSE) for protocol transports,
    wire AsyncCaller through client.threads.stream, and expose optional
    reconnect tuning on ThreadStreamOptions. Includes integration tests against
    an in-process mock langgraph-api server.

@langchain/angular@1.0.22

11 Jun 00:12
34a0125

Choose a tag to compare

Patch Changes

  • #2522 3855985 Thanks @christian-bromann! - feat(stream): add per-event side-effect selector

    Add useChannelEffect (React/Svelte/Vue) / injectChannelEffect (Angular), a side-effect counterpart to useChannel that invokes an onEvent callback once per raw protocol event without re-rendering. This is the idiomatic v1 replacement for the old onLangChainEvent / onCustomEvent callbacks for analytics and logging. Backed by a new framework-agnostic acquireChannelEffect helper in @langchain/langgraph-sdk/stream that shares a ref-counted subscription with matching useChannel consumers.

  • Updated dependencies [3855985, 7c3e9e9, 17c44a3]:

    • @langchain/langgraph-sdk@1.9.21

@langchain/vue@1.0.21

10 Jun 17:44
39df14b

Choose a tag to compare

Patch Changes

  • #2515 49b8c1a Thanks @christian-bromann! - fix: make AnyStream a true supertype so selector hooks need no cast

    A concrete useStream<typeof agent>() handle was not assignable to
    AnyStream because generic-computed covariant members (toolCalls,
    values) don't widen under anyInferToolCalls<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, ShallowRef for Vue,
    Signal for Angular) so the message/tool/value selector hooks accept a
    fully-typed stream without an as AnyStream cast.

@langchain/svelte@1.0.21

10 Jun 17:44
39df14b

Choose a tag to compare

Patch Changes

  • #2515 49b8c1a Thanks @christian-bromann! - fix: make AnyStream a true supertype so selector hooks need no cast

    A concrete useStream<typeof agent>() handle was not assignable to
    AnyStream because generic-computed covariant members (toolCalls,
    values) don't widen under anyInferToolCalls<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, ShallowRef for Vue,
    Signal for Angular) so the message/tool/value selector hooks accept a
    fully-typed stream without an as AnyStream cast.

@langchain/react@1.0.21

10 Jun 17:44
39df14b

Choose a tag to compare

Patch Changes

  • #2515 49b8c1a Thanks @christian-bromann! - fix: make AnyStream a true supertype so selector hooks need no cast

    A concrete useStream<typeof agent>() handle was not assignable to
    AnyStream because generic-computed covariant members (toolCalls,
    values) don't widen under anyInferToolCalls<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, ShallowRef for Vue,
    Signal for Angular) so the message/tool/value selector hooks accept a
    fully-typed stream without an as AnyStream cast.