pub enum HarnessInternalEvent {
AssistantTextChunk {
msg_id: String,
delta: String,
},
AssistantThinkingChunk {
msg_id: String,
delta: String,
},
ToolCall {
id: String,
name: String,
input: Value,
},
ToolResult {
id: String,
output: Result<Value, String>,
},
CompactionApplied {
original_message_count: usize,
compacted_message_count: usize,
original_tokens: u64,
compacted_tokens: u64,
},
TurnEnd {
stop_reason: String,
usage: Option<HarnessUsage>,
final_messages: Vec<ChatMessage>,
},
}Variants§
AssistantTextChunk
AssistantThinkingChunk
ToolCall
ToolResult
CompactionApplied
Compaction fired between steps and the running history was
folded. Counts let HR estimate how aggressive compaction is at
this point in the turn (and whether to raise alerts). Token
counts come from the harness’s own estimator — see
compaction::estimate_messages_tokens — and are approximate.
Native_adapter currently does NOT project this onto an
AdapterEvent (no proto field reserved for it yet). It surfaces
only through structured tracing on the RD side; tests can still
assert on it in the harness’s mpsc channel.
Fields
TurnEnd
Fields
usage: Option<HarnessUsage>final_messages: Vec<ChatMessage>Final messages history at turn end (post-compaction, includes
the assistant’s reply and any tool round-trips). RD captures
this snapshot to seed the next dispatch’s prior_messages
so multi-turn conversations in the same RD process don’t
re-prompt from scratch.
This is internal-only state: it never lands on the wire.
native_adapter::HarnessEventAdapter::ingest reads it via a
side-channel (history_handle) and drops it before projecting
to AdapterEvent::TurnEnd. Tests can still assert on the
raw HarnessInternalEvent directly.
Trait Implementations§
Source§impl Clone for HarnessInternalEvent
impl Clone for HarnessInternalEvent
Source§fn clone(&self) -> HarnessInternalEvent
fn clone(&self) -> HarnessInternalEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HarnessInternalEvent
impl Debug for HarnessInternalEvent
Source§impl PartialEq for HarnessInternalEvent
impl PartialEq for HarnessInternalEvent
Source§fn eq(&self, other: &HarnessInternalEvent) -> bool
fn eq(&self, other: &HarnessInternalEvent) -> bool
self and other values to be equal, and is used by ==.