pub struct GuardSection {
pub hooks_file: String,
pub matcher: String,
pub command_template: String,
pub hook_entry: String,
pub verdict_template: String,
pub armed_message: String,
}Expand description
The write-guard data block: everything the generic guard engine
([super::guard]) needs to arm a hook and render a deny verdict. Embedded
built-in descriptors only — the guard fails open, so
layers::check_user_layer_restrictions bars user layers from declaring
it.
Fields§
§hooks_file: StringHook-config file the entry is merged into, /-separated relative to
the staged env root (e.g. .claude/settings.local.json).
matcher: StringTool-name matcher the hook registers for; also the source of the matcher⊆vocabulary invariant.
command_template: StringShell command the hook runs, with {exe} and {marker} placeholders.
hook_entry: StringJSON template of the hook entry appended to the hook config’s
hooks.PreToolUse array, with {matcher} and {command} placeholders
in its string values. Authored key order is serialized verbatim.
verdict_template: StringJSON template of the deny verdict printed on stdout, with a {reason}
placeholder. Authored key order is the harness’s on-disk contract.
armed_message: StringBanner printed after --guard arms the hook.
Trait Implementations§
Source§impl Clone for GuardSection
impl Clone for GuardSection
Source§fn clone(&self) -> GuardSection
fn clone(&self) -> GuardSection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more