# `Dsxir.Module.Runtime`

Dispatches `call(prog, :name, inputs)` from inside `forward/2` to the
declared predictor implementation.

Looks up `%PredictorDecl{}` by name, extracts per-predictor state from
`prog`, runs the configured `call_plugs` in declared order, invokes
`impl.forward/4`, puts the (possibly updated) state back, records the trace
entry, returns `{prog', prediction}`.

## call_plugs

Plugs resolved from `Dsxir.Settings.resolve(:call_plugs, [])` run before
every predictor dispatch. Each receives a `%Dsxir.CallContext{}` and must
return `:ok` to continue or `{:halt, reason}` to abort. A halt raises
`Dsxir.Errors.Halted.Plug` and the predictor `forward/4` is not invoked —
no `[:dsxir, :predictor, :start | :stop]` events are emitted for halted
calls.

# `call`

```elixir
@spec call(Dsxir.Program.t(), atom(), map() | keyword(), keyword()) ::
  {Dsxir.Program.t(), Dsxir.Prediction.t()}
```

Dispatch a predictor call by `name` against `prog`. Runs the configured
`call_plugs`, invokes the predictor implementation, records the trace, and
returns the updated program with the prediction.

---

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