@langchain/langgraph-api 1.2.0 → 1.2.1
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/dist/api/protocol.mjs
CHANGED
|
@@ -45,7 +45,7 @@ export default function createProtocolApi(upgradeWebSocket, ops) {
|
|
|
45
45
|
runs: ops.runs,
|
|
46
46
|
threads: ops.threads,
|
|
47
47
|
});
|
|
48
|
-
api.get("/
|
|
48
|
+
api.get("/threads/:thread_id/stream/events", zValidator("param", ThreadIdSchema), upgradeWebSocket((c) => {
|
|
49
49
|
const { thread_id } = c.req.valid("param");
|
|
50
50
|
const record = protocolService.ensureThread({
|
|
51
51
|
threadId: thread_id,
|
|
@@ -101,7 +101,7 @@ export default function createProtocolApi(upgradeWebSocket, ops) {
|
|
|
101
101
|
},
|
|
102
102
|
};
|
|
103
103
|
}));
|
|
104
|
-
api.post("/
|
|
104
|
+
api.post("/threads/:thread_id/commands", zValidator("param", ThreadIdSchema), zValidator("json", ProtocolCommandSchema), async (c) => {
|
|
105
105
|
const { thread_id } = c.req.valid("param");
|
|
106
106
|
protocolService.ensureThread({
|
|
107
107
|
threadId: thread_id,
|
|
@@ -111,7 +111,7 @@ export default function createProtocolApi(upgradeWebSocket, ops) {
|
|
|
111
111
|
const payload = c.req.valid("json");
|
|
112
112
|
return jsonExtra(c, await protocolService.handleCommand(thread_id, payload));
|
|
113
113
|
});
|
|
114
|
-
api.post("/
|
|
114
|
+
api.post("/threads/:thread_id/stream/events", zValidator("param", ThreadIdSchema), zValidator("json", EventsFilterSchema), async (c) => {
|
|
115
115
|
const { thread_id } = c.req.valid("param");
|
|
116
116
|
protocolService.ensureThread({
|
|
117
117
|
threadId: thread_id,
|
|
@@ -311,13 +311,13 @@ export function registerProtocolRoutes(api, context, upgradeWebSocket) {
|
|
|
311
311
|
headers: { "Content-Type": "application/json" },
|
|
312
312
|
});
|
|
313
313
|
}
|
|
314
|
-
api.post("/
|
|
314
|
+
api.post("/threads/:thread_id/commands", zValidator("param", ThreadIdSchema), zValidator("json", ProtocolCommandSchema), async (c) => {
|
|
315
315
|
const { thread_id } = c.req.valid("param");
|
|
316
316
|
const thread = ensureThread(thread_id);
|
|
317
317
|
const command = c.req.valid("json");
|
|
318
318
|
return await handleThreadCommand(thread, command);
|
|
319
319
|
});
|
|
320
|
-
api.post("/
|
|
320
|
+
api.post("/threads/:thread_id/stream/events", zValidator("param", ThreadIdSchema), zValidator("json", EventsFilterSchema), async (c) => {
|
|
321
321
|
const { thread_id } = c.req.valid("param");
|
|
322
322
|
const thread = ensureThread(thread_id);
|
|
323
323
|
const body = c.req.valid("json");
|
|
@@ -374,7 +374,7 @@ export function registerProtocolRoutes(api, context, upgradeWebSocket) {
|
|
|
374
374
|
});
|
|
375
375
|
});
|
|
376
376
|
if (upgradeWebSocket != null) {
|
|
377
|
-
api.get("/
|
|
377
|
+
api.get("/threads/:thread_id/stream/events", zValidator("param", ThreadIdSchema), upgradeWebSocket((c) => {
|
|
378
378
|
const { thread_id } = c.req.valid("param");
|
|
379
379
|
const thread = ensureThread(thread_id);
|
|
380
380
|
const sinkId = uuidv7();
|
|
@@ -7,7 +7,7 @@ export type { ThreadSaver } from "./embed/types.mjs";
|
|
|
7
7
|
* Create a Hono server with a subset of LangGraph Platform routes.
|
|
8
8
|
*
|
|
9
9
|
* Pass `upgradeWebSocket` to enable the WebSocket protocol transport
|
|
10
|
-
* on `GET /
|
|
10
|
+
* on `GET /threads/:thread_id/stream/events`. Create it with `@hono/node-ws`'s
|
|
11
11
|
* `createNodeWebSocket({ app })` and make sure to call `injectWebSocket`
|
|
12
12
|
* on the underlying HTTP server.
|
|
13
13
|
*
|
|
@@ -7,7 +7,7 @@ import { registerProtocolRoutes } from "./embed/protocol.mjs";
|
|
|
7
7
|
* Create a Hono server with a subset of LangGraph Platform routes.
|
|
8
8
|
*
|
|
9
9
|
* Pass `upgradeWebSocket` to enable the WebSocket protocol transport
|
|
10
|
-
* on `GET /
|
|
10
|
+
* on `GET /threads/:thread_id/stream/events`. Create it with `@hono/node-ws`'s
|
|
11
11
|
* `createNodeWebSocket({ app })` and make sure to call `injectWebSocket`
|
|
12
12
|
* on the underlying HTTP server.
|
|
13
13
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langchain/langgraph-api",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": "^18.19.0 || >=20.16.0"
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"winston": "^3.17.0",
|
|
73
73
|
"winston-console-format": "^1.0.8",
|
|
74
74
|
"zod": "^3.25.76 || ^4",
|
|
75
|
-
"@langchain/langgraph-ui": "1.2.
|
|
75
|
+
"@langchain/langgraph-ui": "1.2.1"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"@langchain/core": "^1.1.44",
|
|
@@ -101,9 +101,9 @@
|
|
|
101
101
|
"typescript": "^4.9.5 || ^5.4.5",
|
|
102
102
|
"vitest": "^3.2.4",
|
|
103
103
|
"wait-port": "^1.1.0",
|
|
104
|
+
"@langchain/langgraph": "1.3.0",
|
|
104
105
|
"@langchain/langgraph-checkpoint": "1.0.2",
|
|
105
|
-
"@langchain/langgraph-sdk": "1.9.
|
|
106
|
-
"@langchain/langgraph": "1.3.0"
|
|
106
|
+
"@langchain/langgraph-sdk": "1.9.1"
|
|
107
107
|
},
|
|
108
108
|
"scripts": {
|
|
109
109
|
"clean": "rm -rf dist/ .turbo/ ./tests/graphs/.langgraph_api/ ./tests/protocol-v2/graphs/.langgraph_api/",
|