pub struct ToolAuditRecord {
pub tool_call_id: String,
pub tool_name: String,
pub display_name: String,
pub tier: ToolTier,
pub requested_input: Value,
pub effective_input: Value,
pub turn: usize,
pub provenance: AuditProvenance,
pub outcome: ToolAuditOutcome,
pub recorded_at: OffsetDateTime,
}Expand description
Single authoritative audit record for one tool-call lifecycle event.
A tool call may produce multiple records over its lifetime — for
example a RequiresConfirmation followed by a Completed after the
user approves, or a Completed followed by a PersistenceFailed if
the event store rejects the terminal event.
Records are self-describing: consumers do not need to correlate them with hook calls or event-store rows to understand what happened.
Fields§
§tool_call_id: StringUnique tool call ID (from the LLM’s tool_use).
tool_name: StringWire-format tool name.
display_name: StringHuman-readable display name.
tier: ToolTierPermission tier of the tool at the moment the record was emitted.
requested_input: ValueInput as requested by the LLM (audit trail).
effective_input: ValueEffective input after SDK preparation (may differ for listen-tools).
turn: usizeTurn number this record belongs to.
provenance: AuditProvenanceProvider / model provenance for this turn’s LLM call.
outcome: ToolAuditOutcomeLifecycle outcome carrying the variant-specific payload.
recorded_at: OffsetDateTimeUTC timestamp when the record was produced.
Implementations§
Source§impl ToolAuditRecord
impl ToolAuditRecord
Sourcepub fn new(params: ToolAuditRecordParams) -> ToolAuditRecord
pub fn new(params: ToolAuditRecordParams) -> ToolAuditRecord
Build a record using the current wall-clock time.
See ToolAuditRecordParams for the field list.
Sourcepub const fn outcome_kind(&self) -> &'static str
pub const fn outcome_kind(&self) -> &'static str
Return the outcome’s discriminant string.
Trait Implementations§
Source§impl Clone for ToolAuditRecord
impl Clone for ToolAuditRecord
Source§fn clone(&self) -> ToolAuditRecord
fn clone(&self) -> ToolAuditRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more