# `Dsxir.CallContext`

Value type handed to `call_plugs`. Carries the call-site information a plug
needs to make an `:ok | {:halt, reason}` decision before the predictor's
`forward/4` runs.

Plugs are plain functions of arity 1:

    plug_fn :: (%Dsxir.CallContext{} -> :ok | {:halt, reason :: term()})

Plugs see the resolved metadata (`Dsxir.Settings.resolve(:metadata)` merged
at the wrapper) so tenant identity, request id, and any custom keys are
available without going back through settings.

# `t`

```elixir
@type t() :: %Dsxir.CallContext{
  inputs: map(),
  metadata: map(),
  opts: keyword(),
  predictor: atom(),
  program: Dsxir.Program.t(),
  signature: module()
}
```

# `new`

```elixir
@spec new(keyword()) :: t()
```

Build a `t()` from `fields`. Raises if any of the `:predictor`, `:signature`,
`:inputs`, or `:program` keys are missing.

---

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