Wardrik.Interrupt (wardrik_protocol v0.1.0-rc.1)

Copy Markdown

A call an agent waits on a person for.

reason is :tool_approval, :model_approval, :ceiling_approval, :authorization or :in_doubt. agent_id is set only by Wardrik.Interrupts.list/2.

Summary

Functions

Builds one from the protocol's JSON.

Builds one from an interrupts.list item, with its agent_id.

Returns it as the protocol's JSON, without fields that are nil.

Types

t()

@type t() :: %Wardrik.Interrupt{
  agent_id: term(),
  id: term(),
  labels: term(),
  message: term(),
  name: term(),
  reason: term(),
  tool_call_id: term()
}

Functions

from_json(json)

@spec from_json(map()) :: t()

Builds one from the protocol's JSON.

from_listed(map)

@spec from_listed(map()) :: t()

Builds one from an interrupts.list item, with its agent_id.

to_json(value)

@spec to_json(t()) :: map()

Returns it as the protocol's JSON, without fields that are nil.