@langchain/langgraph-cli 1.1.11 → 1.1.13
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/docker/docker.mjs +16 -3
- package/dist/utils/config.mjs +15 -0
- package/package.json +3 -3
package/dist/docker/docker.mjs
CHANGED
|
@@ -186,12 +186,25 @@ async function updateGraphPaths(configPath, config, localDeps) {
|
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
export function getBaseImage(config) {
|
|
189
|
+
export function getBaseImage(config, apiVersion) {
|
|
190
|
+
const resolvedApiVersion = apiVersion ?? config.api_version;
|
|
190
191
|
if ("node_version" in config) {
|
|
191
|
-
|
|
192
|
+
if (config._INTERNAL_docker_tag) {
|
|
193
|
+
return `langchain/langgraphjs-api:${config._INTERNAL_docker_tag}`;
|
|
194
|
+
}
|
|
195
|
+
if (resolvedApiVersion) {
|
|
196
|
+
return `langchain/langgraphjs-api:${resolvedApiVersion}-node${config.node_version}`;
|
|
197
|
+
}
|
|
198
|
+
return `langchain/langgraphjs-api:${config.node_version}`;
|
|
192
199
|
}
|
|
193
200
|
if ("python_version" in config) {
|
|
194
|
-
|
|
201
|
+
if (config._INTERNAL_docker_tag) {
|
|
202
|
+
return `langchain/langgraph-api:${config._INTERNAL_docker_tag}`;
|
|
203
|
+
}
|
|
204
|
+
if (resolvedApiVersion) {
|
|
205
|
+
return `langchain/langgraph-api:${resolvedApiVersion}-py${config.python_version}`;
|
|
206
|
+
}
|
|
207
|
+
return `langchain/langgraph-api:${config.python_version}`;
|
|
195
208
|
}
|
|
196
209
|
throw new Error("Invalid config type");
|
|
197
210
|
}
|
package/dist/utils/config.mjs
CHANGED
|
@@ -16,6 +16,18 @@ const BaseConfigSchema = z.object({
|
|
|
16
16
|
ui: z.record(z.string()).optional(),
|
|
17
17
|
ui_config: z.object({ shared: z.array(z.string()).optional() }).optional(),
|
|
18
18
|
_INTERNAL_docker_tag: z.string().optional(),
|
|
19
|
+
api_version: z
|
|
20
|
+
.string()
|
|
21
|
+
.refine((v) => {
|
|
22
|
+
const base = v.split("-")[0];
|
|
23
|
+
const parts = base.split(".");
|
|
24
|
+
if (parts.length === 0 || parts.length > 3)
|
|
25
|
+
return false;
|
|
26
|
+
return parts.every((p) => /^\d+$/.test(p));
|
|
27
|
+
}, {
|
|
28
|
+
message: "api_version must be in format major, major.minor, or major.minor.patch",
|
|
29
|
+
})
|
|
30
|
+
.optional(),
|
|
19
31
|
env: z
|
|
20
32
|
.union([z.array(z.string()), z.record(z.string()), z.string()])
|
|
21
33
|
.default({}),
|
|
@@ -77,6 +89,9 @@ const ConfigSchema = z.union([NodeConfigSchema, PythonConfigSchema]);
|
|
|
77
89
|
// TODO: implement this in Python CLI
|
|
78
90
|
export const getConfig = (config) => {
|
|
79
91
|
let input = typeof config === "string" ? JSON.parse(config) : config;
|
|
92
|
+
if (input.api_version && input._INTERNAL_docker_tag) {
|
|
93
|
+
throw new Error("Cannot specify both _INTERNAL_docker_tag and api_version.");
|
|
94
|
+
}
|
|
80
95
|
const { graphs } = BaseConfigSchema.parse(input);
|
|
81
96
|
const isPython = Object.values(graphs).map((graphDef) => {
|
|
82
97
|
const importStr = typeof graphDef === "string" ? graphDef : graphDef.path;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langchain/langgraph-cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": "^18.19.0 || >=20.16.0"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"execa": "^9.5.2",
|
|
30
30
|
"exit-hook": "^4.0.0",
|
|
31
31
|
"extract-zip": "^2.0.1",
|
|
32
|
-
"langsmith": "^0.
|
|
32
|
+
"langsmith": "^0.4.6",
|
|
33
33
|
"open": "^10.1.0",
|
|
34
34
|
"package-manager-detector": "^1.3.0",
|
|
35
35
|
"stacktrace-parser": "^0.1.10",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"winston-console-format": "^1.0.8",
|
|
39
39
|
"yaml": "^2.7.0",
|
|
40
40
|
"zod": "^3.25.76 || ^4",
|
|
41
|
-
"@langchain/langgraph-api": "1.1.
|
|
41
|
+
"@langchain/langgraph-api": "1.1.13",
|
|
42
42
|
"create-langgraph": "1.1.5"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|