services/pulse/pulse

Pulse service — time-driven periodic task execution. Reads PULSE.md on a fixed interval, parses task checklists, and executes active tasks through the full agent conversation loop.

Two-phase mode (configurable): Phase 1 asks the LLM to decide which tasks to run; Phase 2 executes the selected tasks. Single-phase mode runs all active tasks directly.

Types

pub type Priority {
  High
  Medium
  Low
}

Constructors

  • High
  • Medium
  • Low
pub type PulseTask {
  PulseTask(priority: Priority, text: String)
}

Constructors

  • PulseTask(priority: Priority, text: String)

Values

pub fn extract_metadata(text: String) -> #(Priority, String)
pub fn parse_decision(
  decision: String,
  tasks: List(PulseTask),
) -> List(PulseTask)
pub fn parse_priority(s: String) -> Priority
pub fn parse_tasks(content: String) -> List(PulseTask)
pub fn service(
  client: completions.Client,
  persona: String,
  tool_defs: List(completions.ToolDefinition),
  tools: List(tool.Tool),
  max_rounds: Int,
  conn: sqlight.Connection,
  user_key: String,
) -> shapes.Service

Service shape — supervised: True. The timer loop runs in a spawned process.

pub fn sort_by_priority(
  tasks: List(PulseTask),
) -> List(PulseTask)
Search Document