Skip to main content

SopStep

Struct SopStep 

pub struct SopStep {
Show 21 fields pub number: u32, pub title: String, pub body: String, pub suggested_tools: Vec<String>, pub requires_confirmation: bool, pub kind: SopStepKind, pub schema: Option<StepSchema>, pub scope: Option<StepToolScope>, pub routing: StepRouting, pub on_failure: StepFailure, pub mode: Option<SopExecutionMode>, pub calls: Vec<PlannedToolCall>, pub pos: Option<StepPos>, pub agent: Option<String>, pub capability: Option<String>, pub capability_input: Option<Value>, pub policy: Option<String>, pub gate_prompt: Option<String>, pub edit: Option<String>, pub decide: Option<String>, pub unless_decided: Option<u32>,
}
Expand description

A single step in an SOP procedure, parsed from SOP.md.

Fields§

§number: u32

Ordinal position of this step within the procedure. Steps run in number order unless routing overrides the sequence; the daemon renumbers on save so gaps and reorders normalize to 1..N.

§title: String

Short human label for the step, shown on the canvas node and in the step list. Leave blank and the surface falls back to “untitled”.

§body: String

The step’s instruction body in Markdown. This is the prompt the running agent executes for the step; bindings like {{steps.N}} resolve against prior step outputs at run time.

§suggested_tools: Vec<String>

Advisory tool names surfaced to the agent for this step. Legacy alias for scope.allow; when step_scope_enforce is off these are hints, not a hard restriction.

§requires_confirmation: bool

Pause for human confirmation before this step runs. Independent of checkpoint kind and the SOP-level approval gate; both still apply.

§kind: SopStepKind

Step kind: execute (default) or checkpoint.

§schema: Option<StepSchema>

Typed input/output schemas for deterministic data flow validation.

§scope: Option<StepToolScope>

Tool scope for this step. suggested_tools remains the legacy alias.

§routing: StepRouting

Conditional routing metadata. Default preserves linear execution.

§on_failure: StepFailure

Failure handling metadata. Default preserves fail-the-run behavior.

§mode: Option<SopExecutionMode>

Optional per-step execution mode override.

§calls: Vec<PlannedToolCall>

Ordered tool calls planned for this step. Args may carry {{steps.N}} / {{calls.K}} bindings validated at save time.

§pos: Option<StepPos>

Persisted canvas coordinate, set by dragging the node in the Blueprint editor. Absent until the node is moved; not surfaced in the step form.

§agent: Option<String>

Agent alias that runs this step. Overrides the SOP’s parent agent when set; unset inherits the parent. Authored, persisted, and resolved into the executing action via effective_agent (step override then parent). Spawning a distinct per-step agent’s own session at execution time is staged follow-on work; today the resolved alias is stamped on the action and the active agent loop executes the step body.

§capability: Option<String>

Capability identifier used when kind = "capability".

§capability_input: Option<Value>

Capability arguments, serialized as with in TOML/JSON definitions.

§policy: Option<String>

Approval policy name (a key in [sop.approval].policies) the approval broker enforces for this step’s gate: required approver group + quorum. None keeps today’s behavior (approval_mode alone governs, no membership/quorum).

§gate_prompt: Option<String>

Authored gate-notice template for a HITL step (- prompt: bullet). {{path.to.field}} placeholders resolve against the step’s piped input (the trigger payload at step 1, the previous step’s output later) — pure lookups, no logic. Rendered into the out-of-band approval notice so the approver sees WHAT they are approving; absent = an automatic summary.

§edit: Option<String>

Editable-field opt-in for a checkpoint step (- edit: body bullet): the named field of the piped value an approver may amend before the run resumes (the gate prompt gains an “Edit” choice). Absent = no editing.

§decide: Option<String>

Conditional part (- decide: bullet): a yes/no question the SOP’s decision model answers about the triggering event when the run starts, in the same call as the SOP’s gate. The step runs only on “yes” (p(yes) at or above [decision] part_threshold); on “no” it is recorded as skipped and the run moves on. If the model cannot answer, it runs.

§unless_decided: Option<u32>

Skip this step when step N’s decide question was answered “yes” (- unless_decided: N bullet). Lets one decision select between alternative sets of steps, e.g. a scope hold instead of a full review.

Implementations§

Source§

impl SopStep

Source

pub fn capability_id(&self) -> Option<&str>

Source

pub fn capability_call_input(&self, piped_input: Value) -> Value

Source

pub fn effective_tool_scope(&self) -> Option<StepToolScope>

Source

pub fn effective_agent<'a>(&'a self, parent: Option<&'a str>) -> Option<&'a str>

The agent alias that runs this step: the step’s own override when set, otherwise the SOP’s parent agent.

Trait Implementations§

Source§

impl Clone for SopStep

Source§

fn clone(&self) -> SopStep

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · §

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SopStep

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SopStep

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for SopStep

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for SopStep

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for SopStep

Source§

fn eq(&self, other: &SopStep) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · §

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for SopStep

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for SopStep

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AnyEq for T
where T: Any + PartialEq,

§

fn equals(&self, other: &(dyn Any + 'static)) -> bool

§

fn as_any(&self) -> &(dyn Any + 'static)

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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 more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more