langgraph-checkpoint 2.0.3__tar.gz → 2.0.4__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.
Files changed (19) hide show
  1. {langgraph_checkpoint-2.0.3 → langgraph_checkpoint-2.0.4}/PKG-INFO +1 -1
  2. {langgraph_checkpoint-2.0.3 → langgraph_checkpoint-2.0.4}/langgraph/checkpoint/base/__init__.py +3 -1
  3. {langgraph_checkpoint-2.0.3 → langgraph_checkpoint-2.0.4}/langgraph/checkpoint/serde/jsonplus.py +1 -17
  4. {langgraph_checkpoint-2.0.3 → langgraph_checkpoint-2.0.4}/langgraph/checkpoint/serde/types.py +2 -9
  5. {langgraph_checkpoint-2.0.3 → langgraph_checkpoint-2.0.4}/pyproject.toml +1 -1
  6. {langgraph_checkpoint-2.0.3 → langgraph_checkpoint-2.0.4}/LICENSE +0 -0
  7. {langgraph_checkpoint-2.0.3 → langgraph_checkpoint-2.0.4}/README.md +0 -0
  8. {langgraph_checkpoint-2.0.3 → langgraph_checkpoint-2.0.4}/langgraph/checkpoint/base/id.py +0 -0
  9. {langgraph_checkpoint-2.0.3 → langgraph_checkpoint-2.0.4}/langgraph/checkpoint/base/py.typed +0 -0
  10. {langgraph_checkpoint-2.0.3 → langgraph_checkpoint-2.0.4}/langgraph/checkpoint/memory/__init__.py +0 -0
  11. {langgraph_checkpoint-2.0.3 → langgraph_checkpoint-2.0.4}/langgraph/checkpoint/memory/py.typed +0 -0
  12. {langgraph_checkpoint-2.0.3 → langgraph_checkpoint-2.0.4}/langgraph/checkpoint/serde/__init__.py +0 -0
  13. {langgraph_checkpoint-2.0.3 → langgraph_checkpoint-2.0.4}/langgraph/checkpoint/serde/base.py +0 -0
  14. {langgraph_checkpoint-2.0.3 → langgraph_checkpoint-2.0.4}/langgraph/checkpoint/serde/py.typed +0 -0
  15. {langgraph_checkpoint-2.0.3 → langgraph_checkpoint-2.0.4}/langgraph/store/base/__init__.py +0 -0
  16. {langgraph_checkpoint-2.0.3 → langgraph_checkpoint-2.0.4}/langgraph/store/base/batch.py +0 -0
  17. {langgraph_checkpoint-2.0.3 → langgraph_checkpoint-2.0.4}/langgraph/store/base/py.typed +0 -0
  18. {langgraph_checkpoint-2.0.3 → langgraph_checkpoint-2.0.4}/langgraph/store/memory/__init__.py +0 -0
  19. {langgraph_checkpoint-2.0.3 → langgraph_checkpoint-2.0.4}/langgraph/store/memory/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: langgraph-checkpoint
3
- Version: 2.0.3
3
+ Version: 2.0.4
4
4
  Summary: Library with base interfaces for LangGraph checkpoint savers.
5
5
  Home-page: https://www.github.com/langchain-ai/langgraph
6
6
  License: MIT
@@ -24,6 +24,8 @@ from langgraph.checkpoint.serde.base import SerializerProtocol, maybe_add_typed_
24
24
  from langgraph.checkpoint.serde.jsonplus import JsonPlusSerializer
25
25
  from langgraph.checkpoint.serde.types import (
26
26
  ERROR,
27
+ INTERRUPT,
28
+ RESUME,
27
29
  SCHEDULED,
28
30
  ChannelProtocol,
29
31
  SendProtocol,
@@ -449,4 +451,4 @@ Special writes (e.g. errors) map to negative indices, to avoid those writes from
449
451
  conflicting with regular writes.
450
452
  Each Checkpointer implementation should use this mapping in put_writes.
451
453
  """
452
- WRITES_IDX_MAP = {ERROR: -1, SCHEDULED: -2}
454
+ WRITES_IDX_MAP = {ERROR: -1, SCHEDULED: -2, INTERRUPT: -3, RESUME: -4}
@@ -25,7 +25,7 @@ from langchain_core.load.serializable import Serializable
25
25
  from zoneinfo import ZoneInfo
26
26
 
27
27
  from langgraph.checkpoint.serde.base import SerializerProtocol
28
- from langgraph.checkpoint.serde.types import CommandProtocol, SendProtocol
28
+ from langgraph.checkpoint.serde.types import SendProtocol
29
29
  from langgraph.store.base import Item
30
30
 
31
31
  LC_REVIVER = Reviver()
@@ -122,11 +122,6 @@ class JsonPlusSerializer(SerializerProtocol):
122
122
  return self._encode_constructor_args(
123
123
  obj.__class__, kwargs={"node": obj.node, "arg": obj.arg}
124
124
  )
125
- elif isinstance(obj, CommandProtocol):
126
- return self._encode_constructor_args(
127
- obj.__class__,
128
- kwargs={k: getattr(obj, k) for k in obj.__all_slots__},
129
- )
130
125
  elif isinstance(obj, (bytes, bytearray)):
131
126
  return self._encode_constructor_args(
132
127
  obj.__class__, method="fromhex", args=(obj.hex(),)
@@ -407,17 +402,6 @@ def _msgpack_default(obj: Any) -> Union[str, msgpack.ExtType]:
407
402
  (obj.__class__.__module__, obj.__class__.__name__, (obj.node, obj.arg)),
408
403
  ),
409
404
  )
410
- elif isinstance(obj, CommandProtocol):
411
- return msgpack.ExtType(
412
- EXT_CONSTRUCTOR_KW_ARGS,
413
- _msgpack_enc(
414
- (
415
- obj.__class__.__module__,
416
- obj.__class__.__name__,
417
- {k: getattr(obj, k) for k in obj.__all_slots__},
418
- ),
419
- ),
420
- )
421
405
  elif dataclasses.is_dataclass(obj):
422
406
  # doesn't use dataclasses.asdict to avoid deepcopy and recursion
423
407
  return msgpack.ExtType(
@@ -4,7 +4,6 @@ from typing import (
4
4
  Protocol,
5
5
  Sequence,
6
6
  TypeVar,
7
- Union,
8
7
  runtime_checkable,
9
8
  )
10
9
 
@@ -12,6 +11,8 @@ from typing_extensions import Self
12
11
 
13
12
  ERROR = "__error__"
14
13
  SCHEDULED = "__scheduled__"
14
+ INTERRUPT = "__interrupt__"
15
+ RESUME = "__resume__"
15
16
  TASKS = "__pregel_tasks"
16
17
 
17
18
  Value = TypeVar("Value", covariant=True)
@@ -49,11 +50,3 @@ class SendProtocol(Protocol):
49
50
  def __repr__(self) -> str: ...
50
51
 
51
52
  def __eq__(self, value: object) -> bool: ...
52
-
53
-
54
- @runtime_checkable
55
- class CommandProtocol(Protocol):
56
- # Mirrors langgraph.types.Command
57
- update: Optional[dict[str, Any]]
58
- send: Union[Any, Sequence[Any]]
59
- __all_slots__: set[str]
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "langgraph-checkpoint"
3
- version = "2.0.3"
3
+ version = "2.0.4"
4
4
  description = "Library with base interfaces for LangGraph checkpoint savers."
5
5
  authors = []
6
6
  license = "MIT"