@langchain/langgraph-cli 1.1.2 → 1.1.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph-cli",
3
- "version": "1.1.2",
3
+ "version": "1.1.8",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": "^18.19.0 || >=20.16.0"
@@ -16,7 +16,8 @@
16
16
  ],
17
17
  "repository": {
18
18
  "type": "git",
19
- "url": "git@github.com:langchain-ai/langgraphjs-api.git"
19
+ "url": "git+ssh://git@github.com/langchain-ai/langgraphjs.git",
20
+ "directory": "libs/langgraph-cli"
20
21
  },
21
22
  "scripts": {
22
23
  "clean": "rm -rf dist/ .turbo/",
@@ -33,10 +34,10 @@
33
34
  "dependencies": {
34
35
  "@babel/code-frame": "^7.26.2",
35
36
  "@commander-js/extra-typings": "^13.0.0",
36
- "@langchain/langgraph-api": "1.1.2",
37
+ "@langchain/langgraph-api": "workspace:*",
37
38
  "chokidar": "^4.0.3",
38
39
  "commander": "^13.0.0",
39
- "create-langgraph": "1.0.0",
40
+ "create-langgraph": "workspace:*",
40
41
  "dedent": "^1.5.3",
41
42
  "dotenv": "^16.4.7",
42
43
  "execa": "^9.5.2",
@@ -60,4 +61,4 @@
60
61
  "typescript": "^4.9.5 || ^5.4.5",
61
62
  "vitest": "^3.2.4"
62
63
  }
63
- }
64
+ }
package/CHANGELOG.md DELETED
@@ -1,299 +0,0 @@
1
- # @langchain/langgraph-cli
2
-
3
- ## 1.1.2
4
-
5
- ### Patch Changes
6
-
7
- - Updated dependencies [d08e484]
8
- - @langchain/langgraph-api@1.1.2
9
-
10
- ## 1.1.1
11
-
12
- ### Patch Changes
13
-
14
- - Updated dependencies [35e8fc7]
15
- - @langchain/langgraph-api@1.1.1
16
-
17
- ## 1.1.0
18
-
19
- ### Minor Changes
20
-
21
- - c71b92b: Updated the uv version to latest 0.9.11. Fixed error fixed EXDEV: cross-device link when using Python adapter
22
-
23
- ### Patch Changes
24
-
25
- - @langchain/langgraph-api@1.1.0
26
-
27
- ## 1.0.4
28
-
29
- ### Patch Changes
30
-
31
- - Updated dependencies [b9be526]
32
- - @langchain/langgraph-api@1.0.4
33
-
34
- ## 1.0.3
35
-
36
- ### Patch Changes
37
-
38
- - 6cd8ecb: Remove Zod 3.x dependency constraint to allow Zod 4.x and avoid installing duplicate Zod packages
39
- - Updated dependencies [6cd8ecb]
40
- - @langchain/langgraph-api@1.0.3
41
-
42
- ## 1.0.2
43
-
44
- ### Patch Changes
45
-
46
- - Updated dependencies [ebe5ae7]
47
- - @langchain/langgraph-api@1.0.2
48
-
49
- ## 1.0.1
50
-
51
- ### Patch Changes
52
-
53
- - Updated dependencies [610e1e1]
54
- - @langchain/langgraph-api@1.0.1
55
-
56
- ## 1.0.0
57
-
58
- ### Major Changes
59
-
60
- - 1e1ecbb: This release updates the package for compatibility with LangGraph v1.0. See the [v1.0 release notes](https://docs.langchain.com/oss/javascript/releases/langgraph-v1) for details on what's new.
61
-
62
- ### Patch Changes
63
-
64
- - Updated dependencies [1e1ecbb]
65
- - create-langgraph@1.0.0
66
- - @langchain/langgraph-api@1.0.0
67
-
68
- ## 0.0.71
69
-
70
- ### Patch Changes
71
-
72
- - Updated dependencies [f5865ac]
73
- - @langchain/langgraph-api@0.0.71
74
-
75
- ## 0.0.70
76
-
77
- ### Patch Changes
78
-
79
- - Updated dependencies [636e142]
80
- - @langchain/langgraph-api@0.0.70
81
-
82
- ## 0.0.69
83
-
84
- ### Patch Changes
85
-
86
- - Updated dependencies [f2aa533]
87
- - @langchain/langgraph-api@0.0.69
88
-
89
- ## 0.0.68
90
-
91
- ### Patch Changes
92
-
93
- - 7770c6a: Add `new` command to `@langchain/langgraph-cli` CLI
94
- - Updated dependencies [7770c6a]
95
- - create-langgraph@0.0.4
96
- - @langchain/langgraph-api@0.0.68
97
-
98
- ## 0.0.67
99
-
100
- ### Patch Changes
101
-
102
- - Updated dependencies [e23fa7f]
103
- - @langchain/langgraph-api@0.0.67
104
-
105
- ## 0.0.66
106
-
107
- ### Patch Changes
108
-
109
- - Updated dependencies [5176f1c]
110
- - Updated dependencies [68a1aa8]
111
- - @langchain/langgraph-api@0.0.66
112
-
113
- ## 0.0.65
114
-
115
- ### Patch Changes
116
-
117
- - Updated dependencies [0aefafe]
118
- - @langchain/langgraph-api@0.0.65
119
-
120
- ## 0.0.64
121
-
122
- ### Patch Changes
123
-
124
- - Updated dependencies [30bcfcd]
125
- - Updated dependencies [572de43]
126
- - @langchain/langgraph-api@0.0.64
127
-
128
- ## 0.0.63
129
-
130
- ### Patch Changes
131
-
132
- - Updated dependencies [c9d4dfd]
133
- - @langchain/langgraph-api@0.0.63
134
-
135
- ## 0.0.62
136
-
137
- ### Patch Changes
138
-
139
- - Updated dependencies [c868796]
140
- - @langchain/langgraph-api@0.0.62
141
-
142
- ## 0.0.61
143
-
144
- ### Patch Changes
145
-
146
- - Updated dependencies [a334897]
147
- - Updated dependencies [9357bb7]
148
- - Updated dependencies [9f13d74]
149
- - @langchain/langgraph-api@0.0.61
150
-
151
- ## 0.0.60
152
-
153
- ### Patch Changes
154
-
155
- - Updated dependencies [9c57526]
156
- - @langchain/langgraph-api@0.0.60
157
-
158
- ## 0.0.59
159
-
160
- ### Patch Changes
161
-
162
- - d28a9d7: fix(cli): sysinfo command failing to obtain dep versions for Node.js 20.x
163
- - Updated dependencies [3412f9f]
164
- - @langchain/langgraph-api@0.0.59
165
-
166
- ## 0.0.58
167
-
168
- ### Patch Changes
169
-
170
- - Updated dependencies [f65f619]
171
- - Updated dependencies [c857357]
172
- - @langchain/langgraph-api@0.0.58
173
-
174
- ## 0.0.57
175
-
176
- ### Patch Changes
177
-
178
- - 31cc9f7: support description property for `langgraph.json`
179
- - 679a1be: Fix sysinfo command for PNPM
180
- - 2f179e5: feat(cli): accept BROWSER=none to prevent spawning a browser
181
- - Updated dependencies [31cc9f7]
182
- - @langchain/langgraph-api@0.0.57
183
-
184
- ## 0.0.56
185
-
186
- ### Patch Changes
187
-
188
- - Updated dependencies [3c390c9]
189
- - @langchain/langgraph-api@0.0.56
190
-
191
- ## 0.0.55
192
-
193
- ### Patch Changes
194
-
195
- - Updated dependencies [ef84039]
196
- - Updated dependencies [7edf347]
197
- - Updated dependencies [77b21d5]
198
- - @langchain/langgraph-api@0.0.55
199
-
200
- ## 0.0.54
201
-
202
- ### Patch Changes
203
-
204
- - Updated dependencies [1777878]
205
- - @langchain/langgraph-api@0.0.54
206
-
207
- ## 0.0.53
208
-
209
- ### Patch Changes
210
-
211
- - Updated dependencies [f1bcec7]
212
- - @langchain/langgraph-api@0.0.53
213
-
214
- ## 0.0.52
215
-
216
- ### Patch Changes
217
-
218
- - Updated dependencies [030698f]
219
- - @langchain/langgraph-api@0.0.52
220
-
221
- ## 0.0.51
222
-
223
- ### Patch Changes
224
-
225
- - 11319f7: fix(cli): allow node_version: 22 when pulling and building image
226
- - @langchain/langgraph-api@0.0.51
227
-
228
- ## 0.0.50
229
-
230
- ### Patch Changes
231
-
232
- - 337b419: fix(cli): enable correct passthrough of docker build args
233
- - @langchain/langgraph-api@0.0.50
234
-
235
- ## 0.0.49
236
-
237
- ### Patch Changes
238
-
239
- - 78a15a1: feat(cli): add sysinfo command to obtain actual version
240
- - Updated dependencies [ee1defa]
241
- - @langchain/langgraph-api@0.0.49
242
-
243
- ## 0.0.48
244
-
245
- ### Patch Changes
246
-
247
- - ac7b067: fix(sdk): use `kind` when checking for Studio user
248
- - Updated dependencies [ac7b067]
249
- - @langchain/langgraph-api@0.0.48
250
-
251
- ## 0.0.47
252
-
253
- ### Patch Changes
254
-
255
- - 39cc88f: Fix apply namespace to messages-tuple stream mode
256
- - c1ddda1: Embed methods for obtaining state should use `getGraph(...)`
257
- - Updated dependencies [39cc88f]
258
- - Updated dependencies [c1ddda1]
259
- - @langchain/langgraph-api@0.0.47
260
-
261
- ## 0.0.46
262
-
263
- ### Patch Changes
264
-
265
- - d172de3: Fix apply namespace to messages-tuple stream mode
266
- - Updated dependencies [d172de3]
267
- - @langchain/langgraph-api@0.0.46
268
-
269
- ## 0.0.45
270
-
271
- ### Patch Changes
272
-
273
- - 603daa6: Embed should properly handle `payload.checkpoint` and `payload.checkpoint_id`
274
- - Updated dependencies [603daa6]
275
- - @langchain/langgraph-api@0.0.45
276
-
277
- ## 0.0.44
278
-
279
- ### Patch Changes
280
-
281
- - 2f26f2f: Expose get/delete thread endpoint to embed server
282
- - Updated dependencies [2f26f2f]
283
- - @langchain/langgraph-api@0.0.44
284
-
285
- ## 0.0.43
286
-
287
- ### Patch Changes
288
-
289
- - ce0a39a: Fix invalid package.json dependencies
290
- - Updated dependencies [ce0a39a]
291
- - @langchain/langgraph-api@0.0.43
292
-
293
- ## 0.0.42
294
-
295
- ### Patch Changes
296
-
297
- - 972b66a: Support gen UI components namespaced with a hyphen
298
- - Updated dependencies [972b66a]
299
- - @langchain/langgraph-api@0.0.42
@@ -1,52 +0,0 @@
1
- import { getDockerCapabilities } from "../docker/compose.mjs";
2
- import { assembleLocalDeps, configToDocker, getBaseImage, } from "../docker/docker.mjs";
3
- import { getExecaOptions } from "../docker/shell.mjs";
4
- import { getConfig } from "../utils/config.mjs";
5
- import { builder } from "./utils/builder.mjs";
6
- import { getProjectPath } from "./utils/project.mjs";
7
- import { $ } from "execa";
8
- import * as path from "node:path";
9
- import * as fs from "node:fs/promises";
10
- import { logger } from "../utils/logging.mjs";
11
- import { withAnalytics } from "./utils/analytics.mjs";
12
- import { gracefulExit } from "exit-hook";
13
- const stream = (proc) => {
14
- logger.info(`Running "${proc.spawnargs.join(" ")}"`);
15
- return proc;
16
- };
17
- builder
18
- .command("build")
19
- .description("Build LangGraph API server Docker image.")
20
- .requiredOption("-t, --tag <tag>", "Tag for the Docker image.")
21
- .option("-c, --config <path>", "Path to configuration file", process.cwd())
22
- .option("--no-pull", "Running the server with locally-built images. By default LangGraph will pull the latest images from the registry")
23
- .argument("[args...]")
24
- .passThroughOptions()
25
- .allowUnknownOption()
26
- .exitOverride((error) => gracefulExit(error.exitCode))
27
- .hook("preAction", withAnalytics((command) => ({
28
- config: command.opts().config !== process.cwd(),
29
- pull: command.opts().pull,
30
- })))
31
- .action(async (pass, params) => {
32
- const configPath = await getProjectPath(params.config);
33
- await getDockerCapabilities();
34
- const projectDir = path.dirname(configPath);
35
- const config = getConfig(await fs.readFile(configPath, "utf-8"));
36
- const opts = await getExecaOptions({
37
- cwd: projectDir,
38
- stderr: "inherit",
39
- stdout: "inherit",
40
- });
41
- const localDeps = await assembleLocalDeps(configPath, config);
42
- const input = await configToDocker(configPath, config, localDeps, {
43
- watch: false,
44
- dockerCommand: "build",
45
- });
46
- let exec = $({ ...opts, input });
47
- if (params.pull) {
48
- await stream(exec `docker pull ${getBaseImage(config)}`);
49
- }
50
- exec = $({ ...opts, input });
51
- await stream(exec `docker build -f - -t ${params.tag} ${projectDir} ${pass}`);
52
- });
package/dist/cli/cli.mjs DELETED
@@ -1,13 +0,0 @@
1
- #!/usr/bin/env node
2
- import { builder } from "./utils/builder.mjs";
3
- import { flushAnalytics } from "./utils/analytics.mjs";
4
- import { asyncExitHook, gracefulExit } from "exit-hook";
5
- import "./dev.mjs";
6
- import "./docker.mjs";
7
- import "./build.mjs";
8
- import "./up.mjs";
9
- import "./new.mjs";
10
- import "./sysinfo.mjs";
11
- builder.exitOverride((error) => gracefulExit(error.exitCode));
12
- asyncExitHook(() => flushAnalytics(), { wait: 2000 });
13
- builder.parse();
@@ -1,172 +0,0 @@
1
- import * as os from "node:os";
2
- import * as path from "node:path";
3
- import * as fs from "node:fs/promises";
4
- import { Readable, Transform, Writable } from "node:stream";
5
- import { ChildProcess, spawn } from "node:child_process";
6
- import { extract as tarExtract } from "tar";
7
- import * as nodeStream from "node:stream/web";
8
- import { fileURLToPath } from "node:url";
9
- import { logger } from "../utils/logging.mjs";
10
- import { BytesLineDecoder } from "./utils/stream.mjs";
11
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
12
- const CLOUDFLARED_VERSION = "2025.2.1";
13
- const CLOUDFLARED_CACHE_DIR = path.join(__dirname, ".cloudflare", CLOUDFLARED_VERSION);
14
- const writeFile = async (path, stream) => {
15
- if (stream == null)
16
- throw new Error("Stream is null");
17
- return await fs.writeFile(path, Readable.fromWeb(stream));
18
- };
19
- class CloudflareLoggerStream extends WritableStream {
20
- constructor() {
21
- const decoder = new TextDecoder();
22
- super({
23
- write(chunk) {
24
- const text = decoder.decode(chunk);
25
- const [_timestamp, level, ...rest] = text.split(" ");
26
- const message = rest.join(" ");
27
- if (level === "INF") {
28
- logger.debug(message);
29
- }
30
- else if (level === "ERR") {
31
- logger.error(message);
32
- }
33
- else {
34
- logger.info(message);
35
- }
36
- },
37
- });
38
- }
39
- fromWeb() {
40
- return Writable.fromWeb(this);
41
- }
42
- }
43
- class CloudflareUrlStream extends TransformStream {
44
- constructor() {
45
- const decoder = new TextDecoder();
46
- super({
47
- transform(chunk, controller) {
48
- const str = decoder.decode(chunk);
49
- const urlMatch = str.match(/https:\/\/[a-z0-9-]+\.trycloudflare\.com/)?.[0];
50
- if (urlMatch)
51
- controller.enqueue(urlMatch);
52
- },
53
- });
54
- }
55
- fromWeb() {
56
- // @ts-expect-error
57
- return Transform.fromWeb(this, { objectMode: true });
58
- }
59
- }
60
- export async function startCloudflareTunnel(port) {
61
- const targetBinaryPath = await ensureCloudflared();
62
- logger.info("Starting tunnel");
63
- const child = spawn(targetBinaryPath, ["tunnel", "--url", `http://localhost:${port}`], { stdio: ["inherit", "pipe", "pipe"] });
64
- child.stdout
65
- .pipe(new BytesLineDecoder().fromWeb())
66
- .pipe(new CloudflareLoggerStream().fromWeb());
67
- child.stderr
68
- .pipe(new BytesLineDecoder().fromWeb())
69
- .pipe(new CloudflareLoggerStream().fromWeb());
70
- const tunnelUrl = new Promise((resolve) => {
71
- child.stderr
72
- .pipe(new CloudflareUrlStream().fromWeb())
73
- .once("data", (data) => {
74
- logger.info(`Tunnel URL: "${data}"`);
75
- resolve(data);
76
- });
77
- });
78
- return { child, tunnelUrl };
79
- }
80
- function getFiles() {
81
- const platform = getPlatform();
82
- const arch = getArchitecture();
83
- if (platform === "windows") {
84
- if (arch !== "386" && arch !== "amd64") {
85
- throw new Error(`Unsupported architecture: ${arch}`);
86
- }
87
- return { binary: `cloudflared-${platform}-${arch}.exe` };
88
- }
89
- if (platform === "darwin") {
90
- if (arch !== "arm64" && arch !== "amd64") {
91
- throw new Error(`Unsupported architecture: ${arch}`);
92
- }
93
- return {
94
- archive: `cloudflared-${platform}-${arch}.tgz`,
95
- binary: "cloudflared",
96
- };
97
- }
98
- if (platform === "linux") {
99
- if (arch !== "arm64" && arch !== "amd64" && arch !== "386") {
100
- throw new Error(`Unsupported architecture: ${arch}`);
101
- }
102
- return { binary: `cloudflared-${platform}-${arch}` };
103
- }
104
- throw new Error(`Unsupported platform: ${platform}`);
105
- }
106
- async function downloadCloudflared() {
107
- await fs.mkdir(CLOUDFLARED_CACHE_DIR, { recursive: true });
108
- logger.info("Requesting download of `cloudflared`");
109
- const { binary, archive } = getFiles();
110
- const downloadFile = archive ?? binary;
111
- const tempDirPath = await fs.mkdtemp(path.join(os.tmpdir(), "cloudflared-"));
112
- const tempFilePath = path.join(tempDirPath, downloadFile);
113
- const url = `https://github.com/cloudflare/cloudflared/releases/download/${CLOUDFLARED_VERSION}/${downloadFile}`;
114
- logger.debug("Downloading `${archive}`", { url, target: tempDirPath });
115
- const response = await fetch(url);
116
- if (!response.ok || !response.body) {
117
- throw new Error(`Failed to download cloudflared: ${response.statusText}`);
118
- }
119
- await writeFile(tempFilePath, response.body);
120
- if (archive != null) {
121
- if (path.extname(archive) !== ".tgz") {
122
- throw new Error(`Invalid archive type: "${path.extname(archive)}"`);
123
- }
124
- logger.debug("Extracting `cloudflared`");
125
- await tarExtract({ file: tempFilePath, cwd: tempDirPath });
126
- }
127
- const sourceBinaryPath = path.resolve(tempDirPath, binary);
128
- const targetBinaryPath = path.resolve(CLOUDFLARED_CACHE_DIR, binary);
129
- logger.debug("Moving `cloudflared` to target directory", {
130
- targetBinaryPath,
131
- });
132
- await fs.rename(sourceBinaryPath, targetBinaryPath);
133
- await fs.chmod(targetBinaryPath, 0o755);
134
- }
135
- async function ensureCloudflared() {
136
- const { binary } = getFiles();
137
- const targetBinaryPath = path.resolve(CLOUDFLARED_CACHE_DIR, binary);
138
- try {
139
- await fs.access(targetBinaryPath);
140
- }
141
- catch {
142
- await downloadCloudflared();
143
- }
144
- return targetBinaryPath;
145
- }
146
- function getArchitecture() {
147
- const arch = os.arch();
148
- switch (arch) {
149
- case "x64":
150
- return "amd64";
151
- case "arm64":
152
- return "arm64";
153
- case "ia32":
154
- case "x86":
155
- return "386";
156
- default:
157
- throw new Error(`Unsupported architecture: ${arch}`);
158
- }
159
- }
160
- function getPlatform() {
161
- const platform = os.platform();
162
- switch (platform) {
163
- case "darwin":
164
- return "darwin";
165
- case "linux":
166
- return "linux";
167
- case "win32":
168
- return "windows";
169
- default:
170
- throw new Error(`Unsupported platform: ${platform}`);
171
- }
172
- }