pub struct DynamicWorkflowControl { /* private fields */ }Expand description
A host-owned control handle for one dynamic workflow run.
The handle keeps the exact source, input, registry, and runtime policy
needed to replay the selected run. Mutating operations first acquire the
same worker lease used by DynamicWorkflowTool, then ask A3S Flow to
append/drive its authoritative events. A live worker therefore remains the
sole executor; a controller retries after the redacted lease state reports
that the claim is busy.
Implementations§
Source§impl DynamicWorkflowControl
impl DynamicWorkflowControl
Sourcepub fn health(&self) -> DynamicWorkflowHealthSnapshot
pub fn health(&self) -> DynamicWorkflowHealthSnapshot
Return bounded cumulative worker-claim diagnostics shared by this tool and all controls derived from it.
Sourcepub async fn diagnostics(&self) -> Result<DynamicWorkflowControlDiagnostics>
pub async fn diagnostics(&self) -> Result<DynamicWorkflowControlDiagnostics>
Compose workflow claim counters with the optional agent-wide scheduler health snapshot. This is a read-only diagnostic view; Flow history and the worker lease remain the only authorities for workflow state.
Sourcepub fn with_allowed_tools(
self,
allowed_tools: impl IntoIterator<Item = String>,
) -> Self
pub fn with_allowed_tools( self, allowed_tools: impl IntoIterator<Item = String>, ) -> Self
Replace the set of tools available to replayed script steps.
Sourcepub fn with_limits(self, limits: DynamicWorkflowScriptLimits) -> Self
pub fn with_limits(self, limits: DynamicWorkflowScriptLimits) -> Self
Replace the bounded script and orchestration limits used during replay.
Sourcepub fn with_graph_observer(self, observer: FlowGraphObserver) -> Self
pub fn with_graph_observer(self, observer: FlowGraphObserver) -> Self
Project control-driven Flow events into a graph observer.
Sourcepub fn with_task_scheduler(
self,
scheduler: Arc<TaskScheduler>,
admit_steps_globally: bool,
) -> Self
pub fn with_task_scheduler( self, scheduler: Arc<TaskScheduler>, admit_steps_globally: bool, ) -> Self
Configure optional global admission for direct script-backed steps.
Sourcepub fn with_runtime_build_compatibility(
self,
compatibility: RuntimeBuildCompatibility,
) -> Self
pub fn with_runtime_build_compatibility( self, compatibility: RuntimeBuildCompatibility, ) -> Self
Set the runtime-build compatibility policy used by control replay.
Sourcepub fn with_continuation_lease_ledger(
self,
ledger: Arc<dyn FlowDecisionLedger>,
lease_ms: u64,
) -> Self
pub fn with_continuation_lease_ledger( self, ledger: Arc<dyn FlowDecisionLedger>, lease_ms: u64, ) -> Self
Use a caller-owned worker lease ledger for control operations.
Sourcepub fn with_continuation_lease_ms(self, lease_ms: u64) -> Self
pub fn with_continuation_lease_ms(self, lease_ms: u64) -> Self
Change the worker lease while retaining automatic ledger selection.
Source§impl DynamicWorkflowControl
impl DynamicWorkflowControl
Sourcepub async fn inspect(&self) -> Result<DynamicWorkflowControlSnapshot>
pub async fn inspect(&self) -> Result<DynamicWorkflowControlSnapshot>
Inspect the durable run and return a bounded, digest-only projection.
Sourcepub async fn history(&self) -> Result<Vec<FlowEventEnvelope>>
pub async fn history(&self) -> Result<Vec<FlowEventEnvelope>>
Read the complete durable Flow history for trusted host diagnostics.
Unlike Self::inspect, this method intentionally returns persisted
input and step output values. Callers should apply their own redaction
policy before exposing the result outside a trusted control plane.
Sourcepub async fn request_cancellation(
&self,
reason: Option<String>,
) -> Result<DynamicWorkflowControlSnapshot>
pub async fn request_cancellation( &self, reason: Option<String>, ) -> Result<DynamicWorkflowControlSnapshot>
Request cleanup-aware durable cancellation and settle the worker lease.
A live worker keeps ownership and causes this method to return a busy error; the caller can retry after the lease expires or the worker releases it. This preserves one executor for side-effecting steps.
Sourcepub async fn force_cancel(
&self,
reason: Option<String>,
) -> Result<DynamicWorkflowControlSnapshot>
pub async fn force_cancel( &self, reason: Option<String>, ) -> Result<DynamicWorkflowControlSnapshot>
Immediately terminate the run through Flow’s durable cancellation transition while still fencing the worker claim.
Sourcepub async fn drive(&self) -> Result<DynamicWorkflowControlSnapshot>
pub async fn drive(&self) -> Result<DynamicWorkflowControlSnapshot>
Resume or start the bound run under the same worker fencing contract as the model-visible dynamic workflow tool.
Trait Implementations§
Source§impl Clone for DynamicWorkflowControl
impl Clone for DynamicWorkflowControl
Source§fn clone(&self) -> DynamicWorkflowControl
fn clone(&self) -> DynamicWorkflowControl
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for DynamicWorkflowControl
impl !UnwindSafe for DynamicWorkflowControl
impl Freeze for DynamicWorkflowControl
impl Send for DynamicWorkflowControl
impl Sync for DynamicWorkflowControl
impl Unpin for DynamicWorkflowControl
impl UnsafeUnpin for DynamicWorkflowControl
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more