1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Event-triggered automation (routines engine).
//!
//! Routines are lightweight automation rules that match incoming events (from
//! channels, cron, webhooks, or system signals) using configurable pattern
//! strategies (exact, glob, regex) and fire actions (SOP triggers, shell
//! commands, messages, cron jobs). Each routine supports per-routine cooldown
//! to prevent rapid re-triggering.
//!
//! ## Loading
//!
//! Routines are defined in `routines.toml` in the workspace root:
//!
//! ```toml
//! [[routines]]
//! name = "deploy-notify"
//! description = "Notify Slack on deploy webhook"
//! cooldown_secs = 60
//!
//! [[routines.patterns]]
//! source = "webhook"
//! pattern = "/api/deploy"
//! strategy = "exact"
//!
//! [routines.action]
//! type = "message"
//! channel = "slack-general"
//! text = "Deploy triggered!"
//! ```
pub use ;
pub use ;