uipath 2.0.78__py3-none-any.whl → 2.0.80__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.
@@ -50,7 +50,7 @@ class UiPathRuntime(UiPathBaseRuntime):
50
50
  if self.context.entrypoint is None:
51
51
  return None
52
52
 
53
- script_result = self._execute_python_script(
53
+ script_result = await self._execute_python_script(
54
54
  self.context.entrypoint, self.context.input_json
55
55
  )
56
56
 
@@ -111,7 +111,7 @@ class UiPathRuntime(UiPathBaseRuntime):
111
111
  """Cleanup runtime resources."""
112
112
  pass
113
113
 
114
- def _execute_python_script(self, script_path: str, input_data: Any) -> Any:
114
+ async def _execute_python_script(self, script_path: str, input_data: Any) -> Any:
115
115
  """Execute the Python script with the given input."""
116
116
  spec = importlib.util.spec_from_file_location("dynamic_module", script_path)
117
117
  if not spec or not spec.loader:
@@ -139,10 +139,13 @@ class UiPathRuntime(UiPathBaseRuntime):
139
139
  sig = inspect.signature(main_func)
140
140
  params = list(sig.parameters.values())
141
141
 
142
+ # Check if the function is asynchronous
143
+ is_async = inspect.iscoroutinefunction(main_func)
144
+
142
145
  # Case 1: No parameters
143
146
  if not params:
144
147
  try:
145
- result = main_func()
148
+ result = await main_func() if is_async else main_func()
146
149
  return (
147
150
  self._convert_from_class(result)
148
151
  if result is not None
@@ -166,7 +169,11 @@ class UiPathRuntime(UiPathBaseRuntime):
166
169
  try:
167
170
  valid_type = cast(Type[Any], input_type)
168
171
  typed_input = self._convert_to_class(input_data, valid_type)
169
- result = main_func(typed_input)
172
+ result = (
173
+ await main_func(typed_input)
174
+ if is_async
175
+ else main_func(typed_input)
176
+ )
170
177
  return (
171
178
  self._convert_from_class(result)
172
179
  if result is not None
@@ -183,7 +190,11 @@ class UiPathRuntime(UiPathBaseRuntime):
183
190
  # Case 3: Dict parameter
184
191
  else:
185
192
  try:
186
- result = main_func(input_data)
193
+ result = (
194
+ await main_func(input_data)
195
+ if is_async
196
+ else main_func(input_data)
197
+ )
187
198
  return (
188
199
  self._convert_from_class(result)
189
200
  if result is not None
@@ -63,7 +63,18 @@ class EndpointManager:
63
63
  capabilities_url = f"{base_url.rstrip('/')}/{UiPathEndpoints.AH_CAPABILITIES_ENDPOINT.value}"
64
64
  loggger.debug(f"Checking AgentHub capabilities at {capabilities_url}")
65
65
  response = http_client.get(capabilities_url)
66
- return response.status_code == 200
66
+
67
+ if response.status_code != 200:
68
+ return False
69
+
70
+ capabilities = response.json()
71
+
72
+ # Validate structure and required fields
73
+ if not isinstance(capabilities, dict) or "version" not in capabilities:
74
+ return False
75
+
76
+ return True
77
+
67
78
  except Exception as e:
68
79
  loggger.error(f"Error checking AgentHub capabilities: {e}", exc_info=True)
69
80
  return False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: uipath
3
- Version: 2.0.78
3
+ Version: 2.0.80
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
@@ -30,7 +30,7 @@ uipath/_cli/_runtime/_contracts.py,sha256=Rxs-uEOA490fLPNimB8LqZW7KI-72O0BLY4Jm7
30
30
  uipath/_cli/_runtime/_escalation.py,sha256=x3vI98qsfRA-fL_tNkRVTFXioM5Gv2w0GFcXJJ5eQtg,7981
31
31
  uipath/_cli/_runtime/_hitl.py,sha256=aexwe0dIXvh6SlVS1jVnO_aGZc6e3gLsmGkCyha5AHo,11300
32
32
  uipath/_cli/_runtime/_logging.py,sha256=lA2LsakOrcSLnJWgo80-BYzIQBUWfqzzJGI1M61Gu0s,7874
33
- uipath/_cli/_runtime/_runtime.py,sha256=-ZA7MZctX3e_YX_SN9XFjtsQKaCZCdBL3YRYFmsacN4,10162
33
+ uipath/_cli/_runtime/_runtime.py,sha256=dHfL6McYC9BwBB9Dk4Y_syvAft-1b-jTG1nbG_d07m8,10647
34
34
  uipath/_cli/_templates/.psmdcp.template,sha256=C7pBJPt98ovEljcBvGtEUGoWjjQhu9jls1bpYjeLOKA,611
35
35
  uipath/_cli/_templates/.rels.template,sha256=-fTcw7OA1AcymHr0LzBqbMAAtzZTRXLTNa_ljq087Jk,406
36
36
  uipath/_cli/_templates/[Content_Types].xml.template,sha256=bYsKDz31PkIF9QksjgAY_bqm57YC8U_owsZeNZAiBxQ,584
@@ -94,9 +94,9 @@ uipath/tracing/_otel_exporters.py,sha256=X7cnuGqvxGbACZuFD2XYTWXwIse8pokOEAjeTPE
94
94
  uipath/tracing/_traced.py,sha256=qeVDrds2OUnpdUIA0RhtF0kg2dlAZhyC1RRkI-qivTM,18528
95
95
  uipath/tracing/_utils.py,sha256=ZeensQexnw69jVcsVrGyED7mPlAU-L1agDGm6_1A3oc,10388
96
96
  uipath/utils/__init__.py,sha256=VD-KXFpF_oWexFg6zyiWMkxl2HM4hYJMIUDZ1UEtGx0,105
97
- uipath/utils/_endpoints_manager.py,sha256=7k3DQUrN-TE7MqPVcASqg_f-Nuu9FrxNzv0wD0LXr0Q,3861
98
- uipath-2.0.78.dist-info/METADATA,sha256=EL02EWvU6BKRXMSPQ2YAdA28c8zkYckJoo0-K953-1E,6462
99
- uipath-2.0.78.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
100
- uipath-2.0.78.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
101
- uipath-2.0.78.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
102
- uipath-2.0.78.dist-info/RECORD,,
97
+ uipath/utils/_endpoints_manager.py,sha256=hiGEu6vyfQJoeiiql6w21TNiG6tADUfXlVBimxPU1-Q,4160
98
+ uipath-2.0.80.dist-info/METADATA,sha256=VMIdodyhJiELiQEzqDGSmCBhx39CclozIo579l8i-pE,6462
99
+ uipath-2.0.80.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
100
+ uipath-2.0.80.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
101
+ uipath-2.0.80.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
102
+ uipath-2.0.80.dist-info/RECORD,,