pub struct WorkflowRunEngine { /* private fields */ }Implementations§
Source§impl WorkflowRunEngine
impl WorkflowRunEngine
pub fn new( repository: Arc<dyn WorkflowRunRepository>, tools: Arc<dyn ToolExecutor>, agents: Arc<dyn AgentStepPort>, definitions: Arc<dyn WorkflowDefinitionPort>, policy: Arc<dyn WorkflowPolicyPort>, secrets: Arc<dyn WorkflowSecretResolverPort>, ceilings: WorkflowBudgets, ) -> Arc<Self> ⓘ
pub async fn run( self: &Arc<Self>, request: StartWorkflowRun, ) -> Result<WorkflowRunSnapshot, WorkflowRunError>
pub async fn run_pinned( self: &Arc<Self>, request: StartWorkflowRun, bundle: WorkflowDefinitionBundle, ) -> Result<WorkflowRunSnapshot, WorkflowRunError>
Sourcepub async fn start(
self: &Arc<Self>,
request: StartWorkflowRun,
) -> Result<WorkflowRunSnapshot, WorkflowRunError>
pub async fn start( self: &Arc<Self>, request: StartWorkflowRun, ) -> Result<WorkflowRunSnapshot, WorkflowRunError>
Start in the background and return only after the running snapshot is durable. HTTP and tool adapters use this non-blocking entrypoint.
pub async fn start_pinned( self: &Arc<Self>, request: StartWorkflowRun, bundle: WorkflowDefinitionBundle, ) -> Result<WorkflowRunSnapshot, WorkflowRunError>
Sourcepub async fn restart(
self: &Arc<Self>,
run_id: &str,
workspace_trusted: bool,
allowed_capabilities: Vec<String>,
) -> Result<WorkflowRunSnapshot, WorkflowRunError>
pub async fn restart( self: &Arc<Self>, run_id: &str, workspace_trusted: bool, allowed_capabilities: Vec<String>, ) -> Result<WorkflowRunSnapshot, WorkflowRunError>
Phase-1 safe restart starts a fresh run from the suspended run’s pinned definition snapshot. Prefix/script resume remains explicitly out of scope (#581).
pub async fn progress( &self, run_id: &str, since: u64, ) -> Result<WorkflowProgress, WorkflowRunError>
pub async fn list_run_ids(&self) -> Result<Vec<String>, WorkflowRunError>
Sourcepub fn is_run_active(&self, run_id: &str) -> bool
pub fn is_run_active(&self, run_id: &str) -> bool
Whether the in-process worker for run_id is still executing.
A terminal durable snapshot can become visible just before the worker’s final registration guard is released. Shutdown/restart coordination can use this boundary to avoid opening a second repository owner while the old worker is still finishing its journal commit.
pub async fn cancel( &self, run_id: &str, ) -> Result<WorkflowRunSnapshot, WorkflowRunError>
pub async fn recover( &self, ) -> Result<Vec<WorkflowRunSnapshot>, WorkflowRunError>
pub fn subscribe(&self, run_id: &str) -> Option<Receiver<WorkflowRunEvent>>
Auto Trait Implementations§
impl !RefUnwindSafe for WorkflowRunEngine
impl !UnwindSafe for WorkflowRunEngine
impl Freeze for WorkflowRunEngine
impl Send for WorkflowRunEngine
impl Sync for WorkflowRunEngine
impl Unpin for WorkflowRunEngine
impl UnsafeUnpin for WorkflowRunEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more