@@ -86,13 +86,10 @@ def get_run(self, run_id: str) -> ExecutionRun | None:
8686 return self .runs .get (run_id )
8787
8888 async def execute (self , run : ExecutionRun ) -> None :
89- """Execute or resume a run.
90-
91- This is the extracted version of the old `_execute_runtime` method.
92- """
89+ """Execute or resume a run."""
9390 new_runtime : UiPathRuntimeProtocol | None = None
9491 try :
95- execution_input : dict [str , Any ] | None = {}
92+ execution_input : dict [str , Any ] | str | None = {}
9693 execution_options : UiPathExecuteOptions = UiPathExecuteOptions ()
9794
9895 if run .status == "suspended" :
@@ -179,14 +176,15 @@ async def execute(self, run: ExecutionRun) -> None:
179176 ):
180177 run .status = "suspended"
181178 else :
182- if result .output is None :
183- run .output_data = {}
184- elif isinstance (result .output , BaseModel ):
185- run .output_data = result .output .model_dump ()
186- else :
187- run .output_data = result .output
188179 run .status = "completed"
189180
181+ if result .output is None :
182+ run .output_data = {}
183+ elif isinstance (result .output , BaseModel ):
184+ run .output_data = result .output .model_dump ()
185+ else :
186+ run .output_data = result .output
187+
190188 if run .output_data :
191189 self ._add_info_log (run , f"Execution result: { run .output_data } " )
192190
@@ -218,6 +216,14 @@ async def execute(self, run: ExecutionRun) -> None:
218216 if run .id in self .debug_bridges :
219217 del self .debug_bridges [run .id ]
220218
219+ async def resume_debug (self , run : ExecutionRun , resume_data : Any ) -> None :
220+ """Resume debug execution from a breakpoint."""
221+ debug_bridge = self .debug_bridges .get (run .id )
222+ if debug_bridge :
223+ run .status = "running"
224+ self ._emit_run_updated (run )
225+ debug_bridge .resume (resume_data )
226+
221227 def step_debug (self , run : ExecutionRun ) -> None :
222228 """Step to next breakpoint in debug mode."""
223229 debug_bridge = self .debug_bridges .get (run .id )
@@ -227,7 +233,7 @@ def step_debug(self, run: ExecutionRun) -> None:
227233 # Resume execution (will pause at next node)
228234 run .status = "running"
229235 self ._emit_run_updated (run )
230- debug_bridge .resume ()
236+ debug_bridge .resume (resume_data = {} )
231237
232238 def continue_debug (self , run : ExecutionRun ) -> None :
233239 """Continue execution without stopping at breakpoints."""
@@ -238,7 +244,7 @@ def continue_debug(self, run: ExecutionRun) -> None:
238244 # Resume execution
239245 run .status = "running"
240246 self ._emit_run_updated (run )
241- debug_bridge .resume ()
247+ debug_bridge .resume (resume_data = {} )
242248
243249 def stop_debug (self , run : ExecutionRun ) -> None :
244250 """Stop debug execution."""
0 commit comments