From 6cbd0824fae9f39fa15d861f8d75ace8d96e5607 Mon Sep 17 00:00:00 2001 From: Cristian Pufu Date: Sun, 25 Jan 2026 17:32:44 +0200 Subject: [PATCH] fix: update runtime contracts --- pyproject.toml | 6 ++--- src/uipath_langchain/runtime/factory.py | 29 ++++++++++--------------- uv.lock | 24 ++++++++++---------- 3 files changed, 27 insertions(+), 32 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9e50c3a8..adb9af55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,12 @@ [project] name = "uipath-langchain" -version = "0.4.29" +version = "0.5.0" description = "Python SDK that enables developers to build and deploy LangGraph agents to the UiPath Cloud Platform" readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.11" dependencies = [ - "uipath>=2.5.29,<2.6.0", - "uipath-runtime>=0.5.1,<0.6.0", + "uipath>=2.6.0,<2.7.0", + "uipath-runtime>=0.6.0, <0.7.0", "langgraph>=1.0.0, <2.0.0", "langchain-core>=1.2.5, <2.0.0", "aiosqlite==0.21.0", diff --git a/src/uipath_langchain/runtime/factory.py b/src/uipath_langchain/runtime/factory.py index 3c098baf..88a85bda 100644 --- a/src/uipath_langchain/runtime/factory.py +++ b/src/uipath_langchain/runtime/factory.py @@ -16,7 +16,9 @@ from uipath.runtime import ( UiPathResumableRuntime, UiPathRuntimeContext, + UiPathRuntimeFactorySettings, UiPathRuntimeProtocol, + UiPathRuntimeStorageProtocol, ) from uipath.runtime.errors import UiPathErrorCategory @@ -228,28 +230,21 @@ def discover_entrypoints(self) -> list[str]: return [] return config.entrypoints - async def discover_runtimes(self) -> list[UiPathRuntimeProtocol]: + async def get_settings(self) -> UiPathRuntimeFactorySettings | None: """ - Discover runtime instances for all entrypoints. + Get the factory settings. + """ + return None + + async def get_storage(self) -> UiPathRuntimeStorageProtocol | None: + """ + Get the runtime storage protocol instance. Returns: - List of LangGraphRuntime instances, one per entrypoint + The storage protocol instance """ - entrypoints = self.discover_entrypoints() memory = await self._get_memory() - - runtimes: list[UiPathRuntimeProtocol] = [] - for entrypoint in entrypoints: - compiled_graph = await self._resolve_and_compile_graph(entrypoint, memory) - - runtime = await self._create_runtime_instance( - compiled_graph=compiled_graph, - runtime_id=entrypoint, - entrypoint=entrypoint, - ) - runtimes.append(runtime) - - return runtimes + return SqliteResumableStorage(memory) async def _create_runtime_instance( self, diff --git a/uv.lock b/uv.lock index 401dd4d3..9b3c3417 100644 --- a/uv.lock +++ b/uv.lock @@ -3255,7 +3255,7 @@ wheels = [ [[package]] name = "uipath" -version = "2.5.29" +version = "2.6.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "applicationinsights" }, @@ -3276,28 +3276,28 @@ dependencies = [ { name = "uipath-core" }, { name = "uipath-runtime" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/1d/65/a2b18bbeacdbc399cf0bdfcb50fb406706ea88729bed9f3a7e33531a02c5/uipath-2.5.29.tar.gz", hash = "sha256:29f9e3ada60efd366d8f512af9657bd72348e331ee9ee796f910090d297c7b38", size = 3898571, upload-time = "2026-01-22T16:17:25.798Z" } +sdist = { url = "https://files.pythonhosted.org/packages/0c/9f/3b419a3397a8eac404062d98f4a64ccf421187c8b9f35f344cbff1307124/uipath-2.6.0.tar.gz", hash = "sha256:fbbd18b1c940a63b0541a96ad8181708c7c0a708838f2f0a0779de91244b2fc8", size = 3904808, upload-time = "2026-01-25T15:29:56.032Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/07/9b/eb6d13e1145fbb935198afc3a2060b7c3ff0e3eaf556507464afebc66aa5/uipath-2.5.29-py3-none-any.whl", hash = "sha256:eb7235e9ee6e1001efcf5d28bce8e9c639221beb7b4a0398ee29c56f8f2a7886", size = 449778, upload-time = "2026-01-22T16:17:23.344Z" }, + { url = "https://files.pythonhosted.org/packages/6b/2f/9e25ea4d91286e53d7d7934e85e6efa5bacfacbe7e69d5baa5b26d9f6429/uipath-2.6.0-py3-none-any.whl", hash = "sha256:f1f4fe7a3c5c20d75aef88c51c95f2f4af92ea736a1a1e0f8f95f4dece1cdac4", size = 449292, upload-time = "2026-01-25T15:29:53.506Z" }, ] [[package]] name = "uipath-core" -version = "0.1.10" +version = "0.2.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "opentelemetry-instrumentation" }, { name = "opentelemetry-sdk" }, { name = "pydantic" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/2e/25/9d1cca53005e103ed8d13ccc9193498a41f4c9ba19b59e6a896c2a96b7e8/uipath_core-0.1.10.tar.gz", hash = "sha256:2fe7db7c4a6d4ff7845ed5448cae05c9c819dc0ae020758ea54fe2768877b247", size = 101413, upload-time = "2026-01-21T13:19:12.59Z" } +sdist = { url = "https://files.pythonhosted.org/packages/9a/4f/9bf150a21b6af8b56edf7fbca46827806570eab5b37f90c2b76180cf1e79/uipath_core-0.2.0.tar.gz", hash = "sha256:950427fe7921a67468416856faf63192cf717d8adce092d706b070c487f0c076", size = 103072, upload-time = "2026-01-25T11:59:10.871Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/1f/82/7623a3b73b6e3afa8db0375197ef0b1e1ceb85c2c363d4be3907692692a0/uipath_core-0.1.10-py3-none-any.whl", hash = "sha256:041c0379e18ac29cda149a6db8fa97268b24f0d504b41fb2c64d0db71a8d640e", size = 31968, upload-time = "2026-01-21T13:19:11.29Z" }, + { url = "https://files.pythonhosted.org/packages/e8/43/f61f6aace058d61dfa11e3c2116b06f0bc15c45d9d201bf432902f54018f/uipath_core-0.2.0-py3-none-any.whl", hash = "sha256:bb5366bfca7ec4611f91a0035df194a56eef11f447313491557e131e6090f5e6", size = 32826, upload-time = "2026-01-25T11:59:09.203Z" }, ] [[package]] name = "uipath-langchain" -version = "0.4.29" +version = "0.5.0" source = { editable = "." } dependencies = [ { name = "aiosqlite" }, @@ -3364,8 +3364,8 @@ requires-dist = [ { name = "openinference-instrumentation-langchain", specifier = ">=0.1.56" }, { name = "pydantic-settings", specifier = ">=2.6.0" }, { name = "python-dotenv", specifier = ">=1.0.1" }, - { name = "uipath", specifier = ">=2.5.29,<2.6.0" }, - { name = "uipath-runtime", specifier = ">=0.5.1,<0.6.0" }, + { name = "uipath", specifier = ">=2.6.0,<2.7.0" }, + { name = "uipath-runtime", specifier = ">=0.6.0,<0.7.0" }, ] provides-extras = ["vertex", "bedrock"] @@ -3387,14 +3387,14 @@ dev = [ [[package]] name = "uipath-runtime" -version = "0.5.1" +version = "0.6.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "uipath-core" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/a8/ce/d59fb6213c5a0d2efef0f2fa8274052187512d5e12703f6fd2fa5a66f132/uipath_runtime-0.5.1.tar.gz", hash = "sha256:04e649d07fc8caed134eec69ac6544eb6aa46ddf5bbc1b2191f2d599d627fd58", size = 103226, upload-time = "2026-01-17T00:16:43.961Z" } +sdist = { url = "https://files.pythonhosted.org/packages/f9/e3/eb104949fd2bcd2a96870ca3ebda0229f23ff3768db3b6c1e0f33864283c/uipath_runtime-0.6.0.tar.gz", hash = "sha256:3b000ffe72ab2126ba6fa9f818220e35f60ea120412a8bbd2e18119b4b730184", size = 103627, upload-time = "2026-01-25T15:19:04.653Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/7c/cf/ddc5251090b640f11d7be85a6e7b78e95133d024ecd580e5f9dd20e3bc8e/uipath_runtime-0.5.1-py3-none-any.whl", hash = "sha256:0335326430952f31f30a79a989a93a9ad56bd8a69664539ecabd325fd1ac4adc", size = 40209, upload-time = "2026-01-17T00:16:42.3Z" }, + { url = "https://files.pythonhosted.org/packages/62/d1/2207f96ee870ca2fd1a76ec5c4ae864f55813f4562adab606cd9d30f4b35/uipath_runtime-0.6.0-py3-none-any.whl", hash = "sha256:cb78420475fa355d57c98fcbe731b5c8213a44cdc886b14ee2ed7fd78da0d7a8", size = 40764, upload-time = "2026-01-25T15:19:02.819Z" }, ] [[package]]