diff --git a/libs/cli/langgraph_cli/cli.py b/libs/cli/langgraph_cli/cli.py index 6c85f6b06..d651529a3 100644 --- a/libs/cli/langgraph_cli/cli.py +++ b/libs/cli/langgraph_cli/cli.py @@ -550,6 +550,12 @@ def dockerfile(save_path: str, config: pathlib.Path, add_docker_compose: bool) - type=int, help="Enable remote debugging by listening on specified port. Requires debugpy to be installed", ) +@click.option( + "--wait-for-client", + is_flag=True, + help="Wait for a debugger client to connect to the debug port before starting the server", + default=False, +) @cli.command( "dev", help="🏃‍♀️‍➡️ Run LangGraph API server in development mode with hot reloading and debugging support", @@ -563,6 +569,7 @@ def dev( n_jobs_per_worker: Optional[int], no_browser: bool, debug_port: Optional[int], + wait_for_client: bool, ): """CLI entrypoint for running the LangGraph API server.""" try: @@ -595,9 +602,6 @@ def dev( sys.path.append(str(dep_path)) graphs = config_json.get("graphs", {}) - additional_config = {} - if config_json.get("store"): - additional_config["store"] = config_json["store"] run_server( host, @@ -607,8 +611,9 @@ def dev( n_jobs_per_worker=n_jobs_per_worker, open_browser=not no_browser, debug_port=debug_port, - env=config_json.get("env", None), - config=additional_config, + env=config_json.get("env"), + store=config_json.get("store"), + wait_for_client=wait_for_client, ) diff --git a/libs/cli/langgraph_cli/config.py b/libs/cli/langgraph_cli/config.py index aa6e903a3..99db440e1 100644 --- a/libs/cli/langgraph_cli/config.py +++ b/libs/cli/langgraph_cli/config.py @@ -392,14 +392,12 @@ def python_config_to_docker(config_path: pathlib.Path, config: Config, base_imag ], ) ) - additional_config = {} - if config.get("store"): - additional_config["store"] = config["store"] + store_config = config.get("store") env_additional_config = ( "" - if not additional_config + if not store_config else f""" -ENV LANGGRAPH_CONFIG='{json.dumps(additional_config)}' +ENV LANGGRAPH_STORE='{json.dumps(store_config)}' """ ) return f"""FROM {base_image}:{config['python_version']} @@ -439,14 +437,12 @@ def test_file(file_name): install_cmd = "npm ci" else: install_cmd = "npm i" - additional_config = {} - if config.get("store"): - additional_config["store"] = config["store"] + store_config = config.get("store") env_additional_config = ( "" - if not additional_config + if not store_config else f""" -ENV LANGGRAPH_CONFIG='{json.dumps(additional_config)}' +ENV LANGGRAPH_STORE='{json.dumps(store_config)}' """ ) return f"""FROM {base_image}:{config['node_version']} diff --git a/libs/cli/poetry.lock b/libs/cli/poetry.lock index 9761e08a4..b59bde1b3 100644 --- a/libs/cli/poetry.lock +++ b/libs/cli/poetry.lock @@ -565,13 +565,13 @@ langgraph-sdk = ">=0.1.32,<0.2.0" [[package]] name = "langgraph-api" -version = "0.0.5" +version = "0.0.6" description = "" optional = true python-versions = "<4.0,>=3.11.0" files = [ - {file = "langgraph_api-0.0.5-py3-none-any.whl", hash = "sha256:9c981c489924f5d7e67ce7a3a9908ede15ac266e699deff6f5de691af5b49931"}, - {file = "langgraph_api-0.0.5.tar.gz", hash = "sha256:f7ff041f1706152a2587916f0373f513e456cde067c94f8266ff29f6af908d20"}, + {file = "langgraph_api-0.0.6-py3-none-any.whl", hash = "sha256:f64b13959d721143f6a023af5b9ffc9aa054064af98d21d5d8090cda7e7bffd2"}, + {file = "langgraph_api-0.0.6.tar.gz", hash = "sha256:badac44fa1ec979509e56fc0da57eeb5f278ee5871f27803f73ea6d8822c21b9"}, ] [package.dependencies] @@ -1561,4 +1561,4 @@ inmem = ["langgraph-api", "python-dotenv"] [metadata] lock-version = "2.0" python-versions = "^3.9.0,<4.0" -content-hash = "7388b141c48dd6cfa33b504822e5348ac514ac2e2711d37368d7cb7103c8340a" +content-hash = "8eaaa66d9e6e447699e3bcee336dfe779b58c956f8c2ad6678008a07be935838" diff --git a/libs/cli/pyproject.toml b/libs/cli/pyproject.toml index f2987d2f8..24041c244 100644 --- a/libs/cli/pyproject.toml +++ b/libs/cli/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langgraph-cli" -version = "0.1.60" +version = "0.1.61" description = "CLI for interacting with LangGraph API" authors = [] license = "MIT" @@ -14,7 +14,7 @@ langgraph = "langgraph_cli.cli:cli" [tool.poetry.dependencies] python = "^3.9.0,<4.0" click = "^8.1.7" -langgraph-api = { version = ">=0.0.5,<0.1.0", optional = true, python = ">=3.11,<4.0" } +langgraph-api = { version = ">=0.0.6,<0.1.0", optional = true, python = ">=3.11,<4.0" } python-dotenv = { version = ">=0.8.0", optional = true } [tool.poetry.group.dev.dependencies]