Public declaration syntax from harness-sdk/src/runtime/notifications.rs Original source SHA-256: a6ed4cdc5b4c4ba635af1b862d6f147e7560736f48f5fd324b87926851cab4e4 Function bodies and constant values are omitted. This is not the complete implementation. Source line 33 pub const MAX_NOTIFICATION_LEN: usize; Source line 39 #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "kebab-case")] pub enum NotificationKind { /// Streaming response just finished. AgentTurnComplete, /// Adapter raised an approval request that requires user input. ApprovalNeeded, /// A long-running tool call completed. ToolCallComplete, /// Catastrophic failure surfaced to the user. Error, } Source line 53 #[must_use] pub fn title(self) -> &'static str; Source line 65 #[derive(Debug, Clone, PartialEq, Eq, Default)] pub enum NotifierConfig { /// Disable notifications entirely. Disabled, /// Emit `OSC 9 ; title — body BEL` to the supplied writer. /// Default channel. #[default] TerminalOsc9, /// Spawn a user-supplied command, passing the body on argv. /// `argv[0]` is the program; remaining items are static /// arguments. The notification body is appended as the last /// argument when [`Notifier::notify`] is called. ExternalCommand { argv: Vec }, } Source line 82 #[derive(Debug, Clone, Default)] pub struct Notifier { } Source line 89 #[derive(Debug, Clone, PartialEq, Eq)] pub struct KindMask { } Source line 110 #[must_use] pub fn without(mut self, kind: NotificationKind) -> Self; Source line 122 #[must_use] pub fn allows(&self, kind: NotificationKind) -> bool; Source line 135 #[must_use] pub fn new(config: NotifierConfig) -> Self; Source line 144 #[must_use] pub fn with_mask(mut self, mask: KindMask) -> Self; Source line 151 #[must_use] pub fn is_enabled(&self) -> bool; Source line 157 #[must_use] pub fn allows(&self, kind: NotificationKind) -> bool; Source line 165 #[must_use] pub fn osc9_payload(kind: NotificationKind, body: &str) -> String; Source line 187 pub fn notify( &self, writer: &mut W, kind: NotificationKind, body: &str, ) -> io::Result<()>; Source line 214 #[must_use] pub fn external_command(&self, kind: NotificationKind, body: &str) -> Option>;