# `Wardrik.Interrupt`

A call an agent waits on a person for.

    {:waiting, [interrupt]} = Wardrik.Agent.reply(scope, "agt_1", "Refund order 1001.")
    Wardrik.Agent.approve(scope, interrupt: interrupt)

`reason` is `:tool_approval`, `:model_approval`, `:ceiling_approval`, `:authorization` or
`:in_doubt`. `name` and `arguments` are the call the person decides on. `tool_call_id` is the
call to answer. `agent` and `conversation` say where it waits. Given as `interrupt:`, it names
them for you.

# `t`

```elixir
@type t() :: %Wardrik.Interrupt{
  agent: term(),
  arguments: term(),
  conversation: 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` and `conversation`.

# `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*
