langgraph-checkpoint-sqlite 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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: langgraph-checkpoint-sqlite
3
- Version: 2.0.3
3
+ Version: 2.0.4
4
4
  Summary: Library with a SQLite implementation of LangGraph checkpoint saver.
5
5
  Home-page: https://www.github.com/langchain-ai/langgraph
6
6
  License: MIT
@@ -397,7 +397,17 @@ class SqliteSaver(BaseCheckpointSaver[str]):
397
397
  thread_id = config["configurable"]["thread_id"]
398
398
  checkpoint_ns = config["configurable"]["checkpoint_ns"]
399
399
  type_, serialized_checkpoint = self.serde.dumps_typed(checkpoint)
400
- serialized_metadata = self.jsonplus_serde.dumps(metadata)
400
+ serialized_metadata = self.jsonplus_serde.dumps(
401
+ {
402
+ **{
403
+ k: v
404
+ for k, v in config["configurable"].items()
405
+ if not k.startswith("__")
406
+ },
407
+ **config.get("metadata", {}),
408
+ **metadata,
409
+ }
410
+ )
401
411
  with self.cursor() as cur:
402
412
  cur.execute(
403
413
  "INSERT OR REPLACE INTO checkpoints (thread_id, checkpoint_ns, checkpoint_id, parent_checkpoint_id, type, checkpoint, metadata) VALUES (?, ?, ?, ?, ?, ?, ?)",
@@ -463,7 +463,17 @@ class AsyncSqliteSaver(BaseCheckpointSaver[str]):
463
463
  thread_id = config["configurable"]["thread_id"]
464
464
  checkpoint_ns = config["configurable"]["checkpoint_ns"]
465
465
  type_, serialized_checkpoint = self.serde.dumps_typed(checkpoint)
466
- serialized_metadata = self.jsonplus_serde.dumps(metadata)
466
+ serialized_metadata = self.jsonplus_serde.dumps(
467
+ {
468
+ **{
469
+ k: v
470
+ for k, v in config["configurable"].items()
471
+ if not k.startswith("__")
472
+ },
473
+ **config.get("metadata", {}),
474
+ **metadata,
475
+ }
476
+ )
467
477
  async with (
468
478
  self.lock,
469
479
  self.conn.execute(
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "langgraph-checkpoint-sqlite"
3
- version = "2.0.3"
3
+ version = "2.0.4"
4
4
  description = "Library with a SQLite implementation of LangGraph checkpoint saver."
5
5
  authors = []
6
6
  license = "MIT"