# `Wardrik.Interrupt`

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`.

# `t`

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

# `from_json`

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

Builds one from the protocol's JSON.

# `from_listed`

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

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

# `to_json`

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

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
