Sensor Pipeline
The sensor pipeline ingests data from external sources, triages events by urgency, correlates them into stories, and produces daemon commands.
Architecture
Section titled “Architecture” Sources Triage Stories Daemon ------- ------ ------- ------ +-----------+ | RSS |--+ +----------+ | | Email |--+ +------------+ +------------+ +---------+ | (JMAP/ | +----->| Triage |---->| Story |-->| Command | | Google) |--+ | (per-type | | Builder | | Producer | +----------+ | | scoring) | | (dedup, | | -> Kafka | | Webhook |--+ +------------+ | merge) | +---------+ +----------+ | +------------+ | Weather |--+ +----------+ | | Audio |--+ +----------+ | | Image |--+ +----------+ | | MCP |--+ +----------+Sources
Section titled “Sources”Each source implements the Sensor trait with name(), modality(), and run():
| Source | Modality | Description |
|---|---|---|
| RSS | Text | Poll RSS/Atom feeds |
| Email (JMAP) | Text | Google Workspace / JMAP email monitoring |
| Webhook | Text | HTTP webhook receiver |
| Weather | Text | Weather data polling |
| Audio | Audio | Audio input processing |
| Image | Image | Image input processing |
| MCP | Text | MCP server events |
Triage
Section titled “Triage”Per-modality classifiers score urgency and relevance of incoming sensor events. Events below the threshold are dropped; high-urgency events are fast-tracked.
Stories
Section titled “Stories”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
DaemonCommandentries sent to Kafka
Configuration
Section titled “Configuration”[daemon.sensors]# Sensor sources are configured per-type# See daemon configuration for full referenceFeature Flag
Section titled “Feature Flag”Sensors require the sensor feature flag (which implies daemon):
cargo build --features sensor