Jido.Composer.Directive.SuspendForHuman (Jido Composer v0.6.0)

Copy Markdown View Source

Convenience wrapper that builds a generalized Suspend directive with reason: :human_input and an embedded ApprovalRequest.

Existing code calling SuspendForHuman.new(approval_request: req) gets back a %Suspend{} directive. The struct is retained for backward-compatible pattern matching in directive execution.

Summary

Functions

Creates a %Suspend{} directive wrapping a Suspension with reason: :human_input and the given ApprovalRequest.

Functions

new(attrs)

@spec new(keyword()) ::
  {:ok, Jido.Composer.Directive.Suspend.t()} | {:error, String.t()}

Creates a %Suspend{} directive wrapping a Suspension with reason: :human_input and the given ApprovalRequest.