Expand description
User-configurable [[trigger]] blocks parsed from klasp.toml.
Design: issue #45. User triggers extend the built-in commit/push regex
(see trigger.rs) — they add new matching rules without replacing the
built-ins. A command matched by any user trigger fires the gate just
as a built-in match would.
Validation rules (enforced at config-load time, not at match time):
- At least one of
patternorcommandsmust be present. patternmust be a valid Rust regex (compiled eagerly to catch errors early).agentsis optional — empty means “fire for all agents”.
Structs§
- User
Trigger - A compiled, validated user trigger ready for matching.
- User
Trigger Config - A single user-defined
[[trigger]]block fromklasp.toml.
Functions§
- validate_
user_ triggers - Validate all
[[trigger]]entries from config, returning compiled triggers.