33from typing import Any , AsyncGenerator , Optional , cast
44
55import pytest
6+ from uipath .core .tracing import UiPathTraceManager
67
78from uipath .runtime import (
89 UiPathExecuteOptions ,
@@ -207,6 +208,7 @@ def test_get_factory_by_name(clean_registry):
207208
208209 def create_factory (
209210 context : UiPathRuntimeContext | None = None ,
211+ trace_manager : UiPathTraceManager | None = None ,
210212 ) -> UiPathRuntimeFactoryProtocol :
211213 return MockLangGraphFactory (context )
212214
@@ -222,6 +224,7 @@ def test_get_factory_by_name_with_context(clean_registry):
222224
223225 def create_factory (
224226 context : UiPathRuntimeContext | None = None ,
227+ trace_manager : UiPathTraceManager | None = None ,
225228 ) -> UiPathRuntimeFactoryProtocol :
226229 return MockLangGraphFactory (context )
227230
@@ -244,11 +247,13 @@ def test_auto_detect_langgraph_json(clean_registry, temp_dir):
244247
245248 def create_functions (
246249 context : UiPathRuntimeContext | None = None ,
250+ trace_manager : UiPathTraceManager | None = None ,
247251 ) -> UiPathRuntimeFactoryProtocol :
248252 return MockFunctionsFactory (context )
249253
250254 def create_langgraph (
251255 context : UiPathRuntimeContext | None = None ,
256+ trace_manager : UiPathTraceManager | None = None ,
252257 ) -> UiPathRuntimeFactoryProtocol :
253258 return MockLangGraphFactory (context )
254259
@@ -269,11 +274,13 @@ def test_auto_detect_llamaindex_json(clean_registry, temp_dir):
269274
270275 def create_functions (
271276 context : UiPathRuntimeContext | None = None ,
277+ trace_manager : UiPathTraceManager | None = None ,
272278 ) -> UiPathRuntimeFactoryProtocol :
273279 return MockFunctionsFactory (context )
274280
275281 def create_llamaindex (
276282 context : UiPathRuntimeContext | None = None ,
283+ trace_manager : UiPathTraceManager | None = None ,
277284 ) -> UiPathRuntimeFactoryProtocol :
278285 return MockLlamaIndexFactory (context )
279286
@@ -294,11 +301,13 @@ def test_auto_detect_uipath_json(clean_registry, temp_dir):
294301
295302 def create_functions (
296303 context : UiPathRuntimeContext | None = None ,
304+ trace_manager : UiPathTraceManager | None = None ,
297305 ) -> UiPathRuntimeFactoryProtocol :
298306 return MockFunctionsFactory (context )
299307
300308 def create_langgraph (
301309 context : UiPathRuntimeContext | None = None ,
310+ trace_manager : UiPathTraceManager | None = None ,
302311 ) -> UiPathRuntimeFactoryProtocol :
303312 return MockLangGraphFactory (context )
304313
@@ -319,11 +328,13 @@ def test_fallback_to_default(clean_registry, temp_dir):
319328
320329 def create_functions (
321330 context : UiPathRuntimeContext | None = None ,
331+ trace_manager : UiPathTraceManager | None = None ,
322332 ) -> UiPathRuntimeFactoryProtocol :
323333 return MockFunctionsFactory (context )
324334
325335 def create_langgraph (
326336 context : UiPathRuntimeContext | None = None ,
337+ trace_manager : UiPathTraceManager | None = None ,
327338 ) -> UiPathRuntimeFactoryProtocol :
328339 return MockLangGraphFactory (context )
329340
@@ -342,6 +353,7 @@ def test_no_default_no_config_raises_error(clean_registry, temp_dir):
342353
343354 def create_factory (
344355 context : UiPathRuntimeContext | None = None ,
356+ trace_manager : UiPathTraceManager | None = None ,
345357 ) -> UiPathRuntimeFactoryProtocol :
346358 return MockFunctionsFactory (context )
347359
@@ -358,11 +370,13 @@ def test_priority_langgraph_over_uipath(clean_registry, temp_dir):
358370
359371 def create_functions (
360372 context : UiPathRuntimeContext | None = None ,
373+ trace_manager : UiPathTraceManager | None = None ,
361374 ) -> UiPathRuntimeFactoryProtocol :
362375 return MockFunctionsFactory (context )
363376
364377 def create_langgraph (
365378 context : UiPathRuntimeContext | None = None ,
379+ trace_manager : UiPathTraceManager | None = None ,
366380 ) -> UiPathRuntimeFactoryProtocol :
367381 return MockLangGraphFactory (context )
368382
@@ -385,6 +399,7 @@ async def test_factory_discover_entrypoints(clean_registry):
385399
386400 def create_factory (
387401 context : UiPathRuntimeContext | None = None ,
402+ trace_manager : UiPathTraceManager | None = None ,
388403 ) -> UiPathRuntimeFactoryProtocol :
389404 return MockLangGraphFactory (context )
390405
@@ -401,6 +416,7 @@ async def test_factory_create_runtime(clean_registry):
401416
402417 def create_factory (
403418 context : UiPathRuntimeContext | None = None ,
419+ trace_manager : UiPathTraceManager | None = None ,
404420 ) -> UiPathRuntimeFactoryProtocol :
405421 return MockLangGraphFactory (context )
406422
@@ -417,6 +433,7 @@ def test_get_all_returns_copy(clean_registry):
417433
418434 def create_factory (
419435 context : UiPathRuntimeContext | None = None ,
436+ trace_manager : UiPathTraceManager | None = None ,
420437 ) -> UiPathRuntimeFactoryProtocol :
421438 return MockFunctionsFactory (context )
422439
0 commit comments