# `ReqManagedAgents.Provisioner.Runtime`
[🔗](https://github.com/cash-mckeeman/req_managed_agents/blob/v0.13.0/req_managed_agents/lib/req_managed_agents/provisioner/runtime.ex#L1)

A language runtime to install in a provisioned environment. `new/1` is the
single shape+charset validation gate (the version charset closes shell
injection through the rendered bootstrap script).

# `t`

```elixir
@type t() :: %ReqManagedAgents.Provisioner.Runtime{
  lang: atom(),
  version: String.t(),
  via: :mise
}
```

# `new`

```elixir
@spec new(t() | map()) :: {:ok, t()} | {:error, {:invalid_runtime, term()}}
```

Builds and validates a `ReqManagedAgents.Provisioner.Runtime`.

Accepts a map with `:lang` (atom) and `:version` (binary) keys, plus an
optional `:via` (defaults to `:mise`; only `:mise` is currently supported).
Also accepts an existing `ReqManagedAgents.Provisioner.Runtime` struct, which is
re-validated (so a struct built by other means still passes through the
charset gate before it can reach rendering).

Returns `{:ok, t()}` or `{:error, {:invalid_runtime, term()}}`.

---

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