pub struct ExternalEngineConfig {
pub command: String,
pub args: Vec<String>,
pub timeout_ms: u64,
pub on_error: ErrorFallback,
pub format_map: HashMap<String, String>,
}Expand description
Configuration for an external permission engine.
Fields§
§command: StringPath to the external engine binary (resolved via PATH if not absolute).
args: Vec<String>Arguments passed to the engine. Use {format} as a placeholder for the
tool format (e.g. ["hook", "handle", "--mode", "{format}"]).
The placeholder is replaced with the resolved format string before spawning.
timeout_ms: u64Timeout in milliseconds. Default: 5000 (5 seconds).
on_error: ErrorFallbackWhat to do when the engine fails (crash, timeout, bad output).
format_map: HashMap<String, String>Override the default format strings used for {format} substitution.
Keys are the default names (claude-code, gemini, cursor);
values are the replacements the engine expects.
Example: { "claude-code" = "claude", "gemini" = "google" }
Implementations§
Source§impl ExternalEngineConfig
impl ExternalEngineConfig
Sourcepub fn resolve_format(&self, format: HookFormat) -> String
pub fn resolve_format(&self, format: HookFormat) -> String
Resolve the format string for a given hook format,
applying format_map overrides if present.
Trait Implementations§
Source§impl Clone for ExternalEngineConfig
impl Clone for ExternalEngineConfig
Source§fn clone(&self) -> ExternalEngineConfig
fn clone(&self) -> ExternalEngineConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more