From 0be010e5470d9b6152da4f9080bed724a1b5b2b6 Mon Sep 17 00:00:00 2001 From: radu-mocanu Date: Wed, 29 Apr 2026 11:04:04 +0300 Subject: [PATCH] chore: remove interrupt event shims and bump uipath-core to 0.6.0 --- packages/uipath-core/pyproject.toml | 2 +- .../src/uipath/core/chat/__init__.py | 27 ---- .../src/uipath/core/chat/interrupt.py | 122 ------------------ packages/uipath-core/uv.lock | 2 +- packages/uipath-platform/pyproject.toml | 2 +- packages/uipath-platform/uv.lock | 2 +- packages/uipath/pyproject.toml | 2 +- 7 files changed, 5 insertions(+), 154 deletions(-) delete mode 100644 packages/uipath-core/src/uipath/core/chat/interrupt.py diff --git a/packages/uipath-core/pyproject.toml b/packages/uipath-core/pyproject.toml index 7e559c9a4..07cbeb746 100644 --- a/packages/uipath-core/pyproject.toml +++ b/packages/uipath-core/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "uipath-core" -version = "0.5.14" +version = "0.6.0" description = "UiPath Core abstractions" readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.11" diff --git a/packages/uipath-core/src/uipath/core/chat/__init__.py b/packages/uipath-core/src/uipath/core/chat/__init__.py index 77fa6cbee..d81fa8153 100644 --- a/packages/uipath-core/src/uipath/core/chat/__init__.py +++ b/packages/uipath-core/src/uipath/core/chat/__init__.py @@ -77,20 +77,6 @@ UiPathConversationExchangeEvent, UiPathConversationExchangeStartEvent, ) -from .interrupt import ( - InterruptTypeEnum, - UiPathConversationGenericInterruptEndEvent, - UiPathConversationGenericInterruptStartEvent, - UiPathConversationInterrupt, - UiPathConversationInterruptData, - UiPathConversationInterruptEndEvent, - UiPathConversationInterruptEvent, - UiPathConversationInterruptStartEvent, - UiPathConversationToolCallConfirmationEndValue, - UiPathConversationToolCallConfirmationInterruptEndEvent, - UiPathConversationToolCallConfirmationInterruptStartEvent, - UiPathConversationToolCallConfirmationValue, -) from .message import ( UiPathConversationMessage, UiPathConversationMessageData, @@ -191,17 +177,4 @@ "UiPathVoiceToolCallRequest", "UiPathVoiceToolCallMessage", "UiPathVoiceToolCallResult", - # Interrupt (compat shims — deprecated, see interrupt.py) - "InterruptTypeEnum", - "UiPathConversationInterruptStartEvent", - "UiPathConversationInterruptEndEvent", - "UiPathConversationInterruptEvent", - "UiPathConversationInterruptData", - "UiPathConversationInterrupt", - "UiPathConversationGenericInterruptStartEvent", - "UiPathConversationGenericInterruptEndEvent", - "UiPathConversationToolCallConfirmationValue", - "UiPathConversationToolCallConfirmationEndValue", - "UiPathConversationToolCallConfirmationInterruptStartEvent", - "UiPathConversationToolCallConfirmationInterruptEndEvent", ] diff --git a/packages/uipath-core/src/uipath/core/chat/interrupt.py b/packages/uipath-core/src/uipath/core/chat/interrupt.py deleted file mode 100644 index 9094d1597..000000000 --- a/packages/uipath-core/src/uipath/core/chat/interrupt.py +++ /dev/null @@ -1,122 +0,0 @@ -"""Compatibility shims for legacy interrupt event types. - -The interrupt-based tool-call confirmation flow was replaced by `confirmToolCall` -on the tool call event itself (see PR #1558). The original `interrupt.py` was -removed in `uipath-core` 0.5.13, but published `uipath-runtime` versions still -import these names at module load time, breaking installs that pull the new -`uipath-core` alongside an older runtime. - -These shims keep those imports working. They are not used by current code paths -and should be removed in the next minor bump of `uipath-core`. -""" - -from enum import Enum -from typing import Any, Literal, Union - -from pydantic import BaseModel, ConfigDict, Field - - -class InterruptTypeEnum(str, Enum): - """Enum of known interrupt types.""" - - TOOL_CALL_CONFIRMATION = "uipath_cas_tool_call_confirmation" - - -class UiPathConversationToolCallConfirmationValue(BaseModel): - """Schema for tool call confirmation interrupt value.""" - - tool_call_id: str = Field(..., alias="toolCallId") - tool_name: str = Field(..., alias="toolName") - input_schema: Any = Field(..., alias="inputSchema") - input_value: Any | None = Field(None, alias="inputValue") - - model_config = ConfigDict(validate_by_name=True, validate_by_alias=True) - - -class UiPathConversationToolCallConfirmationInterruptStartEvent(BaseModel): - """Tool call confirmation interrupt start event with strong typing.""" - - type: Literal["uipath_cas_tool_call_confirmation"] - value: UiPathConversationToolCallConfirmationValue - - model_config = ConfigDict(validate_by_name=True, validate_by_alias=True) - - -class UiPathConversationGenericInterruptStartEvent(BaseModel): - """Generic interrupt start event for custom interrupt types.""" - - type: str - value: Any - - model_config = ConfigDict(validate_by_name=True, validate_by_alias=True) - - -UiPathConversationInterruptStartEvent = Union[ - UiPathConversationToolCallConfirmationInterruptStartEvent, - UiPathConversationGenericInterruptStartEvent, -] - - -class UiPathConversationToolCallConfirmationEndValue(BaseModel): - """Schema for tool call confirmation end value.""" - - approved: bool - input: Any | None = None - - model_config = ConfigDict(validate_by_name=True, validate_by_alias=True) - - -class UiPathConversationToolCallConfirmationInterruptEndEvent(BaseModel): - """Tool call confirmation interrupt end event with strong typing.""" - - type: Literal["uipath_cas_tool_call_confirmation"] - value: UiPathConversationToolCallConfirmationEndValue - - model_config = ConfigDict(validate_by_name=True, validate_by_alias=True) - - -class UiPathConversationGenericInterruptEndEvent(BaseModel): - """Generic interrupt end event for custom interrupt types.""" - - type: str - value: Any - - model_config = ConfigDict(validate_by_name=True, validate_by_alias=True) - - -UiPathConversationInterruptEndEvent = Union[ - UiPathConversationToolCallConfirmationInterruptEndEvent, - UiPathConversationGenericInterruptEndEvent, -] - - -class UiPathConversationInterruptEvent(BaseModel): - """Encapsulates interrupt-related events within a message.""" - - interrupt_id: str = Field(..., alias="interruptId") - start: UiPathConversationInterruptStartEvent | None = Field( - None, alias="startInterrupt" - ) - end: UiPathConversationInterruptEndEvent | None = Field(None, alias="endInterrupt") - - model_config = ConfigDict(validate_by_name=True, validate_by_alias=True) - - -class UiPathConversationInterruptData(BaseModel): - """Core data of an interrupt within a message.""" - - type: str - interrupt_value: Any = Field(..., alias="interruptValue") - end_value: Any | None = Field(None, alias="endValue") - - model_config = ConfigDict(validate_by_name=True, validate_by_alias=True) - - -class UiPathConversationInterrupt(UiPathConversationInterruptData): - """An interrupt within a message — a pause point where the agent needs external input.""" - - interrupt_id: str = Field(..., alias="interruptId") - created_at: str = Field(..., alias="createdAt") - updated_at: str = Field(..., alias="updatedAt") - - model_config = ConfigDict(validate_by_name=True, validate_by_alias=True) diff --git a/packages/uipath-core/uv.lock b/packages/uipath-core/uv.lock index 61159a1d5..5f97178dd 100644 --- a/packages/uipath-core/uv.lock +++ b/packages/uipath-core/uv.lock @@ -1007,7 +1007,7 @@ wheels = [ [[package]] name = "uipath-core" -version = "0.5.14" +version = "0.6.0" source = { editable = "." } dependencies = [ { name = "opentelemetry-instrumentation" }, diff --git a/packages/uipath-platform/pyproject.toml b/packages/uipath-platform/pyproject.toml index 59585688f..af16eee47 100644 --- a/packages/uipath-platform/pyproject.toml +++ b/packages/uipath-platform/pyproject.toml @@ -8,7 +8,7 @@ dependencies = [ "httpx>=0.28.1", "tenacity>=9.0.0", "truststore>=0.10.1", - "uipath-core>=0.5.8, <0.6.0", + "uipath-core>=0.6.0, <0.7.0", "pydantic-function-models>=0.1.11", "sqlparse>=0.5.5", ] diff --git a/packages/uipath-platform/uv.lock b/packages/uipath-platform/uv.lock index 415634498..6749d78b0 100644 --- a/packages/uipath-platform/uv.lock +++ b/packages/uipath-platform/uv.lock @@ -1056,7 +1056,7 @@ wheels = [ [[package]] name = "uipath-core" -version = "0.5.14" +version = "0.6.0" source = { editable = "../uipath-core" } dependencies = [ { name = "opentelemetry-instrumentation" }, diff --git a/packages/uipath/pyproject.toml b/packages/uipath/pyproject.toml index c6a998262..0ce7d587c 100644 --- a/packages/uipath/pyproject.toml +++ b/packages/uipath/pyproject.toml @@ -5,7 +5,7 @@ description = "Python SDK and CLI for UiPath Platform, enabling programmatic int readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.11" dependencies = [ - "uipath-core>=0.5.8, <0.6.0", + "uipath-core>=0.6.0, <0.7.0", "uipath-runtime>=0.10.1, <0.11.0", "uipath-platform>=0.1.39, <0.2.0", "click>=8.3.1",