langgraph-cli 0.1.60__tar.gz → 0.1.62__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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: langgraph-cli
3
- Version: 0.1.60
3
+ Version: 0.1.62
4
4
  Summary: CLI for interacting with LangGraph API
5
5
  Home-page: https://www.github.com/langchain-ai/langgraph
6
6
  License: MIT
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
14
  Provides-Extra: inmem
15
15
  Requires-Dist: click (>=8.1.7,<9.0.0)
16
- Requires-Dist: langgraph-api (>=0.0.5,<0.1.0) ; (python_version >= "3.11" and python_version < "4.0") and (extra == "inmem")
16
+ Requires-Dist: langgraph-api (>=0.0.7,<0.1.0) ; (python_version >= "3.11" and python_version < "4.0") and (extra == "inmem")
17
17
  Requires-Dist: python-dotenv (>=0.8.0) ; extra == "inmem"
18
18
  Project-URL: Repository, https://www.github.com/langchain-ai/langgraph
19
19
  Description-Content-Type: text/markdown
@@ -550,6 +550,12 @@ def dockerfile(save_path: str, config: pathlib.Path, add_docker_compose: bool) -
550
550
  type=int,
551
551
  help="Enable remote debugging by listening on specified port. Requires debugpy to be installed",
552
552
  )
553
+ @click.option(
554
+ "--wait-for-client",
555
+ is_flag=True,
556
+ help="Wait for a debugger client to connect to the debug port before starting the server",
557
+ default=False,
558
+ )
553
559
  @cli.command(
554
560
  "dev",
555
561
  help="🏃‍♀️‍➡️ Run LangGraph API server in development mode with hot reloading and debugging support",
@@ -563,22 +569,25 @@ def dev(
563
569
  n_jobs_per_worker: Optional[int],
564
570
  no_browser: bool,
565
571
  debug_port: Optional[int],
572
+ wait_for_client: bool,
566
573
  ):
567
574
  """CLI entrypoint for running the LangGraph API server."""
568
575
  try:
569
576
  from langgraph_api.cli import run_server
570
577
  except ImportError:
571
578
  try:
572
- import pkg_resources
573
-
574
- pkg_resources.require("langgraph-api-inmem")
575
- except (ImportError, pkg_resources.DistributionNotFound):
579
+ from importlib import util
580
+
581
+ if not util.find_spec("langgraph_api"):
582
+ raise click.UsageError(
583
+ "Required package 'langgraph-api' is not installed.\n"
584
+ "Please install it with:\n\n"
585
+ ' pip install -U "langgraph-cli[inmem]"\n\n'
586
+ ) from None
587
+ except ImportError:
576
588
  raise click.UsageError(
577
- "Required package 'langgraph-api-inmem' is not installed.\n"
578
- "Please install it with:\n\n"
579
- ' pip install -U "langgraph-cli[inmem]"\n\n'
580
- "If you're developing the langgraph-cli package locally, you can install in development mode:\n"
581
- " pip install -e ."
589
+ "Could not verify package installation. Please ensure Python is up to date and\n"
590
+ "langgraph-cli is installed with the 'inmem' extra: pip install -U \"langgraph-cli[inmem]\""
582
591
  ) from None
583
592
  raise click.UsageError(
584
593
  "Could not import run_server. This likely means your installation is incomplete.\n"
@@ -595,9 +604,6 @@ def dev(
595
604
  sys.path.append(str(dep_path))
596
605
 
597
606
  graphs = config_json.get("graphs", {})
598
- additional_config = {}
599
- if config_json.get("store"):
600
- additional_config["store"] = config_json["store"]
601
607
 
602
608
  run_server(
603
609
  host,
@@ -607,8 +613,10 @@ def dev(
607
613
  n_jobs_per_worker=n_jobs_per_worker,
608
614
  open_browser=not no_browser,
609
615
  debug_port=debug_port,
610
- env=config_json.get("env", None),
611
- config=additional_config,
616
+ env=config_json.get("env"),
617
+ store=config_json.get("store"),
618
+ wait_for_client=wait_for_client,
619
+ auth=config_json.get("auth"),
612
620
  )
613
621
 
614
622
 
@@ -17,13 +17,13 @@ class IndexConfig(TypedDict, total=False):
17
17
  """Number of dimensions in the embedding vectors.
18
18
 
19
19
  Common embedding models have the following dimensions:
20
- - OpenAI text-embedding-3-large: 256, 1024, or 3072
21
- - OpenAI text-embedding-3-small: 512 or 1536
22
- - OpenAI text-embedding-ada-002: 1536
23
- - Cohere embed-english-v3.0: 1024
24
- - Cohere embed-english-light-v3.0: 384
25
- - Cohere embed-multilingual-v3.0: 1024
26
- - Cohere embed-multilingual-light-v3.0: 384
20
+ - openai:text-embedding-3-large: 3072
21
+ - openai:text-embedding-3-small: 1536
22
+ - openai:text-embedding-ada-002: 1536
23
+ - cohere:embed-english-v3.0: 1024
24
+ - cohere:embed-english-light-v3.0: 384
25
+ - cohere:embed-multilingual-v3.0: 1024
26
+ - cohere:embed-multilingual-light-v3.0: 384
27
27
  """
28
28
 
29
29
  embed: str
@@ -47,6 +47,11 @@ class StoreConfig(TypedDict, total=False):
47
47
  """Configuration for vector embeddings in store."""
48
48
 
49
49
 
50
+ class AuthConfig(TypedDict, total=False):
51
+ path: str
52
+ disable_studio_auth: bool
53
+
54
+
50
55
  class Config(TypedDict, total=False):
51
56
  python_version: str
52
57
  node_version: Optional[str]
@@ -56,6 +61,7 @@ class Config(TypedDict, total=False):
56
61
  graphs: dict[str, str]
57
62
  env: Union[dict[str, str], str]
58
63
  store: Optional[StoreConfig]
64
+ auth: Optional[AuthConfig]
59
65
 
60
66
 
61
67
  def _parse_version(version_str: str) -> tuple[int, int]:
@@ -88,6 +94,7 @@ def validate_config(config: Config) -> Config:
88
94
  "graphs": config.get("graphs", {}),
89
95
  "env": config.get("env", {}),
90
96
  "store": config.get("store"),
97
+ "auth": config.get("auth"),
91
98
  }
92
99
  if config.get("node_version")
93
100
  else {
@@ -98,6 +105,7 @@ def validate_config(config: Config) -> Config:
98
105
  "graphs": config.get("graphs", {}),
99
106
  "env": config.get("env", {}),
100
107
  "store": config.get("store"),
108
+ "auth": config.get("auth"),
101
109
  }
102
110
  )
103
111
 
@@ -392,16 +400,18 @@ RUN set -ex && \\
392
400
  ],
393
401
  )
394
402
  )
395
- additional_config = {}
396
- if config.get("store"):
397
- additional_config["store"] = config["store"]
403
+ store_config = config.get("store")
398
404
  env_additional_config = (
399
405
  ""
400
- if not additional_config
406
+ if not store_config
401
407
  else f"""
402
- ENV LANGGRAPH_CONFIG='{json.dumps(additional_config)}'
408
+ ENV LANGGRAPH_STORE='{json.dumps(store_config)}'
403
409
  """
404
410
  )
411
+ if (auth_config := config.get("auth")) is not None:
412
+ env_additional_config += f"""
413
+ ENV LANGGRAPH_AUTH='{json.dumps(auth_config)}'
414
+ """
405
415
  return f"""FROM {base_image}:{config['python_version']}
406
416
 
407
417
  {os.linesep.join(config["dockerfile_lines"])}
@@ -439,16 +449,18 @@ def node_config_to_docker(config_path: pathlib.Path, config: Config, base_image:
439
449
  install_cmd = "npm ci"
440
450
  else:
441
451
  install_cmd = "npm i"
442
- additional_config = {}
443
- if config.get("store"):
444
- additional_config["store"] = config["store"]
452
+ store_config = config.get("store")
445
453
  env_additional_config = (
446
454
  ""
447
- if not additional_config
455
+ if not store_config
448
456
  else f"""
449
- ENV LANGGRAPH_CONFIG='{json.dumps(additional_config)}'
457
+ ENV LANGGRAPH_STORE='{json.dumps(store_config)}'
450
458
  """
451
459
  )
460
+ if (auth_config := config.get("auth")) is not None:
461
+ env_additional_config += f"""
462
+ ENV LANGGRAPH_AUTH='{json.dumps(auth_config)}'
463
+ """
452
464
  return f"""FROM {base_image}:{config['node_version']}
453
465
 
454
466
  {os.linesep.join(config["dockerfile_lines"])}
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "langgraph-cli"
3
- version = "0.1.60"
3
+ version = "0.1.62"
4
4
  description = "CLI for interacting with LangGraph API"
5
5
  authors = []
6
6
  license = "MIT"
@@ -14,7 +14,7 @@ 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.5,<0.1.0", optional = true, python = ">=3.11,<4.0" }
17
+ langgraph-api = { version = ">=0.0.7,<0.1.0", optional = true, python = ">=3.11,<4.0" }
18
18
  python-dotenv = { version = ">=0.8.0", optional = true }
19
19
 
20
20
  [tool.poetry.group.dev.dependencies]
File without changes
File without changes