llamactl 0.3.0a15__py3-none-any.whl → 0.3.0a16__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/deployment.py +2 -0
- llama_deploy/cli/textual/deployment_monitor.py +41 -6
- {llamactl-0.3.0a15.dist-info → llamactl-0.3.0a16.dist-info}/METADATA +4 -4
- {llamactl-0.3.0a15.dist-info → llamactl-0.3.0a16.dist-info}/RECORD +6 -6
- {llamactl-0.3.0a15.dist-info → llamactl-0.3.0a16.dist-info}/WHEEL +0 -0
- {llamactl-0.3.0a15.dist-info → llamactl-0.3.0a16.dist-info}/entry_points.txt +0 -0
|
@@ -59,6 +59,7 @@ def list_deployments(interactive: bool) -> None:
|
|
|
59
59
|
table = Table(show_edge=False, box=None, header_style="bold cornflower_blue")
|
|
60
60
|
table.add_column("Name")
|
|
61
61
|
table.add_column("Status", style="grey46")
|
|
62
|
+
table.add_column("URL", style="grey46")
|
|
62
63
|
table.add_column("Repository", style="grey46")
|
|
63
64
|
|
|
64
65
|
for deployment in deployments:
|
|
@@ -72,6 +73,7 @@ def list_deployments(interactive: bool) -> None:
|
|
|
72
73
|
table.add_row(
|
|
73
74
|
name,
|
|
74
75
|
status,
|
|
76
|
+
str(deployment.apiserver_url or ""),
|
|
75
77
|
repo_url,
|
|
76
78
|
)
|
|
77
79
|
|
|
@@ -4,8 +4,10 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import asyncio
|
|
6
6
|
import hashlib
|
|
7
|
+
import logging
|
|
7
8
|
import threading
|
|
8
9
|
import time
|
|
10
|
+
import webbrowser
|
|
9
11
|
from pathlib import Path
|
|
10
12
|
|
|
11
13
|
from llama_deploy.cli.client import (
|
|
@@ -22,6 +24,8 @@ from textual.message import Message
|
|
|
22
24
|
from textual.reactive import reactive
|
|
23
25
|
from textual.widgets import Button, RichLog, Static
|
|
24
26
|
|
|
27
|
+
logger = logging.getLogger(__name__)
|
|
28
|
+
|
|
25
29
|
|
|
26
30
|
class DeploymentMonitorWidget(Widget):
|
|
27
31
|
"""Widget that fetches deployment details once and streams logs.
|
|
@@ -70,6 +74,19 @@ class DeploymentMonitorWidget(Widget):
|
|
|
70
74
|
min-width: 12;
|
|
71
75
|
}
|
|
72
76
|
|
|
77
|
+
.deployment-link-label {
|
|
78
|
+
width: auto;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.deployment-link {
|
|
82
|
+
width: 1fr;
|
|
83
|
+
min-width: 16;
|
|
84
|
+
height: auto;
|
|
85
|
+
align: left middle;
|
|
86
|
+
text-align: left;
|
|
87
|
+
content-align: left middle;
|
|
88
|
+
}
|
|
89
|
+
|
|
73
90
|
|
|
74
91
|
"""
|
|
75
92
|
|
|
@@ -95,6 +112,16 @@ class DeploymentMonitorWidget(Widget):
|
|
|
95
112
|
|
|
96
113
|
def compose(self) -> ComposeResult:
|
|
97
114
|
yield Static("Deployment Status", classes="primary-message")
|
|
115
|
+
|
|
116
|
+
with HorizontalGroup(classes=""):
|
|
117
|
+
yield Static(" URL: ", classes="deployment-link-label")
|
|
118
|
+
yield Button(
|
|
119
|
+
"",
|
|
120
|
+
id="deployment_link_button",
|
|
121
|
+
classes="deployment-link",
|
|
122
|
+
compact=True,
|
|
123
|
+
variant="default",
|
|
124
|
+
)
|
|
98
125
|
yield Static("", classes="error-message", id="error_message")
|
|
99
126
|
|
|
100
127
|
# Single-line status bar with colored icon and deployment ID
|
|
@@ -103,7 +130,8 @@ class DeploymentMonitorWidget(Widget):
|
|
|
103
130
|
self._render_status_line(), classes="status-main", id="status_line"
|
|
104
131
|
)
|
|
105
132
|
yield Static("", classes="status-right", id="last_event_status")
|
|
106
|
-
yield Static("", classes="last-event
|
|
133
|
+
yield Static("", classes="last-event", id="last_event_details")
|
|
134
|
+
yield Static("") # just a spacer
|
|
107
135
|
|
|
108
136
|
yield Static("Logs", classes="secondary-message log-header")
|
|
109
137
|
yield RichLog(
|
|
@@ -116,9 +144,7 @@ class DeploymentMonitorWidget(Widget):
|
|
|
116
144
|
|
|
117
145
|
with HorizontalGroup(classes="button-row"):
|
|
118
146
|
wrap_label = "Wrap: On" if self.wrap_enabled else "Wrap: Off"
|
|
119
|
-
auto_label =
|
|
120
|
-
"Auto-scroll: On" if self.autoscroll_enabled else "Auto-scroll: Off"
|
|
121
|
-
)
|
|
147
|
+
auto_label = "Scroll: Auto" if self.autoscroll_enabled else "Scroll: Off"
|
|
122
148
|
yield Button(wrap_label, id="toggle_wrap", variant="default", compact=True)
|
|
123
149
|
yield Button(
|
|
124
150
|
auto_label, id="toggle_autoscroll", variant="default", compact=True
|
|
@@ -137,6 +163,8 @@ class DeploymentMonitorWidget(Widget):
|
|
|
137
163
|
elif event.button.id == "copy_log":
|
|
138
164
|
txt = "\n".join([str(x) for x in self._log_buffer])
|
|
139
165
|
self.app.copy_to_clipboard(txt)
|
|
166
|
+
elif event.button.id == "deployment_link_button":
|
|
167
|
+
self.action_open_url()
|
|
140
168
|
|
|
141
169
|
async def _fetch_deployment(self) -> None:
|
|
142
170
|
try:
|
|
@@ -321,6 +349,12 @@ class DeploymentMonitorWidget(Widget):
|
|
|
321
349
|
return "●", red
|
|
322
350
|
return "●", gray
|
|
323
351
|
|
|
352
|
+
def action_open_url(self) -> None:
|
|
353
|
+
if not self.deployment or not self.deployment.apiserver_url:
|
|
354
|
+
return
|
|
355
|
+
logger.debug(f"Opening URL: {self.deployment.apiserver_url}")
|
|
356
|
+
webbrowser.open(str(self.deployment.apiserver_url))
|
|
357
|
+
|
|
324
358
|
def _render_status_line(self) -> Text:
|
|
325
359
|
phase = self.deployment.status if self.deployment else "Unknown"
|
|
326
360
|
icon, style = self._status_icon_and_style(phase)
|
|
@@ -378,8 +412,9 @@ class DeploymentMonitorWidget(Widget):
|
|
|
378
412
|
widget = self.query_one("#status_line", Static)
|
|
379
413
|
ev_widget = self.query_one("#last_event_status", Static)
|
|
380
414
|
ev_details_widget = self.query_one("#last_event_details", Static)
|
|
381
|
-
|
|
415
|
+
deployment_link_button = self.query_one("#deployment_link_button", Button)
|
|
382
416
|
widget.update(self._render_status_line())
|
|
417
|
+
deployment_link_button.label = f"{str(self.deployment.apiserver_url or '')}"
|
|
383
418
|
# Update last event line
|
|
384
419
|
ev_widget.update(self._render_last_event_status())
|
|
385
420
|
ev_details_widget.update(self._render_last_event_details())
|
|
@@ -409,7 +444,7 @@ class DeploymentMonitorWidget(Widget):
|
|
|
409
444
|
pass
|
|
410
445
|
try:
|
|
411
446
|
btn = self.query_one("#toggle_autoscroll", Button)
|
|
412
|
-
btn.label = "
|
|
447
|
+
btn.label = "Scroll: Auto" if enabled else "Scroll: Off"
|
|
413
448
|
except Exception:
|
|
414
449
|
pass
|
|
415
450
|
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: llamactl
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.0a16
|
|
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.0a16,<0.4.0
|
|
9
|
+
Requires-Dist: llama-deploy-appserver>=0.3.0a16,<0.4.0
|
|
10
10
|
Requires-Dist: httpx>=0.24.0
|
|
11
11
|
Requires-Dist: rich>=13.0.0
|
|
12
12
|
Requires-Dist: questionary>=2.0.0
|
|
13
13
|
Requires-Dist: click>=8.2.1
|
|
14
14
|
Requires-Dist: python-dotenv>=1.0.0
|
|
15
15
|
Requires-Dist: tenacity>=9.1.2
|
|
16
|
-
Requires-Dist: textual>=
|
|
16
|
+
Requires-Dist: textual>=6.0.0
|
|
17
17
|
Requires-Dist: aiohttp>=3.12.14
|
|
18
18
|
Requires-Dist: copier>=9.9.0
|
|
19
19
|
Requires-Python: >=3.11, <4
|
|
@@ -3,7 +3,7 @@ llama_deploy/cli/app.py,sha256=9170e4f506c482522bd745eb1cdb700a198cfcfd7204c168c
|
|
|
3
3
|
llama_deploy/cli/client.py,sha256=f0f72c90cddfbc9198e154883f3b8f05fb47dbe7ec1f5755106dbb8009d2bb54,1459
|
|
4
4
|
llama_deploy/cli/commands/aliased_group.py,sha256=bc41007c97b7b93981217dbd4d4591df2b6c9412a2d9ed045b0ec5655ed285f2,1066
|
|
5
5
|
llama_deploy/cli/commands/auth.py,sha256=de584d11c1acf5a4e7aee8c8f30184335053ed206d38dbc8509b2d1d0677a092,12640
|
|
6
|
-
llama_deploy/cli/commands/deployment.py,sha256=
|
|
6
|
+
llama_deploy/cli/commands/deployment.py,sha256=ae6e20c216edf51df94cd66397743076bb97ee2b64bccd14e602e9642fe6befd,9980
|
|
7
7
|
llama_deploy/cli/commands/env.py,sha256=e0b96b9f4e7921b4370ad5f8bc0a2bfb19b705e73004f72c37c9bed28a208e0d,6702
|
|
8
8
|
llama_deploy/cli/commands/init.py,sha256=51b2de1e35ff34bc15c9dfec72fbad08aaf528c334df168896d36458a4e9401c,6307
|
|
9
9
|
llama_deploy/cli/commands/serve.py,sha256=4d47850397ba172944df56a934a51bedb52403cbd3f9b000b1ced90a31c75049,2721
|
|
@@ -20,13 +20,13 @@ llama_deploy/cli/platform_client.py,sha256=69de23dc79a8f5922afc9e3bac1b633a53134
|
|
|
20
20
|
llama_deploy/cli/py.typed,sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855,0
|
|
21
21
|
llama_deploy/cli/textual/deployment_form.py,sha256=1cf186b765d10a1bdd7394f22ddd7598d75dba8c9a8a7a8be74e6151da2f31dc,20941
|
|
22
22
|
llama_deploy/cli/textual/deployment_help.py,sha256=d43e9ff29db71a842cf8b491545763d581ede3132b8af518c73af85a40950046,2464
|
|
23
|
-
llama_deploy/cli/textual/deployment_monitor.py,sha256=
|
|
23
|
+
llama_deploy/cli/textual/deployment_monitor.py,sha256=7f85c64f0b1f0ad2e6d8a401eedf889de967379d40b5ccc9e7fbc618a7f7cfe4,18379
|
|
24
24
|
llama_deploy/cli/textual/git_validation.py,sha256=94c95b61d0cbc490566a406b4886c9c12e1d1793dc14038a5be37119223c9568,13419
|
|
25
25
|
llama_deploy/cli/textual/github_callback_server.py,sha256=dc74c510f8a98ef6ffaab0f6d11c7ea86ee77ca5adbc7725a2a29112bae24191,7556
|
|
26
26
|
llama_deploy/cli/textual/llama_loader.py,sha256=33cb32a46dd40bcf889c553e44f2672c410e26bd1d4b17aa6cca6d0a5d59c2c4,1468
|
|
27
27
|
llama_deploy/cli/textual/secrets_form.py,sha256=a43fbd81aad034d0d60906bfd917c107f9ace414648b0f63ac0b29eeba4050db,7061
|
|
28
28
|
llama_deploy/cli/textual/styles.tcss,sha256=b1a54dc5fb0e0aa12cbf48807e9e6a94b9926838b8058dae1336a134f02e92b0,3327
|
|
29
|
-
llamactl-0.3.
|
|
30
|
-
llamactl-0.3.
|
|
31
|
-
llamactl-0.3.
|
|
32
|
-
llamactl-0.3.
|
|
29
|
+
llamactl-0.3.0a16.dist-info/WHEEL,sha256=66530aef82d5020ef5af27ae0123c71abb9261377c5bc519376c671346b12918,79
|
|
30
|
+
llamactl-0.3.0a16.dist-info/entry_points.txt,sha256=b67e1eb64305058751a651a80f2d2268b5f7046732268421e796f64d4697f83c,52
|
|
31
|
+
llamactl-0.3.0a16.dist-info/METADATA,sha256=f3383216d44bc4e4bd19e7589cac4e4e24918f513ad9d2b46498f4848a380047,3177
|
|
32
|
+
llamactl-0.3.0a16.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|