uipath 2.1.32__py3-none-any.whl → 2.1.33__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.
- uipath/_cli/_dev/_terminal/__init__.py +4 -2
- uipath/_cli/_dev/_terminal/_components/_details.py +73 -35
- uipath/_cli/_dev/_terminal/_components/_json_input.py +23 -0
- uipath/_cli/_dev/_terminal/_components/_new.py +3 -1
- uipath/_cli/_dev/_terminal/_components/_resume.py +6 -2
- uipath/_cli/_dev/_terminal/_models/_execution.py +1 -0
- uipath/_cli/_dev/_terminal/_styles/terminal.tcss +9 -0
- {uipath-2.1.32.dist-info → uipath-2.1.33.dist-info}/METADATA +1 -1
- {uipath-2.1.32.dist-info → uipath-2.1.33.dist-info}/RECORD +12 -11
- {uipath-2.1.32.dist-info → uipath-2.1.33.dist-info}/WHEEL +0 -0
- {uipath-2.1.32.dist-info → uipath-2.1.33.dist-info}/entry_points.txt +0 -0
- {uipath-2.1.32.dist-info → uipath-2.1.33.dist-info}/licenses/LICENSE +0 -0
@@ -123,8 +123,9 @@ class UiPathDevTerminal(App[Any]):
|
|
123
123
|
input = json.loads(input_data)
|
124
124
|
except json.JSONDecodeError:
|
125
125
|
return
|
126
|
-
details_panel.current_run.
|
126
|
+
details_panel.current_run.resume_data = input
|
127
127
|
asyncio.create_task(self._execute_runtime(details_panel.current_run))
|
128
|
+
details_panel.switch_tab("run-tab")
|
128
129
|
|
129
130
|
async def action_execute_run(self) -> None:
|
130
131
|
"""Execute a new run with UiPath runtime."""
|
@@ -161,7 +162,6 @@ class UiPathDevTerminal(App[Any]):
|
|
161
162
|
try:
|
162
163
|
context: UiPathRuntimeContext = self.runtime_factory.new_context(
|
163
164
|
entrypoint=run.entrypoint,
|
164
|
-
input_json=run.input_data,
|
165
165
|
trace_id=str(uuid4()),
|
166
166
|
execution_id=run.id,
|
167
167
|
logs_min_level=env.get("LOG_LEVEL", "INFO"),
|
@@ -172,8 +172,10 @@ class UiPathDevTerminal(App[Any]):
|
|
172
172
|
|
173
173
|
if run.status == "suspended":
|
174
174
|
context.resume = True
|
175
|
+
context.input_json = run.resume_data
|
175
176
|
self._add_info_log(run, f"Resuming execution: {run.entrypoint}")
|
176
177
|
else:
|
178
|
+
context.input_json = run.input_data
|
177
179
|
self._add_info_log(run, f"Starting execution: {run.entrypoint}")
|
178
180
|
|
179
181
|
run.status = "running"
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import json
|
2
1
|
from typing import Dict, List, Optional
|
3
2
|
|
4
3
|
from textual.app import ComposeResult
|
@@ -29,14 +28,7 @@ class SpanDetailsDisplay(Container):
|
|
29
28
|
details_log = self.query_one("#span-details", RichLog)
|
30
29
|
details_log.clear()
|
31
30
|
|
32
|
-
# Format span details
|
33
31
|
details_log.write(f"[bold cyan]Span: {trace_msg.span_name}[/bold cyan]")
|
34
|
-
details_log.write(f"[dim]Trace ID: {trace_msg.trace_id}[/dim]")
|
35
|
-
details_log.write(f"[dim]Span ID: {trace_msg.span_id}[/dim]")
|
36
|
-
details_log.write(f"[dim]Run ID: {trace_msg.run_id}[/dim]")
|
37
|
-
|
38
|
-
if trace_msg.parent_span_id:
|
39
|
-
details_log.write(f"[dim]Parent Span: {trace_msg.parent_span_id}[/dim]")
|
40
32
|
|
41
33
|
details_log.write("") # Empty line
|
42
34
|
|
@@ -68,6 +60,16 @@ class SpanDetailsDisplay(Container):
|
|
68
60
|
for key, value in trace_msg.attributes.items():
|
69
61
|
details_log.write(f" {key}: {value}")
|
70
62
|
|
63
|
+
details_log.write("") # Empty line
|
64
|
+
|
65
|
+
# Format span details
|
66
|
+
details_log.write(f"[dim]Trace ID: {trace_msg.trace_id}[/dim]")
|
67
|
+
details_log.write(f"[dim]Span ID: {trace_msg.span_id}[/dim]")
|
68
|
+
details_log.write(f"[dim]Run ID: {trace_msg.run_id}[/dim]")
|
69
|
+
|
70
|
+
if trace_msg.parent_span_id:
|
71
|
+
details_log.write(f"[dim]Parent Span: {trace_msg.parent_span_id}[/dim]")
|
72
|
+
|
71
73
|
|
72
74
|
class RunDetailsPanel(Container):
|
73
75
|
"""Panel showing traces and logs for selected run with tabbed interface."""
|
@@ -144,10 +146,65 @@ class RunDetailsPanel(Container):
|
|
144
146
|
# Clear and rebuild traces tree using TraceMessage objects
|
145
147
|
self._rebuild_spans_tree()
|
146
148
|
|
149
|
+
def switch_tab(self, tab_id: str) -> None:
|
150
|
+
"""Switch to a specific tab by id (e.g. 'run-tab', 'traces-tab')."""
|
151
|
+
tabbed = self.query_one(TabbedContent)
|
152
|
+
tabbed.active = tab_id
|
153
|
+
|
147
154
|
def _update_resume_tab(self, run: ExecutionRun) -> None:
|
148
155
|
resume_panel = self.query_one("#resume-panel", ResumePanel)
|
149
156
|
resume_panel.display = run.status == "suspended"
|
150
157
|
|
158
|
+
def _flatten_values(self, value: object, prefix: str = "") -> list[str]:
|
159
|
+
"""Flatten nested dict/list structures into dot-notation paths."""
|
160
|
+
lines: list[str] = []
|
161
|
+
|
162
|
+
if value is None:
|
163
|
+
lines.append(f"{prefix}: [dim]—[/dim]" if prefix else "[dim]—[/dim]")
|
164
|
+
|
165
|
+
elif isinstance(value, dict):
|
166
|
+
if not value:
|
167
|
+
lines.append(f"{prefix}: {{}}" if prefix else "{}")
|
168
|
+
else:
|
169
|
+
for k, v in value.items():
|
170
|
+
new_prefix = f"{prefix}.{k}" if prefix else k
|
171
|
+
lines.extend(self._flatten_values(v, new_prefix))
|
172
|
+
|
173
|
+
elif isinstance(value, list):
|
174
|
+
if not value:
|
175
|
+
lines.append(f"{prefix}: []" if prefix else "[]")
|
176
|
+
else:
|
177
|
+
for i, item in enumerate(value):
|
178
|
+
new_prefix = f"{prefix}[{i}]"
|
179
|
+
lines.extend(self._flatten_values(item, new_prefix))
|
180
|
+
|
181
|
+
elif isinstance(value, str):
|
182
|
+
if prefix:
|
183
|
+
for line in value.splitlines():
|
184
|
+
lines.append(f"{prefix}: {line}")
|
185
|
+
else:
|
186
|
+
lines.extend(value.splitlines())
|
187
|
+
|
188
|
+
else:
|
189
|
+
if prefix:
|
190
|
+
lines.append(f"{prefix}: {value}")
|
191
|
+
else:
|
192
|
+
lines.append(str(value))
|
193
|
+
|
194
|
+
return lines
|
195
|
+
|
196
|
+
def _write_block(
|
197
|
+
self, log: RichLog, title: str, data: object, style: str = "white"
|
198
|
+
) -> None:
|
199
|
+
"""Pretty-print a block with flattened dot-notation paths."""
|
200
|
+
log.write(f"[bold {style}]{title.upper()}:[/bold {style}]")
|
201
|
+
log.write("[dim]" + "=" * 50 + "[/dim]")
|
202
|
+
|
203
|
+
for line in self._flatten_values(data):
|
204
|
+
log.write(line)
|
205
|
+
|
206
|
+
log.write("")
|
207
|
+
|
151
208
|
def _show_run_details(self, run: ExecutionRun):
|
152
209
|
"""Display detailed information about the run in the Details tab."""
|
153
210
|
self._update_resume_tab(run)
|
@@ -202,35 +259,16 @@ class RunDetailsPanel(Container):
|
|
202
259
|
|
203
260
|
run_details_log.write("")
|
204
261
|
|
205
|
-
|
206
|
-
|
207
|
-
run_details_log.write("[bold green]INPUT:[/bold green]")
|
208
|
-
run_details_log.write("[dim]" + "=" * 50 + "[/dim]")
|
209
|
-
|
210
|
-
# Handle different input types
|
211
|
-
if isinstance(run.input_data, str):
|
212
|
-
run_details_log.write(run.input_data)
|
213
|
-
elif isinstance(run.input_data, dict):
|
214
|
-
run_details_log.write(json.dumps(run.input_data, indent=2))
|
215
|
-
else:
|
216
|
-
run_details_log.write(str(run.input_data))
|
217
|
-
|
218
|
-
run_details_log.write("")
|
262
|
+
if hasattr(run, "input_data"):
|
263
|
+
self._write_block(run_details_log, "Input", run.input_data, style="green")
|
219
264
|
|
220
|
-
|
221
|
-
|
222
|
-
run_details_log.write("[bold magenta]OUTPUT:[/bold magenta]")
|
223
|
-
run_details_log.write("[dim]" + "=" * 50 + "[/dim]")
|
224
|
-
|
225
|
-
# Handle different output types
|
226
|
-
if isinstance(run.output_data, str):
|
227
|
-
run_details_log.write(run.output_data)
|
228
|
-
elif isinstance(run.output_data, dict):
|
229
|
-
run_details_log.write(json.dumps(run.output_data, indent=2))
|
230
|
-
else:
|
231
|
-
run_details_log.write(str(run.output_data))
|
265
|
+
if hasattr(run, "resume_data") and run.resume_data:
|
266
|
+
self._write_block(run_details_log, "Resume", run.resume_data, style="green")
|
232
267
|
|
233
|
-
|
268
|
+
if hasattr(run, "output_data"):
|
269
|
+
self._write_block(
|
270
|
+
run_details_log, "Output", run.output_data, style="magenta"
|
271
|
+
)
|
234
272
|
|
235
273
|
# Error section (if applicable)
|
236
274
|
if hasattr(run, "error") and run.error:
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import json
|
2
|
+
|
3
|
+
from textual.widgets import TextArea
|
4
|
+
|
5
|
+
|
6
|
+
class JsonInput(TextArea):
|
7
|
+
"""TextArea that validates JSON on change."""
|
8
|
+
|
9
|
+
def validate_json(self) -> bool:
|
10
|
+
text = self.text.strip()
|
11
|
+
if not text:
|
12
|
+
self.remove_class("invalid")
|
13
|
+
return True
|
14
|
+
try:
|
15
|
+
json.loads(text)
|
16
|
+
self.remove_class("invalid")
|
17
|
+
return True
|
18
|
+
except json.JSONDecodeError:
|
19
|
+
self.add_class("invalid")
|
20
|
+
return False
|
21
|
+
|
22
|
+
def on_text_area_changed(self, event: TextArea.Changed) -> None:
|
23
|
+
self.validate_json()
|
@@ -7,6 +7,8 @@ from textual.containers import Container, Horizontal, Vertical
|
|
7
7
|
from textual.reactive import reactive
|
8
8
|
from textual.widgets import Button, Select, TabbedContent, TabPane, TextArea
|
9
9
|
|
10
|
+
from ._json_input import JsonInput
|
11
|
+
|
10
12
|
|
11
13
|
def mock_json_from_schema(schema: Dict[str, Any]) -> Dict[str, Any]:
|
12
14
|
props = schema.get("properties", {})
|
@@ -74,7 +76,7 @@ class NewRunPanel(Container):
|
|
74
76
|
allow_blank=False,
|
75
77
|
)
|
76
78
|
|
77
|
-
yield
|
79
|
+
yield JsonInput(
|
78
80
|
text=self.initial_input,
|
79
81
|
language="json",
|
80
82
|
id="json-input",
|
@@ -1,7 +1,11 @@
|
|
1
|
+
import json
|
2
|
+
|
1
3
|
from textual.app import ComposeResult
|
2
4
|
from textual.containers import Container, Horizontal, Vertical
|
3
5
|
from textual.widgets import Button, TextArea
|
4
6
|
|
7
|
+
from ._json_input import JsonInput
|
8
|
+
|
5
9
|
|
6
10
|
class ResumePanel(Container):
|
7
11
|
"""Panel for resuming a suspended run."""
|
@@ -11,8 +15,8 @@ class ResumePanel(Container):
|
|
11
15
|
|
12
16
|
def compose(self) -> ComposeResult:
|
13
17
|
with Vertical():
|
14
|
-
yield
|
15
|
-
text="
|
18
|
+
yield JsonInput(
|
19
|
+
text=json.dumps({"value": ""}, indent=2),
|
16
20
|
language="json",
|
17
21
|
id="resume-json-input",
|
18
22
|
classes="input-field json-input",
|
@@ -16,6 +16,7 @@ class ExecutionRun:
|
|
16
16
|
self.id = str(uuid4())[:8]
|
17
17
|
self.entrypoint = entrypoint
|
18
18
|
self.input_data = input_data
|
19
|
+
self.resume_data: Optional[Dict[str, Any]] = None
|
19
20
|
self.output_data: Optional[Dict[str, Any]] = None
|
20
21
|
self.start_time = datetime.now()
|
21
22
|
self.end_time: Optional[datetime] = None
|
@@ -22,6 +22,11 @@ Screen {
|
|
22
22
|
color: #ffaa00;
|
23
23
|
}
|
24
24
|
|
25
|
+
.run-suspended {
|
26
|
+
border-left: solid #00FFFF;
|
27
|
+
color: #e0e0e0;
|
28
|
+
}
|
29
|
+
|
25
30
|
.run-completed {
|
26
31
|
border-left: solid #00ff88;
|
27
32
|
color: #e0e0e0;
|
@@ -213,3 +218,7 @@ SpanDetailsDisplay {
|
|
213
218
|
text-style: bold;
|
214
219
|
border: none;
|
215
220
|
}
|
221
|
+
|
222
|
+
TextArea.invalid {
|
223
|
+
border: tall red;
|
224
|
+
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: uipath
|
3
|
-
Version: 2.1.
|
3
|
+
Version: 2.1.33
|
4
4
|
Summary: Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools.
|
5
5
|
Project-URL: Homepage, https://uipath.com
|
6
6
|
Project-URL: Repository, https://github.com/UiPath/uipath-python
|
@@ -31,14 +31,15 @@ uipath/_cli/_auth/auth_config.json,sha256=UnAhdum8phjuZaZKE5KLp0IcPCbIltDEU1M_G8
|
|
31
31
|
uipath/_cli/_auth/index.html,sha256=uGK0CDTP8Rys_p4O_Pbd2x4tz0frKNVcumjrXnal5Nc,22814
|
32
32
|
uipath/_cli/_auth/localhost.crt,sha256=oGl9oLLOiouHubAt39B4zEfylFvKEtbtr_43SIliXJc,1226
|
33
33
|
uipath/_cli/_auth/localhost.key,sha256=X31VYXD8scZtmGA837dGX5l6G-LXHLo5ItWJhZXaz3c,1679
|
34
|
-
uipath/_cli/_dev/_terminal/__init__.py,sha256=
|
35
|
-
uipath/_cli/_dev/_terminal/_components/_details.py,sha256=
|
34
|
+
uipath/_cli/_dev/_terminal/__init__.py,sha256=08aBD5-I6rcO9Sjp3sWWlinoRvHpa67Ss7yawXBhkBI,10136
|
35
|
+
uipath/_cli/_dev/_terminal/_components/_details.py,sha256=HzCFvi7CsXWsGXSFXo2X_QvUSpjtC8NfEM8Yu1wuOOA,16228
|
36
36
|
uipath/_cli/_dev/_terminal/_components/_history.py,sha256=-0lystNcVUCUbHgEUVQ-CdxAfV3_X5uhjxWevxs19Z0,2054
|
37
|
-
uipath/_cli/_dev/_terminal/_components/
|
38
|
-
uipath/_cli/_dev/_terminal/_components/
|
39
|
-
uipath/_cli/_dev/_terminal/
|
37
|
+
uipath/_cli/_dev/_terminal/_components/_json_input.py,sha256=MPkaeiA5KfkwJZKuNJ02hQksVtluZlmJv9nLRRAWYQI,592
|
38
|
+
uipath/_cli/_dev/_terminal/_components/_new.py,sha256=jxDFOQ6NCzTgesgx3srRr45ij1FqdICAB0uo6vXeh4I,4614
|
39
|
+
uipath/_cli/_dev/_terminal/_components/_resume.py,sha256=LW5TlgmhNjTv2nHLjGRmgzgtWvzuTr1T3WdPNujsLmo,1083
|
40
|
+
uipath/_cli/_dev/_terminal/_models/_execution.py,sha256=_tI01TX5W1GwG6OXBDDd28zUn-qp_Bf5hUaUqwMBOYo,2110
|
40
41
|
uipath/_cli/_dev/_terminal/_models/_messages.py,sha256=TR7D1yLL0PNYGUMts_cGLgF8zj67urNwuX-5xSGqWgM,1762
|
41
|
-
uipath/_cli/_dev/_terminal/_styles/terminal.tcss,sha256=
|
42
|
+
uipath/_cli/_dev/_terminal/_styles/terminal.tcss,sha256=t7PFpvwZ_TitoOCUQjW5_VB5AHHXg6QHxB-cB8ZXj6Q,2707
|
42
43
|
uipath/_cli/_dev/_terminal/_traces/_exporter.py,sha256=oI6D_eMwrh_2aqDYUh4GrJg8VLGrLYhDahR-_o0uJns,4144
|
43
44
|
uipath/_cli/_dev/_terminal/_traces/_logger.py,sha256=Dmfba3X9GmAZtXpzu_KDsleRCrpVo8_y-W6jizwFYq0,880
|
44
45
|
uipath/_cli/_evals/evaluation_service.py,sha256=zqYRB-tZpTTFqMctjIpEli3joIlmrz3dCVZsxekxIps,22053
|
@@ -127,8 +128,8 @@ uipath/tracing/_traced.py,sha256=qeVDrds2OUnpdUIA0RhtF0kg2dlAZhyC1RRkI-qivTM,185
|
|
127
128
|
uipath/tracing/_utils.py,sha256=wJRELaPu69iY0AhV432Dk5QYf_N_ViRU4kAUG1BI1ew,10384
|
128
129
|
uipath/utils/__init__.py,sha256=VD-KXFpF_oWexFg6zyiWMkxl2HM4hYJMIUDZ1UEtGx0,105
|
129
130
|
uipath/utils/_endpoints_manager.py,sha256=iRTl5Q0XAm_YgcnMcJOXtj-8052sr6jpWuPNz6CgT0Q,8408
|
130
|
-
uipath-2.1.
|
131
|
-
uipath-2.1.
|
132
|
-
uipath-2.1.
|
133
|
-
uipath-2.1.
|
134
|
-
uipath-2.1.
|
131
|
+
uipath-2.1.33.dist-info/METADATA,sha256=8ilJfyu-w3YSekotgT-mJKdVHHgeUBDFXhZMufMR4BY,6450
|
132
|
+
uipath-2.1.33.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
133
|
+
uipath-2.1.33.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
|
134
|
+
uipath-2.1.33.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
|
135
|
+
uipath-2.1.33.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|