Merge branch 'main' into v1

This commit is contained in:
Sydney Runkle
2025-07-21 14:35:13 -04:00
committed by GitHub
7 changed files with 13 additions and 7 deletions
+7 -1
View File
@@ -41,7 +41,7 @@ from langgraph._internal._constants import (
NS_SEP,
)
from langgraph.checkpoint.base import CheckpointMetadata
from langgraph.errors import GraphInterrupt
from langgraph.errors import GraphInterrupt, ParentCommand
from langgraph.pregel.protocol import PregelProtocol, StreamProtocol
from langgraph.types import (
All,
@@ -680,6 +680,9 @@ class RemoteGraph(PregelProtocol):
ns = tuple(ns_.split(NS_SEP))
else:
mode, ns = chunk.event, ()
# raise ParentCommand exception for command events
if mode == "command" and chunk.data.get("graph") == Command.PARENT:
raise ParentCommand(Command(**chunk.data))
# prepend caller ns (as it is not passed to remote graph)
if caller_ns := (config or {}).get(CONF, {}).get(CONFIG_KEY_CHECKPOINT_NS):
caller_ns = tuple(caller_ns.split(NS_SEP))
@@ -779,6 +782,9 @@ class RemoteGraph(PregelProtocol):
ns = tuple(ns_.split(NS_SEP))
else:
mode, ns = chunk.event, ()
# raise ParentCommand exception for command events
if mode == "command" and chunk.data.get("graph") == Command.PARENT:
raise ParentCommand(Command(**chunk.data))
# prepend caller ns (as it is not passed to remote graph)
if caller_ns := (config or {}).get(CONF, {}).get(CONFIG_KEY_CHECKPOINT_NS):
caller_ns = tuple(caller_ns.split(NS_SEP))
+1 -1
View File
@@ -6958,4 +6958,4 @@ def test_subgraph_to_end_does_not_warn() -> None:
graph = builder.compile()
response = graph.invoke({"x": "hello"})
print(response)
assert response == {"x": "hello!"}
+1 -1
View File
@@ -1481,7 +1481,7 @@ wheels = [
[[package]]
name = "langgraph-sdk"
version = "0.1.73"
version = "0.1.74"
source = { editable = "../sdk-py" }
dependencies = [
{ name = "httpx" },
+1 -1
View File
@@ -507,7 +507,7 @@ dev = [
[[package]]
name = "langgraph-sdk"
version = "0.1.73"
version = "0.1.74"
source = { editable = "../sdk-py" }
dependencies = [
{ name = "httpx" },
+1 -1
View File
@@ -247,7 +247,7 @@ class Thread(TypedDict):
values: Json
"""The current state of the thread."""
interrupts: dict[str, list[Interrupt]]
"""Interrupts which were thrown in this thread"""
"""Mapping of task ids to interrupts that were raised in that task."""
class ThreadTask(TypedDict):
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "langgraph-sdk"
version = "0.1.73"
version = "0.1.74"
description = "SDK for interacting with LangGraph API"
authors = []
requires-python = ">=3.9"
+1 -1
View File
@@ -119,7 +119,7 @@ wheels = [
[[package]]
name = "langgraph-sdk"
version = "0.1.73"
version = "0.1.74"
source = { editable = "." }
dependencies = [
{ name = "httpx" },