llamactl 0.3.17__py3-none-any.whl → 0.3.18__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.
@@ -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
@@ -501,6 +501,8 @@ async def _run_device_authentication(base_url: str) -> DeviceOIDC:
501
501
  raise click.ClickException(
502
502
  "Device flow failed: token response missing access_token"
503
503
  )
504
+ if not provider.jwks_uri:
505
+ raise click.ClickException("Provider does not expose jwks_uri")
504
506
  claims = await decode_jwt_claims(token.id_token, provider.jwks_uri)
505
507
  email = claims.get("email")
506
508
  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] = self.secrets.copy()
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 = Version(installed_version) > Version(existing_version)
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
- update_deployment = (
567
- await client.update_deployment(result.id, result.to_update())
568
- if result.is_editing
569
- else await client.create_deployment(result.to_create())
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 = f"{str(self.deployment.apiserver_url or '')}"
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.17
3
+ Version: 0.3.18
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.17,<0.4.0
9
- Requires-Dist: llama-deploy-appserver>=0.3.17,<0.4.0
8
+ Requires-Dist: llama-deploy-core[client]>=0.3.18,<0.4.0
9
+ Requires-Dist: llama-deploy-appserver>=0.3.18,<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=bc41007c97b7b93981217dbd4d4591df2b6c9412a2d9ed045b0ec5655ed285f2,1066
6
- llama_deploy/cli/commands/auth.py,sha256=1381eee494c3a0c73253322b4a54af1a857d5b89e5f1685b8afa3422eecc5607,23937
5
+ llama_deploy/cli/commands/aliased_group.py,sha256=101fe7733802dfb448198331818123184523b54cb80a27f166d4ff7010a76e49,1097
6
+ llama_deploy/cli/commands/auth.py,sha256=78540360b3fbee9586456352ddb4ba48f766720c4f7b5da1268bfc61eccf65b1,24063
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=92602faca36ba453e7b2c4ab04644e4bf4c12f98ff60d619ebd2697b06a70692,28953
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=86b2545eeee9ef4ff9c8bec0ee5c8eefd54373d2200da5906a886fb614e763cd,16723
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.17.dist-info/WHEEL,sha256=66530aef82d5020ef5af27ae0123c71abb9261377c5bc519376c671346b12918,79
43
- llamactl-0.3.17.dist-info/entry_points.txt,sha256=b67e1eb64305058751a651a80f2d2268b5f7046732268421e796f64d4697f83c,52
44
- llamactl-0.3.17.dist-info/METADATA,sha256=53b3447ce6786b1e6e5258271157338fb6f3c39c9ba2cb1529b9427a2fe85f34,3217
45
- llamactl-0.3.17.dist-info/RECORD,,
42
+ llamactl-0.3.18.dist-info/WHEEL,sha256=66530aef82d5020ef5af27ae0123c71abb9261377c5bc519376c671346b12918,79
43
+ llamactl-0.3.18.dist-info/entry_points.txt,sha256=b67e1eb64305058751a651a80f2d2268b5f7046732268421e796f64d4697f83c,52
44
+ llamactl-0.3.18.dist-info/METADATA,sha256=de5e491896b1a630026d6915a9c9ba776522d12618f441542eadd3a9d53336d7,3217
45
+ llamactl-0.3.18.dist-info/RECORD,,