pub struct Plan {
pub id: Option<String>,
pub slug: Option<String>,
pub version: u32,
pub steps: Vec<PlanStep>,
pub goal: Option<String>,
pub parent_plan_id: Option<String>,
pub metadata: HashMap<String, Value>,
pub created_at: u64,
pub updated_at: u64,
}plan-execute only.Expand description
Execution plan
Fields§
§id: Option<String>Plan unique ID (auto-generated)
slug: Option<String>Human-readable slug (e.g., “swift-fox”)
version: u32Version number (incremented on each replan)
steps: Vec<PlanStep>List of steps in the plan
goal: Option<String>Overall goal description of the plan
parent_plan_id: Option<String>Parent plan ID (for incremental replanning tracking)
metadata: HashMap<String, Value>Additional metadata
created_at: u64Creation timestamp (seconds)
updated_at: u64Last update timestamp (seconds)
Implementations§
Source§impl Plan
impl Plan
Sourcepub fn with_parent(self, parent_id: impl Into<String>) -> Plan
pub fn with_parent(self, parent_id: impl Into<String>) -> Plan
Set the parent plan ID (for incremental replanning)
Sourcepub fn completed_count(&self) -> usize
pub fn completed_count(&self) -> usize
Return the number of completed steps
Sourcepub fn is_completed(&self) -> bool
pub fn is_completed(&self) -> bool
Check if the plan is fully completed
Sourcepub fn validate(&self) -> Vec<PlanValidationIssue>
pub fn validate(&self) -> Vec<PlanValidationIssue>
Validate the plan, returning all discovered issues
Sourcepub fn resolve_dependency_with_fuzzy(&self, dep: &str) -> (Option<usize>, bool)
pub fn resolve_dependency_with_fuzzy(&self, dep: &str) -> (Option<usize>, bool)
Resolve a dependency string to a step index, returning whether fuzzy matching was used
Sourcepub fn resolve_dependency(&self, dep: &str) -> Option<usize>
pub fn resolve_dependency(&self, dep: &str) -> Option<usize>
Resolve a dependency string to a step index
Sourcepub fn downstream_steps(&self, step_idx: usize) -> Vec<usize>
pub fn downstream_steps(&self, step_idx: usize) -> Vec<usize>
Get all downstream steps of a given step (steps that depend on it)
Sourcepub fn downstream_steps_recursive(&self, step_idx: usize) -> Vec<usize>
pub fn downstream_steps_recursive(&self, step_idx: usize) -> Vec<usize>
Recursively get all downstream steps (including transitive dependencies)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Plan
impl<'de> Deserialize<'de> for Plan
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Plan, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Plan, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for Plan
impl Serialize for Plan
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for Plan
impl RefUnwindSafe for Plan
impl Send for Plan
impl Sync for Plan
impl Unpin for Plan
impl UnsafeUnpin for Plan
impl UnwindSafe for Plan
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,
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request