@langchain/langgraph-cli 0.0.0-preview.9 → 0.0.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.
@@ -1,3 +1,25 @@
1
+ // MIT License
2
+ //
3
+ // Copyright (c) Hiroki Osame <hiroki.osame@gmail.com>
4
+ //
5
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ // of this software and associated documentation files (the "Software"), to deal
7
+ // in the Software without restriction, including without limitation the rights
8
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ // copies of the Software, and to permit persons to whom the Software is
10
+ // furnished to do so, subject to the following conditions:
11
+ //
12
+ // The above copyright notice and this permission notice shall be included in all
13
+ // copies or substantial portions of the Software.
14
+ //
15
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ // SOFTWARE.
22
+ //
1
23
  // https://github.com/privatenumber/tsx/tree/28a3e7d2b8fd72b683aab8a98dd1fcee4624e4cb
2
24
  import net from "node:net";
3
25
  import { getPipePath } from "./utils/get-pipe-path.mjs";
@@ -1,3 +1,25 @@
1
+ // MIT License
2
+ //
3
+ // Copyright (c) Hiroki Osame <hiroki.osame@gmail.com>
4
+ //
5
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ // of this software and associated documentation files (the "Software"), to deal
7
+ // in the Software without restriction, including without limitation the rights
8
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ // copies of the Software, and to permit persons to whom the Software is
10
+ // furnished to do so, subject to the following conditions:
11
+ //
12
+ // The above copyright notice and this permission notice shall be included in all
13
+ // copies or substantial portions of the Software.
14
+ //
15
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ // SOFTWARE.
22
+ //
1
23
  // https://github.com/privatenumber/tsx/tree/28a3e7d2b8fd72b683aab8a98dd1fcee4624e4cb
2
24
  import net from "node:net";
3
25
  import fs from "node:fs";
@@ -1,3 +1,25 @@
1
+ // MIT License
2
+ //
3
+ // Copyright (c) Hiroki Osame <hiroki.osame@gmail.com>
4
+ //
5
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ // of this software and associated documentation files (the "Software"), to deal
7
+ // in the Software without restriction, including without limitation the rights
8
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ // copies of the Software, and to permit persons to whom the Software is
10
+ // furnished to do so, subject to the following conditions:
11
+ //
12
+ // The above copyright notice and this permission notice shall be included in all
13
+ // copies or substantial portions of the Software.
14
+ //
15
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ // SOFTWARE.
22
+ //
1
23
  // https://github.com/privatenumber/tsx/tree/28a3e7d2b8fd72b683aab8a98dd1fcee4624e4cb
2
24
  import path from "node:path";
3
25
  import { tmpdir } from "./temporary-directory.mjs";
@@ -1,3 +1,25 @@
1
+ // MIT License
2
+ //
3
+ // Copyright (c) Hiroki Osame <hiroki.osame@gmail.com>
4
+ //
5
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ // of this software and associated documentation files (the "Software"), to deal
7
+ // in the Software without restriction, including without limitation the rights
8
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ // copies of the Software, and to permit persons to whom the Software is
10
+ // furnished to do so, subject to the following conditions:
11
+ //
12
+ // The above copyright notice and this permission notice shall be included in all
13
+ // copies or substantial portions of the Software.
14
+ //
15
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ // SOFTWARE.
22
+ //
1
23
  // https://github.com/privatenumber/tsx/tree/28a3e7d2b8fd72b683aab8a98dd1fcee4624e4cb
2
24
  import path from "node:path";
3
25
  import os from "node:os";
@@ -192,10 +192,11 @@ export async function nodeConfigToDocker(configPath, config, localDeps, options)
192
192
  .stat(path.resolve(projectFolder, file))
193
193
  .then((a) => a.isFile())
194
194
  .catch(() => false);
195
- const [npm, yarn, pnpm] = await Promise.all([
195
+ const [npm, yarn, pnpm, bun] = await Promise.all([
196
196
  testFile("package-lock.json"),
197
197
  testFile("yarn.lock"),
198
198
  testFile("pnpm-lock.yaml"),
199
+ testFile("bun.lockb"),
199
200
  ]);
200
201
  let installCmd = "npm i";
201
202
  if (yarn) {
@@ -207,6 +208,9 @@ export async function nodeConfigToDocker(configPath, config, localDeps, options)
207
208
  else if (npm) {
208
209
  installCmd = "npm ci";
209
210
  }
211
+ else if (bun) {
212
+ installCmd = "bun i";
213
+ }
210
214
  const lines = [
211
215
  `FROM ${getBaseImage(config)}`,
212
216
  ...config.dockerfile_lines,
package/dist/schemas.mjs CHANGED
@@ -193,8 +193,22 @@ export const RunCreate = z
193
193
  .optional(),
194
194
  stream_mode: z
195
195
  .union([
196
- z.array(z.enum(["values", "messages", "updates", "events", "debug"])),
197
- z.enum(["values", "messages", "updates", "events", "debug"]),
196
+ z.array(z.enum([
197
+ "values",
198
+ "messages",
199
+ "messages-tuple",
200
+ "updates",
201
+ "events",
202
+ "debug",
203
+ ])),
204
+ z.enum([
205
+ "values",
206
+ "messages",
207
+ "messages-tuple",
208
+ "updates",
209
+ "events",
210
+ "debug",
211
+ ]),
198
212
  ])
199
213
  .optional(),
200
214
  stream_subgraphs: z.boolean().optional(),
@@ -543,8 +543,11 @@ export class Runs {
543
543
  static async put(runId, assistantId, kwargs, options) {
544
544
  return conn.with(async (STORE) => {
545
545
  const assistant = STORE.assistants[assistantId];
546
- if (!assistant)
547
- return [];
546
+ if (!assistant) {
547
+ throw new HTTPException(404, {
548
+ message: `No assistant found for "${assistantId}". Make sure the assistant ID is for a valid assistant or a valid graph ID.`,
549
+ });
550
+ }
548
551
  const ifNotExists = options?.ifNotExists ?? "reject";
549
552
  const multitaskStrategy = options?.multitaskStrategy ?? "reject";
550
553
  const afterSeconds = options?.afterSeconds ?? 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph-cli",
3
- "version": "0.0.0-preview.9",
3
+ "version": "0.0.1",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=18"
@@ -47,7 +47,8 @@
47
47
  "winston": "^3.17.0",
48
48
  "winston-console-format": "^1.0.8",
49
49
  "yaml": "^2.7.0",
50
- "zod": "^3.23.8"
50
+ "zod": "^3.23.8",
51
+ "@babel/code-frame": "^7.26.2"
51
52
  },
52
53
  "peerDependencies": {
53
54
  "@langchain/core": "^0.3.27",
@@ -56,7 +57,6 @@
56
57
  "typescript": "^5.5.4"
57
58
  },
58
59
  "devDependencies": {
59
- "@babel/code-frame": "^7.26.2",
60
60
  "@langchain/langgraph-sdk": "^0.0.33",
61
61
  "@types/babel__code-frame": "^7.0.6",
62
62
  "@types/node": "^22.2.0",