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
38
use Result;
use async_trait;
use BoxStream;
use Value;
/// A trigger event delivered by an [`EventSource`].
///
/// Contains the name of the source that produced it and an arbitrary JSON payload
/// with source-specific metadata (e.g., matched file path, cron tick time, webhook body).
/// A source of trigger events for ambient agents.
///
/// Implementations produce an async stream of [`TriggerEvent`]s. The stream yields
/// events until the source is stopped or the subscription is dropped.
///
/// # Built-in Implementations
///
/// - [`CronTrigger`](super::CronTrigger) — cron schedule
/// - [`WebhookTrigger`](super::WebhookTrigger) — HTTP POST webhook
/// - [`FileWatchTrigger`](super::FileWatchTrigger) — filesystem watcher