pub struct ToolEvent {
pub kind: String,
pub name: Option<String>,
pub input: Option<Value>,
pub output: Option<String>,
pub index: usize,
}Expand description
One normalized tool-call / action event the skill took during a turn, lifted
from oneharness’s events array (its --events output). Harness-agnostic, so
a consumer can inspect what the skill did — shell commands, file edits, tool
uses — across any harness, not just the final text. Mirrors the oneharness
action-event shape; input is the structured, tool-shaped args so a consumer
can match on the command string or file path without re-parsing.
input is a free-form JSON value, so Message/Transcript are PartialEq
but not Eq.
Fields§
§kind: Stringtool_call (the skill invoked a tool) or tool_result (the observation).
name: Option<String>Normalized tool name where knowable (e.g. bash, edit_file); null for
a tool_result or when the harness did not name it.
input: Option<Value>Structured tool arguments (the command, the file path); null when none.
output: Option<String>The result/observation text, when the transcript exposed it.
index: usizePosition within the turn, so ordering (“did X before Y”) is expressible.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ToolEvent
impl<'de> Deserialize<'de> for ToolEvent
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>,
Source§impl JsonSchema for ToolEvent
impl JsonSchema for ToolEvent
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more