pub struct UserTriggerConfig {
pub name: String,
pub pattern: Option<String>,
pub agents: Vec<String>,
pub commands: Vec<String>,
}Expand description
A single user-defined [[trigger]] block from klasp.toml.
[[trigger]]
name = "jj-push"
pattern = "^jj git push"
agents = ["claude_code"]
commands = ["jj git push", "jj git push -m main"]Fields§
§name: StringHuman-readable name for error messages and diagnostics.
pattern: Option<String>Optional regex matched against the full tool-input command string.
Must compile as a Rust regex. At least one of pattern / commands
is required.
agents: Vec<String>Restrict this trigger to specific agents (e.g. ["claude_code"]).
Empty or absent means the trigger fires for all agents.
commands: Vec<String>Exact command strings that fire this trigger. Matched after pattern
— a command that matches either fires the gate.
Trait Implementations§
Source§impl Clone for UserTriggerConfig
impl Clone for UserTriggerConfig
Source§fn clone(&self) -> UserTriggerConfig
fn clone(&self) -> UserTriggerConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UserTriggerConfig
impl Debug for UserTriggerConfig
Source§impl<'de> Deserialize<'de> for UserTriggerConfig
impl<'de> Deserialize<'de> for UserTriggerConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for UserTriggerConfig
impl RefUnwindSafe for UserTriggerConfig
impl Send for UserTriggerConfig
impl Sync for UserTriggerConfig
impl Unpin for UserTriggerConfig
impl UnsafeUnpin for UserTriggerConfig
impl UnwindSafe for UserTriggerConfig
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