pub struct ClaudeProtocol;Trait Implementations§
Source§impl HookProtocol for ClaudeProtocol
impl HookProtocol for ClaudeProtocol
Source§fn parse_tool_use(&self, raw: &Value) -> Result<ToolUseHookInput>
fn parse_tool_use(&self, raw: &Value) -> Result<ToolUseHookInput>
Parse the agent’s PreToolUse JSON into a
ToolUseHookInput. Required. Read moreSource§fn parse_session_start(&self, raw: &Value) -> Result<SessionStartHookInput>
fn parse_session_start(&self, raw: &Value) -> Result<SessionStartHookInput>
Parse the agent’s SessionStart JSON. Read more
Source§fn parse_stop(&self, raw: &Value) -> Result<StopHookInput>
fn parse_stop(&self, raw: &Value) -> Result<StopHookInput>
Parse the agent’s Stop JSON. Read more
Source§fn format_allow(
&self,
reason: Option<&str>,
context: Option<&str>,
updated_input: Option<Value>,
) -> Value
fn format_allow( &self, reason: Option<&str>, context: Option<&str>, updated_input: Option<Value>, ) -> Value
Format an “allow” decision in the agent’s expected output format. Read more
Source§fn format_deny(&self, reason: &str, context: Option<&str>) -> Value
fn format_deny(&self, reason: &str, context: Option<&str>) -> Value
Format a “deny” decision in the agent’s expected output format. Read more
Source§fn format_ask(&self, reason: Option<&str>, context: Option<&str>) -> Value
fn format_ask(&self, reason: Option<&str>, context: Option<&str>) -> Value
Format an “ask” decision (fall through to agent’s native prompt). Read more
Source§fn format_session_start(&self, context: Option<&str>) -> Value
fn format_session_start(&self, context: Option<&str>) -> Value
Format a session-start response with optional context injection. Read more
Source§fn parse_post_tool_use(&self, raw: &Value) -> Result<ToolUseHookInput>
fn parse_post_tool_use(&self, raw: &Value) -> Result<ToolUseHookInput>
Parse the agent’s PostToolUse JSON into a
ToolUseHookInput. Read moreSource§fn rewrite_for_sandbox(
&self,
input: &ToolUseHookInput,
sandbox_cmd: &str,
) -> Option<Value>
fn rewrite_for_sandbox( &self, input: &ToolUseHookInput, sandbox_cmd: &str, ) -> Option<Value>
Rewrite a shell command’s tool_input to run through a sandbox. Read more
Source§fn session_context(&self) -> &str
fn session_context(&self) -> &str
Context string injected into the agent’s session at startup. Read more
Auto Trait Implementations§
impl Freeze for ClaudeProtocol
impl RefUnwindSafe for ClaudeProtocol
impl Send for ClaudeProtocol
impl Sync for ClaudeProtocol
impl Unpin for ClaudeProtocol
impl UnsafeUnpin for ClaudeProtocol
impl UnwindSafe for ClaudeProtocol
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