Jizoku.Runtime.Signal.JidoAdapter (jizoku v0.4.0)

Copy Markdown View Source

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.

Summary

Functions

Converts a recognized Jido command signal to a Jizoku signal.

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

Types

domain_envelope()

@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()

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

Functions

from_jido(signal)

@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(signal)

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

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