langgraph-cli 0.1.84__tar.gz → 0.2.1__tar.gz

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,8 +1,7 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: langgraph-cli
3
- Version: 0.1.84
3
+ Version: 0.2.1
4
4
  Summary: CLI for interacting with LangGraph API
5
- Home-page: https://www.github.com/langchain-ai/langgraph
6
5
  License: MIT
7
6
  Requires-Python: >=3.9.0,<4.0.0
8
7
  Classifier: License :: OSI Approved :: MIT License
@@ -11,9 +10,11 @@ Classifier: Programming Language :: Python :: 3.9
11
10
  Classifier: Programming Language :: Python :: 3.10
12
11
  Classifier: Programming Language :: Python :: 3.11
13
12
  Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
14
  Provides-Extra: inmem
15
15
  Requires-Dist: click (>=8.1.7,<9.0.0)
16
- Requires-Dist: langgraph-api (>=0.0.42,<0.1.0) ; (python_version >= "3.11" and python_version < "4.0") and (extra == "inmem")
16
+ Requires-Dist: langgraph-api (>=0.1.0,<0.2.0) ; (python_version >= "3.11" and python_version < "4.0") and (extra == "inmem")
17
+ Requires-Dist: langgraph-runtime-inmem (>=0.0.1,<0.1.0) ; (python_version >= "3.11" and python_version < "4.0") and (extra == "inmem")
17
18
  Requires-Dist: python-dotenv (>=0.8.0) ; extra == "inmem"
18
19
  Project-URL: Repository, https://www.github.com/langchain-ai/langgraph
19
20
  Description-Content-Type: text/markdown
@@ -406,6 +406,18 @@ class Config(TypedDict, total=False):
406
406
  """
407
407
 
408
408
 
409
+ PIP_CLEANUP_LINES = """# -- Ensure user deps didn't inadvertently overwrite langgraph-api
410
+ RUN mkdir -p /api/langgraph_api /api/langgraph_runtime /api/langgraph_license && \
411
+ touch /api/langgraph_api/__init__.py /api/langgraph_runtime/__init__.py /api/langgraph_license/__init__.py
412
+ RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir --no-deps -e /api
413
+ # -- End of ensuring user deps didn't inadvertently overwrite langgraph-api --
414
+ # -- Removing pip from the final image ~<:===~~~ --
415
+ RUN pip uninstall -y pip setuptools wheel && \
416
+ rm -rf /usr/local/lib/python*/site-packages/pip* /usr/local/lib/python*/site-packages/setuptools* /usr/local/lib/python*/site-packages/wheel* && \
417
+ find /usr/local/bin -name "pip*" -delete
418
+ # -- End of pip removal --"""
419
+
420
+
409
421
  def _parse_version(version_str: str) -> tuple[int, int]:
410
422
  """Parse a version string into a tuple of (major, minor)."""
411
423
  try:
@@ -778,7 +790,22 @@ def _update_graph_paths(
778
790
  FileNotFoundError: If the local file (module) does not actually exist on disk.
779
791
  IsADirectoryError: If `module_str` points to a directory instead of a file.
780
792
  """
781
- for graph_id, import_str in config["graphs"].items():
793
+ for graph_id, data in config["graphs"].items():
794
+ if isinstance(data, dict):
795
+ # Then we're looking for a 'path' key
796
+ if "path" not in data:
797
+ raise ValueError(
798
+ f"Graph '{graph_id}' must contain a 'path' key if "
799
+ f" it is a dictionary."
800
+ )
801
+ import_str = data["path"]
802
+ elif isinstance(data, str):
803
+ import_str = data
804
+ else:
805
+ raise ValueError(
806
+ f"Graph '{graph_id}' must be a string or a dictionary with a 'path' key."
807
+ )
808
+
782
809
  module_str, _, attr_str = import_str.partition(":")
783
810
  if not module_str or not attr_str:
784
811
  message = (
@@ -818,7 +845,10 @@ def _update_graph_paths(
818
845
  "Add its containing package to 'dependencies' list."
819
846
  )
820
847
  # update the config
821
- config["graphs"][graph_id] = f"{module_str}:{attr_str}"
848
+ if isinstance(data, dict):
849
+ config["graphs"][graph_id]["path"] = f"{module_str}:{attr_str}"
850
+ else:
851
+ config["graphs"][graph_id] = f"{module_str}:{attr_str}"
822
852
 
823
853
 
824
854
  def _update_auth_path(
@@ -1123,6 +1153,8 @@ ADD {relpath} /deps/{name}
1123
1153
  "",
1124
1154
  ui_inst_str,
1125
1155
  "",
1156
+ PIP_CLEANUP_LINES, # Add pip cleanup after all installations are complete
1157
+ "",
1126
1158
  f"WORKDIR {local_deps.working_dir}" if local_deps.working_dir else "",
1127
1159
  ]
1128
1160
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "langgraph-cli"
3
- version = "0.1.84"
3
+ version = "0.2.1"
4
4
  description = "CLI for interacting with LangGraph API"
5
5
  authors = []
6
6
  license = "MIT"
@@ -14,7 +14,9 @@ langgraph = "langgraph_cli.cli:cli"
14
14
  [tool.poetry.dependencies]
15
15
  python = "^3.9.0,<4.0"
16
16
  click = "^8.1.7"
17
- langgraph-api = { version = ">=0.0.42,<0.1.0", optional = true, python = ">=3.11,<4.0" }
17
+ langgraph-api = { version = ">=0.1.0,<0.2.0", optional = true, python = ">=3.11,<4.0" }
18
+ langgraph-runtime-inmem = { version = ">=0.0.1,<0.1.0", optional = true, python = ">=3.11,<4.0" }
19
+ langgraph-sdk = { version = ">=0.1.0,<0.2.0", optional = true, python = ">=3.11,<4.0" }
18
20
  python-dotenv = { version = ">=0.8.0", optional = true }
19
21
 
20
22
  [tool.poetry.group.dev.dependencies]
@@ -28,7 +30,7 @@ mypy = "^1.10.0"
28
30
  msgspec = "^0.19.0"
29
31
 
30
32
  [tool.poetry.extras]
31
- inmem = ["langgraph-api", "python-dotenv"]
33
+ inmem = ["langgraph-api", "langgraph-runtime-inmem", "python-dotenv"]
32
34
 
33
35
  [tool.pytest.ini_options]
34
36
  # --strict-markers will raise errors on unknown marks.
File without changes
File without changes