@langchain/langgraph-checkpoint-mongodb 0.0.2 → 0.0.4
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.
- package/README.md +0 -1
- package/dist/index.cjs +7 -6
- package/dist/index.js +7 -6
- package/package.json +5 -5
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -108,12 +108,13 @@ class MongoDBSaver extends langgraph_checkpoint_1.BaseCheckpointSaver {
|
|
|
108
108
|
*/
|
|
109
109
|
async *list(config, options) {
|
|
110
110
|
const { limit, before, filter } = options ?? {};
|
|
111
|
-
|
|
112
|
-
if (config?.configurable) {
|
|
113
|
-
query =
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
111
|
+
const query = {};
|
|
112
|
+
if (config?.configurable?.thread_id) {
|
|
113
|
+
query.thread_id = config.configurable.thread_id;
|
|
114
|
+
}
|
|
115
|
+
if (config?.configurable?.checkpoint_ns !== undefined &&
|
|
116
|
+
config?.configurable?.checkpoint_ns !== null) {
|
|
117
|
+
query.checkpoint_ns = config.configurable.checkpoint_ns;
|
|
117
118
|
}
|
|
118
119
|
if (filter) {
|
|
119
120
|
Object.entries(filter).forEach(([key, value]) => {
|
package/dist/index.js
CHANGED
|
@@ -105,12 +105,13 @@ export class MongoDBSaver extends BaseCheckpointSaver {
|
|
|
105
105
|
*/
|
|
106
106
|
async *list(config, options) {
|
|
107
107
|
const { limit, before, filter } = options ?? {};
|
|
108
|
-
|
|
109
|
-
if (config?.configurable) {
|
|
110
|
-
query =
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
108
|
+
const query = {};
|
|
109
|
+
if (config?.configurable?.thread_id) {
|
|
110
|
+
query.thread_id = config.configurable.thread_id;
|
|
111
|
+
}
|
|
112
|
+
if (config?.configurable?.checkpoint_ns !== undefined &&
|
|
113
|
+
config?.configurable?.checkpoint_ns !== null) {
|
|
114
|
+
query.checkpoint_ns = config.configurable.checkpoint_ns;
|
|
114
115
|
}
|
|
115
116
|
if (filter) {
|
|
116
117
|
Object.entries(filter).forEach(([key, value]) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langchain/langgraph-checkpoint-mongodb",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "LangGraph",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"mongodb": "^6.8.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@langchain/core": ">=0.2.
|
|
38
|
-
"@langchain/langgraph-checkpoint": "~0.0.
|
|
37
|
+
"@langchain/core": ">=0.2.31 <0.4.0",
|
|
38
|
+
"@langchain/langgraph-checkpoint": "~0.0.6"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@jest/globals": "^29.5.0",
|
|
42
42
|
"@langchain/langgraph-checkpoint": "workspace:*",
|
|
43
|
-
"@langchain/scripts": ">=0.1.
|
|
43
|
+
"@langchain/scripts": ">=0.1.3 <0.2.0",
|
|
44
44
|
"@swc/core": "^1.3.90",
|
|
45
45
|
"@swc/jest": "^0.2.29",
|
|
46
46
|
"@tsconfig/recommended": "^1.0.3",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"jest-environment-node": "^29.6.4",
|
|
62
62
|
"prettier": "^2.8.3",
|
|
63
63
|
"release-it": "^17.6.0",
|
|
64
|
-
"rollup": "^4.
|
|
64
|
+
"rollup": "^4.23.0",
|
|
65
65
|
"ts-jest": "^29.1.0",
|
|
66
66
|
"tsx": "^4.7.0",
|
|
67
67
|
"typescript": "^4.9.5 || ^5.4.5"
|