mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-20 14:42:28 +02:00
**Description:** - extend host_backend client with remote build support - refactored `cli.py` for better clarity - update tests
28 lines
965 B
Python
28 lines
965 B
Python
"""General-purpose utilities shared across the LangGraph CLI."""
|
|
|
|
import click
|
|
|
|
|
|
def clean_empty_lines(input_str: str):
|
|
return "\n".join(filter(None, input_str.splitlines()))
|
|
|
|
|
|
def warn_non_wolfi_distro(config_json: dict) -> None:
|
|
"""Show warning if image_distro is not set to 'wolfi'."""
|
|
image_distro = config_json.get("image_distro", "debian") # Default is debian
|
|
if image_distro != "wolfi":
|
|
click.secho(
|
|
"⚠️ Security Recommendation: Consider switching to Wolfi Linux for enhanced security.",
|
|
fg="yellow",
|
|
bold=True,
|
|
)
|
|
click.secho(
|
|
" Wolfi is a security-oriented, minimal Linux distribution designed for containers.",
|
|
fg="yellow",
|
|
)
|
|
click.secho(
|
|
' To switch, add \'"image_distro": "wolfi"\' to your langgraph.json config file.',
|
|
fg="yellow",
|
|
)
|
|
click.secho("") # Empty line for better readability
|