@langchain/langgraph-api 1.4.5 → 1.4.6-rc.0
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.
|
@@ -193,14 +193,16 @@ export function registerProtocolRoutes(api, context, upgradeWebSocket) {
|
|
|
193
193
|
? checkpointId
|
|
194
194
|
: undefined;
|
|
195
195
|
})();
|
|
196
|
-
const currentRun = thread.currentRun;
|
|
197
|
-
const currentStatus = currentRun?.status;
|
|
198
196
|
const hasPendingInterrupts = params.input != null
|
|
199
197
|
? await hasPendingInterruptsForThread(thread)
|
|
200
198
|
: false;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
199
|
+
// Resume only when the thread actually has a pending `interrupt()`.
|
|
200
|
+
// A cancelled run also ends with status "interrupted" but has no
|
|
201
|
+
// pending interrupt to consume the resume value, so folding the
|
|
202
|
+
// input into `Command(resume)` there would silently drop the user's
|
|
203
|
+
// message; a cancelled thread must get plain input (a fresh run from
|
|
204
|
+
// the checkpoint that applies the input to state).
|
|
205
|
+
const isResume = params.input != null && hasPendingInterrupts;
|
|
204
206
|
if (isResume) {
|
|
205
207
|
// Drop stale lifecycle events from the paused run so late-attaching
|
|
206
208
|
// sinks do not replay `lifecycle.interrupted` after resume.
|
|
@@ -303,16 +303,16 @@ export class ProtocolService {
|
|
|
303
303
|
}
|
|
304
304
|
async createOrResumeRun(record, params) {
|
|
305
305
|
const assistantId = getAssistantId(params.assistant_id);
|
|
306
|
-
const currentRun = record.currentRunId != null
|
|
307
|
-
? await this.bindings.runs.get(record.currentRunId, record.threadId, record.auth)
|
|
308
|
-
: null;
|
|
309
|
-
const currentStatus = currentRun?.status;
|
|
310
306
|
const hasPendingInterrupts = params.input != null
|
|
311
307
|
? await this.hasPendingInterruptsForThread(record.threadId, record.auth)
|
|
312
308
|
: false;
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
309
|
+
// Resume only when the thread actually has a pending `interrupt()`.
|
|
310
|
+
// A cancelled run also ends with status "interrupted" but has no
|
|
311
|
+
// pending interrupt to consume the resume value, so folding the
|
|
312
|
+
// input into `Command(resume)` there would silently drop the user's
|
|
313
|
+
// message; a cancelled thread must get plain input (a fresh run from
|
|
314
|
+
// the checkpoint that applies the input to state).
|
|
315
|
+
const isResume = params.input != null && hasPendingInterrupts;
|
|
316
316
|
/**
|
|
317
317
|
* Fork/time-travel replays from `config.configurable.checkpoint_id`
|
|
318
318
|
* when the caller supplies it (the SDK folds its `forkFrom`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langchain/langgraph-api",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.6-rc.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": "^18.19.0 || >=20.16.0"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@hono/node-server": "^2.1.0",
|
|
56
56
|
"@hono/node-ws": "^1.3.0",
|
|
57
57
|
"@hono/zod-validator": "^0.7.6",
|
|
58
|
-
"@langchain/protocol": "^0.0.
|
|
58
|
+
"@langchain/protocol": "^0.0.19",
|
|
59
59
|
"@types/json-schema": "^7.0.15",
|
|
60
60
|
"@typescript/vfs": "^1.6.0",
|
|
61
61
|
"dedent": "^1.5.3",
|
|
@@ -71,13 +71,13 @@
|
|
|
71
71
|
"winston": "^3.17.0",
|
|
72
72
|
"winston-console-format": "^1.0.8",
|
|
73
73
|
"zod": "^3.25.76 || ^4",
|
|
74
|
-
"@langchain/langgraph-ui": "1.4.
|
|
74
|
+
"@langchain/langgraph-ui": "1.4.6-rc.0"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"@langchain/core": "^1.1.48",
|
|
78
|
-
"@langchain/langgraph": "^1.
|
|
78
|
+
"@langchain/langgraph": "^1.4.15-rc.0",
|
|
79
79
|
"@langchain/langgraph-checkpoint": "^1.1.4",
|
|
80
|
-
"@langchain/langgraph-sdk": "^1.
|
|
80
|
+
"@langchain/langgraph-sdk": "^1.10.3-rc.0",
|
|
81
81
|
"ts-node": "^10.9.2",
|
|
82
82
|
"typescript": "^5.5.4"
|
|
83
83
|
},
|
|
@@ -90,23 +90,23 @@
|
|
|
90
90
|
}
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
|
-
"@langchain/core": "^1.2.
|
|
93
|
+
"@langchain/core": "^1.2.9",
|
|
94
94
|
"@types/babel__code-frame": "^7.0.6",
|
|
95
95
|
"@types/node": "^18.15.11",
|
|
96
96
|
"@types/react": "^19.2.18",
|
|
97
|
-
"@types/react-dom": "^19.2.
|
|
97
|
+
"@types/react-dom": "^19.2.5",
|
|
98
98
|
"@types/semver": "^7.7.0",
|
|
99
99
|
"deepagents": "^1.10.5",
|
|
100
100
|
"jose": "^6.0.10",
|
|
101
|
-
"langchain": "^1.5.
|
|
101
|
+
"langchain": "^1.5.10",
|
|
102
102
|
"postgres": "^3.4.5",
|
|
103
103
|
"ts-node": "^10.9.2",
|
|
104
104
|
"typescript": "^4.9.5 || ^5.4.5",
|
|
105
105
|
"vitest": "^4.1.10",
|
|
106
106
|
"wait-port": "^1.1.0",
|
|
107
|
-
"@langchain/langgraph": "1.4.12",
|
|
108
107
|
"@langchain/langgraph-checkpoint": "1.1.5",
|
|
109
|
-
"@langchain/langgraph
|
|
108
|
+
"@langchain/langgraph": "1.4.15-rc.0",
|
|
109
|
+
"@langchain/langgraph-sdk": "1.10.3-rc.0"
|
|
110
110
|
},
|
|
111
111
|
"scripts": {
|
|
112
112
|
"clean": "rm -rf dist/ .turbo/ ./tests/graphs/.langgraph_api/ ./tests/protocol-v2/graphs/.langgraph_api/",
|