pub enum HookPayload {
None,
SessionSetup {
initial_message: String,
source: SessionStartSource,
},
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,
max_context_tokens: u32,
trigger_context_tokens: u32,
trigger: String,
phase: String,
},
Notification {
id: Option<String>,
category: String,
priority: String,
title: String,
body: String,
dedup_key: Option<String>,
created_at: Option<String>,
click_url: Option<String>,
},
Finalize {
stop_hook_active: bool,
},
SessionEnd {
status: SessionEndStatus,
completion_reason: Option<String>,
},
}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.
Fields
Notification
A classified, deduplicated notification is being delivered to sinks.
Fields
Finalize
The run is about to emit its terminal completion event.
SessionEnd
The run reached a terminal status and is about to be persisted.
Trait Implementations§
Source§impl Clone for HookPayload
impl Clone for HookPayload
Source§fn clone(&self) -> HookPayload
fn clone(&self) -> HookPayload
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more