@langchain/langgraph 0.2.10-rc.4 → 0.2.10
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
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
[LangGraph.js](https://langchain-ai.github.io/langgraphjs/) is a library for building stateful, multi-actor applications with LLMs, used to create agent and multi-agent workflows. Compared to other LLM frameworks, it offers these core benefits: cycles, controllability, and persistence. LangGraph allows you to define flows that involve cycles, essential for most agentic architectures, differentiating it from DAG-based solutions. As a very low-level framework, it provides fine-grained control over both the flow and state of your application, crucial for creating reliable agents. Additionally, LangGraph includes built-in persistence, enabling advanced human-in-the-loop and memory features.
|
|
13
13
|
|
|
14
|
-
LangGraph is inspired by [Pregel](https://research.google/pubs/pub37252/) and [Apache Beam](https://beam.apache.org/). The public interface draws inspiration from [NetworkX](https://networkx.org/documentation/latest/). LangGraph is built by LangChain Inc, the creators of LangChain, but can be used without LangChain.
|
|
14
|
+
LangGraph is inspired by [Pregel](https://research.google/pubs/pub37252/) and [Apache Beam](https://beam.apache.org/). The public interface draws inspiration from [NetworkX](https://networkx.org/documentation/latest/). LangGraph is built by LangChain Inc, the creators of [LangChain](https://github.com/langchain-ai/langchainjs), but can be used without LangChain.
|
|
15
15
|
|
|
16
16
|
### Key Features
|
|
17
17
|
|
|
@@ -72,7 +72,7 @@ class SharedValue extends base_js_1.WritableManagedValue {
|
|
|
72
72
|
if (k in this.value) {
|
|
73
73
|
delete this.value[k];
|
|
74
74
|
if (this.ns) {
|
|
75
|
-
writes.push({ namespace: this.ns,
|
|
75
|
+
writes.push({ namespace: this.ns, key: k, value: null });
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -82,7 +82,7 @@ class SharedValue extends base_js_1.WritableManagedValue {
|
|
|
82
82
|
else {
|
|
83
83
|
this.value[k] = v;
|
|
84
84
|
if (this.ns) {
|
|
85
|
-
writes.push({ namespace: this.ns,
|
|
85
|
+
writes.push({ namespace: this.ns, key: k, value: v });
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
}
|
|
@@ -101,7 +101,7 @@ class SharedValue extends base_js_1.WritableManagedValue {
|
|
|
101
101
|
if (this.store && this.ns) {
|
|
102
102
|
const saved = await this.store.search(this.ns);
|
|
103
103
|
this.value = saved.reduce((acc, item) => {
|
|
104
|
-
acc[item.
|
|
104
|
+
acc[item.key] = item.value;
|
|
105
105
|
return acc;
|
|
106
106
|
}, {});
|
|
107
107
|
}
|
|
@@ -69,7 +69,7 @@ export class SharedValue extends WritableManagedValue {
|
|
|
69
69
|
if (k in this.value) {
|
|
70
70
|
delete this.value[k];
|
|
71
71
|
if (this.ns) {
|
|
72
|
-
writes.push({ namespace: this.ns,
|
|
72
|
+
writes.push({ namespace: this.ns, key: k, value: null });
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -79,7 +79,7 @@ export class SharedValue extends WritableManagedValue {
|
|
|
79
79
|
else {
|
|
80
80
|
this.value[k] = v;
|
|
81
81
|
if (this.ns) {
|
|
82
|
-
writes.push({ namespace: this.ns,
|
|
82
|
+
writes.push({ namespace: this.ns, key: k, value: v });
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -98,7 +98,7 @@ export class SharedValue extends WritableManagedValue {
|
|
|
98
98
|
if (this.store && this.ns) {
|
|
99
99
|
const saved = await this.store.search(this.ns);
|
|
100
100
|
this.value = saved.reduce((acc, item) => {
|
|
101
|
-
acc[item.
|
|
101
|
+
acc[item.key] = item.value;
|
|
102
102
|
return acc;
|
|
103
103
|
}, {});
|
|
104
104
|
}
|
|
@@ -35,7 +35,14 @@ function ensureLangGraphConfig(...configs) {
|
|
|
35
35
|
copiedValue = [...v];
|
|
36
36
|
}
|
|
37
37
|
else if (typeof v === "object") {
|
|
38
|
-
|
|
38
|
+
if (k === "callbacks" &&
|
|
39
|
+
"copy" in v &&
|
|
40
|
+
typeof v.copy === "function") {
|
|
41
|
+
copiedValue = v.copy();
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
copiedValue = { ...v };
|
|
45
|
+
}
|
|
39
46
|
}
|
|
40
47
|
else {
|
|
41
48
|
copiedValue = v;
|
|
@@ -32,7 +32,14 @@ export function ensureLangGraphConfig(...configs) {
|
|
|
32
32
|
copiedValue = [...v];
|
|
33
33
|
}
|
|
34
34
|
else if (typeof v === "object") {
|
|
35
|
-
|
|
35
|
+
if (k === "callbacks" &&
|
|
36
|
+
"copy" in v &&
|
|
37
|
+
typeof v.copy === "function") {
|
|
38
|
+
copiedValue = v.copy();
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
copiedValue = { ...v };
|
|
42
|
+
}
|
|
36
43
|
}
|
|
37
44
|
else {
|
|
38
45
|
copiedValue = v;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langchain/langgraph",
|
|
3
|
-
"version": "0.2.10
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"description": "LangGraph",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"author": "LangChain",
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@langchain/langgraph-checkpoint": "~0.0.
|
|
34
|
+
"@langchain/langgraph-checkpoint": "~0.0.9",
|
|
35
35
|
"double-ended-queue": "^2.1.0-0",
|
|
36
36
|
"uuid": "^10.0.0",
|
|
37
37
|
"zod": "^3.23.8"
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"langchain": "^0.3.0",
|
|
71
71
|
"prettier": "^2.8.3",
|
|
72
72
|
"release-it": "^17.6.0",
|
|
73
|
-
"rollup": "^4.
|
|
73
|
+
"rollup": "^4.22.4",
|
|
74
74
|
"ts-jest": "^29.1.0",
|
|
75
75
|
"tsx": "^4.7.0",
|
|
76
76
|
"typescript": "^4.9.5 || ^5.4.5",
|