langgraph-runtime-inmem 0.17.1__tar.gz → 0.18.0__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.17.1 → langgraph_runtime_inmem-0.18.0}/PKG-INFO +1 -1
- {langgraph_runtime_inmem-0.17.1 → langgraph_runtime_inmem-0.18.0}/langgraph_runtime_inmem/__init__.py +1 -1
- {langgraph_runtime_inmem-0.17.1 → langgraph_runtime_inmem-0.18.0}/langgraph_runtime_inmem/ops.py +24 -1
- {langgraph_runtime_inmem-0.17.1 → langgraph_runtime_inmem-0.18.0}/.gitignore +0 -0
- {langgraph_runtime_inmem-0.17.1 → langgraph_runtime_inmem-0.18.0}/Makefile +0 -0
- {langgraph_runtime_inmem-0.17.1 → langgraph_runtime_inmem-0.18.0}/README.md +0 -0
- {langgraph_runtime_inmem-0.17.1 → langgraph_runtime_inmem-0.18.0}/langgraph_runtime_inmem/checkpoint.py +0 -0
- {langgraph_runtime_inmem-0.17.1 → langgraph_runtime_inmem-0.18.0}/langgraph_runtime_inmem/database.py +0 -0
- {langgraph_runtime_inmem-0.17.1 → langgraph_runtime_inmem-0.18.0}/langgraph_runtime_inmem/inmem_stream.py +0 -0
- {langgraph_runtime_inmem-0.17.1 → langgraph_runtime_inmem-0.18.0}/langgraph_runtime_inmem/lifespan.py +0 -0
- {langgraph_runtime_inmem-0.17.1 → langgraph_runtime_inmem-0.18.0}/langgraph_runtime_inmem/metrics.py +0 -0
- {langgraph_runtime_inmem-0.17.1 → langgraph_runtime_inmem-0.18.0}/langgraph_runtime_inmem/queue.py +0 -0
- {langgraph_runtime_inmem-0.17.1 → langgraph_runtime_inmem-0.18.0}/langgraph_runtime_inmem/retry.py +0 -0
- {langgraph_runtime_inmem-0.17.1 → langgraph_runtime_inmem-0.18.0}/langgraph_runtime_inmem/store.py +0 -0
- {langgraph_runtime_inmem-0.17.1 → langgraph_runtime_inmem-0.18.0}/pyproject.toml +0 -0
- {langgraph_runtime_inmem-0.17.1 → langgraph_runtime_inmem-0.18.0}/uv.lock +0 -0
{langgraph_runtime_inmem-0.17.1 → langgraph_runtime_inmem-0.18.0}/langgraph_runtime_inmem/ops.py
RENAMED
|
@@ -1700,7 +1700,9 @@ class Threads(Authenticated):
|
|
|
1700
1700
|
|
|
1701
1701
|
return []
|
|
1702
1702
|
|
|
1703
|
-
class Stream:
|
|
1703
|
+
class Stream(Authenticated):
|
|
1704
|
+
resource = "threads"
|
|
1705
|
+
|
|
1704
1706
|
@staticmethod
|
|
1705
1707
|
async def subscribe(
|
|
1706
1708
|
conn: InMemConnectionProto | AsyncConnectionProto,
|
|
@@ -1736,8 +1738,11 @@ class Threads(Authenticated):
|
|
|
1736
1738
|
*,
|
|
1737
1739
|
last_event_id: str | None = None,
|
|
1738
1740
|
stream_modes: list[ThreadStreamMode],
|
|
1741
|
+
ctx: Auth.types.BaseAuthContext | None = None,
|
|
1739
1742
|
) -> AsyncIterator[tuple[bytes, bytes, bytes | None]]:
|
|
1740
1743
|
"""Stream the thread output."""
|
|
1744
|
+
await Threads.Stream.check_thread_stream_auth(thread_id, ctx)
|
|
1745
|
+
|
|
1741
1746
|
from langgraph_api.utils.stream_codec import (
|
|
1742
1747
|
decode_stream_message,
|
|
1743
1748
|
)
|
|
@@ -1889,6 +1894,24 @@ class Threads(Authenticated):
|
|
|
1889
1894
|
str(thread_id), Message(topic=topic, data=payload)
|
|
1890
1895
|
)
|
|
1891
1896
|
|
|
1897
|
+
@staticmethod
|
|
1898
|
+
async def check_thread_stream_auth(
|
|
1899
|
+
thread_id: UUID,
|
|
1900
|
+
ctx: Auth.types.BaseAuthContext | None = None,
|
|
1901
|
+
) -> None:
|
|
1902
|
+
async with connect() as conn:
|
|
1903
|
+
filters = await Threads.Stream.handle_event(
|
|
1904
|
+
ctx,
|
|
1905
|
+
"read",
|
|
1906
|
+
Auth.types.ThreadsRead(thread_id=thread_id),
|
|
1907
|
+
)
|
|
1908
|
+
if filters:
|
|
1909
|
+
thread = await Threads._get_with_filters(
|
|
1910
|
+
cast(InMemConnectionProto, conn), thread_id, filters
|
|
1911
|
+
)
|
|
1912
|
+
if not thread:
|
|
1913
|
+
raise HTTPException(status_code=404, detail="Thread not found")
|
|
1914
|
+
|
|
1892
1915
|
@staticmethod
|
|
1893
1916
|
async def count(
|
|
1894
1917
|
conn: InMemConnectionProto,
|
|
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.17.1 → langgraph_runtime_inmem-0.18.0}/langgraph_runtime_inmem/metrics.py
RENAMED
|
File without changes
|
{langgraph_runtime_inmem-0.17.1 → langgraph_runtime_inmem-0.18.0}/langgraph_runtime_inmem/queue.py
RENAMED
|
File without changes
|
{langgraph_runtime_inmem-0.17.1 → langgraph_runtime_inmem-0.18.0}/langgraph_runtime_inmem/retry.py
RENAMED
|
File without changes
|
{langgraph_runtime_inmem-0.17.1 → langgraph_runtime_inmem-0.18.0}/langgraph_runtime_inmem/store.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|