Struct Sop
pub struct Sop {Show 14 fields
pub name: String,
pub description: String,
pub version: String,
pub priority: SopPriority,
pub execution_mode: SopExecutionMode,
pub triggers: Vec<SopTrigger>,
pub steps: Vec<SopStep>,
pub cooldown_secs: u64,
pub max_concurrent: u32,
pub location: Option<PathBuf>,
pub deterministic: bool,
pub admission_policy: SopAdmissionPolicy,
pub max_pending_approvals: u32,
pub agent: Option<String>,
}Expand description
A complete Standard Operating Procedure definition.
Fields§
§name: StringUnique procedure name. Doubles as the on-disk directory key, so a rename in the editor moves the SOP’s folder. Must be non-empty.
description: StringFree-text summary of what the procedure does and when it fires. Shown in the SOP list and header; purely descriptive, never executed.
version: StringSemantic version string for the procedure definition (e.g. 1.0.0).
Bump it when you change step behavior so runs are traceable.
priority: SopPriorityScheduling priority when concurrency limits force a choice between
runnable procedures: critical, high, normal (default), low.
execution_mode: SopExecutionModeHow steps are driven: auto, supervised (default), step_by_step,
priority_based, or deterministic. deterministic = true forces
the last regardless of this field.
triggers: Vec<SopTrigger>Signals that start a run. A procedure may bind several triggers; any one firing (subject to its own condition) launches the SOP.
steps: Vec<SopStep>Ordered step definitions. This is the body of the procedure; the daemon renumbers and remaps routing refs on save.
cooldown_secs: u64Minimum seconds between successive runs of this procedure. 0
(default) disables the cooldown and back-to-back runs are allowed.
max_concurrent: u32Maximum simultaneous runs of this one procedure. Excess trigger firings queue or drop per the engine’s concurrency policy. Default 1.
location: Option<PathBuf>§deterministic: boolWhen true, sets execution_mode to Deterministic. Steps execute sequentially without LLM round-trips.
admission_policy: SopAdmissionPolicyHow to handle a trigger that cannot be admitted immediately because this
SOP’s execution slots are full (A2). Default parallel.
max_pending_approvals: u32Upper bound on runs of this SOP parked at a HITL approval at once
(0 = unlimited). Once reached, further triggers are deferred (surfaced for
backpressure/redelivery) rather than silently dropped. Default 0.
agent: Option<String>Parent agent alias that owns this procedure. Every execute step runs
as this agent unless the step names its own agent override. Required
for headless triggers (mqtt, webhook, cron, amqp), which have no
ambient agent loop to borrow.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Sop
impl<'de> Deserialize<'de> for Sop
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Sop
impl JsonSchema for Sop
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for Sop
impl RefUnwindSafe for Sop
impl Send for Sop
impl Sync for Sop
impl Unpin for Sop
impl UnsafeUnpin for Sop
impl UnwindSafe for Sop
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