langgraph-runtime-inmem 0.38.0.dev2__py3-none-any.whl → 0.38.0.dev4__py3-none-any.whl

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.
@@ -11,7 +11,7 @@ from langgraph_runtime_inmem import (
11
11
  store,
12
12
  )
13
13
 
14
- __version__ = "0.38.0.dev2"
14
+ __version__ = "0.38.0.dev4"
15
15
  __all__ = [
16
16
  "ops",
17
17
  "database",
@@ -2296,9 +2296,16 @@ class Threads(Authenticated):
2296
2296
  last_event_id: str | None = None,
2297
2297
  stream_modes: list[ThreadStreamMode],
2298
2298
  ctx: Auth.types.BaseAuthContext | None = None,
2299
+ auth_filters: Auth.types.FilterType | None = None,
2299
2300
  ) -> AsyncIterator[tuple[bytes, bytes, bytes | None, str | None]]:
2300
- """Stream the thread output."""
2301
- await Threads.Stream.check_thread_stream_auth(thread_id, ctx)
2301
+ """Stream the thread output.
2302
+
2303
+ ``auth_filters`` comes from a ``check_thread_stream_auth`` the
2304
+ caller already ran, so the read handler doesn't run twice. With
2305
+ ``None``, the check runs here.
2306
+ """
2307
+ if auth_filters is None:
2308
+ await Threads.Stream.check_thread_stream_auth(thread_id, ctx)
2302
2309
 
2303
2310
  from langgraph_api.utils.stream_codec import ( # noqa: PLC0415
2304
2311
  decode_stream_message,
@@ -2498,7 +2505,11 @@ class Threads(Authenticated):
2498
2505
  async def check_thread_stream_auth(
2499
2506
  thread_id: UUID,
2500
2507
  ctx: Auth.types.BaseAuthContext | None = None,
2501
- ) -> None:
2508
+ ) -> Auth.types.FilterType:
2509
+ """Raise 403/404 for a thread the caller can't read.
2510
+
2511
+ Returns the auth filters for ``join_event_streaming``.
2512
+ """
2502
2513
  async with connect() as conn:
2503
2514
  filters = await Threads.Stream.handle_event(
2504
2515
  ctx,
@@ -2511,6 +2522,7 @@ class Threads(Authenticated):
2511
2522
  )
2512
2523
  if not thread:
2513
2524
  raise HTTPException(status_code=404, detail="Thread not found")
2525
+ return filters or {}
2514
2526
 
2515
2527
  @staticmethod
2516
2528
  async def count(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langgraph-runtime-inmem
3
- Version: 0.38.0.dev2
3
+ Version: 0.38.0.dev4
4
4
  Summary: Inmem implementation for the LangGraph API server.
5
5
  Author-email: Will Fu-Hinthorn <will@langchain.dev>
6
6
  License: Elastic-2.0
@@ -1,4 +1,4 @@
1
- langgraph_runtime_inmem/__init__.py,sha256=ea5SaNW7T8R_LO86IIlnQH0gypIxE4T4gWVLd_OFLz4,376
1
+ langgraph_runtime_inmem/__init__.py,sha256=EO6nkZC6AJCoXuoR7Vx0-6dqLb0QLO7zyEsTfWs4WHc,376
2
2
  langgraph_runtime_inmem/_persistence.py,sha256=ZR0jdrZCoofwrx18bLNT4uDXNnicIlMbZeo75ZjYIII,2992
3
3
  langgraph_runtime_inmem/checkpoint.py,sha256=-0RZP74BScWRUEyc9czP07aP2PvVLlQbXUGRakOQIl4,10796
4
4
  langgraph_runtime_inmem/database.py,sha256=8qsk9V_g0rliyFt8aMfbDsea0elp0VPn_9xUpvA06a0,11150
@@ -6,11 +6,11 @@ langgraph_runtime_inmem/encryption.py,sha256=YBYkAjLGF4Yxc2cbpON2q0HkkIfP6hBg0RW
6
6
  langgraph_runtime_inmem/inmem_stream.py,sha256=ZKwPFtSFcQfdDLSIkEBpUXv692YdPpzpcqy5wzJjcUY,9207
7
7
  langgraph_runtime_inmem/lifespan.py,sha256=F93NL8ckeJGe78WhNMeC0ysOchSBym69KwyHIa_yqkY,6736
8
8
  langgraph_runtime_inmem/metrics.py,sha256=vcTTwHsh8AZkOCg1t0f2QvgjWnqxN98YivLVyb4hwVM,420
9
- langgraph_runtime_inmem/ops.py,sha256=5oywveUy6LWdKa8f5P8fBAfcQteBl1jWLNTCtfN8vPQ,171006
9
+ langgraph_runtime_inmem/ops.py,sha256=vfvllIAIvltQRtcWFKeWeJPRJzVqVxmqkA7IicJhwzw,171517
10
10
  langgraph_runtime_inmem/queue.py,sha256=Ahr1kpzw5N3FKagaB65rzbO0DMLr2Mq-5j02AGh8c-I,15928
11
11
  langgraph_runtime_inmem/retry.py,sha256=XmldOP4e_H5s264CagJRVnQMDFcEJR_dldVR1Hm5XvM,763
12
12
  langgraph_runtime_inmem/routes.py,sha256=QtG9KPForGQHwMZYzl3BRV4Zy1pt0zJxPCX2hO0gaqY,18693
13
13
  langgraph_runtime_inmem/store.py,sha256=ENnW5YCxPRe3PQfiwxmHdBWxhf4FMX09ZWVPMuAlAWk,4179
14
- langgraph_runtime_inmem-0.38.0.dev2.dist-info/METADATA,sha256=ISrH0mtV_lUiKdmkKn9RWxXDkhjeClZiq-tXuNxXmQI,606
15
- langgraph_runtime_inmem-0.38.0.dev2.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
16
- langgraph_runtime_inmem-0.38.0.dev2.dist-info/RECORD,,
14
+ langgraph_runtime_inmem-0.38.0.dev4.dist-info/METADATA,sha256=p8NrFpOk8WGV427AndRMTvsYLMP8LY4zQTnINLyoduk,606
15
+ langgraph_runtime_inmem-0.38.0.dev4.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
16
+ langgraph_runtime_inmem-0.38.0.dev4.dist-info/RECORD,,