33from typing import Any , AsyncGenerator , Optional , cast
44
55import pytest
6+ from uipath .core .tracing import UiPathTraceManager
67
78from uipath .runtime import (
89 UiPathExecuteOptions ,
@@ -139,6 +140,7 @@ def test_register_single_factory(clean_registry):
139140
140141 def create_factory (
141142 context : UiPathRuntimeContext | None = None ,
143+ trace_manager : UiPathTraceManager | None = None ,
142144 ) -> UiPathRuntimeFactoryProtocol :
143145 return MockFunctionsFactory (context )
144146
@@ -154,16 +156,19 @@ def test_register_multiple_factories(clean_registry):
154156
155157 def create_functions (
156158 context : UiPathRuntimeContext | None = None ,
159+ trace_manager : UiPathTraceManager | None = None ,
157160 ) -> UiPathRuntimeFactoryProtocol :
158161 return MockFunctionsFactory (context )
159162
160163 def create_langgraph (
161164 context : UiPathRuntimeContext | None = None ,
165+ trace_manager : UiPathTraceManager | None = None ,
162166 ) -> UiPathRuntimeFactoryProtocol :
163167 return MockLangGraphFactory (context )
164168
165169 def create_llamaindex (
166170 context : UiPathRuntimeContext | None = None ,
171+ trace_manager : UiPathTraceManager | None = None ,
167172 ) -> UiPathRuntimeFactoryProtocol :
168173 return MockLlamaIndexFactory (context )
169174
@@ -187,6 +192,7 @@ def test_set_default_factory(clean_registry):
187192
188193 def create_factory (
189194 context : UiPathRuntimeContext | None = None ,
195+ trace_manager : UiPathTraceManager | None = None ,
190196 ) -> UiPathRuntimeFactoryProtocol :
191197 return MockFunctionsFactory (context )
192198
@@ -207,6 +213,7 @@ def test_get_factory_by_name(clean_registry):
207213
208214 def create_factory (
209215 context : UiPathRuntimeContext | None = None ,
216+ trace_manager : UiPathTraceManager | None = None ,
210217 ) -> UiPathRuntimeFactoryProtocol :
211218 return MockLangGraphFactory (context )
212219
@@ -222,6 +229,7 @@ def test_get_factory_by_name_with_context(clean_registry):
222229
223230 def create_factory (
224231 context : UiPathRuntimeContext | None = None ,
232+ trace_manager : UiPathTraceManager | None = None ,
225233 ) -> UiPathRuntimeFactoryProtocol :
226234 return MockLangGraphFactory (context )
227235
@@ -244,11 +252,13 @@ def test_auto_detect_langgraph_json(clean_registry, temp_dir):
244252
245253 def create_functions (
246254 context : UiPathRuntimeContext | None = None ,
255+ trace_manager : UiPathTraceManager | None = None ,
247256 ) -> UiPathRuntimeFactoryProtocol :
248257 return MockFunctionsFactory (context )
249258
250259 def create_langgraph (
251260 context : UiPathRuntimeContext | None = None ,
261+ trace_manager : UiPathTraceManager | None = None ,
252262 ) -> UiPathRuntimeFactoryProtocol :
253263 return MockLangGraphFactory (context )
254264
@@ -269,11 +279,13 @@ def test_auto_detect_llamaindex_json(clean_registry, temp_dir):
269279
270280 def create_functions (
271281 context : UiPathRuntimeContext | None = None ,
282+ trace_manager : UiPathTraceManager | None = None ,
272283 ) -> UiPathRuntimeFactoryProtocol :
273284 return MockFunctionsFactory (context )
274285
275286 def create_llamaindex (
276287 context : UiPathRuntimeContext | None = None ,
288+ trace_manager : UiPathTraceManager | None = None ,
277289 ) -> UiPathRuntimeFactoryProtocol :
278290 return MockLlamaIndexFactory (context )
279291
@@ -294,11 +306,13 @@ def test_auto_detect_uipath_json(clean_registry, temp_dir):
294306
295307 def create_functions (
296308 context : UiPathRuntimeContext | None = None ,
309+ trace_manager : UiPathTraceManager | None = None ,
297310 ) -> UiPathRuntimeFactoryProtocol :
298311 return MockFunctionsFactory (context )
299312
300313 def create_langgraph (
301314 context : UiPathRuntimeContext | None = None ,
315+ trace_manager : UiPathTraceManager | None = None ,
302316 ) -> UiPathRuntimeFactoryProtocol :
303317 return MockLangGraphFactory (context )
304318
@@ -319,11 +333,13 @@ def test_fallback_to_default(clean_registry, temp_dir):
319333
320334 def create_functions (
321335 context : UiPathRuntimeContext | None = None ,
336+ trace_manager : UiPathTraceManager | None = None ,
322337 ) -> UiPathRuntimeFactoryProtocol :
323338 return MockFunctionsFactory (context )
324339
325340 def create_langgraph (
326341 context : UiPathRuntimeContext | None = None ,
342+ trace_manager : UiPathTraceManager | None = None ,
327343 ) -> UiPathRuntimeFactoryProtocol :
328344 return MockLangGraphFactory (context )
329345
@@ -342,6 +358,7 @@ def test_no_default_no_config_raises_error(clean_registry, temp_dir):
342358
343359 def create_factory (
344360 context : UiPathRuntimeContext | None = None ,
361+ trace_manager : UiPathTraceManager | None = None ,
345362 ) -> UiPathRuntimeFactoryProtocol :
346363 return MockFunctionsFactory (context )
347364
@@ -358,11 +375,13 @@ def test_priority_langgraph_over_uipath(clean_registry, temp_dir):
358375
359376 def create_functions (
360377 context : UiPathRuntimeContext | None = None ,
378+ trace_manager : UiPathTraceManager | None = None ,
361379 ) -> UiPathRuntimeFactoryProtocol :
362380 return MockFunctionsFactory (context )
363381
364382 def create_langgraph (
365383 context : UiPathRuntimeContext | None = None ,
384+ trace_manager : UiPathTraceManager | None = None ,
366385 ) -> UiPathRuntimeFactoryProtocol :
367386 return MockLangGraphFactory (context )
368387
@@ -385,6 +404,7 @@ async def test_factory_discover_entrypoints(clean_registry):
385404
386405 def create_factory (
387406 context : UiPathRuntimeContext | None = None ,
407+ trace_manager : UiPathTraceManager | None = None ,
388408 ) -> UiPathRuntimeFactoryProtocol :
389409 return MockLangGraphFactory (context )
390410
@@ -401,6 +421,7 @@ async def test_factory_create_runtime(clean_registry):
401421
402422 def create_factory (
403423 context : UiPathRuntimeContext | None = None ,
424+ trace_manager : UiPathTraceManager | None = None ,
404425 ) -> UiPathRuntimeFactoryProtocol :
405426 return MockLangGraphFactory (context )
406427
@@ -417,6 +438,7 @@ def test_get_all_returns_copy(clean_registry):
417438
418439 def create_factory (
419440 context : UiPathRuntimeContext | None = None ,
441+ trace_manager : UiPathTraceManager | None = None ,
420442 ) -> UiPathRuntimeFactoryProtocol :
421443 return MockFunctionsFactory (context )
422444
0 commit comments