langgraph-api 0.9.0.dev2__py3-none-any.whl → 0.9.0.dev3__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.
langgraph_api/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.9.0.dev2"
1
+ __version__ = "0.9.0.dev3"
@@ -749,14 +749,23 @@ class ThreadRunManager:
749
749
  async def get_thread_state() -> dict[str, Any] | None:
750
750
  from langgraph_runtime.database import connect # noqa: PLC0415
751
751
 
752
+ # ``supports_core_api=False`` so the postgres backend yields a
753
+ # real connection. ``State.get`` uses the local checkpointer
754
+ # and needs a usable ``conn`` — the default flag yields None.
752
755
  try:
753
- async with connect() as conn:
756
+ async with connect(supports_core_api=False) as conn:
754
757
  return await self._threads.State.get(
755
758
  conn,
756
759
  {"configurable": {"thread_id": thread_id}},
757
760
  subgraphs=True,
758
761
  )
759
- except Exception:
762
+ except Exception as exc:
763
+ logger.warning(
764
+ "terminal_thread_state_fetch_failed",
765
+ thread_id=thread_id,
766
+ error=str(exc),
767
+ error_type=type(exc).__name__,
768
+ )
760
769
  return None
761
770
 
762
771
  return get_thread_state
@@ -855,14 +864,25 @@ class ThreadRunManager:
855
864
  """
856
865
  from langgraph_runtime.database import connect # noqa: PLC0415
857
866
 
867
+ # ``supports_core_api=False`` so the postgres backend yields a
868
+ # real connection. The default (``True``) yields ``None`` because
869
+ # data ops normally go through the gRPC server — but ``State.get``
870
+ # uses the local checkpointer and needs a usable ``conn``.
858
871
  try:
859
- async with connect() as conn:
872
+ async with connect(supports_core_api=False) as conn:
860
873
  state = await self._threads.State.get(
861
874
  conn,
862
875
  {"configurable": {"thread_id": self._thread_id}},
863
876
  subgraphs=True,
864
877
  )
865
- except Exception:
878
+ except Exception as exc:
879
+ logger.warning(
880
+ "interrupt_lookup_failed",
881
+ thread_id=self._thread_id,
882
+ interrupt_id=interrupt_id,
883
+ error=str(exc),
884
+ error_type=type(exc).__name__,
885
+ )
866
886
  return None
867
887
 
868
888
  tasks = (
@@ -903,7 +923,7 @@ class ThreadRunManager:
903
923
  from langgraph_runtime.database import connect # noqa: PLC0415
904
924
 
905
925
  try:
906
- async with connect() as conn:
926
+ async with connect(supports_core_api=False) as conn:
907
927
  state = await self._threads.State.get(
908
928
  conn,
909
929
  {"configurable": {"thread_id": self._thread_id}},
@@ -929,7 +949,13 @@ class ThreadRunManager:
929
949
  if isinstance(interrupts, (list, tuple)) and len(interrupts) > 0:
930
950
  return True
931
951
  return False
932
- except Exception:
952
+ except Exception as exc:
953
+ logger.warning(
954
+ "has_pending_interrupts_failed",
955
+ thread_id=self._thread_id,
956
+ error=str(exc),
957
+ error_type=type(exc).__name__,
958
+ )
933
959
  return False
934
960
 
935
961
  # ------------------------------------------------------------------
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langgraph-api
3
- Version: 0.9.0.dev2
3
+ Version: 0.9.0.dev3
4
4
  Author-email: Will Fu-Hinthorn <will@langchain.dev>, Josh Rogers <josh@langchain.dev>, Parker Rule <parker@langchain.dev>
5
5
  License: Elastic-2.0
6
6
  License-File: LICENSE
@@ -1,4 +1,4 @@
1
- langgraph_api/__init__.py,sha256=OA6ui95bpZ7UO1pe4DX_0FpZQ1FkZuDKl24sf3avREg,27
1
+ langgraph_api/__init__.py,sha256=rT-z7MS6SjjAW-hNfa1lcceqLHtmubGcbZwqU32848M,27
2
2
  langgraph_api/_factory_utils.py,sha256=5JsiJbg_YocVSryN2jwoZTg03-eyymlWMK6sKCmXwz0,5756
3
3
  langgraph_api/asgi_transport.py,sha256=XApY3lIWBZTMbbsl8dDJzl0cLGirmAGE0SifqZUnXvs,11896
4
4
  langgraph_api/asyncio.py,sha256=c-YE-14N7_AP1GzifsbP14XnhLsmxT2P916KXruerpI,10573
@@ -77,7 +77,7 @@ langgraph_api/event_streaming/capabilities.py,sha256=qjVbhCjl1VEQPGeiDxeJAhYGI_7
77
77
  langgraph_api/event_streaming/constants.py,sha256=eGsm-NvOlqV3gNxDO5vlr00FdngmgEQf59zuHSi_74E,1378
78
78
  langgraph_api/event_streaming/event_normalizers.py,sha256=5bVSqGPW-Uh7WX91qgTfwpK433pCSv_wchpbzW8TLi4,2794
79
79
  langgraph_api/event_streaming/namespace.py,sha256=aJDFt45Or2_bQdRpKJgdFhBgTDj6PYl7Coz5GzfbM84,1509
80
- langgraph_api/event_streaming/service.py,sha256=-nQqyqOD3UklRpXq_s2V0uHKF0_cBNXM9jTcUmIYDqk,39327
80
+ langgraph_api/event_streaming/service.py,sha256=Ca5rQiFPZhKcIyXjkyfpAFCrzqet__I_zfUjnXEapgk,40629
81
81
  langgraph_api/event_streaming/session.py,sha256=uBVhHMPGiCLliOLDBAiLRf6w2yDgFnKU4vND4IKAwS8,73749
82
82
  langgraph_api/event_streaming/state_normalizers.py,sha256=fEjb9AWihhZeqkGOlTBYmph06XAP3AvyAkNmNdquqAU,13113
83
83
  langgraph_api/event_streaming/types.py,sha256=uIrsW1B99PUPOUh4x7RKog88DImySrnaEThMW6DdjB4,3509
@@ -228,8 +228,8 @@ langgraph_grpc_common/proto/errors_pb2.py,sha256=JI6x-vBK1AE7DHZ5DQwN1mZWF6C4xTR
228
228
  langgraph_grpc_common/proto/errors_pb2.pyi,sha256=rd3-BYUH8V-aO66taL7OOblaLgdrDtf1Vcd38GUoVVM,2181
229
229
  langgraph_grpc_common/proto/errors_pb2_grpc.py,sha256=2-LwQ0OPGo-NtC0269q7Fw6GPBxnTLYWq3xP5Eq0_YA,886
230
230
  langgraph_grpc_common/proto/errors_pb2_grpc.pyi,sha256=uC9Wnq6uyg488QiONpJ0ba1s_iouQCOYsjd_FDd1XUM,495
231
- langgraph_api-0.9.0.dev2.dist-info/METADATA,sha256=SYSzqFB3TQRUqaK9bNuxy22EfRRSGw9HwXLpYgGGda8,4516
232
- langgraph_api-0.9.0.dev2.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
233
- langgraph_api-0.9.0.dev2.dist-info/entry_points.txt,sha256=hGedv8n7cgi41PypMfinwS_HfCwA7xJIfS0jAp8htV8,78
234
- langgraph_api-0.9.0.dev2.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
235
- langgraph_api-0.9.0.dev2.dist-info/RECORD,,
231
+ langgraph_api-0.9.0.dev3.dist-info/METADATA,sha256=uSDwXIVruhpFKitSJeLY0GYBNIMLEobchCCAap1Vux8,4516
232
+ langgraph_api-0.9.0.dev3.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
233
+ langgraph_api-0.9.0.dev3.dist-info/entry_points.txt,sha256=hGedv8n7cgi41PypMfinwS_HfCwA7xJIfS0jAp8htV8,78
234
+ langgraph_api-0.9.0.dev3.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
235
+ langgraph_api-0.9.0.dev3.dist-info/RECORD,,