pub struct DecisionRecord {
pub decision_id: String,
pub execution_id: ExecutionId,
pub step_id: Option<StepId>,
pub decision_type: DecisionType,
pub timestamp: DateTime<Utc>,
pub outcome: String,
pub confidence: f64,
pub inputs: DecisionInput,
pub alternatives: Option<Vec<DecisionAlternative>>,
pub model_context: Option<ModelContext>,
pub reasoning: Option<String>,
}Expand description
DecisionRecord - Audit trail for decisions made during execution
Records what decision was made, why, what alternatives were considered, and what context/model was used.
Fields§
§decision_id: StringUnique decision ID
execution_id: ExecutionIdExecution context
step_id: Option<StepId>§decision_type: DecisionTypeDecision metadata
timestamp: DateTime<Utc>§outcome: StringDecision outcome
confidence: f64Confidence in decision (0-1)
inputs: DecisionInputDecision inputs
alternatives: Option<Vec<DecisionAlternative>>Alternatives considered
model_context: Option<ModelContext>Model context (if LLM was used)
reasoning: Option<String>Reasoning trace (optional explanation)
Implementations§
Source§impl DecisionRecord
impl DecisionRecord
Sourcepub fn new(
decision_type: DecisionType,
execution_id: ExecutionId,
outcome: impl Into<String>,
confidence: f64,
inputs: DecisionInput,
) -> Self
pub fn new( decision_type: DecisionType, execution_id: ExecutionId, outcome: impl Into<String>, confidence: f64, inputs: DecisionInput, ) -> Self
Create a new DecisionRecord
Sourcepub fn with_alternatives(self, alternatives: Vec<DecisionAlternative>) -> Self
pub fn with_alternatives(self, alternatives: Vec<DecisionAlternative>) -> Self
Add alternatives
Sourcepub fn with_model_context(self, model_context: ModelContext) -> Self
pub fn with_model_context(self, model_context: ModelContext) -> Self
Add model context
Sourcepub fn with_reasoning(self, reasoning: impl Into<String>) -> Self
pub fn with_reasoning(self, reasoning: impl Into<String>) -> Self
Add reasoning
Trait Implementations§
Source§impl Clone for DecisionRecord
impl Clone for DecisionRecord
Source§fn clone(&self) -> DecisionRecord
fn clone(&self) -> DecisionRecord
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DecisionRecord
impl Debug for DecisionRecord
Source§impl<'de> Deserialize<'de> for DecisionRecord
impl<'de> Deserialize<'de> for DecisionRecord
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DecisionRecord
impl RefUnwindSafe for DecisionRecord
impl Send for DecisionRecord
impl Sync for DecisionRecord
impl Unpin for DecisionRecord
impl UnsafeUnpin for DecisionRecord
impl UnwindSafe for DecisionRecord
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
Mutably borrows from an owned value. Read more