pub struct NotificationsConfig {
pub enabled: bool,
pub macos_native: bool,
pub webhook_url: Option<String>,
pub webhook_topic: Option<String>,
pub title: String,
pub min_turn_duration_ms: u64,
pub only_on_error: bool,
pub webhook_allow_insecure: bool,
}Expand description
Configuration for the per-turn completion notifier.
Both channels (macOS and webhook) are independently enableable. At least one channel must be reachable for a notification to fire.
Fields§
§enabled: boolMaster switch. When false, no notifications are sent regardless of other fields.
macos_native: boolSend a macOS Notification Center banner via osascript.
Silently no-ops on non-macOS platforms.
webhook_url: Option<String>URL for the ntfy-compatible webhook endpoint (e.g. "https://ntfy.sh").
Empty string or absent means the webhook channel is disabled.
webhook_topic: Option<String>ntfy topic. Required when webhook_url is set; ignored otherwise.
title: StringNotification title shown in banners and webhook payloads.
min_turn_duration_ms: u64Minimum successful-turn wall-clock duration in milliseconds before a notification fires.
Set to 0 to always notify. Does NOT apply to error turns — errors always fire
regardless of duration.
only_on_error: boolWhen true, only fire on turns that completed with an error.
webhook_allow_insecure: boolAllow non-HTTPS webhook URLs.
When false (the default) only https:// webhook URLs are accepted.
Set to true to allow http:// URLs for local testing only — never use
in production as the notification payload is sent in plaintext.
Trait Implementations§
Source§impl Clone for NotificationsConfig
impl Clone for NotificationsConfig
Source§fn clone(&self) -> NotificationsConfig
fn clone(&self) -> NotificationsConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NotificationsConfig
impl Debug for NotificationsConfig
Source§impl Default for NotificationsConfig
impl Default for NotificationsConfig
Source§impl<'de> Deserialize<'de> for NotificationsConfig
impl<'de> Deserialize<'de> for NotificationsConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for NotificationsConfig
impl RefUnwindSafe for NotificationsConfig
impl Send for NotificationsConfig
impl Sync for NotificationsConfig
impl Unpin for NotificationsConfig
impl UnsafeUnpin for NotificationsConfig
impl UnwindSafe for NotificationsConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request