From 21e82107d2d1f15516d33aaf597d3fcf70456342 Mon Sep 17 00:00:00 2001 From: radu-mocanu Date: Fri, 20 Feb 2026 17:40:21 +0200 Subject: [PATCH 1/2] wip: uipath-platform --- pyproject.toml | 5 +- src/uipath/runtime/__init__.py | 10 ---- src/uipath/runtime/chat/protocol.py | 3 +- src/uipath/runtime/chat/runtime.py | 3 +- src/uipath/runtime/debug/runtime.py | 8 +-- src/uipath/runtime/result.py | 2 +- src/uipath/runtime/resumable/__init__.py | 8 --- src/uipath/runtime/resumable/protocols.py | 3 +- src/uipath/runtime/resumable/runtime.py | 3 +- src/uipath/runtime/resumable/trigger.py | 69 ----------------------- tests/test_chat.py | 3 +- tests/test_resumable.py | 3 +- uv.lock | 10 ++-- 13 files changed, 22 insertions(+), 108 deletions(-) delete mode 100644 src/uipath/runtime/resumable/trigger.py diff --git a/pyproject.toml b/pyproject.toml index ff6d5af..28eabe0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ description = "Runtime abstractions and interfaces for building agents and autom readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.11" dependencies = [ - "uipath-core>=0.5.0, <0.6.0", + "uipath-core==0.5.1.dev1000450222", ] classifiers = [ "Intended Audience :: Developers", @@ -106,3 +106,6 @@ name = "testpypi" url = "https://test.pypi.org/simple/" publish-url = "https://test.pypi.org/legacy/" explicit = true + +[tool.uv.sources] +uipath-core = { index = "testpypi" } diff --git a/src/uipath/runtime/__init__.py b/src/uipath/runtime/__init__.py index e088dfd..7a02064 100644 --- a/src/uipath/runtime/__init__.py +++ b/src/uipath/runtime/__init__.py @@ -33,12 +33,6 @@ from uipath.runtime.resumable.runtime import ( UiPathResumableRuntime, ) -from uipath.runtime.resumable.trigger import ( - UiPathApiTrigger, - UiPathResumeTrigger, - UiPathResumeTriggerName, - UiPathResumeTriggerType, -) from uipath.runtime.schema import UiPathRuntimeSchema from uipath.runtime.storage import UiPathRuntimeStorageProtocol @@ -58,16 +52,12 @@ "UiPathRuntimeSchema", "UiPathResumableStorageProtocol", "UiPathResumeTriggerProtocol", - "UiPathApiTrigger", - "UiPathResumeTrigger", - "UiPathResumeTriggerType", "UiPathResumableRuntime", "UiPathDebugQuitError", "UiPathDebugProtocol", "UiPathDebugRuntime", "UiPathBreakpointResult", "UiPathStreamNotSupportedError", - "UiPathResumeTriggerName", "UiPathChatProtocol", "UiPathChatRuntime", ] diff --git a/src/uipath/runtime/chat/protocol.py b/src/uipath/runtime/chat/protocol.py index f52294a..0946e2a 100644 --- a/src/uipath/runtime/chat/protocol.py +++ b/src/uipath/runtime/chat/protocol.py @@ -5,8 +5,7 @@ from uipath.core.chat import ( UiPathConversationMessageEvent, ) - -from uipath.runtime.resumable.trigger import UiPathResumeTrigger +from uipath.core.triggers import UiPathResumeTrigger class UiPathChatProtocol(Protocol): diff --git a/src/uipath/runtime/chat/runtime.py b/src/uipath/runtime/chat/runtime.py index 190a19d..037009e 100644 --- a/src/uipath/runtime/chat/runtime.py +++ b/src/uipath/runtime/chat/runtime.py @@ -3,6 +3,8 @@ import logging from typing import Any, AsyncGenerator, cast +from uipath.core.triggers import UiPathResumeTriggerType + from uipath.runtime.base import ( UiPathExecuteOptions, UiPathRuntimeProtocol, @@ -17,7 +19,6 @@ UiPathRuntimeResult, UiPathRuntimeStatus, ) -from uipath.runtime.resumable.trigger import UiPathResumeTriggerType from uipath.runtime.schema import UiPathRuntimeSchema logger = logging.getLogger(__name__) diff --git a/src/uipath/runtime/debug/runtime.py b/src/uipath/runtime/debug/runtime.py index 8e0393f..6bd56e2 100644 --- a/src/uipath/runtime/debug/runtime.py +++ b/src/uipath/runtime/debug/runtime.py @@ -5,6 +5,10 @@ from typing import Any, AsyncGenerator, cast from uipath.core.errors import UiPathPendingTriggerError +from uipath.core.triggers import ( + UiPathResumeTrigger, + UiPathResumeTriggerType, +) from uipath.runtime.base import ( UiPathExecuteOptions, @@ -27,10 +31,6 @@ ) from uipath.runtime.resumable.protocols import UiPathResumeTriggerReaderProtocol from uipath.runtime.resumable.runtime import UiPathResumableRuntime -from uipath.runtime.resumable.trigger import ( - UiPathResumeTrigger, - UiPathResumeTriggerType, -) from uipath.runtime.schema import UiPathRuntimeSchema logger = logging.getLogger(__name__) diff --git a/src/uipath/runtime/result.py b/src/uipath/runtime/result.py index 57159c8..66908f1 100644 --- a/src/uipath/runtime/result.py +++ b/src/uipath/runtime/result.py @@ -4,10 +4,10 @@ from typing import Any from pydantic import BaseModel, Field +from uipath.core.triggers import UiPathResumeTrigger from uipath.runtime.errors import UiPathErrorContract from uipath.runtime.events import UiPathRuntimeEvent, UiPathRuntimeEventType -from uipath.runtime.resumable.trigger import UiPathResumeTrigger class UiPathRuntimeStatus(str, Enum): diff --git a/src/uipath/runtime/resumable/__init__.py b/src/uipath/runtime/resumable/__init__.py index ee7f4e1..fc0817b 100644 --- a/src/uipath/runtime/resumable/__init__.py +++ b/src/uipath/runtime/resumable/__init__.py @@ -6,18 +6,10 @@ UiPathResumeTriggerProtocol, UiPathResumeTriggerReaderProtocol, ) -from uipath.runtime.resumable.trigger import ( - UiPathApiTrigger, - UiPathResumeTrigger, - UiPathResumeTriggerType, -) __all__ = [ "UiPathResumableStorageProtocol", "UiPathResumeTriggerCreatorProtocol", "UiPathResumeTriggerReaderProtocol", "UiPathResumeTriggerProtocol", - "UiPathResumeTrigger", - "UiPathResumeTriggerType", - "UiPathApiTrigger", ] diff --git a/src/uipath/runtime/resumable/protocols.py b/src/uipath/runtime/resumable/protocols.py index bef5750..7ce77c8 100644 --- a/src/uipath/runtime/resumable/protocols.py +++ b/src/uipath/runtime/resumable/protocols.py @@ -2,7 +2,8 @@ from typing import Any, Protocol -from uipath.runtime.resumable.trigger import UiPathResumeTrigger +from uipath.core.triggers import UiPathResumeTrigger + from uipath.runtime.storage import UiPathRuntimeStorageProtocol diff --git a/src/uipath/runtime/resumable/runtime.py b/src/uipath/runtime/resumable/runtime.py index b11f50c..bd1c059 100644 --- a/src/uipath/runtime/resumable/runtime.py +++ b/src/uipath/runtime/resumable/runtime.py @@ -4,6 +4,7 @@ from typing import Any, AsyncGenerator from uipath.core.errors import UiPathPendingTriggerError +from uipath.core.triggers import UiPathResumeTrigger, UiPathResumeTriggerType from uipath.runtime.base import ( UiPathExecuteOptions, @@ -16,12 +17,10 @@ UiPathRuntimeResult, UiPathRuntimeStatus, ) -from uipath.runtime.resumable import UiPathResumeTriggerType from uipath.runtime.resumable.protocols import ( UiPathResumableStorageProtocol, UiPathResumeTriggerProtocol, ) -from uipath.runtime.resumable.trigger import UiPathResumeTrigger from uipath.runtime.schema import UiPathRuntimeSchema logger = logging.getLogger(__name__) diff --git a/src/uipath/runtime/resumable/trigger.py b/src/uipath/runtime/resumable/trigger.py deleted file mode 100644 index 05ed88a..0000000 --- a/src/uipath/runtime/resumable/trigger.py +++ /dev/null @@ -1,69 +0,0 @@ -"""Module defining resume trigger types and data models.""" - -from enum import Enum -from typing import Any - -from pydantic import BaseModel, ConfigDict, Field - - -class UiPathResumeTriggerType(str, Enum): - """Constants representing different types of resume job triggers in the system.""" - - NONE = "None" - QUEUE_ITEM = "QueueItem" - JOB = "Job" - TASK = "Task" - TIMER = "Timer" - INBOX = "Inbox" - API = "Api" - DEEP_RAG = "DeepRag" - BATCH_RAG = "BatchRag" - INDEX_INGESTION = "IndexIngestion" - IXP_EXTRACTION = "IxpExtraction" - IXP_VS_ESCALATION = "IxpVsEscalation" - - -class UiPathResumeTriggerName(str, Enum): - """Constants representing specific names for resume job triggers in the system.""" - - UNKNOWN = "Unknown" - QUEUE_ITEM = "QueueItem" - JOB = "Job" - TASK = "Task" - ESCALATION = "Escalation" - TIMER = "Timer" - INBOX = "Inbox" - API = "Api" - DEEP_RAG = "DeepRag" - BATCH_RAG = "BatchRag" - INDEX_INGESTION = "IndexIngestion" - EXTRACTION = "Extraction" - IXP_VS_ESCALATION = "IxpVsEscalation" - - -class UiPathApiTrigger(BaseModel): - """API resume trigger request.""" - - inbox_id: str | None = Field(default=None, alias="inboxId") - request: Any = None - - model_config = ConfigDict(validate_by_name=True) - - -class UiPathResumeTrigger(BaseModel): - """Information needed to resume execution.""" - - interrupt_id: str | None = Field(default=None, alias="interruptId") - trigger_type: UiPathResumeTriggerType = Field( - default=UiPathResumeTriggerType.API, alias="triggerType" - ) - trigger_name: UiPathResumeTriggerName = Field( - default=UiPathResumeTriggerName.UNKNOWN, alias="triggerName", exclude=True - ) - item_key: str | None = Field(default=None, alias="itemKey") - api_resume: UiPathApiTrigger | None = Field(default=None, alias="apiResume") - folder_path: str | None = Field(default=None, alias="folderPath") - folder_key: str | None = Field(default=None, alias="folderKey") - payload: Any | None = Field(default=None, alias="interruptObject", exclude=True) - - model_config = ConfigDict(validate_by_name=True) diff --git a/tests/test_chat.py b/tests/test_chat.py index 78db976..8110ab8 100644 --- a/tests/test_chat.py +++ b/tests/test_chat.py @@ -10,11 +10,10 @@ UiPathConversationMessageEvent, UiPathConversationMessageStartEvent, ) +from uipath.core.triggers import UiPathResumeTrigger, UiPathResumeTriggerType from uipath.runtime import ( UiPathExecuteOptions, - UiPathResumeTrigger, - UiPathResumeTriggerType, UiPathRuntimeResult, UiPathRuntimeStatus, UiPathStreamOptions, diff --git a/tests/test_resumable.py b/tests/test_resumable.py index a46b7b9..5a14bf8 100644 --- a/tests/test_resumable.py +++ b/tests/test_resumable.py @@ -7,11 +7,10 @@ import pytest from uipath.core.errors import ErrorCategory, UiPathPendingTriggerError +from uipath.core.triggers import UiPathResumeTrigger, UiPathResumeTriggerType from uipath.runtime import ( UiPathExecuteOptions, - UiPathResumeTrigger, - UiPathResumeTriggerType, UiPathRuntimeResult, UiPathRuntimeStatus, UiPathStreamOptions, diff --git a/uv.lock b/uv.lock index b196060..8fb553e 100644 --- a/uv.lock +++ b/uv.lock @@ -991,16 +991,16 @@ wheels = [ [[package]] name = "uipath-core" -version = "0.5.0" -source = { registry = "https://pypi.org/simple" } +version = "0.5.1.dev1000450222" +source = { registry = "https://test.pypi.org/simple/" } dependencies = [ { name = "opentelemetry-instrumentation" }, { name = "opentelemetry-sdk" }, { name = "pydantic" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/c9/c2/afdf9b6500e5a026c4921dfce2c6f5c586b0114c9d006fd02b31a252c238/uipath_core-0.5.0.tar.gz", hash = "sha256:8035335a1b548475cca7dc99621be644fe0b63f8791c0f01fbb911295cefb143", size = 116691, upload-time = "2026-02-18T21:04:32.815Z" } +sdist = { url = "https://test-files.pythonhosted.org/packages/3e/49/04157b027c605b12f4b361ab642557b701c08049c95ce16944c182f7994d/uipath_core-0.5.1.dev1000450222.tar.gz", hash = "sha256:e0ad2fde6e186cf14ccfbdbe56e03a61abcc714237d1589dcb1eab50bb8ef75a", size = 123653, upload-time = "2026-02-20T12:50:51.905Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ef/b2/fa4b2c77f9fe8c794e1d47083654a32b9e0843e4e353f0df5650b719d189/uipath_core-0.5.0-py3-none-any.whl", hash = "sha256:ae8eb511a8228bdf0b42561eae772404e05431623c1be3cade16d5639fca9cac", size = 39403, upload-time = "2026-02-18T21:04:30.987Z" }, + { url = "https://test-files.pythonhosted.org/packages/28/57/3ae57e63b38946ba4fd717c489a9008f08fed7ac4fc0ed4d142b562937f5/uipath_core-0.5.1.dev1000450222-py3-none-any.whl", hash = "sha256:27d3ee0fd294ca66dde98d2d3dc378ded4c717d054425a4a988f4c01c49e4880", size = 44971, upload-time = "2026-02-20T12:50:53.292Z" }, ] [[package]] @@ -1027,7 +1027,7 @@ dev = [ ] [package.metadata] -requires-dist = [{ name = "uipath-core", specifier = ">=0.5.0,<0.6.0" }] +requires-dist = [{ name = "uipath-core", specifier = "==0.5.1.dev1000450222", index = "https://test.pypi.org/simple/" }] [package.metadata.requires-dev] dev = [ From 8a41bc568985e49de30f73581532b66367b46c14 Mon Sep 17 00:00:00 2001 From: radu-mocanu Date: Fri, 20 Feb 2026 17:51:13 +0200 Subject: [PATCH 2/2] wip: uipath-platform --- pyproject.toml | 2 +- uv.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 28eabe0..e7e3b77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ description = "Runtime abstractions and interfaces for building agents and autom readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.11" dependencies = [ - "uipath-core==0.5.1.dev1000450222", + "uipath-core==0.5.1.dev1000450224", ] classifiers = [ "Intended Audience :: Developers", diff --git a/uv.lock b/uv.lock index 8fb553e..d53bed2 100644 --- a/uv.lock +++ b/uv.lock @@ -991,16 +991,16 @@ wheels = [ [[package]] name = "uipath-core" -version = "0.5.1.dev1000450222" +version = "0.5.1.dev1000450224" source = { registry = "https://test.pypi.org/simple/" } dependencies = [ { name = "opentelemetry-instrumentation" }, { name = "opentelemetry-sdk" }, { name = "pydantic" }, ] -sdist = { url = "https://test-files.pythonhosted.org/packages/3e/49/04157b027c605b12f4b361ab642557b701c08049c95ce16944c182f7994d/uipath_core-0.5.1.dev1000450222.tar.gz", hash = "sha256:e0ad2fde6e186cf14ccfbdbe56e03a61abcc714237d1589dcb1eab50bb8ef75a", size = 123653, upload-time = "2026-02-20T12:50:51.905Z" } +sdist = { url = "https://test-files.pythonhosted.org/packages/d5/db/ee198b6578e5387b51987a58e559653ab06788ca488b4850a2f3998fe7cf/uipath_core-0.5.1.dev1000450224.tar.gz", hash = "sha256:72b6f6c88d08d81fb8ebb35a83f52d3606cbbca55225bfd530f821d143a3a5b5", size = 117921, upload-time = "2026-02-20T15:41:21.871Z" } wheels = [ - { url = "https://test-files.pythonhosted.org/packages/28/57/3ae57e63b38946ba4fd717c489a9008f08fed7ac4fc0ed4d142b562937f5/uipath_core-0.5.1.dev1000450222-py3-none-any.whl", hash = "sha256:27d3ee0fd294ca66dde98d2d3dc378ded4c717d054425a4a988f4c01c49e4880", size = 44971, upload-time = "2026-02-20T12:50:53.292Z" }, + { url = "https://test-files.pythonhosted.org/packages/56/be/86d133e2da74bd79c19695eadacfd6ad69175bdf6aaf77f7489cdbcd237f/uipath_core-0.5.1.dev1000450224-py3-none-any.whl", hash = "sha256:3a7ceb5cbbd3e367e3a8c1cd22289dc4f3ee95a87294e2ac91bc74b396c4af61", size = 41135, upload-time = "2026-02-20T15:41:20.506Z" }, ] [[package]] @@ -1027,7 +1027,7 @@ dev = [ ] [package.metadata] -requires-dist = [{ name = "uipath-core", specifier = "==0.5.1.dev1000450222", index = "https://test.pypi.org/simple/" }] +requires-dist = [{ name = "uipath-core", specifier = "==0.5.1.dev1000450224", index = "https://test.pypi.org/simple/" }] [package.metadata.requires-dev] dev = [