langgraph-checkpoint 2.0.2__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.2 → langgraph_checkpoint-2.0.4}/PKG-INFO +1 -1
  2. {langgraph_checkpoint-2.0.2 → langgraph_checkpoint-2.0.4}/langgraph/checkpoint/base/__init__.py +3 -1
  3. {langgraph_checkpoint-2.0.2 → langgraph_checkpoint-2.0.4}/langgraph/checkpoint/memory/__init__.py +4 -0
  4. {langgraph_checkpoint-2.0.2 → langgraph_checkpoint-2.0.4}/langgraph/checkpoint/serde/types.py +2 -0
  5. {langgraph_checkpoint-2.0.2 → langgraph_checkpoint-2.0.4}/pyproject.toml +1 -1
  6. {langgraph_checkpoint-2.0.2 → langgraph_checkpoint-2.0.4}/LICENSE +0 -0
  7. {langgraph_checkpoint-2.0.2 → langgraph_checkpoint-2.0.4}/README.md +0 -0
  8. {langgraph_checkpoint-2.0.2 → langgraph_checkpoint-2.0.4}/langgraph/checkpoint/base/id.py +0 -0
  9. {langgraph_checkpoint-2.0.2 → langgraph_checkpoint-2.0.4}/langgraph/checkpoint/base/py.typed +0 -0
  10. {langgraph_checkpoint-2.0.2 → langgraph_checkpoint-2.0.4}/langgraph/checkpoint/memory/py.typed +0 -0
  11. {langgraph_checkpoint-2.0.2 → langgraph_checkpoint-2.0.4}/langgraph/checkpoint/serde/__init__.py +0 -0
  12. {langgraph_checkpoint-2.0.2 → langgraph_checkpoint-2.0.4}/langgraph/checkpoint/serde/base.py +0 -0
  13. {langgraph_checkpoint-2.0.2 → langgraph_checkpoint-2.0.4}/langgraph/checkpoint/serde/jsonplus.py +0 -0
  14. {langgraph_checkpoint-2.0.2 → langgraph_checkpoint-2.0.4}/langgraph/checkpoint/serde/py.typed +0 -0
  15. {langgraph_checkpoint-2.0.2 → langgraph_checkpoint-2.0.4}/langgraph/store/base/__init__.py +0 -0
  16. {langgraph_checkpoint-2.0.2 → langgraph_checkpoint-2.0.4}/langgraph/store/base/batch.py +0 -0
  17. {langgraph_checkpoint-2.0.2 → langgraph_checkpoint-2.0.4}/langgraph/store/base/py.typed +0 -0
  18. {langgraph_checkpoint-2.0.2 → langgraph_checkpoint-2.0.4}/langgraph/store/memory/__init__.py +0 -0
  19. {langgraph_checkpoint-2.0.2 → 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.2
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}
@@ -364,8 +364,12 @@ class MemorySaver(
364
364
  checkpoint_ns = config["configurable"]["checkpoint_ns"]
365
365
  checkpoint_id = config["configurable"]["checkpoint_id"]
366
366
  outer_key = (thread_id, checkpoint_ns, checkpoint_id)
367
+ outer_writes_ = self.writes.get(outer_key)
367
368
  for idx, (c, v) in enumerate(writes):
368
369
  inner_key = (task_id, WRITES_IDX_MAP.get(c, idx))
370
+ if inner_key[1] >= 0 and outer_writes_ and inner_key in outer_writes_:
371
+ continue
372
+
369
373
  self.writes[outer_key][inner_key] = (task_id, c, self.serde.dumps_typed(v))
370
374
 
371
375
  async def aget_tuple(self, config: RunnableConfig) -> Optional[CheckpointTuple]:
@@ -11,6 +11,8 @@ from typing_extensions import Self
11
11
 
12
12
  ERROR = "__error__"
13
13
  SCHEDULED = "__scheduled__"
14
+ INTERRUPT = "__interrupt__"
15
+ RESUME = "__resume__"
14
16
  TASKS = "__pregel_tasks"
15
17
 
16
18
  Value = TypeVar("Value", covariant=True)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "langgraph-checkpoint"
3
- version = "2.0.2"
3
+ version = "2.0.4"
4
4
  description = "Library with base interfaces for LangGraph checkpoint savers."
5
5
  authors = []
6
6
  license = "MIT"