pub struct HeartbeatConfig {Show 14 fields
pub enabled: bool,
pub interval_minutes: u32,
pub two_phase: bool,
pub message: Option<String>,
pub target: Option<String>,
pub to: Option<String>,
pub adaptive: bool,
pub min_interval_minutes: u32,
pub max_interval_minutes: u32,
pub deadman_timeout_minutes: u32,
pub deadman_channel: Option<String>,
pub deadman_to: Option<String>,
pub max_run_history: u32,
pub load_session_context: bool,
}Expand description
Heartbeat configuration for periodic health pings ([heartbeat] section).
Fields§
§enabled: boolEnable periodic heartbeat pings. Default: false.
interval_minutes: u32Interval in minutes between heartbeat pings. Default: 5.
two_phase: boolEnable two-phase heartbeat: Phase 1 asks LLM whether to run, Phase 2
executes only when the LLM decides there is work to do. Saves API cost
during quiet periods. Default: true.
message: Option<String>Optional fallback task text when HEARTBEAT.md has no task entries.
target: Option<String>Optional delivery channel for heartbeat output (for example: telegram).
When omitted, auto-selects the first configured channel.
to: Option<String>Optional delivery recipient/chat identifier (required when target is
explicitly set).
adaptive: boolEnable adaptive intervals that back off on failures and speed up for
high-priority tasks. Default: false.
min_interval_minutes: u32Minimum interval in minutes when adaptive mode is enabled. Default: 5.
max_interval_minutes: u32Maximum interval in minutes when adaptive mode backs off. Default: 120.
deadman_timeout_minutes: u32Dead-man’s switch timeout in minutes. If the heartbeat has not ticked
within this window, an alert is sent. 0 disables. Default: 0.
deadman_channel: Option<String>Channel for dead-man’s switch alerts (e.g. telegram). Falls back to
the heartbeat delivery channel.
deadman_to: Option<String>Recipient for dead-man’s switch alerts. Falls back to to.
max_run_history: u32Maximum number of heartbeat run history records to retain. Default: 100.
load_session_context: boolLoad the channel session history before each heartbeat task execution so
the LLM has conversational context. Default: false.
When true, the session file for the configured target/to is passed
to the agent as session_state_file, giving it access to the recent
conversation history — just as if the user had sent a message.
Trait Implementations§
Source§impl Clone for HeartbeatConfig
impl Clone for HeartbeatConfig
Source§fn clone(&self) -> HeartbeatConfig
fn clone(&self) -> HeartbeatConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HeartbeatConfig
impl Debug for HeartbeatConfig
Source§impl Default for HeartbeatConfig
impl Default for HeartbeatConfig
Source§impl<'de> Deserialize<'de> for HeartbeatConfig
impl<'de> Deserialize<'de> for HeartbeatConfig
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>,
Source§impl JsonSchema for HeartbeatConfig
impl JsonSchema for HeartbeatConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for HeartbeatConfig
impl RefUnwindSafe for HeartbeatConfig
impl Send for HeartbeatConfig
impl Sync for HeartbeatConfig
impl Unpin for HeartbeatConfig
impl UnsafeUnpin for HeartbeatConfig
impl UnwindSafe for HeartbeatConfig
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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 more