Documentation
¶
Overview ¶
Package heartbeat implements a periodic "wake-up" service that spawns the agent on a fixed interval to check for pending work. It is hosted by the channels-manager daemon (peer to the scheduler) and is disabled by default.
Unlike the scheduler, heartbeat does not route output to a channel. Each tick fires `infer agent --heartbeat`, the agent runs to completion using a tailored system prompt, and the agent's stdout is logged. Whatever externally-visible action the agent takes (e.g. posting to Telegram, opening a PR) it does via its own tools.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config bundles the runtime knobs the heartbeat service needs. It is derived from config.HeartbeatConfig at startup time so the service stays decoupled from the broader Config type.
type Options ¶
type Options struct {
Config Config
// ExecCommand defaults to exec.CommandContext when nil.
ExecCommand agentrunner.ExecFunc
// BinaryPath defaults to os.Args[0] when empty.
BinaryPath string
}
Options bundles dependencies for NewService.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service drives the heartbeat ticker. Single global instance per daemon; constructed by NewService and lifecycle-managed via Start/Stop.
func NewService ¶
NewService constructs a heartbeat Service. Returns an error if the configured interval is non-positive.