pub enum SensorSourceConfig {
JmapEmail {
name: String,
server: String,
username: String,
password_env: String,
priority_senders: Vec<String>,
blocked_senders: Vec<String>,
poll_interval_seconds: u64,
},
Rss {
name: String,
feeds: Vec<String>,
interest_keywords: Vec<String>,
poll_interval_seconds: u64,
},
Image {
name: String,
watch_directory: String,
poll_interval_seconds: u64,
},
Audio {
name: String,
watch_directory: String,
whisper_model: String,
known_contacts: Vec<String>,
poll_interval_seconds: u64,
},
Weather {
name: String,
api_key_env: String,
locations: Vec<String>,
poll_interval_seconds: u64,
alert_only: bool,
},
Webhook {
name: String,
path: String,
secret_env: Option<String>,
},
Mcp {Show 15 fields
name: String,
server: Box<McpServerEntry>,
tool_name: String,
tool_args: Value,
kafka_topic: String,
modality: SensorModality,
poll_interval_seconds: u64,
id_field: String,
content_field: Option<String>,
items_field: Option<String>,
priority_senders: Vec<String>,
blocked_senders: Vec<String>,
enrich_tool: Option<String>,
enrich_id_param: Option<String>,
dedup_ttl_seconds: u64,
},
}Expand description
A sensor source definition.
Variants§
JmapEmail
JMAP email sensor (push/poll).
Fields
Rss
RSS/Atom feed sensor.
Image
Directory watcher for images.
Audio
Directory watcher for audio files.
Fields
Weather
Weather API sensor.
Fields
Webhook
Generic webhook receiver.
Fields
Mcp
Generic MCP sensor — polls a tool on any MCP server.
Fields
server: Box<McpServerEntry>MCP server endpoint (string URL, {url, auth_header}, or {command, args, env}).
modality: SensorModalitySensory modality of produced events (default: "text").
items_field: Option<String>JSON field containing items array in tool result (default: root is array).
priority_senders: Vec<String>Priority senders for email triage (only when kafka_topic = "hb.sensor.email").
enrich_tool: Option<String>Optional enrichment tool to call for each new item (e.g., gmail_get_message).
When set, the sensor calls this tool with the item’s ID to fetch detailed
metadata (headers, body, labels) before producing to Kafka.
Implementations§
Source§impl SensorSourceConfig
impl SensorSourceConfig
Sourcepub fn sender_lists(&self) -> (&[String], &[String])
pub fn sender_lists(&self) -> (&[String], &[String])
Get priority and blocked sender lists for trust resolution.
Returns (priority_senders, blocked_senders). Only email-type sources
have these lists; other source types return empty slices.
Trait Implementations§
Source§impl Clone for SensorSourceConfig
impl Clone for SensorSourceConfig
Source§fn clone(&self) -> SensorSourceConfig
fn clone(&self) -> SensorSourceConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more