pub struct ReasoningStep {
pub index: u32,
pub kind: ReasoningStepKind,
pub content_hash: [u8; 32],
pub timestamp_unix: u64,
pub metadata_hash: [u8; 32],
}Expand description
A single recorded step in an agent’s reasoning trace.
Actual content is never stored — only a Blake3 hash of it. This preserves privacy while maintaining verifiability: an auditor who holds the original content can independently verify its hash matches the recorded step.
§Content Hashing
Hash the content before recording:
ⓘ
use a1::provenance::{ReasoningTrace, ReasoningStepKind};
let thought = "I should buy AAPL because ...";
let content_hash = blake3::hash(thought.as_bytes()).into();
trace.record_hashed(ReasoningStepKind::Thought, content_hash, None);Or use the convenience methods that hash for you:
ⓘ
trace.record(ReasoningStepKind::Thought, thought.as_bytes());
trace.record_tool_call("get_stock_price", r#"{"symbol":"AAPL"}"#.as_bytes());Fields§
§index: u32Position in the trace (0-indexed, monotonically increasing).
kind: ReasoningStepKindSemantic category of this step.
content_hash: [u8; 32]Blake3 hash of the actual step content.
timestamp_unix: u64Unix timestamp when this step was recorded (seconds).
metadata_hash: [u8; 32]Blake3 hash of optional structured metadata (tool name, model id, etc.). All-zeros when no metadata is associated.
Implementations§
Source§impl ReasoningStep
impl ReasoningStep
Trait Implementations§
Source§impl Clone for ReasoningStep
impl Clone for ReasoningStep
Source§fn clone(&self) -> ReasoningStep
fn clone(&self) -> ReasoningStep
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ReasoningStep
impl Debug for ReasoningStep
Source§impl<'de> Deserialize<'de> for ReasoningStep
impl<'de> Deserialize<'de> for ReasoningStep
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
Source§impl PartialEq for ReasoningStep
impl PartialEq for ReasoningStep
Source§fn eq(&self, other: &ReasoningStep) -> bool
fn eq(&self, other: &ReasoningStep) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ReasoningStep
impl Serialize for ReasoningStep
impl Eq for ReasoningStep
impl StructuralPartialEq for ReasoningStep
Auto Trait Implementations§
impl Freeze for ReasoningStep
impl RefUnwindSafe for ReasoningStep
impl Send for ReasoningStep
impl Sync for ReasoningStep
impl Unpin for ReasoningStep
impl UnsafeUnpin for ReasoningStep
impl UnwindSafe for ReasoningStep
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.