pub struct PlanMetadata {Show 18 fields
pub plan_id: String,
pub conversation_id: String,
pub title: String,
pub task_description: String,
pub plan_content: String,
pub model_id: Option<String>,
pub status: PlanStatus,
pub executed: bool,
pub iterations_used: u32,
pub created_at: i64,
pub updated_at: i64,
pub file_path: Option<String>,
pub embedding: Option<Vec<f32>>,
pub parent_plan_id: Option<String>,
pub child_plan_ids: Vec<String>,
pub branch_name: Option<String>,
pub merged: bool,
pub depth: u32,
}Expand description
Metadata for a persisted execution plan
Fields§
§plan_id: StringUnique plan identifier.
conversation_id: StringConversation this plan belongs to.
title: StringShort title derived from the task description.
task_description: StringFull task description the plan was created for.
plan_content: StringThe plan content (steps, instructions).
model_id: Option<String>Model used to generate the plan, if known.
status: PlanStatusCurrent status of the plan.
executed: boolWhether the plan has been executed.
iterations_used: u32Number of iterations used during execution.
created_at: i64Unix timestamp when the plan was created.
updated_at: i64Unix timestamp when the plan was last updated.
file_path: Option<String>File path if the plan was exported to disk.
embedding: Option<Vec<f32>>Optional embedding vector for similarity search.
parent_plan_id: Option<String>Parent plan ID for branched plans.
child_plan_ids: Vec<String>IDs of child (branched) plans.
branch_name: Option<String>Branch name for branched plans.
merged: boolWhether this branch has been merged back.
depth: u32Nesting depth in the plan tree.
Implementations§
Source§impl PlanMetadata
impl PlanMetadata
Sourcepub fn new(
conversation_id: String,
task_description: String,
plan_content: String,
) -> Self
pub fn new( conversation_id: String, task_description: String, plan_content: String, ) -> Self
Create a new plan with the given task and content
Sourcepub fn create_branch(
&self,
branch_name: String,
task_description: String,
plan_content: String,
) -> Self
pub fn create_branch( &self, branch_name: String, task_description: String, plan_content: String, ) -> Self
Create a branch (sub-plan) from this plan
Sourcepub fn mark_merged(&mut self)
pub fn mark_merged(&mut self)
Mark as merged
Sourcepub fn has_children(&self) -> bool
pub fn has_children(&self) -> bool
Check if this plan has children
Sourcepub fn with_model(self, model_id: String) -> Self
pub fn with_model(self, model_id: String) -> Self
Set the model used
Sourcepub fn with_iterations(self, iterations: u32) -> Self
pub fn with_iterations(self, iterations: u32) -> Self
Set iterations used
Sourcepub fn mark_executed(&mut self)
pub fn mark_executed(&mut self)
Mark as executed
Sourcepub fn set_status(&mut self, status: PlanStatus)
pub fn set_status(&mut self, status: PlanStatus)
Update status
Sourcepub fn set_file_path(&mut self, path: String)
pub fn set_file_path(&mut self, path: String)
Set file path after export
Sourcepub fn created_at_datetime(&self) -> DateTime<Utc>
pub fn created_at_datetime(&self) -> DateTime<Utc>
Get created_at as DateTime
Sourcepub fn to_markdown(&self) -> String
pub fn to_markdown(&self) -> String
Generate markdown export with YAML frontmatter
Trait Implementations§
Source§impl Clone for PlanMetadata
impl Clone for PlanMetadata
Source§fn clone(&self) -> PlanMetadata
fn clone(&self) -> PlanMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more