pub struct GeminiProtocol;Trait Implementations§
Source§impl HookProtocol for GeminiProtocol
impl HookProtocol for GeminiProtocol
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 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_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 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_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 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 GeminiProtocol
impl RefUnwindSafe for GeminiProtocol
impl Send for GeminiProtocol
impl Sync for GeminiProtocol
impl Unpin for GeminiProtocol
impl UnsafeUnpin for GeminiProtocol
impl UnwindSafe for GeminiProtocol
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