llamactl 0.3.20__tar.gz → 0.3.22__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 (45) hide show
  1. {llamactl-0.3.20 → llamactl-0.3.22}/PKG-INFO +3 -3
  2. {llamactl-0.3.20 → llamactl-0.3.22}/pyproject.toml +3 -3
  3. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/commands/dev.py +31 -39
  4. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/textual/deployment_monitor.py +4 -1
  5. {llamactl-0.3.20 → llamactl-0.3.22}/README.md +0 -0
  6. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/__init__.py +0 -0
  7. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/app.py +0 -0
  8. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/auth/client.py +0 -0
  9. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/client.py +0 -0
  10. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/commands/aliased_group.py +0 -0
  11. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/commands/auth.py +0 -0
  12. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/commands/deployment.py +0 -0
  13. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/commands/env.py +0 -0
  14. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/commands/init.py +0 -0
  15. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/commands/pkg.py +0 -0
  16. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/commands/serve.py +0 -0
  17. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/config/_config.py +0 -0
  18. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/config/_migrations.py +0 -0
  19. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/config/auth_service.py +0 -0
  20. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/config/env_service.py +0 -0
  21. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/config/migrations/0001_init.sql +0 -0
  22. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/config/migrations/0002_add_auth_fields.sql +0 -0
  23. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/config/migrations/__init__.py +0 -0
  24. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/config/schema.py +0 -0
  25. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/debug.py +0 -0
  26. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/env.py +0 -0
  27. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/interactive_prompts/session_utils.py +0 -0
  28. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/interactive_prompts/utils.py +0 -0
  29. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/options.py +0 -0
  30. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/pkg/__init__.py +0 -0
  31. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/pkg/defaults.py +0 -0
  32. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/pkg/options.py +0 -0
  33. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/pkg/utils.py +0 -0
  34. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/py.typed +0 -0
  35. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/styles.py +0 -0
  36. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/textual/deployment_form.py +0 -0
  37. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/textual/deployment_help.py +0 -0
  38. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/textual/git_validation.py +0 -0
  39. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/textual/github_callback_server.py +0 -0
  40. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/textual/llama_loader.py +0 -0
  41. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/textual/secrets_form.py +0 -0
  42. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/textual/styles.tcss +0 -0
  43. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/utils/env_inject.py +0 -0
  44. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/utils/redact.py +0 -0
  45. {llamactl-0.3.20 → llamactl-0.3.22}/src/llama_deploy/cli/utils/version.py +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: llamactl
3
- Version: 0.3.20
3
+ Version: 0.3.22
4
4
  Summary: A command-line interface for managing LlamaDeploy projects and deployments
5
5
  Author: Adrian Lyjak
6
6
  Author-email: Adrian Lyjak <adrianlyjak@gmail.com>
7
7
  License: MIT
8
- Requires-Dist: llama-deploy-core[client]>=0.3.20,<0.4.0
9
- Requires-Dist: llama-deploy-appserver>=0.3.20,<0.4.0
8
+ Requires-Dist: llama-deploy-core[client]>=0.3.22,<0.4.0
9
+ Requires-Dist: llama-deploy-appserver>=0.3.22,<0.4.0
10
10
  Requires-Dist: vibe-llama-core>=0.1.0
11
11
  Requires-Dist: rich>=13.0.0
12
12
  Requires-Dist: questionary>=2.0.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "llamactl"
3
- version = "0.3.20"
3
+ version = "0.3.22"
4
4
  description = "A command-line interface for managing LlamaDeploy projects and deployments"
5
5
  readme = "README.md"
6
6
  license = { text = "MIT" }
@@ -9,8 +9,8 @@ authors = [
9
9
  ]
10
10
  requires-python = ">=3.11, <4"
11
11
  dependencies = [
12
- "llama-deploy-core[client]>=0.3.20,<0.4.0",
13
- "llama-deploy-appserver>=0.3.20,<0.4.0",
12
+ "llama-deploy-core[client]>=0.3.22,<0.4.0",
13
+ "llama-deploy-appserver>=0.3.22,<0.4.0",
14
14
  "vibe-llama-core>=0.1.0",
15
15
  "rich>=13.0.0",
16
16
  "questionary>=2.0.0",
@@ -3,15 +3,14 @@ from __future__ import annotations
3
3
  import os
4
4
  import subprocess
5
5
  from pathlib import Path
6
- from typing import Iterable
7
6
 
8
7
  import click
9
8
  from click.exceptions import Abort, Exit
9
+ from llama_deploy.appserver.app import prepare_server, start_preflight_in_target_venv
10
10
  from llama_deploy.appserver.deployment_config_parser import get_deployment_config
11
11
  from llama_deploy.appserver.settings import configure_settings, settings
12
12
  from llama_deploy.appserver.workflow_loader import (
13
13
  load_environment_variables,
14
- load_workflows,
15
14
  parse_environment_variables,
16
15
  validate_required_env_vars,
17
16
  )
@@ -62,29 +61,28 @@ def validate_command(deployment_file: Path, interactive: bool) -> None:
62
61
  config_dir = _ensure_project_layout(
63
62
  deployment_file, command_name="llamactl dev validate"
64
63
  )
65
- try:
66
- config, _ = _prepare_environment(
67
- deployment_file, interactive, require_cloud=False
68
- )
69
- workflows = load_workflows(config)
70
- errors: list[tuple[str, Exception]] = _run_validations(workflows.values())
64
+ # Ensure cloud credentials/env are available to the subprocess (if required)
65
+ _maybe_inject_llama_cloud_credentials(
66
+ deployment_file, interactive, require_cloud=False
67
+ )
71
68
 
72
- if errors:
73
- for idx, (name, error) in enumerate(errors, start=1):
74
- rprint(f"[red]Validation {idx} failed for '{name}': {error}[/red]")
75
- raise click.ClickException("Workflow validation failed")
69
+ prepare_server(
70
+ deployment_file=deployment_file,
71
+ install=True,
72
+ build=False,
73
+ install_ui_deps=False,
74
+ )
76
75
 
77
- _print_connection_summary()
78
- rprint(
79
- f"[green]Validated workflows in {config_dir} successfully ({len(workflows)} found).[/green]"
80
- )
81
- except (Exit, Abort):
82
- raise
83
- except click.ClickException:
84
- raise
85
- except Exception as exc: # pragma: no cover - unexpected errors reported to user
86
- rprint(f"[red]Failed to validate workflows: {exc}[/red]")
87
- raise click.Abort()
76
+ # Delegate venv-targeted invocation to the appserver helper (mirrors start_server_in_target_venv)
77
+
78
+ try:
79
+ start_preflight_in_target_venv(cwd=Path.cwd(), deployment_file=deployment_file)
80
+ except subprocess.CalledProcessError as exc:
81
+ rprint("[red]Workflow validation failed. See errors above.[/red]")
82
+ raise Exit(exc.returncode)
83
+
84
+ _print_connection_summary()
85
+ rprint(f"[green]Validated workflows in {config_dir} successfully.[/green]")
88
86
 
89
87
 
90
88
  @dev.command(
@@ -103,11 +101,18 @@ def validate_command(deployment_file: Path, interactive: bool) -> None:
103
101
  type=click.Path(dir_okay=True, resolve_path=True, path_type=Path),
104
102
  help="The deployment file to use for the command",
105
103
  )
104
+ @click.option(
105
+ "no_auth",
106
+ "--no-auth",
107
+ is_flag=True,
108
+ help="Do not inject/authenticate with Llama Cloud credentials",
109
+ )
106
110
  @interactive_option
107
111
  @click.argument("cmd", nargs=-1, type=click.UNPROCESSED)
108
- def run_command(deployment_file: Path, interactive: bool, cmd: tuple[str, ...]) -> None: # type: ignore
112
+ def run_command(
113
+ deployment_file: Path, no_auth: bool, interactive: bool, cmd: tuple[str, ...]
114
+ ) -> None: # type: ignore
109
115
  """Execute COMMAND with deployment environment variables applied."""
110
- _ensure_project_layout(deployment_file, command_name="llamactl dev run")
111
116
  if not cmd:
112
117
  raise click.ClickException(
113
118
  "No command provided. Use '--' before the command arguments if needed."
@@ -115,7 +120,7 @@ def run_command(deployment_file: Path, interactive: bool, cmd: tuple[str, ...])
115
120
 
116
121
  try:
117
122
  config, config_parent = _prepare_environment(
118
- deployment_file, interactive, require_cloud=False
123
+ deployment_file, interactive, require_cloud=not no_auth
119
124
  )
120
125
  env_overrides = parse_environment_variables(config, config_parent)
121
126
  env = os.environ.copy()
@@ -168,17 +173,4 @@ def _prepare_environment(
168
173
  return config, config_parent
169
174
 
170
175
 
171
- def _run_validations(workflows: Iterable[object]) -> list[tuple[str, Exception]]:
172
- errors: list[tuple[str, Exception]] = []
173
- for workflow in workflows:
174
- workflow_name = getattr(workflow, "name", "workflow")
175
- try:
176
- validate_method = getattr(workflow, "_validate", None)
177
- if callable(validate_method):
178
- validate_method()
179
- except Exception as exc:
180
- errors.append((str(workflow_name), exc))
181
- return errors
182
-
183
-
184
176
  __all__ = ["dev", "validate_command", "run_command"]
@@ -390,7 +390,10 @@ class DeploymentMonitorWidget(Widget):
390
390
  deployment_link_button.label = (
391
391
  f"{str(self.deployment.apiserver_url or '') if self.deployment else ''}"
392
392
  )
393
- last_commit_button.label = f"{(str(self.deployment.git_sha or '-'))[:7]}"
393
+ if self.deployment:
394
+ last_commit_button.label = f"{(str(self.deployment.git_sha or '-'))[:7]}"
395
+ else:
396
+ last_commit_button.label = "-"
394
397
  # Update last event line
395
398
  ev_widget.update(self._render_last_event_status())
396
399
  ev_details_widget.update(self._render_last_event_details())
File without changes