uipath 2.1.63__py3-none-any.whl → 2.1.65__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.
@@ -59,7 +59,9 @@ def gracefully_handle_errors(func):
59
59
  class StudioWebProgressReporter:
60
60
  """Handles reporting evaluation progress to StudioWeb."""
61
61
 
62
- def __init__(self):
62
+ def __init__(self, spans_exporter: LlmOpsHttpExporter):
63
+ self.spans_exporter = spans_exporter
64
+
63
65
  logging.getLogger("uipath._cli.middlewares").setLevel(logging.CRITICAL)
64
66
  console_logger = ConsoleLogger.get_instance()
65
67
  uipath = UiPath()
@@ -199,11 +201,11 @@ class StudioWebProgressReporter:
199
201
 
200
202
  async def handle_update_eval_run(self, payload: EvalRunUpdatedEvent) -> None:
201
203
  try:
202
- spans_exporter = LlmOpsHttpExporter(
203
- trace_id=self.eval_set_run_ids.get(payload.execution_id),
204
+ self.spans_exporter.trace_id = self.eval_set_run_ids.get(
205
+ payload.execution_id
204
206
  )
205
207
 
206
- spans_exporter.export(payload.spans)
208
+ self.spans_exporter.export(payload.spans)
207
209
 
208
210
  for eval_result in payload.eval_results:
209
211
  evaluator_id = eval_result.evaluator_id
@@ -330,6 +330,10 @@ def files_to_include(
330
330
  """
331
331
  file_extensions_included = [".py", ".mermaid", ".json", ".yaml", ".yml", ".md"]
332
332
  files_included = ["pyproject.toml"]
333
+ files_excluded = []
334
+
335
+ if directories_to_ignore is None:
336
+ directories_to_ignore = []
333
337
  if include_uv_lock:
334
338
  files_included += ["uv.lock"]
335
339
  if "settings" in config_data:
@@ -338,8 +342,10 @@ def files_to_include(
338
342
  file_extensions_included.extend(settings["fileExtensionsIncluded"])
339
343
  if "filesIncluded" in settings:
340
344
  files_included.extend(settings["filesIncluded"])
341
- if directories_to_ignore is None:
342
- directories_to_ignore = []
345
+ if "filesExcluded" in settings:
346
+ files_excluded.extend(settings["filesExcluded"])
347
+ if "directoriesExcluded" in settings:
348
+ directories_to_ignore.extend(settings["directoriesExcluded"])
343
349
 
344
350
  def is_venv_dir(d: str) -> bool:
345
351
  """Check if a directory is a Python virtual environment.
@@ -359,20 +365,63 @@ def files_to_include(
359
365
  extra_files: list[FileInfo] = []
360
366
  # Walk through directory and return all files in the allowlist
361
367
  for root, dirs, files in os.walk(directory):
362
- # Skip all directories that start with . or are a venv
363
- dirs[:] = [
364
- d
365
- for d in dirs
366
- if not d.startswith(".")
367
- and not is_venv_dir(os.path.join(root, d))
368
- and (directories_to_ignore is not None and d not in directories_to_ignore)
369
- ]
368
+ # Skip all directories that start with . or are a venv or are excluded
369
+ included_dirs = []
370
+ for d in dirs:
371
+ if d.startswith(".") or is_venv_dir(os.path.join(root, d)):
372
+ continue
373
+
374
+ # Check if directory should be excluded
375
+ dir_path = os.path.join(root, d)
376
+ dir_rel_path = os.path.relpath(dir_path, directory)
377
+ normalized_dir_rel_path = dir_rel_path.replace(os.sep, "/")
378
+
379
+ # Check exclusion: by dirname (for root level) or by relative path
380
+ should_exclude_dir = (
381
+ (
382
+ (
383
+ d in directories_to_ignore and normalized_dir_rel_path == d
384
+ ) # name match for root level only
385
+ or normalized_dir_rel_path
386
+ in directories_to_ignore # path match for nested directories
387
+ )
388
+ if directories_to_ignore is not None
389
+ else False
390
+ )
391
+
392
+ if not should_exclude_dir:
393
+ included_dirs.append(d)
394
+
395
+ dirs[:] = included_dirs
370
396
  for file in files:
371
397
  file_extension = os.path.splitext(file)[1].lower()
372
- if file_extension in file_extensions_included or file in files_included:
373
- file_path = os.path.join(root, file)
374
- file_name = os.path.basename(file_path)
375
- rel_path = os.path.relpath(file_path, directory)
398
+ file_path = os.path.join(root, file)
399
+ file_name = os.path.basename(file_path)
400
+ rel_path = os.path.relpath(file_path, directory)
401
+
402
+ # Normalize the path
403
+ normalized_rel_path = rel_path.replace(os.sep, "/")
404
+
405
+ # Check inclusion: by extension, by filename (for base directory), or by relative path
406
+ should_include = (
407
+ file_extension in file_extensions_included
408
+ or (
409
+ file in files_included and normalized_rel_path == file
410
+ ) # filename match for base directory only
411
+ or normalized_rel_path
412
+ in files_included # path match for subdirectories
413
+ )
414
+
415
+ # Check exclusion: by filename (for base directory only) or by relative path
416
+ should_exclude = (
417
+ (
418
+ file in files_excluded and normalized_rel_path == file
419
+ ) # filename match for base directory only
420
+ or normalized_rel_path
421
+ in files_excluded # path match for subdirectories
422
+ )
423
+
424
+ if should_include and not should_exclude:
376
425
  extra_files.append(
377
426
  FileInfo(
378
427
  file_name=file_name,
uipath/_cli/cli_eval.py CHANGED
@@ -101,7 +101,7 @@ def eval(
101
101
  event_bus = EventBus()
102
102
 
103
103
  if not no_report:
104
- progress_reporter = StudioWebProgressReporter()
104
+ progress_reporter = StudioWebProgressReporter(LlmOpsHttpExporter())
105
105
  asyncio.run(progress_reporter.subscribe_to_eval_runtime_events(event_bus))
106
106
 
107
107
  def generate_runtime_context(**context_kwargs) -> UiPathRuntimeContext:
@@ -6,6 +6,7 @@ from .._config import Config
6
6
  from .._execution_context import ExecutionContext
7
7
  from .._utils import Endpoint, RequestSpec, infer_bindings
8
8
  from ..models import Connection, ConnectionToken, EventArguments
9
+ from ..models.connections import ConnectionTokenType
9
10
  from ..tracing._traced import traced
10
11
  from ._base_service import BaseService
11
12
 
@@ -71,7 +72,9 @@ class ConnectionsService(BaseService):
71
72
  run_type="uipath",
72
73
  hide_output=True,
73
74
  )
74
- def retrieve_token(self, key: str) -> ConnectionToken:
75
+ def retrieve_token(
76
+ self, key: str, token_type: ConnectionTokenType = ConnectionTokenType.DIRECT
77
+ ) -> ConnectionToken:
75
78
  """Retrieve an authentication token for a connection.
76
79
 
77
80
  This method obtains a fresh authentication token that can be used to
@@ -80,12 +83,13 @@ class ConnectionsService(BaseService):
80
83
 
81
84
  Args:
82
85
  key (str): The unique identifier of the connection.
86
+ token_type (ConnectionTokenType): The token type to use.
83
87
 
84
88
  Returns:
85
89
  ConnectionToken: The authentication token details, including the token
86
90
  value and any associated metadata.
87
91
  """
88
- spec = self._retrieve_token_spec(key)
92
+ spec = self._retrieve_token_spec(key, token_type)
89
93
  response = self.request(spec.method, url=spec.endpoint, params=spec.params)
90
94
  return ConnectionToken.model_validate(response.json())
91
95
 
@@ -94,7 +98,9 @@ class ConnectionsService(BaseService):
94
98
  run_type="uipath",
95
99
  hide_output=True,
96
100
  )
97
- async def retrieve_token_async(self, key: str) -> ConnectionToken:
101
+ async def retrieve_token_async(
102
+ self, key: str, token_type: ConnectionTokenType = ConnectionTokenType.DIRECT
103
+ ) -> ConnectionToken:
98
104
  """Asynchronously retrieve an authentication token for a connection.
99
105
 
100
106
  This method obtains a fresh authentication token that can be used to
@@ -103,12 +109,13 @@ class ConnectionsService(BaseService):
103
109
 
104
110
  Args:
105
111
  key (str): The unique identifier of the connection.
112
+ token_type (ConnectionTokenType): The token type to use.
106
113
 
107
114
  Returns:
108
115
  ConnectionToken: The authentication token details, including the token
109
116
  value and any associated metadata.
110
117
  """
111
- spec = self._retrieve_token_spec(key)
118
+ spec = self._retrieve_token_spec(key, token_type)
112
119
  response = await self.request_async(
113
120
  spec.method, url=spec.endpoint, params=spec.params
114
121
  )
@@ -198,9 +205,11 @@ class ConnectionsService(BaseService):
198
205
  endpoint=Endpoint(f"/connections_/api/v1/Connections/{key}"),
199
206
  )
200
207
 
201
- def _retrieve_token_spec(self, key: str) -> RequestSpec:
208
+ def _retrieve_token_spec(
209
+ self, key: str, token_type: ConnectionTokenType = ConnectionTokenType.DIRECT
210
+ ) -> RequestSpec:
202
211
  return RequestSpec(
203
212
  method="GET",
204
213
  endpoint=Endpoint(f"/connections_/api/v1/Connections/{key}/token"),
205
- params={"tokenType": "direct"},
214
+ params={"tokenType": token_type.value},
206
215
  )
@@ -97,6 +97,31 @@ class AgentProcessToolResourceConfig(BaseAgentToolResourceConfig):
97
97
  )
98
98
 
99
99
 
100
+ class AgentIntegrationToolParameter(BaseModel):
101
+ """Agent integration tool parameter."""
102
+
103
+ name: str = Field(..., alias="name")
104
+ type: str = Field(..., alias="type")
105
+ value: Optional[Any] = Field(None, alias="value")
106
+ field_location: str = Field(..., alias="fieldLocation")
107
+
108
+ # Useful Metadata
109
+ display_name: Optional[str] = Field(None, alias="displayName")
110
+ display_value: Optional[str] = Field(None, alias="displayValue")
111
+ description: Optional[str] = Field(None, alias="description")
112
+ position: Optional[str] = Field(None, alias="position")
113
+ field_variant: Optional[str] = Field(None, alias="fieldVariant")
114
+ dynamic: Optional[bool] = Field(None, alias="dynamic")
115
+ is_cascading: Optional[bool] = Field(None, alias="isCascading")
116
+ sort_order: Optional[int] = Field(..., alias="sortOrder")
117
+ required: Optional[bool] = Field(None, alias="required")
118
+ # enum_values, dynamic_behavior and reference not typed currently
119
+
120
+ model_config = ConfigDict(
121
+ validate_by_name=True, validate_by_alias=True, extra="allow"
122
+ )
123
+
124
+
100
125
  class AgentIntegrationToolProperties(BaseModel):
101
126
  """Properties specific to tool configuration."""
102
127
 
@@ -107,6 +132,7 @@ class AgentIntegrationToolProperties(BaseModel):
107
132
  method: str = Field(..., alias="method")
108
133
  connection: Connection = Field(..., alias="connection")
109
134
  body_structure: dict[str, Any] = Field(..., alias="bodyStructure")
135
+ parameters: List[AgentIntegrationToolParameter] = Field([], alias="parameters")
110
136
 
111
137
  model_config = ConfigDict(
112
138
  validate_by_name=True, validate_by_alias=True, extra="allow"
@@ -118,7 +144,6 @@ class AgentIntegrationToolResourceConfig(BaseAgentToolResourceConfig):
118
144
 
119
145
  type: Literal[AgentToolType.INTEGRATION] = AgentToolType.INTEGRATION
120
146
  properties: AgentIntegrationToolProperties
121
-
122
147
  model_config = ConfigDict(
123
148
  validate_by_name=True, validate_by_alias=True, extra="allow"
124
149
  )
@@ -1,3 +1,4 @@
1
+ from enum import Enum
1
2
  from typing import Any, Optional
2
3
 
3
4
  from pydantic import BaseModel, ConfigDict, Field
@@ -30,6 +31,11 @@ class Connection(BaseModel):
30
31
  element_version: Optional[str] = Field(default=None, alias="elementVersion")
31
32
 
32
33
 
34
+ class ConnectionTokenType(str, Enum):
35
+ DIRECT = "direct"
36
+ BEARER = "bearer"
37
+
38
+
33
39
  class ConnectionToken(BaseModel):
34
40
  model_config = ConfigDict(
35
41
  validate_by_name=True,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: uipath
3
- Version: 2.1.63
3
+ Version: 2.1.65
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
@@ -9,7 +9,7 @@ uipath/_cli/__init__.py,sha256=tscKceSouYcEOxUbGjoyHi4qGi74giBFeXG1I-ut1hs,2308
9
9
  uipath/_cli/cli_auth.py,sha256=ZEA0Fwoo77Ez9ctpRAIq7sbAwj8F4OouAbMp1g1OvjM,2601
10
10
  uipath/_cli/cli_deploy.py,sha256=KPCmQ0c_NYD5JofSDao5r6QYxHshVCRxlWDVnQvlp5w,645
11
11
  uipath/_cli/cli_dev.py,sha256=nEfpjw1PZ72O6jmufYWVrueVwihFxDPOeJakdvNHdOA,2146
12
- uipath/_cli/cli_eval.py,sha256=MERBnZE4R6OxIXllx9lcl4qqtuAhw7l-XY5u-jdXkN4,4796
12
+ uipath/_cli/cli_eval.py,sha256=DK7FBLrNiBVEZgNBarlgjO065hsmQYLas-1e7nfIjLk,4816
13
13
  uipath/_cli/cli_init.py,sha256=Ac3-9tIH3rpikIX1ehWTo7InW5tjVNoz_w6fjvgLK4w,7052
14
14
  uipath/_cli/cli_invoke.py,sha256=m-te-EjhDpk_fhFDkt-yQFzmjEHGo5lQDGEQWxSXisQ,4395
15
15
  uipath/_cli/cli_new.py,sha256=9378NYUBc9j-qKVXV7oja-jahfJhXBg8zKVyaon7ctY,2102
@@ -45,7 +45,7 @@ uipath/_cli/_dev/_terminal/_utils/_chat.py,sha256=YUZxYVdmEManwHDuZsczJT1dWIYE1d
45
45
  uipath/_cli/_dev/_terminal/_utils/_exporter.py,sha256=oI6D_eMwrh_2aqDYUh4GrJg8VLGrLYhDahR-_o0uJns,4144
46
46
  uipath/_cli/_dev/_terminal/_utils/_logger.py,sha256=jeNShEED27cNIHTe_NNx-2kUiXpSLTmi0onM6tVkqRM,888
47
47
  uipath/_cli/_evals/_evaluator_factory.py,sha256=2lOalabNSzmnnwr0SfoPWvFWXs0Ly857XBmPuOdhFBQ,4729
48
- uipath/_cli/_evals/_progress_reporter.py,sha256=Z-OEvZDixpHRdprKj0ukVe39RDMuzPzDhni-ygvUim4,16384
48
+ uipath/_cli/_evals/_progress_reporter.py,sha256=hpSt0CXpIoFJGsbqZkqmwyGO_TBNesbWKlvDJUEDxd8,16455
49
49
  uipath/_cli/_evals/_runtime.py,sha256=n14A1gTFtZekcdpswB_plpbaB81Q44_mvHqXQEqrB8o,11347
50
50
  uipath/_cli/_evals/_models/_evaluation_set.py,sha256=mwcTstHuyHd7ys_nLzgCNKBAsS4ns9UL2TF5Oq2Cc64,1758
51
51
  uipath/_cli/_evals/_models/_evaluator_base_params.py,sha256=lTYKOV66tcjW85KHTyOdtF1p1VDaBNemrMAvH8bFIFc,382
@@ -72,7 +72,7 @@ uipath/_cli/_utils/_folders.py,sha256=RsYrXzF0NA1sPxgBoLkLlUY3jDNLg1V-Y8j71Q8a8H
72
72
  uipath/_cli/_utils/_input_args.py,sha256=3LGNqVpJItvof75VGm-ZNTUMUH9-c7-YgleM5b2YgRg,5088
73
73
  uipath/_cli/_utils/_parse_ast.py,sha256=8Iohz58s6bYQ7rgWtOTjrEInLJ-ETikmOMZzZdIY2Co,20072
74
74
  uipath/_cli/_utils/_processes.py,sha256=q7DfEKHISDWf3pngci5za_z0Pbnf_shWiYEcTOTCiyk,1855
75
- uipath/_cli/_utils/_project_files.py,sha256=sulh3xZhDDw_rBOrn_XSUfVSD6sUu47ZK4n_lF5BKkQ,13197
75
+ uipath/_cli/_utils/_project_files.py,sha256=62VwZrroeKjlnqMqYSy3Aex11n9qYb7J8n3a8IVdo3I,15156
76
76
  uipath/_cli/_utils/_studio_project.py,sha256=hmWn9i7COkms3wAy5Di04ENF9KZAwbn_lyyTGDyq9uU,15571
77
77
  uipath/_cli/_utils/_tracing.py,sha256=2igb03j3EHjF_A406UhtCKkPfudVfFPjUq5tXUEG4oo,1541
78
78
  uipath/_cli/_utils/_uv_helpers.py,sha256=6SvoLnZPoKIxW0sjMvD1-ENV_HOXDYzH34GjBqwT138,3450
@@ -87,7 +87,7 @@ uipath/_services/api_client.py,sha256=kGm04ijk9AOEQd2BMxvQg-2QoB8dmyoDwFFDPyutAG
87
87
  uipath/_services/assets_service.py,sha256=pG0Io--SeiRRQmfUWPQPl1vq3csZlQgx30LBNKRmmF8,12145
88
88
  uipath/_services/attachments_service.py,sha256=NPQYK7CGjfBaNT_1S5vEAfODmOChTbQZforllFM2ofU,26678
89
89
  uipath/_services/buckets_service.py,sha256=5s8tuivd7GUZYj774DDUYTa0axxlUuesc4EBY1V5sdk,18496
90
- uipath/_services/connections_service.py,sha256=Rf-DCm43tsDM6Cfp41iwGR4gUk_YCdobGcmbSoKvQ6E,7480
90
+ uipath/_services/connections_service.py,sha256=Gt8zPY4oA7cMYAU2LI3lBieoBpV81BOGelnzDWJl_V4,7931
91
91
  uipath/_services/context_grounding_service.py,sha256=kp7h6Hd-VUuTqiDO-G7IanmXhaq0XHjXUk0ISFev-5c,24835
92
92
  uipath/_services/entities_service.py,sha256=QKCLE6wRgq3HZraF-M2mljy-8il4vsNHrQhUgkewVVk,14028
93
93
  uipath/_services/folder_service.py,sha256=9JqgjKhWD-G_KUnfUTP2BADxL6OK9QNZsBsWZHAULdE,2749
@@ -117,7 +117,7 @@ uipath/agent/conversation/exchange.py,sha256=nuk1tEMBHc_skrraT17d8U6AtyJ3h07ExGQ
117
117
  uipath/agent/conversation/message.py,sha256=1ZkEs146s79TrOAWCQwzBAEJvjAu4lQBpJ64tKXDgGE,2142
118
118
  uipath/agent/conversation/meta.py,sha256=3t0eS9UHoAPHre97QTUeVbjDhnMX4zj4-qG6ju0B8wY,315
119
119
  uipath/agent/conversation/tool.py,sha256=ol8XI8AVd-QNn5auXNBPcCzOkh9PPFtL7hTK3kqInkU,2191
120
- uipath/agent/models/agent.py,sha256=zNaHD5MOaTgcE0WvhHRPsGpBoWMYNP2H8lSyne0ZlPU,11393
120
+ uipath/agent/models/agent.py,sha256=HVdv-VHV98ZI4afIxexPDSKEKzGlMJ7uSRLj7qLe6vA,12548
121
121
  uipath/eval/_helpers/__init__.py,sha256=GSmZMryjuO3Wo_zdxZdrHCRRsgOxsVFYkYgJ15YNC3E,86
122
122
  uipath/eval/_helpers/helpers.py,sha256=iE2HHdMiAdAMLqxHkPKHpfecEtAuN5BTBqvKFTI8ciE,1315
123
123
  uipath/eval/evaluators/__init__.py,sha256=DJAAhgv0I5UfBod4sGnSiKerfrz1iMmk7GNFb71V8eI,494
@@ -135,7 +135,7 @@ uipath/models/actions.py,sha256=1vRsJ3JSmMdPkbiYAiHzY8K44vmW3VlMsmQUBAkSgrQ,3141
135
135
  uipath/models/assets.py,sha256=7x3swJRnG_a4VgjdXKKwraJLT5TF0u4wHsl6coOjX0g,2762
136
136
  uipath/models/attachment.py,sha256=lI6BxBY6DY5U6qZbxhkNu-usseA1zovYSTRtLq50ubI,1029
137
137
  uipath/models/buckets.py,sha256=N3Lj_dVCv709-ywhOOdyCSvsuLn41eGuAfSiik6Q6F8,1285
138
- uipath/models/connections.py,sha256=V6Ecx10HBDO2HGaIGG8NGx4q2sEhViAoPOUgPosPfvE,2418
138
+ uipath/models/connections.py,sha256=bTDg8xISSPmKB1GFNEEMD1OEZyBDFHfZVKqw4gab1pE,2524
139
139
  uipath/models/context_grounding.py,sha256=3MaF2Fv2QYle8UUWvKGkCN5XGpx2T4a34fdbBqJ2fCs,1137
140
140
  uipath/models/context_grounding_index.py,sha256=OhRyxZDHDSrEmBFK0-JLqMMMT64jir4XkHtQ54IKtc0,2683
141
141
  uipath/models/entities.py,sha256=x6jbq4o_QhgL_pCgvHFsp9O8l333kQhn8e9ZCBs72UM,9823
@@ -155,8 +155,8 @@ uipath/tracing/_traced.py,sha256=yBIY05PCCrYyx50EIHZnwJaKNdHPNx-YTR1sHQl0a98,199
155
155
  uipath/tracing/_utils.py,sha256=qd7N56tg6VXQ9pREh61esBgUWLNA0ssKsE0QlwrRWFM,11974
156
156
  uipath/utils/__init__.py,sha256=VD-KXFpF_oWexFg6zyiWMkxl2HM4hYJMIUDZ1UEtGx0,105
157
157
  uipath/utils/_endpoints_manager.py,sha256=iRTl5Q0XAm_YgcnMcJOXtj-8052sr6jpWuPNz6CgT0Q,8408
158
- uipath-2.1.63.dist-info/METADATA,sha256=9F4PWbD9lyyCjr-jGQWMBJ5fxWlwDTSpYfdXXpO22s4,6482
159
- uipath-2.1.63.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
160
- uipath-2.1.63.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
161
- uipath-2.1.63.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
162
- uipath-2.1.63.dist-info/RECORD,,
158
+ uipath-2.1.65.dist-info/METADATA,sha256=ecXcWDwG8E85gzxdJwt7YHKk_YOPtisDW6w8qw8LZdY,6482
159
+ uipath-2.1.65.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
160
+ uipath-2.1.65.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
161
+ uipath-2.1.65.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
162
+ uipath-2.1.65.dist-info/RECORD,,