langgraph-checkpointer-couchbase 1.0.4__tar.gz → 1.0.6__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.
- {langgraph_checkpointer_couchbase-1.0.4 → langgraph_checkpointer_couchbase-1.0.6}/PKG-INFO +1 -1
- {langgraph_checkpointer_couchbase-1.0.4 → langgraph_checkpointer_couchbase-1.0.6}/langgraph_checkpointer_couchbase/async_cb_saver.py +4 -4
- {langgraph_checkpointer_couchbase-1.0.4 → langgraph_checkpointer_couchbase-1.0.6}/langgraph_checkpointer_couchbase/couchbase_saver.py +6 -6
- {langgraph_checkpointer_couchbase-1.0.4 → langgraph_checkpointer_couchbase-1.0.6}/pyproject.toml +1 -1
- {langgraph_checkpointer_couchbase-1.0.4 → langgraph_checkpointer_couchbase-1.0.6}/.env.example +0 -0
- {langgraph_checkpointer_couchbase-1.0.4 → langgraph_checkpointer_couchbase-1.0.6}/.github/workflows/release.yaml +0 -0
- {langgraph_checkpointer_couchbase-1.0.4 → langgraph_checkpointer_couchbase-1.0.6}/.gitignore +0 -0
- {langgraph_checkpointer_couchbase-1.0.4 → langgraph_checkpointer_couchbase-1.0.6}/LICENSE +0 -0
- {langgraph_checkpointer_couchbase-1.0.4 → langgraph_checkpointer_couchbase-1.0.6}/README.md +0 -0
- {langgraph_checkpointer_couchbase-1.0.4 → langgraph_checkpointer_couchbase-1.0.6}/langgraph_checkpointer_couchbase/__init__.py +0 -0
- {langgraph_checkpointer_couchbase-1.0.4 → langgraph_checkpointer_couchbase-1.0.6}/langgraph_checkpointer_couchbase/utils.py +0 -0
- {langgraph_checkpointer_couchbase-1.0.4 → langgraph_checkpointer_couchbase-1.0.6}/tests/__init__.py +0 -0
- {langgraph_checkpointer_couchbase-1.0.4 → langgraph_checkpointer_couchbase-1.0.6}/tests/agent_e2e_test.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langgraph-checkpointer-couchbase
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.6
|
|
4
4
|
Project-URL: Documentation, https://github.com/couchbase-ecosystem/langgraph-checkpointer-couchbase#readme
|
|
5
5
|
Project-URL: Issues, https://github.com/couchbase-ecosystem/langgraph-checkpointer-couchbase/issues
|
|
6
6
|
Project-URL: Source, https://github.com/couchbase-ecosystem/langgraph-checkpointer-couchbase
|
|
@@ -123,10 +123,10 @@ class AsyncCouchbaseSaver(BaseCheckpointSaver):
|
|
|
123
123
|
checkpoint_id = get_checkpoint_id(config)
|
|
124
124
|
|
|
125
125
|
if checkpoint_id:
|
|
126
|
-
query = f'SELECT * FROM {self.bucket_name}
|
|
126
|
+
query = f'SELECT * FROM `{self.bucket_name}`.`{self.scope_name}`.`{self.checkpoints_collection_name}` WHERE thread_id = $1 AND checkpoint_ns = $2 AND checkpoint_id = $3 ORDER BY checkpoint_id DESC LIMIT 1'
|
|
127
127
|
query_params = [thread_id, checkpoint_ns, checkpoint_id]
|
|
128
128
|
else:
|
|
129
|
-
query = f'SELECT * FROM {self.bucket_name}
|
|
129
|
+
query = f'SELECT * FROM `{self.bucket_name}`.`{self.scope_name}`.`{self.checkpoints_collection_name}` WHERE thread_id = $1 AND checkpoint_ns = $2 ORDER BY checkpoint_id DESC LIMIT 1'
|
|
130
130
|
query_params = [thread_id, checkpoint_ns]
|
|
131
131
|
|
|
132
132
|
result = self.cluster.query(query, QueryOptions(positional_parameters=query_params))
|
|
@@ -140,7 +140,7 @@ class AsyncCouchbaseSaver(BaseCheckpointSaver):
|
|
|
140
140
|
}
|
|
141
141
|
checkpoint = self.serde.loads_typed((doc["type"], _decode_binary(doc["checkpoint"])))
|
|
142
142
|
|
|
143
|
-
serialized_writes_query = f'SELECT * FROM {self.bucket_name}
|
|
143
|
+
serialized_writes_query = f'SELECT * FROM `{self.bucket_name}`.`{self.scope_name}`.`{self.checkpoint_writes_collection_name}` WHERE thread_id = $1 AND checkpoint_ns = $2 AND checkpoint_id = $3'
|
|
144
144
|
serialized_writes_params = [thread_id, checkpoint_ns, doc["checkpoint_id"] or ""]
|
|
145
145
|
|
|
146
146
|
serialized_writes_result = self.cluster.query(serialized_writes_query, QueryOptions(positional_parameters=serialized_writes_params))
|
|
@@ -200,7 +200,7 @@ class AsyncCouchbaseSaver(BaseCheckpointSaver):
|
|
|
200
200
|
AsyncIterator[CheckpointTuple]: An asynchronous iterator of checkpoint tuples.
|
|
201
201
|
"""
|
|
202
202
|
|
|
203
|
-
query = f"SELECT * FROM {self.bucket_name}
|
|
203
|
+
query = f"SELECT * FROM `{self.bucket_name}`.`{self.scope_name}`.`{self.checkpoints_collection_name}` WHERE 1=1"
|
|
204
204
|
query_params = []
|
|
205
205
|
|
|
206
206
|
if config is not None:
|
|
@@ -114,7 +114,7 @@ class CouchbaseSaver(BaseCheckpointSaver):
|
|
|
114
114
|
|
|
115
115
|
collection_manager = self.bucket.collections()
|
|
116
116
|
try:
|
|
117
|
-
collection_manager.create_collection(self.
|
|
117
|
+
collection_manager.create_collection(self.scope_name, self.checkpoints_collection_name)
|
|
118
118
|
except CollectionAlreadyExistsException as _:
|
|
119
119
|
pass
|
|
120
120
|
except Exception as e:
|
|
@@ -124,7 +124,7 @@ class CouchbaseSaver(BaseCheckpointSaver):
|
|
|
124
124
|
self.checkpoints_collection = self.bucket.scope(self.scope_name).collection(self.checkpoints_collection_name)
|
|
125
125
|
|
|
126
126
|
try:
|
|
127
|
-
collection_manager.create_collection(self.
|
|
127
|
+
collection_manager.create_collection(self.scope_name, self.checkpoint_writes_collection_name)
|
|
128
128
|
except CollectionAlreadyExistsException as _:
|
|
129
129
|
pass
|
|
130
130
|
except Exception as e:
|
|
@@ -153,10 +153,10 @@ class CouchbaseSaver(BaseCheckpointSaver):
|
|
|
153
153
|
checkpoint_id = get_checkpoint_id(config)
|
|
154
154
|
|
|
155
155
|
if checkpoint_id:
|
|
156
|
-
query = f'SELECT * FROM {self.bucket_name}
|
|
156
|
+
query = f'SELECT * FROM `{self.bucket_name}`.`{self.scope_name}`.`{self.checkpoints_collection_name}` WHERE thread_id = $1 AND checkpoint_ns = $2 AND checkpoint_id = $3 ORDER BY checkpoint_id DESC LIMIT 1'
|
|
157
157
|
query_params = [thread_id, checkpoint_ns, checkpoint_id]
|
|
158
158
|
else:
|
|
159
|
-
query = f'SELECT * FROM {self.bucket_name}
|
|
159
|
+
query = f'SELECT * FROM `{self.bucket_name}`.`{self.scope_name}`.`{self.checkpoints_collection_name}` WHERE thread_id = $1 AND checkpoint_ns = $2 ORDER BY checkpoint_id DESC LIMIT 1'
|
|
160
160
|
query_params = [thread_id, checkpoint_ns]
|
|
161
161
|
|
|
162
162
|
result = self.cluster.query(query, QueryOptions(positional_parameters=query_params))
|
|
@@ -173,7 +173,7 @@ class CouchbaseSaver(BaseCheckpointSaver):
|
|
|
173
173
|
checkpoint_data = _decode_binary(doc["checkpoint"])
|
|
174
174
|
checkpoint = self.serde.loads_typed((doc["type"], checkpoint_data))
|
|
175
175
|
|
|
176
|
-
serialized_writes_query = f'SELECT * FROM {self.bucket_name}
|
|
176
|
+
serialized_writes_query = f'SELECT * FROM `{self.bucket_name}`.`{self.scope_name}`.`{self.checkpoint_writes_collection_name}` WHERE thread_id = $1 AND checkpoint_ns = $2 AND checkpoint_id = $3'
|
|
177
177
|
serialized_writes_params = [thread_id, checkpoint_ns, doc["checkpoint_id"] or ""]
|
|
178
178
|
serialized_writes_result = self.cluster.query(serialized_writes_query, QueryOptions(positional_parameters=serialized_writes_params))
|
|
179
179
|
|
|
@@ -238,7 +238,7 @@ class CouchbaseSaver(BaseCheckpointSaver):
|
|
|
238
238
|
Iterator[CheckpointTuple]: An iterator of checkpoint tuples.
|
|
239
239
|
"""
|
|
240
240
|
|
|
241
|
-
query = f"SELECT * FROM {self.bucket_name}
|
|
241
|
+
query = f"SELECT * FROM `{self.bucket_name}`.`{self.scope_name}`.`{self.checkpoints_collection_name}` WHERE 1=1"
|
|
242
242
|
query_params = []
|
|
243
243
|
|
|
244
244
|
if config is not None:
|
{langgraph_checkpointer_couchbase-1.0.4 → langgraph_checkpointer_couchbase-1.0.6}/.env.example
RENAMED
|
File without changes
|
|
File without changes
|
{langgraph_checkpointer_couchbase-1.0.4 → langgraph_checkpointer_couchbase-1.0.6}/.gitignore
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langgraph_checkpointer_couchbase-1.0.4 → langgraph_checkpointer_couchbase-1.0.6}/tests/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|