pub enum HookPayload {
None,
SessionSetup {
initial_message: String,
},
Round {
round: u32,
},
Prompt {
prompt: String,
},
ToolExecution {
tool_name: String,
tool_call_id: String,
parsed_args: Value,
},
ToolResult {
tool_name: String,
tool_call_id: String,
outcome: HookToolOutcome,
},
Compression {
estimated_tokens: u32,
usage_percent: f64,
phase: String,
},
Finalize,
}Expand description
Point-specific data supplied to an AgentHookPoint callback.
Payloads own their data deliberately. Hooks are asynchronous and may be shared by concurrent runs, so keeping the public contract free of borrowed engine-only types makes it serializable, easy to test, and preserves the domain/engine dependency boundary.
Variants§
None
A point currently has no additional structured data.
SessionSetup
Session initialization completed for this user turn.
Round
A round is about to start or has just completed.
Prompt
A prompt-oriented hook payload reserved for prompt/LLM seams.
ToolExecution
A parsed tool call immediately before dispatch.
ToolResult
A tool outcome immediately before it is applied to the session.
Compression
Context compression is about to begin.
Finalize
The run is about to emit its terminal completion event.
Trait Implementations§
Source§impl Clone for HookPayload
impl Clone for HookPayload
Source§fn clone(&self) -> HookPayload
fn clone(&self) -> HookPayload
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 HookPayload
impl Debug for HookPayload
Source§impl Default for HookPayload
impl Default for HookPayload
Source§fn default() -> HookPayload
fn default() -> HookPayload
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for HookPayload
impl<'de> Deserialize<'de> for HookPayload
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<HookPayload, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<HookPayload, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for HookPayload
impl PartialEq for HookPayload
Source§impl Serialize for HookPayload
impl Serialize for HookPayload
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for HookPayload
Auto Trait Implementations§
impl Freeze for HookPayload
impl RefUnwindSafe for HookPayload
impl Send for HookPayload
impl Sync for HookPayload
impl Unpin for HookPayload
impl UnsafeUnpin for HookPayload
impl UnwindSafe for HookPayload
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