langgraph-cli 0.4.3__tar.gz → 0.4.5__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.
Files changed (122) hide show
  1. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/PKG-INFO +2 -2
  2. {langgraph_cli-0.4.3/examples/graph_prerelease_reqs_fail → langgraph_cli-0.4.5/examples/graph_prerelease_reqs}/agent.py +1 -2
  3. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graph_prerelease_reqs/deps/additional_deps/pyproject.toml +1 -1
  4. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graph_prerelease_reqs/deps/zuper_deps/pyproject.toml +1 -1
  5. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graph_prerelease_reqs/pyproject.toml +3 -3
  6. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graphs/storm.py +6 -6
  7. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/pyproject.toml +1 -1
  8. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/generate_schema.py +3 -1
  9. langgraph_cli-0.4.5/langgraph_cli/__init__.py +1 -0
  10. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/langgraph_cli/cli.py +38 -39
  11. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/langgraph_cli/config.py +23 -519
  12. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/langgraph_cli/docker.py +14 -16
  13. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/langgraph_cli/exec.py +8 -7
  14. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/langgraph_cli/progress.py +1 -1
  15. langgraph_cli-0.4.5/langgraph_cli/schemas.py +558 -0
  16. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/langgraph_cli/templates.py +3 -4
  17. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/pyproject.toml +13 -5
  18. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/python-monorepo-example/pyproject.toml +1 -1
  19. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/schemas/schema.json +56 -13
  20. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/schemas/schema.v0.json +56 -13
  21. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/tests/unit_tests/cli/test_cli.py +1 -1
  22. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/tests/unit_tests/test_config.py +14 -14
  23. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/uv.lock +193 -322
  24. langgraph_cli-0.4.3/langgraph_cli/__init__.py +0 -1
  25. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/.gitignore +0 -0
  26. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/LICENSE +0 -0
  27. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/Makefile +0 -0
  28. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/README.md +0 -0
  29. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/.env.example +0 -0
  30. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/.gitignore +0 -0
  31. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/Makefile +0 -0
  32. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graph_prerelease_reqs/langgraph.json +0 -0
  33. {langgraph_cli-0.4.3/examples/graph_prerelease_reqs → langgraph_cli-0.4.5/examples/graph_prerelease_reqs_fail}/agent.py +0 -0
  34. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graph_prerelease_reqs_fail/langgraph.json +0 -0
  35. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graph_prerelease_reqs_fail/pyproject.toml +0 -0
  36. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graphs/agent.py +0 -0
  37. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graphs/langgraph.json +0 -0
  38. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graphs_reqs_a/__init__.py +0 -0
  39. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graphs_reqs_a/graphs_submod/__init__.py +0 -0
  40. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graphs_reqs_a/graphs_submod/agent.py +0 -0
  41. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graphs_reqs_a/graphs_submod/subprompt.txt +0 -0
  42. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graphs_reqs_a/hello.py +0 -0
  43. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graphs_reqs_a/langgraph.json +0 -0
  44. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graphs_reqs_a/prompt.txt +0 -0
  45. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graphs_reqs_a/requirements.txt +0 -0
  46. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graphs_reqs_b/graphs_submod/agent.py +0 -0
  47. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graphs_reqs_b/graphs_submod/subprompt.txt +0 -0
  48. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graphs_reqs_b/hello.py +0 -0
  49. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graphs_reqs_b/langgraph.json +0 -0
  50. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graphs_reqs_b/prompt.txt +0 -0
  51. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graphs_reqs_b/requirements.txt +0 -0
  52. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graphs_reqs_b/utils/__init__.py +0 -0
  53. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/graphs_reqs_b/utils/greeter.py +0 -0
  54. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/langgraph.json +0 -0
  55. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/my_app.py +0 -0
  56. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/pipconf.txt +0 -0
  57. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/examples/poetry.lock +0 -0
  58. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-examples/.dockerignore +0 -0
  59. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-examples/.env.example +0 -0
  60. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-examples/.eslintrc.cjs +0 -0
  61. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-examples/.gitignore +0 -0
  62. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-examples/LICENSE +0 -0
  63. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-examples/README.md +0 -0
  64. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-examples/jest.config.js +0 -0
  65. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-examples/langgraph.json +0 -0
  66. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-examples/package.json +0 -0
  67. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-examples/src/agent/graph.ts +0 -0
  68. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-examples/src/agent/state.ts +0 -0
  69. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-examples/static/studio.png +0 -0
  70. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-examples/tests/agent.test.ts +0 -0
  71. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-examples/tests/graph.int.test.ts +0 -0
  72. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-examples/tsconfig.json +0 -0
  73. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-examples/yarn.lock +0 -0
  74. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-monorepo-example/.eslintrc.cjs +0 -0
  75. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-monorepo-example/apps/agent/langgraph.json +0 -0
  76. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-monorepo-example/apps/agent/package.json +0 -0
  77. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-monorepo-example/apps/agent/src/graph.ts +0 -0
  78. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-monorepo-example/apps/agent/src/state.ts +0 -0
  79. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-monorepo-example/apps/agent/tsconfig.json +0 -0
  80. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-monorepo-example/libs/shared/package.json +0 -0
  81. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-monorepo-example/libs/shared/src/index.ts +0 -0
  82. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-monorepo-example/libs/shared/tsconfig.json +0 -0
  83. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-monorepo-example/package.json +0 -0
  84. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-monorepo-example/tsconfig.json +0 -0
  85. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-monorepo-example/turbo.json +0 -0
  86. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/js-monorepo-example/yarn.lock +0 -0
  87. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/langgraph_cli/__main__.py +0 -0
  88. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/langgraph_cli/analytics.py +0 -0
  89. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/langgraph_cli/constants.py +0 -0
  90. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/langgraph_cli/py.typed +0 -0
  91. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/langgraph_cli/util.py +0 -0
  92. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/langgraph_cli/version.py +0 -0
  93. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/python-monorepo-example/apps/agent/.env.example +0 -0
  94. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/python-monorepo-example/apps/agent/langgraph.json +0 -0
  95. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/python-monorepo-example/apps/agent/pyproject.toml +0 -0
  96. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/python-monorepo-example/apps/agent/src/agent/__init__.py +0 -0
  97. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/python-monorepo-example/apps/agent/src/agent/graph.py +0 -0
  98. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/python-monorepo-example/apps/agent/src/agent/state.py +0 -0
  99. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/python-monorepo-example/libs/common/__init__.py +0 -0
  100. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/python-monorepo-example/libs/common/helpers.py +0 -0
  101. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/python-monorepo-example/libs/shared/pyproject.toml +0 -0
  102. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/python-monorepo-example/libs/shared/src/shared/__init__.py +0 -0
  103. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/python-monorepo-example/libs/shared/src/shared/utils.py +0 -0
  104. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/schemas/version.schema.json +0 -0
  105. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/tests/__init__.py +0 -0
  106. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/tests/integration_tests/__init__.py +0 -0
  107. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/tests/integration_tests/test_cli.py +0 -0
  108. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/tests/unit_tests/__init__.py +0 -0
  109. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/tests/unit_tests/agent.py +0 -0
  110. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/tests/unit_tests/cli/__init__.py +0 -0
  111. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/tests/unit_tests/cli/langgraph.json +0 -0
  112. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/tests/unit_tests/cli/pyproject.toml +0 -0
  113. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/tests/unit_tests/cli/test_templates.py +0 -0
  114. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/tests/unit_tests/conftest.py +0 -0
  115. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/tests/unit_tests/graphs/agent.py +0 -0
  116. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/tests/unit_tests/helpers.py +0 -0
  117. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/tests/unit_tests/multiplatform/js.mts +0 -0
  118. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/tests/unit_tests/multiplatform/python.py +0 -0
  119. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/tests/unit_tests/pipconfig.txt +0 -0
  120. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/tests/unit_tests/test_config.json +0 -0
  121. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/tests/unit_tests/test_docker.py +0 -0
  122. {langgraph_cli-0.4.3 → langgraph_cli-0.4.5}/tests/unit_tests/test_util.py +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langgraph-cli
3
- Version: 0.4.3
3
+ Version: 0.4.5
4
4
  Summary: CLI for interacting with LangGraph API
5
5
  Project-URL: Repository, https://www.github.com/langchain-ai/langgraph
6
6
  License-Expression: MIT
7
7
  License-File: LICENSE
8
- Requires-Python: >=3.9
8
+ Requires-Python: >=3.10
9
9
  Requires-Dist: click>=8.1.7
10
10
  Requires-Dist: langgraph-sdk>=0.1.0; python_version >= '3.11'
11
11
  Provides-Extra: inmem
@@ -1,13 +1,12 @@
1
1
  from collections.abc import Sequence
2
2
  from typing import Annotated, Literal, TypedDict
3
3
 
4
- from langchain_community.tools.tavily_search import TavilySearchResults
5
4
  from langchain_core.messages import BaseMessage
6
5
  from langchain_openai import ChatOpenAI
7
6
  from langgraph.graph import END, StateGraph, add_messages
8
7
  from langgraph.prebuilt import ToolNode
9
8
 
10
- tools = [TavilySearchResults(max_results=1)]
9
+ tools = []
11
10
 
12
11
  model_oai = ChatOpenAI(temperature=0)
13
12
 
@@ -5,5 +5,5 @@ description = "Test for prerelease stuff"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
7
7
  dependencies = [
8
- "langgraph==0.6.0"
8
+ "langgraph==1.0.2"
9
9
  ]
@@ -5,5 +5,5 @@ description = "Test for prerelease stuff"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
7
7
  dependencies = [
8
- "langchain-openai==0.3.0"
8
+ "langchain-openai==1.0.1"
9
9
  ]
@@ -6,9 +6,9 @@ readme = "README.md"
6
6
  requires-python = ">=3.10"
7
7
  dependencies = [
8
8
  "langchain-openai==1.0.0a2",
9
- "langgraph==1.0.0a2",
10
- "langchain_community>=0.3.0",
9
+ "langchain-anthropic==1.0.0a5",
10
+ "langgraph==1.0.2"
11
11
  ]
12
12
 
13
13
  [tool.uv]
14
- prerelease = "allow"
14
+ prerelease = "allow"
@@ -1,6 +1,6 @@
1
1
  import asyncio
2
2
  import json
3
- from typing import Annotated, Optional
3
+ from typing import Annotated
4
4
 
5
5
  from langchain_community.retrievers import WikipediaRetriever
6
6
  from langchain_community.tools.tavily_search import TavilySearchResults
@@ -51,7 +51,7 @@ class Subsection(BaseModel):
51
51
  class Section(BaseModel):
52
52
  section_title: str = Field(..., title="Title of the section")
53
53
  description: str = Field(..., title="Content of the section")
54
- subsections: Optional[list[Subsection]] = Field(
54
+ subsections: list[Subsection] | None = Field(
55
55
  default=None,
56
56
  title="Titles and descriptions for each subsection of the Wikipedia page.",
57
57
  )
@@ -201,8 +201,8 @@ def update_editor(editor, new_editor):
201
201
 
202
202
  class InterviewState(TypedDict):
203
203
  messages: Annotated[list[AnyMessage], add_messages]
204
- references: Annotated[Optional[dict], update_references]
205
- editor: Annotated[Optional[Editor], update_editor]
204
+ references: Annotated[dict | None, update_references]
205
+ editor: Annotated[Editor | None, update_editor]
206
206
 
207
207
 
208
208
  gen_qn_prompt = ChatPromptTemplate.from_messages(
@@ -321,7 +321,7 @@ async def search_engine(query: str):
321
321
 
322
322
  async def gen_answer(
323
323
  state: InterviewState,
324
- config: Optional[RunnableConfig] = None,
324
+ config: RunnableConfig | None = None,
325
325
  name: str = "Subject_Matter_Expert",
326
326
  max_str_len: int = 15000,
327
327
  ):
@@ -437,7 +437,7 @@ class SubSection(BaseModel):
437
437
  class WikiSection(BaseModel):
438
438
  section_title: str = Field(..., title="Title of the section")
439
439
  content: str = Field(..., title="Full content of the section")
440
- subsections: Optional[list[Subsection]] = Field(
440
+ subsections: list[Subsection] | None = Field(
441
441
  default=None,
442
442
  title="Titles and descriptions for each subsection of the Wikipedia page.",
443
443
  )
@@ -7,7 +7,7 @@ name = "langgraph-examples"
7
7
  version = "0.1.0"
8
8
  description = ""
9
9
  readme = "README.md"
10
- requires-python = ">=3.9"
10
+ requires-python = ">=3.10"
11
11
  dependencies = [
12
12
  "langgraph-cli",
13
13
  "langgraph-sdk",
@@ -13,7 +13,7 @@ from pathlib import Path
13
13
 
14
14
  import msgspec
15
15
 
16
- from langgraph_cli.config import (
16
+ from langgraph_cli.schemas import (
17
17
  AuthConfig,
18
18
  CheckpointerConfig,
19
19
  Config,
@@ -22,6 +22,7 @@ from langgraph_cli.config import (
22
22
  HttpConfig,
23
23
  IndexConfig,
24
24
  SecurityConfig,
25
+ SerdeConfig,
25
26
  StoreConfig,
26
27
  ThreadTTLConfig,
27
28
  TTLConfig,
@@ -112,6 +113,7 @@ def add_descriptions_to_schema(schema, cls):
112
113
  CorsConfig,
113
114
  ThreadTTLConfig,
114
115
  CheckpointerConfig,
116
+ SerdeConfig,
115
117
  TTLConfig,
116
118
  ConfigurableHeaderConfig,
117
119
  ]:
@@ -0,0 +1 @@
1
+ __version__ = "0.4.5"
@@ -4,8 +4,7 @@ import os
4
4
  import pathlib
5
5
  import shutil
6
6
  import sys
7
- from collections.abc import Sequence
8
- from typing import Callable, Optional
7
+ from collections.abc import Callable, Sequence
9
8
 
10
9
  import click
11
10
  import click.exceptions
@@ -200,23 +199,23 @@ def cli():
200
199
  @log_command
201
200
  def up(
202
201
  config: pathlib.Path,
203
- docker_compose: Optional[pathlib.Path],
202
+ docker_compose: pathlib.Path | None,
204
203
  port: int,
205
204
  recreate: bool,
206
205
  pull: bool,
207
206
  watch: bool,
208
207
  wait: bool,
209
208
  verbose: bool,
210
- debugger_port: Optional[int],
211
- debugger_base_url: Optional[str],
212
- postgres_uri: Optional[str],
213
- api_version: Optional[str],
214
- image: Optional[str],
215
- base_image: Optional[str],
209
+ debugger_port: int | None,
210
+ debugger_base_url: str | None,
211
+ postgres_uri: str | None,
212
+ api_version: str | None,
213
+ image: str | None,
214
+ base_image: str | None,
216
215
  ):
217
216
  click.secho("Starting LangGraph API server...", fg="green")
218
217
  click.secho(
219
- """For local dev, requires env var LANGSMITH_API_KEY with access to LangGraph Platform.
218
+ """For local dev, requires env var LANGSMITH_API_KEY with access to LangSmith Deployment.
220
219
  For production use, requires a license key in env var LANGGRAPH_CLOUD_LICENSE_KEY.""",
221
220
  )
222
221
  with Runner() as runner, Progress(message="Pulling...") as set:
@@ -298,13 +297,13 @@ def _build(
298
297
  set: Callable[[str], None],
299
298
  config: pathlib.Path,
300
299
  config_json: dict,
301
- base_image: Optional[str],
302
- api_version: Optional[str],
300
+ base_image: str | None,
301
+ api_version: str | None,
303
302
  pull: bool,
304
303
  tag: str,
305
304
  passthrough: Sequence[str] = (),
306
- install_command: Optional[str] = None,
307
- build_command: Optional[str] = None,
305
+ install_command: str | None = None,
306
+ build_command: str | None = None,
308
307
  ):
309
308
  # pull latest images
310
309
  if pull:
@@ -403,12 +402,12 @@ def _build(
403
402
  def build(
404
403
  config: pathlib.Path,
405
404
  docker_build_args: Sequence[str],
406
- base_image: Optional[str],
407
- api_version: Optional[str],
405
+ base_image: str | None,
406
+ api_version: str | None,
408
407
  pull: bool,
409
408
  tag: str,
410
- install_command: Optional[str],
411
- build_command: Optional[str],
409
+ install_command: str | None,
410
+ build_command: str | None,
412
411
  ):
413
412
  with Runner() as runner, Progress(message="Pulling...") as set:
414
413
  if shutil.which("docker") is None:
@@ -512,8 +511,8 @@ def dockerfile(
512
511
  save_path: str,
513
512
  config: pathlib.Path,
514
513
  add_docker_compose: bool,
515
- base_image: Optional[str] = None,
516
- api_version: Optional[str] = None,
514
+ base_image: str | None = None,
515
+ api_version: str | None = None,
517
516
  ) -> None:
518
517
  save_path = pathlib.Path(save_path).absolute()
519
518
  secho(f"🔍 Validating configuration at path: {config}", fg="yellow")
@@ -584,7 +583,7 @@ def dockerfile(
584
583
  "\n",
585
584
  "# LANGSMITH_API_KEY=your-api-key",
586
585
  "\n",
587
- "# Or if you have a LangGraph Platform license key, "
586
+ "# Or if you have a LangSmith Deployment license key, "
588
587
  "then uncomment the following line: ",
589
588
  "\n",
590
589
  "# LANGGRAPH_CLOUD_LICENSE_KEY=your-license-key",
@@ -688,11 +687,11 @@ def dev(
688
687
  port: int,
689
688
  no_reload: bool,
690
689
  config: str,
691
- n_jobs_per_worker: Optional[int],
690
+ n_jobs_per_worker: int | None,
692
691
  no_browser: bool,
693
- debug_port: Optional[int],
692
+ debug_port: int | None,
694
693
  wait_for_client: bool,
695
- studio_url: Optional[str],
694
+ studio_url: str | None,
696
695
  allow_blocking: bool,
697
696
  tunnel: bool,
698
697
  server_log_level: str,
@@ -776,7 +775,7 @@ def dev(
776
775
  )
777
776
  @cli.command("new", help="🌱 Create a new LangGraph project from a template.")
778
777
  @log_command
779
- def new(path: Optional[str], template: Optional[str]) -> None:
778
+ def new(path: str | None, template: str | None) -> None:
780
779
  """Create a new LangGraph project from a template."""
781
780
  return create_new(path, template)
782
781
 
@@ -786,17 +785,17 @@ def prepare_args_and_stdin(
786
785
  capabilities: DockerCapabilities,
787
786
  config_path: pathlib.Path,
788
787
  config: Config,
789
- docker_compose: Optional[pathlib.Path],
788
+ docker_compose: pathlib.Path | None,
790
789
  port: int,
791
790
  watch: bool,
792
- debugger_port: Optional[int] = None,
793
- debugger_base_url: Optional[str] = None,
794
- postgres_uri: Optional[str] = None,
795
- api_version: Optional[str] = None,
791
+ debugger_port: int | None = None,
792
+ debugger_base_url: str | None = None,
793
+ postgres_uri: str | None = None,
794
+ api_version: str | None = None,
796
795
  # Like "my-tag" (if you already built it locally)
797
- image: Optional[str] = None,
796
+ image: str | None = None,
798
797
  # Like "langchain/langgraphjs-api" or "langchain/langgraph-api
799
- base_image: Optional[str] = None,
798
+ base_image: str | None = None,
800
799
  ) -> tuple[list[str], str]:
801
800
  assert config_path.exists(), f"Config file not found: {config_path}"
802
801
  # prepare args
@@ -835,17 +834,17 @@ def prepare(
835
834
  *,
836
835
  capabilities: DockerCapabilities,
837
836
  config_path: pathlib.Path,
838
- docker_compose: Optional[pathlib.Path],
837
+ docker_compose: pathlib.Path | None,
839
838
  port: int,
840
839
  pull: bool,
841
840
  watch: bool,
842
841
  verbose: bool,
843
- debugger_port: Optional[int] = None,
844
- debugger_base_url: Optional[str] = None,
845
- postgres_uri: Optional[str] = None,
846
- api_version: Optional[str] = None,
847
- image: Optional[str] = None,
848
- base_image: Optional[str] = None,
842
+ debugger_port: int | None = None,
843
+ debugger_base_url: str | None = None,
844
+ postgres_uri: str | None = None,
845
+ api_version: str | None = None,
846
+ image: str | None = None,
847
+ base_image: str | None = None,
849
848
  ) -> tuple[list[str], str]:
850
849
  """Prepare the arguments and stdin for running the LangGraph API server."""
851
850
  config_json = langgraph_cli.config.validate_config_file(config_path)