uipath 2.1.94__py3-none-any.whl → 2.1.96__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.

Potentially problematic release.


This version of uipath might be problematic. Click here for more details.

@@ -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]▶ Started[/green] [dim]")
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."""
@@ -114,6 +114,8 @@ class ConsoleDebugBridge(UiPathDebugBridge):
114
114
  return
115
115
 
116
116
  self.console.print(f"[yellow]●[/yellow] [bold]{state_event.node_name}[/bold]")
117
+ if state_event.payload:
118
+ self._print_json(state_event.payload, label="State")
117
119
 
118
120
  async def emit_breakpoint_hit(
119
121
  self, breakpoint_result: UiPathBreakpointResult
@@ -142,20 +144,18 @@ class ConsoleDebugBridge(UiPathDebugBridge):
142
144
  """Print completion."""
143
145
  self.console.print()
144
146
 
145
- status_upper = runtime_result.status.value.upper()
146
- if status_upper == "SUCCESSFUL":
147
+ status: UiPathRuntimeStatus = runtime_result.status
148
+ if status == UiPathRuntimeStatus.SUCCESSFUL:
147
149
  color = "green"
148
- symbol = ""
149
- elif status_upper == "SUSPENDED":
150
+ symbol = ""
151
+ elif status == UiPathRuntimeStatus.SUSPENDED:
150
152
  color = "yellow"
151
153
  symbol = "■"
152
154
  else:
153
155
  color = "blue"
154
156
  symbol = "●"
155
157
 
156
- self.console.print(
157
- f"[{color}]{symbol} Completed[/{color}] [bold]{status_upper}[/bold]"
158
- )
158
+ self.console.print(f"[{color}]{symbol} END[/{color}]")
159
159
  if runtime_result.output:
160
160
  self._print_json(runtime_result.output, label="Output")
161
161
 
@@ -320,6 +320,7 @@ class SignalRDebugBridge(UiPathDebugBridge):
320
320
  "OnExecutionCompleted",
321
321
  {
322
322
  "status": runtime_result.status,
323
+ "output": runtime_result.output,
323
324
  },
324
325
  )
325
326
 
@@ -105,15 +105,11 @@ class UiPathDebugRuntime(UiPathBaseRuntime, Generic[T, C]):
105
105
  await self.debug_bridge.emit_breakpoint_hit(event)
106
106
  await self.debug_bridge.wait_for_resume()
107
107
  self._inner_runtime.context.resume = True
108
- # Break out of stream loop to restart streaming from resume point
109
- break
110
108
  else:
111
109
  # Normal completion or suspension with dynamic interrupt
112
110
  execution_completed = True
113
-
114
111
  # Handle dynamic interrupts if present
115
112
  # Maybe poll for resume trigger completion here in future
116
- break
117
113
 
118
114
  # Handle state update events - send to debug bridge
119
115
  elif isinstance(event, UiPathAgentStateEvent):
@@ -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, Checkbox, Select, TabbedContent, TabPane, TextArea
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
- conversational = self.query_one("#conversational-toggle", Checkbox).value
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,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: uipath
3
- Version: 2.1.94
3
+ Version: 2.1.96
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=FcfZdAV3KDKc7qlLOrv130QroYHlgHXkotbyPpXU2iA,13799
36
- uipath/_cli/_debug/_runtime.py,sha256=kRYYkYQL5QLr2vvonN2t1kb_AuaDOuyBZoMqKKJZCgQ,5097
35
+ uipath/_cli/_debug/_bridge.py,sha256=ylswtTAXPR_ThQxmYIa9PeRC80F-UVbeWMhRDUlMhYI,13908
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=paA8oRhP5mphpf3RHV0gx7_CYdN5e6158tv_XVQifdE,5219
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=zNbBbnEPW3hzUcgAsPQSmH8SUsEME1PtJDJbjFXcsCc,31607
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
@@ -187,8 +187,8 @@ uipath/tracing/_utils.py,sha256=X-LFsyIxDeNOGuHPvkb6T5o9Y8ElYhr_rP3CEBJSu4s,1383
187
187
  uipath/utils/__init__.py,sha256=VD-KXFpF_oWexFg6zyiWMkxl2HM4hYJMIUDZ1UEtGx0,105
188
188
  uipath/utils/_endpoints_manager.py,sha256=iRTl5Q0XAm_YgcnMcJOXtj-8052sr6jpWuPNz6CgT0Q,8408
189
189
  uipath/utils/dynamic_schema.py,sha256=w0u_54MoeIAB-mf3GmwX1A_X8_HDrRy6p998PvX9evY,3839
190
- uipath-2.1.94.dist-info/METADATA,sha256=Z6zQUdDswsr-VJrZJDn8r9aDFhb-ekVTy4E5YS62fbo,6625
191
- uipath-2.1.94.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
192
- uipath-2.1.94.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
193
- uipath-2.1.94.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
194
- uipath-2.1.94.dist-info/RECORD,,
190
+ uipath-2.1.96.dist-info/METADATA,sha256=gZyU4LdfMfH8j7FhBuTmNm-aW99mU9snEQslFAb1w2g,6625
191
+ uipath-2.1.96.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
192
+ uipath-2.1.96.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
193
+ uipath-2.1.96.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
194
+ uipath-2.1.96.dist-info/RECORD,,