pub struct CodexTarget;Trait Implementations§
Source§impl Target for CodexTarget
impl Target for CodexTarget
Source§fn install(&self, home: &Path) -> Result<InstallOutcome, String>
fn install(&self, home: &Path) -> Result<InstallOutcome, String>
Adds whichever of EVENTS is missing, so a user who installed the PreToolUse hook
before PermissionRequest support gets the second entry from a re-run of --setup.
Source§fn hook_format_for(&self, stdin: &str) -> Option<&dyn HookFormat>
fn hook_format_for(&self, stdin: &str) -> Option<&dyn HookFormat>
Codex names the event in hook_event_name, which it sets itself (the agent cannot reach
it). Anything that is not a PermissionRequest, an envelope without the field included,
keeps the PreToolUse answer this target has always given.
fn name(&self) -> &'static str
fn display_name(&self) -> &'static str
fn detect_paths(&self, home: &Path) -> Vec<PathBuf>
fn hook_format(&self) -> Option<&dyn HookFormat>
Source§fn hook_formats(&self) -> Vec<&dyn HookFormat>
fn hook_formats(&self) -> Vec<&dyn HookFormat>
Every format
hook_format_for can return, so the contract guards that need no envelope walk
all of them and a second event’s format cannot ship unchecked. The foreign-tool guard is
driven by sample_envelope and reaches only the format that envelope routes to; Codex’s
PermissionRequest tool filter has its own test in codex.rs.Source§fn shell_tool_name(&self) -> &'static str
fn shell_tool_name(&self) -> &'static str
The harness’s SHELL tool — the only tool this hook should decide about. Droid’s is
Execute, Gemini’s run_shell_command; most are Bash. Defaults to Bash, the common
case.Auto Trait Implementations§
impl Freeze for CodexTarget
impl RefUnwindSafe for CodexTarget
impl Send for CodexTarget
impl Sync for CodexTarget
impl Unpin for CodexTarget
impl UnsafeUnpin for CodexTarget
impl UnwindSafe for CodexTarget
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