File tree Expand file tree Collapse file tree 5 files changed +24
-6
lines changed
Expand file tree Collapse file tree 5 files changed +24
-6
lines changed Original file line number Diff line number Diff line change 11[project ]
22name = " uipath-runtime"
3- version = " 0.1.3 "
3+ version = " 0.2.0 "
44description = " Runtime abstractions and interfaces for building agents and automation scripts in the UiPath ecosystem"
55readme = { file = " README.md" , content-type = " text/markdown" }
66requires-python = " >=3.11"
Original file line number Diff line number Diff line change @@ -37,6 +37,10 @@ async def emit_breakpoint_hit(
3737 """Notify debugger that a breakpoint was hit."""
3838 ...
3939
40+ async def emit_interrupt_hit (self , result : UiPathRuntimeResult ) -> None :
41+ """Notify debugger that an interrupt was hit."""
42+ ...
43+
4044 async def emit_execution_completed (
4145 self ,
4246 runtime_result : UiPathRuntimeResult ,
Original file line number Diff line number Diff line change 2727)
2828from uipath .runtime .resumable .protocols import UiPathResumeTriggerReaderProtocol
2929from uipath .runtime .resumable .runtime import UiPathResumableRuntime
30- from uipath .runtime .resumable .trigger import UiPathResumeTrigger
30+ from uipath .runtime .resumable .trigger import (
31+ UiPathResumeTrigger ,
32+ UiPathResumeTriggerType ,
33+ )
3134from uipath .runtime .schema import UiPathRuntimeSchema
3235
3336logger = logging .getLogger (__name__ )
@@ -192,9 +195,19 @@ async def _stream_and_debug(
192195
193196 resume_data : dict [str , Any ] | None = None
194197 try :
195- resume_data = await self ._poll_trigger (
196- final_result .trigger , self .delegate .trigger_manager
197- )
198+ if (
199+ final_result .trigger .trigger_type
200+ == UiPathResumeTriggerType .API
201+ ):
202+ await self .debug_bridge .emit_interrupt_hit (event )
203+ resume_data = (
204+ await self .debug_bridge .wait_for_resume ()
205+ )
206+ else :
207+ resume_data = await self ._poll_trigger (
208+ final_result .trigger ,
209+ self .delegate .trigger_manager ,
210+ )
198211 except UiPathDebugQuitError :
199212 final_result = UiPathRuntimeResult (
200213 status = UiPathRuntimeStatus .SUCCESSFUL ,
Original file line number Diff line number Diff line change @@ -146,6 +146,7 @@ async def _handle_suspension(
146146
147147 suspended_result = UiPathRuntimeResult (
148148 status = UiPathRuntimeStatus .SUSPENDED ,
149+ output = result .output ,
149150 )
150151
151152 if result .output :
You can’t perform that action at this time.
0 commit comments