Skip to main content

Module runner_lifecycle

Module runner_lifecycle 

Source
Expand description

Runner lifecycle helpers for background agent execution.

Provides shared implementations for:

  • Runner reservation (check existing → create new with cancel token)
  • Runner finalization (map execution result to AgentStatus)
  • Status mapping

Structs§

RunnerReservation
Reservation result from reserve_runner_core / try_reserve_runner.

Enums§

ReserveOutcome
Outcome of the shared reservation core.

Functions§

finalize_runner
Update a runner’s terminal status and completion timestamp.
reserve_runner_core
Shared runner-reservation core used by BOTH the server’s reserve_runner and the engine’s try_reserve_runner, so the idle-eviction sender re-assert can never drift between the two paths again (#346).
status_from_execution_result
Map an execution result to AgentStatus.
try_reserve_runner
Try to reserve a runner for the given session.