# `Jizoku.Runtime.Signal.JidoAdapter`
[🔗](https://github.com/dark-trench/jizoku/blob/main/lib/jizoku/runtime/signal/jido_adapter.ex#L1)

Converts Jizoku runtime command signals to and from `Jido.Signal`.

The adapter keeps `Jizoku.Runtime.Signal` as the product-level contract and
treats `Jido.Signal` as a boundary envelope. Public callers may pass
recognized command envelopes directly to `Jizoku.apply_signal/2`; this
module remains the conversion boundary and does not dispatch, persist, or
apply runtime commands itself.

# `domain_envelope`

```elixir
@type domain_envelope() :: %{
  id: String.t(),
  source: String.t(),
  subject: String.t() | nil,
  type: String.t(),
  occurred_at: DateTime.t(),
  trace: Jizoku.Runtime.Trace.t() | nil,
  event_key: String.t(),
  identity_key: String.t(),
  envelope_fingerprint: String.t()
}
```

# `error`

```elixir
@type error() :: {:invalid_signal_adapter, term()}
```

# `from_jido`

```elixir
@spec from_jido(Jido.Signal.t()) ::
  {:ok, Jizoku.Runtime.Signal.t()} | {:error, error()}
```

Converts a recognized Jido command signal to a Jizoku signal.

The CloudEvents source is retained as audit provenance. It is not an
authorization decision; hosts must authenticate and authorize inbound
signals before applying them.

# `to_jido`

```elixir
@spec to_jido(Jizoku.Runtime.Signal.t()) :: {:ok, Jido.Signal.t()} | {:error, error()}
```

Converts a Jizoku runtime command signal to a `Jido.Signal`.

---

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