pub struct TaskReceipt {
pub task_id: String,
pub agent: String,
pub phase: Option<String>,
pub status: String,
pub artifacts: Vec<String>,
pub metrics: HashMap<String, Value>,
pub effort: TaskEffort,
pub verification: String,
pub created_at: String,
}Expand description
A receipt proving task completion with artifacts and metrics.
Fields§
§task_id: StringUnique task identifier
agent: StringAgent/skill that completed the task
phase: Option<String>Current phase (e.g., “BUILD”, “HARDEN”, “SHIP”)
status: StringStatus - should be “complete” for valid receipts
artifacts: Vec<String>List of artifact paths created or modified
metrics: HashMap<String, Value>Key-value metrics from the task
effort: TaskEffortEffort tracking
verification: StringHuman-readable verification summary
created_at: StringISO 8601 timestamp when receipt was created
Implementations§
Source§impl TaskReceipt
impl TaskReceipt
Sourcepub fn new(task_id: impl Into<String>, agent: impl Into<String>) -> Self
pub fn new(task_id: impl Into<String>, agent: impl Into<String>) -> Self
Create a new task receipt
Sourcepub fn with_phase(self, phase: impl Into<String>) -> Self
pub fn with_phase(self, phase: impl Into<String>) -> Self
Set the phase
Sourcepub fn add_artifact(self, path: impl Into<String>) -> Self
pub fn add_artifact(self, path: impl Into<String>) -> Self
Add an artifact path
Sourcepub fn with_effort(
self,
files_read: u32,
files_written: u32,
tool_calls: u32,
) -> Self
pub fn with_effort( self, files_read: u32, files_written: u32, tool_calls: u32, ) -> Self
Set effort tracking
Sourcepub fn with_verification(self, msg: impl Into<String>) -> Self
pub fn with_verification(self, msg: impl Into<String>) -> Self
Set verification message
Trait Implementations§
Source§impl Clone for TaskReceipt
impl Clone for TaskReceipt
Source§fn clone(&self) -> TaskReceipt
fn clone(&self) -> TaskReceipt
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 TaskReceipt
impl Debug for TaskReceipt
Source§impl<'de> Deserialize<'de> for TaskReceipt
impl<'de> Deserialize<'de> for TaskReceipt
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 TaskReceipt
impl RefUnwindSafe for TaskReceipt
impl Send for TaskReceipt
impl Sync for TaskReceipt
impl Unpin for TaskReceipt
impl UnsafeUnpin for TaskReceipt
impl UnwindSafe for TaskReceipt
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