Enum SopRunAction
pub enum SopRunAction {
ExecuteStep {
run_id: String,
step: SopStep,
context: String,
},
WaitApproval {
run_id: String,
step: SopStep,
context: String,
},
DeterministicStep {
run_id: String,
step: SopStep,
input: Value,
},
CheckpointWait {
run_id: String,
step: SopStep,
state_file: PathBuf,
},
Pending {
run_id: String,
sop_name: String,
step: u32,
reason: String,
},
Completed {
run_id: String,
sop_name: String,
},
Failed {
run_id: String,
sop_name: String,
reason: String,
},
}Expand description
What the engine instructs the caller to do next after a state transition.
Variants§
ExecuteStep
Inject this step into the agent for execution. step.agent is the
resolved effective agent (step override then parent), not the raw
persisted override; consumers must not re-resolve it. Consumers MUST run
the step AS that effective agent: when it names a different agent than
the one running the turn, the step’s COMPLETE per-agent execution
contract must be re-assembled for that agent, never inherited from the
parent turn — its gated tool registry, security policy, MCP scope,
provider binding (incl. the agent’s own temperature), resolved runtime
controls (iteration/result/context limits, parsing/parallelism, dedup
exemptions, tool filter groups), and an approval manager built from the
step agent’s risk profile under the parent surface’s interactivity mode
(a live operator approval route survives delegation). The step runs on
an EXPLICIT child transcript (the step agent’s own system prompt plus
the step context); the parent turn’s conversation is never sent to the
step agent’s provider, and only the step’s final output flows back.
Records emitted while the step runs stamp the step agent as the acting
identity, with the delegating agent preserved as parent correlation.
A driver path that carries the re-assembly handle (the live runtime and
channel-orchestrator turn paths) re-assembles the step agent; a path
that does NOT carry it (e.g. a bounded delegate sub-loop) MUST fail the
cross-agent step CLOSED rather than run it with the parent’s context.
Either way the invariant holds: a cross-agent step never executes with
a broader scope than its own agent — it is re-assembled or it is
refused.
WaitApproval
Pause and wait for operator approval before executing this step.
DeterministicStep
Execute a step deterministically (no LLM). The input is the piped
output from the previous step (or trigger payload for step 1).
CheckpointWait
Deterministic workflow hit a checkpoint — pause for human approval. Workflow state has been persisted so it can resume after approval.
Pending
Routing selected a step whose dependencies are not yet satisfied.
Completed
The SOP run completed successfully.
Failed
The SOP run failed.
Trait Implementations§
Source§impl Clone for SopRunAction
impl Clone for SopRunAction
Source§fn clone(&self) -> SopRunAction
fn clone(&self) -> SopRunAction
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for SopRunAction
impl RefUnwindSafe for SopRunAction
impl Send for SopRunAction
impl Sync for SopRunAction
impl Unpin for SopRunAction
impl UnsafeUnpin for SopRunAction
impl UnwindSafe for SopRunAction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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