@langchain/langgraph-api 1.1.14 → 1.1.15

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.
@@ -1,6 +1,6 @@
1
1
  import { zValidator } from "@hono/zod-validator";
2
2
  import { Hono } from "hono";
3
- import { v4 as uuid } from "uuid";
3
+ import { v7 as uuid } from "uuid";
4
4
  import { z } from "zod/v3";
5
5
  import { getAssistantId, getCachedStaticGraphSchema, getGraph, } from "../graph/load.mjs";
6
6
  import { getRuntimeGraphSchema } from "../graph/parser/index.mjs";
package/dist/api/runs.mjs CHANGED
@@ -2,7 +2,7 @@ import { zValidator } from "@hono/zod-validator";
2
2
  import { Hono } from "hono";
3
3
  import { HTTPException } from "hono/http-exception";
4
4
  import { streamSSE } from "hono/streaming";
5
- import { v4 as uuid4 } from "uuid";
5
+ import { v7 as uuid7 } from "uuid";
6
6
  import { z } from "zod/v3";
7
7
  import { getAssistantId } from "../graph/load.mjs";
8
8
  import { logError, logger } from "../logging.mjs";
@@ -14,7 +14,7 @@ const api = new Hono();
14
14
  const createValidRun = async (threadId, payload, kwargs) => {
15
15
  const { assistant_id: assistantId, ...run } = payload;
16
16
  const { auth, headers } = kwargs ?? {};
17
- const runId = uuid4();
17
+ const runId = uuid7();
18
18
  const streamMode = Array.isArray(payload.stream_mode)
19
19
  ? payload.stream_mode
20
20
  : payload.stream_mode != null
@@ -1,6 +1,6 @@
1
1
  import { zValidator } from "@hono/zod-validator";
2
2
  import { Hono } from "hono";
3
- import { v4 as uuid4 } from "uuid";
3
+ import { v7 as uuid7 } from "uuid";
4
4
  import { z } from "zod/v3";
5
5
  import * as schemas from "../schemas.mjs";
6
6
  import { stateSnapshotToThreadState } from "../state.mjs";
@@ -11,7 +11,7 @@ const api = new Hono();
11
11
  api.post("/threads", zValidator("json", schemas.ThreadCreate), async (c) => {
12
12
  // Create Thread
13
13
  const payload = c.req.valid("json");
14
- const thread = await threads().put(payload.thread_id || uuid4(), { metadata: payload.metadata, if_exists: payload.if_exists ?? "raise" }, c.var.auth);
14
+ const thread = await threads().put(payload.thread_id || uuid7(), { metadata: payload.metadata, if_exists: payload.if_exists ?? "raise" }, c.var.auth);
15
15
  if (payload.supersteps?.length) {
16
16
  await threads().state.bulk({ configurable: { thread_id: thread.thread_id } }, payload.supersteps, c.var.auth);
17
17
  }
@@ -1,7 +1,7 @@
1
1
  import { Hono } from "hono";
2
2
  import { zValidator } from "@hono/zod-validator";
3
3
  import { streamSSE } from "hono/streaming";
4
- import { v4 as uuidv4 } from "uuid";
4
+ import { v7 as uuidv7 } from "uuid";
5
5
  import * as schemas from "../schemas.mjs";
6
6
  import { z } from "zod/v3";
7
7
  import { streamState } from "../stream.mjs";
@@ -11,7 +11,7 @@ import { stateSnapshotToThreadState } from "../state.mjs";
11
11
  import { ensureContentType } from "../http/middleware.mjs";
12
12
  function createStubRun(threadId, payload) {
13
13
  const now = new Date();
14
- const runId = uuidv4();
14
+ const runId = uuidv7();
15
15
  let streamMode = Array.isArray(payload.stream_mode)
16
16
  ? payload.stream_mode
17
17
  : payload.stream_mode
@@ -76,7 +76,7 @@ export function createEmbedServer(options) {
76
76
  api.post("/threads", zValidator("json", schemas.ThreadCreate), async (c) => {
77
77
  // create a new thread
78
78
  const payload = c.req.valid("json");
79
- const threadId = payload.thread_id || uuidv4();
79
+ const threadId = payload.thread_id || uuidv7();
80
80
  return jsonExtra(c, await options.threads.set(threadId, {
81
81
  kind: "put",
82
82
  metadata: payload.metadata,
@@ -261,7 +261,7 @@ export function createEmbedServer(options) {
261
261
  return streamSSE(c, async (stream) => {
262
262
  const payload = c.req.valid("json");
263
263
  const signal = getDisconnectAbortSignal(c, stream);
264
- const threadId = uuidv4();
264
+ const threadId = uuidv7();
265
265
  await options.threads.set(threadId, {
266
266
  kind: "put",
267
267
  metadata: {
@@ -1,5 +1,5 @@
1
1
  import { HTTPException } from "hono/http-exception";
2
- import { v4 as uuid4, v5 as uuid5 } from "uuid";
2
+ import { v7 as uuid7, v5 as uuid5 } from "uuid";
3
3
  import { handleAuthEvent, isAuthMatching } from "../auth/index.mjs";
4
4
  import { getLangGraphCommand } from "../command.mjs";
5
5
  import { getGraph, NAMESPACE_GRAPH } from "../graph/load.mjs";
@@ -650,7 +650,7 @@ export class FileSystemThreads {
650
650
  }
651
651
  return thread;
652
652
  });
653
- const newThreadId = uuid4();
653
+ const newThreadId = uuid7();
654
654
  const now = new Date();
655
655
  const newMetadata = { ...fromThread.metadata, thread_id: newThreadId };
656
656
  await handleAuthEvent(auth, "threads:create", {
@@ -948,7 +948,7 @@ export class FileSystemRuns {
948
948
  }
949
949
  const now = new Date();
950
950
  if (!existingThread && (threadId == null || ifNotExists === "create")) {
951
- threadId ??= uuid4();
951
+ threadId ??= uuid7();
952
952
  const thread = {
953
953
  thread_id: threadId,
954
954
  status: "busy",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph-api",
3
- "version": "1.1.14",
3
+ "version": "1.1.15",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": "^18.19.0 || >=20.16.0"
@@ -70,7 +70,7 @@
70
70
  "winston": "^3.17.0",
71
71
  "winston-console-format": "^1.0.8",
72
72
  "zod": "^3.25.76 || ^4",
73
- "@langchain/langgraph-ui": "1.1.14"
73
+ "@langchain/langgraph-ui": "1.1.15"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "@langchain/core": "^0.3.59 || ^1.0.1",
@@ -98,7 +98,7 @@
98
98
  "typescript": "^4.9.5 || ^5.4.5",
99
99
  "vitest": "^3.2.4",
100
100
  "wait-port": "^1.1.0",
101
- "@langchain/langgraph": "1.2.0",
101
+ "@langchain/langgraph": "1.2.1",
102
102
  "@langchain/langgraph-checkpoint": "1.0.0",
103
103
  "@langchain/langgraph-sdk": "1.6.5"
104
104
  },