llamactl 0.3.17__py3-none-any.whl → 0.3.19__py3-none-any.whl
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.
- llama_deploy/cli/commands/aliased_group.py +2 -2
- llama_deploy/cli/commands/auth.py +22 -3
- llama_deploy/cli/textual/deployment_form.py +19 -7
- llama_deploy/cli/textual/deployment_monitor.py +3 -1
- {llamactl-0.3.17.dist-info → llamactl-0.3.19.dist-info}/METADATA +3 -3
- {llamactl-0.3.17.dist-info → llamactl-0.3.19.dist-info}/RECORD +8 -8
- {llamactl-0.3.17.dist-info → llamactl-0.3.19.dist-info}/WHEEL +0 -0
- {llamactl-0.3.17.dist-info → llamactl-0.3.19.dist-info}/entry_points.txt +0 -0
|
@@ -27,7 +27,7 @@ class AliasedGroup(click.Group):
|
|
|
27
27
|
|
|
28
28
|
def resolve_command(
|
|
29
29
|
self, ctx: click.Context, args: list[str]
|
|
30
|
-
) -> tuple[str, click.Command, list[str]]:
|
|
30
|
+
) -> tuple[str | None, click.Command | None, list[str]]:
|
|
31
31
|
# always return the full command name
|
|
32
32
|
_, cmd, args = super().resolve_command(ctx, args)
|
|
33
|
-
return cmd.name, cmd, args
|
|
33
|
+
return cmd.name if cmd else None, cmd, args
|
|
@@ -44,6 +44,11 @@ from ..config.schema import Auth, DeviceOIDC
|
|
|
44
44
|
from ..options import global_options, interactive_option
|
|
45
45
|
|
|
46
46
|
|
|
47
|
+
# Specific auth/login flow exceptions
|
|
48
|
+
class NoProjectsFoundError(Exception):
|
|
49
|
+
"""Raised when the authenticated user has no accessible projects."""
|
|
50
|
+
|
|
51
|
+
|
|
47
52
|
# Create sub-applications for organizing commands
|
|
48
53
|
@app.group(
|
|
49
54
|
help="Login to llama cloud control plane to manage deployments",
|
|
@@ -120,6 +125,15 @@ def device_login() -> None:
|
|
|
120
125
|
f"[green]Created login profile '{created.name}' and set as current[/green]"
|
|
121
126
|
)
|
|
122
127
|
|
|
128
|
+
except NoProjectsFoundError:
|
|
129
|
+
# Friendly guidance for first-time users with no projects
|
|
130
|
+
rprint(f"[{WARNING}]⚠️ No Existing Projects - Welcome to LlamaCloud![/]")
|
|
131
|
+
rprint(f"[{WARNING}]Looks like this may be your first time logging in.[/]")
|
|
132
|
+
rprint(
|
|
133
|
+
f"[{WARNING}]Before you can get started, log in to https://cloud.llamaindex.ai to complete your account setup.[/]"
|
|
134
|
+
)
|
|
135
|
+
return
|
|
136
|
+
|
|
123
137
|
except Exception as e:
|
|
124
138
|
rprint(f"[red]Error: {e}[/red]")
|
|
125
139
|
raise click.Abort()
|
|
@@ -418,11 +432,14 @@ def _create_device_profile() -> Auth:
|
|
|
418
432
|
|
|
419
433
|
# Obtain or prompt for project ID and create profile
|
|
420
434
|
projects = _list_projects(auth_svc, oidc_device.device_access_token)
|
|
435
|
+
if not projects:
|
|
436
|
+
# No projects available for this user yet
|
|
437
|
+
raise NoProjectsFoundError()
|
|
438
|
+
|
|
421
439
|
selected_project_id = _select_or_enter_project(projects, True)
|
|
422
440
|
if not selected_project_id:
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
)
|
|
441
|
+
# User cancelled selection despite having projects
|
|
442
|
+
raise click.ClickException("No project selected")
|
|
426
443
|
created = auth_svc.create_or_update_profile_from_oidc(
|
|
427
444
|
selected_project_id, oidc_device
|
|
428
445
|
)
|
|
@@ -501,6 +518,8 @@ async def _run_device_authentication(base_url: str) -> DeviceOIDC:
|
|
|
501
518
|
raise click.ClickException(
|
|
502
519
|
"Device flow failed: token response missing access_token"
|
|
503
520
|
)
|
|
521
|
+
if not provider.jwks_uri:
|
|
522
|
+
raise click.ClickException("Provider does not expose jwks_uri")
|
|
504
523
|
claims = await decode_jwt_claims(token.id_token, provider.jwks_uri)
|
|
505
524
|
email = claims.get("email")
|
|
506
525
|
if not email:
|
|
@@ -6,6 +6,7 @@ import re
|
|
|
6
6
|
from dataclasses import dataclass, field
|
|
7
7
|
from pathlib import Path
|
|
8
8
|
from textwrap import dedent
|
|
9
|
+
from typing import cast
|
|
9
10
|
from urllib.parse import urlsplit
|
|
10
11
|
|
|
11
12
|
from llama_deploy.cli.client import get_project_client as get_client
|
|
@@ -117,7 +118,11 @@ class DeploymentForm:
|
|
|
117
118
|
def to_update(self) -> DeploymentUpdate:
|
|
118
119
|
"""Convert form data to API format"""
|
|
119
120
|
|
|
120
|
-
secrets: dict[str, str | None] =
|
|
121
|
+
secrets: dict[str, str | None] = cast(
|
|
122
|
+
# dict isn't covariant, so whatever, make it work
|
|
123
|
+
dict[str, str | None],
|
|
124
|
+
self.secrets.copy(),
|
|
125
|
+
)
|
|
121
126
|
for secret in self.removed_secrets:
|
|
122
127
|
secrets[secret] = None
|
|
123
128
|
|
|
@@ -287,7 +292,11 @@ class DeploymentFormWidget(Widget):
|
|
|
287
292
|
or existing_version
|
|
288
293
|
or installed_version
|
|
289
294
|
)
|
|
290
|
-
is_upgrade =
|
|
295
|
+
is_upgrade = (
|
|
296
|
+
installed_version
|
|
297
|
+
and existing_version
|
|
298
|
+
and Version(installed_version) > Version(existing_version)
|
|
299
|
+
)
|
|
291
300
|
label = "Upgrade" if is_upgrade else "Downgrade"
|
|
292
301
|
yield Select(
|
|
293
302
|
[
|
|
@@ -563,11 +572,14 @@ class DeploymentEditApp(App[DeploymentResponse | None]):
|
|
|
563
572
|
result = self.form_data
|
|
564
573
|
client = get_client()
|
|
565
574
|
try:
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
575
|
+
if result.is_editing:
|
|
576
|
+
if not result.id:
|
|
577
|
+
raise ValueError("Deployment ID is required for update")
|
|
578
|
+
update_deployment = await client.update_deployment(
|
|
579
|
+
result.id, result.to_update()
|
|
580
|
+
)
|
|
581
|
+
else:
|
|
582
|
+
update_deployment = await client.create_deployment(result.to_create())
|
|
571
583
|
# Save and navigate to embedded monitor screen
|
|
572
584
|
self.saved_deployment = update_deployment
|
|
573
585
|
# Ensure form_data carries the new ID for any subsequent operations
|
|
@@ -365,7 +365,9 @@ class DeploymentMonitorWidget(Widget):
|
|
|
365
365
|
ev_details_widget = self.query_one("#last_event_details", Static)
|
|
366
366
|
deployment_link_button = self.query_one("#deployment_link_button", Button)
|
|
367
367
|
widget.update(self._render_status_line())
|
|
368
|
-
deployment_link_button.label =
|
|
368
|
+
deployment_link_button.label = (
|
|
369
|
+
f"{str(self.deployment.apiserver_url or '') if self.deployment else ''}"
|
|
370
|
+
)
|
|
369
371
|
# Update last event line
|
|
370
372
|
ev_widget.update(self._render_last_event_status())
|
|
371
373
|
ev_details_widget.update(self._render_last_event_details())
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: llamactl
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.19
|
|
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.
|
|
9
|
-
Requires-Dist: llama-deploy-appserver>=0.3.
|
|
8
|
+
Requires-Dist: llama-deploy-core[client]>=0.3.19,<0.4.0
|
|
9
|
+
Requires-Dist: llama-deploy-appserver>=0.3.19,<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
|
|
@@ -2,8 +2,8 @@ llama_deploy/cli/__init__.py,sha256=ae22d4cdf686aeef367d80d71938c62d7570d9bddd45
|
|
|
2
2
|
llama_deploy/cli/app.py,sha256=9170e4f506c482522bd745eb1cdb700a198cfcfd7204c168c94e5ee2b6b43ffa,2199
|
|
3
3
|
llama_deploy/cli/auth/client.py,sha256=3ebd2526f65f8d576e17d304df1b8a163d07586b88b5628cb36c9fa487a23ef6,11841
|
|
4
4
|
llama_deploy/cli/client.py,sha256=f4053b5183224cff55c1393e78887d1af2597219135379a851b742c676adc154,1727
|
|
5
|
-
llama_deploy/cli/commands/aliased_group.py,sha256=
|
|
6
|
-
llama_deploy/cli/commands/auth.py,sha256=
|
|
5
|
+
llama_deploy/cli/commands/aliased_group.py,sha256=101fe7733802dfb448198331818123184523b54cb80a27f166d4ff7010a76e49,1097
|
|
6
|
+
llama_deploy/cli/commands/auth.py,sha256=48c4cc786e8c4e0fb8c0caaba690cef359cddac9b7fbb0b88505111323c07667,24754
|
|
7
7
|
llama_deploy/cli/commands/deployment.py,sha256=abea89e94ed978821a998453792d127605831ba23108df776873852ddd19f97e,14526
|
|
8
8
|
llama_deploy/cli/commands/env.py,sha256=36cb1b0abb9e3d1c5546d3e8a3c4c7839c4d6c2abf75763e39efb08376b3eae9,6808
|
|
9
9
|
llama_deploy/cli/commands/init.py,sha256=348ec90fb54a6774062b109afe8cc9ac7f3c59144f941fd5697001ea52d5b946,14981
|
|
@@ -28,9 +28,9 @@ llama_deploy/cli/pkg/options.py,sha256=540c619a2a11f72161b8e41002446cf9d3f62de60
|
|
|
28
28
|
llama_deploy/cli/pkg/utils.py,sha256=b25348ac0f9ddc984ef98edc930aef0648ed182437e660cc60b0daf56172b171,1197
|
|
29
29
|
llama_deploy/cli/py.typed,sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855,0
|
|
30
30
|
llama_deploy/cli/styles.py,sha256=15901fb567b0d10470f56a06d863819c4ed00a9f90b2a8c46b4bc2fb1dbdf6c3,307
|
|
31
|
-
llama_deploy/cli/textual/deployment_form.py,sha256=
|
|
31
|
+
llama_deploy/cli/textual/deployment_form.py,sha256=d30779c225e5388671d84982a819e78ed0b3a0c3b9f7868483cfc3f3f3212f28,29377
|
|
32
32
|
llama_deploy/cli/textual/deployment_help.py,sha256=991d8cdcc61ae0cf79ddd27715db5452c9902d343ce20775f8651252056eca77,2859
|
|
33
|
-
llama_deploy/cli/textual/deployment_monitor.py,sha256=
|
|
33
|
+
llama_deploy/cli/textual/deployment_monitor.py,sha256=c39abf72b76a46de80403c6986b75b18eeca777a29f62cc847a193ca264ff4ea,16774
|
|
34
34
|
llama_deploy/cli/textual/git_validation.py,sha256=94c95b61d0cbc490566a406b4886c9c12e1d1793dc14038a5be37119223c9568,13419
|
|
35
35
|
llama_deploy/cli/textual/github_callback_server.py,sha256=3111cc45b3ff2632255a37e4472c85084670c94bcea25ec428f06b0761dd27bf,7584
|
|
36
36
|
llama_deploy/cli/textual/llama_loader.py,sha256=33cb32a46dd40bcf889c553e44f2672c410e26bd1d4b17aa6cca6d0a5d59c2c4,1468
|
|
@@ -39,7 +39,7 @@ llama_deploy/cli/textual/styles.tcss,sha256=2536f52ea1a654ae1f8990a25d45c845cb31
|
|
|
39
39
|
llama_deploy/cli/utils/env_inject.py,sha256=01911758bcc3cf22aad0db0d1ade56aece48d6ad6bdb7186ea213337c67f5a89,688
|
|
40
40
|
llama_deploy/cli/utils/redact.py,sha256=1e768d76b4a6708230c34f7ce8a5a82ab52795bb3d6ab0387071ab4e8d7e7934,863
|
|
41
41
|
llama_deploy/cli/utils/version.py,sha256=bf01a6dda948b868cc08c93701ed44cd36b487402404af8451d4c0996a2edb31,364
|
|
42
|
-
llamactl-0.3.
|
|
43
|
-
llamactl-0.3.
|
|
44
|
-
llamactl-0.3.
|
|
45
|
-
llamactl-0.3.
|
|
42
|
+
llamactl-0.3.19.dist-info/WHEEL,sha256=66530aef82d5020ef5af27ae0123c71abb9261377c5bc519376c671346b12918,79
|
|
43
|
+
llamactl-0.3.19.dist-info/entry_points.txt,sha256=b67e1eb64305058751a651a80f2d2268b5f7046732268421e796f64d4697f83c,52
|
|
44
|
+
llamactl-0.3.19.dist-info/METADATA,sha256=21a1074e9ef4081337b502bbc53fcd68da625680ae427dc10c8e65543414f5c0,3217
|
|
45
|
+
llamactl-0.3.19.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|