# `ExWapp.Session.Worker.Safety`
[🔗](https://github.com/elchemista/ex_wapp/blob/v0.1.5/lib/ex_wapp/session/worker/safety.ex#L1)

Implements the session's outbound safety circuit breaker.

It records server-side risk signals, applies configurable cool-off windows, and
can lock sending after forbidden responses until the session is reset.

# `state_data`

```elixir
@type state_data() :: %{
  counters: %{optional(atom()) =&gt; [integer()]},
  blocked_until_ms: integer() | nil,
  forbidden: boolean(),
  last_trip_reason: atom() | nil
}
```

# `check_send_allowed`

```elixir
@spec check_send_allowed(ExWapp.Session.Worker.t()) ::
  {:ok, ExWapp.Session.Worker.t()} | {:error, term(), ExWapp.Session.Worker.t()}
```

# `new`

```elixir
@spec new() :: state_data()
```

# `record_signal`

```elixir
@spec record_signal(ExWapp.Session.Worker.t(), atom()) :: ExWapp.Session.Worker.t()
```

# `status`

```elixir
@spec status(ExWapp.Session.Worker.t()) :: map()
```

---

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