pub enum HarnessEvent {
Show 16 variants
RunStarted {
run_id: RunId,
agent_id: AgentId,
},
ContextBuilt {
run_id: RunId,
turn_id: TurnId,
context: ContextPack,
},
ContextCompacted {
run_id: RunId,
turn_id: TurnId,
estimated_tokens_before: u32,
estimated_tokens_after: u32,
dropped_turn_start: u64,
dropped_turn_end_exclusive: u64,
},
ModelRequested {
run_id: RunId,
turn_id: TurnId,
step: u32,
model: ModelName,
},
ModelFailed {
run_id: RunId,
turn_id: TurnId,
step: u32,
reason: String,
},
ModelResponded {
run_id: RunId,
turn_id: TurnId,
step: u32,
output: Message,
proposed_calls: Vec<ToolProposal>,
served_model: Option<ModelName>,
usage: Option<ModelUsage>,
},
ToolProposalsRejected {
run_id: RunId,
turn_id: TurnId,
reason: String,
},
ToolCallProposed {
run_id: RunId,
turn_id: TurnId,
call: ToolCall,
},
PolicyEvaluated {
run_id: RunId,
call_id: ToolCallId,
decision: PolicyDecision,
},
ApprovalGranted {
run_id: RunId,
call_id: ToolCallId,
actor_id: ActorId,
},
ApprovalDenied {
run_id: RunId,
call_id: ToolCallId,
actor_id: ActorId,
reason: String,
},
ToolStarted {
run_id: RunId,
call_id: ToolCallId,
},
ToolFinished {
run_id: RunId,
result: ToolResult,
},
ToolFailed {
run_id: RunId,
call_id: ToolCallId,
reason: String,
},
RunFinished {
run_id: RunId,
},
RunFailed {
run_id: RunId,
reason: String,
},
}Expand description
Durable event log entries. Transcript, metrics, replay, and audit views are derived from this log.
The tagged JSON schema rejects unknown fields rather than discarding durable data.
Variants§
RunStarted
Binds a fresh state machine to one run and agent.
Fields
ContextBuilt
Records the exact bounded context selected for a model turn.
Fields
context: ContextPackLane-labeled context that must pass budget validation.
ContextCompacted
Records prior turns omitted from the next model context.
Fields
ModelRequested
Records that a model request crossed the provider boundary.
Fields
ModelFailed
Records that the pending model request failed without terminating the run.
Fields
ModelResponded
Records the normalized result returned by the pending model request.
Fields
proposed_calls: Vec<ToolProposal>Unvalidated model proposals; an empty list concludes the turn.
served_model: Option<ModelName>Provider-reported model that served the response, when available.
This is an auditable response fact. The host-selected request model
remains recorded separately on HarnessEvent::ModelRequested.
Unknown values are omitted so pre-field 0.3.0 records round-trip
without gaining a field.
usage: Option<ModelUsage>Provider-reported token usage, or None when usage is unknown.
Reported zero counts remain known usage rather than None.
ToolProposalsRejected
Rejects every unvalidated tool proposal in the pending model response.
Fields
ToolCallProposed
Records a model proposal after host validation and effect classification.
Fields
PolicyEvaluated
Records the policy decision for the pending validated call.
Fields
call_id: ToolCallIdPending call evaluated by policy.
decision: PolicyDecisionDurable allow, approval, or denial decision.
ApprovalGranted
Records who granted a pending approval.
Fields
call_id: ToolCallIdPending call approved for execution.
ApprovalDenied
Records who denied a pending approval and why.
Fields
call_id: ToolCallIdPending call denied before execution.
ToolStarted
Records that the host began executing the approved call.
Fields
call_id: ToolCallIdApproved call that crossed the execution boundary.
ToolFinished
Records the structured result returned by the running call.
Fields
result: ToolResultResult whose call id must match the running call.
ToolFailed
Records that the running call failed without a result.
Fields
call_id: ToolCallIdRunning call that failed.
RunFinished
Terminates a concluded turn as a successful run.
RunFailed
Terminates any started, nonterminal run as failed.
Implementations§
Trait Implementations§
Source§impl Clone for HarnessEvent
impl Clone for HarnessEvent
Source§fn clone(&self) -> HarnessEvent
fn clone(&self) -> HarnessEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more