uipath 2.1.95__py3-none-any.whl → 2.1.97__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/_debug/_bridge.py +8 -9
- uipath/_cli/_dev/_terminal/_components/_new.py +3 -16
- uipath/_cli/_runtime/_contracts.py +60 -0
- uipath/utils/_endpoints_manager.py +2 -6
- {uipath-2.1.95.dist-info → uipath-2.1.97.dist-info}/METADATA +1 -1
- {uipath-2.1.95.dist-info → uipath-2.1.97.dist-info}/RECORD +9 -9
- {uipath-2.1.95.dist-info → uipath-2.1.97.dist-info}/WHEEL +0 -0
- {uipath-2.1.95.dist-info → uipath-2.1.97.dist-info}/entry_points.txt +0 -0
- {uipath-2.1.95.dist-info → uipath-2.1.97.dist-info}/licenses/LICENSE +0 -0
uipath/_cli/_debug/_bridge.py
CHANGED
|
@@ -13,6 +13,7 @@ from uipath._cli._runtime._contracts import (
|
|
|
13
13
|
UiPathBreakpointResult,
|
|
14
14
|
UiPathRuntimeContext,
|
|
15
15
|
UiPathRuntimeResult,
|
|
16
|
+
UiPathRuntimeStatus,
|
|
16
17
|
)
|
|
17
18
|
from uipath._events._events import UiPathAgentStateEvent
|
|
18
19
|
|
|
@@ -105,8 +106,7 @@ class ConsoleDebugBridge(UiPathDebugBridge):
|
|
|
105
106
|
|
|
106
107
|
async def emit_execution_started(self, execution_id: str, **kwargs) -> None:
|
|
107
108
|
"""Print execution started."""
|
|
108
|
-
self.console.print("[green]▶
|
|
109
|
-
self.console.print()
|
|
109
|
+
self.console.print("[green]▶ START[/green] [dim]")
|
|
110
110
|
|
|
111
111
|
async def emit_state_update(self, state_event: UiPathAgentStateEvent) -> None:
|
|
112
112
|
"""Print agent state update."""
|
|
@@ -144,20 +144,18 @@ class ConsoleDebugBridge(UiPathDebugBridge):
|
|
|
144
144
|
"""Print completion."""
|
|
145
145
|
self.console.print()
|
|
146
146
|
|
|
147
|
-
|
|
148
|
-
if
|
|
147
|
+
status: UiPathRuntimeStatus = runtime_result.status
|
|
148
|
+
if status == UiPathRuntimeStatus.SUCCESSFUL:
|
|
149
149
|
color = "green"
|
|
150
|
-
symbol = "
|
|
151
|
-
elif
|
|
150
|
+
symbol = "●"
|
|
151
|
+
elif status == UiPathRuntimeStatus.SUSPENDED:
|
|
152
152
|
color = "yellow"
|
|
153
153
|
symbol = "■"
|
|
154
154
|
else:
|
|
155
155
|
color = "blue"
|
|
156
156
|
symbol = "●"
|
|
157
157
|
|
|
158
|
-
self.console.print(
|
|
159
|
-
f"[{color}]{symbol} Completed[/{color}] [bold]{status_upper}[/bold]"
|
|
160
|
-
)
|
|
158
|
+
self.console.print(f"[{color}]{symbol} END[/{color}]")
|
|
161
159
|
if runtime_result.output:
|
|
162
160
|
self._print_json(runtime_result.output, label="Output")
|
|
163
161
|
|
|
@@ -322,6 +320,7 @@ class SignalRDebugBridge(UiPathDebugBridge):
|
|
|
322
320
|
"OnExecutionCompleted",
|
|
323
321
|
{
|
|
324
322
|
"status": runtime_result.status,
|
|
323
|
+
"output": runtime_result.output,
|
|
325
324
|
},
|
|
326
325
|
)
|
|
327
326
|
|
|
@@ -5,7 +5,7 @@ from typing import Any, Dict, Tuple, cast
|
|
|
5
5
|
from textual.app import ComposeResult
|
|
6
6
|
from textual.containers import Container, Horizontal, Vertical
|
|
7
7
|
from textual.reactive import reactive
|
|
8
|
-
from textual.widgets import Button,
|
|
8
|
+
from textual.widgets import Button, Select, TabbedContent, TabPane, TextArea
|
|
9
9
|
|
|
10
10
|
from ._json_input import JsonInput
|
|
11
11
|
|
|
@@ -48,7 +48,7 @@ class NewRunPanel(Container):
|
|
|
48
48
|
|
|
49
49
|
self.entrypoints = data.get("entryPoints", [])
|
|
50
50
|
self.entrypoint_paths = [ep["filePath"] for ep in self.entrypoints]
|
|
51
|
-
|
|
51
|
+
self.conversational = False
|
|
52
52
|
self.selected_entrypoint = (
|
|
53
53
|
self.entrypoint_paths[0] if self.entrypoint_paths else ""
|
|
54
54
|
)
|
|
@@ -76,12 +76,6 @@ class NewRunPanel(Container):
|
|
|
76
76
|
allow_blank=False,
|
|
77
77
|
)
|
|
78
78
|
|
|
79
|
-
yield Checkbox(
|
|
80
|
-
"chat mode",
|
|
81
|
-
value=False,
|
|
82
|
-
id="conversational-toggle",
|
|
83
|
-
)
|
|
84
|
-
|
|
85
79
|
yield JsonInput(
|
|
86
80
|
text=self.initial_input,
|
|
87
81
|
language="json",
|
|
@@ -114,16 +108,9 @@ class NewRunPanel(Container):
|
|
|
114
108
|
mock_json_from_schema(ep.get("input", {})), indent=2
|
|
115
109
|
)
|
|
116
110
|
|
|
117
|
-
async def on_checkbox_changed(self, event: Checkbox.Changed) -> None:
|
|
118
|
-
"""Hide JSON input if conversational is enabled."""
|
|
119
|
-
if event.checkbox.id == "conversational-toggle":
|
|
120
|
-
json_input = self.query_one("#json-input", TextArea)
|
|
121
|
-
json_input.display = not event.value
|
|
122
|
-
|
|
123
111
|
def get_input_values(self) -> Tuple[str, str, bool]:
|
|
124
112
|
json_input = self.query_one("#json-input", TextArea)
|
|
125
|
-
|
|
126
|
-
return self.selected_entrypoint, json_input.text.strip(), conversational
|
|
113
|
+
return self.selected_entrypoint, json_input.text.strip(), self.conversational
|
|
127
114
|
|
|
128
115
|
def reset_form(self):
|
|
129
116
|
"""Reset selection and JSON input to defaults."""
|
|
@@ -828,6 +828,28 @@ class UiPathRuntimeFactory(Generic[T, C]):
|
|
|
828
828
|
for span_processor in self.tracer_span_processors:
|
|
829
829
|
span_processor.force_flush()
|
|
830
830
|
|
|
831
|
+
async def stream(
|
|
832
|
+
self, context: C
|
|
833
|
+
) -> AsyncGenerator[Union[UiPathRuntimeEvent, UiPathRuntimeResult], None]:
|
|
834
|
+
"""Stream runtime execution with context.
|
|
835
|
+
|
|
836
|
+
Args:
|
|
837
|
+
context: The runtime context
|
|
838
|
+
|
|
839
|
+
Yields:
|
|
840
|
+
UiPathRuntimeEvent instances during execution and final UiPathRuntimeResult
|
|
841
|
+
|
|
842
|
+
Raises:
|
|
843
|
+
UiPathRuntimeStreamNotSupportedError: If the runtime doesn't support streaming
|
|
844
|
+
"""
|
|
845
|
+
async with self.from_context(context) as runtime:
|
|
846
|
+
try:
|
|
847
|
+
async for event in runtime.stream():
|
|
848
|
+
yield event
|
|
849
|
+
finally:
|
|
850
|
+
for span_processor in self.tracer_span_processors:
|
|
851
|
+
span_processor.force_flush()
|
|
852
|
+
|
|
831
853
|
async def execute_in_root_span(
|
|
832
854
|
self,
|
|
833
855
|
context: C,
|
|
@@ -853,6 +875,44 @@ class UiPathRuntimeFactory(Generic[T, C]):
|
|
|
853
875
|
for span_processor in self.tracer_span_processors:
|
|
854
876
|
span_processor.force_flush()
|
|
855
877
|
|
|
878
|
+
async def stream_in_root_span(
|
|
879
|
+
self,
|
|
880
|
+
context: C,
|
|
881
|
+
root_span: str = "root",
|
|
882
|
+
attributes: Optional[dict[str, str]] = None,
|
|
883
|
+
) -> AsyncGenerator[Union[UiPathRuntimeEvent, UiPathRuntimeResult], None]:
|
|
884
|
+
"""Stream runtime execution with context in a root span.
|
|
885
|
+
|
|
886
|
+
Args:
|
|
887
|
+
context: The runtime context
|
|
888
|
+
root_span: Name of the root span
|
|
889
|
+
attributes: Optional attributes to add to the span
|
|
890
|
+
|
|
891
|
+
Yields:
|
|
892
|
+
UiPathRuntimeEvent instances during execution and final UiPathRuntimeResult
|
|
893
|
+
|
|
894
|
+
Raises:
|
|
895
|
+
UiPathRuntimeStreamNotSupportedError: If the runtime doesn't support streaming
|
|
896
|
+
"""
|
|
897
|
+
async with self.from_context(context) as runtime:
|
|
898
|
+
try:
|
|
899
|
+
tracer: Tracer = trace.get_tracer("uipath-runtime")
|
|
900
|
+
span_attributes = {}
|
|
901
|
+
if context.execution_id:
|
|
902
|
+
span_attributes["execution.id"] = context.execution_id
|
|
903
|
+
if attributes:
|
|
904
|
+
span_attributes.update(attributes)
|
|
905
|
+
|
|
906
|
+
with tracer.start_as_current_span(
|
|
907
|
+
root_span,
|
|
908
|
+
attributes=span_attributes,
|
|
909
|
+
):
|
|
910
|
+
async for event in runtime.stream():
|
|
911
|
+
yield event
|
|
912
|
+
finally:
|
|
913
|
+
for span_processor in self.tracer_span_processors:
|
|
914
|
+
span_processor.force_flush()
|
|
915
|
+
|
|
856
916
|
|
|
857
917
|
class UiPathExecutionTraceProcessorMixin:
|
|
858
918
|
def on_start(
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
import os
|
|
3
|
-
import re
|
|
4
3
|
from enum import Enum
|
|
5
4
|
from typing import Optional
|
|
6
5
|
|
|
@@ -148,20 +147,17 @@ class EndpointManager:
|
|
|
148
147
|
return gw.value
|
|
149
148
|
|
|
150
149
|
# Determine fallback order based on environment hints
|
|
151
|
-
uipath_url = os.getenv("UIPATH_URL", "")
|
|
152
150
|
hdens_env = os.getenv("HDENS_ENV", "").lower()
|
|
153
151
|
|
|
154
|
-
is_cloud_url = re.match(r"https?://[^/]+\.uipath\.com", uipath_url)
|
|
155
|
-
|
|
156
152
|
# Default order: AgentHub -> Orchestrator
|
|
157
153
|
check_order = [
|
|
158
154
|
("ah", ah, cls.is_agenthub_available),
|
|
159
155
|
("orc", orc, cls.is_orchestrator_available),
|
|
160
156
|
]
|
|
161
157
|
|
|
162
|
-
# Prioritize Orchestrator if HDENS_ENV is 'sf'
|
|
158
|
+
# Prioritize Orchestrator if HDENS_ENV is 'sf'
|
|
163
159
|
# Note: The default order already prioritizes AgentHub
|
|
164
|
-
if hdens_env == "sf"
|
|
160
|
+
if hdens_env == "sf":
|
|
165
161
|
check_order.reverse()
|
|
166
162
|
|
|
167
163
|
# Execute fallback checks in the determined order
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: uipath
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.97
|
|
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
|
|
@@ -32,14 +32,14 @@ uipath/_cli/_auth/auth_config.json,sha256=o8J5BBFwiEtjZLHpJ_64lvnTeYeRIHaJ-Bhg0Q
|
|
|
32
32
|
uipath/_cli/_auth/index.html,sha256=uGK0CDTP8Rys_p4O_Pbd2x4tz0frKNVcumjrXnal5Nc,22814
|
|
33
33
|
uipath/_cli/_auth/localhost.crt,sha256=oGl9oLLOiouHubAt39B4zEfylFvKEtbtr_43SIliXJc,1226
|
|
34
34
|
uipath/_cli/_auth/localhost.key,sha256=X31VYXD8scZtmGA837dGX5l6G-LXHLo5ItWJhZXaz3c,1679
|
|
35
|
-
uipath/_cli/_debug/_bridge.py,sha256=
|
|
35
|
+
uipath/_cli/_debug/_bridge.py,sha256=ylswtTAXPR_ThQxmYIa9PeRC80F-UVbeWMhRDUlMhYI,13908
|
|
36
36
|
uipath/_cli/_debug/_runtime.py,sha256=fwpxmBFAhhMjanBQaCQdI-YuvMC6vhS8SSS8pvw_PJw,4946
|
|
37
37
|
uipath/_cli/_dev/_terminal/__init__.py,sha256=di_RiN9Mcp9wqyKRRqXag28vbSw8_78mCnQZNn9H-Ss,14027
|
|
38
38
|
uipath/_cli/_dev/_terminal/_components/_chat.py,sha256=NLRoy49QScHiI-q0FGykkaU8ajv1d23fx7issSALcFA,4119
|
|
39
39
|
uipath/_cli/_dev/_terminal/_components/_details.py,sha256=FbLYtJ56gqHV6CIrpzO_n9Sk_YNg4nzRKTSsbj-DBPQ,17257
|
|
40
40
|
uipath/_cli/_dev/_terminal/_components/_history.py,sha256=QX9GWiKpP1H6_wVOJkrIMb-8w2HKg8g-kcbwxiEQj2s,3237
|
|
41
41
|
uipath/_cli/_dev/_terminal/_components/_json_input.py,sha256=MPkaeiA5KfkwJZKuNJ02hQksVtluZlmJv9nLRRAWYQI,592
|
|
42
|
-
uipath/_cli/_dev/_terminal/_components/_new.py,sha256=
|
|
42
|
+
uipath/_cli/_dev/_terminal/_components/_new.py,sha256=zwghPmd-OFB6AUjj1Q2SvVflT8Z1U1OCGYQsNQq0730,4676
|
|
43
43
|
uipath/_cli/_dev/_terminal/_models/_execution.py,sha256=gPcxtwWR9eO929VaieOdI1e77clceKLoKA0FYayuCFQ,2869
|
|
44
44
|
uipath/_cli/_dev/_terminal/_models/_messages.py,sha256=p66MHUi_SS30CQWXtiwydybMKBQrtZLXNfNUD6TdK1w,1832
|
|
45
45
|
uipath/_cli/_dev/_terminal/_styles/terminal.tcss,sha256=ktVpKwXIXw2VZp8KIZD6fO9i9NTGvts_icCTxMdzEiY,3240
|
|
@@ -66,7 +66,7 @@ uipath/_cli/_evals/mocks/mocker_factory.py,sha256=V5QKSTtQxztTo4-fK1TyAaXw2Z3mHf
|
|
|
66
66
|
uipath/_cli/_evals/mocks/mockito_mocker.py,sha256=AO2BmFwA6hz3Lte-STVr7aJDPvMCqKNKa4j2jeNZ_U4,2677
|
|
67
67
|
uipath/_cli/_evals/mocks/mocks.py,sha256=HY0IaSqqO8hioBB3rp5XwAjSpQE4K5hoH6oJQ-sH72I,2207
|
|
68
68
|
uipath/_cli/_push/sw_file_handler.py,sha256=voZVfJeJTqkvf5aFZvxAHQ_qa7dX_Cz7wRsfhLKL9Ag,17884
|
|
69
|
-
uipath/_cli/_runtime/_contracts.py,sha256
|
|
69
|
+
uipath/_cli/_runtime/_contracts.py,sha256=-RrABpM3NVCa3GwSnJQh_SPdgtarrExDyT8X_f5SLcY,33813
|
|
70
70
|
uipath/_cli/_runtime/_escalation.py,sha256=x3vI98qsfRA-fL_tNkRVTFXioM5Gv2w0GFcXJJ5eQtg,7981
|
|
71
71
|
uipath/_cli/_runtime/_hitl.py,sha256=VKbM021nVg1HEDnTfucSLJ0LsDn83CKyUtVzofS2qTU,11369
|
|
72
72
|
uipath/_cli/_runtime/_logging.py,sha256=srjAi3Cy6g7b8WNHiYNjaZT4t40F3XRqquuoGd2kh4Y,14019
|
|
@@ -185,10 +185,10 @@ uipath/tracing/_otel_exporters.py,sha256=c0GKU_oUrAwrOrqbyu64c55z1TR6xk01d3y5fLU
|
|
|
185
185
|
uipath/tracing/_traced.py,sha256=yBIY05PCCrYyx50EIHZnwJaKNdHPNx-YTR1sHQl0a98,19901
|
|
186
186
|
uipath/tracing/_utils.py,sha256=X-LFsyIxDeNOGuHPvkb6T5o9Y8ElYhr_rP3CEBJSu4s,13837
|
|
187
187
|
uipath/utils/__init__.py,sha256=VD-KXFpF_oWexFg6zyiWMkxl2HM4hYJMIUDZ1UEtGx0,105
|
|
188
|
-
uipath/utils/_endpoints_manager.py,sha256=
|
|
188
|
+
uipath/utils/_endpoints_manager.py,sha256=tnF_FiCx8qI2XaJDQgYkMN_gl9V0VqNR1uX7iawuLp8,8230
|
|
189
189
|
uipath/utils/dynamic_schema.py,sha256=w0u_54MoeIAB-mf3GmwX1A_X8_HDrRy6p998PvX9evY,3839
|
|
190
|
-
uipath-2.1.
|
|
191
|
-
uipath-2.1.
|
|
192
|
-
uipath-2.1.
|
|
193
|
-
uipath-2.1.
|
|
194
|
-
uipath-2.1.
|
|
190
|
+
uipath-2.1.97.dist-info/METADATA,sha256=VSSHUv-YMKThR9fS26EnbcZhKRMP-o0omZVgfeEepTM,6625
|
|
191
|
+
uipath-2.1.97.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
192
|
+
uipath-2.1.97.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
|
|
193
|
+
uipath-2.1.97.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
|
|
194
|
+
uipath-2.1.97.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|