types/hooks

Hook data types — used by CompressorHook and GuardrailHook behaviours.

Types

pub type CompressionPlan {
  Compress(
    head: List(message.Message),
    middle: List(message.Message),
    tail: List(message.Message),
  )
  NoCompression(history: List(message.Message))
}

Constructors

pub type CooldownState {
  CoolingDown(next_retry_at: Int)
  Ready
}

Constructors

  • CoolingDown(next_retry_at: Int)
  • Ready
pub type Escalation {
  None
  Warn(reason: String)
  BlockTool(name: String, reason: String)
  HaltLoop(reason: String)
}

Constructors

  • None
  • Warn(reason: String)
  • BlockTool(name: String, reason: String)
  • HaltLoop(reason: String)
pub type LoopState {
  LoopState(
    same_tool_failures: Int,
    same_args_streak: Int,
    total_failures: Int,
    last_tool_name: String,
    last_tool_args: String,
    blocked_tools: List(String),
    halted: Bool,
    recent_results: List(#(String, String, String)),
  )
}

Constructors

  • LoopState(
      same_tool_failures: Int,
      same_args_streak: Int,
      total_failures: Int,
      last_tool_name: String,
      last_tool_args: String,
      blocked_tools: List(String),
      halted: Bool,
      recent_results: List(#(String, String, String)),
    )
Search Document