Skip to content

Sensor Pipeline

The sensor pipeline ingests data from external sources, triages events by urgency, correlates them into stories, and produces daemon commands.

Sources Triage Stories Daemon
------- ------ ------- ------
+-----------+
| RSS |--+
+----------+ |
| Email |--+ +------------+ +------------+ +---------+
| (JMAP/ | +----->| Triage |---->| Story |-->| Command |
| Google) |--+ | (per-type | | Builder | | Producer |
+----------+ | | scoring) | | (dedup, | | -> Kafka |
| Webhook |--+ +------------+ | merge) | +---------+
+----------+ | +------------+
| Weather |--+
+----------+ |
| Audio |--+
+----------+ |
| Image |--+
+----------+ |
| MCP |--+
+----------+

Each source implements the Sensor trait with name(), modality(), and run():

SourceModalityDescription
RSSTextPoll RSS/Atom feeds
Email (JMAP)TextGoogle Workspace / JMAP email monitoring
WebhookTextHTTP webhook receiver
WeatherTextWeather data polling
AudioAudioAudio input processing
ImageImageImage input processing
MCPTextMCP server events

Per-modality classifiers score urgency and relevance of incoming sensor events. Events below the threshold are dropped; high-urgency events are fast-tracked.

The StoryCorrelator aggregates related events:

  • Deduplication — prevents the same event from triggering multiple actions
  • Merge — combines related events into a single story
  • Action production — completed stories produce DaemonCommand entries sent to Kafka
[daemon.sensors]
# Sensor sources are configured per-type
# See daemon configuration for full reference

Sensors require the sensor feature flag (which implies daemon):

Terminal window
cargo build --features sensor