calternal_plugin::mcp_events
Trusted webhook producer bus (DESIGN §55, #491).
Bounded webhook producer bus and subscription interests (#491, DESIGN §55). Producers publish only after a durable write. The User comes from the authorized operation; subscribers cannot supply it. Interest changes wake scheduled producers so they can park when no matching grant exists.
Source: crates/calternal-plugin/src/mcp_events.rs
Structs
Section titled “Structs”Interest
Section titled “Interest”pub struct InterestA verified subscription’s producer interest, never an authorization grant. Only the server replaces this snapshot; producers still emit owner-scoped occurrences and the server re-checks all live authority before delivery.
Fields
pub user_id: Stringpub name: Stringpub arguments: Value
Implements: Clone, PartialEq
Source: crates/calternal-plugin/src/mcp_events.rs:28
Occurrence
Section titled “Occurrence”pub struct OccurrenceOne trusted producer occurrence. IDs let receivers deduplicate retries.
Fields
pub user_id: Stringpub event_id: Stringpub name: Stringpub data: Value
Implements: Clone, Debug
Source: crates/calternal-plugin/src/mcp_events.rs:11
Functions
Section titled “Functions”pub fn bus() -> &'static tokio::sync::broadcast::Sender<Occurrence>Share one bounded process bus; lag requires a gap notice, never silent replay.
Source: crates/calternal-plugin/src/mcp_events.rs:19
interests
Section titled “interests”pub fn interests(name: &str) -> Vec<Interest>Read the verified owner and arguments for one trusted scheduled producer.
Source: crates/calternal-plugin/src/mcp_events.rs:74
replace_interests
Section titled “replace_interests”pub fn replace_interests(interests: Vec<Interest>)Replace the server-owned, bounded active-subscription snapshot (§55, #491).
Source: crates/calternal-plugin/src/mcp_events.rs:47
subscribe_interest_changes
Section titled “subscribe_interest_changes”pub fn subscribe_interest_changes() -> tokio::sync::watch::Receiver<u64>Subscribe to changes so a scheduled producer sleeps while its event has no active grants instead of waking on an idle timer (#491, DESIGN §55).