pub struct WorkflowRuntime { /* private fields */ }Expand description
The workflow runs belonging to one session.
Implementations§
Source§impl WorkflowRuntime
impl WorkflowRuntime
Sourcepub async fn approve(&self, plan: WorkflowPlan) -> ApprovalDecision
pub async fn approve(&self, plan: WorkflowPlan) -> ApprovalDecision
Ask the user to approve a run.
This is a cost gate rather than a permission gate: one run can start
hundreds of child agents, and the user should see that before it is
spent. Modes with no way to answer, such as -p, start the run.
Sourcepub fn prepare(
&self,
script: Script,
args: Value,
journal: Journal,
) -> Result<Arc<RunRecord>>
pub fn prepare( &self, script: Script, args: Value, journal: Journal, ) -> Result<Arc<RunRecord>>
Prepare a run and add it to the list, without starting it.
Registering before running is what lets the progress view find the run as soon as it is approved, rather than after its first agent answers.
Sourcepub async fn run(&self, record: &Arc<RunRecord>) -> Result<Value, String>
pub async fn run(&self, record: &Arc<RunRecord>) -> Result<Value, String>
Run a prepared workflow to completion.
pub fn get(&self, id: RunId) -> Option<Arc<RunRecord>>
Sourcepub fn summaries(&self) -> Vec<RunSummary>
pub fn summaries(&self) -> Vec<RunSummary>
Every run in this session, oldest first.
pub fn is_empty(&self) -> bool
Auto Trait Implementations§
impl !Freeze for WorkflowRuntime
impl !RefUnwindSafe for WorkflowRuntime
impl !UnwindSafe for WorkflowRuntime
impl Send for WorkflowRuntime
impl Sync for WorkflowRuntime
impl Unpin for WorkflowRuntime
impl UnsafeUnpin for WorkflowRuntime
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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 moreCreates a shared type from an unshared type.