Skip to content

Commit 5f1b95e

Browse files
chore: fix repo issues for minor increment
1 parent db127cd commit 5f1b95e

File tree

7 files changed

+20
-17
lines changed

7 files changed

+20
-17
lines changed

src/uipath/runtime/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from uipath.runtime.chat.runtime import UiPathChatRuntime
1212
from uipath.runtime.context import UiPathRuntimeContext
1313
from uipath.runtime.debug.breakpoint import UiPathBreakpointResult
14-
from uipath.runtime.debug.bridge import UiPathDebugBridgeProtocol
14+
from uipath.runtime.debug.bridge import UiPathDebugProtocol
1515
from uipath.runtime.debug.exception import UiPathDebugQuitError
1616
from uipath.runtime.debug.runtime import (
1717
UiPathDebugRuntime,
@@ -63,7 +63,7 @@
6363
"UiPathResumeTriggerType",
6464
"UiPathResumableRuntime",
6565
"UiPathDebugQuitError",
66-
"UiPathDebugBridgeProtocol",
66+
"UiPathDebugProtocol",
6767
"UiPathDebugRuntime",
6868
"UiPathBreakpointResult",
6969
"UiPathStreamNotSupportedError",
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
"""Initialization module for the debug package."""
22

33
from uipath.runtime.debug.breakpoint import UiPathBreakpointResult
4-
from uipath.runtime.debug.bridge import UiPathDebugBridgeProtocol
4+
from uipath.runtime.debug.bridge import UiPathDebugProtocol
55
from uipath.runtime.debug.exception import (
66
UiPathDebugQuitError,
77
)
88
from uipath.runtime.debug.runtime import UiPathDebugRuntime
99

1010
__all__ = [
1111
"UiPathDebugQuitError",
12-
"UiPathDebugBridgeProtocol",
12+
"UiPathDebugProtocol",
1313
"UiPathDebugRuntime",
1414
"UiPathBreakpointResult",
1515
]

src/uipath/runtime/debug/bridge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
)
1010

1111

12-
class UiPathDebugBridgeProtocol(Protocol):
12+
class UiPathDebugProtocol(Protocol):
1313
"""Abstract interface for debug communication.
1414
1515
Implementations: SignalR, Console, WebSocket, etc.

src/uipath/runtime/debug/runtime.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
)
1515
from uipath.runtime.debug import (
1616
UiPathBreakpointResult,
17-
UiPathDebugBridgeProtocol,
17+
UiPathDebugProtocol,
1818
UiPathDebugQuitError,
1919
)
2020
from uipath.runtime.events import (
@@ -42,7 +42,7 @@ class UiPathDebugRuntime:
4242
def __init__(
4343
self,
4444
delegate: UiPathRuntimeProtocol,
45-
debug_bridge: UiPathDebugBridgeProtocol,
45+
debug_bridge: UiPathDebugProtocol,
4646
trigger_poll_interval: float = 5.0,
4747
):
4848
"""Initialize the UiPathDebugRuntime.
@@ -54,7 +54,7 @@ def __init__(
5454
"""
5555
super().__init__()
5656
self.delegate = delegate
57-
self.debug_bridge: UiPathDebugBridgeProtocol = debug_bridge
57+
self.debug_bridge: UiPathDebugProtocol = debug_bridge
5858
if trigger_poll_interval < 0:
5959
raise ValueError("trigger_poll_interval must be >= 0")
6060
self.trigger_poll_interval = trigger_poll_interval

src/uipath/runtime/resumable/protocols.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class UiPathResumableStorageProtocol(Protocol):
99
"""Protocol for storing and retrieving resume triggers."""
1010

11-
async def save_trigger(self, trigger: UiPathResumeTrigger) -> None:
11+
async def save_trigger(self, runtime_id: str, trigger: UiPathResumeTrigger) -> None:
1212
"""Save a resume trigger to storage.
1313
1414
Args:
@@ -19,7 +19,7 @@ async def save_trigger(self, trigger: UiPathResumeTrigger) -> None:
1919
"""
2020
...
2121

22-
async def get_latest_trigger(self) -> UiPathResumeTrigger | None:
22+
async def get_latest_trigger(self, runtime_id: str) -> UiPathResumeTrigger | None:
2323
"""Retrieve the most recent resume trigger from storage.
2424
2525
Returns:

src/uipath/runtime/resumable/runtime.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,20 @@ def __init__(
3535
delegate: UiPathRuntimeProtocol,
3636
storage: UiPathResumableStorageProtocol,
3737
trigger_manager: UiPathResumeTriggerProtocol,
38+
runtime_id: str
3839
):
3940
"""Initialize the resumable runtime wrapper.
4041
4142
Args:
4243
delegate: The underlying runtime to wrap
4344
storage: Storage for persisting/retrieving resume triggers
4445
trigger_manager: Manager for creating and reading resume triggers
46+
runtime_id: Id used for runtime orchestration
4547
"""
4648
self.delegate = delegate
4749
self.storage = storage
4850
self.trigger_manager = trigger_manager
51+
self.runtime_id = runtime_id
4952

5053
async def execute(
5154
self,
@@ -115,7 +118,7 @@ async def _restore_resume_input(
115118
return input
116119

117120
# Otherwise, fetch from storage
118-
trigger = await self.storage.get_latest_trigger()
121+
trigger = await self.storage.get_latest_trigger(self.runtime_id)
119122
if not trigger:
120123
return None
121124

@@ -141,7 +144,7 @@ async def _handle_suspension(
141144

142145
# Check if trigger already exists in result
143146
if result.trigger:
144-
await self.storage.save_trigger(result.trigger)
147+
await self.storage.save_trigger(self.runtime_id, result.trigger)
145148
return result
146149

147150
suspended_result = UiPathRuntimeResult(
@@ -154,7 +157,7 @@ async def _handle_suspension(
154157
result.output
155158
)
156159

157-
await self.storage.save_trigger(suspended_result.trigger)
160+
await self.storage.save_trigger(self.runtime_id, suspended_result.trigger)
158161

159162
return suspended_result
160163

tests/test_debugger.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@
1717
UiPathStreamOptions,
1818
)
1919
from uipath.runtime.debug import (
20-
UiPathDebugBridgeProtocol,
20+
UiPathDebugProtocol,
2121
UiPathDebugQuitError,
2222
UiPathDebugRuntime,
2323
)
2424
from uipath.runtime.events import UiPathRuntimeEvent, UiPathRuntimeStateEvent
2525
from uipath.runtime.schema import UiPathRuntimeSchema
2626

2727

28-
def make_debug_bridge_mock() -> UiPathDebugBridgeProtocol:
28+
def make_debug_bridge_mock() -> UiPathDebugProtocol:
2929
"""Create a debug bridge mock with all methods that UiPathDebugRuntime uses.
3030
3131
We use `spec=UiPathDebugBridge` so invalid attributes raise at runtime,
3232
but still operate as a unittest.mock.Mock with AsyncMock methods.
3333
"""
34-
bridge_mock: Mock = Mock(spec=UiPathDebugBridgeProtocol)
34+
bridge_mock: Mock = Mock(spec=UiPathDebugProtocol)
3535

3636
bridge_mock.connect = AsyncMock()
3737
bridge_mock.disconnect = AsyncMock()
@@ -44,7 +44,7 @@ def make_debug_bridge_mock() -> UiPathDebugBridgeProtocol:
4444

4545
bridge_mock.get_breakpoints = Mock(return_value=["node-1"])
4646

47-
return cast(UiPathDebugBridgeProtocol, bridge_mock)
47+
return cast(UiPathDebugProtocol, bridge_mock)
4848

4949

5050
class StreamingMockRuntime:

0 commit comments

Comments
 (0)