langgraph-runtime-inmem 0.32.0.dev15__tar.gz → 0.32.0.dev17__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {langgraph_runtime_inmem-0.32.0.dev15 → langgraph_runtime_inmem-0.32.0.dev17}/PKG-INFO +1 -1
- {langgraph_runtime_inmem-0.32.0.dev15 → langgraph_runtime_inmem-0.32.0.dev17}/langgraph_runtime_inmem/__init__.py +1 -1
- {langgraph_runtime_inmem-0.32.0.dev15 → langgraph_runtime_inmem-0.32.0.dev17}/langgraph_runtime_inmem/ops.py +21 -22
- {langgraph_runtime_inmem-0.32.0.dev15 → langgraph_runtime_inmem-0.32.0.dev17}/.gitignore +0 -0
- {langgraph_runtime_inmem-0.32.0.dev15 → langgraph_runtime_inmem-0.32.0.dev17}/Makefile +0 -0
- {langgraph_runtime_inmem-0.32.0.dev15 → langgraph_runtime_inmem-0.32.0.dev17}/README.md +0 -0
- {langgraph_runtime_inmem-0.32.0.dev15 → langgraph_runtime_inmem-0.32.0.dev17}/langgraph_runtime_inmem/_persistence.py +0 -0
- {langgraph_runtime_inmem-0.32.0.dev15 → langgraph_runtime_inmem-0.32.0.dev17}/langgraph_runtime_inmem/checkpoint.py +0 -0
- {langgraph_runtime_inmem-0.32.0.dev15 → langgraph_runtime_inmem-0.32.0.dev17}/langgraph_runtime_inmem/database.py +0 -0
- {langgraph_runtime_inmem-0.32.0.dev15 → langgraph_runtime_inmem-0.32.0.dev17}/langgraph_runtime_inmem/inmem_stream.py +0 -0
- {langgraph_runtime_inmem-0.32.0.dev15 → langgraph_runtime_inmem-0.32.0.dev17}/langgraph_runtime_inmem/lifespan.py +0 -0
- {langgraph_runtime_inmem-0.32.0.dev15 → langgraph_runtime_inmem-0.32.0.dev17}/langgraph_runtime_inmem/metrics.py +0 -0
- {langgraph_runtime_inmem-0.32.0.dev15 → langgraph_runtime_inmem-0.32.0.dev17}/langgraph_runtime_inmem/queue.py +0 -0
- {langgraph_runtime_inmem-0.32.0.dev15 → langgraph_runtime_inmem-0.32.0.dev17}/langgraph_runtime_inmem/retry.py +0 -0
- {langgraph_runtime_inmem-0.32.0.dev15 → langgraph_runtime_inmem-0.32.0.dev17}/langgraph_runtime_inmem/routes.py +0 -0
- {langgraph_runtime_inmem-0.32.0.dev15 → langgraph_runtime_inmem-0.32.0.dev17}/langgraph_runtime_inmem/store.py +0 -0
- {langgraph_runtime_inmem-0.32.0.dev15 → langgraph_runtime_inmem-0.32.0.dev17}/pyproject.toml +0 -0
- {langgraph_runtime_inmem-0.32.0.dev15 → langgraph_runtime_inmem-0.32.0.dev17}/uv.lock +0 -0
|
@@ -75,6 +75,23 @@ LANGGRAPH_PY_MINOR = tuple(map(int, __version__.split(".")[:2]))
|
|
|
75
75
|
USE_NEW_INTERRUPTS = LANGGRAPH_PY_MINOR >= (0, 6)
|
|
76
76
|
|
|
77
77
|
|
|
78
|
+
def _run_stream_mode_matches(event_mode: str, stream_mode: list[str] | None) -> bool:
|
|
79
|
+
"""Return True if a published run-stream event matches the join filter."""
|
|
80
|
+
if not stream_mode:
|
|
81
|
+
return True
|
|
82
|
+
if event_mode in stream_mode:
|
|
83
|
+
return True
|
|
84
|
+
if (
|
|
85
|
+
"messages" in stream_mode or "messages-tuple" in stream_mode
|
|
86
|
+
) and event_mode.startswith("messages"):
|
|
87
|
+
return True
|
|
88
|
+
if "|" in event_mode:
|
|
89
|
+
base_mode, _, _ = event_mode.partition("|")
|
|
90
|
+
if base_mode in stream_mode:
|
|
91
|
+
return True
|
|
92
|
+
return False
|
|
93
|
+
|
|
94
|
+
|
|
78
95
|
def _ensure_uuid(id_: str | uuid.UUID | None) -> uuid.UUID:
|
|
79
96
|
if isinstance(id_, str):
|
|
80
97
|
return uuid.UUID(id_)
|
|
@@ -2447,6 +2464,7 @@ class Runs(Authenticated):
|
|
|
2447
2464
|
if_not_exists: IfNotExists = "reject",
|
|
2448
2465
|
after_seconds: int = 0,
|
|
2449
2466
|
ctx: Auth.types.BaseAuthContext | None = None,
|
|
2467
|
+
langsmith_session_name: str | None = None,
|
|
2450
2468
|
) -> AsyncIterator[Run]:
|
|
2451
2469
|
"""Create a run."""
|
|
2452
2470
|
from langgraph_api.schema import Run, Thread # noqa: PLC0415
|
|
@@ -2642,6 +2660,7 @@ class Runs(Authenticated):
|
|
|
2642
2660
|
multitask_strategy=multitask_strategy,
|
|
2643
2661
|
created_at=datetime.now(UTC) + timedelta(seconds=after_seconds),
|
|
2644
2662
|
updated_at=datetime.now(UTC),
|
|
2663
|
+
langsmith_session_name=langsmith_session_name,
|
|
2645
2664
|
)
|
|
2646
2665
|
conn.store["runs"].append(new_run)
|
|
2647
2666
|
|
|
@@ -3036,17 +3055,7 @@ class Runs(Authenticated):
|
|
|
3036
3055
|
if mode == "control":
|
|
3037
3056
|
if payload == b"done":
|
|
3038
3057
|
return
|
|
3039
|
-
elif (
|
|
3040
|
-
not stream_mode
|
|
3041
|
-
or mode in stream_mode
|
|
3042
|
-
or (
|
|
3043
|
-
(
|
|
3044
|
-
"messages" in stream_mode
|
|
3045
|
-
or "messages-tuple" in stream_mode
|
|
3046
|
-
)
|
|
3047
|
-
and mode.startswith("messages")
|
|
3048
|
-
)
|
|
3049
|
-
):
|
|
3058
|
+
elif _run_stream_mode_matches(mode, stream_mode):
|
|
3050
3059
|
yield mode.encode(), payload, id
|
|
3051
3060
|
logger.debug(
|
|
3052
3061
|
"Replayed run event",
|
|
@@ -3068,17 +3077,7 @@ class Runs(Authenticated):
|
|
|
3068
3077
|
if mode == "control":
|
|
3069
3078
|
if payload == b"done":
|
|
3070
3079
|
break
|
|
3071
|
-
elif (
|
|
3072
|
-
not stream_mode
|
|
3073
|
-
or mode in stream_mode
|
|
3074
|
-
or (
|
|
3075
|
-
(
|
|
3076
|
-
"messages" in stream_mode
|
|
3077
|
-
or "messages-tuple" in stream_mode
|
|
3078
|
-
)
|
|
3079
|
-
and mode.startswith("messages")
|
|
3080
|
-
)
|
|
3081
|
-
):
|
|
3080
|
+
elif _run_stream_mode_matches(mode, stream_mode):
|
|
3082
3081
|
# We only return a stream ID if the run is resumable
|
|
3083
3082
|
stream_id = (
|
|
3084
3083
|
id
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langgraph_runtime_inmem-0.32.0.dev15 → langgraph_runtime_inmem-0.32.0.dev17}/pyproject.toml
RENAMED
|
File without changes
|
|
File without changes
|