pub struct SinkNotification {
pub id: Option<String>,
pub title: String,
pub body: String,
pub category: String,
pub priority: String,
pub session_id: String,
pub dedup_key: Option<String>,
pub created_at: Option<String>,
pub click_url: Option<String>,
}Expand description
An owned, sink-agnostic notification payload.
Decoupled from AgentEvent::Notification so producers can attach a sink-only
click URL. Delivery metadata is retained because command hooks receive the
complete classified notification — see SinkNotification::from_event.
Fields§
§id: Option<String>§title: String§body: String§category: StringStable wire category, e.g. "needs_approval", "run_completed" (see
bamboo_notification::policy::NotificationCategory::as_str).
priority: String"high" | "normal" | "low" (see
bamboo_notification::policy::NotificationPriority::as_str).
session_id: String§dedup_key: Option<String>§created_at: Option<String>§click_url: Option<String>Deep link to surface in a click-through push notification. The explicit
Notify tool populates this when its caller supplies a URL.
Implementations§
Source§impl SinkNotification
impl SinkNotification
Sourcepub fn from_event(event: &AgentEvent) -> Option<Self>
pub fn from_event(event: &AgentEvent) -> Option<Self>
Builds a sink-facing payload from an already-classified
AgentEvent::Notification. Returns None for any other event
variant (defensive; callers should only ever pass a Notification).
Trait Implementations§
Source§impl Clone for SinkNotification
impl Clone for SinkNotification
Source§fn clone(&self) -> SinkNotification
fn clone(&self) -> SinkNotification
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more